/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type CostPoint = { cost?: string | undefined; eventCount?: number | undefined; quantity?: string | undefined; timestamp?: string | undefined; }; /** @internal */ export const CostPoint$inboundSchema: z.ZodMiniType = z .pipe( z.object({ cost: types.optional(types.string()), event_count: types.optional(types.number()), quantity: types.optional(types.string()), timestamp: types.optional(types.string()), }), z.transform((v) => { return remap$(v, { "event_count": "eventCount", }); }), ); export function costPointFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CostPoint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CostPoint' from JSON`, ); }