/* * 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"; /** * Evidence in the form of an uploaded document file. * * @remarks * The URL is a temporary presigned URL that expires after a certain period. */ export type UploadedDocumentEvidence = { /** * The unique identifier for the uploaded document in Vanta's system. */ id: string; /** * The original filename of the uploaded document. * * @remarks * Undefined if the filename was not captured during upload. */ filename?: string | undefined; /** * The MIME type of the document indicating its file format. * * @remarks * Common types: "application/pdf", "image/png", "image/jpeg", "text/plain" */ mimeType: string; /** * A presigned URL for downloading the document. * * @remarks * This URL is temporary and expires after a limited time. * Request a new evidence list to get a fresh URL if expired. */ url: string; }; /** @internal */ export const UploadedDocumentEvidence$inboundSchema: z.ZodType< UploadedDocumentEvidence, z.ZodTypeDef, unknown > = z.object({ id: z.string(), filename: z.string().optional(), mimeType: z.string(), url: z.string(), }); export function uploadedDocumentEvidenceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UploadedDocumentEvidence$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UploadedDocumentEvidence' from JSON`, ); }