/* * 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 CryptSetup = { clientNonce?: string | undefined; key?: string | undefined; serverNonce?: string | undefined; }; /** @internal */ export const CryptSetup$inboundSchema: z.ZodType< CryptSetup, z.ZodTypeDef, unknown > = z.object({ client_nonce: z.string().optional(), key: z.string().optional(), server_nonce: z.string().optional(), }).transform((v) => { return remap$(v, { "client_nonce": "clientNonce", "server_nonce": "serverNonce", }); }); export function cryptSetupFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CryptSetup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CryptSetup' from JSON`, ); }