/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export type AgentMemoryCompactItem = { layer: string; text: string; id?: string | undefined; score?: number | undefined; source?: string | undefined; createdAt?: number | undefined; }; /** @internal */ export const AgentMemoryCompactItem$inboundSchema: z.ZodMiniType< AgentMemoryCompactItem, unknown > = z.object({ layer: types.string(), text: types.string(), id: types.optional(types.string()), score: types.optional(types.number()), source: types.optional(types.string()), createdAt: types.optional(types.number()), }); export function agentMemoryCompactItemFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AgentMemoryCompactItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentMemoryCompactItem' from JSON`, ); }