/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { ClosedEnum } from "../types/enums.js"; import { AgentMemoryTurnMessage, AgentMemoryTurnMessage$Outbound, AgentMemoryTurnMessage$outboundSchema, } from "./agent-memory-turn-message.js"; export const TranscriptStoreRequestScope = { Global: "global", Local: "local", } as const; export type TranscriptStoreRequestScope = ClosedEnum< typeof TranscriptStoreRequestScope >; export type TranscriptStoreRequest = { sessionId: string; threadId: string; agentWallet: string; userAddress?: string | undefined; scope?: TranscriptStoreRequestScope | undefined; haiId?: string | undefined; messages: Array; tokenCount: number; summary?: string | undefined; summaryEmbedding?: Array | undefined; metadata?: { [k: string]: any } | undefined; }; /** @internal */ export const TranscriptStoreRequestScope$outboundSchema: z.ZodMiniEnum< typeof TranscriptStoreRequestScope > = z.enum(TranscriptStoreRequestScope); /** @internal */ export type TranscriptStoreRequest$Outbound = { sessionId: string; threadId: string; agentWallet: string; userAddress?: string | undefined; scope?: string | undefined; haiId?: string | undefined; messages: Array; tokenCount: number; summary?: string | undefined; summaryEmbedding?: Array | undefined; metadata?: { [k: string]: any } | undefined; }; /** @internal */ export const TranscriptStoreRequest$outboundSchema: z.ZodMiniType< TranscriptStoreRequest$Outbound, TranscriptStoreRequest > = z.object({ sessionId: z.string(), threadId: z.string(), agentWallet: z.string(), userAddress: z.optional(z.string()), scope: z.optional(TranscriptStoreRequestScope$outboundSchema), haiId: z.optional(z.string()), messages: z.array(AgentMemoryTurnMessage$outboundSchema), tokenCount: z.int(), summary: z.optional(z.string()), summaryEmbedding: z.optional(z.array(z.number())), metadata: z.optional(z.record(z.string(), z.any())), }); export function transcriptStoreRequestToJSON( transcriptStoreRequest: TranscriptStoreRequest, ): string { return JSON.stringify( TranscriptStoreRequest$outboundSchema.parse(transcriptStoreRequest), ); }