@open-workspace/email 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/README.md +9 -4
  2. package/alchemy/index.ts +130 -2
  3. package/drizzle/mailbox/0002_good_komodo.sql +2 -0
  4. package/drizzle/mailbox/0003_after_0_4_2.sql +180 -0
  5. package/drizzle/mailbox/meta/0002_snapshot.json +1017 -0
  6. package/drizzle/mailbox/meta/0003_snapshot.json +1507 -0
  7. package/drizzle/mailbox/meta/_journal.json +14 -0
  8. package/drizzle/mailbox/migrations.js +5 -1
  9. package/migrations/0001_overrated_ricochet.sql +2 -0
  10. package/migrations/0002_after_0_4_2.sql +35 -0
  11. package/migrations/meta/0001_snapshot.json +564 -0
  12. package/migrations/meta/0002_snapshot.json +807 -0
  13. package/migrations/meta/_journal.json +14 -0
  14. package/package.json +23 -7
  15. package/shared/attachment-preview.ts +18 -8
  16. package/shared/folder-order.ts +31 -6
  17. package/shared/mail-headers.ts +3 -3
  18. package/shared/mail-html.ts +25 -0
  19. package/shared/mail-import.ts +0 -7
  20. package/shared/mail-received.ts +4 -4
  21. package/shared/mail-rule-actions.ts +47 -0
  22. package/shared/mail.ts +70 -4
  23. package/shared/office-preview.ts +0 -4
  24. package/shared/pdfjs-assets.ts +1 -3
  25. package/shared/rich-content.ts +35 -0
  26. package/shared/signature.ts +15 -0
  27. package/src/admin/address-auto-reply.tsx +49 -0
  28. package/src/admin/blocked-senders.tsx +86 -66
  29. package/src/admin/forward-destinations.tsx +140 -0
  30. package/src/admin/mail-archive.tsx +134 -0
  31. package/src/admin/team-signature.tsx +90 -0
  32. package/src/client.tsx +130 -16
  33. package/src/mail/attachment-preview-dialog.tsx +13 -5
  34. package/src/mail/auto-reply-banner.tsx +61 -0
  35. package/src/mail/blocked-senders.tsx +124 -91
  36. package/src/mail/compose-window-chrome.tsx +20 -8
  37. package/src/mail/compose-window.tsx +387 -365
  38. package/src/mail/composer-asset-bookmarks.ts +47 -12
  39. package/src/mail/composer-attachment-list.tsx +42 -17
  40. package/src/mail/composer-editor-document.ts +54 -10
  41. package/src/mail/composer-editor.tsx +44 -44
  42. package/src/mail/composer-link-text.ts +42 -0
  43. package/src/mail/composer-recipient-fields.tsx +25 -16
  44. package/src/mail/composer-recipients.ts +62 -16
  45. package/src/mail/composer-session.ts +107 -23
  46. package/src/mail/composer-toolbar.tsx +15 -1
  47. package/src/mail/composer-upload-client.ts +29 -1
  48. package/src/mail/composer-upload-progress.ts +2 -2
  49. package/src/mail/conversation-actions-model.ts +56 -0
  50. package/src/mail/conversation-list.tsx +263 -128
  51. package/src/mail/conversation-loading-skeleton.tsx +165 -90
  52. package/src/mail/conversation-message.tsx +257 -102
  53. package/src/mail/conversation-order.ts +12 -0
  54. package/src/mail/conversation-reply.tsx +313 -189
  55. package/src/mail/conversation-selection-toolbar.tsx +188 -143
  56. package/src/mail/conversation-view.tsx +320 -85
  57. package/src/mail/delivery-indicator.tsx +33 -12
  58. package/src/mail/draft-attachments.ts +194 -0
  59. package/src/mail/email-html-body.tsx +97 -53
  60. package/src/mail/folder-cleanup-bar.tsx +193 -0
  61. package/src/mail/folder-glyph.tsx +5 -0
  62. package/src/mail/folder-manager.tsx +71 -38
  63. package/src/mail/mail-app-bar.tsx +15 -3
  64. package/src/mail/mail-dock.tsx +19 -3
  65. package/src/mail/mail-focus.ts +48 -0
  66. package/src/mail/mail-folders.ts +14 -2
  67. package/src/mail/mail-layout.css +20 -0
  68. package/src/mail/mail-mailbox-sheet.tsx +22 -69
  69. package/src/mail/mail-nav-rail.tsx +7 -4
  70. package/src/mail/mail-nav.tsx +66 -46
  71. package/src/mail/mail-prefetch.ts +30 -9
  72. package/src/mail/mail-primitives.tsx +6 -4
  73. package/src/mail/mail-queries.ts +122 -20
  74. package/src/mail/mail-query-cache.ts +1085 -173
  75. package/src/mail/mail-search-params.ts +35 -0
  76. package/src/mail/mail-shell.tsx +32 -9
  77. package/src/mail/mailbox-ai-settings.tsx +56 -42
  78. package/src/mail/mailbox-realtime.tsx +4 -12
  79. package/src/mail/mailbox-rules.tsx +898 -0
  80. package/src/mail/message-actions.tsx +38 -26
  81. package/src/mail/message-attachments.tsx +20 -12
  82. package/src/mail/message-body.ts +53 -0
  83. package/src/mail/message-format.ts +8 -2
  84. package/src/mail/message-header.tsx +3 -1
  85. package/src/mail/message-translation.tsx +34 -67
  86. package/src/mail/original-message-sheet.tsx +63 -50
  87. package/src/mail/original-message.ts +6 -6
  88. package/src/mail/pane-splitter.tsx +3 -3
  89. package/src/mail/pdf-preview.tsx +70 -62
  90. package/src/mail/plain-message-text.tsx +28 -0
  91. package/src/mail/print-message.ts +31 -36
  92. package/src/mail/reader-pane.tsx +134 -102
  93. package/src/mail/recipient-combobox.tsx +52 -29
  94. package/src/mail/recipient-field-row.tsx +3 -0
  95. package/src/mail/rich-content.ts +128 -0
  96. package/src/mail/sanitize-email-html.ts +57 -33
  97. package/src/mail/sender-actions.tsx +49 -39
  98. package/src/mail/sender-authentication.tsx +1 -1
  99. package/src/mail/sender-dialogs.tsx +67 -43
  100. package/src/mail/sender-security.tsx +9 -10
  101. package/src/mail/signature.ts +43 -0
  102. package/src/mail/translation-html.ts +3 -3
  103. package/src/mail/types.ts +12 -0
  104. package/src/mail/use-composer-attachment-preflight.ts +23 -60
  105. package/src/mail/use-composer-core.ts +286 -0
  106. package/src/mail/use-composer-navigation.ts +120 -0
  107. package/src/mail/use-composer-submission.ts +154 -19
  108. package/src/mail/use-conversation-actions.ts +292 -0
  109. package/src/mail/use-conversation-position.ts +51 -0
  110. package/src/mail/use-conversation-selection.ts +192 -89
  111. package/src/mail/use-draft-autosave.ts +394 -0
  112. package/src/mail/use-drafts.ts +194 -0
  113. package/src/mail/use-mail-controller.ts +754 -213
  114. package/src/mail/use-mail-data.ts +210 -100
  115. package/src/mail/use-mail-safety.ts +19 -38
  116. package/src/mail/use-mail-send.ts +18 -6
  117. package/src/mail/use-pdf-translation.ts +1 -1
  118. package/src/mail/use-reply-cc.ts +61 -0
  119. package/src/mail/use-visible-message-read.ts +128 -64
  120. package/src/pwa/push-key.ts +18 -0
  121. package/src/pwa/push-subscription.ts +88 -26
  122. package/src/settings/auto-reply-editor.tsx +454 -0
  123. package/src/settings/auto-reply-page.tsx +59 -0
  124. package/src/settings/mail-apps-page.tsx +52 -43
  125. package/src/settings/notifications-page.tsx +82 -67
  126. package/src/settings/rich-content-editor.tsx +182 -0
  127. package/src/settings/settings-queries.ts +57 -0
  128. package/src/settings/signature-editor.tsx +142 -0
  129. package/src/settings/signature-page.tsx +70 -0
  130. package/worker/admin/blocked-sender-routes.ts +10 -16
  131. package/worker/backups/eml.ts +185 -0
  132. package/worker/backups/file-parts.ts +140 -0
  133. package/worker/backups/mail-backup.ts +644 -0
  134. package/worker/backups/settings-backup.ts +866 -0
  135. package/worker/backups/stream-eml.ts +73 -0
  136. package/worker/db/schema.ts +98 -2
  137. package/worker/jmap/attachment-blobs.ts +113 -0
  138. package/worker/jmap/blobs.ts +162 -0
  139. package/worker/jmap/draft-content.ts +42 -0
  140. package/worker/jmap/drafts.ts +70 -0
  141. package/worker/jmap/email-body.ts +152 -0
  142. package/worker/jmap/email-methods.ts +1223 -0
  143. package/worker/jmap/eventsource.ts +9 -8
  144. package/worker/jmap/import-methods.ts +205 -0
  145. package/worker/jmap/mailbox-methods.ts +187 -0
  146. package/worker/jmap/method-core.ts +379 -0
  147. package/worker/jmap/methods.ts +108 -1815
  148. package/worker/jmap/push-subscription-methods.ts +373 -0
  149. package/worker/jmap/push-types.ts +46 -2
  150. package/worker/jmap/push.ts +24 -31
  151. package/worker/jmap/routes.ts +144 -153
  152. package/worker/jmap/submission-methods.ts +395 -0
  153. package/worker/mail/access.ts +35 -12
  154. package/worker/mail/ai-classification.ts +2 -2
  155. package/worker/mail/archive-object.ts +96 -0
  156. package/worker/mail/archive-routes.ts +35 -0
  157. package/worker/mail/archive.ts +682 -0
  158. package/worker/mail/auth-headers.ts +48 -40
  159. package/worker/mail/auto-reply-routes.ts +255 -0
  160. package/worker/mail/auto-reply.ts +243 -0
  161. package/worker/mail/bimi.ts +53 -36
  162. package/worker/mail/bootstrap.ts +11 -3
  163. package/worker/mail/capabilities.ts +69 -0
  164. package/worker/mail/classification-signals.ts +1 -1
  165. package/worker/mail/confusables-data.ts +9 -0
  166. package/worker/mail/conversation-cursor.ts +6 -15
  167. package/worker/mail/delivery-events.ts +9 -7
  168. package/worker/mail/delivery-facts.ts +1 -1
  169. package/worker/mail/demo-routes.ts +3 -3
  170. package/worker/mail/doh.ts +3 -3
  171. package/worker/mail/download-links.ts +153 -0
  172. package/worker/mail/downloads.ts +2 -6
  173. package/worker/mail/draft-routes.ts +473 -0
  174. package/worker/mail/draft-sender.ts +54 -0
  175. package/worker/mail/edge-cache.ts +41 -55
  176. package/worker/mail/email-routing.ts +123 -0
  177. package/worker/mail/forward-destinations.ts +114 -0
  178. package/worker/mail/forward-downloads.ts +115 -0
  179. package/worker/mail/forward-html.ts +85 -0
  180. package/worker/mail/header-metadata.ts +2 -5
  181. package/worker/mail/impersonation.ts +102 -101
  182. package/worker/mail/import-routes.ts +29 -82
  183. package/worker/mail/import.ts +130 -0
  184. package/worker/mail/inbound-delivery.ts +6 -5
  185. package/worker/mail/inbound.ts +58 -28
  186. package/worker/mail/ip-intel.ts +8 -17
  187. package/worker/mail/isolate-cache.ts +1 -1
  188. package/worker/mail/mailbox-deletion.ts +33 -12
  189. package/worker/mail/mailbox-directory.ts +39 -65
  190. package/worker/mail/mailing-list.ts +29 -58
  191. package/worker/mail/message-security.ts +3 -3
  192. package/worker/mail/message-view.ts +12 -10
  193. package/worker/mail/office-conversion.ts +3 -5
  194. package/worker/mail/office-preview-container.ts +3 -8
  195. package/worker/mail/outbound-content.ts +139 -65
  196. package/worker/mail/outbound-delivery.ts +20 -17
  197. package/worker/mail/outbound-service.ts +34 -9
  198. package/worker/mail/outbound.ts +146 -75
  199. package/worker/mail/outgoing-context.ts +60 -30
  200. package/worker/mail/participants.ts +10 -15
  201. package/worker/mail/plain-body.ts +39 -0
  202. package/worker/mail/push-endpoint.ts +17 -0
  203. package/worker/mail/push-notifications.ts +87 -43
  204. package/worker/mail/quote-parser.ts +107 -25
  205. package/worker/mail/r2-presigned-urls.ts +7 -0
  206. package/worker/mail/receive.ts +146 -39
  207. package/worker/mail/recipients.ts +1 -1
  208. package/worker/mail/remote-proxy.ts +3 -3
  209. package/worker/mail/repeat.ts +1 -1
  210. package/worker/mail/reply-plan.ts +124 -26
  211. package/worker/mail/rfc.ts +15 -7
  212. package/worker/mail/rich-content.ts +207 -0
  213. package/worker/mail/routes.ts +696 -304
  214. package/worker/mail/routing.ts +274 -0
  215. package/worker/mail/rules.ts +230 -0
  216. package/worker/mail/safety-routes.ts +88 -80
  217. package/worker/mail/schemas.ts +222 -31
  218. package/worker/mail/search.ts +25 -2
  219. package/worker/mail/security-settings.ts +4 -10
  220. package/worker/mail/send-message.ts +238 -0
  221. package/worker/mail/sender-intel.ts +12 -20
  222. package/worker/mail/signature-routes.ts +201 -0
  223. package/worker/mail/signatures.ts +195 -0
  224. package/worker/mail/spamhaus.ts +28 -16
  225. package/worker/mail/storage-keys.ts +35 -0
  226. package/worker/mail/unsubscribe.ts +19 -41
  227. package/worker/mail/uploads.ts +193 -80
  228. package/worker/mail/webhook-source.ts +3 -2
  229. package/worker/mail/workspace-safety.ts +194 -60
  230. package/worker/mailbox/demo.ts +13 -15
  231. package/worker/mailbox/email-index.ts +92 -13
  232. package/worker/mailbox/folder-model.ts +0 -20
  233. package/worker/mailbox/import-placement.ts +21 -36
  234. package/worker/mailbox/inbound-decision.ts +114 -0
  235. package/worker/mailbox/inbox-counts.ts +45 -25
  236. package/worker/mailbox/index.ts +843 -2888
  237. package/worker/mailbox/jmap-change-log.ts +195 -0
  238. package/worker/mailbox/jmap-email-rows.ts +186 -0
  239. package/worker/mailbox/jmap-mailboxes.ts +116 -0
  240. package/worker/mailbox/jmap-placement.ts +139 -0
  241. package/worker/mailbox/jmap-query-filter.ts +231 -0
  242. package/worker/mailbox/jmap-store.ts +167 -299
  243. package/worker/mailbox/mailbox-auto-reply.ts +301 -0
  244. package/worker/mailbox/mailbox-backup.ts +538 -0
  245. package/worker/mailbox/mailbox-drafts.ts +417 -0
  246. package/worker/mailbox/mailbox-folders.ts +242 -0
  247. package/worker/mailbox/mailbox-import.ts +450 -0
  248. package/worker/mailbox/mailbox-inbound.ts +934 -0
  249. package/worker/mailbox/mailbox-jmap.ts +294 -0
  250. package/worker/mailbox/mailbox-outbound.ts +413 -0
  251. package/worker/mailbox/mailbox-rules.ts +336 -0
  252. package/worker/mailbox/mailbox-senders.ts +294 -0
  253. package/worker/mailbox/mailbox-storage.ts +438 -0
  254. package/worker/mailbox/mailbox-views.ts +891 -0
  255. package/worker/mailbox/model.ts +1 -0
  256. package/worker/mailbox/office-preview-jobs.ts +59 -47
  257. package/worker/mailbox/placement.ts +933 -0
  258. package/worker/mailbox/restore-thread.ts +52 -0
  259. package/worker/mailbox/retention.ts +36 -0
  260. package/worker/mailbox/schema.ts +211 -1
  261. package/worker/mailbox/senders.ts +216 -178
  262. package/worker/mailbox/spam-undo-filing.ts +138 -0
  263. package/worker/mailbox/spam-undo.ts +240 -0
  264. package/worker/mailbox/support.ts +416 -0
  265. package/worker/mcp/mail-action-tools.ts +156 -0
  266. package/worker/mcp/mail-compose-tools.ts +8 -2
  267. package/worker/mcp/mail-safety-tools.ts +4 -4
  268. package/worker/module.ts +23 -2
  269. package/src/mail/use-compose-submission.ts +0 -208
  270. package/src/mail/use-reply-submission.ts +0 -114
  271. package/worker/mail/capped-body.ts +0 -36
