@xyo-network/diviner-jsonpath-aggregate-model 3.3.0 → 3.3.2

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.
@@ -1,11 +1,29 @@
1
1
  import type { DivinerConfig } from '@xyo-network/diviner-model';
2
2
  import type { SchemaToJsonPathTransformExpressionsDictionary } from './jsonpath/index.ts';
3
3
  import { JsonPathAggregateDivinerSchema } from './Schema.ts';
4
+ /**
5
+ * The config schema type for the JSON Path diviner
6
+ */
4
7
  export type JsonPathAggregateDivinerConfigSchema = `${JsonPathAggregateDivinerSchema}.config`;
8
+ /**
9
+ * The config schema for the JSON Path diviner
10
+ */
5
11
  export declare const JsonPathAggregateDivinerConfigSchema: JsonPathAggregateDivinerConfigSchema;
12
+ /**
13
+ * The configuration for the JSON Path diviner
14
+ */
6
15
  export type JsonPathAggregateDivinerConfig = DivinerConfig<{
16
+ /**
17
+ * The schema to use for the destination payloads
18
+ */
7
19
  destinationSchema?: string;
20
+ /**
21
+ * Exclude the source hashes from the destination payload.
22
+ */
8
23
  excludeSources?: boolean;
24
+ /**
25
+ * The JSON Path transform expressions to apply to the payloads
26
+ */
9
27
  schemaTransforms?: SchemaToJsonPathTransformExpressionsDictionary;
10
28
  } & {
11
29
  schema: JsonPathAggregateDivinerConfigSchema;
@@ -1 +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;AAK5D,MAAM,MAAM,oCAAoC,GAAG,GAAG,8BAA8B,SAAS,CAAA;AAI7F,eAAO,MAAM,oCAAoC,EAAE,oCAAiF,CAAA;AAKpI,MAAM,MAAM,8BAA8B,GAAG,aAAa,CACxD;IAIE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAI1B,cAAc,CAAC,EAAE,OAAO,CAAA;IAIxB,gBAAgB,CAAC,EAAE,8CAA8C,CAAA;CAClE,GAAG;IAAE,MAAM,EAAE,oCAAoC,CAAA;CAAE,CACrD,CAAA"}
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"}
@@ -1,5 +1,8 @@
1
1
  import type { DivinerParams } from '@xyo-network/diviner-model';
2
2
  import type { AnyConfigSchema } from '@xyo-network/module-model';
3
3
  import type { JsonPathAggregateDivinerConfig } from './Config.ts';
4
+ /**
5
+ * The params type the JSON Path diviner
6
+ **/
4
7
  export type JsonPathAggregateDivinerParams = DivinerParams<AnyConfigSchema<JsonPathAggregateDivinerConfig>>;
5
8
  //# sourceMappingURL=Params.d.ts.map
@@ -1 +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;AAKjE,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA"}
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"}
@@ -1,3 +1,9 @@
1
+ /**
2
+ * The schema used for the JSONPath Diviner.
3
+ */
1
4
  export declare const JsonPathAggregateDivinerSchema: "network.xyo.diviner.jsonpath.aggregate";
5
+ /**
6
+ * The schema type used for the JSONPath Diviner.
7
+ */
2
8
  export type JsonPathAggregateDivinerSchema = typeof JsonPathAggregateDivinerSchema;
3
9
  //# sourceMappingURL=Schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,8BAA8B,0CAAoD,CAAA;AAK/F,MAAM,MAAM,8BAA8B,GAAG,OAAO,8BAA8B,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,8BAA8B,0CAAoD,CAAA;AAE/F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,OAAO,8BAA8B,CAAA"}
@@ -1,7 +1,20 @@
1
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
+ */
2
6
  export interface JsonPathTransformExpression {
7
+ /**
8
+ * The default value to use if the source field does not exist
9
+ */
3
10
  defaultValue?: JsonValue;
11
+ /**
12
+ * The target field to store the source field into on the destination object
13
+ */
4
14
  destinationField: string;
15
+ /**
16
+ * The JSON path expressions for the source field on the source object
17
+ */
5
18
  sourcePathExpression: string;
6
19
  }
7
20
  //# sourceMappingURL=JsonPathTransformExpression.d.ts.map
@@ -1 +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;AAM/C,MAAM,WAAW,2BAA2B;IAI1C,YAAY,CAAC,EAAE,SAAS,CAAA;IAIxB,gBAAgB,EAAE,MAAM,CAAA;IAIxB,oBAAoB,EAAE,MAAM,CAAA;CAC7B"}
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"}
@@ -1,4 +1,7 @@
1
1
  import type { JsonPathTransformExpression } from './JsonPathTransformExpression.ts';
2
+ /**
3
+ * A dictionary of schema to JSON Path transform expressions.
4
+ */
2
5
  export type SchemaToJsonPathTransformExpressionsDictionary<T extends {
3
6
  [schema: string]: unknown;
4
7
  } = {
@@ -1 +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;AAKnF,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"}
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"}
@@ -1,4 +1,7 @@
1
1
  import type { PayloadTransformer } from './PayloadTransformer.ts';
2
+ /**
3
+ * A dictionary of schema to payload transformers
4
+ */
2
5
  export type SchemaToPayloadTransformersDictionary = {
3
6
  [schema: string]: PayloadTransformer[];
4
7
  };
@@ -1 +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;AAKjE,MAAM,MAAM,qCAAqC,GAAG;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAAA;CAAE,CAAA"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-jsonpath-aggregate-model",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -29,14 +29,14 @@
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "dependencies": {
32
- "@xylabs/object": "^4.2.2",
33
- "@xyo-network/diviner-model": "^3.3.0",
34
- "@xyo-network/module-model": "^3.3.0",
35
- "@xyo-network/payload-model": "^3.3.0"
32
+ "@xylabs/object": "^4.3.2",
33
+ "@xyo-network/diviner-model": "^3.3.2",
34
+ "@xyo-network/module-model": "^3.3.2",
35
+ "@xyo-network/payload-model": "^3.3.2"
36
36
  },
37
37
  "devDependencies": {
38
- "@xylabs/ts-scripts-yarn3": "^4.2.1",
39
- "@xylabs/tsconfig": "^4.2.1",
38
+ "@xylabs/ts-scripts-yarn3": "^4.2.3",
39
+ "@xylabs/tsconfig": "^4.2.3",
40
40
  "typescript": "^5.6.3"
41
41
  },
42
42
  "publishConfig": {