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,121 @@
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": "Enumeration",
66
+ "description": "Metadata kind; always Enumeration."
67
+ },
68
+ "values": {
69
+ "default": [],
70
+ "description": "Enumeration values; array order is the value order.",
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "properties": {
75
+ "id": {
76
+ "type": "string",
77
+ "format": "uuid",
78
+ "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})$",
79
+ "description": "Stable lowercase UUID v4 identity of the element. Assigned by tooling at creation and never reused; a rename keeps it."
80
+ },
81
+ "name": {
82
+ "type": "string",
83
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
84
+ "description": "Logical name of the enumeration value."
85
+ },
86
+ "physicalName": {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "description": "Physical database name. Assigned once at creation and never changed, so a rename emits no DDL. At most 63 bytes in UTF-8."
90
+ },
91
+ "title": {
92
+ "description": "Human-readable title of the value.",
93
+ "type": "object",
94
+ "properties": {
95
+ "uk": {
96
+ "description": "Ukrainian text.",
97
+ "type": "string"
98
+ },
99
+ "en": {
100
+ "description": "English text.",
101
+ "type": "string"
102
+ }
103
+ },
104
+ "additionalProperties": false
105
+ }
106
+ },
107
+ "required": [
108
+ "name"
109
+ ],
110
+ "additionalProperties": false,
111
+ "description": "One value of an enumeration."
112
+ }
113
+ }
114
+ },
115
+ "required": [
116
+ "name",
117
+ "kind"
118
+ ],
119
+ "additionalProperties": false,
120
+ "$id": "enumerations.schema.json"
121
+ }
@@ -0,0 +1,165 @@
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
+ "title": {
26
+ "description": "Human-readable title of the object.",
27
+ "type": "object",
28
+ "properties": {
29
+ "uk": {
30
+ "description": "Ukrainian text.",
31
+ "type": "string"
32
+ },
33
+ "en": {
34
+ "description": "English text.",
35
+ "type": "string"
36
+ }
37
+ },
38
+ "additionalProperties": false
39
+ },
40
+ "description": {
41
+ "description": "Description of the object.",
42
+ "type": "object",
43
+ "properties": {
44
+ "uk": {
45
+ "description": "Ukrainian text.",
46
+ "type": "string"
47
+ },
48
+ "en": {
49
+ "description": "English text.",
50
+ "type": "string"
51
+ }
52
+ },
53
+ "additionalProperties": false
54
+ },
55
+ "kind": {
56
+ "type": "string",
57
+ "const": "EventSubscription",
58
+ "description": "Metadata kind; always EventSubscription."
59
+ },
60
+ "sources": {
61
+ "minItems": 1,
62
+ "type": "array",
63
+ "items": {
64
+ "anyOf": [
65
+ {
66
+ "type": "object",
67
+ "properties": {
68
+ "kind": {
69
+ "type": "string",
70
+ "enum": [
71
+ "Catalog",
72
+ "Document",
73
+ "Enumeration",
74
+ "InformationRegister",
75
+ "AccumulationRegister",
76
+ "Constant",
77
+ "CustomTable",
78
+ "PgEnum",
79
+ "EventSubscription",
80
+ "RightsSet",
81
+ "Role"
82
+ ],
83
+ "description": "Kind of the referenced metadata object."
84
+ },
85
+ "name": {
86
+ "type": "string",
87
+ "pattern": "^[A-Z][A-Za-z0-9]*$",
88
+ "description": "Logical name of the referenced object."
89
+ }
90
+ },
91
+ "required": [
92
+ "kind",
93
+ "name"
94
+ ],
95
+ "additionalProperties": false,
96
+ "description": "Reference to a metadata object by kind and logical name; the compiler resolves it to an id."
97
+ },
98
+ {
99
+ "type": "object",
100
+ "properties": {
101
+ "providerTable": {
102
+ "type": "string",
103
+ "pattern": "^[^.\\s]+\\.[^.\\s]+$",
104
+ "description": "Provider table as <schema>.<table>; it must be in the provider event source preset."
105
+ }
106
+ },
107
+ "required": [
108
+ "providerTable"
109
+ ],
110
+ "additionalProperties": false,
111
+ "description": "A table of the database provider as the source."
112
+ }
113
+ ]
114
+ },
115
+ "description": "Tables whose rows raise the event: application objects with a table or provider tables from the preset."
116
+ },
117
+ "event": {
118
+ "type": "string",
119
+ "enum": [
120
+ "beforeWrite",
121
+ "onWrite",
122
+ "beforeDelete",
123
+ "onDelete"
124
+ ],
125
+ "description": "Row event the handler reacts to, before or after it."
126
+ },
127
+ "whenChanged": {
128
+ "description": "Write events only: fire only when one of these attributes changes; logical names in every object source, preset columns for a provider table.",
129
+ "minItems": 1,
130
+ "type": "array",
131
+ "items": {
132
+ "type": "string",
133
+ "minLength": 1
134
+ }
135
+ },
136
+ "handler": {
137
+ "type": "object",
138
+ "properties": {
139
+ "schema": {
140
+ "description": "PostgreSQL schema of the handler; the project defaultSchema applies when absent.",
141
+ "type": "string"
142
+ },
143
+ "name": {
144
+ "type": "string",
145
+ "minLength": 1,
146
+ "description": "Name of a function without arguments that returns trigger, declared in the .sql files."
147
+ }
148
+ },
149
+ "required": [
150
+ "name"
151
+ ],
152
+ "additionalProperties": false,
153
+ "description": "Trigger function called for the event."
154
+ }
155
+ },
156
+ "required": [
157
+ "name",
158
+ "kind",
159
+ "sources",
160
+ "event",
161
+ "handler"
162
+ ],
163
+ "additionalProperties": false,
164
+ "$id": "event-subscriptions.schema.json"
165
+ }