@lumi0/sdk 0.0.2 → 0.0.3

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/README.md CHANGED
@@ -102,8 +102,7 @@ Deletes a memory for a user.
102
102
 
103
103
  ```ts
104
104
  await client.forget({
105
- id: "memory_123",
106
- userId: "user_123",
105
+ id: "memory_123"
107
106
  });
108
107
  ```
109
108
 
package/dist/index.d.mts CHANGED
@@ -1,27 +1,9 @@
1
- //#region ../../../apps/api/src/shared/utils/types.d.ts
2
- interface ForgetMemoryInput {
3
- userId: string;
4
- id: string;
5
- }
6
- //#endregion
7
1
  //#region src/types.d.ts
8
2
  type Lumi0Options = {
9
3
  apiKey: string;
10
4
  baseUrl?: string;
11
5
  timeout?: number;
12
6
  };
13
- //#endregion
14
- //#region src/client.d.ts
15
- declare class Lumi0 {
16
- private readonly http;
17
- constructor(option: Lumi0Options);
18
- store(input: StoreMemoryInput): Promise<unknown>;
19
- search(input: SearchMemoryInput): Promise<unknown>;
20
- get(input: GetMemoryInput): Promise<unknown>;
21
- forget(input: ForgetMemoryInput): Promise<unknown>;
22
- batch(input: StoreMemoryInput[]): Promise<unknown>;
23
- compress(input: CompressMemoryInput): Promise<CompressMemoryApiResponse>;
24
- }
25
7
  interface StoreMemoryInput {
26
8
  content: string;
27
9
  dedupeThreshold?: number;
@@ -59,5 +41,20 @@ interface CompressMemoryApiResponse {
59
41
  success: boolean;
60
42
  data: CompressMemoryResult;
61
43
  }
44
+ interface ForgetMemoryInput {
45
+ id: string;
46
+ }
47
+ //#endregion
48
+ //#region src/client.d.ts
49
+ declare class Lumi0 {
50
+ private readonly http;
51
+ constructor(option: Lumi0Options);
52
+ store(input: StoreMemoryInput): Promise<unknown>;
53
+ search(input: SearchMemoryInput): Promise<unknown>;
54
+ get(input: GetMemoryInput): Promise<unknown>;
55
+ forget(input: ForgetMemoryInput): Promise<unknown>;
56
+ batch(input: StoreMemoryInput[]): Promise<unknown>;
57
+ compress(input: CompressMemoryInput): Promise<CompressMemoryApiResponse>;
58
+ }
62
59
  //#endregion
63
- export { CompressMemoryApiResponse, CompressMemoryInput, CompressMemoryResult, GetMemoryInput, Lumi0, SearchMemoryInput, StoreMemoryInput };
60
+ export { Lumi0 };
package/dist/index.mjs CHANGED
@@ -99,7 +99,7 @@ var Lumi0 = class {
99
99
  return this.http.post("/memory/get", input);
100
100
  }
101
101
  forget(input) {
102
- return this.http.delete(`/memory/${input.id}`, { userId: input.userId });
102
+ return this.http.delete(`/memory/${input.id}`);
103
103
  }
104
104
  batch(input) {
105
105
  return this.http.post("/memory/batch", input.map((item) => ({ ...item })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumi0/sdk",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Official TypeScript SDK for Lumi0",
5
5
  "type": "module",
6
6
  "license": "MIT",