nucleus-core-ts 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +84 -14
  2. package/dist/client.js +1 -1
  3. package/dist/dist/index.d.ts +3 -3
  4. package/dist/fe/index.js +1 -1
  5. package/dist/index-0yyw12k6.js +1 -1
  6. package/dist/index-tv67j5qd.js +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/infra/scripts/nucleus-init.d.ts +3 -0
  9. package/dist/infra/templates/backend/src/index.d.ts +2 -0
  10. package/dist/infra/templates/frontend/app/change-password/page.d.ts +2 -0
  11. package/dist/infra/templates/frontend/app/devices/page.d.ts +2 -0
  12. package/dist/infra/templates/frontend/app/forgot-password/page.d.ts +2 -0
  13. package/dist/infra/templates/frontend/app/layout.d.ts +7 -0
  14. package/dist/infra/templates/frontend/app/login/page.d.ts +2 -0
  15. package/dist/infra/templates/frontend/app/page.d.ts +2 -0
  16. package/dist/infra/templates/frontend/app/profile/page.d.ts +2 -0
  17. package/dist/infra/templates/frontend/app/register/page.d.ts +2 -0
  18. package/dist/infra/templates/frontend/app/reset-password/page.d.ts +2 -0
  19. package/dist/infra/templates/frontend/app/set-password/page.d.ts +2 -0
  20. package/dist/infra/templates/frontend/app/verify-email/page.d.ts +2 -0
  21. package/dist/infra/templates/frontend/app/verify-magic-link/page.d.ts +2 -0
  22. package/dist/infra/templates/frontend/lib/api/endpoints.d.ts +10 -0
  23. package/dist/infra/templates/frontend/lib/api/factory.d.ts +2 -0
  24. package/dist/infra/templates/frontend/lib/api/hook.d.ts +4 -0
  25. package/dist/infra/templates/frontend/next.config.d.ts +4 -0
  26. package/dist/infra/templates/frontend/postcss.config.d.mts +7 -0
  27. package/dist/infra/templates/frontend/server.d.ts +4 -0
  28. package/dist/src/Client/Proxy/index.js +1 -1
  29. package/dist/src/types.d.ts +1 -1
  30. package/package.json +2 -2
  31. package/schemas/config.nucleus.json +1027 -1009
  32. package/schemas/nucleus.tables.schema.json +20 -18
  33. package/schemas/table.schema.json +529 -497
