@happyvertical/smrt-messages 0.62.7 → 0.62.9

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 (54) hide show
  1. package/AGENTS.md +30 -0
  2. package/dist/chunks/{AttachmentCollection-nTqD75n8.js → AttachmentCollection-CqMr6vDW.js} +4 -4
  3. package/dist/chunks/{AttachmentCollection-nTqD75n8.js.map → AttachmentCollection-CqMr6vDW.js.map} +1 -1
  4. package/dist/chunks/{Email-DKcIiMxB.js → Email-HQRz_jXr.js} +9 -6
  5. package/dist/chunks/Email-HQRz_jXr.js.map +1 -0
  6. package/dist/chunks/EmailAccountCollection-D5RrI88X.js +1555 -0
  7. package/dist/chunks/EmailAccountCollection-D5RrI88X.js.map +1 -0
  8. package/dist/chunks/{EmailCollection-BYeuWWsP.js → EmailCollection-BitVR0qy.js} +3 -3
  9. package/dist/chunks/{EmailCollection-BYeuWWsP.js.map → EmailCollection-BitVR0qy.js.map} +1 -1
  10. package/dist/chunks/{EmailFolder-UMGpXTQ7.js → EmailFolder-94T__o1R.js} +6 -6
  11. package/dist/chunks/{EmailFolder-UMGpXTQ7.js.map → EmailFolder-94T__o1R.js.map} +1 -1
  12. package/dist/chunks/{EmailFolderCollection-DHZKwe1H.js → EmailFolderCollection-B6jWiIRV.js} +2 -2
  13. package/dist/chunks/{EmailFolderCollection-DHZKwe1H.js.map → EmailFolderCollection-B6jWiIRV.js.map} +1 -1
  14. package/dist/chunks/{Message-M8INXZs5.js → Message-GEH6EbM0.js} +6 -6
  15. package/dist/chunks/{Message-M8INXZs5.js.map → Message-GEH6EbM0.js.map} +1 -1
  16. package/dist/chunks/{MessageCollection-CT0O_7wG.js → MessageCollection-CeBjGYG0.js} +2 -2
  17. package/dist/chunks/{MessageCollection-CT0O_7wG.js.map → MessageCollection-CeBjGYG0.js.map} +1 -1
  18. package/dist/chunks/{MessagingEndpointCollection-DrNvP8GM.js → MessagingEndpointCollection-CgxxGRXx.js} +2 -2
  19. package/dist/chunks/{MessagingEndpointCollection-DrNvP8GM.js.map → MessagingEndpointCollection-CgxxGRXx.js.map} +1 -1
  20. package/dist/chunks/{SlackSender-CjSvwY1K.js → SlackSender-CetlSe6D.js} +2 -2
  21. package/dist/chunks/{SlackSender-CjSvwY1K.js.map → SlackSender-CetlSe6D.js.map} +1 -1
  22. package/dist/chunks/{TweetSender-CcLPNNi1.js → TweetSender-Dw-TDxIB.js} +2 -2
  23. package/dist/chunks/{TweetSender-CcLPNNi1.js.map → TweetSender-Dw-TDxIB.js.map} +1 -1
  24. package/dist/chunks/{providers-4iLula-V.js → providers-Bz_F_ywF.js} +36 -1
  25. package/dist/chunks/{providers-4iLula-V.js.map → providers-Bz_F_ywF.js.map} +1 -1
  26. package/dist/collections/EmailAccountCollection.d.ts.map +1 -1
  27. package/dist/connect.js +1 -1
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +64 -18
  31. package/dist/index.js.map +1 -1
  32. package/dist/mail-sync-jobs.d.ts +48 -0
  33. package/dist/mail-sync-jobs.d.ts.map +1 -0
  34. package/dist/mail-sync.d.ts +58 -0
  35. package/dist/mail-sync.d.ts.map +1 -0
  36. package/dist/manifest.json +158 -34
  37. package/dist/models/Email.d.ts +1 -0
  38. package/dist/models/Email.d.ts.map +1 -1
  39. package/dist/models/EmailAccount.d.ts +29 -2
  40. package/dist/models/EmailAccount.d.ts.map +1 -1
  41. package/dist/providers/email.js +3 -2
  42. package/dist/providers/email.js.map +1 -1
  43. package/dist/providers/slack.js +2 -2
  44. package/dist/providers/twitter.js +2 -2
  45. package/dist/providers.d.ts.map +1 -1
  46. package/dist/recipes.d.ts +1 -1
  47. package/dist/smrt-knowledge.json +66 -10
  48. package/dist/smrt-knowledge.okf.md +3 -2
  49. package/dist/types.d.ts +5 -1
  50. package/dist/types.d.ts.map +1 -1
  51. package/package.json +17 -16
  52. package/dist/chunks/Email-DKcIiMxB.js.map +0 -1
  53. package/dist/chunks/EmailAccountCollection-DtCuHcB4.js +0 -1224
  54. package/dist/chunks/EmailAccountCollection-DtCuHcB4.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-messages",
