fix: deduplicate MemoryRelation type and align MemoryEntry with backend schema

- Remove duplicate MemoryRelation definition from types.ts, import from api-types.ts
- Add MemoryRelation to re-exports in types.ts and index.tsx
- Make MemoryEntry.memory required and content optional to match backend MemoryEntrySchema
This commit is contained in:
Vorflux AI 2026-03-28 23:17:25 +00:00
parent 4de8b8f987
commit 795981218b
3 changed files with 5 additions and 3 deletions

View file

@ -2,8 +2,8 @@ export type MemoryRelation = "updates" | "extends" | "derives"
export interface MemoryEntry {
id: string
content: string | null
memory?: string | null
memory: string
content?: string | null
createdAt: string
updatedAt: string
spaceId?: string | null

View file

@ -35,4 +35,5 @@ export type {
DocumentWithMemories,
MemoryEntry,
DocumentsResponse,
MemoryRelation,
} from "./api-types"

View file

@ -1,6 +1,6 @@
// Graph API types matching backend response
export type MemoryRelation = "updates" | "extends" | "derives"
import type { MemoryRelation } from "./api-types"
export interface GraphApiMemory {
id: string
@ -221,4 +221,5 @@ export type {
DocumentWithMemories,
MemoryEntry,
DocumentsResponse,
MemoryRelation,
} from "./api-types"