/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateRoomResponse = { /** * The ID of the room */ id?: string | undefined; }; /** @internal */ export const CreateRoomResponse$inboundSchema: z.ZodType< CreateRoomResponse, z.ZodTypeDef, unknown > = z.object({ id: z.string().optional(), }); /** @internal */ export type CreateRoomResponse$Outbound = { id?: string | undefined; }; /** @internal */ export const CreateRoomResponse$outboundSchema: z.ZodType< CreateRoomResponse$Outbound, z.ZodTypeDef, CreateRoomResponse > = z.object({ id: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateRoomResponse$ { /** @deprecated use `CreateRoomResponse$inboundSchema` instead. */ export const inboundSchema = CreateRoomResponse$inboundSchema; /** @deprecated use `CreateRoomResponse$outboundSchema` instead. */ export const outboundSchema = CreateRoomResponse$outboundSchema; /** @deprecated use `CreateRoomResponse$Outbound` instead. */ export type Outbound = CreateRoomResponse$Outbound; } export function createRoomResponseToJSON( createRoomResponse: CreateRoomResponse, ): string { return JSON.stringify( CreateRoomResponse$outboundSchema.parse(createRoomResponse), ); } export function createRoomResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateRoomResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateRoomResponse' from JSON`, ); }