/* * 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 CreateLocalLobbyGlobals = { appId?: string | undefined; }; export type CreateLocalLobbySecurity = { playerAuth: string; }; export type CreateLocalLobbyRequestBody = { /** * User input to initialize the game state. Object must be smaller than 64KB. */ initialConfig?: any | undefined; region: components.Region; }; export type CreateLocalLobbyRequest = { appId?: string | undefined; roomId?: string | undefined; requestBody: CreateLocalLobbyRequestBody; }; /** @internal */ export type CreateLocalLobbySecurity$Outbound = { playerAuth: string; }; /** @internal */ export const CreateLocalLobbySecurity$outboundSchema: z.ZodType< CreateLocalLobbySecurity$Outbound, z.ZodTypeDef, CreateLocalLobbySecurity > = z.object({ playerAuth: z.string(), }); export function createLocalLobbySecurityToJSON( createLocalLobbySecurity: CreateLocalLobbySecurity, ): string { return JSON.stringify( CreateLocalLobbySecurity$outboundSchema.parse(createLocalLobbySecurity), ); } /** @internal */ export type CreateLocalLobbyRequestBody$Outbound = { initialConfig?: any | undefined; region: string; }; /** @internal */ export const CreateLocalLobbyRequestBody$outboundSchema: z.ZodType< CreateLocalLobbyRequestBody$Outbound, z.ZodTypeDef, CreateLocalLobbyRequestBody > = z.object({ initialConfig: z.any().optional(), region: components.Region$outboundSchema, }); export function createLocalLobbyRequestBodyToJSON( createLocalLobbyRequestBody: CreateLocalLobbyRequestBody, ): string { return JSON.stringify( CreateLocalLobbyRequestBody$outboundSchema.parse( createLocalLobbyRequestBody, ), ); } /** @internal */ export type CreateLocalLobbyRequest$Outbound = { appId?: string | undefined; roomId?: string | undefined; RequestBody: CreateLocalLobbyRequestBody$Outbound; }; /** @internal */ export const CreateLocalLobbyRequest$outboundSchema: z.ZodType< CreateLocalLobbyRequest$Outbound, z.ZodTypeDef, CreateLocalLobbyRequest > = z.object({ appId: z.string().optional(), roomId: z.string().optional(), requestBody: z.lazy(() => CreateLocalLobbyRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function createLocalLobbyRequestToJSON( createLocalLobbyRequest: CreateLocalLobbyRequest, ): string { return JSON.stringify( CreateLocalLobbyRequest$outboundSchema.parse(createLocalLobbyRequest), ); }