@revisium/schema-toolkit 0.21.0 → 0.21.2

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.
Files changed (113) hide show
  1. package/dist/{chunk-SBO2UMI3.cjs → chunk-2PIMJSWJ.cjs} +0 -2
  2. package/dist/chunk-3MJP73IJ.js +1 -0
  3. package/dist/{chunk-62A5JJJ3.js → chunk-4U2RZHMX.js} +0 -2
  4. package/dist/{chunk-Q2UOTIMG.js → chunk-5DUMJHCA.js} +0 -2
  5. package/dist/{chunk-Z7M4ZGC6.cjs → chunk-7JWCZZPJ.cjs} +21 -23
  6. package/dist/{chunk-YFWOURZL.js → chunk-7PEC6ZYY.js} +0 -2
  7. package/dist/chunk-AV5EZUMZ.cjs +2 -0
  8. package/dist/{chunk-TMCRV6V5.js → chunk-AWFMSOHM.js} +0 -2
  9. package/dist/{chunk-X2VRR7V7.cjs → chunk-ERW5XVED.cjs} +0 -2
  10. package/dist/{chunk-XNFSFT7T.cjs → chunk-EVD5ZI55.cjs} +0 -2
  11. package/dist/{chunk-ZRNFSUOV.cjs → chunk-FL6PWPVJ.cjs} +0 -2
  12. package/dist/{chunk-TKMR6CQW.js → chunk-FTBRJODD.js} +0 -2
  13. package/dist/{chunk-R3MS2N4A.js → chunk-GJM63Q4K.js} +0 -2
  14. package/dist/{chunk-F4POD7AE.cjs → chunk-HJFM6E5M.cjs} +243 -90
  15. package/dist/{chunk-3DDUT57J.cjs → chunk-ITYABUR5.cjs} +0 -2
  16. package/dist/{chunk-BIBFHULN.js → chunk-IZMBM36H.js} +0 -2
  17. package/dist/chunk-J4RVO37K.cjs +2 -0
  18. package/dist/{chunk-UTSL45Q4.js → chunk-JLXX3SGF.js} +2 -4
  19. package/dist/{chunk-DRPNJ4YP.js → chunk-NO655UI5.js} +0 -2
  20. package/dist/chunk-OAUVP6CU.js +1 -0
  21. package/dist/{chunk-HH2LDPVV.cjs → chunk-ONW2OVNQ.cjs} +0 -2
  22. package/dist/{chunk-32FZHFIO.cjs → chunk-QKA7DJDN.cjs} +0 -2
  23. package/dist/{chunk-JWYYVKRT.cjs → chunk-RCCBUOGY.cjs} +0 -2
  24. package/dist/{chunk-MK3IKVZO.js → chunk-REVQG2NY.js} +176 -23
  25. package/dist/{chunk-IPL2CGVA.cjs → chunk-RQBW7ATZ.cjs} +0 -2
  26. package/dist/{chunk-WSPFHUHU.cjs → chunk-T3QQSHAC.cjs} +0 -2
  27. package/dist/{chunk-CGVYS7EK.cjs → chunk-VMELKZXD.cjs} +0 -2
  28. package/dist/{chunk-5VDDLW7U.js → chunk-WE4OLW5U.js} +0 -2
  29. package/dist/{chunk-JUOGJFTL.js → chunk-XKWWCXGB.js} +0 -2
  30. package/dist/{chunk-ZBPUTF3Q.js → chunk-ZPRBA4AQ.js} +0 -2
  31. package/dist/consts/index.cjs +4 -6
  32. package/dist/consts/index.js +2 -4
  33. package/dist/core/index.cjs +65 -67
  34. package/dist/core/index.js +4 -6
  35. package/dist/formula/index.cjs +7 -9
  36. package/dist/formula/index.js +1 -3
  37. package/dist/index.cjs +245 -247
  38. package/dist/index.d.cts +1 -1
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.js +15 -17
  41. package/dist/lib/index.cjs +51 -53
  42. package/dist/lib/index.js +7 -9
  43. package/dist/mocks/index.cjs +21 -23
  44. package/dist/mocks/index.js +2 -4
  45. package/dist/model/index.cjs +76 -78
  46. package/dist/model/index.d.cts +17 -4
  47. package/dist/model/index.d.ts +17 -4
  48. package/dist/model/index.js +4 -6
  49. package/dist/plugins/index.cjs +20 -22
  50. package/dist/plugins/index.js +2 -4
  51. package/dist/{typed-LSaUJayS.d.cts → typed-DjSH_5Vh.d.cts} +50 -3
  52. package/dist/{typed-BinPIf3R.d.ts → typed-KUia-LYN.d.ts} +50 -3
  53. package/dist/types/index.cjs +4 -6
  54. package/dist/types/index.d.cts +1 -1
  55. package/dist/types/index.d.ts +1 -1
  56. package/dist/types/index.js +2 -4
  57. package/dist/validation-schemas/index.cjs +18 -20
  58. package/dist/validation-schemas/index.js +1 -3
  59. package/package.json +1 -1
  60. package/dist/chunk-2NARA22J.js +0 -3
  61. package/dist/chunk-2NARA22J.js.map +0 -1
  62. package/dist/chunk-32FZHFIO.cjs.map +0 -1
  63. package/dist/chunk-3DDUT57J.cjs.map +0 -1
  64. package/dist/chunk-3FJZMVWA.js +0 -3
  65. package/dist/chunk-3FJZMVWA.js.map +0 -1
  66. package/dist/chunk-5VDDLW7U.js.map +0 -1
  67. package/dist/chunk-62A5JJJ3.js.map +0 -1
  68. package/dist/chunk-BIBFHULN.js.map +0 -1
  69. package/dist/chunk-BZWL424W.cjs +0 -4
  70. package/dist/chunk-BZWL424W.cjs.map +0 -1
  71. package/dist/chunk-CGVYS7EK.cjs.map +0 -1
  72. package/dist/chunk-DRPNJ4YP.js.map +0 -1
  73. package/dist/chunk-F4POD7AE.cjs.map +0 -1
  74. package/dist/chunk-HH2LDPVV.cjs.map +0 -1
  75. package/dist/chunk-IPL2CGVA.cjs.map +0 -1
  76. package/dist/chunk-JUOGJFTL.js.map +0 -1
  77. package/dist/chunk-JWYYVKRT.cjs.map +0 -1
  78. package/dist/chunk-L6HE7QPU.cjs +0 -4
  79. package/dist/chunk-L6HE7QPU.cjs.map +0 -1
  80. package/dist/chunk-MK3IKVZO.js.map +0 -1
  81. package/dist/chunk-Q2UOTIMG.js.map +0 -1
  82. package/dist/chunk-R3MS2N4A.js.map +0 -1
  83. package/dist/chunk-SBO2UMI3.cjs.map +0 -1
  84. package/dist/chunk-TKMR6CQW.js.map +0 -1
  85. package/dist/chunk-TMCRV6V5.js.map +0 -1
  86. package/dist/chunk-UTSL45Q4.js.map +0 -1
  87. package/dist/chunk-WSPFHUHU.cjs.map +0 -1
  88. package/dist/chunk-X2VRR7V7.cjs.map +0 -1
  89. package/dist/chunk-XNFSFT7T.cjs.map +0 -1
  90. package/dist/chunk-YFWOURZL.js.map +0 -1
  91. package/dist/chunk-Z7M4ZGC6.cjs.map +0 -1
  92. package/dist/chunk-ZBPUTF3Q.js.map +0 -1
  93. package/dist/chunk-ZRNFSUOV.cjs.map +0 -1
  94. package/dist/consts/index.cjs.map +0 -1
  95. package/dist/consts/index.js.map +0 -1
  96. package/dist/core/index.cjs.map +0 -1
  97. package/dist/core/index.js.map +0 -1
  98. package/dist/formula/index.cjs.map +0 -1
  99. package/dist/formula/index.js.map +0 -1
  100. package/dist/index.cjs.map +0 -1
  101. package/dist/index.js.map +0 -1
  102. package/dist/lib/index.cjs.map +0 -1
  103. package/dist/lib/index.js.map +0 -1
  104. package/dist/mocks/index.cjs.map +0 -1
  105. package/dist/mocks/index.js.map +0 -1
  106. package/dist/model/index.cjs.map +0 -1
  107. package/dist/model/index.js.map +0 -1
  108. package/dist/plugins/index.cjs.map +0 -1
  109. package/dist/plugins/index.js.map +0 -1
  110. package/dist/types/index.cjs.map +0 -1
  111. package/dist/types/index.js.map +0 -1
  112. package/dist/validation-schemas/index.cjs.map +0 -1
  113. package/dist/validation-schemas/index.js.map +0 -1
