@xyo-network/diviner-jsonpatch-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,8 +1,9 @@
1
1
  import type { DivinerConfig } from '@xyo-network/diviner-model';
2
2
  import type { Operation } from 'fast-json-patch';
3
- import { JsonPatchDivinerSchema } from './Schema.ts';
4
- export type JsonPatchDivinerConfigSchema = `${JsonPatchDivinerSchema}.config`;
5
- export declare const JsonPatchDivinerConfigSchema: JsonPatchDivinerConfigSchema;
3
+ export declare const JsonPatchDivinerConfigSchema: string & {
4
+ readonly __schema: true;
5
+ };
6
+ export type JsonPatchDivinerConfigSchema = typeof JsonPatchDivinerConfigSchema;
6
7
  export type JsonPatchDivinerConfig = DivinerConfig<{
7
8
  operations?: Operation[];
8
9
  } & {
@@ -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,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEpD,MAAM,MAAM,4BAA4B,GAAG,GAAG,sBAAsB,SAAS,CAAA;AAC7E,eAAO,MAAM,4BAA4B,EAAE,4BAAiE,CAAA;AAS5G,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;IAAE,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,4BAA4B,CAAA;CAAE,CAAC,CAAA"}
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,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAIhD,eAAO,MAAM,4BAA4B;;CAAqD,CAAA;AAC9F,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAS9E,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC;IAAE,UAAU,CAAC,EAAE,SAAS,EAAE,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,4BAA4B,CAAA;CAAE,CAAC,CAAA"}
@@ -1,3 +1,5 @@
1
- export type JsonPatchDivinerSchema = 'network.xyo.diviner.jsonpatch';
2
- export declare const JsonPatchDivinerSchema: JsonPatchDivinerSchema;
1
+ export declare const JsonPatchDivinerSchema: "network.xyo.diviner.jsonpatch" & {
2
+ readonly __schema: true;
3
+ };
4
+ export type JsonPatchDivinerSchema = typeof JsonPatchDivinerSchema;
3
5
  //# sourceMappingURL=Schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG,+BAA+B,CAAA;AACpE,eAAO,MAAM,sBAAsB,EAAE,sBAAwD,CAAA"}
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;CAAkD,CAAA;AACrF,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,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 JsonPatchDivinerSchema = "network.xyo.diviner.jsonpatch";
5
+ import { asSchema } from "@xyo-network/payload-model";
6
+ var JsonPatchDivinerSchema = asSchema("network.xyo.diviner.jsonpatch", true);
3
7
 
4
8
  // src/Config.ts
5
- var JsonPatchDivinerConfigSchema = `${JsonPatchDivinerSchema}.config`;
9
+ var JsonPatchDivinerConfigSchema = asSchema2(`${JsonPatchDivinerSchema}.config`, true);
6
10
  export {
7
11
  JsonPatchDivinerConfigSchema,
8
12
  JsonPatchDivinerSchema
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Schema.ts","../../src/Config.ts"],"sourcesContent":["export type JsonPatchDivinerSchema = 'network.xyo.diviner.jsonpatch'\nexport const JsonPatchDivinerSchema: JsonPatchDivinerSchema = 'network.xyo.diviner.jsonpatch'\n","import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport type { Operation } from 'fast-json-patch'\n\nimport { JsonPatchDivinerSchema } from './Schema.ts'\n\nexport type JsonPatchDivinerConfigSchema = `${JsonPatchDivinerSchema}.config`\nexport const JsonPatchDivinerConfigSchema: JsonPatchDivinerConfigSchema = `${JsonPatchDivinerSchema}.config`\n\n// TODO: Export our own compatible Operation type to hide implementation details\n// export interface Operation {\n// op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test'\n// path: string\n// value?: JsonValue\n// }\n\nexport type JsonPatchDivinerConfig = DivinerConfig<{ operations?: Operation[] } & { schema: JsonPatchDivinerConfigSchema }>\n"],"mappings":";AACO,IAAM,yBAAiD;;;ACKvD,IAAM,+BAA6D,GAAG,sBAAsB;","names":[]}
1
+ {"version":3,"sources":["../../src/Config.ts","../../src/Schema.ts"],"sourcesContent":["import type { DivinerConfig } from '@xyo-network/diviner-model'\nimport { asSchema } from '@xyo-network/payload-model'\nimport type { Operation } from 'fast-json-patch'\n\nimport { JsonPatchDivinerSchema } from './Schema.ts'\n\nexport const JsonPatchDivinerConfigSchema = asSchema(`${JsonPatchDivinerSchema}.config`, true)\nexport type JsonPatchDivinerConfigSchema = typeof JsonPatchDivinerConfigSchema\n\n// TODO: Export our own compatible Operation type to hide implementation details\n// export interface Operation {\n// op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test'\n// path: string\n// value?: JsonValue\n// }\n\nexport type JsonPatchDivinerConfig = DivinerConfig<{ operations?: Operation[] } & { schema: JsonPatchDivinerConfigSchema }>\n","import { asSchema } from '@xyo-network/payload-model'\n\nexport const JsonPatchDivinerSchema = asSchema('network.xyo.diviner.jsonpatch', true)\nexport type JsonPatchDivinerSchema = typeof JsonPatchDivinerSchema\n"],"mappings":";AACA,SAAS,YAAAA,iBAAgB;;;ACDzB,SAAS,gBAAgB;AAElB,IAAM,yBAAyB,SAAS,iCAAiC,IAAI;;;ADI7E,IAAM,+BAA+BC,UAAS,GAAG,sBAAsB,WAAW,IAAI;","names":["asSchema","asSchema"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-jsonpatch-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": {
@@ -36,8 +36,9 @@
36
36
  "!**/*.test.*"
37
37
  ],
38
38
  "dependencies": {
39
- "@xyo-network/diviner-model": "~5.2.27",
40
- "@xyo-network/module-model": "~5.2.27",
39
+ "@xyo-network/diviner-model": "~5.3.1",
40
+ "@xyo-network/module-model": "~5.3.1",
41
+ "@xyo-network/payload-model": "~5.3.1",
41
42
  "fast-json-patch": "~3.1.1"
42
43
  },
43
44
  "devDependencies": {
package/src/Config.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import type { DivinerConfig } from '@xyo-network/diviner-model'
2
+ import { asSchema } from '@xyo-network/payload-model'
2
3
  import type { Operation } from 'fast-json-patch'
3
4
 
4
5
  import { JsonPatchDivinerSchema } from './Schema.ts'
5
6
 
6
- export type JsonPatchDivinerConfigSchema = `${JsonPatchDivinerSchema}.config`
7
- export const JsonPatchDivinerConfigSchema: JsonPatchDivinerConfigSchema = `${JsonPatchDivinerSchema}.config`
7
+ export const JsonPatchDivinerConfigSchema = asSchema(`${JsonPatchDivinerSchema}.config`, true)
8
+ export type JsonPatchDivinerConfigSchema = typeof JsonPatchDivinerConfigSchema
8
9
 
9
10
  // TODO: Export our own compatible Operation type to hide implementation details
10
11
  // export interface Operation {
package/src/Schema.ts CHANGED
@@ -1,2 +1,4 @@
1
- export type JsonPatchDivinerSchema = 'network.xyo.diviner.jsonpatch'
2
- export const JsonPatchDivinerSchema: JsonPatchDivinerSchema = 'network.xyo.diviner.jsonpatch'
1
+ import { asSchema } from '@xyo-network/payload-model'
2
+
3
+ export const JsonPatchDivinerSchema = asSchema('network.xyo.diviner.jsonpatch', true)
4
+ export type JsonPatchDivinerSchema = typeof JsonPatchDivinerSchema