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