@xyo-network/diviner-indexing-memory 4.1.1 → 4.1.3

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.
@@ -40,19 +40,19 @@ export declare class IndexingDiviner<TParams extends IndexingDivinerParams = Ind
40
40
  * @param store The store to retrieve the BoundWitness Diviner for
41
41
  * @returns The BoundWitness Diviner for the specified store
42
42
  */
43
- protected getBoundWitnessDivinerForStore(store: ConfigStore): 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<void, void>>>, DivinerModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("@xyo-network/module-model").ModuleParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/module-model").ModuleConfig<object, void>>>, import("@xyo-network/module-model").ModuleEventData<object>>, Payload, Payload>>, Payload, Payload>>;
43
+ protected getBoundWitnessDivinerForStore(store: ConfigStore): 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
  * Gets the Diviner for the supplied Indexing Diviner stage
46
46
  * @param transform The Indexing Diviner stage
47
47
  * @returns The diviner corresponding to the Indexing Diviner stage
48
48
  */
49
- protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<DivinerInstance<import("@xyo-network/diviner-model").DivinerParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/diviner-model").DivinerConfig<void, void>>>, Payload, Payload, DivinerModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("@xyo-network/module-model").ModuleParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/module-model").ModuleConfig<object, void>>>, import("@xyo-network/module-model").ModuleEventData<object>>, Payload, Payload>>>;
49
+ protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<DivinerInstance<import("@xyo-network/diviner-model").DivinerParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/diviner-model").DivinerConfig>>, Payload, Payload, DivinerModuleEventData>>;
50
50
  /**
51
51
  * Retrieves the Payload Diviner for the specified store
52
52
  * @param store The store to retrieve the Payload Diviner for
53
53
  * @returns The Payload Diviner for the specified store
54
54
  */
55
- protected getPayloadDivinerForStore(store: ConfigStore): 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<void, void>>>, DivinerModuleEventData<import("@xyo-network/module-model").ModuleInstance<import("@xyo-network/module-model").ModuleParams<import("@xyo-network/module-model").AnyConfigSchema<import("@xyo-network/module-model").ModuleConfig<object, void>>>, import("@xyo-network/module-model").ModuleEventData<object>>, Payload, Payload>>, Payload, Payload>>;
55
+ protected getPayloadDivinerForStore(store: ConfigStore): 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>>;
56
56
  /**
57
57
  * Retrieves the last state of the Diviner process. Used to recover state after
58
58
  * preemptions, reboots, etc.
@@ -1,74 +1,2 @@
1
- import * as _xyo_network_module_model from '@xyo-network/module-model';
2
- import { ModuleState } from '@xyo-network/module-model';
3
- import * as _xyo_network_diviner_model from '@xyo-network/diviner-model';
4
- import { DivinerModuleEventData, DivinerInstance } from '@xyo-network/diviner-model';
5
- import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
6
- import { AbstractDiviner } from '@xyo-network/diviner-abstract';
7
- import { IndexingDivinerConfig, IndexingDivinerParams, IndexingDivinerState, IndexingDivinerStage } from '@xyo-network/diviner-indexing-model';
8
- import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
9
- import { Payload, Schema } from '@xyo-network/payload-model';
10
-
11
- type ConfigStoreKey = 'indexStore' | 'stateStore';
12
- type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
13
- declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
14
- static readonly allowRandomAccount = true;
15
- static readonly configSchemas: Schema[];
16
- static readonly defaultConfigSchema: Schema;
17
- private _lastState?;
18
- private _pollId?;
19
- get payloadDivinerLimit(): number;
20
- get pollFrequency(): number;
21
- /**
22
- * Works via batched iteration of the source archivist to populate the index.
23
- * @returns A promise that resolves when the background process is complete
24
- */
25
- protected backgroundDivine: () => Promise<void>;
26
- /**
27
- * Commit the internal state of the Diviner process. This is similar
28
- * to a transaction completion in a database and should only be called
29
- * when results have been successfully persisted to the appropriate
30
- * external stores.
31
- * @param nextState The state to commit
32
- */
33
- protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
34
- protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
35
- /**
36
- * Retrieves the archivist for the specified store
37
- * @param store The store to retrieve the archivist for
38
- * @returns The archivist for the specified store
39
- */
40
- protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper>;
41
- /**
42
- * Retrieves the BoundWitness Diviner for the specified store
43
- * @param store The store to retrieve the BoundWitness Diviner for
44
- * @returns The BoundWitness Diviner for the specified store
45
- */
46
- protected getBoundWitnessDivinerForStore(store: ConfigStore): 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>>;
47
- /**
48
- * Gets the Diviner for the supplied Indexing Diviner stage
49
- * @param transform The Indexing Diviner stage
50
- * @returns The diviner corresponding to the Indexing Diviner stage
51
- */
52
- protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<DivinerInstance<_xyo_network_diviner_model.DivinerParams<_xyo_network_module_model.AnyConfigSchema<_xyo_network_diviner_model.DivinerConfig<void, void>>>, Payload, Payload, 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>>>;
53
- /**
54
- * Retrieves the Payload Diviner for the specified store
55
- * @param store The store to retrieve the Payload Diviner for
56
- * @returns The Payload Diviner for the specified store
57
- */
58
- protected getPayloadDivinerForStore(store: ConfigStore): 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>>;
59
- /**
60
- * Retrieves the last state of the Diviner process. Used to recover state after
61
- * preemptions, reboots, etc.
62
- */
63
- protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
64
- protected startHandler(): Promise<void>;
65
- protected stopHandler(_timeout?: number | undefined): Promise<void>;
66
- /**
67
- * Runs the background divine process on a loop with a delay
68
- * specified by the `config.pollFrequency`
69
- */
70
- private poll;
71
- }
72
-
73
- export { IndexingDiviner };
74
- export type { ConfigStore, ConfigStoreKey };
1
+ export * from './Diviner.ts';
2
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-indexing-memory",
3
- "version": "4.1.1",
3
+ "version": "4.1.3",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,25 +29,25 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/assert": "^4.13.15",
33
- "@xylabs/timer": "^4.13.15",
34
- "@xylabs/typeof": "^4.13.15",
35
- "@xyo-network/archivist-wrapper": "^4.1.1",
36
- "@xyo-network/boundwitness-builder": "^4.1.1",
37
- "@xyo-network/boundwitness-model": "^4.1.1",
38
- "@xyo-network/diviner-abstract": "^4.1.1",
39
- "@xyo-network/diviner-boundwitness-model": "^4.1.1",
40
- "@xyo-network/diviner-indexing-model": "^4.1.1",
41
- "@xyo-network/diviner-model": "^4.1.1",
42
- "@xyo-network/diviner-wrapper": "^4.1.1",
43
- "@xyo-network/module-model": "^4.1.1",
44
- "@xyo-network/payload-builder": "^4.1.1",
45
- "@xyo-network/payload-model": "^4.1.1"
32
+ "@xylabs/assert": "^4.13.16",
33
+ "@xylabs/timer": "^4.13.16",
34
+ "@xylabs/typeof": "^4.13.16",
35
+ "@xyo-network/archivist-wrapper": "^4.1.3",
36
+ "@xyo-network/boundwitness-builder": "^4.1.3",
37
+ "@xyo-network/boundwitness-model": "^4.1.3",
38
+ "@xyo-network/diviner-abstract": "^4.1.3",
39
+ "@xyo-network/diviner-boundwitness-model": "^4.1.3",
40
+ "@xyo-network/diviner-indexing-model": "^4.1.3",
41
+ "@xyo-network/diviner-model": "^4.1.3",
42
+ "@xyo-network/diviner-wrapper": "^4.1.3",
43
+ "@xyo-network/module-model": "^4.1.3",
44
+ "@xyo-network/payload-builder": "^4.1.3",
45
+ "@xyo-network/payload-model": "^4.1.3"
46
46
  },
47
47
  "devDependencies": {
48
- "@xylabs/hex": "^4.13.15",
49
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.23",
50
- "@xylabs/tsconfig": "^7.0.0-rc.23",
48
+ "@xylabs/hex": "^4.13.16",
49
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
50
+ "@xylabs/tsconfig": "^7.0.0-rc.27",
51
51
  "typescript": "^5.8.3"
52
52
  },
53
53
  "publishConfig": {