/* * 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"; import { ReportSpecModel, ReportSpecModel$inboundSchema, } from "./reportspecmodel.js"; export type ReportSpec = { model: ReportSpecModel; /** * The parameters for the report model. */ params: { [k: string]: any }; }; /** @internal */ export const ReportSpec$inboundSchema: z.ZodType< ReportSpec, z.ZodTypeDef, unknown > = z.object({ model: ReportSpecModel$inboundSchema, params: z.record(z.any()), }); export function reportSpecFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ReportSpec$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReportSpec' from JSON`, ); }