/* * 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 AppSchemasTransactionCountListTransactionCountMeta = { totalTransactionsForDataset?: string | undefined; totalTransactionsForAllTime?: string | undefined; }; /** @internal */ export const AppSchemasTransactionCountListTransactionCountMeta$inboundSchema: z.ZodType< AppSchemasTransactionCountListTransactionCountMeta, z.ZodTypeDef, unknown > = z.object({ total_transactions_for_dataset: z.string().optional(), total_transactions_for_all_time: z.string().optional(), }).transform((v) => { return remap$(v, { "total_transactions_for_dataset": "totalTransactionsForDataset", "total_transactions_for_all_time": "totalTransactionsForAllTime", }); }); /** @internal */ export type AppSchemasTransactionCountListTransactionCountMeta$Outbound = { total_transactions_for_dataset?: string | undefined; total_transactions_for_all_time?: string | undefined; }; /** @internal */ export const AppSchemasTransactionCountListTransactionCountMeta$outboundSchema: z.ZodType< AppSchemasTransactionCountListTransactionCountMeta$Outbound, z.ZodTypeDef, AppSchemasTransactionCountListTransactionCountMeta > = z.object({ totalTransactionsForDataset: z.string().optional(), totalTransactionsForAllTime: z.string().optional(), }).transform((v) => { return remap$(v, { totalTransactionsForDataset: "total_transactions_for_dataset", totalTransactionsForAllTime: "total_transactions_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 AppSchemasTransactionCountListTransactionCountMeta$ { /** @deprecated use `AppSchemasTransactionCountListTransactionCountMeta$inboundSchema` instead. */ export const inboundSchema = AppSchemasTransactionCountListTransactionCountMeta$inboundSchema; /** @deprecated use `AppSchemasTransactionCountListTransactionCountMeta$outboundSchema` instead. */ export const outboundSchema = AppSchemasTransactionCountListTransactionCountMeta$outboundSchema; /** @deprecated use `AppSchemasTransactionCountListTransactionCountMeta$Outbound` instead. */ export type Outbound = AppSchemasTransactionCountListTransactionCountMeta$Outbound; } export function appSchemasTransactionCountListTransactionCountMetaToJSON( appSchemasTransactionCountListTransactionCountMeta: AppSchemasTransactionCountListTransactionCountMeta, ): string { return JSON.stringify( AppSchemasTransactionCountListTransactionCountMeta$outboundSchema.parse( appSchemasTransactionCountListTransactionCountMeta, ), ); } export function appSchemasTransactionCountListTransactionCountMetaFromJSON( jsonString: string, ): SafeParseResult< AppSchemasTransactionCountListTransactionCountMeta, SDKValidationError > { return safeParse( jsonString, (x) => AppSchemasTransactionCountListTransactionCountMeta$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AppSchemasTransactionCountListTransactionCountMeta' from JSON`, ); }