@happyvertical/smrt-messages 0.49.3 → 0.49.4
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.
- package/dist/manifest.json +1650 -524
- package/dist/smrt-knowledge.json +11 -11
- package/package.json +8 -8
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-messages",
|
|
5
|
-
"packageVersion": "0.49.
|
|
5
|
+
"packageVersion": "0.49.4",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-messages:AccountCollection": {
|
|
8
8
|
"name": "accountcollection",
|
|
@@ -127,8 +127,8 @@
|
|
|
127
127
|
"exportName": "AccountCollection",
|
|
128
128
|
"collectionExportName": "AccountCollectionCollection",
|
|
129
129
|
"schema": {
|
|
130
|
-
"tableName": "
|
|
131
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
130
|
+
"tableName": "accounts",
|
|
131
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
|
|
132
132
|
"columns": {
|
|
133
133
|
"id": {
|
|
134
134
|
"type": "UUID",
|
|
@@ -145,6 +145,14 @@
|
|
|
145
145
|
"notNull": true,
|
|
146
146
|
"default": ""
|
|
147
147
|
},
|
|
148
|
+
"_meta_type": {
|
|
149
|
+
"type": "TEXT",
|
|
150
|
+
"notNull": true
|
|
151
|
+
},
|
|
152
|
+
"_meta_data": {
|
|
153
|
+
"type": "JSON",
|
|
154
|
+
"notNull": false
|
|
155
|
+
},
|
|
148
156
|
"created_at": {
|
|
149
157
|
"type": "TIMESTAMP",
|
|
150
158
|
"notNull": true,
|
|
@@ -154,25 +162,102 @@
|
|
|
154
162
|
"type": "TIMESTAMP",
|
|
155
163
|
"notNull": true,
|
|
156
164
|
"default": "current_timestamp"
|
|
165
|
+
},
|
|
166
|
+
"tenant_id": {
|
|
167
|
+
"type": "UUID",
|
|
168
|
+
"referenceKind": "tenantId",
|
|
169
|
+
"notNull": false
|
|
170
|
+
},
|
|
171
|
+
"name": {
|
|
172
|
+
"type": "TEXT",
|
|
173
|
+
"notNull": false
|
|
174
|
+
},
|
|
175
|
+
"provider_type": {
|
|
176
|
+
"type": "TEXT",
|
|
177
|
+
"notNull": false
|
|
178
|
+
},
|
|
179
|
+
"channel_type": {
|
|
180
|
+
"type": "TEXT",
|
|
181
|
+
"notNull": false
|
|
182
|
+
},
|
|
183
|
+
"credential_secret_id": {
|
|
184
|
+
"type": "TEXT",
|
|
185
|
+
"notNull": false
|
|
186
|
+
},
|
|
187
|
+
"is_active": {
|
|
188
|
+
"type": "BOOLEAN",
|
|
189
|
+
"notNull": false,
|
|
190
|
+
"default": true
|
|
191
|
+
},
|
|
192
|
+
"last_sync_at": {
|
|
193
|
+
"type": "TIMESTAMP",
|
|
194
|
+
"notNull": false
|
|
195
|
+
},
|
|
196
|
+
"settings": {
|
|
197
|
+
"type": "TEXT",
|
|
198
|
+
"notNull": false
|
|
199
|
+
},
|
|
200
|
+
"configuration": {
|
|
201
|
+
"type": "TEXT",
|
|
202
|
+
"notNull": false
|
|
203
|
+
},
|
|
204
|
+
"email": {
|
|
205
|
+
"type": "TEXT",
|
|
206
|
+
"notNull": false
|
|
207
|
+
},
|
|
208
|
+
"sync_interval_minutes": {
|
|
209
|
+
"type": "INTEGER",
|
|
210
|
+
"notNull": false,
|
|
211
|
+
"default": 60
|
|
212
|
+
},
|
|
213
|
+
"workspace_id": {
|
|
214
|
+
"type": "TEXT",
|
|
215
|
+
"notNull": false
|
|
216
|
+
},
|
|
217
|
+
"workspace_name": {
|
|
218
|
+
"type": "TEXT",
|
|
219
|
+
"notNull": false
|
|
220
|
+
},
|
|
221
|
+
"bot_user_id": {
|
|
222
|
+
"type": "TEXT",
|
|
223
|
+
"notNull": false
|
|
224
|
+
},
|
|
225
|
+
"handle": {
|
|
226
|
+
"type": "TEXT",
|
|
227
|
+
"notNull": false
|
|
228
|
+
},
|
|
229
|
+
"twitter_user_id": {
|
|
230
|
+
"type": "TEXT",
|
|
231
|
+
"notNull": false
|
|
157
232
|
}
|
|
158
233
|
},
|
|
159
234
|
"indexes": [
|
|
160
235
|
{
|
|
161
|
-
"name": "
|
|
236
|
+
"name": "accounts_slug_context_meta_type_idx",
|
|
162
237
|
"columns": [
|
|
238
|
+
"tenant_id",
|
|
163
239
|
"slug",
|
|
164
|
-
"context"
|
|
240
|
+
"context",
|
|
241
|
+
"_meta_type"
|
|
165
242
|
],
|
|
166
|
-
"unique": true
|
|
243
|
+
"unique": true,
|
|
244
|
+
"nullsNotDistinct": true
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "accounts_meta_type_idx",
|
|
248
|
+
"columns": [
|
|
249
|
+
"_meta_type"
|
|
250
|
+
]
|
|
167
251
|
},
|
|
168
252
|
{
|
|
169
|
-
"name": "
|
|
253
|
+
"name": "accounts_tenant_id_created_at_idx",
|
|
170
254
|
"columns": [
|
|
255
|
+
"tenant_id",
|
|
171
256
|
"created_at"
|
|
172
257
|
]
|
|
173
258
|
}
|
|
174
259
|
],
|
|
175
|
-
"version": "
|
|
260
|
+
"version": "3854ea98"
|
|
176
261
|
}
|
|
177
262
|
},
|
|
178
263
|
"@happyvertical/smrt-messages:AttachmentCollection": {
|
|
@@ -397,8 +482,8 @@
|
|
|
397
482
|
"exportName": "AttachmentCollection",
|
|
398
483
|
"collectionExportName": "AttachmentCollectionCollection",
|
|
399
484
|
"schema": {
|
|
400
|
-
"tableName": "
|
|
401
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
485
|
+
"tableName": "attachments",
|
|
486
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"attachments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"message_id\" UUID,\n \"filename\" TEXT,\n \"content_type\" TEXT,\n \"size\" INTEGER NOT NULL DEFAULT 0,\n \"content_id\" TEXT,\n \"content_disposition\" TEXT DEFAULT 'attachment',\n \"file_path\" TEXT,\n \"source_url\" TEXT\n);",
|
|
402
487
|
"columns": {
|
|
403
488
|
"id": {
|
|
404
489
|
"type": "UUID",
|
|
@@ -424,25 +509,89 @@
|
|
|
424
509
|
"type": "TIMESTAMP",
|
|
425
510
|
"notNull": true,
|
|
426
511
|
"default": "current_timestamp"
|
|
512
|
+
},
|
|
513
|
+
"tenant_id": {
|
|
514
|
+
"type": "UUID",
|
|
515
|
+
"referenceKind": "tenantId",
|
|
516
|
+
"notNull": false,
|
|
517
|
+
"unique": false
|
|
518
|
+
},
|
|
519
|
+
"message_id": {
|
|
520
|
+
"type": "UUID",
|
|
521
|
+
"referenceKind": "foreignKey",
|
|
522
|
+
"notNull": false,
|
|
523
|
+
"unique": false,
|
|
524
|
+
"foreignKey": {
|
|
525
|
+
"table": "messages",
|
|
526
|
+
"column": "id",
|
|
527
|
+
"onDelete": "NO ACTION",
|
|
528
|
+
"onUpdate": "CASCADE"
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
"filename": {
|
|
532
|
+
"type": "TEXT",
|
|
533
|
+
"notNull": false,
|
|
534
|
+
"unique": false
|
|
535
|
+
},
|
|
536
|
+
"content_type": {
|
|
537
|
+
"type": "TEXT",
|
|
538
|
+
"notNull": false,
|
|
539
|
+
"unique": false
|
|
540
|
+
},
|
|
541
|
+
"size": {
|
|
542
|
+
"type": "INTEGER",
|
|
543
|
+
"notNull": true,
|
|
544
|
+
"unique": false,
|
|
545
|
+
"default": 0
|
|
546
|
+
},
|
|
547
|
+
"content_id": {
|
|
548
|
+
"type": "TEXT",
|
|
549
|
+
"notNull": false,
|
|
550
|
+
"unique": false
|
|
551
|
+
},
|
|
552
|
+
"content_disposition": {
|
|
553
|
+
"type": "TEXT",
|
|
554
|
+
"notNull": false,
|
|
555
|
+
"unique": false,
|
|
556
|
+
"default": "attachment"
|
|
557
|
+
},
|
|
558
|
+
"file_path": {
|
|
559
|
+
"type": "TEXT",
|
|
560
|
+
"notNull": false,
|
|
561
|
+
"unique": false
|
|
562
|
+
},
|
|
563
|
+
"source_url": {
|
|
564
|
+
"type": "TEXT",
|
|
565
|
+
"notNull": false,
|
|
566
|
+
"unique": false
|
|
427
567
|
}
|
|
428
568
|
},
|
|
429
569
|
"indexes": [
|
|
430
570
|
{
|
|
431
|
-
"name": "
|
|
571
|
+
"name": "attachments_slug_context_idx",
|
|
432
572
|
"columns": [
|
|
573
|
+
"tenant_id",
|
|
433
574
|
"slug",
|
|
434
575
|
"context"
|
|
435
576
|
],
|
|
436
|
-
"unique": true
|
|
577
|
+
"unique": true,
|
|
578
|
+
"nullsNotDistinct": true
|
|
437
579
|
},
|
|
438
580
|
{
|
|
439
|
-
"name": "
|
|
581
|
+
"name": "attachments_tenant_id_created_at_idx",
|
|
440
582
|
"columns": [
|
|
583
|
+
"tenant_id",
|
|
441
584
|
"created_at"
|
|
442
585
|
]
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"name": "attachments_message_id_idx",
|
|
589
|
+
"columns": [
|
|
590
|
+
"message_id"
|
|
591
|
+
]
|
|
443
592
|
}
|
|
444
593
|
],
|
|
445
|
-
"version": "
|
|
594
|
+
"version": "ee5ae0dd"
|
|
446
595
|
}
|
|
447
596
|
},
|
|
448
597
|
"@happyvertical/smrt-messages:BlacklistCollection": {
|
|
@@ -489,8 +638,8 @@
|
|
|
489
638
|
"exportName": "BlacklistCollection",
|
|
490
639
|
"collectionExportName": "BlacklistCollectionCollection",
|
|
491
640
|
"schema": {
|
|
492
|
-
"tableName": "
|
|
493
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
641
|
+
"tableName": "blacklists",
|
|
642
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"blacklists\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"pattern\" TEXT DEFAULT '',\n \"type\" TEXT DEFAULT 'email',\n \"reason\" TEXT DEFAULT '',\n \"auto_archive\" BOOLEAN DEFAULT TRUE,\n \"tenant_id\" UUID NOT NULL\n);",
|
|
494
643
|
"columns": {
|
|
495
644
|
"id": {
|
|
496
645
|
"type": "UUID",
|
|
@@ -516,25 +665,57 @@
|
|
|
516
665
|
"type": "TIMESTAMP",
|
|
517
666
|
"notNull": true,
|
|
518
667
|
"default": "current_timestamp"
|
|
668
|
+
},
|
|
669
|
+
"pattern": {
|
|
670
|
+
"type": "TEXT",
|
|
671
|
+
"notNull": false,
|
|
672
|
+
"unique": false,
|
|
673
|
+
"default": ""
|
|
674
|
+
},
|
|
675
|
+
"type": {
|
|
676
|
+
"type": "TEXT",
|
|
677
|
+
"notNull": false,
|
|
678
|
+
"unique": false,
|
|
679
|
+
"default": "email"
|
|
680
|
+
},
|
|
681
|
+
"reason": {
|
|
682
|
+
"type": "TEXT",
|
|
683
|
+
"notNull": false,
|
|
684
|
+
"unique": false,
|
|
685
|
+
"default": ""
|
|
686
|
+
},
|
|
687
|
+
"auto_archive": {
|
|
688
|
+
"type": "BOOLEAN",
|
|
689
|
+
"notNull": false,
|
|
690
|
+
"unique": false,
|
|
691
|
+
"default": true
|
|
692
|
+
},
|
|
693
|
+
"tenant_id": {
|
|
694
|
+
"type": "UUID",
|
|
695
|
+
"referenceKind": "tenantId",
|
|
696
|
+
"notNull": true,
|
|
697
|
+
"unique": false
|
|
519
698
|
}
|
|
520
699
|
},
|
|
521
700
|
"indexes": [
|
|
522
701
|
{
|
|
523
|
-
"name": "
|
|
702
|
+
"name": "blacklists_slug_context_idx",
|
|
524
703
|
"columns": [
|
|
704
|
+
"tenant_id",
|
|
525
705
|
"slug",
|
|
526
706
|
"context"
|
|
527
707
|
],
|
|
528
708
|
"unique": true
|
|
529
709
|
},
|
|
530
710
|
{
|
|
531
|
-
"name": "
|
|
711
|
+
"name": "blacklists_tenant_id_created_at_idx",
|
|
532
712
|
"columns": [
|
|
713
|
+
"tenant_id",
|
|
533
714
|
"created_at"
|
|
534
715
|
]
|
|
535
716
|
}
|
|
536
717
|
],
|
|
537
|
-
"version": "
|
|
718
|
+
"version": "04efaa8d"
|
|
538
719
|
}
|
|
539
720
|
},
|
|
540
721
|
"@happyvertical/smrt-messages:EmailAccountCollection": {
|
|
@@ -753,7 +934,7 @@
|
|
|
753
934
|
"collectionExportName": "EmailAccountCollectionCollection",
|
|
754
935
|
"schema": {
|
|
755
936
|
"tableName": "accounts",
|
|
756
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
937
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
|
|
757
938
|
"columns": {
|
|
758
939
|
"id": {
|
|
759
940
|
"type": "UUID",
|
|
@@ -770,6 +951,14 @@
|
|
|
770
951
|
"notNull": true,
|
|
771
952
|
"default": ""
|
|
772
953
|
},
|
|
954
|
+
"_meta_type": {
|
|
955
|
+
"type": "TEXT",
|
|
956
|
+
"notNull": true
|
|
957
|
+
},
|
|
958
|
+
"_meta_data": {
|
|
959
|
+
"type": "JSON",
|
|
960
|
+
"notNull": false
|
|
961
|
+
},
|
|
773
962
|
"created_at": {
|
|
774
963
|
"type": "TIMESTAMP",
|
|
775
964
|
"notNull": true,
|
|
@@ -779,59 +968,136 @@
|
|
|
779
968
|
"type": "TIMESTAMP",
|
|
780
969
|
"notNull": true,
|
|
781
970
|
"default": "current_timestamp"
|
|
782
|
-
}
|
|
783
|
-
},
|
|
784
|
-
"indexes": [
|
|
785
|
-
{
|
|
786
|
-
"name": "accounts_slug_context_idx",
|
|
787
|
-
"columns": [
|
|
788
|
-
"slug",
|
|
789
|
-
"context"
|
|
790
|
-
],
|
|
791
|
-
"unique": true
|
|
792
971
|
},
|
|
793
|
-
{
|
|
794
|
-
"
|
|
795
|
-
"
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
"
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
"
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
"
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
972
|
+
"tenant_id": {
|
|
973
|
+
"type": "UUID",
|
|
974
|
+
"referenceKind": "tenantId",
|
|
975
|
+
"notNull": false
|
|
976
|
+
},
|
|
977
|
+
"name": {
|
|
978
|
+
"type": "TEXT",
|
|
979
|
+
"notNull": false
|
|
980
|
+
},
|
|
981
|
+
"provider_type": {
|
|
982
|
+
"type": "TEXT",
|
|
983
|
+
"notNull": false
|
|
984
|
+
},
|
|
985
|
+
"channel_type": {
|
|
986
|
+
"type": "TEXT",
|
|
987
|
+
"notNull": false
|
|
988
|
+
},
|
|
989
|
+
"credential_secret_id": {
|
|
990
|
+
"type": "TEXT",
|
|
991
|
+
"notNull": false
|
|
992
|
+
},
|
|
993
|
+
"is_active": {
|
|
994
|
+
"type": "BOOLEAN",
|
|
995
|
+
"notNull": false,
|
|
996
|
+
"default": true
|
|
997
|
+
},
|
|
998
|
+
"last_sync_at": {
|
|
999
|
+
"type": "TIMESTAMP",
|
|
1000
|
+
"notNull": false
|
|
1001
|
+
},
|
|
1002
|
+
"settings": {
|
|
1003
|
+
"type": "TEXT",
|
|
1004
|
+
"notNull": false
|
|
1005
|
+
},
|
|
1006
|
+
"configuration": {
|
|
1007
|
+
"type": "TEXT",
|
|
1008
|
+
"notNull": false
|
|
1009
|
+
},
|
|
1010
|
+
"email": {
|
|
1011
|
+
"type": "TEXT",
|
|
1012
|
+
"notNull": false
|
|
1013
|
+
},
|
|
1014
|
+
"sync_interval_minutes": {
|
|
1015
|
+
"type": "INTEGER",
|
|
1016
|
+
"notNull": false,
|
|
1017
|
+
"default": 60
|
|
1018
|
+
},
|
|
1019
|
+
"workspace_id": {
|
|
1020
|
+
"type": "TEXT",
|
|
1021
|
+
"notNull": false
|
|
1022
|
+
},
|
|
1023
|
+
"workspace_name": {
|
|
1024
|
+
"type": "TEXT",
|
|
1025
|
+
"notNull": false
|
|
1026
|
+
},
|
|
1027
|
+
"bot_user_id": {
|
|
1028
|
+
"type": "TEXT",
|
|
1029
|
+
"notNull": false
|
|
1030
|
+
},
|
|
1031
|
+
"handle": {
|
|
1032
|
+
"type": "TEXT",
|
|
1033
|
+
"notNull": false
|
|
1034
|
+
},
|
|
1035
|
+
"twitter_user_id": {
|
|
1036
|
+
"type": "TEXT",
|
|
1037
|
+
"notNull": false
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
"indexes": [
|
|
1041
|
+
{
|
|
1042
|
+
"name": "accounts_slug_context_meta_type_idx",
|
|
1043
|
+
"columns": [
|
|
1044
|
+
"tenant_id",
|
|
1045
|
+
"slug",
|
|
1046
|
+
"context",
|
|
1047
|
+
"_meta_type"
|
|
1048
|
+
],
|
|
1049
|
+
"unique": true,
|
|
1050
|
+
"nullsNotDistinct": true
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"name": "accounts_meta_type_idx",
|
|
1054
|
+
"columns": [
|
|
1055
|
+
"_meta_type"
|
|
1056
|
+
]
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
"name": "accounts_tenant_id_created_at_idx",
|
|
1060
|
+
"columns": [
|
|
1061
|
+
"tenant_id",
|
|
1062
|
+
"created_at"
|
|
1063
|
+
]
|
|
1064
|
+
}
|
|
1065
|
+
],
|
|
1066
|
+
"version": "3854ea98"
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
1069
|
+
"@happyvertical/smrt-messages:EmailAttachmentCollection": {
|
|
1070
|
+
"name": "emailattachmentcollection",
|
|
1071
|
+
"className": "EmailAttachmentCollection",
|
|
1072
|
+
"qualifiedName": "@happyvertical/smrt-messages:EmailAttachmentCollection",
|
|
1073
|
+
"collection": "emailattachments",
|
|
1074
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/EmailAttachmentCollection.ts",
|
|
1075
|
+
"packageName": "@happyvertical/smrt-messages",
|
|
1076
|
+
"fields": {},
|
|
1077
|
+
"methods": {
|
|
1078
|
+
"getByMessage": {
|
|
1079
|
+
"name": "getByMessage",
|
|
1080
|
+
"async": true,
|
|
1081
|
+
"parameters": [
|
|
1082
|
+
{
|
|
1083
|
+
"name": "messageId",
|
|
1084
|
+
"type": "string",
|
|
1085
|
+
"optional": false
|
|
1086
|
+
}
|
|
1087
|
+
],
|
|
1088
|
+
"returnType": "Promise<Attachment[]>",
|
|
1089
|
+
"isStatic": false,
|
|
1090
|
+
"isPublic": true
|
|
1091
|
+
},
|
|
1092
|
+
"getByContentType": {
|
|
1093
|
+
"name": "getByContentType",
|
|
1094
|
+
"async": true,
|
|
1095
|
+
"parameters": [
|
|
1096
|
+
{
|
|
1097
|
+
"name": "contentType",
|
|
1098
|
+
"type": "string",
|
|
1099
|
+
"optional": false
|
|
1100
|
+
}
|
|
835
1101
|
],
|
|
836
1102
|
"returnType": "Promise<Attachment[]>",
|
|
837
1103
|
"isStatic": false,
|
|
@@ -1049,8 +1315,8 @@
|
|
|
1049
1315
|
"exportName": "EmailAttachmentCollection",
|
|
1050
1316
|
"collectionExportName": "EmailAttachmentCollectionCollection",
|
|
1051
1317
|
"schema": {
|
|
1052
|
-
"tableName": "
|
|
1053
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
1318
|
+
"tableName": "email_attachments",
|
|
1319
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"email_attachments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
1054
1320
|
"columns": {
|
|
1055
1321
|
"id": {
|
|
1056
1322
|
"type": "UUID",
|
|
@@ -1080,7 +1346,7 @@
|
|
|
1080
1346
|
},
|
|
1081
1347
|
"indexes": [
|
|
1082
1348
|
{
|
|
1083
|
-
"name": "
|
|
1349
|
+
"name": "email_attachments_slug_context_idx",
|
|
1084
1350
|
"columns": [
|
|
1085
1351
|
"slug",
|
|
1086
1352
|
"context"
|
|
@@ -1088,13 +1354,13 @@
|
|
|
1088
1354
|
"unique": true
|
|
1089
1355
|
},
|
|
1090
1356
|
{
|
|
1091
|
-
"name": "
|
|
1357
|
+
"name": "email_attachments_created_at_idx",
|
|
1092
1358
|
"columns": [
|
|
1093
1359
|
"created_at"
|
|
1094
1360
|
]
|
|
1095
1361
|
}
|
|
1096
1362
|
],
|
|
1097
|
-
"version": "
|
|
1363
|
+
"version": "70291c59"
|
|
1098
1364
|
}
|
|
1099
1365
|
},
|
|
1100
1366
|
"@happyvertical/smrt-messages:EmailCollection": {
|
|
@@ -1507,7 +1773,7 @@
|
|
|
1507
1773
|
"collectionExportName": "EmailCollectionCollection",
|
|
1508
1774
|
"schema": {
|
|
1509
1775
|
"tableName": "messages",
|
|
1510
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
1776
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
|
|
1511
1777
|
"columns": {
|
|
1512
1778
|
"id": {
|
|
1513
1779
|
"type": "UUID",
|
|
@@ -1524,6 +1790,14 @@
|
|
|
1524
1790
|
"notNull": true,
|
|
1525
1791
|
"default": ""
|
|
1526
1792
|
},
|
|
1793
|
+
"_meta_type": {
|
|
1794
|
+
"type": "TEXT",
|
|
1795
|
+
"notNull": true
|
|
1796
|
+
},
|
|
1797
|
+
"_meta_data": {
|
|
1798
|
+
"type": "JSON",
|
|
1799
|
+
"notNull": false
|
|
1800
|
+
},
|
|
1527
1801
|
"created_at": {
|
|
1528
1802
|
"type": "TIMESTAMP",
|
|
1529
1803
|
"notNull": true,
|
|
@@ -1533,480 +1807,455 @@
|
|
|
1533
1807
|
"type": "TIMESTAMP",
|
|
1534
1808
|
"notNull": true,
|
|
1535
1809
|
"default": "current_timestamp"
|
|
1536
|
-
}
|
|
1537
|
-
},
|
|
1538
|
-
"indexes": [
|
|
1539
|
-
{
|
|
1540
|
-
"name": "messages_slug_context_idx",
|
|
1541
|
-
"columns": [
|
|
1542
|
-
"slug",
|
|
1543
|
-
"context"
|
|
1544
|
-
],
|
|
1545
|
-
"unique": true
|
|
1546
1810
|
},
|
|
1547
|
-
{
|
|
1548
|
-
"
|
|
1549
|
-
"
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
"collection": "emailfolders",
|
|
1562
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/EmailFolderCollection.ts",
|
|
1563
|
-
"packageName": "@happyvertical/smrt-messages",
|
|
1564
|
-
"fields": {},
|
|
1565
|
-
"methods": {
|
|
1566
|
-
"getByPath": {
|
|
1567
|
-
"name": "getByPath",
|
|
1568
|
-
"async": true,
|
|
1569
|
-
"parameters": [
|
|
1570
|
-
{
|
|
1571
|
-
"name": "accountId",
|
|
1572
|
-
"type": "string",
|
|
1573
|
-
"optional": false
|
|
1574
|
-
},
|
|
1575
|
-
{
|
|
1576
|
-
"name": "path",
|
|
1577
|
-
"type": "string",
|
|
1578
|
-
"optional": false
|
|
1579
|
-
}
|
|
1580
|
-
],
|
|
1581
|
-
"returnType": "Promise<EmailFolder | null>",
|
|
1582
|
-
"isStatic": false,
|
|
1583
|
-
"isPublic": true
|
|
1584
|
-
},
|
|
1585
|
-
"getByAccount": {
|
|
1586
|
-
"name": "getByAccount",
|
|
1587
|
-
"async": true,
|
|
1588
|
-
"parameters": [
|
|
1589
|
-
{
|
|
1590
|
-
"name": "accountId",
|
|
1591
|
-
"type": "string",
|
|
1592
|
-
"optional": false
|
|
1593
|
-
}
|
|
1594
|
-
],
|
|
1595
|
-
"returnType": "Promise<EmailFolder[]>",
|
|
1596
|
-
"isStatic": false,
|
|
1597
|
-
"isPublic": true
|
|
1598
|
-
},
|
|
1599
|
-
"getInbox": {
|
|
1600
|
-
"name": "getInbox",
|
|
1601
|
-
"async": true,
|
|
1602
|
-
"parameters": [
|
|
1603
|
-
{
|
|
1604
|
-
"name": "accountId",
|
|
1605
|
-
"type": "string",
|
|
1606
|
-
"optional": false
|
|
1811
|
+
"tenant_id": {
|
|
1812
|
+
"type": "UUID",
|
|
1813
|
+
"referenceKind": "tenantId",
|
|
1814
|
+
"notNull": false
|
|
1815
|
+
},
|
|
1816
|
+
"account_id": {
|
|
1817
|
+
"type": "UUID",
|
|
1818
|
+
"referenceKind": "foreignKey",
|
|
1819
|
+
"notNull": false,
|
|
1820
|
+
"foreignKey": {
|
|
1821
|
+
"table": "accounts",
|
|
1822
|
+
"column": "id",
|
|
1823
|
+
"onDelete": "NO ACTION",
|
|
1824
|
+
"onUpdate": "CASCADE"
|
|
1607
1825
|
}
|
|
1608
|
-
|
|
1609
|
-
"
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
"
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
"
|
|
1620
|
-
"
|
|
1826
|
+
},
|
|
1827
|
+
"persona_id": {
|
|
1828
|
+
"type": "UUID",
|
|
1829
|
+
"referenceKind": "crossPackageRef",
|
|
1830
|
+
"notNull": false
|
|
1831
|
+
},
|
|
1832
|
+
"endpoint_id": {
|
|
1833
|
+
"type": "UUID",
|
|
1834
|
+
"referenceKind": "foreignKey",
|
|
1835
|
+
"notNull": false,
|
|
1836
|
+
"foreignKey": {
|
|
1837
|
+
"table": "messaging_endpoints",
|
|
1838
|
+
"column": "id",
|
|
1839
|
+
"onDelete": "NO ACTION",
|
|
1840
|
+
"onUpdate": "CASCADE"
|
|
1621
1841
|
}
|
|
1622
|
-
],
|
|
1623
|
-
"returnType": "Promise<EmailFolder | null>",
|
|
1624
|
-
"isStatic": false,
|
|
1625
|
-
"isPublic": true
|
|
1626
|
-
},
|
|
1627
|
-
"getDrafts": {
|
|
1628
|
-
"name": "getDrafts",
|
|
1629
|
-
"async": true,
|
|
1630
|
-
"parameters": [
|
|
1631
|
-
{
|
|
1632
|
-
"name": "accountId",
|
|
1633
|
-
"type": "string",
|
|
1634
|
-
"optional": false
|
|
1635
|
-
}
|
|
1636
|
-
],
|
|
1637
|
-
"returnType": "Promise<EmailFolder | null>",
|
|
1638
|
-
"isStatic": false,
|
|
1639
|
-
"isPublic": true
|
|
1640
|
-
},
|
|
1641
|
-
"getTrash": {
|
|
1642
|
-
"name": "getTrash",
|
|
1643
|
-
"async": true,
|
|
1644
|
-
"parameters": [
|
|
1645
|
-
{
|
|
1646
|
-
"name": "accountId",
|
|
1647
|
-
"type": "string",
|
|
1648
|
-
"optional": false
|
|
1649
|
-
}
|
|
1650
|
-
],
|
|
1651
|
-
"returnType": "Promise<EmailFolder | null>",
|
|
1652
|
-
"isStatic": false,
|
|
1653
|
-
"isPublic": true
|
|
1654
|
-
},
|
|
1655
|
-
"getSpam": {
|
|
1656
|
-
"name": "getSpam",
|
|
1657
|
-
"async": true,
|
|
1658
|
-
"parameters": [
|
|
1659
|
-
{
|
|
1660
|
-
"name": "accountId",
|
|
1661
|
-
"type": "string",
|
|
1662
|
-
"optional": false
|
|
1663
|
-
}
|
|
1664
|
-
],
|
|
1665
|
-
"returnType": "Promise<EmailFolder | null>",
|
|
1666
|
-
"isStatic": false,
|
|
1667
|
-
"isPublic": true
|
|
1668
|
-
},
|
|
1669
|
-
"getSystemFolders": {
|
|
1670
|
-
"name": "getSystemFolders",
|
|
1671
|
-
"async": true,
|
|
1672
|
-
"parameters": [
|
|
1673
|
-
{
|
|
1674
|
-
"name": "accountId",
|
|
1675
|
-
"type": "string",
|
|
1676
|
-
"optional": false
|
|
1677
|
-
}
|
|
1678
|
-
],
|
|
1679
|
-
"returnType": "Promise<EmailFolder[]>",
|
|
1680
|
-
"isStatic": false,
|
|
1681
|
-
"isPublic": true
|
|
1682
|
-
},
|
|
1683
|
-
"getUserFolders": {
|
|
1684
|
-
"name": "getUserFolders",
|
|
1685
|
-
"async": true,
|
|
1686
|
-
"parameters": [
|
|
1687
|
-
{
|
|
1688
|
-
"name": "accountId",
|
|
1689
|
-
"type": "string",
|
|
1690
|
-
"optional": false
|
|
1691
|
-
}
|
|
1692
|
-
],
|
|
1693
|
-
"returnType": "Promise<EmailFolder[]>",
|
|
1694
|
-
"isStatic": false,
|
|
1695
|
-
"isPublic": true
|
|
1696
|
-
},
|
|
1697
|
-
"getSubscribed": {
|
|
1698
|
-
"name": "getSubscribed",
|
|
1699
|
-
"async": true,
|
|
1700
|
-
"parameters": [
|
|
1701
|
-
{
|
|
1702
|
-
"name": "accountId",
|
|
1703
|
-
"type": "string",
|
|
1704
|
-
"optional": true
|
|
1705
|
-
}
|
|
1706
|
-
],
|
|
1707
|
-
"returnType": "Promise<EmailFolder[]>",
|
|
1708
|
-
"isStatic": false,
|
|
1709
|
-
"isPublic": true
|
|
1710
|
-
},
|
|
1711
|
-
"getWithUnread": {
|
|
1712
|
-
"name": "getWithUnread",
|
|
1713
|
-
"async": true,
|
|
1714
|
-
"parameters": [
|
|
1715
|
-
{
|
|
1716
|
-
"name": "accountId",
|
|
1717
|
-
"type": "string",
|
|
1718
|
-
"optional": true
|
|
1719
|
-
}
|
|
1720
|
-
],
|
|
1721
|
-
"returnType": "Promise<EmailFolder[]>",
|
|
1722
|
-
"isStatic": false,
|
|
1723
|
-
"isPublic": true
|
|
1724
|
-
},
|
|
1725
|
-
"search": {
|
|
1726
|
-
"name": "search",
|
|
1727
|
-
"async": true,
|
|
1728
|
-
"parameters": [
|
|
1729
|
-
{
|
|
1730
|
-
"name": "query",
|
|
1731
|
-
"type": "string",
|
|
1732
|
-
"optional": false
|
|
1733
|
-
},
|
|
1734
|
-
{
|
|
1735
|
-
"name": "filters",
|
|
1736
|
-
"type": "EmailFolderSearchFilters",
|
|
1737
|
-
"optional": true
|
|
1738
|
-
}
|
|
1739
|
-
],
|
|
1740
|
-
"returnType": "Promise<EmailFolder[]>",
|
|
1741
|
-
"isStatic": false,
|
|
1742
|
-
"isPublic": true
|
|
1743
|
-
},
|
|
1744
|
-
"refreshAllCounts": {
|
|
1745
|
-
"name": "refreshAllCounts",
|
|
1746
|
-
"async": true,
|
|
1747
|
-
"parameters": [
|
|
1748
|
-
{
|
|
1749
|
-
"name": "accountId",
|
|
1750
|
-
"type": "string",
|
|
1751
|
-
"optional": false
|
|
1752
|
-
}
|
|
1753
|
-
],
|
|
1754
|
-
"returnType": "Promise<void>",
|
|
1755
|
-
"isStatic": false,
|
|
1756
|
-
"isPublic": true
|
|
1757
|
-
},
|
|
1758
|
-
"getAccountStats": {
|
|
1759
|
-
"name": "getAccountStats",
|
|
1760
|
-
"async": true,
|
|
1761
|
-
"parameters": [
|
|
1762
|
-
{
|
|
1763
|
-
"name": "accountId",
|
|
1764
|
-
"type": "string",
|
|
1765
|
-
"optional": false
|
|
1766
|
-
}
|
|
1767
|
-
],
|
|
1768
|
-
"returnType": "Promise<object>",
|
|
1769
|
-
"isStatic": false,
|
|
1770
|
-
"isPublic": true
|
|
1771
|
-
},
|
|
1772
|
-
"createSystemFolders": {
|
|
1773
|
-
"name": "createSystemFolders",
|
|
1774
|
-
"async": true,
|
|
1775
|
-
"parameters": [
|
|
1776
|
-
{
|
|
1777
|
-
"name": "accountId",
|
|
1778
|
-
"type": "string",
|
|
1779
|
-
"optional": false
|
|
1780
|
-
}
|
|
1781
|
-
],
|
|
1782
|
-
"returnType": "Promise<void>",
|
|
1783
|
-
"isStatic": false,
|
|
1784
|
-
"isPublic": true
|
|
1785
|
-
},
|
|
1786
|
-
"findByTenant": {
|
|
1787
|
-
"name": "findByTenant",
|
|
1788
|
-
"async": true,
|
|
1789
|
-
"parameters": [
|
|
1790
|
-
{
|
|
1791
|
-
"name": "tenantId",
|
|
1792
|
-
"type": "string",
|
|
1793
|
-
"optional": false
|
|
1794
|
-
}
|
|
1795
|
-
],
|
|
1796
|
-
"returnType": "Promise<EmailFolder[]>",
|
|
1797
|
-
"isStatic": false,
|
|
1798
|
-
"isPublic": true
|
|
1799
|
-
},
|
|
1800
|
-
"findGlobal": {
|
|
1801
|
-
"name": "findGlobal",
|
|
1802
|
-
"async": true,
|
|
1803
|
-
"parameters": [],
|
|
1804
|
-
"returnType": "Promise<EmailFolder[]>",
|
|
1805
|
-
"isStatic": false,
|
|
1806
|
-
"isPublic": true
|
|
1807
|
-
},
|
|
1808
|
-
"findWithGlobals": {
|
|
1809
|
-
"name": "findWithGlobals",
|
|
1810
|
-
"async": true,
|
|
1811
|
-
"parameters": [
|
|
1812
|
-
{
|
|
1813
|
-
"name": "tenantId",
|
|
1814
|
-
"type": "string",
|
|
1815
|
-
"optional": false
|
|
1816
|
-
}
|
|
1817
|
-
],
|
|
1818
|
-
"returnType": "Promise<EmailFolder[]>",
|
|
1819
|
-
"isStatic": false,
|
|
1820
|
-
"isPublic": true
|
|
1821
|
-
}
|
|
1822
|
-
},
|
|
1823
|
-
"decoratorConfig": {},
|
|
1824
|
-
"extends": "SmrtCollection",
|
|
1825
|
-
"extendsTypeArg": "EmailFolder",
|
|
1826
|
-
"exportName": "EmailFolderCollection",
|
|
1827
|
-
"collectionExportName": "EmailFolderCollectionCollection",
|
|
1828
|
-
"schema": {
|
|
1829
|
-
"tableName": "email_folder_collections",
|
|
1830
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"email_folder_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
1831
|
-
"columns": {
|
|
1832
|
-
"id": {
|
|
1833
|
-
"type": "UUID",
|
|
1834
|
-
"primaryKey": true,
|
|
1835
|
-
"referenceKind": "id",
|
|
1836
|
-
"notNull": true
|
|
1837
1842
|
},
|
|
1838
|
-
"
|
|
1843
|
+
"correlation_id": {
|
|
1839
1844
|
"type": "TEXT",
|
|
1840
|
-
"notNull":
|
|
1845
|
+
"notNull": false
|
|
1841
1846
|
},
|
|
1842
|
-
"
|
|
1847
|
+
"thread_id": {
|
|
1843
1848
|
"type": "TEXT",
|
|
1844
|
-
"notNull":
|
|
1845
|
-
"default": ""
|
|
1849
|
+
"notNull": false
|
|
1846
1850
|
},
|
|
1847
|
-
"
|
|
1848
|
-
"type": "
|
|
1849
|
-
"notNull":
|
|
1850
|
-
"default": "current_timestamp"
|
|
1851
|
+
"subject": {
|
|
1852
|
+
"type": "TEXT",
|
|
1853
|
+
"notNull": false
|
|
1851
1854
|
},
|
|
1852
|
-
"
|
|
1855
|
+
"body": {
|
|
1856
|
+
"type": "TEXT",
|
|
1857
|
+
"notNull": false
|
|
1858
|
+
},
|
|
1859
|
+
"from_address": {
|
|
1860
|
+
"type": "TEXT",
|
|
1861
|
+
"notNull": false
|
|
1862
|
+
},
|
|
1863
|
+
"from_name": {
|
|
1864
|
+
"type": "TEXT",
|
|
1865
|
+
"notNull": false
|
|
1866
|
+
},
|
|
1867
|
+
"to_addresses": {
|
|
1868
|
+
"type": "TEXT",
|
|
1869
|
+
"notNull": false
|
|
1870
|
+
},
|
|
1871
|
+
"date": {
|
|
1853
1872
|
"type": "TIMESTAMP",
|
|
1854
|
-
"notNull":
|
|
1855
|
-
"default": "current_timestamp"
|
|
1856
|
-
}
|
|
1857
|
-
},
|
|
1858
|
-
"indexes": [
|
|
1859
|
-
{
|
|
1860
|
-
"name": "email_folder_collections_slug_context_idx",
|
|
1861
|
-
"columns": [
|
|
1862
|
-
"slug",
|
|
1863
|
-
"context"
|
|
1864
|
-
],
|
|
1865
|
-
"unique": true
|
|
1873
|
+
"notNull": false
|
|
1866
1874
|
},
|
|
1867
|
-
{
|
|
1868
|
-
"
|
|
1869
|
-
"
|
|
1870
|
-
|
|
1875
|
+
"is_read": {
|
|
1876
|
+
"type": "BOOLEAN",
|
|
1877
|
+
"notNull": false,
|
|
1878
|
+
"default": false
|
|
1879
|
+
},
|
|
1880
|
+
"is_flagged": {
|
|
1881
|
+
"type": "BOOLEAN",
|
|
1882
|
+
"notNull": false,
|
|
1883
|
+
"default": false
|
|
1884
|
+
},
|
|
1885
|
+
"has_attachments": {
|
|
1886
|
+
"type": "BOOLEAN",
|
|
1887
|
+
"notNull": false,
|
|
1888
|
+
"default": false
|
|
1889
|
+
},
|
|
1890
|
+
"size": {
|
|
1891
|
+
"type": "INTEGER",
|
|
1892
|
+
"notNull": false,
|
|
1893
|
+
"default": 0
|
|
1894
|
+
},
|
|
1895
|
+
"metadata": {
|
|
1896
|
+
"type": "TEXT",
|
|
1897
|
+
"notNull": false
|
|
1898
|
+
},
|
|
1899
|
+
"send_status": {
|
|
1900
|
+
"type": "TEXT",
|
|
1901
|
+
"notNull": false,
|
|
1902
|
+
"default": "draft"
|
|
1903
|
+
},
|
|
1904
|
+
"sent_at": {
|
|
1905
|
+
"type": "TIMESTAMP",
|
|
1906
|
+
"notNull": false
|
|
1907
|
+
},
|
|
1908
|
+
"send_error": {
|
|
1909
|
+
"type": "TEXT",
|
|
1910
|
+
"notNull": false
|
|
1911
|
+
},
|
|
1912
|
+
"retry_count": {
|
|
1913
|
+
"type": "INTEGER",
|
|
1914
|
+
"notNull": false,
|
|
1915
|
+
"default": 0
|
|
1916
|
+
},
|
|
1917
|
+
"max_retries": {
|
|
1918
|
+
"type": "INTEGER",
|
|
1919
|
+
"notNull": false,
|
|
1920
|
+
"default": 3
|
|
1921
|
+
},
|
|
1922
|
+
"scheduled_send_at": {
|
|
1923
|
+
"type": "TIMESTAMP",
|
|
1924
|
+
"notNull": false
|
|
1925
|
+
},
|
|
1926
|
+
"in_reply_to_message_id": {
|
|
1927
|
+
"type": "UUID",
|
|
1928
|
+
"referenceKind": "foreignKey",
|
|
1929
|
+
"notNull": false,
|
|
1930
|
+
"foreignKey": {
|
|
1931
|
+
"table": "messages",
|
|
1932
|
+
"column": "id",
|
|
1933
|
+
"onDelete": "NO ACTION",
|
|
1934
|
+
"onUpdate": "CASCADE"
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
"message_id": {
|
|
1938
|
+
"type": "TEXT",
|
|
1939
|
+
"notNull": false
|
|
1940
|
+
},
|
|
1941
|
+
"in_reply_to": {
|
|
1942
|
+
"type": "TEXT",
|
|
1943
|
+
"notNull": false
|
|
1944
|
+
},
|
|
1945
|
+
"cc_addresses": {
|
|
1946
|
+
"type": "TEXT",
|
|
1947
|
+
"notNull": false
|
|
1948
|
+
},
|
|
1949
|
+
"bcc_addresses": {
|
|
1950
|
+
"type": "TEXT",
|
|
1951
|
+
"notNull": false
|
|
1952
|
+
},
|
|
1953
|
+
"reply_to_address": {
|
|
1954
|
+
"type": "TEXT",
|
|
1955
|
+
"notNull": false
|
|
1956
|
+
},
|
|
1957
|
+
"reply_to_name": {
|
|
1958
|
+
"type": "TEXT",
|
|
1959
|
+
"notNull": false
|
|
1960
|
+
},
|
|
1961
|
+
"text_body": {
|
|
1962
|
+
"type": "TEXT",
|
|
1963
|
+
"notNull": false
|
|
1964
|
+
},
|
|
1965
|
+
"html_body": {
|
|
1966
|
+
"type": "TEXT",
|
|
1967
|
+
"notNull": false
|
|
1968
|
+
},
|
|
1969
|
+
"folder_id": {
|
|
1970
|
+
"type": "TEXT",
|
|
1971
|
+
"notNull": false
|
|
1972
|
+
},
|
|
1973
|
+
"folder_path": {
|
|
1974
|
+
"type": "TEXT",
|
|
1975
|
+
"notNull": false
|
|
1976
|
+
},
|
|
1977
|
+
"labels": {
|
|
1978
|
+
"type": "TEXT",
|
|
1979
|
+
"notNull": false
|
|
1980
|
+
},
|
|
1981
|
+
"flags": {
|
|
1982
|
+
"type": "TEXT",
|
|
1983
|
+
"notNull": false
|
|
1984
|
+
},
|
|
1985
|
+
"is_answered": {
|
|
1986
|
+
"type": "BOOLEAN",
|
|
1987
|
+
"notNull": false,
|
|
1988
|
+
"default": false
|
|
1989
|
+
},
|
|
1990
|
+
"is_draft": {
|
|
1991
|
+
"type": "BOOLEAN",
|
|
1992
|
+
"notNull": false,
|
|
1993
|
+
"default": false
|
|
1994
|
+
},
|
|
1995
|
+
"raw_message": {
|
|
1996
|
+
"type": "TEXT",
|
|
1997
|
+
"notNull": false
|
|
1998
|
+
},
|
|
1999
|
+
"headers": {
|
|
2000
|
+
"type": "TEXT",
|
|
2001
|
+
"notNull": false
|
|
2002
|
+
},
|
|
2003
|
+
"channel_id": {
|
|
2004
|
+
"type": "TEXT",
|
|
2005
|
+
"notNull": false
|
|
2006
|
+
},
|
|
2007
|
+
"channel_name": {
|
|
2008
|
+
"type": "TEXT",
|
|
2009
|
+
"notNull": false
|
|
2010
|
+
},
|
|
2011
|
+
"slack_ts": {
|
|
2012
|
+
"type": "TEXT",
|
|
2013
|
+
"notNull": false
|
|
2014
|
+
},
|
|
2015
|
+
"slack_thread_ts": {
|
|
2016
|
+
"type": "TEXT",
|
|
2017
|
+
"notNull": false
|
|
2018
|
+
},
|
|
2019
|
+
"reactions": {
|
|
2020
|
+
"type": "TEXT",
|
|
2021
|
+
"notNull": false
|
|
2022
|
+
},
|
|
2023
|
+
"is_edited": {
|
|
2024
|
+
"type": "BOOLEAN",
|
|
2025
|
+
"notNull": false,
|
|
2026
|
+
"default": false
|
|
2027
|
+
},
|
|
2028
|
+
"message_type": {
|
|
2029
|
+
"type": "TEXT",
|
|
2030
|
+
"notNull": false
|
|
2031
|
+
},
|
|
2032
|
+
"blocks": {
|
|
2033
|
+
"type": "TEXT",
|
|
2034
|
+
"notNull": false
|
|
2035
|
+
},
|
|
2036
|
+
"tweet_id": {
|
|
2037
|
+
"type": "TEXT",
|
|
2038
|
+
"notNull": false
|
|
2039
|
+
},
|
|
2040
|
+
"retweet_count": {
|
|
2041
|
+
"type": "INTEGER",
|
|
2042
|
+
"notNull": false,
|
|
2043
|
+
"default": 0
|
|
2044
|
+
},
|
|
2045
|
+
"like_count": {
|
|
2046
|
+
"type": "INTEGER",
|
|
2047
|
+
"notNull": false,
|
|
2048
|
+
"default": 0
|
|
2049
|
+
},
|
|
2050
|
+
"reply_count": {
|
|
2051
|
+
"type": "INTEGER",
|
|
2052
|
+
"notNull": false,
|
|
2053
|
+
"default": 0
|
|
2054
|
+
},
|
|
2055
|
+
"is_retweet": {
|
|
2056
|
+
"type": "BOOLEAN",
|
|
2057
|
+
"notNull": false,
|
|
2058
|
+
"default": false
|
|
2059
|
+
},
|
|
2060
|
+
"is_reply": {
|
|
2061
|
+
"type": "BOOLEAN",
|
|
2062
|
+
"notNull": false,
|
|
2063
|
+
"default": false
|
|
2064
|
+
},
|
|
2065
|
+
"media_urls": {
|
|
2066
|
+
"type": "TEXT",
|
|
2067
|
+
"notNull": false
|
|
2068
|
+
},
|
|
2069
|
+
"hashtags": {
|
|
2070
|
+
"type": "TEXT",
|
|
2071
|
+
"notNull": false
|
|
2072
|
+
},
|
|
2073
|
+
"mentions": {
|
|
2074
|
+
"type": "TEXT",
|
|
2075
|
+
"notNull": false
|
|
2076
|
+
}
|
|
2077
|
+
},
|
|
2078
|
+
"indexes": [
|
|
2079
|
+
{
|
|
2080
|
+
"name": "messages_slug_context_meta_type_idx",
|
|
2081
|
+
"columns": [
|
|
2082
|
+
"tenant_id",
|
|
2083
|
+
"slug",
|
|
2084
|
+
"context",
|
|
2085
|
+
"_meta_type"
|
|
2086
|
+
],
|
|
2087
|
+
"unique": true,
|
|
2088
|
+
"nullsNotDistinct": true
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
"name": "messages_meta_type_idx",
|
|
2092
|
+
"columns": [
|
|
2093
|
+
"_meta_type"
|
|
2094
|
+
]
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
"name": "messages_tenant_id_created_at_idx",
|
|
2098
|
+
"columns": [
|
|
2099
|
+
"tenant_id",
|
|
2100
|
+
"created_at"
|
|
2101
|
+
]
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
"name": "messages_account_id_idx",
|
|
2105
|
+
"columns": [
|
|
2106
|
+
"account_id"
|
|
2107
|
+
]
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
"name": "messages_persona_id_idx",
|
|
2111
|
+
"columns": [
|
|
2112
|
+
"persona_id"
|
|
2113
|
+
]
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
"name": "messages_endpoint_id_idx",
|
|
2117
|
+
"columns": [
|
|
2118
|
+
"endpoint_id"
|
|
2119
|
+
]
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
"name": "messages_in_reply_to_message_id_idx",
|
|
2123
|
+
"columns": [
|
|
2124
|
+
"in_reply_to_message_id"
|
|
1871
2125
|
]
|
|
1872
2126
|
}
|
|
1873
2127
|
],
|
|
1874
|
-
"version": "
|
|
2128
|
+
"version": "6ff29dd9"
|
|
1875
2129
|
}
|
|
1876
2130
|
},
|
|
1877
|
-
"@happyvertical/smrt-messages:
|
|
1878
|
-
"name": "
|
|
1879
|
-
"className": "
|
|
1880
|
-
"qualifiedName": "@happyvertical/smrt-messages:
|
|
1881
|
-
"collection": "
|
|
1882
|
-
"filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/
|
|
1883
|
-
"packageName": "@happyvertical/smrt-messages",
|
|
2131
|
+
"@happyvertical/smrt-messages:EmailFolderCollection": {
|
|
2132
|
+
"name": "emailfoldercollection",
|
|
2133
|
+
"className": "EmailFolderCollection",
|
|
2134
|
+
"qualifiedName": "@happyvertical/smrt-messages:EmailFolderCollection",
|
|
2135
|
+
"collection": "emailfolders",
|
|
2136
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/EmailFolderCollection.ts",
|
|
2137
|
+
"packageName": "@happyvertical/smrt-messages",
|
|
1884
2138
|
"fields": {},
|
|
1885
2139
|
"methods": {
|
|
1886
|
-
"
|
|
1887
|
-
"name": "
|
|
2140
|
+
"getByPath": {
|
|
2141
|
+
"name": "getByPath",
|
|
1888
2142
|
"async": true,
|
|
1889
2143
|
"parameters": [
|
|
1890
2144
|
{
|
|
1891
|
-
"name": "
|
|
2145
|
+
"name": "accountId",
|
|
1892
2146
|
"type": "string",
|
|
1893
2147
|
"optional": false
|
|
1894
2148
|
},
|
|
1895
2149
|
{
|
|
1896
|
-
"name": "
|
|
1897
|
-
"type": "
|
|
1898
|
-
"optional":
|
|
2150
|
+
"name": "path",
|
|
2151
|
+
"type": "string",
|
|
2152
|
+
"optional": false
|
|
1899
2153
|
}
|
|
1900
2154
|
],
|
|
1901
|
-
"returnType": "Promise<
|
|
2155
|
+
"returnType": "Promise<EmailFolder | null>",
|
|
1902
2156
|
"isStatic": false,
|
|
1903
2157
|
"isPublic": true
|
|
1904
2158
|
},
|
|
1905
|
-
"
|
|
1906
|
-
"name": "
|
|
2159
|
+
"getByAccount": {
|
|
2160
|
+
"name": "getByAccount",
|
|
1907
2161
|
"async": true,
|
|
1908
2162
|
"parameters": [
|
|
1909
2163
|
{
|
|
1910
|
-
"name": "
|
|
1911
|
-
"type": "string
|
|
2164
|
+
"name": "accountId",
|
|
2165
|
+
"type": "string",
|
|
1912
2166
|
"optional": false
|
|
1913
2167
|
}
|
|
1914
2168
|
],
|
|
1915
|
-
"returnType": "Promise<
|
|
2169
|
+
"returnType": "Promise<EmailFolder[]>",
|
|
1916
2170
|
"isStatic": false,
|
|
1917
2171
|
"isPublic": true
|
|
1918
2172
|
},
|
|
1919
|
-
"
|
|
1920
|
-
"name": "
|
|
2173
|
+
"getInbox": {
|
|
2174
|
+
"name": "getInbox",
|
|
1921
2175
|
"async": true,
|
|
1922
2176
|
"parameters": [
|
|
1923
2177
|
{
|
|
1924
|
-
"name": "
|
|
2178
|
+
"name": "accountId",
|
|
1925
2179
|
"type": "string",
|
|
1926
2180
|
"optional": false
|
|
1927
2181
|
}
|
|
1928
2182
|
],
|
|
1929
|
-
"returnType": "Promise<
|
|
2183
|
+
"returnType": "Promise<EmailFolder | null>",
|
|
1930
2184
|
"isStatic": false,
|
|
1931
2185
|
"isPublic": true
|
|
1932
2186
|
},
|
|
1933
|
-
"
|
|
1934
|
-
"name": "
|
|
2187
|
+
"getSent": {
|
|
2188
|
+
"name": "getSent",
|
|
1935
2189
|
"async": true,
|
|
1936
2190
|
"parameters": [
|
|
1937
2191
|
{
|
|
1938
2192
|
"name": "accountId",
|
|
1939
2193
|
"type": "string",
|
|
1940
|
-
"optional":
|
|
2194
|
+
"optional": false
|
|
1941
2195
|
}
|
|
1942
2196
|
],
|
|
1943
|
-
"returnType": "Promise<
|
|
2197
|
+
"returnType": "Promise<EmailFolder | null>",
|
|
1944
2198
|
"isStatic": false,
|
|
1945
2199
|
"isPublic": true
|
|
1946
2200
|
},
|
|
1947
|
-
"
|
|
1948
|
-
"name": "
|
|
2201
|
+
"getDrafts": {
|
|
2202
|
+
"name": "getDrafts",
|
|
1949
2203
|
"async": true,
|
|
1950
2204
|
"parameters": [
|
|
1951
2205
|
{
|
|
1952
2206
|
"name": "accountId",
|
|
1953
2207
|
"type": "string",
|
|
1954
|
-
"optional":
|
|
2208
|
+
"optional": false
|
|
1955
2209
|
}
|
|
1956
2210
|
],
|
|
1957
|
-
"returnType": "Promise<
|
|
2211
|
+
"returnType": "Promise<EmailFolder | null>",
|
|
1958
2212
|
"isStatic": false,
|
|
1959
2213
|
"isPublic": true
|
|
1960
2214
|
},
|
|
1961
|
-
"
|
|
1962
|
-
"name": "
|
|
2215
|
+
"getTrash": {
|
|
2216
|
+
"name": "getTrash",
|
|
1963
2217
|
"async": true,
|
|
1964
2218
|
"parameters": [
|
|
1965
|
-
{
|
|
1966
|
-
"name": "limit",
|
|
1967
|
-
"type": "any",
|
|
1968
|
-
"optional": true
|
|
1969
|
-
},
|
|
1970
2219
|
{
|
|
1971
2220
|
"name": "accountId",
|
|
1972
2221
|
"type": "string",
|
|
1973
|
-
"optional":
|
|
2222
|
+
"optional": false
|
|
1974
2223
|
}
|
|
1975
2224
|
],
|
|
1976
|
-
"returnType": "Promise<
|
|
2225
|
+
"returnType": "Promise<EmailFolder | null>",
|
|
1977
2226
|
"isStatic": false,
|
|
1978
2227
|
"isPublic": true
|
|
1979
2228
|
},
|
|
1980
|
-
"
|
|
1981
|
-
"name": "
|
|
2229
|
+
"getSpam": {
|
|
2230
|
+
"name": "getSpam",
|
|
1982
2231
|
"async": true,
|
|
1983
2232
|
"parameters": [
|
|
1984
2233
|
{
|
|
1985
|
-
"name": "
|
|
2234
|
+
"name": "accountId",
|
|
1986
2235
|
"type": "string",
|
|
1987
2236
|
"optional": false
|
|
1988
2237
|
}
|
|
1989
2238
|
],
|
|
1990
|
-
"returnType": "Promise<
|
|
2239
|
+
"returnType": "Promise<EmailFolder | null>",
|
|
1991
2240
|
"isStatic": false,
|
|
1992
2241
|
"isPublic": true
|
|
1993
2242
|
},
|
|
1994
|
-
"
|
|
1995
|
-
"name": "
|
|
2243
|
+
"getSystemFolders": {
|
|
2244
|
+
"name": "getSystemFolders",
|
|
1996
2245
|
"async": true,
|
|
1997
2246
|
"parameters": [
|
|
1998
2247
|
{
|
|
1999
|
-
"name": "
|
|
2000
|
-
"type": "string
|
|
2248
|
+
"name": "accountId",
|
|
2249
|
+
"type": "string",
|
|
2001
2250
|
"optional": false
|
|
2002
2251
|
}
|
|
2003
2252
|
],
|
|
2004
|
-
"returnType": "Promise<
|
|
2253
|
+
"returnType": "Promise<EmailFolder[]>",
|
|
2005
2254
|
"isStatic": false,
|
|
2006
2255
|
"isPublic": true
|
|
2007
2256
|
},
|
|
2008
|
-
"
|
|
2009
|
-
"name": "
|
|
2257
|
+
"getUserFolders": {
|
|
2258
|
+
"name": "getUserFolders",
|
|
2010
2259
|
"async": true,
|
|
2011
2260
|
"parameters": [
|
|
2012
2261
|
{
|
|
@@ -2015,12 +2264,12 @@
|
|
|
2015
2264
|
"optional": false
|
|
2016
2265
|
}
|
|
2017
2266
|
],
|
|
2018
|
-
"returnType": "Promise<
|
|
2267
|
+
"returnType": "Promise<EmailFolder[]>",
|
|
2019
2268
|
"isStatic": false,
|
|
2020
2269
|
"isPublic": true
|
|
2021
2270
|
},
|
|
2022
|
-
"
|
|
2023
|
-
"name": "
|
|
2271
|
+
"getSubscribed": {
|
|
2272
|
+
"name": "getSubscribed",
|
|
2024
2273
|
"async": true,
|
|
2025
2274
|
"parameters": [
|
|
2026
2275
|
{
|
|
@@ -2029,12 +2278,12 @@
|
|
|
2029
2278
|
"optional": true
|
|
2030
2279
|
}
|
|
2031
2280
|
],
|
|
2032
|
-
"returnType": "Promise<
|
|
2281
|
+
"returnType": "Promise<EmailFolder[]>",
|
|
2033
2282
|
"isStatic": false,
|
|
2034
2283
|
"isPublic": true
|
|
2035
2284
|
},
|
|
2036
|
-
"
|
|
2037
|
-
"name": "
|
|
2285
|
+
"getWithUnread": {
|
|
2286
|
+
"name": "getWithUnread",
|
|
2038
2287
|
"async": true,
|
|
2039
2288
|
"parameters": [
|
|
2040
2289
|
{
|
|
@@ -2043,49 +2292,68 @@
|
|
|
2043
2292
|
"optional": true
|
|
2044
2293
|
}
|
|
2045
2294
|
],
|
|
2046
|
-
"returnType": "Promise<
|
|
2295
|
+
"returnType": "Promise<EmailFolder[]>",
|
|
2047
2296
|
"isStatic": false,
|
|
2048
2297
|
"isPublic": true
|
|
2049
2298
|
},
|
|
2050
|
-
"
|
|
2051
|
-
"name": "
|
|
2299
|
+
"search": {
|
|
2300
|
+
"name": "search",
|
|
2052
2301
|
"async": true,
|
|
2053
2302
|
"parameters": [
|
|
2054
2303
|
{
|
|
2055
|
-
"name": "
|
|
2304
|
+
"name": "query",
|
|
2056
2305
|
"type": "string",
|
|
2306
|
+
"optional": false
|
|
2307
|
+
},
|
|
2308
|
+
{
|
|
2309
|
+
"name": "filters",
|
|
2310
|
+
"type": "EmailFolderSearchFilters",
|
|
2057
2311
|
"optional": true
|
|
2058
2312
|
}
|
|
2059
2313
|
],
|
|
2060
|
-
"returnType": "Promise<
|
|
2314
|
+
"returnType": "Promise<EmailFolder[]>",
|
|
2061
2315
|
"isStatic": false,
|
|
2062
2316
|
"isPublic": true
|
|
2063
2317
|
},
|
|
2064
|
-
"
|
|
2065
|
-
"name": "
|
|
2318
|
+
"refreshAllCounts": {
|
|
2319
|
+
"name": "refreshAllCounts",
|
|
2066
2320
|
"async": true,
|
|
2067
2321
|
"parameters": [
|
|
2068
2322
|
{
|
|
2069
2323
|
"name": "accountId",
|
|
2070
2324
|
"type": "string",
|
|
2071
|
-
"optional":
|
|
2325
|
+
"optional": false
|
|
2072
2326
|
}
|
|
2073
2327
|
],
|
|
2074
|
-
"returnType": "Promise<
|
|
2328
|
+
"returnType": "Promise<void>",
|
|
2075
2329
|
"isStatic": false,
|
|
2076
2330
|
"isPublic": true
|
|
2077
2331
|
},
|
|
2078
|
-
"
|
|
2079
|
-
"name": "
|
|
2332
|
+
"getAccountStats": {
|
|
2333
|
+
"name": "getAccountStats",
|
|
2080
2334
|
"async": true,
|
|
2081
2335
|
"parameters": [
|
|
2082
2336
|
{
|
|
2083
2337
|
"name": "accountId",
|
|
2084
2338
|
"type": "string",
|
|
2085
|
-
"optional":
|
|
2339
|
+
"optional": false
|
|
2086
2340
|
}
|
|
2087
2341
|
],
|
|
2088
|
-
"returnType": "Promise<
|
|
2342
|
+
"returnType": "Promise<object>",
|
|
2343
|
+
"isStatic": false,
|
|
2344
|
+
"isPublic": true
|
|
2345
|
+
},
|
|
2346
|
+
"createSystemFolders": {
|
|
2347
|
+
"name": "createSystemFolders",
|
|
2348
|
+
"async": true,
|
|
2349
|
+
"parameters": [
|
|
2350
|
+
{
|
|
2351
|
+
"name": "accountId",
|
|
2352
|
+
"type": "string",
|
|
2353
|
+
"optional": false
|
|
2354
|
+
}
|
|
2355
|
+
],
|
|
2356
|
+
"returnType": "Promise<void>",
|
|
2089
2357
|
"isStatic": false,
|
|
2090
2358
|
"isPublic": true
|
|
2091
2359
|
},
|
|
@@ -2099,7 +2367,7 @@
|
|
|
2099
2367
|
"optional": false
|
|
2100
2368
|
}
|
|
2101
2369
|
],
|
|
2102
|
-
"returnType": "Promise<
|
|
2370
|
+
"returnType": "Promise<EmailFolder[]>",
|
|
2103
2371
|
"isStatic": false,
|
|
2104
2372
|
"isPublic": true
|
|
2105
2373
|
},
|
|
@@ -2107,7 +2375,7 @@
|
|
|
2107
2375
|
"name": "findGlobal",
|
|
2108
2376
|
"async": true,
|
|
2109
2377
|
"parameters": [],
|
|
2110
|
-
"returnType": "Promise<
|
|
2378
|
+
"returnType": "Promise<EmailFolder[]>",
|
|
2111
2379
|
"isStatic": false,
|
|
2112
2380
|
"isPublic": true
|
|
2113
2381
|
},
|
|
@@ -2121,19 +2389,19 @@
|
|
|
2121
2389
|
"optional": false
|
|
2122
2390
|
}
|
|
2123
2391
|
],
|
|
2124
|
-
"returnType": "Promise<
|
|
2392
|
+
"returnType": "Promise<EmailFolder[]>",
|
|
2125
2393
|
"isStatic": false,
|
|
2126
2394
|
"isPublic": true
|
|
2127
2395
|
}
|
|
2128
2396
|
},
|
|
2129
2397
|
"decoratorConfig": {},
|
|
2130
2398
|
"extends": "SmrtCollection",
|
|
2131
|
-
"extendsTypeArg": "
|
|
2132
|
-
"exportName": "
|
|
2133
|
-
"collectionExportName": "
|
|
2399
|
+
"extendsTypeArg": "EmailFolder",
|
|
2400
|
+
"exportName": "EmailFolderCollection",
|
|
2401
|
+
"collectionExportName": "EmailFolderCollectionCollection",
|
|
2134
2402
|
"schema": {
|
|
2135
|
-
"tableName": "
|
|
2136
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
2403
|
+
"tableName": "email_folders",
|
|
2404
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"email_folders\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"name\" TEXT,\n \"path\" TEXT,\n \"delimiter\" TEXT,\n \"special_use\" TEXT,\n \"message_count\" INTEGER NOT NULL DEFAULT 0,\n \"unread_count\" INTEGER NOT NULL DEFAULT 0,\n \"subscribed\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
|
|
2137
2405
|
"columns": {
|
|
2138
2406
|
"id": {
|
|
2139
2407
|
"type": "UUID",
|
|
@@ -2145,39 +2413,718 @@
|
|
|
2145
2413
|
"type": "TEXT",
|
|
2146
2414
|
"notNull": true
|
|
2147
2415
|
},
|
|
2148
|
-
"context": {
|
|
2416
|
+
"context": {
|
|
2417
|
+
"type": "TEXT",
|
|
2418
|
+
"notNull": true,
|
|
2419
|
+
"default": ""
|
|
2420
|
+
},
|
|
2421
|
+
"created_at": {
|
|
2422
|
+
"type": "TIMESTAMP",
|
|
2423
|
+
"notNull": true,
|
|
2424
|
+
"default": "current_timestamp"
|
|
2425
|
+
},
|
|
2426
|
+
"updated_at": {
|
|
2427
|
+
"type": "TIMESTAMP",
|
|
2428
|
+
"notNull": true,
|
|
2429
|
+
"default": "current_timestamp"
|
|
2430
|
+
},
|
|
2431
|
+
"tenant_id": {
|
|
2432
|
+
"type": "UUID",
|
|
2433
|
+
"referenceKind": "tenantId",
|
|
2434
|
+
"notNull": false,
|
|
2435
|
+
"unique": false
|
|
2436
|
+
},
|
|
2437
|
+
"account_id": {
|
|
2438
|
+
"type": "UUID",
|
|
2439
|
+
"referenceKind": "foreignKey",
|
|
2440
|
+
"notNull": false,
|
|
2441
|
+
"unique": false,
|
|
2442
|
+
"foreignKey": {
|
|
2443
|
+
"table": "accounts",
|
|
2444
|
+
"column": "id",
|
|
2445
|
+
"onDelete": "NO ACTION",
|
|
2446
|
+
"onUpdate": "CASCADE"
|
|
2447
|
+
}
|
|
2448
|
+
},
|
|
2449
|
+
"name": {
|
|
2450
|
+
"type": "TEXT",
|
|
2451
|
+
"notNull": false,
|
|
2452
|
+
"unique": false
|
|
2453
|
+
},
|
|
2454
|
+
"path": {
|
|
2455
|
+
"type": "TEXT",
|
|
2456
|
+
"notNull": false,
|
|
2457
|
+
"unique": false
|
|
2458
|
+
},
|
|
2459
|
+
"delimiter": {
|
|
2460
|
+
"type": "TEXT",
|
|
2461
|
+
"notNull": false,
|
|
2462
|
+
"unique": false
|
|
2463
|
+
},
|
|
2464
|
+
"special_use": {
|
|
2465
|
+
"type": "TEXT",
|
|
2466
|
+
"notNull": false,
|
|
2467
|
+
"unique": false
|
|
2468
|
+
},
|
|
2469
|
+
"message_count": {
|
|
2470
|
+
"type": "INTEGER",
|
|
2471
|
+
"notNull": true,
|
|
2472
|
+
"unique": false,
|
|
2473
|
+
"default": 0
|
|
2474
|
+
},
|
|
2475
|
+
"unread_count": {
|
|
2476
|
+
"type": "INTEGER",
|
|
2477
|
+
"notNull": true,
|
|
2478
|
+
"unique": false,
|
|
2479
|
+
"default": 0
|
|
2480
|
+
},
|
|
2481
|
+
"subscribed": {
|
|
2482
|
+
"type": "BOOLEAN",
|
|
2483
|
+
"notNull": true,
|
|
2484
|
+
"unique": false,
|
|
2485
|
+
"default": true
|
|
2486
|
+
}
|
|
2487
|
+
},
|
|
2488
|
+
"indexes": [
|
|
2489
|
+
{
|
|
2490
|
+
"name": "email_folders_slug_context_idx",
|
|
2491
|
+
"columns": [
|
|
2492
|
+
"tenant_id",
|
|
2493
|
+
"slug",
|
|
2494
|
+
"context"
|
|
2495
|
+
],
|
|
2496
|
+
"unique": true,
|
|
2497
|
+
"nullsNotDistinct": true
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
"name": "email_folders_tenant_id_created_at_idx",
|
|
2501
|
+
"columns": [
|
|
2502
|
+
"tenant_id",
|
|
2503
|
+
"created_at"
|
|
2504
|
+
]
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
"name": "email_folders_account_id_idx",
|
|
2508
|
+
"columns": [
|
|
2509
|
+
"account_id"
|
|
2510
|
+
]
|
|
2511
|
+
}
|
|
2512
|
+
],
|
|
2513
|
+
"version": "e895818f"
|
|
2514
|
+
}
|
|
2515
|
+
},
|
|
2516
|
+
"@happyvertical/smrt-messages:MessageCollection": {
|
|
2517
|
+
"name": "messagecollection",
|
|
2518
|
+
"className": "MessageCollection",
|
|
2519
|
+
"qualifiedName": "@happyvertical/smrt-messages:MessageCollection",
|
|
2520
|
+
"collection": "messages",
|
|
2521
|
+
"filePath": "/home/runner/work/smrt/smrt/packages/messages/src/collections/MessageCollection.ts",
|
|
2522
|
+
"packageName": "@happyvertical/smrt-messages",
|
|
2523
|
+
"fields": {},
|
|
2524
|
+
"methods": {
|
|
2525
|
+
"search": {
|
|
2526
|
+
"name": "search",
|
|
2527
|
+
"async": true,
|
|
2528
|
+
"parameters": [
|
|
2529
|
+
{
|
|
2530
|
+
"name": "query",
|
|
2531
|
+
"type": "string",
|
|
2532
|
+
"optional": false
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
"name": "filters",
|
|
2536
|
+
"type": "MessageSearchFilters",
|
|
2537
|
+
"optional": true
|
|
2538
|
+
}
|
|
2539
|
+
],
|
|
2540
|
+
"returnType": "Promise<Message[]>",
|
|
2541
|
+
"isStatic": false,
|
|
2542
|
+
"isPublic": true
|
|
2543
|
+
},
|
|
2544
|
+
"getByAccounts": {
|
|
2545
|
+
"name": "getByAccounts",
|
|
2546
|
+
"async": true,
|
|
2547
|
+
"parameters": [
|
|
2548
|
+
{
|
|
2549
|
+
"name": "accountIds",
|
|
2550
|
+
"type": "string[]",
|
|
2551
|
+
"optional": false
|
|
2552
|
+
}
|
|
2553
|
+
],
|
|
2554
|
+
"returnType": "Promise<Message[]>",
|
|
2555
|
+
"isStatic": false,
|
|
2556
|
+
"isPublic": true
|
|
2557
|
+
},
|
|
2558
|
+
"getByType": {
|
|
2559
|
+
"name": "getByType",
|
|
2560
|
+
"async": true,
|
|
2561
|
+
"parameters": [
|
|
2562
|
+
{
|
|
2563
|
+
"name": "messageType",
|
|
2564
|
+
"type": "string",
|
|
2565
|
+
"optional": false
|
|
2566
|
+
}
|
|
2567
|
+
],
|
|
2568
|
+
"returnType": "Promise<Message[]>",
|
|
2569
|
+
"isStatic": false,
|
|
2570
|
+
"isPublic": true
|
|
2571
|
+
},
|
|
2572
|
+
"getUnread": {
|
|
2573
|
+
"name": "getUnread",
|
|
2574
|
+
"async": true,
|
|
2575
|
+
"parameters": [
|
|
2576
|
+
{
|
|
2577
|
+
"name": "accountId",
|
|
2578
|
+
"type": "string",
|
|
2579
|
+
"optional": true
|
|
2580
|
+
}
|
|
2581
|
+
],
|
|
2582
|
+
"returnType": "Promise<Message[]>",
|
|
2583
|
+
"isStatic": false,
|
|
2584
|
+
"isPublic": true
|
|
2585
|
+
},
|
|
2586
|
+
"getFlagged": {
|
|
2587
|
+
"name": "getFlagged",
|
|
2588
|
+
"async": true,
|
|
2589
|
+
"parameters": [
|
|
2590
|
+
{
|
|
2591
|
+
"name": "accountId",
|
|
2592
|
+
"type": "string",
|
|
2593
|
+
"optional": true
|
|
2594
|
+
}
|
|
2595
|
+
],
|
|
2596
|
+
"returnType": "Promise<Message[]>",
|
|
2597
|
+
"isStatic": false,
|
|
2598
|
+
"isPublic": true
|
|
2599
|
+
},
|
|
2600
|
+
"getRecent": {
|
|
2601
|
+
"name": "getRecent",
|
|
2602
|
+
"async": true,
|
|
2603
|
+
"parameters": [
|
|
2604
|
+
{
|
|
2605
|
+
"name": "limit",
|
|
2606
|
+
"type": "any",
|
|
2607
|
+
"optional": true
|
|
2608
|
+
},
|
|
2609
|
+
{
|
|
2610
|
+
"name": "accountId",
|
|
2611
|
+
"type": "string",
|
|
2612
|
+
"optional": true
|
|
2613
|
+
}
|
|
2614
|
+
],
|
|
2615
|
+
"returnType": "Promise<Message[]>",
|
|
2616
|
+
"isStatic": false,
|
|
2617
|
+
"isPublic": true
|
|
2618
|
+
},
|
|
2619
|
+
"getByThread": {
|
|
2620
|
+
"name": "getByThread",
|
|
2621
|
+
"async": true,
|
|
2622
|
+
"parameters": [
|
|
2623
|
+
{
|
|
2624
|
+
"name": "threadId",
|
|
2625
|
+
"type": "string",
|
|
2626
|
+
"optional": false
|
|
2627
|
+
}
|
|
2628
|
+
],
|
|
2629
|
+
"returnType": "Promise<Message[]>",
|
|
2630
|
+
"isStatic": false,
|
|
2631
|
+
"isPublic": true
|
|
2632
|
+
},
|
|
2633
|
+
"markAllRead": {
|
|
2634
|
+
"name": "markAllRead",
|
|
2635
|
+
"async": true,
|
|
2636
|
+
"parameters": [
|
|
2637
|
+
{
|
|
2638
|
+
"name": "messageIds",
|
|
2639
|
+
"type": "string[]",
|
|
2640
|
+
"optional": false
|
|
2641
|
+
}
|
|
2642
|
+
],
|
|
2643
|
+
"returnType": "Promise<void>",
|
|
2644
|
+
"isStatic": false,
|
|
2645
|
+
"isPublic": true
|
|
2646
|
+
},
|
|
2647
|
+
"getAccountStats": {
|
|
2648
|
+
"name": "getAccountStats",
|
|
2649
|
+
"async": true,
|
|
2650
|
+
"parameters": [
|
|
2651
|
+
{
|
|
2652
|
+
"name": "accountId",
|
|
2653
|
+
"type": "string",
|
|
2654
|
+
"optional": false
|
|
2655
|
+
}
|
|
2656
|
+
],
|
|
2657
|
+
"returnType": "Promise<object>",
|
|
2658
|
+
"isStatic": false,
|
|
2659
|
+
"isPublic": true
|
|
2660
|
+
},
|
|
2661
|
+
"getDrafts": {
|
|
2662
|
+
"name": "getDrafts",
|
|
2663
|
+
"async": true,
|
|
2664
|
+
"parameters": [
|
|
2665
|
+
{
|
|
2666
|
+
"name": "accountId",
|
|
2667
|
+
"type": "string",
|
|
2668
|
+
"optional": true
|
|
2669
|
+
}
|
|
2670
|
+
],
|
|
2671
|
+
"returnType": "Promise<Message[]>",
|
|
2672
|
+
"isStatic": false,
|
|
2673
|
+
"isPublic": true
|
|
2674
|
+
},
|
|
2675
|
+
"getSent": {
|
|
2676
|
+
"name": "getSent",
|
|
2677
|
+
"async": true,
|
|
2678
|
+
"parameters": [
|
|
2679
|
+
{
|
|
2680
|
+
"name": "accountId",
|
|
2681
|
+
"type": "string",
|
|
2682
|
+
"optional": true
|
|
2683
|
+
}
|
|
2684
|
+
],
|
|
2685
|
+
"returnType": "Promise<Message[]>",
|
|
2686
|
+
"isStatic": false,
|
|
2687
|
+
"isPublic": true
|
|
2688
|
+
},
|
|
2689
|
+
"getScheduled": {
|
|
2690
|
+
"name": "getScheduled",
|
|
2691
|
+
"async": true,
|
|
2692
|
+
"parameters": [
|
|
2693
|
+
{
|
|
2694
|
+
"name": "accountId",
|
|
2695
|
+
"type": "string",
|
|
2696
|
+
"optional": true
|
|
2697
|
+
}
|
|
2698
|
+
],
|
|
2699
|
+
"returnType": "Promise<Message[]>",
|
|
2700
|
+
"isStatic": false,
|
|
2701
|
+
"isPublic": true
|
|
2702
|
+
},
|
|
2703
|
+
"getFailedSends": {
|
|
2704
|
+
"name": "getFailedSends",
|
|
2705
|
+
"async": true,
|
|
2706
|
+
"parameters": [
|
|
2707
|
+
{
|
|
2708
|
+
"name": "accountId",
|
|
2709
|
+
"type": "string",
|
|
2710
|
+
"optional": true
|
|
2711
|
+
}
|
|
2712
|
+
],
|
|
2713
|
+
"returnType": "Promise<Message[]>",
|
|
2714
|
+
"isStatic": false,
|
|
2715
|
+
"isPublic": true
|
|
2716
|
+
},
|
|
2717
|
+
"getOutbox": {
|
|
2718
|
+
"name": "getOutbox",
|
|
2719
|
+
"async": true,
|
|
2720
|
+
"parameters": [
|
|
2721
|
+
{
|
|
2722
|
+
"name": "accountId",
|
|
2723
|
+
"type": "string",
|
|
2724
|
+
"optional": true
|
|
2725
|
+
}
|
|
2726
|
+
],
|
|
2727
|
+
"returnType": "Promise<Message[]>",
|
|
2728
|
+
"isStatic": false,
|
|
2729
|
+
"isPublic": true
|
|
2730
|
+
},
|
|
2731
|
+
"findByTenant": {
|
|
2732
|
+
"name": "findByTenant",
|
|
2733
|
+
"async": true,
|
|
2734
|
+
"parameters": [
|
|
2735
|
+
{
|
|
2736
|
+
"name": "tenantId",
|
|
2737
|
+
"type": "string",
|
|
2738
|
+
"optional": false
|
|
2739
|
+
}
|
|
2740
|
+
],
|
|
2741
|
+
"returnType": "Promise<Message[]>",
|
|
2742
|
+
"isStatic": false,
|
|
2743
|
+
"isPublic": true
|
|
2744
|
+
},
|
|
2745
|
+
"findGlobal": {
|
|
2746
|
+
"name": "findGlobal",
|
|
2747
|
+
"async": true,
|
|
2748
|
+
"parameters": [],
|
|
2749
|
+
"returnType": "Promise<Message[]>",
|
|
2750
|
+
"isStatic": false,
|
|
2751
|
+
"isPublic": true
|
|
2752
|
+
},
|
|
2753
|
+
"findWithGlobals": {
|
|
2754
|
+
"name": "findWithGlobals",
|
|
2755
|
+
"async": true,
|
|
2756
|
+
"parameters": [
|
|
2757
|
+
{
|
|
2758
|
+
"name": "tenantId",
|
|
2759
|
+
"type": "string",
|
|
2760
|
+
"optional": false
|
|
2761
|
+
}
|
|
2762
|
+
],
|
|
2763
|
+
"returnType": "Promise<Message[]>",
|
|
2764
|
+
"isStatic": false,
|
|
2765
|
+
"isPublic": true
|
|
2766
|
+
}
|
|
2767
|
+
},
|
|
2768
|
+
"decoratorConfig": {},
|
|
2769
|
+
"extends": "SmrtCollection",
|
|
2770
|
+
"extendsTypeArg": "Message",
|
|
2771
|
+
"exportName": "MessageCollection",
|
|
2772
|
+
"collectionExportName": "MessageCollectionCollection",
|
|
2773
|
+
"schema": {
|
|
2774
|
+
"tableName": "messages",
|
|
2775
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
|
|
2776
|
+
"columns": {
|
|
2777
|
+
"id": {
|
|
2778
|
+
"type": "UUID",
|
|
2779
|
+
"primaryKey": true,
|
|
2780
|
+
"referenceKind": "id",
|
|
2781
|
+
"notNull": true
|
|
2782
|
+
},
|
|
2783
|
+
"slug": {
|
|
2784
|
+
"type": "TEXT",
|
|
2785
|
+
"notNull": true
|
|
2786
|
+
},
|
|
2787
|
+
"context": {
|
|
2788
|
+
"type": "TEXT",
|
|
2789
|
+
"notNull": true,
|
|
2790
|
+
"default": ""
|
|
2791
|
+
},
|
|
2792
|
+
"_meta_type": {
|
|
2793
|
+
"type": "TEXT",
|
|
2794
|
+
"notNull": true
|
|
2795
|
+
},
|
|
2796
|
+
"_meta_data": {
|
|
2797
|
+
"type": "JSON",
|
|
2798
|
+
"notNull": false
|
|
2799
|
+
},
|
|
2800
|
+
"created_at": {
|
|
2801
|
+
"type": "TIMESTAMP",
|
|
2802
|
+
"notNull": true,
|
|
2803
|
+
"default": "current_timestamp"
|
|
2804
|
+
},
|
|
2805
|
+
"updated_at": {
|
|
2806
|
+
"type": "TIMESTAMP",
|
|
2807
|
+
"notNull": true,
|
|
2808
|
+
"default": "current_timestamp"
|
|
2809
|
+
},
|
|
2810
|
+
"tenant_id": {
|
|
2811
|
+
"type": "UUID",
|
|
2812
|
+
"referenceKind": "tenantId",
|
|
2813
|
+
"notNull": false
|
|
2814
|
+
},
|
|
2815
|
+
"account_id": {
|
|
2816
|
+
"type": "UUID",
|
|
2817
|
+
"referenceKind": "foreignKey",
|
|
2818
|
+
"notNull": false,
|
|
2819
|
+
"foreignKey": {
|
|
2820
|
+
"table": "accounts",
|
|
2821
|
+
"column": "id",
|
|
2822
|
+
"onDelete": "NO ACTION",
|
|
2823
|
+
"onUpdate": "CASCADE"
|
|
2824
|
+
}
|
|
2825
|
+
},
|
|
2826
|
+
"persona_id": {
|
|
2827
|
+
"type": "UUID",
|
|
2828
|
+
"referenceKind": "crossPackageRef",
|
|
2829
|
+
"notNull": false
|
|
2830
|
+
},
|
|
2831
|
+
"endpoint_id": {
|
|
2832
|
+
"type": "UUID",
|
|
2833
|
+
"referenceKind": "foreignKey",
|
|
2834
|
+
"notNull": false,
|
|
2835
|
+
"foreignKey": {
|
|
2836
|
+
"table": "messaging_endpoints",
|
|
2837
|
+
"column": "id",
|
|
2838
|
+
"onDelete": "NO ACTION",
|
|
2839
|
+
"onUpdate": "CASCADE"
|
|
2840
|
+
}
|
|
2841
|
+
},
|
|
2842
|
+
"correlation_id": {
|
|
2843
|
+
"type": "TEXT",
|
|
2844
|
+
"notNull": false
|
|
2845
|
+
},
|
|
2846
|
+
"thread_id": {
|
|
2847
|
+
"type": "TEXT",
|
|
2848
|
+
"notNull": false
|
|
2849
|
+
},
|
|
2850
|
+
"subject": {
|
|
2851
|
+
"type": "TEXT",
|
|
2852
|
+
"notNull": false
|
|
2853
|
+
},
|
|
2854
|
+
"body": {
|
|
2855
|
+
"type": "TEXT",
|
|
2856
|
+
"notNull": false
|
|
2857
|
+
},
|
|
2858
|
+
"from_address": {
|
|
2859
|
+
"type": "TEXT",
|
|
2860
|
+
"notNull": false
|
|
2861
|
+
},
|
|
2862
|
+
"from_name": {
|
|
2863
|
+
"type": "TEXT",
|
|
2864
|
+
"notNull": false
|
|
2865
|
+
},
|
|
2866
|
+
"to_addresses": {
|
|
2867
|
+
"type": "TEXT",
|
|
2868
|
+
"notNull": false
|
|
2869
|
+
},
|
|
2870
|
+
"date": {
|
|
2871
|
+
"type": "TIMESTAMP",
|
|
2872
|
+
"notNull": false
|
|
2873
|
+
},
|
|
2874
|
+
"is_read": {
|
|
2875
|
+
"type": "BOOLEAN",
|
|
2876
|
+
"notNull": false,
|
|
2877
|
+
"default": false
|
|
2878
|
+
},
|
|
2879
|
+
"is_flagged": {
|
|
2880
|
+
"type": "BOOLEAN",
|
|
2881
|
+
"notNull": false,
|
|
2882
|
+
"default": false
|
|
2883
|
+
},
|
|
2884
|
+
"has_attachments": {
|
|
2885
|
+
"type": "BOOLEAN",
|
|
2886
|
+
"notNull": false,
|
|
2887
|
+
"default": false
|
|
2888
|
+
},
|
|
2889
|
+
"size": {
|
|
2890
|
+
"type": "INTEGER",
|
|
2891
|
+
"notNull": false,
|
|
2892
|
+
"default": 0
|
|
2893
|
+
},
|
|
2894
|
+
"metadata": {
|
|
2895
|
+
"type": "TEXT",
|
|
2896
|
+
"notNull": false
|
|
2897
|
+
},
|
|
2898
|
+
"send_status": {
|
|
2899
|
+
"type": "TEXT",
|
|
2900
|
+
"notNull": false,
|
|
2901
|
+
"default": "draft"
|
|
2902
|
+
},
|
|
2903
|
+
"sent_at": {
|
|
2904
|
+
"type": "TIMESTAMP",
|
|
2905
|
+
"notNull": false
|
|
2906
|
+
},
|
|
2907
|
+
"send_error": {
|
|
2908
|
+
"type": "TEXT",
|
|
2909
|
+
"notNull": false
|
|
2910
|
+
},
|
|
2911
|
+
"retry_count": {
|
|
2912
|
+
"type": "INTEGER",
|
|
2913
|
+
"notNull": false,
|
|
2914
|
+
"default": 0
|
|
2915
|
+
},
|
|
2916
|
+
"max_retries": {
|
|
2917
|
+
"type": "INTEGER",
|
|
2918
|
+
"notNull": false,
|
|
2919
|
+
"default": 3
|
|
2920
|
+
},
|
|
2921
|
+
"scheduled_send_at": {
|
|
2922
|
+
"type": "TIMESTAMP",
|
|
2923
|
+
"notNull": false
|
|
2924
|
+
},
|
|
2925
|
+
"in_reply_to_message_id": {
|
|
2926
|
+
"type": "UUID",
|
|
2927
|
+
"referenceKind": "foreignKey",
|
|
2928
|
+
"notNull": false,
|
|
2929
|
+
"foreignKey": {
|
|
2930
|
+
"table": "messages",
|
|
2931
|
+
"column": "id",
|
|
2932
|
+
"onDelete": "NO ACTION",
|
|
2933
|
+
"onUpdate": "CASCADE"
|
|
2934
|
+
}
|
|
2935
|
+
},
|
|
2936
|
+
"message_id": {
|
|
2937
|
+
"type": "TEXT",
|
|
2938
|
+
"notNull": false
|
|
2939
|
+
},
|
|
2940
|
+
"in_reply_to": {
|
|
2941
|
+
"type": "TEXT",
|
|
2942
|
+
"notNull": false
|
|
2943
|
+
},
|
|
2944
|
+
"cc_addresses": {
|
|
2945
|
+
"type": "TEXT",
|
|
2946
|
+
"notNull": false
|
|
2947
|
+
},
|
|
2948
|
+
"bcc_addresses": {
|
|
2949
|
+
"type": "TEXT",
|
|
2950
|
+
"notNull": false
|
|
2951
|
+
},
|
|
2952
|
+
"reply_to_address": {
|
|
2953
|
+
"type": "TEXT",
|
|
2954
|
+
"notNull": false
|
|
2955
|
+
},
|
|
2956
|
+
"reply_to_name": {
|
|
2957
|
+
"type": "TEXT",
|
|
2958
|
+
"notNull": false
|
|
2959
|
+
},
|
|
2960
|
+
"text_body": {
|
|
2961
|
+
"type": "TEXT",
|
|
2962
|
+
"notNull": false
|
|
2963
|
+
},
|
|
2964
|
+
"html_body": {
|
|
2965
|
+
"type": "TEXT",
|
|
2966
|
+
"notNull": false
|
|
2967
|
+
},
|
|
2968
|
+
"folder_id": {
|
|
2969
|
+
"type": "TEXT",
|
|
2970
|
+
"notNull": false
|
|
2971
|
+
},
|
|
2972
|
+
"folder_path": {
|
|
2973
|
+
"type": "TEXT",
|
|
2974
|
+
"notNull": false
|
|
2975
|
+
},
|
|
2976
|
+
"labels": {
|
|
2977
|
+
"type": "TEXT",
|
|
2978
|
+
"notNull": false
|
|
2979
|
+
},
|
|
2980
|
+
"flags": {
|
|
2981
|
+
"type": "TEXT",
|
|
2982
|
+
"notNull": false
|
|
2983
|
+
},
|
|
2984
|
+
"is_answered": {
|
|
2985
|
+
"type": "BOOLEAN",
|
|
2986
|
+
"notNull": false,
|
|
2987
|
+
"default": false
|
|
2988
|
+
},
|
|
2989
|
+
"is_draft": {
|
|
2990
|
+
"type": "BOOLEAN",
|
|
2991
|
+
"notNull": false,
|
|
2992
|
+
"default": false
|
|
2993
|
+
},
|
|
2994
|
+
"raw_message": {
|
|
2995
|
+
"type": "TEXT",
|
|
2996
|
+
"notNull": false
|
|
2997
|
+
},
|
|
2998
|
+
"headers": {
|
|
2999
|
+
"type": "TEXT",
|
|
3000
|
+
"notNull": false
|
|
3001
|
+
},
|
|
3002
|
+
"channel_id": {
|
|
3003
|
+
"type": "TEXT",
|
|
3004
|
+
"notNull": false
|
|
3005
|
+
},
|
|
3006
|
+
"channel_name": {
|
|
3007
|
+
"type": "TEXT",
|
|
3008
|
+
"notNull": false
|
|
3009
|
+
},
|
|
3010
|
+
"slack_ts": {
|
|
3011
|
+
"type": "TEXT",
|
|
3012
|
+
"notNull": false
|
|
3013
|
+
},
|
|
3014
|
+
"slack_thread_ts": {
|
|
3015
|
+
"type": "TEXT",
|
|
3016
|
+
"notNull": false
|
|
3017
|
+
},
|
|
3018
|
+
"reactions": {
|
|
3019
|
+
"type": "TEXT",
|
|
3020
|
+
"notNull": false
|
|
3021
|
+
},
|
|
3022
|
+
"is_edited": {
|
|
3023
|
+
"type": "BOOLEAN",
|
|
3024
|
+
"notNull": false,
|
|
3025
|
+
"default": false
|
|
3026
|
+
},
|
|
3027
|
+
"message_type": {
|
|
3028
|
+
"type": "TEXT",
|
|
3029
|
+
"notNull": false
|
|
3030
|
+
},
|
|
3031
|
+
"blocks": {
|
|
3032
|
+
"type": "TEXT",
|
|
3033
|
+
"notNull": false
|
|
3034
|
+
},
|
|
3035
|
+
"tweet_id": {
|
|
3036
|
+
"type": "TEXT",
|
|
3037
|
+
"notNull": false
|
|
3038
|
+
},
|
|
3039
|
+
"retweet_count": {
|
|
3040
|
+
"type": "INTEGER",
|
|
3041
|
+
"notNull": false,
|
|
3042
|
+
"default": 0
|
|
3043
|
+
},
|
|
3044
|
+
"like_count": {
|
|
3045
|
+
"type": "INTEGER",
|
|
3046
|
+
"notNull": false,
|
|
3047
|
+
"default": 0
|
|
3048
|
+
},
|
|
3049
|
+
"reply_count": {
|
|
3050
|
+
"type": "INTEGER",
|
|
3051
|
+
"notNull": false,
|
|
3052
|
+
"default": 0
|
|
3053
|
+
},
|
|
3054
|
+
"is_retweet": {
|
|
3055
|
+
"type": "BOOLEAN",
|
|
3056
|
+
"notNull": false,
|
|
3057
|
+
"default": false
|
|
3058
|
+
},
|
|
3059
|
+
"is_reply": {
|
|
3060
|
+
"type": "BOOLEAN",
|
|
3061
|
+
"notNull": false,
|
|
3062
|
+
"default": false
|
|
3063
|
+
},
|
|
3064
|
+
"media_urls": {
|
|
2149
3065
|
"type": "TEXT",
|
|
2150
|
-
"notNull":
|
|
2151
|
-
"default": ""
|
|
3066
|
+
"notNull": false
|
|
2152
3067
|
},
|
|
2153
|
-
"
|
|
2154
|
-
"type": "
|
|
2155
|
-
"notNull":
|
|
2156
|
-
"default": "current_timestamp"
|
|
3068
|
+
"hashtags": {
|
|
3069
|
+
"type": "TEXT",
|
|
3070
|
+
"notNull": false
|
|
2157
3071
|
},
|
|
2158
|
-
"
|
|
2159
|
-
"type": "
|
|
2160
|
-
"notNull":
|
|
2161
|
-
"default": "current_timestamp"
|
|
3072
|
+
"mentions": {
|
|
3073
|
+
"type": "TEXT",
|
|
3074
|
+
"notNull": false
|
|
2162
3075
|
}
|
|
2163
3076
|
},
|
|
2164
3077
|
"indexes": [
|
|
2165
3078
|
{
|
|
2166
|
-
"name": "
|
|
3079
|
+
"name": "messages_slug_context_meta_type_idx",
|
|
2167
3080
|
"columns": [
|
|
3081
|
+
"tenant_id",
|
|
2168
3082
|
"slug",
|
|
2169
|
-
"context"
|
|
3083
|
+
"context",
|
|
3084
|
+
"_meta_type"
|
|
2170
3085
|
],
|
|
2171
|
-
"unique": true
|
|
3086
|
+
"unique": true,
|
|
3087
|
+
"nullsNotDistinct": true
|
|
3088
|
+
},
|
|
3089
|
+
{
|
|
3090
|
+
"name": "messages_meta_type_idx",
|
|
3091
|
+
"columns": [
|
|
3092
|
+
"_meta_type"
|
|
3093
|
+
]
|
|
2172
3094
|
},
|
|
2173
3095
|
{
|
|
2174
|
-
"name": "
|
|
3096
|
+
"name": "messages_tenant_id_created_at_idx",
|
|
2175
3097
|
"columns": [
|
|
3098
|
+
"tenant_id",
|
|
2176
3099
|
"created_at"
|
|
2177
3100
|
]
|
|
3101
|
+
},
|
|
3102
|
+
{
|
|
3103
|
+
"name": "messages_account_id_idx",
|
|
3104
|
+
"columns": [
|
|
3105
|
+
"account_id"
|
|
3106
|
+
]
|
|
3107
|
+
},
|
|
3108
|
+
{
|
|
3109
|
+
"name": "messages_persona_id_idx",
|
|
3110
|
+
"columns": [
|
|
3111
|
+
"persona_id"
|
|
3112
|
+
]
|
|
3113
|
+
},
|
|
3114
|
+
{
|
|
3115
|
+
"name": "messages_endpoint_id_idx",
|
|
3116
|
+
"columns": [
|
|
3117
|
+
"endpoint_id"
|
|
3118
|
+
]
|
|
3119
|
+
},
|
|
3120
|
+
{
|
|
3121
|
+
"name": "messages_in_reply_to_message_id_idx",
|
|
3122
|
+
"columns": [
|
|
3123
|
+
"in_reply_to_message_id"
|
|
3124
|
+
]
|
|
2178
3125
|
}
|
|
2179
3126
|
],
|
|
2180
|
-
"version": "
|
|
3127
|
+
"version": "c03791c7"
|
|
2181
3128
|
}
|
|
2182
3129
|
},
|
|
2183
3130
|
"@happyvertical/smrt-messages:MessagingEndpointCollection": {
|
|
@@ -2198,7 +3145,7 @@
|
|
|
2198
3145
|
"collectionExportName": "MessagingEndpointCollectionCollection",
|
|
2199
3146
|
"schema": {
|
|
2200
3147
|
"tableName": "messaging_endpoints",
|
|
2201
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"messaging_endpoints\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
3148
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"messaging_endpoints\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"profile_id\" UUID,\n \"label\" TEXT NOT NULL,\n \"channel\" TEXT NOT NULL DEFAULT 'email',\n \"address\" TEXT NOT NULL,\n \"is_active\" BOOLEAN NOT NULL DEFAULT TRUE,\n \"verified_at\" TIMESTAMP\n);",
|
|
2202
3149
|
"columns": {
|
|
2203
3150
|
"id": {
|
|
2204
3151
|
"type": "UUID",
|
|
@@ -2224,25 +3171,79 @@
|
|
|
2224
3171
|
"type": "TIMESTAMP",
|
|
2225
3172
|
"notNull": true,
|
|
2226
3173
|
"default": "current_timestamp"
|
|
3174
|
+
},
|
|
3175
|
+
"tenant_id": {
|
|
3176
|
+
"type": "UUID",
|
|
3177
|
+
"referenceKind": "tenantId",
|
|
3178
|
+
"notNull": true,
|
|
3179
|
+
"unique": false
|
|
3180
|
+
},
|
|
3181
|
+
"profile_id": {
|
|
3182
|
+
"type": "UUID",
|
|
3183
|
+
"referenceKind": "crossPackageRef",
|
|
3184
|
+
"notNull": false,
|
|
3185
|
+
"unique": false
|
|
3186
|
+
},
|
|
3187
|
+
"label": {
|
|
3188
|
+
"type": "TEXT",
|
|
3189
|
+
"notNull": true,
|
|
3190
|
+
"unique": false
|
|
3191
|
+
},
|
|
3192
|
+
"channel": {
|
|
3193
|
+
"type": "TEXT",
|
|
3194
|
+
"notNull": true,
|
|
3195
|
+
"unique": false,
|
|
3196
|
+
"default": "email"
|
|
3197
|
+
},
|
|
3198
|
+
"address": {
|
|
3199
|
+
"type": "TEXT",
|
|
3200
|
+
"notNull": true,
|
|
3201
|
+
"unique": false
|
|
3202
|
+
},
|
|
3203
|
+
"is_active": {
|
|
3204
|
+
"type": "BOOLEAN",
|
|
3205
|
+
"notNull": true,
|
|
3206
|
+
"unique": false,
|
|
3207
|
+
"default": true
|
|
3208
|
+
},
|
|
3209
|
+
"verified_at": {
|
|
3210
|
+
"type": "TIMESTAMP",
|
|
3211
|
+
"notNull": false,
|
|
3212
|
+
"unique": false
|
|
2227
3213
|
}
|
|
2228
3214
|
},
|
|
2229
3215
|
"indexes": [
|
|
3216
|
+
{
|
|
3217
|
+
"name": "messaging_endpoints_tenant_id_channel_idx",
|
|
3218
|
+
"columns": [
|
|
3219
|
+
"tenant_id",
|
|
3220
|
+
"channel",
|
|
3221
|
+
"label"
|
|
3222
|
+
],
|
|
3223
|
+
"unique": true
|
|
3224
|
+
},
|
|
2230
3225
|
{
|
|
2231
3226
|
"name": "messaging_endpoints_slug_context_idx",
|
|
2232
3227
|
"columns": [
|
|
2233
3228
|
"slug",
|
|
2234
3229
|
"context"
|
|
2235
|
-
]
|
|
2236
|
-
"unique": true
|
|
3230
|
+
]
|
|
2237
3231
|
},
|
|
2238
3232
|
{
|
|
2239
|
-
"name": "
|
|
3233
|
+
"name": "messaging_endpoints_tenant_id_created_at_idx",
|
|
2240
3234
|
"columns": [
|
|
3235
|
+
"tenant_id",
|
|
2241
3236
|
"created_at"
|
|
2242
3237
|
]
|
|
3238
|
+
},
|
|
3239
|
+
{
|
|
3240
|
+
"name": "messaging_endpoints_profile_id_idx",
|
|
3241
|
+
"columns": [
|
|
3242
|
+
"profile_id"
|
|
3243
|
+
]
|
|
2243
3244
|
}
|
|
2244
3245
|
],
|
|
2245
|
-
"version": "
|
|
3246
|
+
"version": "fca5554d"
|
|
2246
3247
|
}
|
|
2247
3248
|
},
|
|
2248
3249
|
"@happyvertical/smrt-messages:PersonaMessageRouteCollection": {
|
|
@@ -2278,7 +3279,7 @@
|
|
|
2278
3279
|
"collectionExportName": "PersonaMessageRouteCollectionCollection",
|
|
2279
3280
|
"schema": {
|
|
2280
3281
|
"tableName": "persona_message_routes",
|
|
2281
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"persona_message_routes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
3282
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"persona_message_routes\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"persona_id\" UUID NOT NULL,\n \"account_id\" UUID NOT NULL,\n \"endpoint_id\" UUID NOT NULL,\n \"purpose\" TEXT NOT NULL,\n \"priority\" INTEGER NOT NULL DEFAULT 0,\n \"enabled\" BOOLEAN NOT NULL DEFAULT TRUE\n);",
|
|
2282
3283
|
"columns": {
|
|
2283
3284
|
"id": {
|
|
2284
3285
|
"type": "UUID",
|
|
@@ -2304,25 +3305,107 @@
|
|
|
2304
3305
|
"type": "TIMESTAMP",
|
|
2305
3306
|
"notNull": true,
|
|
2306
3307
|
"default": "current_timestamp"
|
|
3308
|
+
},
|
|
3309
|
+
"tenant_id": {
|
|
3310
|
+
"type": "UUID",
|
|
3311
|
+
"referenceKind": "tenantId",
|
|
3312
|
+
"notNull": true,
|
|
3313
|
+
"unique": false
|
|
3314
|
+
},
|
|
3315
|
+
"persona_id": {
|
|
3316
|
+
"type": "UUID",
|
|
3317
|
+
"referenceKind": "crossPackageRef",
|
|
3318
|
+
"notNull": true,
|
|
3319
|
+
"unique": false
|
|
3320
|
+
},
|
|
3321
|
+
"account_id": {
|
|
3322
|
+
"type": "UUID",
|
|
3323
|
+
"referenceKind": "foreignKey",
|
|
3324
|
+
"notNull": true,
|
|
3325
|
+
"unique": false,
|
|
3326
|
+
"foreignKey": {
|
|
3327
|
+
"table": "accounts",
|
|
3328
|
+
"column": "id",
|
|
3329
|
+
"onDelete": "CASCADE",
|
|
3330
|
+
"onUpdate": "CASCADE"
|
|
3331
|
+
}
|
|
3332
|
+
},
|
|
3333
|
+
"endpoint_id": {
|
|
3334
|
+
"type": "UUID",
|
|
3335
|
+
"referenceKind": "foreignKey",
|
|
3336
|
+
"notNull": true,
|
|
3337
|
+
"unique": false,
|
|
3338
|
+
"foreignKey": {
|
|
3339
|
+
"table": "messaging_endpoints",
|
|
3340
|
+
"column": "id",
|
|
3341
|
+
"onDelete": "CASCADE",
|
|
3342
|
+
"onUpdate": "CASCADE"
|
|
3343
|
+
}
|
|
3344
|
+
},
|
|
3345
|
+
"purpose": {
|
|
3346
|
+
"type": "TEXT",
|
|
3347
|
+
"notNull": true,
|
|
3348
|
+
"unique": false
|
|
3349
|
+
},
|
|
3350
|
+
"priority": {
|
|
3351
|
+
"type": "INTEGER",
|
|
3352
|
+
"notNull": true,
|
|
3353
|
+
"unique": false,
|
|
3354
|
+
"default": 0
|
|
3355
|
+
},
|
|
3356
|
+
"enabled": {
|
|
3357
|
+
"type": "BOOLEAN",
|
|
3358
|
+
"notNull": true,
|
|
3359
|
+
"unique": false,
|
|
3360
|
+
"default": true
|
|
2307
3361
|
}
|
|
2308
3362
|
},
|
|
2309
3363
|
"indexes": [
|
|
3364
|
+
{
|
|
3365
|
+
"name": "persona_message_routes_tenant_id_persona_id_idx",
|
|
3366
|
+
"columns": [
|
|
3367
|
+
"tenant_id",
|
|
3368
|
+
"persona_id",
|
|
3369
|
+
"account_id",
|
|
3370
|
+
"endpoint_id",
|
|
3371
|
+
"purpose"
|
|
3372
|
+
],
|
|
3373
|
+
"unique": true
|
|
3374
|
+
},
|
|
2310
3375
|
{
|
|
2311
3376
|
"name": "persona_message_routes_slug_context_idx",
|
|
2312
3377
|
"columns": [
|
|
2313
3378
|
"slug",
|
|
2314
3379
|
"context"
|
|
2315
|
-
]
|
|
2316
|
-
"unique": true
|
|
3380
|
+
]
|
|
2317
3381
|
},
|
|
2318
3382
|
{
|
|
2319
|
-
"name": "
|
|
3383
|
+
"name": "persona_message_routes_tenant_id_created_at_idx",
|
|
2320
3384
|
"columns": [
|
|
3385
|
+
"tenant_id",
|
|
2321
3386
|
"created_at"
|
|
2322
3387
|
]
|
|
3388
|
+
},
|
|
3389
|
+
{
|
|
3390
|
+
"name": "persona_message_routes_persona_id_idx",
|
|
3391
|
+
"columns": [
|
|
3392
|
+
"persona_id"
|
|
3393
|
+
]
|
|
3394
|
+
},
|
|
3395
|
+
{
|
|
3396
|
+
"name": "persona_message_routes_account_id_idx",
|
|
3397
|
+
"columns": [
|
|
3398
|
+
"account_id"
|
|
3399
|
+
]
|
|
3400
|
+
},
|
|
3401
|
+
{
|
|
3402
|
+
"name": "persona_message_routes_endpoint_id_idx",
|
|
3403
|
+
"columns": [
|
|
3404
|
+
"endpoint_id"
|
|
3405
|
+
]
|
|
2323
3406
|
}
|
|
2324
3407
|
],
|
|
2325
|
-
"version": "
|
|
3408
|
+
"version": "3dc1d5d0"
|
|
2326
3409
|
}
|
|
2327
3410
|
},
|
|
2328
3411
|
"@happyvertical/smrt-messages:WhitelistCollection": {
|
|
@@ -2388,8 +3471,8 @@
|
|
|
2388
3471
|
"exportName": "WhitelistCollection",
|
|
2389
3472
|
"collectionExportName": "WhitelistCollectionCollection",
|
|
2390
3473
|
"schema": {
|
|
2391
|
-
"tableName": "
|
|
2392
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
3474
|
+
"tableName": "whitelists",
|
|
3475
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"whitelists\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"pattern\" TEXT DEFAULT '',\n \"type\" TEXT DEFAULT 'email',\n \"category\" TEXT,\n \"description\" TEXT DEFAULT '',\n \"tenant_id\" UUID NOT NULL\n);",
|
|
2393
3476
|
"columns": {
|
|
2394
3477
|
"id": {
|
|
2395
3478
|
"type": "UUID",
|
|
@@ -2415,25 +3498,56 @@
|
|
|
2415
3498
|
"type": "TIMESTAMP",
|
|
2416
3499
|
"notNull": true,
|
|
2417
3500
|
"default": "current_timestamp"
|
|
3501
|
+
},
|
|
3502
|
+
"pattern": {
|
|
3503
|
+
"type": "TEXT",
|
|
3504
|
+
"notNull": false,
|
|
3505
|
+
"unique": false,
|
|
3506
|
+
"default": ""
|
|
3507
|
+
},
|
|
3508
|
+
"type": {
|
|
3509
|
+
"type": "TEXT",
|
|
3510
|
+
"notNull": false,
|
|
3511
|
+
"unique": false,
|
|
3512
|
+
"default": "email"
|
|
3513
|
+
},
|
|
3514
|
+
"category": {
|
|
3515
|
+
"type": "TEXT",
|
|
3516
|
+
"notNull": false,
|
|
3517
|
+
"unique": false
|
|
3518
|
+
},
|
|
3519
|
+
"description": {
|
|
3520
|
+
"type": "TEXT",
|
|
3521
|
+
"notNull": false,
|
|
3522
|
+
"unique": false,
|
|
3523
|
+
"default": ""
|
|
3524
|
+
},
|
|
3525
|
+
"tenant_id": {
|
|
3526
|
+
"type": "UUID",
|
|
3527
|
+
"referenceKind": "tenantId",
|
|
3528
|
+
"notNull": true,
|
|
3529
|
+
"unique": false
|
|
2418
3530
|
}
|
|
2419
3531
|
},
|
|
2420
3532
|
"indexes": [
|
|
2421
3533
|
{
|
|
2422
|
-
"name": "
|
|
3534
|
+
"name": "whitelists_slug_context_idx",
|
|
2423
3535
|
"columns": [
|
|
3536
|
+
"tenant_id",
|
|
2424
3537
|
"slug",
|
|
2425
3538
|
"context"
|
|
2426
3539
|
],
|
|
2427
3540
|
"unique": true
|
|
2428
3541
|
},
|
|
2429
3542
|
{
|
|
2430
|
-
"name": "
|
|
3543
|
+
"name": "whitelists_tenant_id_created_at_idx",
|
|
2431
3544
|
"columns": [
|
|
3545
|
+
"tenant_id",
|
|
2432
3546
|
"created_at"
|
|
2433
3547
|
]
|
|
2434
3548
|
}
|
|
2435
3549
|
],
|
|
2436
|
-
"version": "
|
|
3550
|
+
"version": "40a655a1"
|
|
2437
3551
|
}
|
|
2438
3552
|
},
|
|
2439
3553
|
"@happyvertical/smrt-messages:Account": {
|
|
@@ -2778,7 +3892,8 @@
|
|
|
2778
3892
|
"context",
|
|
2779
3893
|
"_meta_type"
|
|
2780
3894
|
],
|
|
2781
|
-
"unique": true
|
|
3895
|
+
"unique": true,
|
|
3896
|
+
"nullsNotDistinct": true
|
|
2782
3897
|
},
|
|
2783
3898
|
{
|
|
2784
3899
|
"name": "accounts_meta_type_idx",
|
|
@@ -3059,7 +4174,8 @@
|
|
|
3059
4174
|
"slug",
|
|
3060
4175
|
"context"
|
|
3061
4176
|
],
|
|
3062
|
-
"unique": true
|
|
4177
|
+
"unique": true,
|
|
4178
|
+
"nullsNotDistinct": true
|
|
3063
4179
|
},
|
|
3064
4180
|
{
|
|
3065
4181
|
"name": "attachments_tenant_id_created_at_idx",
|
|
@@ -4123,7 +5239,8 @@
|
|
|
4123
5239
|
"context",
|
|
4124
5240
|
"_meta_type"
|
|
4125
5241
|
],
|
|
4126
|
-
"unique": true
|
|
5242
|
+
"unique": true,
|
|
5243
|
+
"nullsNotDistinct": true
|
|
4127
5244
|
},
|
|
4128
5245
|
{
|
|
4129
5246
|
"name": "messages_meta_type_idx",
|
|
@@ -4585,7 +5702,8 @@
|
|
|
4585
5702
|
"context",
|
|
4586
5703
|
"_meta_type"
|
|
4587
5704
|
],
|
|
4588
|
-
"unique": true
|
|
5705
|
+
"unique": true,
|
|
5706
|
+
"nullsNotDistinct": true
|
|
4589
5707
|
},
|
|
4590
5708
|
{
|
|
4591
5709
|
"name": "accounts_meta_type_idx",
|
|
@@ -5062,7 +6180,8 @@
|
|
|
5062
6180
|
"slug",
|
|
5063
6181
|
"context"
|
|
5064
6182
|
],
|
|
5065
|
-
"unique": true
|
|
6183
|
+
"unique": true,
|
|
6184
|
+
"nullsNotDistinct": true
|
|
5066
6185
|
},
|
|
5067
6186
|
{
|
|
5068
6187
|
"name": "email_folders_tenant_id_created_at_idx",
|
|
@@ -5785,7 +6904,8 @@
|
|
|
5785
6904
|
"context",
|
|
5786
6905
|
"_meta_type"
|
|
5787
6906
|
],
|
|
5788
|
-
"unique": true
|
|
6907
|
+
"unique": true,
|
|
6908
|
+
"nullsNotDistinct": true
|
|
5789
6909
|
},
|
|
5790
6910
|
{
|
|
5791
6911
|
"name": "messages_meta_type_idx",
|
|
@@ -6705,7 +7825,8 @@
|
|
|
6705
7825
|
"context",
|
|
6706
7826
|
"_meta_type"
|
|
6707
7827
|
],
|
|
6708
|
-
"unique": true
|
|
7828
|
+
"unique": true,
|
|
7829
|
+
"nullsNotDistinct": true
|
|
6709
7830
|
},
|
|
6710
7831
|
{
|
|
6711
7832
|
"name": "accounts_meta_type_idx",
|
|
@@ -7488,7 +8609,8 @@
|
|
|
7488
8609
|
"context",
|
|
7489
8610
|
"_meta_type"
|
|
7490
8611
|
],
|
|
7491
|
-
"unique": true
|
|
8612
|
+
"unique": true,
|
|
8613
|
+
"nullsNotDistinct": true
|
|
7492
8614
|
},
|
|
7493
8615
|
{
|
|
7494
8616
|
"name": "messages_meta_type_idx",
|
|
@@ -7862,7 +8984,8 @@
|
|
|
7862
8984
|
"context",
|
|
7863
8985
|
"_meta_type"
|
|
7864
8986
|
],
|
|
7865
|
-
"unique": true
|
|
8987
|
+
"unique": true,
|
|
8988
|
+
"nullsNotDistinct": true
|
|
7866
8989
|
},
|
|
7867
8990
|
{
|
|
7868
8991
|
"name": "accounts_meta_type_idx",
|
|
@@ -8673,7 +9796,8 @@
|
|
|
8673
9796
|
"context",
|
|
8674
9797
|
"_meta_type"
|
|
8675
9798
|
],
|
|
8676
|
-
"unique": true
|
|
9799
|
+
"unique": true,
|
|
9800
|
+
"nullsNotDistinct": true
|
|
8677
9801
|
},
|
|
8678
9802
|
{
|
|
8679
9803
|
"name": "messages_meta_type_idx",
|
|
@@ -9055,7 +10179,8 @@
|
|
|
9055
10179
|
"context",
|
|
9056
10180
|
"_meta_type"
|
|
9057
10181
|
],
|
|
9058
|
-
"unique": true
|
|
10182
|
+
"unique": true,
|
|
10183
|
+
"nullsNotDistinct": true
|
|
9059
10184
|
},
|
|
9060
10185
|
{
|
|
9061
10186
|
"name": "accounts_meta_type_idx",
|
|
@@ -9570,7 +10695,8 @@
|
|
|
9570
10695
|
"context",
|
|
9571
10696
|
"_meta_type"
|
|
9572
10697
|
],
|
|
9573
|
-
"unique": true
|
|
10698
|
+
"unique": true,
|
|
10699
|
+
"nullsNotDistinct": true
|
|
9574
10700
|
},
|
|
9575
10701
|
{
|
|
9576
10702
|
"name": "accounts_meta_type_idx",
|