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