/* * 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 GetApiV3BlockHeightsRequest = { /** * Subnet ID */ subnet?: string | null | undefined; }; /** @internal */ export const GetApiV3BlockHeightsRequest$inboundSchema: z.ZodType< GetApiV3BlockHeightsRequest, z.ZodTypeDef, unknown > = z.object({ subnet: z.nullable(z.string()).default(null), }); /** @internal */ export type GetApiV3BlockHeightsRequest$Outbound = { subnet: string | null; }; /** @internal */ export const GetApiV3BlockHeightsRequest$outboundSchema: z.ZodType< GetApiV3BlockHeightsRequest$Outbound, z.ZodTypeDef, GetApiV3BlockHeightsRequest > = z.object({ subnet: z.nullable(z.string()).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 GetApiV3BlockHeightsRequest$ { /** @deprecated use `GetApiV3BlockHeightsRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV3BlockHeightsRequest$inboundSchema; /** @deprecated use `GetApiV3BlockHeightsRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV3BlockHeightsRequest$outboundSchema; /** @deprecated use `GetApiV3BlockHeightsRequest$Outbound` instead. */ export type Outbound = GetApiV3BlockHeightsRequest$Outbound; } export function getApiV3BlockHeightsRequestToJSON( getApiV3BlockHeightsRequest: GetApiV3BlockHeightsRequest, ): string { return JSON.stringify( GetApiV3BlockHeightsRequest$outboundSchema.parse( getApiV3BlockHeightsRequest, ), ); } export function getApiV3BlockHeightsRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetApiV3BlockHeightsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetApiV3BlockHeightsRequest' from JSON`, ); }