@xyo-network/diviner-jsonpath-model 7.2.3 → 7.3.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.
@@ -1,5 +1,2 @@
1
- export * from './Config.ts';
2
- export * from './jsonpath/index.ts';
3
- export * from './Params.ts';
4
- export * from './Schema.ts';
1
+ export * from '@xyo-network/diviner-jsonpath/model';
5
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,qCAAqC,CAAA"}
@@ -1,33 +1,3 @@
1
- // src/Config.ts
2
- import {
3
- zodAsFactory,
4
- zodIsFactory,
5
- zodToFactory
6
- } from "@ariestools/sdk";
7
- import { DivinerConfigZod } from "@xyo-network/sdk/diviner-model";
8
- import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol";
9
- import * as z from "zod/mini";
10
-
11
- // src/Schema.ts
12
- import { asSchema } from "@xyo-network/sdk-protocol";
13
- var JsonPathDivinerSchema = asSchema("network.xyo.diviner.jsonpath", true);
14
-
15
- // src/Config.ts
16
- var JsonPathDivinerConfigSchema = asSchema2(`${JsonPathDivinerSchema}.config`, true);
17
- var JsonPathDivinerConfigZod = z.extend(DivinerConfigZod, {
18
- destinationSchema: z.optional(z.custom()),
19
- schema: z.literal(JsonPathDivinerConfigSchema),
20
- transforms: z.optional(z.array(z.custom()))
21
- });
22
- var isJsonPathDivinerConfig = zodIsFactory(JsonPathDivinerConfigZod);
23
- var asJsonPathDivinerConfig = zodAsFactory(JsonPathDivinerConfigZod, "asJsonPathDivinerConfig");
24
- var toJsonPathDivinerConfig = zodToFactory(JsonPathDivinerConfigZod, "toJsonPathDivinerConfig");
25
- export {
26
- JsonPathDivinerConfigSchema,
27
- JsonPathDivinerConfigZod,
28
- JsonPathDivinerSchema,
29
- asJsonPathDivinerConfig,
30
- isJsonPathDivinerConfig,
31
- toJsonPathDivinerConfig
32
- };
1
+ // src/index.ts
2
+ export * from "@xyo-network/diviner-jsonpath/model";
33
3
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/Config.ts", "../../src/Schema.ts"],
4
- "sourcesContent": ["import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@ariestools/sdk'\nimport type { DivinerConfig } from '@xyo-network/sdk/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/sdk/diviner-model'\nimport type { Schema } from '@xyo-network/sdk-protocol'\nimport { asSchema } from '@xyo-network/sdk-protocol'\nimport * as z from 'zod/mini'\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: string & {\n readonly __schema: true\n} = 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 Zod schema for the JSON Path diviner config\n */\nexport const JsonPathDivinerConfigZod: z.ZodMiniObject<\n Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {\n destinationSchema: z.ZodMiniOptional<z.ZodMiniCustom<Schema, Schema>>\n schema: z.ZodMiniLiteral<JsonPathDivinerConfigSchema>\n transforms: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniCustom<JsonPathTransformExpression, JsonPathTransformExpression>>>\n },\n z.core.$strip\n> = z.extend(DivinerConfigZod, {\n destinationSchema: z.optional(z.custom<Schema>()),\n schema: z.literal(JsonPathDivinerConfigSchema),\n transforms: z.optional(z.array(z.custom<JsonPathTransformExpression>())),\n})\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\nexport const isJsonPathDivinerConfig: ReturnType<typeof zodIsFactory<JsonPathDivinerConfig>> = zodIsFactory(JsonPathDivinerConfigZod)\nexport const asJsonPathDivinerConfig: ReturnType<typeof zodAsFactory<JsonPathDivinerConfig>> = zodAsFactory(JsonPathDivinerConfigZod, 'asJsonPathDivinerConfig')\nexport const toJsonPathDivinerConfig: ReturnType<typeof zodToFactory<JsonPathDivinerConfig>> = zodToFactory(JsonPathDivinerConfigZod, 'toJsonPathDivinerConfig')\n", "import { asSchema } from '@xyo-network/sdk-protocol'\n/**\n * The schema used for the JSONPath Diviner.\n */\nexport const JsonPathDivinerSchema: 'network.xyo.diviner.jsonpath' & {\n readonly __schema: true\n} = asSchema('network.xyo.diviner.jsonpath', true)\n\n/**\n * The schema type used for the JSONPath Diviner.\n */\nexport type JsonPathDivinerSchema = typeof JsonPathDivinerSchema\n"],
5
- "mappings": ";AAAA;AAAA,EACE;AAAA,EAAc;AAAA,EAAc;AAAA,OACvB;AAEP,SAAS,wBAAwB;AAEjC,SAAS,YAAAA,iBAAgB;AACzB,YAAY,OAAO;;;ACPnB,SAAS,gBAAgB;AAIlB,IAAM,wBAET,SAAS,gCAAgC,IAAI;;;ADS1C,IAAM,8BAETC,UAAS,GAAG,qBAAqB,WAAW,IAAI;AAU7C,IAAM,2BAOP,SAAO,kBAAkB;AAAA,EAC7B,mBAAqB,WAAW,SAAe,CAAC;AAAA,EAChD,QAAU,UAAQ,2BAA2B;AAAA,EAC7C,YAAc,WAAW,QAAQ,SAAoC,CAAC,CAAC;AACzE,CAAC;AAkBM,IAAM,0BAAkF,aAAa,wBAAwB;AAC7H,IAAM,0BAAkF,aAAa,0BAA0B,yBAAyB;AACxJ,IAAM,0BAAkF,aAAa,0BAA0B,yBAAyB;",
6
- "names": ["asSchema", "asSchema"]
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["// Compatibility shim: this package re-exports from @xyo-network/diviner-jsonpath/model.\nexport * from '@xyo-network/diviner-jsonpath/model'\n"],
5
+ "mappings": ";AACA,cAAc;",
6
+ "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-jsonpath-model",
3
- "version": "7.2.3",
3
+ "version": "7.3.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -34,28 +34,24 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@xyo-network/sdk": "~7.2.3"
37
+ "@xyo-network/diviner-jsonpath": "~7.3.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@ariestools/sdk": "~8.1.6",
41
- "@ariestools/toolchain": "~8.7.26",
42
- "@ariestools/tsconfig": "~8.7.26",
40
+ "@ariestools/sdk": "~8.1.9",
41
+ "@ariestools/toolchain": "~9.1.1",
42
+ "@ariestools/tsconfig": "~9.1.1",
43
43
  "@opentelemetry/api": "~1.9.1",
