/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ModifyVectorStoreRequest = { vectorStoreId: string; /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; modifyVectorStoreRequest: components.ModifyVectorStoreRequest; }; /** @internal */ export const ModifyVectorStoreRequest$inboundSchema: z.ZodType< ModifyVectorStoreRequest, z.ZodTypeDef, unknown > = z.object({ vector_store_id: z.string(), "X-On-Behalf-Of": z.string().optional(), ModifyVectorStoreRequest: components.ModifyVectorStoreRequest$inboundSchema, }).transform((v) => { return remap$(v, { "vector_store_id": "vectorStoreId", "X-On-Behalf-Of": "xOnBehalfOf", "ModifyVectorStoreRequest": "modifyVectorStoreRequest", }); }); /** @internal */ export type ModifyVectorStoreRequest$Outbound = { vector_store_id: string; "X-On-Behalf-Of"?: string | undefined; ModifyVectorStoreRequest: components.ModifyVectorStoreRequest$Outbound; }; /** @internal */ export const ModifyVectorStoreRequest$outboundSchema: z.ZodType< ModifyVectorStoreRequest$Outbound, z.ZodTypeDef, ModifyVectorStoreRequest > = z.object({ vectorStoreId: z.string(), xOnBehalfOf: z.string().optional(), modifyVectorStoreRequest: components.ModifyVectorStoreRequest$outboundSchema, }).transform((v) => { return remap$(v, { vectorStoreId: "vector_store_id", xOnBehalfOf: "X-On-Behalf-Of", modifyVectorStoreRequest: "ModifyVectorStoreRequest", }); }); export function modifyVectorStoreRequestToJSON( modifyVectorStoreRequest: ModifyVectorStoreRequest, ): string { return JSON.stringify( ModifyVectorStoreRequest$outboundSchema.parse(modifyVectorStoreRequest), ); } export function modifyVectorStoreRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ModifyVectorStoreRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ModifyVectorStoreRequest' from JSON`, ); }