@objectstack/spec 1.0.10 → 1.0.12
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/README.md +41 -1
- package/dist/ai/index.d.mts +2 -1
- package/dist/ai/index.d.ts +2 -1
- package/dist/ai/index.js +2047 -1944
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/index.mjs +2047 -1944
- package/dist/ai/index.mjs.map +1 -1
- package/dist/api/index.d.mts +3 -1
- package/dist/api/index.d.ts +3 -1
- package/dist/api/index.js +2599 -2292
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +2587 -2292
- package/dist/api/index.mjs.map +1 -1
- package/dist/automation/index.d.mts +2 -1
- package/dist/automation/index.d.ts +2 -1
- package/dist/automation/index.js +83 -0
- package/dist/automation/index.js.map +1 -1
- package/dist/automation/index.mjs +77 -0
- package/dist/automation/index.mjs.map +1 -1
- package/dist/contracts/index.d.mts +3 -2
- package/dist/contracts/index.d.ts +3 -2
- package/dist/data/index.d.mts +3 -2
- package/dist/data/index.d.ts +3 -2
- package/dist/data/index.js +658 -556
- package/dist/data/index.js.map +1 -1
- package/dist/data/index.mjs +656 -556
- package/dist/data/index.mjs.map +1 -1
- package/dist/{driver.zod-lfi00zVT.d.ts → driver.zod-CfGk9GYh.d.ts} +2164 -11
- package/dist/{driver.zod-BOM_Etco.d.mts → driver.zod-y1cX6R3c.d.mts} +2164 -11
- package/dist/hub/index.d.mts +1 -1
- package/dist/hub/index.d.ts +1 -1
- package/dist/hub/index.js +789 -724
- package/dist/hub/index.js.map +1 -1
- package/dist/hub/index.mjs +789 -724
- package/dist/hub/index.mjs.map +1 -1
- package/dist/{index-C67cfwmW.d.ts → index-B0Hf65bV.d.ts} +13 -5
- package/dist/{index-DLcySG7U.d.ts → index-B5pKM0My.d.ts} +335 -4370
- package/dist/{index-Os7lItRe.d.mts → index-BA022mg2.d.ts} +6178 -129
- package/dist/{index-B5-VbOKg.d.mts → index-BGeLoH2z.d.ts} +4251 -74
- package/dist/{index-CH5zloR3.d.ts → index-BwO__aqV.d.ts} +1 -1
- package/dist/{index-Dp7GFJ8V.d.mts → index-Cia3JPQ8.d.mts} +13 -5
- package/dist/{index-D12rNohm.d.mts → index-CpD1q1FP.d.ts} +35 -18
- package/dist/{index-Os7lItRe.d.ts → index-D5RSFPuB.d.mts} +6178 -129
- package/dist/{index-CU4m6noq.d.mts → index-DGjpaj0X.d.mts} +1 -1
- package/dist/{index-D12rNohm.d.ts → index-Dfn5VXl6.d.mts} +35 -18
- package/dist/{index-l6WIlmOD.d.mts → index-Dgybxlky.d.mts} +177 -158
- package/dist/{index-l6WIlmOD.d.ts → index-Dgybxlky.d.ts} +177 -158
- package/dist/{index-DLcySG7U.d.mts → index-Dpsk8PF4.d.mts} +335 -4370
- package/dist/{index-CyognKSZ.d.ts → index-DrNah5E0.d.ts} +1952 -6990
- package/dist/{index-DE_lJ11p.d.mts → index-OO84R20k.d.mts} +1952 -6990
- package/dist/{index-B5-VbOKg.d.ts → index-upA3Xt04.d.mts} +4251 -74
- package/dist/index.d.mts +8072 -1922
- package/dist/index.d.ts +8072 -1922
- package/dist/index.js +8563 -8249
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8563 -8249
- package/dist/index.mjs.map +1 -1
- package/dist/integration/index.d.mts +1 -1
- package/dist/integration/index.d.ts +1 -1
- package/dist/kernel/index.d.mts +2 -1
- package/dist/kernel/index.d.ts +2 -1
- package/dist/kernel/index.js +884 -684
- package/dist/kernel/index.js.map +1 -1
- package/dist/kernel/index.mjs +870 -684
- package/dist/kernel/index.mjs.map +1 -1
- package/dist/package-registry.zod-JMcOYNxM.d.mts +21119 -0
- package/dist/package-registry.zod-JMcOYNxM.d.ts +21119 -0
- package/dist/state-machine.zod-B-lFFSxQ.d.mts +285 -0
- package/dist/state-machine.zod-B-lFFSxQ.d.ts +285 -0
- package/dist/system/index.d.mts +2 -1
- package/dist/system/index.d.ts +2 -1
- package/dist/system/index.js +749 -651
- package/dist/system/index.js.map +1 -1
- package/dist/system/index.mjs +749 -651
- package/dist/system/index.mjs.map +1 -1
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/json-schema/ai/Agent.json +499 -0
- package/json-schema/ai/DevOpsAgent.json +499 -0
- package/json-schema/ai/FeedbackLoop.json +2188 -186
- package/json-schema/ai/Resolution.json +2188 -186
- package/json-schema/api/ApiRoutes.json +4 -0
- package/json-schema/api/CompileManifestResponse.json +40 -10
- package/json-schema/api/DisablePackageRequest.json +18 -0
- package/json-schema/api/DisablePackageResponse.json +1521 -0
- package/json-schema/api/Discovery.json +4 -0
- package/json-schema/api/EnablePackageRequest.json +18 -0
- package/json-schema/api/EnablePackageResponse.json +1521 -0
- package/json-schema/api/GetDiscoveryResponse.json +4 -0
- package/json-schema/api/GetPackageRequest.json +18 -0
- package/json-schema/api/GetPackageResponse.json +1518 -0
- package/json-schema/api/InstallPackageRequest.json +1483 -0
- package/json-schema/api/InstallPackageResponse.json +1521 -0
- package/json-schema/api/ListPackagesRequest.json +42 -0
- package/json-schema/api/ListPackagesResponse.json +1525 -0
- package/json-schema/api/ObjectDefinitionResponse.json +1001 -0
- package/json-schema/api/ObjectStackProtocol.json +86 -1
- package/json-schema/api/RestApiConfig.json +5 -0
- package/json-schema/api/RestServerConfig.json +5 -0
- package/json-schema/api/UninstallPackageRequest.json +18 -0
- package/json-schema/api/UninstallPackageResponse.json +25 -0
- package/json-schema/automation/ActionRef.json +30 -0
- package/json-schema/automation/Event.json +24 -0
- package/json-schema/automation/Flow.json +1 -0
- package/json-schema/automation/FlowNode.json +1 -0
- package/json-schema/automation/FlowNodeAction.json +1 -0
- package/json-schema/automation/GuardRef.json +30 -0
- package/json-schema/automation/StateMachine.json +504 -0
- package/json-schema/automation/StateNode.json +324 -0
- package/json-schema/automation/Transition.json +73 -0
- package/json-schema/data/Object.json +1001 -0
- package/json-schema/data/ObjectExtension.json +2376 -0
- package/json-schema/data/ObjectOwnershipEnum.json +13 -0
- package/json-schema/hub/ComposerResponse.json +40 -10
- package/json-schema/kernel/DisablePackageRequest.json +18 -0
- package/json-schema/kernel/DisablePackageResponse.json +1521 -0
- package/json-schema/kernel/EnablePackageRequest.json +18 -0
- package/json-schema/kernel/EnablePackageResponse.json +1521 -0
- package/json-schema/kernel/EventBusConfig.json +15 -0
- package/json-schema/kernel/EventHandler.json +6 -0
- package/json-schema/kernel/EventPersistence.json +3 -0
- package/json-schema/kernel/EventRoute.json +3 -0
- package/json-schema/kernel/EventWebhookConfig.json +3 -0
- package/json-schema/kernel/GetPackageRequest.json +18 -0
- package/json-schema/kernel/GetPackageResponse.json +1518 -0
- package/json-schema/kernel/InstallPackageRequest.json +1483 -0
- package/json-schema/kernel/InstallPackageResponse.json +1521 -0
- package/json-schema/kernel/InstalledPackage.json +1509 -0
- package/json-schema/kernel/ListPackagesRequest.json +42 -0
- package/json-schema/kernel/ListPackagesResponse.json +1525 -0
- package/json-schema/kernel/Manifest.json +40 -10
- package/json-schema/kernel/PackageStatusEnum.json +16 -0
- package/json-schema/kernel/Plugin.json +5 -0
- package/json-schema/kernel/PluginContext.json +31 -7
- package/json-schema/kernel/PluginLifecycle.json +7 -1
- package/json-schema/kernel/RealTimeNotificationConfig.json +3 -0
- package/json-schema/kernel/UninstallPackageRequest.json +18 -0
- package/json-schema/kernel/UninstallPackageResponse.json +25 -0
- package/json-schema/system/ChangeSet.json +2188 -186
- package/json-schema/system/CreateObjectOperation.json +1001 -0
- package/json-schema/system/MigrationOperation.json +1001 -0
- package/package.json +29 -15
- package/prompts/create-new-project.md +37 -19
- package/dist/{index-I3piy4U4.d.mts → index-BmU_sD1f.d.mts} +8 -8
- package/dist/{index-CkhpsEUw.d.ts → index-BnXuc_HO.d.ts} +8 -8
- package/dist/{index-CIDI-8zR.d.mts → index-C_NTOcet.d.mts} +98 -98
- package/dist/{index-CIDI-8zR.d.ts → index-C_NTOcet.d.ts} +98 -98
|
@@ -0,0 +1,2376 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/ObjectExtension",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"ObjectExtension": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"extend": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Target object name (FQN) to extend"
|
|
10
|
+
},
|
|
11
|
+
"fields": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"name": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
19
|
+
"description": "Machine name (snake_case)"
|
|
20
|
+
},
|
|
21
|
+
"label": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Human readable label"
|
|
24
|
+
},
|
|
25
|
+
"type": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"text",
|
|
29
|
+
"textarea",
|
|
30
|
+
"email",
|
|
31
|
+
"url",
|
|
32
|
+
"phone",
|
|
33
|
+
"password",
|
|
34
|
+
"markdown",
|
|
35
|
+
"html",
|
|
36
|
+
"richtext",
|
|
37
|
+
"number",
|
|
38
|
+
"currency",
|
|
39
|
+
"percent",
|
|
40
|
+
"date",
|
|
41
|
+
"datetime",
|
|
42
|
+
"time",
|
|
43
|
+
"boolean",
|
|
44
|
+
"toggle",
|
|
45
|
+
"select",
|
|
46
|
+
"multiselect",
|
|
47
|
+
"radio",
|
|
48
|
+
"checkboxes",
|
|
49
|
+
"lookup",
|
|
50
|
+
"master_detail",
|
|
51
|
+
"tree",
|
|
52
|
+
"image",
|
|
53
|
+
"file",
|
|
54
|
+
"avatar",
|
|
55
|
+
"video",
|
|
56
|
+
"audio",
|
|
57
|
+
"formula",
|
|
58
|
+
"summary",
|
|
59
|
+
"autonumber",
|
|
60
|
+
"location",
|
|
61
|
+
"address",
|
|
62
|
+
"code",
|
|
63
|
+
"json",
|
|
64
|
+
"color",
|
|
65
|
+
"rating",
|
|
66
|
+
"slider",
|
|
67
|
+
"signature",
|
|
68
|
+
"qrcode",
|
|
69
|
+
"progress",
|
|
70
|
+
"tags",
|
|
71
|
+
"vector"
|
|
72
|
+
],
|
|
73
|
+
"description": "Field Data Type"
|
|
74
|
+
},
|
|
75
|
+
"description": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"description": "Tooltip/Help text"
|
|
78
|
+
},
|
|
79
|
+
"format": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "Format string (e.g. email, phone)"
|
|
82
|
+
},
|
|
83
|
+
"required": {
|
|
84
|
+
"type": "boolean",
|
|
85
|
+
"default": false,
|
|
86
|
+
"description": "Is required"
|
|
87
|
+
},
|
|
88
|
+
"searchable": {
|
|
89
|
+
"type": "boolean",
|
|
90
|
+
"default": false,
|
|
91
|
+
"description": "Is searchable"
|
|
92
|
+
},
|
|
93
|
+
"multiple": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"default": false,
|
|
96
|
+
"description": "Allow multiple values (Stores as Array/JSON). Applicable for select, lookup, file, image."
|
|
97
|
+
},
|
|
98
|
+
"unique": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"default": false,
|
|
101
|
+
"description": "Is unique constraint"
|
|
102
|
+
},
|
|
103
|
+
"defaultValue": {
|
|
104
|
+
"description": "Default value"
|
|
105
|
+
},
|
|
106
|
+
"maxLength": {
|
|
107
|
+
"type": "number",
|
|
108
|
+
"description": "Max character length"
|
|
109
|
+
},
|
|
110
|
+
"minLength": {
|
|
111
|
+
"type": "number",
|
|
112
|
+
"description": "Min character length"
|
|
113
|
+
},
|
|
114
|
+
"precision": {
|
|
115
|
+
"type": "number",
|
|
116
|
+
"description": "Total digits"
|
|
117
|
+
},
|
|
118
|
+
"scale": {
|
|
119
|
+
"type": "number",
|
|
120
|
+
"description": "Decimal places"
|
|
121
|
+
},
|
|
122
|
+
"min": {
|
|
123
|
+
"type": "number",
|
|
124
|
+
"description": "Minimum value"
|
|
125
|
+
},
|
|
126
|
+
"max": {
|
|
127
|
+
"type": "number",
|
|
128
|
+
"description": "Maximum value"
|
|
129
|
+
},
|
|
130
|
+
"options": {
|
|
131
|
+
"type": "array",
|
|
132
|
+
"items": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"properties": {
|
|
135
|
+
"label": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"description": "Display label (human-readable, any case allowed)"
|
|
138
|
+
},
|
|
139
|
+
"value": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"minLength": 2,
|
|
142
|
+
"pattern": "^[a-z][a-z0-9_.]*$",
|
|
143
|
+
"description": "Stored value (lowercase machine identifier)"
|
|
144
|
+
},
|
|
145
|
+
"color": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"description": "Color code for badges/charts"
|
|
148
|
+
},
|
|
149
|
+
"default": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"description": "Is default option"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": [
|
|
155
|
+
"label",
|
|
156
|
+
"value"
|
|
157
|
+
],
|
|
158
|
+
"additionalProperties": false
|
|
159
|
+
},
|
|
160
|
+
"description": "Static options for select/multiselect"
|
|
161
|
+
},
|
|
162
|
+
"reference": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "Target Object Name"
|
|
165
|
+
},
|
|
166
|
+
"referenceFilters": {
|
|
167
|
+
"type": "array",
|
|
168
|
+
"items": {
|
|
169
|
+
"type": "string"
|
|
170
|
+
},
|
|
171
|
+
"description": "Filters applied to lookup dialogs (e.g. \"active = true\")"
|
|
172
|
+
},
|
|
173
|
+
"writeRequiresMasterRead": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"description": "If true, user needs read access to master record to edit this field"
|
|
176
|
+
},
|
|
177
|
+
"deleteBehavior": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"enum": [
|
|
180
|
+
"set_null",
|
|
181
|
+
"cascade",
|
|
182
|
+
"restrict"
|
|
183
|
+
],
|
|
184
|
+
"default": "set_null",
|
|
185
|
+
"description": "What happens if referenced record is deleted"
|
|
186
|
+
},
|
|
187
|
+
"expression": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"description": "Formula expression"
|
|
190
|
+
},
|
|
191
|
+
"formula": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"description": "Deprecated: Use expression"
|
|
194
|
+
},
|
|
195
|
+
"summaryOperations": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"properties": {
|
|
198
|
+
"object": {
|
|
199
|
+
"type": "string"
|
|
200
|
+
},
|
|
201
|
+
"field": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
},
|
|
204
|
+
"function": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"enum": [
|
|
207
|
+
"count",
|
|
208
|
+
"sum",
|
|
209
|
+
"min",
|
|
210
|
+
"max",
|
|
211
|
+
"avg"
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"required": [
|
|
216
|
+
"object",
|
|
217
|
+
"field",
|
|
218
|
+
"function"
|
|
219
|
+
],
|
|
220
|
+
"additionalProperties": false,
|
|
221
|
+
"description": "Roll-up summary definition"
|
|
222
|
+
},
|
|
223
|
+
"language": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"description": "Programming language for syntax highlighting (e.g., javascript, python, sql)"
|
|
226
|
+
},
|
|
227
|
+
"theme": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "Code editor theme (e.g., dark, light, monokai)"
|
|
230
|
+
},
|
|
231
|
+
"lineNumbers": {
|
|
232
|
+
"type": "boolean",
|
|
233
|
+
"description": "Show line numbers in code editor"
|
|
234
|
+
},
|
|
235
|
+
"maxRating": {
|
|
236
|
+
"type": "number",
|
|
237
|
+
"description": "Maximum rating value (default: 5)"
|
|
238
|
+
},
|
|
239
|
+
"allowHalf": {
|
|
240
|
+
"type": "boolean",
|
|
241
|
+
"description": "Allow half-star ratings"
|
|
242
|
+
},
|
|
243
|
+
"displayMap": {
|
|
244
|
+
"type": "boolean",
|
|
245
|
+
"description": "Display map widget for location field"
|
|
246
|
+
},
|
|
247
|
+
"allowGeocoding": {
|
|
248
|
+
"type": "boolean",
|
|
249
|
+
"description": "Allow address-to-coordinate conversion"
|
|
250
|
+
},
|
|
251
|
+
"addressFormat": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"enum": [
|
|
254
|
+
"us",
|
|
255
|
+
"uk",
|
|
256
|
+
"international"
|
|
257
|
+
],
|
|
258
|
+
"description": "Address format template"
|
|
259
|
+
},
|
|
260
|
+
"colorFormat": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"enum": [
|
|
263
|
+
"hex",
|
|
264
|
+
"rgb",
|
|
265
|
+
"rgba",
|
|
266
|
+
"hsl"
|
|
267
|
+
],
|
|
268
|
+
"description": "Color value format"
|
|
269
|
+
},
|
|
270
|
+
"allowAlpha": {
|
|
271
|
+
"type": "boolean",
|
|
272
|
+
"description": "Allow transparency/alpha channel"
|
|
273
|
+
},
|
|
274
|
+
"presetColors": {
|
|
275
|
+
"type": "array",
|
|
276
|
+
"items": {
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
"description": "Preset color options"
|
|
280
|
+
},
|
|
281
|
+
"step": {
|
|
282
|
+
"type": "number",
|
|
283
|
+
"description": "Step increment for slider (default: 1)"
|
|
284
|
+
},
|
|
285
|
+
"showValue": {
|
|
286
|
+
"type": "boolean",
|
|
287
|
+
"description": "Display current value on slider"
|
|
288
|
+
},
|
|
289
|
+
"marks": {
|
|
290
|
+
"type": "object",
|
|
291
|
+
"additionalProperties": {
|
|
292
|
+
"type": "string"
|
|
293
|
+
},
|
|
294
|
+
"description": "Custom marks/labels at specific values (e.g., {0: \"Low\", 50: \"Medium\", 100: \"High\"})"
|
|
295
|
+
},
|
|
296
|
+
"barcodeFormat": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"enum": [
|
|
299
|
+
"qr",
|
|
300
|
+
"ean13",
|
|
301
|
+
"ean8",
|
|
302
|
+
"code128",
|
|
303
|
+
"code39",
|
|
304
|
+
"upca",
|
|
305
|
+
"upce"
|
|
306
|
+
],
|
|
307
|
+
"description": "Barcode format type"
|
|
308
|
+
},
|
|
309
|
+
"qrErrorCorrection": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"enum": [
|
|
312
|
+
"L",
|
|
313
|
+
"M",
|
|
314
|
+
"Q",
|
|
315
|
+
"H"
|
|
316
|
+
],
|
|
317
|
+
"description": "QR code error correction level (L=7%, M=15%, Q=25%, H=30%). Only applicable when barcodeFormat is \"qr\""
|
|
318
|
+
},
|
|
319
|
+
"displayValue": {
|
|
320
|
+
"type": "boolean",
|
|
321
|
+
"description": "Display human-readable value below barcode/QR code"
|
|
322
|
+
},
|
|
323
|
+
"allowScanning": {
|
|
324
|
+
"type": "boolean",
|
|
325
|
+
"description": "Enable camera scanning for barcode/QR code input"
|
|
326
|
+
},
|
|
327
|
+
"currencyConfig": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"properties": {
|
|
330
|
+
"precision": {
|
|
331
|
+
"type": "integer",
|
|
332
|
+
"minimum": 0,
|
|
333
|
+
"maximum": 10,
|
|
334
|
+
"default": 2,
|
|
335
|
+
"description": "Decimal precision (default: 2)"
|
|
336
|
+
},
|
|
337
|
+
"currencyMode": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"enum": [
|
|
340
|
+
"dynamic",
|
|
341
|
+
"fixed"
|
|
342
|
+
],
|
|
343
|
+
"default": "dynamic",
|
|
344
|
+
"description": "Currency mode: dynamic (user selectable) or fixed (single currency)"
|
|
345
|
+
},
|
|
346
|
+
"defaultCurrency": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"minLength": 3,
|
|
349
|
+
"maxLength": 3,
|
|
350
|
+
"default": "CNY",
|
|
351
|
+
"description": "Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"additionalProperties": false,
|
|
355
|
+
"description": "Configuration for currency field type"
|
|
356
|
+
},
|
|
357
|
+
"vectorConfig": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"properties": {
|
|
360
|
+
"dimensions": {
|
|
361
|
+
"type": "integer",
|
|
362
|
+
"minimum": 1,
|
|
363
|
+
"maximum": 10000,
|
|
364
|
+
"description": "Vector dimensionality (e.g., 1536 for OpenAI embeddings)"
|
|
365
|
+
},
|
|
366
|
+
"distanceMetric": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"enum": [
|
|
369
|
+
"cosine",
|
|
370
|
+
"euclidean",
|
|
371
|
+
"dotProduct",
|
|
372
|
+
"manhattan"
|
|
373
|
+
],
|
|
374
|
+
"default": "cosine",
|
|
375
|
+
"description": "Distance/similarity metric for vector search"
|
|
376
|
+
},
|
|
377
|
+
"normalized": {
|
|
378
|
+
"type": "boolean",
|
|
379
|
+
"default": false,
|
|
380
|
+
"description": "Whether vectors are normalized (unit length)"
|
|
381
|
+
},
|
|
382
|
+
"indexed": {
|
|
383
|
+
"type": "boolean",
|
|
384
|
+
"default": true,
|
|
385
|
+
"description": "Whether to create a vector index for fast similarity search"
|
|
386
|
+
},
|
|
387
|
+
"indexType": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"enum": [
|
|
390
|
+
"hnsw",
|
|
391
|
+
"ivfflat",
|
|
392
|
+
"flat"
|
|
393
|
+
],
|
|
394
|
+
"description": "Vector index algorithm (HNSW for high accuracy, IVFFlat for large datasets)"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"required": [
|
|
398
|
+
"dimensions"
|
|
399
|
+
],
|
|
400
|
+
"additionalProperties": false,
|
|
401
|
+
"description": "Configuration for vector field type (AI/ML embeddings)"
|
|
402
|
+
},
|
|
403
|
+
"fileAttachmentConfig": {
|
|
404
|
+
"type": "object",
|
|
405
|
+
"properties": {
|
|
406
|
+
"minSize": {
|
|
407
|
+
"type": "number",
|
|
408
|
+
"minimum": 0,
|
|
409
|
+
"description": "Minimum file size in bytes"
|
|
410
|
+
},
|
|
411
|
+
"maxSize": {
|
|
412
|
+
"type": "number",
|
|
413
|
+
"minimum": 1,
|
|
414
|
+
"description": "Maximum file size in bytes (e.g., 10485760 = 10MB)"
|
|
415
|
+
},
|
|
416
|
+
"allowedTypes": {
|
|
417
|
+
"type": "array",
|
|
418
|
+
"items": {
|
|
419
|
+
"type": "string"
|
|
420
|
+
},
|
|
421
|
+
"description": "Allowed file extensions (e.g., [\".pdf\", \".docx\", \".jpg\"])"
|
|
422
|
+
},
|
|
423
|
+
"blockedTypes": {
|
|
424
|
+
"type": "array",
|
|
425
|
+
"items": {
|
|
426
|
+
"type": "string"
|
|
427
|
+
},
|
|
428
|
+
"description": "Blocked file extensions (e.g., [\".exe\", \".bat\", \".sh\"])"
|
|
429
|
+
},
|
|
430
|
+
"allowedMimeTypes": {
|
|
431
|
+
"type": "array",
|
|
432
|
+
"items": {
|
|
433
|
+
"type": "string"
|
|
434
|
+
},
|
|
435
|
+
"description": "Allowed MIME types (e.g., [\"image/jpeg\", \"application/pdf\"])"
|
|
436
|
+
},
|
|
437
|
+
"blockedMimeTypes": {
|
|
438
|
+
"type": "array",
|
|
439
|
+
"items": {
|
|
440
|
+
"type": "string"
|
|
441
|
+
},
|
|
442
|
+
"description": "Blocked MIME types"
|
|
443
|
+
},
|
|
444
|
+
"virusScan": {
|
|
445
|
+
"type": "boolean",
|
|
446
|
+
"default": false,
|
|
447
|
+
"description": "Enable virus scanning for uploaded files"
|
|
448
|
+
},
|
|
449
|
+
"virusScanProvider": {
|
|
450
|
+
"type": "string",
|
|
451
|
+
"enum": [
|
|
452
|
+
"clamav",
|
|
453
|
+
"virustotal",
|
|
454
|
+
"metadefender",
|
|
455
|
+
"custom"
|
|
456
|
+
],
|
|
457
|
+
"description": "Virus scanning service provider"
|
|
458
|
+
},
|
|
459
|
+
"virusScanOnUpload": {
|
|
460
|
+
"type": "boolean",
|
|
461
|
+
"default": true,
|
|
462
|
+
"description": "Scan files immediately on upload"
|
|
463
|
+
},
|
|
464
|
+
"quarantineOnThreat": {
|
|
465
|
+
"type": "boolean",
|
|
466
|
+
"default": true,
|
|
467
|
+
"description": "Quarantine files if threat detected"
|
|
468
|
+
},
|
|
469
|
+
"storageProvider": {
|
|
470
|
+
"type": "string",
|
|
471
|
+
"description": "Object storage provider name (references ObjectStorageConfig)"
|
|
472
|
+
},
|
|
473
|
+
"storageBucket": {
|
|
474
|
+
"type": "string",
|
|
475
|
+
"description": "Target bucket name"
|
|
476
|
+
},
|
|
477
|
+
"storagePrefix": {
|
|
478
|
+
"type": "string",
|
|
479
|
+
"description": "Storage path prefix (e.g., \"uploads/documents/\")"
|
|
480
|
+
},
|
|
481
|
+
"imageValidation": {
|
|
482
|
+
"type": "object",
|
|
483
|
+
"properties": {
|
|
484
|
+
"minWidth": {
|
|
485
|
+
"type": "number",
|
|
486
|
+
"minimum": 1,
|
|
487
|
+
"description": "Minimum image width in pixels"
|
|
488
|
+
},
|
|
489
|
+
"maxWidth": {
|
|
490
|
+
"type": "number",
|
|
491
|
+
"minimum": 1,
|
|
492
|
+
"description": "Maximum image width in pixels"
|
|
493
|
+
},
|
|
494
|
+
"minHeight": {
|
|
495
|
+
"type": "number",
|
|
496
|
+
"minimum": 1,
|
|
497
|
+
"description": "Minimum image height in pixels"
|
|
498
|
+
},
|
|
499
|
+
"maxHeight": {
|
|
500
|
+
"type": "number",
|
|
501
|
+
"minimum": 1,
|
|
502
|
+
"description": "Maximum image height in pixels"
|
|
503
|
+
},
|
|
504
|
+
"aspectRatio": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"description": "Required aspect ratio (e.g., \"16:9\", \"1:1\")"
|
|
507
|
+
},
|
|
508
|
+
"generateThumbnails": {
|
|
509
|
+
"type": "boolean",
|
|
510
|
+
"default": false,
|
|
511
|
+
"description": "Auto-generate thumbnails"
|
|
512
|
+
},
|
|
513
|
+
"thumbnailSizes": {
|
|
514
|
+
"type": "array",
|
|
515
|
+
"items": {
|
|
516
|
+
"type": "object",
|
|
517
|
+
"properties": {
|
|
518
|
+
"name": {
|
|
519
|
+
"type": "string",
|
|
520
|
+
"description": "Thumbnail variant name (e.g., \"small\", \"medium\", \"large\")"
|
|
521
|
+
},
|
|
522
|
+
"width": {
|
|
523
|
+
"type": "number",
|
|
524
|
+
"minimum": 1,
|
|
525
|
+
"description": "Thumbnail width in pixels"
|
|
526
|
+
},
|
|
527
|
+
"height": {
|
|
528
|
+
"type": "number",
|
|
529
|
+
"minimum": 1,
|
|
530
|
+
"description": "Thumbnail height in pixels"
|
|
531
|
+
},
|
|
532
|
+
"crop": {
|
|
533
|
+
"type": "boolean",
|
|
534
|
+
"default": false,
|
|
535
|
+
"description": "Crop to exact dimensions"
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"required": [
|
|
539
|
+
"name",
|
|
540
|
+
"width",
|
|
541
|
+
"height"
|
|
542
|
+
],
|
|
543
|
+
"additionalProperties": false
|
|
544
|
+
},
|
|
545
|
+
"description": "Thumbnail size configurations"
|
|
546
|
+
},
|
|
547
|
+
"preserveMetadata": {
|
|
548
|
+
"type": "boolean",
|
|
549
|
+
"default": false,
|
|
550
|
+
"description": "Preserve EXIF metadata"
|
|
551
|
+
},
|
|
552
|
+
"autoRotate": {
|
|
553
|
+
"type": "boolean",
|
|
554
|
+
"default": true,
|
|
555
|
+
"description": "Auto-rotate based on EXIF orientation"
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"additionalProperties": false,
|
|
559
|
+
"description": "Image-specific validation rules"
|
|
560
|
+
},
|
|
561
|
+
"allowMultiple": {
|
|
562
|
+
"type": "boolean",
|
|
563
|
+
"default": false,
|
|
564
|
+
"description": "Allow multiple file uploads (overrides field.multiple)"
|
|
565
|
+
},
|
|
566
|
+
"allowReplace": {
|
|
567
|
+
"type": "boolean",
|
|
568
|
+
"default": true,
|
|
569
|
+
"description": "Allow replacing existing files"
|
|
570
|
+
},
|
|
571
|
+
"allowDelete": {
|
|
572
|
+
"type": "boolean",
|
|
573
|
+
"default": true,
|
|
574
|
+
"description": "Allow deleting uploaded files"
|
|
575
|
+
},
|
|
576
|
+
"requireUpload": {
|
|
577
|
+
"type": "boolean",
|
|
578
|
+
"default": false,
|
|
579
|
+
"description": "Require at least one file when field is required"
|
|
580
|
+
},
|
|
581
|
+
"extractMetadata": {
|
|
582
|
+
"type": "boolean",
|
|
583
|
+
"default": true,
|
|
584
|
+
"description": "Extract file metadata (name, size, type, etc.)"
|
|
585
|
+
},
|
|
586
|
+
"extractText": {
|
|
587
|
+
"type": "boolean",
|
|
588
|
+
"default": false,
|
|
589
|
+
"description": "Extract text content from documents (OCR/parsing)"
|
|
590
|
+
},
|
|
591
|
+
"versioningEnabled": {
|
|
592
|
+
"type": "boolean",
|
|
593
|
+
"default": false,
|
|
594
|
+
"description": "Keep previous versions of replaced files"
|
|
595
|
+
},
|
|
596
|
+
"maxVersions": {
|
|
597
|
+
"type": "number",
|
|
598
|
+
"minimum": 1,
|
|
599
|
+
"description": "Maximum number of versions to retain"
|
|
600
|
+
},
|
|
601
|
+
"publicRead": {
|
|
602
|
+
"type": "boolean",
|
|
603
|
+
"default": false,
|
|
604
|
+
"description": "Allow public read access to uploaded files"
|
|
605
|
+
},
|
|
606
|
+
"presignedUrlExpiry": {
|
|
607
|
+
"type": "number",
|
|
608
|
+
"minimum": 60,
|
|
609
|
+
"maximum": 604800,
|
|
610
|
+
"default": 3600,
|
|
611
|
+
"description": "Presigned URL expiration in seconds (default: 1 hour)"
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
"additionalProperties": false,
|
|
615
|
+
"description": "Configuration for file and attachment field types"
|
|
616
|
+
},
|
|
617
|
+
"encryptionConfig": {
|
|
618
|
+
"type": "object",
|
|
619
|
+
"properties": {
|
|
620
|
+
"enabled": {
|
|
621
|
+
"type": "boolean",
|
|
622
|
+
"default": false
|
|
623
|
+
},
|
|
624
|
+
"algorithm": {
|
|
625
|
+
"type": "string",
|
|
626
|
+
"enum": [
|
|
627
|
+
"aes-256-gcm",
|
|
628
|
+
"aes-256-cbc",
|
|
629
|
+
"chacha20-poly1305"
|
|
630
|
+
],
|
|
631
|
+
"default": "aes-256-gcm"
|
|
632
|
+
},
|
|
633
|
+
"keyManagement": {
|
|
634
|
+
"type": "object",
|
|
635
|
+
"properties": {
|
|
636
|
+
"provider": {
|
|
637
|
+
"type": "string",
|
|
638
|
+
"enum": [
|
|
639
|
+
"local",
|
|
640
|
+
"aws-kms",
|
|
641
|
+
"azure-key-vault",
|
|
642
|
+
"gcp-kms",
|
|
643
|
+
"hashicorp-vault"
|
|
644
|
+
]
|
|
645
|
+
},
|
|
646
|
+
"keyId": {
|
|
647
|
+
"type": "string"
|
|
648
|
+
},
|
|
649
|
+
"rotationPolicy": {
|
|
650
|
+
"type": "object",
|
|
651
|
+
"properties": {
|
|
652
|
+
"enabled": {
|
|
653
|
+
"type": "boolean",
|
|
654
|
+
"default": false
|
|
655
|
+
},
|
|
656
|
+
"frequencyDays": {
|
|
657
|
+
"type": "number",
|
|
658
|
+
"minimum": 1,
|
|
659
|
+
"default": 90
|
|
660
|
+
},
|
|
661
|
+
"retainOldVersions": {
|
|
662
|
+
"type": "number",
|
|
663
|
+
"default": 3
|
|
664
|
+
},
|
|
665
|
+
"autoRotate": {
|
|
666
|
+
"type": "boolean",
|
|
667
|
+
"default": true
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
"additionalProperties": false
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"required": [
|
|
674
|
+
"provider"
|
|
675
|
+
],
|
|
676
|
+
"additionalProperties": false
|
|
677
|
+
},
|
|
678
|
+
"scope": {
|
|
679
|
+
"type": "string",
|
|
680
|
+
"enum": [
|
|
681
|
+
"field",
|
|
682
|
+
"record",
|
|
683
|
+
"table",
|
|
684
|
+
"database"
|
|
685
|
+
]
|
|
686
|
+
},
|
|
687
|
+
"deterministicEncryption": {
|
|
688
|
+
"type": "boolean",
|
|
689
|
+
"default": false,
|
|
690
|
+
"description": "Allows equality queries on encrypted data"
|
|
691
|
+
},
|
|
692
|
+
"searchableEncryption": {
|
|
693
|
+
"type": "boolean",
|
|
694
|
+
"default": false,
|
|
695
|
+
"description": "Allows search on encrypted data"
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
"required": [
|
|
699
|
+
"keyManagement",
|
|
700
|
+
"scope"
|
|
701
|
+
],
|
|
702
|
+
"additionalProperties": false,
|
|
703
|
+
"description": "Field-level encryption configuration for sensitive data (GDPR/HIPAA/PCI-DSS)"
|
|
704
|
+
},
|
|
705
|
+
"maskingRule": {
|
|
706
|
+
"type": "object",
|
|
707
|
+
"properties": {
|
|
708
|
+
"field": {
|
|
709
|
+
"type": "string"
|
|
710
|
+
},
|
|
711
|
+
"strategy": {
|
|
712
|
+
"type": "string",
|
|
713
|
+
"enum": [
|
|
714
|
+
"redact",
|
|
715
|
+
"partial",
|
|
716
|
+
"hash",
|
|
717
|
+
"tokenize",
|
|
718
|
+
"randomize",
|
|
719
|
+
"nullify",
|
|
720
|
+
"substitute"
|
|
721
|
+
]
|
|
722
|
+
},
|
|
723
|
+
"pattern": {
|
|
724
|
+
"type": "string",
|
|
725
|
+
"description": "Regex pattern for partial masking"
|
|
726
|
+
},
|
|
727
|
+
"preserveFormat": {
|
|
728
|
+
"type": "boolean",
|
|
729
|
+
"default": true
|
|
730
|
+
},
|
|
731
|
+
"preserveLength": {
|
|
732
|
+
"type": "boolean",
|
|
733
|
+
"default": true
|
|
734
|
+
},
|
|
735
|
+
"roles": {
|
|
736
|
+
"type": "array",
|
|
737
|
+
"items": {
|
|
738
|
+
"type": "string"
|
|
739
|
+
},
|
|
740
|
+
"description": "Roles that see masked data"
|
|
741
|
+
},
|
|
742
|
+
"exemptRoles": {
|
|
743
|
+
"type": "array",
|
|
744
|
+
"items": {
|
|
745
|
+
"type": "string"
|
|
746
|
+
},
|
|
747
|
+
"description": "Roles that see unmasked data"
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
"required": [
|
|
751
|
+
"field",
|
|
752
|
+
"strategy"
|
|
753
|
+
],
|
|
754
|
+
"additionalProperties": false,
|
|
755
|
+
"description": "Data masking rules for PII protection"
|
|
756
|
+
},
|
|
757
|
+
"auditTrail": {
|
|
758
|
+
"type": "boolean",
|
|
759
|
+
"default": false,
|
|
760
|
+
"description": "Enable detailed audit trail for this field (tracks all changes with user and timestamp)"
|
|
761
|
+
},
|
|
762
|
+
"dependencies": {
|
|
763
|
+
"type": "array",
|
|
764
|
+
"items": {
|
|
765
|
+
"type": "string"
|
|
766
|
+
},
|
|
767
|
+
"description": "Array of field names that this field depends on (for formulas, visibility rules, etc.)"
|
|
768
|
+
},
|
|
769
|
+
"cached": {
|
|
770
|
+
"type": "object",
|
|
771
|
+
"properties": {
|
|
772
|
+
"enabled": {
|
|
773
|
+
"type": "boolean",
|
|
774
|
+
"description": "Enable caching for computed field results"
|
|
775
|
+
},
|
|
776
|
+
"ttl": {
|
|
777
|
+
"type": "number",
|
|
778
|
+
"minimum": 0,
|
|
779
|
+
"description": "Cache TTL in seconds (0 = no expiration)"
|
|
780
|
+
},
|
|
781
|
+
"invalidateOn": {
|
|
782
|
+
"type": "array",
|
|
783
|
+
"items": {
|
|
784
|
+
"type": "string"
|
|
785
|
+
},
|
|
786
|
+
"description": "Field paths that invalidate cache (e.g., [\"inventory.quantity\", \"pricing.base_price\"])"
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
"required": [
|
|
790
|
+
"enabled",
|
|
791
|
+
"ttl",
|
|
792
|
+
"invalidateOn"
|
|
793
|
+
],
|
|
794
|
+
"additionalProperties": false,
|
|
795
|
+
"description": "Caching configuration for computed/formula fields"
|
|
796
|
+
},
|
|
797
|
+
"dataQuality": {
|
|
798
|
+
"type": "object",
|
|
799
|
+
"properties": {
|
|
800
|
+
"uniqueness": {
|
|
801
|
+
"type": "boolean",
|
|
802
|
+
"default": false,
|
|
803
|
+
"description": "Enforce unique values across all records"
|
|
804
|
+
},
|
|
805
|
+
"completeness": {
|
|
806
|
+
"type": "number",
|
|
807
|
+
"minimum": 0,
|
|
808
|
+
"maximum": 1,
|
|
809
|
+
"default": 0,
|
|
810
|
+
"description": "Minimum ratio of non-null values (0-1, default: 0 = no requirement)"
|
|
811
|
+
},
|
|
812
|
+
"accuracy": {
|
|
813
|
+
"type": "object",
|
|
814
|
+
"properties": {
|
|
815
|
+
"source": {
|
|
816
|
+
"type": "string",
|
|
817
|
+
"description": "Reference data source for validation (e.g., \"api.verify.com\", \"master_data\")"
|
|
818
|
+
},
|
|
819
|
+
"threshold": {
|
|
820
|
+
"type": "number",
|
|
821
|
+
"minimum": 0,
|
|
822
|
+
"maximum": 1,
|
|
823
|
+
"description": "Minimum accuracy threshold (0-1, e.g., 0.95 = 95% match required)"
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
"required": [
|
|
827
|
+
"source",
|
|
828
|
+
"threshold"
|
|
829
|
+
],
|
|
830
|
+
"additionalProperties": false,
|
|
831
|
+
"description": "Accuracy validation configuration"
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
"additionalProperties": false,
|
|
835
|
+
"description": "Data quality validation and monitoring rules"
|
|
836
|
+
},
|
|
837
|
+
"hidden": {
|
|
838
|
+
"type": "boolean",
|
|
839
|
+
"default": false,
|
|
840
|
+
"description": "Hidden from default UI"
|
|
841
|
+
},
|
|
842
|
+
"readonly": {
|
|
843
|
+
"type": "boolean",
|
|
844
|
+
"default": false,
|
|
845
|
+
"description": "Read-only in UI"
|
|
846
|
+
},
|
|
847
|
+
"encryption": {
|
|
848
|
+
"type": "boolean",
|
|
849
|
+
"default": false,
|
|
850
|
+
"description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility."
|
|
851
|
+
},
|
|
852
|
+
"index": {
|
|
853
|
+
"type": "boolean",
|
|
854
|
+
"default": false,
|
|
855
|
+
"description": "Create standard database index"
|
|
856
|
+
},
|
|
857
|
+
"externalId": {
|
|
858
|
+
"type": "boolean",
|
|
859
|
+
"default": false,
|
|
860
|
+
"description": "Is external ID for upsert operations"
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
"required": [
|
|
864
|
+
"type"
|
|
865
|
+
],
|
|
866
|
+
"additionalProperties": false
|
|
867
|
+
},
|
|
868
|
+
"description": "Fields to add/override"
|
|
869
|
+
},
|
|
870
|
+
"label": {
|
|
871
|
+
"type": "string"
|
|
872
|
+
},
|
|
873
|
+
"pluralLabel": {
|
|
874
|
+
"type": "string"
|
|
875
|
+
},
|
|
876
|
+
"description": {
|
|
877
|
+
"type": "string"
|
|
878
|
+
},
|
|
879
|
+
"validations": {
|
|
880
|
+
"type": "array",
|
|
881
|
+
"items": {
|
|
882
|
+
"anyOf": [
|
|
883
|
+
{
|
|
884
|
+
"type": "object",
|
|
885
|
+
"properties": {
|
|
886
|
+
"name": {
|
|
887
|
+
"type": "string",
|
|
888
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
889
|
+
"description": "Unique rule name (snake_case)"
|
|
890
|
+
},
|
|
891
|
+
"label": {
|
|
892
|
+
"type": "string",
|
|
893
|
+
"description": "Human-readable label for the rule listing"
|
|
894
|
+
},
|
|
895
|
+
"description": {
|
|
896
|
+
"type": "string",
|
|
897
|
+
"description": "Administrative notes explaining the business reason"
|
|
898
|
+
},
|
|
899
|
+
"active": {
|
|
900
|
+
"type": "boolean",
|
|
901
|
+
"default": true
|
|
902
|
+
},
|
|
903
|
+
"events": {
|
|
904
|
+
"type": "array",
|
|
905
|
+
"items": {
|
|
906
|
+
"type": "string",
|
|
907
|
+
"enum": [
|
|
908
|
+
"insert",
|
|
909
|
+
"update",
|
|
910
|
+
"delete"
|
|
911
|
+
]
|
|
912
|
+
},
|
|
913
|
+
"default": [
|
|
914
|
+
"insert",
|
|
915
|
+
"update"
|
|
916
|
+
],
|
|
917
|
+
"description": "Validation contexts"
|
|
918
|
+
},
|
|
919
|
+
"tags": {
|
|
920
|
+
"type": "array",
|
|
921
|
+
"items": {
|
|
922
|
+
"type": "string"
|
|
923
|
+
},
|
|
924
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
925
|
+
},
|
|
926
|
+
"severity": {
|
|
927
|
+
"type": "string",
|
|
928
|
+
"enum": [
|
|
929
|
+
"error",
|
|
930
|
+
"warning",
|
|
931
|
+
"info"
|
|
932
|
+
],
|
|
933
|
+
"default": "error"
|
|
934
|
+
},
|
|
935
|
+
"message": {
|
|
936
|
+
"type": "string",
|
|
937
|
+
"description": "Error message to display to the user"
|
|
938
|
+
},
|
|
939
|
+
"type": {
|
|
940
|
+
"type": "string",
|
|
941
|
+
"const": "script"
|
|
942
|
+
},
|
|
943
|
+
"condition": {
|
|
944
|
+
"type": "string",
|
|
945
|
+
"description": "Formula expression. If TRUE, validation fails. (e.g. amount < 0)"
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
"required": [
|
|
949
|
+
"name",
|
|
950
|
+
"message",
|
|
951
|
+
"type",
|
|
952
|
+
"condition"
|
|
953
|
+
],
|
|
954
|
+
"additionalProperties": false
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"type": "object",
|
|
958
|
+
"properties": {
|
|
959
|
+
"name": {
|
|
960
|
+
"type": "string",
|
|
961
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
962
|
+
"description": "Unique rule name (snake_case)"
|
|
963
|
+
},
|
|
964
|
+
"label": {
|
|
965
|
+
"type": "string",
|
|
966
|
+
"description": "Human-readable label for the rule listing"
|
|
967
|
+
},
|
|
968
|
+
"description": {
|
|
969
|
+
"type": "string",
|
|
970
|
+
"description": "Administrative notes explaining the business reason"
|
|
971
|
+
},
|
|
972
|
+
"active": {
|
|
973
|
+
"type": "boolean",
|
|
974
|
+
"default": true
|
|
975
|
+
},
|
|
976
|
+
"events": {
|
|
977
|
+
"type": "array",
|
|
978
|
+
"items": {
|
|
979
|
+
"type": "string",
|
|
980
|
+
"enum": [
|
|
981
|
+
"insert",
|
|
982
|
+
"update",
|
|
983
|
+
"delete"
|
|
984
|
+
]
|
|
985
|
+
},
|
|
986
|
+
"default": [
|
|
987
|
+
"insert",
|
|
988
|
+
"update"
|
|
989
|
+
],
|
|
990
|
+
"description": "Validation contexts"
|
|
991
|
+
},
|
|
992
|
+
"tags": {
|
|
993
|
+
"type": "array",
|
|
994
|
+
"items": {
|
|
995
|
+
"type": "string"
|
|
996
|
+
},
|
|
997
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
998
|
+
},
|
|
999
|
+
"severity": {
|
|
1000
|
+
"type": "string",
|
|
1001
|
+
"enum": [
|
|
1002
|
+
"error",
|
|
1003
|
+
"warning",
|
|
1004
|
+
"info"
|
|
1005
|
+
],
|
|
1006
|
+
"default": "error"
|
|
1007
|
+
},
|
|
1008
|
+
"message": {
|
|
1009
|
+
"type": "string",
|
|
1010
|
+
"description": "Error message to display to the user"
|
|
1011
|
+
},
|
|
1012
|
+
"type": {
|
|
1013
|
+
"type": "string",
|
|
1014
|
+
"const": "unique"
|
|
1015
|
+
},
|
|
1016
|
+
"fields": {
|
|
1017
|
+
"type": "array",
|
|
1018
|
+
"items": {
|
|
1019
|
+
"type": "string"
|
|
1020
|
+
},
|
|
1021
|
+
"description": "Fields that must be combined unique"
|
|
1022
|
+
},
|
|
1023
|
+
"scope": {
|
|
1024
|
+
"type": "string",
|
|
1025
|
+
"description": "Formula condition for scope (e.g. active = true)"
|
|
1026
|
+
},
|
|
1027
|
+
"caseSensitive": {
|
|
1028
|
+
"type": "boolean",
|
|
1029
|
+
"default": true
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
"required": [
|
|
1033
|
+
"name",
|
|
1034
|
+
"message",
|
|
1035
|
+
"type",
|
|
1036
|
+
"fields"
|
|
1037
|
+
],
|
|
1038
|
+
"additionalProperties": false
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"type": "object",
|
|
1042
|
+
"properties": {
|
|
1043
|
+
"name": {
|
|
1044
|
+
"type": "string",
|
|
1045
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1046
|
+
"description": "Unique rule name (snake_case)"
|
|
1047
|
+
},
|
|
1048
|
+
"label": {
|
|
1049
|
+
"type": "string",
|
|
1050
|
+
"description": "Human-readable label for the rule listing"
|
|
1051
|
+
},
|
|
1052
|
+
"description": {
|
|
1053
|
+
"type": "string",
|
|
1054
|
+
"description": "Administrative notes explaining the business reason"
|
|
1055
|
+
},
|
|
1056
|
+
"active": {
|
|
1057
|
+
"type": "boolean",
|
|
1058
|
+
"default": true
|
|
1059
|
+
},
|
|
1060
|
+
"events": {
|
|
1061
|
+
"type": "array",
|
|
1062
|
+
"items": {
|
|
1063
|
+
"type": "string",
|
|
1064
|
+
"enum": [
|
|
1065
|
+
"insert",
|
|
1066
|
+
"update",
|
|
1067
|
+
"delete"
|
|
1068
|
+
]
|
|
1069
|
+
},
|
|
1070
|
+
"default": [
|
|
1071
|
+
"insert",
|
|
1072
|
+
"update"
|
|
1073
|
+
],
|
|
1074
|
+
"description": "Validation contexts"
|
|
1075
|
+
},
|
|
1076
|
+
"tags": {
|
|
1077
|
+
"type": "array",
|
|
1078
|
+
"items": {
|
|
1079
|
+
"type": "string"
|
|
1080
|
+
},
|
|
1081
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1082
|
+
},
|
|
1083
|
+
"severity": {
|
|
1084
|
+
"type": "string",
|
|
1085
|
+
"enum": [
|
|
1086
|
+
"error",
|
|
1087
|
+
"warning",
|
|
1088
|
+
"info"
|
|
1089
|
+
],
|
|
1090
|
+
"default": "error"
|
|
1091
|
+
},
|
|
1092
|
+
"message": {
|
|
1093
|
+
"type": "string",
|
|
1094
|
+
"description": "Error message to display to the user"
|
|
1095
|
+
},
|
|
1096
|
+
"type": {
|
|
1097
|
+
"type": "string",
|
|
1098
|
+
"const": "state_machine"
|
|
1099
|
+
},
|
|
1100
|
+
"field": {
|
|
1101
|
+
"type": "string",
|
|
1102
|
+
"description": "State field (e.g. status)"
|
|
1103
|
+
},
|
|
1104
|
+
"transitions": {
|
|
1105
|
+
"type": "object",
|
|
1106
|
+
"additionalProperties": {
|
|
1107
|
+
"type": "array",
|
|
1108
|
+
"items": {
|
|
1109
|
+
"type": "string"
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1112
|
+
"description": "Map of { OldState: [AllowedNewStates] }"
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
"required": [
|
|
1116
|
+
"name",
|
|
1117
|
+
"message",
|
|
1118
|
+
"type",
|
|
1119
|
+
"field",
|
|
1120
|
+
"transitions"
|
|
1121
|
+
],
|
|
1122
|
+
"additionalProperties": false
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
"type": "object",
|
|
1126
|
+
"properties": {
|
|
1127
|
+
"name": {
|
|
1128
|
+
"type": "string",
|
|
1129
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1130
|
+
"description": "Unique rule name (snake_case)"
|
|
1131
|
+
},
|
|
1132
|
+
"label": {
|
|
1133
|
+
"type": "string",
|
|
1134
|
+
"description": "Human-readable label for the rule listing"
|
|
1135
|
+
},
|
|
1136
|
+
"description": {
|
|
1137
|
+
"type": "string",
|
|
1138
|
+
"description": "Administrative notes explaining the business reason"
|
|
1139
|
+
},
|
|
1140
|
+
"active": {
|
|
1141
|
+
"type": "boolean",
|
|
1142
|
+
"default": true
|
|
1143
|
+
},
|
|
1144
|
+
"events": {
|
|
1145
|
+
"type": "array",
|
|
1146
|
+
"items": {
|
|
1147
|
+
"type": "string",
|
|
1148
|
+
"enum": [
|
|
1149
|
+
"insert",
|
|
1150
|
+
"update",
|
|
1151
|
+
"delete"
|
|
1152
|
+
]
|
|
1153
|
+
},
|
|
1154
|
+
"default": [
|
|
1155
|
+
"insert",
|
|
1156
|
+
"update"
|
|
1157
|
+
],
|
|
1158
|
+
"description": "Validation contexts"
|
|
1159
|
+
},
|
|
1160
|
+
"tags": {
|
|
1161
|
+
"type": "array",
|
|
1162
|
+
"items": {
|
|
1163
|
+
"type": "string"
|
|
1164
|
+
},
|
|
1165
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1166
|
+
},
|
|
1167
|
+
"severity": {
|
|
1168
|
+
"type": "string",
|
|
1169
|
+
"enum": [
|
|
1170
|
+
"error",
|
|
1171
|
+
"warning",
|
|
1172
|
+
"info"
|
|
1173
|
+
],
|
|
1174
|
+
"default": "error"
|
|
1175
|
+
},
|
|
1176
|
+
"message": {
|
|
1177
|
+
"type": "string",
|
|
1178
|
+
"description": "Error message to display to the user"
|
|
1179
|
+
},
|
|
1180
|
+
"type": {
|
|
1181
|
+
"type": "string",
|
|
1182
|
+
"const": "format"
|
|
1183
|
+
},
|
|
1184
|
+
"field": {
|
|
1185
|
+
"type": "string"
|
|
1186
|
+
},
|
|
1187
|
+
"regex": {
|
|
1188
|
+
"type": "string"
|
|
1189
|
+
},
|
|
1190
|
+
"format": {
|
|
1191
|
+
"type": "string",
|
|
1192
|
+
"enum": [
|
|
1193
|
+
"email",
|
|
1194
|
+
"url",
|
|
1195
|
+
"phone",
|
|
1196
|
+
"json"
|
|
1197
|
+
]
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
"required": [
|
|
1201
|
+
"name",
|
|
1202
|
+
"message",
|
|
1203
|
+
"type",
|
|
1204
|
+
"field"
|
|
1205
|
+
],
|
|
1206
|
+
"additionalProperties": false
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"type": "object",
|
|
1210
|
+
"properties": {
|
|
1211
|
+
"name": {
|
|
1212
|
+
"type": "string",
|
|
1213
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1214
|
+
"description": "Unique rule name (snake_case)"
|
|
1215
|
+
},
|
|
1216
|
+
"label": {
|
|
1217
|
+
"type": "string",
|
|
1218
|
+
"description": "Human-readable label for the rule listing"
|
|
1219
|
+
},
|
|
1220
|
+
"description": {
|
|
1221
|
+
"type": "string",
|
|
1222
|
+
"description": "Administrative notes explaining the business reason"
|
|
1223
|
+
},
|
|
1224
|
+
"active": {
|
|
1225
|
+
"type": "boolean",
|
|
1226
|
+
"default": true
|
|
1227
|
+
},
|
|
1228
|
+
"events": {
|
|
1229
|
+
"type": "array",
|
|
1230
|
+
"items": {
|
|
1231
|
+
"type": "string",
|
|
1232
|
+
"enum": [
|
|
1233
|
+
"insert",
|
|
1234
|
+
"update",
|
|
1235
|
+
"delete"
|
|
1236
|
+
]
|
|
1237
|
+
},
|
|
1238
|
+
"default": [
|
|
1239
|
+
"insert",
|
|
1240
|
+
"update"
|
|
1241
|
+
],
|
|
1242
|
+
"description": "Validation contexts"
|
|
1243
|
+
},
|
|
1244
|
+
"tags": {
|
|
1245
|
+
"type": "array",
|
|
1246
|
+
"items": {
|
|
1247
|
+
"type": "string"
|
|
1248
|
+
},
|
|
1249
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1250
|
+
},
|
|
1251
|
+
"severity": {
|
|
1252
|
+
"type": "string",
|
|
1253
|
+
"enum": [
|
|
1254
|
+
"error",
|
|
1255
|
+
"warning",
|
|
1256
|
+
"info"
|
|
1257
|
+
],
|
|
1258
|
+
"default": "error"
|
|
1259
|
+
},
|
|
1260
|
+
"message": {
|
|
1261
|
+
"type": "string",
|
|
1262
|
+
"description": "Error message to display to the user"
|
|
1263
|
+
},
|
|
1264
|
+
"type": {
|
|
1265
|
+
"type": "string",
|
|
1266
|
+
"const": "cross_field"
|
|
1267
|
+
},
|
|
1268
|
+
"condition": {
|
|
1269
|
+
"type": "string",
|
|
1270
|
+
"description": "Formula expression comparing fields (e.g. \"end_date > start_date\")"
|
|
1271
|
+
},
|
|
1272
|
+
"fields": {
|
|
1273
|
+
"type": "array",
|
|
1274
|
+
"items": {
|
|
1275
|
+
"type": "string"
|
|
1276
|
+
},
|
|
1277
|
+
"description": "Fields involved in the validation"
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
"required": [
|
|
1281
|
+
"name",
|
|
1282
|
+
"message",
|
|
1283
|
+
"type",
|
|
1284
|
+
"condition",
|
|
1285
|
+
"fields"
|
|
1286
|
+
],
|
|
1287
|
+
"additionalProperties": false
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
"type": "object",
|
|
1291
|
+
"properties": {
|
|
1292
|
+
"name": {
|
|
1293
|
+
"type": "string",
|
|
1294
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1295
|
+
"description": "Unique rule name (snake_case)"
|
|
1296
|
+
},
|
|
1297
|
+
"label": {
|
|
1298
|
+
"type": "string",
|
|
1299
|
+
"description": "Human-readable label for the rule listing"
|
|
1300
|
+
},
|
|
1301
|
+
"description": {
|
|
1302
|
+
"type": "string",
|
|
1303
|
+
"description": "Administrative notes explaining the business reason"
|
|
1304
|
+
},
|
|
1305
|
+
"active": {
|
|
1306
|
+
"type": "boolean",
|
|
1307
|
+
"default": true
|
|
1308
|
+
},
|
|
1309
|
+
"events": {
|
|
1310
|
+
"type": "array",
|
|
1311
|
+
"items": {
|
|
1312
|
+
"type": "string",
|
|
1313
|
+
"enum": [
|
|
1314
|
+
"insert",
|
|
1315
|
+
"update",
|
|
1316
|
+
"delete"
|
|
1317
|
+
]
|
|
1318
|
+
},
|
|
1319
|
+
"default": [
|
|
1320
|
+
"insert",
|
|
1321
|
+
"update"
|
|
1322
|
+
],
|
|
1323
|
+
"description": "Validation contexts"
|
|
1324
|
+
},
|
|
1325
|
+
"tags": {
|
|
1326
|
+
"type": "array",
|
|
1327
|
+
"items": {
|
|
1328
|
+
"type": "string"
|
|
1329
|
+
},
|
|
1330
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1331
|
+
},
|
|
1332
|
+
"severity": {
|
|
1333
|
+
"type": "string",
|
|
1334
|
+
"enum": [
|
|
1335
|
+
"error",
|
|
1336
|
+
"warning",
|
|
1337
|
+
"info"
|
|
1338
|
+
],
|
|
1339
|
+
"default": "error"
|
|
1340
|
+
},
|
|
1341
|
+
"message": {
|
|
1342
|
+
"type": "string",
|
|
1343
|
+
"description": "Error message to display to the user"
|
|
1344
|
+
},
|
|
1345
|
+
"type": {
|
|
1346
|
+
"type": "string",
|
|
1347
|
+
"const": "json_schema"
|
|
1348
|
+
},
|
|
1349
|
+
"field": {
|
|
1350
|
+
"type": "string",
|
|
1351
|
+
"description": "JSON field to validate"
|
|
1352
|
+
},
|
|
1353
|
+
"schema": {
|
|
1354
|
+
"type": "object",
|
|
1355
|
+
"additionalProperties": {},
|
|
1356
|
+
"description": "JSON Schema object definition"
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
"required": [
|
|
1360
|
+
"name",
|
|
1361
|
+
"message",
|
|
1362
|
+
"type",
|
|
1363
|
+
"field",
|
|
1364
|
+
"schema"
|
|
1365
|
+
],
|
|
1366
|
+
"additionalProperties": false
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"type": "object",
|
|
1370
|
+
"properties": {
|
|
1371
|
+
"name": {
|
|
1372
|
+
"type": "string",
|
|
1373
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1374
|
+
"description": "Unique rule name (snake_case)"
|
|
1375
|
+
},
|
|
1376
|
+
"label": {
|
|
1377
|
+
"type": "string",
|
|
1378
|
+
"description": "Human-readable label for the rule listing"
|
|
1379
|
+
},
|
|
1380
|
+
"description": {
|
|
1381
|
+
"type": "string",
|
|
1382
|
+
"description": "Administrative notes explaining the business reason"
|
|
1383
|
+
},
|
|
1384
|
+
"active": {
|
|
1385
|
+
"type": "boolean",
|
|
1386
|
+
"default": true
|
|
1387
|
+
},
|
|
1388
|
+
"events": {
|
|
1389
|
+
"type": "array",
|
|
1390
|
+
"items": {
|
|
1391
|
+
"type": "string",
|
|
1392
|
+
"enum": [
|
|
1393
|
+
"insert",
|
|
1394
|
+
"update",
|
|
1395
|
+
"delete"
|
|
1396
|
+
]
|
|
1397
|
+
},
|
|
1398
|
+
"default": [
|
|
1399
|
+
"insert",
|
|
1400
|
+
"update"
|
|
1401
|
+
],
|
|
1402
|
+
"description": "Validation contexts"
|
|
1403
|
+
},
|
|
1404
|
+
"tags": {
|
|
1405
|
+
"type": "array",
|
|
1406
|
+
"items": {
|
|
1407
|
+
"type": "string"
|
|
1408
|
+
},
|
|
1409
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1410
|
+
},
|
|
1411
|
+
"severity": {
|
|
1412
|
+
"type": "string",
|
|
1413
|
+
"enum": [
|
|
1414
|
+
"error",
|
|
1415
|
+
"warning",
|
|
1416
|
+
"info"
|
|
1417
|
+
],
|
|
1418
|
+
"default": "error"
|
|
1419
|
+
},
|
|
1420
|
+
"message": {
|
|
1421
|
+
"type": "string",
|
|
1422
|
+
"description": "Error message to display to the user"
|
|
1423
|
+
},
|
|
1424
|
+
"type": {
|
|
1425
|
+
"type": "string",
|
|
1426
|
+
"const": "async"
|
|
1427
|
+
},
|
|
1428
|
+
"field": {
|
|
1429
|
+
"type": "string",
|
|
1430
|
+
"description": "Field to validate"
|
|
1431
|
+
},
|
|
1432
|
+
"validatorUrl": {
|
|
1433
|
+
"type": "string",
|
|
1434
|
+
"description": "External API endpoint for validation"
|
|
1435
|
+
},
|
|
1436
|
+
"method": {
|
|
1437
|
+
"type": "string",
|
|
1438
|
+
"enum": [
|
|
1439
|
+
"GET",
|
|
1440
|
+
"POST"
|
|
1441
|
+
],
|
|
1442
|
+
"default": "GET",
|
|
1443
|
+
"description": "HTTP method for external call"
|
|
1444
|
+
},
|
|
1445
|
+
"headers": {
|
|
1446
|
+
"type": "object",
|
|
1447
|
+
"additionalProperties": {
|
|
1448
|
+
"type": "string"
|
|
1449
|
+
},
|
|
1450
|
+
"description": "Custom headers for the request"
|
|
1451
|
+
},
|
|
1452
|
+
"validatorFunction": {
|
|
1453
|
+
"type": "string",
|
|
1454
|
+
"description": "Reference to custom validator function"
|
|
1455
|
+
},
|
|
1456
|
+
"timeout": {
|
|
1457
|
+
"type": "number",
|
|
1458
|
+
"default": 5000,
|
|
1459
|
+
"description": "Timeout in milliseconds"
|
|
1460
|
+
},
|
|
1461
|
+
"debounce": {
|
|
1462
|
+
"type": "number",
|
|
1463
|
+
"description": "Debounce delay in milliseconds"
|
|
1464
|
+
},
|
|
1465
|
+
"params": {
|
|
1466
|
+
"type": "object",
|
|
1467
|
+
"additionalProperties": {},
|
|
1468
|
+
"description": "Additional parameters to pass to validator"
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1471
|
+
"required": [
|
|
1472
|
+
"name",
|
|
1473
|
+
"message",
|
|
1474
|
+
"type",
|
|
1475
|
+
"field"
|
|
1476
|
+
],
|
|
1477
|
+
"additionalProperties": false
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"type": "object",
|
|
1481
|
+
"properties": {
|
|
1482
|
+
"name": {
|
|
1483
|
+
"type": "string",
|
|
1484
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1485
|
+
"description": "Unique rule name (snake_case)"
|
|
1486
|
+
},
|
|
1487
|
+
"label": {
|
|
1488
|
+
"type": "string",
|
|
1489
|
+
"description": "Human-readable label for the rule listing"
|
|
1490
|
+
},
|
|
1491
|
+
"description": {
|
|
1492
|
+
"type": "string",
|
|
1493
|
+
"description": "Administrative notes explaining the business reason"
|
|
1494
|
+
},
|
|
1495
|
+
"active": {
|
|
1496
|
+
"type": "boolean",
|
|
1497
|
+
"default": true
|
|
1498
|
+
},
|
|
1499
|
+
"events": {
|
|
1500
|
+
"type": "array",
|
|
1501
|
+
"items": {
|
|
1502
|
+
"type": "string",
|
|
1503
|
+
"enum": [
|
|
1504
|
+
"insert",
|
|
1505
|
+
"update",
|
|
1506
|
+
"delete"
|
|
1507
|
+
]
|
|
1508
|
+
},
|
|
1509
|
+
"default": [
|
|
1510
|
+
"insert",
|
|
1511
|
+
"update"
|
|
1512
|
+
],
|
|
1513
|
+
"description": "Validation contexts"
|
|
1514
|
+
},
|
|
1515
|
+
"tags": {
|
|
1516
|
+
"type": "array",
|
|
1517
|
+
"items": {
|
|
1518
|
+
"type": "string"
|
|
1519
|
+
},
|
|
1520
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1521
|
+
},
|
|
1522
|
+
"severity": {
|
|
1523
|
+
"type": "string",
|
|
1524
|
+
"enum": [
|
|
1525
|
+
"error",
|
|
1526
|
+
"warning",
|
|
1527
|
+
"info"
|
|
1528
|
+
],
|
|
1529
|
+
"default": "error"
|
|
1530
|
+
},
|
|
1531
|
+
"message": {
|
|
1532
|
+
"type": "string",
|
|
1533
|
+
"description": "Error message to display to the user"
|
|
1534
|
+
},
|
|
1535
|
+
"type": {
|
|
1536
|
+
"type": "string",
|
|
1537
|
+
"const": "custom"
|
|
1538
|
+
},
|
|
1539
|
+
"handler": {
|
|
1540
|
+
"type": "string",
|
|
1541
|
+
"description": "Name of the custom validation function registered in the system"
|
|
1542
|
+
},
|
|
1543
|
+
"params": {
|
|
1544
|
+
"type": "object",
|
|
1545
|
+
"additionalProperties": {},
|
|
1546
|
+
"description": "Parameters passed to the custom handler"
|
|
1547
|
+
}
|
|
1548
|
+
},
|
|
1549
|
+
"required": [
|
|
1550
|
+
"name",
|
|
1551
|
+
"message",
|
|
1552
|
+
"type",
|
|
1553
|
+
"handler"
|
|
1554
|
+
],
|
|
1555
|
+
"additionalProperties": false
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"type": "object",
|
|
1559
|
+
"properties": {
|
|
1560
|
+
"name": {
|
|
1561
|
+
"type": "string",
|
|
1562
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1563
|
+
"description": "Unique rule name (snake_case)"
|
|
1564
|
+
},
|
|
1565
|
+
"label": {
|
|
1566
|
+
"type": "string",
|
|
1567
|
+
"description": "Human-readable label for the rule listing"
|
|
1568
|
+
},
|
|
1569
|
+
"description": {
|
|
1570
|
+
"type": "string",
|
|
1571
|
+
"description": "Administrative notes explaining the business reason"
|
|
1572
|
+
},
|
|
1573
|
+
"active": {
|
|
1574
|
+
"type": "boolean",
|
|
1575
|
+
"default": true
|
|
1576
|
+
},
|
|
1577
|
+
"events": {
|
|
1578
|
+
"type": "array",
|
|
1579
|
+
"items": {
|
|
1580
|
+
"type": "string",
|
|
1581
|
+
"enum": [
|
|
1582
|
+
"insert",
|
|
1583
|
+
"update",
|
|
1584
|
+
"delete"
|
|
1585
|
+
]
|
|
1586
|
+
},
|
|
1587
|
+
"default": [
|
|
1588
|
+
"insert",
|
|
1589
|
+
"update"
|
|
1590
|
+
],
|
|
1591
|
+
"description": "Validation contexts"
|
|
1592
|
+
},
|
|
1593
|
+
"tags": {
|
|
1594
|
+
"type": "array",
|
|
1595
|
+
"items": {
|
|
1596
|
+
"type": "string"
|
|
1597
|
+
},
|
|
1598
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1599
|
+
},
|
|
1600
|
+
"severity": {
|
|
1601
|
+
"type": "string",
|
|
1602
|
+
"enum": [
|
|
1603
|
+
"error",
|
|
1604
|
+
"warning",
|
|
1605
|
+
"info"
|
|
1606
|
+
],
|
|
1607
|
+
"default": "error"
|
|
1608
|
+
},
|
|
1609
|
+
"message": {
|
|
1610
|
+
"type": "string",
|
|
1611
|
+
"description": "Error message to display to the user"
|
|
1612
|
+
},
|
|
1613
|
+
"type": {
|
|
1614
|
+
"type": "string",
|
|
1615
|
+
"const": "conditional"
|
|
1616
|
+
},
|
|
1617
|
+
"when": {
|
|
1618
|
+
"type": "string",
|
|
1619
|
+
"description": "Condition formula (e.g. \"type = 'enterprise'\")"
|
|
1620
|
+
},
|
|
1621
|
+
"then": {
|
|
1622
|
+
"anyOf": [
|
|
1623
|
+
{
|
|
1624
|
+
"type": "object",
|
|
1625
|
+
"properties": {
|
|
1626
|
+
"name": {
|
|
1627
|
+
"type": "string",
|
|
1628
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1629
|
+
"description": "Unique rule name (snake_case)"
|
|
1630
|
+
},
|
|
1631
|
+
"label": {
|
|
1632
|
+
"type": "string",
|
|
1633
|
+
"description": "Human-readable label for the rule listing"
|
|
1634
|
+
},
|
|
1635
|
+
"description": {
|
|
1636
|
+
"type": "string",
|
|
1637
|
+
"description": "Administrative notes explaining the business reason"
|
|
1638
|
+
},
|
|
1639
|
+
"active": {
|
|
1640
|
+
"type": "boolean",
|
|
1641
|
+
"default": true
|
|
1642
|
+
},
|
|
1643
|
+
"events": {
|
|
1644
|
+
"type": "array",
|
|
1645
|
+
"items": {
|
|
1646
|
+
"type": "string",
|
|
1647
|
+
"enum": [
|
|
1648
|
+
"insert",
|
|
1649
|
+
"update",
|
|
1650
|
+
"delete"
|
|
1651
|
+
]
|
|
1652
|
+
},
|
|
1653
|
+
"default": [
|
|
1654
|
+
"insert",
|
|
1655
|
+
"update"
|
|
1656
|
+
],
|
|
1657
|
+
"description": "Validation contexts"
|
|
1658
|
+
},
|
|
1659
|
+
"tags": {
|
|
1660
|
+
"type": "array",
|
|
1661
|
+
"items": {
|
|
1662
|
+
"type": "string"
|
|
1663
|
+
},
|
|
1664
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1665
|
+
},
|
|
1666
|
+
"severity": {
|
|
1667
|
+
"type": "string",
|
|
1668
|
+
"enum": [
|
|
1669
|
+
"error",
|
|
1670
|
+
"warning",
|
|
1671
|
+
"info"
|
|
1672
|
+
],
|
|
1673
|
+
"default": "error"
|
|
1674
|
+
},
|
|
1675
|
+
"message": {
|
|
1676
|
+
"type": "string",
|
|
1677
|
+
"description": "Error message to display to the user"
|
|
1678
|
+
},
|
|
1679
|
+
"type": {
|
|
1680
|
+
"type": "string",
|
|
1681
|
+
"const": "script"
|
|
1682
|
+
},
|
|
1683
|
+
"condition": {
|
|
1684
|
+
"type": "string",
|
|
1685
|
+
"description": "Formula expression. If TRUE, validation fails. (e.g. amount < 0)"
|
|
1686
|
+
}
|
|
1687
|
+
},
|
|
1688
|
+
"required": [
|
|
1689
|
+
"name",
|
|
1690
|
+
"message",
|
|
1691
|
+
"type",
|
|
1692
|
+
"condition"
|
|
1693
|
+
],
|
|
1694
|
+
"additionalProperties": false
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
"type": "object",
|
|
1698
|
+
"properties": {
|
|
1699
|
+
"name": {
|
|
1700
|
+
"type": "string",
|
|
1701
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1702
|
+
"description": "Unique rule name (snake_case)"
|
|
1703
|
+
},
|
|
1704
|
+
"label": {
|
|
1705
|
+
"type": "string",
|
|
1706
|
+
"description": "Human-readable label for the rule listing"
|
|
1707
|
+
},
|
|
1708
|
+
"description": {
|
|
1709
|
+
"type": "string",
|
|
1710
|
+
"description": "Administrative notes explaining the business reason"
|
|
1711
|
+
},
|
|
1712
|
+
"active": {
|
|
1713
|
+
"type": "boolean",
|
|
1714
|
+
"default": true
|
|
1715
|
+
},
|
|
1716
|
+
"events": {
|
|
1717
|
+
"type": "array",
|
|
1718
|
+
"items": {
|
|
1719
|
+
"type": "string",
|
|
1720
|
+
"enum": [
|
|
1721
|
+
"insert",
|
|
1722
|
+
"update",
|
|
1723
|
+
"delete"
|
|
1724
|
+
]
|
|
1725
|
+
},
|
|
1726
|
+
"default": [
|
|
1727
|
+
"insert",
|
|
1728
|
+
"update"
|
|
1729
|
+
],
|
|
1730
|
+
"description": "Validation contexts"
|
|
1731
|
+
},
|
|
1732
|
+
"tags": {
|
|
1733
|
+
"type": "array",
|
|
1734
|
+
"items": {
|
|
1735
|
+
"type": "string"
|
|
1736
|
+
},
|
|
1737
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1738
|
+
},
|
|
1739
|
+
"severity": {
|
|
1740
|
+
"type": "string",
|
|
1741
|
+
"enum": [
|
|
1742
|
+
"error",
|
|
1743
|
+
"warning",
|
|
1744
|
+
"info"
|
|
1745
|
+
],
|
|
1746
|
+
"default": "error"
|
|
1747
|
+
},
|
|
1748
|
+
"message": {
|
|
1749
|
+
"type": "string",
|
|
1750
|
+
"description": "Error message to display to the user"
|
|
1751
|
+
},
|
|
1752
|
+
"type": {
|
|
1753
|
+
"type": "string",
|
|
1754
|
+
"const": "unique"
|
|
1755
|
+
},
|
|
1756
|
+
"fields": {
|
|
1757
|
+
"type": "array",
|
|
1758
|
+
"items": {
|
|
1759
|
+
"type": "string"
|
|
1760
|
+
},
|
|
1761
|
+
"description": "Fields that must be combined unique"
|
|
1762
|
+
},
|
|
1763
|
+
"scope": {
|
|
1764
|
+
"type": "string",
|
|
1765
|
+
"description": "Formula condition for scope (e.g. active = true)"
|
|
1766
|
+
},
|
|
1767
|
+
"caseSensitive": {
|
|
1768
|
+
"type": "boolean",
|
|
1769
|
+
"default": true
|
|
1770
|
+
}
|
|
1771
|
+
},
|
|
1772
|
+
"required": [
|
|
1773
|
+
"name",
|
|
1774
|
+
"message",
|
|
1775
|
+
"type",
|
|
1776
|
+
"fields"
|
|
1777
|
+
],
|
|
1778
|
+
"additionalProperties": false
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"type": "object",
|
|
1782
|
+
"properties": {
|
|
1783
|
+
"name": {
|
|
1784
|
+
"type": "string",
|
|
1785
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1786
|
+
"description": "Unique rule name (snake_case)"
|
|
1787
|
+
},
|
|
1788
|
+
"label": {
|
|
1789
|
+
"type": "string",
|
|
1790
|
+
"description": "Human-readable label for the rule listing"
|
|
1791
|
+
},
|
|
1792
|
+
"description": {
|
|
1793
|
+
"type": "string",
|
|
1794
|
+
"description": "Administrative notes explaining the business reason"
|
|
1795
|
+
},
|
|
1796
|
+
"active": {
|
|
1797
|
+
"type": "boolean",
|
|
1798
|
+
"default": true
|
|
1799
|
+
},
|
|
1800
|
+
"events": {
|
|
1801
|
+
"type": "array",
|
|
1802
|
+
"items": {
|
|
1803
|
+
"type": "string",
|
|
1804
|
+
"enum": [
|
|
1805
|
+
"insert",
|
|
1806
|
+
"update",
|
|
1807
|
+
"delete"
|
|
1808
|
+
]
|
|
1809
|
+
},
|
|
1810
|
+
"default": [
|
|
1811
|
+
"insert",
|
|
1812
|
+
"update"
|
|
1813
|
+
],
|
|
1814
|
+
"description": "Validation contexts"
|
|
1815
|
+
},
|
|
1816
|
+
"tags": {
|
|
1817
|
+
"type": "array",
|
|
1818
|
+
"items": {
|
|
1819
|
+
"type": "string"
|
|
1820
|
+
},
|
|
1821
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1822
|
+
},
|
|
1823
|
+
"severity": {
|
|
1824
|
+
"type": "string",
|
|
1825
|
+
"enum": [
|
|
1826
|
+
"error",
|
|
1827
|
+
"warning",
|
|
1828
|
+
"info"
|
|
1829
|
+
],
|
|
1830
|
+
"default": "error"
|
|
1831
|
+
},
|
|
1832
|
+
"message": {
|
|
1833
|
+
"type": "string",
|
|
1834
|
+
"description": "Error message to display to the user"
|
|
1835
|
+
},
|
|
1836
|
+
"type": {
|
|
1837
|
+
"type": "string",
|
|
1838
|
+
"const": "state_machine"
|
|
1839
|
+
},
|
|
1840
|
+
"field": {
|
|
1841
|
+
"type": "string",
|
|
1842
|
+
"description": "State field (e.g. status)"
|
|
1843
|
+
},
|
|
1844
|
+
"transitions": {
|
|
1845
|
+
"type": "object",
|
|
1846
|
+
"additionalProperties": {
|
|
1847
|
+
"type": "array",
|
|
1848
|
+
"items": {
|
|
1849
|
+
"type": "string"
|
|
1850
|
+
}
|
|
1851
|
+
},
|
|
1852
|
+
"description": "Map of { OldState: [AllowedNewStates] }"
|
|
1853
|
+
}
|
|
1854
|
+
},
|
|
1855
|
+
"required": [
|
|
1856
|
+
"name",
|
|
1857
|
+
"message",
|
|
1858
|
+
"type",
|
|
1859
|
+
"field",
|
|
1860
|
+
"transitions"
|
|
1861
|
+
],
|
|
1862
|
+
"additionalProperties": false
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
"type": "object",
|
|
1866
|
+
"properties": {
|
|
1867
|
+
"name": {
|
|
1868
|
+
"type": "string",
|
|
1869
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1870
|
+
"description": "Unique rule name (snake_case)"
|
|
1871
|
+
},
|
|
1872
|
+
"label": {
|
|
1873
|
+
"type": "string",
|
|
1874
|
+
"description": "Human-readable label for the rule listing"
|
|
1875
|
+
},
|
|
1876
|
+
"description": {
|
|
1877
|
+
"type": "string",
|
|
1878
|
+
"description": "Administrative notes explaining the business reason"
|
|
1879
|
+
},
|
|
1880
|
+
"active": {
|
|
1881
|
+
"type": "boolean",
|
|
1882
|
+
"default": true
|
|
1883
|
+
},
|
|
1884
|
+
"events": {
|
|
1885
|
+
"type": "array",
|
|
1886
|
+
"items": {
|
|
1887
|
+
"type": "string",
|
|
1888
|
+
"enum": [
|
|
1889
|
+
"insert",
|
|
1890
|
+
"update",
|
|
1891
|
+
"delete"
|
|
1892
|
+
]
|
|
1893
|
+
},
|
|
1894
|
+
"default": [
|
|
1895
|
+
"insert",
|
|
1896
|
+
"update"
|
|
1897
|
+
],
|
|
1898
|
+
"description": "Validation contexts"
|
|
1899
|
+
},
|
|
1900
|
+
"tags": {
|
|
1901
|
+
"type": "array",
|
|
1902
|
+
"items": {
|
|
1903
|
+
"type": "string"
|
|
1904
|
+
},
|
|
1905
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1906
|
+
},
|
|
1907
|
+
"severity": {
|
|
1908
|
+
"type": "string",
|
|
1909
|
+
"enum": [
|
|
1910
|
+
"error",
|
|
1911
|
+
"warning",
|
|
1912
|
+
"info"
|
|
1913
|
+
],
|
|
1914
|
+
"default": "error"
|
|
1915
|
+
},
|
|
1916
|
+
"message": {
|
|
1917
|
+
"type": "string",
|
|
1918
|
+
"description": "Error message to display to the user"
|
|
1919
|
+
},
|
|
1920
|
+
"type": {
|
|
1921
|
+
"type": "string",
|
|
1922
|
+
"const": "format"
|
|
1923
|
+
},
|
|
1924
|
+
"field": {
|
|
1925
|
+
"type": "string"
|
|
1926
|
+
},
|
|
1927
|
+
"regex": {
|
|
1928
|
+
"type": "string"
|
|
1929
|
+
},
|
|
1930
|
+
"format": {
|
|
1931
|
+
"type": "string",
|
|
1932
|
+
"enum": [
|
|
1933
|
+
"email",
|
|
1934
|
+
"url",
|
|
1935
|
+
"phone",
|
|
1936
|
+
"json"
|
|
1937
|
+
]
|
|
1938
|
+
}
|
|
1939
|
+
},
|
|
1940
|
+
"required": [
|
|
1941
|
+
"name",
|
|
1942
|
+
"message",
|
|
1943
|
+
"type",
|
|
1944
|
+
"field"
|
|
1945
|
+
],
|
|
1946
|
+
"additionalProperties": false
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
"type": "object",
|
|
1950
|
+
"properties": {
|
|
1951
|
+
"name": {
|
|
1952
|
+
"type": "string",
|
|
1953
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
1954
|
+
"description": "Unique rule name (snake_case)"
|
|
1955
|
+
},
|
|
1956
|
+
"label": {
|
|
1957
|
+
"type": "string",
|
|
1958
|
+
"description": "Human-readable label for the rule listing"
|
|
1959
|
+
},
|
|
1960
|
+
"description": {
|
|
1961
|
+
"type": "string",
|
|
1962
|
+
"description": "Administrative notes explaining the business reason"
|
|
1963
|
+
},
|
|
1964
|
+
"active": {
|
|
1965
|
+
"type": "boolean",
|
|
1966
|
+
"default": true
|
|
1967
|
+
},
|
|
1968
|
+
"events": {
|
|
1969
|
+
"type": "array",
|
|
1970
|
+
"items": {
|
|
1971
|
+
"type": "string",
|
|
1972
|
+
"enum": [
|
|
1973
|
+
"insert",
|
|
1974
|
+
"update",
|
|
1975
|
+
"delete"
|
|
1976
|
+
]
|
|
1977
|
+
},
|
|
1978
|
+
"default": [
|
|
1979
|
+
"insert",
|
|
1980
|
+
"update"
|
|
1981
|
+
],
|
|
1982
|
+
"description": "Validation contexts"
|
|
1983
|
+
},
|
|
1984
|
+
"tags": {
|
|
1985
|
+
"type": "array",
|
|
1986
|
+
"items": {
|
|
1987
|
+
"type": "string"
|
|
1988
|
+
},
|
|
1989
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
1990
|
+
},
|
|
1991
|
+
"severity": {
|
|
1992
|
+
"type": "string",
|
|
1993
|
+
"enum": [
|
|
1994
|
+
"error",
|
|
1995
|
+
"warning",
|
|
1996
|
+
"info"
|
|
1997
|
+
],
|
|
1998
|
+
"default": "error"
|
|
1999
|
+
},
|
|
2000
|
+
"message": {
|
|
2001
|
+
"type": "string",
|
|
2002
|
+
"description": "Error message to display to the user"
|
|
2003
|
+
},
|
|
2004
|
+
"type": {
|
|
2005
|
+
"type": "string",
|
|
2006
|
+
"const": "cross_field"
|
|
2007
|
+
},
|
|
2008
|
+
"condition": {
|
|
2009
|
+
"type": "string",
|
|
2010
|
+
"description": "Formula expression comparing fields (e.g. \"end_date > start_date\")"
|
|
2011
|
+
},
|
|
2012
|
+
"fields": {
|
|
2013
|
+
"type": "array",
|
|
2014
|
+
"items": {
|
|
2015
|
+
"type": "string"
|
|
2016
|
+
},
|
|
2017
|
+
"description": "Fields involved in the validation"
|
|
2018
|
+
}
|
|
2019
|
+
},
|
|
2020
|
+
"required": [
|
|
2021
|
+
"name",
|
|
2022
|
+
"message",
|
|
2023
|
+
"type",
|
|
2024
|
+
"condition",
|
|
2025
|
+
"fields"
|
|
2026
|
+
],
|
|
2027
|
+
"additionalProperties": false
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
"type": "object",
|
|
2031
|
+
"properties": {
|
|
2032
|
+
"name": {
|
|
2033
|
+
"type": "string",
|
|
2034
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
2035
|
+
"description": "Unique rule name (snake_case)"
|
|
2036
|
+
},
|
|
2037
|
+
"label": {
|
|
2038
|
+
"type": "string",
|
|
2039
|
+
"description": "Human-readable label for the rule listing"
|
|
2040
|
+
},
|
|
2041
|
+
"description": {
|
|
2042
|
+
"type": "string",
|
|
2043
|
+
"description": "Administrative notes explaining the business reason"
|
|
2044
|
+
},
|
|
2045
|
+
"active": {
|
|
2046
|
+
"type": "boolean",
|
|
2047
|
+
"default": true
|
|
2048
|
+
},
|
|
2049
|
+
"events": {
|
|
2050
|
+
"type": "array",
|
|
2051
|
+
"items": {
|
|
2052
|
+
"type": "string",
|
|
2053
|
+
"enum": [
|
|
2054
|
+
"insert",
|
|
2055
|
+
"update",
|
|
2056
|
+
"delete"
|
|
2057
|
+
]
|
|
2058
|
+
},
|
|
2059
|
+
"default": [
|
|
2060
|
+
"insert",
|
|
2061
|
+
"update"
|
|
2062
|
+
],
|
|
2063
|
+
"description": "Validation contexts"
|
|
2064
|
+
},
|
|
2065
|
+
"tags": {
|
|
2066
|
+
"type": "array",
|
|
2067
|
+
"items": {
|
|
2068
|
+
"type": "string"
|
|
2069
|
+
},
|
|
2070
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
2071
|
+
},
|
|
2072
|
+
"severity": {
|
|
2073
|
+
"type": "string",
|
|
2074
|
+
"enum": [
|
|
2075
|
+
"error",
|
|
2076
|
+
"warning",
|
|
2077
|
+
"info"
|
|
2078
|
+
],
|
|
2079
|
+
"default": "error"
|
|
2080
|
+
},
|
|
2081
|
+
"message": {
|
|
2082
|
+
"type": "string",
|
|
2083
|
+
"description": "Error message to display to the user"
|
|
2084
|
+
},
|
|
2085
|
+
"type": {
|
|
2086
|
+
"type": "string",
|
|
2087
|
+
"const": "json_schema"
|
|
2088
|
+
},
|
|
2089
|
+
"field": {
|
|
2090
|
+
"type": "string",
|
|
2091
|
+
"description": "JSON field to validate"
|
|
2092
|
+
},
|
|
2093
|
+
"schema": {
|
|
2094
|
+
"type": "object",
|
|
2095
|
+
"additionalProperties": {},
|
|
2096
|
+
"description": "JSON Schema object definition"
|
|
2097
|
+
}
|
|
2098
|
+
},
|
|
2099
|
+
"required": [
|
|
2100
|
+
"name",
|
|
2101
|
+
"message",
|
|
2102
|
+
"type",
|
|
2103
|
+
"field",
|
|
2104
|
+
"schema"
|
|
2105
|
+
],
|
|
2106
|
+
"additionalProperties": false
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
"type": "object",
|
|
2110
|
+
"properties": {
|
|
2111
|
+
"name": {
|
|
2112
|
+
"type": "string",
|
|
2113
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
2114
|
+
"description": "Unique rule name (snake_case)"
|
|
2115
|
+
},
|
|
2116
|
+
"label": {
|
|
2117
|
+
"type": "string",
|
|
2118
|
+
"description": "Human-readable label for the rule listing"
|
|
2119
|
+
},
|
|
2120
|
+
"description": {
|
|
2121
|
+
"type": "string",
|
|
2122
|
+
"description": "Administrative notes explaining the business reason"
|
|
2123
|
+
},
|
|
2124
|
+
"active": {
|
|
2125
|
+
"type": "boolean",
|
|
2126
|
+
"default": true
|
|
2127
|
+
},
|
|
2128
|
+
"events": {
|
|
2129
|
+
"type": "array",
|
|
2130
|
+
"items": {
|
|
2131
|
+
"type": "string",
|
|
2132
|
+
"enum": [
|
|
2133
|
+
"insert",
|
|
2134
|
+
"update",
|
|
2135
|
+
"delete"
|
|
2136
|
+
]
|
|
2137
|
+
},
|
|
2138
|
+
"default": [
|
|
2139
|
+
"insert",
|
|
2140
|
+
"update"
|
|
2141
|
+
],
|
|
2142
|
+
"description": "Validation contexts"
|
|
2143
|
+
},
|
|
2144
|
+
"tags": {
|
|
2145
|
+
"type": "array",
|
|
2146
|
+
"items": {
|
|
2147
|
+
"type": "string"
|
|
2148
|
+
},
|
|
2149
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
2150
|
+
},
|
|
2151
|
+
"severity": {
|
|
2152
|
+
"type": "string",
|
|
2153
|
+
"enum": [
|
|
2154
|
+
"error",
|
|
2155
|
+
"warning",
|
|
2156
|
+
"info"
|
|
2157
|
+
],
|
|
2158
|
+
"default": "error"
|
|
2159
|
+
},
|
|
2160
|
+
"message": {
|
|
2161
|
+
"type": "string",
|
|
2162
|
+
"description": "Error message to display to the user"
|
|
2163
|
+
},
|
|
2164
|
+
"type": {
|
|
2165
|
+
"type": "string",
|
|
2166
|
+
"const": "async"
|
|
2167
|
+
},
|
|
2168
|
+
"field": {
|
|
2169
|
+
"type": "string",
|
|
2170
|
+
"description": "Field to validate"
|
|
2171
|
+
},
|
|
2172
|
+
"validatorUrl": {
|
|
2173
|
+
"type": "string",
|
|
2174
|
+
"description": "External API endpoint for validation"
|
|
2175
|
+
},
|
|
2176
|
+
"method": {
|
|
2177
|
+
"type": "string",
|
|
2178
|
+
"enum": [
|
|
2179
|
+
"GET",
|
|
2180
|
+
"POST"
|
|
2181
|
+
],
|
|
2182
|
+
"default": "GET",
|
|
2183
|
+
"description": "HTTP method for external call"
|
|
2184
|
+
},
|
|
2185
|
+
"headers": {
|
|
2186
|
+
"type": "object",
|
|
2187
|
+
"additionalProperties": {
|
|
2188
|
+
"type": "string"
|
|
2189
|
+
},
|
|
2190
|
+
"description": "Custom headers for the request"
|
|
2191
|
+
},
|
|
2192
|
+
"validatorFunction": {
|
|
2193
|
+
"type": "string",
|
|
2194
|
+
"description": "Reference to custom validator function"
|
|
2195
|
+
},
|
|
2196
|
+
"timeout": {
|
|
2197
|
+
"type": "number",
|
|
2198
|
+
"default": 5000,
|
|
2199
|
+
"description": "Timeout in milliseconds"
|
|
2200
|
+
},
|
|
2201
|
+
"debounce": {
|
|
2202
|
+
"type": "number",
|
|
2203
|
+
"description": "Debounce delay in milliseconds"
|
|
2204
|
+
},
|
|
2205
|
+
"params": {
|
|
2206
|
+
"type": "object",
|
|
2207
|
+
"additionalProperties": {},
|
|
2208
|
+
"description": "Additional parameters to pass to validator"
|
|
2209
|
+
}
|
|
2210
|
+
},
|
|
2211
|
+
"required": [
|
|
2212
|
+
"name",
|
|
2213
|
+
"message",
|
|
2214
|
+
"type",
|
|
2215
|
+
"field"
|
|
2216
|
+
],
|
|
2217
|
+
"additionalProperties": false
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
"type": "object",
|
|
2221
|
+
"properties": {
|
|
2222
|
+
"name": {
|
|
2223
|
+
"type": "string",
|
|
2224
|
+
"pattern": "^[a-z_][a-z0-9_]*$",
|
|
2225
|
+
"description": "Unique rule name (snake_case)"
|
|
2226
|
+
},
|
|
2227
|
+
"label": {
|
|
2228
|
+
"type": "string",
|
|
2229
|
+
"description": "Human-readable label for the rule listing"
|
|
2230
|
+
},
|
|
2231
|
+
"description": {
|
|
2232
|
+
"type": "string",
|
|
2233
|
+
"description": "Administrative notes explaining the business reason"
|
|
2234
|
+
},
|
|
2235
|
+
"active": {
|
|
2236
|
+
"type": "boolean",
|
|
2237
|
+
"default": true
|
|
2238
|
+
},
|
|
2239
|
+
"events": {
|
|
2240
|
+
"type": "array",
|
|
2241
|
+
"items": {
|
|
2242
|
+
"type": "string",
|
|
2243
|
+
"enum": [
|
|
2244
|
+
"insert",
|
|
2245
|
+
"update",
|
|
2246
|
+
"delete"
|
|
2247
|
+
]
|
|
2248
|
+
},
|
|
2249
|
+
"default": [
|
|
2250
|
+
"insert",
|
|
2251
|
+
"update"
|
|
2252
|
+
],
|
|
2253
|
+
"description": "Validation contexts"
|
|
2254
|
+
},
|
|
2255
|
+
"tags": {
|
|
2256
|
+
"type": "array",
|
|
2257
|
+
"items": {
|
|
2258
|
+
"type": "string"
|
|
2259
|
+
},
|
|
2260
|
+
"description": "Categorization tags (e.g., \"compliance\", \"billing\")"
|
|
2261
|
+
},
|
|
2262
|
+
"severity": {
|
|
2263
|
+
"type": "string",
|
|
2264
|
+
"enum": [
|
|
2265
|
+
"error",
|
|
2266
|
+
"warning",
|
|
2267
|
+
"info"
|
|
2268
|
+
],
|
|
2269
|
+
"default": "error"
|
|
2270
|
+
},
|
|
2271
|
+
"message": {
|
|
2272
|
+
"type": "string",
|
|
2273
|
+
"description": "Error message to display to the user"
|
|
2274
|
+
},
|
|
2275
|
+
"type": {
|
|
2276
|
+
"type": "string",
|
|
2277
|
+
"const": "custom"
|
|
2278
|
+
},
|
|
2279
|
+
"handler": {
|
|
2280
|
+
"type": "string",
|
|
2281
|
+
"description": "Name of the custom validation function registered in the system"
|
|
2282
|
+
},
|
|
2283
|
+
"params": {
|
|
2284
|
+
"type": "object",
|
|
2285
|
+
"additionalProperties": {},
|
|
2286
|
+
"description": "Parameters passed to the custom handler"
|
|
2287
|
+
}
|
|
2288
|
+
},
|
|
2289
|
+
"required": [
|
|
2290
|
+
"name",
|
|
2291
|
+
"message",
|
|
2292
|
+
"type",
|
|
2293
|
+
"handler"
|
|
2294
|
+
],
|
|
2295
|
+
"additionalProperties": false
|
|
2296
|
+
},
|
|
2297
|
+
{}
|
|
2298
|
+
],
|
|
2299
|
+
"description": "Validation rule to apply when condition is true"
|
|
2300
|
+
},
|
|
2301
|
+
"otherwise": {
|
|
2302
|
+
"description": "Validation rule to apply when condition is false"
|
|
2303
|
+
}
|
|
2304
|
+
},
|
|
2305
|
+
"required": [
|
|
2306
|
+
"name",
|
|
2307
|
+
"message",
|
|
2308
|
+
"type",
|
|
2309
|
+
"when",
|
|
2310
|
+
"then"
|
|
2311
|
+
],
|
|
2312
|
+
"additionalProperties": false
|
|
2313
|
+
}
|
|
2314
|
+
]
|
|
2315
|
+
}
|
|
2316
|
+
},
|
|
2317
|
+
"indexes": {
|
|
2318
|
+
"type": "array",
|
|
2319
|
+
"items": {
|
|
2320
|
+
"type": "object",
|
|
2321
|
+
"properties": {
|
|
2322
|
+
"name": {
|
|
2323
|
+
"type": "string",
|
|
2324
|
+
"description": "Index name (auto-generated if not provided)"
|
|
2325
|
+
},
|
|
2326
|
+
"fields": {
|
|
2327
|
+
"type": "array",
|
|
2328
|
+
"items": {
|
|
2329
|
+
"type": "string"
|
|
2330
|
+
},
|
|
2331
|
+
"description": "Fields included in the index"
|
|
2332
|
+
},
|
|
2333
|
+
"type": {
|
|
2334
|
+
"type": "string",
|
|
2335
|
+
"enum": [
|
|
2336
|
+
"btree",
|
|
2337
|
+
"hash",
|
|
2338
|
+
"gin",
|
|
2339
|
+
"gist",
|
|
2340
|
+
"fulltext"
|
|
2341
|
+
],
|
|
2342
|
+
"default": "btree",
|
|
2343
|
+
"description": "Index algorithm type"
|
|
2344
|
+
},
|
|
2345
|
+
"unique": {
|
|
2346
|
+
"type": "boolean",
|
|
2347
|
+
"default": false,
|
|
2348
|
+
"description": "Whether the index enforces uniqueness"
|
|
2349
|
+
},
|
|
2350
|
+
"partial": {
|
|
2351
|
+
"type": "string",
|
|
2352
|
+
"description": "Partial index condition (SQL WHERE clause for conditional indexes)"
|
|
2353
|
+
}
|
|
2354
|
+
},
|
|
2355
|
+
"required": [
|
|
2356
|
+
"fields"
|
|
2357
|
+
],
|
|
2358
|
+
"additionalProperties": false
|
|
2359
|
+
}
|
|
2360
|
+
},
|
|
2361
|
+
"priority": {
|
|
2362
|
+
"type": "integer",
|
|
2363
|
+
"minimum": 0,
|
|
2364
|
+
"maximum": 999,
|
|
2365
|
+
"default": 200,
|
|
2366
|
+
"description": "Merge priority (higher = applied later)"
|
|
2367
|
+
}
|
|
2368
|
+
},
|
|
2369
|
+
"required": [
|
|
2370
|
+
"extend"
|
|
2371
|
+
],
|
|
2372
|
+
"additionalProperties": false
|
|
2373
|
+
}
|
|
2374
|
+
},
|
|
2375
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
2376
|
+
}
|