/* * 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 { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ServerConfig = { allowHtml?: boolean | undefined; imageMessageLength?: number | undefined; maxBandwidth?: number | undefined; maxUsers?: number | undefined; messageLength?: number | undefined; recordingAllowed?: boolean | undefined; welcomeText?: string | undefined; }; /** @internal */ export const ServerConfig$inboundSchema: z.ZodType< ServerConfig, z.ZodTypeDef, unknown > = z.object({ allow_html: z.boolean().optional(), image_message_length: z.number().int().optional(), max_bandwidth: z.number().int().optional(), max_users: z.number().int().optional(), message_length: z.number().int().optional(), recording_allowed: z.boolean().optional(), welcome_text: z.string().optional(), }).transform((v) => { return remap$(v, { "allow_html": "allowHtml", "image_message_length": "imageMessageLength", "max_bandwidth": "maxBandwidth", "max_users": "maxUsers", "message_length": "messageLength", "recording_allowed": "recordingAllowed", "welcome_text": "welcomeText", }); }); export function serverConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ServerConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ServerConfig' from JSON`, ); }