@xyo-network/diviner-jsonpath-aggregate-model 3.9.17 → 3.9.19
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 +31 -0
- package/dist/neutral/Config.d.ts.map +1 -0
- package/dist/neutral/Params.d.ts +8 -0
- package/dist/neutral/Params.d.ts.map +1 -0
- package/dist/neutral/Schema.d.ts +9 -0
- package/dist/neutral/Schema.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +5 -41
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/jsonpath/JsonPathTransformExpression.d.ts +20 -0
- package/dist/neutral/jsonpath/JsonPathTransformExpression.d.ts.map +1 -0
- package/dist/neutral/jsonpath/PayloadTransformer.d.ts +3 -0
- package/dist/neutral/jsonpath/PayloadTransformer.d.ts.map +1 -0
- package/dist/neutral/jsonpath/SchemaToJsonPathTransformExpressionDictionary.d.ts +12 -0
- package/dist/neutral/jsonpath/SchemaToJsonPathTransformExpressionDictionary.d.ts.map +1 -0
- package/dist/neutral/jsonpath/SchemaToPayloadTransformersDictionary.d.ts +8 -0
- package/dist/neutral/jsonpath/SchemaToPayloadTransformersDictionary.d.ts.map +1 -0
- package/dist/neutral/jsonpath/index.d.ts +5 -0
- package/dist/neutral/jsonpath/index.d.ts.map +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DivinerConfig } from '@xyo-network/diviner-model';
|
|
2
|
+
import type { SchemaToJsonPathTransformExpressionsDictionary } from './jsonpath/index.ts';
|
|
3
|
+
import { JsonPathAggregateDivinerSchema } from './Schema.ts';
|
|
4
|
+
/**
|
|
5
|
+
* The config schema type for the JSON Path diviner
|
|
6
|
+
*/
|
|
7
|
+
export type JsonPathAggregateDivinerConfigSchema = `${JsonPathAggregateDivinerSchema}.config`;
|
|
8
|
+
/**
|
|
9
|
+
* The config schema for the JSON Path diviner
|
|
10
|
+
*/
|
|
11
|
+
export declare const JsonPathAggregateDivinerConfigSchema: JsonPathAggregateDivinerConfigSchema;
|
|
12
|
+
/**
|
|
13
|
+
* The configuration for the JSON Path diviner
|
|
14
|
+
*/
|
|
15
|
+
export type JsonPathAggregateDivinerConfig = DivinerConfig<{
|
|
16
|
+
/**
|
|
17
|
+
* The schema to use for the destination payloads
|
|
18
|
+
*/
|
|
19
|
+
destinationSchema?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Exclude the source hashes from the destination payload.
|
|
22
|
+
*/
|
|
23
|
+
excludeSources?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The JSON Path transform expressions to apply to the payloads
|
|
26
|
+
*/
|
|
27
|
+
schemaTransforms?: SchemaToJsonPathTransformExpressionsDictionary;
|
|
28
|
+
} & {
|
|
29
|
+
schema: JsonPathAggregateDivinerConfigSchema;
|
|
30
|
+
}>;
|
|
31
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE/D,OAAO,KAAK,EAAE,8CAA8C,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAE5D;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,GAAG,8BAA8B,SAAS,CAAA;AAC7F;;GAEG;AACH,eAAO,MAAM,oCAAoC,EAAE,oCAAiF,CAAA;AAEpI;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,aAAa,CACxD;IACE;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;OAEG;IACH,gBAAgB,CAAC,EAAE,8CAA8C,CAAA;CAClE,GAAG;IAAE,MAAM,EAAE,oCAAoC,CAAA;CAAE,CACrD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DivinerParams } from '@xyo-network/diviner-model';
|
|
2
|
+
import type { AnyConfigSchema } from '@xyo-network/module-model';
|
|
3
|
+
import type { JsonPathAggregateDivinerConfig } from './Config.ts';
|
|
4
|
+
/**
|
|
5
|
+
* The params type the JSON Path diviner
|
|
6
|
+
**/
|
|
7
|
+
export type JsonPathAggregateDivinerParams = DivinerParams<AnyConfigSchema<JsonPathAggregateDivinerConfig>>;
|
|
8
|
+
//# sourceMappingURL=Params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAA;AAEjE;;IAEI;AACJ,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The schema used for the JSONPath Diviner.
|
|
3
|
+
*/
|
|
4
|
+
export declare const JsonPathAggregateDivinerSchema: "network.xyo.diviner.jsonpath.aggregate";
|
|
5
|
+
/**
|
|
6
|
+
* The schema type used for the JSONPath Diviner.
|
|
7
|
+
*/
|
|
8
|
+
export type JsonPathAggregateDivinerSchema = typeof JsonPathAggregateDivinerSchema;
|
|
9
|
+
//# sourceMappingURL=Schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAG,wCAAiD,CAAA;AAE/F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,OAAO,8BAA8B,CAAA"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,41 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
interface JsonPathTransformExpression {
|
|
7
|
-
defaultValue?: JsonValue;
|
|
8
|
-
destinationField: string;
|
|
9
|
-
sourcePathExpression: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type PayloadTransformer = (x: Payload) => Partial<Payload>;
|
|
13
|
-
|
|
14
|
-
type SchemaToJsonPathTransformExpressionsDictionary<T extends {
|
|
15
|
-
[schema: string]: unknown;
|
|
16
|
-
} = {
|
|
17
|
-
[schema: string]: unknown;
|
|
18
|
-
}> = {
|
|
19
|
-
[key in keyof T]: JsonPathTransformExpression[];
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
type SchemaToPayloadTransformersDictionary = {
|
|
23
|
-
[schema: string]: PayloadTransformer[];
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
declare const JsonPathAggregateDivinerSchema: "network.xyo.diviner.jsonpath.aggregate";
|
|
27
|
-
type JsonPathAggregateDivinerSchema = typeof JsonPathAggregateDivinerSchema;
|
|
28
|
-
|
|
29
|
-
type JsonPathAggregateDivinerConfigSchema = `${JsonPathAggregateDivinerSchema}.config`;
|
|
30
|
-
declare const JsonPathAggregateDivinerConfigSchema: JsonPathAggregateDivinerConfigSchema;
|
|
31
|
-
type JsonPathAggregateDivinerConfig = DivinerConfig<{
|
|
32
|
-
destinationSchema?: string;
|
|
33
|
-
excludeSources?: boolean;
|
|
34
|
-
schemaTransforms?: SchemaToJsonPathTransformExpressionsDictionary;
|
|
35
|
-
} & {
|
|
36
|
-
schema: JsonPathAggregateDivinerConfigSchema;
|
|
37
|
-
}>;
|
|
38
|
-
|
|
39
|
-
type JsonPathAggregateDivinerParams = DivinerParams<AnyConfigSchema<JsonPathAggregateDivinerConfig>>;
|
|
40
|
-
|
|
41
|
-
export { type JsonPathAggregateDivinerConfig, JsonPathAggregateDivinerConfigSchema, type JsonPathAggregateDivinerParams, JsonPathAggregateDivinerSchema, type JsonPathTransformExpression, type PayloadTransformer, type SchemaToJsonPathTransformExpressionsDictionary, type SchemaToPayloadTransformersDictionary };
|
|
1
|
+
export * from './Config.ts';
|
|
2
|
+
export * from './jsonpath/index.ts';
|
|
3
|
+
export * from './Params.ts';
|
|
4
|
+
export * from './Schema.ts';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { JsonValue } from '@xylabs/object';
|
|
2
|
+
/**
|
|
3
|
+
* Describes the JSON-path transformation to retrieve a field on a source object
|
|
4
|
+
* and the target field to store the value to on a destination object
|
|
5
|
+
*/
|
|
6
|
+
export interface JsonPathTransformExpression {
|
|
7
|
+
/**
|
|
8
|
+
* The default value to use if the source field does not exist
|
|
9
|
+
*/
|
|
10
|
+
defaultValue?: JsonValue;
|
|
11
|
+
/**
|
|
12
|
+
* The target field to store the source field into on the destination object
|
|
13
|
+
*/
|
|
14
|
+
destinationField: string;
|
|
15
|
+
/**
|
|
16
|
+
* The JSON path expressions for the source field on the source object
|
|
17
|
+
*/
|
|
18
|
+
sourcePathExpression: string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=JsonPathTransformExpression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonPathTransformExpression.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/JsonPathTransformExpression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAA;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayloadTransformer.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/PayloadTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { JsonPathTransformExpression } from './JsonPathTransformExpression.ts';
|
|
2
|
+
/**
|
|
3
|
+
* A dictionary of schema to JSON Path transform expressions.
|
|
4
|
+
*/
|
|
5
|
+
export type SchemaToJsonPathTransformExpressionsDictionary<T extends {
|
|
6
|
+
[schema: string]: unknown;
|
|
7
|
+
} = {
|
|
8
|
+
[schema: string]: unknown;
|
|
9
|
+
}> = {
|
|
10
|
+
[key in keyof T]: JsonPathTransformExpression[];
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=SchemaToJsonPathTransformExpressionDictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaToJsonPathTransformExpressionDictionary.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/SchemaToJsonPathTransformExpressionDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAEnF;;GAEG;AACH,MAAM,MAAM,8CAA8C,CAAC,CAAC,SAAS;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAAG;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,IAAI;KACnI,GAAG,IAAI,MAAM,CAAC,GAAG,2BAA2B,EAAE;CAChD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PayloadTransformer } from './PayloadTransformer.ts';
|
|
2
|
+
/**
|
|
3
|
+
* A dictionary of schema to payload transformers
|
|
4
|
+
*/
|
|
5
|
+
export type SchemaToPayloadTransformersDictionary = {
|
|
6
|
+
[schema: string]: PayloadTransformer[];
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=SchemaToPayloadTransformersDictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaToPayloadTransformersDictionary.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/SchemaToPayloadTransformersDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAAA;CAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA;AAChD,cAAc,yBAAyB,CAAA;AACvC,cAAc,oDAAoD,CAAA;AAClE,cAAc,4CAA4C,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/diviner-jsonpath-aggregate-model",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.19",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@xylabs/object": "^4.5.1",
|
|
33
|
-
"@xyo-network/diviner-model": "^3.9.
|
|
34
|
-
"@xyo-network/module-model": "^3.9.
|
|
35
|
-
"@xyo-network/payload-model": "^3.9.
|
|
33
|
+
"@xyo-network/diviner-model": "^3.9.19",
|
|
34
|
+
"@xyo-network/module-model": "^3.9.19",
|
|
35
|
+
"@xyo-network/payload-model": "^3.9.19"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@xylabs/ts-scripts-yarn3": "^5.0.
|
|
39
|
-
"@xylabs/tsconfig": "^5.0.
|
|
40
|
-
"typescript": "^5.
|
|
38
|
+
"@xylabs/ts-scripts-yarn3": "^5.0.39",
|
|
39
|
+
"@xylabs/tsconfig": "^5.0.39",
|
|
40
|
+
"typescript": "^5.8.2"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|