@synoikia/core 0.14.2 → 0.16.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 (63) hide show
  1. package/dist/app.d.ts +8 -0
  2. package/dist/app.js +7 -5
  3. package/dist/app.js.map +1 -1
  4. package/dist/approvals/grants.d.ts +4 -1
  5. package/dist/approvals/grants.js +4 -4
  6. package/dist/approvals/grants.js.map +1 -1
  7. package/dist/approvals/service.d.ts +28 -10
  8. package/dist/approvals/service.js +5 -2
  9. package/dist/approvals/service.js.map +1 -1
  10. package/dist/auth/external-cloudflare.js +5 -3
  11. package/dist/auth/external-cloudflare.js.map +1 -1
  12. package/dist/auth/external.d.ts +6 -2
  13. package/dist/auth/external.js.map +1 -1
  14. package/dist/auth/mcp-auth.js +1 -1
  15. package/dist/auth/mcp-auth.js.map +1 -1
  16. package/dist/auth/oidc.d.ts +4 -3
  17. package/dist/auth/oidc.js +18 -6
  18. package/dist/auth/oidc.js.map +1 -1
  19. package/dist/auth/sessions.d.ts +2 -2
  20. package/dist/auth/sessions.js +2 -2
  21. package/dist/auth/sessions.js.map +1 -1
  22. package/dist/auth/throttle.d.ts +2 -1
  23. package/dist/auth/throttle.js +16 -6
  24. package/dist/auth/throttle.js.map +1 -1
  25. package/dist/auth/users.d.ts +19 -1
  26. package/dist/auth/users.js +45 -11
  27. package/dist/auth/users.js.map +1 -1
  28. package/dist/catalog/role-levels.d.ts +1 -1
  29. package/dist/catalog/role-levels.js +5 -3
  30. package/dist/catalog/role-levels.js.map +1 -1
  31. package/dist/db/schema.d.ts +24 -0
  32. package/dist/db/schema.js +2 -0
  33. package/dist/db/schema.js.map +1 -1
  34. package/dist/errors.d.ts +10 -2
  35. package/dist/errors.js +12 -0
  36. package/dist/errors.js.map +1 -1
  37. package/dist/gate/pipeline.d.ts +2 -2
  38. package/dist/gate/pipeline.js +53 -18
  39. package/dist/gate/pipeline.js.map +1 -1
  40. package/dist/http/admin/auth.js +64 -28
  41. package/dist/http/admin/auth.js.map +1 -1
  42. package/dist/http/admin/system.js +27 -3
  43. package/dist/http/admin/system.js.map +1 -1
  44. package/dist/http/common.d.ts +1 -1
  45. package/dist/http/mcp/approval-routes.js +2 -1
  46. package/dist/http/mcp/approval-routes.js.map +1 -1
  47. package/dist/http/mcp/endpoint.js +5 -5
  48. package/dist/http/mcp/endpoint.js.map +1 -1
  49. package/dist/http/mcp/oauth-routes.js +16 -7
  50. package/dist/http/mcp/oauth-routes.js.map +1 -1
  51. package/dist/instances/manager.d.ts +4 -0
  52. package/dist/instances/manager.js +30 -13
  53. package/dist/instances/manager.js.map +1 -1
  54. package/dist/notify/service.d.ts +32 -2
  55. package/dist/notify/service.js +40 -12
  56. package/dist/notify/service.js.map +1 -1
  57. package/dist/plugins/repos.d.ts +70 -1
  58. package/dist/plugins/repos.js +234 -61
  59. package/dist/plugins/repos.js.map +1 -1
  60. package/drizzle/0018_plugin_manual.sql +1 -0
  61. package/drizzle/meta/0018_snapshot.json +2862 -0
  62. package/drizzle/meta/_journal.json +7 -0
  63. package/package.json +5 -3
