@kaloma-ai/framework-api 0.0.0-stage → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1491 @@
1
+ {
2
+ "id": "d1b306b0-036c-4629-bd99-ab85f6273cbe",
3
+ "prevId": "3e2a2eea-5384-479c-9fe3-4e3f77e204cc",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.account": {
8
+ "name": "account",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "account_id": {
18
+ "name": "account_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "provider_id": {
24
+ "name": "provider_id",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "user_id": {
30
+ "name": "user_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "access_token": {
36
+ "name": "access_token",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "refresh_token": {
42
+ "name": "refresh_token",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "id_token": {
48
+ "name": "id_token",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": false
52
+ },
53
+ "access_token_expires_at": {
54
+ "name": "access_token_expires_at",
55
+ "type": "timestamp",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "refresh_token_expires_at": {
60
+ "name": "refresh_token_expires_at",
61
+ "type": "timestamp",
62
+ "primaryKey": false,
63
+ "notNull": false
64
+ },
65
+ "scope": {
66
+ "name": "scope",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "password": {
72
+ "name": "password",
73
+ "type": "text",
74
+ "primaryKey": false,
75
+ "notNull": false
76
+ },
77
+ "created_at": {
78
+ "name": "created_at",
79
+ "type": "timestamp",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "default": "now()"
83
+ },
84
+ "updated_at": {
85
+ "name": "updated_at",
86
+ "type": "timestamp",
87
+ "primaryKey": false,
88
+ "notNull": true
89
+ }
90
+ },
91
+ "indexes": {
92
+ "account_userId_idx": {
93
+ "name": "account_userId_idx",
94
+ "columns": [
95
+ {
96
+ "expression": "user_id",
97
+ "isExpression": false,
98
+ "asc": true,
99
+ "nulls": "last"
100
+ }
101
+ ],
102
+ "isUnique": false,
103
+ "concurrently": false,
104
+ "method": "btree",
105
+ "with": {}
106
+ }
107
+ },
108
+ "foreignKeys": {
109
+ "account_user_id_user_id_fk": {
110
+ "name": "account_user_id_user_id_fk",
111
+ "tableFrom": "account",
112
+ "tableTo": "user",
113
+ "columnsFrom": [
114
+ "user_id"
115
+ ],
116
+ "columnsTo": [
117
+ "id"
118
+ ],
119
+ "onDelete": "cascade",
120
+ "onUpdate": "no action"
121
+ }
122
+ },
123
+ "compositePrimaryKeys": {},
124
+ "uniqueConstraints": {},
125
+ "policies": {},
126
+ "checkConstraints": {},
127
+ "isRLSEnabled": false
128
+ },
129
+ "public.apikey": {
130
+ "name": "apikey",
131
+ "schema": "",
132
+ "columns": {
133
+ "id": {
134
+ "name": "id",
135
+ "type": "text",
136
+ "primaryKey": true,
137
+ "notNull": true
138
+ },
139
+ "config_id": {
140
+ "name": "config_id",
141
+ "type": "text",
142
+ "primaryKey": false,
143
+ "notNull": true,
144
+ "default": "'default'"
145
+ },
146
+ "name": {
147
+ "name": "name",
148
+ "type": "text",
149
+ "primaryKey": false,
150
+ "notNull": false
151
+ },
152
+ "start": {
153
+ "name": "start",
154
+ "type": "text",
155
+ "primaryKey": false,
156
+ "notNull": false
157
+ },
158
+ "reference_id": {
159
+ "name": "reference_id",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": true
163
+ },
164
+ "prefix": {
165
+ "name": "prefix",
166
+ "type": "text",
167
+ "primaryKey": false,
168
+ "notNull": false
169
+ },
170
+ "key": {
171
+ "name": "key",
172
+ "type": "text",
173
+ "primaryKey": false,
174
+ "notNull": true
175
+ },
176
+ "refill_interval": {
177
+ "name": "refill_interval",
178
+ "type": "integer",
179
+ "primaryKey": false,
180
+ "notNull": false
181
+ },
182
+ "refill_amount": {
183
+ "name": "refill_amount",
184
+ "type": "integer",
185
+ "primaryKey": false,
186
+ "notNull": false
187
+ },
188
+ "last_refill_at": {
189
+ "name": "last_refill_at",
190
+ "type": "timestamp",
191
+ "primaryKey": false,
192
+ "notNull": false
193
+ },
194
+ "enabled": {
195
+ "name": "enabled",
196
+ "type": "boolean",
197
+ "primaryKey": false,
198
+ "notNull": false,
199
+ "default": true
200
+ },
201
+ "rate_limit_enabled": {
202
+ "name": "rate_limit_enabled",
203
+ "type": "boolean",
204
+ "primaryKey": false,
205
+ "notNull": false,
206
+ "default": true
207
+ },
208
+ "rate_limit_time_window": {
209
+ "name": "rate_limit_time_window",
210
+ "type": "integer",
211
+ "primaryKey": false,
212
+ "notNull": false,
213
+ "default": 60000
214
+ },
215
+ "rate_limit_max": {
216
+ "name": "rate_limit_max",
217
+ "type": "integer",
218
+ "primaryKey": false,
219
+ "notNull": false,
220
+ "default": 100
221
+ },
222
+ "request_count": {
223
+ "name": "request_count",
224
+ "type": "integer",
225
+ "primaryKey": false,
226
+ "notNull": false,
227
+ "default": 0
228
+ },
229
+ "remaining": {
230
+ "name": "remaining",
231
+ "type": "integer",
232
+ "primaryKey": false,
233
+ "notNull": false
234
+ },
235
+ "last_request": {
236
+ "name": "last_request",
237
+ "type": "timestamp",
238
+ "primaryKey": false,
239
+ "notNull": false
240
+ },
241
+ "expires_at": {
242
+ "name": "expires_at",
243
+ "type": "timestamp",
244
+ "primaryKey": false,
245
+ "notNull": false
246
+ },
247
+ "created_at": {
248
+ "name": "created_at",
249
+ "type": "timestamp",
250
+ "primaryKey": false,
251
+ "notNull": true
252
+ },
253
+ "updated_at": {
254
+ "name": "updated_at",
255
+ "type": "timestamp",
256
+ "primaryKey": false,
257
+ "notNull": true
258
+ },
259
+ "permissions": {
260
+ "name": "permissions",
261
+ "type": "text",
262
+ "primaryKey": false,
263
+ "notNull": false
264
+ },
265
+ "metadata": {
266
+ "name": "metadata",
267
+ "type": "text",
268
+ "primaryKey": false,
269
+ "notNull": false
270
+ }
271
+ },
272
+ "indexes": {
273
+ "apikey_configId_idx": {
274
+ "name": "apikey_configId_idx",
275
+ "columns": [
276
+ {
277
+ "expression": "config_id",
278
+ "isExpression": false,
279
+ "asc": true,
280
+ "nulls": "last"
281
+ }
282
+ ],
283
+ "isUnique": false,
284
+ "concurrently": false,
285
+ "method": "btree",
286
+ "with": {}
287
+ },
288
+ "apikey_referenceId_idx": {
289
+ "name": "apikey_referenceId_idx",
290
+ "columns": [
291
+ {
292
+ "expression": "reference_id",
293
+ "isExpression": false,
294
+ "asc": true,
295
+ "nulls": "last"
296
+ }
297
+ ],
298
+ "isUnique": false,
299
+ "concurrently": false,
300
+ "method": "btree",
301
+ "with": {}
302
+ },
303
+ "apikey_key_idx": {
304
+ "name": "apikey_key_idx",
305
+ "columns": [
306
+ {
307
+ "expression": "key",
308
+ "isExpression": false,
309
+ "asc": true,
310
+ "nulls": "last"
311
+ }
312
+ ],
313
+ "isUnique": false,
314
+ "concurrently": false,
315
+ "method": "btree",
316
+ "with": {}
317
+ }
318
+ },
319
+ "foreignKeys": {},
320
+ "compositePrimaryKeys": {},
321
+ "uniqueConstraints": {},
322
+ "policies": {},
323
+ "checkConstraints": {},
324
+ "isRLSEnabled": false
325
+ },
326
+ "public.invitation": {
327
+ "name": "invitation",
328
+ "schema": "",
329
+ "columns": {
330
+ "id": {
331
+ "name": "id",
332
+ "type": "text",
333
+ "primaryKey": true,
334
+ "notNull": true
335
+ },
336
+ "organization_id": {
337
+ "name": "organization_id",
338
+ "type": "text",
339
+ "primaryKey": false,
340
+ "notNull": true
341
+ },
342
+ "email": {
343
+ "name": "email",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": true
347
+ },
348
+ "role": {
349
+ "name": "role",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": false
353
+ },
354
+ "status": {
355
+ "name": "status",
356
+ "type": "text",
357
+ "primaryKey": false,
358
+ "notNull": true,
359
+ "default": "'pending'"
360
+ },
361
+ "expires_at": {
362
+ "name": "expires_at",
363
+ "type": "timestamp",
364
+ "primaryKey": false,
365
+ "notNull": true
366
+ },
367
+ "created_at": {
368
+ "name": "created_at",
369
+ "type": "timestamp",
370
+ "primaryKey": false,
371
+ "notNull": true,
372
+ "default": "now()"
373
+ },
374
+ "inviter_id": {
375
+ "name": "inviter_id",
376
+ "type": "text",
377
+ "primaryKey": false,
378
+ "notNull": true
379
+ }
380
+ },
381
+ "indexes": {
382
+ "invitation_organizationId_idx": {
383
+ "name": "invitation_organizationId_idx",
384
+ "columns": [
385
+ {
386
+ "expression": "organization_id",
387
+ "isExpression": false,
388
+ "asc": true,
389
+ "nulls": "last"
390
+ }
391
+ ],
392
+ "isUnique": false,
393
+ "concurrently": false,
394
+ "method": "btree",
395
+ "with": {}
396
+ },
397
+ "invitation_email_idx": {
398
+ "name": "invitation_email_idx",
399
+ "columns": [
400
+ {
401
+ "expression": "email",
402
+ "isExpression": false,
403
+ "asc": true,
404
+ "nulls": "last"
405
+ }
406
+ ],
407
+ "isUnique": false,
408
+ "concurrently": false,
409
+ "method": "btree",
410
+ "with": {}
411
+ }
412
+ },
413
+ "foreignKeys": {
414
+ "invitation_organization_id_organization_id_fk": {
415
+ "name": "invitation_organization_id_organization_id_fk",
416
+ "tableFrom": "invitation",
417
+ "tableTo": "organization",
418
+ "columnsFrom": [
419
+ "organization_id"
420
+ ],
421
+ "columnsTo": [
422
+ "id"
423
+ ],
424
+ "onDelete": "cascade",
425
+ "onUpdate": "no action"
426
+ },
427
+ "invitation_inviter_id_user_id_fk": {
428
+ "name": "invitation_inviter_id_user_id_fk",
429
+ "tableFrom": "invitation",
430
+ "tableTo": "user",
431
+ "columnsFrom": [
432
+ "inviter_id"
433
+ ],
434
+ "columnsTo": [
435
+ "id"
436
+ ],
437
+ "onDelete": "cascade",
438
+ "onUpdate": "no action"
439
+ }
440
+ },
441
+ "compositePrimaryKeys": {},
442
+ "uniqueConstraints": {},
443
+ "policies": {},
444
+ "checkConstraints": {},
445
+ "isRLSEnabled": false
446
+ },
447
+ "public.member": {
448
+ "name": "member",
449
+ "schema": "",
450
+ "columns": {
451
+ "id": {
452
+ "name": "id",
453
+ "type": "text",
454
+ "primaryKey": true,
455
+ "notNull": true
456
+ },
457
+ "organization_id": {
458
+ "name": "organization_id",
459
+ "type": "text",
460
+ "primaryKey": false,
461
+ "notNull": true
462
+ },
463
+ "user_id": {
464
+ "name": "user_id",
465
+ "type": "text",
466
+ "primaryKey": false,
467
+ "notNull": true
468
+ },
469
+ "role": {
470
+ "name": "role",
471
+ "type": "text",
472
+ "primaryKey": false,
473
+ "notNull": true,
474
+ "default": "'member'"
475
+ },
476
+ "created_at": {
477
+ "name": "created_at",
478
+ "type": "timestamp",
479
+ "primaryKey": false,
480
+ "notNull": true
481
+ }
482
+ },
483
+ "indexes": {
484
+ "member_organizationId_idx": {
485
+ "name": "member_organizationId_idx",
486
+ "columns": [
487
+ {
488
+ "expression": "organization_id",
489
+ "isExpression": false,
490
+ "asc": true,
491
+ "nulls": "last"
492
+ }
493
+ ],
494
+ "isUnique": false,
495
+ "concurrently": false,
496
+ "method": "btree",
497
+ "with": {}
498
+ },
499
+ "member_userId_idx": {
500
+ "name": "member_userId_idx",
501
+ "columns": [
502
+ {
503
+ "expression": "user_id",
504
+ "isExpression": false,
505
+ "asc": true,
506
+ "nulls": "last"
507
+ }
508
+ ],
509
+ "isUnique": false,
510
+ "concurrently": false,
511
+ "method": "btree",
512
+ "with": {}
513
+ }
514
+ },
515
+ "foreignKeys": {
516
+ "member_organization_id_organization_id_fk": {
517
+ "name": "member_organization_id_organization_id_fk",
518
+ "tableFrom": "member",
519
+ "tableTo": "organization",
520
+ "columnsFrom": [
521
+ "organization_id"
522
+ ],
523
+ "columnsTo": [
524
+ "id"
525
+ ],
526
+ "onDelete": "cascade",
527
+ "onUpdate": "no action"
528
+ },
529
+ "member_user_id_user_id_fk": {
530
+ "name": "member_user_id_user_id_fk",
531
+ "tableFrom": "member",
532
+ "tableTo": "user",
533
+ "columnsFrom": [
534
+ "user_id"
535
+ ],
536
+ "columnsTo": [
537
+ "id"
538
+ ],
539
+ "onDelete": "cascade",
540
+ "onUpdate": "no action"
541
+ }
542
+ },
543
+ "compositePrimaryKeys": {},
544
+ "uniqueConstraints": {},
545
+ "policies": {},
546
+ "checkConstraints": {},
547
+ "isRLSEnabled": false
548
+ },
549
+ "public.organization": {
550
+ "name": "organization",
551
+ "schema": "",
552
+ "columns": {
553
+ "id": {
554
+ "name": "id",
555
+ "type": "text",
556
+ "primaryKey": true,
557
+ "notNull": true
558
+ },
559
+ "name": {
560
+ "name": "name",
561
+ "type": "text",
562
+ "primaryKey": false,
563
+ "notNull": true
564
+ },
565
+ "slug": {
566
+ "name": "slug",
567
+ "type": "text",
568
+ "primaryKey": false,
569
+ "notNull": true
570
+ },
571
+ "logo": {
572
+ "name": "logo",
573
+ "type": "text",
574
+ "primaryKey": false,
575
+ "notNull": false
576
+ },
577
+ "created_at": {
578
+ "name": "created_at",
579
+ "type": "timestamp",
580
+ "primaryKey": false,
581
+ "notNull": true
582
+ },
583
+ "metadata": {
584
+ "name": "metadata",
585
+ "type": "text",
586
+ "primaryKey": false,
587
+ "notNull": false
588
+ }
589
+ },
590
+ "indexes": {
591
+ "organization_slug_uidx": {
592
+ "name": "organization_slug_uidx",
593
+ "columns": [
594
+ {
595
+ "expression": "slug",
596
+ "isExpression": false,
597
+ "asc": true,
598
+ "nulls": "last"
599
+ }
600
+ ],
601
+ "isUnique": true,
602
+ "concurrently": false,
603
+ "method": "btree",
604
+ "with": {}
605
+ }
606
+ },
607
+ "foreignKeys": {},
608
+ "compositePrimaryKeys": {},
609
+ "uniqueConstraints": {
610
+ "organization_slug_unique": {
611
+ "name": "organization_slug_unique",
612
+ "nullsNotDistinct": false,
613
+ "columns": [
614
+ "slug"
615
+ ]
616
+ }
617
+ },
618
+ "policies": {},
619
+ "checkConstraints": {},
620
+ "isRLSEnabled": false
621
+ },
622
+ "public.session": {
623
+ "name": "session",
624
+ "schema": "",
625
+ "columns": {
626
+ "id": {
627
+ "name": "id",
628
+ "type": "text",
629
+ "primaryKey": true,
630
+ "notNull": true
631
+ },
632
+ "expires_at": {
633
+ "name": "expires_at",
634
+ "type": "timestamp",
635
+ "primaryKey": false,
636
+ "notNull": true
637
+ },
638
+ "token": {
639
+ "name": "token",
640
+ "type": "text",
641
+ "primaryKey": false,
642
+ "notNull": true
643
+ },
644
+ "created_at": {
645
+ "name": "created_at",
646
+ "type": "timestamp",
647
+ "primaryKey": false,
648
+ "notNull": true,
649
+ "default": "now()"
650
+ },
651
+ "updated_at": {
652
+ "name": "updated_at",
653
+ "type": "timestamp",
654
+ "primaryKey": false,
655
+ "notNull": true
656
+ },
657
+ "ip_address": {
658
+ "name": "ip_address",
659
+ "type": "text",
660
+ "primaryKey": false,
661
+ "notNull": false
662
+ },
663
+ "user_agent": {
664
+ "name": "user_agent",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": false
668
+ },
669
+ "user_id": {
670
+ "name": "user_id",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": true
674
+ },
675
+ "active_organization_id": {
676
+ "name": "active_organization_id",
677
+ "type": "text",
678
+ "primaryKey": false,
679
+ "notNull": false
680
+ }
681
+ },
682
+ "indexes": {
683
+ "session_userId_idx": {
684
+ "name": "session_userId_idx",
685
+ "columns": [
686
+ {
687
+ "expression": "user_id",
688
+ "isExpression": false,
689
+ "asc": true,
690
+ "nulls": "last"
691
+ }
692
+ ],
693
+ "isUnique": false,
694
+ "concurrently": false,
695
+ "method": "btree",
696
+ "with": {}
697
+ }
698
+ },
699
+ "foreignKeys": {
700
+ "session_user_id_user_id_fk": {
701
+ "name": "session_user_id_user_id_fk",
702
+ "tableFrom": "session",
703
+ "tableTo": "user",
704
+ "columnsFrom": [
705
+ "user_id"
706
+ ],
707
+ "columnsTo": [
708
+ "id"
709
+ ],
710
+ "onDelete": "cascade",
711
+ "onUpdate": "no action"
712
+ }
713
+ },
714
+ "compositePrimaryKeys": {},
715
+ "uniqueConstraints": {
716
+ "session_token_unique": {
717
+ "name": "session_token_unique",
718
+ "nullsNotDistinct": false,
719
+ "columns": [
720
+ "token"
721
+ ]
722
+ }
723
+ },
724
+ "policies": {},
725
+ "checkConstraints": {},
726
+ "isRLSEnabled": false
727
+ },
728
+ "public.user": {
729
+ "name": "user",
730
+ "schema": "",
731
+ "columns": {
732
+ "id": {
733
+ "name": "id",
734
+ "type": "text",
735
+ "primaryKey": true,
736
+ "notNull": true
737
+ },
738
+ "name": {
739
+ "name": "name",
740
+ "type": "text",
741
+ "primaryKey": false,
742
+ "notNull": true
743
+ },
744
+ "email": {
745
+ "name": "email",
746
+ "type": "text",
747
+ "primaryKey": false,
748
+ "notNull": true
749
+ },
750
+ "email_verified": {
751
+ "name": "email_verified",
752
+ "type": "boolean",
753
+ "primaryKey": false,
754
+ "notNull": true,
755
+ "default": false
756
+ },
757
+ "image": {
758
+ "name": "image",
759
+ "type": "text",
760
+ "primaryKey": false,
761
+ "notNull": false
762
+ },
763
+ "created_at": {
764
+ "name": "created_at",
765
+ "type": "timestamp",
766
+ "primaryKey": false,
767
+ "notNull": true,
768
+ "default": "now()"
769
+ },
770
+ "updated_at": {
771
+ "name": "updated_at",
772
+ "type": "timestamp",
773
+ "primaryKey": false,
774
+ "notNull": true,
775
+ "default": "now()"
776
+ }
777
+ },
778
+ "indexes": {},
779
+ "foreignKeys": {},
780
+ "compositePrimaryKeys": {},
781
+ "uniqueConstraints": {
782
+ "user_email_unique": {
783
+ "name": "user_email_unique",
784
+ "nullsNotDistinct": false,
785
+ "columns": [
786
+ "email"
787
+ ]
788
+ }
789
+ },
790
+ "policies": {},
791
+ "checkConstraints": {},
792
+ "isRLSEnabled": false
793
+ },
794
+ "public.verification": {
795
+ "name": "verification",
796
+ "schema": "",
797
+ "columns": {
798
+ "id": {
799
+ "name": "id",
800
+ "type": "text",
801
+ "primaryKey": true,
802
+ "notNull": true
803
+ },
804
+ "identifier": {
805
+ "name": "identifier",
806
+ "type": "text",
807
+ "primaryKey": false,
808
+ "notNull": true
809
+ },
810
+ "value": {
811
+ "name": "value",
812
+ "type": "text",
813
+ "primaryKey": false,
814
+ "notNull": true
815
+ },
816
+ "expires_at": {
817
+ "name": "expires_at",
818
+ "type": "timestamp",
819
+ "primaryKey": false,
820
+ "notNull": true
821
+ },
822
+ "created_at": {
823
+ "name": "created_at",
824
+ "type": "timestamp",
825
+ "primaryKey": false,
826
+ "notNull": true,
827
+ "default": "now()"
828
+ },
829
+ "updated_at": {
830
+ "name": "updated_at",
831
+ "type": "timestamp",
832
+ "primaryKey": false,
833
+ "notNull": true,
834
+ "default": "now()"
835
+ }
836
+ },
837
+ "indexes": {
838
+ "verification_identifier_idx": {
839
+ "name": "verification_identifier_idx",
840
+ "columns": [
841
+ {
842
+ "expression": "identifier",
843
+ "isExpression": false,
844
+ "asc": true,
845
+ "nulls": "last"
846
+ }
847
+ ],
848
+ "isUnique": false,
849
+ "concurrently": false,
850
+ "method": "btree",
851
+ "with": {}
852
+ }
853
+ },
854
+ "foreignKeys": {},
855
+ "compositePrimaryKeys": {},
856
+ "uniqueConstraints": {},
857
+ "policies": {},
858
+ "checkConstraints": {},
859
+ "isRLSEnabled": false
860
+ },
861
+ "public.audit_log": {
862
+ "name": "audit_log",
863
+ "schema": "",
864
+ "columns": {
865
+ "id": {
866
+ "name": "id",
867
+ "type": "uuid",
868
+ "primaryKey": true,
869
+ "notNull": true,
870
+ "default": "gen_random_uuid()"
871
+ },
872
+ "at": {
873
+ "name": "at",
874
+ "type": "timestamp",
875
+ "primaryKey": false,
876
+ "notNull": true,
877
+ "default": "now()"
878
+ },
879
+ "actor_user_id": {
880
+ "name": "actor_user_id",
881
+ "type": "text",
882
+ "primaryKey": false,
883
+ "notNull": false
884
+ },
885
+ "actor_email": {
886
+ "name": "actor_email",
887
+ "type": "text",
888
+ "primaryKey": false,
889
+ "notNull": false
890
+ },
891
+ "via_key_id": {
892
+ "name": "via_key_id",
893
+ "type": "text",
894
+ "primaryKey": false,
895
+ "notNull": false
896
+ },
897
+ "action": {
898
+ "name": "action",
899
+ "type": "text",
900
+ "primaryKey": false,
901
+ "notNull": true
902
+ },
903
+ "target": {
904
+ "name": "target",
905
+ "type": "text",
906
+ "primaryKey": false,
907
+ "notNull": false
908
+ },
909
+ "details": {
910
+ "name": "details",
911
+ "type": "jsonb",
912
+ "primaryKey": false,
913
+ "notNull": false
914
+ }
915
+ },
916
+ "indexes": {},
917
+ "foreignKeys": {},
918
+ "compositePrimaryKeys": {},
919
+ "uniqueConstraints": {},
920
+ "policies": {},
921
+ "checkConstraints": {},
922
+ "isRLSEnabled": false
923
+ },
924
+ "public.custom_role": {
925
+ "name": "custom_role",
926
+ "schema": "",
927
+ "columns": {
928
+ "key": {
929
+ "name": "key",
930
+ "type": "text",
931
+ "primaryKey": true,
932
+ "notNull": true
933
+ },
934
+ "label": {
935
+ "name": "label",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": true
939
+ },
940
+ "permissions": {
941
+ "name": "permissions",
942
+ "type": "text[]",
943
+ "primaryKey": false,
944
+ "notNull": true
945
+ },
946
+ "created_at": {
947
+ "name": "created_at",
948
+ "type": "timestamp",
949
+ "primaryKey": false,
950
+ "notNull": true,
951
+ "default": "now()"
952
+ },
953
+ "updated_at": {
954
+ "name": "updated_at",
955
+ "type": "timestamp",
956
+ "primaryKey": false,
957
+ "notNull": true,
958
+ "default": "now()"
959
+ }
960
+ },
961
+ "indexes": {},
962
+ "foreignKeys": {},
963
+ "compositePrimaryKeys": {},
964
+ "uniqueConstraints": {},
965
+ "policies": {},
966
+ "checkConstraints": {},
967
+ "isRLSEnabled": false
968
+ },
969
+ "public.user_access": {
970
+ "name": "user_access",
971
+ "schema": "",
972
+ "columns": {
973
+ "user_id": {
974
+ "name": "user_id",
975
+ "type": "text",
976
+ "primaryKey": true,
977
+ "notNull": true
978
+ },
979
+ "expires_at": {
980
+ "name": "expires_at",
981
+ "type": "timestamp",
982
+ "primaryKey": false,
983
+ "notNull": false
984
+ },
985
+ "deactivated_at": {
986
+ "name": "deactivated_at",
987
+ "type": "timestamp",
988
+ "primaryKey": false,
989
+ "notNull": false
990
+ }
991
+ },
992
+ "indexes": {},
993
+ "foreignKeys": {
994
+ "user_access_user_id_user_id_fk": {
995
+ "name": "user_access_user_id_user_id_fk",
996
+ "tableFrom": "user_access",
997
+ "tableTo": "user",
998
+ "columnsFrom": [
999
+ "user_id"
1000
+ ],
1001
+ "columnsTo": [
1002
+ "id"
1003
+ ],
1004
+ "onDelete": "cascade",
1005
+ "onUpdate": "no action"
1006
+ }
1007
+ },
1008
+ "compositePrimaryKeys": {},
1009
+ "uniqueConstraints": {},
1010
+ "policies": {},
1011
+ "checkConstraints": {},
1012
+ "isRLSEnabled": false
1013
+ },
1014
+ "public.backup_run": {
1015
+ "name": "backup_run",
1016
+ "schema": "",
1017
+ "columns": {
1018
+ "id": {
1019
+ "name": "id",
1020
+ "type": "uuid",
1021
+ "primaryKey": true,
1022
+ "notNull": true,
1023
+ "default": "gen_random_uuid()"
1024
+ },
1025
+ "started_at": {
1026
+ "name": "started_at",
1027
+ "type": "timestamp",
1028
+ "primaryKey": false,
1029
+ "notNull": true,
1030
+ "default": "now()"
1031
+ },
1032
+ "finished_at": {
1033
+ "name": "finished_at",
1034
+ "type": "timestamp",
1035
+ "primaryKey": false,
1036
+ "notNull": false
1037
+ },
1038
+ "status": {
1039
+ "name": "status",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": true
1043
+ },
1044
+ "trigger": {
1045
+ "name": "trigger",
1046
+ "type": "text",
1047
+ "primaryKey": false,
1048
+ "notNull": true
1049
+ },
1050
+ "folder": {
1051
+ "name": "folder",
1052
+ "type": "text",
1053
+ "primaryKey": false,
1054
+ "notNull": false
1055
+ },
1056
+ "size_bytes": {
1057
+ "name": "size_bytes",
1058
+ "type": "bigint",
1059
+ "primaryKey": false,
1060
+ "notNull": false
1061
+ },
1062
+ "error": {
1063
+ "name": "error",
1064
+ "type": "text",
1065
+ "primaryKey": false,
1066
+ "notNull": false
1067
+ },
1068
+ "uploaded_at": {
1069
+ "name": "uploaded_at",
1070
+ "type": "timestamp",
1071
+ "primaryKey": false,
1072
+ "notNull": false
1073
+ },
1074
+ "upload_encrypted": {
1075
+ "name": "upload_encrypted",
1076
+ "type": "boolean",
1077
+ "primaryKey": false,
1078
+ "notNull": false
1079
+ },
1080
+ "upload_error": {
1081
+ "name": "upload_error",
1082
+ "type": "text",
1083
+ "primaryKey": false,
1084
+ "notNull": false
1085
+ }
1086
+ },
1087
+ "indexes": {},
1088
+ "foreignKeys": {},
1089
+ "compositePrimaryKeys": {},
1090
+ "uniqueConstraints": {},
1091
+ "policies": {},
1092
+ "checkConstraints": {},
1093
+ "isRLSEnabled": false
1094
+ },
1095
+ "public.app_setting": {
1096
+ "name": "app_setting",
1097
+ "schema": "",
1098
+ "columns": {
1099
+ "key": {
1100
+ "name": "key",
1101
+ "type": "text",
1102
+ "primaryKey": true,
1103
+ "notNull": true
1104
+ },
1105
+ "value": {
1106
+ "name": "value",
1107
+ "type": "jsonb",
1108
+ "primaryKey": false,
1109
+ "notNull": true
1110
+ },
1111
+ "updated_at": {
1112
+ "name": "updated_at",
1113
+ "type": "timestamp",
1114
+ "primaryKey": false,
1115
+ "notNull": true,
1116
+ "default": "now()"
1117
+ },
1118
+ "updated_by": {
1119
+ "name": "updated_by",
1120
+ "type": "text",
1121
+ "primaryKey": false,
1122
+ "notNull": false
1123
+ }
1124
+ },
1125
+ "indexes": {},
1126
+ "foreignKeys": {},
1127
+ "compositePrimaryKeys": {},
1128
+ "uniqueConstraints": {},
1129
+ "policies": {},
1130
+ "checkConstraints": {},
1131
+ "isRLSEnabled": false
1132
+ },
1133
+ "public.connection": {
1134
+ "name": "connection",
1135
+ "schema": "",
1136
+ "columns": {
1137
+ "kind": {
1138
+ "name": "kind",
1139
+ "type": "text",
1140
+ "primaryKey": false,
1141
+ "notNull": true
1142
+ },
1143
+ "id": {
1144
+ "name": "id",
1145
+ "type": "text",
1146
+ "primaryKey": false,
1147
+ "notNull": true
1148
+ },
1149
+ "label": {
1150
+ "name": "label",
1151
+ "type": "text",
1152
+ "primaryKey": false,
1153
+ "notNull": true
1154
+ },
1155
+ "provider": {
1156
+ "name": "provider",
1157
+ "type": "text",
1158
+ "primaryKey": false,
1159
+ "notNull": true
1160
+ },
1161
+ "config": {
1162
+ "name": "config",
1163
+ "type": "jsonb",
1164
+ "primaryKey": false,
1165
+ "notNull": true,
1166
+ "default": "'{}'::jsonb"
1167
+ },
1168
+ "secrets": {
1169
+ "name": "secrets",
1170
+ "type": "text",
1171
+ "primaryKey": false,
1172
+ "notNull": false
1173
+ },
1174
+ "enabled": {
1175
+ "name": "enabled",
1176
+ "type": "boolean",
1177
+ "primaryKey": false,
1178
+ "notNull": true,
1179
+ "default": true
1180
+ },
1181
+ "last_test_at": {
1182
+ "name": "last_test_at",
1183
+ "type": "timestamp",
1184
+ "primaryKey": false,
1185
+ "notNull": false
1186
+ },
1187
+ "last_test_ok": {
1188
+ "name": "last_test_ok",
1189
+ "type": "boolean",
1190
+ "primaryKey": false,
1191
+ "notNull": false
1192
+ },
1193
+ "last_test_message": {
1194
+ "name": "last_test_message",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": false
1198
+ },
1199
+ "created_at": {
1200
+ "name": "created_at",
1201
+ "type": "timestamp",
1202
+ "primaryKey": false,
1203
+ "notNull": true,
1204
+ "default": "now()"
1205
+ },
1206
+ "updated_at": {
1207
+ "name": "updated_at",
1208
+ "type": "timestamp",
1209
+ "primaryKey": false,
1210
+ "notNull": true,
1211
+ "default": "now()"
1212
+ },
1213
+ "updated_by": {
1214
+ "name": "updated_by",
1215
+ "type": "text",
1216
+ "primaryKey": false,
1217
+ "notNull": false
1218
+ }
1219
+ },
1220
+ "indexes": {},
1221
+ "foreignKeys": {},
1222
+ "compositePrimaryKeys": {
1223
+ "connection_kind_id_pk": {
1224
+ "name": "connection_kind_id_pk",
1225
+ "columns": [
1226
+ "kind",
1227
+ "id"
1228
+ ]
1229
+ }
1230
+ },
1231
+ "uniqueConstraints": {},
1232
+ "policies": {},
1233
+ "checkConstraints": {},
1234
+ "isRLSEnabled": false
1235
+ },
1236
+ "public.llm_call": {
1237
+ "name": "llm_call",
1238
+ "schema": "",
1239
+ "columns": {
1240
+ "id": {
1241
+ "name": "id",
1242
+ "type": "uuid",
1243
+ "primaryKey": true,
1244
+ "notNull": true,
1245
+ "default": "gen_random_uuid()"
1246
+ },
1247
+ "at": {
1248
+ "name": "at",
1249
+ "type": "timestamp",
1250
+ "primaryKey": false,
1251
+ "notNull": true,
1252
+ "default": "now()"
1253
+ },
1254
+ "connection_id": {
1255
+ "name": "connection_id",
1256
+ "type": "text",
1257
+ "primaryKey": false,
1258
+ "notNull": true
1259
+ },
1260
+ "model": {
1261
+ "name": "model",
1262
+ "type": "text",
1263
+ "primaryKey": false,
1264
+ "notNull": true
1265
+ },
1266
+ "input_tokens": {
1267
+ "name": "input_tokens",
1268
+ "type": "integer",
1269
+ "primaryKey": false,
1270
+ "notNull": false
1271
+ },
1272
+ "output_tokens": {
1273
+ "name": "output_tokens",
1274
+ "type": "integer",
1275
+ "primaryKey": false,
1276
+ "notNull": false
1277
+ },
1278
+ "duration_ms": {
1279
+ "name": "duration_ms",
1280
+ "type": "integer",
1281
+ "primaryKey": false,
1282
+ "notNull": true
1283
+ },
1284
+ "status": {
1285
+ "name": "status",
1286
+ "type": "text",
1287
+ "primaryKey": false,
1288
+ "notNull": true
1289
+ },
1290
+ "error": {
1291
+ "name": "error",
1292
+ "type": "text",
1293
+ "primaryKey": false,
1294
+ "notNull": false
1295
+ },
1296
+ "user_id": {
1297
+ "name": "user_id",
1298
+ "type": "text",
1299
+ "primaryKey": false,
1300
+ "notNull": false
1301
+ },
1302
+ "feature": {
1303
+ "name": "feature",
1304
+ "type": "text",
1305
+ "primaryKey": false,
1306
+ "notNull": false
1307
+ }
1308
+ },
1309
+ "indexes": {
1310
+ "llm_call_at_idx": {
1311
+ "name": "llm_call_at_idx",
1312
+ "columns": [
1313
+ {
1314
+ "expression": "at",
1315
+ "isExpression": false,
1316
+ "asc": true,
1317
+ "nulls": "last"
1318
+ }
1319
+ ],
1320
+ "isUnique": false,
1321
+ "concurrently": false,
1322
+ "method": "btree",
1323
+ "with": {}
1324
+ }
1325
+ },
1326
+ "foreignKeys": {},
1327
+ "compositePrimaryKeys": {},
1328
+ "uniqueConstraints": {},
1329
+ "policies": {},
1330
+ "checkConstraints": {},
1331
+ "isRLSEnabled": false
1332
+ },
1333
+ "public.user_group": {
1334
+ "name": "user_group",
1335
+ "schema": "",
1336
+ "columns": {
1337
+ "id": {
1338
+ "name": "id",
1339
+ "type": "uuid",
1340
+ "primaryKey": true,
1341
+ "notNull": true,
1342
+ "default": "gen_random_uuid()"
1343
+ },
1344
+ "name": {
1345
+ "name": "name",
1346
+ "type": "text",
1347
+ "primaryKey": false,
1348
+ "notNull": true
1349
+ },
1350
+ "description": {
1351
+ "name": "description",
1352
+ "type": "text",
1353
+ "primaryKey": false,
1354
+ "notNull": true,
1355
+ "default": "''"
1356
+ },
1357
+ "created_at": {
1358
+ "name": "created_at",
1359
+ "type": "timestamp",
1360
+ "primaryKey": false,
1361
+ "notNull": true,
1362
+ "default": "now()"
1363
+ },
1364
+ "updated_at": {
1365
+ "name": "updated_at",
1366
+ "type": "timestamp",
1367
+ "primaryKey": false,
1368
+ "notNull": true,
1369
+ "default": "now()"
1370
+ }
1371
+ },
1372
+ "indexes": {
1373
+ "user_group_name_lower_idx": {
1374
+ "name": "user_group_name_lower_idx",
1375
+ "columns": [
1376
+ {
1377
+ "expression": "lower(\"name\")",
1378
+ "asc": true,
1379
+ "isExpression": true,
1380
+ "nulls": "last"
1381
+ }
1382
+ ],
1383
+ "isUnique": true,
1384
+ "concurrently": false,
1385
+ "method": "btree",
1386
+ "with": {}
1387
+ }
1388
+ },
1389
+ "foreignKeys": {},
1390
+ "compositePrimaryKeys": {},
1391
+ "uniqueConstraints": {},
1392
+ "policies": {},
1393
+ "checkConstraints": {},
1394
+ "isRLSEnabled": false
1395
+ },
1396
+ "public.user_group_member": {
1397
+ "name": "user_group_member",
1398
+ "schema": "",
1399
+ "columns": {
1400
+ "group_id": {
1401
+ "name": "group_id",
1402
+ "type": "uuid",
1403
+ "primaryKey": false,
1404
+ "notNull": true
1405
+ },
1406
+ "user_id": {
1407
+ "name": "user_id",
1408
+ "type": "text",
1409
+ "primaryKey": false,
1410
+ "notNull": true
1411
+ },
1412
+ "added_at": {
1413
+ "name": "added_at",
1414
+ "type": "timestamp",
1415
+ "primaryKey": false,
1416
+ "notNull": true,
1417
+ "default": "now()"
1418
+ }
1419
+ },
1420
+ "indexes": {
1421
+ "user_group_member_user_idx": {
1422
+ "name": "user_group_member_user_idx",
1423
+ "columns": [
1424
+ {
1425
+ "expression": "user_id",
1426
+ "isExpression": false,
1427
+ "asc": true,
1428
+ "nulls": "last"
1429
+ }
1430
+ ],
1431
+ "isUnique": false,
1432
+ "concurrently": false,
1433
+ "method": "btree",
1434
+ "with": {}
1435
+ }
1436
+ },
1437
+ "foreignKeys": {
1438
+ "user_group_member_group_id_user_group_id_fk": {
1439
+ "name": "user_group_member_group_id_user_group_id_fk",
1440
+ "tableFrom": "user_group_member",
1441
+ "tableTo": "user_group",
1442
+ "columnsFrom": [
1443
+ "group_id"
1444
+ ],
1445
+ "columnsTo": [
1446
+ "id"
1447
+ ],
1448
+ "onDelete": "cascade",
1449
+ "onUpdate": "no action"
1450
+ },
1451
+ "user_group_member_user_id_user_id_fk": {
1452
+ "name": "user_group_member_user_id_user_id_fk",
1453
+ "tableFrom": "user_group_member",
1454
+ "tableTo": "user",
1455
+ "columnsFrom": [
1456
+ "user_id"
1457
+ ],
1458
+ "columnsTo": [
1459
+ "id"
1460
+ ],
1461
+ "onDelete": "cascade",
1462
+ "onUpdate": "no action"
1463
+ }
1464
+ },
1465
+ "compositePrimaryKeys": {
1466
+ "user_group_member_group_id_user_id_pk": {
1467
+ "name": "user_group_member_group_id_user_id_pk",
1468
+ "columns": [
1469
+ "group_id",
1470
+ "user_id"
1471
+ ]
1472
+ }
1473
+ },
1474
+ "uniqueConstraints": {},
1475
+ "policies": {},
1476
+ "checkConstraints": {},
1477
+ "isRLSEnabled": false
1478
+ }
1479
+ },
1480
+ "enums": {},
1481
+ "schemas": {},
1482
+ "sequences": {},
1483
+ "roles": {},
1484
+ "policies": {},
1485
+ "views": {},
1486
+ "_meta": {
1487
+ "columns": {},
1488
+ "schemas": {},
1489
+ "tables": {}
1490
+ }
1491
+ }