better-supabase 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +88 -1
  3. package/bin/better-supabase.js +3 -0
  4. package/dist/casing-da0uRTqt.js +14 -0
  5. package/dist/cli/bin.d.ts +1 -0
  6. package/dist/cli/bin.js +15 -0
  7. package/dist/cli/index.d.ts +226 -0
  8. package/dist/cli/index.js +3 -0
  9. package/dist/cli-CoByWYja.js +6472 -0
  10. package/dist/client/index.d.ts +2 -0
  11. package/dist/client/index.js +112 -0
  12. package/dist/compiler-DL18ukPe.d.ts +14 -0
  13. package/dist/config/index.d.ts +3 -0
  14. package/dist/config/index.js +3 -0
  15. package/dist/config-D-aR2ZoN.js +276 -0
  16. package/dist/define-CTfWw-SS.d.ts +662 -0
  17. package/dist/define-QGkq04oe.js +1068 -0
  18. package/dist/edge/index.d.ts +43 -0
  19. package/dist/edge/index.js +103 -0
  20. package/dist/entitlements-BBg61DQZ.d.ts +20 -0
  21. package/dist/entitlements-BC_khwRy.js +17 -0
  22. package/dist/env/index.d.ts +2 -0
  23. package/dist/env/index.js +2 -0
  24. package/dist/env-BEToab0I.js +204 -0
  25. package/dist/errors-Bl3rkOzo.js +196 -0
  26. package/dist/events/index.d.ts +2 -0
  27. package/dist/events/index.js +2 -0
  28. package/dist/events-2OJsVG_d.d.ts +84 -0
  29. package/dist/events-BuzTgn2D.js +135 -0
  30. package/dist/executor-Bazhgsgq.d.ts +195 -0
  31. package/dist/executor-Bje4suQF.d.ts +25 -0
  32. package/dist/executor-Ceq60hPM.js +89 -0
  33. package/dist/hono/index.d.ts +45 -0
  34. package/dist/hono/index.js +70 -0
  35. package/dist/index-BD6wKthp.d.ts +597 -0
  36. package/dist/index-DQVvHzjW.d.ts +74 -0
  37. package/dist/index-DRid0qIv.d.ts +76 -0
  38. package/dist/index-Dup-nSe9.d.ts +117 -0
  39. package/dist/index-Dy6kuF0P.d.ts +71 -0
  40. package/dist/index-Hf8PP9sP.d.ts +116 -0
  41. package/dist/index-JXHBuS53.d.ts +144 -0
  42. package/dist/index-Nxo3TJcm.d.ts +208 -0
  43. package/dist/index-Sw43J8HG.d.ts +62 -0
  44. package/dist/index-cEeweTeM.d.ts +38 -0
  45. package/dist/index.d.ts +110 -0
  46. package/dist/index.js +42 -0
  47. package/dist/invalidate-DbxuL2jL.js +18 -0
  48. package/dist/jobs/index.d.ts +173 -0
  49. package/dist/jobs/index.js +477 -0
  50. package/dist/json-schema-BbwO2mZg.js +181 -0
  51. package/dist/lint/index.d.ts +75 -0
  52. package/dist/lint/index.js +167 -0
  53. package/dist/list/index.d.ts +2 -0
  54. package/dist/list/index.js +410 -0
  55. package/dist/live-6b9i72Ux.d.ts +180 -0
  56. package/dist/live-D8rV1Ldw.js +168 -0
  57. package/dist/mcp/index.d.ts +105 -0
  58. package/dist/mcp/index.js +330 -0
  59. package/dist/mfa-CpogP66z.js +521 -0
  60. package/dist/mfa-TVia554c.d.ts +44 -0
  61. package/dist/next/image/index.d.ts +34 -0
  62. package/dist/next/image/index.js +40 -0
  63. package/dist/next/index.d.ts +210 -0
  64. package/dist/next/index.js +426 -0
  65. package/dist/openapi/index.d.ts +2 -0
  66. package/dist/openapi/index.js +332 -0
  67. package/dist/orpc/index.d.ts +46 -0
  68. package/dist/orpc/index.js +50 -0
  69. package/dist/otel/index.d.ts +40 -0
  70. package/dist/otel/index.js +168 -0
  71. package/dist/path-Cv__-OTj.d.ts +17 -0
  72. package/dist/plugin-BqR6wKMB.js +23 -0
  73. package/dist/plugin-HvGqCurB.d.ts +118 -0
  74. package/dist/plugins/actor/index.d.ts +13 -0
  75. package/dist/plugins/actor/index.js +43 -0
  76. package/dist/plugins/rules/index.d.ts +88 -0
  77. package/dist/plugins/rules/index.js +174 -0
  78. package/dist/plugins/soft-delete/index.d.ts +38 -0
  79. package/dist/plugins/soft-delete/index.js +69 -0
  80. package/dist/plugins/tenant/index.d.ts +43 -0
  81. package/dist/plugins/tenant/index.js +73 -0
  82. package/dist/plugins/timestamps/index.d.ts +9 -0
  83. package/dist/plugins/timestamps/index.js +37 -0
  84. package/dist/plugins/validation/index.d.ts +24 -0
  85. package/dist/plugins/validation/index.js +59 -0
  86. package/dist/pool-BFeqzwQS.d.ts +37 -0
  87. package/dist/postgres/index.d.ts +28 -0
  88. package/dist/postgres/index.js +79 -0
  89. package/dist/postgrest-Dm-vhY6R.d.ts +43 -0
  90. package/dist/problem-DPu6Fh-t.js +97 -0
  91. package/dist/problem-DlgB0lYl.d.ts +47 -0
  92. package/dist/query/index.d.ts +2 -0
  93. package/dist/query/index.js +3 -0
  94. package/dist/query-ChvDbsDE.js +186 -0
  95. package/dist/react/index.d.ts +7 -0
  96. package/dist/react/index.js +5 -0
  97. package/dist/react/server.d.ts +13 -0
  98. package/dist/react/server.js +25 -0
  99. package/dist/react/session.d.ts +2 -0
  100. package/dist/react/session.js +3 -0
  101. package/dist/react-CrOvrnIP.js +241 -0
  102. package/dist/read-set-DhX2d04c.js +216 -0
  103. package/dist/realtime/index.d.ts +3 -0
  104. package/dist/realtime/index.js +253 -0
  105. package/dist/resolve-DW8h9NPm.d.ts +155 -0
  106. package/dist/resource-CYiu6Ygi.js +175 -0
  107. package/dist/resource-SkPTRJDD.d.ts +65 -0
  108. package/dist/respond-4-dhoV7x.js +380 -0
  109. package/dist/respond-PoTpy5DT.d.ts +169 -0
  110. package/dist/result-CTkCZ6JA.d.ts +198 -0
  111. package/dist/result-DWXatkd6.js +103 -0
  112. package/dist/scope-CDHcS7dE.js +90 -0
  113. package/dist/seed-CzecODcJ.js +101 -0
  114. package/dist/server/index.d.ts +42 -0
  115. package/dist/server/index.js +68 -0
  116. package/dist/session-C3osL21k.d.ts +21 -0
  117. package/dist/session-CD-3orO_.js +19 -0
  118. package/dist/shared-_6-uPL7E.js +57 -0
  119. package/dist/simplify-oHiDKRVQ.js +665 -0
  120. package/dist/spec-pins-CJPVghHy.d.ts +20 -0
  121. package/dist/spec-pins-t6sPaHvl.js +20 -0
  122. package/dist/sql-M8l3fnS0.js +260 -0
  123. package/dist/ssr/index.d.ts +5 -0
  124. package/dist/ssr/index.js +4 -0
  125. package/dist/standard-CyhRzctb.d.ts +7 -0
  126. package/dist/standard-FUi3Z3-7.js +21 -0
  127. package/dist/stats-3iy8u3_P.js +566 -0
  128. package/dist/storage/index.d.ts +4 -0
  129. package/dist/storage/index.js +2 -0
  130. package/dist/storage-BWXVUXGk.js +461 -0
  131. package/dist/tables-rZxRxNPW.js +59 -0
  132. package/dist/template-BeOGnynM.js +93 -0
  133. package/dist/template-mbvlysOo.d.ts +6 -0
  134. package/dist/testing/index.d.ts +294 -0
  135. package/dist/testing/index.js +751 -0
  136. package/dist/types-6cYK9pbJ.js +29 -0
  137. package/dist/types-C2fslP1z.d.ts +195 -0
  138. package/dist/version-Cqq1m3UY.js +4 -0
  139. package/dist/view-B0ltUmTi.d.ts +43 -0
  140. package/dist/view-B6F9QbG-.js +35 -0
  141. package/dist/webhooks/index.d.ts +152 -0
  142. package/dist/webhooks/index.js +2 -0
  143. package/dist/webhooks-DbMTJJX2.js +139 -0
  144. package/package.json +246 -17
  145. package/schemas/config-v1.json +328 -0
  146. package/schemas/doctor-report-v1.json +105 -0
  147. package/schemas/snapshot-v2.json +1002 -0
  148. package/skills/better-supabase/SKILL.md +84 -0
  149. package/skills/better-supabase/references/plugins.md +56 -0
  150. package/skills/better-supabase/references/troubleshooting.md +39 -0
  151. package/skills/better-supabase-api/SKILL.md +67 -0
  152. package/skills/better-supabase-api/references/adapters.md +108 -0
  153. package/skills/better-supabase-testing/SKILL.md +65 -0
  154. package/index.js +0 -1
