@xyo-network/diviner-indexing-model 5.2.27 → 5.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.
- package/dist/neutral/Config.d.ts +5 -3
- package/dist/neutral/Config.d.ts.map +1 -1
- package/dist/neutral/Schema.d.ts +3 -1
- package/dist/neutral/Schema.d.ts.map +1 -1
- package/dist/neutral/Stage.d.ts +4 -2
- package/dist/neutral/Stage.d.ts.map +1 -1
- package/dist/neutral/index.mjs +10 -3
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/Config.ts +5 -3
- package/src/Schema.ts +3 -1
- package/src/Stage.ts +3 -2
package/dist/neutral/Config.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js';
|
|
2
2
|
import type { DivinerConfig, SearchableStorage } from '@xyo-network/diviner-model';
|
|
3
|
-
import type
|
|
3
|
+
import { type Payload, type Schema } from '@xyo-network/payload-model';
|
|
4
4
|
import type { IndexingDivinerStageConfig } from './Stage.ts';
|
|
5
|
-
export declare const IndexingDivinerConfigSchema:
|
|
5
|
+
export declare const IndexingDivinerConfigSchema: string & {
|
|
6
|
+
readonly __schema: true;
|
|
7
|
+
};
|
|
6
8
|
export type IndexingDivinerConfigSchema = typeof IndexingDivinerConfigSchema;
|
|
7
|
-
export type IndexingDivinerConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends
|
|
9
|
+
export type IndexingDivinerConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends Schema | void = void> = DivinerConfig<WithAdditional<{
|
|
8
10
|
/**
|
|
9
11
|
* Where the diviner should store it's index
|
|
10
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAClF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAClF,OAAO,EACK,KAAK,OAAO,EAAE,KAAK,MAAM,EACpC,MAAM,4BAA4B,CAAA;AAGnC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAE5D,eAAO,MAAM,2BAA2B;;CAAoD,CAAA;AAC5F,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E,MAAM,MAAM,qBAAqB,CAAC,OAAO,SAAS,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO,SAAS,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,aAAa,CAC1I,cAAc,CACZ;IACE;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B;;OAEG;IACH,qBAAqB,CAAC,EAAE,0BAA0B,CAAA;IAClD;;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,EACD,OAAO,CACR,EACD,OAAO,CACR,CAAA"}
|
package/dist/neutral/Schema.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export declare const IndexingDivinerSchema: "network.xyo.diviner.indexing"
|
|
1
|
+
export declare const IndexingDivinerSchema: "network.xyo.diviner.indexing" & {
|
|
2
|
+
readonly __schema: true;
|
|
3
|
+
};
|
|
2
4
|
export type ImageThumbnailDivinerSchema = typeof IndexingDivinerSchema;
|
|
3
5
|
//# sourceMappingURL=Schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB;;CAAiD,CAAA;AACnF,MAAM,MAAM,2BAA2B,GAAG,OAAO,qBAAqB,CAAA"}
|
package/dist/neutral/Stage.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export declare const DivinerStageSchema: "network.xyo.diviner.stage" & {
|
|
2
|
+
readonly __schema: true;
|
|
3
|
+
};
|
|
4
|
+
export type DivinerStageSchema = typeof DivinerStageSchema;
|
|
3
5
|
import type { ModuleIdentifier } from '@xyo-network/module-model';
|
|
4
6
|
/**
|
|
5
7
|
* The diviners for each stage of an indexing diviner
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stage.d.ts","sourceRoot":"","sources":["../../src/Stage.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Stage.d.ts","sourceRoot":"","sources":["../../src/Stage.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;CAA8C,CAAA;AAC7E,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA;AAE1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAGjE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAI1B,iCAAiC;AACrC;;GAEG;GACC,8BAA8B;AAClC;;GAEG;GACC,iDAAiD;AACrD;;GAEG;GACC,8BAA8B,CAAA;AAEpC;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;KACtC,GAAG,IAAI,oBAAoB,GAAG,gBAAgB;CAChD,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
// src/Config.ts
|
|
2
|
+
import {
|
|
3
|
+
asSchema as asSchema2
|
|
4
|
+
} from "@xyo-network/payload-model";
|
|
5
|
+
|
|
1
6
|
// src/Schema.ts
|
|
2
|
-
|
|
7
|
+
import { asSchema } from "@xyo-network/payload-model";
|
|
8
|
+
var IndexingDivinerSchema = asSchema("network.xyo.diviner.indexing", true);
|
|
3
9
|
|
|
4
10
|
// src/Config.ts
|
|
5
|
-
var IndexingDivinerConfigSchema = `${IndexingDivinerSchema}.config
|
|
11
|
+
var IndexingDivinerConfigSchema = asSchema2(`${IndexingDivinerSchema}.config`, true);
|
|
6
12
|
|
|
7
13
|
// src/Stage.ts
|
|
8
|
-
|
|
14
|
+
import { asSchema as asSchema3 } from "@xyo-network/payload-model";
|
|
15
|
+
var DivinerStageSchema = asSchema3("network.xyo.diviner.stage", true);
|
|
9
16
|
export {
|
|
10
17
|
DivinerStageSchema,
|
|
11
18
|
IndexingDivinerConfigSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/Config.ts","../../src/Schema.ts","../../src/Stage.ts"],"sourcesContent":["import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'\nimport type { DivinerConfig, SearchableStorage } from '@xyo-network/diviner-model'\nimport {\n asSchema, type Payload, type Schema,\n} from '@xyo-network/payload-model'\n\nimport { IndexingDivinerSchema } from './Schema.ts'\nimport type { IndexingDivinerStageConfig } from './Stage.ts'\n\nexport const IndexingDivinerConfigSchema = asSchema(`${IndexingDivinerSchema}.config`, true)\nexport type IndexingDivinerConfigSchema = typeof IndexingDivinerConfigSchema\n\nexport type IndexingDivinerConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends Schema | void = void> = DivinerConfig<\n WithAdditional<\n {\n /**\n * Where the diviner should store it's index\n */\n indexStore?: SearchableStorage\n /**\n * Config section for name/address of individual diviner stages\n */\n indexingDivinerStages?: IndexingDivinerStageConfig\n /**\n * The maximum number of payloads to index at a time\n */\n payloadDivinerLimit?: number\n /**\n * How often to poll for new payloads to index\n */\n pollFrequency?: number\n /**\n * The schema for the Diviner config\n */\n schema: IndexingDivinerConfigSchema\n /**\n * Where the diviner should persist its internal state\n */\n stateStore?: SearchableStorage\n },\n TConfig\n >,\n TSchema\n>\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const IndexingDivinerSchema = asSchema('network.xyo.diviner.indexing', true)\nexport type ImageThumbnailDivinerSchema = typeof IndexingDivinerSchema\n","export const DivinerStageSchema = asSchema('network.xyo.diviner.stage', true)\nexport type DivinerStageSchema = typeof DivinerStageSchema\n\nimport type { ModuleIdentifier } from '@xyo-network/module-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\n/**\n * The diviners for each stage of an indexing diviner\n */\nexport type IndexingDivinerStage\n /**\n * Transforms a diviner query into an index query\n */\n = | 'divinerQueryToIndexQueryDiviner'\n /**\n * Transforms the index candidates into indexes\n */\n | 'indexCandidateToIndexDiviner'\n /**\n * Transforms an index query response into a diviner divine query response\n */\n | 'indexQueryResponseToDivinerQueryResponseDiviner'\n /**\n * Uses the current state to determine the next batch of index candidates\n */\n | 'stateToIndexCandidateDiviner'\n\n/**\n * Config section for declaring each indexing diviner stage\n */\nexport type IndexingDivinerStageConfig = {\n [key in IndexingDivinerStage]: ModuleIdentifier\n}\n"],"mappings":";AAEA;AAAA,EACE,YAAAA;AAAA,OACK;;;ACJP,SAAS,gBAAgB;AAElB,IAAM,wBAAwB,SAAS,gCAAgC,IAAI;;;ADO3E,IAAM,8BAA8BC,UAAS,GAAG,qBAAqB,WAAW,IAAI;;;AEL3F,SAAS,YAAAC,iBAAgB;AAJlB,IAAM,qBAAqBA,UAAS,6BAA6B,IAAI;","names":["asSchema","asSchema","asSchema"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-indexing-model",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@xylabs/sdk-js": "~5.0.64",
|
|
40
|
-
"@xyo-network/diviner-model": "~5.
|
|
41
|
-
"@xyo-network/module-model": "~5.
|
|
42
|
-
"@xyo-network/payload-model": "~5.
|
|
40
|
+
"@xyo-network/diviner-model": "~5.3.1",
|
|
41
|
+
"@xyo-network/module-model": "~5.3.1",
|
|
42
|
+
"@xyo-network/payload-model": "~5.3.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@xylabs/ts-scripts-yarn3": "~7.3.2",
|
package/src/Config.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { EmptyObject, WithAdditional } from '@xylabs/sdk-js'
|
|
2
2
|
import type { DivinerConfig, SearchableStorage } from '@xyo-network/diviner-model'
|
|
3
|
-
import
|
|
3
|
+
import {
|
|
4
|
+
asSchema, type Payload, type Schema,
|
|
5
|
+
} from '@xyo-network/payload-model'
|
|
4
6
|
|
|
5
7
|
import { IndexingDivinerSchema } from './Schema.ts'
|
|
6
8
|
import type { IndexingDivinerStageConfig } from './Stage.ts'
|
|
7
9
|
|
|
8
|
-
export const IndexingDivinerConfigSchema = `${IndexingDivinerSchema}.config
|
|
10
|
+
export const IndexingDivinerConfigSchema = asSchema(`${IndexingDivinerSchema}.config`, true)
|
|
9
11
|
export type IndexingDivinerConfigSchema = typeof IndexingDivinerConfigSchema
|
|
10
12
|
|
|
11
|
-
export type IndexingDivinerConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends
|
|
13
|
+
export type IndexingDivinerConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends Schema | void = void> = DivinerConfig<
|
|
12
14
|
WithAdditional<
|
|
13
15
|
{
|
|
14
16
|
/**
|
package/src/Schema.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
2
|
+
|
|
3
|
+
export const IndexingDivinerSchema = asSchema('network.xyo.diviner.indexing', true)
|
|
2
4
|
export type ImageThumbnailDivinerSchema = typeof IndexingDivinerSchema
|
package/src/Stage.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export const DivinerStageSchema = asSchema('network.xyo.diviner.stage', true)
|
|
2
|
+
export type DivinerStageSchema = typeof DivinerStageSchema
|
|
3
3
|
|
|
4
4
|
import type { ModuleIdentifier } from '@xyo-network/module-model'
|
|
5
|
+
import { asSchema } from '@xyo-network/payload-model'
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* The diviners for each stage of an indexing diviner
|