simetra 0.2.0 → 0.3.0-next.10

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.
Files changed (35) hide show
  1. package/dist/channel-grant-BATD6oQu.js +15 -0
  2. package/dist/compiler/index.d.ts +732 -85
  3. package/dist/compiler/index.js +26488 -13752
  4. package/dist/data/centrifugo/index.d.ts +24 -0
  5. package/dist/data/centrifugo/index.js +173 -0
  6. package/dist/data/index.d.ts +27 -0
  7. package/dist/data/index.js +10115 -0
  8. package/dist/data/react/index.d.ts +103 -0
  9. package/dist/data/react/index.js +214 -0
  10. package/dist/grant-Zg0hmqK7.d.ts +11 -0
  11. package/dist/handle-C6PFsnUX.js +44 -0
  12. package/dist/holder-CkR-qRYU.d.ts +585 -0
  13. package/dist/model/index.d.ts +4396 -400
  14. package/dist/model/index.js +4425 -380
  15. package/dist/schema/index.d.ts +1545 -572
  16. package/dist/schema/index.js +8554 -4215
  17. package/dist/server/index.d.ts +710 -21
  18. package/dist/server/index.js +4663 -483
  19. package/dist/server/signals/index.d.ts +92 -0
  20. package/dist/server/signals/index.js +140 -0
  21. package/dist/shell/index.d.ts +112 -0
  22. package/dist/shell/index.js +159 -0
  23. package/dist/ui/index.d.ts +213 -0
  24. package/dist/ui/index.js +1098 -0
  25. package/package.json +75 -3
  26. package/schemas/accumulation-registers.schema.json +46 -5
  27. package/schemas/catalogs.schema.json +113 -33
  28. package/schemas/constants.schema.json +31 -5
  29. package/schemas/custom-tables.schema.json +24 -0
  30. package/schemas/documents.schema.json +86 -31
  31. package/schemas/functions.schema.json +129 -0
  32. package/schemas/information-registers.schema.json +47 -5
  33. package/schemas/project.schema.json +206 -1
  34. package/schemas/rights-sets.schema.json +19 -1
  35. package/schemas/roles.schema.json +23 -2
@@ -0,0 +1,129 @@
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
+ "functions": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "object",
13
+ "properties": {
14
+ "id": {
15
+ "type": "string",
16
+ "format": "uuid",
17
+ "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})$",
18
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
19
+ },
20
+ "function": {
21
+ "type": "object",
22
+ "properties": {
23
+ "schema": {
24
+ "description": "PostgreSQL schema of the function; defaultSchema when absent.",
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "name": {
29
+ "type": "string",
30
+ "minLength": 1,
31
+ "description": "Name of the function in its CREATE FUNCTION statement."
32
+ }
33
+ },
34
+ "required": [
35
+ "name"
36
+ ],
37
+ "additionalProperties": false,
38
+ "description": "SQL function of the sibling .sql file."
39
+ },
40
+ "callers": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string",
44
+ "enum": [
45
+ "user",
46
+ "anonymous",
47
+ "service",
48
+ "command"
49
+ ]
50
+ },
51
+ "description": "Role purposes that get EXECUTE on the function; empty — no application role, only other functions of the owner call it."
52
+ },
53
+ "check": {
54
+ "type": "object",
55
+ "properties": {
56
+ "action": {
57
+ "type": "string",
58
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
59
+ "description": "A word of the action vocabulary or the name of a custom action of the object."
60
+ },
61
+ "object": {
62
+ "type": "object",
63
+ "properties": {
64
+ "kind": {
65
+ "type": "string",
66
+ "enum": [
67
+ "Catalog",
68
+ "Document",
69
+ "Enumeration",
70
+ "InformationRegister",
71
+ "AccumulationRegister",
72
+ "Constant",
73
+ "CustomTable",
74
+ "PgEnum",
75
+ "EventSubscription",
76
+ "RightsSet",
77
+ "Role"
78
+ ],
79
+ "description": "Kind of the referenced metadata object."
80
+ },
81
+ "name": {
82
+ "type": "string",
83
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
84
+ "description": "Logical name of the referenced object."
85
+ }
86
+ },
87
+ "required": [
88
+ "kind",
89
+ "name"
90
+ ],
91
+ "additionalProperties": false,
92
+ "description": "Metadata object whose rights contract is checked."
93
+ },
94
+ "row": {
95
+ "description": "Name of the uuid IN parameter that holds the primary key of the checked row.",
96
+ "type": "string",
97
+ "minLength": 1
98
+ },
99
+ "scope": {
100
+ "description": "Name of the uuid IN parameter that holds the scope value of the check.",
101
+ "type": "string",
102
+ "minLength": 1
103
+ }
104
+ },
105
+ "required": [
106
+ "action",
107
+ "object"
108
+ ],
109
+ "additionalProperties": false,
110
+ "description": "Rights check the function applies before it acts on behalf of the caller."
111
+ }
112
+ },
113
+ "required": [
114
+ "function",
115
+ "callers"
116
+ ],
117
+ "additionalProperties": false,
118
+ "description": "Declaration of one function of the sibling .sql file."
119
+ },
120
+ "description": "Declarations of functions of the sibling .sql file, sorted by function (entries without schema first, then by schema and name) and without duplicates."
121
+ }
122
+ },
123
+ "required": [
124
+ "functions"
125
+ ],
126
+ "additionalProperties": false,
127
+ "description": "Declarations of SQL functions: who may execute them and which rights check they apply.",
128
+ "$id": "functions.schema.json"
129
+ }
@@ -130,11 +130,36 @@
130
130
  }
