/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 426c444b60f4 */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; export type ChatRequest = { /** * The client's preferred locale in rfc5646 format (e.g. `en`, `ja`, `pt-BR`). If omitted, the `Accept-Language` will be used. If not present or not supported, defaults to the closest match or `en`. */ locale?: string | undefined; /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ timezoneOffset?: number | undefined; /** * Includes chat history for Glean AI to respond to. */ chatRequest: components.ChatRequest; }; /** @internal */ export type ChatRequest$Outbound = { locale?: string | undefined; timezoneOffset?: number | undefined; ChatRequest: components.ChatRequest$Outbound; }; /** @internal */ export const ChatRequest$outboundSchema: z.ZodType< ChatRequest$Outbound, z.ZodTypeDef, ChatRequest > = z.object({ locale: z.string().optional(), timezoneOffset: z.number().int().optional(), chatRequest: components.ChatRequest$outboundSchema, }).transform((v) => { return remap$(v, { chatRequest: "ChatRequest", }); }); export function chatRequestToJSON(chatRequest: ChatRequest): string { return JSON.stringify(ChatRequest$outboundSchema.parse(chatRequest)); }