@@ -0,0 +1,2862 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "aee0e06c-0d2a-404a-955e-2bf98451bd87",
5
+ "prevId": "dfba059f-86d9-4125-96cb-ada693f58fd0",
6
+ "tables": {
7
+ "approval_links": {
8
+ "name": "approval_links",
9
+ "columns": {
10
+ "token_hash": {
11
+ "name": "token_hash",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "approval_id": {
18
+ "name": "approval_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "action": {
25
+ "name": "action",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "expires_at": {
32
+ "name": "expires_at",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "used_at": {
39
+ "name": "used_at",
40
+ "type": "integer",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ }
45
+ },
46
+ "indexes": {},
47
+ "foreignKeys": {
48
+ "approval_links_approval_id_pending_approvals_id_fk": {
49
+ "name": "approval_links_approval_id_pending_approvals_id_fk",
50
+ "tableFrom": "approval_links",
51
+ "tableTo": "pending_approvals",
52
+ "columnsFrom": [
53
+ "approval_id"
54
+ ],
55
+ "columnsTo": [
56
+ "id"
57
+ ],
58
+ "onDelete": "cascade",
59
+ "onUpdate": "no action"
60
+ }
61
+ },
62
+ "compositePrimaryKeys": {},
63
+ "uniqueConstraints": {},
64
+ "checkConstraints": {}
65
+ },
66
+ "audit_log": {
67
+ "name": "audit_log",
68
+ "columns": {
69
+ "id": {
70
+ "name": "id",
71
+ "type": "integer",
72
+ "primaryKey": true,
73
+ "notNull": true,
74
+ "autoincrement": true
75
+ },
76
+ "at": {
77
+ "name": "at",
78
+ "type": "integer",
79
+ "primaryKey": false,
80
+ "notNull": true,
81
+ "autoincrement": false
82
+ },
83
+ "kind": {
84
+ "name": "kind",
85
+ "type": "text",
86
+ "primaryKey": false,
87
+ "notNull": true,
88
+ "autoincrement": false
89
+ },
90
+ "instance_id": {
91
+ "name": "instance_id",
92
+ "type": "text",
93
+ "primaryKey": false,
94
+ "notNull": false,
95
+ "autoincrement": false
96
+ },
97
+ "operation_key": {
98
+ "name": "operation_key",
99
+ "type": "text",
100
+ "primaryKey": false,
101
+ "notNull": false,
102
+ "autoincrement": false
103
+ },
104
+ "classification": {
105
+ "name": "classification",
106
+ "type": "text",
107
+ "primaryKey": false,
108
+ "notNull": false,
109
+ "autoincrement": false
110
+ },
111
+ "decision": {
112
+ "name": "decision",
113
+ "type": "text",
114
+ "primaryKey": false,
115
+ "notNull": false,
116
+ "autoincrement": false
117
+ },
118
+ "actor_kind": {
119
+ "name": "actor_kind",
120
+ "type": "text",
121
+ "primaryKey": false,
122
+ "notNull": true,
123
+ "autoincrement": false
124
+ },
125
+ "actor_id": {
126
+ "name": "actor_id",
127
+ "type": "text",
128
+ "primaryKey": false,
129
+ "notNull": false,
130
+ "autoincrement": false
131
+ },
132
+ "decided_by": {
133
+ "name": "decided_by",
134
+ "type": "text",
135
+ "primaryKey": false,
136
+ "notNull": false,
137
+ "autoincrement": false
138
+ },
139
+ "decided_via": {
140
+ "name": "decided_via",
141
+ "type": "text",
142
+ "primaryKey": false,
143
+ "notNull": false,
144
+ "autoincrement": false
145
+ },
146
+ "params": {
147
+ "name": "params",
148
+ "type": "text",
149
+ "primaryKey": false,
150
+ "notNull": false,
151
+ "autoincrement": false
152
+ },
153
+ "resolved_targets": {
154
+ "name": "resolved_targets",
155
+ "type": "text",
156
+ "primaryKey": false,
157
+ "notNull": false,
158
+ "autoincrement": false
159
+ },
160
+ "result_status": {
161
+ "name": "result_status",
162
+ "type": "text",
163
+ "primaryKey": false,
164
+ "notNull": false,
165
+ "autoincrement": false
166
+ },
167
+ "duration_ms": {
168
+ "name": "duration_ms",
169
+ "type": "integer",
170
+ "primaryKey": false,
171
+ "notNull": false,
172
+ "autoincrement": false
173
+ },
174
+ "detail": {
175
+ "name": "detail",
176
+ "type": "text",
177
+ "primaryKey": false,
178
+ "notNull": false,
179
+ "autoincrement": false
180
+ }
181
+ },
182
+ "indexes": {
183
+ "audit_at_idx": {
184
+ "name": "audit_at_idx",
185
+ "columns": [
186
+ "at"
187
+ ],
188
+ "isUnique": false
189
+ },
190
+ "audit_instance_at_idx": {
191
+ "name": "audit_instance_at_idx",
192
+ "columns": [
193
+ "instance_id",
194
+ "at"
195
+ ],
196
+ "isUnique": false
197
+ }
198
+ },
199
+ "foreignKeys": {},
200
+ "compositePrimaryKeys": {},
201
+ "uniqueConstraints": {},
202
+ "checkConstraints": {}
203
+ },
204
+ "guides": {
205
+ "name": "guides",
206
+ "columns": {
207
+ "id": {
208
+ "name": "id",
209
+ "type": "text",
210
+ "primaryKey": true,
211
+ "notNull": true,
212
+ "autoincrement": false
213
+ },
214
+ "instance_id": {
215
+ "name": "instance_id",
216
+ "type": "text",
217
+ "primaryKey": false,
218
+ "notNull": true,
219
+ "autoincrement": false
220
+ },
221
+ "operation_id": {
222
+ "name": "operation_id",
223
+ "type": "text",
224
+ "primaryKey": false,
225
+ "notNull": true,
226
+ "autoincrement": false
227
+ },
228
+ "version": {
229
+ "name": "version",
230
+ "type": "text",
231
+ "primaryKey": false,
232
+ "notNull": true,
233
+ "autoincrement": false
234
+ },
235
+ "content": {
236
+ "name": "content",
237
+ "type": "text",
238
+ "primaryKey": false,
239
+ "notNull": true,
240
+ "autoincrement": false
241
+ },
242
+ "fetched_at": {
243
+ "name": "fetched_at",
244
+ "type": "integer",
245
+ "primaryKey": false,
246
+ "notNull": true,
247
+ "autoincrement": false
248
+ }
249
+ },
250
+ "indexes": {},
251
+ "foreignKeys": {
252
+ "guides_instance_id_plugin_instances_id_fk": {
253
+ "name": "guides_instance_id_plugin_instances_id_fk",
254
+ "tableFrom": "guides",
255
+ "tableTo": "plugin_instances",
256
+ "columnsFrom": [
257
+ "instance_id"
258
+ ],
259
+ "columnsTo": [
260
+ "id"
261
+ ],
262
+ "onDelete": "cascade",
263
+ "onUpdate": "no action"
264
+ },
265
+ "guides_operation_id_operations_id_fk": {
266
+ "name": "guides_operation_id_operations_id_fk",
267
+ "tableFrom": "guides",
268
+ "tableTo": "operations",
269
+ "columnsFrom": [
270
+ "operation_id"
271
+ ],
272
+ "columnsTo": [
273
+ "id"
274
+ ],
275
+ "onDelete": "cascade",
276
+ "onUpdate": "no action"
277
+ }
278
+ },
279
+ "compositePrimaryKeys": {},
280
+ "uniqueConstraints": {},
281
+ "checkConstraints": {}
282
+ },
283
+ "mcp_tokens": {
284
+ "name": "mcp_tokens",
285
+ "columns": {
286
+ "id": {
287
+ "name": "id",
288
+ "type": "text",
289
+ "primaryKey": true,
290
+ "notNull": true,
291
+ "autoincrement": false
292
+ },
293
+ "name": {
294
+ "name": "name",
295
+ "type": "text",
296
+ "primaryKey": false,
297
+ "notNull": true,
298
+ "autoincrement": false
299
+ },
300
+ "token_hash": {
301
+ "name": "token_hash",
302
+ "type": "text",
303
+ "primaryKey": false,
304
+ "notNull": true,
305
+ "autoincrement": false
306
+ },
307
+ "scope": {
308
+ "name": "scope",
309
+ "type": "text",
310
+ "primaryKey": false,
311
+ "notNull": true,
312
+ "autoincrement": false
313
+ },
314
+ "access": {
315
+ "name": "access",
316
+ "type": "text",
317
+ "primaryKey": false,
318
+ "notNull": true,
319
+ "autoincrement": false,
320
+ "default": "'read'"
321
+ },
322
+ "created_by": {
323
+ "name": "created_by",
324
+ "type": "text",
325
+ "primaryKey": false,
326
+ "notNull": false,
327
+ "autoincrement": false
328
+ },
329
+ "created_at": {
330
+ "name": "created_at",
331
+ "type": "integer",
332
+ "primaryKey": false,
333
+ "notNull": true,
334
+ "autoincrement": false,
335
+ "default": "(unixepoch() * 1000)"
336
+ },
337
+ "expires_at": {
338
+ "name": "expires_at",
339
+ "type": "integer",
340
+ "primaryKey": false,
341
+ "notNull": false,
342
+ "autoincrement": false
343
+ },
344
+ "last_used_at": {
345
+ "name": "last_used_at",
346
+ "type": "integer",
347
+ "primaryKey": false,
348
+ "notNull": false,
349
+ "autoincrement": false
350
+ },
351
+ "revoked_at": {
352
+ "name": "revoked_at",
353
+ "type": "integer",
354
+ "primaryKey": false,
355
+ "notNull": false,
356
+ "autoincrement": false
357
+ }
358
+ },
359
+ "indexes": {
360
+ "mcp_tokens_token_hash_unique": {
361
+ "name": "mcp_tokens_token_hash_unique",
362
+ "columns": [
363
+ "token_hash"
364
+ ],
365
+ "isUnique": true
366
+ }
367
+ },
368
+ "foreignKeys": {
369
+ "mcp_tokens_created_by_users_id_fk": {
370
+ "name": "mcp_tokens_created_by_users_id_fk",
371
+ "tableFrom": "mcp_tokens",
372
+ "tableTo": "users",
373
+ "columnsFrom": [
374
+ "created_by"
375
+ ],
376
+ "columnsTo": [
377
+ "id"
378
+ ],
379
+ "onDelete": "no action",
380
+ "onUpdate": "no action"
381
+ }
382
+ },
383
+ "compositePrimaryKeys": {},
384
+ "uniqueConstraints": {},
385
+ "checkConstraints": {}
386
+ },
387
+ "notifier_channels": {
388
+ "name": "notifier_channels",
389
+ "columns": {
390
+ "id": {
391
+ "name": "id",
392
+ "type": "text",
393
+ "primaryKey": true,
394
+ "notNull": true,
395
+ "autoincrement": false
396
+ },
397
+ "kind": {
398
+ "name": "kind",
399
+ "type": "text",
400
+ "primaryKey": false,
401
+ "notNull": true,
402
+ "autoincrement": false
403
+ },
404
+ "name": {
405
+ "name": "name",
406
+ "type": "text",
407
+ "primaryKey": false,
408
+ "notNull": true,
409
+ "autoincrement": false
410
+ },
411
+ "config": {
412
+ "name": "config",
413
+ "type": "text",
414
+ "primaryKey": false,
415
+ "notNull": true,
416
+ "autoincrement": false
417
+ },
418
+ "secrets_enc": {
419
+ "name": "secrets_enc",
420
+ "type": "blob",
421
+ "primaryKey": false,
422
+ "notNull": false,
423
+ "autoincrement": false
424
+ },
425
+ "events": {
426
+ "name": "events",
427
+ "type": "text",
428
+ "primaryKey": false,
429
+ "notNull": true,
430
+ "autoincrement": false
431
+ },
432
+ "instance_filter": {
433
+ "name": "instance_filter",
434
+ "type": "text",
435
+ "primaryKey": false,
436
+ "notNull": false,
437
+ "autoincrement": false
438
+ },
439
+ "enabled": {
440
+ "name": "enabled",
441
+ "type": "integer",
442
+ "primaryKey": false,
443
+ "notNull": true,
444
+ "autoincrement": false,
445
+ "default": true
446
+ },
447
+ "last_sent_at": {
448
+ "name": "last_sent_at",
449
+ "type": "integer",
450
+ "primaryKey": false,
451
+ "notNull": false,
452
+ "autoincrement": false
453
+ },
454
+ "last_error": {
455
+ "name": "last_error",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": false,
459
+ "autoincrement": false
460
+ }
461
+ },
462
+ "indexes": {},
463
+ "foreignKeys": {},
464
+ "compositePrimaryKeys": {},
465
+ "uniqueConstraints": {},
466
+ "checkConstraints": {}
467
+ },
468
+ "oauth_clients": {
469
+ "name": "oauth_clients",
470
+ "columns": {
471
+ "id": {
472
+ "name": "id",
473
+ "type": "text",
474
+ "primaryKey": true,
475
+ "notNull": true,
476
+ "autoincrement": false
477
+ },
478
+ "client_id": {
479
+ "name": "client_id",
480
+ "type": "text",
481
+ "primaryKey": false,
482
+ "notNull": true,
483
+ "autoincrement": false
484
+ },
485
+ "client_secret_hash": {
486
+ "name": "client_secret_hash",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": false,
490
+ "autoincrement": false
491
+ },
492
+ "name": {
493
+ "name": "name",
494
+ "type": "text",
495
+ "primaryKey": false,
496
+ "notNull": true,
497
+ "autoincrement": false
498
+ },
499
+ "redirect_uris": {
500
+ "name": "redirect_uris",
501
+ "type": "text",
502
+ "primaryKey": false,
503
+ "notNull": true,
504
+ "autoincrement": false
505
+ },
506
+ "registered_via": {
507
+ "name": "registered_via",
508
+ "type": "text",
509
+ "primaryKey": false,
510
+ "notNull": true,
511
+ "autoincrement": false
512
+ },
513
+ "created_at": {
514
+ "name": "created_at",
515
+ "type": "integer",
516
+ "primaryKey": false,
517
+ "notNull": true,
518
+ "autoincrement": false,
519
+ "default": "(unixepoch() * 1000)"
520
+ },
521
+ "revoked_at": {
522
+ "name": "revoked_at",
523
+ "type": "integer",
524
+ "primaryKey": false,
525
+ "notNull": false,
526
+ "autoincrement": false
527
+ }
528
+ },
529
+ "indexes": {
530
+ "oauth_clients_client_id_unique": {
531
+ "name": "oauth_clients_client_id_unique",
532
+ "columns": [
533
+ "client_id"
534
+ ],
535
+ "isUnique": true
536
+ }
537
+ },
538
+ "foreignKeys": {},
539
+ "compositePrimaryKeys": {},
540
+ "uniqueConstraints": {},
541
+ "checkConstraints": {}
542
+ },
543
+ "oauth_codes": {
544
+ "name": "oauth_codes",
545
+ "columns": {
546
+ "code_hash": {
547
+ "name": "code_hash",
548
+ "type": "text",
549
+ "primaryKey": true,
550
+ "notNull": true,
551
+ "autoincrement": false
552
+ },
553
+ "grant_id": {
554
+ "name": "grant_id",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "autoincrement": false
559
+ },
560
+ "code_challenge": {
561
+ "name": "code_challenge",
562
+ "type": "text",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "autoincrement": false
566
+ },
567
+ "redirect_uri": {
568
+ "name": "redirect_uri",
569
+ "type": "text",
570
+ "primaryKey": false,
571
+ "notNull": true,
572
+ "autoincrement": false
573
+ },
574
+ "resources": {
575
+ "name": "resources",
576
+ "type": "text",
577
+ "primaryKey": false,
578
+ "notNull": true,
579
+ "autoincrement": false
580
+ },
581
+ "expires_at": {
582
+ "name": "expires_at",
583
+ "type": "integer",
584
+ "primaryKey": false,
585
+ "notNull": true,
586
+ "autoincrement": false
587
+ },
588
+ "used_at": {
589
+ "name": "used_at",
590
+ "type": "integer",
591
+ "primaryKey": false,
592
+ "notNull": false,
593
+ "autoincrement": false
594
+ }
595
+ },
596
+ "indexes": {},
597
+ "foreignKeys": {
598
+ "oauth_codes_grant_id_oauth_grants_id_fk": {
599
+ "name": "oauth_codes_grant_id_oauth_grants_id_fk",
600
+ "tableFrom": "oauth_codes",
601
+ "tableTo": "oauth_grants",
602
+ "columnsFrom": [
603
+ "grant_id"
604
+ ],
605
+ "columnsTo": [
606
+ "id"
607
+ ],
608
+ "onDelete": "cascade",
609
+ "onUpdate": "no action"
610
+ }
611
+ },
612
+ "compositePrimaryKeys": {},
613
+ "uniqueConstraints": {},
614
+ "checkConstraints": {}
615
+ },
616
+ "oauth_grants": {
617
+ "name": "oauth_grants",
618
+ "columns": {
619
+ "id": {
620
+ "name": "id",
621
+ "type": "text",
622
+ "primaryKey": true,
623
+ "notNull": true,
624
+ "autoincrement": false
625
+ },
626
+ "client_id": {
627
+ "name": "client_id",
628
+ "type": "text",
629
+ "primaryKey": false,
630
+ "notNull": true,
631
+ "autoincrement": false
632
+ },
633
+ "user_id": {
634
+ "name": "user_id",
635
+ "type": "text",
636
+ "primaryKey": false,
637
+ "notNull": true,
638
+ "autoincrement": false
639
+ },
640
+ "resources": {
641
+ "name": "resources",
642
+ "type": "text",
643
+ "primaryKey": false,
644
+ "notNull": true,
645
+ "autoincrement": false
646
+ },
647
+ "instance_ids": {
648
+ "name": "instance_ids",
649
+ "type": "text",
650
+ "primaryKey": false,
651
+ "notNull": false,
652
+ "autoincrement": false
653
+ },
654
+ "access": {
655
+ "name": "access",
656
+ "type": "text",
657
+ "primaryKey": false,
658
+ "notNull": true,
659
+ "autoincrement": false,
660
+ "default": "'read'"
661
+ },
662
+ "created_at": {
663
+ "name": "created_at",
664
+ "type": "integer",
665
+ "primaryKey": false,
666
+ "notNull": true,
667
+ "autoincrement": false,
668
+ "default": "(unixepoch() * 1000)"
669
+ },
670
+ "revoked_at": {
671
+ "name": "revoked_at",
672
+ "type": "integer",
673
+ "primaryKey": false,
674
+ "notNull": false,
675
+ "autoincrement": false
676
+ }
677
+ },
678
+ "indexes": {},
679
+ "foreignKeys": {
680
+ "oauth_grants_client_id_oauth_clients_id_fk": {
681
+ "name": "oauth_grants_client_id_oauth_clients_id_fk",
682
+ "tableFrom": "oauth_grants",
683
+ "tableTo": "oauth_clients",
684
+ "columnsFrom": [
685
+ "client_id"
686
+ ],
687
+ "columnsTo": [
688
+ "id"
689
+ ],
690
+ "onDelete": "cascade",
691
+ "onUpdate": "no action"
692
+ },
693
+ "oauth_grants_user_id_users_id_fk": {
694
+ "name": "oauth_grants_user_id_users_id_fk",
695
+ "tableFrom": "oauth_grants",
696
+ "tableTo": "users",
697
+ "columnsFrom": [
698
+ "user_id"
699
+ ],
700
+ "columnsTo": [
701
+ "id"
702
+ ],
703
+ "onDelete": "cascade",
704
+ "onUpdate": "no action"
705
+ }
706
+ },
707
+ "compositePrimaryKeys": {},
708
+ "uniqueConstraints": {},
709
+ "checkConstraints": {}
710
+ },
711
+ "oauth_tokens": {
712
+ "name": "oauth_tokens",
713
+ "columns": {
714
+ "token_hash": {
715
+ "name": "token_hash",
716
+ "type": "text",
717
+ "primaryKey": true,
718
+ "notNull": true,
719
+ "autoincrement": false
720
+ },
721
+ "grant_id": {
722
+ "name": "grant_id",
723
+ "type": "text",
724
+ "primaryKey": false,
725
+ "notNull": true,
726
+ "autoincrement": false
727
+ },
728
+ "kind": {
729
+ "name": "kind",
730
+ "type": "text",
731
+ "primaryKey": false,
732
+ "notNull": true,
733
+ "autoincrement": false
734
+ },
735
+ "family_id": {
736
+ "name": "family_id",
737
+ "type": "text",
738
+ "primaryKey": false,
739
+ "notNull": true,
740
+ "autoincrement": false
741
+ },
742
+ "resources": {
743
+ "name": "resources",
744
+ "type": "text",
745
+ "primaryKey": false,
746
+ "notNull": true,
747
+ "autoincrement": false
748
+ },
749
+ "expires_at": {
750
+ "name": "expires_at",
751
+ "type": "integer",
752
+ "primaryKey": false,
753
+ "notNull": true,
754
+ "autoincrement": false
755
+ },
756
+ "revoked_at": {
757
+ "name": "revoked_at",
758
+ "type": "integer",
759
+ "primaryKey": false,
760
+ "notNull": false,
761
+ "autoincrement": false
762
+ }
763
+ },
764
+ "indexes": {},
765
+ "foreignKeys": {
766
+ "oauth_tokens_grant_id_oauth_grants_id_fk": {
767
+ "name": "oauth_tokens_grant_id_oauth_grants_id_fk",
768
+ "tableFrom": "oauth_tokens",
769
+ "tableTo": "oauth_grants",
770
+ "columnsFrom": [
771
+ "grant_id"
772
+ ],
773
+ "columnsTo": [
774
+ "id"
775
+ ],
776
+ "onDelete": "cascade",
777
+ "onUpdate": "no action"
778
+ }
779
+ },
780
+ "compositePrimaryKeys": {},
781
+ "uniqueConstraints": {},
782
+ "checkConstraints": {}
783
+ },
784
+ "oidc_config": {
785
+ "name": "oidc_config",
786
+ "columns": {
787
+ "id": {
788
+ "name": "id",
789
+ "type": "integer",
790
+ "primaryKey": true,
791
+ "notNull": true,
792
+ "autoincrement": false
793
+ },
794
+ "issuer": {
795
+ "name": "issuer",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": true,
799
+ "autoincrement": false
800
+ },
801
+ "client_id": {
802
+ "name": "client_id",
803
+ "type": "text",
804
+ "primaryKey": false,
805
+ "notNull": true,
806
+ "autoincrement": false
807
+ },
808
+ "client_secret_enc": {
809
+ "name": "client_secret_enc",
810
+ "type": "blob",
811
+ "primaryKey": false,
812
+ "notNull": false,
813
+ "autoincrement": false
814
+ },
815
+ "scopes": {
816
+ "name": "scopes",
817
+ "type": "text",
818
+ "primaryKey": false,
819
+ "notNull": true,
820
+ "autoincrement": false,
821
+ "default": "'openid email profile'"
822
+ },
823
+ "allow_policy": {
824
+ "name": "allow_policy",
825
+ "type": "text",
826
+ "primaryKey": false,
827
+ "notNull": false,
828
+ "autoincrement": false
829
+ },
830
+ "auto_provision": {
831
+ "name": "auto_provision",
832
+ "type": "integer",
833
+ "primaryKey": false,
834
+ "notNull": true,
835
+ "autoincrement": false,
836
+ "default": false
837
+ },
838
+ "enabled": {
839
+ "name": "enabled",
840
+ "type": "integer",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "autoincrement": false,
844
+ "default": false
845
+ }
846
+ },
847
+ "indexes": {},
848
+ "foreignKeys": {},
849
+ "compositePrimaryKeys": {},
850
+ "uniqueConstraints": {},
851
+ "checkConstraints": {}
852
+ },
853
+ "operation_group_aliases": {
854
+ "name": "operation_group_aliases",
855
+ "columns": {
856
+ "instance_id": {
857
+ "name": "instance_id",
858
+ "type": "text",
859
+ "primaryKey": false,
860
+ "notNull": true,
861
+ "autoincrement": false
862
+ },
863
+ "plugin_group": {
864
+ "name": "plugin_group",
865
+ "type": "text",
866
+ "primaryKey": false,
867
+ "notNull": true,
868
+ "autoincrement": false
869
+ },
870
+ "group_key": {
871
+ "name": "group_key",
872
+ "type": "text",
873
+ "primaryKey": false,
874
+ "notNull": true,
875
+ "autoincrement": false
876
+ }
877
+ },
878
+ "indexes": {
879
+ "operation_group_aliases_idx": {
880
+ "name": "operation_group_aliases_idx",
881
+ "columns": [
882
+ "instance_id",
883
+ "plugin_group"
884
+ ],
885
+ "isUnique": true
886
+ }
887
+ },
888
+ "foreignKeys": {
889
+ "operation_group_aliases_instance_id_plugin_instances_id_fk": {
890
+ "name": "operation_group_aliases_instance_id_plugin_instances_id_fk",
891
+ "tableFrom": "operation_group_aliases",
892
+ "tableTo": "plugin_instances",
893
+ "columnsFrom": [
894
+ "instance_id"
895
+ ],
896
+ "columnsTo": [
897
+ "id"
898
+ ],
899
+ "onDelete": "cascade",
900
+ "onUpdate": "no action"
901
+ }
902
+ },
903
+ "compositePrimaryKeys": {},
904
+ "uniqueConstraints": {},
905
+ "checkConstraints": {}
906
+ },
907
+ "operation_groups": {
908
+ "name": "operation_groups",
909
+ "columns": {
910
+ "id": {
911
+ "name": "id",
912
+ "type": "text",
913
+ "primaryKey": true,
914
+ "notNull": true,
915
+ "autoincrement": false
916
+ },
917
+ "instance_id": {
918
+ "name": "instance_id",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": true,
922
+ "autoincrement": false
923
+ },
924
+ "key": {
925
+ "name": "key",
926
+ "type": "text",
927
+ "primaryKey": false,
928
+ "notNull": true,
929
+ "autoincrement": false
930
+ },
931
+ "label": {
932
+ "name": "label",
933
+ "type": "text",
934
+ "primaryKey": false,
935
+ "notNull": true,
936
+ "autoincrement": false
937
+ },
938
+ "level": {
939
+ "name": "level",
940
+ "type": "text",
941
+ "primaryKey": false,
942
+ "notNull": true,
943
+ "autoincrement": false,
944
+ "default": "'read'"
945
+ },
946
+ "level_changed_at": {
947
+ "name": "level_changed_at",
948
+ "type": "integer",
949
+ "primaryKey": false,
950
+ "notNull": false,
951
+ "autoincrement": false
952
+ },
953
+ "level_changed_by": {
954
+ "name": "level_changed_by",
955
+ "type": "text",
956
+ "primaryKey": false,
957
+ "notNull": false,
958
+ "autoincrement": false
959
+ },
960
+ "first_seen_at": {
961
+ "name": "first_seen_at",
962
+ "type": "integer",
963
+ "primaryKey": false,
964
+ "notNull": true,
965
+ "autoincrement": false
966
+ },
967
+ "stale": {
968
+ "name": "stale",
969
+ "type": "integer",
970
+ "primaryKey": false,
971
+ "notNull": true,
972
+ "autoincrement": false,
973
+ "default": false
974
+ }
975
+ },
976
+ "indexes": {
977
+ "operation_groups_instance_key_idx": {
978
+ "name": "operation_groups_instance_key_idx",
979
+ "columns": [
980
+ "instance_id",
981
+ "key"
982
+ ],
983
+ "isUnique": true
984
+ }
985
+ },
986
+ "foreignKeys": {
987
+ "operation_groups_instance_id_plugin_instances_id_fk": {
988
+ "name": "operation_groups_instance_id_plugin_instances_id_fk",
989
+ "tableFrom": "operation_groups",
990
+ "tableTo": "plugin_instances",
991
+ "columnsFrom": [
992
+ "instance_id"
993
+ ],
994
+ "columnsTo": [
995
+ "id"
996
+ ],
997
+ "onDelete": "cascade",
998
+ "onUpdate": "no action"
999
+ },
1000
+ "operation_groups_level_changed_by_users_id_fk": {
1001
+ "name": "operation_groups_level_changed_by_users_id_fk",
1002
+ "tableFrom": "operation_groups",
1003
+ "tableTo": "users",
1004
+ "columnsFrom": [
1005
+ "level_changed_by"
1006
+ ],
1007
+ "columnsTo": [
1008
+ "id"
1009
+ ],
1010
+ "onDelete": "no action",
1011
+ "onUpdate": "no action"
1012
+ }
1013
+ },
1014
+ "compositePrimaryKeys": {},
1015
+ "uniqueConstraints": {},
1016
+ "checkConstraints": {}
1017
+ },
1018
+ "operations": {
1019
+ "name": "operations",
1020
+ "columns": {
1021
+ "id": {
1022
+ "name": "id",
1023
+ "type": "text",
1024
+ "primaryKey": true,
1025
+ "notNull": true,
1026
+ "autoincrement": false
1027
+ },
1028
+ "instance_id": {
1029
+ "name": "instance_id",
1030
+ "type": "text",
1031
+ "primaryKey": false,
1032
+ "notNull": true,
1033
+ "autoincrement": false
1034
+ },
1035
+ "key": {
1036
+ "name": "key",
1037
+ "type": "text",
1038
+ "primaryKey": false,
1039
+ "notNull": true,
1040
+ "autoincrement": false
1041
+ },
1042
+ "display_name": {
1043
+ "name": "display_name",
1044
+ "type": "text",
1045
+ "primaryKey": false,
1046
+ "notNull": false,
1047
+ "autoincrement": false
1048
+ },
1049
+ "kind": {
1050
+ "name": "kind",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": true,
1054
+ "autoincrement": false
1055
+ },
1056
+ "plugin_group": {
1057
+ "name": "plugin_group",
1058
+ "type": "text",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "autoincrement": false
1062
+ },
1063
+ "group_id": {
1064
+ "name": "group_id",
1065
+ "type": "text",
1066
+ "primaryKey": false,
1067
+ "notNull": true,
1068
+ "autoincrement": false
1069
+ },
1070
+ "tag": {
1071
+ "name": "tag",
1072
+ "type": "text",
1073
+ "primaryKey": false,
1074
+ "notNull": false,
1075
+ "autoincrement": false
1076
+ },
1077
+ "classification": {
1078
+ "name": "classification",
1079
+ "type": "text",
1080
+ "primaryKey": false,
1081
+ "notNull": true,
1082
+ "autoincrement": false
1083
+ },
1084
+ "classification_source": {
1085
+ "name": "classification_source",
1086
+ "type": "text",
1087
+ "primaryKey": false,
1088
+ "notNull": true,
1089
+ "autoincrement": false
1090
+ },
1091
+ "inferred_classification": {
1092
+ "name": "inferred_classification",
1093
+ "type": "text",
1094
+ "primaryKey": false,
1095
+ "notNull": true,
1096
+ "autoincrement": false
1097
+ },
1098
+ "inferred_reason": {
1099
+ "name": "inferred_reason",
1100
+ "type": "text",
1101
+ "primaryKey": false,
1102
+ "notNull": true,
1103
+ "autoincrement": false
1104
+ },
1105
+ "locked": {
1106
+ "name": "locked",
1107
+ "type": "integer",
1108
+ "primaryKey": false,
1109
+ "notNull": true,
1110
+ "autoincrement": false,
1111
+ "default": false
1112
+ },
1113
+ "level_override": {
1114
+ "name": "level_override",
1115
+ "type": "text",
1116
+ "primaryKey": false,
1117
+ "notNull": false,
1118
+ "autoincrement": false
1119
+ },
1120
+ "write_acknowledged": {
1121
+ "name": "write_acknowledged",
1122
+ "type": "integer",
1123
+ "primaryKey": false,
1124
+ "notNull": true,
1125
+ "autoincrement": false,
1126
+ "default": false
1127
+ },
1128
+ "acknowledged_at": {
1129
+ "name": "acknowledged_at",
1130
+ "type": "integer",
1131
+ "primaryKey": false,
1132
+ "notNull": false,
1133
+ "autoincrement": false
1134
+ },
1135
+ "acknowledged_by": {
1136
+ "name": "acknowledged_by",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": false,
1140
+ "autoincrement": false
1141
+ },
1142
+ "typed_confirmation": {
1143
+ "name": "typed_confirmation",
1144
+ "type": "integer",
1145
+ "primaryKey": false,
1146
+ "notNull": true,
1147
+ "autoincrement": false,
1148
+ "default": false
1149
+ },
1150
+ "attestation_required": {
1151
+ "name": "attestation_required",
1152
+ "type": "integer",
1153
+ "primaryKey": false,
1154
+ "notNull": true,
1155
+ "autoincrement": false,
1156
+ "default": false
1157
+ },
1158
+ "attestation_waived": {
1159
+ "name": "attestation_waived",
1160
+ "type": "integer",
1161
+ "primaryKey": false,
1162
+ "notNull": true,
1163
+ "autoincrement": false,
1164
+ "default": false
1165
+ },
1166
+ "needs_review": {
1167
+ "name": "needs_review",
1168
+ "type": "integer",
1169
+ "primaryKey": false,
1170
+ "notNull": true,
1171
+ "autoincrement": false,
1172
+ "default": false
1173
+ },
1174
+ "match_profile": {
1175
+ "name": "match_profile",
1176
+ "type": "text",
1177
+ "primaryKey": false,
1178
+ "notNull": false,
1179
+ "autoincrement": false
1180
+ },
1181
+ "params_schema": {
1182
+ "name": "params_schema",
1183
+ "type": "text",
1184
+ "primaryKey": false,
1185
+ "notNull": false,
1186
+ "autoincrement": false
1187
+ },
1188
+ "sensitive_params": {
1189
+ "name": "sensitive_params",
1190
+ "type": "text",
1191
+ "primaryKey": false,
1192
+ "notNull": false,
1193
+ "autoincrement": false
1194
+ },
1195
+ "sensitive_result": {
1196
+ "name": "sensitive_result",
1197
+ "type": "text",
1198
+ "primaryKey": false,
1199
+ "notNull": false,
1200
+ "autoincrement": false
1201
+ },
1202
+ "docs": {
1203
+ "name": "docs",
1204
+ "type": "text",
1205
+ "primaryKey": false,
1206
+ "notNull": false,
1207
+ "autoincrement": false
1208
+ },
1209
+ "first_seen_at": {
1210
+ "name": "first_seen_at",
1211
+ "type": "integer",
1212
+ "primaryKey": false,
1213
+ "notNull": true,
1214
+ "autoincrement": false
1215
+ },
1216
+ "last_seen_at": {
1217
+ "name": "last_seen_at",
1218
+ "type": "integer",
1219
+ "primaryKey": false,
1220
+ "notNull": true,
1221
+ "autoincrement": false
1222
+ },
1223
+ "stale": {
1224
+ "name": "stale",
1225
+ "type": "integer",
1226
+ "primaryKey": false,
1227
+ "notNull": true,
1228
+ "autoincrement": false,
1229
+ "default": false
1230
+ }
1231
+ },
1232
+ "indexes": {
1233
+ "operations_instance_key_idx": {
1234
+ "name": "operations_instance_key_idx",
1235
+ "columns": [
1236
+ "instance_id",
1237
+ "key"
1238
+ ],
1239
+ "isUnique": true
1240
+ },
1241
+ "operations_group_idx": {
1242
+ "name": "operations_group_idx",
1243
+ "columns": [
1244
+ "group_id"
1245
+ ],
1246
+ "isUnique": false
1247
+ }
1248
+ },
1249
+ "foreignKeys": {
1250
+ "operations_instance_id_plugin_instances_id_fk": {
1251
+ "name": "operations_instance_id_plugin_instances_id_fk",
1252
+ "tableFrom": "operations",
1253
+ "tableTo": "plugin_instances",
1254
+ "columnsFrom": [
1255
+ "instance_id"
1256
+ ],
1257
+ "columnsTo": [
1258
+ "id"
1259
+ ],
1260
+ "onDelete": "cascade",
1261
+ "onUpdate": "no action"
1262
+ },
1263
+ "operations_group_id_operation_groups_id_fk": {
1264
+ "name": "operations_group_id_operation_groups_id_fk",
1265
+ "tableFrom": "operations",
1266
+ "tableTo": "operation_groups",
1267
+ "columnsFrom": [
1268
+ "group_id"
1269
+ ],
1270
+ "columnsTo": [
1271
+ "id"
1272
+ ],
1273
+ "onDelete": "no action",
1274
+ "onUpdate": "no action"
1275
+ },
1276
+ "operations_acknowledged_by_users_id_fk": {
1277
+ "name": "operations_acknowledged_by_users_id_fk",
1278
+ "tableFrom": "operations",
1279
+ "tableTo": "users",
1280
+ "columnsFrom": [
1281
+ "acknowledged_by"
1282
+ ],
1283
+ "columnsTo": [
1284
+ "id"
1285
+ ],
1286
+ "onDelete": "no action",
1287
+ "onUpdate": "no action"
1288
+ }
1289
+ },
1290
+ "compositePrimaryKeys": {},
1291
+ "uniqueConstraints": {},
1292
+ "checkConstraints": {}
1293
+ },
1294
+ "pending_approvals": {
1295
+ "name": "pending_approvals",
1296
+ "columns": {
1297
+ "id": {
1298
+ "name": "id",
1299
+ "type": "text",
1300
+ "primaryKey": true,
1301
+ "notNull": true,
1302
+ "autoincrement": false
1303
+ },
1304
+ "instance_id": {
1305
+ "name": "instance_id",
1306
+ "type": "text",
1307
+ "primaryKey": false,
1308
+ "notNull": true,
1309
+ "autoincrement": false
1310
+ },
1311
+ "operation_id": {
1312
+ "name": "operation_id",
1313
+ "type": "text",
1314
+ "primaryKey": false,
1315
+ "notNull": true,
1316
+ "autoincrement": false
1317
+ },
1318
+ "params_display": {
1319
+ "name": "params_display",
1320
+ "type": "text",
1321
+ "primaryKey": false,
1322
+ "notNull": false,
1323
+ "autoincrement": false
1324
+ },
1325
+ "params_hash": {
1326
+ "name": "params_hash",
1327
+ "type": "text",
1328
+ "primaryKey": false,
1329
+ "notNull": true,
1330
+ "autoincrement": false
1331
+ },
1332
+ "resolved_targets": {
1333
+ "name": "resolved_targets",
1334
+ "type": "text",
1335
+ "primaryKey": false,
1336
+ "notNull": false,
1337
+ "autoincrement": false
1338
+ },
1339
+ "summary": {
1340
+ "name": "summary",
1341
+ "type": "text",
1342
+ "primaryKey": false,
1343
+ "notNull": true,
1344
+ "autoincrement": false
1345
+ },
1346
+ "confirm_literal": {
1347
+ "name": "confirm_literal",
1348
+ "type": "text",
1349
+ "primaryKey": false,
1350
+ "notNull": false,
1351
+ "autoincrement": false
1352
+ },
1353
+ "diff": {
1354
+ "name": "diff",
1355
+ "type": "text",
1356
+ "primaryKey": false,
1357
+ "notNull": false,
1358
+ "autoincrement": false
1359
+ },
1360
+ "expected_hash": {
1361
+ "name": "expected_hash",
1362
+ "type": "text",
1363
+ "primaryKey": false,
1364
+ "notNull": false,
1365
+ "autoincrement": false
1366
+ },
1367
+ "client_kind": {
1368
+ "name": "client_kind",
1369
+ "type": "text",
1370
+ "primaryKey": false,
1371
+ "notNull": false,
1372
+ "autoincrement": false
1373
+ },
1374
+ "client_id": {
1375
+ "name": "client_id",
1376
+ "type": "text",
1377
+ "primaryKey": false,
1378
+ "notNull": false,
1379
+ "autoincrement": false
1380
+ },
1381
+ "mcp_session_id": {
1382
+ "name": "mcp_session_id",
1383
+ "type": "text",
1384
+ "primaryKey": false,
1385
+ "notNull": false,
1386
+ "autoincrement": false
1387
+ },
1388
+ "requested_at": {
1389
+ "name": "requested_at",
1390
+ "type": "integer",
1391
+ "primaryKey": false,
1392
+ "notNull": true,
1393
+ "autoincrement": false
1394
+ },
1395
+ "expires_at": {
1396
+ "name": "expires_at",
1397
+ "type": "integer",
1398
+ "primaryKey": false,
1399
+ "notNull": true,
1400
+ "autoincrement": false
1401
+ },
1402
+ "status": {
1403
+ "name": "status",
1404
+ "type": "text",
1405
+ "primaryKey": false,
1406
+ "notNull": true,
1407
+ "autoincrement": false,
1408
+ "default": "'pending'"
1409
+ },
1410
+ "decided_by": {
1411
+ "name": "decided_by",
1412
+ "type": "text",
1413
+ "primaryKey": false,
1414
+ "notNull": false,
1415
+ "autoincrement": false
1416
+ },
1417
+ "decided_via": {
1418
+ "name": "decided_via",
1419
+ "type": "text",
1420
+ "primaryKey": false,
1421
+ "notNull": false,
1422
+ "autoincrement": false
1423
+ },
1424
+ "decided_at": {
1425
+ "name": "decided_at",
1426
+ "type": "integer",
1427
+ "primaryKey": false,
1428
+ "notNull": false,
1429
+ "autoincrement": false
1430
+ },
1431
+ "owner_user_id": {
1432
+ "name": "owner_user_id",
1433
+ "type": "text",
1434
+ "primaryKey": false,
1435
+ "notNull": false,
1436
+ "autoincrement": false
1437
+ }
1438
+ },
1439
+ "indexes": {},
1440
+ "foreignKeys": {
1441
+ "pending_approvals_instance_id_plugin_instances_id_fk": {
1442
+ "name": "pending_approvals_instance_id_plugin_instances_id_fk",
1443
+ "tableFrom": "pending_approvals",
1444
+ "tableTo": "plugin_instances",
1445
+ "columnsFrom": [
1446
+ "instance_id"
1447
+ ],
1448
+ "columnsTo": [
1449
+ "id"
1450
+ ],
1451
+ "onDelete": "no action",
1452
+ "onUpdate": "no action"
1453
+ },
1454
+ "pending_approvals_operation_id_operations_id_fk": {
1455
+ "name": "pending_approvals_operation_id_operations_id_fk",
1456
+ "tableFrom": "pending_approvals",
1457
+ "tableTo": "operations",
1458
+ "columnsFrom": [
1459
+ "operation_id"
1460
+ ],
1461
+ "columnsTo": [
1462
+ "id"
1463
+ ],
1464
+ "onDelete": "no action",
1465
+ "onUpdate": "no action"
1466
+ },
1467
+ "pending_approvals_owner_user_id_users_id_fk": {
1468
+ "name": "pending_approvals_owner_user_id_users_id_fk",
1469
+ "tableFrom": "pending_approvals",
1470
+ "tableTo": "users",
1471
+ "columnsFrom": [
1472
+ "owner_user_id"
1473
+ ],
1474
+ "columnsTo": [
1475
+ "id"
1476
+ ],
1477
+ "onDelete": "no action",
1478
+ "onUpdate": "no action"
1479
+ }
1480
+ },
1481
+ "compositePrimaryKeys": {},
1482
+ "uniqueConstraints": {},
1483
+ "checkConstraints": {}
1484
+ },
1485
+ "plugin_instances": {
1486
+ "name": "plugin_instances",
1487
+ "columns": {
1488
+ "id": {
1489
+ "name": "id",
1490
+ "type": "text",
1491
+ "primaryKey": true,
1492
+ "notNull": true,
1493
+ "autoincrement": false
1494
+ },
1495
+ "plugin_id": {
1496
+ "name": "plugin_id",
1497
+ "type": "text",
1498
+ "primaryKey": false,
1499
+ "notNull": true,
1500
+ "autoincrement": false
1501
+ },
1502
+ "slug": {
1503
+ "name": "slug",
1504
+ "type": "text",
1505
+ "primaryKey": false,
1506
+ "notNull": true,
1507
+ "autoincrement": false
1508
+ },
1509
+ "display_name": {
1510
+ "name": "display_name",
1511
+ "type": "text",
1512
+ "primaryKey": false,
1513
+ "notNull": true,
1514
+ "autoincrement": false
1515
+ },
1516
+ "enabled": {
1517
+ "name": "enabled",
1518
+ "type": "integer",
1519
+ "primaryKey": false,
1520
+ "notNull": true,
1521
+ "autoincrement": false,
1522
+ "default": true
1523
+ },
1524
+ "config": {
1525
+ "name": "config",
1526
+ "type": "text",
1527
+ "primaryKey": false,
1528
+ "notNull": true,
1529
+ "autoincrement": false,
1530
+ "default": "'{}'"
1531
+ },
1532
+ "secrets_enc": {
1533
+ "name": "secrets_enc",
1534
+ "type": "blob",
1535
+ "primaryKey": false,
1536
+ "notNull": false,
1537
+ "autoincrement": false
1538
+ },
1539
+ "auth_methods": {
1540
+ "name": "auth_methods",
1541
+ "type": "text",
1542
+ "primaryKey": false,
1543
+ "notNull": false,
1544
+ "autoincrement": false
1545
+ },
1546
+ "settings": {
1547
+ "name": "settings",
1548
+ "type": "text",
1549
+ "primaryKey": false,
1550
+ "notNull": true,
1551
+ "autoincrement": false,
1552
+ "default": "'{}'"
1553
+ },
1554
+ "status": {
1555
+ "name": "status",
1556
+ "type": "text",
1557
+ "primaryKey": false,
1558
+ "notNull": true,
1559
+ "autoincrement": false,
1560
+ "default": "'stopped'"
1561
+ },
1562
+ "status_error": {
1563
+ "name": "status_error",
1564
+ "type": "text",
1565
+ "primaryKey": false,
1566
+ "notNull": false,
1567
+ "autoincrement": false
1568
+ },
1569
+ "upstream_version": {
1570
+ "name": "upstream_version",
1571
+ "type": "text",
1572
+ "primaryKey": false,
1573
+ "notNull": false,
1574
+ "autoincrement": false
1575
+ },
1576
+ "source_ref": {
1577
+ "name": "source_ref",
1578
+ "type": "text",
1579
+ "primaryKey": false,
1580
+ "notNull": false,
1581
+ "autoincrement": false
1582
+ },
1583
+ "last_synced_at": {
1584
+ "name": "last_synced_at",
1585
+ "type": "integer",
1586
+ "primaryKey": false,
1587
+ "notNull": false,
1588
+ "autoincrement": false
1589
+ },
1590
+ "last_sync_status": {
1591
+ "name": "last_sync_status",
1592
+ "type": "text",
1593
+ "primaryKey": false,
1594
+ "notNull": false,
1595
+ "autoincrement": false
1596
+ },
1597
+ "catalog_plugin_version": {
1598
+ "name": "catalog_plugin_version",
1599
+ "type": "text",
1600
+ "primaryKey": false,
1601
+ "notNull": false,
1602
+ "autoincrement": false
1603
+ },
1604
+ "created_at": {
1605
+ "name": "created_at",
1606
+ "type": "integer",
1607
+ "primaryKey": false,
1608
+ "notNull": true,
1609
+ "autoincrement": false,
1610
+ "default": "(unixepoch() * 1000)"
1611
+ }
1612
+ },
1613
+ "indexes": {
1614
+ "plugin_instances_slug_unique": {
1615
+ "name": "plugin_instances_slug_unique",
1616
+ "columns": [
1617
+ "slug"
1618
+ ],
1619
+ "isUnique": true
1620
+ }
1621
+ },
1622
+ "foreignKeys": {
1623
+ "plugin_instances_plugin_id_plugins_id_fk": {
1624
+ "name": "plugin_instances_plugin_id_plugins_id_fk",
1625
+ "tableFrom": "plugin_instances",
1626
+ "tableTo": "plugins",
1627
+ "columnsFrom": [
1628
+ "plugin_id"
1629
+ ],
1630
+ "columnsTo": [
1631
+ "id"
1632
+ ],
1633
+ "onDelete": "no action",
1634
+ "onUpdate": "no action"
1635
+ }
1636
+ },
1637
+ "compositePrimaryKeys": {},
1638
+ "uniqueConstraints": {},
1639
+ "checkConstraints": {}
1640
+ },
1641
+ "plugin_repos": {
1642
+ "name": "plugin_repos",
1643
+ "columns": {
1644
+ "id": {
1645
+ "name": "id",
1646
+ "type": "text",
1647
+ "primaryKey": true,
1648
+ "notNull": true,
1649
+ "autoincrement": false
1650
+ },
1651
+ "url": {
1652
+ "name": "url",
1653
+ "type": "text",
1654
+ "primaryKey": false,
1655
+ "notNull": true,
1656
+ "autoincrement": false
1657
+ },
1658
+ "name": {
1659
+ "name": "name",
1660
+ "type": "text",
1661
+ "primaryKey": false,
1662
+ "notNull": false,
1663
+ "autoincrement": false
1664
+ },
1665
+ "signing_mode": {
1666
+ "name": "signing_mode",
1667
+ "type": "text",
1668
+ "primaryKey": false,
1669
+ "notNull": true,
1670
+ "autoincrement": false
1671
+ },
1672
+ "public_key": {
1673
+ "name": "public_key",
1674
+ "type": "text",
1675
+ "primaryKey": false,
1676
+ "notNull": false,
1677
+ "autoincrement": false
1678
+ },
1679
+ "key_fingerprint": {
1680
+ "name": "key_fingerprint",
1681
+ "type": "text",
1682
+ "primaryKey": false,
1683
+ "notNull": false,
1684
+ "autoincrement": false
1685
+ },
1686
+ "key_status": {
1687
+ "name": "key_status",
1688
+ "type": "text",
1689
+ "primaryKey": false,
1690
+ "notNull": true,
1691
+ "autoincrement": false,
1692
+ "default": "'ok'"
1693
+ },
1694
+ "index_cache": {
1695
+ "name": "index_cache",
1696
+ "type": "text",
1697
+ "primaryKey": false,
1698
+ "notNull": false,
1699
+ "autoincrement": false
1700
+ },
1701
+ "last_fetched_at": {
1702
+ "name": "last_fetched_at",
1703
+ "type": "integer",
1704
+ "primaryKey": false,
1705
+ "notNull": false,
1706
+ "autoincrement": false
1707
+ },
1708
+ "last_fetch_error": {
1709
+ "name": "last_fetch_error",
1710
+ "type": "text",
1711
+ "primaryKey": false,
1712
+ "notNull": false,
1713
+ "autoincrement": false
1714
+ }
1715
+ },
1716
+ "indexes": {
1717
+ "plugin_repos_url_unique": {
1718
+ "name": "plugin_repos_url_unique",
1719
+ "columns": [
1720
+ "url"
1721
+ ],
1722
+ "isUnique": true
1723
+ }
1724
+ },
1725
+ "foreignKeys": {},
1726
+ "compositePrimaryKeys": {},
1727
+ "uniqueConstraints": {},
1728
+ "checkConstraints": {}
1729
+ },
1730
+ "plugins": {
1731
+ "name": "plugins",
1732
+ "columns": {
1733
+ "id": {
1734
+ "name": "id",
1735
+ "type": "text",
1736
+ "primaryKey": true,
1737
+ "notNull": true,
1738
+ "autoincrement": false
1739
+ },
1740
+ "plugin_id": {
1741
+ "name": "plugin_id",
1742
+ "type": "text",
1743
+ "primaryKey": false,
1744
+ "notNull": true,
1745
+ "autoincrement": false
1746
+ },
1747
+ "version": {
1748
+ "name": "version",
1749
+ "type": "text",
1750
+ "primaryKey": false,
1751
+ "notNull": true,
1752
+ "autoincrement": false
1753
+ },
1754
+ "repo_id": {
1755
+ "name": "repo_id",
1756
+ "type": "text",
1757
+ "primaryKey": false,
1758
+ "notNull": false,
1759
+ "autoincrement": false
1760
+ },
1761
+ "path": {
1762
+ "name": "path",
1763
+ "type": "text",
1764
+ "primaryKey": false,
1765
+ "notNull": true,
1766
+ "autoincrement": false
1767
+ },
1768
+ "sha256": {
1769
+ "name": "sha256",
1770
+ "type": "text",
1771
+ "primaryKey": false,
1772
+ "notNull": false,
1773
+ "autoincrement": false
1774
+ },
1775
+ "signature_verified": {
1776
+ "name": "signature_verified",
1777
+ "type": "integer",
1778
+ "primaryKey": false,
1779
+ "notNull": true,
1780
+ "autoincrement": false,
1781
+ "default": false
1782
+ },
1783
+ "manifest": {
1784
+ "name": "manifest",
1785
+ "type": "text",
1786
+ "primaryKey": false,
1787
+ "notNull": true,
1788
+ "autoincrement": false
1789
+ },
1790
+ "status": {
1791
+ "name": "status",
1792
+ "type": "text",
1793
+ "primaryKey": false,
1794
+ "notNull": true,
1795
+ "autoincrement": false
1796
+ },
1797
+ "status_error": {
1798
+ "name": "status_error",
1799
+ "type": "text",
1800
+ "primaryKey": false,
1801
+ "notNull": false,
1802
+ "autoincrement": false
1803
+ },
1804
+ "instructions": {
1805
+ "name": "instructions",
1806
+ "type": "text",
1807
+ "primaryKey": false,
1808
+ "notNull": false,
1809
+ "autoincrement": false
1810
+ },
1811
+ "enabled": {
1812
+ "name": "enabled",
1813
+ "type": "integer",
1814
+ "primaryKey": false,
1815
+ "notNull": true,
1816
+ "autoincrement": false,
1817
+ "default": false
1818
+ },
1819
+ "manual": {
1820
+ "name": "manual",
1821
+ "type": "text",
1822
+ "primaryKey": false,
1823
+ "notNull": false,
1824
+ "autoincrement": false
1825
+ },
1826
+ "created_at": {
1827
+ "name": "created_at",
1828
+ "type": "integer",
1829
+ "primaryKey": false,
1830
+ "notNull": true,
1831
+ "autoincrement": false,
1832
+ "default": "(unixepoch() * 1000)"
1833
+ }
1834
+ },
1835
+ "indexes": {
1836
+ "plugins_plugin_id_unique": {
1837
+ "name": "plugins_plugin_id_unique",
1838
+ "columns": [
1839
+ "plugin_id"
1840
+ ],
1841
+ "isUnique": true
1842
+ }
1843
+ },
1844
+ "foreignKeys": {
1845
+ "plugins_repo_id_plugin_repos_id_fk": {
1846
+ "name": "plugins_repo_id_plugin_repos_id_fk",
1847
+ "tableFrom": "plugins",
1848
+ "tableTo": "plugin_repos",
1849
+ "columnsFrom": [
1850
+ "repo_id"
1851
+ ],
1852
+ "columnsTo": [
1853
+ "id"
1854
+ ],
1855
+ "onDelete": "no action",
1856
+ "onUpdate": "no action"
1857
+ }
1858
+ },
1859
+ "compositePrimaryKeys": {},
1860
+ "uniqueConstraints": {},
1861
+ "checkConstraints": {}
1862
+ },
1863
+ "pre_approval_hits": {
1864
+ "name": "pre_approval_hits",
1865
+ "columns": {
1866
+ "id": {
1867
+ "name": "id",
1868
+ "type": "integer",
1869
+ "primaryKey": true,
1870
+ "notNull": true,
1871
+ "autoincrement": true
1872
+ },
1873
+ "rule_id": {
1874
+ "name": "rule_id",
1875
+ "type": "text",
1876
+ "primaryKey": false,
1877
+ "notNull": true,
1878
+ "autoincrement": false
1879
+ },
1880
+ "occurred_at": {
1881
+ "name": "occurred_at",
1882
+ "type": "integer",
1883
+ "primaryKey": false,
1884
+ "notNull": true,
1885
+ "autoincrement": false
1886
+ }
1887
+ },
1888
+ "indexes": {
1889
+ "hits_rule_time_idx": {
1890
+ "name": "hits_rule_time_idx",
1891
+ "columns": [
1892
+ "rule_id",
1893
+ "occurred_at"
1894
+ ],
1895
+ "isUnique": false
1896
+ }
1897
+ },
1898
+ "foreignKeys": {
1899
+ "pre_approval_hits_rule_id_pre_approval_rules_id_fk": {
1900
+ "name": "pre_approval_hits_rule_id_pre_approval_rules_id_fk",
1901
+ "tableFrom": "pre_approval_hits",
1902
+ "tableTo": "pre_approval_rules",
1903
+ "columnsFrom": [
1904
+ "rule_id"
1905
+ ],
1906
+ "columnsTo": [
1907
+ "id"
1908
+ ],
1909
+ "onDelete": "cascade",
1910
+ "onUpdate": "no action"
1911
+ }
1912
+ },
1913
+ "compositePrimaryKeys": {},
1914
+ "uniqueConstraints": {},
1915
+ "checkConstraints": {}
1916
+ },
1917
+ "pre_approval_rules": {
1918
+ "name": "pre_approval_rules",
1919
+ "columns": {
1920
+ "id": {
1921
+ "name": "id",
1922
+ "type": "text",
1923
+ "primaryKey": true,
1924
+ "notNull": true,
1925
+ "autoincrement": false
1926
+ },
1927
+ "instance_id": {
1928
+ "name": "instance_id",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": true,
1932
+ "autoincrement": false
1933
+ },
1934
+ "operation_id": {
1935
+ "name": "operation_id",
1936
+ "type": "text",
1937
+ "primaryKey": false,
1938
+ "notNull": true,
1939
+ "autoincrement": false
1940
+ },
1941
+ "match": {
1942
+ "name": "match",
1943
+ "type": "text",
1944
+ "primaryKey": false,
1945
+ "notNull": true,
1946
+ "autoincrement": false,
1947
+ "default": "'[]'"
1948
+ },
1949
+ "rate_limit": {
1950
+ "name": "rate_limit",
1951
+ "type": "integer",
1952
+ "primaryKey": false,
1953
+ "notNull": false,
1954
+ "autoincrement": false
1955
+ },
1956
+ "window_seconds": {
1957
+ "name": "window_seconds",
1958
+ "type": "integer",
1959
+ "primaryKey": false,
1960
+ "notNull": false,
1961
+ "autoincrement": false
1962
+ },
1963
+ "expires_at": {
1964
+ "name": "expires_at",
1965
+ "type": "integer",
1966
+ "primaryKey": false,
1967
+ "notNull": false,
1968
+ "autoincrement": false
1969
+ },
1970
+ "reason": {
1971
+ "name": "reason",
1972
+ "type": "text",
1973
+ "primaryKey": false,
1974
+ "notNull": true,
1975
+ "autoincrement": false
1976
+ },
1977
+ "enabled": {
1978
+ "name": "enabled",
1979
+ "type": "integer",
1980
+ "primaryKey": false,
1981
+ "notNull": true,
1982
+ "autoincrement": false,
1983
+ "default": true
1984
+ },
1985
+ "created_by": {
1986
+ "name": "created_by",
1987
+ "type": "text",
1988
+ "primaryKey": false,
1989
+ "notNull": false,
1990
+ "autoincrement": false
1991
+ },
1992
+ "owner_user_id": {
1993
+ "name": "owner_user_id",
1994
+ "type": "text",
1995
+ "primaryKey": false,
1996
+ "notNull": false,
1997
+ "autoincrement": false
1998
+ },
1999
+ "created_at": {
2000
+ "name": "created_at",
2001
+ "type": "integer",
2002
+ "primaryKey": false,
2003
+ "notNull": true,
2004
+ "autoincrement": false,
2005
+ "default": "(unixepoch() * 1000)"
2006
+ },
2007
+ "updated_at": {
2008
+ "name": "updated_at",
2009
+ "type": "integer",
2010
+ "primaryKey": false,
2011
+ "notNull": false,
2012
+ "autoincrement": false
2013
+ },
2014
+ "last_triggered_at": {
2015
+ "name": "last_triggered_at",
2016
+ "type": "integer",
2017
+ "primaryKey": false,
2018
+ "notNull": false,
2019
+ "autoincrement": false
2020
+ },
2021
+ "strict_miss_at": {
2022
+ "name": "strict_miss_at",
2023
+ "type": "integer",
2024
+ "primaryKey": false,
2025
+ "notNull": false,
2026
+ "autoincrement": false
2027
+ }
2028
+ },
2029
+ "indexes": {},
2030
+ "foreignKeys": {
2031
+ "pre_approval_rules_instance_id_plugin_instances_id_fk": {
2032
+ "name": "pre_approval_rules_instance_id_plugin_instances_id_fk",
2033
+ "tableFrom": "pre_approval_rules",
2034
+ "tableTo": "plugin_instances",
2035
+ "columnsFrom": [
2036
+ "instance_id"
2037
+ ],
2038
+ "columnsTo": [
2039
+ "id"
2040
+ ],
2041
+ "onDelete": "cascade",
2042
+ "onUpdate": "no action"
2043
+ },
2044
+ "pre_approval_rules_operation_id_operations_id_fk": {
2045
+ "name": "pre_approval_rules_operation_id_operations_id_fk",
2046
+ "tableFrom": "pre_approval_rules",
2047
+ "tableTo": "operations",
2048
+ "columnsFrom": [
2049
+ "operation_id"
2050
+ ],
2051
+ "columnsTo": [
2052
+ "id"
2053
+ ],
2054
+ "onDelete": "no action",
2055
+ "onUpdate": "no action"
2056
+ },
2057
+ "pre_approval_rules_created_by_users_id_fk": {
2058
+ "name": "pre_approval_rules_created_by_users_id_fk",
2059
+ "tableFrom": "pre_approval_rules",
2060
+ "tableTo": "users",
2061
+ "columnsFrom": [
2062
+ "created_by"
2063
+ ],
2064
+ "columnsTo": [
2065
+ "id"
2066
+ ],
2067
+ "onDelete": "no action",
2068
+ "onUpdate": "no action"
2069
+ },
2070
+ "pre_approval_rules_owner_user_id_users_id_fk": {
2071
+ "name": "pre_approval_rules_owner_user_id_users_id_fk",
2072
+ "tableFrom": "pre_approval_rules",
2073
+ "tableTo": "users",
2074
+ "columnsFrom": [
2075
+ "owner_user_id"
2076
+ ],
2077
+ "columnsTo": [
2078
+ "id"
2079
+ ],
2080
+ "onDelete": "no action",
2081
+ "onUpdate": "no action"
2082
+ }
2083
+ },
2084
+ "compositePrimaryKeys": {},
2085
+ "uniqueConstraints": {},
2086
+ "checkConstraints": {}
2087
+ },
2088
+ "registry_entries": {
2089
+ "name": "registry_entries",
2090
+ "columns": {
2091
+ "id": {
2092
+ "name": "id",
2093
+ "type": "text",
2094
+ "primaryKey": true,
2095
+ "notNull": true,
2096
+ "autoincrement": false
2097
+ },
2098
+ "instance_id": {
2099
+ "name": "instance_id",
2100
+ "type": "text",
2101
+ "primaryKey": false,
2102
+ "notNull": true,
2103
+ "autoincrement": false
2104
+ },
2105
+ "kind": {
2106
+ "name": "kind",
2107
+ "type": "text",
2108
+ "primaryKey": false,
2109
+ "notNull": true,
2110
+ "autoincrement": false
2111
+ },
2112
+ "ext_id": {
2113
+ "name": "ext_id",
2114
+ "type": "text",
2115
+ "primaryKey": false,
2116
+ "notNull": true,
2117
+ "autoincrement": false
2118
+ },
2119
+ "name": {
2120
+ "name": "name",
2121
+ "type": "text",
2122
+ "primaryKey": false,
2123
+ "notNull": true,
2124
+ "autoincrement": false
2125
+ },
2126
+ "parent_ext_id": {
2127
+ "name": "parent_ext_id",
2128
+ "type": "text",
2129
+ "primaryKey": false,
2130
+ "notNull": false,
2131
+ "autoincrement": false
2132
+ },
2133
+ "scopes": {
2134
+ "name": "scopes",
2135
+ "type": "text",
2136
+ "primaryKey": false,
2137
+ "notNull": false,
2138
+ "autoincrement": false
2139
+ },
2140
+ "attrs": {
2141
+ "name": "attrs",
2142
+ "type": "text",
2143
+ "primaryKey": false,
2144
+ "notNull": false,
2145
+ "autoincrement": false
2146
+ },
2147
+ "stale": {
2148
+ "name": "stale",
2149
+ "type": "integer",
2150
+ "primaryKey": false,
2151
+ "notNull": true,
2152
+ "autoincrement": false,
2153
+ "default": false
2154
+ },
2155
+ "last_synced_at": {
2156
+ "name": "last_synced_at",
2157
+ "type": "integer",
2158
+ "primaryKey": false,
2159
+ "notNull": true,
2160
+ "autoincrement": false
2161
+ }
2162
+ },
2163
+ "indexes": {
2164
+ "registry_instance_kind_ext_idx": {
2165
+ "name": "registry_instance_kind_ext_idx",
2166
+ "columns": [
2167
+ "instance_id",
2168
+ "kind",
2169
+ "ext_id"
2170
+ ],
2171
+ "isUnique": true
2172
+ }
2173
+ },
2174
+ "foreignKeys": {
2175
+ "registry_entries_instance_id_plugin_instances_id_fk": {
2176
+ "name": "registry_entries_instance_id_plugin_instances_id_fk",
2177
+ "tableFrom": "registry_entries",
2178
+ "tableTo": "plugin_instances",
2179
+ "columnsFrom": [
2180
+ "instance_id"
2181
+ ],
2182
+ "columnsTo": [
2183
+ "id"
2184
+ ],
2185
+ "onDelete": "cascade",
2186
+ "onUpdate": "no action"
2187
+ }
2188
+ },
2189
+ "compositePrimaryKeys": {},
2190
+ "uniqueConstraints": {},
2191
+ "checkConstraints": {}
2192
+ },
2193
+ "role_instances": {
2194
+ "name": "role_instances",
2195
+ "columns": {
2196
+ "role_id": {
2197
+ "name": "role_id",
2198
+ "type": "text",
2199
+ "primaryKey": false,
2200
+ "notNull": true,
2201
+ "autoincrement": false
2202
+ },
2203
+ "instance_id": {
2204
+ "name": "instance_id",
2205
+ "type": "text",
2206
+ "primaryKey": false,
2207
+ "notNull": true,
2208
+ "autoincrement": false
2209
+ },
2210
+ "can_set_own_levels": {
2211
+ "name": "can_set_own_levels",
2212
+ "type": "integer",
2213
+ "primaryKey": false,
2214
+ "notNull": true,
2215
+ "autoincrement": false,
2216
+ "default": false
2217
+ },
2218
+ "can_manage_own_rules": {
2219
+ "name": "can_manage_own_rules",
2220
+ "type": "integer",
2221
+ "primaryKey": false,
2222
+ "notNull": true,
2223
+ "autoincrement": false,
2224
+ "default": false
2225
+ },
2226
+ "can_see_status": {
2227
+ "name": "can_see_status",
2228
+ "type": "integer",
2229
+ "primaryKey": false,
2230
+ "notNull": true,
2231
+ "autoincrement": false,
2232
+ "default": false
2233
+ }
2234
+ },
2235
+ "indexes": {
2236
+ "role_instances_idx": {
2237
+ "name": "role_instances_idx",
2238
+ "columns": [
2239
+ "role_id",
2240
+ "instance_id"
2241
+ ],
2242
+ "isUnique": true
2243
+ }
2244
+ },
2245
+ "foreignKeys": {
2246
+ "role_instances_role_id_roles_id_fk": {
2247
+ "name": "role_instances_role_id_roles_id_fk",
2248
+ "tableFrom": "role_instances",
2249
+ "tableTo": "roles",
2250
+ "columnsFrom": [
2251
+ "role_id"
2252
+ ],
2253
+ "columnsTo": [
2254
+ "id"
2255
+ ],
2256
+ "onDelete": "cascade",
2257
+ "onUpdate": "no action"
2258
+ },
2259
+ "role_instances_instance_id_plugin_instances_id_fk": {
2260
+ "name": "role_instances_instance_id_plugin_instances_id_fk",
2261
+ "tableFrom": "role_instances",
2262
+ "tableTo": "plugin_instances",
2263
+ "columnsFrom": [
2264
+ "instance_id"
2265
+ ],
2266
+ "columnsTo": [
2267
+ "id"
2268
+ ],
2269
+ "onDelete": "cascade",
2270
+ "onUpdate": "no action"
2271
+ }
2272
+ },
2273
+ "compositePrimaryKeys": {},
2274
+ "uniqueConstraints": {},
2275
+ "checkConstraints": {}
2276
+ },
2277
+ "role_levels": {
2278
+ "name": "role_levels",
2279
+ "columns": {
2280
+ "id": {
2281
+ "name": "id",
2282
+ "type": "text",
2283
+ "primaryKey": true,
2284
+ "notNull": true,
2285
+ "autoincrement": false
2286
+ },
2287
+ "role_id": {
2288
+ "name": "role_id",
2289
+ "type": "text",
2290
+ "primaryKey": false,
2291
+ "notNull": true,
2292
+ "autoincrement": false
2293
+ },
2294
+ "instance_id": {
2295
+ "name": "instance_id",
2296
+ "type": "text",
2297
+ "primaryKey": false,
2298
+ "notNull": true,
2299
+ "autoincrement": false
2300
+ },
2301
+ "group_id": {
2302
+ "name": "group_id",
2303
+ "type": "text",
2304
+ "primaryKey": false,
2305
+ "notNull": false,
2306
+ "autoincrement": false
2307
+ },
2308
+ "operation_id": {
2309
+ "name": "operation_id",
2310
+ "type": "text",
2311
+ "primaryKey": false,
2312
+ "notNull": false,
2313
+ "autoincrement": false
2314
+ },
2315
+ "level": {
2316
+ "name": "level",
2317
+ "type": "text",
2318
+ "primaryKey": false,
2319
+ "notNull": true,
2320
+ "autoincrement": false
2321
+ },
2322
+ "changed_at": {
2323
+ "name": "changed_at",
2324
+ "type": "integer",
2325
+ "primaryKey": false,
2326
+ "notNull": false,
2327
+ "autoincrement": false
2328
+ },
2329
+ "changed_by": {
2330
+ "name": "changed_by",
2331
+ "type": "text",
2332
+ "primaryKey": false,
2333
+ "notNull": false,
2334
+ "autoincrement": false
2335
+ }
2336
+ },
2337
+ "indexes": {
2338
+ "role_levels_group_idx": {
2339
+ "name": "role_levels_group_idx",
2340
+ "columns": [
2341
+ "role_id",
2342
+ "group_id"
2343
+ ],
2344
+ "isUnique": true
2345
+ },
2346
+ "role_levels_op_idx": {
2347
+ "name": "role_levels_op_idx",
2348
+ "columns": [
2349
+ "role_id",
2350
+ "operation_id"
2351
+ ],
2352
+ "isUnique": true
2353
+ }
2354
+ },
2355
+ "foreignKeys": {
2356
+ "role_levels_role_id_roles_id_fk": {
2357
+ "name": "role_levels_role_id_roles_id_fk",
2358
+ "tableFrom": "role_levels",
2359
+ "tableTo": "roles",
2360
+ "columnsFrom": [
2361
+ "role_id"
2362
+ ],
2363
+ "columnsTo": [
2364
+ "id"
2365
+ ],
2366
+ "onDelete": "cascade",
2367
+ "onUpdate": "no action"
2368
+ },
2369
+ "role_levels_instance_id_plugin_instances_id_fk": {
2370
+ "name": "role_levels_instance_id_plugin_instances_id_fk",
2371
+ "tableFrom": "role_levels",
2372
+ "tableTo": "plugin_instances",
2373
+ "columnsFrom": [
2374
+ "instance_id"
2375
+ ],
2376
+ "columnsTo": [
2377
+ "id"
2378
+ ],
2379
+ "onDelete": "cascade",
2380
+ "onUpdate": "no action"
2381
+ },
2382
+ "role_levels_group_id_operation_groups_id_fk": {
2383
+ "name": "role_levels_group_id_operation_groups_id_fk",
2384
+ "tableFrom": "role_levels",
2385
+ "tableTo": "operation_groups",
2386
+ "columnsFrom": [
2387
+ "group_id"
2388
+ ],
2389
+ "columnsTo": [
2390
+ "id"
2391
+ ],
2392
+ "onDelete": "cascade",
2393
+ "onUpdate": "no action"
2394
+ },
2395
+ "role_levels_operation_id_operations_id_fk": {
2396
+ "name": "role_levels_operation_id_operations_id_fk",
2397
+ "tableFrom": "role_levels",
2398
+ "tableTo": "operations",
2399
+ "columnsFrom": [
2400
+ "operation_id"
2401
+ ],
2402
+ "columnsTo": [
2403
+ "id"
2404
+ ],
2405
+ "onDelete": "cascade",
2406
+ "onUpdate": "no action"
2407
+ },
2408
+ "role_levels_changed_by_users_id_fk": {
2409
+ "name": "role_levels_changed_by_users_id_fk",
2410
+ "tableFrom": "role_levels",
2411
+ "tableTo": "users",
2412
+ "columnsFrom": [
2413
+ "changed_by"
2414
+ ],
2415
+ "columnsTo": [
2416
+ "id"
2417
+ ],
2418
+ "onDelete": "set null",
2419
+ "onUpdate": "no action"
2420
+ }
2421
+ },
2422
+ "compositePrimaryKeys": {},
2423
+ "uniqueConstraints": {},
2424
+ "checkConstraints": {}
2425
+ },
2426
+ "roles": {
2427
+ "name": "roles",
2428
+ "columns": {
2429
+ "id": {
2430
+ "name": "id",
2431
+ "type": "text",
2432
+ "primaryKey": true,
2433
+ "notNull": true,
2434
+ "autoincrement": false
2435
+ },
2436
+ "name": {
2437
+ "name": "name",
2438
+ "type": "text",
2439
+ "primaryKey": false,
2440
+ "notNull": true,
2441
+ "autoincrement": false
2442
+ },
2443
+ "built_in": {
2444
+ "name": "built_in",
2445
+ "type": "integer",
2446
+ "primaryKey": false,
2447
+ "notNull": true,
2448
+ "autoincrement": false,
2449
+ "default": false
2450
+ },
2451
+ "can_see_other_endpoints": {
2452
+ "name": "can_see_other_endpoints",
2453
+ "type": "integer",
2454
+ "primaryKey": false,
2455
+ "notNull": true,
2456
+ "autoincrement": false,
2457
+ "default": false
2458
+ },
2459
+ "created_at": {
2460
+ "name": "created_at",
2461
+ "type": "integer",
2462
+ "primaryKey": false,
2463
+ "notNull": true,
2464
+ "autoincrement": false,
2465
+ "default": "(unixepoch() * 1000)"
2466
+ },
2467
+ "updated_at": {
2468
+ "name": "updated_at",
2469
+ "type": "integer",
2470
+ "primaryKey": false,
2471
+ "notNull": false,
2472
+ "autoincrement": false
2473
+ }
2474
+ },
2475
+ "indexes": {
2476
+ "roles_name_unique": {
2477
+ "name": "roles_name_unique",
2478
+ "columns": [
2479
+ "name"
2480
+ ],
2481
+ "isUnique": true
2482
+ }
2483
+ },
2484
+ "foreignKeys": {},
2485
+ "compositePrimaryKeys": {},
2486
+ "uniqueConstraints": {},
2487
+ "checkConstraints": {}
2488
+ },
2489
+ "sessions": {
2490
+ "name": "sessions",
2491
+ "columns": {
2492
+ "id_hash": {
2493
+ "name": "id_hash",
2494
+ "type": "text",
2495
+ "primaryKey": true,
2496
+ "notNull": true,
2497
+ "autoincrement": false
2498
+ },
2499
+ "user_id": {
2500
+ "name": "user_id",
2501
+ "type": "text",
2502
+ "primaryKey": false,
2503
+ "notNull": true,
2504
+ "autoincrement": false
2505
+ },
2506
+ "kind": {
2507
+ "name": "kind",
2508
+ "type": "text",
2509
+ "primaryKey": false,
2510
+ "notNull": true,
2511
+ "autoincrement": false
2512
+ },
2513
+ "created_at": {
2514
+ "name": "created_at",
2515
+ "type": "integer",
2516
+ "primaryKey": false,
2517
+ "notNull": true,
2518
+ "autoincrement": false,
2519
+ "default": "(unixepoch() * 1000)"
2520
+ },
2521
+ "last_seen_at": {
2522
+ "name": "last_seen_at",
2523
+ "type": "integer",
2524
+ "primaryKey": false,
2525
+ "notNull": true,
2526
+ "autoincrement": false
2527
+ },
2528
+ "expires_at": {
2529
+ "name": "expires_at",
2530
+ "type": "integer",
2531
+ "primaryKey": false,
2532
+ "notNull": true,
2533
+ "autoincrement": false
2534
+ },
2535
+ "ip": {
2536
+ "name": "ip",
2537
+ "type": "text",
2538
+ "primaryKey": false,
2539
+ "notNull": false,
2540
+ "autoincrement": false
2541
+ },
2542
+ "user_agent": {
2543
+ "name": "user_agent",
2544
+ "type": "text",
2545
+ "primaryKey": false,
2546
+ "notNull": false,
2547
+ "autoincrement": false
2548
+ }
2549
+ },
2550
+ "indexes": {
2551
+ "sessions_user_idx": {
2552
+ "name": "sessions_user_idx",
2553
+ "columns": [
2554
+ "user_id"
2555
+ ],
2556
+ "isUnique": false
2557
+ }
2558
+ },
2559
+ "foreignKeys": {
2560
+ "sessions_user_id_users_id_fk": {
2561
+ "name": "sessions_user_id_users_id_fk",
2562
+ "tableFrom": "sessions",
2563
+ "tableTo": "users",
2564
+ "columnsFrom": [
2565
+ "user_id"
2566
+ ],
2567
+ "columnsTo": [
2568
+ "id"
2569
+ ],
2570
+ "onDelete": "cascade",
2571
+ "onUpdate": "no action"
2572
+ }
2573
+ },
2574
+ "compositePrimaryKeys": {},
2575
+ "uniqueConstraints": {},
2576
+ "checkConstraints": {}
2577
+ },
2578
+ "settings": {
2579
+ "name": "settings",
2580
+ "columns": {
2581
+ "key": {
2582
+ "name": "key",
2583
+ "type": "text",
2584
+ "primaryKey": true,
2585
+ "notNull": true,
2586
+ "autoincrement": false
2587
+ },
2588
+ "value": {
2589
+ "name": "value",
2590
+ "type": "text",
2591
+ "primaryKey": false,
2592
+ "notNull": true,
2593
+ "autoincrement": false
2594
+ }
2595
+ },
2596
+ "indexes": {},
2597
+ "foreignKeys": {},
2598
+ "compositePrimaryKeys": {},
2599
+ "uniqueConstraints": {},
2600
+ "checkConstraints": {}
2601
+ },
2602
+ "user_levels": {
2603
+ "name": "user_levels",
2604
+ "columns": {
2605
+ "id": {
2606
+ "name": "id",
2607
+ "type": "text",
2608
+ "primaryKey": true,
2609
+ "notNull": true,
2610
+ "autoincrement": false
2611
+ },
2612
+ "user_id": {
2613
+ "name": "user_id",
2614
+ "type": "text",
2615
+ "primaryKey": false,
2616
+ "notNull": true,
2617
+ "autoincrement": false
2618
+ },
2619
+ "instance_id": {
2620
+ "name": "instance_id",
2621
+ "type": "text",
2622
+ "primaryKey": false,
2623
+ "notNull": true,
2624
+ "autoincrement": false
2625
+ },
2626
+ "group_id": {
2627
+ "name": "group_id",
2628
+ "type": "text",
2629
+ "primaryKey": false,
2630
+ "notNull": false,
2631
+ "autoincrement": false
2632
+ },
2633
+ "operation_id": {
2634
+ "name": "operation_id",
2635
+ "type": "text",
2636
+ "primaryKey": false,
2637
+ "notNull": false,
2638
+ "autoincrement": false
2639
+ },
2640
+ "level": {
2641
+ "name": "level",
2642
+ "type": "text",
2643
+ "primaryKey": false,
2644
+ "notNull": true,
2645
+ "autoincrement": false
2646
+ },
2647
+ "changed_at": {
2648
+ "name": "changed_at",
2649
+ "type": "integer",
2650
+ "primaryKey": false,
2651
+ "notNull": false,
2652
+ "autoincrement": false
2653
+ }
2654
+ },
2655
+ "indexes": {
2656
+ "user_levels_group_idx": {
2657
+ "name": "user_levels_group_idx",
2658
+ "columns": [
2659
+ "user_id",
2660
+ "group_id"
2661
+ ],
2662
+ "isUnique": true
2663
+ },
2664
+ "user_levels_op_idx": {
2665
+ "name": "user_levels_op_idx",
2666
+ "columns": [
2667
+ "user_id",
2668
+ "operation_id"
2669
+ ],
2670
+ "isUnique": true
2671
+ }
2672
+ },
2673
+ "foreignKeys": {
2674
+ "user_levels_user_id_users_id_fk": {
2675
+ "name": "user_levels_user_id_users_id_fk",
2676
+ "tableFrom": "user_levels",
2677
+ "tableTo": "users",
2678
+ "columnsFrom": [
2679
+ "user_id"
2680
+ ],
2681
+ "columnsTo": [
2682
+ "id"
2683
+ ],
2684
+ "onDelete": "cascade",
2685
+ "onUpdate": "no action"
2686
+ },
2687
+ "user_levels_instance_id_plugin_instances_id_fk": {
2688
+ "name": "user_levels_instance_id_plugin_instances_id_fk",
2689
+ "tableFrom": "user_levels",
2690
+ "tableTo": "plugin_instances",
2691
+ "columnsFrom": [
2692
+ "instance_id"
2693
+ ],
2694
+ "columnsTo": [
2695
+ "id"
2696
+ ],
2697
+ "onDelete": "cascade",
2698
+ "onUpdate": "no action"
2699
+ },
2700
+ "user_levels_group_id_operation_groups_id_fk": {
2701
+ "name": "user_levels_group_id_operation_groups_id_fk",
2702
+ "tableFrom": "user_levels",
2703
+ "tableTo": "operation_groups",
2704
+ "columnsFrom": [
2705
+ "group_id"
2706
+ ],
2707
+ "columnsTo": [
2708
+ "id"
2709
+ ],
2710
+ "onDelete": "cascade",
2711
+ "onUpdate": "no action"
2712
+ },
2713
+ "user_levels_operation_id_operations_id_fk": {
2714
+ "name": "user_levels_operation_id_operations_id_fk",
2715
+ "tableFrom": "user_levels",
2716
+ "tableTo": "operations",
2717
+ "columnsFrom": [
2718
+ "operation_id"
2719
+ ],
2720
+ "columnsTo": [
2721
+ "id"
2722
+ ],
2723
+ "onDelete": "cascade",
2724
+ "onUpdate": "no action"
2725
+ }
2726
+ },
2727
+ "compositePrimaryKeys": {},
2728
+ "uniqueConstraints": {},
2729
+ "checkConstraints": {}
2730
+ },
2731
+ "users": {
2732
+ "name": "users",
2733
+ "columns": {
2734
+ "id": {
2735
+ "name": "id",
2736
+ "type": "text",
2737
+ "primaryKey": true,
2738
+ "notNull": true,
2739
+ "autoincrement": false
2740
+ },
2741
+ "username": {
2742
+ "name": "username",
2743
+ "type": "text",
2744
+ "primaryKey": false,
2745
+ "notNull": true,
2746
+ "autoincrement": false
2747
+ },
2748
+ "password_hash": {
2749
+ "name": "password_hash",
2750
+ "type": "text",
2751
+ "primaryKey": false,
2752
+ "notNull": false,
2753
+ "autoincrement": false
2754
+ },
2755
+ "totp_secret_enc": {
2756
+ "name": "totp_secret_enc",
2757
+ "type": "blob",
2758
+ "primaryKey": false,
2759
+ "notNull": false,
2760
+ "autoincrement": false
2761
+ },
2762
+ "totp_enabled": {
2763
+ "name": "totp_enabled",
2764
+ "type": "integer",
2765
+ "primaryKey": false,
2766
+ "notNull": true,
2767
+ "autoincrement": false,
2768
+ "default": false
2769
+ },
2770
+ "totp_last_step": {
2771
+ "name": "totp_last_step",
2772
+ "type": "integer",
2773
+ "primaryKey": false,
2774
+ "notNull": false,
2775
+ "autoincrement": false
2776
+ },
2777
+ "recovery_codes_hash": {
2778
+ "name": "recovery_codes_hash",
2779
+ "type": "text",
2780
+ "primaryKey": false,
2781
+ "notNull": false,
2782
+ "autoincrement": false
2783
+ },
2784
+ "oidc_issuer": {
2785
+ "name": "oidc_issuer",
2786
+ "type": "text",
2787
+ "primaryKey": false,
2788
+ "notNull": false,
2789
+ "autoincrement": false
2790
+ },
2791
+ "oidc_subject": {
2792
+ "name": "oidc_subject",
2793
+ "type": "text",
2794
+ "primaryKey": false,
2795
+ "notNull": false,
2796
+ "autoincrement": false
2797
+ },
2798
+ "created_at": {
2799
+ "name": "created_at",
2800
+ "type": "integer",
2801
+ "primaryKey": false,
2802
+ "notNull": true,
2803
+ "autoincrement": false,
2804
+ "default": "(unixepoch() * 1000)"
2805
+ },
2806
+ "last_login_at": {
2807
+ "name": "last_login_at",
2808
+ "type": "integer",
2809
+ "primaryKey": false,
2810
+ "notNull": false,
2811
+ "autoincrement": false
2812
+ },
2813
+ "disabled": {
2814
+ "name": "disabled",
2815
+ "type": "integer",
2816
+ "primaryKey": false,
2817
+ "notNull": true,
2818
+ "autoincrement": false,
2819
+ "default": false
2820
+ },
2821
+ "role_id": {
2822
+ "name": "role_id",
2823
+ "type": "text",
2824
+ "primaryKey": false,
2825
+ "notNull": true,
2826
+ "autoincrement": false,
2827
+ "default": "'admin'"
2828
+ },
2829
+ "registered_via": {
2830
+ "name": "registered_via",
2831
+ "type": "text",
2832
+ "primaryKey": false,
2833
+ "notNull": false,
2834
+ "autoincrement": false
2835
+ }
2836
+ },
2837
+ "indexes": {
2838
+ "users_username_unique": {
2839
+ "name": "users_username_unique",
2840
+ "columns": [
2841
+ "username"
2842
+ ],
2843
+ "isUnique": true
2844
+ }
2845
+ },
2846
+ "foreignKeys": {},
2847
+ "compositePrimaryKeys": {},
2848
+ "uniqueConstraints": {},
2849
+ "checkConstraints": {}
2850
+ }
2851
+ },
2852
+ "views": {},
2853
+ "enums": {},
2854
+ "_meta": {
2855
+ "schemas": {},
2856
+ "tables": {},
2857
+ "columns": {}
2858
+ },
2859
+ "internal": {
2860
+ "indexes": {}
2861
+ }
2862
+ }