@@ -1,498 +1,530 @@
1
1
  {
2
- "$id": "table.schema.json",
3
- "$schema": "https://json-schema.org/draft/2020-12/schema",
4
- "title": "Nucleus Table Definition",
5
- "description": "Generated from NucleusTable interface in types.ts",
6
- "type": "object",
7
- "properties": {
8
- "table_name": {
9
- "type": "string",
10
- "description": "Table name in database",
11
- "minLength": 1,
12
- "maxLength": 100
13
- },
14
- "feature_set": {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "enum": [
19
- "authentication",
20
- "authorization",
21
- "audit",
22
- "notification",
23
- "verification"
24
- ]
25
- },
26
- "description": "Feature set this table belongs to"
27
- },
28
- "add_base_columns": {
29
- "type": "boolean",
30
- "description": "Add base columns (id, created_at, etc.)",
31
- "default": true
32
- },
33
- "is_form_data": {
34
- "type": "boolean",
35
- "description": "Entity needs multipart form data",
36
- "default": false
37
- },
38
- "available_app_ids": {
39
- "type": "array",
40
- "items": {
41
- "type": "string"
42
- },
43
- "description": "Available app IDs",
44
- "default": ["*"]
45
- },
46
- "available_schemas": {
47
- "type": "array",
48
- "items": {
49
- "type": "string"
50
- },
51
- "description": "Available schemas",
52
- "default": ["*"]
53
- },
54
- "excluded_schemas": {
55
- "type": "array",
56
- "items": {
57
- "type": "string"
58
- },
59
- "description": "Excluded schemas"
60
- },
61
- "excluded_methods": {
62
- "type": "array",
63
- "items": {
64
- "type": "string",
65
- "enum": [
66
- "GET",
67
- "POST",
68
- "PUT",
69
- "DELETE",
70
- "PATCH",
71
- "TOGGLE",
72
- "VERIFICATION"
73
- ]
74
- },
75
- "description": "Excluded HTTP methods"
76
- },
77
- "is_public": {
78
- "type": "object",
79
- "description": "Public access per method",
80
- "properties": {
81
- "GET": {
82
- "type": "boolean",
83
- "default": false
84
- },
85
- "POST": {
86
- "type": "boolean",
87
- "default": false
88
- },
89
- "PUT": {
90
- "type": "boolean",
91
- "default": false
92
- },
93
- "DELETE": {
94
- "type": "boolean",
95
- "default": false
96
- },
97
- "PATCH": {
98
- "type": "boolean",
99
- "default": false
100
- },
101
- "TOGGLE": {
102
- "type": "boolean",
103
- "default": false
104
- },
105
- "VERIFICATION": {
106
- "type": "boolean",
107
- "default": false
108
- }
109
- }
110
- },
111
- "columns": {
112
- "type": "array",
113
- "items": {
114
- "$ref": "#/$defs/column"
115
- },
116
- "description": "Column definitions"
117
- },
118
- "indexes": {
119
- "type": "array",
120
- "items": {
121
- "$ref": "#/$defs/index"
122
- },
123
- "description": "Index definitions"
124
- },
125
- "constraints": {
126
- "$ref": "#/$defs/constraints"
127
- },
128
- "group_name": {
129
- "type": "string",
130
- "description": "Group name for organization",
131
- "minLength": 1
132
- },
133
- "bulk_endpoints_enabled": {
134
- "type": "boolean",
135
- "description": "Enable bulk endpoints",
136
- "default": false
137
- }
138
- },
139
- "required": ["table_name"],
140
- "additionalProperties": false,
141
- "$defs": {
142
- "column": {
143
- "type": "object",
144
- "properties": {
145
- "name": {
146
- "type": "string",
147
- "description": "Column name",
148
- "minLength": 1
149
- },
150
- "type": {
151
- "type": "string",
152
- "description": "Drizzle PostgreSQL column type",
153
- "enum": [
154
- "integer",
155
- "smallint",
156
- "bigint",
157
- "serial",
158
- "smallserial",
159
- "bigserial",
160
- "real",
161
- "doublePrecision",
162
- "numeric",
163
- "decimal",
164
- "text",
165
- "varchar",
166
- "char",
167
- "uuid",
168
- "boolean",
169
- "date",
170
- "time",
171
- "timestamp",
172
- "timestamptz",
173
- "interval",
174
- "json",
175
- "jsonb",
176
- "bytea",
177
- "inet",
178
- "cidr",
179
- "macaddr",
180
- "macaddr8",
181
- "bit",
182
- "bitVarying",
183
- "point",
184
- "line",
185
- "lseg",
186
- "box",
187
- "path",
188
- "polygon",
189
- "circle",
190
- "tsvector",
191
- "tsquery",
192
- "xml",
193
- "money",
194
- "int4range",
195
- "int8range",
196
- "numrange",
197
- "tsrange",
198
- "tstzrange",
199
- "daterange",
200
- "int4multirange",
201
- "int8multirange",
202
- "nummultirange",
203
- "tsmultirange",
204
- "tstzmultirange",
205
- "datemultirange",
206
- "vector",
207
- "geometry",
208
- "geography",
209
- "customType"
210
- ]
211
- },
212
- "length": {
213
- "type": "number",
214
- "description": "Column length (for varchar, char)"
215
- },
216
- "precision": {
217
- "type": "number",
218
- "description": "Numeric precision"
219
- },
220
- "scale": {
221
- "type": "number",
222
- "description": "Numeric scale"
223
- },
224
- "dimensions": {
225
- "type": "number",
226
- "description": "Vector dimensions"
227
- },
228
- "mode": {
229
- "type": "string",
230
- "enum": ["string", "date", "json", "number"],
231
- "description": "Column mode"
232
- },
233
- "withTimezone": {
234
- "type": "boolean",
235
- "description": "Include timezone for timestamp types"
236
- },
237
- "nullable": {
238
- "type": "boolean",
239
- "description": "Column is nullable"
240
- },
241
- "notNull": {
242
- "type": "boolean",
243
- "description": "Column is NOT NULL"
244
- },
245
- "unique": {
246
- "type": "boolean",
247
- "description": "Column has unique constraint"
248
- },
249
- "primaryKey": {
250
- "type": "boolean",
251
- "description": "Column is primary key"
252
- },
253
- "default": {
254
- "description": "Default value"
255
- },
256
- "defaultRaw": {
257
- "type": "string",
258
- "description": "Raw SQL default expression"
259
- },
260
- "references": {
261
- "$ref": "#/$defs/columnReference"
262
- },
263
- "array": {
264
- "type": "boolean",
265
- "description": "Column is array type"
266
- },
267
- "arrayDimensions": {
268
- "type": "number",
269
- "description": "Array dimensions"
270
- },
271
- "enumValues": {
272
- "type": "array",
273
- "items": {
274
- "type": "string"
275
- },
276
- "description": "Enum values (shorthand)"
277
- },
278
- "enum": {
279
- "$ref": "#/$defs/columnEnum"
280
- },
281
- "generatedAlwaysAs": {
282
- "type": "string",
283
- "description": "Generated column expression"
284
- },
285
- "generatedAlwaysAsIdentity": {
286
- "type": "boolean"
287
- },
288
- "generatedByDefaultAsIdentity": {
289
- "type": "boolean"
290
- },
291
- "check": {
292
- "type": "string",
293
- "description": "Check constraint expression"
294
- },
295
- "comment": {
296
- "type": "string",
297
- "description": "Column comment"
298
- },
299
- "validation": {
300
- "$ref": "#/$defs/columnValidation"
301
- },
302
- "sanitize": {
303
- "type": "array",
304
- "items": {
305
- "type": "string",
306
- "enum": [
307
- "trim",
308
- "lowercase",
309
- "uppercase",
310
- "escapeHtml",
311
- "stripTags",
312
- "normalizeEmail",
313
- "toNumber",
314
- "toBoolean",
315
- "slugify"
316
- ]
317
- },
318
- "description": "Sanitize options"
319
- }
320
- },
321
- "required": ["name", "type"]
322
- },
323
- "index": {
324
- "type": "object",
325
- "properties": {
326
- "name": {
327
- "type": "string",
328
- "description": "Index name"
329
- },
330
- "columns": {
331
- "type": "array",
332
- "items": {
333
- "type": "string"
334
- },
335
- "description": "Indexed columns"
336
- },
337
- "unique": {
338
- "type": "boolean",
339
- "description": "Unique index"
340
- },
341
- "using": {
342
- "type": "string",
343
- "enum": ["btree", "hash", "gist", "spgist", "gin", "brin"],
344
- "description": "Index method"
345
- },
346
- "where": {
347
- "type": "string",
348
- "description": "Partial index WHERE clause"
349
- },
350
- "concurrently": {
351
- "type": "boolean",
352
- "description": "Create index concurrently"
353
- }
354
- },
355
- "required": ["columns"]
356
- },
357
- "constraints": {
358
- "type": "object",
359
- "properties": {
360
- "primaryKey": {
361
- "type": "array",
362
- "items": {
363
- "type": "string"
364
- }
365
- },
366
- "unique": {
367
- "type": "array",
368
- "items": {
369
- "$ref": "#/$defs/uniqueConstraint"
370
- }
371
- },
372
- "check": {
373
- "type": "array",
374
- "items": {
375
- "$ref": "#/$defs/checkConstraint"
376
- }
377
- }
378
- }
379
- },
380
- "uniqueConstraint": {
381
- "type": "object",
382
- "properties": {
383
- "name": {
384
- "type": "string"
385
- },
386
- "columns": {
387
- "type": "array",
388
- "items": {
389
- "type": "string"
390
- }
391
- }
392
- },
393
- "required": ["columns"]
394
- },
395
- "checkConstraint": {
396
- "type": "object",
397
- "properties": {
398
- "name": {
399
- "type": "string"
400
- },
401
- "expression": {
402
- "type": "string"
403
- }
404
- },
405
- "required": ["expression"]
406
- },
407
- "columnReference": {
408
- "type": "object",
409
- "properties": {
410
- "table": {
411
- "type": "string",
412
- "description": "Referenced table name"
413
- },
414
- "column": {
415
- "type": "string",
416
- "description": "Referenced column name"
417
- },
418
- "onDelete": {
419
- "type": "string",
420
- "enum": [
421
- "cascade",
422
- "restrict",
423
- "no action",
424
- "set null",
425
- "set default"
426
- ],
427
- "description": "ON DELETE action"
428
- },
429
- "onUpdate": {
430
- "type": "string",
431
- "enum": [
432
- "cascade",
433
- "restrict",
434
- "no action",
435
- "set null",
436
- "set default"
437
- ],
438
- "description": "ON UPDATE action"
439
- }
440
- },
441
- "required": ["table"]
442
- },
443
- "columnEnum": {
444
- "type": "object",
445
- "properties": {
446
- "name": {
447
- "type": "string",
448
- "description": "Enum type name"
449
- },
450
- "values": {
451
- "type": "array",
452
- "items": {
453
- "type": "string"
454
- },
455
- "description": "Enum values"
456
- }
457
- },
458
- "required": ["name", "values"]
459
- },
460
- "columnValidation": {
461
- "type": "object",
462
- "properties": {
463
- "minLength": {
464
- "type": "number"
465
- },
466
- "maxLength": {
467
- "type": "number"
468
- },
469
- "min": {
470
- "type": "number"
471
- },
472
- "max": {
473
- "type": "number"
474
- },
475
- "pattern": {
476
- "type": "string"
477
- },
478
- "format": {
479
- "type": "string",
480
- "enum": [
481
- "email",
482
- "url",
483
- "uuid",
484
- "date",
485
- "datetime",
486
- "time",
487
- "uri",
488
- "ipv4",
489
- "ipv6"
490
- ]
491
- },
492
- "customMessage": {
493
- "type": "string"
494
- }
495
- }
496
- }
497
- }
498
- }
2
+ "$id": "table.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "title": "Nucleus Table Definition",
5
+ "description": "Generated from NucleusTable interface in types.ts",
6
+ "type": "object",
7
+ "properties": {
8
+ "table_name": {
9
+ "type": "string",
10
+ "description": "Table name in database",
11
+ "minLength": 1,
12
+ "maxLength": 100
13
+ },
14
+ "feature_set": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "enum": [
19
+ "authentication",
20
+ "authorization",
21
+ "audit",
22
+ "notification",
23
+ "verification"
24
+ ]
25
+ },
26
+ "description": "Feature set this table belongs to"
27
+ },
28
+ "add_base_columns": {
29
+ "type": "boolean",
30
+ "description": "Add base columns (id, created_at, etc.)",
31
+ "default": true
32
+ },
33
+ "is_form_data": {
34
+ "type": "boolean",
35
+ "description": "Entity needs multipart form data",
36
+ "default": false
37
+ },
38
+ "available_app_ids": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string"
42
+ },
43
+ "description": "Available app IDs",
44
+ "default": [
45
+ "*"
46
+ ]
47
+ },
48
+ "available_schemas": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string"
52
+ },
53
+ "description": "Available schemas",
54
+ "default": [
55
+ "*"
56
+ ]
57
+ },
58
+ "excluded_schemas": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "string"
62
+ },
63
+ "description": "Excluded schemas"
64
+ },
65
+ "excluded_methods": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "string",
69
+ "enum": [
70
+ "GET",
71
+ "POST",
72
+ "PUT",
73
+ "DELETE",
74
+ "PATCH",
75
+ "TOGGLE",
76
+ "VERIFICATION"
77
+ ]
78
+ },
79
+ "description": "Excluded HTTP methods"
80
+ },
81
+ "is_public": {
82
+ "type": "object",
83
+ "description": "Public access per method",
84
+ "properties": {
85
+ "GET": {
86
+ "type": "boolean",
87
+ "default": false
88
+ },
89
+ "POST": {
90
+ "type": "boolean",
91
+ "default": false
92
+ },
93
+ "PUT": {
94
+ "type": "boolean",
95
+ "default": false
96
+ },
97
+ "DELETE": {
98
+ "type": "boolean",
99
+ "default": false
100
+ },
101
+ "PATCH": {
102
+ "type": "boolean",
103
+ "default": false
104
+ },
105
+ "TOGGLE": {
106
+ "type": "boolean",
107
+ "default": false
108
+ },
109
+ "VERIFICATION": {
110
+ "type": "boolean",
111
+ "default": false
112
+ }
113
+ }
114
+ },
115
+ "columns": {
116
+ "type": "array",
117
+ "items": {
118
+ "$ref": "#/$defs/column"
119
+ },
120
+ "description": "Column definitions"
121
+ },
122
+ "indexes": {
123
+ "type": "array",
124
+ "items": {
125
+ "$ref": "#/$defs/index"
126
+ },
127
+ "description": "Index definitions"
128
+ },
129
+ "constraints": {
130
+ "$ref": "#/$defs/constraints"
131
+ },
132
+ "group_name": {
133
+ "type": "string",
134
+ "description": "Group name for organization",
135
+ "minLength": 1
136
+ },
137
+ "bulk_endpoints_enabled": {
138
+ "type": "boolean",
139
+ "description": "Enable bulk endpoints",
140
+ "default": false
141
+ }
142
+ },
143
+ "required": [
144
+ "table_name"
145
+ ],
146
+ "additionalProperties": false,
147
+ "$defs": {
148
+ "column": {
149
+ "type": "object",
150
+ "properties": {
151
+ "name": {
152
+ "type": "string",
153
+ "description": "Column name",
154
+ "minLength": 1
155
+ },
156
+ "type": {
157
+ "type": "string",
158
+ "description": "Drizzle PostgreSQL column type",
159
+ "enum": [
160
+ "integer",
161
+ "smallint",
162
+ "bigint",
163
+ "serial",
164
+ "smallserial",
165
+ "bigserial",
166
+ "real",
167
+ "doublePrecision",
168
+ "numeric",
169
+ "decimal",
170
+ "text",
171
+ "varchar",
172
+ "char",
173
+ "uuid",
174
+ "boolean",
175
+ "date",
176
+ "time",
177
+ "timestamp",
178
+ "timestamptz",
179
+ "interval",
180
+ "json",
181
+ "jsonb",
182
+ "bytea",
183
+ "inet",
184
+ "cidr",
185
+ "macaddr",
186
+ "macaddr8",
187
+ "bit",
188
+ "bitVarying",
189
+ "point",
190
+ "line",
191
+ "lseg",
192
+ "box",
193
+ "path",
194
+ "polygon",
195
+ "circle",
196
+ "tsvector",
197
+ "tsquery",
198
+ "xml",
199
+ "money",
200
+ "int4range",
201
+ "int8range",
202
+ "numrange",
203
+ "tsrange",
204
+ "tstzrange",
205
+ "daterange",
206
+ "int4multirange",
207
+ "int8multirange",
208
+ "nummultirange",
209
+ "tsmultirange",
210
+ "tstzmultirange",
211
+ "datemultirange",
212
+ "vector",
213
+ "geometry",
214
+ "geography",
215
+ "customType"
216
+ ]
217
+ },
218
+ "length": {
219
+ "type": "number",
220
+ "description": "Column length (for varchar, char)"
221
+ },
222
+ "precision": {
223
+ "type": "number",
224
+ "description": "Numeric precision"
225
+ },
226
+ "scale": {
227
+ "type": "number",
228
+ "description": "Numeric scale"
229
+ },
230
+ "dimensions": {
231
+ "type": "number",
232
+ "description": "Vector dimensions"
233
+ },
234
+ "mode": {
235
+ "type": "string",
236
+ "enum": [
237
+ "string",
238
+ "date",
239
+ "json",
240
+ "number"
241
+ ],
242
+ "description": "Column mode"
243
+ },
244
+ "withTimezone": {
245
+ "type": "boolean",
246
+ "description": "Include timezone for timestamp types"
247
+ },
248
+ "nullable": {
249
+ "type": "boolean",
250
+ "description": "Column is nullable"
251
+ },
252
+ "notNull": {
253
+ "type": "boolean",
254
+ "description": "Column is NOT NULL"
255
+ },
256
+ "unique": {
257
+ "type": "boolean",
258
+ "description": "Column has unique constraint"
259
+ },
260
+ "primaryKey": {
261
+ "type": "boolean",
262
+ "description": "Column is primary key"
263
+ },
264
+ "default": {
265
+ "description": "Default value"
266
+ },
267
+ "defaultRaw": {
268
+ "type": "string",
269
+ "description": "Raw SQL default expression"
270
+ },
271
+ "references": {
272
+ "$ref": "#/$defs/columnReference"
273
+ },
274
+ "array": {
275
+ "type": "boolean",
276
+ "description": "Column is array type"
277
+ },
278
+ "arrayDimensions": {
279
+ "type": "number",
280
+ "description": "Array dimensions"
281
+ },
282
+ "enumValues": {
283
+ "type": "array",
284
+ "items": {
285
+ "type": "string"
286
+ },
287
+ "description": "Enum values (shorthand)"
288
+ },
289
+ "enum": {
290
+ "$ref": "#/$defs/columnEnum"
291
+ },
292
+ "generatedAlwaysAs": {
293
+ "type": "string",
294
+ "description": "Generated column expression"
295
+ },
296
+ "generatedAlwaysAsIdentity": {
297
+ "type": "boolean"
298
+ },
299
+ "generatedByDefaultAsIdentity": {
300
+ "type": "boolean"
301
+ },
302
+ "check": {
303
+ "type": "string",
304
+ "description": "Check constraint expression"
305
+ },
306
+ "comment": {
307
+ "type": "string",
308
+ "description": "Column comment"
309
+ },
310
+ "validation": {
311
+ "$ref": "#/$defs/columnValidation"
312
+ },
313
+ "sanitize": {
314
+ "type": "array",
315
+ "items": {
316
+ "type": "string",
317
+ "enum": [
318
+ "trim",
319
+ "lowercase",
320
+ "uppercase",
321
+ "escapeHtml",
322
+ "stripTags",
323
+ "normalizeEmail",
324
+ "toNumber",
325
+ "toBoolean",
326
+ "slugify"
327
+ ]
328
+ },
329
+ "description": "Sanitize options"
330
+ }
331
+ },
332
+ "required": [
333
+ "name",
334
+ "type"
335
+ ]
336
+ },
337
+ "index": {
338
+ "type": "object",
339
+ "properties": {
340
+ "name": {
341
+ "type": "string",
342
+ "description": "Index name"
343
+ },
344
+ "columns": {
345
+ "type": "array",
346
+ "items": {
347
+ "type": "string"
348
+ },
349
+ "description": "Indexed columns"
350
+ },
351
+ "unique": {
352
+ "type": "boolean",
353
+ "description": "Unique index"
354
+ },
355
+ "using": {
356
+ "type": "string",
357
+ "enum": [
358
+ "btree",
359
+ "hash",
360
+ "gist",
361
+ "spgist",
362
+ "gin",
363
+ "brin"
364
+ ],
365
+ "description": "Index method"
366
+ },
367
+ "where": {
368
+ "type": "string",
369
+ "description": "Partial index WHERE clause"
370
+ },
371
+ "concurrently": {
372
+ "type": "boolean",
373
+ "description": "Create index concurrently"
374
+ }
375
+ },
376
+ "required": [
377
+ "columns"
378
+ ]
379
+ },
380
+ "constraints": {
381
+ "type": "object",
382
+ "properties": {
383
+ "primaryKey": {
384
+ "type": "array",
385
+ "items": {
386
+ "type": "string"
387
+ }
388
+ },
389
+ "unique": {
390
+ "type": "array",
391
+ "items": {
392
+ "$ref": "#/$defs/uniqueConstraint"
393
+ }
394
+ },
395
+ "check": {
396
+ "type": "array",
397
+ "items": {
398
+ "$ref": "#/$defs/checkConstraint"
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "uniqueConstraint": {
404
+ "type": "object",
405
+ "properties": {
406
+ "name": {
407
+ "type": "string"
408
+ },
409
+ "columns": {
410
+ "type": "array",
411
+ "items": {
412
+ "type": "string"
413
+ }
414
+ }
415
+ },
416
+ "required": [
417
+ "columns"
418
+ ]
419
+ },
420
+ "checkConstraint": {
421
+ "type": "object",
422
+ "properties": {
423
+ "name": {
424
+ "type": "string"
425
+ },
426
+ "expression": {
427
+ "type": "string"
428
+ }
429
+ },
430
+ "required": [
431
+ "expression"
432
+ ]
433
+ },
434
+ "columnReference": {
435
+ "type": "object",
436
+ "properties": {
437
+ "table": {
438
+ "type": "string",
439
+ "description": "Referenced table name"
440
+ },
441
+ "column": {
442
+ "type": "string",
443
+ "description": "Referenced column name"
444
+ },
445
+ "onDelete": {
446
+ "type": "string",
447
+ "enum": [
448
+ "cascade",
449
+ "restrict",
450
+ "no action",
451
+ "set null",
452
+ "set default"
453
+ ],
454
+ "description": "ON DELETE action"
455
+ },
456
+ "onUpdate": {
457
+ "type": "string",
458
+ "enum": [
459
+ "cascade",
460
+ "restrict",
461
+ "no action",
462
+ "set null",
463
+ "set default"
464
+ ],
465
+ "description": "ON UPDATE action"
466
+ }
467
+ },
468
+ "required": [
469
+ "table"
470
+ ]
471
+ },
472
+ "columnEnum": {
473
+ "type": "object",
474
+ "properties": {
475
+ "name": {
476
+ "type": "string",
477
+ "description": "Enum type name"
478
+ },
479
+ "values": {
480
+ "type": "array",
481
+ "items": {
482
+ "type": "string"
483
+ },
484
+ "description": "Enum values"
485
+ }
486
+ },
487
+ "required": [
488
+ "name",
489
+ "values"
490
+ ]
491
+ },
492
+ "columnValidation": {
493
+ "type": "object",
494
+ "properties": {
495
+ "minLength": {
496
+ "type": "number"
497
+ },
498
+ "maxLength": {
499
+ "type": "number"
500
+ },
501
+ "min": {
502
+ "type": "number"
503
+ },
504
+ "max": {
505
+ "type": "number"
506
+ },
507
+ "pattern": {
508
+ "type": "string"
509
+ },
510
+ "format": {
511
+ "type": "string",
512
+ "enum": [
513
+ "email",
514
+ "url",
515
+ "uuid",
516
+ "date",
517
+ "datetime",
518
+ "time",
519
+ "uri",
520
+ "ipv4",
521
+ "ipv6"
522
+ ]
523
+ },
524
+ "customMessage": {
525
+ "type": "string"
526
+ }
527
+ }
528
+ }
529
+ }
530
+ }