Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy-integrations-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: ./.github/actions/deploy-integrations
with:
environment: 'production'
extra_filter: "-F '!docusign' -F '!zendesk-messaging-hitl'"
extra_filter: "-F '!docusign' -F '!zendesk-messaging-hitl' -F '!zendesk'"
force: ${{ github.event.inputs.force == 'true' }}
sentry_auth_token: ${{ secrets.SENTRY_AUTH_TOKEN }}
token_cloud_ops_account: ${{ secrets.PRODUCTION_TOKEN_CLOUD_OPS_ACCOUNT }}
Expand Down
2 changes: 1 addition & 1 deletion integrations/airtable/integration.definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default new IntegrationDefinition({
title: 'Airtable',
description:
'Access and manage Airtable data to allow your chatbot to retrieve details, update records, and organize information.',
version: '1.0.1',
version: '1.0.2',
readme: 'hub.md',
icon: 'icon.svg',
configuration: {
Expand Down
15 changes: 13 additions & 2 deletions integrations/airtable/src/misc/sub-schemas.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import { z } from '@botpress/sdk'

const fieldSchema = z.object({ name: z.string(), type: z.string() }).passthrough()
const fieldSchema = z
.object({
name: z.string().title('Name').describe('Field name'),
type: z.string().title('Type').describe('Field type'),
})
.passthrough()

const viewSchema = z.object({ id: z.string(), name: z.string(), type: z.string() }).passthrough()
const viewSchema = z
.object({
id: z.string().title('ID').describe('View ID'),
name: z.string().title('Name').describe('View name'),
type: z.string().title('Type').describe('View type'),
})
.passthrough()

const tableSchema = z.object({
description: z.string().optional().describe('The description of the table').title('description'),
Expand Down
126 changes: 72 additions & 54 deletions integrations/attio/definitions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { baseIdentifierSchema } from './common'

const recordSchema = z
.object({
id: baseIdentifierSchema,
id: baseIdentifierSchema.describe('The record identifier'),
created_at: z.string().title('Created At').describe('RFC3339 timestamp when the record was created'),
web_url: z.string().title('Web URL').describe('URL of the record in Attio UI'),
values: z
Expand All @@ -16,34 +16,39 @@ const recordSchema = z
// Objects & Attributes
const objectSchema = z
.object({
id: baseIdentifierSchema.optional(),
api_slug: z.string().optional(),
singular_noun: z.string().optional(),
plural_noun: z.string().optional(),
created_at: z.string().optional(),
id: baseIdentifierSchema.optional().describe('The object identifier'),
api_slug: z.string().optional().title('API Slug').describe('The API slug for the object'),
singular_noun: z.string().optional().title('Singular Noun').describe('The singular form of the object name'),
plural_noun: z.string().optional().title('Plural Noun').describe('The plural form of the object name'),
created_at: z.string().optional().title('Created At').describe('RFC3339 timestamp when the object was created'),
})
.title('Object')

const attributeSchema = z
.object({
id: baseIdentifierSchema.extend({ attribute_id: z.string().optional() }).optional(),
title: z.string().optional(),
description: z.string().nullable().optional(),
api_slug: z.string().optional(),
type: z.string().optional(),
slug: z.string().optional(),
id: baseIdentifierSchema
.extend({ attribute_id: z.string().optional().title('Attribute ID').describe('The attribute identifier') })
.optional()
.describe('The attribute identifier object'),
title: z.string().optional().title('Title').describe('The title of the attribute'),
description: z.string().nullable().optional().title('Description').describe('The description of the attribute'),
api_slug: z.string().optional().title('API Slug').describe('The API slug for the attribute'),
type: z.string().optional().title('Type').describe('The type of the attribute'),
slug: z.string().optional().title('Slug').describe('The slug for the attribute'),
options: z
.array(
z.object({
id: z.string().optional(),
label: z.string().optional(),
name: z.string().optional(),
value: z.string().optional(),
title: z.string().optional(),
slug: z.string().optional(),
id: z.string().optional().title('ID').describe('The option identifier'),
label: z.string().optional().title('Label').describe('The label of the option'),
name: z.string().optional().title('Name').describe('The name of the option'),
value: z.string().optional().title('Value').describe('The value of the option'),
title: z.string().optional().title('Title').describe('The title of the option'),
slug: z.string().optional().title('Slug').describe('The slug of the option'),
})
)
.optional(),
.optional()
.title('Options')
.describe('The list of options for the attribute'),
})
.title('Attribute')

Expand All @@ -56,8 +61,8 @@ const listRecords: ActionDefinition = {
filter: z
.array(
z.object({
attribute: z.string().min(1).title('Attribute'),
value: z.string().min(1).title('Value'),
attribute: z.string().min(1).title('Attribute').describe('The attribute to filter by'),
value: z.string().min(1).title('Value').describe('The value to filter for'),
})
)
.optional()
Expand All @@ -66,9 +71,9 @@ const listRecords: ActionDefinition = {
sorts: z
.array(
z.object({
direction: z.enum(['asc', 'desc']).title('Direction'),
attribute: z.string().min(1).title('Attribute'),
field: z.string().min(1).title('Field'),
direction: z.enum(['asc', 'desc']).title('Direction').describe('The sort direction'),
attribute: z.string().min(1).title('Attribute').describe('The attribute to sort by'),
field: z.string().min(1).title('Field').describe('The field to sort by'),
})
)
.optional()
Expand All @@ -93,18 +98,23 @@ const getRecord: ActionDefinition = {
input: {
schema: z.object({
object: z.string().min(1).title('Object').describe('Object slug or UUID'),
id: baseIdentifierSchema.extend({ record_id: z.string().min(1).title('Record ID').describe('Record UUID') }),
id: baseIdentifierSchema
.extend({ record_id: z.string().min(1).title('Record ID').describe('Record UUID') })
.describe('The record identifier'),
}),
},
output: {
schema: z
.object({
data: z.object({
id: baseIdentifierSchema.title('Identifier').describe('The fetched identifier'),
web_url: z.string().title('Web URL').describe('URL of the record in Attio UI'),
values: z.record(z.any()).title('Values').describe('Map of attribute slug/ID to value(s)'),
created_at: z.string().title('Created At').describe('RFC3339 timestamp when the record was created'),
}),
data: z
.object({
id: baseIdentifierSchema.title('Identifier').describe('The fetched identifier'),
web_url: z.string().title('Web URL').describe('URL of the record in Attio UI'),
values: z.record(z.any()).title('Values').describe('Map of attribute slug/ID to value(s)'),
created_at: z.string().title('Created At').describe('RFC3339 timestamp when the record was created'),
})
.title('Data')
.describe('The fetched record data'),
})
.title('Get Record Response'),
},
Expand All @@ -116,17 +126,20 @@ const createRecord: ActionDefinition = {
input: {
schema: z.object({
object: z.string().min(1).title('Object').describe('Object slug or UUID'),
data: z.object({
values: z
.array(
z.object({
attribute: z.string().min(1).title('Attribute'),
value: z.string().min(1).title('Value'),
})
)
.title('Values')
.describe('Array of attribute slug/ID to value(s)'),
}),
data: z
.object({
values: z
.array(
z.object({
attribute: z.string().min(1).title('Attribute').describe('The attribute slug or ID'),
value: z.string().min(1).title('Value').describe('The value to set for the attribute'),
})
)
.title('Values')
.describe('Array of attribute slug/ID to value(s)'),
})
.title('Data')
.describe('The record data to create'),
}),
},
output: {
Expand All @@ -144,18 +157,23 @@ const updateRecord: ActionDefinition = {
input: {
schema: z.object({
object: z.string().min(1).title('Object').describe('Object slug or UUID'),
id: baseIdentifierSchema.extend({ record_id: z.string().min(1).title('Record ID').describe('Record UUID') }),
data: z.object({
values: z
.array(
z.object({
attribute: z.string().min(1).title('Attribute'),
value: z.string().min(1).title('Value'),
})
)
.title('Values')
.describe('Array of attribute slug/ID to value(s) to upsert'),
}),
id: baseIdentifierSchema
.extend({ record_id: z.string().min(1).title('Record ID').describe('Record UUID') })
.describe('The record identifier'),
data: z
.object({
values: z
.array(
z.object({
attribute: z.string().min(1).title('Attribute').describe('The attribute slug or ID'),
value: z.string().min(1).title('Value').describe('The value to set for the attribute'),
})
)
.title('Values')
.describe('Array of attribute slug/ID to value(s) to upsert'),
})
.title('Data')
.describe('The record data to update'),
}),
},
output: {
Expand Down
27 changes: 19 additions & 8 deletions integrations/attio/definitions/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,40 @@ import { baseIdentifierSchema } from './common'

const recordEventSchema = z.object({
event_type: z.string().title('Event Type').describe('The type of event'),
id: baseIdentifierSchema.extend({ record_id: z.string().title('Record ID').describe('The record identifier') }),
actor: z.object({
type: z.string().title('Actor Type').describe('The type of actor (e.g., workspace-member)'),
id: z.string().title('Actor ID').describe('The actor identifier'),
}),
id: baseIdentifierSchema
.extend({ record_id: z.string().title('Record ID').describe('The record identifier') })
.describe('The record identifier object'),
actor: z
.object({
type: z.string().title('Actor Type').describe('The type of actor (e.g., workspace-member)'),
id: z.string().title('Actor ID').describe('The actor identifier'),
})
.title('Actor')
.describe('The actor who triggered the event'),
})

const recordCreated: EventDefinition = {
title: 'Record Created',
description: 'A new record has been created in Attio',
schema: recordEventSchema.extend({ event_type: z.literal('record.created') }),
schema: recordEventSchema.extend({
event_type: z.literal('record.created').title('Event Type').describe('The type of event'),
}),
}

const recordUpdated: EventDefinition = {
title: 'Record Updated',
description: 'A record has been updated in Attio',
schema: recordEventSchema.extend({ event_type: z.literal('record.updated') }),
schema: recordEventSchema.extend({
event_type: z.literal('record.updated').title('Event Type').describe('The type of event'),
}),
}

const recordDeleted: EventDefinition = {
title: 'Record Deleted',
description: 'A record has been deleted in Attio',
schema: recordEventSchema.extend({ event_type: z.literal('record.deleted') }),
schema: recordEventSchema.extend({
event_type: z.literal('record.deleted').title('Event Type').describe('The type of event'),
}),
}

export const events = {
Expand Down
2 changes: 1 addition & 1 deletion integrations/attio/integration.definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { actions, states, events } from './definitions'

export default new IntegrationDefinition({
name: 'attio',
version: '1.0.0',
version: '1.0.1',

title: 'Attio',
readme: 'hub.md',
Expand Down
1 change: 1 addition & 0 deletions integrations/attio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@botpresshub/attio",
"scripts": {
"check:type": "tsc --noEmit",
"check:bplint": "bp lint",
"build": "bp add -y && bp build",
"test": "vitest --run"
},
Expand Down
2 changes: 1 addition & 1 deletion integrations/bigcommerce-sync/integration.definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { configuration, states, actions } from './src/definitions/index'
export default new IntegrationDefinition({
name: 'bigcommerce',
title: 'BigCommerce',
version: '3.2.0',
version: '3.2.1',
readme: 'hub.md',
icon: 'icon.svg',
description: 'Sync products from BigCommerce to Botpress',
Expand Down
1 change: 1 addition & 0 deletions integrations/bigcommerce-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@botpresshub/bigcommerce",
"scripts": {
"check:type": "tsc --noEmit",
"check:bplint": "bp lint",
"build": "bp add -y && bp build",
"test": "vitest --run"
},
Expand Down
Loading
Loading