/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 47e83bbcbd5a */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CountInfo, CountInfo$inboundSchema } from "./countinfo.js"; export type LabeledCountInfo = { /** * Label for the included count information. */ label: string; /** * List of data points for counts for a given date period. */ countInfo?: Array | undefined; }; /** @internal */ export const LabeledCountInfo$inboundSchema: z.ZodType< LabeledCountInfo, z.ZodTypeDef, unknown > = z.object({ label: z.string(), countInfo: z.array(CountInfo$inboundSchema).optional(), }); export function labeledCountInfoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LabeledCountInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LabeledCountInfo' from JSON`, ); }