/* * 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 CreatePrivateLobbyGlobals = { appId?: string | undefined; }; export type CreatePrivateLobbySecurity = { playerAuth: string; }; export type CreatePrivateLobbyRequestBody = { /** * User input to initialize the game state. Object must be smaller than 64KB. */ initialConfig?: any | undefined; region: components.Region; }; export type CreatePrivateLobbyRequest = { appId?: string | undefined; roomId?: string | undefined; requestBody: CreatePrivateLobbyRequestBody; }; /** @internal */ export type CreatePrivateLobbySecurity$Outbound = { playerAuth: string; }; /** @internal */ export const CreatePrivateLobbySecurity$outboundSchema: z.ZodType< CreatePrivateLobbySecurity$Outbound, z.ZodTypeDef, CreatePrivateLobbySecurity > = z.object({ playerAuth: z.string(), }); export function createPrivateLobbySecurityToJSON( createPrivateLobbySecurity: CreatePrivateLobbySecurity, ): string { return JSON.stringify( CreatePrivateLobbySecurity$outboundSchema.parse(createPrivateLobbySecurity), ); } /** @internal */ export type CreatePrivateLobbyRequestBody$Outbound = { initialConfig?: any | undefined; region: string; }; /** @internal */ export const CreatePrivateLobbyRequestBody$outboundSchema: z.ZodType< CreatePrivateLobbyRequestBody$Outbound, z.ZodTypeDef, CreatePrivateLobbyRequestBody > = z.object({ initialConfig: z.any().optional(), region: components.Region$outboundSchema, }); export function createPrivateLobbyRequestBodyToJSON( createPrivateLobbyRequestBody: CreatePrivateLobbyRequestBody, ): string { return JSON.stringify( CreatePrivateLobbyRequestBody$outboundSchema.parse( createPrivateLobbyRequestBody, ), ); } /** @internal */ export type CreatePrivateLobbyRequest$Outbound = { appId?: string | undefined; roomId?: string | undefined; RequestBody: CreatePrivateLobbyRequestBody$Outbound; }; /** @internal */ export const CreatePrivateLobbyRequest$outboundSchema: z.ZodType< CreatePrivateLobbyRequest$Outbound, z.ZodTypeDef, CreatePrivateLobbyRequest > = z.object({ appId: z.string().optional(), roomId: z.string().optional(), requestBody: z.lazy(() => CreatePrivateLobbyRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function createPrivateLobbyRequestToJSON( createPrivateLobbyRequest: CreatePrivateLobbyRequest, ): string { return JSON.stringify( CreatePrivateLobbyRequest$outboundSchema.parse(createPrivateLobbyRequest), ); }