/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../lib/primitives.js"; import { ClosedEnum } from "../types/enums.js"; import { AgentMemoryLayer, AgentMemoryLayer$outboundSchema, } from "./agent-memory-layer.js"; export const MemorySearchRequestScope = { Global: "global", Local: "local", } as const; export type MemorySearchRequestScope = ClosedEnum< typeof MemorySearchRequestScope >; export type MemorySearchRequest = { query: string; agentWallet?: string | undefined; agentId?: string | undefined; userAddress?: string | undefined; userId?: string | undefined; threadId?: string | undefined; runId?: string | undefined; scope?: MemorySearchRequestScope | undefined; haiId?: string | undefined; limit?: number | undefined; layers?: Array | undefined; filters?: { [k: string]: any } | undefined; rerank?: boolean | undefined; }; /** @internal */ export const MemorySearchRequestScope$outboundSchema: z.ZodMiniEnum< typeof MemorySearchRequestScope > = z.enum(MemorySearchRequestScope); /** @internal */ export type MemorySearchRequest$Outbound = { query: string; agentWallet?: string | undefined; agent_id?: string | undefined; userAddress?: string | undefined; user_id?: string | undefined; threadId?: string | undefined; runId?: string | undefined; scope?: string | undefined; haiId?: string | undefined; limit?: number | undefined; layers?: Array | undefined; filters?: { [k: string]: any } | undefined; rerank?: boolean | undefined; }; /** @internal */ export const MemorySearchRequest$outboundSchema: z.ZodMiniType< MemorySearchRequest$Outbound, MemorySearchRequest > = z.pipe( z.object({ query: z.string(), agentWallet: z.optional(z.string()), agentId: z.optional(z.string()), userAddress: z.optional(z.string()), userId: z.optional(z.string()), threadId: z.optional(z.string()), runId: z.optional(z.string()), scope: z.optional(MemorySearchRequestScope$outboundSchema), haiId: z.optional(z.string()), limit: z.optional(z.int()), layers: z.optional(z.array(AgentMemoryLayer$outboundSchema)), filters: z.optional(z.record(z.string(), z.any())), rerank: z.optional(z.boolean()), }), z.transform((v) => { return remap$(v, { agentId: "agent_id", userId: "user_id", }); }), ); export function memorySearchRequestToJSON( memorySearchRequest: MemorySearchRequest, ): string { return JSON.stringify( MemorySearchRequest$outboundSchema.parse(memorySearchRequest), ); }