@artil-ai/connect 0.0.0-stage → 0.5.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,857 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "71af15d9-a173-440b-97d8-76f71448dde6",
5
+ "prevId": "519a169c-b45c-491f-8135-766c450a0a00",
6
+ "tables": {
7
+ "access": {
8
+ "name": "access",
9
+ "columns": {
10
+ "account_id": {
11
+ "name": "account_id",
12
+ "type": "text",
13
+ "primaryKey": false,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "channel": {
18
+ "name": "channel",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "admit": {
25
+ "name": "admit",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "senders": {
32
+ "name": "senders",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ }
38
+ },
39
+ "indexes": {},
40
+ "foreignKeys": {
41
+ "access_account_id_accounts_id_fk": {
42
+ "name": "access_account_id_accounts_id_fk",
43
+ "tableFrom": "access",
44
+ "tableTo": "accounts",
45
+ "columnsFrom": [
46
+ "account_id"
47
+ ],
48
+ "columnsTo": [
49
+ "id"
50
+ ],
51
+ "onDelete": "cascade",
52
+ "onUpdate": "no action"
53
+ }
54
+ },
55
+ "compositePrimaryKeys": {
56
+ "access_account_id_channel_pk": {
57
+ "columns": [
58
+ "account_id",
59
+ "channel"
60
+ ],
61
+ "name": "access_account_id_channel_pk"
62
+ }
63
+ },
64
+ "uniqueConstraints": {},
65
+ "checkConstraints": {}
66
+ },
67
+ "accounts": {
68
+ "name": "accounts",
69
+ "columns": {
70
+ "id": {
71
+ "name": "id",
72
+ "type": "text",
73
+ "primaryKey": true,
74
+ "notNull": true,
75
+ "autoincrement": false
76
+ },
77
+ "name": {
78
+ "name": "name",
79
+ "type": "text",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "autoincrement": false
83
+ },
84
+ "created_at": {
85
+ "name": "created_at",
86
+ "type": "integer",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "autoincrement": false
90
+ }
91
+ },
92
+ "indexes": {
93
+ "accounts_name_idx": {
94
+ "name": "accounts_name_idx",
95
+ "columns": [
96
+ "lower(\"name\")"
97
+ ],
98
+ "isUnique": true
99
+ }
100
+ },
101
+ "foreignKeys": {},
102
+ "compositePrimaryKeys": {},
103
+ "uniqueConstraints": {},
104
+ "checkConstraints": {}
105
+ },
106
+ "addresses": {
107
+ "name": "addresses",
108
+ "columns": {
109
+ "id": {
110
+ "name": "id",
111
+ "type": "text",
112
+ "primaryKey": true,
113
+ "notNull": true,
114
+ "autoincrement": false
115
+ },
116
+ "account_id": {
117
+ "name": "account_id",
118
+ "type": "text",
119
+ "primaryKey": false,
120
+ "notNull": true,
121
+ "autoincrement": false
122
+ },
123
+ "channel": {
124
+ "name": "channel",
125
+ "type": "text",
126
+ "primaryKey": false,
127
+ "notNull": true,
128
+ "autoincrement": false
129
+ },
130
+ "value": {
131
+ "name": "value",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": true,
135
+ "autoincrement": false
136
+ },
137
+ "credentials": {
138
+ "name": "credentials",
139
+ "type": "text",
140
+ "primaryKey": false,
141
+ "notNull": false,
142
+ "autoincrement": false
143
+ },
144
+ "created_at": {
145
+ "name": "created_at",
146
+ "type": "integer",
147
+ "primaryKey": false,
148
+ "notNull": true,
149
+ "autoincrement": false
150
+ }
151
+ },
152
+ "indexes": {
153
+ "addresses_channel_value_idx": {
154
+ "name": "addresses_channel_value_idx",
155
+ "columns": [
156
+ "channel",
157
+ "value"
158
+ ],
159
+ "isUnique": true,
160
+ "where": "\"addresses\".\"credentials\" is not null"
161
+ },
162
+ "addresses_account_id_idx": {
163
+ "name": "addresses_account_id_idx",
164
+ "columns": [
165
+ "account_id"
166
+ ],
167
+ "isUnique": false
168
+ }
169
+ },
170
+ "foreignKeys": {
171
+ "addresses_account_id_accounts_id_fk": {
172
+ "name": "addresses_account_id_accounts_id_fk",
173
+ "tableFrom": "addresses",
174
+ "tableTo": "accounts",
175
+ "columnsFrom": [
176
+ "account_id"
177
+ ],
178
+ "columnsTo": [
179
+ "id"
180
+ ],
181
+ "onDelete": "cascade",
182
+ "onUpdate": "no action"
183
+ }
184
+ },
185
+ "compositePrimaryKeys": {},
186
+ "uniqueConstraints": {},
187
+ "checkConstraints": {}
188
+ },
189
+ "connections": {
190
+ "name": "connections",
191
+ "columns": {
192
+ "account_id": {
193
+ "name": "account_id",
194
+ "type": "text",
195
+ "primaryKey": true,
196
+ "notNull": true,
197
+ "autoincrement": false
198
+ },
199
+ "id": {
200
+ "name": "id",
201
+ "type": "text",
202
+ "primaryKey": false,
203
+ "notNull": true,
204
+ "autoincrement": false
205
+ },
206
+ "token_hash": {
207
+ "name": "token_hash",
208
+ "type": "text",
209
+ "primaryKey": false,
210
+ "notNull": true,
211
+ "autoincrement": false
212
+ },
213
+ "client": {
214
+ "name": "client",
215
+ "type": "text",
216
+ "primaryKey": false,
217
+ "notNull": true,
218
+ "autoincrement": false
219
+ },
220
+ "machine": {
221
+ "name": "machine",
222
+ "type": "text",
223
+ "primaryKey": false,
224
+ "notNull": false,
225
+ "autoincrement": false
226
+ },
227
+ "starts_after": {
228
+ "name": "starts_after",
229
+ "type": "integer",
230
+ "primaryKey": false,
231
+ "notNull": true,
232
+ "autoincrement": false
233
+ },
234
+ "listened_at": {
235
+ "name": "listened_at",
236
+ "type": "integer",
237
+ "primaryKey": false,
238
+ "notNull": false,
239
+ "autoincrement": false
240
+ }
241
+ },
242
+ "indexes": {},
243
+ "foreignKeys": {
244
+ "connections_account_id_accounts_id_fk": {
245
+ "name": "connections_account_id_accounts_id_fk",
246
+ "tableFrom": "connections",
247
+ "tableTo": "accounts",
248
+ "columnsFrom": [
249
+ "account_id"
250
+ ],
251
+ "columnsTo": [
252
+ "id"
253
+ ],
254
+ "onDelete": "cascade",
255
+ "onUpdate": "no action"
256
+ },
257
+ "connections_token_hash_tokens_hash_fk": {
258
+ "name": "connections_token_hash_tokens_hash_fk",
259
+ "tableFrom": "connections",
260
+ "tableTo": "tokens",
261
+ "columnsFrom": [
262
+ "token_hash"
263
+ ],
264
+ "columnsTo": [
265
+ "hash"
266
+ ],
267
+ "onDelete": "cascade",
268
+ "onUpdate": "no action"
269
+ }
270
+ },
271
+ "compositePrimaryKeys": {},
272
+ "uniqueConstraints": {},
273
+ "checkConstraints": {}
274
+ },
275
+ "events": {
276
+ "name": "events",
277
+ "columns": {
278
+ "id": {
279
+ "name": "id",
280
+ "type": "integer",
281
+ "primaryKey": true,
282
+ "notNull": true,
283
+ "autoincrement": true
284
+ },
285
+ "account_id": {
286
+ "name": "account_id",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": true,
290
+ "autoincrement": false
291
+ },
292
+ "type": {
293
+ "name": "type",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "autoincrement": false
298
+ },
299
+ "channel": {
300
+ "name": "channel",
301
+ "type": "text",
302
+ "primaryKey": false,
303
+ "notNull": true,
304
+ "autoincrement": false
305
+ },
306
+ "message_id": {
307
+ "name": "message_id",
308
+ "type": "text",
309
+ "primaryKey": false,
310
+ "notNull": true,
311
+ "autoincrement": false
312
+ },
313
+ "text": {
314
+ "name": "text",
315
+ "type": "text",
316
+ "primaryKey": false,
317
+ "notNull": false,
318
+ "autoincrement": false
319
+ },
320
+ "sender": {
321
+ "name": "sender",
322
+ "type": "text",
323
+ "primaryKey": false,
324
+ "notNull": false,
325
+ "autoincrement": false
326
+ },
327
+ "thread": {
328
+ "name": "thread",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": false,
332
+ "autoincrement": false
333
+ },
334
+ "to_thread": {
335
+ "name": "to_thread",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": false,
339
+ "autoincrement": false
340
+ },
341
+ "client": {
342
+ "name": "client",
343
+ "type": "text",
344
+ "primaryKey": false,
345
+ "notNull": false,
346
+ "autoincrement": false
347
+ },
348
+ "created_at": {
349
+ "name": "created_at",
350
+ "type": "integer",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ }
355
+ },
356
+ "indexes": {
357
+ "events_account_id_id_idx": {
358
+ "name": "events_account_id_id_idx",
359
+ "columns": [
360
+ "account_id",
361
+ "id"
362
+ ],
363
+ "isUnique": false
364
+ }
365
+ },
366
+ "foreignKeys": {
367
+ "events_account_id_accounts_id_fk": {
368
+ "name": "events_account_id_accounts_id_fk",
369
+ "tableFrom": "events",
370
+ "tableTo": "accounts",
371
+ "columnsFrom": [
372
+ "account_id"
373
+ ],
374
+ "columnsTo": [
375
+ "id"
376
+ ],
377
+ "onDelete": "cascade",
378
+ "onUpdate": "no action"
379
+ }
380
+ },
381
+ "compositePrimaryKeys": {},
382
+ "uniqueConstraints": {},
383
+ "checkConstraints": {}
384
+ },
385
+ "files": {
386
+ "name": "files",
387
+ "columns": {
388
+ "id": {
389
+ "name": "id",
390
+ "type": "text",
391
+ "primaryKey": true,
392
+ "notNull": true,
393
+ "autoincrement": false
394
+ },
395
+ "account_id": {
396
+ "name": "account_id",
397
+ "type": "text",
398
+ "primaryKey": false,
399
+ "notNull": true,
400
+ "autoincrement": false
401
+ },
402
+ "message_id": {
403
+ "name": "message_id",
404
+ "type": "text",
405
+ "primaryKey": false,
406
+ "notNull": true,
407
+ "autoincrement": false
408
+ },
409
+ "name": {
410
+ "name": "name",
411
+ "type": "text",
412
+ "primaryKey": false,
413
+ "notNull": true,
414
+ "autoincrement": false
415
+ },
416
+ "type": {
417
+ "name": "type",
418
+ "type": "text",
419
+ "primaryKey": false,
420
+ "notNull": true,
421
+ "autoincrement": false
422
+ },
423
+ "size": {
424
+ "name": "size",
425
+ "type": "integer",
426
+ "primaryKey": false,
427
+ "notNull": true,
428
+ "autoincrement": false
429
+ },
430
+ "key": {
431
+ "name": "key",
432
+ "type": "text",
433
+ "primaryKey": false,
434
+ "notNull": false,
435
+ "autoincrement": false
436
+ },
437
+ "expires_at": {
438
+ "name": "expires_at",
439
+ "type": "integer",
440
+ "primaryKey": false,
441
+ "notNull": false,
442
+ "autoincrement": false
443
+ },
444
+ "created_at": {
445
+ "name": "created_at",
446
+ "type": "integer",
447
+ "primaryKey": false,
448
+ "notNull": true,
449
+ "autoincrement": false
450
+ }
451
+ },
452
+ "indexes": {
453
+ "files_message_id_idx": {
454
+ "name": "files_message_id_idx",
455
+ "columns": [
456
+ "message_id"
457
+ ],
458
+ "isUnique": false
459
+ }
460
+ },
461
+ "foreignKeys": {
462
+ "files_account_id_accounts_id_fk": {
463
+ "name": "files_account_id_accounts_id_fk",
464
+ "tableFrom": "files",
465
+ "tableTo": "accounts",
466
+ "columnsFrom": [
467
+ "account_id"
468
+ ],
469
+ "columnsTo": [
470
+ "id"
471
+ ],
472
+ "onDelete": "cascade",
473
+ "onUpdate": "no action"
474
+ }
475
+ },
476
+ "compositePrimaryKeys": {},
477
+ "uniqueConstraints": {},
478
+ "checkConstraints": {}
479
+ },
480
+ "messages": {
481
+ "name": "messages",
482
+ "columns": {
483
+ "id": {
484
+ "name": "id",
485
+ "type": "text",
486
+ "primaryKey": true,
487
+ "notNull": true,
488
+ "autoincrement": false
489
+ },
490
+ "account_id": {
491
+ "name": "account_id",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "autoincrement": false
496
+ },
497
+ "address_id": {
498
+ "name": "address_id",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "autoincrement": false
503
+ },
504
+ "channel": {
505
+ "name": "channel",
506
+ "type": "text",
507
+ "primaryKey": false,
508
+ "notNull": true,
509
+ "autoincrement": false
510
+ },
511
+ "direction": {
512
+ "name": "direction",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": true,
516
+ "autoincrement": false
517
+ },
518
+ "external_id": {
519
+ "name": "external_id",
520
+ "type": "text",
521
+ "primaryKey": false,
522
+ "notNull": false,
523
+ "autoincrement": false
524
+ },
525
+ "counterpart": {
526
+ "name": "counterpart",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": true,
530
+ "autoincrement": false
531
+ },
532
+ "counterpart_name": {
533
+ "name": "counterpart_name",
534
+ "type": "text",
535
+ "primaryKey": false,
536
+ "notNull": false,
537
+ "autoincrement": false
538
+ },
539
+ "author": {
540
+ "name": "author",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": false,
544
+ "autoincrement": false
545
+ },
546
+ "author_name": {
547
+ "name": "author_name",
548
+ "type": "text",
549
+ "primaryKey": false,
550
+ "notNull": false,
551
+ "autoincrement": false
552
+ },
553
+ "to": {
554
+ "name": "to",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "autoincrement": false
559
+ },
560
+ "text": {
561
+ "name": "text",
562
+ "type": "text",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "autoincrement": false
566
+ },
567
+ "client_thread": {
568
+ "name": "client_thread",
569
+ "type": "text",
570
+ "primaryKey": false,
571
+ "notNull": false,
572
+ "autoincrement": false
573
+ },
574
+ "status": {
575
+ "name": "status",
576
+ "type": "text",
577
+ "primaryKey": false,
578
+ "notNull": true,
579
+ "autoincrement": false
580
+ },
581
+ "refusal": {
582
+ "name": "refusal",
583
+ "type": "text",
584
+ "primaryKey": false,
585
+ "notNull": false,
586
+ "autoincrement": false
587
+ },
588
+ "admission": {
589
+ "name": "admission",
590
+ "type": "text",
591
+ "primaryKey": false,
592
+ "notNull": false,
593
+ "autoincrement": false
594
+ },
595
+ "error": {
596
+ "name": "error",
597
+ "type": "text",
598
+ "primaryKey": false,
599
+ "notNull": false,
600
+ "autoincrement": false
601
+ },
602
+ "created_at": {
603
+ "name": "created_at",
604
+ "type": "integer",
605
+ "primaryKey": false,
606
+ "notNull": true,
607
+ "autoincrement": false
608
+ }
609
+ },
610
+ "indexes": {
611
+ "messages_account_id_created_at_idx": {
612
+ "name": "messages_account_id_created_at_idx",
613
+ "columns": [
614
+ "account_id",
615
+ "created_at"
616
+ ],
617
+ "isUnique": false
618
+ },
619
+ "messages_address_id_external_id_idx": {
620
+ "name": "messages_address_id_external_id_idx",
621
+ "columns": [
622
+ "address_id",
623
+ "direction",
624
+ "external_id"
625
+ ],
626
+ "isUnique": true,
627
+ "where": "\"messages\".\"external_id\" is not null"
628
+ }
629
+ },
630
+ "foreignKeys": {
631
+ "messages_account_id_accounts_id_fk": {
632
+ "name": "messages_account_id_accounts_id_fk",
633
+ "tableFrom": "messages",
634
+ "tableTo": "accounts",
635
+ "columnsFrom": [
636
+ "account_id"
637
+ ],
638
+ "columnsTo": [
639
+ "id"
640
+ ],
641
+ "onDelete": "cascade",
642
+ "onUpdate": "no action"
643
+ },
644
+ "messages_address_id_addresses_id_fk": {
645
+ "name": "messages_address_id_addresses_id_fk",
646
+ "tableFrom": "messages",
647
+ "tableTo": "addresses",
648
+ "columnsFrom": [
649
+ "address_id"
650
+ ],
651
+ "columnsTo": [
652
+ "id"
653
+ ],
654
+ "onDelete": "cascade",
655
+ "onUpdate": "no action"
656
+ }
657
+ },
658
+ "compositePrimaryKeys": {},
659
+ "uniqueConstraints": {},
660
+ "checkConstraints": {}
661
+ },
662
+ "sign_ins": {
663
+ "name": "sign_ins",
664
+ "columns": {
665
+ "id": {
666
+ "name": "id",
667
+ "type": "text",
668
+ "primaryKey": true,
669
+ "notNull": true,
670
+ "autoincrement": false
671
+ },
672
+ "kind": {
673
+ "name": "kind",
674
+ "type": "text",
675
+ "primaryKey": false,
676
+ "notNull": true,
677
+ "autoincrement": false
678
+ },
679
+ "client_id": {
680
+ "name": "client_id",
681
+ "type": "text",
682
+ "primaryKey": false,
683
+ "notNull": false,
684
+ "autoincrement": false
685
+ },
686
+ "client_name": {
687
+ "name": "client_name",
688
+ "type": "text",
689
+ "primaryKey": false,
690
+ "notNull": true,
691
+ "autoincrement": false
692
+ },
693
+ "redirect_uri": {
694
+ "name": "redirect_uri",
695
+ "type": "text",
696
+ "primaryKey": false,
697
+ "notNull": true,
698
+ "autoincrement": false
699
+ },
700
+ "challenge": {
701
+ "name": "challenge",
702
+ "type": "text",
703
+ "primaryKey": false,
704
+ "notNull": true,
705
+ "autoincrement": false
706
+ },
707
+ "state": {
708
+ "name": "state",
709
+ "type": "text",
710
+ "primaryKey": false,
711
+ "notNull": false,
712
+ "autoincrement": false
713
+ },
714
+ "account_id": {
715
+ "name": "account_id",
716
+ "type": "text",
717
+ "primaryKey": false,
718
+ "notNull": false,
719
+ "autoincrement": false
720
+ },
721
+ "code_hash": {
722
+ "name": "code_hash",
723
+ "type": "text",
724
+ "primaryKey": false,
725
+ "notNull": false,
726
+ "autoincrement": false
727
+ },
728
+ "expires_at": {
729
+ "name": "expires_at",
730
+ "type": "integer",
731
+ "primaryKey": false,
732
+ "notNull": true,
733
+ "autoincrement": false
734
+ }
735
+ },
736
+ "indexes": {
737
+ "sign_ins_code_hash_unique": {
738
+ "name": "sign_ins_code_hash_unique",
739
+ "columns": [
740
+ "code_hash"
741
+ ],
742
+ "isUnique": true
743
+ }
744
+ },
745
+ "foreignKeys": {
746
+ "sign_ins_account_id_accounts_id_fk": {
747
+ "name": "sign_ins_account_id_accounts_id_fk",
748
+ "tableFrom": "sign_ins",
749
+ "tableTo": "accounts",
750
+ "columnsFrom": [
751
+ "account_id"
752
+ ],
753
+ "columnsTo": [
754
+ "id"
755
+ ],
756
+ "onDelete": "cascade",
757
+ "onUpdate": "no action"
758
+ }
759
+ },
760
+ "compositePrimaryKeys": {},
761
+ "uniqueConstraints": {},
762
+ "checkConstraints": {}
763
+ },
764
+ "tokens": {
765
+ "name": "tokens",
766
+ "columns": {
767
+ "id": {
768
+ "name": "id",
769
+ "type": "text",
770
+ "primaryKey": true,
771
+ "notNull": true,
772
+ "autoincrement": false
773
+ },
774
+ "account_id": {
775
+ "name": "account_id",
776
+ "type": "text",
777
+ "primaryKey": false,
778
+ "notNull": true,
779
+ "autoincrement": false
780
+ },
781
+ "hash": {
782
+ "name": "hash",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": true,
786
+ "autoincrement": false
787
+ },
788
+ "name": {
789
+ "name": "name",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": true,
793
+ "autoincrement": false
794
+ },
795
+ "created_at": {
796
+ "name": "created_at",
797
+ "type": "integer",
798
+ "primaryKey": false,
799
+ "notNull": true,
800
+ "autoincrement": false
801
+ }
802
+ },
803
+ "indexes": {
804
+ "tokens_hash_unique": {
805
+ "name": "tokens_hash_unique",
806
+ "columns": [
807
+ "hash"
808
+ ],
809
+ "isUnique": true
810
+ },
811
+ "tokens_account_id_idx": {
812
+ "name": "tokens_account_id_idx",
813
+ "columns": [
814
+ "account_id"
815
+ ],
816
+ "isUnique": false
817
+ }
818
+ },
819
+ "foreignKeys": {
820
+ "tokens_account_id_accounts_id_fk": {
821
+ "name": "tokens_account_id_accounts_id_fk",
822
+ "tableFrom": "tokens",
823
+ "tableTo": "accounts",
824
+ "columnsFrom": [
825
+ "account_id"
826
+ ],
827
+ "columnsTo": [
828
+ "id"
829
+ ],
830
+ "onDelete": "cascade",
831
+ "onUpdate": "no action"
832
+ }
833
+ },
834
+ "compositePrimaryKeys": {},
835
+ "uniqueConstraints": {},
836
+ "checkConstraints": {}
837
+ }
838
+ },
839
+ "views": {},
840
+ "enums": {},
841
+ "_meta": {
842
+ "schemas": {},
843
+ "tables": {},
844
+ "columns": {}
845
+ },
846
+ "internal": {
847
+ "indexes": {
848
+ "accounts_name_idx": {
849
+ "columns": {
850
+ "lower(\"name\")": {
851
+ "isExpression": true
852
+ }
853
+ }
854
+ }
855
+ }
856
+ }
857
+ }