@based/schema 2.5.3 → 2.7.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/dist/src/compat/Untitled-1.d.ts +3 -0
- package/dist/src/compat/Untitled-1.js +205 -0
- package/dist/src/compat/index.d.ts +2 -0
- package/dist/src/compat/index.js +3 -0
- package/dist/src/compat/newToOld.d.ts +3 -0
- package/dist/src/compat/newToOld.js +213 -0
- package/dist/src/compat/oldSchemaType.d.ts +69 -0
- package/dist/src/compat/oldSchemaType.js +2 -0
- package/dist/src/compat/oldToNew.d.ts +3 -0
- package/dist/src/compat/oldToNew.js +210 -0
- package/dist/src/display/number.d.ts +2 -1
- package/dist/src/display/number.js +10 -0
- package/dist/src/display/string.d.ts +3 -1
- package/dist/src/display/string.js +5 -0
- package/dist/src/display/timestamp.d.ts +3 -1
- package/dist/src/display/timestamp.js +9 -0
- package/dist/src/error.d.ts +3 -1
- package/dist/src/error.js +2 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +2 -1
- package/dist/src/types.d.ts +4 -3
- package/dist/src/types.js +74 -0
- package/dist/src/validateSchema/basedSchemaTypeValidator.d.ts +3 -0
- package/dist/src/validateSchema/basedSchemaTypeValidator.js +45 -0
- package/dist/src/validateSchema/fieldValidators.d.ts +27 -0
- package/dist/src/validateSchema/fieldValidators.js +352 -0
- package/dist/src/validateSchema/index.d.ts +17 -0
- package/dist/src/validateSchema/index.js +109 -0
- package/dist/src/validateSchema/utils.d.ts +21 -0
- package/dist/src/validateSchema/utils.js +53 -0
- package/dist/test/compat.js +15 -0
- package/dist/test/data/newSchemas.d.ts +2 -0
- package/dist/test/data/newSchemas.js +254 -0
- package/dist/test/data/oldSchemas.d.ts +2 -0
- package/dist/test/data/oldSchemas.js +5058 -0
- package/dist/test/validateSchema/basic.d.ts +1 -0
- package/dist/test/validateSchema/basic.js +94 -0
- package/dist/test/validateSchema/fields.d.ts +1 -0
- package/dist/test/validateSchema/fields.js +366 -0
- package/dist/test/validateSchema/languages.d.ts +1 -0
- package/dist/test/validateSchema/languages.js +124 -0
- package/package.json +4 -1
- package/dist/src/validateSchema.d.ts +0 -4
- package/dist/src/validateSchema.js +0 -35
- package/dist/test/validateSchema.js +0 -38
- /package/dist/test/{validateSchema.d.ts → compat.d.ts} +0 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
const metaChecker = (field) => {
|
|
2
|
+
return (field === 'validation' ||
|
|
3
|
+
field === 'format' ||
|
|
4
|
+
field === 'index' ||
|
|
5
|
+
field === 'description' ||
|
|
6
|
+
field === 'title' ||
|
|
7
|
+
field === 'examples' ||
|
|
8
|
+
field === 'ui' ||
|
|
9
|
+
field === 'isRequired' ||
|
|
10
|
+
field === 'title' ||
|
|
11
|
+
field === 'description' ||
|
|
12
|
+
field === 'index' ||
|
|
13
|
+
field === 'readOnly' ||
|
|
14
|
+
field === 'writeOnly' ||
|
|
15
|
+
field === '$comment' ||
|
|
16
|
+
field === 'examples' ||
|
|
17
|
+
field === 'default' ||
|
|
18
|
+
field === 'customValidator' ||
|
|
19
|
+
field === 'value' ||
|
|
20
|
+
field === 'path' ||
|
|
21
|
+
field === 'target' ||
|
|
22
|
+
field === 'minLength' ||
|
|
23
|
+
field === 'maxLength' ||
|
|
24
|
+
field === 'contentMediaEncoding' ||
|
|
25
|
+
field === 'pattern' ||
|
|
26
|
+
field === 'display' ||
|
|
27
|
+
field === 'multiline' ||
|
|
28
|
+
field === 'multipleOf' ||
|
|
29
|
+
field === 'minimum' ||
|
|
30
|
+
field === 'maximum' ||
|
|
31
|
+
field === 'exclusiveMaximum' ||
|
|
32
|
+
field === 'exclusiveMinimum' ||
|
|
33
|
+
field === '$delete');
|
|
34
|
+
};
|
|
35
|
+
const excludedFields = (field) => {
|
|
36
|
+
return field === 'language' || field === 'translations' || field === '$defs';
|
|
37
|
+
};
|
|
38
|
+
const DEFAULT_FIELDS = {
|
|
39
|
+
id: { type: 'string' },
|
|
40
|
+
createdAt: { type: 'timestamp' },
|
|
41
|
+
updatedAt: { type: 'timestamp' },
|
|
42
|
+
type: { type: 'string' },
|
|
43
|
+
parents: { type: 'references' },
|
|
44
|
+
children: { type: 'references' },
|
|
45
|
+
ancestors: { type: 'references' },
|
|
46
|
+
descendants: { type: 'references' },
|
|
47
|
+
aliases: {
|
|
48
|
+
type: 'set',
|
|
49
|
+
items: { type: 'string' },
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
const metaParser = (obj) => {
|
|
53
|
+
const tmp = {};
|
|
54
|
+
for (const i in obj) {
|
|
55
|
+
if (metaChecker(i)) {
|
|
56
|
+
if (i === 'title') {
|
|
57
|
+
tmp.name = obj[i];
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
tmp[i] = obj[i];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return Object.keys({ meta: tmp }.meta).length > 0 ? { meta: tmp } : null;
|
|
65
|
+
};
|
|
66
|
+
const migrateField = (oldField) => {
|
|
67
|
+
switch (oldField?.type) {
|
|
68
|
+
case 'object':
|
|
69
|
+
return {
|
|
70
|
+
...metaParser(oldField),
|
|
71
|
+
type: 'object',
|
|
72
|
+
properties: migrateFields(oldField.properties, true),
|
|
73
|
+
};
|
|
74
|
+
case 'json':
|
|
75
|
+
return {
|
|
76
|
+
...oldField,
|
|
77
|
+
...metaParser(oldField),
|
|
78
|
+
type: 'json',
|
|
79
|
+
};
|
|
80
|
+
case 'array':
|
|
81
|
+
const values = migrateField(oldField.items);
|
|
82
|
+
if (!values) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
...metaParser(oldField),
|
|
87
|
+
type: 'array',
|
|
88
|
+
items: values,
|
|
89
|
+
};
|
|
90
|
+
case 'set':
|
|
91
|
+
return {
|
|
92
|
+
...metaParser(oldField),
|
|
93
|
+
type: 'set',
|
|
94
|
+
items: migrateField(oldField.items),
|
|
95
|
+
};
|
|
96
|
+
case 'record':
|
|
97
|
+
return {
|
|
98
|
+
...metaParser(oldField),
|
|
99
|
+
type: 'record',
|
|
100
|
+
values: migrateField(oldField.values),
|
|
101
|
+
};
|
|
102
|
+
case 'reference':
|
|
103
|
+
case 'references':
|
|
104
|
+
return {
|
|
105
|
+
...metaParser(oldField),
|
|
106
|
+
type: oldField.type,
|
|
107
|
+
...(oldField.bidirectional
|
|
108
|
+
? { bidirectional: oldField.bidirectional }
|
|
109
|
+
: null),
|
|
110
|
+
};
|
|
111
|
+
case 'float':
|
|
112
|
+
return {
|
|
113
|
+
...metaParser(oldField),
|
|
114
|
+
type: 'number',
|
|
115
|
+
};
|
|
116
|
+
case 'int':
|
|
117
|
+
return {
|
|
118
|
+
...metaParser(oldField),
|
|
119
|
+
type: 'integer',
|
|
120
|
+
};
|
|
121
|
+
case 'digest':
|
|
122
|
+
return {
|
|
123
|
+
format: 'strongPassword',
|
|
124
|
+
type: 'string',
|
|
125
|
+
};
|
|
126
|
+
case 'id':
|
|
127
|
+
return {
|
|
128
|
+
...metaParser(oldField),
|
|
129
|
+
type: 'string',
|
|
130
|
+
};
|
|
131
|
+
case 'url':
|
|
132
|
+
return {
|
|
133
|
+
...metaParser(oldField),
|
|
134
|
+
format: 'URL',
|
|
135
|
+
type: 'string',
|
|
136
|
+
};
|
|
137
|
+
case 'email':
|
|
138
|
+
return {
|
|
139
|
+
...metaParser(oldField),
|
|
140
|
+
type: 'string',
|
|
141
|
+
};
|
|
142
|
+
case 'phone':
|
|
143
|
+
return {
|
|
144
|
+
format: 'mobilePhone',
|
|
145
|
+
type: 'string',
|
|
146
|
+
};
|
|
147
|
+
case 'geo':
|
|
148
|
+
return {
|
|
149
|
+
format: 'latLong',
|
|
150
|
+
type: 'string',
|
|
151
|
+
};
|
|
152
|
+
case 'type':
|
|
153
|
+
return {
|
|
154
|
+
...metaParser(oldField),
|
|
155
|
+
type: 'string',
|
|
156
|
+
};
|
|
157
|
+
default:
|
|
158
|
+
return {
|
|
159
|
+
...metaParser(oldField),
|
|
160
|
+
type: oldField.type,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const migrateFields = (oldFields, recursing = false) => {
|
|
165
|
+
const result = {};
|
|
166
|
+
if (oldFields) {
|
|
167
|
+
for (const key in oldFields) {
|
|
168
|
+
if (oldFields.hasOwnProperty(key)) {
|
|
169
|
+
if (!recursing && Object.keys(DEFAULT_FIELDS).includes(key)) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
const field = migrateField(oldFields[key]);
|
|
173
|
+
if (!field) {
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
result[key] = field;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return result;
|
|
181
|
+
};
|
|
182
|
+
const migrateTypes = (oldSchema) => {
|
|
183
|
+
const result = {
|
|
184
|
+
types: {},
|
|
185
|
+
};
|
|
186
|
+
for (const key in oldSchema.types) {
|
|
187
|
+
if (oldSchema.types.hasOwnProperty(key)) {
|
|
188
|
+
const type = oldSchema.types[key];
|
|
189
|
+
result.types[key] = {
|
|
190
|
+
...metaParser(type),
|
|
191
|
+
prefix: type.prefix,
|
|
192
|
+
fields: migrateFields(type.fields),
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return result;
|
|
197
|
+
};
|
|
198
|
+
export const convertNewToOld222 = (schema) => {
|
|
199
|
+
const tmpSchema = migrateTypes(schema);
|
|
200
|
+
tmpSchema.prefixToTypeMapping = schema.prefixToTypeMapping;
|
|
201
|
+
tmpSchema.languages = [schema.language, ...schema?.translations];
|
|
202
|
+
delete tmpSchema.root;
|
|
203
|
+
return tmpSchema;
|
|
204
|
+
};
|
|
205
|
+
//# sourceMappingURL=Untitled-1.js.map
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// import { BasedSchema } from '../types.js'
|
|
2
|
+
// import { BasedOldSchema } from './oldSchemaType.js'
|
|
3
|
+
const metaChecker = (field) => {
|
|
4
|
+
return (field === 'validation' ||
|
|
5
|
+
// field === 'format' ||
|
|
6
|
+
field === 'index' ||
|
|
7
|
+
field === 'description' ||
|
|
8
|
+
field === 'title' ||
|
|
9
|
+
field === 'examples' ||
|
|
10
|
+
field === 'ui' ||
|
|
11
|
+
field === 'isRequired' ||
|
|
12
|
+
field === 'title' ||
|
|
13
|
+
field === 'description' ||
|
|
14
|
+
field === 'index' ||
|
|
15
|
+
field === 'readOnly' ||
|
|
16
|
+
field === 'writeOnly' ||
|
|
17
|
+
field === '$comment' ||
|
|
18
|
+
field === 'examples' ||
|
|
19
|
+
field === 'default' ||
|
|
20
|
+
field === 'customValidator' ||
|
|
21
|
+
field === 'value' ||
|
|
22
|
+
field === 'path' ||
|
|
23
|
+
field === 'target' ||
|
|
24
|
+
field === 'minLength' ||
|
|
25
|
+
field === 'maxLength' ||
|
|
26
|
+
field === 'contentMediaEncoding' ||
|
|
27
|
+
field === 'pattern' ||
|
|
28
|
+
field === 'display' ||
|
|
29
|
+
field === 'multiline' ||
|
|
30
|
+
field === 'multipleOf' ||
|
|
31
|
+
field === 'minimum' ||
|
|
32
|
+
field === 'maximum' ||
|
|
33
|
+
field === 'exclusiveMaximum' ||
|
|
34
|
+
field === 'exclusiveMinimum' ||
|
|
35
|
+
field === '$delete' ||
|
|
36
|
+
field === 'display');
|
|
37
|
+
};
|
|
38
|
+
const excludedFields = (field) => {
|
|
39
|
+
return field === 'language' || field === 'translations' || field === '$defs';
|
|
40
|
+
};
|
|
41
|
+
const DEFAULT_FIELDS = {
|
|
42
|
+
// id: { type: 'string' },
|
|
43
|
+
// createdAt: { type: 'timestamp' },
|
|
44
|
+
// updatedAt: { type: 'timestamp' },
|
|
45
|
+
// type: { type: 'string' },
|
|
46
|
+
// parents: { type: 'references' },
|
|
47
|
+
// children: { type: 'references' },
|
|
48
|
+
// ancestors: { type: 'references' },
|
|
49
|
+
// descendants: { type: 'references' },
|
|
50
|
+
// aliases: {
|
|
51
|
+
// type: 'set',
|
|
52
|
+
// items: { type: 'string' },
|
|
53
|
+
// },
|
|
54
|
+
};
|
|
55
|
+
const metaParser = (obj) => {
|
|
56
|
+
const tmp = {};
|
|
57
|
+
for (const i in obj) {
|
|
58
|
+
if (metaChecker(i)) {
|
|
59
|
+
if (i === 'title') {
|
|
60
|
+
tmp.name = obj[i];
|
|
61
|
+
}
|
|
62
|
+
else if (obj[i] === 'bytes') {
|
|
63
|
+
tmp.format = obj[i];
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
tmp[i] = obj[i];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return Object.keys({ meta: tmp }.meta).length > 0 ? { meta: tmp } : null;
|
|
71
|
+
};
|
|
72
|
+
const migrateField = (field) => {
|
|
73
|
+
if (field?.type === 'object') {
|
|
74
|
+
return {
|
|
75
|
+
...metaParser(field),
|
|
76
|
+
type: 'object',
|
|
77
|
+
properties: migrateFields(field.properties, true),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
else if (field?.type === 'json') {
|
|
81
|
+
return {
|
|
82
|
+
...field,
|
|
83
|
+
...metaParser(field),
|
|
84
|
+
type: 'json',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
else if (field?.type === 'array') {
|
|
88
|
+
const values = migrateField(field.values);
|
|
89
|
+
if (!values) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
...metaParser(field),
|
|
94
|
+
type: 'array',
|
|
95
|
+
items: values,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
else if (field?.type === 'set') {
|
|
99
|
+
return {
|
|
100
|
+
...metaParser(field),
|
|
101
|
+
type: 'set',
|
|
102
|
+
items: migrateField(field.items),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
else if (field?.type === 'record') {
|
|
106
|
+
return {
|
|
107
|
+
...metaParser(field),
|
|
108
|
+
type: 'record',
|
|
109
|
+
values: migrateField(field.values),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
else if (field?.type === 'reference' || field?.type === 'references') {
|
|
113
|
+
return {
|
|
114
|
+
...metaParser(field),
|
|
115
|
+
type: field?.type,
|
|
116
|
+
...(field.bidirectional ? { bidirectional: field.bidirectional } : null),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
else if (field?.type === 'integer') {
|
|
120
|
+
return {
|
|
121
|
+
...metaParser(field),
|
|
122
|
+
type: 'int',
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
else if (field?.format === 'strongPassword') {
|
|
126
|
+
return { ...metaParser(field), type: 'digest' };
|
|
127
|
+
}
|
|
128
|
+
else if (field?.format === 'basedId') {
|
|
129
|
+
return { ...metaParser(field), type: 'id' };
|
|
130
|
+
}
|
|
131
|
+
else if (field?.format === 'URL') {
|
|
132
|
+
return { ...metaParser(field), type: 'url' };
|
|
133
|
+
}
|
|
134
|
+
else if (field?.format === 'email') {
|
|
135
|
+
return {
|
|
136
|
+
...metaParser(field),
|
|
137
|
+
type: 'email',
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
else if (field?.format === 'mobilePhone') {
|
|
141
|
+
return {
|
|
142
|
+
...metaParser(field),
|
|
143
|
+
type: 'phone',
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
else if (field?.format === 'latLong') {
|
|
147
|
+
return {
|
|
148
|
+
...metaParser(field),
|
|
149
|
+
type: 'geo',
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
return { ...metaParser(field), type: field?.type };
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
const migrateFields = (oldFields, recursing = false) => {
|
|
157
|
+
const result = {};
|
|
158
|
+
if (oldFields) {
|
|
159
|
+
for (const key in oldFields) {
|
|
160
|
+
if (oldFields.hasOwnProperty(key)) {
|
|
161
|
+
if (!recursing && Object.keys(DEFAULT_FIELDS).includes(key)) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
const field = migrateField(oldFields[key]);
|
|
165
|
+
if (!field) {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
result[key] = field;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return result;
|
|
173
|
+
};
|
|
174
|
+
const migrateTypes = (oldSchema) => {
|
|
175
|
+
const result = {
|
|
176
|
+
types: {},
|
|
177
|
+
};
|
|
178
|
+
for (const key in oldSchema.types) {
|
|
179
|
+
if (oldSchema.types.hasOwnProperty(key)) {
|
|
180
|
+
const type = oldSchema.types[key];
|
|
181
|
+
result.types[key] = {
|
|
182
|
+
...metaParser(type),
|
|
183
|
+
prefix: type.prefix,
|
|
184
|
+
fields: migrateFields(type.fields),
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return result;
|
|
189
|
+
};
|
|
190
|
+
const convertRoot = (schema) => {
|
|
191
|
+
const result = {
|
|
192
|
+
fields: {},
|
|
193
|
+
...metaParser(schema.root),
|
|
194
|
+
...(schema.root?.prefix ? { prefix: schema.root.prefix } : null),
|
|
195
|
+
};
|
|
196
|
+
for (const i in schema.root?.fields) {
|
|
197
|
+
const field = schema.root?.fields[i];
|
|
198
|
+
result.fields[i] = {
|
|
199
|
+
...metaParser(field),
|
|
200
|
+
...migrateField(field),
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
return result;
|
|
204
|
+
};
|
|
205
|
+
export const convertNewToOld = (schema) => {
|
|
206
|
+
const tmpSchema = migrateTypes(schema);
|
|
207
|
+
tmpSchema.prefixToTypeMapping = schema.prefixToTypeMapping;
|
|
208
|
+
tmpSchema.languages = [schema.language, ...schema?.translations];
|
|
209
|
+
tmpSchema.rootType = convertRoot(schema);
|
|
210
|
+
delete tmpSchema.root;
|
|
211
|
+
return tmpSchema;
|
|
212
|
+
};
|
|
213
|
+
//# sourceMappingURL=newToOld.js.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
type FieldType = 'float' | 'boolean' | 'number' | 'int' | 'string' | 'text' | 'id' | 'digest' | 'url' | 'email' | 'phone' | 'geo' | 'type' | 'timestamp';
|
|
2
|
+
type FieldSchemaObject = {
|
|
3
|
+
type: 'object';
|
|
4
|
+
properties: {
|
|
5
|
+
[key: string]: FieldSchema;
|
|
6
|
+
};
|
|
7
|
+
meta?: any;
|
|
8
|
+
timeseries?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type FieldSchemaJson = {
|
|
11
|
+
type: 'json';
|
|
12
|
+
properties?: {
|
|
13
|
+
[key: string]: FieldSchema;
|
|
14
|
+
};
|
|
15
|
+
meta?: any;
|
|
16
|
+
timeseries?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type FieldSchemaRecord = {
|
|
19
|
+
type: 'record';
|
|
20
|
+
values: FieldSchema;
|
|
21
|
+
meta?: any;
|
|
22
|
+
timeseries?: boolean;
|
|
23
|
+
};
|
|
24
|
+
type FieldSchemaReferences = {
|
|
25
|
+
type: 'reference' | 'references';
|
|
26
|
+
bidirectional?: {
|
|
27
|
+
fromField: string;
|
|
28
|
+
};
|
|
29
|
+
meta?: any;
|
|
30
|
+
timeseries?: boolean;
|
|
31
|
+
};
|
|
32
|
+
type FieldSchemaOther = {
|
|
33
|
+
type: FieldType;
|
|
34
|
+
meta?: any;
|
|
35
|
+
timeseries?: boolean;
|
|
36
|
+
};
|
|
37
|
+
type FieldSchemaArrayLike = {
|
|
38
|
+
type: 'set' | 'array';
|
|
39
|
+
items: FieldSchema;
|
|
40
|
+
meta?: any;
|
|
41
|
+
timeseries?: boolean;
|
|
42
|
+
};
|
|
43
|
+
type FieldSchema = FieldSchemaObject | FieldSchemaRecord | FieldSchemaArrayLike | FieldSchemaJson | FieldSchemaReferences | FieldSchemaOther;
|
|
44
|
+
type Fields = Record<string, FieldSchema>;
|
|
45
|
+
type HierarchySchema = false | {
|
|
46
|
+
[key: string]: false | {
|
|
47
|
+
excludeAncestryWith: string[];
|
|
48
|
+
} | {
|
|
49
|
+
includeAncestryWith: string[];
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
type TypeSchema = {
|
|
53
|
+
prefix?: string;
|
|
54
|
+
hierarchy?: HierarchySchema;
|
|
55
|
+
fields?: Fields;
|
|
56
|
+
meta?: any;
|
|
57
|
+
};
|
|
58
|
+
type Types = {
|
|
59
|
+
[key: string]: TypeSchema;
|
|
60
|
+
};
|
|
61
|
+
export type BasedOldSchema = {
|
|
62
|
+
sha?: string;
|
|
63
|
+
languages?: string[];
|
|
64
|
+
types: Types;
|
|
65
|
+
rootType?: Pick<TypeSchema, 'fields' | 'prefix' | 'meta'>;
|
|
66
|
+
idSeedCounter?: number;
|
|
67
|
+
prefixToTypeMapping?: Record<string, string>;
|
|
68
|
+
};
|
|
69
|
+
export {};
|