5
- "packageVersion": "0.62.7",
5
+ "packageVersion": "0.62.9",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-messages:AccountCollection": {
8
8
  "name": "accountcollection",
@@ -153,7 +153,7 @@
153
153
  ],
154
154
  "schema": {
155
155
  "tableName": "accounts",
156
- "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
156
+ "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"sync_cursor\" TEXT,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
157
157
  "columns": {
158
158
  "_sync_origin_device_id": {
159
159
  "type": "TEXT"
@@ -258,6 +258,10 @@
258
258
  "notNull": false,
259
259
  "default": 60
260
260
  },
261
+ "sync_cursor": {
262
+ "type": "TEXT",
263
+ "notNull": false
264
+ },
261
265
  "workspace_id": {
262
266
  "type": "TEXT",
263
267
  "notNull": false
@@ -320,7 +324,7 @@
320
324
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:EmailAccount') OR \"sync_interval_minutes\" IS NOT NULL"
321
325
  }
322
326
  ],
323
- "version": "0ccc3936"
327
+ "version": "ed7f2dff"
324
328
  },
325
329
  "importPath": "@happyvertical/smrt-messages"
326
330
  },
@@ -1096,7 +1100,7 @@
1096
1100
  ],
1097
1101
  "schema": {
1098
1102
  "tableName": "accounts",
1099
- "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
1103
+ "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"sync_cursor\" TEXT,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
1100
1104
  "columns": {
1101
1105
  "_sync_origin_device_id": {
1102
1106
  "type": "TEXT"
@@ -1201,6 +1205,10 @@
1201
1205
  "notNull": false,
1202
1206
  "default": 60
1203
1207
  },
1208
+ "sync_cursor": {
1209
+ "type": "TEXT",
1210
+ "notNull": false
1211
+ },
1204
1212
  "workspace_id": {
1205
1213
  "type": "TEXT",
1206
1214
  "notNull": false
@@ -1263,7 +1271,7 @@
1263
1271
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:EmailAccount') OR \"sync_interval_minutes\" IS NOT NULL"
1264
1272
  }
1265
1273
  ],
1266
- "version": "0ccc3936"
1274
+ "version": "ed7f2dff"
1267
1275
  },
1268
1276
  "importPath": "@happyvertical/smrt-messages"
1269
1277
  },
@@ -2111,7 +2119,7 @@
2111
2119
  ],
2112
2120
  "schema": {
2113
2121
  "tableName": "messages",
2114
- "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
2122
+ "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"provider_message_id\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
2115
2123
  "columns": {
2116
2124
  "_sync_origin_device_id": {
2117
2125
  "type": "TEXT"
@@ -2286,6 +2294,10 @@
2286
2294
  "type": "TEXT",
2287
2295
  "notNull": false
2288
2296
  },
2297
+ "provider_message_id": {
2298
+ "type": "TEXT",
2299
+ "notNull": false
2300
+ },
2289
2301
  "cc_addresses": {
2290
2302
  "type": "TEXT",
2291
2303
  "notNull": false
@@ -2527,7 +2539,7 @@
2527
2539
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:Tweet') OR \"retweet_count\" IS NOT NULL"
2528
2540
  }
2529
2541
  ],
2530
- "version": "643e5fb5"
2542
+ "version": "f48614e6"
2531
2543
  },
2532
2544
  "importPath": "@happyvertical/smrt-messages"
2533
2545
  },
@@ -3221,7 +3233,7 @@
3221
3233
  ],
