@xyo-network/diviner-jsonpath-model 7.2.3 → 7.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/index.d.ts +1 -4
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +2 -32
- package/dist/neutral/index.mjs.map +4 -4
- package/package.json +9 -13
- package/dist/neutral/Config.d.ts +0 -43
- package/dist/neutral/Config.d.ts.map +0 -1
- package/dist/neutral/Params.d.ts +0 -8
- package/dist/neutral/Params.d.ts.map +0 -1
- package/dist/neutral/Schema.d.ts +0 -11
- package/dist/neutral/Schema.d.ts.map +0 -1
- package/dist/neutral/jsonpath/JsonPathTransformExpression.d.ts +0 -20
- package/dist/neutral/jsonpath/JsonPathTransformExpression.d.ts.map +0 -1
- package/dist/neutral/jsonpath/PayloadTransformer.d.ts +0 -3
- package/dist/neutral/jsonpath/PayloadTransformer.d.ts.map +0 -1
- package/dist/neutral/jsonpath/SchemaToJsonPathTransformExpressionDictionary.d.ts +0 -9
- package/dist/neutral/jsonpath/SchemaToJsonPathTransformExpressionDictionary.d.ts.map +0 -1
- package/dist/neutral/jsonpath/SchemaToPayloadTransformersDictionary.d.ts +0 -6
- package/dist/neutral/jsonpath/SchemaToPayloadTransformersDictionary.d.ts.map +0 -1
- package/dist/neutral/jsonpath/index.d.ts +0 -5
- package/dist/neutral/jsonpath/index.d.ts.map +0 -1
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,qCAAqC,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,33 +1,3 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
|
|
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/
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
6
|
-
"names": [
|
|
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.
|
|
3
|
+
"version": "7.3.1",
|
|
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/
|
|
37
|
+
"@xyo-network/diviner-jsonpath": "~7.3.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@ariestools/sdk": "~8.1.
|
|
41
|
-
"@ariestools/toolchain": "~
|
|
42
|
-
"@ariestools/tsconfig": "~
|
|
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.
|
|
45
|
-
"eslint": "~10.
|
|
44
|
+
"@xyo-network/sdk-protocol": "~7.3.3",
|
|
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
|
}
|
package/dist/neutral/Config.d.ts
DELETED
|
@@ -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.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAEvD,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAE7B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA;AAGtE;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,GAAG;IACjD,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAA;CAC4B,CAAA;AAErD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,aAAa,CACpD,IAAI,CAAC,CAAC,OAAO,gBAAgB,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,GAAG;IACnD,iBAAiB,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACrE,MAAM,EAAE,CAAC,CAAC,cAAc,CAAC,2BAA2B,CAAC,CAAA;IACrD,UAAU,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,2BAA2B,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAA;CACzH,EACD,CAAC,CAAC,IAAI,CAAC,MAAM,CAKb,CAAA;AAEF;;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;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"}
|
package/dist/neutral/Params.d.ts
DELETED
|
@@ -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"}
|
package/dist/neutral/Schema.d.ts
DELETED
|
@@ -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 +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 +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"}
|