diff --git a/integrations/bamboohr/integration.definition.ts b/integrations/bamboohr/integration.definition.ts index f2071b69f03..11bdd76dad8 100644 --- a/integrations/bamboohr/integration.definition.ts +++ b/integrations/bamboohr/integration.definition.ts @@ -1,9 +1,10 @@ /* bplint-disable */ +import { posthogHelper } from '@botpress/common' import { IntegrationDefinition, z } from '@botpress/sdk' import { actions, events, subdomain } from './definitions' export const INTEGRATION_NAME = 'bamboohr' -export const INTEGRATION_VERSION = '2.0.0' +export const INTEGRATION_VERSION = '2.0.1' export default new IntegrationDefinition({ name: INTEGRATION_NAME, @@ -40,6 +41,7 @@ export default new IntegrationDefinition({ OAUTH_CLIENT_ID: { description: 'The OAuth Client ID provided by BambooHR from the developer portal.', }, + ...posthogHelper.COMMON_SECRET_NAMES, }, states: { oauth: { diff --git a/integrations/bamboohr/src/index.ts b/integrations/bamboohr/src/index.ts index 8a26ceaf368..2f77b94a605 100644 --- a/integrations/bamboohr/src/index.ts +++ b/integrations/bamboohr/src/index.ts @@ -1,12 +1,25 @@ +import { posthogHelper } from '@botpress/common' +import { INTEGRATION_NAME, INTEGRATION_VERSION } from 'integration.definition' import { actions } from './actions' import { handler } from './handler' import { register, unregister } from './setup' -import * as bp from '.botpress' -export default new bp.Integration({ - register, - unregister, - actions, - channels: {}, - handler, +import * as bp from '.botpress' +@posthogHelper.wrapIntegration({ + integrationName: INTEGRATION_NAME, + integrationVersion: INTEGRATION_VERSION, + key: bp.secrets.POSTHOG_KEY, }) +class BambooHrIntegration extends bp.Integration { + public constructor() { + super({ + register, + unregister, + actions, + channels: {}, + handler, + }) + } +} + +export default new BambooHrIntegration() diff --git a/integrations/googlecalendar/definitions/configuration.ts b/integrations/googlecalendar/definitions/configuration.ts index b17267c18eb..53f6503fb41 100644 --- a/integrations/googlecalendar/definitions/configuration.ts +++ b/integrations/googlecalendar/definitions/configuration.ts @@ -35,10 +35,10 @@ export const configurations = { .describe('The client email from the Google service account. You can get it from the downloaded JSON file.'), impersonateEmail: z .string() + .optional() .title('Impersonate email') - .email() .describe( - "The email of the user to impersonate. This is the email of the user you want to impersonate. It's mandatory to invite people or create meetings." + "The email of the user to impersonate. This is the email of the user you want to impersonate. It's mandatory for inviting people or creating meetings." ), }), }, diff --git a/integrations/googlecalendar/integration.definition.ts b/integrations/googlecalendar/integration.definition.ts index dd17191374c..76a2e500bdb 100644 --- a/integrations/googlecalendar/integration.definition.ts +++ b/integrations/googlecalendar/integration.definition.ts @@ -2,7 +2,7 @@ import * as sdk from '@botpress/sdk' import { actions, entities, configuration, configurations, identifier, events, secrets, states } from './definitions' export const INTEGRATION_NAME = 'googlecalendar' -export const INTEGRATION_VERSION = '2.0.3' +export const INTEGRATION_VERSION = '2.0.4' export default new sdk.IntegrationDefinition({ name: INTEGRATION_NAME, diff --git a/integrations/googlecalendar/src/google-api/oauth-client.ts b/integrations/googlecalendar/src/google-api/oauth-client.ts index 83bac10819a..4c2d1b49bed 100644 --- a/integrations/googlecalendar/src/google-api/oauth-client.ts +++ b/integrations/googlecalendar/src/google-api/oauth-client.ts @@ -46,7 +46,7 @@ export const getAuthenticatedOAuth2Client = async ({ email: ctx.configuration.clientEmail, key: ctx.configuration.privateKey.split(String.raw`\n`).join('\n'), scopes: OAUTH_SCOPES, - subject: ctx.configuration.impersonateEmail, + subject: ctx.configuration?.impersonateEmail || undefined, // Ensure that the impersonate email is undefined if empty string }) }