aboutsummaryrefslogtreecommitdiff
path: root/packages/lib/api.ts
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2025-09-15 19:02:24 -0700
committerDhravya Shah <[email protected]>2025-09-15 19:02:24 -0700
commit27ea75b4a2d46de9d49388bb6a750d7a1bdb152a (patch)
tree8aae321a3e57b7676dc79ccac2a09a85cc7e5556 /packages/lib/api.ts
parentMerge branch 'main' of https://github.com/supermemoryai/supermemory (diff)
downloadsupermemory-27ea75b4a2d46de9d49388bb6a750d7a1bdb152a.tar.xz
supermemory-27ea75b4a2d46de9d49388bb6a750d7a1bdb152a.zip
change /memories to /documents, remove unwanted dependency, biome format
Diffstat (limited to 'packages/lib/api.ts')
-rw-r--r--packages/lib/api.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/lib/api.ts b/packages/lib/api.ts
index e6ca8555..ad343050 100644
--- a/packages/lib/api.ts
+++ b/packages/lib/api.ts
@@ -127,11 +127,11 @@ export const apiSchema = createSchema({
output: SettingsResponseSchema,
},
// Memory operations
- "@post/memories": {
+ "@post/documents": {
input: MemoryAddSchema,
output: MemoryResponseSchema,
},
- "@post/memories/list": {
+ "@post/documents/list": {
body: z
.object({
limit: z.number().optional(),
@@ -142,11 +142,11 @@ export const apiSchema = createSchema({
.optional(),
output: ListMemoriesResponseSchema,
},
- "@post/memories/documents": {
+ "@post/documents/documents": {
input: DocumentsWithMemoriesQuerySchema,
output: DocumentsWithMemoriesResponseSchema,
},
- "@post/memories/documents/by-ids": {
+ "@post/documents/documents/by-ids": {
input: z.object({
ids: z.array(z.string()),
by: z.enum(["id", "customId"]).optional(),
@@ -154,13 +154,13 @@ export const apiSchema = createSchema({
}),
output: DocumentsWithMemoriesResponseSchema,
},
- "@post/memories/migrate-mcp": {
+ "@post/documents/migrate-mcp": {
input: MigrateMCPRequestSchema,
output: MigrateMCPResponseSchema,
},
// Delete a memory
- "@delete/memories/:id": {
+ "@delete/documents/:id": {
output: z.any(), // 204 No-Content
params: z.object({ id: z.string() }),
},
@@ -200,7 +200,7 @@ export const apiSchema = createSchema({
output: z.object({
message: z.string(),
}),
- }
+ },
})
export const $fetch = createFetch({