3222
3234
  "schema": {
3223
3235
  "tableName": "messages",
3224
- "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
3236
+ "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"provider_message_id\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
3225
3237
  "columns": {
3226
3238
  "_sync_origin_device_id": {
3227
3239
  "type": "TEXT"
@@ -3396,6 +3408,10 @@
3396
3408
  "type": "TEXT",
3397
3409
  "notNull": false
3398
3410
  },
3411
+ "provider_message_id": {
3412
+ "type": "TEXT",
3413
+ "notNull": false
3414
+ },
3399
3415
  "cc_addresses": {
3400
3416
  "type": "TEXT",
3401
3417
  "notNull": false
@@ -3637,7 +3653,7 @@
3637
3653
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:Tweet') OR \"retweet_count\" IS NOT NULL"
3638
3654
  }
3639
3655
  ],
3640
- "version": "7838f80a"
3656
+ "version": "d8da74ce"
3641
3657
  },
3642
3658
  "importPath": "@happyvertical/smrt-messages"
3643
3659
  },
@@ -5139,7 +5155,7 @@
5139
5155
  ],
5140
5156
  "schema": {
5141
5157
  "tableName": "accounts",
5142
- "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
5158
+ "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"sync_cursor\" TEXT,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
5143
5159
  "columns": {
5144
5160
  "_sync_origin_device_id": {
5145
5161
  "type": "TEXT"
@@ -5244,6 +5260,10 @@
5244
5260
  "notNull": false,
5245
5261
  "default": 60
5246
5262
  },
5263
+ "sync_cursor": {
5264
+ "type": "TEXT",
5265
+ "notNull": false
5266
+ },
5247
5267
  "workspace_id": {
5248
5268
  "type": "TEXT",
5249
5269
  "notNull": false
@@ -5306,7 +5326,7 @@
5306
5326
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:EmailAccount') OR \"sync_interval_minutes\" IS NOT NULL"
5307
5327
  }
5308
5328
  ],
5309
- "version": "0ccc3936"
5329
+ "version": "ed7f2dff"
5310
5330
  },
5311
5331
  "importPath": "@happyvertical/smrt-messages"
5312
5332
  },
@@ -6265,6 +6285,17 @@
6265
6285
  "required": false,
6266
6286
  "description": "The sender-assigned reference of the email being replied to."
6267
6287
  },
6288
+ "providerMessageId": {
6289
+ "type": "text",
6290
+ "_meta": {
6291
+ "__statedOptions": [
6292
+ "description"
6293
+ ],
6294
+ "description": "The mail server's own id for this email, used to keep mailbox sync from storing it twice."
6295
+ },
6296
+ "required": false,
6297
+ "description": "The mail server's own id for this email, used to keep mailbox sync from storing it twice."
6298
+ },
6268
6299
  "ccAddresses": {
6269
6300
  "type": "text",
6270
6301
  "_meta": {
@@ -6855,7 +6886,7 @@
6855
6886
  ],
6856
6887
  "schema": {
6857
6888
  "tableName": "messages",
6858
- "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
6889
+ "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"provider_message_id\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
6859
6890
  "columns": {
6860
6891
  "_sync_origin_device_id": {
6861
6892
  "type": "TEXT"
@@ -7030,6 +7061,10 @@
7030
7061
  "type": "TEXT",
7031
7062
  "notNull": false
7032
7063
  },
7064
+ "provider_message_id": {
7065
+ "type": "TEXT",
7066
+ "notNull": false
7067
+ },
7033
7068
  "cc_addresses": {
7034
7069
  "type": "TEXT",
7035
7070
  "notNull": false
@@ -7271,7 +7306,7 @@
7271
7306
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:Tweet') OR \"retweet_count\" IS NOT NULL"
7272
7307
  }
7273
7308
  ],
7274
- "version": "643e5fb5"
7309
+ "version": "f48614e6"
7275
7310
  },
7276
7311
  "importPath": "@happyvertical/smrt-messages"
7277
7312
  },
@@ -7506,6 +7541,23 @@
7506
7541
  "required": true,
7507
7542
  "default": 60,
7508
7543
  "description": "The time in minutes between scheduled mailbox checks."
7544
+ },
7545
+ "syncCursor": {
7546
+ "type": "text",
7547
+ "_meta": {
7548
+ "__statedOptions": [
7549
+ "sensitive",
7550
+ "readonly",
7551
+ "description"
7552
+ ],
7553
+ "description": "Where the next mailbox check resumes.",
7554
+ "sensitive": true,
7555
+ "readonly": true
7556
+ },
7557
+ "required": false,
7558
+ "description": "Where the next mailbox check resumes.",
7559
+ "sensitive": true,
7560
+ "readonly": true
7509
7561
  }
