/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 911218b9e997 */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import * as components from "../components/index.js"; export type MessagesRequest = { /** * 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; /** * Includes request params such as the id for channel/message and direction. */ messagesRequest: components.MessagesRequest; }; /** @internal */ export type MessagesRequest$Outbound = { locale?: string | undefined; MessagesRequest: components.MessagesRequest$Outbound; }; /** @internal */ export const MessagesRequest$outboundSchema: z.ZodType< MessagesRequest$Outbound, z.ZodTypeDef, MessagesRequest > = z.object({ locale: z.string().optional(), messagesRequest: components.MessagesRequest$outboundSchema, }).transform((v) => { return remap$(v, { messagesRequest: "MessagesRequest", }); }); export function messagesRequestToJSON( messagesRequest: MessagesRequest, ): string { return JSON.stringify(MessagesRequest$outboundSchema.parse(messagesRequest)); }