2022-06-11 07:27:38 +02:00
|
|
|
import { z } from 'zod'
|
2022-11-15 11:02:26 +01:00
|
|
|
import { chatwootBlockSchema, chatwootOptionsSchema } from './chatwoot'
|
2022-06-11 07:27:38 +02:00
|
|
|
import {
|
|
|
|
googleAnalyticsOptionsSchema,
|
|
|
|
googleAnalyticsBlockSchema,
|
|
|
|
} from './googleAnalytics'
|
|
|
|
import {
|
|
|
|
googleSheetsOptionsSchema,
|
|
|
|
googleSheetsBlockSchema,
|
2023-01-25 11:27:47 +01:00
|
|
|
} from './googleSheets/schemas'
|
2022-06-11 07:27:38 +02:00
|
|
|
import { makeComBlockSchema } from './makeCom'
|
|
|
|
import { pabblyConnectBlockSchema } from './pabblyConnect'
|
|
|
|
import { sendEmailOptionsSchema, sendEmailBlockSchema } from './sendEmail'
|
|
|
|
import { webhookOptionsSchema, webhookBlockSchema } from './webhook'
|
|
|
|
import { zapierBlockSchema } from './zapier'
|
|
|
|
|
|
|
|
const integrationBlockOptionsSchema = googleSheetsOptionsSchema
|
|
|
|
.or(googleAnalyticsOptionsSchema)
|
|
|
|
.or(webhookOptionsSchema)
|
|
|
|
.or(sendEmailOptionsSchema)
|
2022-11-10 10:53:44 +01:00
|
|
|
.or(chatwootOptionsSchema)
|
2022-06-11 07:27:38 +02:00
|
|
|
|
|
|
|
export const integrationBlockSchema = googleSheetsBlockSchema
|
|
|
|
.or(googleAnalyticsBlockSchema)
|
|
|
|
.or(webhookBlockSchema)
|
|
|
|
.or(sendEmailBlockSchema)
|
|
|
|
.or(zapierBlockSchema)
|
|
|
|
.or(makeComBlockSchema)
|
|
|
|
.or(pabblyConnectBlockSchema)
|
2022-11-10 10:53:44 +01:00
|
|
|
.or(chatwootBlockSchema)
|
2022-06-11 07:27:38 +02:00
|
|
|
|
|
|
|
export type IntegrationBlock = z.infer<typeof integrationBlockSchema>
|
|
|
|
export type IntegrationBlockOptions = z.infer<
|
|
|
|
typeof integrationBlockOptionsSchema
|
|
|
|
>
|