diff --git a/integrations/hubspot/integration.definition.ts b/integrations/hubspot/integration.definition.ts index 27e53ee988d..aa9065eaa58 100644 --- a/integrations/hubspot/integration.definition.ts +++ b/integrations/hubspot/integration.definition.ts @@ -7,6 +7,19 @@ export default new IntegrationDefinition({ version: '0.0.1', readme: 'hub.md', icon: 'icon.svg', + // TODO: Implement OAuth + configuration: { + schema: z.object({}), + }, + configurations: { + manual: { + title: 'Manual Configuration', + description: 'Manual configuration, use your own Hubspot app', + schema: z.object({ + accessToken: z.string().min(1).title('Access Token').describe('Your Hubspot Access Token'), + }), + }, + }, events: { contactCreated: { title: 'Contact Created', diff --git a/integrations/hubspot/package.json b/integrations/hubspot/package.json index 443c21d1d79..d419f07bd6b 100644 --- a/integrations/hubspot/package.json +++ b/integrations/hubspot/package.json @@ -10,7 +10,8 @@ "dependencies": { "@botpress/client": "workspace:*", "@botpress/sdk": "workspace:*", - "@botpress/sdk-addons": "workspace:*" + "@botpress/sdk-addons": "workspace:*", + "@hubspot/api-client": "^13.1.0" }, "devDependencies": { "@botpress/cli": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1df7c4ada9d..ab0bc53214c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1004,6 +1004,9 @@ importers: '@botpress/sdk-addons': specifier: workspace:* version: link:../../packages/sdk-addons + '@hubspot/api-client': + specifier: ^13.1.0 + version: 13.1.0 devDependencies: '@botpress/cli': specifier: workspace:* @@ -5811,6 +5814,21 @@ packages: graphql: 15.8.0 dev: false + /@hubspot/api-client@13.1.0: + resolution: {integrity: sha512-l+GIaMOFF0rQKMEs6+hTdaGhw0i4ym/LppKryt1d4xWakFlckJ/BFxmbjRZXX248fwRzKPQCw2y0FZ0ajCWePQ==} + engines: {node: '>=18.0.0'} + dependencies: + '@types/node': 22.16.4 + '@types/node-fetch': 2.6.12 + bottleneck: 2.19.5 + es6-promise: 4.2.8 + form-data: 4.0.4 + lodash.merge: 4.6.2 + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: false + /@humanfs/core@0.19.1: resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -14381,7 +14399,6 @@ packages: /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true /lodash.once@4.1.1: resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==}