2
0
Files
bot/packages/schemas/features/blocks/integrations/zapier.ts

18 lines
505 B
TypeScript
Raw Normal View History

2022-06-11 07:27:38 +02:00
import { z } from 'zod'
import { blockBaseSchema } from '../baseSchemas'
import { IntegrationBlockType } from './enums'
import { webhookOptionsSchema } from './webhook/schemas'
2022-06-11 07:27:38 +02:00
export const zapierBlockSchema = blockBaseSchema.merge(
2022-06-11 07:27:38 +02:00
z.object({
type: z.enum([IntegrationBlockType.ZAPIER]),
options: webhookOptionsSchema,
webhookId: z
.string()
.describe('Deprecated, use webhook.id instead')
.optional(),
2022-06-11 07:27:38 +02:00
})
)
export type ZapierBlock = z.infer<typeof zapierBlockSchema>