simetra 0.0.0-stage → 0.2.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,945 @@
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
+ "name": {
10
+ "type": "string",
11
+ "description": "Application name."
12
+ },
13
+ "title": {
14
+ "description": "Human-readable title of the application.",
15
+ "type": "object",
16
+ "properties": {
17
+ "uk": {
18
+ "description": "Ukrainian text.",
19
+ "type": "string"
20
+ },
21
+ "en": {
22
+ "description": "English text.",
23
+ "type": "string"
24
+ }
25
+ },
26
+ "additionalProperties": false
27
+ },
28
+ "defaultLocale": {
29
+ "default": "uk",
30
+ "description": "Locale used when none is requested.",
31
+ "type": "string",
32
+ "enum": [
33
+ "uk",
34
+ "en"
35
+ ]
36
+ },
37
+ "defaultSchema": {
38
+ "default": "public",
39
+ "description": "PostgreSQL schema for objects that declare none.",
40
+ "type": "string"
41
+ },
42
+ "database": {
43
+ "type": "object",
44
+ "properties": {
45
+ "provider": {
46
+ "type": "string",
47
+ "enum": [
48
+ "supabase"
49
+ ],
50
+ "description": "Database provider preset that defines the management boundary."
51
+ }
52
+ },
53
+ "required": [
54
+ "provider"
55
+ ],
56
+ "additionalProperties": false,
57
+ "description": "Database of the application."
58
+ },
59
+ "naming": {
60
+ "default": {
61
+ "attributeCase": "camelCase"
62
+ },
63
+ "description": "Naming rules of the application.",
64
+ "type": "object",
65
+ "properties": {
66
+ "attributeCase": {
67
+ "default": "camelCase",
68
+ "description": "Casing style of logical attribute names.",
69
+ "type": "string",
70
+ "enum": [
71
+ "camelCase",
72
+ "snake_case"
73
+ ]
74
+ }
75
+ },
76
+ "additionalProperties": false
77
+ },
78
+ "timezone": {
79
+ "default": "UTC",
80
+ "description": "IANA time zone in which the platform determines day, month, quarter and year.",
81
+ "type": "string",
82
+ "minLength": 1
83
+ },
84
+ "scopeKinds": {
85
+ "default": [],
86
+ "description": "Scope kinds of the application; leave empty for a single-tenant application.",
87
+ "type": "array",
88
+ "items": {
89
+ "type": "object",
90
+ "properties": {
91
+ "id": {
92
+ "type": "string",
93
+ "format": "uuid",
94
+ "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})$",
95
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
96
+ },
97
+ "name": {
98
+ "type": "string",
99
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
100
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
101
+ },
102
+ "physicalName": {
103
+ "type": "string",
104
+ "minLength": 1,
105
+ "description": "Physical database name. Assigned once at creation and never changed, so a rename emits no DDL. At most 63 bytes in UTF-8."
106
+ },
107
+ "title": {
108
+ "description": "Human-readable title of the scope kind.",
109
+ "type": "object",
110
+ "properties": {
111
+ "uk": {
112
+ "description": "Ukrainian text.",
113
+ "type": "string"
114
+ },
115
+ "en": {
116
+ "description": "English text.",
117
+ "type": "string"
118
+ }
119
+ },
120
+ "additionalProperties": false
121
+ },
122
+ "root": {
123
+ "anyOf": [
124
+ {
125
+ "type": "object",
126
+ "properties": {
127
+ "object": {
128
+ "type": "object",
129
+ "properties": {
130
+ "kind": {
131
+ "type": "string",
132
+ "enum": [
133
+ "Catalog",
134
+ "Document",
135
+ "Enumeration",
136
+ "InformationRegister",
137
+ "AccumulationRegister",
138
+ "Constant",
139
+ "CustomTable",
140
+ "PgEnum",
141
+ "EventSubscription",
142
+ "RightsSet",
143
+ "Role"
144
+ ],
145
+ "description": "Kind of the referenced metadata object."
146
+ },
147
+ "name": {
148
+ "type": "string",
149
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
150
+ "description": "Logical name of the referenced object."
151
+ }
152
+ },
153
+ "required": [
154
+ "kind",
155
+ "name"
156
+ ],
157
+ "additionalProperties": false,
158
+ "description": "Metadata object that is the scope root."
159
+ }
160
+ },
161
+ "required": [
162
+ "object"
163
+ ],
164
+ "additionalProperties": false
165
+ },
166
+ {
167
+ "type": "object",
168
+ "properties": {
169
+ "external": {
170
+ "type": "object",
171
+ "properties": {
172
+ "schema": {
173
+ "type": "string",
174
+ "minLength": 1,
175
+ "description": "PostgreSQL schema of the external root table."
176
+ },
177
+ "table": {
178
+ "type": "string",
179
+ "minLength": 1,
180
+ "description": "Physical name of the external root table."
181
+ },
182
+ "column": {
183
+ "type": "string",
184
+ "minLength": 1,
185
+ "description": "Physical key column of the external root table."
186
+ }
187
+ },
188
+ "required": [
189
+ "schema",
190
+ "table",
191
+ "column"
192
+ ],
193
+ "additionalProperties": false,
194
+ "description": "Root table outside the metadata."
195
+ }
196
+ },
197
+ "required": [
198
+ "external"
199
+ ],
200
+ "additionalProperties": false
201
+ }
202
+ ],
203
+ "description": "Root of the scope: a metadata object or an external table."
204
+ },
205
+ "setFunction": {
206
+ "anyOf": [
207
+ {
208
+ "type": "object",
209
+ "properties": {
210
+ "schema": {
211
+ "description": "PostgreSQL schema of the function; defaultSchema when absent.",
212
+ "type": "string",
213
+ "minLength": 1
214
+ },
215
+ "name": {
216
+ "type": "string",
217
+ "minLength": 1,
218
+ "description": "Physical name of the function."
219
+ }
220
+ },
221
+ "required": [
222
+ "name"
223
+ ],
224
+ "additionalProperties": false,
225
+ "description": "SQL function defined in a .sql file."
226
+ },
227
+ {
228
+ "type": "string",
229
+ "const": "membership",
230
+ "description": "Generated from the membership catalog of this scope kind: the scope values where the current user is a member."
231
+ }
232
+ ],
233
+ "description": "SQL function that returns the set of scope values visible to the current user."
234
+ },
235
+ "onRootDelete": {
236
+ "default": "restrict",
237
+ "description": "What happens to scoped rows when the scope root is deleted.",
238
+ "type": "string",
239
+ "enum": [
240
+ "restrict",
241
+ "cascade"
242
+ ]
243
+ }
244
+ },
245
+ "required": [
246
+ "name",
247
+ "root",
248
+ "setFunction"
249
+ ],
250
+ "additionalProperties": false,
251
+ "description": "Scope kind of the application (tenant dimension)."
252
+ }
253
+ },
254
+ "accessDimensions": {
255
+ "default": [],
256
+ "description": "Access dimensions of the application: value catalogs that grants may restrict rows by.",
257
+ "type": "array",
258
+ "items": {
259
+ "type": "object",
260
+ "properties": {
261
+ "id": {
262
+ "type": "string",
263
+ "format": "uuid",
264
+ "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})$",
265
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
266
+ },
267
+ "name": {
268
+ "type": "string",
269
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
270
+ "description": "Logical name of the access dimension, unique among all named elements of the project."
271
+ },
272
+ "target": {
273
+ "type": "object",
274
+ "properties": {
275
+ "kind": {
276
+ "type": "string",
277
+ "enum": [
278
+ "Catalog",
279
+ "Document",
280
+ "Enumeration",
281
+ "InformationRegister",
282
+ "AccumulationRegister",
283
+ "Constant",
284
+ "CustomTable",
285
+ "PgEnum",
286
+ "EventSubscription",
287
+ "RightsSet",
288
+ "Role"
289
+ ],
290
+ "description": "Kind of the referenced metadata object."
291
+ },
292
+ "name": {
293
+ "type": "string",
294
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
295
+ "description": "Logical name of the referenced object."
296
+ }
297
+ },
298
+ "required": [
299
+ "kind",
300
+ "name"
301
+ ],
302
+ "additionalProperties": false,
303
+ "description": "Catalog of the dimension values; scoped when the project has scope kinds."
304
+ },
305
+ "values": {
306
+ "anyOf": [
307
+ {
308
+ "type": "object",
309
+ "properties": {
310
+ "relation": {
311
+ "type": "object",
312
+ "properties": {
313
+ "object": {
314
+ "type": "object",
315
+ "properties": {
316
+ "kind": {
317
+ "type": "string",
318
+ "enum": [
319
+ "Catalog",
320
+ "Document",
321
+ "Enumeration",
322
+ "InformationRegister",
323
+ "AccumulationRegister",
324
+ "Constant",
325
+ "CustomTable",
326
+ "PgEnum",
327
+ "EventSubscription",
328
+ "RightsSet",
329
+ "Role"
330
+ ],
331
+ "description": "Kind of the referenced metadata object."
332
+ },
333
+ "name": {
334
+ "type": "string",
335
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
336
+ "description": "Logical name of the referenced object."
337
+ }
338
+ },
339
+ "required": [
340
+ "kind",
341
+ "name"
342
+ ],
343
+ "additionalProperties": false,
344
+ "description": "Object whose rows link a user or a member to a value of the dimension."
345
+ },
346
+ "subject": {
347
+ "type": "string",
348
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
349
+ "description": "Reference of the relation object to the users catalog or to the membership catalog."
350
+ },
351
+ "value": {
352
+ "type": "string",
353
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
354
+ "description": "Reference of the relation object to the target catalog."
355
+ }
356
+ },
357
+ "required": [
358
+ "object",
359
+ "subject",
360
+ "value"
361
+ ],
362
+ "additionalProperties": false,
363
+ "description": "Values of a user read from a relation."
364
+ }
365
+ },
366
+ "required": [
367
+ "relation"
368
+ ],
369
+ "additionalProperties": false
370
+ },
371
+ {
372
+ "type": "object",
373
+ "properties": {
374
+ "function": {
375
+ "type": "object",
376
+ "properties": {
377
+ "schema": {
378
+ "description": "PostgreSQL schema of the function; the project default schema when omitted.",
379
+ "type": "string",
380
+ "minLength": 1
381
+ },
382
+ "name": {
383
+ "type": "string",
384
+ "minLength": 1,
385
+ "description": "Name of a verbatim SQL function that returns the value ids of the current user."
386
+ }
387
+ },
388
+ "required": [
389
+ "name"
390
+ ],
391
+ "additionalProperties": false,
392
+ "description": "Values of a user returned by a function."
393
+ }
394
+ },
395
+ "required": [
396
+ "function"
397
+ ],
398
+ "additionalProperties": false
399
+ }
400
+ ],
401
+ "description": "Where the values of the current user come from."
402
+ }
403
+ },
404
+ "required": [
405
+ "name",
406
+ "target",
407
+ "values"
408
+ ],
409
+ "additionalProperties": false
410
+ }
411
+ },
412
+ "membershipSources": {
413
+ "default": [],
414
+ "description": "Adopted tables that hold the membership of a scope kind instead of a membership catalog.",
415
+ "type": "array",
416
+ "items": {
417
+ "type": "object",
418
+ "properties": {
419
+ "id": {
420
+ "type": "string",
421
+ "format": "uuid",
422
+ "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})$",
423
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
424
+ },
425
+ "name": {
426
+ "type": "string",
427
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
428
+ "description": "Logical name of the membership source, unique among all named elements of the project."
429
+ },
430
+ "scopeKind": {
431
+ "type": "string",
432
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
433
+ "description": "Name of the project scope kind whose membership the table holds."
434
+ },
435
+ "table": {
436
+ "type": "object",
437
+ "properties": {
438
+ "kind": {
439
+ "type": "string",
440
+ "enum": [
441
+ "Catalog",
442
+ "Document",
443
+ "Enumeration",
444
+ "InformationRegister",
445
+ "AccumulationRegister",
446
+ "Constant",
447
+ "CustomTable",
448
+ "PgEnum",
449
+ "EventSubscription",
450
+ "RightsSet",
451
+ "Role"
452
+ ],
453
+ "description": "Kind of the referenced metadata object."
454
+ },
455
+ "name": {
456
+ "type": "string",
457
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
458
+ "description": "Logical name of the referenced object."
459
+ }
460
+ },
461
+ "required": [
462
+ "kind",
463
+ "name"
464
+ ],
465
+ "additionalProperties": false,
466
+ "description": "Adopted table (CustomTable) with the membership rows."
467
+ },
468
+ "columns": {
469
+ "type": "object",
470
+ "properties": {
471
+ "scope": {
472
+ "type": "string",
473
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
474
+ "description": "Column with the scope value."
475
+ },
476
+ "user": {
477
+ "type": "string",
478
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
479
+ "description": "Column with the user id."
480
+ },
481
+ "active": {
482
+ "description": "Boolean column; only active rows count as membership.",
483
+ "type": "string",
484
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
485
+ }
486
+ },
487
+ "required": [
488
+ "scope",
489
+ "user"
490
+ ],
491
+ "additionalProperties": false,
492
+ "description": "Logical names of the table columns."
493
+ },
494
+ "where": {
495
+ "default": [],
496
+ "description": "Conditions every row of the source must meet (a conjunction); rows that fail them are not part of the source.",
497
+ "type": "array",
498
+ "items": {
499
+ "anyOf": [
500
+ {
501
+ "type": "object",
502
+ "properties": {
503
+ "column": {
504
+ "type": "string",
505
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
506
+ "description": "Logical name of a column of the table."
507
+ },
508
+ "equals": {
509
+ "anyOf": [
510
+ {
511
+ "type": "string"
512
+ },
513
+ {
514
+ "type": "boolean"
515
+ },
516
+ {
517
+ "type": "integer",
518
+ "minimum": -9007199254740991,
519
+ "maximum": 9007199254740991
520
+ }
521
+ ],
522
+ "description": "Literal the column must equal: a string for a text or uuid column, a boolean, or an integer."
523
+ }
524
+ },
525
+ "required": [
526
+ "column",
527
+ "equals"
528
+ ],
529
+ "additionalProperties": false
530
+ },
531
+ {
532
+ "type": "object",
533
+ "properties": {
534
+ "column": {
535
+ "type": "string",
536
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
537
+ "description": "Logical name of a column of the table."
538
+ },
539
+ "isNull": {
540
+ "type": "boolean",
541
+ "description": "true: the column must be NULL; false: must not be NULL."
542
+ }
543
+ },
544
+ "required": [
545
+ "column",
546
+ "isNull"
547
+ ],
548
+ "additionalProperties": false
549
+ }
550
+ ],
551
+ "description": "Condition on a row of the table: a column equals a literal or is (not) NULL."
552
+ }
553
+ }
554
+ },
555
+ "required": [
556
+ "name",
557
+ "scopeKind",
558
+ "table",
559
+ "columns"
560
+ ],
561
+ "additionalProperties": false
562
+ }
563
+ },
564
+ "assignmentSources": {
565
+ "default": [],
566
+ "description": "Adopted tables that hold role assignments of one level.",
567
+ "type": "array",
568
+ "items": {
569
+ "type": "object",
570
+ "properties": {
571
+ "id": {
572
+ "type": "string",
573
+ "format": "uuid",
574
+ "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})$",
575
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
576
+ },
577
+ "name": {
578
+ "type": "string",
579
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
580
+ "description": "Logical name of the assignment source, unique among all named elements of the project."
581
+ },
582
+ "assignedOn": {
583
+ "anyOf": [
584
+ {
585
+ "type": "string",
586
+ "const": "global"
587
+ },
588
+ {
589
+ "type": "object",
590
+ "properties": {
591
+ "scopeKind": {
592
+ "type": "string",
593
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
594
+ "description": "Name of the project scope kind of the level."
595
+ }
596
+ },
597
+ "required": [
598
+ "scopeKind"
599
+ ],
600
+ "additionalProperties": false
601
+ },
602
+ {
603
+ "type": "object",
604
+ "properties": {
605
+ "container": {
606
+ "type": "object",
607
+ "properties": {
608
+ "kind": {
609
+ "type": "string",
610
+ "enum": [
611
+ "Catalog",
612
+ "Document",
613
+ "Enumeration",
614
+ "InformationRegister",
615
+ "AccumulationRegister",
616
+ "Constant",
617
+ "CustomTable",
618
+ "PgEnum",
619
+ "EventSubscription",
620
+ "RightsSet",
621
+ "Role"
622
+ ],
623
+ "description": "Kind of the referenced metadata object."
624
+ },
625
+ "name": {
626
+ "type": "string",
627
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
628
+ "description": "Logical name of the referenced object."
629
+ }
630
+ },
631
+ "required": [
632
+ "kind",
633
+ "name"
634
+ ],
635
+ "additionalProperties": false,
636
+ "description": "Rights container object of the level."
637
+ }
638
+ },
639
+ "required": [
640
+ "container"
641
+ ],
642
+ "additionalProperties": false
643
+ }
644
+ ],
645
+ "description": "Level of the assignment: global, a scope kind or a rights container."
646
+ },
647
+ "table": {
648
+ "type": "object",
649
+ "properties": {
650
+ "kind": {
651
+ "type": "string",
652
+ "enum": [
653
+ "Catalog",
654
+ "Document",
655
+ "Enumeration",
656
+ "InformationRegister",
657
+ "AccumulationRegister",
658
+ "Constant",
659
+ "CustomTable",
660
+ "PgEnum",
661
+ "EventSubscription",
662
+ "RightsSet",
663
+ "Role"
664
+ ],
665
+ "description": "Kind of the referenced metadata object."
666
+ },
667
+ "name": {
668
+ "type": "string",
669
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
670
+ "description": "Logical name of the referenced object."
671
+ }
672
+ },
673
+ "required": [
674
+ "kind",
675
+ "name"
676
+ ],
677
+ "additionalProperties": false,
678
+ "description": "Adopted table (CustomTable) with the assignment rows."
679
+ },
680
+ "columns": {
681
+ "type": "object",
682
+ "properties": {
683
+ "member": {
684
+ "type": "string",
685
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
686
+ "description": "Column with the member (a user for the global level)."
687
+ },
688
+ "role": {
689
+ "anyOf": [
690
+ {
691
+ "type": "string",
692
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
693
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
694
+ },
695
+ {
696
+ "type": "object",
697
+ "properties": {
698
+ "column": {
699
+ "type": "string",
700
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
701
+ "description": "Column of the source table with the uuid reference to the role table."
702
+ },
703
+ "references": {
704
+ "type": "object",
705
+ "properties": {
706
+ "kind": {
707
+ "type": "string",
708
+ "enum": [
709
+ "Catalog",
710
+ "Document",
711
+ "Enumeration",
712
+ "InformationRegister",
713
+ "AccumulationRegister",
714
+ "Constant",
715
+ "CustomTable",
716
+ "PgEnum",
717
+ "EventSubscription",
718
+ "RightsSet",
719
+ "Role"
720
+ ],
721
+ "description": "Kind of the referenced metadata object."
722
+ },
723
+ "name": {
724
+ "type": "string",
725
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
726
+ "description": "Logical name of the referenced object."
727
+ }
728
+ },
729
+ "required": [
730
+ "kind",
731
+ "name"
732
+ ],
733
+ "additionalProperties": false,
734
+ "description": "Adopted role table (CustomTable) with a single-column uuid key."
735
+ },
736
+ "key": {
737
+ "type": "string",
738
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
739
+ "description": "Column of the role table with the role key declared by a role in sourceKeys."
740
+ },
741
+ "where": {
742
+ "default": [],
743
+ "description": "Conditions every row of the role table must meet (a conjunction); required unless the key column is unique on its own.",
744
+ "type": "array",
745
+ "items": {
746
+ "anyOf": [
747
+ {
748
+ "type": "object",
749
+ "properties": {
750
+ "column": {
751
+ "type": "string",
752
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
753
+ "description": "Logical name of a column of the table."
754
+ },
755
+ "equals": {
756
+ "anyOf": [
757
+ {
758
+ "type": "string"
759
+ },
760
+ {
761
+ "type": "boolean"
762
+ },
763
+ {
764
+ "type": "integer",
765
+ "minimum": -9007199254740991,
766
+ "maximum": 9007199254740991
767
+ }
768
+ ],
769
+ "description": "Literal the column must equal: a string for a text or uuid column, a boolean, or an integer."
770
+ }
771
+ },
772
+ "required": [
773
+ "column",
774
+ "equals"
775
+ ],
776
+ "additionalProperties": false
777
+ },
778
+ {
779
+ "type": "object",
780
+ "properties": {
781
+ "column": {
782
+ "type": "string",
783
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
784
+ "description": "Logical name of a column of the table."
785
+ },
786
+ "isNull": {
787
+ "type": "boolean",
788
+ "description": "true: the column must be NULL; false: must not be NULL."
789
+ }
790
+ },
791
+ "required": [
792
+ "column",
793
+ "isNull"
794
+ ],
795
+ "additionalProperties": false
796
+ }
797
+ ],
798
+ "description": "Condition on a row of the table: a column equals a literal or is (not) NULL."
799
+ }
800
+ }
801
+ },
802
+ "required": [
803
+ "column",
804
+ "references",
805
+ "key"
806
+ ],
807
+ "additionalProperties": false
808
+ }
809
+ ],
810
+ "description": "Column with the role key declared by a role in sourceKeys, or a reference to an adopted role table with the key column."
811
+ },
812
+ "scope": {
813
+ "description": "Scope level only: column with the scope of the row, which must equal the scope of the member; null takes the scope from the member; omitted means the scopeColumn of the table.",
814
+ "anyOf": [
815
+ {
816
+ "type": "string",
817
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
818
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
819
+ },
820
+ {
821
+ "type": "null"
822
+ }
823
+ ]
824
+ },
825
+ "container": {
826
+ "description": "Column with the container; required for the container level only.",
827
+ "type": "string",
828
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
829
+ },
830
+ "active": {
831
+ "description": "Boolean column; only active rows count as assignments.",
832
+ "type": "string",
833
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
834
+ }
835
+ },
836
+ "required": [
837
+ "member",
838
+ "role"
839
+ ],
840
+ "additionalProperties": false,
841
+ "description": "Logical names of the table columns."
842
+ },
843
+ "where": {
844
+ "default": [],
845
+ "description": "Conditions every row of the source must meet (a conjunction); rows that fail them are not part of the source.",
846
+ "type": "array",
847
+ "items": {
848
+ "anyOf": [
849
+ {
850
+ "type": "object",
851
+ "properties": {
852
+ "column": {
853
+ "type": "string",
854
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
855
+ "description": "Logical name of a column of the table."
856
+ },
857
+ "equals": {
858
+ "anyOf": [
859
+ {
860
+ "type": "string"
861
+ },
862
+ {
863
+ "type": "boolean"
864
+ },
865
+ {
866
+ "type": "integer",
867
+ "minimum": -9007199254740991,
868
+ "maximum": 9007199254740991
869
+ }
870
+ ],
871
+ "description": "Literal the column must equal: a string for a text or uuid column, a boolean, or an integer."
872
+ }
873
+ },
874
+ "required": [
875
+ "column",
876
+ "equals"
877
+ ],
878
+ "additionalProperties": false
879
+ },
880
+ {
881
+ "type": "object",
882
+ "properties": {
883
+ "column": {
884
+ "type": "string",
885
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
886
+ "description": "Logical name of a column of the table."
887
+ },
888
+ "isNull": {
889
+ "type": "boolean",
890
+ "description": "true: the column must be NULL; false: must not be NULL."
891
+ }
892
+ },
893
+ "required": [
894
+ "column",
895
+ "isNull"
896
+ ],
897
+ "additionalProperties": false
898
+ }
899
+ ],
900
+ "description": "Condition on a row of the table: a column equals a literal or is (not) NULL."
901
+ }
902
+ }
903
+ },
904
+ "required": [
905
+ "name",
906
+ "assignedOn",
907
+ "table",
908
+ "columns"
909
+ ],
910
+ "additionalProperties": false
911
+ }
912
+ },
913
+ "storageBuckets": {
914
+ "default": [],
915
+ "description": "Provider storage buckets whose access policies follow a scope kind.",
916
+ "type": "array",
917
+ "items": {
918
+ "type": "object",
919
+ "properties": {
920
+ "bucket": {
921
+ "type": "string",
922
+ "minLength": 1,
923
+ "description": "Name of the provider storage bucket."
924
+ },
925
+ "scopeKind": {
926
+ "type": "string",
927
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
928
+ "description": "Name of the project scope kind that scopes access to the bucket."
929
+ }
930
+ },
931
+ "required": [
932
+ "bucket",
933
+ "scopeKind"
934
+ ],
935
+ "additionalProperties": false
936
+ }
937
+ }
938
+ },
939
+ "required": [
940
+ "name",
941
+ "database"
942
+ ],
943
+ "additionalProperties": false,
944
+ "$id": "project.schema.json"
945
+ }