/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ListTransactionVolumeMeta, ListTransactionVolumeMeta$inboundSchema, ListTransactionVolumeMeta$Outbound, ListTransactionVolumeMeta$outboundSchema, } from "./listtransactionvolumemeta.js"; import { TransactionVolumeMetric, TransactionVolumeMetric$inboundSchema, TransactionVolumeMetric$Outbound, TransactionVolumeMetric$outboundSchema, } from "./transactionvolumemetric.js"; export type ListTransactionVolumeResponse = { data: Array; meta: ListTransactionVolumeMeta; }; /** @internal */ export const ListTransactionVolumeResponse$inboundSchema: z.ZodType< ListTransactionVolumeResponse, z.ZodTypeDef, unknown > = z.object({ data: z.array(TransactionVolumeMetric$inboundSchema), meta: ListTransactionVolumeMeta$inboundSchema, }); /** @internal */ export type ListTransactionVolumeResponse$Outbound = { data: Array; meta: ListTransactionVolumeMeta$Outbound; }; /** @internal */ export const ListTransactionVolumeResponse$outboundSchema: z.ZodType< ListTransactionVolumeResponse$Outbound, z.ZodTypeDef, ListTransactionVolumeResponse > = z.object({ data: z.array(TransactionVolumeMetric$outboundSchema), meta: ListTransactionVolumeMeta$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransactionVolumeResponse$ { /** @deprecated use `ListTransactionVolumeResponse$inboundSchema` instead. */ export const inboundSchema = ListTransactionVolumeResponse$inboundSchema; /** @deprecated use `ListTransactionVolumeResponse$outboundSchema` instead. */ export const outboundSchema = ListTransactionVolumeResponse$outboundSchema; /** @deprecated use `ListTransactionVolumeResponse$Outbound` instead. */ export type Outbound = ListTransactionVolumeResponse$Outbound; } export function listTransactionVolumeResponseToJSON( listTransactionVolumeResponse: ListTransactionVolumeResponse, ): string { return JSON.stringify( ListTransactionVolumeResponse$outboundSchema.parse( listTransactionVolumeResponse, ), ); } export function listTransactionVolumeResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListTransactionVolumeResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListTransactionVolumeResponse' from JSON`, ); }