131
131
  },
132
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"
133
+ "description": "API role that may read the object: authenticated users or anonymous visitors. A string opens every row; an object { role, published: true } opens only rows marked published. Absent means no public read.",
134
+ "anyOf": [
135
+ {
136
+ "type": "string",
137
+ "enum": [
138
+ "authenticated",
139
+ "anon"
140
+ ]
141
+ },
142
+ {
143
+ "type": "object",
144
+ "properties": {
145
+ "role": {
146
+ "type": "string",
147
+ "enum": [
148
+ "authenticated",
149
+ "anon"
150
+ ]
151
+ },
152
+ "published": {
153
+ "type": "boolean",
154
+ "const": true
155
+ }
156
+ },
157
+ "required": [
158
+ "role",
159
+ "published"
160
+ ],
161
+ "additionalProperties": false
162
+ }
138
163
  ]
139
164
  },
140
165
  "customActions": {
@@ -376,6 +401,7 @@
376
401
  "DateTime",
377
402
  "Bytes",
378
403
  "Json",
404
+ "RichText",
379
405
  "Ref"
380
406
  ],
381
407
  "description": "Logical value type."
@@ -669,6 +695,7 @@
669
695
  "DateTime",
670
696
  "Bytes",
671
697
  "Json",
698
+ "RichText",
672
699
  "Ref"
673
700
  ],
674
701
  "description": "Logical value type."
@@ -962,6 +989,7 @@
962
989
  "DateTime",
963
990
  "Bytes",
964
991
  "Json",
992
+ "RichText",
965
993
  "Ref"
966
994
  ],
967
995
  "description": "Logical value type."
@@ -1183,6 +1211,20 @@
1183
1211
  "description": "Marks the attribute as personal data: anonymization sets its columns to NULL, so it cannot be required.",
1184
1212
  "type": "boolean",
1185
1213
  "const": true
1214
+ },
1215
+ "load": {
1216
+ "description": "Whether list reads omit the attribute (\"lazy\"; a card read returns it); default lazy for Bytes and RichText of the header, eager otherwise. Not allowed on a polymorphic Ref, a tabular section attribute, a register attribute or a rights carrier.",
1217
+ "type": "string",
1218
+ "enum": [
1219
+ "eager",
1220
+ "lazy"
1221
+ ]
1222
+ },
1223
+ "maxBytes": {
1224
+ "description": "Most UTF-8 bytes of the JSON wire value a command may write; Text, Json, RichText, Bytes or an array only (the whole array counts). Default 1 MiB for Json, RichText and Bytes, 64 KiB for Text and arrays. Not allowed on a register attribute.",
1225
+ "type": "integer",
1226
+ "exclusiveMinimum": 0,
1227
+ "maximum": 9007199254740991
1186
1228
  }
1187
1229
  },
1188
1230
  "required": [
@@ -34,6 +34,11 @@
34
34
  "en"
35
35
  ]
36
36
  },
