@ocap/statedb 1.18.33 → 1.18.35

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/lib/db.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ // Generate by [js2dts@0.3.3](https://github.com/whxaxes/js2dts#readme)
2
+
3
+ declare class Ready {
4
+ emit: any;
5
+ ready: any;
6
+ readyCallbacks: any;
7
+ readyMarks: any;
8
+ constructor();
9
+ markReady(mark?: any): void;
10
+ onReady(cb: any): void;
11
+ }
12
+ declare class StateDB extends Ready {
13
+ readyMarks: any;
14
+ readyListenersAttached: boolean;
15
+ constructor();
16
+ attachReadyListeners(): void;
17
+ }
18
+ declare const _Db: typeof StateDB;
19
+ export = _Db;
package/lib/table.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ type Promisable<T> = T | Promise<T>;
2
+
3
+ declare class Ready {
4
+ emit: any;
5
+ ready: any;
6
+ readyCallbacks: any;
7
+ readyMarks: any;
8
+ constructor();
9
+ markReady(mark?: any): void;
10
+ onReady(cb: any): void;
11
+ }
12
+ declare class StateDBTable extends Ready {
13
+ protected _create(id: string, attrs: any, context?: any): Promisable<any>;
14
+ protected _get(id: string, context?: any): Promisable<any>;
15
+ protected _update(id: string, updates: any, context?: any): Promisable<any>;
16
+ protected _history(id: string, context?: any): Promisable<any>;
17
+ protected _reset(context?: any): Promisable<void>;
18
+
19
+ public create(id: string, attrs: any, context?: any): Promisable<any>;
20
+ public get(id: string, context?: any): Promisable<any>;
21
+ public update(id: string, updates: any, context?: any): Promisable<any>;
22
+ public history(id: string, context?: any): Promisable<any>;
23
+ public updateOrCreate(id: string, attrs: any, context?: any): Promisable<any>;
24
+ public reset(context?: any): Promisable<void>;
25
+ }
26
+ declare const Table: typeof StateDBTable;
27
+ export = Table;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.18.33",
6
+ "version": "1.18.35",
7
7
  "description": "Defines the basic interface for OCAP StateDB",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -22,11 +22,11 @@
22
22
  "jest": "^27.5.1"
23
23
  },
24
24
  "dependencies": {
25
- "@arcblock/did": "1.18.33",
26
- "@ocap/state": "1.18.33",
27
- "@ocap/util": "1.18.33",
25
+ "@arcblock/did": "1.18.35",
26
+ "@ocap/state": "1.18.35",
27
+ "@ocap/util": "1.18.35",
28
28
  "kareem": "^2.4.1",
29
29
  "lodash": "^4.17.21"
30
30
  },
31
- "gitHead": "0d03089c6651d92a3451e9bbbc865c18c2f5d8ad"
31
+ "gitHead": "21178573bd44a1fb3a3a71f21bb8e81433322a69"
32
32
  }