/* * 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 CreateReport = { /** * A unique identifier of the report request */ requestUuid?: string | undefined; /** * Company UUID */ companyUuid?: string | undefined; /** * Title of the report */ customName?: string | null | undefined; /** * File type */ fileType?: string | undefined; }; /** @internal */ export const CreateReport$inboundSchema: z.ZodType< CreateReport, z.ZodTypeDef, unknown > = z.object({ request_uuid: z.string().optional(), company_uuid: z.string().optional(), custom_name: z.nullable(z.string()).optional(), file_type: z.string().optional(), }).transform((v) => { return remap$(v, { "request_uuid": "requestUuid", "company_uuid": "companyUuid", "custom_name": "customName", "file_type": "fileType", }); }); export function createReportFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateReport$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateReport' from JSON`, ); }