@xyo-network/diviner-jsonpath-model 6.1.0 → 7.0.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,5 +1,8 @@
1
+ import { zodAsFactory, zodIsFactory, zodToFactory } from '@xylabs/sdk-js';
1
2
  import type { DivinerConfig } from '@xyo-network/diviner-model';
3
+ import { DivinerConfigZod } from '@xyo-network/diviner-model';
2
4
  import type { Schema } from '@xyo-network/sdk-protocol-js';
5
+ import * as z from 'zod/mini';
3
6
  import type { JsonPathTransformExpression } from './jsonpath/index.ts';
4
7
  /**
5
8
  * The config schema for the JSON Path diviner
@@ -11,6 +14,14 @@ export declare const JsonPathDivinerConfigSchema: string & {
11
14
  * The config schema type for the JSON Path diviner
12
15
  */
13
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>;
14
25
  /**
15
26
  * The configuration for the JSON Path diviner
16
27
  */
@@ -26,4 +37,7 @@ export type JsonPathDivinerConfig = DivinerConfig<{
26
37
  } & {
27
38
  schema: JsonPathDivinerConfigSchema;
28
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>>;
29
43
  //# sourceMappingURL=Config.d.ts.map
@@ -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;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAG1D,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,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,EACL,YAAY,EAAE,YAAY,EAAE,YAAY,EACzC,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAE1D,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"}
@@ -1,5 +1,12 @@
1
1
  // src/Config.ts
2
+ import {
3
+ zodAsFactory,
4
+ zodIsFactory,
5
+ zodToFactory
6
+ } from "@xylabs/sdk-js";
7
+ import { DivinerConfigZod } from "@xyo-network/diviner-model";
2
8
  import { asSchema as asSchema2 } from "@xyo-network/sdk-protocol-js";
9
+ import * as z from "zod/mini";
3
10
 
4
11
  // src/Schema.ts
5
12
  import { asSchema } from "@xyo-network/sdk-protocol-js";
@@ -7,8 +14,20 @@ var JsonPathDivinerSchema = asSchema("network.xyo.diviner.jsonpath", true);
7
14
 
8
15
  // src/Config.ts
9
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");
10
25
  export {
11
26
  JsonPathDivinerConfigSchema,
12
- JsonPathDivinerSchema
27
+ JsonPathDivinerConfigZod,
28
+ JsonPathDivinerSchema,
29
+ asJsonPathDivinerConfig,
30
+ isJsonPathDivinerConfig,
31
+ toJsonPathDivinerConfig
13
32
  };
14
33
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Config.ts", "../../src/Schema.ts"],
4
- "sourcesContent": ["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/sdk-protocol-js'\nimport { asSchema } from '@xyo-network/sdk-protocol-js'\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 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/sdk-protocol-js'\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": ";AAEA,SAAS,YAAAA,iBAAgB;;;ACFzB,SAAS,gBAAgB;AAIlB,IAAM,wBAET,SAAS,gCAAgC,IAAI;;;ADI1C,IAAM,8BAETC,UAAS,GAAG,qBAAqB,WAAW,IAAI;",
4
+ "sourcesContent": ["import {\n zodAsFactory, zodIsFactory, zodToFactory,\n} from '@xylabs/sdk-js'\nimport type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { DivinerConfigZod } from '@xyo-network/diviner-model'\nimport type { Schema } from '@xyo-network/sdk-protocol-js'\nimport { asSchema } from '@xyo-network/sdk-protocol-js'\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-js'\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
6
  "names": ["asSchema", "asSchema"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-jsonpath-model",
3
- "version": "6.1.0",
3
+ "version": "7.0.1",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -34,28 +34,28 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@xyo-network/diviner-model": "~6.1.0",
38
- "@xyo-network/module-model": "~6.1.0"
37
+ "@xyo-network/diviner-model": "~7.0.1",
38
+ "@xyo-network/module-model": "~7.0.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@bitauth/libauth": "~3.0.0",
42
42
  "@metamask/providers": "^22.1.1",
43
43
  "@noble/post-quantum": "~0.6.1",
44
44
  "@opentelemetry/api": "^1.9.1",
45
- "@opentelemetry/sdk-trace-base": "^2.7.1",
45
+ "@opentelemetry/sdk-trace-base": "^2.8.0",
46
46
  "@scure/base": "~2.2.0",
47
47
  "@scure/bip39": "~2.2.0",
48
- "@xylabs/geo": "^6.1.0",
49
- "@xylabs/sdk-js": "^6.1.0",
50
- "@xylabs/threads": "^6.1.0",
51
- "@xylabs/toolchain": "^8.1.20",
52
- "@xylabs/tsconfig": "^8.1.20",
53
- "@xyo-network/sdk-protocol-js": "^6.1.0",
48
+ "@xylabs/geo": "^6.1.4",
49
+ "@xylabs/sdk-js": "^6.1.4",
50
+ "@xylabs/threads": "^6.1.4",
51
+ "@xylabs/toolchain": "^8.3.0",
52
+ "@xylabs/tsconfig": "^8.3.0",
53
+ "@xyo-network/sdk-protocol-js": "^7.0.3",
54
54
  "ajv": "^8.20.0",
55
55
  "async-mutex": "^0.5.0",
56
56
  "debug": "~4.4.3",
57
- "eslint": "^10.4.1",
58
- "ethers": "^6.16.0",
57
+ "eslint": "^10.5.0",
58
+ "ethers": "^6.17.0",
59
59
  "hash-wasm": "~4.12.0",
60
60
  "idb": "^8.0.3",
61
61
  "observable-fns": "~0.6.1",
@@ -74,7 +74,7 @@
74
74
  "@xylabs/geo": "^6.0",
75
75
  "@xylabs/sdk-js": "^6.0",
76
76
  "@xylabs/threads": "^6.0",
77
- "@xyo-network/sdk-protocol-js": "^6.1",
77
+ "@xyo-network/sdk-protocol-js": "^7.0",
78
78
  "ajv": "^8.20",
79
79
  "async-mutex": "^0.5",
80
80
  "debug": "~4.4",