simetra 0.0.0-stage → 0.1.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/LICENSE +190 -0
- package/README.md +39 -2
- package/dist/compiler/index.d.ts +1896 -0
- package/dist/compiler/index.js +24104 -0
- package/dist/model/index.d.ts +4462 -0
- package/dist/model/index.js +3951 -0
- package/dist/schema/index.d.ts +2872 -0
- package/dist/schema/index.js +10706 -0
- package/package.json +75 -3
- package/schemas/accumulation-registers.schema.json +996 -0
- package/schemas/catalogs.schema.json +1274 -0
- package/schemas/constants.schema.json +327 -0
- package/schemas/custom-tables.schema.json +809 -0
- package/schemas/documents.schema.json +1285 -0
- package/schemas/enumerations.schema.json +121 -0
- package/schemas/event-subscriptions.schema.json +165 -0
- package/schemas/information-registers.schema.json +1202 -0
- package/schemas/pg-enums.schema.json +81 -0
- package/schemas/project.schema.json +693 -0
- package/schemas/rights-sets.schema.json +248 -0
- package/schemas/roles.schema.json +498 -0
- package/schemas/sql-debt.schema.json +23 -0
|
@@ -0,0 +1,996 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"$schema": {
|
|
6
|
+
"description": "Editor hint: path to the JSON Schema of this file.",
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"format": "uuid",
|
|
12
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
|
|
13
|
+
"description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
|
|
14
|
+
},
|
|
15
|
+
"name": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
18
|
+
"description": "Logical object name in PascalCase."
|
|
19
|
+
},
|
|
20
|
+
"physicalName": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"description": "Physical database name. Assigned once at creation and never changed, so a rename emits no DDL. At most 63 bytes in UTF-8."
|
|
24
|
+
},
|
|
25
|
+
"schema": {
|
|
26
|
+
"description": "PostgreSQL schema of the object; the project defaultSchema applies when absent.",
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"scope": {
|
|
30
|
+
"description": "Scope kind of the object, or none to keep it outside any scope. Required when the project declares scope kinds.",
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"title": {
|
|
34
|
+
"description": "Human-readable title of the object.",
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"uk": {
|
|
38
|
+
"description": "Ukrainian text.",
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
"en": {
|
|
42
|
+
"description": "English text.",
|
|
43
|
+
"type": "string"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
},
|
|
48
|
+
"description": {
|
|
49
|
+
"description": "Description of the object.",
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"uk": {
|
|
53
|
+
"description": "Ukrainian text.",
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"en": {
|
|
57
|
+
"description": "English text.",
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
},
|
|
63
|
+
"kind": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"const": "AccumulationRegister",
|
|
66
|
+
"description": "Metadata kind; always AccumulationRegister."
|
|
67
|
+
},
|
|
68
|
+
"kindLabel": {
|
|
69
|
+
"description": "Physical kind label of the object. Assigned once at creation and never changed, so a rename keeps it.",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1
|
|
72
|
+
},
|
|
73
|
+
"registerType": {
|
|
74
|
+
"default": "Balance",
|
|
75
|
+
"description": "Balance keeps running totals; Turnover only accumulates.",
|
|
76
|
+
"type": "string",
|
|
77
|
+
"enum": [
|
|
78
|
+
"Balance",
|
|
79
|
+
"Turnover"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"recorderTypes": {
|
|
83
|
+
"default": [],
|
|
84
|
+
"description": "Document kinds allowed to write records of this register.",
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"kind": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"enum": [
|
|
92
|
+
"Catalog",
|
|
93
|
+
"Document",
|
|
94
|
+
"Enumeration",
|
|
95
|
+
"InformationRegister",
|
|
96
|
+
"AccumulationRegister",
|
|
97
|
+
"Constant",
|
|
98
|
+
"CustomTable",
|
|
99
|
+
"PgEnum",
|
|
100
|
+
"EventSubscription",
|
|
101
|
+
"RightsSet",
|
|
102
|
+
"Role"
|
|
103
|
+
],
|
|
104
|
+
"description": "Kind of the referenced metadata object."
|
|
105
|
+
},
|
|
106
|
+
"name": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
109
|
+
"description": "Logical name of the referenced object."
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": [
|
|
113
|
+
"kind",
|
|
114
|
+
"name"
|
|
115
|
+
],
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"balanceControl": {
|
|
121
|
+
"description": "Negative-balance control at posting; allowed only on a Balance register.",
|
|
122
|
+
"type": "object",
|
|
123
|
+
"properties": {
|
|
124
|
+
"resources": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"items": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
"description": "Logical names of resources whose balance is controlled."
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"required": [
|
|
133
|
+
"resources"
|
|
134
|
+
],
|
|
135
|
+
"additionalProperties": false
|
|
136
|
+
},
|
|
137
|
+
"publicRead": {
|
|
138
|
+
"description": "API role that may read every row of the object: authenticated users or anonymous visitors. Absent means no public read.",
|
|
139
|
+
"type": "string",
|
|
140
|
+
"enum": [
|
|
141
|
+
"authenticated",
|
|
142
|
+
"anon"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"customActions": {
|
|
146
|
+
"default": [],
|
|
147
|
+
"description": "Custom actions of the object beyond the standard actions of its kind.",
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"id": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"format": "uuid",
|
|
155
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
|
|
156
|
+
"description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
|
|
157
|
+
},
|
|
158
|
+
"name": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
161
|
+
"description": "Logical name of the custom action, camelCase like the standard action words; must not repeat a standard action of the kind."
|
|
162
|
+
},
|
|
163
|
+
"requires": {
|
|
164
|
+
"default": [],
|
|
165
|
+
"description": "Actions a holder of this action must also hold: standard action words of the kind or names of custom actions of the same object.",
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
170
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"effects": {
|
|
174
|
+
"default": {},
|
|
175
|
+
"description": "What the action writes itself; an action that writes anything is an update.",
|
|
176
|
+
"type": "object",
|
|
177
|
+
"properties": {
|
|
178
|
+
"header": {
|
|
179
|
+
"description": "Header columns the action writes: all, or logical names of attributes and standard attributes of the object.",
|
|
180
|
+
"anyOf": [
|
|
181
|
+
{
|
|
182
|
+
"type": "string",
|
|
183
|
+
"const": "all"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
190
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
"tabularSections": {
|
|
196
|
+
"description": "Whether the action writes the tabular section rows.",
|
|
197
|
+
"type": "boolean"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"additionalProperties": false
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"required": [
|
|
204
|
+
"name"
|
|
205
|
+
],
|
|
206
|
+
"additionalProperties": false
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"access": {
|
|
210
|
+
"minItems": 1,
|
|
211
|
+
"type": "array",
|
|
212
|
+
"items": {
|
|
213
|
+
"anyOf": [
|
|
214
|
+
{
|
|
215
|
+
"type": "object",
|
|
216
|
+
"properties": {
|
|
217
|
+
"attribute": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
220
|
+
"description": "Attribute of this object that references the dimension target."
|
|
221
|
+
},
|
|
222
|
+
"dimension": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
225
|
+
"description": "Name of a project access dimension."
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"required": [
|
|
229
|
+
"attribute",
|
|
230
|
+
"dimension"
|
|
231
|
+
],
|
|
232
|
+
"additionalProperties": false
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"type": "object",
|
|
236
|
+
"properties": {
|
|
237
|
+
"ref": {
|
|
238
|
+
"type": "array",
|
|
239
|
+
"prefixItems": [
|
|
240
|
+
{
|
|
241
|
+
"type": "string",
|
|
242
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
243
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"type": "string",
|
|
247
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
248
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"items": false,
|
|
252
|
+
"minItems": 2,
|
|
253
|
+
"maxItems": 2,
|
|
254
|
+
"description": "Path [attribute, attribute of its target] whose last reference is to the dimension target."
|
|
255
|
+
},
|
|
256
|
+
"dimension": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
259
|
+
"description": "Name of a project access dimension."
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"required": [
|
|
263
|
+
"ref",
|
|
264
|
+
"dimension"
|
|
265
|
+
],
|
|
266
|
+
"additionalProperties": false
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
"description": "Access dimensions that restrict the rows of this object, each with its carrier."
|
|
271
|
+
},
|
|
272
|
+
"standardAttributeOverrides": {
|
|
273
|
+
"default": {},
|
|
274
|
+
"description": "Custom titles and descriptions of derived standard attributes, keyed by standard attribute name.",
|
|
275
|
+
"type": "object",
|
|
276
|
+
"propertyNames": {
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
"additionalProperties": {
|
|
280
|
+
"type": "object",
|
|
281
|
+
"properties": {
|
|
282
|
+
"title": {
|
|
283
|
+
"description": "Overridden title of the standard attribute.",
|
|
284
|
+
"type": "object",
|
|
285
|
+
"properties": {
|
|
286
|
+
"uk": {
|
|
287
|
+
"description": "Ukrainian text.",
|
|
288
|
+
"type": "string"
|
|
289
|
+
},
|
|
290
|
+
"en": {
|
|
291
|
+
"description": "English text.",
|
|
292
|
+
"type": "string"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"additionalProperties": false
|
|
296
|
+
},
|
|
297
|
+
"description": {
|
|
298
|
+
"description": "Overridden description of the standard attribute.",
|
|
299
|
+
"type": "object",
|
|
300
|
+
"properties": {
|
|
301
|
+
"uk": {
|
|
302
|
+
"description": "Ukrainian text.",
|
|
303
|
+
"type": "string"
|
|
304
|
+
},
|
|
305
|
+
"en": {
|
|
306
|
+
"description": "English text.",
|
|
307
|
+
"type": "string"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"additionalProperties": false
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"additionalProperties": false
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"dimensions": {
|
|
317
|
+
"default": [],
|
|
318
|
+
"description": "Dimensions: the key fields of a record.",
|
|
319
|
+
"type": "array",
|
|
320
|
+
"items": {
|
|
321
|
+
"type": "object",
|
|
322
|
+
"properties": {
|
|
323
|
+
"id": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"format": "uuid",
|
|
326
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
|
|
327
|
+
"description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
|
|
328
|
+
},
|
|
329
|
+
"name": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
332
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
333
|
+
},
|
|
334
|
+
"physicalName": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"minLength": 1,
|
|
337
|
+
"description": "Physical database name. Assigned once at creation and never changed, so a rename emits no DDL. At most 63 bytes in UTF-8."
|
|
338
|
+
},
|
|
339
|
+
"title": {
|
|
340
|
+
"description": "Human-readable title of the attribute.",
|
|
341
|
+
"type": "object",
|
|
342
|
+
"properties": {
|
|
343
|
+
"uk": {
|
|
344
|
+
"description": "Ukrainian text.",
|
|
345
|
+
"type": "string"
|
|
346
|
+
},
|
|
347
|
+
"en": {
|
|
348
|
+
"description": "English text.",
|
|
349
|
+
"type": "string"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"additionalProperties": false
|
|
353
|
+
},
|
|
354
|
+
"description": {
|
|
355
|
+
"description": "Description of the attribute.",
|
|
356
|
+
"type": "object",
|
|
357
|
+
"properties": {
|
|
358
|
+
"uk": {
|
|
359
|
+
"description": "Ukrainian text.",
|
|
360
|
+
"type": "string"
|
|
361
|
+
},
|
|
362
|
+
"en": {
|
|
363
|
+
"description": "English text.",
|
|
364
|
+
"type": "string"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"additionalProperties": false
|
|
368
|
+
},
|
|
369
|
+
"type": {
|
|
370
|
+
"type": "string",
|
|
371
|
+
"enum": [
|
|
372
|
+
"UUID",
|
|
373
|
+
"String",
|
|
374
|
+
"Text",
|
|
375
|
+
"Integer",
|
|
376
|
+
"SmallInt",
|
|
377
|
+
"BigInt",
|
|
378
|
+
"Numeric",
|
|
379
|
+
"Boolean",
|
|
380
|
+
"Date",
|
|
381
|
+
"DateTime",
|
|
382
|
+
"Bytes",
|
|
383
|
+
"Json",
|
|
384
|
+
"Ref"
|
|
385
|
+
],
|
|
386
|
+
"description": "Logical value type."
|
|
387
|
+
},
|
|
388
|
+
"length": {
|
|
389
|
+
"description": "Maximum length; required for String and allowed only there.",
|
|
390
|
+
"type": "integer",
|
|
391
|
+
"exclusiveMinimum": 0,
|
|
392
|
+
"maximum": 9007199254740991
|
|
393
|
+
},
|
|
394
|
+
"precision": {
|
|
395
|
+
"description": "Total number of digits; allowed only for Numeric.",
|
|
396
|
+
"type": "integer",
|
|
397
|
+
"exclusiveMinimum": 0,
|
|
398
|
+
"maximum": 9007199254740991
|
|
399
|
+
},
|
|
400
|
+
"scale": {
|
|
401
|
+
"description": "Digits after the decimal point; requires precision.",
|
|
402
|
+
"type": "integer",
|
|
403
|
+
"minimum": 0,
|
|
404
|
+
"maximum": 9007199254740991
|
|
405
|
+
},
|
|
406
|
+
"ref": {
|
|
407
|
+
"description": "Single reference target of a Ref value; mutually exclusive with allowedTypes.",
|
|
408
|
+
"type": "object",
|
|
409
|
+
"properties": {
|
|
410
|
+
"kind": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"enum": [
|
|
413
|
+
"Catalog",
|
|
414
|
+
"Document",
|
|
415
|
+
"Enumeration",
|
|
416
|
+
"InformationRegister",
|
|
417
|
+
"AccumulationRegister",
|
|
418
|
+
"Constant",
|
|
419
|
+
"CustomTable",
|
|
420
|
+
"PgEnum",
|
|
421
|
+
"EventSubscription",
|
|
422
|
+
"RightsSet",
|
|
423
|
+
"Role"
|
|
424
|
+
],
|
|
425
|
+
"description": "Kind of the referenced metadata object."
|
|
426
|
+
},
|
|
427
|
+
"name": {
|
|
428
|
+
"type": "string",
|
|
429
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
430
|
+
"description": "Logical name of the referenced object."
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"required": [
|
|
434
|
+
"kind",
|
|
435
|
+
"name"
|
|
436
|
+
],
|
|
437
|
+
"additionalProperties": false
|
|
438
|
+
},
|
|
439
|
+
"allowedTypes": {
|
|
440
|
+
"description": "Polymorphic reference targets of a Ref value; mutually exclusive with ref.",
|
|
441
|
+
"minItems": 1,
|
|
442
|
+
"type": "array",
|
|
443
|
+
"items": {
|
|
444
|
+
"type": "object",
|
|
445
|
+
"properties": {
|
|
446
|
+
"kind": {
|
|
447
|
+
"type": "string",
|
|
448
|
+
"enum": [
|
|
449
|
+
"Catalog",
|
|
450
|
+
"Document",
|
|
451
|
+
"Enumeration",
|
|
452
|
+
"InformationRegister",
|
|
453
|
+
"AccumulationRegister",
|
|
454
|
+
"Constant",
|
|
455
|
+
"CustomTable",
|
|
456
|
+
"PgEnum",
|
|
457
|
+
"EventSubscription",
|
|
458
|
+
"RightsSet",
|
|
459
|
+
"Role"
|
|
460
|
+
],
|
|
461
|
+
"description": "Kind of the referenced metadata object."
|
|
462
|
+
},
|
|
463
|
+
"name": {
|
|
464
|
+
"type": "string",
|
|
465
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
466
|
+
"description": "Logical name of the referenced object."
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"required": [
|
|
470
|
+
"kind",
|
|
471
|
+
"name"
|
|
472
|
+
],
|
|
473
|
+
"additionalProperties": false,
|
|
474
|
+
"description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
"array": {
|
|
478
|
+
"description": "Whether the value is an array of the type.",
|
|
479
|
+
"type": "boolean"
|
|
480
|
+
},
|
|
481
|
+
"crossScope": {
|
|
482
|
+
"description": "Marks a deliberately cross-scope Ref: the FK has no scope part in its key.",
|
|
483
|
+
"type": "boolean",
|
|
484
|
+
"const": true
|
|
485
|
+
},
|
|
486
|
+
"required": {
|
|
487
|
+
"default": false,
|
|
488
|
+
"description": "Whether a value is mandatory (NOT NULL).",
|
|
489
|
+
"type": "boolean"
|
|
490
|
+
},
|
|
491
|
+
"indexed": {
|
|
492
|
+
"default": false,
|
|
493
|
+
"description": "Whether the attribute is indexed.",
|
|
494
|
+
"type": "boolean"
|
|
495
|
+
},
|
|
496
|
+
"unique": {
|
|
497
|
+
"default": false,
|
|
498
|
+
"description": "Whether values must be unique; \"ignoreCase\" compares a scalar String or Text value case-insensitively.",
|
|
499
|
+
"anyOf": [
|
|
500
|
+
{
|
|
501
|
+
"type": "boolean"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"type": "string",
|
|
505
|
+
"const": "ignoreCase"
|
|
506
|
+
}
|
|
507
|
+
]
|
|
508
|
+
},
|
|
509
|
+
"defaultValue": {
|
|
510
|
+
"description": "Default value of the attribute.",
|
|
511
|
+
"anyOf": [
|
|
512
|
+
{
|
|
513
|
+
"type": "string"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"type": "number"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"type": "boolean"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"type": "object",
|
|
523
|
+
"properties": {
|
|
524
|
+
"fill": {
|
|
525
|
+
"type": "string",
|
|
526
|
+
"enum": [
|
|
527
|
+
"now",
|
|
528
|
+
"today",
|
|
529
|
+
"newUuid"
|
|
530
|
+
],
|
|
531
|
+
"description": "Fill expression computed by the database: now (DateTime), today (Date), newUuid (UUID)."
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"required": [
|
|
535
|
+
"fill"
|
|
536
|
+
],
|
|
537
|
+
"additionalProperties": false
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"type": "object",
|
|
541
|
+
"properties": {
|
|
542
|
+
"empty": {
|
|
543
|
+
"anyOf": [
|
|
544
|
+
{
|
|
545
|
+
"type": "boolean",
|
|
546
|
+
"const": true
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"type": "string",
|
|
550
|
+
"enum": [
|
|
551
|
+
"object",
|
|
552
|
+
"array"
|
|
553
|
+
]
|
|
554
|
+
}
|
|
555
|
+
],
|
|
556
|
+
"description": "Empty value: true for an array of any type, object or array for a scalar Json."
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"required": [
|
|
560
|
+
"empty"
|
|
561
|
+
],
|
|
562
|
+
"additionalProperties": false
|
|
563
|
+
}
|
|
564
|
+
]
|
|
565
|
+
},
|
|
566
|
+
"nonNegative": {
|
|
567
|
+
"description": "Value must be zero or greater (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes positive.",
|
|
568
|
+
"type": "boolean",
|
|
569
|
+
"const": true
|
|
570
|
+
},
|
|
571
|
+
"positive": {
|
|
572
|
+
"description": "Value must be greater than zero (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes nonNegative.",
|
|
573
|
+
"type": "boolean",
|
|
574
|
+
"const": true
|
|
575
|
+
},
|
|
576
|
+
"minValue": {
|
|
577
|
+
"description": "Lower bound of the value (CHECK): a number or a decimal-fraction string within the type's range; numeric types only.",
|
|
578
|
+
"type": [
|
|
579
|
+
"number",
|
|
580
|
+
"string"
|
|
581
|
+
]
|
|
582
|
+
},
|
|
583
|
+
"maxValue": {
|
|
584
|
+
"description": "Upper bound of the value (CHECK): a number or a decimal-fraction string within the type's range; must not be below minValue; numeric types only.",
|
|
585
|
+
"type": [
|
|
586
|
+
"number",
|
|
587
|
+
"string"
|
|
588
|
+
]
|
|
589
|
+
},
|
|
590
|
+
"pattern": {
|
|
591
|
+
"description": "Regular expression the value must match (CHECK); valid for both JavaScript (u flag) and Postgres, so no named groups, \\p{...}, \\k<...>, \\b, \\B, \\x, \\u{...} or (?flags) groups; scalar String or Text only.",
|
|
592
|
+
"type": "string",
|
|
593
|
+
"minLength": 1
|
|
594
|
+
},
|
|
595
|
+
"minLength": {
|
|
596
|
+
"description": "Minimum number of characters (CHECK); scalar String or Text only.",
|
|
597
|
+
"type": "integer",
|
|
598
|
+
"exclusiveMinimum": 0,
|
|
599
|
+
"maximum": 9007199254740991
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"required": [
|
|
603
|
+
"name",
|
|
604
|
+
"type"
|
|
605
|
+
],
|
|
606
|
+
"additionalProperties": false
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
"resources": {
|
|
610
|
+
"default": [],
|
|
611
|
+
"description": "Resources: the summed value fields of a record; Integer or Numeric only.",
|
|
612
|
+
"type": "array",
|
|
613
|
+
"items": {
|
|
614
|
+
"type": "object",
|
|
615
|
+
"properties": {
|
|
616
|
+
"id": {
|
|
617
|
+
"type": "string",
|
|
618
|
+
"format": "uuid",
|
|
619
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
|
|
620
|
+
"description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
|
|
621
|
+
},
|
|
622
|
+
"name": {
|
|
623
|
+
"type": "string",
|
|
624
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
625
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
626
|
+
},
|
|
627
|
+
"physicalName": {
|
|
628
|
+
"type": "string",
|
|
629
|
+
"minLength": 1,
|
|
630
|
+
"description": "Physical database name. Assigned once at creation and never changed, so a rename emits no DDL. At most 63 bytes in UTF-8."
|
|
631
|
+
},
|
|
632
|
+
"title": {
|
|
633
|
+
"description": "Human-readable title of the resource.",
|
|
634
|
+
"type": "object",
|
|
635
|
+
"properties": {
|
|
636
|
+
"uk": {
|
|
637
|
+
"description": "Ukrainian text.",
|
|
638
|
+
"type": "string"
|
|
639
|
+
},
|
|
640
|
+
"en": {
|
|
641
|
+
"description": "English text.",
|
|
642
|
+
"type": "string"
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
"additionalProperties": false
|
|
646
|
+
},
|
|
647
|
+
"description": {
|
|
648
|
+
"description": "Description of the resource.",
|
|
649
|
+
"type": "object",
|
|
650
|
+
"properties": {
|
|
651
|
+
"uk": {
|
|
652
|
+
"description": "Ukrainian text.",
|
|
653
|
+
"type": "string"
|
|
654
|
+
},
|
|
655
|
+
"en": {
|
|
656
|
+
"description": "English text.",
|
|
657
|
+
"type": "string"
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
"additionalProperties": false
|
|
661
|
+
},
|
|
662
|
+
"type": {
|
|
663
|
+
"type": "string",
|
|
664
|
+
"enum": [
|
|
665
|
+
"Integer",
|
|
666
|
+
"Numeric"
|
|
667
|
+
],
|
|
668
|
+
"description": "Logical value type; Integer or Numeric only."
|
|
669
|
+
},
|
|
670
|
+
"precision": {
|
|
671
|
+
"description": "Total number of digits; allowed only for Numeric.",
|
|
672
|
+
"type": "integer",
|
|
673
|
+
"exclusiveMinimum": 0,
|
|
674
|
+
"maximum": 9007199254740991
|
|
675
|
+
},
|
|
676
|
+
"scale": {
|
|
677
|
+
"description": "Digits after the decimal point; requires precision.",
|
|
678
|
+
"type": "integer",
|
|
679
|
+
"minimum": 0,
|
|
680
|
+
"maximum": 9007199254740991
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
"required": [
|
|
684
|
+
"name",
|
|
685
|
+
"type"
|
|
686
|
+
],
|
|
687
|
+
"additionalProperties": false,
|
|
688
|
+
"description": "Resource of an accumulation register: a summed number."
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
"attributes": {
|
|
692
|
+
"default": [],
|
|
693
|
+
"description": "Attributes: extra information of a record.",
|
|
694
|
+
"type": "array",
|
|
695
|
+
"items": {
|
|
696
|
+
"type": "object",
|
|
697
|
+
"properties": {
|
|
698
|
+
"id": {
|
|
699
|
+
"type": "string",
|
|
700
|
+
"format": "uuid",
|
|
701
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
|
|
702
|
+
"description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
|
|
703
|
+
},
|
|
704
|
+
"name": {
|
|
705
|
+
"type": "string",
|
|
706
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
707
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
708
|
+
},
|
|
709
|
+
"physicalName": {
|
|
710
|
+
"type": "string",
|
|
711
|
+
"minLength": 1,
|
|
712
|
+
"description": "Physical database name. Assigned once at creation and never changed, so a rename emits no DDL. At most 63 bytes in UTF-8."
|
|
713
|
+
},
|
|
714
|
+
"title": {
|
|
715
|
+
"description": "Human-readable title of the attribute.",
|
|
716
|
+
"type": "object",
|
|
717
|
+
"properties": {
|
|
718
|
+
"uk": {
|
|
719
|
+
"description": "Ukrainian text.",
|
|
720
|
+
"type": "string"
|
|
721
|
+
},
|
|
722
|
+
"en": {
|
|
723
|
+
"description": "English text.",
|
|
724
|
+
"type": "string"
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
"additionalProperties": false
|
|
728
|
+
},
|
|
729
|
+
"description": {
|
|
730
|
+
"description": "Description of the attribute.",
|
|
731
|
+
"type": "object",
|
|
732
|
+
"properties": {
|
|
733
|
+
"uk": {
|
|
734
|
+
"description": "Ukrainian text.",
|
|
735
|
+
"type": "string"
|
|
736
|
+
},
|
|
737
|
+
"en": {
|
|
738
|
+
"description": "English text.",
|
|
739
|
+
"type": "string"
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
"additionalProperties": false
|
|
743
|
+
},
|
|
744
|
+
"type": {
|
|
745
|
+
"type": "string",
|
|
746
|
+
"enum": [
|
|
747
|
+
"UUID",
|
|
748
|
+
"String",
|
|
749
|
+
"Text",
|
|
750
|
+
"Integer",
|
|
751
|
+
"SmallInt",
|
|
752
|
+
"BigInt",
|
|
753
|
+
"Numeric",
|
|
754
|
+
"Boolean",
|
|
755
|
+
"Date",
|
|
756
|
+
"DateTime",
|
|
757
|
+
"Bytes",
|
|
758
|
+
"Json",
|
|
759
|
+
"Ref"
|
|
760
|
+
],
|
|
761
|
+
"description": "Logical value type."
|
|
762
|
+
},
|
|
763
|
+
"length": {
|
|
764
|
+
"description": "Maximum length; required for String and allowed only there.",
|
|
765
|
+
"type": "integer",
|
|
766
|
+
"exclusiveMinimum": 0,
|
|
767
|
+
"maximum": 9007199254740991
|
|
768
|
+
},
|
|
769
|
+
"precision": {
|
|
770
|
+
"description": "Total number of digits; allowed only for Numeric.",
|
|
771
|
+
"type": "integer",
|
|
772
|
+
"exclusiveMinimum": 0,
|
|
773
|
+
"maximum": 9007199254740991
|
|
774
|
+
},
|
|
775
|
+
"scale": {
|
|
776
|
+
"description": "Digits after the decimal point; requires precision.",
|
|
777
|
+
"type": "integer",
|
|
778
|
+
"minimum": 0,
|
|
779
|
+
"maximum": 9007199254740991
|
|
780
|
+
},
|
|
781
|
+
"ref": {
|
|
782
|
+
"description": "Single reference target of a Ref value; mutually exclusive with allowedTypes.",
|
|
783
|
+
"type": "object",
|
|
784
|
+
"properties": {
|
|
785
|
+
"kind": {
|
|
786
|
+
"type": "string",
|
|
787
|
+
"enum": [
|
|
788
|
+
"Catalog",
|
|
789
|
+
"Document",
|
|
790
|
+
"Enumeration",
|
|
791
|
+
"InformationRegister",
|
|
792
|
+
"AccumulationRegister",
|
|
793
|
+
"Constant",
|
|
794
|
+
"CustomTable",
|
|
795
|
+
"PgEnum",
|
|
796
|
+
"EventSubscription",
|
|
797
|
+
"RightsSet",
|
|
798
|
+
"Role"
|
|
799
|
+
],
|
|
800
|
+
"description": "Kind of the referenced metadata object."
|
|
801
|
+
},
|
|
802
|
+
"name": {
|
|
803
|
+
"type": "string",
|
|
804
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
805
|
+
"description": "Logical name of the referenced object."
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
"required": [
|
|
809
|
+
"kind",
|
|
810
|
+
"name"
|
|
811
|
+
],
|
|
812
|
+
"additionalProperties": false
|
|
813
|
+
},
|
|
814
|
+
"allowedTypes": {
|
|
815
|
+
"description": "Polymorphic reference targets of a Ref value; mutually exclusive with ref.",
|
|
816
|
+
"minItems": 1,
|
|
817
|
+
"type": "array",
|
|
818
|
+
"items": {
|
|
819
|
+
"type": "object",
|
|
820
|
+
"properties": {
|
|
821
|
+
"kind": {
|
|
822
|
+
"type": "string",
|
|
823
|
+
"enum": [
|
|
824
|
+
"Catalog",
|
|
825
|
+
"Document",
|
|
826
|
+
"Enumeration",
|
|
827
|
+
"InformationRegister",
|
|
828
|
+
"AccumulationRegister",
|
|
829
|
+
"Constant",
|
|
830
|
+
"CustomTable",
|
|
831
|
+
"PgEnum",
|
|
832
|
+
"EventSubscription",
|
|
833
|
+
"RightsSet",
|
|
834
|
+
"Role"
|
|
835
|
+
],
|
|
836
|
+
"description": "Kind of the referenced metadata object."
|
|
837
|
+
},
|
|
838
|
+
"name": {
|
|
839
|
+
"type": "string",
|
|
840
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
841
|
+
"description": "Logical name of the referenced object."
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
"required": [
|
|
845
|
+
"kind",
|
|
846
|
+
"name"
|
|
847
|
+
],
|
|
848
|
+
"additionalProperties": false,
|
|
849
|
+
"description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
"array": {
|
|
853
|
+
"description": "Whether the value is an array of the type.",
|
|
854
|
+
"type": "boolean"
|
|
855
|
+
},
|
|
856
|
+
"crossScope": {
|
|
857
|
+
"description": "Marks a deliberately cross-scope Ref: the FK has no scope part in its key.",
|
|
858
|
+
"type": "boolean",
|
|
859
|
+
"const": true
|
|
860
|
+
},
|
|
861
|
+
"required": {
|
|
862
|
+
"default": false,
|
|
863
|
+
"description": "Whether a value is mandatory (NOT NULL).",
|
|
864
|
+
"type": "boolean"
|
|
865
|
+
},
|
|
866
|
+
"indexed": {
|
|
867
|
+
"default": false,
|
|
868
|
+
"description": "Whether the attribute is indexed.",
|
|
869
|
+
"type": "boolean"
|
|
870
|
+
},
|
|
871
|
+
"unique": {
|
|
872
|
+
"default": false,
|
|
873
|
+
"description": "Whether values must be unique; \"ignoreCase\" compares a scalar String or Text value case-insensitively.",
|
|
874
|
+
"anyOf": [
|
|
875
|
+
{
|
|
876
|
+
"type": "boolean"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"type": "string",
|
|
880
|
+
"const": "ignoreCase"
|
|
881
|
+
}
|
|
882
|
+
]
|
|
883
|
+
},
|
|
884
|
+
"defaultValue": {
|
|
885
|
+
"description": "Default value of the attribute.",
|
|
886
|
+
"anyOf": [
|
|
887
|
+
{
|
|
888
|
+
"type": "string"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"type": "number"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"type": "boolean"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"type": "object",
|
|
898
|
+
"properties": {
|
|
899
|
+
"fill": {
|
|
900
|
+
"type": "string",
|
|
901
|
+
"enum": [
|
|
902
|
+
"now",
|
|
903
|
+
"today",
|
|
904
|
+
"newUuid"
|
|
905
|
+
],
|
|
906
|
+
"description": "Fill expression computed by the database: now (DateTime), today (Date), newUuid (UUID)."
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
"required": [
|
|
910
|
+
"fill"
|
|
911
|
+
],
|
|
912
|
+
"additionalProperties": false
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"type": "object",
|
|
916
|
+
"properties": {
|
|
917
|
+
"empty": {
|
|
918
|
+
"anyOf": [
|
|
919
|
+
{
|
|
920
|
+
"type": "boolean",
|
|
921
|
+
"const": true
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"type": "string",
|
|
925
|
+
"enum": [
|
|
926
|
+
"object",
|
|
927
|
+
"array"
|
|
928
|
+
]
|
|
929
|
+
}
|
|
930
|
+
],
|
|
931
|
+
"description": "Empty value: true for an array of any type, object or array for a scalar Json."
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
"required": [
|
|
935
|
+
"empty"
|
|
936
|
+
],
|
|
937
|
+
"additionalProperties": false
|
|
938
|
+
}
|
|
939
|
+
]
|
|
940
|
+
},
|
|
941
|
+
"nonNegative": {
|
|
942
|
+
"description": "Value must be zero or greater (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes positive.",
|
|
943
|
+
"type": "boolean",
|
|
944
|
+
"const": true
|
|
945
|
+
},
|
|
946
|
+
"positive": {
|
|
947
|
+
"description": "Value must be greater than zero (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes nonNegative.",
|
|
948
|
+
"type": "boolean",
|
|
949
|
+
"const": true
|
|
950
|
+
},
|
|
951
|
+
"minValue": {
|
|
952
|
+
"description": "Lower bound of the value (CHECK): a number or a decimal-fraction string within the type's range; numeric types only.",
|
|
953
|
+
"type": [
|
|
954
|
+
"number",
|
|
955
|
+
"string"
|
|
956
|
+
]
|
|
957
|
+
},
|
|
958
|
+
"maxValue": {
|
|
959
|
+
"description": "Upper bound of the value (CHECK): a number or a decimal-fraction string within the type's range; must not be below minValue; numeric types only.",
|
|
960
|
+
"type": [
|
|
961
|
+
"number",
|
|
962
|
+
"string"
|
|
963
|
+
]
|
|
964
|
+
},
|
|
965
|
+
"pattern": {
|
|
966
|
+
"description": "Regular expression the value must match (CHECK); valid for both JavaScript (u flag) and Postgres, so no named groups, \\p{...}, \\k<...>, \\b, \\B, \\x, \\u{...} or (?flags) groups; scalar String or Text only.",
|
|
967
|
+
"type": "string",
|
|
968
|
+
"minLength": 1
|
|
969
|
+
},
|
|
970
|
+
"minLength": {
|
|
971
|
+
"description": "Minimum number of characters (CHECK); scalar String or Text only.",
|
|
972
|
+
"type": "integer",
|
|
973
|
+
"exclusiveMinimum": 0,
|
|
974
|
+
"maximum": 9007199254740991
|
|
975
|
+
},
|
|
976
|
+
"personalData": {
|
|
977
|
+
"description": "Marks the attribute as personal data: anonymization sets its columns to NULL, so it cannot be required.",
|
|
978
|
+
"type": "boolean",
|
|
979
|
+
"const": true
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
"required": [
|
|
983
|
+
"name",
|
|
984
|
+
"type"
|
|
985
|
+
],
|
|
986
|
+
"additionalProperties": false
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
},
|
|
990
|
+
"required": [
|
|
991
|
+
"name",
|
|
992
|
+
"kind"
|
|
993
|
+
],
|
|
994
|
+
"additionalProperties": false,
|
|
995
|
+
"$id": "accumulation-registers.schema.json"
|
|
996
|
+
}
|