chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { IntegrationDefinitionProps, messages } from '@botpress/sdk'
|
||||
|
||||
export const channels = {
|
||||
channel: {
|
||||
title: 'Conversation Channel',
|
||||
description: 'A channel for sending and receiving messages through Twilio Conversations',
|
||||
messages: { ...messages.defaults, bloc: messages.markdownBloc },
|
||||
message: {
|
||||
tags: {
|
||||
id: {
|
||||
title: 'Message ID',
|
||||
description: 'The Twilio message ID',
|
||||
},
|
||||
},
|
||||
},
|
||||
conversation: {
|
||||
tags: {
|
||||
userPhone: {
|
||||
title: 'User Phone',
|
||||
description: 'The phone number of the user',
|
||||
},
|
||||
activePhone: {
|
||||
title: 'Active Phone',
|
||||
description: 'The phone number of the active user',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} satisfies IntegrationDefinitionProps['channels']
|
||||
@@ -0,0 +1,23 @@
|
||||
import { z, IntegrationDefinitionProps } from '@botpress/sdk'
|
||||
|
||||
export const configuration = {
|
||||
schema: z.object({
|
||||
accountSID: z.string().min(1).describe('The account SID').title('Account SID'),
|
||||
authToken: z.string().min(1).describe('The token for authentication').title('Authorization token'),
|
||||
downloadMedia: z
|
||||
.boolean()
|
||||
.default(true)
|
||||
.title('Download Media')
|
||||
.describe(
|
||||
'Automatically download media files using the Files API for content access. If disabled, temporary Twilio media URLs will be used, which require authentication.'
|
||||
),
|
||||
downloadedMediaExpiry: z
|
||||
.number()
|
||||
.default(24)
|
||||
.optional()
|
||||
.title('Downloaded Media Expiry')
|
||||
.describe(
|
||||
'Expiry time in hours for downloaded media files. An expiry time of 0 means the files will never expire.'
|
||||
),
|
||||
}),
|
||||
} satisfies IntegrationDefinitionProps['configuration']
|
||||
@@ -0,0 +1,25 @@
|
||||
import { z, IntegrationDefinitionProps } from '@botpress/sdk'
|
||||
|
||||
export const entities = {
|
||||
user: {
|
||||
title: 'User',
|
||||
description: 'A Twilio user',
|
||||
schema: z
|
||||
.object({
|
||||
userPhone: z.string().describe('The phone number of the user').title('User Phone Number'),
|
||||
})
|
||||
.title('User')
|
||||
.describe('The user object fields'),
|
||||
},
|
||||
conversation: {
|
||||
title: 'Conversation',
|
||||
description: 'A Twilio conversation',
|
||||
schema: z
|
||||
.object({
|
||||
userPhone: z.string().describe('The phone number of the user').title('User Phone Number'),
|
||||
activePhone: z.string().describe('The Phone number the message was sent from').title('Active Phone Number'),
|
||||
})
|
||||
.title('Conversation')
|
||||
.describe('The conversation object fields'),
|
||||
},
|
||||
} satisfies IntegrationDefinitionProps['entities']
|
||||
@@ -0,0 +1,4 @@
|
||||
export { channels } from './channels'
|
||||
export { configuration } from './configuration'
|
||||
export { entities } from './entities'
|
||||
export { user } from './user'
|
||||
@@ -0,0 +1,10 @@
|
||||
import { IntegrationDefinitionProps } from '@botpress/sdk'
|
||||
|
||||
export const user = {
|
||||
tags: {
|
||||
userPhone: {
|
||||
title: 'User Phone',
|
||||
description: 'The phone number of the user',
|
||||
},
|
||||
},
|
||||
} satisfies IntegrationDefinitionProps['user']
|
||||
Reference in New Issue
Block a user