diff --git a/apps/docs/openapi/viewer.json b/apps/docs/openapi/viewer.json index 2e089a7cf..881e3d8c8 100644 --- a/apps/docs/openapi/viewer.json +++ b/apps/docs/openapi/viewer.json @@ -1539,7 +1539,6 @@ }, "required": [ "sessionId", - "resultId", "typebot", "messages" ] diff --git a/apps/viewer/src/features/chat/api/startChat.ts b/apps/viewer/src/features/chat/api/startChat.ts index 065631a75..956148b0c 100644 --- a/apps/viewer/src/features/chat/api/startChat.ts +++ b/apps/viewer/src/features/chat/api/startChat.ts @@ -74,7 +74,7 @@ export const startChat = publicProcedure }, messages, input, - resultId: resultId as string, + resultId, dynamicTheme, logs, clientSideActions, diff --git a/packages/schemas/features/chat/schema.ts b/packages/schemas/features/chat/schema.ts index a54d0dbfe..9d5147efe 100644 --- a/packages/schemas/features/chat/schema.ts +++ b/packages/schemas/features/chat/schema.ts @@ -317,7 +317,7 @@ export const startChatResponseSchema = z sessionId: z .string() .describe('To save and use for /continueChat requests.'), - resultId: z.string(), + resultId: z.string().optional(), typebot: z.object({ id: z.string(), theme: themeSchema,