/* * 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 GetApiV3NeuronMaturityModulationsFormat = { Json: "json", Csv: "csv", } as const; export type GetApiV3NeuronMaturityModulationsFormat = ClosedEnum< typeof GetApiV3NeuronMaturityModulationsFormat >; export type GetApiV3NeuronMaturityModulationsRequest = { /** * End Timestamp */ end?: number | null | undefined; format?: GetApiV3NeuronMaturityModulationsFormat | undefined; /** * Start Timestamp */ start?: number | null | undefined; }; /** @internal */ export const GetApiV3NeuronMaturityModulationsFormat$inboundSchema: z.ZodNativeEnum = z .nativeEnum(GetApiV3NeuronMaturityModulationsFormat); /** @internal */ export const GetApiV3NeuronMaturityModulationsFormat$outboundSchema: z.ZodNativeEnum = GetApiV3NeuronMaturityModulationsFormat$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV3NeuronMaturityModulationsFormat$ { /** @deprecated use `GetApiV3NeuronMaturityModulationsFormat$inboundSchema` instead. */ export const inboundSchema = GetApiV3NeuronMaturityModulationsFormat$inboundSchema; /** @deprecated use `GetApiV3NeuronMaturityModulationsFormat$outboundSchema` instead. */ export const outboundSchema = GetApiV3NeuronMaturityModulationsFormat$outboundSchema; } /** @internal */ export const GetApiV3NeuronMaturityModulationsRequest$inboundSchema: z.ZodType< GetApiV3NeuronMaturityModulationsRequest, z.ZodTypeDef, unknown > = z.object({ end: z.nullable(z.number().int()).default(null), format: GetApiV3NeuronMaturityModulationsFormat$inboundSchema.default("json"), start: z.nullable(z.number().int()).default(null), }); /** @internal */ export type GetApiV3NeuronMaturityModulationsRequest$Outbound = { end: number | null; format: string; start: number | null; }; /** @internal */ export const GetApiV3NeuronMaturityModulationsRequest$outboundSchema: z.ZodType< GetApiV3NeuronMaturityModulationsRequest$Outbound, z.ZodTypeDef, GetApiV3NeuronMaturityModulationsRequest > = z.object({ end: z.nullable(z.number().int()).default(null), format: GetApiV3NeuronMaturityModulationsFormat$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 GetApiV3NeuronMaturityModulationsRequest$ { /** @deprecated use `GetApiV3NeuronMaturityModulationsRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV3NeuronMaturityModulationsRequest$inboundSchema; /** @deprecated use `GetApiV3NeuronMaturityModulationsRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV3NeuronMaturityModulationsRequest$outboundSchema; /** @deprecated use `GetApiV3NeuronMaturityModulationsRequest$Outbound` instead. */ export type Outbound = GetApiV3NeuronMaturityModulationsRequest$Outbound; } export function getApiV3NeuronMaturityModulationsRequestToJSON( getApiV3NeuronMaturityModulationsRequest: GetApiV3NeuronMaturityModulationsRequest, ): string { return JSON.stringify( GetApiV3NeuronMaturityModulationsRequest$outboundSchema.parse( getApiV3NeuronMaturityModulationsRequest, ), ); } export function getApiV3NeuronMaturityModulationsRequestFromJSON( jsonString: string, ): SafeParseResult< GetApiV3NeuronMaturityModulationsRequest, SDKValidationError > { return safeParse( jsonString, (x) => GetApiV3NeuronMaturityModulationsRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetApiV3NeuronMaturityModulationsRequest' from JSON`, ); }