7510
7562
  },
7511
7563
  "methods": {
@@ -7637,6 +7689,14 @@
7637
7689
  "isStatic": false,
7638
7690
  "isPublic": true
7639
7691
  },
7692
+ "childOptions": {
7693
+ "name": "childOptions",
7694
+ "async": false,
7695
+ "parameters": [],
7696
+ "returnType": "Record<string, unknown>",
7697
+ "isStatic": false,
7698
+ "isPublic": true
7699
+ },
7640
7700
  "createClient": {
7641
7701
  "name": "createClient",
7642
7702
  "async": true,
@@ -7687,6 +7747,34 @@
7687
7747
  "isStatic": false,
7688
7748
  "isPublic": true
7689
7749
  },
7750
+ "syncChanges": {
7751
+ "name": "syncChanges",
7752
+ "async": true,
7753
+ "parameters": [
7754
+ {
7755
+ "name": "options",
7756
+ "type": "MailSyncOptions",
7757
+ "optional": true
7758
+ }
7759
+ ],
7760
+ "returnType": "Promise<MailSyncResult>",
7761
+ "isStatic": false,
7762
+ "isPublic": true
7763
+ },
7764
+ "fetchThread": {
7765
+ "name": "fetchThread",
7766
+ "async": true,
7767
+ "parameters": [
7768
+ {
7769
+ "name": "threadId",
7770
+ "type": "string",
7771
+ "optional": false
7772
+ }
7773
+ ],
7774
+ "returnType": "any",
7775
+ "isStatic": false,
7776
+ "isPublic": true
7777
+ },
7690
7778
  "getFolders": {
7691
7779
  "name": "getFolders",
7692
7780
  "async": true,
@@ -7780,7 +7868,7 @@
7780
7868
  ],
7781
7869
  "schema": {
7782
7870
  "tableName": "accounts",
7783
- "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
7871
+ "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"sync_cursor\" TEXT,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
7784
7872
  "columns": {
7785
7873
  "_sync_origin_device_id": {
7786
7874
  "type": "TEXT"
@@ -7885,6 +7973,10 @@
7885
7973
  "notNull": false,
7886
7974
  "default": 60
7887
7975
  },
7976
+ "sync_cursor": {
7977
+ "type": "TEXT",
7978
+ "notNull": false
7979
+ },
7888
7980
  "workspace_id": {
7889
7981
  "type": "TEXT",
7890
7982
  "notNull": false
@@ -7947,7 +8039,7 @@
7947
8039
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:EmailAccount') OR \"sync_interval_minutes\" IS NOT NULL"
7948
8040
  }
7949
8041
  ],
7950
- "version": "0ccc3936"
8042
+ "version": "ed7f2dff"
7951
8043
  },
7952
8044
  "importPath": "@happyvertical/smrt-messages"
7953
8045
  },
@@ -9417,7 +9509,7 @@
9417
9509
  ],
9418
9510
  "schema": {
9419
9511
  "tableName": "messages",
9420
- "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
9512
+ "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"provider_message_id\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
9421
9513
  "columns": {
9422
9514
  "_sync_origin_device_id": {
9423
9515
  "type": "TEXT"
@@ -9592,6 +9684,10 @@
9592
9684
  "type": "TEXT",
9593
9685
  "notNull": false
9594
9686
  },
9687
+ "provider_message_id": {
9688
+ "type": "TEXT",
9689
+ "notNull": false
9690
+ },
9595
9691
  "cc_addresses": {
9596
9692
  "type": "TEXT",
9597
9693
  "notNull": false
@@ -9833,7 +9929,7 @@
9833
9929
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:Tweet') OR \"retweet_count\" IS NOT NULL"
9834
9930
  }
9835
9931
  ],
9836
- "version": "7838f80a"
9932
+ "version": "d8da74ce"
9837
9933
  },
9838
9934
  "importPath": "@happyvertical/smrt-messages"
9839
9935
  },
@@ -11844,7 +11940,7 @@
11844
11940
  ],
