/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ReportTemplate = { /** * List of columns recommended */ columns?: Array | undefined; /** * List of groupings recommended */ groupings?: Array | undefined; /** * Company UUID */ companyUuid?: string | undefined; /** * Type of report template */ reportType?: string | undefined; }; /** @internal */ export const ReportTemplate$inboundSchema: z.ZodType< ReportTemplate, z.ZodTypeDef, unknown > = z.object({ columns: z.array(z.string()).optional(), groupings: z.array(z.string()).optional(), company_uuid: z.string().optional(), report_type: z.string().optional(), }).transform((v) => { return remap$(v, { "company_uuid": "companyUuid", "report_type": "reportType", }); }); export function reportTemplateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ReportTemplate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReportTemplate' from JSON`, ); }