mem0ai 2.1.11 → 2.1.13

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
@@ -1,5 +1,3 @@
1
- import { PostHog } from 'posthog-js';
2
-
3
1
  interface MemoryOptions {
4
2
  api_version?: API_VERSION | string;
5
3
  version?: API_VERSION | string;
@@ -181,10 +179,11 @@ declare class MemoryClient {
181
179
  _validateOrgProject(): void;
182
180
  constructor(options: ClientOptions);
183
181
  private _initializeClient;
184
- wrapMethod(methodName: any, method: any): (...args: any) => Promise<any>;
182
+ private _captureEvent;
185
183
  _fetchWithErrorHandling(url: string, options: any): Promise<any>;
186
184
  _preparePayload(messages: string | Array<Message>, options: MemoryOptions): object;
187
185
  _prepareParams(options: MemoryOptions): object;
186
+ ping(): Promise<void>;
188
187
  add(messages: string | Array<Message>, options?: MemoryOptions): Promise<Array<Memory>>;
189
188
  update(memoryId: string, message: string): Promise<Array<Memory>>;
190
189
  get(memoryId: string): Promise<Memory>;
@@ -227,26 +226,4 @@ declare class MemoryClient {
227
226
  }>;
228
227
  }
229
228
 
230
- interface TelemetryClient {
231
- captureEvent(distinctId: string, eventName: string, properties?: Record<string, any>): Promise<void>;
232
- shutdown(): Promise<void>;
233
- }
234
- interface TelemetryInstance {
235
- telemetryId: string;
236
- constructor: {
237
- name: string;
238
- };
239
- }
240
-
241
- declare function generateHash(input: string): Promise<string>;
242
- declare class BrowserTelemetry implements TelemetryClient {
243
- client: PostHog | null;
244
- constructor(projectApiKey: string, host: string);
245
- private initializeClient;
246
- captureEvent(distinctId: string, eventName: string, properties?: {}): Promise<void>;
247
- shutdown(): Promise<void>;
248
- }
249
- declare const telemetry: BrowserTelemetry;
250
- declare function captureClientEvent(eventName: string, instance: any, additionalData?: {}): Promise<void>;
251
-
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 };
229
+ 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 User, type Webhook, type WebhookPayload, MemoryClient as default };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import { PostHog } from 'posthog-js';
2
-
3
1
  interface MemoryOptions {
4
2
  api_version?: API_VERSION | string;
5
3
  version?: API_VERSION | string;
@@ -181,10 +179,11 @@ declare class MemoryClient {
181
179
  _validateOrgProject(): void;
182
180
  constructor(options: ClientOptions);
183
181
  private _initializeClient;
184
- wrapMethod(methodName: any, method: any): (...args: any) => Promise<any>;
182
+ private _captureEvent;
185
183
  _fetchWithErrorHandling(url: string, options: any): Promise<any>;
186
184
  _preparePayload(messages: string | Array<Message>, options: MemoryOptions): object;
187
185
  _prepareParams(options: MemoryOptions): object;
186
+ ping(): Promise<void>;
188
187
  add(messages: string | Array<Message>, options?: MemoryOptions): Promise<Array<Memory>>;
189
188
  update(memoryId: string, message: string): Promise<Array<Memory>>;
190
189
  get(memoryId: string): Promise<Memory>;
@@ -227,26 +226,4 @@ declare class MemoryClient {
227
226
  }>;
228
227
  }
229
228
 
230
- interface TelemetryClient {
231
- captureEvent(distinctId: string, eventName: string, properties?: Record<string, any>): Promise<void>;
232
- shutdown(): Promise<void>;
233
- }
234
- interface TelemetryInstance {
235
- telemetryId: string;
236
- constructor: {
237
- name: string;
238
- };
239
- }
240
-
241
- declare function generateHash(input: string): Promise<string>;
242
- declare class BrowserTelemetry implements TelemetryClient {
243
- client: PostHog | null;
244
- constructor(projectApiKey: string, host: string);
245
- private initializeClient;
246
- captureEvent(distinctId: string, eventName: string, properties?: {}): Promise<void>;
247
- shutdown(): Promise<void>;
248
- }
249
- declare const telemetry: BrowserTelemetry;
250
- declare function captureClientEvent(eventName: string, instance: any, additionalData?: {}): Promise<void>;
251
-
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 };
229
+ 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 User, type Webhook, type WebhookPayload, MemoryClient as default };