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,498 @@
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
+ "kind": {
21
+ "type": "string",
22
+ "const": "Role",
23
+ "description": "Metadata kind; always Role."
24
+ },
25
+ "assignedOn": {
26
+ "anyOf": [
27
+ {
28
+ "anyOf": [
29
+ {
30
+ "type": "string",
31
+ "const": "global"
32
+ },
33
+ {
34
+ "type": "object",
35
+ "properties": {
36
+ "scopeKind": {
37
+ "type": "string",
38
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
39
+ "description": "Name of the project scope kind of the level."
40
+ }
41
+ },
42
+ "required": [
43
+ "scopeKind"
44
+ ],
45
+ "additionalProperties": false
46
+ },
47
+ {
48
+ "type": "object",
49
+ "properties": {
50
+ "container": {
51
+ "type": "object",
52
+ "properties": {
53
+ "kind": {
54
+ "type": "string",
55
+ "enum": [
56
+ "Catalog",
57
+ "Document",
58
+ "Enumeration",
59
+ "InformationRegister",
60
+ "AccumulationRegister",
61
+ "Constant",
62
+ "CustomTable",
63
+ "PgEnum",
64
+ "EventSubscription",
65
+ "RightsSet",
66
+ "Role"
67
+ ],
68
+ "description": "Kind of the referenced metadata object."
69
+ },
70
+ "name": {
71
+ "type": "string",
72
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
73
+ "description": "Logical name of the referenced object."
74
+ }
75
+ },
76
+ "required": [
77
+ "kind",
78
+ "name"
79
+ ],
80
+ "additionalProperties": false,
81
+ "description": "Rights container object of the level."
82
+ }
83
+ },
84
+ "required": [
85
+ "container"
86
+ ],
87
+ "additionalProperties": false
88
+ }
89
+ ],
90
+ "description": "Level of the assignment: global, a scope kind or a rights container."
91
+ },
92
+ {
93
+ "type": "string",
94
+ "const": "everyUser",
95
+ "description": "Every authenticated user, with no assignment rows."
96
+ }
97
+ ],
98
+ "description": "Level of the role: global, every user, a scope kind or a rights container."
99
+ },
100
+ "fullAccess": {
101
+ "default": false,
102
+ "description": "Bypass the rights checks on the objects of the role level; not on a container role or every user.",
103
+ "type": "boolean"
104
+ },
105
+ "order": {
106
+ "description": "Position of the role in the rights matrix.",
107
+ "type": "integer",
108
+ "minimum": 0,
109
+ "maximum": 9007199254740991
110
+ },
111
+ "assignable": {
112
+ "default": true,
113
+ "description": "Whether administrators assign the role; an owner role is handed over by its own command.",
114
+ "type": "boolean"
115
+ },
116
+ "maxHolders": {
117
+ "description": "Most holders of the role on one level value.",
118
+ "type": "integer",
119
+ "exclusiveMinimum": 0,
120
+ "maximum": 9007199254740991
121
+ },
122
+ "rootCreator": {
123
+ "default": false,
124
+ "description": "Scope level only: the command that creates a scope root assigns this role to its creator.",
125
+ "type": "boolean"
126
+ },
127
+ "sourceKeys": {
128
+ "default": [],
129
+ "description": "Keys that name this role in adopted assignment sources.",
130
+ "type": "array",
131
+ "items": {
132
+ "type": "object",
133
+ "properties": {
134
+ "source": {
135
+ "type": "string",
136
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
137
+ "description": "Name of a project assignment source of the same level."
138
+ },
139
+ "key": {
140
+ "type": "string",
141
+ "minLength": 1,
142
+ "description": "Role key in the role column of the source."
143
+ }
144
+ },
145
+ "required": [
146
+ "source",
147
+ "key"
148
+ ],
149
+ "additionalProperties": false
150
+ }
151
+ },
152
+ "include": {
153
+ "default": [],
154
+ "description": "Rights sets whose grants this declaration includes.",
155
+ "type": "array",
156
+ "items": {
157
+ "type": "object",
158
+ "properties": {
159
+ "kind": {
160
+ "type": "string",
161
+ "enum": [
162
+ "Catalog",
163
+ "Document",
164
+ "Enumeration",
165
+ "InformationRegister",
166
+ "AccumulationRegister",
167
+ "Constant",
168
+ "CustomTable",
169
+ "PgEnum",
170
+ "EventSubscription",
171
+ "RightsSet",
172
+ "Role"
173
+ ],
174
+ "description": "Kind of the referenced metadata object."
175
+ },
176
+ "name": {
177
+ "type": "string",
178
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
179
+ "description": "Logical name of the referenced object."
180
+ }
181
+ },
182
+ "required": [
183
+ "kind",
184
+ "name"
185
+ ],
186
+ "additionalProperties": false,
187
+ "description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
188
+ }
189
+ },
190
+ "grants": {
191
+ "default": [],
192
+ "description": "Grants of the role; deny entries remove from what the grants and the included sets give.",
193
+ "type": "array",
194
+ "items": {
195
+ "anyOf": [
196
+ {
197
+ "type": "object",
198
+ "properties": {
199
+ "grantAll": {
200
+ "type": "object",
201
+ "properties": {
202
+ "extent": {
203
+ "anyOf": [
204
+ {
205
+ "type": "string",
206
+ "const": "any"
207
+ },
208
+ {
209
+ "type": "string",
210
+ "const": "own"
211
+ },
212
+ {
213
+ "type": "object",
214
+ "properties": {
215
+ "dimension": {
216
+ "type": "string",
217
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
218
+ "description": "Name of a project access dimension."
219
+ }
220
+ },
221
+ "required": [
222
+ "dimension"
223
+ ],
224
+ "additionalProperties": false
225
+ }
226
+ ],
227
+ "description": "Rows the grant opens: any row, own rows, or rows with a value of an access dimension of the user."
228
+ }
229
+ },
230
+ "required": [
231
+ "extent"
232
+ ],
233
+ "additionalProperties": false,
234
+ "description": "Grant every action the role level allows on every object of the level that supports the extent."
235
+ }
236
+ },
237
+ "required": [
238
+ "grantAll"
239
+ ],
240
+ "additionalProperties": false
241
+ },
242
+ {
243
+ "type": "object",
244
+ "properties": {
245
+ "grant": {
246
+ "type": "object",
247
+ "properties": {
248
+ "objects": {
249
+ "anyOf": [
250
+ {
251
+ "minItems": 1,
252
+ "type": "array",
253
+ "items": {
254
+ "type": "object",
255
+ "properties": {
256
+ "kind": {
257
+ "type": "string",
258
+ "enum": [
259
+ "Catalog",
260
+ "Document",
261
+ "Enumeration",
262
+ "InformationRegister",
263
+ "AccumulationRegister",
264
+ "Constant",
265
+ "CustomTable",
266
+ "PgEnum",
267
+ "EventSubscription",
268
+ "RightsSet",
269
+ "Role"
270
+ ],
271
+ "description": "Kind of the referenced metadata object."
272
+ },
273
+ "name": {
274
+ "type": "string",
275
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
276
+ "description": "Logical name of the referenced object."
277
+ }
278
+ },
279
+ "required": [
280
+ "kind",
281
+ "name"
282
+ ],
283
+ "additionalProperties": false,
284
+ "description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
285
+ }
286
+ },
287
+ {
288
+ "type": "object",
289
+ "properties": {
290
+ "withAction": {
291
+ "type": "string",
292
+ "enum": [
293
+ "read",
294
+ "create",
295
+ "update",
296
+ "markDeletion",
297
+ "delete",
298
+ "post",
299
+ "unpost",
300
+ "write"
301
+ ],
302
+ "description": "Standard action word; selects every object of the role level that has it."
303
+ }
304
+ },
305
+ "required": [
306
+ "withAction"
307
+ ],
308
+ "additionalProperties": false
309
+ }
310
+ ],
311
+ "description": "Objects of the grant: a list, or every object of the role level with an action."
312
+ },
313
+ "actions": {
314
+ "minItems": 1,
315
+ "type": "array",
316
+ "items": {
317
+ "type": "string",
318
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
319
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
320
+ },
321
+ "description": "Standard action words, or names of custom actions of the single object of the grant."
322
+ },
323
+ "extent": {
324
+ "anyOf": [
325
+ {
326
+ "type": "string",
327
+ "const": "any"
328
+ },
329
+ {
330
+ "type": "string",
331
+ "const": "own"
332
+ },
333
+ {
334
+ "type": "object",
335
+ "properties": {
336
+ "dimension": {
337
+ "type": "string",
338
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
339
+ "description": "Name of a project access dimension."
340
+ }
341
+ },
342
+ "required": [
343
+ "dimension"
344
+ ],
345
+ "additionalProperties": false
346
+ }
347
+ ],
348
+ "description": "Rows the grant opens: any row, own rows, or rows with a value of an access dimension of the user."
349
+ }
350
+ },
351
+ "required": [
352
+ "objects",
353
+ "actions",
354
+ "extent"
355
+ ],
356
+ "additionalProperties": false,
357
+ "description": "Grant the actions on the objects within the extent."
358
+ }
359
+ },
360
+ "required": [
361
+ "grant"
362
+ ],
363
+ "additionalProperties": false
364
+ },
365
+ {
366
+ "type": "object",
367
+ "properties": {
368
+ "deny": {
369
+ "type": "object",
370
+ "properties": {
371
+ "objects": {
372
+ "anyOf": [
373
+ {
374
+ "minItems": 1,
375
+ "type": "array",
376
+ "items": {
377
+ "type": "object",
378
+ "properties": {
379
+ "kind": {
380
+ "type": "string",
381
+ "enum": [
382
+ "Catalog",
383
+ "Document",
384
+ "Enumeration",
385
+ "InformationRegister",
386
+ "AccumulationRegister",
387
+ "Constant",
388
+ "CustomTable",
389
+ "PgEnum",
390
+ "EventSubscription",
391
+ "RightsSet",
392
+ "Role"
393
+ ],
394
+ "description": "Kind of the referenced metadata object."
395
+ },
396
+ "name": {
397
+ "type": "string",
398
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
399
+ "description": "Logical name of the referenced object."
400
+ }
401
+ },
402
+ "required": [
403
+ "kind",
404
+ "name"
405
+ ],
406
+ "additionalProperties": false,
407
+ "description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
408
+ }
409
+ },
410
+ {
411
+ "type": "object",
412
+ "properties": {
413
+ "withAction": {
414
+ "type": "string",
415
+ "enum": [
416
+ "read",
417
+ "create",
418
+ "update",
419
+ "markDeletion",
420
+ "delete",
421
+ "post",
422
+ "unpost",
423
+ "write"
424
+ ],
425
+ "description": "Standard action word; selects every object of the role level that has it."
426
+ }
427
+ },
428
+ "required": [
429
+ "withAction"
430
+ ],
431
+ "additionalProperties": false
432
+ }
433
+ ],
434
+ "description": "Objects of the grant: a list, or every object of the role level with an action."
435
+ },
436
+ "actions": {
437
+ "minItems": 1,
438
+ "type": "array",
439
+ "items": {
440
+ "type": "string",
441
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
442
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
443
+ },
444
+ "description": "Standard action words, or names of custom actions of the single object of the grant."
445
+ },
446
+ "extent": {
447
+ "description": "Extent to remove; every extent of the actions when omitted.",
448
+ "anyOf": [
449
+ {
450
+ "type": "string",
451
+ "const": "any"
452
+ },
453
+ {
454
+ "type": "string",
455
+ "const": "own"
456
+ },
457
+ {
458
+ "type": "object",
459
+ "properties": {
460
+ "dimension": {
461
+ "type": "string",
462
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
463
+ "description": "Name of a project access dimension."
464
+ }
465
+ },
466
+ "required": [
467
+ "dimension"
468
+ ],
469
+ "additionalProperties": false
470
+ }
471
+ ]
472
+ }
473
+ },
474
+ "required": [
475
+ "objects",
476
+ "actions"
477
+ ],
478
+ "additionalProperties": false,
479
+ "description": "Remove the actions from what the grants of the role and its sets give."
480
+ }
481
+ },
482
+ "required": [
483
+ "deny"
484
+ ],
485
+ "additionalProperties": false
486
+ }
487
+ ]
488
+ }
489
+ }
490
+ },
491
+ "required": [
492
+ "name",
493
+ "kind",
494
+ "assignedOn"
495
+ ],
496
+ "additionalProperties": false,
497
+ "$id": "roles.schema.json"
498
+ }
@@ -0,0 +1,23 @@
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
+ "units": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "string"
13
+ },
14
+ "description": "Identities of verbatim SQL units accepted as debt (outside the closed function shell), sorted and without duplicates. Written by introspect; fix only removes entries."
15
+ }
16
+ },
17
+ "required": [
18
+ "units"
19
+ ],
20
+ "additionalProperties": false,
21
+ "description": "Debt ratchet of verbatim SQL: a debt unit missing from this list is an error.",
22
+ "$id": "sql-debt.schema.json"
23
+ }