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'
|
2023-08-06 10:03:45 +02:00
|
|
|
import { webhookOptionsSchema } from './webhook/schemas'
|
2022-06-11 07:27:38 +02:00
|
|
|
|
2023-03-14 16:42:12 +01:00
|
|
|
export const makeComBlockSchema = blockBaseSchema.merge(
|
2022-06-11 07:27:38 +02:00
|
|
|
z.object({
|
|
|
|
type: z.enum([IntegrationBlockType.MAKE_COM]),
|
|
|
|
options: webhookOptionsSchema,
|
2023-08-06 10:03:45 +02:00
|
|
|
webhookId: z
|
|
|
|
.string()
|
|
|
|
.describe('Deprecated, use webhook.id instead')
|
|
|
|
.optional(),
|
2022-06-11 07:27:38 +02:00
|
|
|
})
|
|
|
|
)
|
|
|
|
|
|
|
|
export type MakeComBlock = z.infer<typeof makeComBlockSchema>
|