comemo 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/client.js +9 -7
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -126,7 +126,9 @@ class MemoryClient {
126
126
  * @returns Object with status, memory_id, and deleted flag.
127
127
  */
128
128
  async deleteMemory(memoryId) {
129
- return this.request("DELETE", `/memory/${memoryId}`, { params: {} });
129
+ return this.request("POST", "/memory/single/delete", {
130
+ body: { memory_id: memoryId, config: this.config },
131
+ });
130
132
  }
131
133
  /**
132
134
  * Delete all memories for a user.
@@ -135,8 +137,8 @@ class MemoryClient {
135
137
  * @returns DeleteResult with count of deleted memories.
136
138
  */
137
139
  async deleteUserMemories(userId) {
138
- const data = await this.request("DELETE", "/memory", {
139
- params: { user_id: userId },
140
+ const data = await this.request("POST", "/memory/delete", {
141
+ body: { user_id: userId, config: this.config },
140
142
  });
141
143
  return {
142
144
  status: data.status ?? "",
@@ -152,8 +154,8 @@ class MemoryClient {
152
154
  * @returns DeleteResult with count of deleted memories.
153
155
  */
154
156
  async deleteSessionMemories(userId, sessionId) {
155
- const data = await this.request("DELETE", `/memory/session/${sessionId}`, {
156
- params: { user_id: userId },
157
+ const data = await this.request("POST", "/memory/session/delete", {
158
+ body: { user_id: userId, session_id: sessionId, config: this.config },
157
159
  });
158
160
  return {
159
161
  status: data.status ?? "",
@@ -266,8 +268,8 @@ class MemoryClient {
266
268
  * @returns RetrieveResult with matching memories across all sessions.
267
269
  */
268
270
  async listMemories(userId, query, topK = 10) {
269
- const data = await this.request("GET", "/memories", {
270
- params: { user_id: userId, query, top_k: topK },
271
+ const data = await this.request("POST", "/memories", {
272
+ body: { user_id: userId, query, top_k: topK, config: this.config },
271
273
  });
272
274
  const memories = (data.memories ?? []).map((m) => ({
273
275
  memory_id: m.memory_id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comemo",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Node.js SDK for CoMemo",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",