@@ -0,0 +1,1507 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "f22fffc1-4811-4036-8778-7ae4a3c21406",
5
+ "prevId": "1509aa0d-ecfd-4b1f-aa3b-640058f78a37",
6
+ "tables": {
7
+ "auto_reply_log": {
8
+ "name": "auto_reply_log",
9
+ "columns": {
10
+ "sender_address": {
11
+ "name": "sender_address",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "last_replied_at": {
18
+ "name": "last_replied_at",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "last_original_email_id": {
25
+ "name": "last_original_email_id",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "last_outbound_message_id": {
32
+ "name": "last_outbound_message_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ }
38
+ },
39
+ "indexes": {
40
+ "auto_reply_log_replied_idx": {
41
+ "name": "auto_reply_log_replied_idx",
42
+ "columns": [
43
+ "last_replied_at"
44
+ ],
45
+ "isUnique": false
46
+ }
47
+ },
48
+ "foreignKeys": {},
49
+ "compositePrimaryKeys": {},
50
+ "uniqueConstraints": {},
51
+ "checkConstraints": {}
52
+ },
53
+ "auto_reply_settings": {
54
+ "name": "auto_reply_settings",
55
+ "columns": {
56
+ "id": {
57
+ "name": "id",
58
+ "type": "integer",
59
+ "primaryKey": true,
60
+ "notNull": true,
61
+ "autoincrement": false
62
+ },
63
+ "enabled": {
64
+ "name": "enabled",
65
+ "type": "integer",
66
+ "primaryKey": false,
67
+ "notNull": true,
68
+ "autoincrement": false
69
+ },
70
+ "starts_at": {
71
+ "name": "starts_at",
72
+ "type": "integer",
73
+ "primaryKey": false,
74
+ "notNull": false,
75
+ "autoincrement": false
76
+ },
77
+ "ends_at": {
78
+ "name": "ends_at",
79
+ "type": "integer",
80
+ "primaryKey": false,
81
+ "notNull": false,
82
+ "autoincrement": false
83
+ },
84
+ "reply_interval_days": {
85
+ "name": "reply_interval_days",
86
+ "type": "integer",
87
+ "primaryKey": false,
88
+ "notNull": true,
89
+ "autoincrement": false
90
+ },
91
+ "inside": {
92
+ "name": "inside",
93
+ "type": "text",
94
+ "primaryKey": false,
95
+ "notNull": true,
96
+ "autoincrement": false
97
+ },
98
+ "outside": {
99
+ "name": "outside",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "autoincrement": false
104
+ },
105
+ "updated_by": {
106
+ "name": "updated_by",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": true,
110
+ "autoincrement": false
111
+ },
112
+ "updated_at": {
113
+ "name": "updated_at",
114
+ "type": "integer",
115
+ "primaryKey": false,
116
+ "notNull": true,
117
+ "autoincrement": false
118
+ }
119
+ },
120
+ "indexes": {},
121
+ "foreignKeys": {},
122
+ "compositePrimaryKeys": {},
123
+ "uniqueConstraints": {},
124
+ "checkConstraints": {}
125
+ },
126
+ "conversations": {
127
+ "name": "conversations",
128
+ "columns": {
129
+ "id": {
130
+ "name": "id",
131
+ "type": "text",
132
+ "primaryKey": true,
133
+ "notNull": true,
134
+ "autoincrement": false
135
+ },
136
+ "latest_email_id": {
137
+ "name": "latest_email_id",
138
+ "type": "text",
139
+ "primaryKey": false,
140
+ "notNull": true,
141
+ "autoincrement": false
142
+ },
143
+ "timeline_at": {
144
+ "name": "timeline_at",
145
+ "type": "integer",
146
+ "primaryKey": false,
147
+ "notNull": true,
148
+ "autoincrement": false
149
+ },
150
+ "mailbox_state": {
151
+ "name": "mailbox_state",
152
+ "type": "text",
153
+ "primaryKey": false,
154
+ "notNull": true,
155
+ "autoincrement": false,
156
+ "default": "'active'"
157
+ },
158
+ "folder_id": {
159
+ "name": "folder_id",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": false,
163
+ "autoincrement": false
164
+ },
165
+ "has_incoming": {
166
+ "name": "has_incoming",
167
+ "type": "integer",
168
+ "primaryKey": false,
169
+ "notNull": true,
170
+ "autoincrement": false,
171
+ "default": false
172
+ },
173
+ "has_outgoing": {
174
+ "name": "has_outgoing",
175
+ "type": "integer",
176
+ "primaryKey": false,
177
+ "notNull": true,
178
+ "autoincrement": false,
179
+ "default": false
180
+ },
181
+ "state_changed_at": {
182
+ "name": "state_changed_at",
183
+ "type": "integer",
184
+ "primaryKey": false,
185
+ "notNull": false,
186
+ "autoincrement": false
187
+ }
188
+ },
189
+ "indexes": {
190
+ "conversations_state_changed_idx": {
191
+ "name": "conversations_state_changed_idx",
192
+ "columns": [
193
+ "mailbox_state",
194
+ "state_changed_at"
195
+ ],
196
+ "isUnique": false
197
+ },
198
+ "conversations_timeline_idx": {
199
+ "name": "conversations_timeline_idx",
200
+ "columns": [
201
+ "timeline_at",
202
+ "latest_email_id"
203
+ ],
204
+ "isUnique": false
205
+ },
206
+ "conversations_inbox_timeline_idx": {
207
+ "name": "conversations_inbox_timeline_idx",
208
+ "columns": [
209
+ "mailbox_state",
210
+ "has_incoming",
211
+ "timeline_at",
212
+ "latest_email_id"
213
+ ],
214
+ "isUnique": false
215
+ },
216
+ "conversations_sent_timeline_idx": {
217
+ "name": "conversations_sent_timeline_idx",
218
+ "columns": [
219
+ "mailbox_state",
220
+ "has_outgoing",
221
+ "timeline_at",
222
+ "latest_email_id"
223
+ ],
224
+ "isUnique": false
225
+ },
226
+ "conversations_folder_timeline_idx": {
227
+ "name": "conversations_folder_timeline_idx",
228
+ "columns": [
229
+ "folder_id",
230
+ "timeline_at",
231
+ "latest_email_id"
232
+ ],
233
+ "isUnique": false
234
+ }
235
+ },
236
+ "foreignKeys": {
237
+ "conversations_latest_email_id_emails_id_fk": {
238
+ "name": "conversations_latest_email_id_emails_id_fk",
239
+ "tableFrom": "conversations",
240
+ "tableTo": "emails",
241
+ "columnsFrom": [
242
+ "latest_email_id"
243
+ ],
244
+ "columnsTo": [
245
+ "id"
246
+ ],
247
+ "onDelete": "no action",
248
+ "onUpdate": "no action"
249
+ },
250
+ "conversations_folder_id_folders_id_fk": {
251
+ "name": "conversations_folder_id_folders_id_fk",
252
+ "tableFrom": "conversations",
253
+ "tableTo": "folders",
254
+ "columnsFrom": [
255
+ "folder_id"
256
+ ],
257
+ "columnsTo": [
258
+ "id"
259
+ ],
260
+ "onDelete": "set null",
261
+ "onUpdate": "no action"
262
+ }
263
+ },
264
+ "compositePrimaryKeys": {},
265
+ "uniqueConstraints": {},
266
+ "checkConstraints": {}
267
+ },
268
+ "drafts": {
269
+ "name": "drafts",
270
+ "columns": {
271
+ "user_id": {
272
+ "name": "user_id",
273
+ "type": "text",
274
+ "primaryKey": false,
275
+ "notNull": true,
276
+ "autoincrement": false
277
+ },
278
+ "id": {
279
+ "name": "id",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": true,
283
+ "autoincrement": false
284
+ },
285
+ "kind": {
286
+ "name": "kind",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": true,
290
+ "autoincrement": false
291
+ },
292
+ "source_email_id": {
293
+ "name": "source_email_id",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": false,
297
+ "autoincrement": false
298
+ },
299
+ "forwarded_attachment_ids": {
300
+ "name": "forwarded_attachment_ids",
301
+ "type": "text",
302
+ "primaryKey": false,
303
+ "notNull": false,
304
+ "autoincrement": false
305
+ },
306
+ "conversation_id": {
307
+ "name": "conversation_id",
308
+ "type": "text",
309
+ "primaryKey": false,
310
+ "notNull": false,
311
+ "autoincrement": false
312
+ },
313
+ "reply_mode": {
314
+ "name": "reply_mode",
315
+ "type": "text",
316
+ "primaryKey": false,
317
+ "notNull": false,
318
+ "autoincrement": false
319
+ },
320
+ "to_json": {
321
+ "name": "to_json",
322
+ "type": "text",
323
+ "primaryKey": false,
324
+ "notNull": true,
325
+ "autoincrement": false
326
+ },
327
+ "cc_json": {
328
+ "name": "cc_json",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": true,
332
+ "autoincrement": false
333
+ },
334
+ "bcc_json": {
335
+ "name": "bcc_json",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": true,
339
+ "autoincrement": false
340
+ },
341
+ "reply_to": {
342
+ "name": "reply_to",
343
+ "type": "text",
344
+ "primaryKey": false,
345
+ "notNull": false,
346
+ "autoincrement": false
347
+ },
348
+ "subject": {
349
+ "name": "subject",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ },
355
+ "body_text": {
356
+ "name": "body_text",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ },
362
+ "body_html": {
363
+ "name": "body_html",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": false,
367
+ "autoincrement": false
368
+ },
369
+ "editor_html": {
370
+ "name": "editor_html",
371
+ "type": "text",
372
+ "primaryKey": false,
373
+ "notNull": false,
374
+ "autoincrement": false
375
+ },
376
+ "attachments_json": {
377
+ "name": "attachments_json",
378
+ "type": "text",
379
+ "primaryKey": false,
380
+ "notNull": true,
381
+ "autoincrement": false,
382
+ "default": "'[]'"
383
+ },
384
+ "version": {
385
+ "name": "version",
386
+ "type": "integer",
387
+ "primaryKey": false,
388
+ "notNull": true,
389
+ "autoincrement": false
390
+ },
391
+ "updated_at": {
392
+ "name": "updated_at",
393
+ "type": "integer",
394
+ "primaryKey": false,
395
+ "notNull": true,
396
+ "autoincrement": false
397
+ }
398
+ },
399
+ "indexes": {
400
+ "drafts_user_updated_idx": {
401
+ "name": "drafts_user_updated_idx",
402
+ "columns": [
403
+ "user_id",
404
+ "updated_at"
405
+ ],
406
+ "isUnique": false
407
+ }
408
+ },
409
+ "foreignKeys": {},
410
+ "compositePrimaryKeys": {
411
+ "drafts_user_id_id_pk": {
412
+ "columns": [
413
+ "user_id",
414
+ "id"
415
+ ],
416
+ "name": "drafts_user_id_id_pk"
417
+ }
418
+ },
419
+ "uniqueConstraints": {},
420
+ "checkConstraints": {}
421
+ },
422
+ "email_read_states": {
423
+ "name": "email_read_states",
424
+ "columns": {
425
+ "user_id": {
426
+ "name": "user_id",
427
+ "type": "text",
428
+ "primaryKey": false,
429
+ "notNull": true,
430
+ "autoincrement": false
431
+ },
432
+ "email_id": {
433
+ "name": "email_id",
434
+ "type": "text",
435
+ "primaryKey": false,
436
+ "notNull": true,
437
+ "autoincrement": false
438
+ },
439
+ "read_at": {
440
+ "name": "read_at",
441
+ "type": "integer",
442
+ "primaryKey": false,
443
+ "notNull": true,
444
+ "autoincrement": false
445
+ }
446
+ },
447
+ "indexes": {
448
+ "email_read_states_email_idx": {
449
+ "name": "email_read_states_email_idx",
450
+ "columns": [
451
+ "email_id"
452
+ ],
453
+ "isUnique": false
454
+ }
455
+ },
456
+ "foreignKeys": {
457
+ "email_read_states_email_id_emails_id_fk": {
458
+ "name": "email_read_states_email_id_emails_id_fk",
459
+ "tableFrom": "email_read_states",
460
+ "tableTo": "emails",
461
+ "columnsFrom": [
462
+ "email_id"
463
+ ],
464
+ "columnsTo": [
465
+ "id"
466
+ ],
467
+ "onDelete": "cascade",
468
+ "onUpdate": "no action"
469
+ }
470
+ },
471
+ "compositePrimaryKeys": {
472
+ "email_read_states_user_id_email_id_pk": {
473
+ "columns": [
474
+ "user_id",
475
+ "email_id"
476
+ ],
477
+ "name": "email_read_states_user_id_email_id_pk"
478
+ }
479
+ },
480
+ "uniqueConstraints": {},
481
+ "checkConstraints": {}
482
+ },
483
+ "emails": {
484
+ "name": "emails",
485
+ "columns": {
486
+ "id": {
487
+ "name": "id",
488
+ "type": "text",
489
+ "primaryKey": true,
490
+ "notNull": true,
491
+ "autoincrement": false
492
+ },
493
+ "request_fingerprint": {
494
+ "name": "request_fingerprint",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": false,
498
+ "autoincrement": false
499
+ },
500
+ "conversation_id": {
501
+ "name": "conversation_id",
502
+ "type": "text",
503
+ "primaryKey": false,
504
+ "notNull": true,
505
+ "autoincrement": false
506
+ },
507
+ "direction": {
508
+ "name": "direction",
509
+ "type": "text",
510
+ "primaryKey": false,
511
+ "notNull": true,
512
+ "autoincrement": false
513
+ },
514
+ "message_id_header": {
515
+ "name": "message_id_header",
516
+ "type": "text",
517
+ "primaryKey": false,
518
+ "notNull": false,
519
+ "autoincrement": false
520
+ },
521
+ "in_reply_to_json": {
522
+ "name": "in_reply_to_json",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": true,
526
+ "autoincrement": false,
527
+ "default": "'[]'"
528
+ },
529
+ "references_json": {
530
+ "name": "references_json",
531
+ "type": "text",
532
+ "primaryKey": false,
533
+ "notNull": true,
534
+ "autoincrement": false,
535
+ "default": "'[]'"
536
+ },
537
+ "from_json": {
538
+ "name": "from_json",
539
+ "type": "text",
540
+ "primaryKey": false,
541
+ "notNull": true,
542
+ "autoincrement": false
543
+ },
544
+ "reply_to_json": {
545
+ "name": "reply_to_json",
546
+ "type": "text",
547
+ "primaryKey": false,
548
+ "notNull": true,
549
+ "autoincrement": false,
550
+ "default": "'[]'"
551
+ },
552
+ "to_json": {
553
+ "name": "to_json",
554
+ "type": "text",
555
+ "primaryKey": false,
556
+ "notNull": true,
557
+ "autoincrement": false,
558
+ "default": "'[]'"
559
+ },
560
+ "cc_json": {
561
+ "name": "cc_json",
562
+ "type": "text",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "autoincrement": false,
566
+ "default": "'[]'"
567
+ },
568
+ "bcc_json": {
569
+ "name": "bcc_json",
570
+ "type": "text",
571
+ "primaryKey": false,
572
+ "notNull": true,
573
+ "autoincrement": false,
574
+ "default": "'[]'"
575
+ },
576
+ "subject": {
577
+ "name": "subject",
578
+ "type": "text",
579
+ "primaryKey": false,
580
+ "notNull": true,
581
+ "autoincrement": false,
582
+ "default": "'(no subject)'"
583
+ },
584
+ "preview": {
585
+ "name": "preview",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true,
589
+ "autoincrement": false,
590
+ "default": "''"
591
+ },
592
+ "body_text": {
593
+ "name": "body_text",
594
+ "type": "text",
595
+ "primaryKey": false,
596
+ "notNull": false,
597
+ "autoincrement": false
598
+ },
599
+ "quoted_text": {
600
+ "name": "quoted_text",
601
+ "type": "text",
602
+ "primaryKey": false,
603
+ "notNull": false,
604
+ "autoincrement": false
605
+ },
606
+ "body_html_r2_key": {
607
+ "name": "body_html_r2_key",
608
+ "type": "text",
609
+ "primaryKey": false,
610
+ "notNull": false,
611
+ "autoincrement": false
612
+ },
613
+ "raw_mime_r2_key": {
614
+ "name": "raw_mime_r2_key",
615
+ "type": "text",
616
+ "primaryKey": false,
617
+ "notNull": false,
618
+ "autoincrement": false
619
+ },
620
+ "raw_size": {
621
+ "name": "raw_size",
622
+ "type": "integer",
623
+ "primaryKey": false,
624
+ "notNull": false,
625
+ "autoincrement": false
626
+ },
627
+ "sent_at": {
628
+ "name": "sent_at",
629
+ "type": "integer",
630
+ "primaryKey": false,
631
+ "notNull": false,
632
+ "autoincrement": false
633
+ },
634
+ "authentication_results_json": {
635
+ "name": "authentication_results_json",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": false,
639
+ "autoincrement": false
640
+ },
641
+ "envelope_from": {
642
+ "name": "envelope_from",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": false,
646
+ "autoincrement": false
647
+ },
648
+ "envelope_to": {
649
+ "name": "envelope_to",
650
+ "type": "text",
651
+ "primaryKey": false,
652
+ "notNull": false,
653
+ "autoincrement": false
654
+ },
655
+ "list_unsubscribe_json": {
656
+ "name": "list_unsubscribe_json",
657
+ "type": "text",
658
+ "primaryKey": false,
659
+ "notNull": false,
660
+ "autoincrement": false
661
+ },
662
+ "sender_intel_json": {
663
+ "name": "sender_intel_json",
664
+ "type": "text",
665
+ "primaryKey": false,
666
+ "notNull": false,
667
+ "autoincrement": false
668
+ },
669
+ "ai_classification_json": {
670
+ "name": "ai_classification_json",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": false,
674
+ "autoincrement": false
675
+ },
676
+ "delivery_json": {
677
+ "name": "delivery_json",
678
+ "type": "text",
679
+ "primaryKey": false,
680
+ "notNull": false,
681
+ "autoincrement": false
682
+ },
683
+ "screening_json": {
684
+ "name": "screening_json",
685
+ "type": "text",
686
+ "primaryKey": false,
687
+ "notNull": false,
688
+ "autoincrement": false
689
+ },
690
+ "report_label": {
691
+ "name": "report_label",
692
+ "type": "text",
693
+ "primaryKey": false,
694
+ "notNull": false,
695
+ "autoincrement": false
696
+ },
697
+ "split_from_conversation_id": {
698
+ "name": "split_from_conversation_id",
699
+ "type": "text",
700
+ "primaryKey": false,
701
+ "notNull": false,
702
+ "autoincrement": false
703
+ },
704
+ "attachments_json": {
705
+ "name": "attachments_json",
706
+ "type": "text",
707
+ "primaryKey": false,
708
+ "notNull": true,
709
+ "autoincrement": false,
710
+ "default": "'[]'"
711
+ },
712
+ "list_id": {
713
+ "name": "list_id",
714
+ "type": "text",
715
+ "primaryKey": false,
716
+ "notNull": false,
717
+ "autoincrement": false
718
+ },
719
+ "list_post_address": {
720
+ "name": "list_post_address",
721
+ "type": "text",
722
+ "primaryKey": false,
723
+ "notNull": false,
724
+ "autoincrement": false
725
+ },
726
+ "timeline_at": {
727
+ "name": "timeline_at",
728
+ "type": "integer",
729
+ "primaryKey": false,
730
+ "notNull": true,
731
+ "autoincrement": false
732
+ },
733
+ "transport_state": {
734
+ "name": "transport_state",
735
+ "type": "text",
736
+ "primaryKey": false,
737
+ "notNull": true,
738
+ "autoincrement": false
739
+ },
740
+ "transport_error": {
741
+ "name": "transport_error",
742
+ "type": "text",
743
+ "primaryKey": false,
744
+ "notNull": false,
745
+ "autoincrement": false
746
+ },
747
+ "delivery_status_json": {
748
+ "name": "delivery_status_json",
749
+ "type": "text",
750
+ "primaryKey": false,
751
+ "notNull": true,
752
+ "autoincrement": false,
753
+ "default": "'[]'"
754
+ },
755
+ "backup_sha256": {
756
+ "name": "backup_sha256",
757
+ "type": "text",
758
+ "primaryKey": false,
759
+ "notNull": false,
760
+ "autoincrement": false
761
+ }
762
+ },
763
+ "indexes": {
764
+ "emails_conversation_timeline_idx": {
765
+ "name": "emails_conversation_timeline_idx",
766
+ "columns": [
767
+ "conversation_id",
768
+ "timeline_at",
769
+ "id"
770
+ ],
771
+ "isUnique": false
772
+ },
773
+ "emails_message_id_header_idx": {
774
+ "name": "emails_message_id_header_idx",
775
+ "columns": [
776
+ "message_id_header"
777
+ ],
778
+ "isUnique": false
779
+ }
780
+ },
781
+ "foreignKeys": {},
782
+ "compositePrimaryKeys": {},
783
+ "uniqueConstraints": {},
784
+ "checkConstraints": {}
785
+ },
786
+ "folders": {
787
+ "name": "folders",
788
+ "columns": {
789
+ "id": {
790
+ "name": "id",
791
+ "type": "text",
792
+ "primaryKey": true,
793
+ "notNull": true,
794
+ "autoincrement": false
795
+ },
796
+ "name": {
797
+ "name": "name",
798
+ "type": "text",
799
+ "primaryKey": false,
800
+ "notNull": true,
801
+ "autoincrement": false
802
+ },
803
+ "sort_order": {
804
+ "name": "sort_order",
805
+ "type": "integer",
806
+ "primaryKey": false,
807
+ "notNull": true,
808
+ "autoincrement": false,
809
+ "default": 100
810
+ }
811
+ },
812
+ "indexes": {
813
+ "folders_name_unique": {
814
+ "name": "folders_name_unique",
815
+ "columns": [
816
+ "name"
817
+ ],
818
+ "isUnique": true
819
+ },
820
+ "folders_order_idx": {
821
+ "name": "folders_order_idx",
822
+ "columns": [
823
+ "sort_order",
824
+ "name"
825
+ ],
826
+ "isUnique": false
827
+ }
828
+ },
829
+ "foreignKeys": {},
830
+ "compositePrimaryKeys": {},
831
+ "uniqueConstraints": {},
832
+ "checkConstraints": {}
833
+ },
834
+ "jmap_changes": {
835
+ "name": "jmap_changes",
836
+ "columns": {
837
+ "seq": {
838
+ "name": "seq",
839
+ "type": "integer",
840
+ "primaryKey": true,
841
+ "notNull": true,
842
+ "autoincrement": true
843
+ },
844
+ "type": {
845
+ "name": "type",
846
+ "type": "text",
847
+ "primaryKey": false,
848
+ "notNull": true,
849
+ "autoincrement": false
850
+ },
851
+ "id": {
852
+ "name": "id",
853
+ "type": "text",
854
+ "primaryKey": false,
855
+ "notNull": true,
856
+ "autoincrement": false
857
+ },
858
+ "kind": {
859
+ "name": "kind",
860
+ "type": "text",
861
+ "primaryKey": false,
862
+ "notNull": true,
863
+ "autoincrement": false
864
+ },
865
+ "user_id": {
866
+ "name": "user_id",
867
+ "type": "text",
868
+ "primaryKey": false,
869
+ "notNull": false,
870
+ "autoincrement": false
871
+ }
872
+ },
873
+ "indexes": {
874
+ "jmap_changes_type_seq_idx": {
875
+ "name": "jmap_changes_type_seq_idx",
876
+ "columns": [
877
+ "type",
878
+ "seq"
879
+ ],
880
+ "isUnique": false
881
+ }
882
+ },
883
+ "foreignKeys": {},
884
+ "compositePrimaryKeys": {},
885
+ "uniqueConstraints": {},
886
+ "checkConstraints": {}
887
+ },
888
+ "mail_rules": {
889
+ "name": "mail_rules",
890
+ "columns": {
891
+ "id": {
892
+ "name": "id",
893
+ "type": "text",
894
+ "primaryKey": true,
895
+ "notNull": true,
896
+ "autoincrement": false
897
+ },
898
+ "position": {
899
+ "name": "position",
900
+ "type": "integer",
901
+ "primaryKey": false,
902
+ "notNull": true,
903
+ "autoincrement": false
904
+ },
905
+ "name": {
906
+ "name": "name",
907
+ "type": "text",
908
+ "primaryKey": false,
909
+ "notNull": true,
910
+ "autoincrement": false
911
+ },
912
+ "enabled": {
913
+ "name": "enabled",
914
+ "type": "integer",
915
+ "primaryKey": false,
916
+ "notNull": true,
917
+ "autoincrement": false
918
+ },
919
+ "match": {
920
+ "name": "match",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true,
924
+ "autoincrement": false
925
+ },
926
+ "conditions_json": {
927
+ "name": "conditions_json",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": true,
931
+ "autoincrement": false
932
+ },
933
+ "actions_json": {
934
+ "name": "actions_json",
935
+ "type": "text",
936
+ "primaryKey": false,
937
+ "notNull": true,
938
+ "autoincrement": false
939
+ },
940
+ "stop_processing": {
941
+ "name": "stop_processing",
942
+ "type": "integer",
943
+ "primaryKey": false,
944
+ "notNull": true,
945
+ "autoincrement": false
946
+ },
947
+ "updated_at": {
948
+ "name": "updated_at",
949
+ "type": "integer",
950
+ "primaryKey": false,
951
+ "notNull": true,
952
+ "autoincrement": false
953
+ }
954
+ },
955
+ "indexes": {
956
+ "mail_rules_position_idx": {
957
+ "name": "mail_rules_position_idx",
958
+ "columns": [
959
+ "position"
960
+ ],
961
+ "isUnique": false
962
+ }
963
+ },
964
+ "foreignKeys": {},
965
+ "compositePrimaryKeys": {},
966
+ "uniqueConstraints": {},
967
+ "checkConstraints": {}
968
+ },
969
+ "mailbox_ai_configuration": {
970
+ "name": "mailbox_ai_configuration",
971
+ "columns": {
972
+ "id": {
973
+ "name": "id",
974
+ "type": "text",
975
+ "primaryKey": true,
976
+ "notNull": true,
977
+ "autoincrement": false
978
+ },
979
+ "instructions": {
980
+ "name": "instructions",
981
+ "type": "text",
982
+ "primaryKey": false,
983
+ "notNull": true,
984
+ "autoincrement": false,
985
+ "default": "''"
986
+ },
987
+ "confidence_threshold": {
988
+ "name": "confidence_threshold",
989
+ "type": "integer",
990
+ "primaryKey": false,
991
+ "notNull": true,
992
+ "autoincrement": false,
993
+ "default": 75
994
+ },
995
+ "updated_at": {
996
+ "name": "updated_at",
997
+ "type": "integer",
998
+ "primaryKey": false,
999
+ "notNull": true,
1000
+ "autoincrement": false
1001
+ }
1002
+ },
1003
+ "indexes": {},
1004
+ "foreignKeys": {},
1005
+ "compositePrimaryKeys": {},
1006
+ "uniqueConstraints": {},
1007
+ "checkConstraints": {}
1008
+ },
1009
+ "pending_inbound": {
1010
+ "name": "pending_inbound",
1011
+ "columns": {
1012
+ "id": {
1013
+ "name": "id",
1014
+ "type": "text",
1015
+ "primaryKey": true,
1016
+ "notNull": true,
1017
+ "autoincrement": false
1018
+ },
1019
+ "raw_object_key": {
1020
+ "name": "raw_object_key",
1021
+ "type": "text",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "autoincrement": false
1025
+ },
1026
+ "envelope_from": {
1027
+ "name": "envelope_from",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": true,
1031
+ "autoincrement": false
1032
+ },
1033
+ "envelope_to": {
1034
+ "name": "envelope_to",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "autoincrement": false
1039
+ },
1040
+ "list_address": {
1041
+ "name": "list_address",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": false,
1045
+ "autoincrement": false
1046
+ },
1047
+ "received_at": {
1048
+ "name": "received_at",
1049
+ "type": "integer",
1050
+ "primaryKey": false,
1051
+ "notNull": true,
1052
+ "autoincrement": false
1053
+ },
1054
+ "attempts": {
1055
+ "name": "attempts",
1056
+ "type": "integer",
1057
+ "primaryKey": false,
1058
+ "notNull": true,
1059
+ "autoincrement": false,
1060
+ "default": 0
1061
+ },
1062
+ "ai_attempts": {
1063
+ "name": "ai_attempts",
1064
+ "type": "integer",
1065
+ "primaryKey": false,
1066
+ "notNull": true,
1067
+ "autoincrement": false,
1068
+ "default": 0
1069
+ },
1070
+ "unfinished_attempts": {
1071
+ "name": "unfinished_attempts",
1072
+ "type": "integer",
1073
+ "primaryKey": false,
1074
+ "notNull": true,
1075
+ "autoincrement": false,
1076
+ "default": 0
1077
+ },
1078
+ "next_attempt_at": {
1079
+ "name": "next_attempt_at",
1080
+ "type": "integer",
1081
+ "primaryKey": false,
1082
+ "notNull": true,
1083
+ "autoincrement": false
1084
+ }
1085
+ },
1086
+ "indexes": {
1087
+ "pending_inbound_next_attempt_idx": {
1088
+ "name": "pending_inbound_next_attempt_idx",
1089
+ "columns": [
1090
+ "next_attempt_at",
1091
+ "received_at"
1092
+ ],
1093
+ "isUnique": false
1094
+ }
1095
+ },
1096
+ "foreignKeys": {},
1097
+ "compositePrimaryKeys": {},
1098
+ "uniqueConstraints": {},
1099
+ "checkConstraints": {}
1100
+ },
1101
+ "pending_object_deletions": {
1102
+ "name": "pending_object_deletions",
1103
+ "columns": {
1104
+ "object_key": {
1105
+ "name": "object_key",
1106
+ "type": "text",
1107
+ "primaryKey": true,
1108
+ "notNull": true,
1109
+ "autoincrement": false
1110
+ },
1111
+ "attempts": {
1112
+ "name": "attempts",
1113
+ "type": "integer",
1114
+ "primaryKey": false,
1115
+ "notNull": true,
1116
+ "autoincrement": false,
1117
+ "default": 0
1118
+ },
1119
+ "next_attempt_at": {
1120
+ "name": "next_attempt_at",
1121
+ "type": "integer",
1122
+ "primaryKey": false,
1123
+ "notNull": true,
1124
+ "autoincrement": false
1125
+ }
1126
+ },
1127
+ "indexes": {
1128
+ "pending_object_deletions_next_attempt_idx": {
1129
+ "name": "pending_object_deletions_next_attempt_idx",
1130
+ "columns": [
1131
+ "next_attempt_at"
1132
+ ],
1133
+ "isUnique": false
1134
+ }
1135
+ },
1136
+ "foreignKeys": {},
1137
+ "compositePrimaryKeys": {},
1138
+ "uniqueConstraints": {},
1139
+ "checkConstraints": {}
1140
+ },
1141
+ "pending_office_previews": {
1142
+ "name": "pending_office_previews",
1143
+ "columns": {
1144
+ "source_key": {
1145
+ "name": "source_key",
1146
+ "type": "text",
1147
+ "primaryKey": true,
1148
+ "notNull": true,
1149
+ "autoincrement": false
1150
+ },
1151
+ "email_id": {
1152
+ "name": "email_id",
1153
+ "type": "text",
1154
+ "primaryKey": false,
1155
+ "notNull": true,
1156
+ "autoincrement": false
1157
+ },
1158
+ "attachment_id": {
1159
+ "name": "attachment_id",
1160
+ "type": "text",
1161
+ "primaryKey": false,
1162
+ "notNull": true,
1163
+ "autoincrement": false
1164
+ },
1165
+ "attempts": {
1166
+ "name": "attempts",
1167
+ "type": "integer",
1168
+ "primaryKey": false,
1169
+ "notNull": true,
1170
+ "autoincrement": false,
1171
+ "default": 0
1172
+ },
1173
+ "next_attempt_at": {
1174
+ "name": "next_attempt_at",
1175
+ "type": "integer",
1176
+ "primaryKey": false,
1177
+ "notNull": true,
1178
+ "autoincrement": false
1179
+ }
1180
+ },
1181
+ "indexes": {
1182
+ "pending_office_previews_next_attempt_idx": {
1183
+ "name": "pending_office_previews_next_attempt_idx",
1184
+ "columns": [
1185
+ "next_attempt_at"
1186
+ ],
1187
+ "isUnique": false
1188
+ }
1189
+ },
1190
+ "foreignKeys": {},
1191
+ "compositePrimaryKeys": {},
1192
+ "uniqueConstraints": {},
1193
+ "checkConstraints": {}
1194
+ },
1195
+ "sender_feedback": {
1196
+ "name": "sender_feedback",
1197
+ "columns": {
1198
+ "id": {
1199
+ "name": "id",
1200
+ "type": "text",
1201
+ "primaryKey": true,
1202
+ "notNull": true,
1203
+ "autoincrement": false
1204
+ },
1205
+ "address": {
1206
+ "name": "address",
1207
+ "type": "text",
1208
+ "primaryKey": false,
1209
+ "notNull": true,
1210
+ "autoincrement": false
1211
+ },
1212
+ "domain": {
1213
+ "name": "domain",
1214
+ "type": "text",
1215
+ "primaryKey": false,
1216
+ "notNull": true,
1217
+ "autoincrement": false
1218
+ },
1219
+ "email_id": {
1220
+ "name": "email_id",
1221
+ "type": "text",
1222
+ "primaryKey": false,
1223
+ "notNull": false,
1224
+ "autoincrement": false
1225
+ },
1226
+ "label": {
1227
+ "name": "label",
1228
+ "type": "text",
1229
+ "primaryKey": false,
1230
+ "notNull": true,
1231
+ "autoincrement": false
1232
+ },
1233
+ "user_id": {
1234
+ "name": "user_id",
1235
+ "type": "text",
1236
+ "primaryKey": false,
1237
+ "notNull": false,
1238
+ "autoincrement": false
1239
+ },
1240
+ "created_at": {
1241
+ "name": "created_at",
1242
+ "type": "integer",
1243
+ "primaryKey": false,
1244
+ "notNull": true,
1245
+ "autoincrement": false
1246
+ }
1247
+ },
1248
+ "indexes": {
1249
+ "sender_feedback_address_idx": {
1250
+ "name": "sender_feedback_address_idx",
1251
+ "columns": [
1252
+ "address",
1253
+ "created_at"
1254
+ ],
1255
+ "isUnique": false
1256
+ },
1257
+ "sender_feedback_domain_idx": {
1258
+ "name": "sender_feedback_domain_idx",
1259
+ "columns": [
1260
+ "domain"
1261
+ ],
1262
+ "isUnique": false
1263
+ }
1264
+ },
1265
+ "foreignKeys": {},
1266
+ "compositePrimaryKeys": {},
1267
+ "uniqueConstraints": {},
1268
+ "checkConstraints": {}
1269
+ },
1270
+ "senders": {
1271
+ "name": "senders",
1272
+ "columns": {
1273
+ "address": {
1274
+ "name": "address",
1275
+ "type": "text",
1276
+ "primaryKey": true,
1277
+ "notNull": true,
1278
+ "autoincrement": false
1279
+ },
1280
+ "domain": {
1281
+ "name": "domain",
1282
+ "type": "text",
1283
+ "primaryKey": false,
1284
+ "notNull": true,
1285
+ "autoincrement": false
1286
+ },
1287
+ "first_seen_at": {
1288
+ "name": "first_seen_at",
1289
+ "type": "integer",
1290
+ "primaryKey": false,
1291
+ "notNull": false,
1292
+ "autoincrement": false
1293
+ },
1294
+ "last_seen_at": {
1295
+ "name": "last_seen_at",
1296
+ "type": "integer",
1297
+ "primaryKey": false,
1298
+ "notNull": false,
1299
+ "autoincrement": false
1300
+ },
1301
+ "message_count": {
1302
+ "name": "message_count",
1303
+ "type": "integer",
1304
+ "primaryKey": false,
1305
+ "notNull": true,
1306
+ "autoincrement": false,
1307
+ "default": 0
1308
+ },
1309
+ "outbound_count": {
1310
+ "name": "outbound_count",
1311
+ "type": "integer",
1312
+ "primaryKey": false,
1313
+ "notNull": true,
1314
+ "autoincrement": false,
1315
+ "default": 0
1316
+ },
1317
+ "last_outbound_at": {
1318
+ "name": "last_outbound_at",
1319
+ "type": "integer",
1320
+ "primaryKey": false,
1321
+ "notNull": false,
1322
+ "autoincrement": false
1323
+ },
1324
+ "blocked_at": {
1325
+ "name": "blocked_at",
1326
+ "type": "integer",
1327
+ "primaryKey": false,
1328
+ "notNull": false,
1329
+ "autoincrement": false
1330
+ },
1331
+ "trusted_at": {
1332
+ "name": "trusted_at",
1333
+ "type": "integer",
1334
+ "primaryKey": false,
1335
+ "notNull": false,
1336
+ "autoincrement": false
1337
+ },
1338
+ "reported_at": {
1339
+ "name": "reported_at",
1340
+ "type": "integer",
1341
+ "primaryKey": false,
1342
+ "notNull": false,
1343
+ "autoincrement": false
1344
+ }
1345
+ },
1346
+ "indexes": {
1347
+ "senders_domain_idx": {
1348
+ "name": "senders_domain_idx",
1349
+ "columns": [
1350
+ "domain"
1351
+ ],
1352
+ "isUnique": false
1353
+ }
1354
+ },
1355
+ "foreignKeys": {},
1356
+ "compositePrimaryKeys": {},
1357
+ "uniqueConstraints": {},
1358
+ "checkConstraints": {}
1359
+ },
1360
+ "spam_undo_receipts": {
1361
+ "name": "spam_undo_receipts",
1362
+ "columns": {
1363
+ "id": {
1364
+ "name": "id",
1365
+ "type": "text",
1366
+ "primaryKey": true,
1367
+ "notNull": true,
1368
+ "autoincrement": false
1369
+ },
1370
+ "user_id": {
1371
+ "name": "user_id",
1372
+ "type": "text",
1373
+ "primaryKey": false,
1374
+ "notNull": true,
1375
+ "autoincrement": false
1376
+ },
1377
+ "receipt": {
1378
+ "name": "receipt",
1379
+ "type": "text",
1380
+ "primaryKey": false,
1381
+ "notNull": true,
1382
+ "autoincrement": false
1383
+ },
1384
+ "expires_at": {
1385
+ "name": "expires_at",
1386
+ "type": "integer",
1387
+ "primaryKey": false,
1388
+ "notNull": true,
1389
+ "autoincrement": false
1390
+ }
1391
+ },
1392
+ "indexes": {
1393
+ "spam_undo_receipts_expires_at_idx": {
1394
+ "name": "spam_undo_receipts_expires_at_idx",
1395
+ "columns": [
1396
+ "expires_at"
1397
+ ],
1398
+ "isUnique": false
1399
+ }
1400
+ },
1401
+ "foreignKeys": {},
1402
+ "compositePrimaryKeys": {},
1403
+ "uniqueConstraints": {},
1404
+ "checkConstraints": {}
1405
+ },
1406
+ "system_folder_order": {
1407
+ "name": "system_folder_order",
1408
+ "columns": {
1409
+ "folder_id": {
1410
+ "name": "folder_id",
1411
+ "type": "text",
1412
+ "primaryKey": true,
1413
+ "notNull": true,
1414
+ "autoincrement": false
1415
+ },
1416
+ "sort_order": {
1417
+ "name": "sort_order",
1418
+ "type": "integer",
1419
+ "primaryKey": false,
1420
+ "notNull": true,
1421
+ "autoincrement": false
1422
+ }
1423
+ },
1424
+ "indexes": {},
1425
+ "foreignKeys": {},
1426
+ "compositePrimaryKeys": {},
1427
+ "uniqueConstraints": {},
1428
+ "checkConstraints": {}
1429
+ },
1430
+ "unsubscriptions": {
1431
+ "name": "unsubscriptions",
1432
+ "columns": {
1433
+ "list_key": {
1434
+ "name": "list_key",
1435
+ "type": "text",
1436
+ "primaryKey": true,
1437
+ "notNull": true,
1438
+ "autoincrement": false
1439
+ },
1440
+ "email_id": {
1441
+ "name": "email_id",
1442
+ "type": "text",
1443
+ "primaryKey": false,
1444
+ "notNull": false,
1445
+ "autoincrement": false
1446
+ },
1447
+ "method": {
1448
+ "name": "method",
1449
+ "type": "text",
1450
+ "primaryKey": false,
1451
+ "notNull": true,
1452
+ "autoincrement": false
1453
+ },
1454
+ "status": {
1455
+ "name": "status",
1456
+ "type": "text",
1457
+ "primaryKey": false,
1458
+ "notNull": true,
1459
+ "autoincrement": false
1460
+ },
1461
+ "target": {
1462
+ "name": "target",
1463
+ "type": "text",
1464
+ "primaryKey": false,
1465
+ "notNull": false,
1466
+ "autoincrement": false
1467
+ },
1468
+ "detail": {
1469
+ "name": "detail",
1470
+ "type": "text",
1471
+ "primaryKey": false,
1472
+ "notNull": false,
1473
+ "autoincrement": false
1474
+ },
1475
+ "user_id": {
1476
+ "name": "user_id",
1477
+ "type": "text",
1478
+ "primaryKey": false,
1479
+ "notNull": false,
1480
+ "autoincrement": false
1481
+ },
1482
+ "created_at": {
1483
+ "name": "created_at",
1484
+ "type": "integer",
1485
+ "primaryKey": false,
1486
+ "notNull": true,
1487
+ "autoincrement": false
1488
+ }
1489
+ },
1490
+ "indexes": {},
1491
+ "foreignKeys": {},
1492
+ "compositePrimaryKeys": {},
1493
+ "uniqueConstraints": {},
1494
+ "checkConstraints": {}
1495
+ }
1496
+ },
1497
+ "views": {},
1498
+ "enums": {},
1499
+ "_meta": {
1500
+ "schemas": {},
1501
+ "tables": {},
1502
+ "columns": {}
1503
+ },
1504
+ "internal": {
1505
+ "indexes": {}
1506
+ }
1507
+ }