/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ResponseOK = { message?: string | undefined; }; /** @internal */ export const ResponseOK$inboundSchema: z.ZodType< ResponseOK, z.ZodTypeDef, unknown > = z.object({ message: z.string().default("ok"), }); /** @internal */ export type ResponseOK$Outbound = { message: string; }; /** @internal */ export const ResponseOK$outboundSchema: z.ZodType< ResponseOK$Outbound, z.ZodTypeDef, ResponseOK > = z.object({ message: z.string().default("ok"), }); export function responseOKToJSON(responseOK: ResponseOK): string { return JSON.stringify(ResponseOK$outboundSchema.parse(responseOK)); } export function responseOKFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ResponseOK$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseOK' from JSON`, ); }