/* * 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"; /** * Deletion status for a vector store file. */ export type VectorStoreFileDeletionStatus = { /** * The ID of the deleted file. */ id: string; /** * The object type, which is always 'vector_store.file.deleted'. */ object: "vector_store.file.deleted"; /** * Whether the deletion was successful. */ deleted: boolean; }; /** @internal */ export const VectorStoreFileDeletionStatus$inboundSchema: z.ZodType< VectorStoreFileDeletionStatus, z.ZodTypeDef, unknown > = z.object({ id: z.string(), object: z.literal("vector_store.file.deleted"), deleted: z.boolean(), }); /** @internal */ export type VectorStoreFileDeletionStatus$Outbound = { id: string; object: "vector_store.file.deleted"; deleted: boolean; }; /** @internal */ export const VectorStoreFileDeletionStatus$outboundSchema: z.ZodType< VectorStoreFileDeletionStatus$Outbound, z.ZodTypeDef, VectorStoreFileDeletionStatus > = z.object({ id: z.string(), object: z.literal("vector_store.file.deleted"), deleted: z.boolean(), }); export function vectorStoreFileDeletionStatusToJSON( vectorStoreFileDeletionStatus: VectorStoreFileDeletionStatus, ): string { return JSON.stringify( VectorStoreFileDeletionStatus$outboundSchema.parse( vectorStoreFileDeletionStatus, ), ); } export function vectorStoreFileDeletionStatusFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VectorStoreFileDeletionStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VectorStoreFileDeletionStatus' from JSON`, ); }