2023-12-22 09:13:53 +01:00
|
|
|
import { z } from '../../../../zod'
|
2023-11-08 15:34:16 +01:00
|
|
|
import { IntegrationBlockType } from '../constants'
|
2024-02-16 12:04:25 +01:00
|
|
|
import { httpBlockSchemas } from '../webhook'
|
2023-11-08 15:34:16 +01:00
|
|
|
|
|
|
|
|
export const makeComBlockSchemas = {
|
2024-02-16 12:04:25 +01:00
|
|
|
v5: httpBlockSchemas.v5.merge(
|
2023-11-08 15:34:16 +01:00
|
|
|
z.object({
|
|
|
|
|
type: z.enum([IntegrationBlockType.MAKE_COM]),
|
|
|
|
|
})
|
|
|
|
|
),
|
2024-02-16 12:04:25 +01:00
|
|
|
v6: httpBlockSchemas.v6.merge(
|
2023-11-08 15:34:16 +01:00
|
|
|
z.object({
|
|
|
|
|
type: z.enum([IntegrationBlockType.MAKE_COM]),
|
|
|
|
|
})
|
|
|
|
|
),
|
|
|
|
|
} as const
|
|
|
|
|
|
|
|
|
|
const makeComBlockSchema = z.union([
|
|
|
|
|
makeComBlockSchemas.v5,
|
|
|
|
|
makeComBlockSchemas.v6,
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
export type MakeComBlock = z.infer<typeof makeComBlockSchema>
|