@xyo-network/diviner-payload-generic 4.0.2 → 4.1.0
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.
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventListener } from '@xylabs/events';
|
|
2
|
+
import { Hex } from '@xylabs/hex';
|
|
3
|
+
import { ArchivistInstance, ArchivistModuleEventData } from '@xyo-network/archivist-model';
|
|
4
|
+
import { DivinerModuleEventData, DivinerInstance } from '@xyo-network/diviner-model';
|
|
5
|
+
import { PayloadDiviner } from '@xyo-network/diviner-payload-abstract';
|
|
6
|
+
import { PayloadDivinerConfig, PayloadDivinerParams, PayloadDivinerQueryPayload, Order } from '@xyo-network/diviner-payload-model';
|
|
7
|
+
import { WithStorageMeta, Payload, Schema } from '@xyo-network/payload-model';
|
|
8
|
+
|
|
9
|
+
declare const GenericPayloadDivinerConfigSchema: "network.xyo.diviner.payload.generic.config";
|
|
10
|
+
type GenericPayloadDivinerConfigSchema = typeof GenericPayloadDivinerConfigSchema;
|
|
11
|
+
type GenericPayloadDivinerConfig = PayloadDivinerConfig<{
|
|
12
|
+
indexes?: string[];
|
|
13
|
+
}, GenericPayloadDivinerConfigSchema>;
|
|
14
|
+
declare class GenericPayloadDiviner<TParams extends PayloadDivinerParams<GenericPayloadDivinerConfig> = PayloadDivinerParams<GenericPayloadDivinerConfig>, TIn extends PayloadDivinerQueryPayload = PayloadDivinerQueryPayload, TOut extends WithStorageMeta<Payload> = WithStorageMeta<Payload>, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends PayloadDiviner<TParams, TIn, TOut, TEventData> {
|
|
15
|
+
static readonly configSchemas: Schema[];
|
|
16
|
+
static readonly defaultConfigSchema: Schema;
|
|
17
|
+
protected indexMaps: Record<string, WithStorageMeta<TOut>[]>;
|
|
18
|
+
protected payloadsWithMeta: WithStorageMeta<TOut>[];
|
|
19
|
+
private _archivistInstance?;
|
|
20
|
+
private _cursor?;
|
|
21
|
+
private _updatePayloadPairsMutex;
|
|
22
|
+
protected get indexBatchSize(): number;
|
|
23
|
+
protected get indexes(): string[];
|
|
24
|
+
protected get maxIndexSize(): number;
|
|
25
|
+
protected all(order?: Order, cursor?: Hex): WithStorageMeta<TOut>[];
|
|
26
|
+
protected archivistInstance(): Promise<ArchivistInstance | undefined>;
|
|
27
|
+
protected archivistInstance(required: true): Promise<ArchivistInstance>;
|
|
28
|
+
protected clearIndex(): Promise<void>;
|
|
29
|
+
protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
|
|
30
|
+
protected onArchivistCleared: EventListener<ArchivistModuleEventData['cleared']>;
|
|
31
|
+
protected onArchivistDeleted: EventListener<ArchivistModuleEventData['deleted']>;
|
|
32
|
+
protected onArchivistInserted: EventListener<ArchivistModuleEventData['inserted']>;
|
|
33
|
+
protected stopHandler(_timeout?: number | undefined): Promise<void>;
|
|
34
|
+
protected updateIndex(): Promise<void>;
|
|
35
|
+
private indexPayloads;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { GenericPayloadDiviner, GenericPayloadDivinerConfigSchema };
|
|
39
|
+
export type { GenericPayloadDivinerConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-payload-generic",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -21,37 +21,37 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/neutral/index.d.ts",
|
|
25
25
|
"default": "./dist/neutral/index.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
|
-
"types": "dist/
|
|
30
|
+
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/array": "^4.
|
|
33
|
-
"@xylabs/assert": "^4.
|
|
34
|
-
"@xylabs/events": "^4.
|
|
35
|
-
"@xylabs/forget": "^4.
|
|
36
|
-
"@xylabs/hex": "^4.
|
|
37
|
-
"@xyo-network/archivist-model": "^4.0
|
|
38
|
-
"@xyo-network/diviner-model": "^4.0
|
|
39
|
-
"@xyo-network/diviner-payload-abstract": "^4.0
|
|
40
|
-
"@xyo-network/diviner-payload-model": "^4.0
|
|
41
|
-
"@xyo-network/module-model": "^4.0
|
|
42
|
-
"@xyo-network/payload-builder": "^4.0
|
|
43
|
-
"@xyo-network/payload-model": "^4.0
|
|
32
|
+
"@xylabs/array": "^4.13.15",
|
|
33
|
+
"@xylabs/assert": "^4.13.15",
|
|
34
|
+
"@xylabs/events": "^4.13.15",
|
|
35
|
+
"@xylabs/forget": "^4.13.15",
|
|
36
|
+
"@xylabs/hex": "^4.13.15",
|
|
37
|
+
"@xyo-network/archivist-model": "^4.1.0",
|
|
38
|
+
"@xyo-network/diviner-model": "^4.1.0",
|
|
39
|
+
"@xyo-network/diviner-payload-abstract": "^4.1.0",
|
|
40
|
+
"@xyo-network/diviner-payload-model": "^4.1.0",
|
|
41
|
+
"@xyo-network/module-model": "^4.1.0",
|
|
42
|
+
"@xyo-network/payload-builder": "^4.1.0",
|
|
43
|
+
"@xyo-network/payload-model": "^4.1.0",
|
|
44
44
|
"async-mutex": "^0.5.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@xylabs/delay": "^4.
|
|
48
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
49
|
-
"@xylabs/tsconfig": "^
|
|
50
|
-
"@xylabs/vitest-extended": "^4.
|
|
51
|
-
"@xyo-network/archivist-indexeddb": "^4.0
|
|
52
|
-
"@xyo-network/archivist-memory": "^4.0
|
|
53
|
-
"@xyo-network/node-memory": "^4.0
|
|
54
|
-
"@xyo-network/payload-builder": "^4.0
|
|
47
|
+
"@xylabs/delay": "^4.13.15",
|
|
48
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
|
|
49
|
+
"@xylabs/tsconfig": "^7.0.0-rc.20",
|
|
50
|
+
"@xylabs/vitest-extended": "^4.13.15",
|
|
51
|
+
"@xyo-network/archivist-indexeddb": "^4.1.0",
|
|
52
|
+
"@xyo-network/archivist-memory": "^4.1.0",
|
|
53
|
+
"@xyo-network/node-memory": "^4.1.0",
|
|
54
|
+
"@xyo-network/payload-builder": "^4.1.0",
|
|
55
55
|
"fake-indexeddb": "^6.0.1",
|
|
56
56
|
"typescript": "^5.8.3",
|
|
57
57
|
"vitest": "^3.2.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|