@xyo-network/diviner-stateful 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/neutral/Diviner.d.ts +3 -3
- package/dist/neutral/index.d.ts +6 -86
- package/package.json +27 -27
|
@@ -28,19 +28,19 @@ export declare abstract class StatefulDiviner<TParams extends StatefulDivinerPar
|
|
|
28
28
|
* @param store The store to retrieve the archivist for
|
|
29
29
|
* @returns The archivist for the specified store
|
|
30
30
|
*/
|
|
31
|
-
protected getArchivistForStateStore(): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModuleInstance<import("@xyo-network/module-model").ModuleParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/archivist-model").ArchivistConfig
|
|
31
|
+
protected getArchivistForStateStore(): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModuleInstance<import("@xyo-network/module-model").ModuleParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/archivist-model").ArchivistConfig>>, import("@xyo-network/archivist-model").ArchivistModuleEventData>>>;
|
|
32
32
|
/**
|
|
33
33
|
* Retrieves the BoundWitness Diviner for the specified store
|
|
34
34
|
* @param store The store to retrieve the BoundWitness Diviner for
|
|
35
35
|
* @returns The BoundWitness Diviner for the specified store
|
|
36
36
|
*/
|
|
37
|
-
protected getBoundWitnessDivinerForStateStore(): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xyo-network/diviner-model").DivinerParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/diviner-model").DivinerConfig
|
|
37
|
+
protected getBoundWitnessDivinerForStateStore(): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xyo-network/diviner-model").DivinerParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/diviner-model").DivinerConfig>>, DivinerModuleEventData>, Payload, Payload>>;
|
|
38
38
|
/**
|
|
39
39
|
* Retrieves the Payload Diviner for the specified store
|
|
40
40
|
* @param store The store to retrieve the Payload Diviner for
|
|
41
41
|
* @returns The Payload Diviner for the specified store
|
|
42
42
|
*/
|
|
43
|
-
protected getPayloadDivinerForStateStore(): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xyo-network/diviner-model").DivinerParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/diviner-model").DivinerConfig
|
|
43
|
+
protected getPayloadDivinerForStateStore(): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xyo-network/diviner-model").DivinerParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/diviner-model").DivinerConfig>>, DivinerModuleEventData>, Payload, Payload>>;
|
|
44
44
|
/**
|
|
45
45
|
* Retrieves the last state of the Diviner process. Used to recover state after
|
|
46
46
|
* preemptions, reboots, etc.
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,86 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
8
|
-
import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
|
|
9
|
-
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* The schema for a Stateful Diviner config
|
|
13
|
-
*/
|
|
14
|
-
declare const StatefulDivinerConfigSchema: "network.xyo.diviner.stateful.config";
|
|
15
|
-
/**
|
|
16
|
-
* The schema for a Stateful Diviner config
|
|
17
|
-
*/
|
|
18
|
-
type StatefulDivinerConfigSchema = typeof StatefulDivinerConfigSchema;
|
|
19
|
-
/**
|
|
20
|
-
* The config for a Stateful Diviner
|
|
21
|
-
*/
|
|
22
|
-
type StatefulDivinerConfig = DivinerConfig<{
|
|
23
|
-
schema: StatefulDivinerConfigSchema;
|
|
24
|
-
stateStore: {
|
|
25
|
-
archivist: ModuleIdentifier;
|
|
26
|
-
boundWitnessDiviner: ModuleIdentifier;
|
|
27
|
-
payloadDiviner: ModuleIdentifier;
|
|
28
|
-
};
|
|
29
|
-
}>;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The parameters for a Stateful Diviner
|
|
33
|
-
*/
|
|
34
|
-
type StatefulDivinerParams = DivinerParams<AnyConfigSchema<StatefulDivinerConfig>>;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* A Diviner that maintains state
|
|
38
|
-
*/
|
|
39
|
-
declare abstract class StatefulDiviner<TParams extends StatefulDivinerParams = StatefulDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>, TState extends StateDictionary = StateDictionary> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
|
|
40
|
-
static readonly configSchemas: Schema[];
|
|
41
|
-
static readonly defaultConfigSchema: Schema;
|
|
42
|
-
/**
|
|
43
|
-
* The last state
|
|
44
|
-
*/
|
|
45
|
-
protected _lastState?: ModuleState<TState>;
|
|
46
|
-
/**
|
|
47
|
-
* Commit the internal state of the Diviner process. This is similar
|
|
48
|
-
* to a transaction completion in a database and should only be called
|
|
49
|
-
* when results have been successfully persisted to the appropriate
|
|
50
|
-
* external stores.
|
|
51
|
-
* @param nextState The state to commit
|
|
52
|
-
*/
|
|
53
|
-
protected commitState(nextState: ModuleState<TState>): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Retrieves the archivist for the specified store
|
|
56
|
-
* @param store The store to retrieve the archivist for
|
|
57
|
-
* @returns The archivist for the specified store
|
|
58
|
-
*/
|
|
59
|
-
protected getArchivistForStateStore(): Promise<ArchivistWrapper<_xyo_network_archivist_model.ArchivistModuleInstance<_xyo_network_module_model.ModuleParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_archivist_model.ArchivistConfig<void, void>>>, _xyo_network_archivist_model.ArchivistModuleEventData>>>;
|
|
60
|
-
/**
|
|
61
|
-
* Retrieves the BoundWitness Diviner for the specified store
|
|
62
|
-
* @param store The store to retrieve the BoundWitness Diviner for
|
|
63
|
-
* @returns The BoundWitness Diviner for the specified store
|
|
64
|
-
*/
|
|
65
|
-
protected getBoundWitnessDivinerForStateStore(): Promise<DivinerWrapper<_xyo_network_diviner_model.DivinerModule<_xyo_network_diviner_model.DivinerParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_diviner_model.DivinerConfig<void, void>>>, DivinerModuleEventData<_xyo_network_module_model.ModuleInstance<_xyo_network_module_model.ModuleParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_module_model.ModuleConfig<object, void>>>, _xyo_network_module_model.ModuleEventData<object>>, Payload, Payload>>, Payload, Payload>>;
|
|
66
|
-
/**
|
|
67
|
-
* Retrieves the Payload Diviner for the specified store
|
|
68
|
-
* @param store The store to retrieve the Payload Diviner for
|
|
69
|
-
* @returns The Payload Diviner for the specified store
|
|
70
|
-
*/
|
|
71
|
-
protected getPayloadDivinerForStateStore(): Promise<DivinerWrapper<_xyo_network_diviner_model.DivinerModule<_xyo_network_diviner_model.DivinerParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_diviner_model.DivinerConfig<void, void>>>, DivinerModuleEventData<_xyo_network_module_model.ModuleInstance<_xyo_network_module_model.ModuleParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_module_model.ModuleConfig<object, void>>>, _xyo_network_module_model.ModuleEventData<object>>, Payload, Payload>>, Payload, Payload>>;
|
|
72
|
-
/**
|
|
73
|
-
* Retrieves the last state of the Diviner process. Used to recover state after
|
|
74
|
-
* preemptions, reboots, etc.
|
|
75
|
-
*/
|
|
76
|
-
protected retrieveState(): Promise<ModuleState<TState> | undefined>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
type StatefulModuleParams = ModuleParams<AnyConfigSchema<StatefulDivinerConfig>>;
|
|
80
|
-
type AnyModule<TParams extends StatefulModuleParams = StatefulModuleParams> = new (...args: any[]) => ModuleInstance<TParams>;
|
|
81
|
-
|
|
82
|
-
declare const StatefulDivinerSchema: "network.xyo.diviner.stateful";
|
|
83
|
-
type StatefulDivinerSchema = typeof StatefulDivinerSchema;
|
|
84
|
-
|
|
85
|
-
export { StatefulDiviner, StatefulDivinerConfigSchema, StatefulDivinerSchema };
|
|
86
|
-
export type { AnyModule, StatefulDivinerConfig, StatefulDivinerParams, StatefulModuleParams };
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './Diviner.ts';
|
|
3
|
+
export * from './DivinerMixin.ts';
|
|
4
|
+
export * from './Params.ts';
|
|
5
|
+
export * from './Schema.ts';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-stateful",
|
|
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,34 +29,34 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/assert": "^4.13.
|
|
33
|
-
"@xylabs/object": "^4.13.
|
|
34
|
-
"@xyo-network/archivist-model": "^4.1.
|
|
35
|
-
"@xyo-network/archivist-wrapper": "^4.1.
|
|
36
|
-
"@xyo-network/boundwitness-builder": "^4.1.
|
|
37
|
-
"@xyo-network/boundwitness-model": "^4.1.
|
|
38
|
-
"@xyo-network/diviner-abstract": "^4.1.
|
|
39
|
-
"@xyo-network/diviner-boundwitness-model": "^4.1.
|
|
40
|
-
"@xyo-network/diviner-model": "^4.1.
|
|
41
|
-
"@xyo-network/diviner-wrapper": "^4.1.
|
|
42
|
-
"@xyo-network/module-model": "^4.1.
|
|
43
|
-
"@xyo-network/payload-builder": "^4.1.
|
|
44
|
-
"@xyo-network/payload-model": "^4.1.
|
|
32
|
+
"@xylabs/assert": "^4.13.16",
|
|
33
|
+
"@xylabs/object": "^4.13.16",
|
|
34
|
+
"@xyo-network/archivist-model": "^4.1.4",
|
|
35
|
+
"@xyo-network/archivist-wrapper": "^4.1.4",
|
|
36
|
+
"@xyo-network/boundwitness-builder": "^4.1.4",
|
|
37
|
+
"@xyo-network/boundwitness-model": "^4.1.4",
|
|
38
|
+
"@xyo-network/diviner-abstract": "^4.1.4",
|
|
39
|
+
"@xyo-network/diviner-boundwitness-model": "^4.1.4",
|
|
40
|
+
"@xyo-network/diviner-model": "^4.1.4",
|
|
41
|
+
"@xyo-network/diviner-wrapper": "^4.1.4",
|
|
42
|
+
"@xyo-network/module-model": "^4.1.4",
|
|
43
|
+
"@xyo-network/payload-builder": "^4.1.4",
|
|
44
|
+
"@xyo-network/payload-model": "^4.1.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@xylabs/hex": "^4.13.
|
|
48
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
49
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
50
|
-
"@xylabs/vitest-extended": "^4.13.
|
|
51
|
-
"@xyo-network/account": "^4.1.
|
|
52
|
-
"@xyo-network/archivist-memory": "^4.1.
|
|
53
|
-
"@xyo-network/diviner-boundwitness-memory": "^4.1.
|
|
54
|
-
"@xyo-network/diviner-payload-generic": "^4.1.
|
|
55
|
-
"@xyo-network/diviner-payload-memory": "^4.1.
|
|
56
|
-
"@xyo-network/manifest": "^4.1.
|
|
57
|
-
"@xyo-network/module-factory-locator": "^4.1.
|
|
58
|
-
"@xyo-network/node-memory": "^4.1.
|
|
59
|
-
"@xyo-network/wallet": "^4.1.
|
|
47
|
+
"@xylabs/hex": "^4.13.16",
|
|
48
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
|
|
49
|
+
"@xylabs/tsconfig": "^7.0.0-rc.27",
|
|
50
|
+
"@xylabs/vitest-extended": "^4.13.16",
|
|
51
|
+
"@xyo-network/account": "^4.1.4",
|
|
52
|
+
"@xyo-network/archivist-memory": "^4.1.4",
|
|
53
|
+
"@xyo-network/diviner-boundwitness-memory": "^4.1.4",
|
|
54
|
+
"@xyo-network/diviner-payload-generic": "^4.1.4",
|
|
55
|
+
"@xyo-network/diviner-payload-memory": "^4.1.4",
|
|
56
|
+
"@xyo-network/manifest": "^4.1.4",
|
|
57
|
+
"@xyo-network/module-factory-locator": "^4.1.4",
|
|
58
|
+
"@xyo-network/node-memory": "^4.1.4",
|
|
59
|
+
"@xyo-network/wallet": "^4.1.4",
|
|
60
60
|
"typescript": "^5.8.3",
|
|
61
61
|
"vitest": "^3.2.4"
|
|
62
62
|
},
|