@open-workspace/email 0.2.0 → 0.4.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.
- package/README.md +23 -20
- package/alchemy/index.ts +273 -0
- package/drizzle/mailbox/0000_puzzling_dracula.sql +149 -0
- package/drizzle/mailbox/0001_mute_jack_flag.sql +12 -0
- package/drizzle/mailbox/meta/0000_snapshot.json +1002 -0
- package/drizzle/mailbox/meta/0001_snapshot.json +1002 -0
- package/drizzle/mailbox/meta/_journal.json +20 -0
- package/drizzle/mailbox/migrations.js +12 -0
- package/index.ts +3 -1
- package/migrations/0000_dry_moon_knight.sql +77 -0
- package/migrations/meta/0000_snapshot.json +248 -106
- package/migrations/meta/_journal.json +2 -2
- package/package.json +74 -68
- package/shared/attachment-preview.ts +37 -27
- package/shared/folder-order.ts +106 -0
- package/shared/mail-authentication.ts +8 -3
- package/shared/mail-feedback.ts +18 -25
- package/shared/mail-headers.ts +114 -39
- package/shared/mail-import.ts +38 -0
- package/shared/mail-path.ts +42 -0
- package/shared/mail-received.ts +174 -31
- package/shared/mail-remote.ts +59 -2
- package/shared/mail-sender-intel.ts +22 -4
- package/shared/mail.ts +78 -26
- package/shared/module.ts +33 -0
- package/shared/office-preview.ts +14 -2
- package/shared/pdfjs-assets.ts +35 -0
- package/shared/permissions.ts +73 -0
- package/shared/webhooks.ts +41 -0
- package/src/admin/blocked-senders.tsx +189 -0
- package/src/client.tsx +97 -0
- package/src/lib/mail-api.ts +9 -0
- package/src/mail/attachment-preview-dialog.tsx +161 -0
- package/src/mail/blocked-senders.tsx +138 -0
- package/src/mail/compose-window-chrome.tsx +194 -0
- package/src/mail/compose-window.tsx +486 -0
- package/src/mail/composer-asset-bookmarks.ts +409 -0
- package/src/mail/composer-asset.tsx +229 -0
- package/src/mail/composer-attachment-list.tsx +138 -0
- package/src/mail/composer-editor-document.ts +65 -0
- package/src/mail/composer-editor.tsx +284 -0
- package/src/mail/composer-linked-attachment-text.ts +12 -0
- package/src/mail/composer-recipient-fields.tsx +165 -0
- package/src/mail/composer-recipients.ts +208 -0
- package/src/mail/composer-session.ts +562 -0
- package/src/mail/composer-toolbar.tsx +303 -0
- package/src/mail/composer-upload-client.ts +105 -0
- package/src/mail/composer-upload-progress.ts +53 -0
- package/src/mail/conversation-list.tsx +550 -0
- package/src/mail/conversation-loading-skeleton.tsx +119 -0
- package/src/mail/conversation-message.tsx +346 -0
- package/src/mail/conversation-reply.tsx +470 -0
- package/src/mail/conversation-selection-toolbar.tsx +322 -0
- package/src/mail/conversation-view.tsx +437 -0
- package/src/mail/delivery-indicator.tsx +272 -0
- package/src/mail/email-html-body.tsx +203 -0
- package/src/mail/folder-glyph.tsx +46 -0
- package/src/mail/folder-manager.tsx +532 -0
- package/src/mail/format-bytes.ts +7 -0
- package/src/mail/mail-app-bar.tsx +253 -0
- package/src/mail/mail-background.tsx +12 -0
- package/src/mail/mail-dock.tsx +137 -0
- package/src/mail/mail-folders.ts +44 -0
- package/src/mail/mail-layout.css +236 -0
- package/src/mail/mail-location.ts +73 -0
- package/src/mail/mail-mailbox-sheet.tsx +275 -0
- package/src/mail/mail-nav-rail.tsx +129 -0
- package/src/mail/mail-nav.tsx +324 -0
- package/src/mail/mail-prefetch.ts +59 -0
- package/src/mail/mail-primitives.tsx +66 -0
- package/src/mail/mail-queries.ts +209 -0
- package/src/mail/mail-query-cache.ts +486 -0
- package/src/mail/mail-seed.ts +47 -0
- package/src/mail/mail-shell.tsx +126 -0
- package/src/mail/mailbox-ai-settings.tsx +185 -0
- package/src/mail/mailbox-realtime.tsx +251 -0
- package/src/mail/mailbox-route.tsx +15 -0
- package/src/mail/message-actions.tsx +353 -0
- package/src/mail/message-attachments.tsx +200 -0
- package/src/mail/message-format.ts +75 -0
- package/src/mail/message-header.tsx +260 -0
- package/src/mail/message-translation.tsx +225 -0
- package/src/mail/original-message-sheet.tsx +619 -0
- package/src/mail/original-message.ts +191 -0
- package/src/mail/outbound-notification.ts +53 -0
- package/src/mail/pane-splitter.tsx +117 -0
- package/src/mail/pdf-preview-toolbar.tsx +152 -0
- package/src/mail/pdf-preview.css +44 -0
- package/src/mail/pdf-preview.tsx +156 -0
- package/src/mail/pdf-translation-layout.ts +95 -0
- package/src/mail/print-message.ts +92 -0
- package/src/mail/reader-pane.tsx +535 -0
- package/src/mail/recipient-combobox.tsx +335 -0
- package/src/mail/recipient-field-row.tsx +34 -0
- package/src/mail/reply-to-warning.tsx +50 -0
- package/src/mail/sanitize-email-html.ts +430 -0
- package/src/mail/sender-actions.tsx +149 -0
- package/src/mail/sender-authentication.tsx +485 -0
- package/src/mail/sender-dialogs.tsx +384 -0
- package/src/mail/sender-security.tsx +545 -0
- package/src/mail/toolbar-tooltip.tsx +29 -0
- package/src/mail/translation-html.ts +49 -0
- package/src/mail/translation-language.ts +21 -0
- package/src/mail/types.ts +53 -0
- package/src/mail/unread-document-indicator.tsx +60 -0
- package/src/mail/use-compose-submission.ts +208 -0
- package/src/mail/use-composer-attachment-preflight.ts +184 -0
- package/src/mail/use-composer-submission.ts +117 -0
- package/src/mail/use-conversation-selection.ts +186 -0
- package/src/mail/use-mail-controller.ts +427 -0
- package/src/mail/use-mail-data.ts +279 -0
- package/src/mail/use-mail-safety.ts +155 -0
- package/src/mail/use-mail-send.ts +142 -0
- package/src/mail/use-pdf-translation-overlay.ts +156 -0
- package/src/mail/use-pdf-translation.ts +100 -0
- package/src/mail/use-pdf-viewer.ts +215 -0
- package/src/mail/use-reply-submission.ts +114 -0
- package/src/mail/use-sanitized-email-html.ts +20 -0
- package/src/mail/use-visible-message-read.ts +138 -0
- package/src/pwa/push-subscription.ts +151 -0
- package/src/settings/mail-apps-page.tsx +235 -0
- package/src/settings/notifications-page.tsx +291 -0
- package/worker/admin/blocked-sender-routes.ts +166 -0
- package/worker/admin/schemas.ts +11 -0
- package/worker/bindings.d.ts +14 -10
- package/worker/db/schema.ts +90 -34
- package/worker/jmap/eventsource.ts +169 -0
- package/worker/jmap/methods.ts +1716 -361
- package/worker/jmap/push-types.ts +27 -0
- package/worker/jmap/push.ts +207 -0
- package/worker/jmap/routes.ts +448 -86
- package/worker/mail/access.ts +258 -21
- package/worker/mail/ai-classification.ts +36 -20
- package/worker/mail/ai-translation.ts +13 -6
- package/worker/mail/auth-headers.ts +395 -137
- package/worker/mail/bimi.ts +200 -73
- package/worker/mail/bootstrap.ts +79 -0
- package/worker/mail/capped-body.ts +36 -0
- package/worker/mail/classification-signals.ts +35 -25
- package/worker/mail/conversation-cursor.ts +30 -19
- package/worker/mail/delivery-events.ts +88 -62
- package/worker/mail/delivery-facts.ts +46 -10
- package/worker/mail/demo-routes.ts +34 -10
- package/worker/mail/doh.ts +62 -23
- package/worker/mail/downloads.ts +75 -40
- package/worker/mail/edge-cache.ts +155 -0
- package/worker/mail/header-metadata.ts +84 -52
- package/worker/mail/impersonation.ts +160 -38
- package/worker/mail/import-routes.ts +313 -0
- package/worker/mail/inbound-delivery.ts +19 -9
- package/worker/mail/inbound-threading.ts +18 -8
- package/worker/mail/inbound.ts +82 -40
- package/worker/mail/ip-intel.ts +110 -27
- package/worker/mail/isolate-cache.ts +35 -0
- package/worker/mail/link-domains.ts +29 -7
- package/worker/mail/mailbox-deletion.ts +10 -4
- package/worker/mail/mailbox-directory.ts +16 -6
- package/worker/mail/mailing-list.ts +94 -39
- package/worker/mail/message-security.ts +90 -15
- package/worker/mail/message-view.ts +18 -6
- package/worker/mail/office-conversion.ts +31 -9
- package/worker/mail/office-preview-container.ts +40 -13
- package/worker/mail/office-preview-queue.ts +76 -32
- package/worker/mail/org-domain.ts +8 -1
- package/worker/mail/outbound-content.ts +71 -26
- package/worker/mail/outbound-delivery.ts +31 -17
- package/worker/mail/outbound-service.ts +48 -30
- package/worker/mail/outbound-threading.ts +30 -17
- package/worker/mail/outbound.ts +97 -70
- package/worker/mail/outgoing-context.ts +25 -15
- package/worker/mail/participants.ts +44 -29
- package/worker/mail/push-notifications.ts +283 -171
- package/worker/mail/quote-parser.ts +21 -10
- package/worker/mail/r2-presigned-urls.ts +31 -25
- package/worker/mail/receive.ts +23 -11
- package/worker/mail/recipients.ts +6 -1
- package/worker/mail/remote-proxy.ts +187 -31
- package/worker/mail/remote-routes.ts +87 -0
- package/worker/mail/remote-token.ts +104 -0
- package/worker/mail/repeat.ts +19 -0
- package/worker/mail/reply-plan.ts +62 -33
- package/worker/mail/rfc.ts +32 -7
- package/worker/mail/routes.ts +871 -542
- package/worker/mail/safety-routes.ts +329 -202
- package/worker/mail/schemas.ts +84 -105
- package/worker/mail/search.ts +1 -0
- package/worker/mail/security-settings.ts +41 -9
- package/worker/mail/sender-intel.ts +206 -51
- package/worker/mail/spamhaus.ts +92 -45
- package/worker/mail/unsubscribe.ts +76 -18
- package/worker/mail/uploads.ts +153 -91
- package/worker/mail/webhook-source.ts +35 -12
- package/worker/mail/workspace-safety.ts +97 -38
- package/worker/mailbox/demo-html.ts +7 -7
- package/worker/mailbox/demo-seed.ts +10 -44
- package/worker/mailbox/demo.ts +597 -227
- package/worker/mailbox/email-index.ts +53 -0
- package/worker/mailbox/folder-model.ts +53 -17
- package/worker/mailbox/import-placement.ts +88 -0
- package/worker/mailbox/inbox-counts.ts +106 -0
- package/worker/mailbox/index.ts +1761 -737
- package/worker/mailbox/jmap-store.ts +139 -35
- package/worker/mailbox/model.ts +7 -14
- package/worker/mailbox/office-preview-jobs.ts +56 -25
- package/worker/mailbox/schema.ts +87 -66
- package/worker/mailbox/senders.ts +176 -70
- package/worker/mcp/mail-action-tools.ts +128 -87
- package/worker/mcp/mail-compose-tools.ts +133 -82
- package/worker/mcp/mail-query-tools.ts +120 -71
- package/worker/mcp/mail-safety-tools.ts +321 -248
- package/worker/mcp/schemas.ts +43 -0
- package/worker/mcp/tools.ts +13 -10
- package/worker/module.ts +43 -18
- package/worker/sql.d.ts +8 -0
- package/alchemy.ts +0 -126
- package/containers/office-preview/Dockerfile +0 -10
- package/migrations/0000_email.sql +0 -53
- package/shared/mail-rules.ts +0 -156
- package/worker/admin/report-routes.ts +0 -164
- package/worker/mail/reported-messages.ts +0 -68
- package/worker/mailbox/legacy-migrations.ts +0 -41
- package/worker/mailbox/migrations.ts +0 -10
- package/worker/mailbox/rules.ts +0 -110
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "7",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"idx": 0,
|
|
7
|
+
"version": "6",
|
|
8
|
+
"when": 1794374467401,
|
|
9
|
+
"tag": "0000_puzzling_dracula",
|
|
10
|
+
"breakpoints": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"idx": 1,
|
|
14
|
+
"version": "6",
|
|
15
|
+
"when": 1794379791382,
|
|
16
|
+
"tag": "0001_mute_jack_flag",
|
|
17
|
+
"breakpoints": true
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
package/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export { email, type MailAppType } from "./worker/module";
|
|
1
|
+
export { email, email as default, type MailAppType } from "./worker/module";
|
|
2
|
+
|
|
2
3
|
export { MailboxDO } from "./worker/mailbox/index";
|
|
4
|
+
|
|
3
5
|
export { OfficePreviewContainer } from "./worker/mail/office-preview-container";
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
CREATE TABLE `blocked_senders` (
|
|
2
|
+
`pattern` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`created_by_user_id` text,
|
|
4
|
+
`created_at` integer NOT NULL,
|
|
5
|
+
FOREIGN KEY (`created_by_user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE set null
|
|
6
|
+
);
|
|
7
|
+
--> statement-breakpoint
|
|
8
|
+
CREATE TABLE `jmap_push_subscriptions` (
|
|
9
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
10
|
+
`user_id` text NOT NULL,
|
|
11
|
+
`client_id` text NOT NULL,
|
|
12
|
+
`device_client_id` text NOT NULL,
|
|
13
|
+
`url` text NOT NULL,
|
|
14
|
+
`p256dh` text,
|
|
15
|
+
`auth` text,
|
|
16
|
+
`verification_code` text NOT NULL,
|
|
17
|
+
`verified_at` integer,
|
|
18
|
+
`expires_at` integer NOT NULL,
|
|
19
|
+
`types_json` text,
|
|
20
|
+
`created_at` integer NOT NULL,
|
|
21
|
+
FOREIGN KEY (`client_id`,`user_id`) REFERENCES `oidc_grants`(`client_id`,`user_id`) ON UPDATE no action ON DELETE cascade
|
|
22
|
+
);
|
|
23
|
+
--> statement-breakpoint
|
|
24
|
+
CREATE UNIQUE INDEX `jmap_push_subscriptions_device_unique` ON `jmap_push_subscriptions` (`user_id`,`device_client_id`);--> statement-breakpoint
|
|
25
|
+
CREATE INDEX `jmap_push_subscriptions_expires_idx` ON `jmap_push_subscriptions` (`expires_at`);--> statement-breakpoint
|
|
26
|
+
CREATE TABLE `mailbox_counts` (
|
|
27
|
+
`mailbox_id` text PRIMARY KEY NOT NULL,
|
|
28
|
+
`incoming_count` integer NOT NULL,
|
|
29
|
+
`version` integer NOT NULL,
|
|
30
|
+
`updated_at` integer NOT NULL,
|
|
31
|
+
FOREIGN KEY (`mailbox_id`) REFERENCES `mailboxes`(`id`) ON UPDATE no action ON DELETE cascade
|
|
32
|
+
);
|
|
33
|
+
--> statement-breakpoint
|
|
34
|
+
CREATE TABLE `mailbox_notification_preferences` (
|
|
35
|
+
`mailbox_id` text NOT NULL,
|
|
36
|
+
`user_id` text NOT NULL,
|
|
37
|
+
`enabled` integer DEFAULT true NOT NULL,
|
|
38
|
+
`updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
39
|
+
PRIMARY KEY(`mailbox_id`, `user_id`),
|
|
40
|
+
FOREIGN KEY (`mailbox_id`) REFERENCES `mailboxes`(`id`) ON UPDATE no action ON DELETE cascade,
|
|
41
|
+
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
|
|
42
|
+
);
|
|
43
|
+
--> statement-breakpoint
|
|
44
|
+
CREATE INDEX `mailbox_notification_preferences_user_idx` ON `mailbox_notification_preferences` (`user_id`);--> statement-breakpoint
|
|
45
|
+
CREATE TABLE `mailbox_read_counts` (
|
|
46
|
+
`mailbox_id` text NOT NULL,
|
|
47
|
+
`user_id` text NOT NULL,
|
|
48
|
+
`read_count` integer NOT NULL,
|
|
49
|
+
PRIMARY KEY(`mailbox_id`, `user_id`),
|
|
50
|
+
FOREIGN KEY (`mailbox_id`) REFERENCES `mailboxes`(`id`) ON UPDATE no action ON DELETE cascade
|
|
51
|
+
);
|
|
52
|
+
--> statement-breakpoint
|
|
53
|
+
CREATE TABLE `push_subscriptions` (
|
|
54
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
55
|
+
`user_id` text NOT NULL,
|
|
56
|
+
`endpoint` text NOT NULL,
|
|
57
|
+
`p256dh` text NOT NULL,
|
|
58
|
+
`auth` text NOT NULL,
|
|
59
|
+
`created_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
60
|
+
`updated_at` integer DEFAULT (unixepoch() * 1000) NOT NULL,
|
|
61
|
+
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
|
|
62
|
+
);
|
|
63
|
+
--> statement-breakpoint
|
|
64
|
+
CREATE UNIQUE INDEX `push_subscriptions_endpoint_unique` ON `push_subscriptions` (`endpoint`);--> statement-breakpoint
|
|
65
|
+
CREATE INDEX `push_subscriptions_user_idx` ON `push_subscriptions` (`user_id`);--> statement-breakpoint
|
|
66
|
+
CREATE TABLE `sender_reports` (
|
|
67
|
+
`mailbox_id` text NOT NULL,
|
|
68
|
+
`email_id` text NOT NULL,
|
|
69
|
+
`address` text NOT NULL,
|
|
70
|
+
`domain` text NOT NULL,
|
|
71
|
+
`label` text NOT NULL,
|
|
72
|
+
`created_at` integer NOT NULL,
|
|
73
|
+
PRIMARY KEY(`mailbox_id`, `email_id`),
|
|
74
|
+
FOREIGN KEY (`mailbox_id`) REFERENCES `mailboxes`(`id`) ON UPDATE no action ON DELETE cascade
|
|
75
|
+
);
|
|
76
|
+
--> statement-breakpoint
|
|
77
|
+
CREATE INDEX `sender_reports_domain_idx` ON `sender_reports` (`domain`,`address`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "6",
|
|
3
3
|
"dialect": "sqlite",
|
|
4
|
-
"id": "
|
|
4
|
+
"id": "3c9a9f87-017b-4419-8672-d798164a2460",
|
|
5
5
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
6
|
"tables": {
|
|
7
7
|
"blocked_senders": {
|
|
@@ -14,13 +14,6 @@
|
|
|
14
14
|
"notNull": true,
|
|
15
15
|
"autoincrement": false
|
|
16
16
|
},
|
|
17
|
-
"report_id": {
|
|
18
|
-
"name": "report_id",
|
|
19
|
-
"type": "text",
|
|
20
|
-
"primaryKey": false,
|
|
21
|
-
"notNull": false,
|
|
22
|
-
"autoincrement": false
|
|
23
|
-
},
|
|
24
17
|
"created_by_user_id": {
|
|
25
18
|
"name": "created_by_user_id",
|
|
26
19
|
"type": "text",
|
|
@@ -38,30 +31,195 @@
|
|
|
38
31
|
},
|
|
39
32
|
"indexes": {},
|
|
40
33
|
"foreignKeys": {
|
|
41
|
-
"
|
|
42
|
-
"name": "
|
|
34
|
+
"blocked_senders_created_by_user_id_users_id_fk": {
|
|
35
|
+
"name": "blocked_senders_created_by_user_id_users_id_fk",
|
|
43
36
|
"tableFrom": "blocked_senders",
|
|
44
|
-
"tableTo": "
|
|
37
|
+
"tableTo": "users",
|
|
45
38
|
"columnsFrom": [
|
|
46
|
-
"
|
|
39
|
+
"created_by_user_id"
|
|
47
40
|
],
|
|
48
41
|
"columnsTo": [
|
|
49
42
|
"id"
|
|
50
43
|
],
|
|
51
44
|
"onDelete": "set null",
|
|
52
45
|
"onUpdate": "no action"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"compositePrimaryKeys": {},
|
|
49
|
+
"uniqueConstraints": {},
|
|
50
|
+
"checkConstraints": {}
|
|
51
|
+
},
|
|
52
|
+
"jmap_push_subscriptions": {
|
|
53
|
+
"name": "jmap_push_subscriptions",
|
|
54
|
+
"columns": {
|
|
55
|
+
"id": {
|
|
56
|
+
"name": "id",
|
|
57
|
+
"type": "text",
|
|
58
|
+
"primaryKey": true,
|
|
59
|
+
"notNull": true,
|
|
60
|
+
"autoincrement": false
|
|
53
61
|
},
|
|
54
|
-
"
|
|
55
|
-
"name": "
|
|
56
|
-
"
|
|
57
|
-
"
|
|
62
|
+
"user_id": {
|
|
63
|
+
"name": "user_id",
|
|
64
|
+
"type": "text",
|
|
65
|
+
"primaryKey": false,
|
|
66
|
+
"notNull": true,
|
|
67
|
+
"autoincrement": false
|
|
68
|
+
},
|
|
69
|
+
"client_id": {
|
|
70
|
+
"name": "client_id",
|
|
71
|
+
"type": "text",
|
|
72
|
+
"primaryKey": false,
|
|
73
|
+
"notNull": true,
|
|
74
|
+
"autoincrement": false
|
|
75
|
+
},
|
|
76
|
+
"device_client_id": {
|
|
77
|
+
"name": "device_client_id",
|
|
78
|
+
"type": "text",
|
|
79
|
+
"primaryKey": false,
|
|
80
|
+
"notNull": true,
|
|
81
|
+
"autoincrement": false
|
|
82
|
+
},
|
|
83
|
+
"url": {
|
|
84
|
+
"name": "url",
|
|
85
|
+
"type": "text",
|
|
86
|
+
"primaryKey": false,
|
|
87
|
+
"notNull": true,
|
|
88
|
+
"autoincrement": false
|
|
89
|
+
},
|
|
90
|
+
"p256dh": {
|
|
91
|
+
"name": "p256dh",
|
|
92
|
+
"type": "text",
|
|
93
|
+
"primaryKey": false,
|
|
94
|
+
"notNull": false,
|
|
95
|
+
"autoincrement": false
|
|
96
|
+
},
|
|
97
|
+
"auth": {
|
|
98
|
+
"name": "auth",
|
|
99
|
+
"type": "text",
|
|
100
|
+
"primaryKey": false,
|
|
101
|
+
"notNull": false,
|
|
102
|
+
"autoincrement": false
|
|
103
|
+
},
|
|
104
|
+
"verification_code": {
|
|
105
|
+
"name": "verification_code",
|
|
106
|
+
"type": "text",
|
|
107
|
+
"primaryKey": false,
|
|
108
|
+
"notNull": true,
|
|
109
|
+
"autoincrement": false
|
|
110
|
+
},
|
|
111
|
+
"verified_at": {
|
|
112
|
+
"name": "verified_at",
|
|
113
|
+
"type": "integer",
|
|
114
|
+
"primaryKey": false,
|
|
115
|
+
"notNull": false,
|
|
116
|
+
"autoincrement": false
|
|
117
|
+
},
|
|
118
|
+
"expires_at": {
|
|
119
|
+
"name": "expires_at",
|
|
120
|
+
"type": "integer",
|
|
121
|
+
"primaryKey": false,
|
|
122
|
+
"notNull": true,
|
|
123
|
+
"autoincrement": false
|
|
124
|
+
},
|
|
125
|
+
"types_json": {
|
|
126
|
+
"name": "types_json",
|
|
127
|
+
"type": "text",
|
|
128
|
+
"primaryKey": false,
|
|
129
|
+
"notNull": false,
|
|
130
|
+
"autoincrement": false
|
|
131
|
+
},
|
|
132
|
+
"created_at": {
|
|
133
|
+
"name": "created_at",
|
|
134
|
+
"type": "integer",
|
|
135
|
+
"primaryKey": false,
|
|
136
|
+
"notNull": true,
|
|
137
|
+
"autoincrement": false
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"indexes": {
|
|
141
|
+
"jmap_push_subscriptions_device_unique": {
|
|
142
|
+
"name": "jmap_push_subscriptions_device_unique",
|
|
143
|
+
"columns": [
|
|
144
|
+
"user_id",
|
|
145
|
+
"device_client_id"
|
|
146
|
+
],
|
|
147
|
+
"isUnique": true
|
|
148
|
+
},
|
|
149
|
+
"jmap_push_subscriptions_expires_idx": {
|
|
150
|
+
"name": "jmap_push_subscriptions_expires_idx",
|
|
151
|
+
"columns": [
|
|
152
|
+
"expires_at"
|
|
153
|
+
],
|
|
154
|
+
"isUnique": false
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"foreignKeys": {
|
|
158
|
+
"jmap_push_subscriptions_client_id_user_id_oidc_grants_client_id_user_id_fk": {
|
|
159
|
+
"name": "jmap_push_subscriptions_client_id_user_id_oidc_grants_client_id_user_id_fk",
|
|
160
|
+
"tableFrom": "jmap_push_subscriptions",
|
|
161
|
+
"tableTo": "oidc_grants",
|
|
58
162
|
"columnsFrom": [
|
|
59
|
-
"
|
|
163
|
+
"client_id",
|
|
164
|
+
"user_id"
|
|
165
|
+
],
|
|
166
|
+
"columnsTo": [
|
|
167
|
+
"client_id",
|
|
168
|
+
"user_id"
|
|
169
|
+
],
|
|
170
|
+
"onDelete": "cascade",
|
|
171
|
+
"onUpdate": "no action"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"compositePrimaryKeys": {},
|
|
175
|
+
"uniqueConstraints": {},
|
|
176
|
+
"checkConstraints": {}
|
|
177
|
+
},
|
|
178
|
+
"mailbox_counts": {
|
|
179
|
+
"name": "mailbox_counts",
|
|
180
|
+
"columns": {
|
|
181
|
+
"mailbox_id": {
|
|
182
|
+
"name": "mailbox_id",
|
|
183
|
+
"type": "text",
|
|
184
|
+
"primaryKey": true,
|
|
185
|
+
"notNull": true,
|
|
186
|
+
"autoincrement": false
|
|
187
|
+
},
|
|
188
|
+
"incoming_count": {
|
|
189
|
+
"name": "incoming_count",
|
|
190
|
+
"type": "integer",
|
|
191
|
+
"primaryKey": false,
|
|
192
|
+
"notNull": true,
|
|
193
|
+
"autoincrement": false
|
|
194
|
+
},
|
|
195
|
+
"version": {
|
|
196
|
+
"name": "version",
|
|
197
|
+
"type": "integer",
|
|
198
|
+
"primaryKey": false,
|
|
199
|
+
"notNull": true,
|
|
200
|
+
"autoincrement": false
|
|
201
|
+
},
|
|
202
|
+
"updated_at": {
|
|
203
|
+
"name": "updated_at",
|
|
204
|
+
"type": "integer",
|
|
205
|
+
"primaryKey": false,
|
|
206
|
+
"notNull": true,
|
|
207
|
+
"autoincrement": false
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"indexes": {},
|
|
211
|
+
"foreignKeys": {
|
|
212
|
+
"mailbox_counts_mailbox_id_mailboxes_id_fk": {
|
|
213
|
+
"name": "mailbox_counts_mailbox_id_mailboxes_id_fk",
|
|
214
|
+
"tableFrom": "mailbox_counts",
|
|
215
|
+
"tableTo": "mailboxes",
|
|
216
|
+
"columnsFrom": [
|
|
217
|
+
"mailbox_id"
|
|
60
218
|
],
|
|
61
219
|
"columnsTo": [
|
|
62
220
|
"id"
|
|
63
221
|
],
|
|
64
|
-
"onDelete": "
|
|
222
|
+
"onDelete": "cascade",
|
|
65
223
|
"onUpdate": "no action"
|
|
66
224
|
}
|
|
67
225
|
},
|
|
@@ -152,16 +310,9 @@
|
|
|
152
310
|
"uniqueConstraints": {},
|
|
153
311
|
"checkConstraints": {}
|
|
154
312
|
},
|
|
155
|
-
"
|
|
156
|
-
"name": "
|
|
313
|
+
"mailbox_read_counts": {
|
|
314
|
+
"name": "mailbox_read_counts",
|
|
157
315
|
"columns": {
|
|
158
|
-
"id": {
|
|
159
|
-
"name": "id",
|
|
160
|
-
"type": "text",
|
|
161
|
-
"primaryKey": true,
|
|
162
|
-
"notNull": true,
|
|
163
|
-
"autoincrement": false
|
|
164
|
-
},
|
|
165
316
|
"mailbox_id": {
|
|
166
317
|
"name": "mailbox_id",
|
|
167
318
|
"type": "text",
|
|
@@ -169,141 +320,132 @@
|
|
|
169
320
|
"notNull": true,
|
|
170
321
|
"autoincrement": false
|
|
171
322
|
},
|
|
172
|
-
"
|
|
173
|
-
"name": "
|
|
323
|
+
"user_id": {
|
|
324
|
+
"name": "user_id",
|
|
174
325
|
"type": "text",
|
|
175
326
|
"primaryKey": false,
|
|
176
327
|
"notNull": true,
|
|
177
328
|
"autoincrement": false
|
|
178
329
|
},
|
|
179
|
-
"
|
|
180
|
-
"name": "
|
|
181
|
-
"type": "
|
|
182
|
-
"primaryKey": false,
|
|
183
|
-
"notNull": false,
|
|
184
|
-
"autoincrement": false
|
|
185
|
-
},
|
|
186
|
-
"sender_address": {
|
|
187
|
-
"name": "sender_address",
|
|
188
|
-
"type": "text",
|
|
330
|
+
"read_count": {
|
|
331
|
+
"name": "read_count",
|
|
332
|
+
"type": "integer",
|
|
189
333
|
"primaryKey": false,
|
|
190
334
|
"notNull": true,
|
|
191
335
|
"autoincrement": false
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"indexes": {},
|
|
339
|
+
"foreignKeys": {
|
|
340
|
+
"mailbox_read_counts_mailbox_id_mailboxes_id_fk": {
|
|
341
|
+
"name": "mailbox_read_counts_mailbox_id_mailboxes_id_fk",
|
|
342
|
+
"tableFrom": "mailbox_read_counts",
|
|
343
|
+
"tableTo": "mailboxes",
|
|
344
|
+
"columnsFrom": [
|
|
345
|
+
"mailbox_id"
|
|
346
|
+
],
|
|
347
|
+
"columnsTo": [
|
|
348
|
+
"id"
|
|
349
|
+
],
|
|
350
|
+
"onDelete": "cascade",
|
|
351
|
+
"onUpdate": "no action"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
"compositePrimaryKeys": {
|
|
355
|
+
"mailbox_read_counts_mailbox_id_user_id_pk": {
|
|
356
|
+
"columns": [
|
|
357
|
+
"mailbox_id",
|
|
358
|
+
"user_id"
|
|
359
|
+
],
|
|
360
|
+
"name": "mailbox_read_counts_mailbox_id_user_id_pk"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"uniqueConstraints": {},
|
|
364
|
+
"checkConstraints": {}
|
|
365
|
+
},
|
|
366
|
+
"push_subscriptions": {
|
|
367
|
+
"name": "push_subscriptions",
|
|
368
|
+
"columns": {
|
|
369
|
+
"id": {
|
|
370
|
+
"name": "id",
|
|
195
371
|
"type": "text",
|
|
196
|
-
"primaryKey":
|
|
372
|
+
"primaryKey": true,
|
|
197
373
|
"notNull": true,
|
|
198
374
|
"autoincrement": false
|
|
199
375
|
},
|
|
200
|
-
"
|
|
201
|
-
"name": "
|
|
376
|
+
"user_id": {
|
|
377
|
+
"name": "user_id",
|
|
202
378
|
"type": "text",
|
|
203
379
|
"primaryKey": false,
|
|
204
380
|
"notNull": true,
|
|
205
381
|
"autoincrement": false
|
|
206
382
|
},
|
|
207
|
-
"
|
|
208
|
-
"name": "
|
|
209
|
-
"type": "
|
|
383
|
+
"endpoint": {
|
|
384
|
+
"name": "endpoint",
|
|
385
|
+
"type": "text",
|
|
210
386
|
"primaryKey": false,
|
|
211
387
|
"notNull": true,
|
|
212
388
|
"autoincrement": false
|
|
213
389
|
},
|
|
214
|
-
"
|
|
215
|
-
"name": "
|
|
390
|
+
"p256dh": {
|
|
391
|
+
"name": "p256dh",
|
|
216
392
|
"type": "text",
|
|
217
393
|
"primaryKey": false,
|
|
218
394
|
"notNull": true,
|
|
219
395
|
"autoincrement": false
|
|
220
396
|
},
|
|
221
|
-
"
|
|
222
|
-
"name": "
|
|
397
|
+
"auth": {
|
|
398
|
+
"name": "auth",
|
|
223
399
|
"type": "text",
|
|
224
400
|
"primaryKey": false,
|
|
225
401
|
"notNull": true,
|
|
226
|
-
"autoincrement": false,
|
|
227
|
-
"default": "'open'"
|
|
228
|
-
},
|
|
229
|
-
"resolved_by_user_id": {
|
|
230
|
-
"name": "resolved_by_user_id",
|
|
231
|
-
"type": "text",
|
|
232
|
-
"primaryKey": false,
|
|
233
|
-
"notNull": false,
|
|
234
402
|
"autoincrement": false
|
|
235
403
|
},
|
|
236
|
-
"
|
|
237
|
-
"name": "
|
|
404
|
+
"created_at": {
|
|
405
|
+
"name": "created_at",
|
|
238
406
|
"type": "integer",
|
|
239
407
|
"primaryKey": false,
|
|
240
|
-
"notNull":
|
|
241
|
-
"autoincrement": false
|
|
408
|
+
"notNull": true,
|
|
409
|
+
"autoincrement": false,
|
|
410
|
+
"default": "(unixepoch() * 1000)"
|
|
242
411
|
},
|
|
243
|
-
"
|
|
244
|
-
"name": "
|
|
412
|
+
"updated_at": {
|
|
413
|
+
"name": "updated_at",
|
|
245
414
|
"type": "integer",
|
|
246
415
|
"primaryKey": false,
|
|
247
416
|
"notNull": true,
|
|
248
|
-
"autoincrement": false
|
|
417
|
+
"autoincrement": false,
|
|
418
|
+
"default": "(unixepoch() * 1000)"
|
|
249
419
|
}
|
|
250
420
|
},
|
|
251
421
|
"indexes": {
|
|
252
|
-
"
|
|
253
|
-
"name": "
|
|
422
|
+
"push_subscriptions_endpoint_unique": {
|
|
423
|
+
"name": "push_subscriptions_endpoint_unique",
|
|
254
424
|
"columns": [
|
|
255
|
-
"
|
|
256
|
-
"email_id"
|
|
425
|
+
"endpoint"
|
|
257
426
|
],
|
|
258
427
|
"isUnique": true
|
|
259
428
|
},
|
|
260
|
-
"
|
|
261
|
-
"name": "
|
|
429
|
+
"push_subscriptions_user_idx": {
|
|
430
|
+
"name": "push_subscriptions_user_idx",
|
|
262
431
|
"columns": [
|
|
263
|
-
"
|
|
264
|
-
"created_at"
|
|
432
|
+
"user_id"
|
|
265
433
|
],
|
|
266
434
|
"isUnique": false
|
|
267
435
|
}
|
|
268
436
|
},
|
|
269
437
|
"foreignKeys": {
|
|
270
|
-
"
|
|
271
|
-
"name": "
|
|
272
|
-
"tableFrom": "
|
|
273
|
-
"tableTo": "mailboxes",
|
|
274
|
-
"columnsFrom": [
|
|
275
|
-
"mailbox_id"
|
|
276
|
-
],
|
|
277
|
-
"columnsTo": [
|
|
278
|
-
"id"
|
|
279
|
-
],
|
|
280
|
-
"onDelete": "cascade",
|
|
281
|
-
"onUpdate": "no action"
|
|
282
|
-
},
|
|
283
|
-
"reported_messages_reporter_user_id_users_id_fk": {
|
|
284
|
-
"name": "reported_messages_reporter_user_id_users_id_fk",
|
|
285
|
-
"tableFrom": "reported_messages",
|
|
438
|
+
"push_subscriptions_user_id_users_id_fk": {
|
|
439
|
+
"name": "push_subscriptions_user_id_users_id_fk",
|
|
440
|
+
"tableFrom": "push_subscriptions",
|
|
286
441
|
"tableTo": "users",
|
|
287
442
|
"columnsFrom": [
|
|
288
|
-
"
|
|
289
|
-
],
|
|
290
|
-
"columnsTo": [
|
|
291
|
-
"id"
|
|
292
|
-
],
|
|
293
|
-
"onDelete": "set null",
|
|
294
|
-
"onUpdate": "no action"
|
|
295
|
-
},
|
|
296
|
-
"reported_messages_resolved_by_user_id_users_id_fk": {
|
|
297
|
-
"name": "reported_messages_resolved_by_user_id_users_id_fk",
|
|
298
|
-
"tableFrom": "reported_messages",
|
|
299
|
-
"tableTo": "users",
|
|
300
|
-
"columnsFrom": [
|
|
301
|
-
"resolved_by_user_id"
|
|
443
|
+
"user_id"
|
|
302
444
|
],
|
|
303
445
|
"columnsTo": [
|
|
304
446
|
"id"
|
|
305
447
|
],
|
|
306
|
-
"onDelete": "
|
|
448
|
+
"onDelete": "cascade",
|
|
307
449
|
"onUpdate": "no action"
|
|
308
450
|
}
|
|
309
451
|
},
|