/* * 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"; /** * Represents an uploaded file in a Vanta Document. * * @remarks * The file is stored in Vanta's system and accessed via a presigned URL. */ export type VantaDocumentUploadedEvidence = { /** * Discriminator to identify this as an uploaded file. */ type: "uploaded"; /** * The unique identifier for the file version 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 VantaDocumentUploadedEvidence$inboundSchema: z.ZodType< VantaDocumentUploadedEvidence, z.ZodTypeDef, unknown > = z.object({ type: z.literal("uploaded"), id: z.string(), filename: z.string().optional(), mimeType: z.string(), url: z.string(), }); export function vantaDocumentUploadedEvidenceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VantaDocumentUploadedEvidence$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VantaDocumentUploadedEvidence' from JSON`, ); }