/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { AgentMemoryTurnMessage, AgentMemoryTurnMessage$inboundSchema, } from "./agent-memory-turn-message.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export const SessionTranscriptScope = { Global: "global", Local: "local", } as const; export type SessionTranscriptScope = OpenEnum; export type SessionTranscript = { sessionId: string; threadId: string; agentWallet: string; userAddress?: string | undefined; scope?: SessionTranscriptScope | undefined; haiId?: string | undefined; messages: Array; summary?: string | undefined; tokenCount?: number | undefined; metadata: { [k: string]: any }; createdAt: number; expiresAt?: number | undefined; }; /** @internal */ export const SessionTranscriptScope$inboundSchema: z.ZodMiniType< SessionTranscriptScope, unknown > = openEnums.inboundSchema(SessionTranscriptScope); /** @internal */ export const SessionTranscript$inboundSchema: z.ZodMiniType< SessionTranscript, unknown > = z.object({ sessionId: types.string(), threadId: types.string(), agentWallet: types.string(), userAddress: types.optional(types.string()), scope: types.optional(SessionTranscriptScope$inboundSchema), haiId: types.optional(types.string()), messages: z.array(AgentMemoryTurnMessage$inboundSchema), summary: types.optional(types.string()), tokenCount: types.optional(types.number()), metadata: z.record(z.string(), z.any()), createdAt: types.number(), expiresAt: types.optional(types.number()), }); export function sessionTranscriptFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SessionTranscript$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SessionTranscript' from JSON`, ); }