@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 +1 -2
- package/dist/index.d.mts +16 -19
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
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 {
|
|
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}
|
|
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 })));
|