@xyo-network/diviner-indexing-model 4.0.3 → 4.1.0
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/index.d.ts +79 -0
- package/package.json +10 -10
- /package/{dist/types → build/neutral}/Config.d.ts +0 -0
- /package/{dist/types → build/neutral}/Config.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Labels.d.ts +0 -0
- /package/{dist/types → build/neutral}/Labels.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Params.d.ts +0 -0
- /package/{dist/types → build/neutral}/Params.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Schema.d.ts +0 -0
- /package/{dist/types → build/neutral}/Schema.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Stage.d.ts +0 -0
- /package/{dist/types → build/neutral}/Stage.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/State.d.ts +0 -0
- /package/{dist/types → build/neutral}/State.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/index.d.ts +0 -0
- /package/{dist/types → build/neutral}/index.d.ts.map +0 -0
|
@@ -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
|
+
"version": "4.1.0",
|
|
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/
|
|
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/
|
|
30
|
+
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/hex": "^4.13.
|
|
33
|
-
"@xylabs/object": "^4.13.
|
|
34
|
-
"@xyo-network/diviner-model": "^4.0
|
|
35
|
-
"@xyo-network/module-model": "^4.0
|
|
36
|
-
"@xyo-network/payload-model": "^4.0
|
|
32
|
+
"@xylabs/hex": "^4.13.15",
|
|
33
|
+
"@xylabs/object": "^4.13.15",
|
|
34
|
+
"@xyo-network/diviner-model": "^4.1.0",
|
|
35
|
+
"@xyo-network/module-model": "^4.1.0",
|
|
36
|
+
"@xyo-network/payload-model": "^4.1.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
40
|
-
"@xylabs/tsconfig": "^
|
|
39
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
|
|
40
|
+
"@xylabs/tsconfig": "^7.0.0-rc.20",
|
|
41
41
|
"typescript": "^5.8.3"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
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
|
|
File without changes
|