/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat = { Json: "json", Csv: "csv", } as const; export type GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat = ClosedEnum; export type GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest = { /** * End Timestamp */ end?: number | null | undefined; format?: | GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat | undefined; /** * Start Timestamp */ start?: number | null | undefined; }; /** @internal */ export const GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$inboundSchema: z.ZodNativeEnum< typeof GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat > = z.nativeEnum(GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat); /** @internal */ export const GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$outboundSchema: z.ZodNativeEnum< typeof GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat > = GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$ { /** @deprecated use `GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$inboundSchema` instead. */ export const inboundSchema = GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$inboundSchema; /** @deprecated use `GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$outboundSchema` instead. */ export const outboundSchema = GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$outboundSchema; } /** @internal */ export const GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$inboundSchema: z.ZodType< GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest, z.ZodTypeDef, unknown > = z.object({ end: z.nullable(z.number().int()).default(null), format: GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$inboundSchema .default("json"), start: z.nullable(z.number().int()).default(null), }); /** @internal */ export type GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$Outbound = { end: number | null; format: string; start: number | null; }; /** @internal */ export const GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$outboundSchema: z.ZodType< GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$Outbound, z.ZodTypeDef, GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest > = z.object({ end: z.nullable(z.number().int()).default(null), format: GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateFormat$outboundSchema .default("json"), start: z.nullable(z.number().int()).default(null), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$ { /** @deprecated use `GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$inboundSchema; /** @deprecated use `GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$outboundSchema; /** @deprecated use `GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$Outbound` instead. */ export type Outbound = GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$Outbound; } export function getApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequestToJSON( getApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest: GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest, ): string { return JSON.stringify( GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$outboundSchema .parse(getApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest), ); } export function getApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequestFromJSON( jsonString: string, ): SafeParseResult< GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest, SDKValidationError > { return safeParse( jsonString, (x) => GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetApiV3DailyStatsMaxTotalTransactionsPerSecTillDateRequest' from JSON`, ); }