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