@xyo-network/xl1-schema 1.10.2 → 1.12.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,7 +1,7 @@
1
1
  import { z } from 'zod';
2
- declare const JsonValueSchema: z.ZodType<unknown>;
3
- export declare const JsonObjectSchema: z.ZodRecord<z.ZodString, z.ZodType<unknown, z.ZodTypeDef, unknown>>;
4
- export type JsonValue = z.infer<typeof JsonValueSchema>;
5
- export type JsonObject = z.infer<typeof JsonObjectSchema>;
2
+ declare const JsonValueZod: z.ZodType<unknown>;
3
+ export declare const JsonObjectZod: z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
4
+ export type JsonValue = z.infer<typeof JsonValueZod>;
5
+ export type JsonObject = z.infer<typeof JsonObjectZod>;
6
6
  export {};
7
7
  //# sourceMappingURL=JsonSchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"JsonSchema.d.ts","sourceRoot":"","sources":["../../src/JsonSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,QAAA,MAAM,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAQnC,CAAA;AAGL,eAAO,MAAM,gBAAgB,qEAA4B,CAAA;AAGzD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
1
+ {"version":3,"file":"JsonSchema.d.ts","sourceRoot":"","sources":["../../src/JsonSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,QAAA,MAAM,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAQhC,CAAA;AAGL,eAAO,MAAM,aAAa,mGAAqC,CAAA;AAG/D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACpD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package.json",
3
3
  "name": "@xyo-network/xl1-schema",
4
- "version": "1.10.2",
4
+ "version": "1.12.0",
5
5
  "description": "XYO Layer One SDK Schema",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -36,20 +36,20 @@
36
36
  "src"
37
37
  ],
38
38
  "dependencies": {
39
- "@xyo-network/boundwitness-model": "~5.0.1",
40
- "@xyo-network/boundwitness-wrapper": "~5.0.1",
41
- "@xyo-network/payload-builder": "~5.0.1",
42
- "@xyo-network/payload-model": "~5.0.1",
43
- "@xyo-network/payload-wrapper": "~5.0.1",
44
- "@xyo-network/schema-payload-plugin": "~5.0.1",
45
- "@xyo-network/xl1-protocol": "~1.9.3",
46
- "zod": "~3.25.76"
39
+ "@xyo-network/boundwitness-model": "~5.0.2",
40
+ "@xyo-network/boundwitness-wrapper": "~5.0.2",
41
+ "@xyo-network/payload-builder": "~5.0.2",
42
+ "@xyo-network/payload-model": "~5.0.2",
43
+ "@xyo-network/payload-wrapper": "~5.0.2",
44
+ "@xyo-network/schema-payload-plugin": "~5.0.2",
45
+ "@xyo-network/xl1-protocol": "~1.10.12",
46
+ "zod": "~4.0.17"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/node": "~24.2.0",
49
+ "@types/node": "~24.2.1",
50
50
  "@xylabs/ts-scripts-yarn3": "~7.1.0",
51
51
  "@xylabs/tsconfig": "~7.1.0",
52
- "@xyo-network/account": "~5.0.1",
52
+ "@xyo-network/account": "~5.0.2",
53
53
  "ajv": "~8.17.1",
54
54
  "typescript": "~5.9.2",
55
55
  "vitest": "~3.2.4"
package/src/JsonSchema.ts CHANGED
@@ -1,19 +1,19 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  // Define recursive JSON value schema
4
- const JsonValueSchema: z.ZodType<unknown> = z.lazy(() =>
4
+ const JsonValueZod: z.ZodType<unknown> = z.lazy(() =>
5
5
  z.union([
6
6
  z.string(),
7
7
  z.number(),
8
8
  z.boolean(),
9
9
  z.null(),
10
- z.array(JsonValueSchema),
11
- z.record(JsonValueSchema), // object with string keys and JSON values
10
+ z.array(JsonValueZod),
11
+ z.record(z.string(), JsonValueZod), // object with string keys and JSON values
12
12
  ]))
13
13
 
14
14
  // JSON object schema — top-level must be an object
15
- export const JsonObjectSchema = z.record(JsonValueSchema)
15
+ export const JsonObjectZod = z.record(z.string(), JsonValueZod)
16
16
 
17
17
  // TypeScript type for reference
18
- export type JsonValue = z.infer<typeof JsonValueSchema>
19
- export type JsonObject = z.infer<typeof JsonObjectSchema>
18
+ export type JsonValue = z.infer<typeof JsonValueZod>
19
+ export type JsonObject = z.infer<typeof JsonObjectZod>