11845
11941
  "schema": {
11846
11942
  "tableName": "accounts",
11847
- "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
11943
+ "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"sync_cursor\" TEXT,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
11848
11944
  "columns": {
11849
11945
  "_sync_origin_device_id": {
11850
11946
  "type": "TEXT"
@@ -11949,6 +12045,10 @@
11949
12045
  "notNull": false,
11950
12046
  "default": 60
11951
12047
  },
12048
+ "sync_cursor": {
12049
+ "type": "TEXT",
12050
+ "notNull": false
12051
+ },
11952
12052
  "workspace_id": {
11953
12053
  "type": "TEXT",
11954
12054
  "notNull": false
@@ -12011,7 +12111,7 @@
12011
12111
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:EmailAccount') OR \"sync_interval_minutes\" IS NOT NULL"
12012
12112
  }
12013
12113
  ],
12014
- "version": "0ccc3936"
12114
+ "version": "ed7f2dff"
12015
12115
  },
12016
12116
  "importPath": "@happyvertical/smrt-messages"
12017
12117
  },
@@ -12808,7 +12908,7 @@
12808
12908
  ],
12809
12909
  "schema": {
12810
12910
  "tableName": "messages",
12811
- "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
12911
+ "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"provider_message_id\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
12812
12912
  "columns": {
12813
12913
  "_sync_origin_device_id": {
12814
12914
  "type": "TEXT"
@@ -12983,6 +13083,10 @@
12983
13083
  "type": "TEXT",
12984
13084
  "notNull": false
12985
13085
  },
13086
+ "provider_message_id": {
13087
+ "type": "TEXT",
13088
+ "notNull": false
13089
+ },
12986
13090
  "cc_addresses": {
12987
13091
  "type": "TEXT",
12988
13092
  "notNull": false
@@ -13224,7 +13328,7 @@
13224
13328
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:Tweet') OR \"retweet_count\" IS NOT NULL"
13225
13329
  }
13226
13330
  ],
13227
- "version": "362ea703"
13331
+ "version": "63b1a1ae"
13228
13332
  },
13229
13333
  "importPath": "@happyvertical/smrt-messages"
13230
13334
  },
@@ -13602,7 +13706,7 @@
13602
13706
  ],
13603
13707
  "schema": {
13604
13708
  "tableName": "accounts",
13605
- "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
13709
+ "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"sync_cursor\" TEXT,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
13606
13710
  "columns": {
13607
13711
  "_sync_origin_device_id": {
13608
13712
  "type": "TEXT"
@@ -13707,6 +13811,10 @@
13707
13811
  "notNull": false,
13708
13812
  "default": 60
13709
13813
  },
13814
+ "sync_cursor": {
13815
+ "type": "TEXT",
13816
+ "notNull": false
13817
+ },
13710
13818
  "workspace_id": {
13711
13819
  "type": "TEXT",
13712
13820
  "notNull": false
@@ -13769,7 +13877,7 @@
13769
13877
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:EmailAccount') OR \"sync_interval_minutes\" IS NOT NULL"
13770
13878
  }
13771
13879
  ],
13772
- "version": "0ccc3936"
13880
+ "version": "ed7f2dff"
13773
13881
  },
13774
13882
  "importPath": "@happyvertical/smrt-messages"
13775
13883
  },
@@ -14574,7 +14682,7 @@
14574
14682
  ],
