2022-06-11 07:27:38 +02:00
|
|
|
import { z } from 'zod'
|
2023-01-25 11:27:47 +01:00
|
|
|
import { blockBaseSchema } from '../baseSchemas'
|
|
|
|
import { IntegrationBlockType } from './enums'
|
2022-06-11 07:27:38 +02:00
|
|
|
import { webhookOptionsSchema } from './webhook'
|
|
|
|
|
2023-03-14 16:42:12 +01: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(),
|
|
|
|
})
|
|
|
|
)
|
|
|
|
|
|
|
|
export type ZapierBlock = z.infer<typeof zapierBlockSchema>
|