@xyo-network/diviner-indexing-model 4.0.3 → 4.1.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.
@@ -0,0 +1,79 @@
1
+ import { EmptyObject, WithAdditional } from '@xylabs/object';
2
+ import { DivinerConfig, SearchableStorage, DivinerParams } from '@xyo-network/diviner-model';
3
+ import { Payload } from '@xyo-network/payload-model';
4
+ import { ModuleIdentifier, Labels, AnyConfigSchema, StateDictionary } from '@xyo-network/module-model';
5
+ import { Hex } from '@xylabs/hex';
6
+
7
+ type DivinerStageSchema = 'network.xyo.diviner.stage';
8
+ declare const DivinerStageSchema: DivinerStageSchema;
9
+
10
+ /**
11
+ * The diviners for each stage of an indexing diviner
12
+ */
13
+ type IndexingDivinerStage = 'divinerQueryToIndexQueryDiviner'
14
+ /**
15
+ * Transforms the index candidates into indexes
16
+ */
17
+ | 'indexCandidateToIndexDiviner'
18
+ /**
19
+ * Transforms an index query response into a diviner divine query response
20
+ */
21
+ | 'indexQueryResponseToDivinerQueryResponseDiviner'
22
+ /**
23
+ * Uses the current state to determine the next batch of index candidates
24
+ */
25
+ | 'stateToIndexCandidateDiviner';
26
+ /**
27
+ * Config section for declaring each indexing diviner stage
28
+ */
29
+ type IndexingDivinerStageConfig = {
30
+ [key in IndexingDivinerStage]: ModuleIdentifier;
31
+ };
32
+
33
+ declare const IndexingDivinerConfigSchema: "network.xyo.diviner.indexing.config";
34
+ type IndexingDivinerConfigSchema = typeof IndexingDivinerConfigSchema;
35
+ type IndexingDivinerConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends string | void = void> = DivinerConfig<WithAdditional<{
36
+ /**
37
+ * Where the diviner should store it's index
38
+ */
39
+ indexStore?: SearchableStorage;
40
+ /**
41
+ * Config section for name/address of individual diviner stages
42
+ */
43
+ indexingDivinerStages?: IndexingDivinerStageConfig;
44
+ /**
45
+ * The maximum number of payloads to index at a time
46
+ */
47
+ payloadDivinerLimit?: number;
48
+ /**
49
+ * How often to poll for new payloads to index
50
+ */
51
+ pollFrequency?: number;
52
+ /**
53
+ * The schema for the Diviner config
54
+ */
55
+ schema: IndexingDivinerConfigSchema;
56
+ /**
57
+ * Where the diviner should persist its internal state
58
+ */
59
+ stateStore?: SearchableStorage;
60
+ }, TConfig>, TSchema>;
61
+
62
+ /**
63
+ * Labels for Indexing Diviner Stage Diviners
64
+ */
65
+ type IndexingDivinerStageLabels = Labels & {
66
+ [key in DivinerStageSchema]: IndexingDivinerStage;
67
+ };
68
+
69
+ type IndexingDivinerParams = DivinerParams<AnyConfigSchema<IndexingDivinerConfig>>;
70
+
71
+ declare const IndexingDivinerSchema: "network.xyo.diviner.indexing";
72
+ type ImageThumbnailDivinerSchema = typeof IndexingDivinerSchema;
73
+
74
+ type IndexingDivinerState = StateDictionary & {
75
+ cursor: Hex;
76
+ };
77
+
78
+ export { DivinerStageSchema, IndexingDivinerConfigSchema, IndexingDivinerSchema };
79
+ export type { ImageThumbnailDivinerSchema, IndexingDivinerConfig, IndexingDivinerParams, IndexingDivinerStage, IndexingDivinerStageConfig, IndexingDivinerStageLabels, IndexingDivinerState };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-indexing-model",
3
- "version": "4.0.3",
3
+ "version": "4.1.1",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -21,23 +21,23 @@
21
21
  "type": "module",
22
22
  "exports": {
23
23
  ".": {
24
- "types": "./dist/types/index.d.ts",
24
+ "types": "./dist/neutral/index.d.ts",
25
25
  "default": "./dist/neutral/index.mjs"
26
26
  },
27
27
  "./package.json": "./package.json"
28
28
  },
29
29
  "module": "dist/neutral/index.mjs",
30
- "types": "dist/types/index.d.ts",
30
+ "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/hex": "^4.13.4",
33
- "@xylabs/object": "^4.13.4",
34
- "@xyo-network/diviner-model": "^4.0.3",
35
- "@xyo-network/module-model": "^4.0.3",
36
- "@xyo-network/payload-model": "^4.0.3"
32
+ "@xylabs/hex": "^4.13.15",
33
+ "@xylabs/object": "^4.13.15",
34
+ "@xyo-network/diviner-model": "^4.1.1",
35
+ "@xyo-network/module-model": "^4.1.1",
36
+ "@xyo-network/payload-model": "^4.1.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@xylabs/ts-scripts-yarn3": "^6.5.18",
40
- "@xylabs/tsconfig": "^6.5.18",
39
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.23",
40
+ "@xylabs/tsconfig": "^7.0.0-rc.23",
41
41
  "typescript": "^5.8.3"
42
42
  },
43
43
  "publishConfig": {
@@ -1,7 +0,0 @@
1
- export * from './Config.ts';
2
- export * from './Labels.ts';
3
- export * from './Params.ts';
4
- export * from './Schema.ts';
5
- export * from './Stage.ts';
6
- export * from './State.ts';
7
- //# sourceMappingURL=index.d.ts.map
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes