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.
@@ -0,0 +1,1202 @@
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": "InformationRegister",
66
+ "description": "Metadata kind; always InformationRegister."
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
+ "periodicity": {
74
+ "default": "NonPeriodic",
75
+ "description": "Period granularity of the register records.",
76
+ "type": "string",
77
+ "enum": [
78
+ "NonPeriodic",
79
+ "Day",
80
+ "Month",
81
+ "Quarter",
82
+ "Year"
83
+ ]
84
+ },
85
+ "writeMode": {
86
+ "default": "Independent",
87
+ "description": "Whether records are written independently or by a recorder document.",
88
+ "type": "string",
89
+ "enum": [
90
+ "Independent",
91
+ "RecorderSubordinate"
92
+ ]
93
+ },
94
+ "recorderTypes": {
95
+ "default": [],
96
+ "description": "Document kinds allowed to write records of this register.",
97
+ "type": "array",
98
+ "items": {
99
+ "type": "object",
100
+ "properties": {
101
+ "kind": {
102
+ "type": "string",
103
+ "enum": [
104
+ "Catalog",
105
+ "Document",
106
+ "Enumeration",
107
+ "InformationRegister",
108
+ "AccumulationRegister",
109
+ "Constant",
110
+ "CustomTable",
111
+ "PgEnum",
112
+ "EventSubscription",
113
+ "RightsSet",
114
+ "Role"
115
+ ],
116
+ "description": "Kind of the referenced metadata object."
117
+ },
118
+ "name": {
119
+ "type": "string",
120
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
121
+ "description": "Logical name of the referenced object."
122
+ }
123
+ },
124
+ "required": [
125
+ "kind",
126
+ "name"
127
+ ],
128
+ "additionalProperties": false,
129
+ "description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
130
+ }
131
+ },
132
+ "publicRead": {
133
+ "description": "API role that may read every row of the object: authenticated users or anonymous visitors. Absent means no public read.",
134
+ "type": "string",
135
+ "enum": [
136
+ "authenticated",
137
+ "anon"
138
+ ]
139
+ },
140
+ "customActions": {
141
+ "default": [],
142
+ "description": "Custom actions of the object beyond the standard actions of its kind.",
143
+ "type": "array",
144
+ "items": {
145
+ "type": "object",
146
+ "properties": {
147
+ "id": {
148
+ "type": "string",
149
+ "format": "uuid",
150
+ "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})$",
151
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
152
+ },
153
+ "name": {
154
+ "type": "string",
155
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
156
+ "description": "Logical name of the custom action, camelCase like the standard action words; must not repeat a standard action of the kind."
157
+ },
158
+ "requires": {
159
+ "default": [],
160
+ "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.",
161
+ "type": "array",
162
+ "items": {
163
+ "type": "string",
164
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
165
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
166
+ }
167
+ },
168
+ "effects": {
169
+ "default": {},
170
+ "description": "What the action writes itself; an action that writes anything is an update.",
171
+ "type": "object",
172
+ "properties": {
173
+ "header": {
174
+ "description": "Header columns the action writes: all, or logical names of attributes and standard attributes of the object.",
175
+ "anyOf": [
176
+ {
177
+ "type": "string",
178
+ "const": "all"
179
+ },
180
+ {
181
+ "type": "array",
182
+ "items": {
183
+ "type": "string",
184
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
185
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
186
+ }
187
+ }
188
+ ]
189
+ },
190
+ "tabularSections": {
191
+ "description": "Whether the action writes the tabular section rows.",
192
+ "type": "boolean"
193
+ }
194
+ },
195
+ "additionalProperties": false
196
+ }
197
+ },
198
+ "required": [
199
+ "name"
200
+ ],
201
+ "additionalProperties": false
202
+ }
203
+ },
204
+ "access": {
205
+ "minItems": 1,
206
+ "type": "array",
207
+ "items": {
208
+ "anyOf": [
209
+ {
210
+ "type": "object",
211
+ "properties": {
212
+ "attribute": {
213
+ "type": "string",
214
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
215
+ "description": "Attribute of this object that references the dimension target."
216
+ },
217
+ "dimension": {
218
+ "type": "string",
219
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
220
+ "description": "Name of a project access dimension."
221
+ }
222
+ },
223
+ "required": [
224
+ "attribute",
225
+ "dimension"
226
+ ],
227
+ "additionalProperties": false
228
+ },
229
+ {
230
+ "type": "object",
231
+ "properties": {
232
+ "ref": {
233
+ "type": "array",
234
+ "prefixItems": [
235
+ {
236
+ "type": "string",
237
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
238
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
239
+ },
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
+ "items": false,
247
+ "minItems": 2,
248
+ "maxItems": 2,
249
+ "description": "Path [attribute, attribute of its target] whose last reference is to the dimension target."
250
+ },
251
+ "dimension": {
252
+ "type": "string",
253
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
254
+ "description": "Name of a project access dimension."
255
+ }
256
+ },
257
+ "required": [
258
+ "ref",
259
+ "dimension"
260
+ ],
261
+ "additionalProperties": false
262
+ }
263
+ ]
264
+ },
265
+ "description": "Access dimensions that restrict the rows of this object, each with its carrier."
266
+ },
267
+ "standardAttributeOverrides": {
268
+ "default": {},
269
+ "description": "Custom titles and descriptions of derived standard attributes, keyed by standard attribute name.",
270
+ "type": "object",
271
+ "propertyNames": {
272
+ "type": "string"
273
+ },
274
+ "additionalProperties": {
275
+ "type": "object",
276
+ "properties": {
277
+ "title": {
278
+ "description": "Overridden title of the standard attribute.",
279
+ "type": "object",
280
+ "properties": {
281
+ "uk": {
282
+ "description": "Ukrainian text.",
283
+ "type": "string"
284
+ },
285
+ "en": {
286
+ "description": "English text.",
287
+ "type": "string"
288
+ }
289
+ },
290
+ "additionalProperties": false
291
+ },
292
+ "description": {
293
+ "description": "Overridden description of the standard attribute.",
294
+ "type": "object",
295
+ "properties": {
296
+ "uk": {
297
+ "description": "Ukrainian text.",
298
+ "type": "string"
299
+ },
300
+ "en": {
301
+ "description": "English text.",
302
+ "type": "string"
303
+ }
304
+ },
305
+ "additionalProperties": false
306
+ }
307
+ },
308
+ "additionalProperties": false
309
+ }
310
+ },
311
+ "dimensions": {
312
+ "default": [],
313
+ "description": "Dimensions: the key fields of a record.",
314
+ "type": "array",
315
+ "items": {
316
+ "type": "object",
317
+ "properties": {
318
+ "id": {
319
+ "type": "string",
320
+ "format": "uuid",
321
+ "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})$",
322
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
323
+ },
324
+ "name": {
325
+ "type": "string",
326
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
327
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
328
+ },
329
+ "physicalName": {
330
+ "type": "string",
331
+ "minLength": 1,
332
+ "description": "Physical database name. Assigned once at creation and never changed, so a rename emits no DDL. At most 63 bytes in UTF-8."
333
+ },
334
+ "title": {
335
+ "description": "Human-readable title of the attribute.",
336
+ "type": "object",
337
+ "properties": {
338
+ "uk": {
339
+ "description": "Ukrainian text.",
340
+ "type": "string"
341
+ },
342
+ "en": {
343
+ "description": "English text.",
344
+ "type": "string"
345
+ }
346
+ },
347
+ "additionalProperties": false
348
+ },
349
+ "description": {
350
+ "description": "Description of the attribute.",
351
+ "type": "object",
352
+ "properties": {
353
+ "uk": {
354
+ "description": "Ukrainian text.",
355
+ "type": "string"
356
+ },
357
+ "en": {
358
+ "description": "English text.",
359
+ "type": "string"
360
+ }
361
+ },
362
+ "additionalProperties": false
363
+ },
364
+ "type": {
365
+ "type": "string",
366
+ "enum": [
367
+ "UUID",
368
+ "String",
369
+ "Text",
370
+ "Integer",
371
+ "SmallInt",
372
+ "BigInt",
373
+ "Numeric",
374
+ "Boolean",
375
+ "Date",
376
+ "DateTime",
377
+ "Bytes",
378
+ "Json",
379
+ "Ref"
380
+ ],
381
+ "description": "Logical value type."
382
+ },
383
+ "length": {
384
+ "description": "Maximum length; required for String and allowed only there.",
385
+ "type": "integer",
386
+ "exclusiveMinimum": 0,
387
+ "maximum": 9007199254740991
388
+ },
389
+ "precision": {
390
+ "description": "Total number of digits; allowed only for Numeric.",
391
+ "type": "integer",
392
+ "exclusiveMinimum": 0,
393
+ "maximum": 9007199254740991
394
+ },
395
+ "scale": {
396
+ "description": "Digits after the decimal point; requires precision.",
397
+ "type": "integer",
398
+ "minimum": 0,
399
+ "maximum": 9007199254740991
400
+ },
401
+ "ref": {
402
+ "description": "Single reference target of a Ref value; mutually exclusive with allowedTypes.",
403
+ "type": "object",
404
+ "properties": {
405
+ "kind": {
406
+ "type": "string",
407
+ "enum": [
408
+ "Catalog",
409
+ "Document",
410
+ "Enumeration",
411
+ "InformationRegister",
412
+ "AccumulationRegister",
413
+ "Constant",
414
+ "CustomTable",
415
+ "PgEnum",
416
+ "EventSubscription",
417
+ "RightsSet",
418
+ "Role"
419
+ ],
420
+ "description": "Kind of the referenced metadata object."
421
+ },
422
+ "name": {
423
+ "type": "string",
424
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
425
+ "description": "Logical name of the referenced object."
426
+ }
427
+ },
428
+ "required": [
429
+ "kind",
430
+ "name"
431
+ ],
432
+ "additionalProperties": false
433
+ },
434
+ "allowedTypes": {
435
+ "description": "Polymorphic reference targets of a Ref value; mutually exclusive with ref.",
436
+ "minItems": 1,
437
+ "type": "array",
438
+ "items": {
439
+ "type": "object",
440
+ "properties": {
441
+ "kind": {
442
+ "type": "string",
443
+ "enum": [
444
+ "Catalog",
445
+ "Document",
446
+ "Enumeration",
447
+ "InformationRegister",
448
+ "AccumulationRegister",
449
+ "Constant",
450
+ "CustomTable",
451
+ "PgEnum",
452
+ "EventSubscription",
453
+ "RightsSet",
454
+ "Role"
455
+ ],
456
+ "description": "Kind of the referenced metadata object."
457
+ },
458
+ "name": {
459
+ "type": "string",
460
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
461
+ "description": "Logical name of the referenced object."
462
+ }
463
+ },
464
+ "required": [
465
+ "kind",
466
+ "name"
467
+ ],
468
+ "additionalProperties": false,
469
+ "description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
470
+ }
471
+ },
472
+ "array": {
473
+ "description": "Whether the value is an array of the type.",
474
+ "type": "boolean"
475
+ },
476
+ "crossScope": {
477
+ "description": "Marks a deliberately cross-scope Ref: the FK has no scope part in its key.",
478
+ "type": "boolean",
479
+ "const": true
480
+ },
481
+ "required": {
482
+ "default": false,
483
+ "description": "Whether a value is mandatory (NOT NULL).",
484
+ "type": "boolean"
485
+ },
486
+ "indexed": {
487
+ "default": false,
488
+ "description": "Whether the attribute is indexed.",
489
+ "type": "boolean"
490
+ },
491
+ "unique": {
492
+ "default": false,
493
+ "description": "Whether values must be unique; \"ignoreCase\" compares a scalar String or Text value case-insensitively.",
494
+ "anyOf": [
495
+ {
496
+ "type": "boolean"
497
+ },
498
+ {
499
+ "type": "string",
500
+ "const": "ignoreCase"
501
+ }
502
+ ]
503
+ },
504
+ "defaultValue": {
505
+ "description": "Default value of the attribute.",
506
+ "anyOf": [
507
+ {
508
+ "type": "string"
509
+ },
510
+ {
511
+ "type": "number"
512
+ },
513
+ {
514
+ "type": "boolean"
515
+ },
516
+ {
517
+ "type": "object",
518
+ "properties": {
519
+ "fill": {
520
+ "type": "string",
521
+ "enum": [
522
+ "now",
523
+ "today",
524
+ "newUuid"
525
+ ],
526
+ "description": "Fill expression computed by the database: now (DateTime), today (Date), newUuid (UUID)."
527
+ }
528
+ },
529
+ "required": [
530
+ "fill"
531
+ ],
532
+ "additionalProperties": false
533
+ },
534
+ {
535
+ "type": "object",
536
+ "properties": {
537
+ "empty": {
538
+ "anyOf": [
539
+ {
540
+ "type": "boolean",
541
+ "const": true
542
+ },
543
+ {
544
+ "type": "string",
545
+ "enum": [
546
+ "object",
547
+ "array"
548
+ ]
549
+ }
550
+ ],
551
+ "description": "Empty value: true for an array of any type, object or array for a scalar Json."
552
+ }
553
+ },
554
+ "required": [
555
+ "empty"
556
+ ],
557
+ "additionalProperties": false
558
+ }
559
+ ]
560
+ },
561
+ "nonNegative": {
562
+ "description": "Value must be zero or greater (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes positive.",
563
+ "type": "boolean",
564
+ "const": true
565
+ },
566
+ "positive": {
567
+ "description": "Value must be greater than zero (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes nonNegative.",
568
+ "type": "boolean",
569
+ "const": true
570
+ },
571
+ "minValue": {
572
+ "description": "Lower bound of the value (CHECK): a number or a decimal-fraction string within the type's range; numeric types only.",
573
+ "type": [
574
+ "number",
575
+ "string"
576
+ ]
577
+ },
578
+ "maxValue": {
579
+ "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.",
580
+ "type": [
581
+ "number",
582
+ "string"
583
+ ]
584
+ },
585
+ "pattern": {
586
+ "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.",
587
+ "type": "string",
588
+ "minLength": 1
589
+ },
590
+ "minLength": {
591
+ "description": "Minimum number of characters (CHECK); scalar String or Text only.",
592
+ "type": "integer",
593
+ "exclusiveMinimum": 0,
594
+ "maximum": 9007199254740991
595
+ }
596
+ },
597
+ "required": [
598
+ "name",
599
+ "type"
600
+ ],
601
+ "additionalProperties": false
602
+ }
603
+ },
604
+ "resources": {
605
+ "default": [],
606
+ "description": "Resources: the value fields of a record.",
607
+ "type": "array",
608
+ "items": {
609
+ "type": "object",
610
+ "properties": {
611
+ "id": {
612
+ "type": "string",
613
+ "format": "uuid",
614
+ "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})$",
615
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
616
+ },
617
+ "name": {
618
+ "type": "string",
619
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
620
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
621
+ },
622
+ "physicalName": {
623
+ "type": "string",
624
+ "minLength": 1,
625
+ "description": "Physical database name. Assigned once at creation and never changed, so a rename emits no DDL. At most 63 bytes in UTF-8."
626
+ },
627
+ "title": {
628
+ "description": "Human-readable title of the attribute.",
629
+ "type": "object",
630
+ "properties": {
631
+ "uk": {
632
+ "description": "Ukrainian text.",
633
+ "type": "string"
634
+ },
635
+ "en": {
636
+ "description": "English text.",
637
+ "type": "string"
638
+ }
639
+ },
640
+ "additionalProperties": false
641
+ },
642
+ "description": {
643
+ "description": "Description of the attribute.",
644
+ "type": "object",
645
+ "properties": {
646
+ "uk": {
647
+ "description": "Ukrainian text.",
648
+ "type": "string"
649
+ },
650
+ "en": {
651
+ "description": "English text.",
652
+ "type": "string"
653
+ }
654
+ },
655
+ "additionalProperties": false
656
+ },
657
+ "type": {
658
+ "type": "string",
659
+ "enum": [
660
+ "UUID",
661
+ "String",
662
+ "Text",
663
+ "Integer",
664
+ "SmallInt",
665
+ "BigInt",
666
+ "Numeric",
667
+ "Boolean",
668
+ "Date",
669
+ "DateTime",
670
+ "Bytes",
671
+ "Json",
672
+ "Ref"
673
+ ],
674
+ "description": "Logical value type."
675
+ },
676
+ "length": {
677
+ "description": "Maximum length; required for String and allowed only there.",
678
+ "type": "integer",
679
+ "exclusiveMinimum": 0,
680
+ "maximum": 9007199254740991
681
+ },
682
+ "precision": {
683
+ "description": "Total number of digits; allowed only for Numeric.",
684
+ "type": "integer",
685
+ "exclusiveMinimum": 0,
686
+ "maximum": 9007199254740991
687
+ },
688
+ "scale": {
689
+ "description": "Digits after the decimal point; requires precision.",
690
+ "type": "integer",
691
+ "minimum": 0,
692
+ "maximum": 9007199254740991
693
+ },
694
+ "ref": {
695
+ "description": "Single reference target of a Ref value; mutually exclusive with allowedTypes.",
696
+ "type": "object",
697
+ "properties": {
698
+ "kind": {
699
+ "type": "string",
700
+ "enum": [
701
+ "Catalog",
702
+ "Document",
703
+ "Enumeration",
704
+ "InformationRegister",
705
+ "AccumulationRegister",
706
+ "Constant",
707
+ "CustomTable",
708
+ "PgEnum",
709
+ "EventSubscription",
710
+ "RightsSet",
711
+ "Role"
712
+ ],
713
+ "description": "Kind of the referenced metadata object."
714
+ },
715
+ "name": {
716
+ "type": "string",
717
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
718
+ "description": "Logical name of the referenced object."
719
+ }
720
+ },
721
+ "required": [
722
+ "kind",
723
+ "name"
724
+ ],
725
+ "additionalProperties": false
726
+ },
727
+ "allowedTypes": {
728
+ "description": "Polymorphic reference targets of a Ref value; mutually exclusive with ref.",
729
+ "minItems": 1,
730
+ "type": "array",
731
+ "items": {
732
+ "type": "object",
733
+ "properties": {
734
+ "kind": {
735
+ "type": "string",
736
+ "enum": [
737
+ "Catalog",
738
+ "Document",
739
+ "Enumeration",
740
+ "InformationRegister",
741
+ "AccumulationRegister",
742
+ "Constant",
743
+ "CustomTable",
744
+ "PgEnum",
745
+ "EventSubscription",
746
+ "RightsSet",
747
+ "Role"
748
+ ],
749
+ "description": "Kind of the referenced metadata object."
750
+ },
751
+ "name": {
752
+ "type": "string",
753
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
754
+ "description": "Logical name of the referenced object."
755
+ }
756
+ },
757
+ "required": [
758
+ "kind",
759
+ "name"
760
+ ],
761
+ "additionalProperties": false,
762
+ "description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
763
+ }
764
+ },
765
+ "array": {
766
+ "description": "Whether the value is an array of the type.",
767
+ "type": "boolean"
768
+ },
769
+ "crossScope": {
770
+ "description": "Marks a deliberately cross-scope Ref: the FK has no scope part in its key.",
771
+ "type": "boolean",
772
+ "const": true
773
+ },
774
+ "required": {
775
+ "default": false,
776
+ "description": "Whether a value is mandatory (NOT NULL).",
777
+ "type": "boolean"
778
+ },
779
+ "indexed": {
780
+ "default": false,
781
+ "description": "Whether the attribute is indexed.",
782
+ "type": "boolean"
783
+ },
784
+ "unique": {
785
+ "default": false,
786
+ "description": "Whether values must be unique; \"ignoreCase\" compares a scalar String or Text value case-insensitively.",
787
+ "anyOf": [
788
+ {
789
+ "type": "boolean"
790
+ },
791
+ {
792
+ "type": "string",
793
+ "const": "ignoreCase"
794
+ }
795
+ ]
796
+ },
797
+ "defaultValue": {
798
+ "description": "Default value of the attribute.",
799
+ "anyOf": [
800
+ {
801
+ "type": "string"
802
+ },
803
+ {
804
+ "type": "number"
805
+ },
806
+ {
807
+ "type": "boolean"
808
+ },
809
+ {
810
+ "type": "object",
811
+ "properties": {
812
+ "fill": {
813
+ "type": "string",
814
+ "enum": [
815
+ "now",
816
+ "today",
817
+ "newUuid"
818
+ ],
819
+ "description": "Fill expression computed by the database: now (DateTime), today (Date), newUuid (UUID)."
820
+ }
821
+ },
822
+ "required": [
823
+ "fill"
824
+ ],
825
+ "additionalProperties": false
826
+ },
827
+ {
828
+ "type": "object",
829
+ "properties": {
830
+ "empty": {
831
+ "anyOf": [
832
+ {
833
+ "type": "boolean",
834
+ "const": true
835
+ },
836
+ {
837
+ "type": "string",
838
+ "enum": [
839
+ "object",
840
+ "array"
841
+ ]
842
+ }
843
+ ],
844
+ "description": "Empty value: true for an array of any type, object or array for a scalar Json."
845
+ }
846
+ },
847
+ "required": [
848
+ "empty"
849
+ ],
850
+ "additionalProperties": false
851
+ }
852
+ ]
853
+ },
854
+ "nonNegative": {
855
+ "description": "Value must be zero or greater (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes positive.",
856
+ "type": "boolean",
857
+ "const": true
858
+ },
859
+ "positive": {
860
+ "description": "Value must be greater than zero (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes nonNegative.",
861
+ "type": "boolean",
862
+ "const": true
863
+ },
864
+ "minValue": {
865
+ "description": "Lower bound of the value (CHECK): a number or a decimal-fraction string within the type's range; numeric types only.",
866
+ "type": [
867
+ "number",
868
+ "string"
869
+ ]
870
+ },
871
+ "maxValue": {
872
+ "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.",
873
+ "type": [
874
+ "number",
875
+ "string"
876
+ ]
877
+ },
878
+ "pattern": {
879
+ "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.",
880
+ "type": "string",
881
+ "minLength": 1
882
+ },
883
+ "minLength": {
884
+ "description": "Minimum number of characters (CHECK); scalar String or Text only.",
885
+ "type": "integer",
886
+ "exclusiveMinimum": 0,
887
+ "maximum": 9007199254740991
888
+ }
889
+ },
890
+ "required": [
891
+ "name",
892
+ "type"
893
+ ],
894
+ "additionalProperties": false
895
+ }
896
+ },
897
+ "attributes": {
898
+ "default": [],
899
+ "description": "Attributes: extra information of a record.",
900
+ "type": "array",
901
+ "items": {
902
+ "type": "object",
903
+ "properties": {
904
+ "id": {
905
+ "type": "string",
906
+ "format": "uuid",
907
+ "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})$",
908
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
909
+ },
910
+ "name": {
911
+ "type": "string",
912
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
913
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
914
+ },
915
+ "physicalName": {
916
+ "type": "string",
917
+ "minLength": 1,
918
+ "description": "Physical database name. Assigned once at creation and never changed, so a rename emits no DDL. At most 63 bytes in UTF-8."
919
+ },
920
+ "title": {
921
+ "description": "Human-readable title of the attribute.",
922
+ "type": "object",
923
+ "properties": {
924
+ "uk": {
925
+ "description": "Ukrainian text.",
926
+ "type": "string"
927
+ },
928
+ "en": {
929
+ "description": "English text.",
930
+ "type": "string"
931
+ }
932
+ },
933
+ "additionalProperties": false
934
+ },
935
+ "description": {
936
+ "description": "Description of the attribute.",
937
+ "type": "object",
938
+ "properties": {
939
+ "uk": {
940
+ "description": "Ukrainian text.",
941
+ "type": "string"
942
+ },
943
+ "en": {
944
+ "description": "English text.",
945
+ "type": "string"
946
+ }
947
+ },
948
+ "additionalProperties": false
949
+ },
950
+ "type": {
951
+ "type": "string",
952
+ "enum": [
953
+ "UUID",
954
+ "String",
955
+ "Text",
956
+ "Integer",
957
+ "SmallInt",
958
+ "BigInt",
959
+ "Numeric",
960
+ "Boolean",
961
+ "Date",
962
+ "DateTime",
963
+ "Bytes",
964
+ "Json",
965
+ "Ref"
966
+ ],
967
+ "description": "Logical value type."
968
+ },
969
+ "length": {
970
+ "description": "Maximum length; required for String and allowed only there.",
971
+ "type": "integer",
972
+ "exclusiveMinimum": 0,
973
+ "maximum": 9007199254740991
974
+ },
975
+ "precision": {
976
+ "description": "Total number of digits; allowed only for Numeric.",
977
+ "type": "integer",
978
+ "exclusiveMinimum": 0,
979
+ "maximum": 9007199254740991
980
+ },
981
+ "scale": {
982
+ "description": "Digits after the decimal point; requires precision.",
983
+ "type": "integer",
984
+ "minimum": 0,
985
+ "maximum": 9007199254740991
986
+ },
987
+ "ref": {
988
+ "description": "Single reference target of a Ref value; mutually exclusive with allowedTypes.",
989
+ "type": "object",
990
+ "properties": {
991
+ "kind": {
992
+ "type": "string",
993
+ "enum": [
994
+ "Catalog",
995
+ "Document",
996
+ "Enumeration",
997
+ "InformationRegister",
998
+ "AccumulationRegister",
999
+ "Constant",
1000
+ "CustomTable",
1001
+ "PgEnum",
1002
+ "EventSubscription",
1003
+ "RightsSet",
1004
+ "Role"
1005
+ ],
1006
+ "description": "Kind of the referenced metadata object."
1007
+ },
1008
+ "name": {
1009
+ "type": "string",
1010
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
1011
+ "description": "Logical name of the referenced object."
1012
+ }
1013
+ },
1014
+ "required": [
1015
+ "kind",
1016
+ "name"
1017
+ ],
1018
+ "additionalProperties": false
1019
+ },
1020
+ "allowedTypes": {
1021
+ "description": "Polymorphic reference targets of a Ref value; mutually exclusive with ref.",
1022
+ "minItems": 1,
1023
+ "type": "array",
1024
+ "items": {
1025
+ "type": "object",
1026
+ "properties": {
1027
+ "kind": {
1028
+ "type": "string",
1029
+ "enum": [
1030
+ "Catalog",
1031
+ "Document",
1032
+ "Enumeration",
1033
+ "InformationRegister",
1034
+ "AccumulationRegister",
1035
+ "Constant",
1036
+ "CustomTable",
1037
+ "PgEnum",
1038
+ "EventSubscription",
1039
+ "RightsSet",
1040
+ "Role"
1041
+ ],
1042
+ "description": "Kind of the referenced metadata object."
1043
+ },
1044
+ "name": {
1045
+ "type": "string",
1046
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
1047
+ "description": "Logical name of the referenced object."
1048
+ }
1049
+ },
1050
+ "required": [
1051
+ "kind",
1052
+ "name"
1053
+ ],
1054
+ "additionalProperties": false,
1055
+ "description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
1056
+ }
1057
+ },
1058
+ "array": {
1059
+ "description": "Whether the value is an array of the type.",
1060
+ "type": "boolean"
1061
+ },
1062
+ "crossScope": {
1063
+ "description": "Marks a deliberately cross-scope Ref: the FK has no scope part in its key.",
1064
+ "type": "boolean",
1065
+ "const": true
1066
+ },
1067
+ "required": {
1068
+ "default": false,
1069
+ "description": "Whether a value is mandatory (NOT NULL).",
1070
+ "type": "boolean"
1071
+ },
1072
+ "indexed": {
1073
+ "default": false,
1074
+ "description": "Whether the attribute is indexed.",
1075
+ "type": "boolean"
1076
+ },
1077
+ "unique": {
1078
+ "default": false,
1079
+ "description": "Whether values must be unique; \"ignoreCase\" compares a scalar String or Text value case-insensitively.",
1080
+ "anyOf": [
1081
+ {
1082
+ "type": "boolean"
1083
+ },
1084
+ {
1085
+ "type": "string",
1086
+ "const": "ignoreCase"
1087
+ }
1088
+ ]
1089
+ },
1090
+ "defaultValue": {
1091
+ "description": "Default value of the attribute.",
1092
+ "anyOf": [
1093
+ {
1094
+ "type": "string"
1095
+ },
1096
+ {
1097
+ "type": "number"
1098
+ },
1099
+ {
1100
+ "type": "boolean"
1101
+ },
1102
+ {
1103
+ "type": "object",
1104
+ "properties": {
1105
+ "fill": {
1106
+ "type": "string",
1107
+ "enum": [
1108
+ "now",
1109
+ "today",
1110
+ "newUuid"
1111
+ ],
1112
+ "description": "Fill expression computed by the database: now (DateTime), today (Date), newUuid (UUID)."
1113
+ }
1114
+ },
1115
+ "required": [
1116
+ "fill"
1117
+ ],
1118
+ "additionalProperties": false
1119
+ },
1120
+ {
1121
+ "type": "object",
1122
+ "properties": {
1123
+ "empty": {
1124
+ "anyOf": [
1125
+ {
1126
+ "type": "boolean",
1127
+ "const": true
1128
+ },
1129
+ {
1130
+ "type": "string",
1131
+ "enum": [
1132
+ "object",
1133
+ "array"
1134
+ ]
1135
+ }
1136
+ ],
1137
+ "description": "Empty value: true for an array of any type, object or array for a scalar Json."
1138
+ }
1139
+ },
1140
+ "required": [
1141
+ "empty"
1142
+ ],
1143
+ "additionalProperties": false
1144
+ }
1145
+ ]
1146
+ },
1147
+ "nonNegative": {
1148
+ "description": "Value must be zero or greater (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes positive.",
1149
+ "type": "boolean",
1150
+ "const": true
1151
+ },
1152
+ "positive": {
1153
+ "description": "Value must be greater than zero (CHECK); scalar Integer, SmallInt, BigInt or Numeric; excludes nonNegative.",
1154
+ "type": "boolean",
1155
+ "const": true
1156
+ },
1157
+ "minValue": {
1158
+ "description": "Lower bound of the value (CHECK): a number or a decimal-fraction string within the type's range; numeric types only.",
1159
+ "type": [
1160
+ "number",
1161
+ "string"
1162
+ ]
1163
+ },
1164
+ "maxValue": {
1165
+ "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.",
1166
+ "type": [
1167
+ "number",
1168
+ "string"
1169
+ ]
1170
+ },
1171
+ "pattern": {
1172
+ "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.",
1173
+ "type": "string",
1174
+ "minLength": 1
1175
+ },
1176
+ "minLength": {
1177
+ "description": "Minimum number of characters (CHECK); scalar String or Text only.",
1178
+ "type": "integer",
1179
+ "exclusiveMinimum": 0,
1180
+ "maximum": 9007199254740991
1181
+ },
1182
+ "personalData": {
1183
+ "description": "Marks the attribute as personal data: anonymization sets its columns to NULL, so it cannot be required.",
1184
+ "type": "boolean",
1185
+ "const": true
1186
+ }
1187
+ },
1188
+ "required": [
1189
+ "name",
1190
+ "type"
1191
+ ],
1192
+ "additionalProperties": false
1193
+ }
1194
+ }
1195
+ },
1196
+ "required": [
1197
+ "name",
1198
+ "kind"
1199
+ ],
1200
+ "additionalProperties": false,
1201
+ "$id": "information-registers.schema.json"
1202
+ }