/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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"; export type MetricValue = { value: number; timestamp: number; }; /** @internal */ export const MetricValue$inboundSchema: z.ZodType< MetricValue, z.ZodTypeDef, unknown > = z.object({ value: z.number(), timestamp: z.number(), }); export function metricValueFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MetricValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MetricValue' from JSON`, ); }