/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { MoovError } from "./mooverror.js"; export type ListWalletsValidationErrorData = { status?: string | undefined; walletType?: string | undefined; skip?: string | undefined; count?: string | undefined; }; export class ListWalletsValidationError extends MoovError { status?: string | undefined; walletType?: string | undefined; skip?: string | undefined; count?: string | undefined; /** The original data that was passed to this error instance. */ data$: ListWalletsValidationErrorData; constructor( err: ListWalletsValidationErrorData, httpMeta: { response: Response; request: Request; body: string }, ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; super(message, httpMeta); this.data$ = err; if (err.status != null) this.status = err.status; if (err.walletType != null) this.walletType = err.walletType; if (err.skip != null) this.skip = err.skip; if (err.count != null) this.count = err.count; this.name = "ListWalletsValidationError"; } } /** @internal */ export const ListWalletsValidationError$inboundSchema: z.ZodType< ListWalletsValidationError, z.ZodTypeDef, unknown > = z.object({ status: z.string().optional(), walletType: z.string().optional(), skip: z.string().optional(), count: z.string().optional(), request$: z.instanceof(Request), response$: z.instanceof(Response), body$: z.string(), }) .transform((v) => { return new ListWalletsValidationError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type ListWalletsValidationError$Outbound = { status?: string | undefined; walletType?: string | undefined; skip?: string | undefined; count?: string | undefined; }; /** @internal */ export const ListWalletsValidationError$outboundSchema: z.ZodType< ListWalletsValidationError$Outbound, z.ZodTypeDef, ListWalletsValidationError > = z.instanceof(ListWalletsValidationError) .transform(v => v.data$) .pipe(z.object({ status: z.string().optional(), walletType: z.string().optional(), skip: z.string().optional(), count: z.string().optional(), }));