14575
14683
  "schema": {
14576
14684
  "tableName": "messages",
14577
- "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
14685
+ "ddl": "CREATE TABLE IF NOT EXISTS \"messages\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"account_id\" UUID,\n \"persona_id\" UUID,\n \"endpoint_id\" UUID,\n \"correlation_id\" TEXT,\n \"thread_id\" TEXT,\n \"subject\" TEXT,\n \"body\" TEXT,\n \"from_address\" TEXT,\n \"from_name\" TEXT,\n \"to_addresses\" TEXT,\n \"date\" TIMESTAMP,\n \"is_read\" BOOLEAN DEFAULT FALSE,\n \"is_flagged\" BOOLEAN DEFAULT FALSE,\n \"has_attachments\" BOOLEAN DEFAULT FALSE,\n \"size\" INTEGER DEFAULT 0,\n \"metadata\" TEXT,\n \"send_status\" TEXT DEFAULT 'draft',\n \"sent_at\" TIMESTAMP,\n \"send_error\" TEXT,\n \"retry_count\" INTEGER DEFAULT 0,\n \"max_retries\" INTEGER DEFAULT 3,\n \"scheduled_send_at\" TIMESTAMP,\n \"in_reply_to_message_id\" UUID,\n \"message_id\" TEXT,\n \"in_reply_to\" TEXT,\n \"provider_message_id\" TEXT,\n \"cc_addresses\" TEXT,\n \"bcc_addresses\" TEXT,\n \"reply_to_address\" TEXT,\n \"reply_to_name\" TEXT,\n \"text_body\" TEXT,\n \"html_body\" TEXT,\n \"folder_id\" TEXT,\n \"folder_path\" TEXT,\n \"labels\" TEXT,\n \"flags\" TEXT,\n \"is_answered\" BOOLEAN DEFAULT FALSE,\n \"is_draft\" BOOLEAN DEFAULT FALSE,\n \"raw_message\" TEXT,\n \"headers\" TEXT,\n \"channel_id\" TEXT,\n \"channel_name\" TEXT,\n \"slack_ts\" TEXT,\n \"slack_thread_ts\" TEXT,\n \"reactions\" TEXT,\n \"is_edited\" BOOLEAN DEFAULT FALSE,\n \"message_type\" TEXT,\n \"blocks\" TEXT,\n \"tweet_id\" TEXT,\n \"retweet_count\" INTEGER DEFAULT 0,\n \"like_count\" INTEGER DEFAULT 0,\n \"reply_count\" INTEGER DEFAULT 0,\n \"is_retweet\" BOOLEAN DEFAULT FALSE,\n \"is_reply\" BOOLEAN DEFAULT FALSE,\n \"media_urls\" TEXT,\n \"hashtags\" TEXT,\n \"mentions\" TEXT\n);",
14578
14686
  "columns": {
14579
14687
  "_sync_origin_device_id": {
14580
14688
  "type": "TEXT"
@@ -14749,6 +14857,10 @@
14749
14857
  "type": "TEXT",
14750
14858
  "notNull": false
14751
14859
  },
14860
+ "provider_message_id": {
14861
+ "type": "TEXT",
14862
+ "notNull": false
14863
+ },
14752
14864
  "cc_addresses": {
14753
14865
  "type": "TEXT",
14754
14866
  "notNull": false
@@ -14990,7 +15102,7 @@
14990
15102
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:Tweet') OR \"retweet_count\" IS NOT NULL"
14991
15103
  }
14992
15104
  ],
14993
- "version": "32f5cb15"
15105
+ "version": "28598df2"
14994
15106
  },
14995
15107
  "importPath": "@happyvertical/smrt-messages"
14996
15108
  },
@@ -15382,7 +15494,7 @@
15382
15494
  ],
15383
15495
  "schema": {
15384
15496
  "tableName": "accounts",
15385
- "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
15497
+ "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"sync_cursor\" TEXT,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
15386
15498
  "columns": {
15387
15499
  "_sync_origin_device_id": {
15388
15500
  "type": "TEXT"
@@ -15487,6 +15599,10 @@
15487
15599
  "notNull": false,
15488
15600
  "default": 60
15489
15601
  },
15602
+ "sync_cursor": {
15603
+ "type": "TEXT",
15604
+ "notNull": false
15605
+ },
15490
15606
  "workspace_id": {
15491
15607
  "type": "TEXT",
15492
15608
  "notNull": false
@@ -15549,7 +15665,7 @@
15549
15665
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:EmailAccount') OR \"sync_interval_minutes\" IS NOT NULL"
15550
15666
  }
15551
15667
  ],
15552
- "version": "0ccc3936"
15668
+ "version": "ed7f2dff"
15553
15669
  },
15554
15670
  "importPath": "@happyvertical/smrt-messages"
15555
15671
  },
@@ -16427,7 +16543,7 @@
16427
16543
  ],
