/* * 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"; export const MemoryAddRequestScope = { Global: "global", Local: "local", } as const; export type MemoryAddRequestScope = ClosedEnum; export type MemoryAddRequest = { messages: Array<{ [k: string]: any }>; agentWallet?: string | undefined; agentId?: string | undefined; userAddress?: string | undefined; userId?: string | undefined; runId?: string | undefined; threadId?: string | undefined; scope?: MemoryAddRequestScope | undefined; haiId?: string | undefined; metadata?: { [k: string]: any } | undefined; enableGraph?: boolean | undefined; }; /** @internal */ export const MemoryAddRequestScope$outboundSchema: z.ZodMiniEnum< typeof MemoryAddRequestScope > = z.enum(MemoryAddRequestScope); /** @internal */ export type MemoryAddRequest$Outbound = { messages: Array<{ [k: string]: any }>; agentWallet?: string | undefined; agent_id?: string | undefined; userAddress?: string | undefined; user_id?: string | undefined; runId?: string | undefined; threadId?: string | undefined; scope?: string | undefined; haiId?: string | undefined; metadata?: { [k: string]: any } | undefined; enableGraph?: boolean | undefined; }; /** @internal */ export const MemoryAddRequest$outboundSchema: z.ZodMiniType< MemoryAddRequest$Outbound, MemoryAddRequest > = z.pipe( z.object({ messages: z.array(z.record(z.string(), z.any())), agentWallet: z.optional(z.string()), agentId: z.optional(z.string()), userAddress: z.optional(z.string()), userId: z.optional(z.string()), runId: z.optional(z.string()), threadId: z.optional(z.string()), scope: z.optional(MemoryAddRequestScope$outboundSchema), haiId: z.optional(z.string()), metadata: z.optional(z.record(z.string(), z.any())), enableGraph: z.optional(z.boolean()), }), z.transform((v) => { return remap$(v, { agentId: "agent_id", userId: "user_id", }); }), ); export function memoryAddRequestToJSON( memoryAddRequest: MemoryAddRequest, ): string { return JSON.stringify( MemoryAddRequest$outboundSchema.parse(memoryAddRequest), ); }