/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export const Type = { Plex: "plex", Jellyfin: "jellyfin", Emby: "emby", } as const; export type Type = OpenEnum; export type ServerStatus = { id: string; name: string; type: Type; online: boolean; activeStreams: number; }; /** @internal */ export const Type$inboundSchema: z.ZodMiniType = openEnums .inboundSchema(Type); /** @internal */ export const ServerStatus$inboundSchema: z.ZodMiniType = z.object({ id: types.string(), name: types.string(), type: Type$inboundSchema, online: types.boolean(), activeStreams: types.number(), }); export function serverStatusFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ServerStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ServerStatus' from JSON`, ); }