@xyo-network/diviner-stateful 3.5.2 → 3.6.0-rc.10
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 +139 -39
- package/dist/neutral/Diviner.d.ts.map +1 -1
- package/dist/neutral/DivinerMixin.d.ts +917 -162
- package/dist/neutral/DivinerMixin.d.ts.map +1 -1
- package/dist/neutral/index.mjs +8 -4
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +28 -26
- package/src/Diviner.ts +10 -8
- package/src/DivinerMixin.ts +8 -7
|
@@ -3,7 +3,7 @@ import { AbstractDiviner } from '@xyo-network/diviner-abstract';
|
|
|
3
3
|
import type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/diviner-model';
|
|
4
4
|
import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
|
|
5
5
|
import type { ModuleState, StateDictionary } from '@xyo-network/module-model';
|
|
6
|
-
import type
|
|
6
|
+
import { type Payload, type Schema } from '@xyo-network/payload-model';
|
|
7
7
|
import type { StatefulDivinerParams } from './Params.ts';
|
|
8
8
|
/**
|
|
9
9
|
* A Diviner that maintains state
|
|
@@ -14,7 +14,7 @@ export declare abstract class StatefulDiviner<TParams extends StatefulDivinerPar
|
|
|
14
14
|
/**
|
|
15
15
|
* The last state
|
|
16
16
|
*/
|
|
17
|
-
protected _lastState?:
|
|
17
|
+
protected _lastState?: ModuleState<TState>;
|
|
18
18
|
/**
|
|
19
19
|
* Commit the internal state of the Diviner process. This is similar
|
|
20
20
|
* to a transaction completion in a database and should only be called
|
|
@@ -22,7 +22,7 @@ export declare abstract class StatefulDiviner<TParams extends StatefulDivinerPar
|
|
|
22
22
|
* external stores.
|
|
23
23
|
* @param nextState The state to commit
|
|
24
24
|
*/
|
|
25
|
-
protected commitState(nextState:
|
|
25
|
+
protected commitState(nextState: ModuleState<TState>): Promise<void>;
|
|
26
26
|
/**
|
|
27
27
|
* Retrieves the archivist for the specified store
|
|
28
28
|
* @param store The store to retrieve the archivist for
|
|
@@ -33,17 +33,59 @@ export declare abstract class StatefulDiviner<TParams extends StatefulDivinerPar
|
|
|
33
33
|
addToResolvers?: boolean;
|
|
34
34
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
35
35
|
allowNameResolution?: boolean;
|
|
36
|
-
config: import("@
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
config: import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
37
|
+
schema: Schema;
|
|
38
|
+
readonly archiving?: {
|
|
39
|
+
readonly archivists?: string[] | undefined;
|
|
40
|
+
readonly queries?: string[] | undefined;
|
|
41
|
+
} | undefined;
|
|
42
|
+
readonly allowedQueries?: string[] | undefined;
|
|
43
|
+
readonly archivist?: import("@xyo-network/module-model").ModuleIdentifier | undefined;
|
|
44
|
+
readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
|
|
45
|
+
readonly labels?: {
|
|
46
|
+
[x: string]: string | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
readonly name?: import("@xyo-network/module-model").ModuleName | undefined;
|
|
49
|
+
readonly paging?: {
|
|
50
|
+
[x: string]: {
|
|
51
|
+
size?: number | undefined;
|
|
52
|
+
};
|
|
53
|
+
} | undefined;
|
|
54
|
+
readonly retry?: {
|
|
55
|
+
backoff?: number | undefined;
|
|
56
|
+
interval?: number | undefined;
|
|
57
|
+
retries?: number | undefined;
|
|
58
|
+
} | undefined;
|
|
59
|
+
readonly security?: {
|
|
60
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
61
|
+
readonly allowed?: {
|
|
62
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
63
|
+
} | undefined;
|
|
64
|
+
readonly disallowed?: {
|
|
65
|
+
[x: string]: Lowercase<string>[];
|
|
66
|
+
} | undefined;
|
|
67
|
+
} | undefined;
|
|
68
|
+
readonly sign?: boolean | undefined;
|
|
69
|
+
readonly storeQueries?: boolean | undefined;
|
|
70
|
+
readonly timestamp?: boolean | undefined;
|
|
71
|
+
parents?: {
|
|
72
|
+
commit?: Lowercase<string>[] | undefined;
|
|
73
|
+
read?: Lowercase<string>[] | undefined;
|
|
74
|
+
write?: Lowercase<string>[] | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
requireAllParents?: boolean | undefined;
|
|
77
|
+
storage?: {
|
|
78
|
+
indexes?: {
|
|
79
|
+
key: {
|
|
80
|
+
[x: string]: import("@xyo-network/archivist-model").IndexDirection;
|
|
81
|
+
};
|
|
82
|
+
multiEntry?: boolean | undefined;
|
|
83
|
+
name?: string | undefined;
|
|
84
|
+
unique?: boolean | undefined;
|
|
85
|
+
}[] | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
storeParentReads?: boolean | undefined;
|
|
88
|
+
}>;
|
|
47
89
|
ephemeralQueryAccountEnabled?: boolean;
|
|
48
90
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
49
91
|
}, import("@xyo-network/archivist-model").ArchivistModuleEventData>>>;
|
|
@@ -57,20 +99,49 @@ export declare abstract class StatefulDiviner<TParams extends StatefulDivinerPar
|
|
|
57
99
|
addToResolvers?: boolean;
|
|
58
100
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
59
101
|
allowNameResolution?: boolean;
|
|
60
|
-
config: import("@
|
|
61
|
-
schema:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
102
|
+
config: import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
103
|
+
schema: Schema;
|
|
104
|
+
readonly archiving?: {
|
|
105
|
+
readonly archivists?: string[] | undefined;
|
|
106
|
+
readonly queries?: string[] | undefined;
|
|
107
|
+
} | undefined;
|
|
108
|
+
readonly allowedQueries?: string[] | undefined;
|
|
109
|
+
readonly archivist?: import("@xyo-network/module-model").ModuleIdentifier | undefined;
|
|
110
|
+
readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
|
|
111
|
+
readonly labels?: {
|
|
112
|
+
[x: string]: string | undefined;
|
|
113
|
+
} | undefined;
|
|
114
|
+
readonly name?: import("@xyo-network/module-model").ModuleName | undefined;
|
|
115
|
+
readonly paging?: {
|
|
116
|
+
[x: string]: {
|
|
117
|
+
size?: number | undefined;
|
|
118
|
+
};
|
|
119
|
+
} | undefined;
|
|
120
|
+
readonly retry?: {
|
|
121
|
+
backoff?: number | undefined;
|
|
122
|
+
interval?: number | undefined;
|
|
123
|
+
retries?: number | undefined;
|
|
124
|
+
} | undefined;
|
|
125
|
+
readonly security?: {
|
|
126
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
127
|
+
readonly allowed?: {
|
|
128
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
129
|
+
} | undefined;
|
|
130
|
+
readonly disallowed?: {
|
|
131
|
+
[x: string]: Lowercase<string>[];
|
|
132
|
+
} | undefined;
|
|
133
|
+
} | undefined;
|
|
134
|
+
readonly sign?: boolean | undefined;
|
|
135
|
+
readonly storeQueries?: boolean | undefined;
|
|
136
|
+
readonly timestamp?: boolean | undefined;
|
|
137
|
+
}>;
|
|
67
138
|
ephemeralQueryAccountEnabled?: boolean;
|
|
68
139
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
69
|
-
}, DivinerModuleEventData>, {
|
|
70
|
-
schema:
|
|
71
|
-
}
|
|
72
|
-
schema:
|
|
73
|
-
}
|
|
140
|
+
}, DivinerModuleEventData>, import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
141
|
+
schema: Schema;
|
|
142
|
+
}>, import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
143
|
+
schema: Schema;
|
|
144
|
+
}>>>;
|
|
74
145
|
/**
|
|
75
146
|
* Retrieves the Payload Diviner for the specified store
|
|
76
147
|
* @param store The store to retrieve the Payload Diviner for
|
|
@@ -81,24 +152,53 @@ export declare abstract class StatefulDiviner<TParams extends StatefulDivinerPar
|
|
|
81
152
|
addToResolvers?: boolean;
|
|
82
153
|
additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
|
|
83
154
|
allowNameResolution?: boolean;
|
|
84
|
-
config: import("@
|
|
85
|
-
schema:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
155
|
+
config: import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
156
|
+
schema: Schema;
|
|
157
|
+
readonly archiving?: {
|
|
158
|
+
readonly archivists?: string[] | undefined;
|
|
159
|
+
readonly queries?: string[] | undefined;
|
|
160
|
+
} | undefined;
|
|
161
|
+
readonly allowedQueries?: string[] | undefined;
|
|
162
|
+
readonly archivist?: import("@xyo-network/module-model").ModuleIdentifier | undefined;
|
|
163
|
+
readonly consoleLogger?: import("@xylabs/logger").LogLevel | undefined;
|
|
164
|
+
readonly labels?: {
|
|
165
|
+
[x: string]: string | undefined;
|
|
166
|
+
} | undefined;
|
|
167
|
+
readonly name?: import("@xyo-network/module-model").ModuleName | undefined;
|
|
168
|
+
readonly paging?: {
|
|
169
|
+
[x: string]: {
|
|
170
|
+
size?: number | undefined;
|
|
171
|
+
};
|
|
172
|
+
} | undefined;
|
|
173
|
+
readonly retry?: {
|
|
174
|
+
backoff?: number | undefined;
|
|
175
|
+
interval?: number | undefined;
|
|
176
|
+
retries?: number | undefined;
|
|
177
|
+
} | undefined;
|
|
178
|
+
readonly security?: {
|
|
179
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
180
|
+
readonly allowed?: {
|
|
181
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
182
|
+
} | undefined;
|
|
183
|
+
readonly disallowed?: {
|
|
184
|
+
[x: string]: Lowercase<string>[];
|
|
185
|
+
} | undefined;
|
|
186
|
+
} | undefined;
|
|
187
|
+
readonly sign?: boolean | undefined;
|
|
188
|
+
readonly storeQueries?: boolean | undefined;
|
|
189
|
+
readonly timestamp?: boolean | undefined;
|
|
190
|
+
}>;
|
|
91
191
|
ephemeralQueryAccountEnabled?: boolean;
|
|
92
192
|
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
93
|
-
}, DivinerModuleEventData>, {
|
|
94
|
-
schema:
|
|
95
|
-
}
|
|
96
|
-
schema:
|
|
97
|
-
}
|
|
193
|
+
}, DivinerModuleEventData>, import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
194
|
+
schema: Schema;
|
|
195
|
+
}>, import("@xylabs/object").DeepRestrictToStringKeys<{
|
|
196
|
+
schema: Schema;
|
|
197
|
+
}>>>;
|
|
98
198
|
/**
|
|
99
199
|
* Retrieves the last state of the Diviner process. Used to recover state after
|
|
100
200
|
* preemptions, reboots, etc.
|
|
101
201
|
*/
|
|
102
|
-
protected retrieveState(): Promise<
|
|
202
|
+
protected retrieveState(): Promise<ModuleState<TState> | undefined>;
|
|
103
203
|
}
|
|
104
204
|
//# sourceMappingURL=Diviner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAGjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAG/D,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG7E,OAAO,EACL,KAAK,OAAO,EAAE,KAAK,MAAM,EAE1B,MAAM,4BAA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