/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { ClosedEnum } from "../types/enums.js"; export const VectorIndexRequestScope = { Global: "global", Local: "local", } as const; export type VectorIndexRequestScope = ClosedEnum< typeof VectorIndexRequestScope >; export const SourceRequestBody = { Session: "session", Knowledge: "knowledge", Pattern: "pattern", Archive: "archive", Fact: "fact", } as const; export type SourceRequestBody = ClosedEnum; export type VectorIndexRequest = { content: string; embedding?: Array | undefined; agentWallet: string; userAddress?: string | undefined; threadId?: string | undefined; scope?: VectorIndexRequestScope | undefined; haiId?: string | undefined; source: SourceRequestBody; metadata?: { [k: string]: any } | undefined; }; /** @internal */ export const VectorIndexRequestScope$outboundSchema: z.ZodMiniEnum< typeof VectorIndexRequestScope > = z.enum(VectorIndexRequestScope); /** @internal */ export const SourceRequestBody$outboundSchema: z.ZodMiniEnum< typeof SourceRequestBody > = z.enum(SourceRequestBody); /** @internal */ export type VectorIndexRequest$Outbound = { content: string; embedding?: Array | undefined; agentWallet: string; userAddress?: string | undefined; threadId?: string | undefined; scope?: string | undefined; haiId?: string | undefined; source: string; metadata?: { [k: string]: any } | undefined; }; /** @internal */ export const VectorIndexRequest$outboundSchema: z.ZodMiniType< VectorIndexRequest$Outbound, VectorIndexRequest > = z.object({ content: z.string(), embedding: z.optional(z.array(z.number())), agentWallet: z.string(), userAddress: z.optional(z.string()), threadId: z.optional(z.string()), scope: z.optional(VectorIndexRequestScope$outboundSchema), haiId: z.optional(z.string()), source: SourceRequestBody$outboundSchema, metadata: z.optional(z.record(z.string(), z.any())), }); export function vectorIndexRequestToJSON( vectorIndexRequest: VectorIndexRequest, ): string { return JSON.stringify( VectorIndexRequest$outboundSchema.parse(vectorIndexRequest), ); }