/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 4ba37b76a7b6 */ import * as z from "zod/v3"; export type ResultDocument = { title?: string | undefined; url?: string | undefined; }; export type FeedbackChatExchange = { /** * Unix timestamp in millis for the chat request. */ timestamp?: number | undefined; /** * Either DEFAULT (company knowledge) or GPT (world knowledge). */ agent?: string | undefined; /** * Initial query entered by the user. */ userQuery?: string | undefined; /** * Search query performed by the agent. */ searchQuery?: string | undefined; /** * List of documents read by the agent. */ resultDocuments?: Array | undefined; response?: string | undefined; }; /** @internal */ export type ResultDocument$Outbound = { title?: string | undefined; url?: string | undefined; }; /** @internal */ export const ResultDocument$outboundSchema: z.ZodType< ResultDocument$Outbound, z.ZodTypeDef, ResultDocument > = z.object({ title: z.string().optional(), url: z.string().optional(), }); export function resultDocumentToJSON(resultDocument: ResultDocument): string { return JSON.stringify(ResultDocument$outboundSchema.parse(resultDocument)); } /** @internal */ export type FeedbackChatExchange$Outbound = { timestamp?: number | undefined; agent?: string | undefined; userQuery?: string | undefined; searchQuery?: string | undefined; resultDocuments?: Array | undefined; response?: string | undefined; }; /** @internal */ export const FeedbackChatExchange$outboundSchema: z.ZodType< FeedbackChatExchange$Outbound, z.ZodTypeDef, FeedbackChatExchange > = z.object({ timestamp: z.number().int().optional(), agent: z.string().optional(), userQuery: z.string().optional(), searchQuery: z.string().optional(), resultDocuments: z.array(z.lazy(() => ResultDocument$outboundSchema)) .optional(), response: z.string().optional(), }); export function feedbackChatExchangeToJSON( feedbackChatExchange: FeedbackChatExchange, ): string { return JSON.stringify( FeedbackChatExchange$outboundSchema.parse(feedbackChatExchange), ); }