37
+ "primaryDataLanguage": {
38
+ "description": "Primary data language: code of the primary row of the languages catalog. Assigned once.",
39
+ "type": "string",
40
+ "pattern": "^[a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|[0-9]{3}))?$"
41
+ },
37
42
  "defaultSchema": {
38
43
  "default": "public",
39
44
  "description": "PostgreSQL schema for objects that declare none.",
@@ -45,7 +50,8 @@
45
50
  "provider": {
46
51
  "type": "string",
47
52
  "enum": [
48
- "supabase"
53
+ "supabase",
54
+ "postgres"
49
55
  ],
50
56
  "description": "Database provider preset that defines the management boundary."
51
57
  }
@@ -81,6 +87,205 @@
81
87
  "type": "string",
82
88
  "minLength": 1
83
89
  },
90
+ "selfSignUp": {
91
+ "description": "Whether users may register themselves; enables the self sign-up warning and host start check.",
92
+ "type": "boolean"
93
+ },
94
+ "invitations": {
95
+ "description": "Invitations to scope kinds with a membership catalog and system role assignments; absent — no invitations.",
96
+ "type": "object",
97
+ "properties": {
98
+ "expiresInHours": {
99
+ "type": "integer",
100
+ "minimum": 1,
101
+ "maximum": 8760,
102
+ "description": "Hours an invitation secret stays valid after it is issued, 1 to 8760."
103
+ }
104
+ },
105
+ "required": [
106
+ "expiresInHours"
107
+ ],
108
+ "additionalProperties": false
109
+ },
110
+ "selfSignUpAccepted": {
111
+ "description": "What the self sign-up warning no longer reports: it names only objects and grants open to anyone that are not listed here.",
112
+ "type": "object",
113
+ "properties": {
114
+ "objects": {
115
+ "default": [],
116
+ "description": "Objects accepted as open to every signed-in user (publicRead authenticated).",
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "properties": {
121
+ "object": {
122
+ "type": "object",
123
+ "properties": {
124
+ "kind": {
125
+ "type": "string",
126
+ "enum": [
127
+ "Catalog",
128
+ "Document",
129
+ "Enumeration",
130
+ "InformationRegister",
131
+ "AccumulationRegister",
132
+ "Constant",
133
+ "CustomTable",
134
+ "PgEnum",
135
+ "EventSubscription",
136
+ "RightsSet",
137
+ "Role"
138
+ ],
139
+ "description": "Kind of the referenced metadata object."
140
+ },
141
+ "name": {
142
+ "type": "string",
143
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
144
+ "description": "Logical name of the referenced object."
145
+ }
146
+ },
147
+ "required": [
148
+ "kind",
149
+ "name"
150
+ ],
151
+ "additionalProperties": false,
152
+ "description": "Object with publicRead authenticated accepted as open to anyone."
153
+ },
154
+ "published": {
155
+ "description": "Accept only the published rows (the conditional publicRead); without it every row is accepted.",
156
+ "type": "boolean",
157
+ "const": true
158
+ }
159
+ },
160
+ "required": [
161
+ "object"
162
+ ],
163
+ "additionalProperties": false
164
+ }
165
+ },
166
+ "grants": {
167
+ "default": [],
168
+ "description": "Grants of everyUser roles accepted as open to anyone.",
169
+ "type": "array",
170
+ "items": {
171
+ "type": "object",
172
+ "properties": {
173
+ "role": {
174
+ "type": "object",
175
+ "properties": {
176
+ "kind": {
177
+ "type": "string",
178
+ "enum": [
179
+ "Catalog",
180
+ "Document",
181
+ "Enumeration",
182
+ "InformationRegister",
183
+ "AccumulationRegister",
184
+ "Constant",
185
+ "CustomTable",
186
+ "PgEnum",
187
+ "EventSubscription",
188
+ "RightsSet",
189
+ "Role"
190
+ ],
191
+ "description": "Kind of the referenced metadata object."
192
+ },
193
+ "name": {
194
+ "type": "string",
195
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
196
+ "description": "Logical name of the referenced object."
197
+ }
198
+ },
199
+ "required": [
200
+ "kind",
201
+ "name"
202
+ ],
203
+ "additionalProperties": false,
204
+ "description": "Role of the everyUser level."
205
+ },
206
+ "object": {
207
+ "type": "object",
208
+ "properties": {
209
+ "kind": {
210
+ "type": "string",
211
+ "enum": [
212
+ "Catalog",
213
+ "Document",
214
+ "Enumeration",
215
+ "InformationRegister",
216
+ "AccumulationRegister",
217
+ "Constant",
218
+ "CustomTable",
219
+ "PgEnum",
220
+ "EventSubscription",
221
+ "RightsSet",
222
+ "Role"
223
+ ],
224
+ "description": "Kind of the referenced metadata object."
225
+ },
226
+ "name": {
227
+ "type": "string",
228
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
229
+ "description": "Logical name of the referenced object."
230
+ }
231
+ },
232
+ "required": [
233
+ "kind",
234
+ "name"
235
+ ],
236
+ "additionalProperties": false,
237
+ "description": "Object of the grant."
238
+ },
239
+ "actions": {
240
+ "minItems": 1,
241
+ "type": "array",
242
+ "items": {
243
+ "type": "string",
244
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
245
+ "description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
246
+ },
247
+ "description": "Accepted actions: standard words or custom action names."
248
+ },
249
+ "extent": {
250
+ "anyOf": [
251
+ {
252
+ "type": "string",
253
+ "const": "any"
254
+ },
255
+ {
256
+ "type": "string",
257
+ "const": "own"
258
+ },
259
+ {
260
+ "type": "object",
261
+ "properties": {
262
+ "dimension": {
263
+ "type": "string",
264
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
265
+ "description": "Name of a project access dimension."
266
+ }
267
+ },
268
+ "required": [
269
+ "dimension"
270
+ ],
271
+ "additionalProperties": false
272
+ }
273
+ ],
274
+ "description": "Rows the grant opens: any row, own rows, or rows with a value of an access dimension of the user."
275
+ }
276
+ },
277
+ "required": [
278
+ "role",
279
+ "object",
280
+ "actions",
281
+ "extent"
282
+ ],
283
+ "additionalProperties": false
284
+ }
285
+ }
286
+ },
287
+ "additionalProperties": false
288
+ },
84
289
  "scopeKinds": {
85
290
  "default": [],
86
291
  "description": "Scope kinds of the application; leave empty for a single-tenant application.",
@@ -17,6 +17,21 @@
17
17
  "pattern": "^[A-Z][A-Za-z0-9]*$",
18
18
  "description": "Logical object name in PascalCase."
19
19
  },
