/* * 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"; export type EvidenceUrl = { /** * Vanta internal reference to evidence */ id: string; /** * Pre-signed S3 URL for evidence */ url: string; /** * File name of evidence */ filename: string; /** * Set to true if this is a presigned s3 url. Set to false if this is a customer uploaded link */ isDownloadable: boolean; /** * MIME type of the evidence file (e.g., "application/pdf", "image/png") */ mimeType: string | null; }; /** @internal */ export const EvidenceUrl$inboundSchema: z.ZodType< EvidenceUrl, z.ZodTypeDef, unknown > = z.object({ id: z.string(), url: z.string(), filename: z.string(), isDownloadable: z.boolean(), mimeType: z.nullable(z.string()), }); export function evidenceUrlFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EvidenceUrl$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EvidenceUrl' from JSON`, ); }