@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { BubbleBlockType } from '../constants'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { variableStringSchema } from '../../../utils'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { BubbleBlockType } from '../constants'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { BubbleBlockType } from '../constants'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../zod'
|
||||
import { audioBubbleBlockSchema } from './audio'
|
||||
import { embedBubbleBlockSchema } from './embed'
|
||||
import { imageBubbleBlockSchema } from './image'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import type { TElement } from '@udecode/plate-common'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { BubbleBlockType } from '../constants'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { VideoBubbleContentType } from './constants'
|
||||
import { variableStringSchema } from '../../../utils'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { InputBlockType } from '../constants'
|
||||
import { itemBaseSchemas } from '../../../items/shared'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
@@ -49,10 +49,18 @@ export const buttonsInputV5Schema = blockBaseSchema.merge(
|
||||
)
|
||||
|
||||
export const buttonsInputSchemas = {
|
||||
v5: buttonsInputV5Schema,
|
||||
v6: buttonsInputV5Schema.extend({
|
||||
items: z.array(buttonItemSchemas.v6),
|
||||
v5: buttonsInputV5Schema.openapi({
|
||||
title: 'Buttons v5',
|
||||
ref: 'buttonsInputV5',
|
||||
}),
|
||||
v6: buttonsInputV5Schema
|
||||
.extend({
|
||||
items: z.array(buttonItemSchemas.v6),
|
||||
})
|
||||
.openapi({
|
||||
title: 'Buttons',
|
||||
ref: 'buttonsInput',
|
||||
}),
|
||||
} as const
|
||||
|
||||
export const buttonsInputSchema = z.union([
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
import { InputBlockType } from '../constants'
|
||||
|
||||
@@ -19,11 +19,16 @@ export const dateInputOptionsSchema = optionBaseSchema.merge(
|
||||
})
|
||||
)
|
||||
|
||||
export const dateInputSchema = blockBaseSchema.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.DATE]),
|
||||
options: dateInputOptionsSchema.optional(),
|
||||
export const dateInputSchema = blockBaseSchema
|
||||
.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.DATE]),
|
||||
options: dateInputOptionsSchema.optional(),
|
||||
})
|
||||
)
|
||||
.openapi({
|
||||
title: 'Date',
|
||||
ref: 'dateInput',
|
||||
})
|
||||
)
|
||||
|
||||
export type DateInputBlock = z.infer<typeof dateInputSchema>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
import { InputBlockType } from '../constants'
|
||||
import { textInputOptionsBaseSchema } from '../text'
|
||||
@@ -11,12 +11,17 @@ export const emailInputOptionsSchema = optionBaseSchema
|
||||
})
|
||||
)
|
||||
|
||||
export const emailInputSchema = blockBaseSchema.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.EMAIL]),
|
||||
options: emailInputOptionsSchema.optional(),
|
||||
export const emailInputSchema = blockBaseSchema
|
||||
.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.EMAIL]),
|
||||
options: emailInputOptionsSchema.optional(),
|
||||
})
|
||||
)
|
||||
.openapi({
|
||||
title: 'Email',
|
||||
ref: 'email',
|
||||
})
|
||||
)
|
||||
|
||||
export type EmailInputBlock = z.infer<typeof emailInputSchema>
|
||||
export type EmailInputOptions = z.infer<typeof emailInputOptionsSchema>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
import { InputBlockType } from '../constants'
|
||||
|
||||
@@ -33,12 +33,20 @@ const fileInputBlockV5Schema = blockBaseSchema.merge(
|
||||
)
|
||||
|
||||
export const fileInputBlockSchemas = {
|
||||
v5: fileInputBlockV5Schema,
|
||||
v6: fileInputBlockV5Schema.merge(
|
||||
z.object({
|
||||
options: fileInputOptionsSchemas.v6.optional(),
|
||||
})
|
||||
),
|
||||
v5: fileInputBlockV5Schema.openapi({
|
||||
title: 'File input v5',
|
||||
ref: 'fileInputV5',
|
||||
}),
|
||||
v6: fileInputBlockV5Schema
|
||||
.merge(
|
||||
z.object({
|
||||
options: fileInputOptionsSchemas.v6.optional(),
|
||||
})
|
||||
)
|
||||
.openapi({
|
||||
title: 'File',
|
||||
ref: 'fileInput',
|
||||
}),
|
||||
}
|
||||
|
||||
const fileInputBlockSchema = z.union([
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { variableStringSchema } from '../../../utils'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
import { InputBlockType } from '../constants'
|
||||
@@ -14,11 +14,16 @@ export const numberInputOptionsSchema = optionBaseSchema
|
||||
})
|
||||
)
|
||||
|
||||
export const numberInputSchema = blockBaseSchema.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.NUMBER]),
|
||||
options: numberInputOptionsSchema.optional(),
|
||||
export const numberInputSchema = blockBaseSchema
|
||||
.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.NUMBER]),
|
||||
options: numberInputOptionsSchema.optional(),
|
||||
})
|
||||
)
|
||||
.openapi({
|
||||
title: 'Number',
|
||||
ref: 'numberInput',
|
||||
})
|
||||
)
|
||||
|
||||
export type NumberInputBlock = z.infer<typeof numberInputSchema>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import {
|
||||
optionBaseSchema,
|
||||
blockBaseSchema,
|
||||
@@ -54,12 +54,17 @@ export const paymentInputRuntimeOptionsSchema = z.object({
|
||||
publicKey: z.string(),
|
||||
})
|
||||
|
||||
export const paymentInputSchema = blockBaseSchema.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.PAYMENT]),
|
||||
options: paymentInputOptionsSchema.optional(),
|
||||
export const paymentInputSchema = blockBaseSchema
|
||||
.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.PAYMENT]),
|
||||
options: paymentInputOptionsSchema.optional(),
|
||||
})
|
||||
)
|
||||
.openapi({
|
||||
title: 'Payment',
|
||||
ref: 'paymentInput',
|
||||
})
|
||||
)
|
||||
|
||||
export const stripeCredentialsSchema = z
|
||||
.object({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
import { InputBlockType } from '../constants'
|
||||
import { textInputOptionsBaseSchema } from '../text'
|
||||
@@ -12,11 +12,16 @@ export const phoneNumberInputOptionsSchema = optionBaseSchema
|
||||
})
|
||||
)
|
||||
|
||||
export const phoneNumberInputBlockSchema = blockBaseSchema.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.PHONE]),
|
||||
options: phoneNumberInputOptionsSchema.optional(),
|
||||
export const phoneNumberInputBlockSchema = blockBaseSchema
|
||||
.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.PHONE]),
|
||||
options: phoneNumberInputOptionsSchema.optional(),
|
||||
})
|
||||
)
|
||||
.openapi({
|
||||
title: 'Phone number',
|
||||
ref: 'phoneNumberInput',
|
||||
})
|
||||
)
|
||||
|
||||
export type PhoneNumberInputBlock = z.infer<typeof phoneNumberInputBlockSchema>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
import { conditionSchema } from '../../logic'
|
||||
import { InputBlockType } from '../constants'
|
||||
@@ -60,10 +60,18 @@ export const pictureChoiceBlockV5Schema = blockBaseSchema.merge(
|
||||
)
|
||||
|
||||
export const pictureChoiceBlockSchemas = {
|
||||
v5: pictureChoiceBlockV5Schema,
|
||||
v6: pictureChoiceBlockV5Schema.extend({
|
||||
items: z.array(pictureChoiceItemSchemas.v6),
|
||||
v5: pictureChoiceBlockV5Schema.openapi({
|
||||
title: 'Picture choice v5',
|
||||
ref: 'pictureChoiceV5',
|
||||
}),
|
||||
v6: pictureChoiceBlockV5Schema
|
||||
.extend({
|
||||
items: z.array(pictureChoiceItemSchemas.v6),
|
||||
})
|
||||
.openapi({
|
||||
title: 'Picture choice',
|
||||
ref: 'pictureChoice',
|
||||
}),
|
||||
} as const
|
||||
|
||||
export const pictureChoiceBlockSchema = z.union([
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
import { InputBlockType } from '../constants'
|
||||
|
||||
@@ -23,11 +23,16 @@ export const ratingInputOptionsSchema = optionBaseSchema.merge(
|
||||
})
|
||||
)
|
||||
|
||||
export const ratingInputBlockSchema = blockBaseSchema.merge(
|
||||
z.object({
|
||||
type: z.literal(InputBlockType.RATING),
|
||||
options: ratingInputOptionsSchema.optional(),
|
||||
export const ratingInputBlockSchema = blockBaseSchema
|
||||
.merge(
|
||||
z.object({
|
||||
type: z.literal(InputBlockType.RATING),
|
||||
options: ratingInputOptionsSchema.optional(),
|
||||
})
|
||||
)
|
||||
.openapi({
|
||||
title: 'Rating',
|
||||
ref: 'rating',
|
||||
})
|
||||
)
|
||||
|
||||
export type RatingInputBlock = z.infer<typeof ratingInputBlockSchema>
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../zod'
|
||||
import { buttonsInputSchemas } from './choice'
|
||||
import { dateInputSchema } from './date'
|
||||
import { emailInputSchema } from './email'
|
||||
import { numberInputSchema } from './number'
|
||||
import { paymentInputSchema } from './payment'
|
||||
import { phoneNumberInputBlockSchema } from './phone'
|
||||
import {
|
||||
pictureChoiceBlockSchema,
|
||||
pictureChoiceBlockSchemas,
|
||||
} from './pictureChoice'
|
||||
import { pictureChoiceBlockSchemas } from './pictureChoice'
|
||||
import { ratingInputBlockSchema } from './rating'
|
||||
import { textInputSchema } from './text'
|
||||
import { urlInputSchema } from './url'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
import { InputBlockType } from '../constants'
|
||||
|
||||
@@ -19,11 +19,16 @@ export const textInputOptionsSchema = textInputOptionsBaseSchema
|
||||
})
|
||||
)
|
||||
|
||||
export const textInputSchema = blockBaseSchema.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.TEXT]),
|
||||
options: textInputOptionsSchema.optional(),
|
||||
export const textInputSchema = blockBaseSchema
|
||||
.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.TEXT]),
|
||||
options: textInputOptionsSchema.optional(),
|
||||
})
|
||||
)
|
||||
.openapi({
|
||||
title: 'Text',
|
||||
ref: 'textInput',
|
||||
})
|
||||
)
|
||||
|
||||
export type TextInputBlock = z.infer<typeof textInputSchema>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { optionBaseSchema, blockBaseSchema } from '../../shared'
|
||||
import { InputBlockType } from '../constants'
|
||||
import { textInputOptionsBaseSchema } from '../text'
|
||||
@@ -11,11 +11,16 @@ export const urlInputOptionsSchema = optionBaseSchema
|
||||
})
|
||||
)
|
||||
|
||||
export const urlInputSchema = blockBaseSchema.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.URL]),
|
||||
options: urlInputOptionsSchema.optional(),
|
||||
export const urlInputSchema = blockBaseSchema
|
||||
.merge(
|
||||
z.object({
|
||||
type: z.enum([InputBlockType.URL]),
|
||||
options: urlInputOptionsSchema.optional(),
|
||||
})
|
||||
)
|
||||
.openapi({
|
||||
title: 'URL',
|
||||
ref: 'url',
|
||||
})
|
||||
)
|
||||
|
||||
export type UrlInputBlock = z.infer<typeof urlInputSchema>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { chatwootTasks } from './constants'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { variableStringSchema } from '../../../utils'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
import { GoogleSheetsAction, totalRowsToExtractOptions } from './constants'
|
||||
import { blockBaseSchema, credentialsBaseSchema } from '../../shared'
|
||||
@@ -34,7 +34,9 @@ const rowsFilterComparisonSchema = z.object({
|
||||
|
||||
const initialGoogleSheetsOptionsSchema = googleSheetsOptionsBaseSchema.merge(
|
||||
z.object({
|
||||
action: z.undefined(),
|
||||
action: z.undefined().openapi({
|
||||
type: 'string',
|
||||
}),
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
import { webhookBlockSchemas } from '../webhook'
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import {
|
||||
chatCompletionMessageCustomRoles,
|
||||
chatCompletionMessageRoles,
|
||||
chatCompletionResponseValues,
|
||||
openAITasks,
|
||||
@@ -18,7 +17,9 @@ const openAIBaseOptionsSchema = z.object({
|
||||
|
||||
const initialOptionsSchema = z
|
||||
.object({
|
||||
task: z.undefined(),
|
||||
task: z.undefined().openapi({
|
||||
type: 'string',
|
||||
}),
|
||||
})
|
||||
.merge(openAIBaseOptionsSchema)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
import { webhookBlockSchemas } from '../webhook'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { pixelEventTypes } from './constants'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
@@ -19,7 +19,9 @@ const basePixelOptionSchema = z.object({
|
||||
|
||||
const initialPixelOptionSchema = basePixelOptionSchema.merge(
|
||||
z.object({
|
||||
eventType: z.undefined(),
|
||||
eventType: z.undefined().openapi({
|
||||
type: 'string',
|
||||
}),
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../zod'
|
||||
import { chatwootBlockSchema } from './chatwoot'
|
||||
import { googleAnalyticsBlockSchema } from './googleAnalytics'
|
||||
import { googleSheetsBlockSchemas } from './googleSheets'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema, credentialsBaseSchema } from '../../shared'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
import { HttpMethod } from './constants'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
import { webhookBlockSchemas } from '../webhook'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema, credentialsBaseSchema } from '../../shared'
|
||||
import { IntegrationBlockType } from '../constants'
|
||||
import { searchResponseValues } from './constants'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { LogicBlockType } from '../constants'
|
||||
import { itemBaseSchemas } from '../../../items/shared'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { LogicBlockType } from '../constants'
|
||||
import { ComparisonOperators, LogicalOperator } from './constants'
|
||||
@@ -39,14 +39,18 @@ export const conditionBlockSchemas = {
|
||||
z.object({
|
||||
type: z.enum([LogicBlockType.CONDITION]),
|
||||
items: z.array(conditionItemSchemas.v5),
|
||||
options: z.undefined(),
|
||||
options: z.undefined().openapi({
|
||||
type: 'object',
|
||||
}),
|
||||
})
|
||||
),
|
||||
v6: blockBaseSchema.merge(
|
||||
z.object({
|
||||
type: z.enum([LogicBlockType.CONDITION]),
|
||||
items: z.array(conditionItemSchemas.v6),
|
||||
options: z.undefined(),
|
||||
options: z.undefined().openapi({
|
||||
type: 'object',
|
||||
}),
|
||||
})
|
||||
),
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { LogicBlockType } from '../constants'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { LogicBlockType } from '../constants'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../zod'
|
||||
import { conditionBlockSchemas } from './condition'
|
||||
import { jumpBlockSchema } from './jump'
|
||||
import { redirectBlockSchema } from './redirect'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { LogicBlockType } from '../constants'
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { LogicBlockType } from '../constants'
|
||||
import { extendZodWithOpenApi } from 'zod-openapi'
|
||||
|
||||
extendZodWithOpenApi(z)
|
||||
|
||||
const baseOptions = z.object({
|
||||
variableId: z.string().optional(),
|
||||
@@ -24,7 +27,7 @@ const basicSetVariableOptionsSchema = baseOptions.extend({
|
||||
})
|
||||
|
||||
const initialSetVariableOptionsSchema = baseOptions.extend({
|
||||
type: z.undefined(),
|
||||
type: z.undefined().openapi({ type: 'string' }),
|
||||
expressionToEvaluate: z.string().optional(),
|
||||
isCode: z.boolean().optional(),
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { LogicBlockType } from '../constants'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../../zod'
|
||||
import { blockBaseSchema } from '../../shared'
|
||||
import { LogicBlockType } from '../constants'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../zod'
|
||||
import { blockBaseSchema } from './shared'
|
||||
import { startBlockSchema } from './start/schemas'
|
||||
import { ItemV6 } from '../items/schema'
|
||||
@@ -43,6 +43,10 @@ export const blockSchemaV6 = z
|
||||
})
|
||||
)
|
||||
)
|
||||
.openapi({
|
||||
title: 'Block',
|
||||
ref: 'block',
|
||||
})
|
||||
export type BlockV6 = z.infer<typeof blockSchemaV6>
|
||||
|
||||
const blockSchema = blockSchemaV5.or(blockSchemaV6)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../zod'
|
||||
import { Credentials as CredentialsFromPrisma } from '@typebot.io/prisma'
|
||||
|
||||
export const blockBaseSchema = z.object({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { z } from 'zod'
|
||||
import { z } from '../../../zod'
|
||||
import { blockBaseSchema } from '../shared'
|
||||
|
||||
export const startBlockSchema = blockBaseSchema.merge(
|
||||
|
||||
Reference in New Issue
Block a user