@revisium/schema-toolkit 0.20.2 → 0.21.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.
- package/README.md +216 -0
- package/dist/FormulaPathBuilder-BUJRR0Am.d.cts +48 -0
- package/dist/FormulaPathBuilder-QR0htn-e.d.ts +48 -0
- package/dist/chunk-2NARA22J.js +3 -0
- package/dist/{chunk-NY3H6C7K.js.map → chunk-2NARA22J.js.map} +1 -1
- package/dist/{chunk-EGC32GPY.cjs → chunk-3DDUT57J.cjs} +21 -21
- package/dist/chunk-3DDUT57J.cjs.map +1 -0
- package/dist/{chunk-LLHQWDAR.js → chunk-62A5JJJ3.js} +21 -21
- package/dist/chunk-62A5JJJ3.js.map +1 -0
- package/dist/{chunk-R4CFU33U.js → chunk-BIBFHULN.js} +12 -9
- package/dist/chunk-BIBFHULN.js.map +1 -0
- package/dist/chunk-BZWL424W.cjs +4 -0
- package/dist/{chunk-G6ZKEVVU.cjs.map → chunk-BZWL424W.cjs.map} +1 -1
- package/dist/{chunk-J6SCHJKG.cjs → chunk-CGVYS7EK.cjs} +2 -2
- package/dist/chunk-CGVYS7EK.cjs.map +1 -0
- package/dist/{chunk-MPF6VCB5.js → chunk-DRPNJ4YP.js} +2 -2
- package/dist/chunk-DRPNJ4YP.js.map +1 -0
- package/dist/{chunk-FZ2MS4Q5.cjs → chunk-F4POD7AE.cjs} +149 -90
- package/dist/chunk-F4POD7AE.cjs.map +1 -0
- package/dist/{chunk-B3T6YB2D.cjs → chunk-HH2LDPVV.cjs} +30 -30
- package/dist/chunk-HH2LDPVV.cjs.map +1 -0
- package/dist/{chunk-46ME2TAU.cjs → chunk-JWYYVKRT.cjs} +7 -7
- package/dist/{chunk-46ME2TAU.cjs.map → chunk-JWYYVKRT.cjs.map} +1 -1
- package/dist/{chunk-U5YDA3LA.js → chunk-MK3IKVZO.js} +80 -24
- package/dist/chunk-MK3IKVZO.js.map +1 -0
- package/dist/{chunk-VGADCIBG.cjs → chunk-SBO2UMI3.cjs} +14 -8
- package/dist/chunk-SBO2UMI3.cjs.map +1 -0
- package/dist/{chunk-55AMH44G.js → chunk-TKMR6CQW.js} +30 -30
- package/dist/chunk-TKMR6CQW.js.map +1 -0
- package/dist/{chunk-3JZKQWQH.js → chunk-TMCRV6V5.js} +7 -7
- package/dist/{chunk-3JZKQWQH.js.map → chunk-TMCRV6V5.js.map} +1 -1
- package/dist/{chunk-QEV4Q4TR.js → chunk-UTSL45Q4.js} +32 -32
- package/dist/chunk-UTSL45Q4.js.map +1 -0
- package/dist/{chunk-V6JTSET2.cjs → chunk-Z7M4ZGC6.cjs} +51 -51
- package/dist/chunk-Z7M4ZGC6.cjs.map +1 -0
- package/dist/core/index.cjs +60 -62
- package/dist/core/index.d.cts +6 -4
- package/dist/core/index.d.ts +6 -4
- package/dist/core/index.js +1 -3
- package/dist/formula/index.d.cts +1 -1
- package/dist/formula/index.d.ts +1 -1
- package/dist/index.cjs +237 -214
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +9 -10
- package/dist/{json-patch.types-DY7k9hxy.d.ts → json-patch.types-BpVnp08Z.d.ts} +1 -1
- package/dist/{json-patch.types-Cu0Medki.d.cts → json-patch.types-eM6pYC2P.d.cts} +1 -1
- package/dist/{json-string.store-C58zbl31.d.ts → json-string.store-DfdLcgnM.d.ts} +11 -11
- package/dist/{json-string.store-DuI--IL2.d.cts → json-string.store-cAOADo23.d.cts} +11 -11
- package/dist/lib/index.cjs +41 -42
- package/dist/lib/index.d.cts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +4 -5
- package/dist/mocks/index.cjs +30 -19
- package/dist/mocks/index.d.cts +22 -8
- package/dist/mocks/index.d.ts +22 -8
- package/dist/mocks/index.js +2 -3
- package/dist/model/index.cjs +85 -76
- package/dist/model/index.d.cts +158 -346
- package/dist/model/index.d.ts +158 -346
- package/dist/model/index.js +4 -7
- package/dist/plugins/index.cjs +19 -20
- package/dist/plugins/index.d.cts +10 -10
- package/dist/plugins/index.d.ts +10 -10
- package/dist/plugins/index.js +1 -2
- package/dist/{schema.types-B5OgKLpV.d.cts → schema.types-On_VGw2m.d.cts} +7 -6
- package/dist/{schema.types-B5OgKLpV.d.ts → schema.types-On_VGw2m.d.ts} +7 -6
- package/dist/typed-BinPIf3R.d.ts +455 -0
- package/dist/typed-LSaUJayS.d.cts +455 -0
- package/dist/types/index.cjs +5 -6
- package/dist/types/index.d.cts +7 -5
- package/dist/types/index.d.ts +7 -5
- package/dist/types/index.js +1 -2
- package/dist/{FormulaPathBuilder-DwlKOvVB.d.ts → types-BIvIURgy.d.cts} +37 -82
- package/dist/{FormulaPathBuilder-D9LkBcSv.d.cts → types-C_pTFtSY.d.ts} +37 -82
- package/package.json +1 -1
- package/dist/chunk-3IKI64T2.js +0 -3
- package/dist/chunk-3IKI64T2.js.map +0 -1
- package/dist/chunk-55AMH44G.js.map +0 -1
- package/dist/chunk-B3T6YB2D.cjs.map +0 -1
- package/dist/chunk-EGC32GPY.cjs.map +0 -1
- package/dist/chunk-FZ2MS4Q5.cjs.map +0 -1
- package/dist/chunk-G6ZKEVVU.cjs +0 -4
- package/dist/chunk-J6SCHJKG.cjs.map +0 -1
- package/dist/chunk-LLHQWDAR.js.map +0 -1
- package/dist/chunk-MPF6VCB5.js.map +0 -1
- package/dist/chunk-NY3H6C7K.js +0 -3
- package/dist/chunk-QEV4Q4TR.js.map +0 -1
- package/dist/chunk-R4CFU33U.js.map +0 -1
- package/dist/chunk-TBFTADML.cjs +0 -4
- package/dist/chunk-TBFTADML.cjs.map +0 -1
- package/dist/chunk-U5YDA3LA.js.map +0 -1
- package/dist/chunk-V6JTSET2.cjs.map +0 -1
- package/dist/chunk-VGADCIBG.cjs.map +0 -1
- package/dist/json-value-patch.types-CgiEpchp.d.ts +0 -24
- package/dist/json-value-patch.types-LEJxcIWR.d.cts +0 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/lib/schema-helpers.ts
|
|
2
2
|
var getReplacePatch = ({
|
|
3
3
|
path,
|
|
4
4
|
value
|
|
@@ -36,7 +36,7 @@ var buildFormula = (expression) => ({
|
|
|
36
36
|
var getStringSchema = (params = {}) => {
|
|
37
37
|
const { formula, ...rest } = params;
|
|
38
38
|
return {
|
|
39
|
-
type: "string"
|
|
39
|
+
type: "string",
|
|
40
40
|
...rest,
|
|
41
41
|
default: rest.default ?? "",
|
|
42
42
|
...formula && { "x-formula": buildFormula(formula) }
|
|
@@ -45,7 +45,7 @@ var getStringSchema = (params = {}) => {
|
|
|
45
45
|
var getNumberSchema = (params = {}) => {
|
|
46
46
|
const { formula, ...rest } = params;
|
|
47
47
|
return {
|
|
48
|
-
type: "number"
|
|
48
|
+
type: "number",
|
|
49
49
|
...rest,
|
|
50
50
|
default: rest.default ?? 0,
|
|
51
51
|
...formula && { "x-formula": buildFormula(formula) }
|
|
@@ -54,21 +54,21 @@ var getNumberSchema = (params = {}) => {
|
|
|
54
54
|
var getBooleanSchema = (params = {}) => {
|
|
55
55
|
const { formula, ...rest } = params;
|
|
56
56
|
return {
|
|
57
|
-
type: "boolean"
|
|
57
|
+
type: "boolean",
|
|
58
58
|
...rest,
|
|
59
59
|
default: rest.default ?? false,
|
|
60
60
|
...formula && { "x-formula": buildFormula(formula) }
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
var getObjectSchema = (properties, options = {}) => ({
|
|
64
|
-
type: "object"
|
|
64
|
+
type: "object",
|
|
65
65
|
additionalProperties: false,
|
|
66
66
|
required: Object.keys(properties).sort((a, b) => a.localeCompare(b)),
|
|
67
67
|
properties,
|
|
68
68
|
...options
|
|
69
69
|
});
|
|
70
70
|
var getArraySchema = (items, options = {}) => ({
|
|
71
|
-
type: "array"
|
|
71
|
+
type: "array",
|
|
72
72
|
items,
|
|
73
73
|
...options
|
|
74
74
|
});
|
|
@@ -79,10 +79,13 @@ var getRefSchema = ($ref, options = {}) => ({
|
|
|
79
79
|
var str = (params = {}) => getStringSchema(params);
|
|
80
80
|
var num = (params = {}) => getNumberSchema(params);
|
|
81
81
|
var bool = (params = {}) => getBooleanSchema(params);
|
|
82
|
+
var strFormula = (formula, params = {}) => getStringSchema({ ...params, formula, readOnly: true });
|
|
83
|
+
var numFormula = (formula, params = {}) => getNumberSchema({ ...params, formula, readOnly: true });
|
|
84
|
+
var boolFormula = (formula, params = {}) => getBooleanSchema({ ...params, formula, readOnly: true });
|
|
82
85
|
var obj = (properties, options) => getObjectSchema(properties, options);
|
|
83
86
|
var arr = (items, options) => getArraySchema(items, options);
|
|
84
87
|
var ref = ($ref, options) => getRefSchema($ref, options);
|
|
85
88
|
|
|
86
|
-
export { arr, bool, getAddPatch, getArraySchema, getBooleanSchema, getMovePatch, getNumberSchema, getObjectSchema, getRefSchema, getRemovePatch, getReplacePatch, getStringSchema, num, obj, ref, str };
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
88
|
-
//# sourceMappingURL=chunk-
|
|
89
|
+
export { arr, bool, boolFormula, getAddPatch, getArraySchema, getBooleanSchema, getMovePatch, getNumberSchema, getObjectSchema, getRefSchema, getRemovePatch, getReplacePatch, getStringSchema, num, numFormula, obj, ref, str, strFormula };
|
|
90
|
+
//# sourceMappingURL=chunk-BIBFHULN.js.map
|
|
91
|
+
//# sourceMappingURL=chunk-BIBFHULN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,IAA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iB,EAAE,GAAG,MAAA,EAAQ,OAAA,EAAS,QAAA,EAAU,MAAM;AACxE,IAAM,MAAM,CACjB,UAAA,EACA,OAAA,KAEA,eAAA,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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-BZWL424W.cjs"}
|
|
@@ -11,5 +11,5 @@ var JsonSchemaTypeName = /* @__PURE__ */ ((JsonSchemaTypeName2) => {
|
|
|
11
11
|
})(JsonSchemaTypeName || {});
|
|
12
12
|
|
|
13
13
|
exports.JsonSchemaTypeName = JsonSchemaTypeName;
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-CGVYS7EK.cjs.map
|
|
15
|
+
//# sourceMappingURL=chunk-CGVYS7EK.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -9,5 +9,5 @@ var JsonSchemaTypeName = /* @__PURE__ */ ((JsonSchemaTypeName2) => {
|
|
|
9
9
|
})(JsonSchemaTypeName || {});
|
|
10
10
|
|
|
11
11
|
export { JsonSchemaTypeName };
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-DRPNJ4YP.js.map
|
|
13
|
+
//# sourceMappingURL=chunk-DRPNJ4YP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|