44
- "@xyo-network/sdk-protocol": "~7.2.3",
45
- "eslint": "~10.8.0",
44
+ "@xyo-network/sdk-protocol": "~7.3.1",
45
+ "eslint": "~10.9.0",
46
46
  "eslint-import-resolver-typescript": "~4.4.5",
47
47
  "typescript": "~6.0.3",
48
48
  "zod": "~4.4.3"
49
49
  },
50
- "peerDependencies": {
51
- "@ariestools/sdk": "^8.1",
52
- "@xyo-network/sdk-protocol": "^7.2",
53
- "zod": "^4.4"
54
- },
55
50
  "engines": {
56
51
  "node": "^24"
57
52
  },
58
53
  "publishConfig": {
59
54
  "access": "public"
60
- }
55
+ },
56
+ "deprecated": "Use @xyo-network/diviner-jsonpath/model instead. This package is a compatibility shim only and will not receive further updates."
61
57
  }
@@ -1,43 +0,0 @@
1
- import { zodAsFactory, zodIsFactory, zodToFactory } from '@ariestools/sdk';
2
- import type { DivinerConfig } from '@xyo-network/sdk/diviner-model';
3
- import { DivinerConfigZod } from '@xyo-network/sdk/diviner-model';
4
- import type { Schema } from '@xyo-network/sdk-protocol';
5
- import * as z from 'zod/mini';
6
- import type { JsonPathTransformExpression } from './jsonpath/index.ts';
7
- /**
8
- * The config schema for the JSON Path diviner
9
- */
10
- export declare const JsonPathDivinerConfigSchema: string & {
11
- readonly __schema: true;
12
- };
13
- /**
14
- * The config schema type for the JSON Path diviner
15
- */
16
- export type JsonPathDivinerConfigSchema = typeof JsonPathDivinerConfigSchema;
17
- /**
18
- * The Zod schema for the JSON Path diviner config
19
- */
20
- export declare const JsonPathDivinerConfigZod: z.ZodMiniObject<Omit<(typeof DivinerConfigZod)['shape'], 'schema'> & {
21
- destinationSchema: z.ZodMiniOptional<z.ZodMiniCustom<Schema, Schema>>;
22
- schema: z.ZodMiniLiteral<JsonPathDivinerConfigSchema>;
23
- transforms: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniCustom<JsonPathTransformExpression, JsonPathTransformExpression>>>;
24
- }, z.core.$strip>;
25
- /**
26
- * The configuration for the JSON Path diviner
27
- */
28
- export type JsonPathDivinerConfig = DivinerConfig<{
29
- /**
30
- * The schema to use for the destination payloads
31
- */
32
- destinationSchema?: Schema;
33
- /**
34
- * The JSON Path transform expressions to apply to the payloads
35
- */
36
- transforms?: JsonPathTransformExpression[];
37
- } & {
38
- schema: JsonPathDivinerConfigSchema;
39
- }>;
40
- export declare const isJsonPathDivinerConfig: ReturnType<typeof zodIsFactory<JsonPathDivinerConfig>>;
41
- export declare const asJsonPathDivinerConfig: ReturnType<typeof zodAsFactory<JsonPathDivinerConfig>>;
42
- export declare const toJsonPathDivinerConfig: ReturnType<typeof zodToFactory<JsonPathDivinerConfig>>;
43
- //# sourceMappingURL=Config.d.ts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B;;OAEG;IACH,UAAU,CAAC,EAAE,2BAA2B,EAAE,CAAA;CAC3C,GAAG;IAAE,MAAM,EAAE,2BAA2B,CAAA;CAAE,CAC5C,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,qBAAqB,CAAC,CAA0C,CAAA;AACrI,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,qBAAqB,CAAC,CAAqE,CAAA;AAChK,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,qBAAqB,CAAC,CAAqE,CAAA"}
@@ -1,8 +0,0 @@
1
- import type { DivinerParams } from '@xyo-network/sdk/diviner-model';
2
- import type { AnyConfigSchema } from '@xyo-network/sdk/module-model';
3
- import type { JsonPathDivinerConfig } from './Config.ts';
4
- /**
5
- * The params type the JSON Path diviner
6
- **/
7
- export type JsonPathDivinerParams = DivinerParams<AnyConfigSchema<JsonPathDivinerConfig>>;
8
- //# sourceMappingURL=Params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Params.d.ts","sourceRoot":"","sources":["../../src/Params.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD;;IAEI;AACJ,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAA"}
@@ -1,11 +0,0 @@
1
- /**
2
- * The schema used for the JSONPath Diviner.
3
- */
4
- export declare const JsonPathDivinerSchema: 'network.xyo.diviner.jsonpath' & {
5
- readonly __schema: true;
6
- };
7
- /**
8
- * The schema type used for the JSONPath Diviner.
9
- */
10
- export type JsonPathDivinerSchema = typeof JsonPathDivinerSchema;
11
- //# sourceMappingURL=Schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,8BAA8B,GAAG;IACnE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CACyB,CAAA;AAElD;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA"}
@@ -1,20 +0,0 @@
1
- import type { JsonValue } from '@ariestools/sdk';
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"JsonPathTransformExpression.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/JsonPathTransformExpression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD;;;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,3 +0,0 @@
1
- import type { Payload } from '@xyo-network/sdk-protocol';
2
- export type PayloadTransformer = (x: Payload) => Partial<Payload>;
3
- //# sourceMappingURL=PayloadTransformer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PayloadTransformer.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/PayloadTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAIxD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA"}
@@ -1,9 +0,0 @@
1
- import type { Schema } from '@xyo-network/sdk-protocol';
2
- import type { JsonPathTransformExpression } from './JsonPathTransformExpression.ts';
3
- /**
4
- * A dictionary of schema to JSON Path transform expressions.
5
- */
6
- export type SchemaToJsonPathTransformExpressionsDictionary<T extends Record<Schema, unknown> = Record<Schema, unknown>> = {
7
- [key in keyof T]: JsonPathTransformExpression[];
8
- };
9
- //# sourceMappingURL=SchemaToJsonPathTransformExpressionDictionary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SchemaToJsonPathTransformExpressionDictionary.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/SchemaToJsonPathTransformExpressionDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAEvD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAEnF;;GAEG;AACH,MAAM,MAAM,8CAA8C,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;KACvH,GAAG,IAAI,MAAM,CAAC,GAAG,2BAA2B,EAAE;CAChD,CAAA"}
@@ -1,6 +0,0 @@
1
- import type { PayloadTransformer } from './PayloadTransformer.ts';
2
- /**
3
- * A dictionary of schema to payload transformers
4
- */
5
- export type SchemaToPayloadTransformersDictionary = Record<string, PayloadTransformer[]>;
6
- //# sourceMappingURL=SchemaToPayloadTransformersDictionary.d.ts.map
@@ -1 +0,0 @@
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,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- export * from './JsonPathTransformExpression.ts';
2
- export * from './PayloadTransformer.ts';
3
- export * from './SchemaToJsonPathTransformExpressionDictionary.ts';
4
- export * from './SchemaToPayloadTransformersDictionary.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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"}