/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CancelVectorStoreFileBatchRequest = { vectorStoreId: string; batchId: string; /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; }; /** @internal */ export const CancelVectorStoreFileBatchRequest$inboundSchema: z.ZodType< CancelVectorStoreFileBatchRequest, z.ZodTypeDef, unknown > = z.object({ vector_store_id: z.string(), batch_id: z.string(), "X-On-Behalf-Of": z.string().optional(), }).transform((v) => { return remap$(v, { "vector_store_id": "vectorStoreId", "batch_id": "batchId", "X-On-Behalf-Of": "xOnBehalfOf", }); }); /** @internal */ export type CancelVectorStoreFileBatchRequest$Outbound = { vector_store_id: string; batch_id: string; "X-On-Behalf-Of"?: string | undefined; }; /** @internal */ export const CancelVectorStoreFileBatchRequest$outboundSchema: z.ZodType< CancelVectorStoreFileBatchRequest$Outbound, z.ZodTypeDef, CancelVectorStoreFileBatchRequest > = z.object({ vectorStoreId: z.string(), batchId: z.string(), xOnBehalfOf: z.string().optional(), }).transform((v) => { return remap$(v, { vectorStoreId: "vector_store_id", batchId: "batch_id", xOnBehalfOf: "X-On-Behalf-Of", }); }); export function cancelVectorStoreFileBatchRequestToJSON( cancelVectorStoreFileBatchRequest: CancelVectorStoreFileBatchRequest, ): string { return JSON.stringify( CancelVectorStoreFileBatchRequest$outboundSchema.parse( cancelVectorStoreFileBatchRequest, ), ); } export function cancelVectorStoreFileBatchRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CancelVectorStoreFileBatchRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelVectorStoreFileBatchRequest' from JSON`, ); }