/** * memory-record-body.ts, request-body parsers for the daemon-owned memory record * routes (add / search / update-review). * * These build the loose, wire-shaped input objects the route handlers hand to the * memory registry. Validation is honest but forgiving of extra fields: required * fields missing → 400 with a stated reason; unknown enum-ish values are passed * through for the store to normalize (the store already clamps confidence and * normalizes scope/reviewState), never silently dropped. */ import { type JsonRecord } from './route-helpers.js'; import type { MemoryBundleInput, MemoryLinkInput, MemoryRecordAddInput, MemoryRecordReviewInput, MemoryRecordSearchFilterInput, MemoryRecordUpdateInput } from './integration-route-types.js'; /** Parse POST /api/memory/records, cls and summary are required. */ export declare function parseMemoryRecordAddBody(body: JsonRecord): MemoryRecordAddInput | Response; /** Parse a memory search filter, every field optional; unknowns ignored. Shared by search/list/searchSemantic/export. */ export declare function parseMemoryRecordFilterBody(body: JsonRecord): MemoryRecordSearchFilterInput; /** Parse POST /api/memory/records/search, every field optional; unknowns ignored. */ export declare function parseMemoryRecordSearchBody(body: JsonRecord): { readonly filter: MemoryRecordSearchFilterInput; readonly recall: boolean; }; /** * Parse POST /api/memory/records/:id/update, editable fields * (scope/summary/detail/tags + the temporal validity window). All optional; the * store leaves unset fields unchanged. NOT a review update (that is the /review * route), this edits content/scope, e.g. promoting a record project→team. * * validFrom/validUntil carry the store's three-state window semantics: a number * sets the bound, an explicit `null` clears it, and an absent field leaves it * unchanged, so a proposal that changes only the window round-trips. */ export declare function parseMemoryRecordUpdateBody(body: JsonRecord): MemoryRecordUpdateInput; /** Parse POST /api/memory/records/:id/links, toId and relation are required (fromId is the path id). */ export declare function parseMemoryLinkBody(body: JsonRecord): MemoryLinkInput | Response; /** * Parse POST /api/memory/records/import, a { bundle } envelope holding a MemoryBundle. * Records/links are passed through loosely; the store re-normalizes scope/reviewState/ * confidence per record and skips ids it already holds (no-loss id-keyed union). */ export declare function parseMemoryBundleImportBody(body: JsonRecord): MemoryBundleInput | Response; /** Parse POST /api/memory/records/:id/review, all review fields optional; id comes from the path. */ export declare function parseMemoryRecordReviewBody(body: JsonRecord): MemoryRecordReviewInput; //# sourceMappingURL=memory-record-body.d.ts.map