@xyo-network/diviner-indexing-memory 3.2.0 → 3.3.1

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.
@@ -15,9 +15,25 @@ export declare class IndexingDiviner<TParams extends IndexingDivinerParams = Ind
15
15
  private _pollId?;
16
16
  get payloadDivinerLimit(): number;
17
17
  get pollFrequency(): number;
18
+ /**
19
+ * Works via batched iteration of the source archivist to populate the index.
20
+ * @returns A promise that resolves when the background process is complete
21
+ */
18
22
  protected backgroundDivine: () => Promise<void>;
23
+ /**
24
+ * Commit the internal state of the Diviner process. This is similar
25
+ * to a transaction completion in a database and should only be called
26
+ * when results have been successfully persisted to the appropriate
27
+ * external stores.
28
+ * @param nextState The state to commit
29
+ */
19
30
  protected commitState(nextState: ModuleState<IndexingDivinerState>): Promise<void>;
20
31
  protected divineHandler(payloads?: TIn[]): Promise<WithMeta<TOut>[]>;
32
+ /**
33
+ * Retrieves the archivist for the specified store
34
+ * @param store The store to retrieve the archivist for
35
+ * @returns The archivist for the specified store
36
+ */
21
37
  protected getArchivistForStore(store: ConfigStore): Promise<ArchivistWrapper<import("@xyo-network/archivist-model").ArchivistModule<import("@xylabs/object").BaseParamsFields & {
22
38
  account?: import("@xyo-network/account-model").AccountInstance | "random";
23
39
  addToResolvers?: boolean;
@@ -37,6 +53,11 @@ export declare class IndexingDiviner<TParams extends IndexingDivinerParams = Ind
37
53
  ephemeralQueryAccountEnabled?: boolean;
38
54
  moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
55
  }, import("@xyo-network/archivist-model").ArchivistModuleEventData>>>;
56
+ /**
57
+ * Retrieves the BoundWitness Diviner for the specified store
58
+ * @param store The store to retrieve the BoundWitness Diviner for
59
+ * @returns The BoundWitness Diviner for the specified store
60
+ */
40
61
  protected getBoundWitnessDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xylabs/object").BaseParamsFields & {
41
62
  account?: import("@xyo-network/account-model").AccountInstance | "random";
42
63
  addToResolvers?: boolean;
@@ -56,6 +77,11 @@ export declare class IndexingDiviner<TParams extends IndexingDivinerParams = Ind
56
77
  } & import("@xyo-network/payload-model").PayloadFields, {
57
78
  schema: string;
58
79
  } & import("@xyo-network/payload-model").PayloadFields>>;
80
+ /**
81
+ * Gets the Diviner for the supplied Indexing Diviner stage
82
+ * @param transform The Indexing Diviner stage
83
+ * @returns The diviner corresponding to the Indexing Diviner stage
84
+ */
59
85
  protected getIndexingDivinerStage(transform: IndexingDivinerStage): Promise<DivinerInstance<import("@xylabs/object").BaseParamsFields & {
60
86
  account?: import("@xyo-network/account-model").AccountInstance | "random";
61
87
  addToResolvers?: boolean;
@@ -75,6 +101,11 @@ export declare class IndexingDiviner<TParams extends IndexingDivinerParams = Ind
75
101
  } & import("@xyo-network/payload-model").PayloadFields, {
76
102
  schema: string;
77
103
  } & import("@xyo-network/payload-model").PayloadFields, DivinerModuleEventData>>;
104
+ /**
105
+ * Retrieves the Payload Diviner for the specified store
106
+ * @param store The store to retrieve the Payload Diviner for
107
+ * @returns The Payload Diviner for the specified store
108
+ */
78
109
  protected getPayloadDivinerForStore(store: ConfigStore): Promise<DivinerWrapper<import("@xyo-network/diviner-model").DivinerModule<import("@xylabs/object").BaseParamsFields & {
79
110
  account?: import("@xyo-network/account-model").AccountInstance | "random";
80
111
  addToResolvers?: boolean;
@@ -94,9 +125,17 @@ export declare class IndexingDiviner<TParams extends IndexingDivinerParams = Ind
94
125
  } & import("@xyo-network/payload-model").PayloadFields, {
95
126
  schema: string;
96
127
  } & import("@xyo-network/payload-model").PayloadFields>>;
