holosphere 1.1.0 → 1.1.2
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/holosphere.d.ts +43 -48
- package/holosphere.js +459 -269
- package/package.json +4 -2
- package/test/holosphere.test.js +295 -107
package/holosphere.d.ts
CHANGED
|
@@ -1,48 +1,43 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// Subscription
|
|
45
|
-
subscribe(holon: string, lens: string, callback: (data: any, key: string) => void): void;
|
|
46
|
-
subscribeGlobal(tableName: string, callback: (data: any, key: string) => void): void;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
declare class HoloSphere {
|
|
2
|
+
private appname;
|
|
3
|
+
private strict;
|
|
4
|
+
private validator;
|
|
5
|
+
private gun;
|
|
6
|
+
private openai?;
|
|
7
|
+
/**
|
|
8
|
+
* Initializes a new instance of the HoloSphere class.
|
|
9
|
+
* @param {string} appname - The name of the application.
|
|
10
|
+
* @param {boolean} strict - Whether to enforce strict schema validation.
|
|
11
|
+
* @param {string|null} openaikey - The OpenAI API key.
|
|
12
|
+
*/
|
|
13
|
+
constructor(appname: string, strict?: boolean, openaikey?: string | null);
|
|
14
|
+
setSchema(lens: string, schema: object): Promise<boolean>;
|
|
15
|
+
getSchema(lens: string): Promise<object | null>;
|
|
16
|
+
put(holon: string, lens: string, data: object): Promise<boolean>;
|
|
17
|
+
get(holon: string, lens: string, key: string): Promise<any | null>;
|
|
18
|
+
getAll(holon: string, lens: string): Promise<Array<any>>;
|
|
19
|
+
delete(holon: string, lens: string, key: string): Promise<void>;
|
|
20
|
+
deleteAll(holon: string, lens: string): Promise<boolean>;
|
|
21
|
+
putNode(holon: string, lens: string, node: object): Promise<boolean>;
|
|
22
|
+
getNode(holon: string, lens: string, key: string): Promise<any | null>;
|
|
23
|
+
deleteNode(holon: string, lens: string, key: string): Promise<boolean>;
|
|
24
|
+
putGlobal(tableName: string, data: object): Promise<void>;
|
|
25
|
+
getGlobal(tableName: string, key: string): Promise<object | null>;
|
|
26
|
+
getAllGlobal(tableName: string): Promise<object | null>;
|
|
27
|
+
deleteGlobal(tableName: string, key: string): Promise<void>;
|
|
28
|
+
deleteAllGlobal(tableName: string): Promise<void>;
|
|
29
|
+
getHolon(lat: number, lng: number, resolution: number): Promise<string>;
|
|
30
|
+
getScalespace(lat: number, lng: number): string[];
|
|
31
|
+
getHolonScalespace(holon: string): string[];
|
|
32
|
+
compute(holon: string, lens: string, operation: string): Promise<void>;
|
|
33
|
+
private parse;
|
|
34
|
+
subscribe(holon: string, lens: string, callback: (data: any, key: string) => void): void;
|
|
35
|
+
subscribeGlobal(tableName: string, callback: (data: any, key: string) => void): void;
|
|
36
|
+
/**
|
|
37
|
+
* Summarizes provided history text using OpenAI.
|
|
38
|
+
* @param {string} history - The history text to summarize.
|
|
39
|
+
* @returns {Promise<string>} - The summarized text.
|
|
40
|
+
*/
|
|
41
|
+
private summarize;
|
|
42
|
+
}
|
|
43
|
+
export default HoloSphere;
|