/* * 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 FormPdf = { /** * the UUID of the form */ uuid: string; /** * the URL of the form */ documentUrl?: string | null | undefined; /** * The content type of the associated document. Most forms are PDFs with a content type of `application/pdf`. Some tax file packages will be zip files (containing PDFs) with a content type of `application/zip`. This attribute will be `null` when the document has not been prepared. */ documentContentType?: string | null | undefined; }; /** @internal */ export const FormPdf$inboundSchema: z.ZodType = z.object({ uuid: z.string(), document_url: z.nullable(z.string()).optional(), document_content_type: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "document_url": "documentUrl", "document_content_type": "documentContentType", }); }); export function formPdfFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => FormPdf$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FormPdf' from JSON`, ); }