/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetApiV3BlockHeightsOverTimeRequest = { /** * Subnet ID */ subnet?: string | null | undefined; /** * End Timestamp */ end?: number | null | undefined; /** * Start Timestamp */ start: number; /** * Step value */ step?: number | undefined; }; /** @internal */ export const GetApiV3BlockHeightsOverTimeRequest$inboundSchema: z.ZodType< GetApiV3BlockHeightsOverTimeRequest, z.ZodTypeDef, unknown > = z.object({ subnet: z.nullable(z.string()).default(null), end: z.nullable(z.number()).default(null), start: z.number(), step: z.number().int().default(7200), }); /** @internal */ export type GetApiV3BlockHeightsOverTimeRequest$Outbound = { subnet: string | null; end: number | null; start: number; step: number; }; /** @internal */ export const GetApiV3BlockHeightsOverTimeRequest$outboundSchema: z.ZodType< GetApiV3BlockHeightsOverTimeRequest$Outbound, z.ZodTypeDef, GetApiV3BlockHeightsOverTimeRequest > = z.object({ subnet: z.nullable(z.string()).default(null), end: z.nullable(z.number()).default(null), start: z.number(), step: z.number().int().default(7200), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV3BlockHeightsOverTimeRequest$ { /** @deprecated use `GetApiV3BlockHeightsOverTimeRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV3BlockHeightsOverTimeRequest$inboundSchema; /** @deprecated use `GetApiV3BlockHeightsOverTimeRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV3BlockHeightsOverTimeRequest$outboundSchema; /** @deprecated use `GetApiV3BlockHeightsOverTimeRequest$Outbound` instead. */ export type Outbound = GetApiV3BlockHeightsOverTimeRequest$Outbound; } export function getApiV3BlockHeightsOverTimeRequestToJSON( getApiV3BlockHeightsOverTimeRequest: GetApiV3BlockHeightsOverTimeRequest, ): string { return JSON.stringify( GetApiV3BlockHeightsOverTimeRequest$outboundSchema.parse( getApiV3BlockHeightsOverTimeRequest, ), ); } export function getApiV3BlockHeightsOverTimeRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetApiV3BlockHeightsOverTimeRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetApiV3BlockHeightsOverTimeRequest' from JSON`, ); }