@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,2526 @@
1
+ {
2
+ "id": "21b9babd-53db-408b-aec9-f9f1b65d1c66",
3
+ "prevId": "765b725b-d131-4344-9a11-839b5d39eed8",
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
+ "failed_at": {
570
+ "name": "failed_at",
571
+ "type": "timestamp with time zone",
572
+ "primaryKey": false,
573
+ "notNull": false
574
+ }
575
+ },
576
+ "indexes": {
577
+ "jobs_due_idx": {
578
+ "name": "jobs_due_idx",
579
+ "columns": [
580
+ {
581
+ "expression": "run_at",
582
+ "isExpression": false,
583
+ "asc": true,
584
+ "nulls": "last"
585
+ }
586
+ ],
587
+ "isUnique": false,
588
+ "concurrently": false,
589
+ "method": "btree",
590
+ "with": {}
591
+ }
592
+ },
593
+ "foreignKeys": {
594
+ "jobs_workspace_id_workspaces_id_fk": {
595
+ "name": "jobs_workspace_id_workspaces_id_fk",
596
+ "tableFrom": "jobs",
597
+ "tableTo": "workspaces",
598
+ "columnsFrom": ["workspace_id"],
599
+ "columnsTo": ["id"],
600
+ "onDelete": "cascade",
601
+ "onUpdate": "no action"
602
+ }
603
+ },
604
+ "compositePrimaryKeys": {},
605
+ "uniqueConstraints": {},
606
+ "policies": {},
607
+ "checkConstraints": {},
608
+ "isRLSEnabled": false
609
+ },
610
+ "public.api_keys": {
611
+ "name": "api_keys",
612
+ "schema": "",
613
+ "columns": {
614
+ "id": {
615
+ "name": "id",
616
+ "type": "text",
617
+ "primaryKey": true,
618
+ "notNull": true
619
+ },
620
+ "workspace_id": {
621
+ "name": "workspace_id",
622
+ "type": "text",
623
+ "primaryKey": false,
624
+ "notNull": true
625
+ },
626
+ "connection_id": {
627
+ "name": "connection_id",
628
+ "type": "text",
629
+ "primaryKey": false,
630
+ "notNull": false
631
+ },
632
+ "scope": {
633
+ "name": "scope",
634
+ "type": "api_key_scope",
635
+ "typeSchema": "public",
636
+ "primaryKey": false,
637
+ "notNull": true
638
+ },
639
+ "name": {
640
+ "name": "name",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": false
644
+ },
645
+ "display_prefix": {
646
+ "name": "display_prefix",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": true
650
+ },
651
+ "hash": {
652
+ "name": "hash",
653
+ "type": "text",
654
+ "primaryKey": false,
655
+ "notNull": true
656
+ },
657
+ "last_used_at": {
658
+ "name": "last_used_at",
659
+ "type": "timestamp with time zone",
660
+ "primaryKey": false,
661
+ "notNull": false
662
+ },
663
+ "revoked_at": {
664
+ "name": "revoked_at",
665
+ "type": "timestamp with time zone",
666
+ "primaryKey": false,
667
+ "notNull": false
668
+ },
669
+ "created_at": {
670
+ "name": "created_at",
671
+ "type": "timestamp with time zone",
672
+ "primaryKey": false,
673
+ "notNull": true,
674
+ "default": "now()"
675
+ }
676
+ },
677
+ "indexes": {},
678
+ "foreignKeys": {
679
+ "api_keys_workspace_id_workspaces_id_fk": {
680
+ "name": "api_keys_workspace_id_workspaces_id_fk",
681
+ "tableFrom": "api_keys",
682
+ "tableTo": "workspaces",
683
+ "columnsFrom": ["workspace_id"],
684
+ "columnsTo": ["id"],
685
+ "onDelete": "cascade",
686
+ "onUpdate": "no action"
687
+ },
688
+ "api_keys_connection_id_connections_id_fk": {
689
+ "name": "api_keys_connection_id_connections_id_fk",
690
+ "tableFrom": "api_keys",
691
+ "tableTo": "connections",
692
+ "columnsFrom": ["connection_id"],
693
+ "columnsTo": ["id"],
694
+ "onDelete": "cascade",
695
+ "onUpdate": "no action"
696
+ }
697
+ },
698
+ "compositePrimaryKeys": {},
699
+ "uniqueConstraints": {
700
+ "api_keys_hash_unique": {
701
+ "name": "api_keys_hash_unique",
702
+ "nullsNotDistinct": false,
703
+ "columns": ["hash"]
704
+ }
705
+ },
706
+ "policies": {},
707
+ "checkConstraints": {
708
+ "api_keys_scope": {
709
+ "name": "api_keys_scope",
710
+ "value": "(\"api_keys\".\"scope\" = 'connection') = (\"api_keys\".\"connection_id\" is not null)"
711
+ }
712
+ },
713
+ "isRLSEnabled": false
714
+ },
715
+ "public.api_logs": {
716
+ "name": "api_logs",
717
+ "schema": "",
718
+ "columns": {
719
+ "id": {
720
+ "name": "id",
721
+ "type": "text",
722
+ "primaryKey": true,
723
+ "notNull": true
724
+ },
725
+ "workspace_id": {
726
+ "name": "workspace_id",
727
+ "type": "text",
728
+ "primaryKey": false,
729
+ "notNull": false
730
+ },
731
+ "connection_id": {
732
+ "name": "connection_id",
733
+ "type": "text",
734
+ "primaryKey": false,
735
+ "notNull": false
736
+ },
737
+ "dialect": {
738
+ "name": "dialect",
739
+ "type": "api_dialect",
740
+ "typeSchema": "public",
741
+ "primaryKey": false,
742
+ "notNull": true
743
+ },
744
+ "method": {
745
+ "name": "method",
746
+ "type": "text",
747
+ "primaryKey": false,
748
+ "notNull": true
749
+ },
750
+ "path": {
751
+ "name": "path",
752
+ "type": "text",
753
+ "primaryKey": false,
754
+ "notNull": true
755
+ },
756
+ "status_code": {
757
+ "name": "status_code",
758
+ "type": "integer",
759
+ "primaryKey": false,
760
+ "notNull": true
761
+ },
762
+ "duration_ms": {
763
+ "name": "duration_ms",
764
+ "type": "integer",
765
+ "primaryKey": false,
766
+ "notNull": true
767
+ },
768
+ "request_headers": {
769
+ "name": "request_headers",
770
+ "type": "jsonb",
771
+ "primaryKey": false,
772
+ "notNull": false
773
+ },
774
+ "request_body": {
775
+ "name": "request_body",
776
+ "type": "jsonb",
777
+ "primaryKey": false,
778
+ "notNull": false
779
+ },
780
+ "response_headers": {
781
+ "name": "response_headers",
782
+ "type": "jsonb",
783
+ "primaryKey": false,
784
+ "notNull": false
785
+ },
786
+ "response_body": {
787
+ "name": "response_body",
788
+ "type": "jsonb",
789
+ "primaryKey": false,
790
+ "notNull": false
791
+ },
792
+ "message_ids": {
793
+ "name": "message_ids",
794
+ "type": "text[]",
795
+ "primaryKey": false,
796
+ "notNull": false
797
+ },
798
+ "error_code": {
799
+ "name": "error_code",
800
+ "type": "text",
801
+ "primaryKey": false,
802
+ "notNull": false
803
+ },
804
+ "ip": {
805
+ "name": "ip",
806
+ "type": "text",
807
+ "primaryKey": false,
808
+ "notNull": false
809
+ },
810
+ "created_at": {
811
+ "name": "created_at",
812
+ "type": "timestamp with time zone",
813
+ "primaryKey": false,
814
+ "notNull": true,
815
+ "default": "now()"
816
+ }
817
+ },
818
+ "indexes": {
819
+ "api_logs_ws_time_idx": {
820
+ "name": "api_logs_ws_time_idx",
821
+ "columns": [
822
+ {
823
+ "expression": "workspace_id",
824
+ "isExpression": false,
825
+ "asc": true,
826
+ "nulls": "last"
827
+ },
828
+ {
829
+ "expression": "created_at",
830
+ "isExpression": false,
831
+ "asc": false,
832
+ "nulls": "last"
833
+ }
834
+ ],
835
+ "isUnique": false,
836
+ "concurrently": false,
837
+ "method": "btree",
838
+ "with": {}
839
+ }
840
+ },
841
+ "foreignKeys": {
842
+ "api_logs_workspace_id_workspaces_id_fk": {
843
+ "name": "api_logs_workspace_id_workspaces_id_fk",
844
+ "tableFrom": "api_logs",
845
+ "tableTo": "workspaces",
846
+ "columnsFrom": ["workspace_id"],
847
+ "columnsTo": ["id"],
848
+ "onDelete": "cascade",
849
+ "onUpdate": "no action"
850
+ },
851
+ "api_logs_connection_id_connections_id_fk": {
852
+ "name": "api_logs_connection_id_connections_id_fk",
853
+ "tableFrom": "api_logs",
854
+ "tableTo": "connections",
855
+ "columnsFrom": ["connection_id"],
856
+ "columnsTo": ["id"],
857
+ "onDelete": "set null",
858
+ "onUpdate": "no action"
859
+ }
860
+ },
861
+ "compositePrimaryKeys": {},
862
+ "uniqueConstraints": {},
863
+ "policies": {},
864
+ "checkConstraints": {},
865
+ "isRLSEnabled": false
866
+ },
867
+ "public.smtp_sessions": {
868
+ "name": "smtp_sessions",
869
+ "schema": "",
870
+ "columns": {
871
+ "id": {
872
+ "name": "id",
873
+ "type": "text",
874
+ "primaryKey": true,
875
+ "notNull": true
876
+ },
877
+ "workspace_id": {
878
+ "name": "workspace_id",
879
+ "type": "text",
880
+ "primaryKey": false,
881
+ "notNull": false
882
+ },
883
+ "connection_id": {
884
+ "name": "connection_id",
885
+ "type": "text",
886
+ "primaryKey": false,
887
+ "notNull": false
888
+ },
889
+ "remote_address": {
890
+ "name": "remote_address",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": true
894
+ },
895
+ "client_hostname": {
896
+ "name": "client_hostname",
897
+ "type": "text",
898
+ "primaryKey": false,
899
+ "notNull": false
900
+ },
901
+ "auth_user": {
902
+ "name": "auth_user",
903
+ "type": "text",
904
+ "primaryKey": false,
905
+ "notNull": false
906
+ },
907
+ "secure": {
908
+ "name": "secure",
909
+ "type": "boolean",
910
+ "primaryKey": false,
911
+ "notNull": true,
912
+ "default": false
913
+ },
914
+ "transcript": {
915
+ "name": "transcript",
916
+ "type": "jsonb",
917
+ "primaryKey": false,
918
+ "notNull": true
919
+ },
920
+ "message_ids": {
921
+ "name": "message_ids",
922
+ "type": "text[]",
923
+ "primaryKey": false,
924
+ "notNull": false
925
+ },
926
+ "outcome": {
927
+ "name": "outcome",
928
+ "type": "smtp_outcome",
929
+ "typeSchema": "public",
930
+ "primaryKey": false,
931
+ "notNull": true
932
+ },
933
+ "error": {
934
+ "name": "error",
935
+ "type": "text",
936
+ "primaryKey": false,
937
+ "notNull": false
938
+ },
939
+ "started_at": {
940
+ "name": "started_at",
941
+ "type": "timestamp with time zone",
942
+ "primaryKey": false,
943
+ "notNull": true
944
+ },
945
+ "ended_at": {
946
+ "name": "ended_at",
947
+ "type": "timestamp with time zone",
948
+ "primaryKey": false,
949
+ "notNull": false
950
+ }
951
+ },
952
+ "indexes": {
953
+ "smtp_sessions_ws_time_idx": {
954
+ "name": "smtp_sessions_ws_time_idx",
955
+ "columns": [
956
+ {
957
+ "expression": "workspace_id",
958
+ "isExpression": false,
959
+ "asc": true,
960
+ "nulls": "last"
961
+ },
962
+ {
963
+ "expression": "started_at",
964
+ "isExpression": false,
965
+ "asc": false,
966
+ "nulls": "last"
967
+ }
968
+ ],
969
+ "isUnique": false,
970
+ "concurrently": false,
971
+ "method": "btree",
972
+ "with": {}
973
+ }
974
+ },
975
+ "foreignKeys": {
976
+ "smtp_sessions_workspace_id_workspaces_id_fk": {
977
+ "name": "smtp_sessions_workspace_id_workspaces_id_fk",
978
+ "tableFrom": "smtp_sessions",
979
+ "tableTo": "workspaces",
980
+ "columnsFrom": ["workspace_id"],
981
+ "columnsTo": ["id"],
982
+ "onDelete": "cascade",
983
+ "onUpdate": "no action"
984
+ },
985
+ "smtp_sessions_connection_id_connections_id_fk": {
986
+ "name": "smtp_sessions_connection_id_connections_id_fk",
987
+ "tableFrom": "smtp_sessions",
988
+ "tableTo": "connections",
989
+ "columnsFrom": ["connection_id"],
990
+ "columnsTo": ["id"],
991
+ "onDelete": "set null",
992
+ "onUpdate": "no action"
993
+ }
994
+ },
995
+ "compositePrimaryKeys": {},
996
+ "uniqueConstraints": {},
997
+ "policies": {},
998
+ "checkConstraints": {},
999
+ "isRLSEnabled": false
1000
+ },
1001
+ "public.message_recipients": {
1002
+ "name": "message_recipients",
1003
+ "schema": "",
1004
+ "columns": {
1005
+ "id": {
1006
+ "name": "id",
1007
+ "type": "text",
1008
+ "primaryKey": true,
1009
+ "notNull": true
1010
+ },
1011
+ "message_id": {
1012
+ "name": "message_id",
1013
+ "type": "text",
1014
+ "primaryKey": false,
1015
+ "notNull": true
1016
+ },
1017
+ "workspace_id": {
1018
+ "name": "workspace_id",
1019
+ "type": "text",
1020
+ "primaryKey": false,
1021
+ "notNull": true
1022
+ },
1023
+ "kind": {
1024
+ "name": "kind",
1025
+ "type": "recipient_kind",
1026
+ "typeSchema": "public",
1027
+ "primaryKey": false,
1028
+ "notNull": true
1029
+ },
1030
+ "email": {
1031
+ "name": "email",
1032
+ "type": "text",
1033
+ "primaryKey": false,
1034
+ "notNull": true
1035
+ },
1036
+ "name": {
1037
+ "name": "name",
1038
+ "type": "text",
1039
+ "primaryKey": false,
1040
+ "notNull": false
1041
+ },
1042
+ "status": {
1043
+ "name": "status",
1044
+ "type": "delivery_status",
1045
+ "typeSchema": "public",
1046
+ "primaryKey": false,
1047
+ "notNull": true,
1048
+ "default": "'queued'"
1049
+ },
1050
+ "status_reason": {
1051
+ "name": "status_reason",
1052
+ "type": "text",
1053
+ "primaryKey": false,
1054
+ "notNull": false
1055
+ },
1056
+ "updated_at": {
1057
+ "name": "updated_at",
1058
+ "type": "timestamp with time zone",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "default": "now()"
1062
+ }
1063
+ },
1064
+ "indexes": {
1065
+ "recipients_ws_email_idx": {
1066
+ "name": "recipients_ws_email_idx",
1067
+ "columns": [
1068
+ {
1069
+ "expression": "workspace_id",
1070
+ "isExpression": false,
1071
+ "asc": true,
1072
+ "nulls": "last"
1073
+ },
1074
+ {
1075
+ "expression": "email",
1076
+ "isExpression": false,
1077
+ "asc": true,
1078
+ "nulls": "last"
1079
+ }
1080
+ ],
1081
+ "isUnique": false,
1082
+ "concurrently": false,
1083
+ "method": "btree",
1084
+ "with": {}
1085
+ },
1086
+ "recipients_message_idx": {
1087
+ "name": "recipients_message_idx",
1088
+ "columns": [
1089
+ {
1090
+ "expression": "message_id",
1091
+ "isExpression": false,
1092
+ "asc": true,
1093
+ "nulls": "last"
1094
+ }
1095
+ ],
1096
+ "isUnique": false,
1097
+ "concurrently": false,
1098
+ "method": "btree",
1099
+ "with": {}
1100
+ }
1101
+ },
1102
+ "foreignKeys": {
1103
+ "message_recipients_message_id_messages_id_fk": {
1104
+ "name": "message_recipients_message_id_messages_id_fk",
1105
+ "tableFrom": "message_recipients",
1106
+ "tableTo": "messages",
1107
+ "columnsFrom": ["message_id"],
1108
+ "columnsTo": ["id"],
1109
+ "onDelete": "cascade",
1110
+ "onUpdate": "no action"
1111
+ }
1112
+ },
1113
+ "compositePrimaryKeys": {},
1114
+ "uniqueConstraints": {},
1115
+ "policies": {},
1116
+ "checkConstraints": {},
1117
+ "isRLSEnabled": false
1118
+ },
1119
+ "public.messages": {
1120
+ "name": "messages",
1121
+ "schema": "",
1122
+ "columns": {
1123
+ "id": {
1124
+ "name": "id",
1125
+ "type": "text",
1126
+ "primaryKey": true,
1127
+ "notNull": true
1128
+ },
1129
+ "workspace_id": {
1130
+ "name": "workspace_id",
1131
+ "type": "text",
1132
+ "primaryKey": false,
1133
+ "notNull": true
1134
+ },
1135
+ "connection_id": {
1136
+ "name": "connection_id",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": false
1140
+ },
1141
+ "source": {
1142
+ "name": "source",
1143
+ "type": "message_source",
1144
+ "typeSchema": "public",
1145
+ "primaryKey": false,
1146
+ "notNull": true
1147
+ },
1148
+ "provider_message_id": {
1149
+ "name": "provider_message_id",
1150
+ "type": "text",
1151
+ "primaryKey": false,
1152
+ "notNull": true
1153
+ },
1154
+ "from": {
1155
+ "name": "from",
1156
+ "type": "jsonb",
1157
+ "primaryKey": false,
1158
+ "notNull": true
1159
+ },
1160
+ "reply_to": {
1161
+ "name": "reply_to",
1162
+ "type": "jsonb",
1163
+ "primaryKey": false,
1164
+ "notNull": false
1165
+ },
1166
+ "subject": {
1167
+ "name": "subject",
1168
+ "type": "text",
1169
+ "primaryKey": false,
1170
+ "notNull": true,
1171
+ "default": "''"
1172
+ },
1173
+ "html": {
1174
+ "name": "html",
1175
+ "type": "text",
1176
+ "primaryKey": false,
1177
+ "notNull": false
1178
+ },
1179
+ "text": {
1180
+ "name": "text",
1181
+ "type": "text",
1182
+ "primaryKey": false,
1183
+ "notNull": false
1184
+ },
1185
+ "headers": {
1186
+ "name": "headers",
1187
+ "type": "jsonb",
1188
+ "primaryKey": false,
1189
+ "notNull": true,
1190
+ "default": "'{}'::jsonb"
1191
+ },
1192
+ "tags": {
1193
+ "name": "tags",
1194
+ "type": "jsonb",
1195
+ "primaryKey": false,
1196
+ "notNull": true,
1197
+ "default": "'[]'::jsonb"
1198
+ },
1199
+ "metadata": {
1200
+ "name": "metadata",
1201
+ "type": "jsonb",
1202
+ "primaryKey": false,
1203
+ "notNull": false
1204
+ },
1205
+ "template_ref": {
1206
+ "name": "template_ref",
1207
+ "type": "jsonb",
1208
+ "primaryKey": false,
1209
+ "notNull": false
1210
+ },
1211
+ "links": {
1212
+ "name": "links",
1213
+ "type": "jsonb",
1214
+ "primaryKey": false,
1215
+ "notNull": true,
1216
+ "default": "'[]'::jsonb"
1217
+ },
1218
+ "raw_blob_id": {
1219
+ "name": "raw_blob_id",
1220
+ "type": "text",
1221
+ "primaryKey": false,
1222
+ "notNull": false
1223
+ },
1224
+ "size_bytes": {
1225
+ "name": "size_bytes",
1226
+ "type": "integer",
1227
+ "primaryKey": false,
1228
+ "notNull": true
1229
+ },
1230
+ "status": {
1231
+ "name": "status",
1232
+ "type": "delivery_status",
1233
+ "typeSchema": "public",
1234
+ "primaryKey": false,
1235
+ "notNull": true,
1236
+ "default": "'queued'"
1237
+ },
1238
+ "simulation": {
1239
+ "name": "simulation",
1240
+ "type": "jsonb",
1241
+ "primaryKey": false,
1242
+ "notNull": false
1243
+ },
1244
+ "idempotency_key": {
1245
+ "name": "idempotency_key",
1246
+ "type": "text",
1247
+ "primaryKey": false,
1248
+ "notNull": false
1249
+ },
1250
+ "created_at": {
1251
+ "name": "created_at",
1252
+ "type": "timestamp with time zone",
1253
+ "primaryKey": false,
1254
+ "notNull": true,
1255
+ "default": "now()"
1256
+ },
1257
+ "status_updated_at": {
1258
+ "name": "status_updated_at",
1259
+ "type": "timestamp with time zone",
1260
+ "primaryKey": false,
1261
+ "notNull": true,
1262
+ "default": "now()"
1263
+ }
1264
+ },
1265
+ "indexes": {
1266
+ "messages_raw_blob_idx": {
1267
+ "name": "messages_raw_blob_idx",
1268
+ "columns": [
1269
+ {
1270
+ "expression": "raw_blob_id",
1271
+ "isExpression": false,
1272
+ "asc": true,
1273
+ "nulls": "last"
1274
+ }
1275
+ ],
1276
+ "isUnique": false,
1277
+ "concurrently": false,
1278
+ "method": "btree",
1279
+ "with": {}
1280
+ },
1281
+ "messages_ws_created_idx": {
1282
+ "name": "messages_ws_created_idx",
1283
+ "columns": [
1284
+ {
1285
+ "expression": "workspace_id",
1286
+ "isExpression": false,
1287
+ "asc": true,
1288
+ "nulls": "last"
1289
+ },
1290
+ {
1291
+ "expression": "created_at",
1292
+ "isExpression": false,
1293
+ "asc": true,
1294
+ "nulls": "last"
1295
+ },
1296
+ {
1297
+ "expression": "id",
1298
+ "isExpression": false,
1299
+ "asc": true,
1300
+ "nulls": "last"
1301
+ }
1302
+ ],
1303
+ "isUnique": false,
1304
+ "concurrently": false,
1305
+ "method": "btree",
1306
+ "with": {}
1307
+ },
1308
+ "messages_ws_status_idx": {
1309
+ "name": "messages_ws_status_idx",
1310
+ "columns": [
1311
+ {
1312
+ "expression": "workspace_id",
1313
+ "isExpression": false,
1314
+ "asc": true,
1315
+ "nulls": "last"
1316
+ },
1317
+ {
1318
+ "expression": "status",
1319
+ "isExpression": false,
1320
+ "asc": true,
1321
+ "nulls": "last"
1322
+ }
1323
+ ],
1324
+ "isUnique": false,
1325
+ "concurrently": false,
1326
+ "method": "btree",
1327
+ "with": {}
1328
+ },
1329
+ "messages_ws_connection_idx": {
1330
+ "name": "messages_ws_connection_idx",
1331
+ "columns": [
1332
+ {
1333
+ "expression": "workspace_id",
1334
+ "isExpression": false,
1335
+ "asc": true,
1336
+ "nulls": "last"
1337
+ },
1338
+ {
1339
+ "expression": "connection_id",
1340
+ "isExpression": false,
1341
+ "asc": true,
1342
+ "nulls": "last"
1343
+ },
1344
+ {
1345
+ "expression": "created_at",
1346
+ "isExpression": false,
1347
+ "asc": false,
1348
+ "nulls": "last"
1349
+ }
1350
+ ],
1351
+ "isUnique": false,
1352
+ "concurrently": false,
1353
+ "method": "btree",
1354
+ "with": {}
1355
+ },
1356
+ "messages_tags_gin": {
1357
+ "name": "messages_tags_gin",
1358
+ "columns": [
1359
+ {
1360
+ "expression": "tags",
1361
+ "isExpression": false,
1362
+ "asc": true,
1363
+ "nulls": "last"
1364
+ }
1365
+ ],
1366
+ "isUnique": false,
1367
+ "concurrently": false,
1368
+ "method": "gin",
1369
+ "with": {}
1370
+ },
1371
+ "messages_search_gin": {
1372
+ "name": "messages_search_gin",
1373
+ "columns": [
1374
+ {
1375
+ "expression": "to_tsvector('simple', left(\"subject\" || ' ' || coalesce(\"text\", '') || ' ' ||\n coalesce(\"html\", ''), 100000))",
1376
+ "asc": true,
1377
+ "isExpression": true,
1378
+ "nulls": "last"
1379
+ }
1380
+ ],
1381
+ "isUnique": false,
1382
+ "concurrently": false,
1383
+ "method": "gin",
1384
+ "with": {}
1385
+ },
1386
+ "messages_provider_id_uq": {
1387
+ "name": "messages_provider_id_uq",
1388
+ "columns": [
1389
+ {
1390
+ "expression": "workspace_id",
1391
+ "isExpression": false,
1392
+ "asc": true,
1393
+ "nulls": "last"
1394
+ },
1395
+ {
1396
+ "expression": "provider_message_id",
1397
+ "isExpression": false,
1398
+ "asc": true,
1399
+ "nulls": "last"
1400
+ }
1401
+ ],
1402
+ "isUnique": true,
1403
+ "concurrently": false,
1404
+ "method": "btree",
1405
+ "with": {}
1406
+ }
1407
+ },
1408
+ "foreignKeys": {
1409
+ "messages_workspace_id_workspaces_id_fk": {
1410
+ "name": "messages_workspace_id_workspaces_id_fk",
1411
+ "tableFrom": "messages",
1412
+ "tableTo": "workspaces",
1413
+ "columnsFrom": ["workspace_id"],
1414
+ "columnsTo": ["id"],
1415
+ "onDelete": "cascade",
1416
+ "onUpdate": "no action"
1417
+ },
1418
+ "messages_connection_id_connections_id_fk": {
1419
+ "name": "messages_connection_id_connections_id_fk",
1420
+ "tableFrom": "messages",
1421
+ "tableTo": "connections",
1422
+ "columnsFrom": ["connection_id"],
1423
+ "columnsTo": ["id"],
1424
+ "onDelete": "set null",
1425
+ "onUpdate": "no action"
1426
+ },
1427
+ "messages_raw_blob_id_blobs_id_fk": {
1428
+ "name": "messages_raw_blob_id_blobs_id_fk",
1429
+ "tableFrom": "messages",
1430
+ "tableTo": "blobs",
1431
+ "columnsFrom": ["raw_blob_id"],
1432
+ "columnsTo": ["id"],
1433
+ "onDelete": "set null",
1434
+ "onUpdate": "no action"
1435
+ }
1436
+ },
1437
+ "compositePrimaryKeys": {},
1438
+ "uniqueConstraints": {},
1439
+ "policies": {},
1440
+ "checkConstraints": {},
1441
+ "isRLSEnabled": false
1442
+ },
1443
+ "public.overrides": {
1444
+ "name": "overrides",
1445
+ "schema": "",
1446
+ "columns": {
1447
+ "id": {
1448
+ "name": "id",
1449
+ "type": "text",
1450
+ "primaryKey": true,
1451
+ "notNull": true
1452
+ },
1453
+ "workspace_id": {
1454
+ "name": "workspace_id",
1455
+ "type": "text",
1456
+ "primaryKey": false,
1457
+ "notNull": true
1458
+ },
1459
+ "connection_id": {
1460
+ "name": "connection_id",
1461
+ "type": "text",
1462
+ "primaryKey": false,
1463
+ "notNull": false
1464
+ },
1465
+ "config": {
1466
+ "name": "config",
1467
+ "type": "jsonb",
1468
+ "primaryKey": false,
1469
+ "notNull": true
1470
+ },
1471
+ "activated_via": {
1472
+ "name": "activated_via",
1473
+ "type": "event_origin",
1474
+ "typeSchema": "public",
1475
+ "primaryKey": false,
1476
+ "notNull": true
1477
+ },
1478
+ "expires_at": {
1479
+ "name": "expires_at",
1480
+ "type": "timestamp with time zone",
1481
+ "primaryKey": false,
1482
+ "notNull": false
1483
+ },
1484
+ "created_at": {
1485
+ "name": "created_at",
1486
+ "type": "timestamp with time zone",
1487
+ "primaryKey": false,
1488
+ "notNull": true,
1489
+ "default": "now()"
1490
+ },
1491
+ "reset_at": {
1492
+ "name": "reset_at",
1493
+ "type": "timestamp with time zone",
1494
+ "primaryKey": false,
1495
+ "notNull": false
1496
+ }
1497
+ },
1498
+ "indexes": {
1499
+ "overrides_active_scope_uq": {
1500
+ "name": "overrides_active_scope_uq",
1501
+ "columns": [
1502
+ {
1503
+ "expression": "workspace_id",
1504
+ "isExpression": false,
1505
+ "asc": true,
1506
+ "nulls": "last"
1507
+ },
1508
+ {
1509
+ "expression": "coalesce(\"connection_id\", '')",
1510
+ "asc": true,
1511
+ "isExpression": true,
1512
+ "nulls": "last"
1513
+ }
1514
+ ],
1515
+ "isUnique": true,
1516
+ "where": "\"overrides\".\"reset_at\" is null",
1517
+ "concurrently": false,
1518
+ "method": "btree",
1519
+ "with": {}
1520
+ }
1521
+ },
1522
+ "foreignKeys": {
1523
+ "overrides_workspace_id_workspaces_id_fk": {
1524
+ "name": "overrides_workspace_id_workspaces_id_fk",
1525
+ "tableFrom": "overrides",
1526
+ "tableTo": "workspaces",
1527
+ "columnsFrom": ["workspace_id"],
1528
+ "columnsTo": ["id"],
1529
+ "onDelete": "cascade",
1530
+ "onUpdate": "no action"
1531
+ },
1532
+ "overrides_connection_id_connections_id_fk": {
1533
+ "name": "overrides_connection_id_connections_id_fk",
1534
+ "tableFrom": "overrides",
1535
+ "tableTo": "connections",
1536
+ "columnsFrom": ["connection_id"],
1537
+ "columnsTo": ["id"],
1538
+ "onDelete": "cascade",
1539
+ "onUpdate": "no action"
1540
+ }
1541
+ },
1542
+ "compositePrimaryKeys": {},
1543
+ "uniqueConstraints": {},
1544
+ "policies": {},
1545
+ "checkConstraints": {},
1546
+ "isRLSEnabled": false
1547
+ },
1548
+ "public.suppressions": {
1549
+ "name": "suppressions",
1550
+ "schema": "",
1551
+ "columns": {
1552
+ "id": {
1553
+ "name": "id",
1554
+ "type": "text",
1555
+ "primaryKey": true,
1556
+ "notNull": true
1557
+ },
1558
+ "workspace_id": {
1559
+ "name": "workspace_id",
1560
+ "type": "text",
1561
+ "primaryKey": false,
1562
+ "notNull": true
1563
+ },
1564
+ "email": {
1565
+ "name": "email",
1566
+ "type": "text",
1567
+ "primaryKey": false,
1568
+ "notNull": true
1569
+ },
1570
+ "reason": {
1571
+ "name": "reason",
1572
+ "type": "suppression_reason",
1573
+ "typeSchema": "public",
1574
+ "primaryKey": false,
1575
+ "notNull": true
1576
+ },
1577
+ "message_id": {
1578
+ "name": "message_id",
1579
+ "type": "text",
1580
+ "primaryKey": false,
1581
+ "notNull": false
1582
+ },
1583
+ "created_at": {
1584
+ "name": "created_at",
1585
+ "type": "timestamp with time zone",
1586
+ "primaryKey": false,
1587
+ "notNull": true,
1588
+ "default": "now()"
1589
+ }
1590
+ },
1591
+ "indexes": {
1592
+ "suppressions_ws_email_uq": {
1593
+ "name": "suppressions_ws_email_uq",
1594
+ "columns": [
1595
+ {
1596
+ "expression": "workspace_id",
1597
+ "isExpression": false,
1598
+ "asc": true,
1599
+ "nulls": "last"
1600
+ },
1601
+ {
1602
+ "expression": "email",
1603
+ "isExpression": false,
1604
+ "asc": true,
1605
+ "nulls": "last"
1606
+ }
1607
+ ],
1608
+ "isUnique": true,
1609
+ "concurrently": false,
1610
+ "method": "btree",
1611
+ "with": {}
1612
+ }
1613
+ },
1614
+ "foreignKeys": {
1615
+ "suppressions_workspace_id_workspaces_id_fk": {
1616
+ "name": "suppressions_workspace_id_workspaces_id_fk",
1617
+ "tableFrom": "suppressions",
1618
+ "tableTo": "workspaces",
1619
+ "columnsFrom": ["workspace_id"],
1620
+ "columnsTo": ["id"],
1621
+ "onDelete": "cascade",
1622
+ "onUpdate": "no action"
1623
+ },
1624
+ "suppressions_message_id_messages_id_fk": {
1625
+ "name": "suppressions_message_id_messages_id_fk",
1626
+ "tableFrom": "suppressions",
1627
+ "tableTo": "messages",
1628
+ "columnsFrom": ["message_id"],
1629
+ "columnsTo": ["id"],
1630
+ "onDelete": "set null",
1631
+ "onUpdate": "no action"
1632
+ }
1633
+ },
1634
+ "compositePrimaryKeys": {},
1635
+ "uniqueConstraints": {},
1636
+ "policies": {},
1637
+ "checkConstraints": {},
1638
+ "isRLSEnabled": false
1639
+ },
1640
+ "public.templates": {
1641
+ "name": "templates",
1642
+ "schema": "",
1643
+ "columns": {
1644
+ "id": {
1645
+ "name": "id",
1646
+ "type": "text",
1647
+ "primaryKey": true,
1648
+ "notNull": true
1649
+ },
1650
+ "workspace_id": {
1651
+ "name": "workspace_id",
1652
+ "type": "text",
1653
+ "primaryKey": false,
1654
+ "notNull": true
1655
+ },
1656
+ "external_id": {
1657
+ "name": "external_id",
1658
+ "type": "integer",
1659
+ "primaryKey": false,
1660
+ "notNull": true
1661
+ },
1662
+ "name": {
1663
+ "name": "name",
1664
+ "type": "text",
1665
+ "primaryKey": false,
1666
+ "notNull": true
1667
+ },
1668
+ "subject": {
1669
+ "name": "subject",
1670
+ "type": "text",
1671
+ "primaryKey": false,
1672
+ "notNull": true
1673
+ },
1674
+ "html": {
1675
+ "name": "html",
1676
+ "type": "text",
1677
+ "primaryKey": false,
1678
+ "notNull": false
1679
+ },
1680
+ "text": {
1681
+ "name": "text",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": false
1685
+ },
1686
+ "sender": {
1687
+ "name": "sender",
1688
+ "type": "jsonb",
1689
+ "primaryKey": false,
1690
+ "notNull": false
1691
+ },
1692
+ "created_at": {
1693
+ "name": "created_at",
1694
+ "type": "timestamp with time zone",
1695
+ "primaryKey": false,
1696
+ "notNull": true,
1697
+ "default": "now()"
1698
+ },
1699
+ "updated_at": {
1700
+ "name": "updated_at",
1701
+ "type": "timestamp with time zone",
1702
+ "primaryKey": false,
1703
+ "notNull": true,
1704
+ "default": "now()"
1705
+ }
1706
+ },
1707
+ "indexes": {
1708
+ "templates_external_uq": {
1709
+ "name": "templates_external_uq",
1710
+ "columns": [
1711
+ {
1712
+ "expression": "workspace_id",
1713
+ "isExpression": false,
1714
+ "asc": true,
1715
+ "nulls": "last"
1716
+ },
1717
+ {
1718
+ "expression": "external_id",
1719
+ "isExpression": false,
1720
+ "asc": true,
1721
+ "nulls": "last"
1722
+ }
1723
+ ],
1724
+ "isUnique": true,
1725
+ "concurrently": false,
1726
+ "method": "btree",
1727
+ "with": {}
1728
+ }
1729
+ },
1730
+ "foreignKeys": {
1731
+ "templates_workspace_id_workspaces_id_fk": {
1732
+ "name": "templates_workspace_id_workspaces_id_fk",
1733
+ "tableFrom": "templates",
1734
+ "tableTo": "workspaces",
1735
+ "columnsFrom": ["workspace_id"],
1736
+ "columnsTo": ["id"],
1737
+ "onDelete": "cascade",
1738
+ "onUpdate": "no action"
1739
+ }
1740
+ },
1741
+ "compositePrimaryKeys": {},
1742
+ "uniqueConstraints": {},
1743
+ "policies": {},
1744
+ "checkConstraints": {},
1745
+ "isRLSEnabled": false
1746
+ },
1747
+ "public.webhook_attempts": {
1748
+ "name": "webhook_attempts",
1749
+ "schema": "",
1750
+ "columns": {
1751
+ "id": {
1752
+ "name": "id",
1753
+ "type": "text",
1754
+ "primaryKey": true,
1755
+ "notNull": true
1756
+ },
1757
+ "delivery_id": {
1758
+ "name": "delivery_id",
1759
+ "type": "text",
1760
+ "primaryKey": false,
1761
+ "notNull": true
1762
+ },
1763
+ "attempt_no": {
1764
+ "name": "attempt_no",
1765
+ "type": "integer",
1766
+ "primaryKey": false,
1767
+ "notNull": true
1768
+ },
1769
+ "request_headers": {
1770
+ "name": "request_headers",
1771
+ "type": "jsonb",
1772
+ "primaryKey": false,
1773
+ "notNull": true
1774
+ },
1775
+ "signed_at": {
1776
+ "name": "signed_at",
1777
+ "type": "integer",
1778
+ "primaryKey": false,
1779
+ "notNull": false
1780
+ },
1781
+ "response_status": {
1782
+ "name": "response_status",
1783
+ "type": "integer",
1784
+ "primaryKey": false,
1785
+ "notNull": false
1786
+ },
1787
+ "response_body": {
1788
+ "name": "response_body",
1789
+ "type": "text",
1790
+ "primaryKey": false,
1791
+ "notNull": false
1792
+ },
1793
+ "duration_ms": {
1794
+ "name": "duration_ms",
1795
+ "type": "integer",
1796
+ "primaryKey": false,
1797
+ "notNull": true
1798
+ },
1799
+ "error": {
1800
+ "name": "error",
1801
+ "type": "text",
1802
+ "primaryKey": false,
1803
+ "notNull": false
1804
+ },
1805
+ "created_at": {
1806
+ "name": "created_at",
1807
+ "type": "timestamp with time zone",
1808
+ "primaryKey": false,
1809
+ "notNull": true,
1810
+ "default": "now()"
1811
+ }
1812
+ },
1813
+ "indexes": {
1814
+ "attempts_delivery_idx": {
1815
+ "name": "attempts_delivery_idx",
1816
+ "columns": [
1817
+ {
1818
+ "expression": "delivery_id",
1819
+ "isExpression": false,
1820
+ "asc": true,
1821
+ "nulls": "last"
1822
+ }
1823
+ ],
1824
+ "isUnique": false,
1825
+ "concurrently": false,
1826
+ "method": "btree",
1827
+ "with": {}
1828
+ }
1829
+ },
1830
+ "foreignKeys": {
1831
+ "webhook_attempts_delivery_id_webhook_deliveries_id_fk": {
1832
+ "name": "webhook_attempts_delivery_id_webhook_deliveries_id_fk",
1833
+ "tableFrom": "webhook_attempts",
1834
+ "tableTo": "webhook_deliveries",
1835
+ "columnsFrom": ["delivery_id"],
1836
+ "columnsTo": ["id"],
1837
+ "onDelete": "cascade",
1838
+ "onUpdate": "no action"
1839
+ }
1840
+ },
1841
+ "compositePrimaryKeys": {},
1842
+ "uniqueConstraints": {},
1843
+ "policies": {},
1844
+ "checkConstraints": {},
1845
+ "isRLSEnabled": false
1846
+ },
1847
+ "public.webhook_deliveries": {
1848
+ "name": "webhook_deliveries",
1849
+ "schema": "",
1850
+ "columns": {
1851
+ "id": {
1852
+ "name": "id",
1853
+ "type": "text",
1854
+ "primaryKey": true,
1855
+ "notNull": true
1856
+ },
1857
+ "workspace_id": {
1858
+ "name": "workspace_id",
1859
+ "type": "text",
1860
+ "primaryKey": false,
1861
+ "notNull": true
1862
+ },
1863
+ "endpoint_id": {
1864
+ "name": "endpoint_id",
1865
+ "type": "text",
1866
+ "primaryKey": false,
1867
+ "notNull": true
1868
+ },
1869
+ "event_id": {
1870
+ "name": "event_id",
1871
+ "type": "text",
1872
+ "primaryKey": false,
1873
+ "notNull": false
1874
+ },
1875
+ "message_id": {
1876
+ "name": "message_id",
1877
+ "type": "text",
1878
+ "primaryKey": false,
1879
+ "notNull": false
1880
+ },
1881
+ "payload_format": {
1882
+ "name": "payload_format",
1883
+ "type": "payload_format",
1884
+ "typeSchema": "public",
1885
+ "primaryKey": false,
1886
+ "notNull": true
1887
+ },
1888
+ "canonical_event": {
1889
+ "name": "canonical_event",
1890
+ "type": "webhook_event",
1891
+ "typeSchema": "public",
1892
+ "primaryKey": false,
1893
+ "notNull": true
1894
+ },
1895
+ "dialect_event": {
1896
+ "name": "dialect_event",
1897
+ "type": "text",
1898
+ "primaryKey": false,
1899
+ "notNull": true
1900
+ },
1901
+ "recipient": {
1902
+ "name": "recipient",
1903
+ "type": "text",
1904
+ "primaryKey": false,
1905
+ "notNull": false
1906
+ },
1907
+ "body": {
1908
+ "name": "body",
1909
+ "type": "text",
1910
+ "primaryKey": false,
1911
+ "notNull": true
1912
+ },
1913
+ "content_type": {
1914
+ "name": "content_type",
1915
+ "type": "text",
1916
+ "primaryKey": false,
1917
+ "notNull": true,
1918
+ "default": "'application/json'"
1919
+ },
1920
+ "status": {
1921
+ "name": "status",
1922
+ "type": "webhook_delivery_status",
1923
+ "typeSchema": "public",
1924
+ "primaryKey": false,
1925
+ "notNull": true,
1926
+ "default": "'pending'"
1927
+ },
1928
+ "attempt_count": {
1929
+ "name": "attempt_count",
1930
+ "type": "integer",
1931
+ "primaryKey": false,
1932
+ "notNull": true,
1933
+ "default": 0
1934
+ },
1935
+ "next_attempt_at": {
1936
+ "name": "next_attempt_at",
1937
+ "type": "timestamp with time zone",
1938
+ "primaryKey": false,
1939
+ "notNull": false
1940
+ },
1941
+ "last_status_code": {
1942
+ "name": "last_status_code",
1943
+ "type": "integer",
1944
+ "primaryKey": false,
1945
+ "notNull": false
1946
+ },
1947
+ "replay_of": {
1948
+ "name": "replay_of",
1949
+ "type": "text",
1950
+ "primaryKey": false,
1951
+ "notNull": false
1952
+ },
1953
+ "replay_mode": {
1954
+ "name": "replay_mode",
1955
+ "type": "replay_mode",
1956
+ "typeSchema": "public",
1957
+ "primaryKey": false,
1958
+ "notNull": false
1959
+ },
1960
+ "created_at": {
1961
+ "name": "created_at",
1962
+ "type": "timestamp with time zone",
1963
+ "primaryKey": false,
1964
+ "notNull": true,
1965
+ "default": "now()"
1966
+ }
1967
+ },
1968
+ "indexes": {
1969
+ "deliveries_ws_time_idx": {
1970
+ "name": "deliveries_ws_time_idx",
1971
+ "columns": [
1972
+ {
1973
+ "expression": "workspace_id",
1974
+ "isExpression": false,
1975
+ "asc": true,
1976
+ "nulls": "last"
1977
+ },
1978
+ {
1979
+ "expression": "created_at",
1980
+ "isExpression": false,
1981
+ "asc": false,
1982
+ "nulls": "last"
1983
+ }
1984
+ ],
1985
+ "isUnique": false,
1986
+ "concurrently": false,
1987
+ "method": "btree",
1988
+ "with": {}
1989
+ },
1990
+ "deliveries_message_idx": {
1991
+ "name": "deliveries_message_idx",
1992
+ "columns": [
1993
+ {
1994
+ "expression": "message_id",
1995
+ "isExpression": false,
1996
+ "asc": true,
1997
+ "nulls": "last"
1998
+ }
1999
+ ],
2000
+ "isUnique": false,
2001
+ "concurrently": false,
2002
+ "method": "btree",
2003
+ "with": {}
2004
+ },
2005
+ "deliveries_ws_format_idx": {
2006
+ "name": "deliveries_ws_format_idx",
2007
+ "columns": [
2008
+ {
2009
+ "expression": "workspace_id",
2010
+ "isExpression": false,
2011
+ "asc": true,
2012
+ "nulls": "last"
2013
+ },
2014
+ {
2015
+ "expression": "payload_format",
2016
+ "isExpression": false,
2017
+ "asc": true,
2018
+ "nulls": "last"
2019
+ }
2020
+ ],
2021
+ "isUnique": false,
2022
+ "concurrently": false,
2023
+ "method": "btree",
2024
+ "with": {}
2025
+ }
2026
+ },
2027
+ "foreignKeys": {
2028
+ "webhook_deliveries_workspace_id_workspaces_id_fk": {
2029
+ "name": "webhook_deliveries_workspace_id_workspaces_id_fk",
2030
+ "tableFrom": "webhook_deliveries",
2031
+ "tableTo": "workspaces",
2032
+ "columnsFrom": ["workspace_id"],
2033
+ "columnsTo": ["id"],
2034
+ "onDelete": "cascade",
2035
+ "onUpdate": "no action"
2036
+ },
2037
+ "webhook_deliveries_endpoint_id_webhook_endpoints_id_fk": {
2038
+ "name": "webhook_deliveries_endpoint_id_webhook_endpoints_id_fk",
2039
+ "tableFrom": "webhook_deliveries",
2040
+ "tableTo": "webhook_endpoints",
2041
+ "columnsFrom": ["endpoint_id"],
2042
+ "columnsTo": ["id"],
2043
+ "onDelete": "cascade",
2044
+ "onUpdate": "no action"
2045
+ },
2046
+ "webhook_deliveries_event_id_message_events_id_fk": {
2047
+ "name": "webhook_deliveries_event_id_message_events_id_fk",
2048
+ "tableFrom": "webhook_deliveries",
2049
+ "tableTo": "message_events",
2050
+ "columnsFrom": ["event_id"],
2051
+ "columnsTo": ["id"],
2052
+ "onDelete": "set null",
2053
+ "onUpdate": "no action"
2054
+ },
2055
+ "webhook_deliveries_message_id_messages_id_fk": {
2056
+ "name": "webhook_deliveries_message_id_messages_id_fk",
2057
+ "tableFrom": "webhook_deliveries",
2058
+ "tableTo": "messages",
2059
+ "columnsFrom": ["message_id"],
2060
+ "columnsTo": ["id"],
2061
+ "onDelete": "set null",
2062
+ "onUpdate": "no action"
2063
+ }
2064
+ },
2065
+ "compositePrimaryKeys": {},
2066
+ "uniqueConstraints": {},
2067
+ "policies": {},
2068
+ "checkConstraints": {},
2069
+ "isRLSEnabled": false
2070
+ },
2071
+ "public.webhook_endpoints": {
2072
+ "name": "webhook_endpoints",
2073
+ "schema": "",
2074
+ "columns": {
2075
+ "id": {
2076
+ "name": "id",
2077
+ "type": "text",
2078
+ "primaryKey": true,
2079
+ "notNull": true
2080
+ },
2081
+ "numeric_id": {
2082
+ "name": "numeric_id",
2083
+ "type": "integer",
2084
+ "primaryKey": false,
2085
+ "notNull": true,
2086
+ "identity": {
2087
+ "type": "always",
2088
+ "name": "webhook_endpoints_numeric_id_seq",
2089
+ "schema": "public",
2090
+ "increment": "1",
2091
+ "startWith": "1",
2092
+ "minValue": "1",
2093
+ "maxValue": "2147483647",
2094
+ "cache": "1",
2095
+ "cycle": false
2096
+ }
2097
+ },
2098
+ "workspace_id": {
2099
+ "name": "workspace_id",
2100
+ "type": "text",
2101
+ "primaryKey": false,
2102
+ "notNull": true
2103
+ },
2104
+ "connection_id": {
2105
+ "name": "connection_id",
2106
+ "type": "text",
2107
+ "primaryKey": false,
2108
+ "notNull": false
2109
+ },
2110
+ "url": {
2111
+ "name": "url",
2112
+ "type": "text",
2113
+ "primaryKey": false,
2114
+ "notNull": true
2115
+ },
2116
+ "payload_format": {
2117
+ "name": "payload_format",
2118
+ "type": "payload_format",
2119
+ "typeSchema": "public",
2120
+ "primaryKey": false,
2121
+ "notNull": true
2122
+ },
2123
+ "events": {
2124
+ "name": "events",
2125
+ "type": "webhook_event[]",
2126
+ "typeSchema": "public",
2127
+ "primaryKey": false,
2128
+ "notNull": true
2129
+ },
2130
+ "secret": {
2131
+ "name": "secret",
2132
+ "type": "text",
2133
+ "primaryKey": false,
2134
+ "notNull": false
2135
+ },
2136
+ "brevo_auth": {
2137
+ "name": "brevo_auth",
2138
+ "type": "brevo_auth_type",
2139
+ "typeSchema": "public",
2140
+ "primaryKey": false,
2141
+ "notNull": true,
2142
+ "default": "'none'"
2143
+ },
2144
+ "custom_headers": {
2145
+ "name": "custom_headers",
2146
+ "type": "jsonb",
2147
+ "primaryKey": false,
2148
+ "notNull": true,
2149
+ "default": "'[]'::jsonb"
2150
+ },
2151
+ "description": {
2152
+ "name": "description",
2153
+ "type": "text",
2154
+ "primaryKey": false,
2155
+ "notNull": false
2156
+ },
2157
+ "enabled": {
2158
+ "name": "enabled",
2159
+ "type": "boolean",
2160
+ "primaryKey": false,
2161
+ "notNull": true,
2162
+ "default": true
2163
+ },
2164
+ "created_at": {
2165
+ "name": "created_at",
2166
+ "type": "timestamp with time zone",
2167
+ "primaryKey": false,
2168
+ "notNull": true,
2169
+ "default": "now()"
2170
+ },
2171
+ "updated_at": {
2172
+ "name": "updated_at",
2173
+ "type": "timestamp with time zone",
2174
+ "primaryKey": false,
2175
+ "notNull": true,
2176
+ "default": "now()"
2177
+ }
2178
+ },
2179
+ "indexes": {
2180
+ "webhook_endpoints_scope_idx": {
2181
+ "name": "webhook_endpoints_scope_idx",
2182
+ "columns": [
2183
+ {
2184
+ "expression": "workspace_id",
2185
+ "isExpression": false,
2186
+ "asc": true,
2187
+ "nulls": "last"
2188
+ },
2189
+ {
2190
+ "expression": "connection_id",
2191
+ "isExpression": false,
2192
+ "asc": true,
2193
+ "nulls": "last"
2194
+ }
2195
+ ],
2196
+ "isUnique": false,
2197
+ "concurrently": false,
2198
+ "method": "btree",
2199
+ "with": {}
2200
+ }
2201
+ },
2202
+ "foreignKeys": {
2203
+ "webhook_endpoints_workspace_id_workspaces_id_fk": {
2204
+ "name": "webhook_endpoints_workspace_id_workspaces_id_fk",
2205
+ "tableFrom": "webhook_endpoints",
2206
+ "tableTo": "workspaces",
2207
+ "columnsFrom": ["workspace_id"],
2208
+ "columnsTo": ["id"],
2209
+ "onDelete": "cascade",
2210
+ "onUpdate": "no action"
2211
+ },
2212
+ "webhook_endpoints_connection_id_connections_id_fk": {
2213
+ "name": "webhook_endpoints_connection_id_connections_id_fk",
2214
+ "tableFrom": "webhook_endpoints",
2215
+ "tableTo": "connections",
2216
+ "columnsFrom": ["connection_id"],
2217
+ "columnsTo": ["id"],
2218
+ "onDelete": "cascade",
2219
+ "onUpdate": "no action"
2220
+ }
2221
+ },
2222
+ "compositePrimaryKeys": {},
2223
+ "uniqueConstraints": {
2224
+ "webhook_endpoints_numeric_id_unique": {
2225
+ "name": "webhook_endpoints_numeric_id_unique",
2226
+ "nullsNotDistinct": false,
2227
+ "columns": ["numeric_id"]
2228
+ }
2229
+ },
2230
+ "policies": {},
2231
+ "checkConstraints": {
2232
+ "webhook_secret_required": {
2233
+ "name": "webhook_secret_required",
2234
+ "value": "\"webhook_endpoints\".\"payload_format\" = 'brevo' or \"webhook_endpoints\".\"secret\" is not null"
2235
+ }
2236
+ },
2237
+ "isRLSEnabled": false
2238
+ },
2239
+ "public.workspaces": {
2240
+ "name": "workspaces",
2241
+ "schema": "",
2242
+ "columns": {
2243
+ "id": {
2244
+ "name": "id",
2245
+ "type": "text",
2246
+ "primaryKey": true,
2247
+ "notNull": true
2248
+ },
2249
+ "slug": {
2250
+ "name": "slug",
2251
+ "type": "text",
2252
+ "primaryKey": false,
2253
+ "notNull": true
2254
+ },
2255
+ "name": {
2256
+ "name": "name",
2257
+ "type": "text",
2258
+ "primaryKey": false,
2259
+ "notNull": true
2260
+ },
2261
+ "description": {
2262
+ "name": "description",
2263
+ "type": "text",
2264
+ "primaryKey": false,
2265
+ "notNull": false
2266
+ },
2267
+ "ephemeral": {
2268
+ "name": "ephemeral",
2269
+ "type": "boolean",
2270
+ "primaryKey": false,
2271
+ "notNull": true,
2272
+ "default": false
2273
+ },
2274
+ "idle_ttl_seconds": {
2275
+ "name": "idle_ttl_seconds",
2276
+ "type": "integer",
2277
+ "primaryKey": false,
2278
+ "notNull": false
2279
+ },
2280
+ "last_activity_at": {
2281
+ "name": "last_activity_at",
2282
+ "type": "timestamp with time zone",
2283
+ "primaryKey": false,
2284
+ "notNull": true,
2285
+ "default": "now()"
2286
+ },
2287
+ "expires_at": {
2288
+ "name": "expires_at",
2289
+ "type": "timestamp with time zone",
2290
+ "primaryKey": false,
2291
+ "notNull": false
2292
+ },
2293
+ "retention_seconds": {
2294
+ "name": "retention_seconds",
2295
+ "type": "integer",
2296
+ "primaryKey": false,
2297
+ "notNull": true,
2298
+ "default": 604800
2299
+ },
2300
+ "max_messages": {
2301
+ "name": "max_messages",
2302
+ "type": "integer",
2303
+ "primaryKey": false,
2304
+ "notNull": false
2305
+ },
2306
+ "rate_limit": {
2307
+ "name": "rate_limit",
2308
+ "type": "jsonb",
2309
+ "primaryKey": false,
2310
+ "notNull": false
2311
+ },
2312
+ "simulation": {
2313
+ "name": "simulation",
2314
+ "type": "jsonb",
2315
+ "primaryKey": false,
2316
+ "notNull": true,
2317
+ "default": "'{\"rates\":{\"delivered\":100},\"rules\":[],\"latency\":{\"minMs\":0,\"maxMs\":0},\"openRate\":0,\"clickRate\":0}'::jsonb"
2318
+ },
2319
+ "metadata": {
2320
+ "name": "metadata",
2321
+ "type": "jsonb",
2322
+ "primaryKey": false,
2323
+ "notNull": false
2324
+ },
2325
+ "timezone": {
2326
+ "name": "timezone",
2327
+ "type": "text",
2328
+ "primaryKey": false,
2329
+ "notNull": true,
2330
+ "default": "'UTC'"
2331
+ },
2332
+ "created_via": {
2333
+ "name": "created_via",
2334
+ "type": "text",
2335
+ "primaryKey": false,
2336
+ "notNull": true
2337
+ },
2338
+ "created_at": {
2339
+ "name": "created_at",
2340
+ "type": "timestamp with time zone",
2341
+ "primaryKey": false,
2342
+ "notNull": true,
2343
+ "default": "now()"
2344
+ },
2345
+ "updated_at": {
2346
+ "name": "updated_at",
2347
+ "type": "timestamp with time zone",
2348
+ "primaryKey": false,
2349
+ "notNull": true,
2350
+ "default": "now()"
2351
+ }
2352
+ },
2353
+ "indexes": {
2354
+ "workspaces_expiry_idx": {
2355
+ "name": "workspaces_expiry_idx",
2356
+ "columns": [
2357
+ {
2358
+ "expression": "expires_at",
2359
+ "isExpression": false,
2360
+ "asc": true,
2361
+ "nulls": "last"
2362
+ }
2363
+ ],
2364
+ "isUnique": false,
2365
+ "where": "\"workspaces\".\"ephemeral\"",
2366
+ "concurrently": false,
2367
+ "method": "btree",
2368
+ "with": {}
2369
+ },
2370
+ "workspaces_picker_idx": {
2371
+ "name": "workspaces_picker_idx",
2372
+ "columns": [
2373
+ {
2374
+ "expression": "ephemeral",
2375
+ "isExpression": false,
2376
+ "asc": true,
2377
+ "nulls": "last"
2378
+ },
2379
+ {
2380
+ "expression": "name",
2381
+ "isExpression": false,
2382
+ "asc": true,
2383
+ "nulls": "last"
2384
+ }
2385
+ ],
2386
+ "isUnique": false,
2387
+ "concurrently": false,
2388
+ "method": "btree",
2389
+ "with": {}
2390
+ }
2391
+ },
2392
+ "foreignKeys": {},
2393
+ "compositePrimaryKeys": {},
2394
+ "uniqueConstraints": {
2395
+ "workspaces_slug_unique": {
2396
+ "name": "workspaces_slug_unique",
2397
+ "nullsNotDistinct": false,
2398
+ "columns": ["slug"]
2399
+ }
2400
+ },
2401
+ "policies": {},
2402
+ "checkConstraints": {},
2403
+ "isRLSEnabled": false
2404
+ }
2405
+ },
2406
+ "enums": {
2407
+ "public.api_dialect": {
2408
+ "name": "api_dialect",
2409
+ "schema": "public",
2410
+ "values": ["native", "resend", "brevo", "admin", "capture", "mcp"]
2411
+ },
2412
+ "public.api_key_scope": {
2413
+ "name": "api_key_scope",
2414
+ "schema": "public",
2415
+ "values": ["workspace", "connection"]
2416
+ },
2417
+ "public.brevo_auth_type": {
2418
+ "name": "brevo_auth_type",
2419
+ "schema": "public",
2420
+ "values": ["none", "bearer", "basic"]
2421
+ },
2422
+ "public.connection_kind": {
2423
+ "name": "connection_kind",
2424
+ "schema": "public",
2425
+ "values": ["resend", "brevo", "smtp"]
2426
+ },
2427
+ "public.delivery_status": {
2428
+ "name": "delivery_status",
2429
+ "schema": "public",
2430
+ "values": [
2431
+ "queued",
2432
+ "sent",
2433
+ "delivered",
2434
+ "deferred",
2435
+ "soft_bounce",
2436
+ "hard_bounce",
2437
+ "complained",
2438
+ "failed",
2439
+ "suppressed"
2440
+ ]
2441
+ },
2442
+ "public.event_origin": {
2443
+ "name": "event_origin",
2444
+ "schema": "public",
2445
+ "values": ["simulation", "api", "ui", "mcp"]
2446
+ },
2447
+ "public.event_type": {
2448
+ "name": "event_type",
2449
+ "schema": "public",
2450
+ "values": [
2451
+ "accepted",
2452
+ "sent",
2453
+ "delivered",
2454
+ "deferred",
2455
+ "soft_bounce",
2456
+ "hard_bounce",
2457
+ "complained",
2458
+ "failed",
2459
+ "suppressed",
2460
+ "opened",
2461
+ "clicked"
2462
+ ]
2463
+ },
2464
+ "public.message_source": {
2465
+ "name": "message_source",
2466
+ "schema": "public",
2467
+ "values": ["native", "resend", "brevo", "smtp"]
2468
+ },
2469
+ "public.payload_format": {
2470
+ "name": "payload_format",
2471
+ "schema": "public",
2472
+ "values": ["unified", "resend", "brevo"]
2473
+ },
2474
+ "public.recipient_kind": {
2475
+ "name": "recipient_kind",
2476
+ "schema": "public",
2477
+ "values": ["to", "cc", "bcc"]
2478
+ },
2479
+ "public.replay_mode": {
2480
+ "name": "replay_mode",
2481
+ "schema": "public",
2482
+ "values": ["exact", "resign"]
2483
+ },
2484
+ "public.smtp_outcome": {
2485
+ "name": "smtp_outcome",
2486
+ "schema": "public",
2487
+ "values": ["accepted", "rejected", "auth_failed", "error"]
2488
+ },
2489
+ "public.suppression_reason": {
2490
+ "name": "suppression_reason",
2491
+ "schema": "public",
2492
+ "values": ["hard_bounce", "complained", "manual"]
2493
+ },
2494
+ "public.webhook_delivery_status": {
2495
+ "name": "webhook_delivery_status",
2496
+ "schema": "public",
2497
+ "values": ["pending", "retrying", "succeeded", "failed"]
2498
+ },
2499
+ "public.webhook_event": {
2500
+ "name": "webhook_event",
2501
+ "schema": "public",
2502
+ "values": [
2503
+ "email.sent",
2504
+ "email.delivered",
2505
+ "email.deferred",
2506
+ "email.soft_bounced",
2507
+ "email.hard_bounced",
2508
+ "email.complained",
2509
+ "email.opened",
2510
+ "email.clicked",
2511
+ "email.suppressed",
2512
+ "email.failed"
2513
+ ]
2514
+ }
2515
+ },
2516
+ "schemas": {},
2517
+ "sequences": {},
2518
+ "roles": {},
2519
+ "policies": {},
2520
+ "views": {},
2521
+ "_meta": {
2522
+ "columns": {},
2523
+ "schemas": {},
2524
+ "tables": {}
2525
+ }
2526
+ }