@xyo-network/diviner-payload-indexeddb 4.1.2 → 4.1.4
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/browser/index.d.ts +5 -76
- package/package.json +18 -18
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,76 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
7
|
-
|
|
8
|
-
declare const IndexedDbPayloadDivinerConfigSchema: "network.xyo.diviner.payload.indexeddb.config";
|
|
9
|
-
type IndexedDbPayloadDivinerConfigSchema = typeof IndexedDbPayloadDivinerConfigSchema;
|
|
10
|
-
type IndexedDbPayloadDivinerConfig = DivinerConfig<{
|
|
11
|
-
/**
|
|
12
|
-
* The database name
|
|
13
|
-
*/
|
|
14
|
-
dbName?: string;
|
|
15
|
-
/**
|
|
16
|
-
* The version of the DB, defaults to 1
|
|
17
|
-
*/
|
|
18
|
-
dbVersion?: number;
|
|
19
|
-
schema: IndexedDbPayloadDivinerConfigSchema;
|
|
20
|
-
/**
|
|
21
|
-
* The storage configuration
|
|
22
|
-
* // TODO: Hoist to main diviner config
|
|
23
|
-
*/
|
|
24
|
-
storage?: {
|
|
25
|
-
/**
|
|
26
|
-
* The indexes to create on the object store
|
|
27
|
-
*/
|
|
28
|
-
indexes?: IndexDescription[];
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* The name of the object store
|
|
32
|
-
*/
|
|
33
|
-
storeName?: string;
|
|
34
|
-
}>;
|
|
35
|
-
|
|
36
|
-
type IndexedDbPayloadDivinerParams = DivinerParams<AnyConfigSchema<IndexedDbPayloadDivinerConfig>>;
|
|
37
|
-
|
|
38
|
-
declare class IndexedDbPayloadDiviner<TParams extends IndexedDbPayloadDivinerParams = IndexedDbPayloadDivinerParams, TIn extends PayloadDivinerQueryPayload = PayloadDivinerQueryPayload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends PayloadDiviner<TParams, TIn, TOut, TEventData> {
|
|
39
|
-
static readonly configSchemas: Schema[];
|
|
40
|
-
static readonly defaultConfigSchema: Schema;
|
|
41
|
-
/**
|
|
42
|
-
* The database name. If not supplied via config, it defaults
|
|
43
|
-
* to the archivist's name and if archivist's name is not supplied,
|
|
44
|
-
* it defaults to `archivist`. This behavior
|
|
45
|
-
* biases towards a single, isolated DB per archivist which seems to
|
|
46
|
-
* make the most sense for 99% of use cases.
|
|
47
|
-
*/
|
|
48
|
-
get dbName(): string;
|
|
49
|
-
/**
|
|
50
|
-
* The database version. If not supplied via config, it defaults to the archivist default version.
|
|
51
|
-
*/
|
|
52
|
-
get dbVersion(): number;
|
|
53
|
-
/**
|
|
54
|
-
* The name of the object store. If not supplied via config, it defaults
|
|
55
|
-
* to `payloads`.
|
|
56
|
-
*/
|
|
57
|
-
get storeName(): string;
|
|
58
|
-
protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Checks that the desired DB/objectStore exists and is initialized to the correct version
|
|
61
|
-
* @returns The initialized DB or undefined if it does not exist in the desired state
|
|
62
|
-
*/
|
|
63
|
-
private tryGetInitializedDb;
|
|
64
|
-
/**
|
|
65
|
-
* Executes a callback with the initialized DB and then closes the db
|
|
66
|
-
* @param callback The method to execute with the initialized DB
|
|
67
|
-
* @returns
|
|
68
|
-
*/
|
|
69
|
-
private tryUseDb;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
declare const IndexedDbPayloadDivinerSchema: "network.xyo.diviner.payload.indexeddb";
|
|
73
|
-
type IndexedDbPayloadDivinerSchema = typeof IndexedDbPayloadDivinerSchema;
|
|
74
|
-
|
|
75
|
-
export { IndexedDbPayloadDiviner, IndexedDbPayloadDivinerConfigSchema, IndexedDbPayloadDivinerSchema };
|
|
76
|
-
export type { IndexedDbPayloadDivinerConfig, IndexedDbPayloadDivinerParams };
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './Diviner.ts';
|
|
3
|
+
export * from './Params.ts';
|
|
4
|
+
export * from './Schema.ts';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-payload-indexeddb",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.4",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,26 +29,26 @@
|
|
|
29
29
|
"module": "dist/browser/index.mjs",
|
|
30
30
|
"types": "dist/browser/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/array": "^4.13.
|
|
33
|
-
"@xylabs/assert": "^4.13.
|
|
34
|
-
"@xylabs/exists": "^4.13.
|
|
35
|
-
"@xylabs/object": "^4.13.
|
|
36
|
-
"@xyo-network/archivist-indexeddb": "^4.1.
|
|
37
|
-
"@xyo-network/archivist-model": "^4.1.
|
|
38
|
-
"@xyo-network/diviner-model": "^4.1.
|
|
39
|
-
"@xyo-network/diviner-payload-abstract": "^4.1.
|
|
40
|
-
"@xyo-network/diviner-payload-model": "^4.1.
|
|
41
|
-
"@xyo-network/module-model": "^4.1.
|
|
42
|
-
"@xyo-network/payload-model": "^4.1.
|
|
32
|
+
"@xylabs/array": "^4.13.16",
|
|
33
|
+
"@xylabs/assert": "^4.13.16",
|
|
34
|
+
"@xylabs/exists": "^4.13.16",
|
|
35
|
+
"@xylabs/object": "^4.13.16",
|
|
36
|
+
"@xyo-network/archivist-indexeddb": "^4.1.4",
|
|
37
|
+
"@xyo-network/archivist-model": "^4.1.4",
|
|
38
|
+
"@xyo-network/diviner-model": "^4.1.4",
|
|
39
|
+
"@xyo-network/diviner-payload-abstract": "^4.1.4",
|
|
40
|
+
"@xyo-network/diviner-payload-model": "^4.1.4",
|
|
41
|
+
"@xyo-network/module-model": "^4.1.4",
|
|
42
|
+
"@xyo-network/payload-model": "^4.1.4",
|
|
43
43
|
"idb": "^8.0.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
47
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
48
|
-
"@xylabs/vitest-extended": "^4.13.
|
|
49
|
-
"@xyo-network/archivist-indexeddb": "^4.1.
|
|
50
|
-
"@xyo-network/node-memory": "^4.1.
|
|
51
|
-
"@xyo-network/payload-builder": "^4.1.
|
|
46
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
|
|
47
|
+
"@xylabs/tsconfig": "^7.0.0-rc.27",
|
|
48
|
+
"@xylabs/vitest-extended": "^4.13.16",
|
|
49
|
+
"@xyo-network/archivist-indexeddb": "^4.1.4",
|
|
50
|
+
"@xyo-network/node-memory": "^4.1.4",
|
|
51
|
+
"@xyo-network/payload-builder": "^4.1.4",
|
|
52
52
|
"fake-indexeddb": "^6.0.1",
|
|
53
53
|
"typescript": "^5.8.3",
|
|
54
54
|
"vitest": "^3.2.4"
|