@@ -0,0 +1,1002 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://unpkg.com/better-supabase/schemas/snapshot-v2.json",
4
+ "title": "better-supabase schema snapshot",
5
+ "description": "Output of `better-supabase introspect`: @supabase/postgrest-typegen GeneratorMetadata plus the catalog details it leaves out. Codegen and doctor read it instead of a database.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["version", "schemas", "generator", "extras"],
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string"
12
+ },
13
+ "version": {
14
+ "const": 2
15
+ },
16
+ "schemas": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "generator": {
23
+ "$ref": "#/$defs/generator"
24
+ },
25
+ "extras": {
26
+ "$ref": "#/$defs/extras"
27
+ }
28
+ },
29
+ "$defs": {
30
+ "generator": {
31
+ "type": "object",
32
+ "properties": {
33
+ "columns": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "properties": {
38
+ "check": {
39
+ "anyOf": [
40
+ {
41
+ "type": "string"
42
+ },
43
+ {
44
+ "type": "null"
45
+ }
46
+ ]
47
+ },
48
+ "comment": {
49
+ "anyOf": [
50
+ {
51
+ "type": "string"
52
+ },
53
+ {
54
+ "type": "null"
55
+ }
56
+ ]
57
+ },
58
+ "data_type": {
59
+ "type": "string"
60
+ },
61
+ "default_value": {},
62
+ "enums": {
63
+ "type": "array",
64
+ "items": {
65
+ "type": "string"
66
+ }
67
+ },
68
+ "format": {
69
+ "type": "string"
70
+ },
71
+ "id": {
72
+ "type": "string"
73
+ },
74
+ "identity_generation": {
75
+ "anyOf": [
76
+ {
77
+ "const": "ALWAYS"
78
+ },
79
+ {
80
+ "const": "BY DEFAULT"
81
+ },
82
+ {
83
+ "type": "null"
84
+ }
85
+ ]
86
+ },
87
+ "is_generated": {
88
+ "type": "boolean"
89
+ },
90
+ "is_identity": {
91
+ "type": "boolean"
92
+ },
93
+ "is_nullable": {
94
+ "type": "boolean"
95
+ },
96
+ "is_unique": {
97
+ "type": "boolean"
98
+ },
99
+ "is_updatable": {
100
+ "type": "boolean"
101
+ },
102
+ "name": {
103
+ "type": "string"
104
+ },
105
+ "ordinal_position": {
106
+ "type": "number"
107
+ },
108
+ "schema": {
109
+ "type": "string"
110
+ },
111
+ "table": {
112
+ "type": "string"
113
+ },
114
+ "table_id": {
115
+ "type": "number"
116
+ },
117
+ "type_schema": {
118
+ "type": "string"
119
+ }
120
+ },
121
+ "required": [
122
+ "check",
123
+ "comment",
124
+ "data_type",
125
+ "default_value",
126
+ "enums",
127
+ "format",
128
+ "id",
129
+ "identity_generation",
130
+ "is_generated",
131
+ "is_identity",
132
+ "is_nullable",
133
+ "is_unique",
134
+ "is_updatable",
135
+ "name",
136
+ "ordinal_position",
137
+ "schema",
138
+ "table",
139
+ "table_id",
140
+ "type_schema"
141
+ ]
142
+ }
143
+ },
144
+ "foreignTables": {
145
+ "type": "array",
146
+ "items": {
147
+ "type": "object",
148
+ "properties": {
149
+ "comment": {
150
+ "anyOf": [
151
+ {
152
+ "type": "string"
153
+ },
154
+ {
155
+ "type": "null"
156
+ }
157
+ ]
158
+ },
159
+ "id": {
160
+ "type": "number"
161
+ },
162
+ "name": {
163
+ "type": "string"
164
+ },
165
+ "schema": {
166
+ "type": "string"
167
+ }
168
+ },
169
+ "required": ["comment", "id", "name", "schema"]
170
+ }
171
+ },
172
+ "functions": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "object",
176
+ "properties": {
177
+ "args": {
178
+ "type": "array",
179
+ "items": {
180
+ "type": "object",
181
+ "properties": {
182
+ "has_default": {
183
+ "anyOf": [
184
+ {
185
+ "type": "boolean"
186
+ },
187
+ {
188
+ "type": "null"
189
+ }
190
+ ]
191
+ },
192
+ "mode": {
193
+ "enum": ["in", "inout", "out", "table", "variadic"]
194
+ },
195
+ "name": {
196
+ "type": "string"
197
+ },
198
+ "type_id": {
199
+ "type": "number"
200
+ }
201
+ },
202
+ "required": ["has_default", "mode", "name", "type_id"]
203
+ }
204
+ },
205
+ "argument_types": {
206
+ "type": "string"
207
+ },
208
+ "behavior": {
209
+ "enum": ["IMMUTABLE", "STABLE", "VOLATILE"]
210
+ },
211
+ "complete_statement": {
212
+ "type": "string"
213
+ },
214
+ "config_params": {
215
+ "anyOf": [
216
+ {
217
+ "type": "object",
218
+ "additionalProperties": {
219
+ "type": "string"
220
+ }
221
+ },
222
+ {
223
+ "type": "null"
224
+ }
225
+ ]
226
+ },
227
+ "definition": {
228
+ "type": "string"
229
+ },
230
+ "id": {
231
+ "type": "number"
232
+ },
233
+ "identity_argument_types": {
234
+ "type": "string"
235
+ },
236
+ "is_set_returning_function": {
237
+ "type": "boolean"
238
+ },
239
+ "language": {
240
+ "type": "string"
241
+ },
242
+ "name": {
243
+ "type": "string"
244
+ },
245
+ "prorows": {
246
+ "anyOf": [
247
+ {
248
+ "type": "number"
249
+ },
250
+ {
251
+ "type": "null"
252
+ }
253
+ ]
254
+ },
255
+ "return_type": {
256
+ "type": "string"
257
+ },
258
+ "return_type_id": {
259
+ "type": "number"
260
+ },
261
+ "return_type_relation_id": {
262
+ "anyOf": [
263
+ {
264
+ "type": "number"
265
+ },
266
+ {
267
+ "type": "null"
268
+ }
269
+ ]
270
+ },
271
+ "schema": {
272
+ "type": "string"
273
+ },
274
+ "security_definer": {
275
+ "type": "boolean"
276
+ }
277
+ },
278
+ "required": [
279
+ "args",
280
+ "argument_types",
281
+ "behavior",
282
+ "complete_statement",
283
+ "config_params",
284
+ "definition",
285
+ "id",
286
+ "identity_argument_types",
287
+ "is_set_returning_function",
288
+ "language",
289
+ "name",
290
+ "prorows",
291
+ "return_type",
292
+ "return_type_id",
293
+ "return_type_relation_id",
294
+ "schema",
295
+ "security_definer"
296
+ ]
297
+ }
298
+ },
299
+ "materializedViews": {
300
+ "type": "array",
301
+ "items": {
302
+ "type": "object",
303
+ "properties": {
304
+ "comment": {
305
+ "anyOf": [
306
+ {
307
+ "type": "string"
308
+ },
309
+ {
310
+ "type": "null"
311
+ }
312
+ ]
313
+ },
314
+ "id": {
315
+ "type": "number"
316
+ },
317
+ "is_populated": {
318
+ "type": "boolean"
319
+ },
320
+ "name": {
321
+ "type": "string"
322
+ },
323
+ "schema": {
324
+ "type": "string"
325
+ }
326
+ },
327
+ "required": ["comment", "id", "is_populated", "name", "schema"]
328
+ }
329
+ },
330
+ "primaryKeys": {
331
+ "type": "array",
332
+ "items": {
333
+ "type": "object",
334
+ "properties": {
335
+ "name": {
336
+ "type": "string"
337
+ },
338
+ "schema": {
339
+ "type": "string"
340
+ },
341
+ "table_id": {
342
+ "type": "number"
343
+ },
344
+ "table_name": {
345
+ "type": "string"
346
+ }
347
+ },
348
+ "required": ["name", "schema", "table_id", "table_name"]
349
+ }
350
+ },
351
+ "relationships": {
352
+ "type": "array",
353
+ "items": {
354
+ "type": "object",
355
+ "properties": {
356
+ "columns": {
357
+ "type": "array",
358
+ "items": {
359
+ "type": "string"
360
+ }
361
+ },
362
+ "foreign_key_name": {
363
+ "type": "string"
364
+ },
365
+ "is_one_to_one": {
366
+ "type": "boolean"
367
+ },
368
+ "referenced_columns": {
369
+ "type": "array",
370
+ "items": {
371
+ "type": "string"
372
+ }
373
+ },
374
+ "referenced_relation": {
375
+ "type": "string"
376
+ },
377
+ "referenced_schema": {
378
+ "type": "string"
379
+ },
380
+ "relation": {
381
+ "type": "string"
382
+ },
383
+ "schema": {
384
+ "type": "string"
385
+ }
386
+ },
387
+ "required": [
388
+ "columns",
389
+ "foreign_key_name",
390
+ "is_one_to_one",
391
+ "referenced_columns",
392
+ "referenced_relation",
393
+ "referenced_schema",
394
+ "relation",
395
+ "schema"
396
+ ]
397
+ }
398
+ },
399
+ "schemas": {
400
+ "type": "array",
401
+ "items": {
402
+ "type": "object",
403
+ "properties": {
404
+ "id": {
405
+ "type": "number"
406
+ },
407
+ "name": {
408
+ "type": "string"
409
+ },
410
+ "owner": {
411
+ "type": "string"
412
+ }
413
+ },
414
+ "required": ["id", "name", "owner"]
415
+ }
416
+ },
417
+ "tables": {
418
+ "type": "array",
419
+ "items": {
420
+ "type": "object",
421
+ "properties": {
422
+ "bytes": {
423
+ "type": "number"
424
+ },
425
+ "comment": {
426
+ "anyOf": [
427
+ {
428
+ "type": "string"
429
+ },
430
+ {
431
+ "type": "null"
432
+ }
433
+ ]
434
+ },
435
+ "dead_rows_estimate": {
436
+ "type": "number"
437
+ },
438
+ "id": {
439
+ "type": "number"
440
+ },
441
+ "live_rows_estimate": {
442
+ "type": "number"
443
+ },
444
+ "name": {
445
+ "type": "string"
446
+ },
447
+ "replica_identity": {
448
+ "enum": ["DEFAULT", "FULL", "INDEX", "NOTHING"]
449
+ },
450
+ "rls_enabled": {
451
+ "type": "boolean"
452
+ },
453
+ "rls_forced": {
454
+ "type": "boolean"
455
+ },
456
+ "schema": {
457
+ "type": "string"
458
+ },
459
+ "size": {
460
+ "type": "string"
461
+ }
462
+ },
463
+ "required": [
464
+ "bytes",
465
+ "comment",
466
+ "dead_rows_estimate",
467
+ "id",
468
+ "live_rows_estimate",
469
+ "name",
470
+ "replica_identity",
471
+ "rls_enabled",
472
+ "rls_forced",
473
+ "schema",
474
+ "size"
475
+ ]
476
+ }
477
+ },
478
+ "types": {
479
+ "type": "array",
480
+ "items": {
481
+ "type": "object",
482
+ "properties": {
483
+ "attributes": {
484
+ "type": "array",
485
+ "items": {
486
+ "type": "object",
487
+ "properties": {
488
+ "name": {
489
+ "type": "string"
490
+ },
491
+ "type_id": {
492
+ "type": "number"
493
+ }
494
+ },
495
+ "required": ["name", "type_id"]
496
+ }
497
+ },
498
+ "comment": {
499
+ "anyOf": [
500
+ {
501
+ "type": "string"
502
+ },
503
+ {
504
+ "type": "null"
505
+ }
506
+ ]
507
+ },
508
+ "enums": {
509
+ "type": "array",
510
+ "items": {
511
+ "type": "string"
512
+ }
513
+ },
514
+ "format": {
515
+ "type": "string"
516
+ },
517
+ "id": {
518
+ "type": "number"
519
+ },
520
+ "name": {
521
+ "type": "string"
522
+ },
523
+ "schema": {
524
+ "type": "string"
525
+ },
526
+ "type_relation_id": {
527
+ "anyOf": [
528
+ {
529
+ "type": "number"
530
+ },
531
+ {
532
+ "type": "null"
533
+ }
534
+ ]
535
+ }
536
+ },
537
+ "required": [
538
+ "attributes",
539
+ "comment",
540
+ "enums",
541
+ "format",
542
+ "id",
543
+ "name",
544
+ "schema",
545
+ "type_relation_id"
546
+ ]
547
+ }
548
+ },
549
+ "version": {
550
+ "const": 1
551
+ },
552
+ "views": {
553
+ "type": "array",
554
+ "items": {
555
+ "type": "object",
556
+ "properties": {
557
+ "comment": {
558
+ "anyOf": [
559
+ {
560
+ "type": "string"
561
+ },
562
+ {
563
+ "type": "null"
564
+ }
565
+ ]
566
+ },
567
+ "id": {
568
+ "type": "number"
569
+ },
570
+ "is_updatable": {
571
+ "type": "boolean"
572
+ },
573
+ "name": {
574
+ "type": "string"
575
+ },
576
+ "schema": {
577
+ "type": "string"
578
+ },
579
+ "is_insert_enabled": {
580
+ "type": "boolean"
581
+ },
582
+ "is_update_enabled": {
583
+ "type": "boolean"
584
+ }
585
+ },
586
+ "required": ["comment", "id", "is_updatable", "name", "schema"]
587
+ }
588
+ }
589
+ },
590
+ "required": [
591
+ "columns",
592
+ "foreignTables",
593
+ "functions",
594
+ "materializedViews",
595
+ "primaryKeys",
596
+ "relationships",
597
+ "schemas",
598
+ "tables",
599
+ "types",
600
+ "version",
601
+ "views"
602
+ ]
603
+ },
604
+ "extras": {
605
+ "type": "object",
606
+ "additionalProperties": false,
607
+ "required": ["tables", "buckets", "realtime"],
608
+ "properties": {
609
+ "tables": {
610
+ "type": "array",
611
+ "items": {
612
+ "$ref": "#/$defs/extrasTable"
613
+ }
614
+ },
615
+ "buckets": {
616
+ "type": "array",
617
+ "items": {
618
+ "type": "object",
619
+ "additionalProperties": false,
620
+ "required": ["id", "public", "fileSizeLimit", "allowedMimeTypes"],
621
+ "properties": {
622
+ "id": {
623
+ "type": "string"
624
+ },
625
+ "public": {
626
+ "type": "boolean"
627
+ },
628
+ "fileSizeLimit": {
629
+ "type": ["integer", "null"]
630
+ },
631
+ "allowedMimeTypes": {
632
+ "type": ["array", "null"],
633
+ "items": {
634
+ "type": "string"
635
+ }
636
+ }
637
+ }
638
+ }
639
+ },
640
+ "realtime": {
641
+ "type": "array",
642
+ "items": {
643
+ "type": "string"
644
+ }
645
+ },
646
+ "roleSettings": {
647
+ "type": "object",
648
+ "additionalProperties": {
649
+ "type": "object",
650
+ "additionalProperties": {
651
+ "type": "string"
652
+ }
653
+ }
654
+ },
655
+ "functions": {
656
+ "type": "array",
657
+ "items": {
658
+ "type": "object",
659
+ "additionalProperties": false,
660
+ "required": [
661
+ "schema",
662
+ "name",
663
+ "signature",
664
+ "language",
665
+ "volatility",
666
+ "securityDefiner",
667
+ "settings"
668
+ ],
669
+ "properties": {
670
+ "schema": {
671
+ "type": "string"
672
+ },
673
+ "name": {
674
+ "type": "string"
675
+ },
676
+ "signature": {
677
+ "type": "string"
678
+ },
679
+ "language": {
680
+ "type": "string"
681
+ },
682
+ "volatility": {
683
+ "enum": ["immutable", "stable", "volatile"]
684
+ },
685
+ "securityDefiner": {
686
+ "type": "boolean"
687
+ },
688
+ "settings": {
689
+ "type": "object",
690
+ "additionalProperties": {
691
+ "type": "string"
692
+ }
693
+ }
694
+ }
695
+ }
696
+ },
697
+ "hooks": {
698
+ "type": "array",
699
+ "items": {
700
+ "type": "object",
701
+ "additionalProperties": false,
702
+ "required": ["hook", "schema", "name", "functions"],
703
+ "properties": {
704
+ "hook": {
705
+ "type": "string"
706
+ },
707
+ "schema": {
708
+ "type": "string"
709
+ },
710
+ "name": {
711
+ "type": "string"
712
+ },
713
+ "functions": {
714
+ "type": "array",
715
+ "items": {
716
+ "type": "object",
717
+ "additionalProperties": false,
718
+ "required": [
719
+ "schema",
720
+ "name",
721
+ "signature",
722
+ "language",
723
+ "volatility",
724
+ "securityDefiner",
725
+ "settings",
726
+ "execute",
727
+ "publicExecute",
728
+ "schemaUsage"
729
+ ],
730
+ "properties": {
731
+ "schema": {
732
+ "type": "string"
733
+ },
734
+ "name": {
735
+ "type": "string"
736
+ },
737
+ "signature": {
738
+ "type": "string"
739
+ },
740
+ "language": {
741
+ "type": "string"
742
+ },
743
+ "volatility": {
744
+ "enum": ["immutable", "stable", "volatile"]
745
+ },
746
+ "securityDefiner": {
747
+ "type": "boolean"
748
+ },
749
+ "settings": {
750
+ "type": "object",
751
+ "additionalProperties": {
752
+ "type": "string"
753
+ }
754
+ },
755
+ "execute": {
756
+ "type": "array",
757
+ "items": {
758
+ "type": "string"
759
+ }
760
+ },
761
+ "publicExecute": {
762
+ "type": "boolean"
763
+ },
764
+ "schemaUsage": {
765
+ "type": "array",
766
+ "items": {
767
+ "type": "string"
768
+ }
769
+ }
770
+ }
771
+ }
772
+ }
773
+ }
774
+ }
775
+ }
776
+ }
777
+ },
778
+ "extrasTable": {
779
+ "type": "object",
780
+ "additionalProperties": false,
781
+ "required": [
782
+ "id",
783
+ "schema",
784
+ "name",
785
+ "primaryKey",
786
+ "uniques",
787
+ "foreignKeys",
788
+ "checks",
789
+ "indexes",
790
+ "policies",
791
+ "triggers",
792
+ "grants"
793
+ ],
794
+ "properties": {
795
+ "id": {
796
+ "type": "integer"
797
+ },
798
+ "schema": {
799
+ "type": "string"
800
+ },
801
+ "name": {
802
+ "type": "string"
803
+ },
804
+ "primaryKey": {
805
+ "type": "array",
806
+ "items": {
807
+ "type": "string"
808
+ }
809
+ },
810
+ "uniques": {
811
+ "type": "array",
812
+ "items": {
813
+ "type": "object",
814
+ "additionalProperties": false,
815
+ "required": ["name", "columns"],
816
+ "properties": {
817
+ "name": {
818
+ "type": "string"
819
+ },
820
+ "columns": {
821
+ "type": "array",
822
+ "items": {
823
+ "type": "string"
824
+ }
825
+ }
826
+ }
827
+ }
828
+ },
829
+ "foreignKeys": {
830
+ "type": "array",
831
+ "items": {
832
+ "type": "object",
833
+ "additionalProperties": false,
834
+ "required": ["name", "onDelete", "onUpdate"],
835
+ "properties": {
836
+ "name": {
837
+ "type": "string"
838
+ },
839
+ "onDelete": {
840
+ "enum": [
841
+ "no action",
842
+ "restrict",
843
+ "cascade",
844
+ "set null",
845
+ "set default"
846
+ ]
847
+ },
848
+ "onUpdate": {
849
+ "enum": [
850
+ "no action",
851
+ "restrict",
852
+ "cascade",
853
+ "set null",
854
+ "set default"
855
+ ]
856
+ }
857
+ }
858
+ }
859
+ },
860
+ "checks": {
861
+ "type": "array",
862
+ "items": {
863
+ "type": "object",
864
+ "additionalProperties": false,
865
+ "required": ["name", "definition"],
866
+ "properties": {
867
+ "name": {
868
+ "type": "string"
869
+ },
870
+ "definition": {
871
+ "type": "string"
872
+ }
873
+ }
874
+ }
875
+ },
876
+ "indexes": {
877
+ "type": "array",
878
+ "items": {
879
+ "type": "object",
880
+ "additionalProperties": false,
881
+ "required": ["name", "columns", "unique", "primary", "partial"],
882
+ "properties": {
883
+ "name": {
884
+ "type": "string"
885
+ },
886
+ "columns": {
887
+ "type": "array",
888
+ "items": {
889
+ "type": "string"
890
+ }
891
+ },
892
+ "unique": {
893
+ "type": "boolean"
894
+ },
895
+ "primary": {
896
+ "type": "boolean"
897
+ },
898
+ "partial": {
899
+ "type": "boolean"
900
+ }
901
+ }
902
+ }
903
+ },
904
+ "policies": {
905
+ "type": "array",
906
+ "items": {
907
+ "type": "object",
908
+ "additionalProperties": false,
909
+ "required": [
910
+ "name",
911
+ "command",
912
+ "roles",
913
+ "permissive",
914
+ "using",
915
+ "check"
916
+ ],
917
+ "properties": {
918
+ "name": {
919
+ "type": "string"
920
+ },
921
+ "command": {
922
+ "enum": ["all", "select", "insert", "update", "delete"]
923
+ },
924
+ "roles": {
925
+ "type": "array",
926
+ "items": {
927
+ "type": "string"
928
+ }
929
+ },
930
+ "permissive": {
931
+ "type": "boolean"
932
+ },
933
+ "using": {
934
+ "type": ["string", "null"]
935
+ },
936
+ "check": {
937
+ "type": ["string", "null"]
938
+ },
939
+ "functions": {
940
+ "type": "array",
941
+ "items": {
942
+ "type": "string"
943
+ }
944
+ }
945
+ }
946
+ }
947
+ },
948
+ "triggers": {
949
+ "type": "array",
950
+ "items": {
951
+ "type": "object",
952
+ "additionalProperties": false,
953
+ "required": ["name", "timing", "events", "level", "function"],
954
+ "properties": {
955
+ "name": {
956
+ "type": "string"
957
+ },
958
+ "timing": {
959
+ "enum": ["before", "after", "instead of"]
960
+ },
961
+ "events": {
962
+ "type": "array",
963
+ "items": {
964
+ "enum": ["insert", "update", "delete", "truncate"]
965
+ }
966
+ },
967
+ "level": {
968
+ "enum": ["row", "statement"]
969
+ },
970
+ "function": {
971
+ "type": "string"
972
+ }
973
+ }
974
+ }
975
+ },
976
+ "grants": {
977
+ "type": "array",
978
+ "items": {
979
+ "type": "object",
980
+ "additionalProperties": false,
981
+ "required": ["role", "privileges"],
982
+ "properties": {
983
+ "role": {
984
+ "type": "string"
985
+ },
986
+ "privileges": {
987
+ "type": "array",
988
+ "items": {
989
+ "type": "string"
990
+ }
991
+ }
992
+ }
993
+ }
994
+ },
995
+ "large": {
996
+ "description": "Postgres estimates at least 10,000 rows; the unbounded-read lint rule reads it.",
997
+ "const": true
998
+ }
999
+ }
1000
+ }
1001
+ }
1002
+ }