@devitek/mailsink-cli 0.0.0-stage → 0.3.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,2493 @@
1
+ {
2
+ "id": "a315649a-576b-44c2-93f2-45749f8e7e8e",
3
+ "prevId": "38217a90-727b-4b66-854e-716513e6acd5",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.attachments": {
8
+ "name": "attachments",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "message_id": {
18
+ "name": "message_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "filename": {
24
+ "name": "filename",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": false
28
+ },
29
+ "content_type": {
30
+ "name": "content_type",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "content_id": {
36
+ "name": "content_id",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": false
40
+ },
41
+ "disposition": {
42
+ "name": "disposition",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "size_bytes": {
48
+ "name": "size_bytes",
49
+ "type": "integer",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "blob_id": {
54
+ "name": "blob_id",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true
58
+ }
59
+ },
60
+ "indexes": {
61
+ "attachments_message_idx": {
62
+ "name": "attachments_message_idx",
63
+ "columns": [
64
+ {
65
+ "expression": "message_id",
66
+ "isExpression": false,
67
+ "asc": true,
68
+ "nulls": "last"
69
+ }
70
+ ],
71
+ "isUnique": false,
72
+ "concurrently": false,
73
+ "method": "btree",
74
+ "with": {}
75
+ },
76
+ "attachments_blob_idx": {
77
+ "name": "attachments_blob_idx",
78
+ "columns": [
79
+ {
80
+ "expression": "blob_id",
81
+ "isExpression": false,
82
+ "asc": true,
83
+ "nulls": "last"
84
+ }
85
+ ],
86
+ "isUnique": false,
87
+ "concurrently": false,
88
+ "method": "btree",
89
+ "with": {}
90
+ }
91
+ },
92
+ "foreignKeys": {
93
+ "attachments_message_id_messages_id_fk": {
94
+ "name": "attachments_message_id_messages_id_fk",
95
+ "tableFrom": "attachments",
96
+ "tableTo": "messages",
97
+ "columnsFrom": ["message_id"],
98
+ "columnsTo": ["id"],
99
+ "onDelete": "cascade",
100
+ "onUpdate": "no action"
101
+ },
102
+ "attachments_blob_id_blobs_id_fk": {
103
+ "name": "attachments_blob_id_blobs_id_fk",
104
+ "tableFrom": "attachments",
105
+ "tableTo": "blobs",
106
+ "columnsFrom": ["blob_id"],
107
+ "columnsTo": ["id"],
108
+ "onDelete": "cascade",
109
+ "onUpdate": "no action"
110
+ }
111
+ },
112
+ "compositePrimaryKeys": {},
113
+ "uniqueConstraints": {},
114
+ "policies": {},
115
+ "checkConstraints": {},
116
+ "isRLSEnabled": false
117
+ },
118
+ "public.blobs": {
119
+ "name": "blobs",
120
+ "schema": "",
121
+ "columns": {
122
+ "id": {
123
+ "name": "id",
124
+ "type": "text",
125
+ "primaryKey": true,
126
+ "notNull": true
127
+ },
128
+ "workspace_id": {
129
+ "name": "workspace_id",
130
+ "type": "text",
131
+ "primaryKey": false,
132
+ "notNull": true
133
+ },
134
+ "sha256": {
135
+ "name": "sha256",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": true
139
+ },
140
+ "size_bytes": {
141
+ "name": "size_bytes",
142
+ "type": "integer",
143
+ "primaryKey": false,
144
+ "notNull": true
145
+ },
146
+ "data": {
147
+ "name": "data",
148
+ "type": "bytea",
149
+ "primaryKey": false,
150
+ "notNull": true
151
+ },
152
+ "created_at": {
153
+ "name": "created_at",
154
+ "type": "timestamp with time zone",
155
+ "primaryKey": false,
156
+ "notNull": true,
157
+ "default": "now()"
158
+ }
159
+ },
160
+ "indexes": {
161
+ "blobs_dedup_uq": {
162
+ "name": "blobs_dedup_uq",
163
+ "columns": [
164
+ {
165
+ "expression": "workspace_id",
166
+ "isExpression": false,
167
+ "asc": true,
168
+ "nulls": "last"
169
+ },
170
+ {
171
+ "expression": "sha256",
172
+ "isExpression": false,
173
+ "asc": true,
174
+ "nulls": "last"
175
+ }
176
+ ],
177
+ "isUnique": true,
178
+ "concurrently": false,
179
+ "method": "btree",
180
+ "with": {}
181
+ }
182
+ },
183
+ "foreignKeys": {
184
+ "blobs_workspace_id_workspaces_id_fk": {
185
+ "name": "blobs_workspace_id_workspaces_id_fk",
186
+ "tableFrom": "blobs",
187
+ "tableTo": "workspaces",
188
+ "columnsFrom": ["workspace_id"],
189
+ "columnsTo": ["id"],
190
+ "onDelete": "cascade",
191
+ "onUpdate": "no action"
192
+ }
193
+ },
194
+ "compositePrimaryKeys": {},
195
+ "uniqueConstraints": {},
196
+ "policies": {},
197
+ "checkConstraints": {},
198
+ "isRLSEnabled": false
199
+ },
200
+ "public.connections": {
201
+ "name": "connections",
202
+ "schema": "",
203
+ "columns": {
204
+ "id": {
205
+ "name": "id",
206
+ "type": "text",
207
+ "primaryKey": true,
208
+ "notNull": true
209
+ },
210
+ "workspace_id": {
211
+ "name": "workspace_id",
212
+ "type": "text",
213
+ "primaryKey": false,
214
+ "notNull": true
215
+ },
216
+ "name": {
217
+ "name": "name",
218
+ "type": "text",
219
+ "primaryKey": false,
220
+ "notNull": true
221
+ },
222
+ "kind": {
223
+ "name": "kind",
224
+ "type": "connection_kind",
225
+ "typeSchema": "public",
226
+ "primaryKey": false,
227
+ "notNull": true
228
+ },
229
+ "smtp_username": {
230
+ "name": "smtp_username",
231
+ "type": "text",
232
+ "primaryKey": false,
233
+ "notNull": false
234
+ },
235
+ "smtp_password_hash": {
236
+ "name": "smtp_password_hash",
237
+ "type": "text",
238
+ "primaryKey": false,
239
+ "notNull": false
240
+ },
241
+ "retention_seconds": {
242
+ "name": "retention_seconds",
243
+ "type": "integer",
244
+ "primaryKey": false,
245
+ "notNull": false
246
+ },
247
+ "rate_limit": {
248
+ "name": "rate_limit",
249
+ "type": "jsonb",
250
+ "primaryKey": false,
251
+ "notNull": false
252
+ },
253
+ "simulation": {
254
+ "name": "simulation",
255
+ "type": "jsonb",
256
+ "primaryKey": false,
257
+ "notNull": false
258
+ },
259
+ "disabled_at": {
260
+ "name": "disabled_at",
261
+ "type": "timestamp with time zone",
262
+ "primaryKey": false,
263
+ "notNull": false
264
+ },
265
+ "created_at": {
266
+ "name": "created_at",
267
+ "type": "timestamp with time zone",
268
+ "primaryKey": false,
269
+ "notNull": true,
270
+ "default": "now()"
271
+ },
272
+ "updated_at": {
273
+ "name": "updated_at",
274
+ "type": "timestamp with time zone",
275
+ "primaryKey": false,
276
+ "notNull": true,
277
+ "default": "now()"
278
+ }
279
+ },
280
+ "indexes": {
281
+ "connections_workspace_idx": {
282
+ "name": "connections_workspace_idx",
283
+ "columns": [
284
+ {
285
+ "expression": "workspace_id",
286
+ "isExpression": false,
287
+ "asc": true,
288
+ "nulls": "last"
289
+ }
290
+ ],
291
+ "isUnique": false,
292
+ "concurrently": false,
293
+ "method": "btree",
294
+ "with": {}
295
+ }
296
+ },
297
+ "foreignKeys": {
298
+ "connections_workspace_id_workspaces_id_fk": {
299
+ "name": "connections_workspace_id_workspaces_id_fk",
300
+ "tableFrom": "connections",
301
+ "tableTo": "workspaces",
302
+ "columnsFrom": ["workspace_id"],
303
+ "columnsTo": ["id"],
304
+ "onDelete": "cascade",
305
+ "onUpdate": "no action"
306
+ }
307
+ },
308
+ "compositePrimaryKeys": {},
309
+ "uniqueConstraints": {
310
+ "connections_smtp_username_unique": {
311
+ "name": "connections_smtp_username_unique",
312
+ "nullsNotDistinct": false,
313
+ "columns": ["smtp_username"]
314
+ }
315
+ },
316
+ "policies": {},
317
+ "checkConstraints": {
318
+ "connections_smtp_creds": {
319
+ "name": "connections_smtp_creds",
320
+ "value": "(\"connections\".\"kind\" = 'smtp') = (\"connections\".\"smtp_username\" is not null)"
321
+ }
322
+ },
323
+ "isRLSEnabled": false
324
+ },
325
+ "public.message_events": {
326
+ "name": "message_events",
327
+ "schema": "",
328
+ "columns": {
329
+ "id": {
330
+ "name": "id",
331
+ "type": "text",
332
+ "primaryKey": true,
333
+ "notNull": true
334
+ },
335
+ "workspace_id": {
336
+ "name": "workspace_id",
337
+ "type": "text",
338
+ "primaryKey": false,
339
+ "notNull": true
340
+ },
341
+ "message_id": {
342
+ "name": "message_id",
343
+ "type": "text",
344
+ "primaryKey": false,
345
+ "notNull": true
346
+ },
347
+ "recipient_email": {
348
+ "name": "recipient_email",
349
+ "type": "text",
350
+ "primaryKey": false,
351
+ "notNull": false
352
+ },
353
+ "type": {
354
+ "name": "type",
355
+ "type": "event_type",
356
+ "typeSchema": "public",
357
+ "primaryKey": false,
358
+ "notNull": true
359
+ },
360
+ "origin": {
361
+ "name": "origin",
362
+ "type": "event_origin",
363
+ "typeSchema": "public",
364
+ "primaryKey": false,
365
+ "notNull": true
366
+ },
367
+ "data": {
368
+ "name": "data",
369
+ "type": "jsonb",
370
+ "primaryKey": false,
371
+ "notNull": false
372
+ },
373
+ "occurred_at": {
374
+ "name": "occurred_at",
375
+ "type": "timestamp with time zone",
376
+ "primaryKey": false,
377
+ "notNull": true,
378
+ "default": "now()"
379
+ }
380
+ },
381
+ "indexes": {
382
+ "events_message_idx": {
383
+ "name": "events_message_idx",
384
+ "columns": [
385
+ {
386
+ "expression": "message_id",
387
+ "isExpression": false,
388
+ "asc": true,
389
+ "nulls": "last"
390
+ },
391
+ {
392
+ "expression": "occurred_at",
393
+ "isExpression": false,
394
+ "asc": true,
395
+ "nulls": "last"
396
+ }
397
+ ],
398
+ "isUnique": false,
399
+ "concurrently": false,
400
+ "method": "btree",
401
+ "with": {}
402
+ },
403
+ "events_ws_time_idx": {
404
+ "name": "events_ws_time_idx",
405
+ "columns": [
406
+ {
407
+ "expression": "workspace_id",
408
+ "isExpression": false,
409
+ "asc": true,
410
+ "nulls": "last"
411
+ },
412
+ {
413
+ "expression": "occurred_at",
414
+ "isExpression": false,
415
+ "asc": true,
416
+ "nulls": "last"
417
+ }
418
+ ],
419
+ "isUnique": false,
420
+ "concurrently": false,
421
+ "method": "btree",
422
+ "with": {}
423
+ }
424
+ },
425
+ "foreignKeys": {
426
+ "message_events_workspace_id_workspaces_id_fk": {
427
+ "name": "message_events_workspace_id_workspaces_id_fk",
428
+ "tableFrom": "message_events",
429
+ "tableTo": "workspaces",
430
+ "columnsFrom": ["workspace_id"],
431
+ "columnsTo": ["id"],
432
+ "onDelete": "cascade",
433
+ "onUpdate": "no action"
434
+ },
435
+ "message_events_message_id_messages_id_fk": {
436
+ "name": "message_events_message_id_messages_id_fk",
437
+ "tableFrom": "message_events",
438
+ "tableTo": "messages",
439
+ "columnsFrom": ["message_id"],
440
+ "columnsTo": ["id"],
441
+ "onDelete": "cascade",
442
+ "onUpdate": "no action"
443
+ }
444
+ },
445
+ "compositePrimaryKeys": {},
446
+ "uniqueConstraints": {},
447
+ "policies": {},
448
+ "checkConstraints": {},
449
+ "isRLSEnabled": false
450
+ },
451
+ "public.idempotency_keys": {
452
+ "name": "idempotency_keys",
453
+ "schema": "",
454
+ "columns": {
455
+ "workspace_id": {
456
+ "name": "workspace_id",
457
+ "type": "text",
458
+ "primaryKey": false,
459
+ "notNull": true
460
+ },
461
+ "key": {
462
+ "name": "key",
463
+ "type": "text",
464
+ "primaryKey": false,
465
+ "notNull": true
466
+ },
467
+ "request_hash": {
468
+ "name": "request_hash",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": true
472
+ },
473
+ "response_status": {
474
+ "name": "response_status",
475
+ "type": "integer",
476
+ "primaryKey": false,
477
+ "notNull": true
478
+ },
479
+ "response_body": {
480
+ "name": "response_body",
481
+ "type": "jsonb",
482
+ "primaryKey": false,
483
+ "notNull": true
484
+ },
485
+ "expires_at": {
486
+ "name": "expires_at",
487
+ "type": "timestamp with time zone",
488
+ "primaryKey": false,
489
+ "notNull": true
490
+ }
491
+ },
492
+ "indexes": {},
493
+ "foreignKeys": {
494
+ "idempotency_keys_workspace_id_workspaces_id_fk": {
495
+ "name": "idempotency_keys_workspace_id_workspaces_id_fk",
496
+ "tableFrom": "idempotency_keys",
497
+ "tableTo": "workspaces",
498
+ "columnsFrom": ["workspace_id"],
499
+ "columnsTo": ["id"],
500
+ "onDelete": "cascade",
501
+ "onUpdate": "no action"
502
+ }
503
+ },
504
+ "compositePrimaryKeys": {
505
+ "idempotency_keys_workspace_id_key_pk": {
506
+ "name": "idempotency_keys_workspace_id_key_pk",
507
+ "columns": ["workspace_id", "key"]
508
+ }
509
+ },
510
+ "uniqueConstraints": {},
511
+ "policies": {},
512
+ "checkConstraints": {},
513
+ "isRLSEnabled": false
514
+ },
515
+ "public.jobs": {
516
+ "name": "jobs",
517
+ "schema": "",
518
+ "columns": {
519
+ "id": {
520
+ "name": "id",
521
+ "type": "bigserial",
522
+ "primaryKey": true,
523
+ "notNull": true
524
+ },
525
+ "kind": {
526
+ "name": "kind",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": true
530
+ },
531
+ "workspace_id": {
532
+ "name": "workspace_id",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": true
536
+ },
537
+ "payload": {
538
+ "name": "payload",
539
+ "type": "jsonb",
540
+ "primaryKey": false,
541
+ "notNull": true
542
+ },
543
+ "run_at": {
544
+ "name": "run_at",
545
+ "type": "timestamp with time zone",
546
+ "primaryKey": false,
547
+ "notNull": true,
548
+ "default": "now()"
549
+ },
550
+ "attempts": {
551
+ "name": "attempts",
552
+ "type": "integer",
553
+ "primaryKey": false,
554
+ "notNull": true,
555
+ "default": 0
556
+ },
557
+ "locked_until": {
558
+ "name": "locked_until",
559
+ "type": "timestamp with time zone",
560
+ "primaryKey": false,
561
+ "notNull": false
562
+ },
563
+ "last_error": {
564
+ "name": "last_error",
565
+ "type": "text",
566
+ "primaryKey": false,
567
+ "notNull": false
568
+ }
569
+ },
570
+ "indexes": {
571
+ "jobs_due_idx": {
572
+ "name": "jobs_due_idx",
573
+ "columns": [
574
+ {
575
+ "expression": "run_at",
576
+ "isExpression": false,
577
+ "asc": true,
578
+ "nulls": "last"
579
+ }
580
+ ],
581
+ "isUnique": false,
582
+ "concurrently": false,
583
+ "method": "btree",
584
+ "with": {}
585
+ }
586
+ },
587
+ "foreignKeys": {
588
+ "jobs_workspace_id_workspaces_id_fk": {
589
+ "name": "jobs_workspace_id_workspaces_id_fk",
590
+ "tableFrom": "jobs",
591
+ "tableTo": "workspaces",
592
+ "columnsFrom": ["workspace_id"],
593
+ "columnsTo": ["id"],
594
+ "onDelete": "cascade",
595
+ "onUpdate": "no action"
596
+ }
597
+ },
598
+ "compositePrimaryKeys": {},
599
+ "uniqueConstraints": {},
600
+ "policies": {},
601
+ "checkConstraints": {},
602
+ "isRLSEnabled": false
603
+ },
604
+ "public.api_keys": {
605
+ "name": "api_keys",
606
+ "schema": "",
607
+ "columns": {
608
+ "id": {
609
+ "name": "id",
610
+ "type": "text",
611
+ "primaryKey": true,
612
+ "notNull": true
613
+ },
614
+ "workspace_id": {
615
+ "name": "workspace_id",
616
+ "type": "text",
617
+ "primaryKey": false,
618
+ "notNull": true
619
+ },
620
+ "connection_id": {
621
+ "name": "connection_id",
622
+ "type": "text",
623
+ "primaryKey": false,
624
+ "notNull": false
625
+ },
626
+ "scope": {
627
+ "name": "scope",
628
+ "type": "api_key_scope",
629
+ "typeSchema": "public",
630
+ "primaryKey": false,
631
+ "notNull": true
632
+ },
633
+ "name": {
634
+ "name": "name",
635
+ "type": "text",
636
+ "primaryKey": false,
637
+ "notNull": false
638
+ },
639
+ "display_prefix": {
640
+ "name": "display_prefix",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": true
644
+ },
645
+ "hash": {
646
+ "name": "hash",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true
650
+ },
651
+ "last_used_at": {
652
+ "name": "last_used_at",
653
+ "type": "timestamp with time zone",
654
+ "primaryKey": false,
655
+ "notNull": false
656
+ },
657
+ "revoked_at": {
658
+ "name": "revoked_at",
659
+ "type": "timestamp with time zone",
660
+ "primaryKey": false,
661
+ "notNull": false
662
+ },
663
+ "created_at": {
664
+ "name": "created_at",
665
+ "type": "timestamp with time zone",
666
+ "primaryKey": false,
667
+ "notNull": true,
668
+ "default": "now()"
669
+ }
670
+ },
671
+ "indexes": {},
672
+ "foreignKeys": {
673
+ "api_keys_workspace_id_workspaces_id_fk": {
674
+ "name": "api_keys_workspace_id_workspaces_id_fk",
675
+ "tableFrom": "api_keys",
676
+ "tableTo": "workspaces",
677
+ "columnsFrom": ["workspace_id"],
678
+ "columnsTo": ["id"],
679
+ "onDelete": "cascade",
680
+ "onUpdate": "no action"
681
+ },
682
+ "api_keys_connection_id_connections_id_fk": {
683
+ "name": "api_keys_connection_id_connections_id_fk",
684
+ "tableFrom": "api_keys",
685
+ "tableTo": "connections",
686
+ "columnsFrom": ["connection_id"],
687
+ "columnsTo": ["id"],
688
+ "onDelete": "cascade",
689
+ "onUpdate": "no action"
690
+ }
691
+ },
692
+ "compositePrimaryKeys": {},
693
+ "uniqueConstraints": {
694
+ "api_keys_hash_unique": {
695
+ "name": "api_keys_hash_unique",
696
+ "nullsNotDistinct": false,
697
+ "columns": ["hash"]
698
+ }
699
+ },
700
+ "policies": {},
701
+ "checkConstraints": {
702
+ "api_keys_scope": {
703
+ "name": "api_keys_scope",
704
+ "value": "(\"api_keys\".\"scope\" = 'connection') = (\"api_keys\".\"connection_id\" is not null)"
705
+ }
706
+ },
707
+ "isRLSEnabled": false
708
+ },
709
+ "public.api_logs": {
710
+ "name": "api_logs",
711
+ "schema": "",
712
+ "columns": {
713
+ "id": {
714
+ "name": "id",
715
+ "type": "text",
716
+ "primaryKey": true,
717
+ "notNull": true
718
+ },
719
+ "workspace_id": {
720
+ "name": "workspace_id",
721
+ "type": "text",
722
+ "primaryKey": false,
723
+ "notNull": false
724
+ },
725
+ "connection_id": {
726
+ "name": "connection_id",
727
+ "type": "text",
728
+ "primaryKey": false,
729
+ "notNull": false
730
+ },
731
+ "dialect": {
732
+ "name": "dialect",
733
+ "type": "api_dialect",
734
+ "typeSchema": "public",
735
+ "primaryKey": false,
736
+ "notNull": true
737
+ },
738
+ "method": {
739
+ "name": "method",
740
+ "type": "text",
741
+ "primaryKey": false,
742
+ "notNull": true
743
+ },
744
+ "path": {
745
+ "name": "path",
746
+ "type": "text",
747
+ "primaryKey": false,
748
+ "notNull": true
749
+ },
750
+ "status_code": {
751
+ "name": "status_code",
752
+ "type": "integer",
753
+ "primaryKey": false,
754
+ "notNull": true
755
+ },
756
+ "duration_ms": {
757
+ "name": "duration_ms",
758
+ "type": "integer",
759
+ "primaryKey": false,
760
+ "notNull": true
761
+ },
762
+ "request_headers": {
763
+ "name": "request_headers",
764
+ "type": "jsonb",
765
+ "primaryKey": false,
766
+ "notNull": false
767
+ },
768
+ "request_body": {
769
+ "name": "request_body",
770
+ "type": "jsonb",
771
+ "primaryKey": false,
772
+ "notNull": false
773
+ },
774
+ "response_body": {
775
+ "name": "response_body",
776
+ "type": "jsonb",
777
+ "primaryKey": false,
778
+ "notNull": false
779
+ },
780
+ "message_ids": {
781
+ "name": "message_ids",
782
+ "type": "text[]",
783
+ "primaryKey": false,
784
+ "notNull": false
785
+ },
786
+ "error_code": {
787
+ "name": "error_code",
788
+ "type": "text",
789
+ "primaryKey": false,
790
+ "notNull": false
791
+ },
792
+ "ip": {
793
+ "name": "ip",
794
+ "type": "text",
795
+ "primaryKey": false,
796
+ "notNull": false
797
+ },
798
+ "created_at": {
799
+ "name": "created_at",
800
+ "type": "timestamp with time zone",
801
+ "primaryKey": false,
802
+ "notNull": true,
803
+ "default": "now()"
804
+ }
805
+ },
806
+ "indexes": {
807
+ "api_logs_ws_time_idx": {
808
+ "name": "api_logs_ws_time_idx",
809
+ "columns": [
810
+ {
811
+ "expression": "workspace_id",
812
+ "isExpression": false,
813
+ "asc": true,
814
+ "nulls": "last"
815
+ },
816
+ {
817
+ "expression": "created_at",
818
+ "isExpression": false,
819
+ "asc": false,
820
+ "nulls": "last"
821
+ }
822
+ ],
823
+ "isUnique": false,
824
+ "concurrently": false,
825
+ "method": "btree",
826
+ "with": {}
827
+ }
828
+ },
829
+ "foreignKeys": {
830
+ "api_logs_workspace_id_workspaces_id_fk": {
831
+ "name": "api_logs_workspace_id_workspaces_id_fk",
832
+ "tableFrom": "api_logs",
833
+ "tableTo": "workspaces",
834
+ "columnsFrom": ["workspace_id"],
835
+ "columnsTo": ["id"],
836
+ "onDelete": "cascade",
837
+ "onUpdate": "no action"
838
+ },
839
+ "api_logs_connection_id_connections_id_fk": {
840
+ "name": "api_logs_connection_id_connections_id_fk",
841
+ "tableFrom": "api_logs",
842
+ "tableTo": "connections",
843
+ "columnsFrom": ["connection_id"],
844
+ "columnsTo": ["id"],
845
+ "onDelete": "set null",
846
+ "onUpdate": "no action"
847
+ }
848
+ },
849
+ "compositePrimaryKeys": {},
850
+ "uniqueConstraints": {},
851
+ "policies": {},
852
+ "checkConstraints": {},
853
+ "isRLSEnabled": false
854
+ },
855
+ "public.smtp_sessions": {
856
+ "name": "smtp_sessions",
857
+ "schema": "",
858
+ "columns": {
859
+ "id": {
860
+ "name": "id",
861
+ "type": "text",
862
+ "primaryKey": true,
863
+ "notNull": true
864
+ },
865
+ "workspace_id": {
866
+ "name": "workspace_id",
867
+ "type": "text",
868
+ "primaryKey": false,
869
+ "notNull": false
870
+ },
871
+ "connection_id": {
872
+ "name": "connection_id",
873
+ "type": "text",
874
+ "primaryKey": false,
875
+ "notNull": false
876
+ },
877
+ "remote_address": {
878
+ "name": "remote_address",
879
+ "type": "text",
880
+ "primaryKey": false,
881
+ "notNull": true
882
+ },
883
+ "client_hostname": {
884
+ "name": "client_hostname",
885
+ "type": "text",
886
+ "primaryKey": false,
887
+ "notNull": false
888
+ },
889
+ "auth_user": {
890
+ "name": "auth_user",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": false
894
+ },
895
+ "secure": {
896
+ "name": "secure",
897
+ "type": "boolean",
898
+ "primaryKey": false,
899
+ "notNull": true,
900
+ "default": false
901
+ },
902
+ "transcript": {
903
+ "name": "transcript",
904
+ "type": "jsonb",
905
+ "primaryKey": false,
906
+ "notNull": true
907
+ },
908
+ "message_ids": {
909
+ "name": "message_ids",
910
+ "type": "text[]",
911
+ "primaryKey": false,
912
+ "notNull": false
913
+ },
914
+ "outcome": {
915
+ "name": "outcome",
916
+ "type": "smtp_outcome",
917
+ "typeSchema": "public",
918
+ "primaryKey": false,
919
+ "notNull": true
920
+ },
921
+ "error": {
922
+ "name": "error",
923
+ "type": "text",
924
+ "primaryKey": false,
925
+ "notNull": false
926
+ },
927
+ "started_at": {
928
+ "name": "started_at",
929
+ "type": "timestamp with time zone",
930
+ "primaryKey": false,
931
+ "notNull": true
932
+ },
933
+ "ended_at": {
934
+ "name": "ended_at",
935
+ "type": "timestamp with time zone",
936
+ "primaryKey": false,
937
+ "notNull": false
938
+ }
939
+ },
940
+ "indexes": {
941
+ "smtp_sessions_ws_time_idx": {
942
+ "name": "smtp_sessions_ws_time_idx",
943
+ "columns": [
944
+ {
945
+ "expression": "workspace_id",
946
+ "isExpression": false,
947
+ "asc": true,
948
+ "nulls": "last"
949
+ },
950
+ {
951
+ "expression": "started_at",
952
+ "isExpression": false,
953
+ "asc": false,
954
+ "nulls": "last"
955
+ }
956
+ ],
957
+ "isUnique": false,
958
+ "concurrently": false,
959
+ "method": "btree",
960
+ "with": {}
961
+ }
962
+ },
963
+ "foreignKeys": {
964
+ "smtp_sessions_workspace_id_workspaces_id_fk": {
965
+ "name": "smtp_sessions_workspace_id_workspaces_id_fk",
966
+ "tableFrom": "smtp_sessions",
967
+ "tableTo": "workspaces",
968
+ "columnsFrom": ["workspace_id"],
969
+ "columnsTo": ["id"],
970
+ "onDelete": "cascade",
971
+ "onUpdate": "no action"
972
+ },
973
+ "smtp_sessions_connection_id_connections_id_fk": {
974
+ "name": "smtp_sessions_connection_id_connections_id_fk",
975
+ "tableFrom": "smtp_sessions",
976
+ "tableTo": "connections",
977
+ "columnsFrom": ["connection_id"],
978
+ "columnsTo": ["id"],
979
+ "onDelete": "set null",
980
+ "onUpdate": "no action"
981
+ }
982
+ },
983
+ "compositePrimaryKeys": {},
984
+ "uniqueConstraints": {},
985
+ "policies": {},
986
+ "checkConstraints": {},
987
+ "isRLSEnabled": false
988
+ },
989
+ "public.message_recipients": {
990
+ "name": "message_recipients",
991
+ "schema": "",
992
+ "columns": {
993
+ "id": {
994
+ "name": "id",
995
+ "type": "text",
996
+ "primaryKey": true,
997
+ "notNull": true
998
+ },
999
+ "message_id": {
1000
+ "name": "message_id",
1001
+ "type": "text",
1002
+ "primaryKey": false,
1003
+ "notNull": true
1004
+ },
1005
+ "workspace_id": {
1006
+ "name": "workspace_id",
1007
+ "type": "text",
1008
+ "primaryKey": false,
1009
+ "notNull": true
1010
+ },
1011
+ "kind": {
1012
+ "name": "kind",
1013
+ "type": "recipient_kind",
1014
+ "typeSchema": "public",
1015
+ "primaryKey": false,
1016
+ "notNull": true
1017
+ },
1018
+ "email": {
1019
+ "name": "email",
1020
+ "type": "text",
1021
+ "primaryKey": false,
1022
+ "notNull": true
1023
+ },
1024
+ "name": {
1025
+ "name": "name",
1026
+ "type": "text",
1027
+ "primaryKey": false,
1028
+ "notNull": false
1029
+ },
1030
+ "status": {
1031
+ "name": "status",
1032
+ "type": "delivery_status",
1033
+ "typeSchema": "public",
1034
+ "primaryKey": false,
1035
+ "notNull": true,
1036
+ "default": "'queued'"
1037
+ },
1038
+ "status_reason": {
1039
+ "name": "status_reason",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": false
1043
+ },
1044
+ "updated_at": {
1045
+ "name": "updated_at",
1046
+ "type": "timestamp with time zone",
1047
+ "primaryKey": false,
1048
+ "notNull": true,
1049
+ "default": "now()"
1050
+ }
1051
+ },
1052
+ "indexes": {
1053
+ "recipients_ws_email_idx": {
1054
+ "name": "recipients_ws_email_idx",
1055
+ "columns": [
1056
+ {
1057
+ "expression": "workspace_id",
1058
+ "isExpression": false,
1059
+ "asc": true,
1060
+ "nulls": "last"
1061
+ },
1062
+ {
1063
+ "expression": "email",
1064
+ "isExpression": false,
1065
+ "asc": true,
1066
+ "nulls": "last"
1067
+ }
1068
+ ],
1069
+ "isUnique": false,
1070
+ "concurrently": false,
1071
+ "method": "btree",
1072
+ "with": {}
1073
+ },
1074
+ "recipients_message_idx": {
1075
+ "name": "recipients_message_idx",
1076
+ "columns": [
1077
+ {
1078
+ "expression": "message_id",
1079
+ "isExpression": false,
1080
+ "asc": true,
1081
+ "nulls": "last"
1082
+ }
1083
+ ],
1084
+ "isUnique": false,
1085
+ "concurrently": false,
1086
+ "method": "btree",
1087
+ "with": {}
1088
+ }
1089
+ },
1090
+ "foreignKeys": {
1091
+ "message_recipients_message_id_messages_id_fk": {
1092
+ "name": "message_recipients_message_id_messages_id_fk",
1093
+ "tableFrom": "message_recipients",
1094
+ "tableTo": "messages",
1095
+ "columnsFrom": ["message_id"],
1096
+ "columnsTo": ["id"],
1097
+ "onDelete": "cascade",
1098
+ "onUpdate": "no action"
1099
+ }
1100
+ },
1101
+ "compositePrimaryKeys": {},
1102
+ "uniqueConstraints": {},
1103
+ "policies": {},
1104
+ "checkConstraints": {},
1105
+ "isRLSEnabled": false
1106
+ },
1107
+ "public.messages": {
1108
+ "name": "messages",
1109
+ "schema": "",
1110
+ "columns": {
1111
+ "id": {
1112
+ "name": "id",
1113
+ "type": "text",
1114
+ "primaryKey": true,
1115
+ "notNull": true
1116
+ },
1117
+ "workspace_id": {
1118
+ "name": "workspace_id",
1119
+ "type": "text",
1120
+ "primaryKey": false,
1121
+ "notNull": true
1122
+ },
1123
+ "connection_id": {
1124
+ "name": "connection_id",
1125
+ "type": "text",
1126
+ "primaryKey": false,
1127
+ "notNull": false
1128
+ },
1129
+ "source": {
1130
+ "name": "source",
1131
+ "type": "message_source",
1132
+ "typeSchema": "public",
1133
+ "primaryKey": false,
1134
+ "notNull": true
1135
+ },
1136
+ "provider_message_id": {
1137
+ "name": "provider_message_id",
1138
+ "type": "text",
1139
+ "primaryKey": false,
1140
+ "notNull": true
1141
+ },
1142
+ "from": {
1143
+ "name": "from",
1144
+ "type": "jsonb",
1145
+ "primaryKey": false,
1146
+ "notNull": true
1147
+ },
1148
+ "reply_to": {
1149
+ "name": "reply_to",
1150
+ "type": "jsonb",
1151
+ "primaryKey": false,
1152
+ "notNull": false
1153
+ },
1154
+ "subject": {
1155
+ "name": "subject",
1156
+ "type": "text",
1157
+ "primaryKey": false,
1158
+ "notNull": true,
1159
+ "default": "''"
1160
+ },
1161
+ "html": {
1162
+ "name": "html",
1163
+ "type": "text",
1164
+ "primaryKey": false,
1165
+ "notNull": false
1166
+ },
1167
+ "text": {
1168
+ "name": "text",
1169
+ "type": "text",
1170
+ "primaryKey": false,
1171
+ "notNull": false
1172
+ },
1173
+ "headers": {
1174
+ "name": "headers",
1175
+ "type": "jsonb",
1176
+ "primaryKey": false,
1177
+ "notNull": true,
1178
+ "default": "'{}'::jsonb"
1179
+ },
1180
+ "tags": {
1181
+ "name": "tags",
1182
+ "type": "jsonb",
1183
+ "primaryKey": false,
1184
+ "notNull": true,
1185
+ "default": "'[]'::jsonb"
1186
+ },
1187
+ "metadata": {
1188
+ "name": "metadata",
1189
+ "type": "jsonb",
1190
+ "primaryKey": false,
1191
+ "notNull": false
1192
+ },
1193
+ "template_ref": {
1194
+ "name": "template_ref",
1195
+ "type": "jsonb",
1196
+ "primaryKey": false,
1197
+ "notNull": false
1198
+ },
1199
+ "links": {
1200
+ "name": "links",
1201
+ "type": "jsonb",
1202
+ "primaryKey": false,
1203
+ "notNull": true,
1204
+ "default": "'[]'::jsonb"
1205
+ },
1206
+ "raw_blob_id": {
1207
+ "name": "raw_blob_id",
1208
+ "type": "text",
1209
+ "primaryKey": false,
1210
+ "notNull": false
1211
+ },
1212
+ "size_bytes": {
1213
+ "name": "size_bytes",
1214
+ "type": "integer",
1215
+ "primaryKey": false,
1216
+ "notNull": true
1217
+ },
1218
+ "status": {
1219
+ "name": "status",
1220
+ "type": "delivery_status",
1221
+ "typeSchema": "public",
1222
+ "primaryKey": false,
1223
+ "notNull": true,
1224
+ "default": "'queued'"
1225
+ },
1226
+ "simulation": {
1227
+ "name": "simulation",
1228
+ "type": "jsonb",
1229
+ "primaryKey": false,
1230
+ "notNull": false
1231
+ },
1232
+ "idempotency_key": {
1233
+ "name": "idempotency_key",
1234
+ "type": "text",
1235
+ "primaryKey": false,
1236
+ "notNull": false
1237
+ },
1238
+ "created_at": {
1239
+ "name": "created_at",
1240
+ "type": "timestamp with time zone",
1241
+ "primaryKey": false,
1242
+ "notNull": true,
1243
+ "default": "now()"
1244
+ },
1245
+ "status_updated_at": {
1246
+ "name": "status_updated_at",
1247
+ "type": "timestamp with time zone",
1248
+ "primaryKey": false,
1249
+ "notNull": true,
1250
+ "default": "now()"
1251
+ }
1252
+ },
1253
+ "indexes": {
1254
+ "messages_raw_blob_idx": {
1255
+ "name": "messages_raw_blob_idx",
1256
+ "columns": [
1257
+ {
1258
+ "expression": "raw_blob_id",
1259
+ "isExpression": false,
1260
+ "asc": true,
1261
+ "nulls": "last"
1262
+ }
1263
+ ],
1264
+ "isUnique": false,
1265
+ "concurrently": false,
1266
+ "method": "btree",
1267
+ "with": {}
1268
+ },
1269
+ "messages_ws_created_idx": {
1270
+ "name": "messages_ws_created_idx",
1271
+ "columns": [
1272
+ {
1273
+ "expression": "workspace_id",
1274
+ "isExpression": false,
1275
+ "asc": true,
1276
+ "nulls": "last"
1277
+ },
1278
+ {
1279
+ "expression": "created_at",
1280
+ "isExpression": false,
1281
+ "asc": false,
1282
+ "nulls": "last"
1283
+ }
1284
+ ],
1285
+ "isUnique": false,
1286
+ "concurrently": false,
1287
+ "method": "btree",
1288
+ "with": {}
1289
+ },
1290
+ "messages_ws_status_idx": {
1291
+ "name": "messages_ws_status_idx",
1292
+ "columns": [
1293
+ {
1294
+ "expression": "workspace_id",
1295
+ "isExpression": false,
1296
+ "asc": true,
1297
+ "nulls": "last"
1298
+ },
1299
+ {
1300
+ "expression": "status",
1301
+ "isExpression": false,
1302
+ "asc": true,
1303
+ "nulls": "last"
1304
+ }
1305
+ ],
1306
+ "isUnique": false,
1307
+ "concurrently": false,
1308
+ "method": "btree",
1309
+ "with": {}
1310
+ },
1311
+ "messages_ws_connection_idx": {
1312
+ "name": "messages_ws_connection_idx",
1313
+ "columns": [
1314
+ {
1315
+ "expression": "workspace_id",
1316
+ "isExpression": false,
1317
+ "asc": true,
1318
+ "nulls": "last"
1319
+ },
1320
+ {
1321
+ "expression": "connection_id",
1322
+ "isExpression": false,
1323
+ "asc": true,
1324
+ "nulls": "last"
1325
+ },
1326
+ {
1327
+ "expression": "created_at",
1328
+ "isExpression": false,
1329
+ "asc": false,
1330
+ "nulls": "last"
1331
+ }
1332
+ ],
1333
+ "isUnique": false,
1334
+ "concurrently": false,
1335
+ "method": "btree",
1336
+ "with": {}
1337
+ },
1338
+ "messages_tags_gin": {
1339
+ "name": "messages_tags_gin",
1340
+ "columns": [
1341
+ {
1342
+ "expression": "tags",
1343
+ "isExpression": false,
1344
+ "asc": true,
1345
+ "nulls": "last"
1346
+ }
1347
+ ],
1348
+ "isUnique": false,
1349
+ "concurrently": false,
1350
+ "method": "gin",
1351
+ "with": {}
1352
+ },
1353
+ "messages_provider_id_uq": {
1354
+ "name": "messages_provider_id_uq",
1355
+ "columns": [
1356
+ {
1357
+ "expression": "workspace_id",
1358
+ "isExpression": false,
1359
+ "asc": true,
1360
+ "nulls": "last"
1361
+ },
1362
+ {
1363
+ "expression": "provider_message_id",
1364
+ "isExpression": false,
1365
+ "asc": true,
1366
+ "nulls": "last"
1367
+ }
1368
+ ],
1369
+ "isUnique": true,
1370
+ "concurrently": false,
1371
+ "method": "btree",
1372
+ "with": {}
1373
+ }
1374
+ },
1375
+ "foreignKeys": {
1376
+ "messages_workspace_id_workspaces_id_fk": {
1377
+ "name": "messages_workspace_id_workspaces_id_fk",
1378
+ "tableFrom": "messages",
1379
+ "tableTo": "workspaces",
1380
+ "columnsFrom": ["workspace_id"],
1381
+ "columnsTo": ["id"],
1382
+ "onDelete": "cascade",
1383
+ "onUpdate": "no action"
1384
+ },
1385
+ "messages_connection_id_connections_id_fk": {
1386
+ "name": "messages_connection_id_connections_id_fk",
1387
+ "tableFrom": "messages",
1388
+ "tableTo": "connections",
1389
+ "columnsFrom": ["connection_id"],
1390
+ "columnsTo": ["id"],
1391
+ "onDelete": "set null",
1392
+ "onUpdate": "no action"
1393
+ },
1394
+ "messages_raw_blob_id_blobs_id_fk": {
1395
+ "name": "messages_raw_blob_id_blobs_id_fk",
1396
+ "tableFrom": "messages",
1397
+ "tableTo": "blobs",
1398
+ "columnsFrom": ["raw_blob_id"],
1399
+ "columnsTo": ["id"],
1400
+ "onDelete": "set null",
1401
+ "onUpdate": "no action"
1402
+ }
1403
+ },
1404
+ "compositePrimaryKeys": {},
1405
+ "uniqueConstraints": {},
1406
+ "policies": {},
1407
+ "checkConstraints": {},
1408
+ "isRLSEnabled": false
1409
+ },
1410
+ "public.overrides": {
1411
+ "name": "overrides",
1412
+ "schema": "",
1413
+ "columns": {
1414
+ "id": {
1415
+ "name": "id",
1416
+ "type": "text",
1417
+ "primaryKey": true,
1418
+ "notNull": true
1419
+ },
1420
+ "workspace_id": {
1421
+ "name": "workspace_id",
1422
+ "type": "text",
1423
+ "primaryKey": false,
1424
+ "notNull": true
1425
+ },
1426
+ "connection_id": {
1427
+ "name": "connection_id",
1428
+ "type": "text",
1429
+ "primaryKey": false,
1430
+ "notNull": false
1431
+ },
1432
+ "config": {
1433
+ "name": "config",
1434
+ "type": "jsonb",
1435
+ "primaryKey": false,
1436
+ "notNull": true
1437
+ },
1438
+ "activated_via": {
1439
+ "name": "activated_via",
1440
+ "type": "event_origin",
1441
+ "typeSchema": "public",
1442
+ "primaryKey": false,
1443
+ "notNull": true
1444
+ },
1445
+ "expires_at": {
1446
+ "name": "expires_at",
1447
+ "type": "timestamp with time zone",
1448
+ "primaryKey": false,
1449
+ "notNull": false
1450
+ },
1451
+ "created_at": {
1452
+ "name": "created_at",
1453
+ "type": "timestamp with time zone",
1454
+ "primaryKey": false,
1455
+ "notNull": true,
1456
+ "default": "now()"
1457
+ },
1458
+ "reset_at": {
1459
+ "name": "reset_at",
1460
+ "type": "timestamp with time zone",
1461
+ "primaryKey": false,
1462
+ "notNull": false
1463
+ }
1464
+ },
1465
+ "indexes": {
1466
+ "overrides_active_scope_uq": {
1467
+ "name": "overrides_active_scope_uq",
1468
+ "columns": [
1469
+ {
1470
+ "expression": "workspace_id",
1471
+ "isExpression": false,
1472
+ "asc": true,
1473
+ "nulls": "last"
1474
+ },
1475
+ {
1476
+ "expression": "coalesce(\"connection_id\", '')",
1477
+ "asc": true,
1478
+ "isExpression": true,
1479
+ "nulls": "last"
1480
+ }
1481
+ ],
1482
+ "isUnique": true,
1483
+ "where": "\"overrides\".\"reset_at\" is null",
1484
+ "concurrently": false,
1485
+ "method": "btree",
1486
+ "with": {}
1487
+ }
1488
+ },
1489
+ "foreignKeys": {
1490
+ "overrides_workspace_id_workspaces_id_fk": {
1491
+ "name": "overrides_workspace_id_workspaces_id_fk",
1492
+ "tableFrom": "overrides",
1493
+ "tableTo": "workspaces",
1494
+ "columnsFrom": ["workspace_id"],
1495
+ "columnsTo": ["id"],
1496
+ "onDelete": "cascade",
1497
+ "onUpdate": "no action"
1498
+ },
1499
+ "overrides_connection_id_connections_id_fk": {
1500
+ "name": "overrides_connection_id_connections_id_fk",
1501
+ "tableFrom": "overrides",
1502
+ "tableTo": "connections",
1503
+ "columnsFrom": ["connection_id"],
1504
+ "columnsTo": ["id"],
1505
+ "onDelete": "cascade",
1506
+ "onUpdate": "no action"
1507
+ }
1508
+ },
1509
+ "compositePrimaryKeys": {},
1510
+ "uniqueConstraints": {},
1511
+ "policies": {},
1512
+ "checkConstraints": {},
1513
+ "isRLSEnabled": false
1514
+ },
1515
+ "public.suppressions": {
1516
+ "name": "suppressions",
1517
+ "schema": "",
1518
+ "columns": {
1519
+ "id": {
1520
+ "name": "id",
1521
+ "type": "text",
1522
+ "primaryKey": true,
1523
+ "notNull": true
1524
+ },
1525
+ "workspace_id": {
1526
+ "name": "workspace_id",
1527
+ "type": "text",
1528
+ "primaryKey": false,
1529
+ "notNull": true
1530
+ },
1531
+ "email": {
1532
+ "name": "email",
1533
+ "type": "text",
1534
+ "primaryKey": false,
1535
+ "notNull": true
1536
+ },
1537
+ "reason": {
1538
+ "name": "reason",
1539
+ "type": "suppression_reason",
1540
+ "typeSchema": "public",
1541
+ "primaryKey": false,
1542
+ "notNull": true
1543
+ },
1544
+ "message_id": {
1545
+ "name": "message_id",
1546
+ "type": "text",
1547
+ "primaryKey": false,
1548
+ "notNull": false
1549
+ },
1550
+ "created_at": {
1551
+ "name": "created_at",
1552
+ "type": "timestamp with time zone",
1553
+ "primaryKey": false,
1554
+ "notNull": true,
1555
+ "default": "now()"
1556
+ }
1557
+ },
1558
+ "indexes": {
1559
+ "suppressions_ws_email_uq": {
1560
+ "name": "suppressions_ws_email_uq",
1561
+ "columns": [
1562
+ {
1563
+ "expression": "workspace_id",
1564
+ "isExpression": false,
1565
+ "asc": true,
1566
+ "nulls": "last"
1567
+ },
1568
+ {
1569
+ "expression": "email",
1570
+ "isExpression": false,
1571
+ "asc": true,
1572
+ "nulls": "last"
1573
+ }
1574
+ ],
1575
+ "isUnique": true,
1576
+ "concurrently": false,
1577
+ "method": "btree",
1578
+ "with": {}
1579
+ }
1580
+ },
1581
+ "foreignKeys": {
1582
+ "suppressions_workspace_id_workspaces_id_fk": {
1583
+ "name": "suppressions_workspace_id_workspaces_id_fk",
1584
+ "tableFrom": "suppressions",
1585
+ "tableTo": "workspaces",
1586
+ "columnsFrom": ["workspace_id"],
1587
+ "columnsTo": ["id"],
1588
+ "onDelete": "cascade",
1589
+ "onUpdate": "no action"
1590
+ },
1591
+ "suppressions_message_id_messages_id_fk": {
1592
+ "name": "suppressions_message_id_messages_id_fk",
1593
+ "tableFrom": "suppressions",
1594
+ "tableTo": "messages",
1595
+ "columnsFrom": ["message_id"],
1596
+ "columnsTo": ["id"],
1597
+ "onDelete": "set null",
1598
+ "onUpdate": "no action"
1599
+ }
1600
+ },
1601
+ "compositePrimaryKeys": {},
1602
+ "uniqueConstraints": {},
1603
+ "policies": {},
1604
+ "checkConstraints": {},
1605
+ "isRLSEnabled": false
1606
+ },
1607
+ "public.templates": {
1608
+ "name": "templates",
1609
+ "schema": "",
1610
+ "columns": {
1611
+ "id": {
1612
+ "name": "id",
1613
+ "type": "text",
1614
+ "primaryKey": true,
1615
+ "notNull": true
1616
+ },
1617
+ "workspace_id": {
1618
+ "name": "workspace_id",
1619
+ "type": "text",
1620
+ "primaryKey": false,
1621
+ "notNull": true
1622
+ },
1623
+ "external_id": {
1624
+ "name": "external_id",
1625
+ "type": "integer",
1626
+ "primaryKey": false,
1627
+ "notNull": true
1628
+ },
1629
+ "name": {
1630
+ "name": "name",
1631
+ "type": "text",
1632
+ "primaryKey": false,
1633
+ "notNull": true
1634
+ },
1635
+ "subject": {
1636
+ "name": "subject",
1637
+ "type": "text",
1638
+ "primaryKey": false,
1639
+ "notNull": true
1640
+ },
1641
+ "html": {
1642
+ "name": "html",
1643
+ "type": "text",
1644
+ "primaryKey": false,
1645
+ "notNull": false
1646
+ },
1647
+ "text": {
1648
+ "name": "text",
1649
+ "type": "text",
1650
+ "primaryKey": false,
1651
+ "notNull": false
1652
+ },
1653
+ "sender": {
1654
+ "name": "sender",
1655
+ "type": "jsonb",
1656
+ "primaryKey": false,
1657
+ "notNull": false
1658
+ },
1659
+ "created_at": {
1660
+ "name": "created_at",
1661
+ "type": "timestamp with time zone",
1662
+ "primaryKey": false,
1663
+ "notNull": true,
1664
+ "default": "now()"
1665
+ },
1666
+ "updated_at": {
1667
+ "name": "updated_at",
1668
+ "type": "timestamp with time zone",
1669
+ "primaryKey": false,
1670
+ "notNull": true,
1671
+ "default": "now()"
1672
+ }
1673
+ },
1674
+ "indexes": {
1675
+ "templates_external_uq": {
1676
+ "name": "templates_external_uq",
1677
+ "columns": [
1678
+ {
1679
+ "expression": "workspace_id",
1680
+ "isExpression": false,
1681
+ "asc": true,
1682
+ "nulls": "last"
1683
+ },
1684
+ {
1685
+ "expression": "external_id",
1686
+ "isExpression": false,
1687
+ "asc": true,
1688
+ "nulls": "last"
1689
+ }
1690
+ ],
1691
+ "isUnique": true,
1692
+ "concurrently": false,
1693
+ "method": "btree",
1694
+ "with": {}
1695
+ }
1696
+ },
1697
+ "foreignKeys": {
1698
+ "templates_workspace_id_workspaces_id_fk": {
1699
+ "name": "templates_workspace_id_workspaces_id_fk",
1700
+ "tableFrom": "templates",
1701
+ "tableTo": "workspaces",
1702
+ "columnsFrom": ["workspace_id"],
1703
+ "columnsTo": ["id"],
1704
+ "onDelete": "cascade",
1705
+ "onUpdate": "no action"
1706
+ }
1707
+ },
1708
+ "compositePrimaryKeys": {},
1709
+ "uniqueConstraints": {},
1710
+ "policies": {},
1711
+ "checkConstraints": {},
1712
+ "isRLSEnabled": false
1713
+ },
1714
+ "public.webhook_attempts": {
1715
+ "name": "webhook_attempts",
1716
+ "schema": "",
1717
+ "columns": {
1718
+ "id": {
1719
+ "name": "id",
1720
+ "type": "text",
1721
+ "primaryKey": true,
1722
+ "notNull": true
1723
+ },
1724
+ "delivery_id": {
1725
+ "name": "delivery_id",
1726
+ "type": "text",
1727
+ "primaryKey": false,
1728
+ "notNull": true
1729
+ },
1730
+ "attempt_no": {
1731
+ "name": "attempt_no",
1732
+ "type": "integer",
1733
+ "primaryKey": false,
1734
+ "notNull": true
1735
+ },
1736
+ "request_headers": {
1737
+ "name": "request_headers",
1738
+ "type": "jsonb",
1739
+ "primaryKey": false,
1740
+ "notNull": true
1741
+ },
1742
+ "signed_at": {
1743
+ "name": "signed_at",
1744
+ "type": "integer",
1745
+ "primaryKey": false,
1746
+ "notNull": false
1747
+ },
1748
+ "response_status": {
1749
+ "name": "response_status",
1750
+ "type": "integer",
1751
+ "primaryKey": false,
1752
+ "notNull": false
1753
+ },
1754
+ "response_body": {
1755
+ "name": "response_body",
1756
+ "type": "text",
1757
+ "primaryKey": false,
1758
+ "notNull": false
1759
+ },
1760
+ "duration_ms": {
1761
+ "name": "duration_ms",
1762
+ "type": "integer",
1763
+ "primaryKey": false,
1764
+ "notNull": true
1765
+ },
1766
+ "error": {
1767
+ "name": "error",
1768
+ "type": "text",
1769
+ "primaryKey": false,
1770
+ "notNull": false
1771
+ },
1772
+ "created_at": {
1773
+ "name": "created_at",
1774
+ "type": "timestamp with time zone",
1775
+ "primaryKey": false,
1776
+ "notNull": true,
1777
+ "default": "now()"
1778
+ }
1779
+ },
1780
+ "indexes": {
1781
+ "attempts_delivery_idx": {
1782
+ "name": "attempts_delivery_idx",
1783
+ "columns": [
1784
+ {
1785
+ "expression": "delivery_id",
1786
+ "isExpression": false,
1787
+ "asc": true,
1788
+ "nulls": "last"
1789
+ }
1790
+ ],
1791
+ "isUnique": false,
1792
+ "concurrently": false,
1793
+ "method": "btree",
1794
+ "with": {}
1795
+ }
1796
+ },
1797
+ "foreignKeys": {
1798
+ "webhook_attempts_delivery_id_webhook_deliveries_id_fk": {
1799
+ "name": "webhook_attempts_delivery_id_webhook_deliveries_id_fk",
1800
+ "tableFrom": "webhook_attempts",
1801
+ "tableTo": "webhook_deliveries",
1802
+ "columnsFrom": ["delivery_id"],
1803
+ "columnsTo": ["id"],
1804
+ "onDelete": "cascade",
1805
+ "onUpdate": "no action"
1806
+ }
1807
+ },
1808
+ "compositePrimaryKeys": {},
1809
+ "uniqueConstraints": {},
1810
+ "policies": {},
1811
+ "checkConstraints": {},
1812
+ "isRLSEnabled": false
1813
+ },
1814
+ "public.webhook_deliveries": {
1815
+ "name": "webhook_deliveries",
1816
+ "schema": "",
1817
+ "columns": {
1818
+ "id": {
1819
+ "name": "id",
1820
+ "type": "text",
1821
+ "primaryKey": true,
1822
+ "notNull": true
1823
+ },
1824
+ "workspace_id": {
1825
+ "name": "workspace_id",
1826
+ "type": "text",
1827
+ "primaryKey": false,
1828
+ "notNull": true
1829
+ },
1830
+ "endpoint_id": {
1831
+ "name": "endpoint_id",
1832
+ "type": "text",
1833
+ "primaryKey": false,
1834
+ "notNull": true
1835
+ },
1836
+ "event_id": {
1837
+ "name": "event_id",
1838
+ "type": "text",
1839
+ "primaryKey": false,
1840
+ "notNull": false
1841
+ },
1842
+ "message_id": {
1843
+ "name": "message_id",
1844
+ "type": "text",
1845
+ "primaryKey": false,
1846
+ "notNull": false
1847
+ },
1848
+ "payload_format": {
1849
+ "name": "payload_format",
1850
+ "type": "payload_format",
1851
+ "typeSchema": "public",
1852
+ "primaryKey": false,
1853
+ "notNull": true
1854
+ },
1855
+ "canonical_event": {
1856
+ "name": "canonical_event",
1857
+ "type": "webhook_event",
1858
+ "typeSchema": "public",
1859
+ "primaryKey": false,
1860
+ "notNull": true
1861
+ },
1862
+ "dialect_event": {
1863
+ "name": "dialect_event",
1864
+ "type": "text",
1865
+ "primaryKey": false,
1866
+ "notNull": true
1867
+ },
1868
+ "recipient": {
1869
+ "name": "recipient",
1870
+ "type": "text",
1871
+ "primaryKey": false,
1872
+ "notNull": false
1873
+ },
1874
+ "body": {
1875
+ "name": "body",
1876
+ "type": "text",
1877
+ "primaryKey": false,
1878
+ "notNull": true
1879
+ },
1880
+ "content_type": {
1881
+ "name": "content_type",
1882
+ "type": "text",
1883
+ "primaryKey": false,
1884
+ "notNull": true,
1885
+ "default": "'application/json'"
1886
+ },
1887
+ "status": {
1888
+ "name": "status",
1889
+ "type": "webhook_delivery_status",
1890
+ "typeSchema": "public",
1891
+ "primaryKey": false,
1892
+ "notNull": true,
1893
+ "default": "'pending'"
1894
+ },
1895
+ "attempt_count": {
1896
+ "name": "attempt_count",
1897
+ "type": "integer",
1898
+ "primaryKey": false,
1899
+ "notNull": true,
1900
+ "default": 0
1901
+ },
1902
+ "next_attempt_at": {
1903
+ "name": "next_attempt_at",
1904
+ "type": "timestamp with time zone",
1905
+ "primaryKey": false,
1906
+ "notNull": false
1907
+ },
1908
+ "last_status_code": {
1909
+ "name": "last_status_code",
1910
+ "type": "integer",
1911
+ "primaryKey": false,
1912
+ "notNull": false
1913
+ },
1914
+ "replay_of": {
1915
+ "name": "replay_of",
1916
+ "type": "text",
1917
+ "primaryKey": false,
1918
+ "notNull": false
1919
+ },
1920
+ "replay_mode": {
1921
+ "name": "replay_mode",
1922
+ "type": "replay_mode",
1923
+ "typeSchema": "public",
1924
+ "primaryKey": false,
1925
+ "notNull": false
1926
+ },
1927
+ "created_at": {
1928
+ "name": "created_at",
1929
+ "type": "timestamp with time zone",
1930
+ "primaryKey": false,
1931
+ "notNull": true,
1932
+ "default": "now()"
1933
+ }
1934
+ },
1935
+ "indexes": {
1936
+ "deliveries_ws_time_idx": {
1937
+ "name": "deliveries_ws_time_idx",
1938
+ "columns": [
1939
+ {
1940
+ "expression": "workspace_id",
1941
+ "isExpression": false,
1942
+ "asc": true,
1943
+ "nulls": "last"
1944
+ },
1945
+ {
1946
+ "expression": "created_at",
1947
+ "isExpression": false,
1948
+ "asc": false,
1949
+ "nulls": "last"
1950
+ }
1951
+ ],
1952
+ "isUnique": false,
1953
+ "concurrently": false,
1954
+ "method": "btree",
1955
+ "with": {}
1956
+ },
1957
+ "deliveries_message_idx": {
1958
+ "name": "deliveries_message_idx",
1959
+ "columns": [
1960
+ {
1961
+ "expression": "message_id",
1962
+ "isExpression": false,
1963
+ "asc": true,
1964
+ "nulls": "last"
1965
+ }
1966
+ ],
1967
+ "isUnique": false,
1968
+ "concurrently": false,
1969
+ "method": "btree",
1970
+ "with": {}
1971
+ },
1972
+ "deliveries_ws_format_idx": {
1973
+ "name": "deliveries_ws_format_idx",
1974
+ "columns": [
1975
+ {
1976
+ "expression": "workspace_id",
1977
+ "isExpression": false,
1978
+ "asc": true,
1979
+ "nulls": "last"
1980
+ },
1981
+ {
1982
+ "expression": "payload_format",
1983
+ "isExpression": false,
1984
+ "asc": true,
1985
+ "nulls": "last"
1986
+ }
1987
+ ],
1988
+ "isUnique": false,
1989
+ "concurrently": false,
1990
+ "method": "btree",
1991
+ "with": {}
1992
+ }
1993
+ },
1994
+ "foreignKeys": {
1995
+ "webhook_deliveries_workspace_id_workspaces_id_fk": {
1996
+ "name": "webhook_deliveries_workspace_id_workspaces_id_fk",
1997
+ "tableFrom": "webhook_deliveries",
1998
+ "tableTo": "workspaces",
1999
+ "columnsFrom": ["workspace_id"],
2000
+ "columnsTo": ["id"],
2001
+ "onDelete": "cascade",
2002
+ "onUpdate": "no action"
2003
+ },
2004
+ "webhook_deliveries_endpoint_id_webhook_endpoints_id_fk": {
2005
+ "name": "webhook_deliveries_endpoint_id_webhook_endpoints_id_fk",
2006
+ "tableFrom": "webhook_deliveries",
2007
+ "tableTo": "webhook_endpoints",
2008
+ "columnsFrom": ["endpoint_id"],
2009
+ "columnsTo": ["id"],
2010
+ "onDelete": "cascade",
2011
+ "onUpdate": "no action"
2012
+ },
2013
+ "webhook_deliveries_event_id_message_events_id_fk": {
2014
+ "name": "webhook_deliveries_event_id_message_events_id_fk",
2015
+ "tableFrom": "webhook_deliveries",
2016
+ "tableTo": "message_events",
2017
+ "columnsFrom": ["event_id"],
2018
+ "columnsTo": ["id"],
2019
+ "onDelete": "set null",
2020
+ "onUpdate": "no action"
2021
+ },
2022
+ "webhook_deliveries_message_id_messages_id_fk": {
2023
+ "name": "webhook_deliveries_message_id_messages_id_fk",
2024
+ "tableFrom": "webhook_deliveries",
2025
+ "tableTo": "messages",
2026
+ "columnsFrom": ["message_id"],
2027
+ "columnsTo": ["id"],
2028
+ "onDelete": "set null",
2029
+ "onUpdate": "no action"
2030
+ }
2031
+ },
2032
+ "compositePrimaryKeys": {},
2033
+ "uniqueConstraints": {},
2034
+ "policies": {},
2035
+ "checkConstraints": {},
2036
+ "isRLSEnabled": false
2037
+ },
2038
+ "public.webhook_endpoints": {
2039
+ "name": "webhook_endpoints",
2040
+ "schema": "",
2041
+ "columns": {
2042
+ "id": {
2043
+ "name": "id",
2044
+ "type": "text",
2045
+ "primaryKey": true,
2046
+ "notNull": true
2047
+ },
2048
+ "numeric_id": {
2049
+ "name": "numeric_id",
2050
+ "type": "integer",
2051
+ "primaryKey": false,
2052
+ "notNull": true,
2053
+ "identity": {
2054
+ "type": "always",
2055
+ "name": "webhook_endpoints_numeric_id_seq",
2056
+ "schema": "public",
2057
+ "increment": "1",
2058
+ "startWith": "1",
2059
+ "minValue": "1",
2060
+ "maxValue": "2147483647",
2061
+ "cache": "1",
2062
+ "cycle": false
2063
+ }
2064
+ },
2065
+ "workspace_id": {
2066
+ "name": "workspace_id",
2067
+ "type": "text",
2068
+ "primaryKey": false,
2069
+ "notNull": true
2070
+ },
2071
+ "connection_id": {
2072
+ "name": "connection_id",
2073
+ "type": "text",
2074
+ "primaryKey": false,
2075
+ "notNull": false
2076
+ },
2077
+ "url": {
2078
+ "name": "url",
2079
+ "type": "text",
2080
+ "primaryKey": false,
2081
+ "notNull": true
2082
+ },
2083
+ "payload_format": {
2084
+ "name": "payload_format",
2085
+ "type": "payload_format",
2086
+ "typeSchema": "public",
2087
+ "primaryKey": false,
2088
+ "notNull": true
2089
+ },
2090
+ "events": {
2091
+ "name": "events",
2092
+ "type": "webhook_event[]",
2093
+ "typeSchema": "public",
2094
+ "primaryKey": false,
2095
+ "notNull": true
2096
+ },
2097
+ "secret": {
2098
+ "name": "secret",
2099
+ "type": "text",
2100
+ "primaryKey": false,
2101
+ "notNull": false
2102
+ },
2103
+ "brevo_auth": {
2104
+ "name": "brevo_auth",
2105
+ "type": "brevo_auth_type",
2106
+ "typeSchema": "public",
2107
+ "primaryKey": false,
2108
+ "notNull": true,
2109
+ "default": "'none'"
2110
+ },
2111
+ "custom_headers": {
2112
+ "name": "custom_headers",
2113
+ "type": "jsonb",
2114
+ "primaryKey": false,
2115
+ "notNull": true,
2116
+ "default": "'[]'::jsonb"
2117
+ },
2118
+ "description": {
2119
+ "name": "description",
2120
+ "type": "text",
2121
+ "primaryKey": false,
2122
+ "notNull": false
2123
+ },
2124
+ "enabled": {
2125
+ "name": "enabled",
2126
+ "type": "boolean",
2127
+ "primaryKey": false,
2128
+ "notNull": true,
2129
+ "default": true
2130
+ },
2131
+ "created_at": {
2132
+ "name": "created_at",
2133
+ "type": "timestamp with time zone",
2134
+ "primaryKey": false,
2135
+ "notNull": true,
2136
+ "default": "now()"
2137
+ },
2138
+ "updated_at": {
2139
+ "name": "updated_at",
2140
+ "type": "timestamp with time zone",
2141
+ "primaryKey": false,
2142
+ "notNull": true,
2143
+ "default": "now()"
2144
+ }
2145
+ },
2146
+ "indexes": {
2147
+ "webhook_endpoints_scope_idx": {
2148
+ "name": "webhook_endpoints_scope_idx",
2149
+ "columns": [
2150
+ {
2151
+ "expression": "workspace_id",
2152
+ "isExpression": false,
2153
+ "asc": true,
2154
+ "nulls": "last"
2155
+ },
2156
+ {
2157
+ "expression": "connection_id",
2158
+ "isExpression": false,
2159
+ "asc": true,
2160
+ "nulls": "last"
2161
+ }
2162
+ ],
2163
+ "isUnique": false,
2164
+ "concurrently": false,
2165
+ "method": "btree",
2166
+ "with": {}
2167
+ }
2168
+ },
2169
+ "foreignKeys": {
2170
+ "webhook_endpoints_workspace_id_workspaces_id_fk": {
2171
+ "name": "webhook_endpoints_workspace_id_workspaces_id_fk",
2172
+ "tableFrom": "webhook_endpoints",
2173
+ "tableTo": "workspaces",
2174
+ "columnsFrom": ["workspace_id"],
2175
+ "columnsTo": ["id"],
2176
+ "onDelete": "cascade",
2177
+ "onUpdate": "no action"
2178
+ },
2179
+ "webhook_endpoints_connection_id_connections_id_fk": {
2180
+ "name": "webhook_endpoints_connection_id_connections_id_fk",
2181
+ "tableFrom": "webhook_endpoints",
2182
+ "tableTo": "connections",
2183
+ "columnsFrom": ["connection_id"],
2184
+ "columnsTo": ["id"],
2185
+ "onDelete": "cascade",
2186
+ "onUpdate": "no action"
2187
+ }
2188
+ },
2189
+ "compositePrimaryKeys": {},
2190
+ "uniqueConstraints": {
2191
+ "webhook_endpoints_numeric_id_unique": {
2192
+ "name": "webhook_endpoints_numeric_id_unique",
2193
+ "nullsNotDistinct": false,
2194
+ "columns": ["numeric_id"]
2195
+ }
2196
+ },
2197
+ "policies": {},
2198
+ "checkConstraints": {
2199
+ "webhook_secret_required": {
2200
+ "name": "webhook_secret_required",
2201
+ "value": "\"webhook_endpoints\".\"payload_format\" = 'brevo' or \"webhook_endpoints\".\"secret\" is not null"
2202
+ }
2203
+ },
2204
+ "isRLSEnabled": false
2205
+ },
2206
+ "public.workspaces": {
2207
+ "name": "workspaces",
2208
+ "schema": "",
2209
+ "columns": {
2210
+ "id": {
2211
+ "name": "id",
2212
+ "type": "text",
2213
+ "primaryKey": true,
2214
+ "notNull": true
2215
+ },
2216
+ "slug": {
2217
+ "name": "slug",
2218
+ "type": "text",
2219
+ "primaryKey": false,
2220
+ "notNull": true
2221
+ },
2222
+ "name": {
2223
+ "name": "name",
2224
+ "type": "text",
2225
+ "primaryKey": false,
2226
+ "notNull": true
2227
+ },
2228
+ "description": {
2229
+ "name": "description",
2230
+ "type": "text",
2231
+ "primaryKey": false,
2232
+ "notNull": false
2233
+ },
2234
+ "ephemeral": {
2235
+ "name": "ephemeral",
2236
+ "type": "boolean",
2237
+ "primaryKey": false,
2238
+ "notNull": true,
2239
+ "default": false
2240
+ },
2241
+ "idle_ttl_seconds": {
2242
+ "name": "idle_ttl_seconds",
2243
+ "type": "integer",
2244
+ "primaryKey": false,
2245
+ "notNull": false
2246
+ },
2247
+ "last_activity_at": {
2248
+ "name": "last_activity_at",
2249
+ "type": "timestamp with time zone",
2250
+ "primaryKey": false,
2251
+ "notNull": true,
2252
+ "default": "now()"
2253
+ },
2254
+ "expires_at": {
2255
+ "name": "expires_at",
2256
+ "type": "timestamp with time zone",
2257
+ "primaryKey": false,
2258
+ "notNull": false
2259
+ },
2260
+ "retention_seconds": {
2261
+ "name": "retention_seconds",
2262
+ "type": "integer",
2263
+ "primaryKey": false,
2264
+ "notNull": true,
2265
+ "default": 604800
2266
+ },
2267
+ "max_messages": {
2268
+ "name": "max_messages",
2269
+ "type": "integer",
2270
+ "primaryKey": false,
2271
+ "notNull": false
2272
+ },
2273
+ "rate_limit": {
2274
+ "name": "rate_limit",
2275
+ "type": "jsonb",
2276
+ "primaryKey": false,
2277
+ "notNull": false
2278
+ },
2279
+ "simulation": {
2280
+ "name": "simulation",
2281
+ "type": "jsonb",
2282
+ "primaryKey": false,
2283
+ "notNull": true,
2284
+ "default": "'{\"rates\":{\"delivered\":100},\"rules\":[],\"latency\":{\"minMs\":0,\"maxMs\":0},\"openRate\":0,\"clickRate\":0}'::jsonb"
2285
+ },
2286
+ "metadata": {
2287
+ "name": "metadata",
2288
+ "type": "jsonb",
2289
+ "primaryKey": false,
2290
+ "notNull": false
2291
+ },
2292
+ "timezone": {
2293
+ "name": "timezone",
2294
+ "type": "text",
2295
+ "primaryKey": false,
2296
+ "notNull": true,
2297
+ "default": "'UTC'"
2298
+ },
2299
+ "created_via": {
2300
+ "name": "created_via",
2301
+ "type": "text",
2302
+ "primaryKey": false,
2303
+ "notNull": true
2304
+ },
2305
+ "created_at": {
2306
+ "name": "created_at",
2307
+ "type": "timestamp with time zone",
2308
+ "primaryKey": false,
2309
+ "notNull": true,
2310
+ "default": "now()"
2311
+ },
2312
+ "updated_at": {
2313
+ "name": "updated_at",
2314
+ "type": "timestamp with time zone",
2315
+ "primaryKey": false,
2316
+ "notNull": true,
2317
+ "default": "now()"
2318
+ }
2319
+ },
2320
+ "indexes": {
2321
+ "workspaces_expiry_idx": {
2322
+ "name": "workspaces_expiry_idx",
2323
+ "columns": [
2324
+ {
2325
+ "expression": "expires_at",
2326
+ "isExpression": false,
2327
+ "asc": true,
2328
+ "nulls": "last"
2329
+ }
2330
+ ],
2331
+ "isUnique": false,
2332
+ "where": "\"workspaces\".\"ephemeral\"",
2333
+ "concurrently": false,
2334
+ "method": "btree",
2335
+ "with": {}
2336
+ },
2337
+ "workspaces_picker_idx": {
2338
+ "name": "workspaces_picker_idx",
2339
+ "columns": [
2340
+ {
2341
+ "expression": "ephemeral",
2342
+ "isExpression": false,
2343
+ "asc": true,
2344
+ "nulls": "last"
2345
+ },
2346
+ {
2347
+ "expression": "name",
2348
+ "isExpression": false,
2349
+ "asc": true,
2350
+ "nulls": "last"
2351
+ }
2352
+ ],
2353
+ "isUnique": false,
2354
+ "concurrently": false,
2355
+ "method": "btree",
2356
+ "with": {}
2357
+ }
2358
+ },
2359
+ "foreignKeys": {},
2360
+ "compositePrimaryKeys": {},
2361
+ "uniqueConstraints": {
2362
+ "workspaces_slug_unique": {
2363
+ "name": "workspaces_slug_unique",
2364
+ "nullsNotDistinct": false,
2365
+ "columns": ["slug"]
2366
+ }
2367
+ },
2368
+ "policies": {},
2369
+ "checkConstraints": {},
2370
+ "isRLSEnabled": false
2371
+ }
2372
+ },
2373
+ "enums": {
2374
+ "public.api_dialect": {
2375
+ "name": "api_dialect",
2376
+ "schema": "public",
2377
+ "values": ["native", "resend", "brevo", "admin", "capture", "mcp"]
2378
+ },
2379
+ "public.api_key_scope": {
2380
+ "name": "api_key_scope",
2381
+ "schema": "public",
2382
+ "values": ["workspace", "connection"]
2383
+ },
2384
+ "public.brevo_auth_type": {
2385
+ "name": "brevo_auth_type",
2386
+ "schema": "public",
2387
+ "values": ["none", "bearer", "basic"]
2388
+ },
2389
+ "public.connection_kind": {
2390
+ "name": "connection_kind",
2391
+ "schema": "public",
2392
+ "values": ["resend", "brevo", "smtp"]
2393
+ },
2394
+ "public.delivery_status": {
2395
+ "name": "delivery_status",
2396
+ "schema": "public",
2397
+ "values": [
2398
+ "queued",
2399
+ "sent",
2400
+ "delivered",
2401
+ "deferred",
2402
+ "soft_bounce",
2403
+ "hard_bounce",
2404
+ "complained",
2405
+ "failed",
2406
+ "suppressed"
2407
+ ]
2408
+ },
2409
+ "public.event_origin": {
2410
+ "name": "event_origin",
2411
+ "schema": "public",
2412
+ "values": ["simulation", "api", "ui", "mcp"]
2413
+ },
2414
+ "public.event_type": {
2415
+ "name": "event_type",
2416
+ "schema": "public",
2417
+ "values": [
2418
+ "accepted",
2419
+ "sent",
2420
+ "delivered",
2421
+ "deferred",
2422
+ "soft_bounce",
2423
+ "hard_bounce",
2424
+ "complained",
2425
+ "failed",
2426
+ "suppressed",
2427
+ "opened",
2428
+ "clicked"
2429
+ ]
2430
+ },
2431
+ "public.message_source": {
2432
+ "name": "message_source",
2433
+ "schema": "public",
2434
+ "values": ["native", "resend", "brevo", "smtp"]
2435
+ },
2436
+ "public.payload_format": {
2437
+ "name": "payload_format",
2438
+ "schema": "public",
2439
+ "values": ["unified", "resend", "brevo"]
2440
+ },
2441
+ "public.recipient_kind": {
2442
+ "name": "recipient_kind",
2443
+ "schema": "public",
2444
+ "values": ["to", "cc", "bcc"]
2445
+ },
2446
+ "public.replay_mode": {
2447
+ "name": "replay_mode",
2448
+ "schema": "public",
2449
+ "values": ["exact", "resign"]
2450
+ },
2451
+ "public.smtp_outcome": {
2452
+ "name": "smtp_outcome",
2453
+ "schema": "public",
2454
+ "values": ["accepted", "rejected", "auth_failed", "error"]
2455
+ },
2456
+ "public.suppression_reason": {
2457
+ "name": "suppression_reason",
2458
+ "schema": "public",
2459
+ "values": ["hard_bounce", "complained", "manual"]
2460
+ },
2461
+ "public.webhook_delivery_status": {
2462
+ "name": "webhook_delivery_status",
2463
+ "schema": "public",
2464
+ "values": ["pending", "retrying", "succeeded", "failed"]
2465
+ },
2466
+ "public.webhook_event": {
2467
+ "name": "webhook_event",
2468
+ "schema": "public",
2469
+ "values": [
2470
+ "email.sent",
2471
+ "email.delivered",
2472
+ "email.deferred",
2473
+ "email.soft_bounced",
2474
+ "email.hard_bounced",
2475
+ "email.complained",
2476
+ "email.opened",
2477
+ "email.clicked",
2478
+ "email.suppressed",
2479
+ "email.failed"
2480
+ ]
2481
+ }
2482
+ },
2483
+ "schemas": {},
2484
+ "sequences": {},
2485
+ "roles": {},
2486
+ "policies": {},
2487
+ "views": {},
2488
+ "_meta": {
2489
+ "columns": {},
2490
+ "schemas": {},
2491
+ "tables": {}
2492
+ }
2493
+ }