/* * 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 BankAccountValidationInteractiveValidateErrorItem = { /** * The id of the error returned */ error?: string | undefined; /** * A description of the error */ description?: string | undefined; /** * The cause of the error */ cause?: string | undefined; /** * Actions to resolve the error */ resolution?: string | undefined; }; /** @internal */ export const BankAccountValidationInteractiveValidateErrorItem$inboundSchema: z.ZodType< BankAccountValidationInteractiveValidateErrorItem, z.ZodTypeDef, unknown > = z.object({ Error: z.string().optional(), Description: z.string().optional(), Cause: z.string().optional(), Resolution: z.string().optional(), }).transform((v) => { return remap$(v, { "Error": "error", "Description": "description", "Cause": "cause", "Resolution": "resolution", }); }); export function bankAccountValidationInteractiveValidateErrorItemFromJSON( jsonString: string, ): SafeParseResult< BankAccountValidationInteractiveValidateErrorItem, SDKValidationError > { return safeParse( jsonString, (x) => BankAccountValidationInteractiveValidateErrorItem$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'BankAccountValidationInteractiveValidateErrorItem' from JSON`, ); }