/* * 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 SupplySeriesResponse = { data: Array>; }; /** @internal */ export const SupplySeriesResponse$inboundSchema: z.ZodType< SupplySeriesResponse, z.ZodTypeDef, unknown > = z.object({ data: z.array(z.array(z.number().int())), }); /** @internal */ export type SupplySeriesResponse$Outbound = { data: Array>; }; /** @internal */ export const SupplySeriesResponse$outboundSchema: z.ZodType< SupplySeriesResponse$Outbound, z.ZodTypeDef, SupplySeriesResponse > = z.object({ data: z.array(z.array(z.number().int())), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SupplySeriesResponse$ { /** @deprecated use `SupplySeriesResponse$inboundSchema` instead. */ export const inboundSchema = SupplySeriesResponse$inboundSchema; /** @deprecated use `SupplySeriesResponse$outboundSchema` instead. */ export const outboundSchema = SupplySeriesResponse$outboundSchema; /** @deprecated use `SupplySeriesResponse$Outbound` instead. */ export type Outbound = SupplySeriesResponse$Outbound; } export function supplySeriesResponseToJSON( supplySeriesResponse: SupplySeriesResponse, ): string { return JSON.stringify( SupplySeriesResponse$outboundSchema.parse(supplySeriesResponse), ); } export function supplySeriesResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SupplySeriesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SupplySeriesResponse' from JSON`, ); }