/* * 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 McpServerTest = { serverId: string; object: "mcp.server.test"; connected: boolean; toolCount: number; toolNames: Array; }; /** @internal */ export const McpServerTest$inboundSchema: z.ZodType< McpServerTest, z.ZodTypeDef, unknown > = z.object({ server_id: z.string(), object: z.literal("mcp.server.test"), connected: z.boolean(), tool_count: z.number().int(), tool_names: z.array(z.string()), }).transform((v) => { return remap$(v, { "server_id": "serverId", "tool_count": "toolCount", "tool_names": "toolNames", }); }); /** @internal */ export type McpServerTest$Outbound = { server_id: string; object: "mcp.server.test"; connected: boolean; tool_count: number; tool_names: Array; }; /** @internal */ export const McpServerTest$outboundSchema: z.ZodType< McpServerTest$Outbound, z.ZodTypeDef, McpServerTest > = z.object({ serverId: z.string(), object: z.literal("mcp.server.test"), connected: z.boolean(), toolCount: z.number().int(), toolNames: z.array(z.string()), }).transform((v) => { return remap$(v, { serverId: "server_id", toolCount: "tool_count", toolNames: "tool_names", }); }); export function mcpServerTestToJSON(mcpServerTest: McpServerTest): string { return JSON.stringify(McpServerTest$outboundSchema.parse(mcpServerTest)); } export function mcpServerTestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => McpServerTest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpServerTest' from JSON`, ); }