/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: af52d049393a */ 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"; import { PinDocument, PinDocument$inboundSchema } from "./pindocument.js"; export type GetPinResponse = { pin?: PinDocument | undefined; }; /** @internal */ export const GetPinResponse$inboundSchema: z.ZodType< GetPinResponse, z.ZodTypeDef, unknown > = z.object({ pin: PinDocument$inboundSchema.optional(), }); export function getPinResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetPinResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetPinResponse' from JSON`, ); }