/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; 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 ListTransactionVolumeMeta = { totalTransactionsForDataset?: string | undefined; totalVolumeForDataset?: string | undefined; totalTransactionsForAllTime?: string | undefined; totalVolumeForAllTime?: string | undefined; }; /** @internal */ export const ListTransactionVolumeMeta$inboundSchema: z.ZodType< ListTransactionVolumeMeta, z.ZodTypeDef, unknown > = z.object({ total_transactions_for_dataset: z.string().optional(), total_volume_for_dataset: z.string().optional(), total_transactions_for_all_time: z.string().optional(), total_volume_for_all_time: z.string().optional(), }).transform((v) => { return remap$(v, { "total_transactions_for_dataset": "totalTransactionsForDataset", "total_volume_for_dataset": "totalVolumeForDataset", "total_transactions_for_all_time": "totalTransactionsForAllTime", "total_volume_for_all_time": "totalVolumeForAllTime", }); }); /** @internal */ export type ListTransactionVolumeMeta$Outbound = { total_transactions_for_dataset?: string | undefined; total_volume_for_dataset?: string | undefined; total_transactions_for_all_time?: string | undefined; total_volume_for_all_time?: string | undefined; }; /** @internal */ export const ListTransactionVolumeMeta$outboundSchema: z.ZodType< ListTransactionVolumeMeta$Outbound, z.ZodTypeDef, ListTransactionVolumeMeta > = z.object({ totalTransactionsForDataset: z.string().optional(), totalVolumeForDataset: z.string().optional(), totalTransactionsForAllTime: z.string().optional(), totalVolumeForAllTime: z.string().optional(), }).transform((v) => { return remap$(v, { totalTransactionsForDataset: "total_transactions_for_dataset", totalVolumeForDataset: "total_volume_for_dataset", totalTransactionsForAllTime: "total_transactions_for_all_time", totalVolumeForAllTime: "total_volume_for_all_time", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListTransactionVolumeMeta$ { /** @deprecated use `ListTransactionVolumeMeta$inboundSchema` instead. */ export const inboundSchema = ListTransactionVolumeMeta$inboundSchema; /** @deprecated use `ListTransactionVolumeMeta$outboundSchema` instead. */ export const outboundSchema = ListTransactionVolumeMeta$outboundSchema; /** @deprecated use `ListTransactionVolumeMeta$Outbound` instead. */ export type Outbound = ListTransactionVolumeMeta$Outbound; } export function listTransactionVolumeMetaToJSON( listTransactionVolumeMeta: ListTransactionVolumeMeta, ): string { return JSON.stringify( ListTransactionVolumeMeta$outboundSchema.parse(listTransactionVolumeMeta), ); } export function listTransactionVolumeMetaFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListTransactionVolumeMeta$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListTransactionVolumeMeta' from JSON`, ); }