/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { MoovError } from "./mooverror.js"; export type ListWalletTransactionsValidationErrorData = { transactionType?: string | undefined; transactionTypes?: string | undefined; sourceType?: string | undefined; sourceID?: string | undefined; status?: string | undefined; sweepID?: string | undefined; createdStartDateTime?: string | undefined; createdEndDateTime?: string | undefined; completedStartDateTime?: string | undefined; completedEndDateTime?: string | undefined; statementDescriptor?: string | undefined; skip?: string | undefined; count?: string | undefined; }; export class ListWalletTransactionsValidationError extends MoovError { transactionType?: string | undefined; transactionTypes?: string | undefined; sourceType?: string | undefined; sourceID?: string | undefined; status?: string | undefined; sweepID?: string | undefined; createdStartDateTime?: string | undefined; createdEndDateTime?: string | undefined; completedStartDateTime?: string | undefined; completedEndDateTime?: string | undefined; statementDescriptor?: string | undefined; skip?: string | undefined; count?: string | undefined; /** The original data that was passed to this error instance. */ data$: ListWalletTransactionsValidationErrorData; constructor( err: ListWalletTransactionsValidationErrorData, 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.transactionType != null) this.transactionType = err.transactionType; if (err.transactionTypes != null) { this.transactionTypes = err.transactionTypes; } if (err.sourceType != null) this.sourceType = err.sourceType; if (err.sourceID != null) this.sourceID = err.sourceID; if (err.status != null) this.status = err.status; if (err.sweepID != null) this.sweepID = err.sweepID; if (err.createdStartDateTime != null) { this.createdStartDateTime = err.createdStartDateTime; } if (err.createdEndDateTime != null) { this.createdEndDateTime = err.createdEndDateTime; } if (err.completedStartDateTime != null) { this.completedStartDateTime = err.completedStartDateTime; } if (err.completedEndDateTime != null) { this.completedEndDateTime = err.completedEndDateTime; } if (err.statementDescriptor != null) { this.statementDescriptor = err.statementDescriptor; } if (err.skip != null) this.skip = err.skip; if (err.count != null) this.count = err.count; this.name = "ListWalletTransactionsValidationError"; } } /** @internal */ export const ListWalletTransactionsValidationError$inboundSchema: z.ZodType< ListWalletTransactionsValidationError, z.ZodTypeDef, unknown > = z.object({ transactionType: z.string().optional(), transactionTypes: z.string().optional(), sourceType: z.string().optional(), sourceID: z.string().optional(), status: z.string().optional(), sweepID: z.string().optional(), createdStartDateTime: z.string().optional(), createdEndDateTime: z.string().optional(), completedStartDateTime: z.string().optional(), completedEndDateTime: z.string().optional(), statementDescriptor: 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 ListWalletTransactionsValidationError(v, { request: v.request$, response: v.response$, body: v.body$, }); }); /** @internal */ export type ListWalletTransactionsValidationError$Outbound = { transactionType?: string | undefined; transactionTypes?: string | undefined; sourceType?: string | undefined; sourceID?: string | undefined; status?: string | undefined; sweepID?: string | undefined; createdStartDateTime?: string | undefined; createdEndDateTime?: string | undefined; completedStartDateTime?: string | undefined; completedEndDateTime?: string | undefined; statementDescriptor?: string | undefined; skip?: string | undefined; count?: string | undefined; }; /** @internal */ export const ListWalletTransactionsValidationError$outboundSchema: z.ZodType< ListWalletTransactionsValidationError$Outbound, z.ZodTypeDef, ListWalletTransactionsValidationError > = z.instanceof(ListWalletTransactionsValidationError) .transform(v => v.data$) .pipe(z.object({ transactionType: z.string().optional(), transactionTypes: z.string().optional(), sourceType: z.string().optional(), sourceID: z.string().optional(), status: z.string().optional(), sweepID: z.string().optional(), createdStartDateTime: z.string().optional(), createdEndDateTime: z.string().optional(), completedStartDateTime: z.string().optional(), completedEndDateTime: z.string().optional(), statementDescriptor: z.string().optional(), skip: z.string().optional(), count: z.string().optional(), }));