mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-13 23:11:10 +00:00
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:
parent
4de8b8f987
commit
795981218b
3 changed files with 5 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -35,4 +35,5 @@ export type {
|
|||
DocumentWithMemories,
|
||||
MemoryEntry,
|
||||
DocumentsResponse,
|
||||
MemoryRelation,
|
||||
} from "./api-types"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue