@xyo-network/diviner-indexing 2.79.5 → 2.79.6

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.
Files changed (126) hide show
  1. package/dist/browser/index.cjs +3 -200
  2. package/dist/browser/index.cjs.map +1 -1
  3. package/dist/browser/index.d.cts +2 -7
  4. package/dist/browser/index.d.cts.map +1 -1
  5. package/dist/browser/index.d.mts +2 -7
  6. package/dist/browser/index.d.mts.map +1 -1
  7. package/dist/browser/index.d.ts +2 -7
  8. package/dist/browser/index.d.ts.map +1 -1
  9. package/dist/browser/index.js +3 -195
  10. package/dist/browser/index.js.map +1 -1
  11. package/dist/node/index.d.cts +2 -7
  12. package/dist/node/index.d.cts.map +1 -1
  13. package/dist/node/index.d.mts +2 -7
  14. package/dist/node/index.d.mts.map +1 -1
  15. package/dist/node/index.d.ts +2 -7
  16. package/dist/node/index.d.ts.map +1 -1
  17. package/dist/node/index.js +5 -212
  18. package/dist/node/index.js.map +1 -1
  19. package/dist/node/index.mjs +3 -203
  20. package/dist/node/index.mjs.map +1 -1
  21. package/package.json +3 -12
  22. package/src/index.ts +2 -7
  23. package/dist/browser/Config.d.cts +0 -32
  24. package/dist/browser/Config.d.cts.map +0 -1
  25. package/dist/browser/Config.d.mts +0 -32
  26. package/dist/browser/Config.d.mts.map +0 -1
  27. package/dist/browser/Config.d.ts +0 -32
  28. package/dist/browser/Config.d.ts.map +0 -1
  29. package/dist/browser/Diviner.d.cts +0 -71
  30. package/dist/browser/Diviner.d.cts.map +0 -1
  31. package/dist/browser/Diviner.d.mts +0 -71
  32. package/dist/browser/Diviner.d.mts.map +0 -1
  33. package/dist/browser/Diviner.d.ts +0 -71
  34. package/dist/browser/Diviner.d.ts.map +0 -1
  35. package/dist/browser/Labels.d.cts +0 -9
  36. package/dist/browser/Labels.d.cts.map +0 -1
  37. package/dist/browser/Labels.d.mts +0 -9
  38. package/dist/browser/Labels.d.mts.map +0 -1
  39. package/dist/browser/Labels.d.ts +0 -9
  40. package/dist/browser/Labels.d.ts.map +0 -1
  41. package/dist/browser/Params.d.cts +0 -5
  42. package/dist/browser/Params.d.cts.map +0 -1
  43. package/dist/browser/Params.d.mts +0 -5
  44. package/dist/browser/Params.d.mts.map +0 -1
  45. package/dist/browser/Params.d.ts +0 -5
  46. package/dist/browser/Params.d.ts.map +0 -1
  47. package/dist/browser/Schema.d.cts +0 -3
  48. package/dist/browser/Schema.d.cts.map +0 -1
  49. package/dist/browser/Schema.d.mts +0 -3
  50. package/dist/browser/Schema.d.mts.map +0 -1
  51. package/dist/browser/Schema.d.ts +0 -3
  52. package/dist/browser/Schema.d.ts.map +0 -1
  53. package/dist/browser/SearchableStorage.d.cts +0 -10
  54. package/dist/browser/SearchableStorage.d.cts.map +0 -1
  55. package/dist/browser/SearchableStorage.d.mts +0 -10
  56. package/dist/browser/SearchableStorage.d.mts.map +0 -1
  57. package/dist/browser/SearchableStorage.d.ts +0 -10
  58. package/dist/browser/SearchableStorage.d.ts.map +0 -1
  59. package/dist/browser/Stage.d.cts +0 -29
  60. package/dist/browser/Stage.d.cts.map +0 -1
  61. package/dist/browser/Stage.d.mts +0 -29
  62. package/dist/browser/Stage.d.mts.map +0 -1
  63. package/dist/browser/Stage.d.ts +0 -29
  64. package/dist/browser/Stage.d.ts.map +0 -1
  65. package/dist/browser/State.d.cts +0 -5
  66. package/dist/browser/State.d.cts.map +0 -1
  67. package/dist/browser/State.d.mts +0 -5
  68. package/dist/browser/State.d.mts.map +0 -1
  69. package/dist/browser/State.d.ts +0 -5
  70. package/dist/browser/State.d.ts.map +0 -1
  71. package/dist/node/Config.d.cts +0 -32
  72. package/dist/node/Config.d.cts.map +0 -1
  73. package/dist/node/Config.d.mts +0 -32
  74. package/dist/node/Config.d.mts.map +0 -1
  75. package/dist/node/Config.d.ts +0 -32
  76. package/dist/node/Config.d.ts.map +0 -1
  77. package/dist/node/Diviner.d.cts +0 -71
  78. package/dist/node/Diviner.d.cts.map +0 -1
  79. package/dist/node/Diviner.d.mts +0 -71
  80. package/dist/node/Diviner.d.mts.map +0 -1
  81. package/dist/node/Diviner.d.ts +0 -71
  82. package/dist/node/Diviner.d.ts.map +0 -1
  83. package/dist/node/Labels.d.cts +0 -9
  84. package/dist/node/Labels.d.cts.map +0 -1
  85. package/dist/node/Labels.d.mts +0 -9
  86. package/dist/node/Labels.d.mts.map +0 -1
  87. package/dist/node/Labels.d.ts +0 -9
  88. package/dist/node/Labels.d.ts.map +0 -1
  89. package/dist/node/Params.d.cts +0 -5
  90. package/dist/node/Params.d.cts.map +0 -1
  91. package/dist/node/Params.d.mts +0 -5
  92. package/dist/node/Params.d.mts.map +0 -1
  93. package/dist/node/Params.d.ts +0 -5
  94. package/dist/node/Params.d.ts.map +0 -1
  95. package/dist/node/Schema.d.cts +0 -3
  96. package/dist/node/Schema.d.cts.map +0 -1
  97. package/dist/node/Schema.d.mts +0 -3
  98. package/dist/node/Schema.d.mts.map +0 -1
  99. package/dist/node/Schema.d.ts +0 -3
  100. package/dist/node/Schema.d.ts.map +0 -1
  101. package/dist/node/SearchableStorage.d.cts +0 -10
  102. package/dist/node/SearchableStorage.d.cts.map +0 -1
  103. package/dist/node/SearchableStorage.d.mts +0 -10
  104. package/dist/node/SearchableStorage.d.mts.map +0 -1
  105. package/dist/node/SearchableStorage.d.ts +0 -10
  106. package/dist/node/SearchableStorage.d.ts.map +0 -1
  107. package/dist/node/Stage.d.cts +0 -29
  108. package/dist/node/Stage.d.cts.map +0 -1
  109. package/dist/node/Stage.d.mts +0 -29
  110. package/dist/node/Stage.d.mts.map +0 -1
  111. package/dist/node/Stage.d.ts +0 -29
  112. package/dist/node/Stage.d.ts.map +0 -1
  113. package/dist/node/State.d.cts +0 -5
  114. package/dist/node/State.d.cts.map +0 -1
  115. package/dist/node/State.d.mts +0 -5
  116. package/dist/node/State.d.mts.map +0 -1
  117. package/dist/node/State.d.ts +0 -5
  118. package/dist/node/State.d.ts.map +0 -1
  119. package/src/Config.ts +0 -35
  120. package/src/Diviner.ts +0 -228
  121. package/src/Labels.ts +0 -13
  122. package/src/Params.ts +0 -6
  123. package/src/Schema.ts +0 -2
  124. package/src/SearchableStorage.ts +0 -9
  125. package/src/Stage.ts +0 -30
  126. package/src/State.ts +0 -5
@@ -1,32 +0,0 @@
1
- import { DivinerConfig } from '@xyo-network/diviner-model';
2
- import { SearchableStorage } from './SearchableStorage';
3
- import { IndexingDivinerStageConfig } from './Stage';
4
- export declare const IndexingDivinerConfigSchema: "network.xyo.diviner.indexing.config";
5
- export type IndexingDivinerConfigSchema = typeof IndexingDivinerConfigSchema;
6
- export type IndexingDivinerConfig = DivinerConfig<{
7
- /**
8
- * Where the diviner should store it's index
9
- */
10
- indexStore?: SearchableStorage;
11
- /**
12
- * Config section for individual indexing diviner stages
13
- */
14
- indexingDivinerStages: IndexingDivinerStageConfig;
15
- /**
16
- * The maximum number of payloads to index at a time
17
- */
18
- payloadDivinerLimit?: number;
19
- /**
20
- * How often to poll for new payloads to index
21
- */
22
- pollFrequency?: number;
23
- /**
24
- * The schema for the Diviner config
25
- */
26
- schema: IndexingDivinerConfigSchema;
27
- /**
28
- * Where the diviner should persist its internal state
29
- */
30
- stateStore?: SearchableStorage;
31
- }>;
32
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAEpD,eAAO,MAAM,2BAA2B,uCAA6C,CAAA;AACrF,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC;IAChD;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B;;OAEG;IACH,qBAAqB,EAAE,0BAA0B,CAAA;IACjD;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,MAAM,EAAE,2BAA2B,CAAA;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAC/B,CAAC,CAAA"}
@@ -1,71 +0,0 @@
1
- import { AbstractDiviner } from '@xyo-network/abstract-diviner';
2
- import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
3
- import { DivinerModule, DivinerModuleEventData } from '@xyo-network/diviner-model';
4
- import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
5
- import { ModuleState } from '@xyo-network/module-model';
6
- import { Payload } from '@xyo-network/payload-model';
7
- import { IndexingDivinerConfig } from './Config';
8
- import { IndexingDivinerParams } from './Params';
9
- import { IndexingDivinerStage } from './Stage';
10
- import { IndexingDivinerState } from './State';
11
- type ConfigStoreKey = 'indexStore' | 'stateStore';
12
- type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
13
- export declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut> = DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
14
- static readonly configSchemas: ("network.xyo.diviner.indexing.config" | "network.xyo.diviner.config")[];
15
- private _lastState?;
16
- private _pollId?;
17
- get payloadDivinerLimit(): number;
18
- get pollFrequency(): number;
19
- /**
20
- * Works via batched iteration of the source archivist to populate the index.
21
- * @returns A promise that resolves when the background process is complete
22
- */
23
- protected backgroundDivine: () => Promise<void>;
24
- /**
25
- * Commit the internal state of the Diviner process. This is similar
26
- * to a transaction completion in a database and should only be called
27
- * when results have been successfully persisted to the appropriate
28
- * external stores.
29
- * @param nextState The state to commit
30
- */
31
- protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
32
- protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
33
- /**
34
- * Retrieves the archivist for the specified store
35
- * @param store The store to retrieve the archivist for
36
- * @returns The archivist for the specified store
37
- */
38
- protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule>>;
39
- /**
40
- * Retrieves the BoundWitness Diviner for the specified store
41
- * @param store The store to retrieve the BoundWitness Diviner for
42
- * @returns The BoundWitness Diviner for the specified store
43
- */
44
- protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
45
- /**
46
- * Gets the Diviner for the supplied Indexing Diviner stage
47
- * @param transform The Indexing Diviner stage
48
- * @returns The diviner corresponding to the Indexing Diviner stage
49
- */
50
- protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<import("@xyo-network/diviner-model").DivinerInstance>;
51
- /**
52
- * Retrieves the Payload Diviner for the specified store
53
- * @param store The store to retrieve the Payload Diviner for
54
- * @returns The Payload Diviner for the specified store
55
- */
56
- protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
57
- /**
58
- * Retrieves the last state of the Diviner process. Used to recover state after
59
- * preemptions, reboots, etc.
60
- */
61
- protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
62
- protected startHandler(): Promise<boolean>;
63
- protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
64
- /**
65
- * Runs the background divine process on a loop with a delay
66
- * specified by the `config.pollFrequency`
67
- */
68
- private poll;
69
- }
70
- export {};
71
- //# sourceMappingURL=Diviner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAIjE,OAAO,EAA0C,aAAa,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAC1H,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAiB,WAAW,EAAqB,MAAM,2BAA2B,CAAA;AAEzF,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,qBAAqB,EAA+B,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE9C,KAAK,cAAc,GAAG,YAAY,GAAG,YAAY,CAAA;AAEjD,KAAK,WAAW,GAAG,OAAO,CAAC,MAAM,qBAAqB,EAAE,cAAc,CAAC,CAAA;AAIvE,qBAAa,eAAe,CAC1B,OAAO,SAAS,qBAAqB,GAAG,qBAAqB,EAC7D,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,UAAU,SAAS,sBAAsB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,CACxI,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;IACvD,gBAAyB,aAAa,2EAAqD;IAE3F,OAAO,CAAC,UAAU,CAAC,CAAmC;IACtD,OAAO,CAAC,OAAO,CAAC,CAAkC;IAElD,IAAI,mBAAmB,WAEtB;IAED,IAAI,aAAa,WAEhB;IAED;;;OAGG;IACH,SAAS,CAAC,gBAAgB,QAAa,QAAQ,IAAI,CAAC,CAmBnD;IAED;;;;;;OAMG;cACa,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC;cAS/C,aAAa,CAAC,QAAQ,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAsB7E;;;;OAIG;cACa,oBAAoB,CAAC,KAAK,EAAE,WAAW;IAMvD;;;;OAIG;cACa,8BAA8B,CAAC,KAAK,EAAE,WAAW;IAMjE;;;;OAIG;cACa,uBAAuB,CAAC,SAAS,EAAE,oBAAoB;IASvE;;;;OAIG;cACa,yBAAyB,CAAC,KAAK,EAAE,WAAW;IAM5D;;;OAGG;cACa,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;cAwC9D,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;cAMhC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrF;;;OAGG;IACH,OAAO,CAAC,IAAI;CAab"}
@@ -1,71 +0,0 @@
1
- import { AbstractDiviner } from '@xyo-network/abstract-diviner';
2
- import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
3
- import { DivinerModule, DivinerModuleEventData } from '@xyo-network/diviner-model';
4
- import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
5
- import { ModuleState } from '@xyo-network/module-model';
6
- import { Payload } from '@xyo-network/payload-model';
7
- import { IndexingDivinerConfig } from './Config';
8
- import { IndexingDivinerParams } from './Params';
9
- import { IndexingDivinerStage } from './Stage';
10
- import { IndexingDivinerState } from './State';
11
- type ConfigStoreKey = 'indexStore' | 'stateStore';
12
- type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
13
- export declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut> = DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
14
- static readonly configSchemas: ("network.xyo.diviner.indexing.config" | "network.xyo.diviner.config")[];
15
- private _lastState?;
16
- private _pollId?;
17
- get payloadDivinerLimit(): number;
18
- get pollFrequency(): number;
19
- /**
20
- * Works via batched iteration of the source archivist to populate the index.
21
- * @returns A promise that resolves when the background process is complete
22
- */
23
- protected backgroundDivine: () => Promise<void>;
24
- /**
25
- * Commit the internal state of the Diviner process. This is similar
26
- * to a transaction completion in a database and should only be called
27
- * when results have been successfully persisted to the appropriate
28
- * external stores.
29
- * @param nextState The state to commit
30
- */
31
- protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
32
- protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
33
- /**
34
- * Retrieves the archivist for the specified store
35
- * @param store The store to retrieve the archivist for
36
- * @returns The archivist for the specified store
37
- */
38
- protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule>>;
39
- /**
40
- * Retrieves the BoundWitness Diviner for the specified store
41
- * @param store The store to retrieve the BoundWitness Diviner for
42
- * @returns The BoundWitness Diviner for the specified store
43
- */
44
- protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
45
- /**
46
- * Gets the Diviner for the supplied Indexing Diviner stage
47
- * @param transform The Indexing Diviner stage
48
- * @returns The diviner corresponding to the Indexing Diviner stage
49
- */
50
- protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<import("@xyo-network/diviner-model").DivinerInstance>;
51
- /**
52
- * Retrieves the Payload Diviner for the specified store
53
- * @param store The store to retrieve the Payload Diviner for
54
- * @returns The Payload Diviner for the specified store
55
- */
56
- protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
57
- /**
58
- * Retrieves the last state of the Diviner process. Used to recover state after
59
- * preemptions, reboots, etc.
60
- */
61
- protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
62
- protected startHandler(): Promise<boolean>;
63
- protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
64
- /**
65
- * Runs the background divine process on a loop with a delay
66
- * specified by the `config.pollFrequency`
67
- */
68
- private poll;
69
- }
70
- export {};
71
- //# sourceMappingURL=Diviner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAIjE,OAAO,EAA0C,aAAa,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAC1H,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAiB,WAAW,EAAqB,MAAM,2BAA2B,CAAA;AAEzF,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,qBAAqB,EAA+B,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE9C,KAAK,cAAc,GAAG,YAAY,GAAG,YAAY,CAAA;AAEjD,KAAK,WAAW,GAAG,OAAO,CAAC,MAAM,qBAAqB,EAAE,cAAc,CAAC,CAAA;AAIvE,qBAAa,eAAe,CAC1B,OAAO,SAAS,qBAAqB,GAAG,qBAAqB,EAC7D,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,UAAU,SAAS,sBAAsB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,CACxI,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;IACvD,gBAAyB,aAAa,2EAAqD;IAE3F,OAAO,CAAC,UAAU,CAAC,CAAmC;IACtD,OAAO,CAAC,OAAO,CAAC,CAAkC;IAElD,IAAI,mBAAmB,WAEtB;IAED,IAAI,aAAa,WAEhB;IAED;;;OAGG;IACH,SAAS,CAAC,gBAAgB,QAAa,QAAQ,IAAI,CAAC,CAmBnD;IAED;;;;;;OAMG;cACa,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC;cAS/C,aAAa,CAAC,QAAQ,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAsB7E;;;;OAIG;cACa,oBAAoB,CAAC,KAAK,EAAE,WAAW;IAMvD;;;;OAIG;cACa,8BAA8B,CAAC,KAAK,EAAE,WAAW;IAMjE;;;;OAIG;cACa,uBAAuB,CAAC,SAAS,EAAE,oBAAoB;IASvE;;;;OAIG;cACa,yBAAyB,CAAC,KAAK,EAAE,WAAW;IAM5D;;;OAGG;cACa,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;cAwC9D,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;cAMhC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrF;;;OAGG;IACH,OAAO,CAAC,IAAI;CAab"}
@@ -1,71 +0,0 @@
1
- import { AbstractDiviner } from '@xyo-network/abstract-diviner';
2
- import { ArchivistWrapper } from '@xyo-network/archivist-wrapper';
3
- import { DivinerModule, DivinerModuleEventData } from '@xyo-network/diviner-model';
4
- import { DivinerWrapper } from '@xyo-network/diviner-wrapper';
5
- import { ModuleState } from '@xyo-network/module-model';
6
- import { Payload } from '@xyo-network/payload-model';
7
- import { IndexingDivinerConfig } from './Config';
8
- import { IndexingDivinerParams } from './Params';
9
- import { IndexingDivinerStage } from './Stage';
10
- import { IndexingDivinerState } from './State';
11
- type ConfigStoreKey = 'indexStore' | 'stateStore';
12
- type ConfigStore = Extract<keyof IndexingDivinerConfig, ConfigStoreKey>;
13
- export declare class IndexingDiviner<TParams extends IndexingDivinerParams = IndexingDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut> = DivinerModuleEventData<DivinerModule<TParams>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
14
- static readonly configSchemas: ("network.xyo.diviner.indexing.config" | "network.xyo.diviner.config")[];
15
- private _lastState?;
16
- private _pollId?;
17
- get payloadDivinerLimit(): number;
18
- get pollFrequency(): number;
19
- /**
20
- * Works via batched iteration of the source archivist to populate the index.
21
- * @returns A promise that resolves when the background process is complete
22
- */
23
- protected backgroundDivine: () => Promise<void>;
24
- /**
25
- * Commit the internal state of the Diviner process. This is similar
26
- * to a transaction completion in a database and should only be called
27
- * when results have been successfully persisted to the appropriate
28
- * external stores.
29
- * @param nextState The state to commit
30
- */
31
- protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
32
- protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
33
- /**
34
- * Retrieves the archivist for the specified store
35
- * @param store The store to retrieve the archivist for
36
- * @returns The archivist for the specified store
37
- */
38
- protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule>>;
39
- /**
40
- * Retrieves the BoundWitness Diviner for the specified store
41
- * @param store The store to retrieve the BoundWitness Diviner for
42
- * @returns The BoundWitness Diviner for the specified store
43
- */
44
- protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
45
- /**
46
- * Gets the Diviner for the supplied Indexing Diviner stage
47
- * @param transform The Indexing Diviner stage
48
- * @returns The diviner corresponding to the Indexing Diviner stage
49
- */
50
- protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<import("@xyo-network/diviner-model").DivinerInstance>;
51
- /**
52
- * Retrieves the Payload Diviner for the specified store
53
- * @param store The store to retrieve the Payload Diviner for
54
- * @returns The Payload Diviner for the specified store
55
- */
56
- protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<DivinerModule>>;
57
- /**
58
- * Retrieves the last state of the Diviner process. Used to recover state after
59
- * preemptions, reboots, etc.
60
- */
61
- protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
62
- protected startHandler(): Promise<boolean>;
63
- protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
64
- /**
65
- * Runs the background divine process on a loop with a delay
66
- * specified by the `config.pollFrequency`
67
- */
68
- private poll;
69
- }
70
- export {};
71
- //# sourceMappingURL=Diviner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAIjE,OAAO,EAA0C,aAAa,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAC1H,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAiB,WAAW,EAAqB,MAAM,2BAA2B,CAAA;AAEzF,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEpD,OAAO,EAAE,qBAAqB,EAA+B,MAAM,UAAU,CAAA;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE9C,KAAK,cAAc,GAAG,YAAY,GAAG,YAAY,CAAA;AAEjD,KAAK,WAAW,GAAG,OAAO,CAAC,MAAM,qBAAqB,EAAE,cAAc,CAAC,CAAA;AAIvE,qBAAa,eAAe,CAC1B,OAAO,SAAS,qBAAqB,GAAG,qBAAqB,EAC7D,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,UAAU,SAAS,sBAAsB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,CACxI,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;IACvD,gBAAyB,aAAa,2EAAqD;IAE3F,OAAO,CAAC,UAAU,CAAC,CAAmC;IACtD,OAAO,CAAC,OAAO,CAAC,CAAkC;IAElD,IAAI,mBAAmB,WAEtB;IAED,IAAI,aAAa,WAEhB;IAED;;;OAGG;IACH,SAAS,CAAC,gBAAgB,QAAa,QAAQ,IAAI,CAAC,CAmBnD;IAED;;;;;;OAMG;cACa,WAAW,CAAC,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC;cAS/C,aAAa,CAAC,QAAQ,GAAE,GAAG,EAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAsB7E;;;;OAIG;cACa,oBAAoB,CAAC,KAAK,EAAE,WAAW;IAMvD;;;;OAIG;cACa,8BAA8B,CAAC,KAAK,EAAE,WAAW;IAMjE;;;;OAIG;cACa,uBAAuB,CAAC,SAAS,EAAE,oBAAoB;IASvE;;;;OAIG;cACa,yBAAyB,CAAC,KAAK,EAAE,WAAW;IAM5D;;;OAGG;cACa,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;cAwC9D,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;cAMhC,WAAW,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAQrF;;;OAGG;IACH,OAAO,CAAC,IAAI;CAab"}
@@ -1,9 +0,0 @@
1
- import { Labels } from '@xyo-network/module-model';
2
- import { DivinerStageSchema, IndexingDivinerStage } from './Stage';
3
- /**
4
- * Labels for Indexing Diviner Stage Diviners
5
- */
6
- export type IndexingDivinerStageLabels = Labels & {
7
- [key in DivinerStageSchema]: IndexingDivinerStage;
8
- };
9
- //# sourceMappingURL=Labels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Labels.d.ts","sourceRoot":"","sources":["../../src/Labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAElE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG;KAI/C,GAAG,IAAI,kBAAkB,GAAG,oBAAoB;CAClD,CAAA"}
@@ -1,9 +0,0 @@
1
- import { Labels } from '@xyo-network/module-model';
2
- import { DivinerStageSchema, IndexingDivinerStage } from './Stage';
3
- /**
4
- * Labels for Indexing Diviner Stage Diviners
5
- */
6
- export type IndexingDivinerStageLabels = Labels & {
7
- [key in DivinerStageSchema]: IndexingDivinerStage;
8
- };
9
- //# sourceMappingURL=Labels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Labels.d.ts","sourceRoot":"","sources":["../../src/Labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAElE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG;KAI/C,GAAG,IAAI,kBAAkB,GAAG,oBAAoB;CAClD,CAAA"}
@@ -1,9 +0,0 @@
1
- import { Labels } from '@xyo-network/module-model';
2
- import { DivinerStageSchema, IndexingDivinerStage } from './Stage';
3
- /**
4
- * Labels for Indexing Diviner Stage Diviners
5
- */
6
- export type IndexingDivinerStageLabels = Labels & {
7
- [key in DivinerStageSchema]: IndexingDivinerStage;
8
- };
9
- //# sourceMappingURL=Labels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Labels.d.ts","sourceRoot":"","sources":["../../src/Labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAElE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG;KAI/C,GAAG,IAAI,kBAAkB,GAAG,oBAAoB;CAClD,CAAA"}
@@ -1,5 +0,0 @@
1
- import { DivinerParams } from '@xyo-network/diviner-model';
2
- import { AnyConfigSchema } from '@xyo-network/module-model';
3
- import { IndexingDivinerConfig } from './Config';
4
- export type IndexingDivinerParams = DivinerParams<AnyConfigSchema<IndexingDivinerConfig>>;
5
- //# sourceMappingURL=Params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEhD,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- import { DivinerParams } from '@xyo-network/diviner-model';
2
- import { AnyConfigSchema } from '@xyo-network/module-model';
3
- import { IndexingDivinerConfig } from './Config';
4
- export type IndexingDivinerParams = DivinerParams<AnyConfigSchema<IndexingDivinerConfig>>;
5
- //# sourceMappingURL=Params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEhD,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- import { DivinerParams } from '@xyo-network/diviner-model';
2
- import { AnyConfigSchema } from '@xyo-network/module-model';
3
- import { IndexingDivinerConfig } from './Config';
4
- export type IndexingDivinerParams = DivinerParams<AnyConfigSchema<IndexingDivinerConfig>>;
5
- //# sourceMappingURL=Params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEhD,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const IndexingDivinerSchema: "network.xyo.diviner.indexing";
2
- export type ImageThumbnailDivinerSchema = typeof IndexingDivinerSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,gCAA0C,CAAA;AAC5E,MAAM,MAAM,2BAA2B,GAAG,OAAO,qBAAqB,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const IndexingDivinerSchema: "network.xyo.diviner.indexing";
2
- export type ImageThumbnailDivinerSchema = typeof IndexingDivinerSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,gCAA0C,CAAA;AAC5E,MAAM,MAAM,2BAA2B,GAAG,OAAO,qBAAqB,CAAA"}
@@ -1,3 +0,0 @@
1
- export declare const IndexingDivinerSchema: "network.xyo.diviner.indexing";
2
- export type ImageThumbnailDivinerSchema = typeof IndexingDivinerSchema;
3
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,gCAA0C,CAAA;AAC5E,MAAM,MAAM,2BAA2B,GAAG,OAAO,qBAAqB,CAAA"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Describes an Archivist/Diviner combination
3
- * that enables searching signed payloads
4
- */
5
- export interface SearchableStorage {
6
- archivist: string;
7
- boundWitnessDiviner: string;
8
- payloadDiviner: string;
9
- }
10
- //# sourceMappingURL=SearchableStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchableStorage.d.ts","sourceRoot":"","sources":["../../src/SearchableStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;CACvB"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Describes an Archivist/Diviner combination
3
- * that enables searching signed payloads
4
- */
5
- export interface SearchableStorage {
6
- archivist: string;
7
- boundWitnessDiviner: string;
8
- payloadDiviner: string;
9
- }
10
- //# sourceMappingURL=SearchableStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchableStorage.d.ts","sourceRoot":"","sources":["../../src/SearchableStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;CACvB"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Describes an Archivist/Diviner combination
3
- * that enables searching signed payloads
4
- */
5
- export interface SearchableStorage {
6
- archivist: string;
7
- boundWitnessDiviner: string;
8
- payloadDiviner: string;
9
- }
10
- //# sourceMappingURL=SearchableStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchableStorage.d.ts","sourceRoot":"","sources":["../../src/SearchableStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,cAAc,EAAE,MAAM,CAAA;CACvB"}
@@ -1,29 +0,0 @@
1
- export type DivinerStageSchema = 'network.xyo.diviner.stage';
2
- export declare const DivinerStageSchema: DivinerStageSchema;
3
- /**
4
- * The diviners for each stage of an indexing diviner
5
- */
6
- export type IndexingDivinerStage =
7
- /**
8
- * Transforms a diviner query into an index query
9
- */
10
- 'divinerQueryToIndexQueryDiviner'
11
- /**
12
- * Transforms the index candidates into indexes
13
- */
14
- | 'indexCandidateToIndexDiviner'
15
- /**
16
- * Transforms an index query response into a diviner divine query response
17
- */
18
- | 'indexQueryResponseToDivinerQueryResponseDiviner'
19
- /**
20
- * Uses the current state to determine the next batch of index candidates
21
- */
22
- | 'stateToIndexCandidateDiviner';
23
- /**
24
- * Config section for declaring each indexing diviner stage
25
- */
26
- export type IndexingDivinerStageConfig = {
27
- [key in IndexingDivinerStage]: string;
28
- };
29
- //# sourceMappingURL=Stage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stage.d.ts","sourceRoot":"","sources":["../../src/Stage.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAA;AAC5D,eAAO,MAAM,kBAAkB,EAAE,kBAAgD,CAAA;AAEjF;;GAEG;AACH,MAAM,MAAM,oBAAoB;AAC9B;;GAEG;AACD,iCAAiC;AACnC;;GAEG;GACD,8BAA8B;AAChC;;GAEG;GACD,iDAAiD;AACnD;;GAEG;GACD,8BAA8B,CAAA;AAElC;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;KACtC,GAAG,IAAI,oBAAoB,GAAG,MAAM;CACtC,CAAA"}
@@ -1,29 +0,0 @@
1
- export type DivinerStageSchema = 'network.xyo.diviner.stage';
2
- export declare const DivinerStageSchema: DivinerStageSchema;
3
- /**
4
- * The diviners for each stage of an indexing diviner
5
- */
6
- export type IndexingDivinerStage =
7
- /**
8
- * Transforms a diviner query into an index query
9
- */
10
- 'divinerQueryToIndexQueryDiviner'
11
- /**
12
- * Transforms the index candidates into indexes
13
- */
14
- | 'indexCandidateToIndexDiviner'
15
- /**
16
- * Transforms an index query response into a diviner divine query response
17
- */
18
- | 'indexQueryResponseToDivinerQueryResponseDiviner'
19
- /**
20
- * Uses the current state to determine the next batch of index candidates
21
- */
22
- | 'stateToIndexCandidateDiviner';
23
- /**
24
- * Config section for declaring each indexing diviner stage
25
- */
26
- export type IndexingDivinerStageConfig = {
27
- [key in IndexingDivinerStage]: string;
28
- };
29
- //# sourceMappingURL=Stage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stage.d.ts","sourceRoot":"","sources":["../../src/Stage.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAA;AAC5D,eAAO,MAAM,kBAAkB,EAAE,kBAAgD,CAAA;AAEjF;;GAEG;AACH,MAAM,MAAM,oBAAoB;AAC9B;;GAEG;AACD,iCAAiC;AACnC;;GAEG;GACD,8BAA8B;AAChC;;GAEG;GACD,iDAAiD;AACnD;;GAEG;GACD,8BAA8B,CAAA;AAElC;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;KACtC,GAAG,IAAI,oBAAoB,GAAG,MAAM;CACtC,CAAA"}
@@ -1,29 +0,0 @@
1
- export type DivinerStageSchema = 'network.xyo.diviner.stage';
2
- export declare const DivinerStageSchema: DivinerStageSchema;
3
- /**
4
- * The diviners for each stage of an indexing diviner
5
- */
6
- export type IndexingDivinerStage =
7
- /**
8
- * Transforms a diviner query into an index query
9
- */
10
- 'divinerQueryToIndexQueryDiviner'
11
- /**
12
- * Transforms the index candidates into indexes
13
- */
14
- | 'indexCandidateToIndexDiviner'
15
- /**
16
- * Transforms an index query response into a diviner divine query response
17
- */
18
- | 'indexQueryResponseToDivinerQueryResponseDiviner'
19
- /**
20
- * Uses the current state to determine the next batch of index candidates
21
- */
22
- | 'stateToIndexCandidateDiviner';
23
- /**
24
- * Config section for declaring each indexing diviner stage
25
- */
26
- export type IndexingDivinerStageConfig = {
27
- [key in IndexingDivinerStage]: string;
28
- };
29
- //# sourceMappingURL=Stage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Stage.d.ts","sourceRoot":"","sources":["../../src/Stage.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAA;AAC5D,eAAO,MAAM,kBAAkB,EAAE,kBAAgD,CAAA;AAEjF;;GAEG;AACH,MAAM,MAAM,oBAAoB;AAC9B;;GAEG;AACD,iCAAiC;AACnC;;GAEG;GACD,8BAA8B;AAChC;;GAEG;GACD,iDAAiD;AACnD;;GAEG;GACD,8BAA8B,CAAA;AAElC;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;KACtC,GAAG,IAAI,oBAAoB,GAAG,MAAM;CACtC,CAAA"}
@@ -1,5 +0,0 @@
1
- import { StateDictionary } from '@xyo-network/module-model';
2
- export type IndexingDivinerState = StateDictionary & {
3
- offset: number;
4
- };
5
- //# sourceMappingURL=State.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../src/State.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IACnD,MAAM,EAAE,MAAM,CAAA;CACf,CAAA"}
@@ -1,5 +0,0 @@
1
- import { StateDictionary } from '@xyo-network/module-model';
2
- export type IndexingDivinerState = StateDictionary & {
3
- offset: number;
4
- };
5
- //# sourceMappingURL=State.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../src/State.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IACnD,MAAM,EAAE,MAAM,CAAA;CACf,CAAA"}
@@ -1,5 +0,0 @@
1
- import { StateDictionary } from '@xyo-network/module-model';
2
- export type IndexingDivinerState = StateDictionary & {
3
- offset: number;
4
- };
5
- //# sourceMappingURL=State.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../src/State.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IACnD,MAAM,EAAE,MAAM,CAAA;CACf,CAAA"}
package/src/Config.ts DELETED
@@ -1,35 +0,0 @@
1
- import { DivinerConfig } from '@xyo-network/diviner-model'
2
-
3
- import { IndexingDivinerSchema } from './Schema'
4
- import { SearchableStorage } from './SearchableStorage'
5
- import { IndexingDivinerStageConfig } from './Stage'
6
-
7
- export const IndexingDivinerConfigSchema = `${IndexingDivinerSchema}.config` as const
8
- export type IndexingDivinerConfigSchema = typeof IndexingDivinerConfigSchema
9
-
10
- export type IndexingDivinerConfig = DivinerConfig<{
11
- /**
12
- * Where the diviner should store it's index
13
- */
14
- indexStore?: SearchableStorage
15
- /**
16
- * Config section for individual indexing diviner stages
17
- */
18
- indexingDivinerStages: IndexingDivinerStageConfig
19
- /**
20
- * The maximum number of payloads to index at a time
21
- */
22
- payloadDivinerLimit?: number
23
- /**
24
- * How often to poll for new payloads to index
25
- */
26
- pollFrequency?: number
27
- /**
28
- * The schema for the Diviner config
29
- */
30
- schema: IndexingDivinerConfigSchema
31
- /**
32
- * Where the diviner should persist its internal state
33
- */
34
- stateStore?: SearchableStorage
35
- }>