mem0ai 2.1.4 → 2.1.6

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.
package/dist/index.d.mts CHANGED
@@ -30,6 +30,11 @@ declare enum API_VERSION {
30
30
  V1 = "v1",
31
31
  V2 = "v2"
32
32
  }
33
+ declare enum Feedback {
34
+ POSITIVE = "POSITIVE",
35
+ NEGATIVE = "NEGATIVE",
36
+ NEUTRAL = "NEUTRAL"
37
+ }
33
38
  interface MultiModalMessages {
34
39
  type: "image_url";
35
40
  image_url: {
@@ -148,6 +153,11 @@ interface WebhookPayload {
148
153
  name: string;
149
154
  url: string;
150
155
  }
156
+ interface FeedbackPayload {
157
+ memory_id: string;
158
+ feedback?: Feedback | null;
159
+ feedback_reason?: string | null;
160
+ }
151
161
 
152
162
  interface ClientOptions {
153
163
  apiKey: string;
@@ -212,6 +222,9 @@ declare class MemoryClient {
212
222
  }): Promise<{
213
223
  message: string;
214
224
  }>;
225
+ feedback(data: FeedbackPayload): Promise<{
226
+ message: string;
227
+ }>;
215
228
  }
216
229
 
217
230
  interface TelemetryClient {
@@ -236,4 +249,4 @@ declare class BrowserTelemetry implements TelemetryClient {
236
249
  declare const telemetry: BrowserTelemetry;
237
250
  declare function captureClientEvent(eventName: string, instance: any, additionalData?: {}): Promise<void>;
238
251
 
239
- export { type AllUsers, type Memory, MemoryClient, type MemoryHistory, type MemoryOptions, type MemoryUpdateBody, type Message, type Messages, type ProjectOptions, type ProjectResponse, type PromptUpdatePayload, type SearchOptions, type TelemetryClient, type TelemetryInstance, type User, type Webhook, type WebhookPayload, captureClientEvent, MemoryClient as default, generateHash, telemetry };
252
+ export { type AllUsers, Feedback, type FeedbackPayload, type Memory, MemoryClient, type MemoryHistory, type MemoryOptions, type MemoryUpdateBody, type Message, type Messages, type ProjectOptions, type ProjectResponse, type PromptUpdatePayload, type SearchOptions, type TelemetryClient, type TelemetryInstance, type User, type Webhook, type WebhookPayload, captureClientEvent, MemoryClient as default, generateHash, telemetry };
package/dist/index.d.ts CHANGED
@@ -30,6 +30,11 @@ declare enum API_VERSION {
30
30
  V1 = "v1",
31
31
  V2 = "v2"
32
32
  }
33
+ declare enum Feedback {
34
+ POSITIVE = "POSITIVE",
35
+ NEGATIVE = "NEGATIVE",
36
+ NEUTRAL = "NEUTRAL"
37
+ }
33
38
  interface MultiModalMessages {
34
39
  type: "image_url";
35
40
  image_url: {
@@ -148,6 +153,11 @@ interface WebhookPayload {
148
153
  name: string;
149
154
  url: string;
150
155
  }
156
+ interface FeedbackPayload {
157
+ memory_id: string;
158
+ feedback?: Feedback | null;
159
+ feedback_reason?: string | null;
160
+ }
151
161
 
152
162
  interface ClientOptions {
153
163
  apiKey: string;
@@ -212,6 +222,9 @@ declare class MemoryClient {
212
222
  }): Promise<{
213
223
  message: string;
214
224
  }>;
225
+ feedback(data: FeedbackPayload): Promise<{
226
+ message: string;
227
+ }>;
215
228
  }
216
229
 
217
230
  interface TelemetryClient {
@@ -236,4 +249,4 @@ declare class BrowserTelemetry implements TelemetryClient {
236
249
  declare const telemetry: BrowserTelemetry;
237
250
  declare function captureClientEvent(eventName: string, instance: any, additionalData?: {}): Promise<void>;
238
251
 
239
- export { type AllUsers, type Memory, MemoryClient, type MemoryHistory, type MemoryOptions, type MemoryUpdateBody, type Message, type Messages, type ProjectOptions, type ProjectResponse, type PromptUpdatePayload, type SearchOptions, type TelemetryClient, type TelemetryInstance, type User, type Webhook, type WebhookPayload, captureClientEvent, MemoryClient as default, generateHash, telemetry };
252
+ export { type AllUsers, Feedback, type FeedbackPayload, type Memory, MemoryClient, type MemoryHistory, type MemoryOptions, type MemoryUpdateBody, type Message, type Messages, type ProjectOptions, type ProjectResponse, type PromptUpdatePayload, type SearchOptions, type TelemetryClient, type TelemetryInstance, type User, type Webhook, type WebhookPayload, captureClientEvent, MemoryClient as default, generateHash, telemetry };
package/dist/index.js CHANGED
@@ -4837,6 +4837,17 @@ var MemoryClient = class {
4837
4837
  );
4838
4838
  return response;
4839
4839
  }
4840
+ async feedback(data) {
4841
+ const response = await this._fetchWithErrorHandling(
4842
+ `${this.host}/v1/feedback/`,
4843
+ {
4844
+ method: "POST",
4845
+ headers: this.headers,
4846
+ body: JSON.stringify(data)
4847
+ }
4848
+ );
4849
+ return response;
4850
+ }
4840
4851
  };
4841
4852
 
4842
4853
  // src/client/index.ts