20
+ "title": {
21
+ "description": "Human-readable title of the object.",
22
+ "type": "object",
23
+ "properties": {
24
+ "uk": {
25
+ "description": "Ukrainian text.",
26
+ "type": "string"
27
+ },
28
+ "en": {
29
+ "description": "English text.",
30
+ "type": "string"
31
+ }
32
+ },
33
+ "additionalProperties": false
34
+ },
20
35
  "kind": {
21
36
  "type": "string",
22
37
  "const": "RightsSet",
@@ -170,7 +185,10 @@
170
185
  "delete",
171
186
  "post",
172
187
  "unpost",
173
- "write"
188
+ "write",
189
+ "publish",
190
+ "unpublish",
191
+ "acceptInvitation"
174
192
  ],
175
193
  "description": "Standard action word; selects every object of the role level that has it."
176
194
  }
@@ -17,6 +17,21 @@
17
17
  "pattern": "^[A-Z][A-Za-z0-9]*$",
18
18
  "description": "Logical object name in PascalCase."
19
19
  },
20
+ "title": {
21
+ "description": "Human-readable title of the object.",
22
+ "type": "object",
23
+ "properties": {
24
+ "uk": {
25
+ "description": "Ukrainian text.",
26
+ "type": "string"
27
+ },
28
+ "en": {
29
+ "description": "English text.",
30
+ "type": "string"
31
+ }
32
+ },
33
+ "additionalProperties": false
34
+ },
20
35
  "kind": {
21
36
  "type": "string",
22
37
  "const": "Role",
@@ -297,7 +312,10 @@
297
312
  "delete",
298
313
  "post",
299
314
  "unpost",
300
- "write"
315
+ "write",
316
+ "publish",
317
+ "unpublish",
318
+ "acceptInvitation"
301
319
  ],
302
320
  "description": "Standard action word; selects every object of the role level that has it."
303
321
  }
@@ -420,7 +438,10 @@
420
438
  "delete",
421
439
  "post",
422
440
  "unpost",
423
- "write"
441
+ "write",
442
+ "publish",
443
+ "unpublish",
444
+ "acceptInvitation"
424
445
  ],
425
446
  "description": "Standard action word; selects every object of the role level that has it."
426
447
  }