/* * 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"; /** * An enumeration. */ export const ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep = { EightySixThousandFourHundred: 86400, ThreeThousandSixHundred: 3600, } as const; /** * An enumeration. */ export type ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep = ClosedEnum< typeof ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep >; export type ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest = { start?: number | undefined; end?: number | undefined; /** * An enumeration. */ step?: | ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep | undefined; }; /** @internal */ export const ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$inboundSchema: z.ZodNativeEnum< typeof ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep > = z.nativeEnum( ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep, ); /** @internal */ export const ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$outboundSchema: z.ZodNativeEnum< typeof ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep > = ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$ { /** @deprecated use `ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$inboundSchema` instead. */ export const inboundSchema = ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$inboundSchema; /** @deprecated use `ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$outboundSchema` instead. */ export const outboundSchema = ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$outboundSchema; } /** @internal */ export const ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$inboundSchema: z.ZodType< ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest, z.ZodTypeDef, unknown > = z.object({ start: z.number().int().optional(), end: z.number().int().optional(), step: ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$inboundSchema .default(86400), }); /** @internal */ export type ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$Outbound = { start?: number | undefined; end?: number | undefined; step: number; }; /** @internal */ export const ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$outboundSchema: z.ZodType< ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$Outbound, z.ZodTypeDef, ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest > = z.object({ start: z.number().int().optional(), end: z.number().int().optional(), step: ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetStep$outboundSchema .default(86400), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$ { /** @deprecated use `ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$inboundSchema` instead. */ export const inboundSchema = ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$inboundSchema; /** @deprecated use `ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$outboundSchema` instead. */ export const outboundSchema = ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$outboundSchema; /** @deprecated use `ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$Outbound` instead. */ export type Outbound = ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$Outbound; } export function listChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequestToJSON( listChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest: ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest, ): string { return JSON.stringify( ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$outboundSchema .parse( listChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest, ), ); } export function listChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequestFromJSON( jsonString: string, ): SafeParseResult< ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest, SDKValidationError > { return safeParse( jsonString, (x) => ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'ListChainKeyTransactionCountApiV1ChainKeyLedgersTransactionCountGetRequest' from JSON`, ); }