@xyo-network/diviner-jsonpath-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.
@@ -1,14 +1,16 @@
1
1
  import type { DivinerConfig } from '@xyo-network/diviner-model';
2
+ import type { Schema } from '@xyo-network/payload-model';
2
3
  import type { JsonPathTransformExpression } from './jsonpath/index.ts';
3
- import { JsonPathDivinerSchema } from './Schema.ts';
4
4
  /**
5
- * The config schema type for the JSON Path diviner
5
+ * The config schema for the JSON Path diviner
6
6
  */
7
- export type JsonPathDivinerConfigSchema = `${JsonPathDivinerSchema}.config`;
7
+ export declare const JsonPathDivinerConfigSchema: string & {
8
+ readonly __schema: true;
9
+ };
8
10
  /**
9
- * The config schema for the JSON Path diviner
11
+ * The config schema type for the JSON Path diviner
10
12
  */
11
- export declare const JsonPathDivinerConfigSchema: JsonPathDivinerConfigSchema;
13
+ export type JsonPathDivinerConfigSchema = typeof JsonPathDivinerConfigSchema;
12
14
  /**
13
15
  * The configuration for the JSON Path diviner
14
16
  */
@@ -16,7 +18,7 @@ export type JsonPathDivinerConfig = DivinerConfig<{
16
18
  /**
17
19
  * The schema to use for the destination payloads
18
20
  */
19
- destinationSchema?: string;
21
+ destinationSchema?: Schema;
20
22
  /**
21
23
  * The JSON Path transform expressions to apply to the payloads
22
24
  */
@@ -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,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,GAAG,qBAAqB,SAAS,CAAA;AAC3E;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,2BAA+D,CAAA;AAEzG;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAC/C;IACE;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,2BAA2B,EAAE,CAAA;CAC3C,GAAG;IAAE,MAAM,EAAE,2BAA2B,CAAA;CAAE,CAC5C,CAAA"}
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAGxD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AAGtE;;GAEG;AACH,eAAO,MAAM,2BAA2B;;CAAoD,CAAA;AAE5F;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAC/C;IACE;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,2BAA2B,EAAE,CAAA;CAC3C,GAAG;IAAE,MAAM,EAAE,2BAA2B,CAAA;CAAE,CAC5C,CAAA"}
@@ -1,9 +1,11 @@
1
1
  /**
2
- * The schema type used for the JSONPath Diviner.
2
+ * The schema used for the JSONPath Diviner.
3
3
  */
4
- export type JsonPathDivinerSchema = 'network.xyo.diviner.jsonpath';
4
+ export declare const JsonPathDivinerSchema: "network.xyo.diviner.jsonpath" & {
5
+ readonly __schema: true;
6
+ };
5
7
  /**
6
- * The schema used for the JSONPath Diviner.
8
+ * The schema type used for the JSONPath Diviner.
7
9
  */
8
- export declare const JsonPathDivinerSchema: JsonPathDivinerSchema;
10
+ export type JsonPathDivinerSchema = typeof JsonPathDivinerSchema;
9
11
  //# sourceMappingURL=Schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,8BAA8B,CAAA;AAClE;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,qBAAsD,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,qBAAqB;;CAAiD,CAAA;AAEnF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA"}
@@ -1,8 +1,12 @@
1
+ // src/Config.ts
2
+ import { asSchema as asSchema2 } from "@xyo-network/payload-model";
3
+
1
4
  // src/Schema.ts
2
- var JsonPathDivinerSchema = "network.xyo.diviner.jsonpath";
5
+ import { asSchema } from "@xyo-network/payload-model";
6
+ var JsonPathDivinerSchema = asSchema("network.xyo.diviner.jsonpath", true);
3
7
 
4
8
  // src/Config.ts
5
- var JsonPathDivinerConfigSchema = `${JsonPathDivinerSchema}.config`;
9
+ var JsonPathDivinerConfigSchema = asSchema2(`${JsonPathDivinerSchema}.config`, true);
6
10
  export {
7
11
  JsonPathDivinerConfigSchema,
8
12
  JsonPathDivinerSchema
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Schema.ts","../../src/Config.ts"],"sourcesContent":["/**\n * The schema type used for the JSONPath Diviner.\n */\nexport type JsonPathDivinerSchema = 'network.xyo.diviner.jsonpath'\n/**\n * The schema used for the JSONPath Diviner.\n */\nexport const JsonPathDivinerSchema: JsonPathDivinerSchema = 'network.xyo.diviner.jsonpath'\n","import type { DivinerConfig } from '@xyo-network/diviner-model'\n\nimport type { JsonPathTransformExpression } from './jsonpath/index.ts'\nimport { JsonPathDivinerSchema } from './Schema.ts'\n\n/**\n * The config schema type for the JSON Path diviner\n */\nexport type JsonPathDivinerConfigSchema = `${JsonPathDivinerSchema}.config`\n/**\n * The config schema for the JSON Path diviner\n */\nexport const JsonPathDivinerConfigSchema: JsonPathDivinerConfigSchema = `${JsonPathDivinerSchema}.config`\n\n/**\n * The configuration for the JSON Path diviner\n */\nexport type JsonPathDivinerConfig = DivinerConfig<\n {\n /**\n * The schema to use for the destination payloads\n */\n destinationSchema?: string\n /**\n * The JSON Path transform expressions to apply to the payloads\n */\n transforms?: JsonPathTransformExpression[]\n } & { schema: JsonPathDivinerConfigSchema }\n>\n"],"mappings":";AAOO,IAAM,wBAA+C;;;ACKrD,IAAM,8BAA2D,GAAG,qBAAqB;","names":[]}
1
+ {"version":3,"sources":["../../src/Config.ts","../../src/Schema.ts"],"sourcesContent":["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/payload-model'\nimport { asSchema } from '@xyo-network/payload-model'\n\nimport type { JsonPathTransformExpression } from './jsonpath/index.ts'\nimport { JsonPathDivinerSchema } from './Schema.ts'\n\n/**\n * The config schema for the JSON Path diviner\n */\nexport const JsonPathDivinerConfigSchema = asSchema(`${JsonPathDivinerSchema}.config`, true)\n\n/**\n * The config schema type for the JSON Path diviner\n */\nexport type JsonPathDivinerConfigSchema = typeof JsonPathDivinerConfigSchema\n\n/**\n * The configuration for the JSON Path diviner\n */\nexport type JsonPathDivinerConfig = DivinerConfig<\n {\n /**\n * The schema to use for the destination payloads\n */\n destinationSchema?: Schema\n /**\n * The JSON Path transform expressions to apply to the payloads\n */\n transforms?: JsonPathTransformExpression[]\n } & { schema: JsonPathDivinerConfigSchema }\n>\n","import { asSchema } from '@xyo-network/payload-model'\n/**\n * The schema used for the JSONPath Diviner.\n */\nexport const JsonPathDivinerSchema = asSchema('network.xyo.diviner.jsonpath', true)\n\n/**\n * The schema type used for the JSONPath Diviner.\n */\nexport type JsonPathDivinerSchema = typeof JsonPathDivinerSchema\n"],"mappings":";AAEA,SAAS,YAAAA,iBAAgB;;;ACFzB,SAAS,gBAAgB;AAIlB,IAAM,wBAAwB,SAAS,gCAAgC,IAAI;;;ADM3E,IAAM,8BAA8BC,UAAS,GAAG,qBAAqB,WAAW,IAAI;","names":["asSchema","asSchema"]}
@@ -1,11 +1,12 @@
1
+ import type { Schema } from '@xyo-network/payload-model';
1
2
  import type { JsonPathTransformExpression } from './JsonPathTransformExpression.ts';
2
3
  /**
3
4
  * A dictionary of schema to JSON Path transform expressions.
4
5
  */
5
6
  export type SchemaToJsonPathTransformExpressionsDictionary<T extends {
6
- [schema: string]: unknown;
7
+ [schema: Schema]: unknown;
7
8
  } = {
8
- [schema: string]: unknown;
9
+ [schema: Schema]: unknown;
9
10
  }> = {
10
11
  [key in keyof T]: JsonPathTransformExpression[];
11
12
  };
@@ -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;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
+ {"version":3,"file":"SchemaToJsonPathTransformExpressionDictionary.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/SchemaToJsonPathTransformExpressionDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-jsonpath-model",
3
- "version": "5.2.27",
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.2.27",
41
- "@xyo-network/module-model": "~5.2.27",
42
- "@xyo-network/payload-model": "~5.2.27"
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,16 +1,19 @@
1
1
  import type { DivinerConfig } from '@xyo-network/diviner-model'
2
+ import type { Schema } from '@xyo-network/payload-model'
3
+ import { asSchema } from '@xyo-network/payload-model'
2
4
 
3
5
  import type { JsonPathTransformExpression } from './jsonpath/index.ts'
4
6
  import { JsonPathDivinerSchema } from './Schema.ts'
5
7
 
6
8
  /**
7
- * The config schema type for the JSON Path diviner
9
+ * The config schema for the JSON Path diviner
8
10
  */
9
- export type JsonPathDivinerConfigSchema = `${JsonPathDivinerSchema}.config`
11
+ export const JsonPathDivinerConfigSchema = asSchema(`${JsonPathDivinerSchema}.config`, true)
12
+
10
13
  /**
11
- * The config schema for the JSON Path diviner
14
+ * The config schema type for the JSON Path diviner
12
15
  */
13
- export const JsonPathDivinerConfigSchema: JsonPathDivinerConfigSchema = `${JsonPathDivinerSchema}.config`
16
+ export type JsonPathDivinerConfigSchema = typeof JsonPathDivinerConfigSchema
14
17
 
15
18
  /**
16
19
  * The configuration for the JSON Path diviner
@@ -20,7 +23,7 @@ export type JsonPathDivinerConfig = DivinerConfig<
20
23
  /**
21
24
  * The schema to use for the destination payloads
22
25
  */
23
- destinationSchema?: string
26
+ destinationSchema?: Schema
24
27
  /**
25
28
  * The JSON Path transform expressions to apply to the payloads
26
29
  */
package/src/Schema.ts CHANGED
@@ -1,8 +1,10 @@
1
+ import { asSchema } from '@xyo-network/payload-model'
1
2
  /**
2
- * The schema type used for the JSONPath Diviner.
3
+ * The schema used for the JSONPath Diviner.
3
4
  */
4
- export type JsonPathDivinerSchema = 'network.xyo.diviner.jsonpath'
5
+ export const JsonPathDivinerSchema = asSchema('network.xyo.diviner.jsonpath', true)
6
+
5
7
  /**
6
- * The schema used for the JSONPath Diviner.
8
+ * The schema type used for the JSONPath Diviner.
7
9
  */
8
- export const JsonPathDivinerSchema: JsonPathDivinerSchema = 'network.xyo.diviner.jsonpath'
10
+ export type JsonPathDivinerSchema = typeof JsonPathDivinerSchema
@@ -1,8 +1,10 @@
1
+ import type { Schema } from '@xyo-network/payload-model'
2
+
1
3
  import type { JsonPathTransformExpression } from './JsonPathTransformExpression.ts'
2
4
 
3
5
  /**
4
6
  * A dictionary of schema to JSON Path transform expressions.
5
7
  */
6
- export type SchemaToJsonPathTransformExpressionsDictionary<T extends { [schema: string]: unknown } = { [schema: string]: unknown }> = {
8
+ export type SchemaToJsonPathTransformExpressionsDictionary<T extends { [schema: Schema]: unknown } = { [schema: Schema]: unknown }> = {
7
9
  [key in keyof T]: JsonPathTransformExpression[]
8
10
  }