@@ -130,6 +130,12 @@ const startParamsSchema = z.object({
|
||||
.describe(
|
||||
'Set this to `true` if you intend to stream OpenAI completions on a client.'
|
||||
),
|
||||
isOnlyRegistering: z
|
||||
.boolean()
|
||||
.optional()
|
||||
.describe(
|
||||
'If set to `true`, it will only register the session and not start the chat. This is used for other chat platform integration as it can require a session to be registered before sending the first message.'
|
||||
),
|
||||
})
|
||||
|
||||
const replyLogSchema = logSchema
|
||||
|
||||
@@ -2,6 +2,7 @@ import { z } from 'zod'
|
||||
import { answerSchema } from '../answer'
|
||||
import { resultSchema } from '../result'
|
||||
import { typebotInSessionStateSchema, dynamicThemeSchema } from './shared'
|
||||
import { settingsSchema } from '../typebot/settings'
|
||||
|
||||
const answerInSessionStateSchema = answerSchema.pick({
|
||||
content: true,
|
||||
@@ -64,6 +65,16 @@ const sessionStateSchemaV2 = z.object({
|
||||
})
|
||||
.optional(),
|
||||
isStreamEnabled: z.boolean().optional(),
|
||||
whatsApp: z
|
||||
.object({
|
||||
contact: z.object({
|
||||
name: z.string(),
|
||||
phoneNumber: z.string(),
|
||||
}),
|
||||
credentialsId: z.string().optional(),
|
||||
})
|
||||
.optional(),
|
||||
typingEmulation: settingsSchema.shape.typingEmulation.optional(),
|
||||
})
|
||||
|
||||
export type SessionState = z.infer<typeof sessionStateSchemaV2>
|
||||
|
||||
Reference in New Issue
Block a user