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.
- package/LICENSE +190 -0
- package/README.md +39 -2
- package/dist/compiler/index.d.ts +1896 -0
- package/dist/compiler/index.js +24104 -0
- package/dist/model/index.d.ts +4462 -0
- package/dist/model/index.js +3951 -0
- package/dist/schema/index.d.ts +2872 -0
- package/dist/schema/index.js +10706 -0
- package/package.json +75 -3
- package/schemas/accumulation-registers.schema.json +996 -0
- package/schemas/catalogs.schema.json +1274 -0
- package/schemas/constants.schema.json +327 -0
- package/schemas/custom-tables.schema.json +809 -0
- package/schemas/documents.schema.json +1285 -0
- package/schemas/enumerations.schema.json +121 -0
- package/schemas/event-subscriptions.schema.json +165 -0
- package/schemas/information-registers.schema.json +1202 -0
- package/schemas/pg-enums.schema.json +81 -0
- package/schemas/project.schema.json +693 -0
- package/schemas/rights-sets.schema.json +248 -0
- package/schemas/roles.schema.json +498 -0
- package/schemas/sql-debt.schema.json +23 -0
|
@@ -0,0 +1,327 @@
|
|
|
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": "Constant",
|
|
66
|
+
"description": "Metadata kind; always Constant."
|
|
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
|
+
"publicRead": {
|
|
74
|
+
"description": "API role that may read every row of the object: authenticated users or anonymous visitors. Absent means no public read.",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"enum": [
|
|
77
|
+
"authenticated",
|
|
78
|
+
"anon"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"customActions": {
|
|
82
|
+
"default": [],
|
|
83
|
+
"description": "Custom actions of the object beyond the standard actions of its kind.",
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"id": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"format": "uuid",
|
|
91
|
+
"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})$",
|
|
92
|
+
"description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
|
|
93
|
+
},
|
|
94
|
+
"name": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
97
|
+
"description": "Logical name of the custom action, camelCase like the standard action words; must not repeat a standard action of the kind."
|
|
98
|
+
},
|
|
99
|
+
"requires": {
|
|
100
|
+
"default": [],
|
|
101
|
+
"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.",
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
106
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"effects": {
|
|
110
|
+
"default": {},
|
|
111
|
+
"description": "What the action writes itself; an action that writes anything is an update.",
|
|
112
|
+
"type": "object",
|
|
113
|
+
"properties": {
|
|
114
|
+
"header": {
|
|
115
|
+
"description": "Header columns the action writes: all, or logical names of attributes and standard attributes of the object.",
|
|
116
|
+
"anyOf": [
|
|
117
|
+
{
|
|
118
|
+
"type": "string",
|
|
119
|
+
"const": "all"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*$",
|
|
126
|
+
"description": "Logical element name (attribute, section, column). The casing style is checked against the project naming setting."
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"tabularSections": {
|
|
132
|
+
"description": "Whether the action writes the tabular section rows.",
|
|
133
|
+
"type": "boolean"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"additionalProperties": false
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"required": [
|
|
140
|
+
"name"
|
|
141
|
+
],
|
|
142
|
+
"additionalProperties": false
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"type": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"enum": [
|
|
148
|
+
"UUID",
|
|
149
|
+
"String",
|
|
150
|
+
"Text",
|
|
151
|
+
"Integer",
|
|
152
|
+
"SmallInt",
|
|
153
|
+
"BigInt",
|
|
154
|
+
"Numeric",
|
|
155
|
+
"Boolean",
|
|
156
|
+
"Date",
|
|
157
|
+
"DateTime",
|
|
158
|
+
"Bytes",
|
|
159
|
+
"Json",
|
|
160
|
+
"Ref"
|
|
161
|
+
],
|
|
162
|
+
"description": "Logical value type."
|
|
163
|
+
},
|
|
164
|
+
"length": {
|
|
165
|
+
"description": "Maximum length; required for String and allowed only there.",
|
|
166
|
+
"type": "integer",
|
|
167
|
+
"exclusiveMinimum": 0,
|
|
168
|
+
"maximum": 9007199254740991
|
|
169
|
+
},
|
|
170
|
+
"precision": {
|
|
171
|
+
"description": "Total number of digits; allowed only for Numeric.",
|
|
172
|
+
"type": "integer",
|
|
173
|
+
"exclusiveMinimum": 0,
|
|
174
|
+
"maximum": 9007199254740991
|
|
175
|
+
},
|
|
176
|
+
"scale": {
|
|
177
|
+
"description": "Digits after the decimal point; requires precision.",
|
|
178
|
+
"type": "integer",
|
|
179
|
+
"minimum": 0,
|
|
180
|
+
"maximum": 9007199254740991
|
|
181
|
+
},
|
|
182
|
+
"ref": {
|
|
183
|
+
"description": "Single reference target of a Ref value; mutually exclusive with allowedTypes.",
|
|
184
|
+
"type": "object",
|
|
185
|
+
"properties": {
|
|
186
|
+
"kind": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"enum": [
|
|
189
|
+
"Catalog",
|
|
190
|
+
"Document",
|
|
191
|
+
"Enumeration",
|
|
192
|
+
"InformationRegister",
|
|
193
|
+
"AccumulationRegister",
|
|
194
|
+
"Constant",
|
|
195
|
+
"CustomTable",
|
|
196
|
+
"PgEnum",
|
|
197
|
+
"EventSubscription",
|
|
198
|
+
"RightsSet",
|
|
199
|
+
"Role"
|
|
200
|
+
],
|
|
201
|
+
"description": "Kind of the referenced metadata object."
|
|
202
|
+
},
|
|
203
|
+
"name": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
206
|
+
"description": "Logical name of the referenced object."
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"required": [
|
|
210
|
+
"kind",
|
|
211
|
+
"name"
|
|
212
|
+
],
|
|
213
|
+
"additionalProperties": false
|
|
214
|
+
},
|
|
215
|
+
"allowedTypes": {
|
|
216
|
+
"description": "Polymorphic reference targets of a Ref value; mutually exclusive with ref.",
|
|
217
|
+
"minItems": 1,
|
|
218
|
+
"type": "array",
|
|
219
|
+
"items": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"properties": {
|
|
222
|
+
"kind": {
|
|
223
|
+
"type": "string",
|
|
224
|
+
"enum": [
|
|
225
|
+
"Catalog",
|
|
226
|
+
"Document",
|
|
227
|
+
"Enumeration",
|
|
228
|
+
"InformationRegister",
|
|
229
|
+
"AccumulationRegister",
|
|
230
|
+
"Constant",
|
|
231
|
+
"CustomTable",
|
|
232
|
+
"PgEnum",
|
|
233
|
+
"EventSubscription",
|
|
234
|
+
"RightsSet",
|
|
235
|
+
"Role"
|
|
236
|
+
],
|
|
237
|
+
"description": "Kind of the referenced metadata object."
|
|
238
|
+
},
|
|
239
|
+
"name": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"pattern": "^[A-Z][A-Za-z0-9]*$",
|
|
242
|
+
"description": "Logical name of the referenced object."
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"required": [
|
|
246
|
+
"kind",
|
|
247
|
+
"name"
|
|
248
|
+
],
|
|
249
|
+
"additionalProperties": false,
|
|
250
|
+
"description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"array": {
|
|
254
|
+
"description": "Whether the value is an array of the type.",
|
|
255
|
+
"type": "boolean"
|
|
256
|
+
},
|
|
257
|
+
"crossScope": {
|
|
258
|
+
"description": "Marks a deliberately cross-scope Ref: the FK has no scope part in its key.",
|
|
259
|
+
"type": "boolean",
|
|
260
|
+
"const": true
|
|
261
|
+
},
|
|
262
|
+
"defaultValue": {
|
|
263
|
+
"description": "Initial value of the constant.",
|
|
264
|
+
"anyOf": [
|
|
265
|
+
{
|
|
266
|
+
"type": "string"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"type": "number"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"type": "boolean"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"type": "object",
|
|
276
|
+
"properties": {
|
|
277
|
+
"fill": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"enum": [
|
|
280
|
+
"now",
|
|
281
|
+
"today",
|
|
282
|
+
"newUuid"
|
|
283
|
+
],
|
|
284
|
+
"description": "Fill expression computed by the database: now (DateTime), today (Date), newUuid (UUID)."
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"required": [
|
|
288
|
+
"fill"
|
|
289
|
+
],
|
|
290
|
+
"additionalProperties": false
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"type": "object",
|
|
294
|
+
"properties": {
|
|
295
|
+
"empty": {
|
|
296
|
+
"anyOf": [
|
|
297
|
+
{
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"const": true
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"type": "string",
|
|
303
|
+
"enum": [
|
|
304
|
+
"object",
|
|
305
|
+
"array"
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"description": "Empty value: true for an array of any type, object or array for a scalar Json."
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": [
|
|
313
|
+
"empty"
|
|
314
|
+
],
|
|
315
|
+
"additionalProperties": false
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"required": [
|
|
321
|
+
"name",
|
|
322
|
+
"kind",
|
|
323
|
+
"type"
|
|
324
|
+
],
|
|
325
|
+
"additionalProperties": false,
|
|
326
|
+
"$id": "constants.schema.json"
|
|
327
|
+
}
|