/* * 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 components from "../components/index.js"; export type CreatePublicLobbyGlobals = { appId?: string | undefined; }; export type CreatePublicLobbySecurity = { playerAuth: string; }; export type CreatePublicLobbyRequestBody = { /** * User input to initialize the game state. Object must be smaller than 64KB. */ initialConfig?: any | undefined; region: components.Region; }; export type CreatePublicLobbyRequest = { appId?: string | undefined; roomId?: string | undefined; requestBody: CreatePublicLobbyRequestBody; }; /** @internal */ export type CreatePublicLobbySecurity$Outbound = { playerAuth: string; }; /** @internal */ export const CreatePublicLobbySecurity$outboundSchema: z.ZodType< CreatePublicLobbySecurity$Outbound, z.ZodTypeDef, CreatePublicLobbySecurity > = z.object({ playerAuth: z.string(), }); export function createPublicLobbySecurityToJSON( createPublicLobbySecurity: CreatePublicLobbySecurity, ): string { return JSON.stringify( CreatePublicLobbySecurity$outboundSchema.parse(createPublicLobbySecurity), ); } /** @internal */ export type CreatePublicLobbyRequestBody$Outbound = { initialConfig?: any | undefined; region: string; }; /** @internal */ export const CreatePublicLobbyRequestBody$outboundSchema: z.ZodType< CreatePublicLobbyRequestBody$Outbound, z.ZodTypeDef, CreatePublicLobbyRequestBody > = z.object({ initialConfig: z.any().optional(), region: components.Region$outboundSchema, }); export function createPublicLobbyRequestBodyToJSON( createPublicLobbyRequestBody: CreatePublicLobbyRequestBody, ): string { return JSON.stringify( CreatePublicLobbyRequestBody$outboundSchema.parse( createPublicLobbyRequestBody, ), ); } /** @internal */ export type CreatePublicLobbyRequest$Outbound = { appId?: string | undefined; roomId?: string | undefined; RequestBody: CreatePublicLobbyRequestBody$Outbound; }; /** @internal */ export const CreatePublicLobbyRequest$outboundSchema: z.ZodType< CreatePublicLobbyRequest$Outbound, z.ZodTypeDef, CreatePublicLobbyRequest > = z.object({ appId: z.string().optional(), roomId: z.string().optional(), requestBody: z.lazy(() => CreatePublicLobbyRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function createPublicLobbyRequestToJSON( createPublicLobbyRequest: CreatePublicLobbyRequest, ): string { return JSON.stringify( CreatePublicLobbyRequest$outboundSchema.parse(createPublicLobbyRequest), ); }