/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; /** * The platform that the Paze session is being created for. Defaults to `web`. */ export const Source = { Web: "web", Mobile: "mobile", } as const; /** * The platform that the Paze session is being created for. Defaults to `web`. */ export type Source = OpenEnum; export type PazeSessionRequest = { /** * The platform that the Paze session is being created for. Defaults to `web`. */ source?: Source | undefined; /** * The domain on which Paze is being loaded. Required when `source` is `web`. */ domainName?: string | null | undefined; }; /** @internal */ export const Source$outboundSchema: z.ZodType = openEnums.outboundSchema(Source); /** @internal */ export type PazeSessionRequest$Outbound = { source: string; domain_name?: string | null | undefined; }; /** @internal */ export const PazeSessionRequest$outboundSchema: z.ZodType< PazeSessionRequest$Outbound, z.ZodTypeDef, PazeSessionRequest > = z.object({ source: Source$outboundSchema.default("web"), domainName: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { domainName: "domain_name", }); }); export function pazeSessionRequestToJSON( pazeSessionRequest: PazeSessionRequest, ): string { return JSON.stringify( PazeSessionRequest$outboundSchema.parse(pazeSessionRequest), ); }