16428
16544
  "schema": {
16429
16545
  "tableName": "accounts",
16430
- "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
16546
+ "ddl": "CREATE TABLE IF NOT EXISTS \"accounts\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"name\" TEXT,\n \"provider_type\" TEXT,\n \"channel_type\" TEXT,\n \"credential_secret_id\" TEXT,\n \"is_active\" BOOLEAN DEFAULT TRUE,\n \"owner_user_id\" UUID,\n \"label\" TEXT,\n \"connection_status\" TEXT,\n \"status_message\" TEXT,\n \"last_sync_at\" TIMESTAMP,\n \"settings\" TEXT,\n \"configuration\" TEXT,\n \"email\" TEXT,\n \"sync_interval_minutes\" INTEGER DEFAULT 60,\n \"sync_cursor\" TEXT,\n \"workspace_id\" TEXT,\n \"workspace_name\" TEXT,\n \"bot_user_id\" TEXT,\n \"handle\" TEXT,\n \"twitter_user_id\" TEXT\n);",
16431
16547
  "columns": {
16432
16548
  "_sync_origin_device_id": {
16433
16549
  "type": "TEXT"
@@ -16532,6 +16648,10 @@
16532
16648
  "notNull": false,
16533
16649
  "default": 60
16534
16650
  },
16651
+ "sync_cursor": {
16652
+ "type": "TEXT",
16653
+ "notNull": false
16654
+ },
16535
16655
  "workspace_id": {
16536
16656
  "type": "TEXT",
16537
16657
  "notNull": false
@@ -16594,7 +16714,7 @@
16594
16714
  "expression": "_meta_type NOT IN ('@happyvertical/smrt-messages:EmailAccount') OR \"sync_interval_minutes\" IS NOT NULL"
16595
16715
  }
16596
16716
  ],
16597
- "version": "0ccc3936"
16717
+ "version": "ed7f2dff"
16598
16718
  },
16599
16719
  "importPath": "@happyvertical/smrt-messages"
16600
16720
  }
@@ -16695,7 +16815,8 @@
16695
16815
  "options": [
16696
16816
  "imap",
16697
16817
  "pop3",
16698
- "gmail"
16818
+ "gmail",
16819
+ "jmap"
16699
16820
  ],
16700
16821
  "required": true
16701
16822
  },
@@ -16746,7 +16867,7 @@
16746
16867
  "demo": {
16747
16868
  "mode": "server",
16748
16869
  "reasons": [
16749
- "Needs a server because its package depends on @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3617, #3624, #3626, #3627)."
16870
+ "Needs a server because its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3626, #3627)."
16750
16871
  ]
16751
16872
  }
16752
16873
  },
@@ -16815,7 +16936,7 @@
16815
16936
  "demo": {
16816
16937
  "mode": "server",
16817
16938
  "reasons": [
16818
- "Needs a server because its package depends on @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3617, #3624, #3626, #3627)."
16939
+ "Needs a server because its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3626, #3627)."
16819
16940
  ]
16820
16941
  }
16821
16942
  },
@@ -17048,13 +17169,14 @@
17048
17169
  "demo": {
17049
17170
  "mode": "server",
17050
17171
  "reasons": [
17051
- "Needs a server because its package depends on @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3617, #3624, #3626, #3627)."
17172
+ "Needs a server because its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-profiles, @happyvertical/smrt-secrets, @happyvertical/smrt-tenancy, @happyvertical/smrt-users, which do not build for a browser (#3615, #3617, #3624, #3626, #3627)."
17052
17173
  ]
17053
17174
  }
17054
17175
  }
17055
17176
  ],
17056
17177
  "smrtDependencies": [
17057
17178
  "@happyvertical/smrt-core",
17179
+ "@happyvertical/smrt-jobs",
17058
17180
  "@happyvertical/smrt-ledgers",
17059
17181
  "@happyvertical/smrt-profiles",
17060
17182
  "@happyvertical/smrt-secrets",
@@ -17064,18 +17186,20 @@
17064
17186
  "browser": {
17065
17187
  "status": "server-only",
17066
17188
  "issues": [
17189
+ "#3615",
17067
17190
  "#3617",
17068
17191
  "#3624",
17069
17192
  "#3626",
17070
17193
  "#3627"
17071
17194
  ],
17072
17195
  "via": [
17196
+ "@happyvertical/smrt-jobs",
17073
17197
  "@happyvertical/smrt-profiles",
17074
17198
  "@happyvertical/smrt-secrets",
17075
17199
  "@happyvertical/smrt-tenancy",
17076
17200
  "@happyvertical/smrt-users"
17077
17201
  ]
17078
17202
  },
17079
- "schemaFingerprint": "3631b61477d5c27d8f4a0ff27d8b4ba3bc89a989b2bc965478fa4587ae2a01ec",
17203
+ "schemaFingerprint": "5dfd9ffedd8ec270f109fc7e35730633db7b5756bc3e093e27442891f0ab7dfa",
17080
17204
  "stampsConstructors": true
17081
17205
  }