128
+ /**
129
+ * Retrieves the last state of the Diviner process. Used to recover state after
130
+ * preemptions, reboots, etc.
131
+ */
97
132
  protected retrieveState(): Promise<ModuleState<IndexingDivinerState> | undefined>;
98
133
  protected startHandler(): Promise<boolean>;
99
134
  protected stopHandler(_timeout?: number | undefined): Promise<boolean>;
135
+ /**
136
+ * Runs the background divine process on a loop with a delay
137
+ * specified by the `config.pollFrequency`
138
+ */
100
139
  private poll;
101
140
  }
102
141
  //# sourceMappingURL=Diviner.d.ts.map
@@ -1 +1 @@
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;AAE/D,OAAO,EACL,qBAAqB,EAErB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACc,eAAe,EAAE,sBAAsB,EAC3D,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EACkD,WAAW,EACnE,MAAM,2BAA2B,CAAA;AAElC,OAAO,EACL,OAAO,EAAE,MAAM,EAAE,QAAQ,EAC1B,MAAM,4BAA4B,CAAA;AAEnC,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,YAAY,CAAA;AAExD,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,qBAAqB,EAAE,cAAc,CAAC,CAAA;AAI9E,qBACa,eAAe,CAC1B,OAAO,SAAS,qBAAqB,GAAG,qBAAqB,EAC7D,GAAG,SAAS,OAAO,GAAG,OAAO,EAC7B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,UAAU,SAAS,sBAAsB,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,sBAAsB,CAChH,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EACnC,GAAG,EACH,IAAI,CACL,CACD,SAAQ,eAAe,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC;IACvD,gBAAyB,kBAAkB,SAAQ;IACnD,gBAAy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EAAE,CAAC;IAsBvF;;;;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;cA0C9D,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;CAcb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-indexing-memory",
3
- "version": "3.2.0",
3
+ "version": "3.3.1",
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.1.0",
33
- "@xylabs/hex": "^4.1.0",
34
- "@xylabs/timer": "^4.1.0",
35
- "@xyo-network/archivist-wrapper": "^3.2.0",
36
- "@xyo-network/boundwitness-builder": "^3.2.0",
37
- "@xyo-network/boundwitness-model": "^3.2.0",
38
- "@xyo-network/diviner-abstract": "^3.2.0",
39
- "@xyo-network/diviner-boundwitness-model": "^3.2.0",
40
- "@xyo-network/diviner-indexing-model": "^3.2.0",
41
- "@xyo-network/diviner-model": "^3.2.0",
42
- "@xyo-network/diviner-wrapper": "^3.2.0",
43
- "@xyo-network/module-model": "^3.2.0",
44
- "@xyo-network/payload-builder": "^3.2.0",
45
- "@xyo-network/payload-model": "^3.2.0"
32
+ "@xylabs/assert": "^4.3.2",
33
+ "@xylabs/hex": "^4.3.2",
34
+ "@xylabs/timer": "^4.3.2",
35
+ "@xyo-network/archivist-wrapper": "^3.3.1",
36
+ "@xyo-network/boundwitness-builder": "^3.3.1",
37
+ "@xyo-network/boundwitness-model": "^3.3.1",
38
+ "@xyo-network/diviner-abstract": "^3.3.1",
39
+ "@xyo-network/diviner-boundwitness-model": "^3.3.1",
40
+ "@xyo-network/diviner-indexing-model": "^3.3.1",
41
+ "@xyo-network/diviner-model": "^3.3.1",
42
+ "@xyo-network/diviner-wrapper": "^3.3.1",
43
+ "@xyo-network/module-model": "^3.3.1",
44
+ "@xyo-network/payload-builder": "^3.3.1",
45
+ "@xyo-network/payload-model": "^3.3.1"
46
46
  },
47
47
  "devDependencies": {
48
- "@xylabs/ts-scripts-yarn3": "^4.1.0",
49
- "@xylabs/tsconfig": "^4.1.0",
50
- "typescript": "^5.6.2"
48
+ "@xylabs/ts-scripts-yarn3": "^4.2.3",
49
+ "@xylabs/tsconfig": "^4.2.3",
50
+ "typescript": "^5.6.3"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"