@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,829 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "fa68e3dc-8439-4828-9960-3e8f63402ab5",
5
+ "prevId": "b67d5e11-5a2b-4188-b030-3c544f21c9b9",
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
+ "to_thread": {
314
+ "name": "to_thread",
315
+ "type": "text",
316
+ "primaryKey": false,
317
+ "notNull": false,
318
+ "autoincrement": false
319
+ },
320
+ "created_at": {
321
+ "name": "created_at",
322
+ "type": "integer",
323
+ "primaryKey": false,
324
+ "notNull": true,
325
+ "autoincrement": false
326
+ }
327
+ },
328
+ "indexes": {
329
+ "events_account_id_id_idx": {
330
+ "name": "events_account_id_id_idx",
331
+ "columns": [
332
+ "account_id",
333
+ "id"
334
+ ],
335
+ "isUnique": false
336
+ }
337
+ },
338
+ "foreignKeys": {
339
+ "events_account_id_accounts_id_fk": {
340
+ "name": "events_account_id_accounts_id_fk",
341
+ "tableFrom": "events",
342
+ "tableTo": "accounts",
343
+ "columnsFrom": [
344
+ "account_id"
345
+ ],
346
+ "columnsTo": [
347
+ "id"
348
+ ],
349
+ "onDelete": "cascade",
350
+ "onUpdate": "no action"
351
+ }
352
+ },
353
+ "compositePrimaryKeys": {},
354
+ "uniqueConstraints": {},
355
+ "checkConstraints": {}
356
+ },
357
+ "files": {
358
+ "name": "files",
359
+ "columns": {
360
+ "id": {
361
+ "name": "id",
362
+ "type": "text",
363
+ "primaryKey": true,
364
+ "notNull": true,
365
+ "autoincrement": false
366
+ },
367
+ "account_id": {
368
+ "name": "account_id",
369
+ "type": "text",
370
+ "primaryKey": false,
371
+ "notNull": true,
372
+ "autoincrement": false
373
+ },
374
+ "message_id": {
375
+ "name": "message_id",
376
+ "type": "text",
377
+ "primaryKey": false,
378
+ "notNull": true,
379
+ "autoincrement": false
380
+ },
381
+ "name": {
382
+ "name": "name",
383
+ "type": "text",
384
+ "primaryKey": false,
385
+ "notNull": true,
386
+ "autoincrement": false
387
+ },
388
+ "type": {
389
+ "name": "type",
390
+ "type": "text",
391
+ "primaryKey": false,
392
+ "notNull": true,
393
+ "autoincrement": false
394
+ },
395
+ "size": {
396
+ "name": "size",
397
+ "type": "integer",
398
+ "primaryKey": false,
399
+ "notNull": true,
400
+ "autoincrement": false
401
+ },
402
+ "key": {
403
+ "name": "key",
404
+ "type": "text",
405
+ "primaryKey": false,
406
+ "notNull": false,
407
+ "autoincrement": false
408
+ },
409
+ "expires_at": {
410
+ "name": "expires_at",
411
+ "type": "integer",
412
+ "primaryKey": false,
413
+ "notNull": false,
414
+ "autoincrement": false
415
+ },
416
+ "created_at": {
417
+ "name": "created_at",
418
+ "type": "integer",
419
+ "primaryKey": false,
420
+ "notNull": true,
421
+ "autoincrement": false
422
+ }
423
+ },
424
+ "indexes": {
425
+ "files_message_id_idx": {
426
+ "name": "files_message_id_idx",
427
+ "columns": [
428
+ "message_id"
429
+ ],
430
+ "isUnique": false
431
+ }
432
+ },
433
+ "foreignKeys": {
434
+ "files_account_id_accounts_id_fk": {
435
+ "name": "files_account_id_accounts_id_fk",
436
+ "tableFrom": "files",
437
+ "tableTo": "accounts",
438
+ "columnsFrom": [
439
+ "account_id"
440
+ ],
441
+ "columnsTo": [
442
+ "id"
443
+ ],
444
+ "onDelete": "cascade",
445
+ "onUpdate": "no action"
446
+ }
447
+ },
448
+ "compositePrimaryKeys": {},
449
+ "uniqueConstraints": {},
450
+ "checkConstraints": {}
451
+ },
452
+ "messages": {
453
+ "name": "messages",
454
+ "columns": {
455
+ "id": {
456
+ "name": "id",
457
+ "type": "text",
458
+ "primaryKey": true,
459
+ "notNull": true,
460
+ "autoincrement": false
461
+ },
462
+ "account_id": {
463
+ "name": "account_id",
464
+ "type": "text",
465
+ "primaryKey": false,
466
+ "notNull": true,
467
+ "autoincrement": false
468
+ },
469
+ "address_id": {
470
+ "name": "address_id",
471
+ "type": "text",
472
+ "primaryKey": false,
473
+ "notNull": true,
474
+ "autoincrement": false
475
+ },
476
+ "channel": {
477
+ "name": "channel",
478
+ "type": "text",
479
+ "primaryKey": false,
480
+ "notNull": true,
481
+ "autoincrement": false
482
+ },
483
+ "direction": {
484
+ "name": "direction",
485
+ "type": "text",
486
+ "primaryKey": false,
487
+ "notNull": true,
488
+ "autoincrement": false
489
+ },
490
+ "external_id": {
491
+ "name": "external_id",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": false,
495
+ "autoincrement": false
496
+ },
497
+ "counterpart": {
498
+ "name": "counterpart",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "autoincrement": false
503
+ },
504
+ "counterpart_name": {
505
+ "name": "counterpart_name",
506
+ "type": "text",
507
+ "primaryKey": false,
508
+ "notNull": false,
509
+ "autoincrement": false
510
+ },
511
+ "author": {
512
+ "name": "author",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": false,
516
+ "autoincrement": false
517
+ },
518
+ "author_name": {
519
+ "name": "author_name",
520
+ "type": "text",
521
+ "primaryKey": false,
522
+ "notNull": false,
523
+ "autoincrement": false
524
+ },
525
+ "to": {
526
+ "name": "to",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": true,
530
+ "autoincrement": false
531
+ },
532
+ "text": {
533
+ "name": "text",
534
+ "type": "text",
535
+ "primaryKey": false,
536
+ "notNull": true,
537
+ "autoincrement": false
538
+ },
539
+ "client_thread": {
540
+ "name": "client_thread",
541
+ "type": "text",
542
+ "primaryKey": false,
543
+ "notNull": false,
544
+ "autoincrement": false
545
+ },
546
+ "status": {
547
+ "name": "status",
548
+ "type": "text",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "autoincrement": false
552
+ },
553
+ "refusal": {
554
+ "name": "refusal",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": false,
558
+ "autoincrement": false
559
+ },
560
+ "admission": {
561
+ "name": "admission",
562
+ "type": "text",
563
+ "primaryKey": false,
564
+ "notNull": false,
565
+ "autoincrement": false
566
+ },
567
+ "error": {
568
+ "name": "error",
569
+ "type": "text",
570
+ "primaryKey": false,
571
+ "notNull": false,
572
+ "autoincrement": false
573
+ },
574
+ "created_at": {
575
+ "name": "created_at",
576
+ "type": "integer",
577
+ "primaryKey": false,
578
+ "notNull": true,
579
+ "autoincrement": false
580
+ }
581
+ },
582
+ "indexes": {
583
+ "messages_account_id_created_at_idx": {
584
+ "name": "messages_account_id_created_at_idx",
585
+ "columns": [
586
+ "account_id",
587
+ "created_at"
588
+ ],
589
+ "isUnique": false
590
+ },
591
+ "messages_address_id_external_id_idx": {
592
+ "name": "messages_address_id_external_id_idx",
593
+ "columns": [
594
+ "address_id",
595
+ "direction",
596
+ "external_id"
597
+ ],
598
+ "isUnique": true,
599
+ "where": "\"messages\".\"external_id\" is not null"
600
+ }
601
+ },
602
+ "foreignKeys": {
603
+ "messages_account_id_accounts_id_fk": {
604
+ "name": "messages_account_id_accounts_id_fk",
605
+ "tableFrom": "messages",
606
+ "tableTo": "accounts",
607
+ "columnsFrom": [
608
+ "account_id"
609
+ ],
610
+ "columnsTo": [
611
+ "id"
612
+ ],
613
+ "onDelete": "cascade",
614
+ "onUpdate": "no action"
615
+ },
616
+ "messages_address_id_addresses_id_fk": {
617
+ "name": "messages_address_id_addresses_id_fk",
618
+ "tableFrom": "messages",
619
+ "tableTo": "addresses",
620
+ "columnsFrom": [
621
+ "address_id"
622
+ ],
623
+ "columnsTo": [
624
+ "id"
625
+ ],
626
+ "onDelete": "cascade",
627
+ "onUpdate": "no action"
628
+ }
629
+ },
630
+ "compositePrimaryKeys": {},
631
+ "uniqueConstraints": {},
632
+ "checkConstraints": {}
633
+ },
634
+ "sign_ins": {
635
+ "name": "sign_ins",
636
+ "columns": {
637
+ "id": {
638
+ "name": "id",
639
+ "type": "text",
640
+ "primaryKey": true,
641
+ "notNull": true,
642
+ "autoincrement": false
643
+ },
644
+ "kind": {
645
+ "name": "kind",
646
+ "type": "text",
647
+ "primaryKey": false,
648
+ "notNull": true,
649
+ "autoincrement": false
650
+ },
651
+ "client_id": {
652
+ "name": "client_id",
653
+ "type": "text",
654
+ "primaryKey": false,
655
+ "notNull": false,
656
+ "autoincrement": false
657
+ },
658
+ "client_name": {
659
+ "name": "client_name",
660
+ "type": "text",
661
+ "primaryKey": false,
662
+ "notNull": true,
663
+ "autoincrement": false
664
+ },
665
+ "redirect_uri": {
666
+ "name": "redirect_uri",
667
+ "type": "text",
668
+ "primaryKey": false,
669
+ "notNull": true,
670
+ "autoincrement": false
671
+ },
672
+ "challenge": {
673
+ "name": "challenge",
674
+ "type": "text",
675
+ "primaryKey": false,
676
+ "notNull": true,
677
+ "autoincrement": false
678
+ },
679
+ "state": {
680
+ "name": "state",
681
+ "type": "text",
682
+ "primaryKey": false,
683
+ "notNull": false,
684
+ "autoincrement": false
685
+ },
686
+ "account_id": {
687
+ "name": "account_id",
688
+ "type": "text",
689
+ "primaryKey": false,
690
+ "notNull": false,
691
+ "autoincrement": false
692
+ },
693
+ "code_hash": {
694
+ "name": "code_hash",
695
+ "type": "text",
696
+ "primaryKey": false,
697
+ "notNull": false,
698
+ "autoincrement": false
699
+ },
700
+ "expires_at": {
701
+ "name": "expires_at",
702
+ "type": "integer",
703
+ "primaryKey": false,
704
+ "notNull": true,
705
+ "autoincrement": false
706
+ }
707
+ },
708
+ "indexes": {
709
+ "sign_ins_code_hash_unique": {
710
+ "name": "sign_ins_code_hash_unique",
711
+ "columns": [
712
+ "code_hash"
713
+ ],
714
+ "isUnique": true
715
+ }
716
+ },
717
+ "foreignKeys": {
718
+ "sign_ins_account_id_accounts_id_fk": {
719
+ "name": "sign_ins_account_id_accounts_id_fk",
720
+ "tableFrom": "sign_ins",
721
+ "tableTo": "accounts",
722
+ "columnsFrom": [
723
+ "account_id"
724
+ ],
725
+ "columnsTo": [
726
+ "id"
727
+ ],
728
+ "onDelete": "cascade",
729
+ "onUpdate": "no action"
730
+ }
731
+ },
732
+ "compositePrimaryKeys": {},
733
+ "uniqueConstraints": {},
734
+ "checkConstraints": {}
735
+ },
736
+ "tokens": {
737
+ "name": "tokens",
738
+ "columns": {
739
+ "id": {
740
+ "name": "id",
741
+ "type": "text",
742
+ "primaryKey": true,
743
+ "notNull": true,
744
+ "autoincrement": false
745
+ },
746
+ "account_id": {
747
+ "name": "account_id",
748
+ "type": "text",
749
+ "primaryKey": false,
750
+ "notNull": true,
751
+ "autoincrement": false
752
+ },
753
+ "hash": {
754
+ "name": "hash",
755
+ "type": "text",
756
+ "primaryKey": false,
757
+ "notNull": true,
758
+ "autoincrement": false
759
+ },
760
+ "name": {
761
+ "name": "name",
762
+ "type": "text",
763
+ "primaryKey": false,
764
+ "notNull": true,
765
+ "autoincrement": false
766
+ },
767
+ "created_at": {
768
+ "name": "created_at",
769
+ "type": "integer",
770
+ "primaryKey": false,
771
+ "notNull": true,
772
+ "autoincrement": false
773
+ }
774
+ },
775
+ "indexes": {
776
+ "tokens_hash_unique": {
777
+ "name": "tokens_hash_unique",
778
+ "columns": [
779
+ "hash"
780
+ ],
781
+ "isUnique": true
782
+ },
783
+ "tokens_account_id_idx": {
784
+ "name": "tokens_account_id_idx",
785
+ "columns": [
786
+ "account_id"
787
+ ],
788
+ "isUnique": false
789
+ }
790
+ },
791
+ "foreignKeys": {
792
+ "tokens_account_id_accounts_id_fk": {
793
+ "name": "tokens_account_id_accounts_id_fk",
794
+ "tableFrom": "tokens",
795
+ "tableTo": "accounts",
796
+ "columnsFrom": [
797
+ "account_id"
798
+ ],
799
+ "columnsTo": [
800
+ "id"
801
+ ],
802
+ "onDelete": "cascade",
803
+ "onUpdate": "no action"
804
+ }
805
+ },
806
+ "compositePrimaryKeys": {},
807
+ "uniqueConstraints": {},
808
+ "checkConstraints": {}
809
+ }
810
+ },
811
+ "views": {},
812
+ "enums": {},
813
+ "_meta": {
814
+ "schemas": {},
815
+ "tables": {},
816
+ "columns": {}
817
+ },
818
+ "internal": {
819
+ "indexes": {
820
+ "accounts_name_idx": {
821
+ "columns": {
822
+ "lower(\"name\")": {
823
+ "isExpression": true
824
+ }
825
+ }
826
+ }
827
+ }
828
+ }
829
+ }