@@ -169,7 +169,7 @@ interface ValueTreeLike {
169
169
  readonly isDirty: boolean;
170
170
  readonly isValid: boolean;
171
171
  readonly errors: readonly Diagnostic[];
172
- getPatches(): readonly JsonValuePatch[];
172
+ readonly patches: readonly JsonValuePatch[];
173
173
  commit(): void;
174
174
  revert(): void;
175
175
  nodeById(id: string): ValueNode | undefined;
@@ -204,7 +204,7 @@ interface RowModel {
204
204
  readonly isDirty: boolean;
205
205
  readonly isValid: boolean;
206
206
  readonly errors: readonly Diagnostic[];
207
- getPatches(): readonly JsonValuePatch[];
207
+ readonly patches: readonly JsonValuePatch[];
208
208
  commit(): void;
209
209
  revert(): void;
210
210
  dispose(): void;
@@ -300,6 +300,51 @@ interface FormulaWarning {
300
300
  readonly expression: string;
301
301
  readonly computedValue: unknown;
302
302
  }
303
+ type NodeChangeEvent = {
304
+ type: 'setValue';
305
+ node: ValueNode;
306
+ value: unknown;
307
+ oldValue: unknown;
308
+ } | {
309
+ type: 'addChild';
310
+ parent: ValueNode;
311
+ child: ValueNode;
312
+ } | {
313
+ type: 'removeChild';
314
+ parent: ValueNode;
315
+ childName: string;
316
+ child: ValueNode;
317
+ } | {
318
+ type: 'arrayPush';
319
+ array: ValueNode;
320
+ item: ValueNode;
321
+ } | {
322
+ type: 'arrayInsert';
323
+ array: ValueNode;
324
+ index: number;
325
+ item: ValueNode;
326
+ } | {
327
+ type: 'arrayRemove';
328
+ array: ValueNode;
329
+ index: number;
330
+ item: ValueNode;
331
+ } | {
332
+ type: 'arrayMove';
333
+ array: ValueNode;
334
+ fromIndex: number;
335
+ toIndex: number;
336
+ } | {
337
+ type: 'arrayReplace';
338
+ array: ValueNode;
339
+ index: number;
340
+ item: ValueNode;
341
+ oldItem: ValueNode;
342
+ } | {
343
+ type: 'arrayClear';
344
+ array: ValueNode;
345
+ items: readonly ValueNode[];
346
+ };
347
+ type NodeChangeListener = (event: NodeChangeEvent) => void;
303
348
  interface ValueNode {
304
349
  readonly id: string;
305
350
  readonly type: ValueType;
@@ -311,6 +356,8 @@ interface ValueNode {
311
356
  isObject(): this is ObjectValueNode;
312
357
  isArray(): this is ArrayValueNode;
313
358
  isPrimitive(): this is PrimitiveValueNode;
359
+ on(event: 'change', listener: NodeChangeListener): void;
360
+ off(event: 'change', listener: NodeChangeListener): void;
314
361
  readonly errors: readonly Diagnostic[];
315
362
  readonly warnings: readonly Diagnostic[];
316
363
  readonly isValid: boolean;
@@ -452,4 +499,4 @@ type SchemaFromValue<T> = T extends string | number | boolean ? SchemaFromPrimit
452
499
  type NodeFromValue<T> = InferNode<SchemaFromValue<T>>;
453
500
  type ValuePaths<T> = SchemaPaths<SchemaFromValue<T>>;
454
501
 
455
- export { type FieldSchemaSpec as $, type ArrayValueNode as A, type SchemaModel as B, type FieldType as C, type DirtyTrackable as D, type FieldTypeSpec as E, type FormulaDefinition as F, type ReplaceResult as G, type SchemaModelOptions as H, type InferValue as I, type JsonValuePatchMove as J, type TableModel as K, type TableModelOptions as L, type RowData as M, type NodeAtPath as N, type ObjectValueNode as O, type PrimitiveValueNode as P, type RowModel as Q, type RefSchemas as R, type SchemaPaths as S, type TypedPrimitiveValueNode as T, type RowModelOptions as U, type ValueAtPath as V, type TableModelLike as W, type ForeignKeyResolver as X, type TypeTransformer as Y, type TransformContext as Z, type TransformResult as _, type JsonValuePatchReplace as a, type SimpleFieldType as a0, type PrimitiveTypeName as a1, type CompositeTypeName as a2, type RefSchemas$1 as a3, type ValuePath as a4, type Change as a5, type JsonValuePatchRemove as b, type JsonValuePatchAdd as c, type JsonValuePatch as d, type TypedObjectValueNode as e, type TypedArrayValueNode as f, type InferNode as g, type SchemaAtPath as h, type SchemaFromValue as i, type NodeFromValue as j, type ValuePaths as k, ValueType as l, extractFormulaDefinition as m, NodeFactoryRegistry as n, createNodeFactory as o, createDefaultRegistry as p, type ValueNode as q, type FormulaWarning as r, type ValueNodeOptions as s, type PrimitiveNodeOptions as t, type ObjectNodeOptions as u, type ArrayNodeOptions as v, type NodeFactoryFn as w, type NodeFactoryOptions as x, NodeFactory as y, type ValueTreeLike as z };
502
+ export { type FieldSchemaSpec as $, type ArrayValueNode as A, type SchemaModel as B, type FieldType as C, type DirtyTrackable as D, type FieldTypeSpec as E, type FormulaDefinition as F, type ReplaceResult as G, type SchemaModelOptions as H, type InferValue as I, type JsonValuePatchMove as J, type TableModel as K, type TableModelOptions as L, type RowData as M, type NodeAtPath as N, type ObjectValueNode as O, type PrimitiveValueNode as P, type RowModel as Q, type RefSchemas as R, type SchemaPaths as S, type TypedPrimitiveValueNode as T, type RowModelOptions as U, type ValueAtPath as V, type TableModelLike as W, type ForeignKeyResolver as X, type TypeTransformer as Y, type TransformContext as Z, type TransformResult as _, type JsonValuePatchReplace as a, type SimpleFieldType as a0, type PrimitiveTypeName as a1, type CompositeTypeName as a2, type RefSchemas$1 as a3, type NodeChangeListener as a4, type NodeChangeEvent as a5, type ValuePath as a6, type Change as a7, type JsonValuePatchRemove as b, type JsonValuePatchAdd as c, type JsonValuePatch as d, type TypedObjectValueNode as e, type TypedArrayValueNode as f, type InferNode as g, type SchemaAtPath as h, type SchemaFromValue as i, type NodeFromValue as j, type ValuePaths as k, ValueType as l, extractFormulaDefinition as m, NodeFactoryRegistry as n, createNodeFactory as o, createDefaultRegistry as p, type ValueNode as q, type FormulaWarning as r, type ValueNodeOptions as s, type PrimitiveNodeOptions as t, type ObjectNodeOptions as u, type ArrayNodeOptions as v, type NodeFactoryFn as w, type NodeFactoryOptions as x, NodeFactory as y, type ValueTreeLike as z };
@@ -169,7 +169,7 @@ interface ValueTreeLike {
169
169
  readonly isDirty: boolean;
170
170
  readonly isValid: boolean;
171
171
  readonly errors: readonly Diagnostic[];
172
- getPatches(): readonly JsonValuePatch[];
172
+ readonly patches: readonly JsonValuePatch[];
173
173
  commit(): void;
174
174
  revert(): void;
175
175
  nodeById(id: string): ValueNode | undefined;
@@ -204,7 +204,7 @@ interface RowModel {
204
204
  readonly isDirty: boolean;
205
205
  readonly isValid: boolean;
206
206
  readonly errors: readonly Diagnostic[];
207
- getPatches(): readonly JsonValuePatch[];
207
+ readonly patches: readonly JsonValuePatch[];
208
208
  commit(): void;
209
209
  revert(): void;
210
210
  dispose(): void;
@@ -300,6 +300,51 @@ interface FormulaWarning {
300
300
  readonly expression: string;
301
301
  readonly computedValue: unknown;
302
302
  }
303
+ type NodeChangeEvent = {
304
+ type: 'setValue';
305
+ node: ValueNode;
306
+ value: unknown;
307
+ oldValue: unknown;
308
+ } | {
309
+ type: 'addChild';
310
+ parent: ValueNode;
311
+ child: ValueNode;
312
+ } | {
313
+ type: 'removeChild';
314
+ parent: ValueNode;
315
+ childName: string;
316
+ child: ValueNode;
317
+ } | {
318
+ type: 'arrayPush';
319
+ array: ValueNode;
320
+ item: ValueNode;
321
+ } | {
322
+ type: 'arrayInsert';
323
+ array: ValueNode;
324
+ index: number;
325
+ item: ValueNode;
326
+ } | {
327
+ type: 'arrayRemove';
328
+ array: ValueNode;
329
+ index: number;
330
+ item: ValueNode;
331
+ } | {
332
+ type: 'arrayMove';
333
+ array: ValueNode;
334
+ fromIndex: number;
335
+ toIndex: number;
336
+ } | {
337
+ type: 'arrayReplace';
338
+ array: ValueNode;
339
+ index: number;
340
+ item: ValueNode;
341
+ oldItem: ValueNode;
342
+ } | {
343
+ type: 'arrayClear';
344
+ array: ValueNode;
345
+ items: readonly ValueNode[];
346
+ };
347
+ type NodeChangeListener = (event: NodeChangeEvent) => void;
303
348
  interface ValueNode {
304
349
  readonly id: string;
305
350
  readonly type: ValueType;
@@ -311,6 +356,8 @@ interface ValueNode {
311
356
  isObject(): this is ObjectValueNode;
312
357
  isArray(): this is ArrayValueNode;
313
358
  isPrimitive(): this is PrimitiveValueNode;
359
+ on(event: 'change', listener: NodeChangeListener): void;
360
+ off(event: 'change', listener: NodeChangeListener): void;
314
361
  readonly errors: readonly Diagnostic[];
315
362
  readonly warnings: readonly Diagnostic[];
316
363
  readonly isValid: boolean;
@@ -452,4 +499,4 @@ type SchemaFromValue<T> = T extends string | number | boolean ? SchemaFromPrimit
452
499
  type NodeFromValue<T> = InferNode<SchemaFromValue<T>>;
453
500
  type ValuePaths<T> = SchemaPaths<SchemaFromValue<T>>;
454
501
 
455
- export { type FieldSchemaSpec as $, type ArrayValueNode as A, type SchemaModel as B, type FieldType as C, type DirtyTrackable as D, type FieldTypeSpec as E, type FormulaDefinition as F, type ReplaceResult as G, type SchemaModelOptions as H, type InferValue as I, type JsonValuePatchMove as J, type TableModel as K, type TableModelOptions as L, type RowData as M, type NodeAtPath as N, type ObjectValueNode as O, type PrimitiveValueNode as P, type RowModel as Q, type RefSchemas as R, type SchemaPaths as S, type TypedPrimitiveValueNode as T, type RowModelOptions as U, type ValueAtPath as V, type TableModelLike as W, type ForeignKeyResolver as X, type TypeTransformer as Y, type TransformContext as Z, type TransformResult as _, type JsonValuePatchReplace as a, type SimpleFieldType as a0, type PrimitiveTypeName as a1, type CompositeTypeName as a2, type RefSchemas$1 as a3, type ValuePath as a4, type Change as a5, type JsonValuePatchRemove as b, type JsonValuePatchAdd as c, type JsonValuePatch as d, type TypedObjectValueNode as e, type TypedArrayValueNode as f, type InferNode as g, type SchemaAtPath as h, type SchemaFromValue as i, type NodeFromValue as j, type ValuePaths as k, ValueType as l, extractFormulaDefinition as m, NodeFactoryRegistry as n, createNodeFactory as o, createDefaultRegistry as p, type ValueNode as q, type FormulaWarning as r, type ValueNodeOptions as s, type PrimitiveNodeOptions as t, type ObjectNodeOptions as u, type ArrayNodeOptions as v, type NodeFactoryFn as w, type NodeFactoryOptions as x, NodeFactory as y, type ValueTreeLike as z };
502
+ export { type FieldSchemaSpec as $, type ArrayValueNode as A, type SchemaModel as B, type FieldType as C, type DirtyTrackable as D, type FieldTypeSpec as E, type FormulaDefinition as F, type ReplaceResult as G, type SchemaModelOptions as H, type InferValue as I, type JsonValuePatchMove as J, type TableModel as K, type TableModelOptions as L, type RowData as M, type NodeAtPath as N, type ObjectValueNode as O, type PrimitiveValueNode as P, type RowModel as Q, type RefSchemas as R, type SchemaPaths as S, type TypedPrimitiveValueNode as T, type RowModelOptions as U, type ValueAtPath as V, type TableModelLike as W, type ForeignKeyResolver as X, type TypeTransformer as Y, type TransformContext as Z, type TransformResult as _, type JsonValuePatchReplace as a, type SimpleFieldType as a0, type PrimitiveTypeName as a1, type CompositeTypeName as a2, type RefSchemas$1 as a3, type NodeChangeListener as a4, type NodeChangeEvent as a5, type ValuePath as a6, type Change as a7, type JsonValuePatchRemove as b, type JsonValuePatchAdd as c, type JsonValuePatch as d, type TypedObjectValueNode as e, type TypedArrayValueNode as f, type InferNode as g, type SchemaAtPath as h, type SchemaFromValue as i, type NodeFromValue as j, type ValuePaths as k, ValueType as l, extractFormulaDefinition as m, NodeFactoryRegistry as n, createNodeFactory as o, createDefaultRegistry as p, type ValueNode as q, type FormulaWarning as r, type ValueNodeOptions as s, type PrimitiveNodeOptions as t, type ObjectNodeOptions as u, type ArrayNodeOptions as v, type NodeFactoryFn as w, type NodeFactoryOptions as x, NodeFactory as y, type ValueTreeLike as z };
@@ -1,17 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkCGVYS7EK_cjs = require('../chunk-CGVYS7EK.cjs');
4
- var chunkZRNFSUOV_cjs = require('../chunk-ZRNFSUOV.cjs');
3
+ var chunkVMELKZXD_cjs = require('../chunk-VMELKZXD.cjs');
4
+ var chunkFL6PWPVJ_cjs = require('../chunk-FL6PWPVJ.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "JsonSchemaTypeName", {
9
9
  enumerable: true,
10
- get: function () { return chunkCGVYS7EK_cjs.JsonSchemaTypeName; }
10
+ get: function () { return chunkVMELKZXD_cjs.JsonSchemaTypeName; }
11
11
  });
12
12
  Object.defineProperty(exports, "FieldChangeType", {
13
13
  enumerable: true,
14
- get: function () { return chunkZRNFSUOV_cjs.FieldChangeType; }
14
+ get: function () { return chunkFL6PWPVJ_cjs.FieldChangeType; }
15
15
  });
16
- //# sourceMappingURL=index.cjs.map
17
- //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  export { b as JsonArray, J as JsonObject, a as JsonPrimitives, c as JsonValue } from '../json.types-PrMmLhba.cjs';
2
2
  import { h as JsonPatch } from '../json-patch.types-eM6pYC2P.cjs';
3
3
  export { g as JsonPatchAdd, c as JsonPatchAddOperation, d as JsonPatchMove, J as JsonPatchMoveOperation, f as JsonPatchRemove, b as JsonPatchRemoveOperation, e as JsonPatchReplace, a as JsonPatchReplaceOperation } from '../json-patch.types-eM6pYC2P.cjs';
4
- export { g as InferNode, I as InferValue, d as JsonValuePatch, c as JsonValuePatchAdd, J as JsonValuePatchMove, b as JsonValuePatchRemove, a as JsonValuePatchReplace, N as NodeAtPath, j as NodeFromValue, h as SchemaAtPath, i as SchemaFromValue, S as SchemaPaths, f as TypedArrayValueNode, e as TypedObjectValueNode, T as TypedPrimitiveValueNode, V as ValueAtPath, k as ValuePaths } from '../typed-LSaUJayS.cjs';
4
+ export { g as InferNode, I as InferValue, d as JsonValuePatch, c as JsonValuePatchAdd, J as JsonValuePatchMove, b as JsonValuePatchRemove, a as JsonValuePatchReplace, N as NodeAtPath, j as NodeFromValue, h as SchemaAtPath, i as SchemaFromValue, S as SchemaPaths, f as TypedArrayValueNode, e as TypedObjectValueNode, T as TypedPrimitiveValueNode, V as ValueAtPath, k as ValuePaths } from '../typed-DjSH_5Vh.cjs';
5
5
  import { j as JsonSchema } from '../schema.types-On_VGw2m.cjs';
6
6
  export { C as ContentMediaType, h as JsonArraySchema, e as JsonBooleanSchema, d as JsonNumberSchema, g as JsonObjectSchema, i as JsonRefSchema, f as JsonSchemaPrimitives, b as JsonSchemaSharedFields, a as JsonSchemaType, J as JsonSchemaTypeName, k as JsonSchemaWithoutRef, c as JsonStringSchema, X as XFormula } from '../schema.types-On_VGw2m.cjs';
7
7
  export { a as FieldChange, F as FieldChangeType } from '../types-C_GxaUve.cjs';
@@ -1,7 +1,7 @@
1
1
  export { b as JsonArray, J as JsonObject, a as JsonPrimitives, c as JsonValue } from '../json.types-PrMmLhba.js';
2
2
  import { h as JsonPatch } from '../json-patch.types-BpVnp08Z.js';
3
3
  export { g as JsonPatchAdd, c as JsonPatchAddOperation, d as JsonPatchMove, J as JsonPatchMoveOperation, f as JsonPatchRemove, b as JsonPatchRemoveOperation, e as JsonPatchReplace, a as JsonPatchReplaceOperation } from '../json-patch.types-BpVnp08Z.js';
4
- export { g as InferNode, I as InferValue, d as JsonValuePatch, c as JsonValuePatchAdd, J as JsonValuePatchMove, b as JsonValuePatchRemove, a as JsonValuePatchReplace, N as NodeAtPath, j as NodeFromValue, h as SchemaAtPath, i as SchemaFromValue, S as SchemaPaths, f as TypedArrayValueNode, e as TypedObjectValueNode, T as TypedPrimitiveValueNode, V as ValueAtPath, k as ValuePaths } from '../typed-BinPIf3R.js';
4
+ export { g as InferNode, I as InferValue, d as JsonValuePatch, c as JsonValuePatchAdd, J as JsonValuePatchMove, b as JsonValuePatchRemove, a as JsonValuePatchReplace, N as NodeAtPath, j as NodeFromValue, h as SchemaAtPath, i as SchemaFromValue, S as SchemaPaths, f as TypedArrayValueNode, e as TypedObjectValueNode, T as TypedPrimitiveValueNode, V as ValueAtPath, k as ValuePaths } from '../typed-KUia-LYN.js';
5
5
  import { j as JsonSchema } from '../schema.types-On_VGw2m.js';
6
6
  export { C as ContentMediaType, h as JsonArraySchema, e as JsonBooleanSchema, d as JsonNumberSchema, g as JsonObjectSchema, i as JsonRefSchema, f as JsonSchemaPrimitives, b as JsonSchemaSharedFields, a as JsonSchemaType, J as JsonSchemaTypeName, k as JsonSchemaWithoutRef, c as JsonStringSchema, X as XFormula } from '../schema.types-On_VGw2m.js';
7
7
  export { a as FieldChange, F as FieldChangeType } from '../types-C_GxaUve.js';
@@ -1,4 +1,2 @@
1
- export { JsonSchemaTypeName } from '../chunk-DRPNJ4YP.js';
2
- export { FieldChangeType } from '../chunk-ZBPUTF3Q.js';
3
- //# sourceMappingURL=index.js.map
4
- //# sourceMappingURL=index.js.map
1
+ export { JsonSchemaTypeName } from '../chunk-NO655UI5.js';
2
+ export { FieldChangeType } from '../chunk-ZPRBA4AQ.js';
@@ -1,76 +1,74 @@
1
1
  'use strict';
2
2
 
3
- var chunk32FZHFIO_cjs = require('../chunk-32FZHFIO.cjs');
3
+ var chunkQKA7DJDN_cjs = require('../chunk-QKA7DJDN.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "arrayMetaSchema", {
8
8
  enumerable: true,
9
- get: function () { return chunk32FZHFIO_cjs.arrayMetaSchema; }
9
+ get: function () { return chunkQKA7DJDN_cjs.arrayMetaSchema; }
10
10
  });
11
11
  Object.defineProperty(exports, "baseStringFields", {
12
12
  enumerable: true,
13
- get: function () { return chunk32FZHFIO_cjs.baseStringFields; }
13
+ get: function () { return chunkQKA7DJDN_cjs.baseStringFields; }
14
14
  });
15
15
  Object.defineProperty(exports, "booleanMetaSchema", {
16
16
  enumerable: true,
17
- get: function () { return chunk32FZHFIO_cjs.booleanMetaSchema; }
17
+ get: function () { return chunkQKA7DJDN_cjs.booleanMetaSchema; }
18
18
  });
19
19
  Object.defineProperty(exports, "foreignKeyExcludesFormula", {
20
20
  enumerable: true,
21
- get: function () { return chunk32FZHFIO_cjs.foreignKeyExcludesFormula; }
21
+ get: function () { return chunkQKA7DJDN_cjs.foreignKeyExcludesFormula; }
22
22
  });
23
23
  Object.defineProperty(exports, "historyPatchesSchema", {
24
24
  enumerable: true,
25
- get: function () { return chunk32FZHFIO_cjs.historyPatchesSchema; }
25
+ get: function () { return chunkQKA7DJDN_cjs.historyPatchesSchema; }
26
26
  });
27
27
  Object.defineProperty(exports, "jsonPatchSchema", {
28
28
  enumerable: true,
29
- get: function () { return chunk32FZHFIO_cjs.jsonPatchSchema; }
29
+ get: function () { return chunkQKA7DJDN_cjs.jsonPatchSchema; }
30
30
  });
31
31
  Object.defineProperty(exports, "metaSchema", {
32
32
  enumerable: true,
33
- get: function () { return chunk32FZHFIO_cjs.metaSchema; }
33
+ get: function () { return chunkQKA7DJDN_cjs.metaSchema; }
34
34
  });
35
35
  Object.defineProperty(exports, "noForeignKeyStringMetaSchema", {
36
36
  enumerable: true,
37
- get: function () { return chunk32FZHFIO_cjs.noForeignKeyStringMetaSchema; }
37
+ get: function () { return chunkQKA7DJDN_cjs.noForeignKeyStringMetaSchema; }
38
38
  });
39
39
  Object.defineProperty(exports, "notForeignKeyMetaSchema", {
40
40
  enumerable: true,
41
- get: function () { return chunk32FZHFIO_cjs.notForeignKeyMetaSchema; }
41
+ get: function () { return chunkQKA7DJDN_cjs.notForeignKeyMetaSchema; }
42
42
  });
43
43
  Object.defineProperty(exports, "numberMetaSchema", {
44
44
  enumerable: true,
45
- get: function () { return chunk32FZHFIO_cjs.numberMetaSchema; }
45
+ get: function () { return chunkQKA7DJDN_cjs.numberMetaSchema; }
46
46
  });
47
47
  Object.defineProperty(exports, "objectMetaSchema", {
48
48
  enumerable: true,
49
- get: function () { return chunk32FZHFIO_cjs.objectMetaSchema; }
49
+ get: function () { return chunkQKA7DJDN_cjs.objectMetaSchema; }
50
50
  });
51
51
  Object.defineProperty(exports, "refMetaSchema", {
52
52
  enumerable: true,
53
- get: function () { return chunk32FZHFIO_cjs.refMetaSchema; }
53
+ get: function () { return chunkQKA7DJDN_cjs.refMetaSchema; }
54
54
  });
55
55
  Object.defineProperty(exports, "sharedFields", {
56
56
  enumerable: true,
57
- get: function () { return chunk32FZHFIO_cjs.sharedFields; }
57
+ get: function () { return chunkQKA7DJDN_cjs.sharedFields; }
58
58
  });
59
59
  Object.defineProperty(exports, "stringMetaSchema", {
60
60
  enumerable: true,
61
- get: function () { return chunk32FZHFIO_cjs.stringMetaSchema; }
61
+ get: function () { return chunkQKA7DJDN_cjs.stringMetaSchema; }
62
62
  });
63
63
  Object.defineProperty(exports, "tableMigrationsSchema", {
64
64
  enumerable: true,
65
- get: function () { return chunk32FZHFIO_cjs.tableMigrationsSchema; }
65
+ get: function () { return chunkQKA7DJDN_cjs.tableMigrationsSchema; }
66
66
  });
67
67
  Object.defineProperty(exports, "xFormulaRequiresReadOnly", {
68
68
  enumerable: true,
69
- get: function () { return chunk32FZHFIO_cjs.xFormulaRequiresReadOnly; }
69
+ get: function () { return chunkQKA7DJDN_cjs.xFormulaRequiresReadOnly; }
70
70
  });
71
71
  Object.defineProperty(exports, "xFormulaSchema", {
72
72
  enumerable: true,
73
- get: function () { return chunk32FZHFIO_cjs.xFormulaSchema; }
73
+ get: function () { return chunkQKA7DJDN_cjs.xFormulaSchema; }
74
74
  });
75
- //# sourceMappingURL=index.cjs.map
76
- //# sourceMappingURL=index.cjs.map
@@ -1,3 +1 @@
1
- export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from '../chunk-JUOGJFTL.js';
2
- //# sourceMappingURL=index.js.map
3
- //# sourceMappingURL=index.js.map
1
+ export { arrayMetaSchema, baseStringFields, booleanMetaSchema, foreignKeyExcludesFormula, historyPatchesSchema, jsonPatchSchema, metaSchema, noForeignKeyStringMetaSchema, notForeignKeyMetaSchema, numberMetaSchema, objectMetaSchema, refMetaSchema, sharedFields, stringMetaSchema, tableMigrationsSchema, xFormulaRequiresReadOnly, xFormulaSchema } from '../chunk-XKWWCXGB.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revisium/schema-toolkit",
3
- "version": "0.21.0",
3
+ "version": "0.21.2",
4
4
  "description": "Universal schema toolkit with TypeScript types and utilities for JSON Schema manipulation",
5
5
  "keywords": [
6
6
  "json-schema",
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=chunk-2NARA22J.js.map
3
- //# sourceMappingURL=chunk-2NARA22J.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-2NARA22J.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/validation-schemas/shared-fields.ts","../src/validation-schemas/meta-schema.ts","../src/validation-schemas/json-patch-schema.ts","../src/validation-schemas/history-patches-schema.ts","../src/validation-schemas/table-migrations-schema.ts"],"names":[],"mappings":";;;AAAO,IAAM,YAAA,GAAe;AAAA,EAC1B,UAAA,EAAY;AAAA,IACV,IAAA,EAAM;AAAA,GACR;AAAA,EACA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM;AAAA,GACR;AAAA,EACA,WAAA,EAAa;AAAA,IACX,IAAA,EAAM;AAAA;AAEV;;;ACLO,IAAM,cAAA,GAAyB;AAAA,EACpC,IAAA,EAAM,QAAA;AAAA,EACN,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,EAAE,KAAA,EAAO,CAAA,EAAE;AAAA,IACpB,YAAY,EAAE,IAAA,EAAM,UAAU,SAAA,EAAW,CAAA,EA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chunk-32FZHFIO.cjs","sourcesContent":["export const sharedFields = {\n deprecated: {\n type: 'boolean',\n },\n title: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n};\n","import { Schema } from 'ajv/dist/2020';\nimport { sharedFields } from './shared-fields.js';\n\n// https://json-schema.org/specification#single-vocabulary-meta-schemas\n\nexport const xFormulaSchema: Schema = {\n type: 'object',\n properties: {\n version: { const: 1 },\n expression: { type: 'string', minLength: 1, maxLength: 10000 },\n },\n required: ['version', 'expression'],\n additionalProperties: false,\n};\n\n// When x-formula is present, readOnly must be true\nexport const xFormulaRequiresReadOnly: Schema = {\n if: {\n properties: { 'x-formula': { type: 'object' } },\n required: ['x-formula'],\n },\n then: {\n properties: { readOnly: { const: true } },\n required: ['readOnly'],\n },\n};\n\n// foreignKey and x-formula are mutually exclusive\nexport const foreignKeyExcludesFormula: Schema = {\n if: {\n properties: { foreignKey: { type: 'string' } },\n required: ['foreignKey'],\n },\n then: {\n not: { required: ['x-formula'] },\n },\n};\n\nexport const refMetaSchema: Schema = {\n type: 'object',\n properties: {\n ...sharedFields,\n $ref: {\n type: 'string',\n },\n },\n additionalProperties: false,\n required: ['$ref'],\n};\n\nexport const baseStringFields: Schema = {\n type: {\n const: 'string',\n },\n default: {\n type: 'string',\n },\n readOnly: {\n type: 'boolean',\n },\n pattern: {\n type: 'string',\n format: 'regex',\n },\n enum: {\n type: 'array',\n items: { type: 'string' },\n minItems: 1,\n uniqueItems: true,\n },\n format: {\n type: 'string',\n enum: ['date-time', 'date', 'time', 'email', 'regex'],\n },\n contentMediaType: {\n type: 'string',\n enum: [\n 'text/plain',\n 'text/markdown',\n 'text/html',\n 'application/json',\n 'application/schema+json',\n 'application/yaml',\n ],\n },\n 'x-formula': xFormulaSchema,\n ...sharedFields,\n};\n\nexport const stringMetaSchema: Schema = {\n type: 'object',\n properties: {\n ...baseStringFields,\n foreignKey: {\n type: 'string',\n },\n },\n additionalProperties: false,\n required: ['type', 'default'],\n allOf: [xFormulaRequiresReadOnly, foreignKeyExcludesFormula],\n};\n\nexport const noForeignKeyStringMetaSchema: Schema = {\n type: 'object',\n properties: {\n ...baseStringFields,\n },\n additionalProperties: false,\n required: ['type', 'default'],\n ...xFormulaRequiresReadOnly,\n};\n\nexport const numberMetaSchema: Schema = {\n type: 'object',\n properties: {\n type: {\n const: 'number',\n },\n default: {\n type: 'number',\n },\n readOnly: {\n type: 'boolean',\n },\n 'x-formula': xFormulaSchema,\n ...sharedFields,\n },\n additionalProperties: false,\n required: ['type', 'default'],\n ...xFormulaRequiresReadOnly,\n};\n\nexport const booleanMetaSchema: Schema = {\n type: 'object',\n properties: {\n type: {\n const: 'boolean',\n },\n default: {\n type: 'boolean',\n },\n readOnly: {\n type: 'boolean',\n },\n 'x-formula': xFormulaSchema,\n ...sharedFields,\n },\n additionalProperties: false,\n required: ['type', 'default'],\n ...xFormulaRequiresReadOnly,\n};\n\nexport const objectMetaSchema: Schema = {\n type: 'object',\n properties: {\n type: {\n const: 'object',\n },\n ...sharedFields,\n properties: {\n type: 'object',\n additionalProperties: { $dynamicRef: '#meta' },\n default: {},\n },\n additionalProperties: { const: false },\n required: { $ref: '#/$defs/stringArray' },\n },\n additionalProperties: false,\n required: ['type', 'properties', 'additionalProperties', 'required'],\n};\n\nexport const arrayMetaSchema: Schema = {\n type: 'object',\n properties: {\n type: {\n const: 'array',\n },\n ...sharedFields,\n items: {\n oneOf: [\n { $ref: '#/$defs/refSchema' },\n { $ref: '#/$defs/objectSchema' },\n { $ref: '#/$defs/arraySchema' },\n { $ref: '#/$defs/stringSchema' },\n { $ref: '#/$defs/numberSchema' },\n { $ref: '#/$defs/booleanSchema' },\n ],\n },\n },\n additionalProperties: false,\n required: ['type', 'items'],\n};\n\nexport const metaSchema: Schema = {\n $id: 'meta-schema.json',\n type: 'object',\n $dynamicAnchor: 'meta',\n oneOf: [\n { $ref: '#/$defs/refSchema' },\n { $ref: '#/$defs/objectSchema' },\n { $ref: '#/$defs/arraySchema' },\n { $ref: '#/$defs/stringSchema' },\n { $ref: '#/$defs/numberSchema' },\n { $ref: '#/$defs/booleanSchema' },\n ],\n $defs: {\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n default: [],\n },\n refSchema: refMetaSchema,\n objectSchema: objectMetaSchema,\n stringSchema: stringMetaSchema,\n numberSchema: numberMetaSchema,\n booleanSchema: booleanMetaSchema,\n arraySchema: arrayMetaSchema,\n },\n};\n\nexport const notForeignKeyMetaSchema: Schema = {\n type: 'object',\n $dynamicAnchor: 'meta',\n oneOf: [\n { $ref: '#/$defs/refSchema' },\n { $ref: '#/$defs/objectSchema' },\n { $ref: '#/$defs/arraySchema' },\n { $ref: '#/$defs/stringSchema' },\n { $ref: '#/$defs/numberSchema' },\n { $ref: '#/$defs/booleanSchema' },\n ],\n $defs: {\n stringArray: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n default: [],\n },\n refSchema: refMetaSchema,\n objectSchema: objectMetaSchema,\n stringSchema: noForeignKeyStringMetaSchema,\n numberSchema: numberMetaSchema,\n booleanSchema: booleanMetaSchema,\n arraySchema: arrayMetaSchema,\n },\n};\n","import { Schema } from 'ajv/dist/2020';\nimport {\n arrayMetaSchema,\n booleanMetaSchema,\n numberMetaSchema,\n objectMetaSchema,\n stringMetaSchema,\n} from './meta-schema.js';\n\n// copied and modified from https://json.schemastore.org/json-patch\n\nexport const jsonPatchSchema: Schema = {\n $id: 'json-patch-schema.json',\n definitions: {\n path: {\n description: 'A JSON Pointer path.',\n type: 'string',\n },\n objectSchema: objectMetaSchema,\n stringSchema: stringMetaSchema,\n numberSchema: numberMetaSchema,\n booleanSchema: booleanMetaSchema,\n arraySchema: arrayMetaSchema,\n },\n minItems: 1,\n items: {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n required: ['value', 'op', 'path'],\n properties: {\n path: {\n $ref: '#/definitions/path',\n },\n op: {\n description: 'The operation to perform.',\n type: 'string',\n enum: ['add', 'replace'],\n },\n value: {\n $ref: 'meta-schema.json',\n description: 'The value to add, replace or test.',\n },\n },\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['op', 'path'],\n properties: {\n path: {\n $ref: '#/definitions/path',\n },\n op: {\n description: 'The operation to perform.',\n type: 'string',\n enum: ['remove'],\n },\n },\n },\n {\n type: 'object',\n additionalProperties: false,\n required: ['from', 'op', 'path'],\n properties: {\n path: {\n $ref: '#/definitions/path',\n },\n op: {\n description: 'The operation to perform.',\n type: 'string',\n enum: ['move', 'copy'],\n },\n from: {\n $ref: '#/definitions/path',\n description:\n 'A JSON Pointer path pointing to the location to move/copy from.',\n },\n },\n },\n ],\n },\n title: 'JSON schema for JSONPatch files',\n type: 'array',\n};\n","import { Schema } from 'ajv/dist/2020';\n\nexport const historyPatchesSchema: Schema = {\n $id: 'history-patches-schema.json',\n type: 'array',\n minItems: 1,\n items: {\n type: 'object',\n properties: {\n patches: {\n $ref: 'json-patch-schema.json',\n },\n hash: {\n type: 'string',\n },\n },\n required: ['patches', 'hash'],\n },\n};\n","import { Schema } from 'ajv/dist/2020';\n\nexport const tableMigrationsSchema: Schema = {\n $id: 'table-migrations-schema.json',\n oneOf: [\n { $ref: '#/definitions/InitMigration' },\n { $ref: '#/definitions/UpdateMigration' },\n { $ref: '#/definitions/RenameMigration' },\n { $ref: '#/definitions/RemoveMigration' },\n ],\n definitions: {\n InitMigration: {\n type: 'object',\n additionalProperties: false,\n required: ['changeType', 'tableId', 'hash', 'id', 'schema'],\n properties: {\n changeType: { type: 'string', const: 'init' },\n tableId: { type: 'string' },\n hash: { type: 'string' },\n id: { type: 'string' },\n schema: { $ref: 'meta-schema.json' },\n },\n },\n UpdateMigration: {\n type: 'object',\n additionalProperties: false,\n required: ['changeType', 'tableId', 'hash', 'id', 'patches'],\n properties: {\n changeType: { type: 'string', const: 'update' },\n tableId: { type: 'string' },\n hash: { type: 'string' },\n id: { type: 'string' },\n patches: { $ref: 'json-patch-schema.json' },\n },\n },\n RenameMigration: {\n type: 'object',\n additionalProperties: false,\n required: ['changeType', 'id', 'tableId', 'nextTableId'],\n properties: {\n changeType: { type: 'string', const: 'rename' },\n id: { type: 'string' },\n tableId: { type: 'string' },\n nextTableId: { type: 'string' },\n },\n },\n RemoveMigration: {\n type: 'object',\n additionalProperties: false,\n required: ['changeType', 'id', 'tableId'],\n properties: {\n changeType: { type: 'string', const: 'remove' },\n id: { type: 'string' },\n tableId: { type: 'string' },\n },\n },\n },\n title: 'JSON Schema for a Single Migration',\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/plugins/row-id.schema.ts","../src/plugins/row-version-id.schema.ts","../src/plugins/row-created-id.schema.ts","../src/plugins/row-created-at.schema.ts","../src/plugins/row-published-at.schema.ts","../src/plugins/row-updated-at.schema.ts","../src/plugins/row-hash.schema.ts","../src/plugins/row-schema-hash.schema.ts","../src/plugins/file-schema.ts"],"names":[],"mappings":";;;AAGO,IAAM,WAAA,GAAgC;AAAA,EAC3C,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,cAAA,GAAiB;AAAA,EAC5B,GAAA,EAAA,gDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,qBAAA,GAAwB;AAAA,EACnC,GAAA,EAAA,wDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,qBAAA,GAAwB;AAAA,EACnC,GAAA,EAAA,wDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,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AAA,EAAU,SAAS,EAAA,EAAG;AAAA,IACxC,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,EAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,EAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,EAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,CAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,KAAA,EAAO;AAAA,MACL,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,CAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,CAAA;AAAA,MACT,QAAA,EAAU;AAAA;AACZ,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,QAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,WAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,oBAAA,EAAsB;AACxB;AAEO,IAAM,aAAA,GAAgB;AAAA,EAC3B,GAAA,EAAA,8CAAA;AAAA,EACA,GAAG;AACL","file":"chunk-3DDUT57J.cjs","sourcesContent":["import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowIdSchema = {\n $id: SystemSchemaIds.RowId,\n ...rowIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowVersionIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowVersionIdSchema = {\n $id: SystemSchemaIds.RowVersionId,\n ...rowVersionIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowCreatedIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowCreatedIdSchema = {\n $id: SystemSchemaIds.RowCreatedId,\n ...rowCreatedIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowCreatedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowCreatedAtSchema = {\n $id: SystemSchemaIds.RowCreatedAt,\n ...rowCreatedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowPublishedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n};\n\nexport const ajvRowPublishedAtSchema = {\n $id: SystemSchemaIds.RowPublishedAt,\n ...rowPublishedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowUpdatedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowUpdatedAtSchema = {\n $id: SystemSchemaIds.RowUpdatedAt,\n ...rowUpdatedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowHashSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowHashSchema = {\n $id: SystemSchemaIds.RowHash,\n ...rowHashSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowSchemaHashSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowSchemaHashSchema = {\n $id: SystemSchemaIds.RowSchemaHash,\n ...rowSchemaHashSchema,\n};\n","import { JsonObjectSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const fileSchema: JsonObjectSchema = {\n type: 'object',\n properties: {\n status: { type: 'string', default: '', readOnly: true },\n fileId: { type: 'string', default: '', readOnly: true },\n url: { type: 'string', default: '', readOnly: true },\n fileName: { type: 'string', default: '' },\n hash: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n extension: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n mimeType: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n size: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n width: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n height: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n },\n required: [\n 'status',\n 'fileId',\n 'url',\n 'fileName',\n 'hash',\n 'extension',\n 'mimeType',\n 'size',\n 'width',\n 'height',\n ],\n additionalProperties: false,\n};\n\nexport const ajvFileSchema = {\n $id: SystemSchemaIds.File,\n ...fileSchema,\n};\n"]}
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=chunk-3FJZMVWA.js.map
3
- //# sourceMappingURL=chunk-3FJZMVWA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-3FJZMVWA.js"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/consts/index.ts"],"names":["CustomSchemeKeywords"],"mappings":";AAAO,IAAK,oBAAA,qBAAAA,qBAAAA,KAAL;AACL,EAAAA,sBAAA,YAAA,CAAA,GAAa,YAAA;AADH,EAAA,OAAAA,qBAAAA;AAAA,CAAA,EAAA,oBAAA,IAAA,EAAA","file":"chunk-5VDDLW7U.js","sourcesContent":["export enum CustomSchemeKeywords {\n ForeignKey = 'foreignKey',\n}\n\nexport * from './system-schema-ids.js';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/plugins/row-id.schema.ts","../src/plugins/row-version-id.schema.ts","../src/plugins/row-created-id.schema.ts","../src/plugins/row-created-at.schema.ts","../src/plugins/row-published-at.schema.ts","../src/plugins/row-updated-at.schema.ts","../src/plugins/row-hash.schema.ts","../src/plugins/row-schema-hash.schema.ts","../src/plugins/file-schema.ts"],"names":[],"mappings":";AAGO,IAAM,WAAA,GAAgC;AAAA,EAC3C,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,cAAA,GAAiB;AAAA,EAC5B,GAAA,EAAA,gDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,qBAAA,GAAwB;AAAA,EACnC,GAAA,EAAA,wDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,qBAAA,GAAwB;AAAA,EACnC,GAAA,EAAA,wDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,qBAAA,GAAwB;AAAA,EACnC,GAAA,EAAA,wDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,oBAAA,GAAyC;AAAA,EACp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AAA,KACZ;AAAA,IACA,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,EAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,EAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,CAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,KAAA,EAAO;AAAA,MACL,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,CAAA;AAAA,MACT,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,QAAA;AAAA,MACN,OAAA,EAAS,CAAA;AAAA,MACT,QAAA,EAAU;AAAA;AACZ,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,QAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,WAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,oBAAA,EAAsB;AACxB;AAEO,IAAM,aAAA,GAAgB;AAAA,EAC3B,GAAA,EAAA,8CAAA;AAAA,EACA,GAAG;AACL","file":"chunk-62A5JJJ3.js","sourcesContent":["import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowIdSchema = {\n $id: SystemSchemaIds.RowId,\n ...rowIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowVersionIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowVersionIdSchema = {\n $id: SystemSchemaIds.RowVersionId,\n ...rowVersionIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowCreatedIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowCreatedIdSchema = {\n $id: SystemSchemaIds.RowCreatedId,\n ...rowCreatedIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowCreatedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowCreatedAtSchema = {\n $id: SystemSchemaIds.RowCreatedAt,\n ...rowCreatedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowPublishedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n};\n\nexport const ajvRowPublishedAtSchema = {\n $id: SystemSchemaIds.RowPublishedAt,\n ...rowPublishedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowUpdatedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowUpdatedAtSchema = {\n $id: SystemSchemaIds.RowUpdatedAt,\n ...rowUpdatedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowHashSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowHashSchema = {\n $id: SystemSchemaIds.RowHash,\n ...rowHashSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowSchemaHashSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowSchemaHashSchema = {\n $id: SystemSchemaIds.RowSchemaHash,\n ...rowSchemaHashSchema,\n};\n","import { JsonObjectSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const fileSchema: JsonObjectSchema = {\n type: 'object',\n properties: {\n status: { type: 'string', default: '', readOnly: true },\n fileId: { type: 'string', default: '', readOnly: true },\n url: { type: 'string', default: '', readOnly: true },\n fileName: { type: 'string', default: '' },\n hash: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n extension: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n mimeType: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n size: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n width: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n height: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n },\n required: [\n 'status',\n 'fileId',\n 'url',\n 'fileName',\n 'hash',\n 'extension',\n 'mimeType',\n 'size',\n 'width',\n 'height',\n ],\n additionalProperties: false,\n};\n\nexport const ajvFileSchema = {\n $id: SystemSchemaIds.File,\n ...fileSchema,\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/lib/schema-helpers.ts"],"names":[],"mappings":";AAiBO,IAAM,kBAAkB,CAAC;AAAA,EAC9B,IAAA;AAAA,EACA;AACF,CAAA,MAGyB;AAAA,EACvB,EAAA,EAAI,SAAA;AAAA,EACJ,IAAA;AAAA,EACA;AACF,CAAA;AAEO,IAAM,iBAAiB,CAAC;AAAA,EAC7B;AACF,CAAA,MAEwB;AAAA,EACtB,EAAA,EAAI,QAAA;AAAA,EACJ;AACF,CAAA;AAEO,IAAM,cAAc,CAAC;AAAA,EAC1B,IAAA;AAAA,EACA;AACF,CAAA,MAGqB;AAAA,EACnB,EAAA,EAAI,KAAA;AAAA,EACJ,IAAA;AAAA,EACA;AACF,CAAA;AAEO,IAA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,CAAgB,YAAY,OAAO;AAC9B,IAAM,MAAM,CACjB,KAAA,EACA,OAAA,KAC4C,cAAA,CAAe,OAAO,OAAO;AACpE,IAAM,MAAM,CAAC,IAAA,EAAc,OAAA,KAChC,YAAA,CAAa,MAAM,OAAO","file":"chunk-BIBFHULN.js","sourcesContent":["import {\n JsonArraySchema,\n JsonBooleanSchema,\n JsonNumberSchema,\n JsonObjectSchema,\n JsonRefSchema,\n JsonSchema,\n JsonStringSchema,\n XFormula,\n} from '../types/schema.types.js';\nimport {\n JsonPatchAdd,\n JsonPatchMove,\n JsonPatchRemove,\n JsonPatchReplace,\n} from '../types/json-patch.types.js';\n\nexport const getReplacePatch = ({\n path,\n value,\n}: {\n path: string;\n value: JsonSchema;\n}): JsonPatchReplace => ({\n op: 'replace',\n path,\n value,\n});\n\nexport const getRemovePatch = ({\n path,\n}: {\n path: string;\n}): JsonPatchRemove => ({\n op: 'remove',\n path,\n});\n\nexport const getAddPatch = ({\n path,\n value,\n}: {\n path: string;\n value: JsonSchema;\n}): JsonPatchAdd => ({\n op: 'add',\n path,\n value,\n});\n\nexport const getMovePatch = ({\n from,\n path,\n}: {\n from: string;\n path: string;\n}): JsonPatchMove => ({\n op: 'move',\n from,\n path,\n});\n\nexport type StringSchemaOptions = Partial<\n Omit<JsonStringSchema, 'type' | 'x-formula'> & { formula: string }\n>;\n\nexport type NumberSchemaOptions = Partial<\n Omit<JsonNumberSchema, 'type' | 'x-formula'> & { formula: string }\n>;\n\nexport type BooleanSchemaOptions = Partial<\n Omit<JsonBooleanSchema, 'type' | 'x-formula'> & { formula: string }\n>;\n\nexport type ObjectSchemaOptions = Partial<Omit<JsonObjectSchema, 'type' | 'properties' | 'required'>>;\n\nexport type ArraySchemaOptions = Partial<Omit<JsonArraySchema, 'type' | 'items'>>;\n\nexport type RefSchemaOptions = Partial<Omit<JsonRefSchema, '$ref'>>;\n\nconst buildFormula = (expression: string): XFormula => ({\n version: 1,\n expression,\n});\n\nexport const getStringSchema = (params: StringSchemaOptions = {}): JsonStringSchema => {\n const { formula, ...rest } = params;\n return {\n type: 'string',\n ...rest,\n default: rest.default ?? '',\n ...(formula && { 'x-formula': buildFormula(formula) }),\n };\n};\n\nexport const getNumberSchema = (params: NumberSchemaOptions = {}): JsonNumberSchema => {\n const { formula, ...rest } = params;\n return {\n type: 'number',\n ...rest,\n default: rest.default ?? 0,\n ...(formula && { 'x-formula': buildFormula(formula) }),\n };\n};\n\nexport const getBooleanSchema = (params: BooleanSchemaOptions = {}): JsonBooleanSchema => {\n const { formula, ...rest } = params;\n return {\n type: 'boolean',\n ...rest,\n default: rest.default ?? false,\n ...(formula && { 'x-formula': buildFormula(formula) }),\n };\n};\n\nexport const getObjectSchema = <P extends Record<string, JsonSchema>>(\n properties: P,\n options: ObjectSchemaOptions = {},\n): JsonObjectSchema & { readonly properties: { readonly [K in keyof P]: P[K] } } => ({\n type: 'object',\n additionalProperties: false,\n required: Object.keys(properties).sort((a, b) => a.localeCompare(b)),\n properties: properties as { readonly [K in keyof P]: P[K] },\n ...options,\n});\n\nexport const getArraySchema = <I extends JsonSchema>(\n items: I,\n options: ArraySchemaOptions = {},\n): JsonArraySchema & { readonly items: I } => ({\n type: 'array',\n items,\n ...options,\n});\n\nexport const getRefSchema = ($ref: string, options: RefSchemaOptions = {}): JsonRefSchema => ({\n $ref,\n ...options,\n});\n\nexport const str = (params: StringSchemaOptions = {}): JsonStringSchema => getStringSchema(params);\nexport const num = (params: NumberSchemaOptions = {}): JsonNumberSchema => getNumberSchema(params);\nexport const bool = (params: BooleanSchemaOptions = {}): JsonBooleanSchema =>\n getBooleanSchema(params);\n\nexport type StringFormulaOptions = Omit<StringSchemaOptions, 'formula' | 'readOnly'>;\nexport type NumberFormulaOptions = Omit<NumberSchemaOptions, 'formula' | 'readOnly'>;\nexport type BooleanFormulaOptions = Omit<BooleanSchemaOptions, 'formula' | 'readOnly'>;\n\nexport const strFormula = (\n formula: string,\n params: StringFormulaOptions = {},\n): JsonStringSchema => getStringSchema({ ...params, formula, readOnly: true });\nexport const numFormula = (\n formula: string,\n params: NumberFormulaOptions = {},\n): JsonNumberSchema => getNumberSchema({ ...params, formula, readOnly: true });\nexport const boolFormula = (\n formula: string,\n params: BooleanFormulaOptions = {},\n): JsonBooleanSchema => getBooleanSchema({ ...params, formula, readOnly: true });\nexport const obj = <P extends Record<string, JsonSchema>>(\n properties: P,\n options?: ObjectSchemaOptions,\n): JsonObjectSchema & { readonly properties: { readonly [K in keyof P]: P[K] } } =>\n getObjectSchema(properties, options);\nexport const arr = <I extends JsonSchema>(\n items: I,\n options?: ArraySchemaOptions,\n): JsonArraySchema & { readonly items: I } => getArraySchema(items, options);\nexport const ref = ($ref: string, options?: RefSchemaOptions): JsonRefSchema =>\n getRefSchema($ref, options);\n\nexport type { ContentMediaType } from '../types/schema.types.js';\n"]}
@@ -1,4 +0,0 @@
1
- 'use strict';
2
-
3
- //# sourceMappingURL=chunk-BZWL424W.cjs.map
4
- //# sourceMappingURL=chunk-BZWL424W.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-BZWL424W.cjs"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/types/schema.types.ts"],"names":["JsonSchemaTypeName"],"mappings":";;;AACO,IAAK,kBAAA,qBAAAA,mBAAAA,KAAL;AACL,EAAAA,oBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,oBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,oBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,oBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,oBAAA,OAAA,CAAA,GAAQ,OAAA;AALE,EAAA,OAAAA,mBAAAA;AAAA,CAAA,EAAA,kBAAA,IAAA,EAAA","file":"chunk-CGVYS7EK.cjs","sourcesContent":["/** @deprecated Use string literals ('string', 'number', etc.) or the `JsonSchemaType` union instead. */\nexport enum JsonSchemaTypeName {\n String = 'string',\n Number = 'number',\n Boolean = 'boolean',\n Object = 'object',\n Array = 'array',\n}\n\nexport type JsonSchemaType = 'string' | 'number' | 'boolean' | 'object' | 'array';\n\nexport type XFormula = {\n version: 1;\n expression: string;\n};\n\nexport type JsonSchemaSharedFields = {\n deprecated?: boolean;\n description?: string;\n title?: string;\n};\n\nexport type ContentMediaType =\n | 'text/plain'\n | 'text/markdown'\n | 'text/html'\n | 'application/json'\n | 'application/schema+json'\n | 'application/yaml';\n\nexport type JsonStringSchema = {\n type: 'string';\n default: string;\n foreignKey?: string;\n readOnly?: boolean;\n required?: boolean;\n title?: string;\n description?: string;\n deprecated?: boolean;\n pattern?: string;\n format?: 'date-time' | 'date' | 'time' | 'email' | 'regex';\n contentMediaType?: ContentMediaType;\n minLength?: number;\n maxLength?: number;\n enum?: string[];\n 'x-formula'?: XFormula;\n} & JsonSchemaSharedFields;\n\nexport type JsonNumberSchema = {\n type: 'number';\n default: number;\n readOnly?: boolean;\n title?: string;\n description?: string;\n deprecated?: boolean;\n minimum?: number;\n maximum?: number;\n enum?: number[];\n 'x-formula'?: XFormula;\n} & JsonSchemaSharedFields;\n\nexport type JsonBooleanSchema = {\n type: 'boolean';\n default: boolean;\n readOnly?: boolean;\n title?: string;\n description?: string;\n deprecated?: boolean;\n 'x-formula'?: XFormula;\n} & JsonSchemaSharedFields;\n\nexport type JsonSchemaPrimitives =\n | JsonStringSchema\n | JsonNumberSchema\n | JsonBooleanSchema;\n\nexport type JsonObjectSchema = {\n type: 'object';\n additionalProperties: false;\n required: string[];\n properties: Record<string, JsonSchema>;\n title?: string;\n description?: string;\n deprecated?: boolean;\n} & JsonSchemaSharedFields;\n\nexport type JsonArraySchema = {\n type: 'array';\n items: JsonSchema;\n title?: string;\n description?: string;\n deprecated?: boolean;\n} & JsonSchemaSharedFields;\n\nexport type JsonRefSchema = {\n $ref: string;\n title?: string;\n description?: string;\n deprecated?: boolean;\n};\n\nexport type JsonSchema =\n | JsonObjectSchema\n | JsonArraySchema\n | JsonSchemaPrimitives\n | JsonRefSchema;\n\nexport type JsonSchemaWithoutRef =\n | JsonObjectSchema\n | JsonArraySchema\n | JsonSchemaPrimitives;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/types/schema.types.ts"],"names":["JsonSchemaTypeName"],"mappings":";AACO,IAAK,kBAAA,qBAAAA,mBAAAA,KAAL;AACL,EAAAA,oBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,oBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,oBAAA,SAAA,CAAA,GAAU,SAAA;AACV,EAAAA,oBAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,oBAAA,OAAA,CAAA,GAAQ,OAAA;AALE,EAAA,OAAAA,mBAAAA;AAAA,CAAA,EAAA,kBAAA,IAAA,EAAA","file":"chunk-DRPNJ4YP.js","sourcesContent":["/** @deprecated Use string literals ('string', 'number', etc.) or the `JsonSchemaType` union instead. */\nexport enum JsonSchemaTypeName {\n String = 'string',\n Number = 'number',\n Boolean = 'boolean',\n Object = 'object',\n Array = 'array',\n}\n\nexport type JsonSchemaType = 'string' | 'number' | 'boolean' | 'object' | 'array';\n\nexport type XFormula = {\n version: 1;\n expression: string;\n};\n\nexport type JsonSchemaSharedFields = {\n deprecated?: boolean;\n description?: string;\n title?: string;\n};\n\nexport type ContentMediaType =\n | 'text/plain'\n | 'text/markdown'\n | 'text/html'\n | 'application/json'\n | 'application/schema+json'\n | 'application/yaml';\n\nexport type JsonStringSchema = {\n type: 'string';\n default: string;\n foreignKey?: string;\n readOnly?: boolean;\n required?: boolean;\n title?: string;\n description?: string;\n deprecated?: boolean;\n pattern?: string;\n format?: 'date-time' | 'date' | 'time' | 'email' | 'regex';\n contentMediaType?: ContentMediaType;\n minLength?: number;\n maxLength?: number;\n enum?: string[];\n 'x-formula'?: XFormula;\n} & JsonSchemaSharedFields;\n\nexport type JsonNumberSchema = {\n type: 'number';\n default: number;\n readOnly?: boolean;\n title?: string;\n description?: string;\n deprecated?: boolean;\n minimum?: number;\n maximum?: number;\n enum?: number[];\n 'x-formula'?: XFormula;\n} & JsonSchemaSharedFields;\n\nexport type JsonBooleanSchema = {\n type: 'boolean';\n default: boolean;\n readOnly?: boolean;\n title?: string;\n description?: string;\n deprecated?: boolean;\n 'x-formula'?: XFormula;\n} & JsonSchemaSharedFields;\n\nexport type JsonSchemaPrimitives =\n | JsonStringSchema\n | JsonNumberSchema\n | JsonBooleanSchema;\n\nexport type JsonObjectSchema = {\n type: 'object';\n additionalProperties: false;\n required: string[];\n properties: Record<string, JsonSchema>;\n title?: string;\n description?: string;\n deprecated?: boolean;\n} & JsonSchemaSharedFields;\n\nexport type JsonArraySchema = {\n type: 'array';\n items: JsonSchema;\n title?: string;\n description?: string;\n deprecated?: boolean;\n} & JsonSchemaSharedFields;\n\nexport type JsonRefSchema = {\n $ref: string;\n title?: string;\n description?: string;\n deprecated?: boolean;\n};\n\nexport type JsonSchema =\n | JsonObjectSchema\n | JsonArraySchema\n | JsonSchemaPrimitives\n | JsonRefSchema;\n\nexport type JsonSchemaWithoutRef =\n | JsonObjectSchema\n | JsonArraySchema\n | JsonSchemaPrimitives;\n"]}