chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { z } from '@botpress/sdk'
|
||||
|
||||
const _templateRecipientSchema = z.object({
|
||||
name: z.string().title('Recipient Name').describe("The recipient's full name"),
|
||||
email: z.string().title('Recipient Email').describe("The recipient's email address"),
|
||||
role: z.string().title('Template Recipient Role').describe('The role keyword defined in the template'),
|
||||
accessCode: z
|
||||
.string()
|
||||
.optional()
|
||||
.title('Access Code')
|
||||
.describe('An access code that is required to access the envelope'),
|
||||
})
|
||||
export type TemplateRecipient = z.infer<typeof _templateRecipientSchema>
|
||||
|
||||
export const sendEnvelopeInputSchema = z.object({
|
||||
templateId: z.string().title('Template ID').describe('The id of the envelope template'),
|
||||
recipients: z
|
||||
.array(_templateRecipientSchema)
|
||||
.min(1)
|
||||
.title('Envelope Recipients')
|
||||
.describe(
|
||||
"The recipients of the envelope to send as defined in the template (Note: adding additional recipients with roles not defined in the template will cause them to default as 'signers')"
|
||||
),
|
||||
emailSubject: z
|
||||
.string()
|
||||
.optional()
|
||||
.title('Email Subject')
|
||||
.describe(
|
||||
'Sets the subject field of the sent envelope email (Leaving this empty will fallback to the template default subject)'
|
||||
),
|
||||
conversationId: z
|
||||
.string()
|
||||
.placeholder('{{ event.conversationId }}')
|
||||
.optional()
|
||||
.title('Conversation ID')
|
||||
.describe('The ID of the conversation'),
|
||||
})
|
||||
export type SendEnvelopeInput = z.infer<typeof sendEnvelopeInputSchema>
|
||||
|
||||
export const sendEnvelopeOutputSchema = z.object({
|
||||
envelopeId: z.string().title('Envelope ID').describe('The id of the sent envelope'),
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
import { z } from '@botpress/sdk'
|
||||
|
||||
export const configurationSchema = z.object({
|
||||
accountId: z
|
||||
.string()
|
||||
.optional()
|
||||
.title('API Account ID (Optional)')
|
||||
.describe(
|
||||
'The docusign user\'s "API Account ID" (This is a GUID that is found in "Apps & Keys")\nThe default account will be selected if left empty'
|
||||
)
|
||||
.placeholder('e.g. a1b2c3d4-e5f6-g7h8-i9j0-d4c3b2a1'),
|
||||
})
|
||||
@@ -0,0 +1,11 @@
|
||||
import { z } from '@botpress/sdk'
|
||||
|
||||
export const envelopeEventSchema = z.object({
|
||||
userId: z.string().title('User ID').describe("The Docusign user's ID"),
|
||||
accountId: z
|
||||
.string()
|
||||
.title('API Account ID')
|
||||
.describe('The docusign user\'s "API Account ID" (This is a GUID that is found in "Apps & Keys")'),
|
||||
envelopeId: z.string().title('Envelope ID').describe('The id of the sent envelope'),
|
||||
triggeredAt: z.string().datetime().title('Triggered At').describe('The datetime when the event was triggered'),
|
||||
})
|
||||
Reference in New Issue
Block a user