@happyvertical/smrt-messages 0.62.6 → 0.62.7
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/AGENTS.md +72 -0
- package/dist/access-enforcement.d.ts +20 -0
- package/dist/access-enforcement.d.ts.map +1 -0
- package/dist/access.d.ts +203 -0
- package/dist/access.d.ts.map +1 -0
- package/dist/chunks/AttachmentCollection-nTqD75n8.js +308 -0
- package/dist/chunks/AttachmentCollection-nTqD75n8.js.map +1 -0
- package/dist/chunks/{Email-ChfbMCSF.js → Email-DKcIiMxB.js} +6 -6
- package/dist/chunks/{Email-ChfbMCSF.js.map → Email-DKcIiMxB.js.map} +1 -1
- package/dist/chunks/EmailAccountCollection-DtCuHcB4.js +1224 -0
- package/dist/chunks/EmailAccountCollection-DtCuHcB4.js.map +1 -0
- package/dist/chunks/EmailCollection-BYeuWWsP.js +181 -0
- package/dist/chunks/EmailCollection-BYeuWWsP.js.map +1 -0
- package/dist/chunks/{EmailFolder-XH5eH4Ed.js → EmailFolder-UMGpXTQ7.js} +25 -6
- package/dist/chunks/EmailFolder-UMGpXTQ7.js.map +1 -0
- package/dist/chunks/EmailFolderCollection-DHZKwe1H.js +177 -0
- package/dist/chunks/EmailFolderCollection-DHZKwe1H.js.map +1 -0
- package/dist/chunks/EmailSender-B-Rtq9du.js +147 -0
- package/dist/chunks/EmailSender-B-Rtq9du.js.map +1 -0
- package/dist/chunks/{Message-C6P1V5C_.js → Message-M8INXZs5.js} +30 -6
- package/dist/chunks/Message-M8INXZs5.js.map +1 -0
- package/dist/chunks/{MessageCollection-CjCT06XE.js → MessageCollection-CT0O_7wG.js} +2 -2
- package/dist/chunks/{MessageCollection-CjCT06XE.js.map → MessageCollection-CT0O_7wG.js.map} +1 -1
- package/dist/chunks/MessagingEndpointCollection-DrNvP8GM.js +97 -0
- package/dist/chunks/MessagingEndpointCollection-DrNvP8GM.js.map +1 -0
- package/dist/collections/AttachmentCollection.d.ts +6 -0
- package/dist/collections/AttachmentCollection.d.ts.map +1 -1
- package/dist/connect.d.ts +82 -0
- package/dist/connect.d.ts.map +1 -0
- package/dist/connect.js +126 -0
- package/dist/connect.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +458 -1399
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +892 -32
- package/dist/models/Account.d.ts +23 -0
- package/dist/models/Account.d.ts.map +1 -1
- package/dist/models/Attachment.d.ts +14 -0
- package/dist/models/Attachment.d.ts.map +1 -1
- package/dist/models/EmailAccount.d.ts +3 -0
- package/dist/models/EmailAccount.d.ts.map +1 -1
- package/dist/models/EmailFolder.d.ts +7 -0
- package/dist/models/EmailFolder.d.ts.map +1 -1
- package/dist/models/Message.d.ts +7 -0
- package/dist/models/Message.d.ts.map +1 -1
- package/dist/permissions.d.ts +11 -0
- package/dist/permissions.d.ts.map +1 -1
- package/dist/services/MessagingSettingsService.d.ts +86 -0
- package/dist/services/MessagingSettingsService.d.ts.map +1 -1
- package/dist/services/NotificationOutboxService.d.ts +3 -0
- package/dist/services/NotificationOutboxService.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +762 -21
- package/dist/smrt-knowledge.okf.md +3 -2
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +20 -16
- package/dist/chunks/AccountCollection-RP_hLf6L.js +0 -257
- package/dist/chunks/AccountCollection-RP_hLf6L.js.map +0 -1
- package/dist/chunks/EmailFolder-XH5eH4Ed.js.map +0 -1
- package/dist/chunks/Message-C6P1V5C_.js.map +0 -1
- package/dist/chunks/__smrt-register__-CfOb1uCN.js +0 -6
- package/dist/chunks/__smrt-register__-CfOb1uCN.js.map +0 -1
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,18 +3,19 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-messages",
|
|
6
|
-
"packageVersion": "0.62.
|
|
6
|
+
"packageVersion": "0.62.7",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
12
|
-
"agents": "
|
|
10
|
+
"manifest": "fe9faa9a09f1a44f3aa5b26d83c49cc82a5b6eaedf8a70f28cca76a4e16f85a7",
|
|
11
|
+
"packageJson": "d925a7c7827342fc76521c5bc3b633cb126e59b648ec06197d744df238fbebc5",
|
|
12
|
+
"agents": "371fbab92d5a0e355983d22b2785505af4f0469de6e78ac435bfcb434fe72409",
|
|
13
13
|
"moduleDoc:agents/notification-outbox.md": "0e9a870c4b2d5f0fec47af0dff6e61d216fb0121d384d99bccfc506beb6e38ad",
|
|
14
14
|
"moduleDoc:agents/profile-recipients.md": "1b6710bf646ddeafd6836df8270fcbb8e29226dceda716a693d945cc2e914606"
|
|
15
15
|
},
|
|
16
16
|
"exports": [
|
|
17
17
|
".",
|
|
18
|
+
"./connect",
|
|
18
19
|
"./manifest",
|
|
19
20
|
"./manifest.json",
|
|
20
21
|
"./playground",
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
"typescript"
|
|
84
85
|
],
|
|
85
86
|
"risks": [
|
|
86
|
-
"cross-package-refs:
|
|
87
|
+
"cross-package-refs:16",
|
|
87
88
|
"sensitive-fields-excluded",
|
|
88
89
|
"sti-inheritance"
|
|
89
90
|
],
|
|
@@ -253,6 +254,7 @@
|
|
|
253
254
|
"fields": [],
|
|
254
255
|
"relationships": [],
|
|
255
256
|
"methods": [
|
|
257
|
+
"backfillAccountIds",
|
|
256
258
|
"deleteByMessage",
|
|
257
259
|
"findByTenant",
|
|
258
260
|
"findGlobal",
|
|
@@ -271,6 +273,11 @@
|
|
|
271
273
|
"searchByFilename"
|
|
272
274
|
],
|
|
273
275
|
"methodSignatures": [
|
|
276
|
+
{
|
|
277
|
+
"name": "backfillAccountIds",
|
|
278
|
+
"async": true,
|
|
279
|
+
"returns": "Promise<number>"
|
|
280
|
+
},
|
|
274
281
|
{
|
|
275
282
|
"name": "deleteByMessage",
|
|
276
283
|
"async": true,
|
|
@@ -392,6 +399,12 @@
|
|
|
392
399
|
}
|
|
393
400
|
],
|
|
394
401
|
"surfaces": [
|
|
402
|
+
{
|
|
403
|
+
"kind": "cli",
|
|
404
|
+
"name": "attachmentcollection_backfillAccountIds",
|
|
405
|
+
"operation": "backfillAccountIds",
|
|
406
|
+
"objectName": "@happyvertical/smrt-messages:AttachmentCollection"
|
|
407
|
+
},
|
|
395
408
|
{
|
|
396
409
|
"kind": "cli",
|
|
397
410
|
"name": "attachmentcollection_getByMessage",
|
|
@@ -490,6 +503,13 @@
|
|
|
490
503
|
}
|
|
491
504
|
],
|
|
492
505
|
"withheldSurfaces": [
|
|
506
|
+
{
|
|
507
|
+
"kind": "api",
|
|
508
|
+
"operation": "backfillAccountIds",
|
|
509
|
+
"code": "not-included",
|
|
510
|
+
"reason": "not listed in api.include",
|
|
511
|
+
"objectName": "@happyvertical/smrt-messages:AttachmentCollection"
|
|
512
|
+
},
|
|
493
513
|
{
|
|
494
514
|
"kind": "api",
|
|
495
515
|
"operation": "deleteByMessage",
|
|
@@ -960,6 +980,7 @@
|
|
|
960
980
|
"fields": [],
|
|
961
981
|
"relationships": [],
|
|
962
982
|
"methods": [
|
|
983
|
+
"backfillAccountIds",
|
|
963
984
|
"deleteByEmail",
|
|
964
985
|
"deleteByMessage",
|
|
965
986
|
"findByTenant",
|
|
@@ -980,6 +1001,11 @@
|
|
|
980
1001
|
"searchByFilename"
|
|
981
1002
|
],
|
|
982
1003
|
"methodSignatures": [
|
|
1004
|
+
{
|
|
1005
|
+
"name": "backfillAccountIds",
|
|
1006
|
+
"async": true,
|
|
1007
|
+
"returns": "Promise<number>"
|
|
1008
|
+
},
|
|
983
1009
|
{
|
|
984
1010
|
"name": "deleteByEmail",
|
|
985
1011
|
"async": true,
|
|
@@ -1117,6 +1143,12 @@
|
|
|
1117
1143
|
}
|
|
1118
1144
|
],
|
|
1119
1145
|
"surfaces": [
|
|
1146
|
+
{
|
|
1147
|
+
"kind": "cli",
|
|
1148
|
+
"name": "emailattachmentcollection_backfillAccountIds",
|
|
1149
|
+
"operation": "backfillAccountIds",
|
|
1150
|
+
"objectName": "@happyvertical/smrt-messages:EmailAttachmentCollection"
|
|
1151
|
+
},
|
|
1120
1152
|
{
|
|
1121
1153
|
"kind": "cli",
|
|
1122
1154
|
"name": "emailattachmentcollection_getByMessage",
|
|
@@ -1227,6 +1259,13 @@
|
|
|
1227
1259
|
}
|
|
1228
1260
|
],
|
|
1229
1261
|
"withheldSurfaces": [
|
|
1262
|
+
{
|
|
1263
|
+
"kind": "api",
|
|
1264
|
+
"operation": "backfillAccountIds",
|
|
1265
|
+
"code": "not-included",
|
|
1266
|
+
"reason": "not listed in api.include",
|
|
1267
|
+
"objectName": "@happyvertical/smrt-messages:EmailAttachmentCollection"
|
|
1268
|
+
},
|
|
1230
1269
|
{
|
|
1231
1270
|
"kind": "api",
|
|
1232
1271
|
"operation": "deleteByEmail",
|
|
@@ -3062,6 +3101,35 @@
|
|
|
3062
3101
|
"default": true,
|
|
3063
3102
|
"description": "Whether this account is enabled for messaging."
|
|
3064
3103
|
},
|
|
3104
|
+
{
|
|
3105
|
+
"name": "ownerUserId",
|
|
3106
|
+
"type": "crossPackageRef",
|
|
3107
|
+
"required": false,
|
|
3108
|
+
"related": "@happyvertical/smrt-users:User",
|
|
3109
|
+
"columnType": "UUID",
|
|
3110
|
+
"description": "The person who owns this account and decides who else may use it."
|
|
3111
|
+
},
|
|
3112
|
+
{
|
|
3113
|
+
"name": "label",
|
|
3114
|
+
"type": "text",
|
|
3115
|
+
"required": false,
|
|
3116
|
+
"columnType": "TEXT",
|
|
3117
|
+
"description": "A short name shown beside this account, such as Support or Personal."
|
|
3118
|
+
},
|
|
3119
|
+
{
|
|
3120
|
+
"name": "connectionStatus",
|
|
3121
|
+
"type": "text",
|
|
3122
|
+
"required": false,
|
|
3123
|
+
"columnType": "TEXT",
|
|
3124
|
+
"description": "Whether the saved sign-in still works: connected, or needs_reconnect after the server refused it."
|
|
3125
|
+
},
|
|
3126
|
+
{
|
|
3127
|
+
"name": "statusMessage",
|
|
3128
|
+
"type": "text",
|
|
3129
|
+
"required": false,
|
|
3130
|
+
"columnType": "TEXT",
|
|
3131
|
+
"description": "Why the account needs attention, in plain words."
|
|
3132
|
+
},
|
|
3065
3133
|
{
|
|
3066
3134
|
"name": "lastSyncAt",
|
|
3067
3135
|
"type": "datetime",
|
|
@@ -3091,7 +3159,15 @@
|
|
|
3091
3159
|
"description": "When this account was last changed."
|
|
3092
3160
|
}
|
|
3093
3161
|
],
|
|
3094
|
-
"relationships": [
|
|
3162
|
+
"relationships": [
|
|
3163
|
+
{
|
|
3164
|
+
"name": "ownerUserId",
|
|
3165
|
+
"type": "crossPackageRef",
|
|
3166
|
+
"required": false,
|
|
3167
|
+
"related": "@happyvertical/smrt-users:User",
|
|
3168
|
+
"columnType": "UUID"
|
|
3169
|
+
}
|
|
3170
|
+
],
|
|
3095
3171
|
"methods": [
|
|
3096
3172
|
"activate",
|
|
3097
3173
|
"createSender",
|
|
@@ -3099,6 +3175,9 @@
|
|
|
3099
3175
|
"getConfiguration",
|
|
3100
3176
|
"getCredentials",
|
|
3101
3177
|
"getSettings",
|
|
3178
|
+
"markConnected",
|
|
3179
|
+
"markNeedsReconnect",
|
|
3180
|
+
"removeCredentials",
|
|
3102
3181
|
"setConfiguration",
|
|
3103
3182
|
"setCredentials",
|
|
3104
3183
|
"setSettings"
|
|
@@ -3132,6 +3211,24 @@
|
|
|
3132
3211
|
"name": "getSettings",
|
|
3133
3212
|
"returns": "Record<string, unknown>"
|
|
3134
3213
|
},
|
|
3214
|
+
{
|
|
3215
|
+
"name": "markConnected",
|
|
3216
|
+
"async": true,
|
|
3217
|
+
"returns": "Promise<void>"
|
|
3218
|
+
},
|
|
3219
|
+
{
|
|
3220
|
+
"name": "markNeedsReconnect",
|
|
3221
|
+
"async": true,
|
|
3222
|
+
"params": [
|
|
3223
|
+
"reason: string"
|
|
3224
|
+
],
|
|
3225
|
+
"returns": "Promise<void>"
|
|
3226
|
+
},
|
|
3227
|
+
{
|
|
3228
|
+
"name": "removeCredentials",
|
|
3229
|
+
"async": true,
|
|
3230
|
+
"returns": "Promise<void>"
|
|
3231
|
+
},
|
|
3135
3232
|
{
|
|
3136
3233
|
"name": "setConfiguration",
|
|
3137
3234
|
"params": [
|
|
@@ -3253,6 +3350,27 @@
|
|
|
3253
3350
|
"reason": "not listed in api.include",
|
|
3254
3351
|
"objectName": "@happyvertical/smrt-messages:Account"
|
|
3255
3352
|
},
|
|
3353
|
+
{
|
|
3354
|
+
"kind": "api",
|
|
3355
|
+
"operation": "markConnected",
|
|
3356
|
+
"code": "not-included",
|
|
3357
|
+
"reason": "not listed in api.include",
|
|
3358
|
+
"objectName": "@happyvertical/smrt-messages:Account"
|
|
3359
|
+
},
|
|
3360
|
+
{
|
|
3361
|
+
"kind": "api",
|
|
3362
|
+
"operation": "markNeedsReconnect",
|
|
3363
|
+
"code": "not-included",
|
|
3364
|
+
"reason": "not listed in api.include",
|
|
3365
|
+
"objectName": "@happyvertical/smrt-messages:Account"
|
|
3366
|
+
},
|
|
3367
|
+
{
|
|
3368
|
+
"kind": "api",
|
|
3369
|
+
"operation": "removeCredentials",
|
|
3370
|
+
"code": "not-included",
|
|
3371
|
+
"reason": "not listed in api.include",
|
|
3372
|
+
"objectName": "@happyvertical/smrt-messages:Account"
|
|
3373
|
+
},
|
|
3256
3374
|
{
|
|
3257
3375
|
"kind": "api",
|
|
3258
3376
|
"operation": "setConfiguration",
|
|
@@ -3276,6 +3394,7 @@
|
|
|
3276
3394
|
}
|
|
3277
3395
|
],
|
|
3278
3396
|
"relationshipFeatures": [
|
|
3397
|
+
"crossPackageRef",
|
|
3279
3398
|
"uuidColumns"
|
|
3280
3399
|
],
|
|
3281
3400
|
"tags": [],
|
|
@@ -3302,6 +3421,13 @@
|
|
|
3302
3421
|
"related": "Message",
|
|
3303
3422
|
"columnType": "UUID"
|
|
3304
3423
|
},
|
|
3424
|
+
{
|
|
3425
|
+
"name": "accountId",
|
|
3426
|
+
"type": "foreignKey",
|
|
3427
|
+
"required": false,
|
|
3428
|
+
"related": "Account",
|
|
3429
|
+
"columnType": "UUID"
|
|
3430
|
+
},
|
|
3305
3431
|
{
|
|
3306
3432
|
"name": "filename",
|
|
3307
3433
|
"type": "text",
|
|
@@ -3360,6 +3486,13 @@
|
|
|
3360
3486
|
"required": false,
|
|
3361
3487
|
"related": "Message",
|
|
3362
3488
|
"columnType": "UUID"
|
|
3489
|
+
},
|
|
3490
|
+
{
|
|
3491
|
+
"name": "accountId",
|
|
3492
|
+
"type": "foreignKey",
|
|
3493
|
+
"required": false,
|
|
3494
|
+
"related": "Account",
|
|
3495
|
+
"columnType": "UUID"
|
|
3363
3496
|
}
|
|
3364
3497
|
],
|
|
3365
3498
|
"methods": [
|
|
@@ -3370,6 +3503,8 @@
|
|
|
3370
3503
|
"isImage",
|
|
3371
3504
|
"isInline",
|
|
3372
3505
|
"isPdf",
|
|
3506
|
+
"loadFromId",
|
|
3507
|
+
"loadFromSlug",
|
|
3373
3508
|
"readContent"
|
|
3374
3509
|
],
|
|
3375
3510
|
"methodSignatures": [
|
|
@@ -3402,6 +3537,16 @@
|
|
|
3402
3537
|
"name": "isPdf",
|
|
3403
3538
|
"returns": "boolean"
|
|
3404
3539
|
},
|
|
3540
|
+
{
|
|
3541
|
+
"name": "loadFromId",
|
|
3542
|
+
"async": true,
|
|
3543
|
+
"returns": "any"
|
|
3544
|
+
},
|
|
3545
|
+
{
|
|
3546
|
+
"name": "loadFromSlug",
|
|
3547
|
+
"async": true,
|
|
3548
|
+
"returns": "any"
|
|
3549
|
+
},
|
|
3405
3550
|
{
|
|
3406
3551
|
"name": "readContent",
|
|
3407
3552
|
"async": true,
|
|
@@ -3592,6 +3737,20 @@
|
|
|
3592
3737
|
"reason": "not listed in api.include",
|
|
3593
3738
|
"objectName": "@happyvertical/smrt-messages:Attachment"
|
|
3594
3739
|
},
|
|
3740
|
+
{
|
|
3741
|
+
"kind": "api",
|
|
3742
|
+
"operation": "loadFromId",
|
|
3743
|
+
"code": "lifecycle-method",
|
|
3744
|
+
"reason": "`loadFromId` is a framework lifecycle method, not a distinct operation",
|
|
3745
|
+
"objectName": "@happyvertical/smrt-messages:Attachment"
|
|
3746
|
+
},
|
|
3747
|
+
{
|
|
3748
|
+
"kind": "api",
|
|
3749
|
+
"operation": "loadFromSlug",
|
|
3750
|
+
"code": "lifecycle-method",
|
|
3751
|
+
"reason": "`loadFromSlug` is a framework lifecycle method, not a distinct operation",
|
|
3752
|
+
"objectName": "@happyvertical/smrt-messages:Attachment"
|
|
3753
|
+
},
|
|
3595
3754
|
{
|
|
3596
3755
|
"kind": "api",
|
|
3597
3756
|
"operation": "readContent",
|
|
@@ -4182,6 +4341,8 @@
|
|
|
4182
4341
|
"getToAddresses",
|
|
4183
4342
|
"isSendOutcomeUnknown",
|
|
4184
4343
|
"isUnread",
|
|
4344
|
+
"loadFromId",
|
|
4345
|
+
"loadFromSlug",
|
|
4185
4346
|
"markRead",
|
|
4186
4347
|
"markUnread",
|
|
4187
4348
|
"retrySend",
|
|
@@ -4299,6 +4460,16 @@
|
|
|
4299
4460
|
"name": "isUnread",
|
|
4300
4461
|
"returns": "boolean"
|
|
4301
4462
|
},
|
|
4463
|
+
{
|
|
4464
|
+
"name": "loadFromId",
|
|
4465
|
+
"async": true,
|
|
4466
|
+
"returns": "any"
|
|
4467
|
+
},
|
|
4468
|
+
{
|
|
4469
|
+
"name": "loadFromSlug",
|
|
4470
|
+
"async": true,
|
|
4471
|
+
"returns": "any"
|
|
4472
|
+
},
|
|
4302
4473
|
{
|
|
4303
4474
|
"name": "markRead",
|
|
4304
4475
|
"async": true,
|
|
@@ -4780,6 +4951,20 @@
|
|
|
4780
4951
|
"reason": "not listed in api.include",
|
|
4781
4952
|
"objectName": "@happyvertical/smrt-messages:Email"
|
|
4782
4953
|
},
|
|
4954
|
+
{
|
|
4955
|
+
"kind": "api",
|
|
4956
|
+
"operation": "loadFromId",
|
|
4957
|
+
"code": "lifecycle-method",
|
|
4958
|
+
"reason": "`loadFromId` is a framework lifecycle method, not a distinct operation",
|
|
4959
|
+
"objectName": "@happyvertical/smrt-messages:Email"
|
|
4960
|
+
},
|
|
4961
|
+
{
|
|
4962
|
+
"kind": "api",
|
|
4963
|
+
"operation": "loadFromSlug",
|
|
4964
|
+
"code": "lifecycle-method",
|
|
4965
|
+
"reason": "`loadFromSlug` is a framework lifecycle method, not a distinct operation",
|
|
4966
|
+
"objectName": "@happyvertical/smrt-messages:Email"
|
|
4967
|
+
},
|
|
4783
4968
|
{
|
|
4784
4969
|
"kind": "api",
|
|
4785
4970
|
"operation": "markRead",
|
|
@@ -4922,6 +5107,35 @@
|
|
|
4922
5107
|
"default": true,
|
|
4923
5108
|
"description": "Whether this account is enabled for messaging."
|
|
4924
5109
|
},
|
|
5110
|
+
{
|
|
5111
|
+
"name": "ownerUserId",
|
|
5112
|
+
"type": "crossPackageRef",
|
|
5113
|
+
"required": false,
|
|
5114
|
+
"related": "@happyvertical/smrt-users:User",
|
|
5115
|
+
"columnType": "UUID",
|
|
5116
|
+
"description": "The person who owns this account and decides who else may use it."
|
|
5117
|
+
},
|
|
5118
|
+
{
|
|
5119
|
+
"name": "label",
|
|
5120
|
+
"type": "text",
|
|
5121
|
+
"required": false,
|
|
5122
|
+
"columnType": "TEXT",
|
|
5123
|
+
"description": "A short name shown beside this account, such as Support or Personal."
|
|
5124
|
+
},
|
|
5125
|
+
{
|
|
5126
|
+
"name": "connectionStatus",
|
|
5127
|
+
"type": "text",
|
|
5128
|
+
"required": false,
|
|
5129
|
+
"columnType": "TEXT",
|
|
5130
|
+
"description": "Whether the saved sign-in still works: connected, or needs_reconnect after the server refused it."
|
|
5131
|
+
},
|
|
5132
|
+
{
|
|
5133
|
+
"name": "statusMessage",
|
|
5134
|
+
"type": "text",
|
|
5135
|
+
"required": false,
|
|
5136
|
+
"columnType": "TEXT",
|
|
5137
|
+
"description": "Why the account needs attention, in plain words."
|
|
5138
|
+
},
|
|
4925
5139
|
{
|
|
4926
5140
|
"name": "lastSyncAt",
|
|
4927
5141
|
"type": "datetime",
|
|
@@ -4966,7 +5180,15 @@
|
|
|
4966
5180
|
"description": "The time in minutes between scheduled mailbox checks."
|
|
4967
5181
|
}
|
|
4968
5182
|
],
|
|
4969
|
-
"relationships": [
|
|
5183
|
+
"relationships": [
|
|
5184
|
+
{
|
|
5185
|
+
"name": "ownerUserId",
|
|
5186
|
+
"type": "crossPackageRef",
|
|
5187
|
+
"required": false,
|
|
5188
|
+
"related": "@happyvertical/smrt-users:User",
|
|
5189
|
+
"columnType": "UUID"
|
|
5190
|
+
}
|
|
5191
|
+
],
|
|
4970
5192
|
"methods": [
|
|
4971
5193
|
"activate",
|
|
4972
5194
|
"createClient",
|
|
@@ -4978,8 +5200,11 @@
|
|
|
4978
5200
|
"getFolders",
|
|
4979
5201
|
"getSettings",
|
|
4980
5202
|
"getUnreadCount",
|
|
5203
|
+
"markConnected",
|
|
5204
|
+
"markNeedsReconnect",
|
|
4981
5205
|
"migrateToSecrets",
|
|
4982
5206
|
"readIntakeMessage",
|
|
5207
|
+
"removeCredentials",
|
|
4983
5208
|
"setConfiguration",
|
|
4984
5209
|
"setCredentials",
|
|
4985
5210
|
"setSettings",
|
|
@@ -5038,6 +5263,19 @@
|
|
|
5038
5263
|
"async": true,
|
|
5039
5264
|
"returns": "Promise<number>"
|
|
5040
5265
|
},
|
|
5266
|
+
{
|
|
5267
|
+
"name": "markConnected",
|
|
5268
|
+
"async": true,
|
|
5269
|
+
"returns": "Promise<void>"
|
|
5270
|
+
},
|
|
5271
|
+
{
|
|
5272
|
+
"name": "markNeedsReconnect",
|
|
5273
|
+
"async": true,
|
|
5274
|
+
"params": [
|
|
5275
|
+
"reason: string"
|
|
5276
|
+
],
|
|
5277
|
+
"returns": "Promise<void>"
|
|
5278
|
+
},
|
|
5041
5279
|
{
|
|
5042
5280
|
"name": "migrateToSecrets",
|
|
5043
5281
|
"async": true,
|
|
@@ -5053,6 +5291,11 @@
|
|
|
5053
5291
|
],
|
|
5054
5292
|
"returns": "any"
|
|
5055
5293
|
},
|
|
5294
|
+
{
|
|
5295
|
+
"name": "removeCredentials",
|
|
5296
|
+
"async": true,
|
|
5297
|
+
"returns": "Promise<void>"
|
|
5298
|
+
},
|
|
5056
5299
|
{
|
|
5057
5300
|
"name": "setConfiguration",
|
|
5058
5301
|
"params": [
|
|
@@ -5207,6 +5450,20 @@
|
|
|
5207
5450
|
"reason": "not listed in api.include",
|
|
5208
5451
|
"objectName": "@happyvertical/smrt-messages:EmailAccount"
|
|
5209
5452
|
},
|
|
5453
|
+
{
|
|
5454
|
+
"kind": "api",
|
|
5455
|
+
"operation": "markConnected",
|
|
5456
|
+
"code": "not-included",
|
|
5457
|
+
"reason": "not listed in api.include",
|
|
5458
|
+
"objectName": "@happyvertical/smrt-messages:EmailAccount"
|
|
5459
|
+
},
|
|
5460
|
+
{
|
|
5461
|
+
"kind": "api",
|
|
5462
|
+
"operation": "markNeedsReconnect",
|
|
5463
|
+
"code": "not-included",
|
|
5464
|
+
"reason": "not listed in api.include",
|
|
5465
|
+
"objectName": "@happyvertical/smrt-messages:EmailAccount"
|
|
5466
|
+
},
|
|
5210
5467
|
{
|
|
5211
5468
|
"kind": "api",
|
|
5212
5469
|
"operation": "migrateToSecrets",
|
|
@@ -5221,6 +5478,13 @@
|
|
|
5221
5478
|
"reason": "not listed in api.include",
|
|
5222
5479
|
"objectName": "@happyvertical/smrt-messages:EmailAccount"
|
|
5223
5480
|
},
|
|
5481
|
+
{
|
|
5482
|
+
"kind": "api",
|
|
5483
|
+
"operation": "removeCredentials",
|
|
5484
|
+
"code": "not-included",
|
|
5485
|
+
"reason": "not listed in api.include",
|
|
5486
|
+
"objectName": "@happyvertical/smrt-messages:EmailAccount"
|
|
5487
|
+
},
|
|
5224
5488
|
{
|
|
5225
5489
|
"kind": "api",
|
|
5226
5490
|
"operation": "setConfiguration",
|
|
@@ -5258,6 +5522,7 @@
|
|
|
5258
5522
|
}
|
|
5259
5523
|
],
|
|
5260
5524
|
"relationshipFeatures": [
|
|
5525
|
+
"crossPackageRef",
|
|
5261
5526
|
"uuidColumns"
|
|
5262
5527
|
],
|
|
5263
5528
|
"tags": [],
|
|
@@ -5284,6 +5549,13 @@
|
|
|
5284
5549
|
"related": "Message",
|
|
5285
5550
|
"columnType": "UUID"
|
|
5286
5551
|
},
|
|
5552
|
+
{
|
|
5553
|
+
"name": "accountId",
|
|
5554
|
+
"type": "foreignKey",
|
|
5555
|
+
"required": false,
|
|
5556
|
+
"related": "Account",
|
|
5557
|
+
"columnType": "UUID"
|
|
5558
|
+
},
|
|
5287
5559
|
{
|
|
5288
5560
|
"name": "filename",
|
|
5289
5561
|
"type": "text",
|
|
@@ -5342,6 +5614,13 @@
|
|
|
5342
5614
|
"required": false,
|
|
5343
5615
|
"related": "Message",
|
|
5344
5616
|
"columnType": "UUID"
|
|
5617
|
+
},
|
|
5618
|
+
{
|
|
5619
|
+
"name": "accountId",
|
|
5620
|
+
"type": "foreignKey",
|
|
5621
|
+
"required": false,
|
|
5622
|
+
"related": "Account",
|
|
5623
|
+
"columnType": "UUID"
|
|
5345
5624
|
}
|
|
5346
5625
|
],
|
|
5347
5626
|
"methods": [
|
|
@@ -5353,6 +5632,8 @@
|
|
|
5353
5632
|
"isImage",
|
|
5354
5633
|
"isInline",
|
|
5355
5634
|
"isPdf",
|
|
5635
|
+
"loadFromId",
|
|
5636
|
+
"loadFromSlug",
|
|
5356
5637
|
"readContent"
|
|
5357
5638
|
],
|
|
5358
5639
|
"methodSignatures": [
|
|
@@ -5390,6 +5671,16 @@
|
|
|
5390
5671
|
"name": "isPdf",
|
|
5391
5672
|
"returns": "boolean"
|
|
5392
5673
|
},
|
|
5674
|
+
{
|
|
5675
|
+
"name": "loadFromId",
|
|
5676
|
+
"async": true,
|
|
5677
|
+
"returns": "any"
|
|
5678
|
+
},
|
|
5679
|
+
{
|
|
5680
|
+
"name": "loadFromSlug",
|
|
5681
|
+
"async": true,
|
|
5682
|
+
"returns": "any"
|
|
5683
|
+
},
|
|
5393
5684
|
{
|
|
5394
5685
|
"name": "readContent",
|
|
5395
5686
|
"async": true,
|
|
@@ -5588,6 +5879,20 @@
|
|
|
5588
5879
|
"reason": "not listed in api.include",
|
|
5589
5880
|
"objectName": "@happyvertical/smrt-messages:EmailAttachment"
|
|
5590
5881
|
},
|
|
5882
|
+
{
|
|
5883
|
+
"kind": "api",
|
|
5884
|
+
"operation": "loadFromId",
|
|
5885
|
+
"code": "lifecycle-method",
|
|
5886
|
+
"reason": "`loadFromId` is a framework lifecycle method, not a distinct operation",
|
|
5887
|
+
"objectName": "@happyvertical/smrt-messages:EmailAttachment"
|
|
5888
|
+
},
|
|
5889
|
+
{
|
|
5890
|
+
"kind": "api",
|
|
5891
|
+
"operation": "loadFromSlug",
|
|
5892
|
+
"code": "lifecycle-method",
|
|
5893
|
+
"reason": "`loadFromSlug` is a framework lifecycle method, not a distinct operation",
|
|
5894
|
+
"objectName": "@happyvertical/smrt-messages:EmailAttachment"
|
|
5895
|
+
},
|
|
5591
5896
|
{
|
|
5592
5897
|
"kind": "api",
|
|
5593
5898
|
"operation": "readContent",
|
|
@@ -5702,6 +6007,8 @@
|
|
|
5702
6007
|
"isSpam",
|
|
5703
6008
|
"isSystemFolder",
|
|
5704
6009
|
"isTrash",
|
|
6010
|
+
"loadFromId",
|
|
6011
|
+
"loadFromSlug",
|
|
5705
6012
|
"refreshCounts",
|
|
5706
6013
|
"subscribe",
|
|
5707
6014
|
"unsubscribe"
|
|
@@ -5752,6 +6059,16 @@
|
|
|
5752
6059
|
"name": "isTrash",
|
|
5753
6060
|
"returns": "boolean"
|
|
5754
6061
|
},
|
|
6062
|
+
{
|
|
6063
|
+
"name": "loadFromId",
|
|
6064
|
+
"async": true,
|
|
6065
|
+
"returns": "any"
|
|
6066
|
+
},
|
|
6067
|
+
{
|
|
6068
|
+
"name": "loadFromSlug",
|
|
6069
|
+
"async": true,
|
|
6070
|
+
"returns": "any"
|
|
6071
|
+
},
|
|
5755
6072
|
{
|
|
5756
6073
|
"name": "refreshCounts",
|
|
5757
6074
|
"async": true,
|
|
@@ -6000,16 +6317,30 @@
|
|
|
6000
6317
|
},
|
|
6001
6318
|
{
|
|
6002
6319
|
"kind": "api",
|
|
6003
|
-
"operation": "
|
|
6004
|
-
"code": "
|
|
6005
|
-
"reason": "not
|
|
6320
|
+
"operation": "loadFromId",
|
|
6321
|
+
"code": "lifecycle-method",
|
|
6322
|
+
"reason": "`loadFromId` is a framework lifecycle method, not a distinct operation",
|
|
6006
6323
|
"objectName": "@happyvertical/smrt-messages:EmailFolder"
|
|
6007
6324
|
},
|
|
6008
6325
|
{
|
|
6009
6326
|
"kind": "api",
|
|
6010
|
-
"operation": "
|
|
6011
|
-
"code": "
|
|
6012
|
-
"reason": "not
|
|
6327
|
+
"operation": "loadFromSlug",
|
|
6328
|
+
"code": "lifecycle-method",
|
|
6329
|
+
"reason": "`loadFromSlug` is a framework lifecycle method, not a distinct operation",
|
|
6330
|
+
"objectName": "@happyvertical/smrt-messages:EmailFolder"
|
|
6331
|
+
},
|
|
6332
|
+
{
|
|
6333
|
+
"kind": "api",
|
|
6334
|
+
"operation": "refreshCounts",
|
|
6335
|
+
"code": "not-included",
|
|
6336
|
+
"reason": "not listed in api.include",
|
|
6337
|
+
"objectName": "@happyvertical/smrt-messages:EmailFolder"
|
|
6338
|
+
},
|
|
6339
|
+
{
|
|
6340
|
+
"kind": "api",
|
|
6341
|
+
"operation": "subscribe",
|
|
6342
|
+
"code": "not-included",
|
|
6343
|
+
"reason": "not listed in api.include",
|
|
6013
6344
|
"objectName": "@happyvertical/smrt-messages:EmailFolder"
|
|
6014
6345
|
},
|
|
6015
6346
|
{
|
|
@@ -6284,6 +6615,8 @@
|
|
|
6284
6615
|
"getToAddresses",
|
|
6285
6616
|
"isSendOutcomeUnknown",
|
|
6286
6617
|
"isUnread",
|
|
6618
|
+
"loadFromId",
|
|
6619
|
+
"loadFromSlug",
|
|
6287
6620
|
"markRead",
|
|
6288
6621
|
"markUnread",
|
|
6289
6622
|
"retrySend",
|
|
@@ -6364,6 +6697,16 @@
|
|
|
6364
6697
|
"name": "isUnread",
|
|
6365
6698
|
"returns": "boolean"
|
|
6366
6699
|
},
|
|
6700
|
+
{
|
|
6701
|
+
"name": "loadFromId",
|
|
6702
|
+
"async": true,
|
|
6703
|
+
"returns": "any"
|
|
6704
|
+
},
|
|
6705
|
+
{
|
|
6706
|
+
"name": "loadFromSlug",
|
|
6707
|
+
"async": true,
|
|
6708
|
+
"returns": "any"
|
|
6709
|
+
},
|
|
6367
6710
|
{
|
|
6368
6711
|
"name": "markRead",
|
|
6369
6712
|
"async": true,
|
|
@@ -6689,6 +7032,20 @@
|
|
|
6689
7032
|
"reason": "not listed in api.include",
|
|
6690
7033
|
"objectName": "@happyvertical/smrt-messages:Message"
|
|
6691
7034
|
},
|
|
7035
|
+
{
|
|
7036
|
+
"kind": "api",
|
|
7037
|
+
"operation": "loadFromId",
|
|
7038
|
+
"code": "lifecycle-method",
|
|
7039
|
+
"reason": "`loadFromId` is a framework lifecycle method, not a distinct operation",
|
|
7040
|
+
"objectName": "@happyvertical/smrt-messages:Message"
|
|
7041
|
+
},
|
|
7042
|
+
{
|
|
7043
|
+
"kind": "api",
|
|
7044
|
+
"operation": "loadFromSlug",
|
|
7045
|
+
"code": "lifecycle-method",
|
|
7046
|
+
"reason": "`loadFromSlug` is a framework lifecycle method, not a distinct operation",
|
|
7047
|
+
"objectName": "@happyvertical/smrt-messages:Message"
|
|
7048
|
+
},
|
|
6692
7049
|
{
|
|
6693
7050
|
"kind": "api",
|
|
6694
7051
|
"operation": "markRead",
|
|
@@ -7507,6 +7864,35 @@
|
|
|
7507
7864
|
"default": true,
|
|
7508
7865
|
"description": "Whether this account is enabled for messaging."
|
|
7509
7866
|
},
|
|
7867
|
+
{
|
|
7868
|
+
"name": "ownerUserId",
|
|
7869
|
+
"type": "crossPackageRef",
|
|
7870
|
+
"required": false,
|
|
7871
|
+
"related": "@happyvertical/smrt-users:User",
|
|
7872
|
+
"columnType": "UUID",
|
|
7873
|
+
"description": "The person who owns this account and decides who else may use it."
|
|
7874
|
+
},
|
|
7875
|
+
{
|
|
7876
|
+
"name": "label",
|
|
7877
|
+
"type": "text",
|
|
7878
|
+
"required": false,
|
|
7879
|
+
"columnType": "TEXT",
|
|
7880
|
+
"description": "A short name shown beside this account, such as Support or Personal."
|
|
7881
|
+
},
|
|
7882
|
+
{
|
|
7883
|
+
"name": "connectionStatus",
|
|
7884
|
+
"type": "text",
|
|
7885
|
+
"required": false,
|
|
7886
|
+
"columnType": "TEXT",
|
|
7887
|
+
"description": "Whether the saved sign-in still works: connected, or needs_reconnect after the server refused it."
|
|
7888
|
+
},
|
|
7889
|
+
{
|
|
7890
|
+
"name": "statusMessage",
|
|
7891
|
+
"type": "text",
|
|
7892
|
+
"required": false,
|
|
7893
|
+
"columnType": "TEXT",
|
|
7894
|
+
"description": "Why the account needs attention, in plain words."
|
|
7895
|
+
},
|
|
7510
7896
|
{
|
|
7511
7897
|
"name": "lastSyncAt",
|
|
7512
7898
|
"type": "datetime",
|
|
@@ -7557,7 +7943,15 @@
|
|
|
7557
7943
|
"description": "The bot user your application posts as in this workspace."
|
|
7558
7944
|
}
|
|
7559
7945
|
],
|
|
7560
|
-
"relationships": [
|
|
7946
|
+
"relationships": [
|
|
7947
|
+
{
|
|
7948
|
+
"name": "ownerUserId",
|
|
7949
|
+
"type": "crossPackageRef",
|
|
7950
|
+
"required": false,
|
|
7951
|
+
"related": "@happyvertical/smrt-users:User",
|
|
7952
|
+
"columnType": "UUID"
|
|
7953
|
+
}
|
|
7954
|
+
],
|
|
7561
7955
|
"methods": [
|
|
7562
7956
|
"activate",
|
|
7563
7957
|
"createSender",
|
|
@@ -7565,6 +7959,9 @@
|
|
|
7565
7959
|
"getConfiguration",
|
|
7566
7960
|
"getCredentials",
|
|
7567
7961
|
"getSettings",
|
|
7962
|
+
"markConnected",
|
|
7963
|
+
"markNeedsReconnect",
|
|
7964
|
+
"removeCredentials",
|
|
7568
7965
|
"setConfiguration",
|
|
7569
7966
|
"setCredentials",
|
|
7570
7967
|
"setSettings"
|
|
@@ -7598,6 +7995,24 @@
|
|
|
7598
7995
|
"name": "getSettings",
|
|
7599
7996
|
"returns": "Record<string, unknown>"
|
|
7600
7997
|
},
|
|
7998
|
+
{
|
|
7999
|
+
"name": "markConnected",
|
|
8000
|
+
"async": true,
|
|
8001
|
+
"returns": "Promise<void>"
|
|
8002
|
+
},
|
|
8003
|
+
{
|
|
8004
|
+
"name": "markNeedsReconnect",
|
|
8005
|
+
"async": true,
|
|
8006
|
+
"params": [
|
|
8007
|
+
"reason: string"
|
|
8008
|
+
],
|
|
8009
|
+
"returns": "Promise<void>"
|
|
8010
|
+
},
|
|
8011
|
+
{
|
|
8012
|
+
"name": "removeCredentials",
|
|
8013
|
+
"async": true,
|
|
8014
|
+
"returns": "Promise<void>"
|
|
8015
|
+
},
|
|
7601
8016
|
{
|
|
7602
8017
|
"name": "setConfiguration",
|
|
7603
8018
|
"params": [
|
|
@@ -7708,6 +8123,27 @@
|
|
|
7708
8123
|
"reason": "not listed in api.include",
|
|
7709
8124
|
"objectName": "@happyvertical/smrt-messages:SlackAccount"
|
|
7710
8125
|
},
|
|
8126
|
+
{
|
|
8127
|
+
"kind": "api",
|
|
8128
|
+
"operation": "markConnected",
|
|
8129
|
+
"code": "not-included",
|
|
8130
|
+
"reason": "not listed in api.include",
|
|
8131
|
+
"objectName": "@happyvertical/smrt-messages:SlackAccount"
|
|
8132
|
+
},
|
|
8133
|
+
{
|
|
8134
|
+
"kind": "api",
|
|
8135
|
+
"operation": "markNeedsReconnect",
|
|
8136
|
+
"code": "not-included",
|
|
8137
|
+
"reason": "not listed in api.include",
|
|
8138
|
+
"objectName": "@happyvertical/smrt-messages:SlackAccount"
|
|
8139
|
+
},
|
|
8140
|
+
{
|
|
8141
|
+
"kind": "api",
|
|
8142
|
+
"operation": "removeCredentials",
|
|
8143
|
+
"code": "not-included",
|
|
8144
|
+
"reason": "not listed in api.include",
|
|
8145
|
+
"objectName": "@happyvertical/smrt-messages:SlackAccount"
|
|
8146
|
+
},
|
|
7711
8147
|
{
|
|
7712
8148
|
"kind": "api",
|
|
7713
8149
|
"operation": "setConfiguration",
|
|
@@ -7731,6 +8167,7 @@
|
|
|
7731
8167
|
}
|
|
7732
8168
|
],
|
|
7733
8169
|
"relationshipFeatures": [
|
|
8170
|
+
"crossPackageRef",
|
|
7734
8171
|
"uuidColumns"
|
|
7735
8172
|
],
|
|
7736
8173
|
"tags": [],
|
|
@@ -8054,6 +8491,8 @@
|
|
|
8054
8491
|
"isInThread",
|
|
8055
8492
|
"isSendOutcomeUnknown",
|
|
8056
8493
|
"isUnread",
|
|
8494
|
+
"loadFromId",
|
|
8495
|
+
"loadFromSlug",
|
|
8057
8496
|
"markRead",
|
|
8058
8497
|
"markUnread",
|
|
8059
8498
|
"retrySend",
|
|
@@ -8150,6 +8589,16 @@
|
|
|
8150
8589
|
"name": "isUnread",
|
|
8151
8590
|
"returns": "boolean"
|
|
8152
8591
|
},
|
|
8592
|
+
{
|
|
8593
|
+
"name": "loadFromId",
|
|
8594
|
+
"async": true,
|
|
8595
|
+
"returns": "any"
|
|
8596
|
+
},
|
|
8597
|
+
{
|
|
8598
|
+
"name": "loadFromSlug",
|
|
8599
|
+
"async": true,
|
|
8600
|
+
"returns": "any"
|
|
8601
|
+
},
|
|
8153
8602
|
{
|
|
8154
8603
|
"name": "markRead",
|
|
8155
8604
|
"async": true,
|
|
@@ -8524,6 +8973,20 @@
|
|
|
8524
8973
|
"reason": "not listed in api.include",
|
|
8525
8974
|
"objectName": "@happyvertical/smrt-messages:SlackMessage"
|
|
8526
8975
|
},
|
|
8976
|
+
{
|
|
8977
|
+
"kind": "api",
|
|
8978
|
+
"operation": "loadFromId",
|
|
8979
|
+
"code": "lifecycle-method",
|
|
8980
|
+
"reason": "`loadFromId` is a framework lifecycle method, not a distinct operation",
|
|
8981
|
+
"objectName": "@happyvertical/smrt-messages:SlackMessage"
|
|
8982
|
+
},
|
|
8983
|
+
{
|
|
8984
|
+
"kind": "api",
|
|
8985
|
+
"operation": "loadFromSlug",
|
|
8986
|
+
"code": "lifecycle-method",
|
|
8987
|
+
"reason": "`loadFromSlug` is a framework lifecycle method, not a distinct operation",
|
|
8988
|
+
"objectName": "@happyvertical/smrt-messages:SlackMessage"
|
|
8989
|
+
},
|
|
8527
8990
|
{
|
|
8528
8991
|
"kind": "api",
|
|
8529
8992
|
"operation": "markRead",
|
|
@@ -8645,6 +9108,35 @@
|
|
|
8645
9108
|
"default": true,
|
|
8646
9109
|
"description": "Whether this account is enabled for messaging."
|
|
8647
9110
|
},
|
|
9111
|
+
{
|
|
9112
|
+
"name": "ownerUserId",
|
|
9113
|
+
"type": "crossPackageRef",
|
|
9114
|
+
"required": false,
|
|
9115
|
+
"related": "@happyvertical/smrt-users:User",
|
|
9116
|
+
"columnType": "UUID",
|
|
9117
|
+
"description": "The person who owns this account and decides who else may use it."
|
|
9118
|
+
},
|
|
9119
|
+
{
|
|
9120
|
+
"name": "label",
|
|
9121
|
+
"type": "text",
|
|
9122
|
+
"required": false,
|
|
9123
|
+
"columnType": "TEXT",
|
|
9124
|
+
"description": "A short name shown beside this account, such as Support or Personal."
|
|
9125
|
+
},
|
|
9126
|
+
{
|
|
9127
|
+
"name": "connectionStatus",
|
|
9128
|
+
"type": "text",
|
|
9129
|
+
"required": false,
|
|
9130
|
+
"columnType": "TEXT",
|
|
9131
|
+
"description": "Whether the saved sign-in still works: connected, or needs_reconnect after the server refused it."
|
|
9132
|
+
},
|
|
9133
|
+
{
|
|
9134
|
+
"name": "statusMessage",
|
|
9135
|
+
"type": "text",
|
|
9136
|
+
"required": false,
|
|
9137
|
+
"columnType": "TEXT",
|
|
9138
|
+
"description": "Why the account needs attention, in plain words."
|
|
9139
|
+
},
|
|
8648
9140
|
{
|
|
8649
9141
|
"name": "lastSyncAt",
|
|
8650
9142
|
"type": "datetime",
|
|
@@ -8674,7 +9166,15 @@
|
|
|
8674
9166
|
"description": "When this account was last changed."
|
|
8675
9167
|
}
|
|
8676
9168
|
],
|
|
8677
|
-
"relationships": [
|
|
9169
|
+
"relationships": [
|
|
9170
|
+
{
|
|
9171
|
+
"name": "ownerUserId",
|
|
9172
|
+
"type": "crossPackageRef",
|
|
9173
|
+
"required": false,
|
|
9174
|
+
"related": "@happyvertical/smrt-users:User",
|
|
9175
|
+
"columnType": "UUID"
|
|
9176
|
+
}
|
|
9177
|
+
],
|
|
8678
9178
|
"methods": [
|
|
8679
9179
|
"activate",
|
|
8680
9180
|
"createSender",
|
|
@@ -8682,6 +9182,9 @@
|
|
|
8682
9182
|
"getConfiguration",
|
|
8683
9183
|
"getCredentials",
|
|
8684
9184
|
"getSettings",
|
|
9185
|
+
"markConnected",
|
|
9186
|
+
"markNeedsReconnect",
|
|
9187
|
+
"removeCredentials",
|
|
8685
9188
|
"setConfiguration",
|
|
8686
9189
|
"setCredentials",
|
|
8687
9190
|
"setSettings"
|
|
@@ -8715,6 +9218,24 @@
|
|
|
8715
9218
|
"name": "getSettings",
|
|
8716
9219
|
"returns": "Record<string, unknown>"
|
|
8717
9220
|
},
|
|
9221
|
+
{
|
|
9222
|
+
"name": "markConnected",
|
|
9223
|
+
"async": true,
|
|
9224
|
+
"returns": "Promise<void>"
|
|
9225
|
+
},
|
|
9226
|
+
{
|
|
9227
|
+
"name": "markNeedsReconnect",
|
|
9228
|
+
"async": true,
|
|
9229
|
+
"params": [
|
|
9230
|
+
"reason: string"
|
|
9231
|
+
],
|
|
9232
|
+
"returns": "Promise<void>"
|
|
9233
|
+
},
|
|
9234
|
+
{
|
|
9235
|
+
"name": "removeCredentials",
|
|
9236
|
+
"async": true,
|
|
9237
|
+
"returns": "Promise<void>"
|
|
9238
|
+
},
|
|
8718
9239
|
{
|
|
8719
9240
|
"name": "setConfiguration",
|
|
8720
9241
|
"params": [
|
|
@@ -8825,6 +9346,27 @@
|
|
|
8825
9346
|
"reason": "not listed in api.include",
|
|
8826
9347
|
"objectName": "@happyvertical/smrt-messages:TelegramAccount"
|
|
8827
9348
|
},
|
|
9349
|
+
{
|
|
9350
|
+
"kind": "api",
|
|
9351
|
+
"operation": "markConnected",
|
|
9352
|
+
"code": "not-included",
|
|
9353
|
+
"reason": "not listed in api.include",
|
|
9354
|
+
"objectName": "@happyvertical/smrt-messages:TelegramAccount"
|
|
9355
|
+
},
|
|
9356
|
+
{
|
|
9357
|
+
"kind": "api",
|
|
9358
|
+
"operation": "markNeedsReconnect",
|
|
9359
|
+
"code": "not-included",
|
|
9360
|
+
"reason": "not listed in api.include",
|
|
9361
|
+
"objectName": "@happyvertical/smrt-messages:TelegramAccount"
|
|
9362
|
+
},
|
|
9363
|
+
{
|
|
9364
|
+
"kind": "api",
|
|
9365
|
+
"operation": "removeCredentials",
|
|
9366
|
+
"code": "not-included",
|
|
9367
|
+
"reason": "not listed in api.include",
|
|
9368
|
+
"objectName": "@happyvertical/smrt-messages:TelegramAccount"
|
|
9369
|
+
},
|
|
8828
9370
|
{
|
|
8829
9371
|
"kind": "api",
|
|
8830
9372
|
"operation": "setConfiguration",
|
|
@@ -8848,6 +9390,7 @@
|
|
|
8848
9390
|
}
|
|
8849
9391
|
],
|
|
8850
9392
|
"relationshipFeatures": [
|
|
9393
|
+
"crossPackageRef",
|
|
8851
9394
|
"uuidColumns"
|
|
8852
9395
|
],
|
|
8853
9396
|
"tags": [],
|
|
@@ -9173,6 +9716,8 @@
|
|
|
9173
9716
|
"getToAddresses",
|
|
9174
9717
|
"isSendOutcomeUnknown",
|
|
9175
9718
|
"isUnread",
|
|
9719
|
+
"loadFromId",
|
|
9720
|
+
"loadFromSlug",
|
|
9176
9721
|
"markRead",
|
|
9177
9722
|
"markUnread",
|
|
9178
9723
|
"retrySend",
|
|
@@ -9269,6 +9814,16 @@
|
|
|
9269
9814
|
"name": "isUnread",
|
|
9270
9815
|
"returns": "boolean"
|
|
9271
9816
|
},
|
|
9817
|
+
{
|
|
9818
|
+
"name": "loadFromId",
|
|
9819
|
+
"async": true,
|
|
9820
|
+
"returns": "any"
|
|
9821
|
+
},
|
|
9822
|
+
{
|
|
9823
|
+
"name": "loadFromSlug",
|
|
9824
|
+
"async": true,
|
|
9825
|
+
"returns": "any"
|
|
9826
|
+
},
|
|
9272
9827
|
{
|
|
9273
9828
|
"name": "markRead",
|
|
9274
9829
|
"async": true,
|
|
@@ -9643,6 +10198,20 @@
|
|
|
9643
10198
|
"reason": "not listed in api.include",
|
|
9644
10199
|
"objectName": "@happyvertical/smrt-messages:Tweet"
|
|
9645
10200
|
},
|
|
10201
|
+
{
|
|
10202
|
+
"kind": "api",
|
|
10203
|
+
"operation": "loadFromId",
|
|
10204
|
+
"code": "lifecycle-method",
|
|
10205
|
+
"reason": "`loadFromId` is a framework lifecycle method, not a distinct operation",
|
|
10206
|
+
"objectName": "@happyvertical/smrt-messages:Tweet"
|
|
10207
|
+
},
|
|
10208
|
+
{
|
|
10209
|
+
"kind": "api",
|
|
10210
|
+
"operation": "loadFromSlug",
|
|
10211
|
+
"code": "lifecycle-method",
|
|
10212
|
+
"reason": "`loadFromSlug` is a framework lifecycle method, not a distinct operation",
|
|
10213
|
+
"objectName": "@happyvertical/smrt-messages:Tweet"
|
|
10214
|
+
},
|
|
9646
10215
|
{
|
|
9647
10216
|
"kind": "api",
|
|
9648
10217
|
"operation": "markRead",
|
|
@@ -9764,6 +10333,35 @@
|
|
|
9764
10333
|
"default": true,
|
|
9765
10334
|
"description": "Whether this account is enabled for messaging."
|
|
9766
10335
|
},
|
|
10336
|
+
{
|
|
10337
|
+
"name": "ownerUserId",
|
|
10338
|
+
"type": "crossPackageRef",
|
|
10339
|
+
"required": false,
|
|
10340
|
+
"related": "@happyvertical/smrt-users:User",
|
|
10341
|
+
"columnType": "UUID",
|
|
10342
|
+
"description": "The person who owns this account and decides who else may use it."
|
|
10343
|
+
},
|
|
10344
|
+
{
|
|
10345
|
+
"name": "label",
|
|
10346
|
+
"type": "text",
|
|
10347
|
+
"required": false,
|
|
10348
|
+
"columnType": "TEXT",
|
|
10349
|
+
"description": "A short name shown beside this account, such as Support or Personal."
|
|
10350
|
+
},
|
|
10351
|
+
{
|
|
10352
|
+
"name": "connectionStatus",
|
|
10353
|
+
"type": "text",
|
|
10354
|
+
"required": false,
|
|
10355
|
+
"columnType": "TEXT",
|
|
10356
|
+
"description": "Whether the saved sign-in still works: connected, or needs_reconnect after the server refused it."
|
|
10357
|
+
},
|
|
10358
|
+
{
|
|
10359
|
+
"name": "statusMessage",
|
|
10360
|
+
"type": "text",
|
|
10361
|
+
"required": false,
|
|
10362
|
+
"columnType": "TEXT",
|
|
10363
|
+
"description": "Why the account needs attention, in plain words."
|
|
10364
|
+
},
|
|
9767
10365
|
{
|
|
9768
10366
|
"name": "lastSyncAt",
|
|
9769
10367
|
"type": "datetime",
|
|
@@ -9805,7 +10403,15 @@
|
|
|
9805
10403
|
"columnType": "TEXT"
|
|
9806
10404
|
}
|
|
9807
10405
|
],
|
|
9808
|
-
"relationships": [
|
|
10406
|
+
"relationships": [
|
|
10407
|
+
{
|
|
10408
|
+
"name": "ownerUserId",
|
|
10409
|
+
"type": "crossPackageRef",
|
|
10410
|
+
"required": false,
|
|
10411
|
+
"related": "@happyvertical/smrt-users:User",
|
|
10412
|
+
"columnType": "UUID"
|
|
10413
|
+
}
|
|
10414
|
+
],
|
|
9809
10415
|
"methods": [
|
|
9810
10416
|
"activate",
|
|
9811
10417
|
"createSender",
|
|
@@ -9813,6 +10419,9 @@
|
|
|
9813
10419
|
"getConfiguration",
|
|
9814
10420
|
"getCredentials",
|
|
9815
10421
|
"getSettings",
|
|
10422
|
+
"markConnected",
|
|
10423
|
+
"markNeedsReconnect",
|
|
10424
|
+
"removeCredentials",
|
|
9816
10425
|
"setConfiguration",
|
|
9817
10426
|
"setCredentials",
|
|
9818
10427
|
"setSettings"
|
|
@@ -9846,6 +10455,24 @@
|
|
|
9846
10455
|
"name": "getSettings",
|
|
9847
10456
|
"returns": "Record<string, unknown>"
|
|
9848
10457
|
},
|
|
10458
|
+
{
|
|
10459
|
+
"name": "markConnected",
|
|
10460
|
+
"async": true,
|
|
10461
|
+
"returns": "Promise<void>"
|
|
10462
|
+
},
|
|
10463
|
+
{
|
|
10464
|
+
"name": "markNeedsReconnect",
|
|
10465
|
+
"async": true,
|
|
10466
|
+
"params": [
|
|
10467
|
+
"reason: string"
|
|
10468
|
+
],
|
|
10469
|
+
"returns": "Promise<void>"
|
|
10470
|
+
},
|
|
10471
|
+
{
|
|
10472
|
+
"name": "removeCredentials",
|
|
10473
|
+
"async": true,
|
|
10474
|
+
"returns": "Promise<void>"
|
|
10475
|
+
},
|
|
9849
10476
|
{
|
|
9850
10477
|
"name": "setConfiguration",
|
|
9851
10478
|
"params": [
|
|
@@ -9956,6 +10583,27 @@
|
|
|
9956
10583
|
"reason": "not listed in api.include",
|
|
9957
10584
|
"objectName": "@happyvertical/smrt-messages:TwitterAccount"
|
|
9958
10585
|
},
|
|
10586
|
+
{
|
|
10587
|
+
"kind": "api",
|
|
10588
|
+
"operation": "markConnected",
|
|
10589
|
+
"code": "not-included",
|
|
10590
|
+
"reason": "not listed in api.include",
|
|
10591
|
+
"objectName": "@happyvertical/smrt-messages:TwitterAccount"
|
|
10592
|
+
},
|
|
10593
|
+
{
|
|
10594
|
+
"kind": "api",
|
|
10595
|
+
"operation": "markNeedsReconnect",
|
|
10596
|
+
"code": "not-included",
|
|
10597
|
+
"reason": "not listed in api.include",
|
|
10598
|
+
"objectName": "@happyvertical/smrt-messages:TwitterAccount"
|
|
10599
|
+
},
|
|
10600
|
+
{
|
|
10601
|
+
"kind": "api",
|
|
10602
|
+
"operation": "removeCredentials",
|
|
10603
|
+
"code": "not-included",
|
|
10604
|
+
"reason": "not listed in api.include",
|
|
10605
|
+
"objectName": "@happyvertical/smrt-messages:TwitterAccount"
|
|
10606
|
+
},
|
|
9959
10607
|
{
|
|
9960
10608
|
"kind": "api",
|
|
9961
10609
|
"operation": "setConfiguration",
|
|
@@ -9979,6 +10627,7 @@
|
|
|
9979
10627
|
}
|
|
9980
10628
|
],
|
|
9981
10629
|
"relationshipFeatures": [
|
|
10630
|
+
"crossPackageRef",
|
|
9982
10631
|
"uuidColumns"
|
|
9983
10632
|
],
|
|
9984
10633
|
"tags": [],
|
|
@@ -10342,6 +10991,35 @@
|
|
|
10342
10991
|
"default": true,
|
|
10343
10992
|
"description": "Whether this account is enabled for messaging."
|
|
10344
10993
|
},
|
|
10994
|
+
{
|
|
10995
|
+
"name": "ownerUserId",
|
|
10996
|
+
"type": "crossPackageRef",
|
|
10997
|
+
"required": false,
|
|
10998
|
+
"related": "@happyvertical/smrt-users:User",
|
|
10999
|
+
"columnType": "UUID",
|
|
11000
|
+
"description": "The person who owns this account and decides who else may use it."
|
|
11001
|
+
},
|
|
11002
|
+
{
|
|
11003
|
+
"name": "label",
|
|
11004
|
+
"type": "text",
|
|
11005
|
+
"required": false,
|
|
11006
|
+
"columnType": "TEXT",
|
|
11007
|
+
"description": "A short name shown beside this account, such as Support or Personal."
|
|
11008
|
+
},
|
|
11009
|
+
{
|
|
11010
|
+
"name": "connectionStatus",
|
|
11011
|
+
"type": "text",
|
|
11012
|
+
"required": false,
|
|
11013
|
+
"columnType": "TEXT",
|
|
11014
|
+
"description": "Whether the saved sign-in still works: connected, or needs_reconnect after the server refused it."
|
|
11015
|
+
},
|
|
11016
|
+
{
|
|
11017
|
+
"name": "statusMessage",
|
|
11018
|
+
"type": "text",
|
|
11019
|
+
"required": false,
|
|
11020
|
+
"columnType": "TEXT",
|
|
11021
|
+
"description": "Why the account needs attention, in plain words."
|
|
11022
|
+
},
|
|
10345
11023
|
{
|
|
10346
11024
|
"name": "lastSyncAt",
|
|
10347
11025
|
"type": "datetime",
|
|
@@ -10371,7 +11049,15 @@
|
|
|
10371
11049
|
"description": "When this account was last changed."
|
|
10372
11050
|
}
|
|
10373
11051
|
],
|
|
10374
|
-
"relationships": [
|
|
11052
|
+
"relationships": [
|
|
11053
|
+
{
|
|
11054
|
+
"name": "ownerUserId",
|
|
11055
|
+
"type": "crossPackageRef",
|
|
11056
|
+
"required": false,
|
|
11057
|
+
"related": "@happyvertical/smrt-users:User",
|
|
11058
|
+
"columnType": "UUID"
|
|
11059
|
+
}
|
|
11060
|
+
],
|
|
10375
11061
|
"methods": [
|
|
10376
11062
|
"activate",
|
|
10377
11063
|
"createSender",
|
|
@@ -10379,6 +11065,9 @@
|
|
|
10379
11065
|
"getConfiguration",
|
|
10380
11066
|
"getCredentials",
|
|
10381
11067
|
"getSettings",
|
|
11068
|
+
"markConnected",
|
|
11069
|
+
"markNeedsReconnect",
|
|
11070
|
+
"removeCredentials",
|
|
10382
11071
|
"setConfiguration",
|
|
10383
11072
|
"setCredentials",
|
|
10384
11073
|
"setSettings"
|
|
@@ -10412,6 +11101,24 @@
|
|
|
10412
11101
|
"name": "getSettings",
|
|
10413
11102
|
"returns": "Record<string, unknown>"
|
|
10414
11103
|
},
|
|
11104
|
+
{
|
|
11105
|
+
"name": "markConnected",
|
|
11106
|
+
"async": true,
|
|
11107
|
+
"returns": "Promise<void>"
|
|
11108
|
+
},
|
|
11109
|
+
{
|
|
11110
|
+
"name": "markNeedsReconnect",
|
|
11111
|
+
"async": true,
|
|
11112
|
+
"params": [
|
|
11113
|
+
"reason: string"
|
|
11114
|
+
],
|
|
11115
|
+
"returns": "Promise<void>"
|
|
11116
|
+
},
|
|
11117
|
+
{
|
|
11118
|
+
"name": "removeCredentials",
|
|
11119
|
+
"async": true,
|
|
11120
|
+
"returns": "Promise<void>"
|
|
11121
|
+
},
|
|
10415
11122
|
{
|
|
10416
11123
|
"name": "setConfiguration",
|
|
10417
11124
|
"params": [
|
|
@@ -10522,6 +11229,27 @@
|
|
|
10522
11229
|
"reason": "not listed in api.include",
|
|
10523
11230
|
"objectName": "@happyvertical/smrt-messages:ZulipAccount"
|
|
10524
11231
|
},
|
|
11232
|
+
{
|
|
11233
|
+
"kind": "api",
|
|
11234
|
+
"operation": "markConnected",
|
|
11235
|
+
"code": "not-included",
|
|
11236
|
+
"reason": "not listed in api.include",
|
|
11237
|
+
"objectName": "@happyvertical/smrt-messages:ZulipAccount"
|
|
11238
|
+
},
|
|
11239
|
+
{
|
|
11240
|
+
"kind": "api",
|
|
11241
|
+
"operation": "markNeedsReconnect",
|
|
11242
|
+
"code": "not-included",
|
|
11243
|
+
"reason": "not listed in api.include",
|
|
11244
|
+
"objectName": "@happyvertical/smrt-messages:ZulipAccount"
|
|
11245
|
+
},
|
|
11246
|
+
{
|
|
11247
|
+
"kind": "api",
|
|
11248
|
+
"operation": "removeCredentials",
|
|
11249
|
+
"code": "not-included",
|
|
11250
|
+
"reason": "not listed in api.include",
|
|
11251
|
+
"objectName": "@happyvertical/smrt-messages:ZulipAccount"
|
|
11252
|
+
},
|
|
10525
11253
|
{
|
|
10526
11254
|
"kind": "api",
|
|
10527
11255
|
"operation": "setConfiguration",
|
|
@@ -10545,6 +11273,7 @@
|
|
|
10545
11273
|
}
|
|
10546
11274
|
],
|
|
10547
11275
|
"relationshipFeatures": [
|
|
11276
|
+
"crossPackageRef",
|
|
10548
11277
|
"uuidColumns"
|
|
10549
11278
|
],
|
|
10550
11279
|
"tags": [],
|
|
@@ -10552,6 +11281,12 @@
|
|
|
10552
11281
|
}
|
|
10553
11282
|
],
|
|
10554
11283
|
"surfaces": [
|
|
11284
|
+
{
|
|
11285
|
+
"kind": "cli",
|
|
11286
|
+
"name": "attachmentcollection_backfillAccountIds",
|
|
11287
|
+
"operation": "backfillAccountIds",
|
|
11288
|
+
"objectName": "@happyvertical/smrt-messages:AttachmentCollection"
|
|
11289
|
+
},
|
|
10555
11290
|
{
|
|
10556
11291
|
"kind": "cli",
|
|
10557
11292
|
"name": "attachmentcollection_getByMessage",
|
|
@@ -10672,6 +11407,12 @@
|
|
|
10672
11407
|
"operation": "getMatchingEntry",
|
|
10673
11408
|
"objectName": "@happyvertical/smrt-messages:BlacklistCollection"
|
|
10674
11409
|
},
|
|
11410
|
+
{
|
|
11411
|
+
"kind": "cli",
|
|
11412
|
+
"name": "emailattachmentcollection_backfillAccountIds",
|
|
11413
|
+
"operation": "backfillAccountIds",
|
|
11414
|
+
"objectName": "@happyvertical/smrt-messages:EmailAttachmentCollection"
|
|
11415
|
+
},
|
|
10675
11416
|
{
|
|
10676
11417
|
"kind": "cli",
|
|
10677
11418
|
"name": "emailattachmentcollection_getByMessage",
|
|
@@ -12981,14 +13722,14 @@
|
|
|
12981
13722
|
],
|
|
12982
13723
|
"prompts": [],
|
|
12983
13724
|
"relationshipsV2": {
|
|
12984
|
-
"foreignKeyFields":
|
|
12985
|
-
"crossPackageRefFields":
|
|
13725
|
+
"foreignKeyFields": 21,
|
|
13726
|
+
"crossPackageRefFields": 16,
|
|
12986
13727
|
"junctionCollections": 0,
|
|
12987
13728
|
"hierarchicalObjects": 0,
|
|
12988
13729
|
"polymorphicAssociations": 0,
|
|
12989
|
-
"uuidColumns":
|
|
13730
|
+
"uuidColumns": 130
|
|
12990
13731
|
},
|
|
12991
|
-
"agentDoc": "# @happyvertical/smrt-messages\n\nMulti-channel messaging with STI hierarchies for both messages and accounts. Credential encryption via smrt-secrets.\n\n## STI Hierarchies\n\n**Messages** (share `messages` table):\n- `Message` (base): accountId, personaId, endpointId, correlationId, threadId, subject, body, fromAddress, toAddresses (JSON), sendStatus (draft/sending/sent/failed), retryCount\n- `Email`: messageId (RFC 822), inReplyTo, ccAddresses, bccAddresses, htmlBody, textBody, folderId, labels, headers\n- `Tweet`: tweetId, retweetCount, likeCount, mediaUrls, hashtags, mentions\n- `SlackMessage`: channelId, slackTs, slackThreadTs, reactions, blocks\n\n**Accounts** (share `accounts` table):\n- `Account` (base): channelType, providerType, public configuration,\n credentialSecretId, isActive, lastSyncAt, deprecated sensitive settings\n- `EmailAccount`, `TwitterAccount`, `SlackAccount`, `ZulipAccount`,\n `TelegramAccount`: provider-specific identity/sender behavior\n\n## Persona messaging\n\n- `MessagingEndpoint`: tenant-owned, write-only destination JSON with masked\n display helper.\n- `PersonaMessageRoute`: persona → account + endpoint, selected by purpose and\n descending priority.\n- `PersonaMessagingService`: persists and sends through an enabled route.\n- Provider registry: public setup descriptors + optional sender factory. Keep\n channel (`sms`) separate from provider (`twilio`).\n- Permissions: `messages.send`, `messages.manage-routes`,\n `messages.manage-credentials`.\n- `MessagingSettingsService` is the permissioned server boundary;\n its host-supplied `resolvePersonaTenantId` proves cross-package ownership.\n `MessagingSettingsPanel` is the callback-driven Svelte surface.\n- Account, endpoint, and route generated surfaces are read-only. Do not add\n generated mutations around the settings service or make secret fields writable.\n- **Recipe `messages.slack`** (`src/recipes.ts`, help in `src/help/slack.md`): lists Slack messages and workspaces beside the Mailbox and Notifications recipes; workspaces stay read-only and sending goes through the senders, not generated routes. Fields it shows carry `@field({ description })` in plain words; keep them when editing the models.\n\n## In-app notifications (`UserNotification`)\n\nThe in-app channel: one stored row per person, with read state.\n`user_notifications`: `tenantId` (required), `recipientUserId`\n(`@crossPackageRef` smrt-users:User, uuid), `kind`, `title`, `body`, `href`,\n`severity` (info/success/warning/error), `sourceRef`, `occurredAt`, `readAt`,\n`dismissedAt`. Conflict identity `(tenant_id, recipient_user_id, source_ref)`.\n\n- `UserNotificationService` is the only access path: `notify()` /\n `notifyMany()` (dedupe on `sourceRef`, existing row returned untouched;\n a unique ref is generated when omitted), `listForUser()` / `countUnread()`\n across explicit `tenantIds` (each read under `withTenant`), `markRead()`,\n `dismiss()` (also marks read), `markAllRead()`. Every write filters on the\n recipient, so another user's id matches nothing.\n- Generated REST/MCP/CLI are off (`api`/`mcp`/`cli: false`): a tenant-scoped\n list would expose every member's rows. Hosts expose their own routes that\n pass the signed-in user's id, never a request-chosen one.\n- Hosts decide who is told (e.g. `SocialPost.createdByUserId` for a failed\n post). New table: consumers run `db:migrate`.\n\n## Notification email outbox (`NotificationDelivery`)\n\n`NotificationOutboxService` is the external-channel counterpart of\n`UserNotificationService`: `enqueueEmail()` stores one delivery per\n`(tenant, recipient, channel, sourceRef)` after the host resolves the\nrecipient address and same-tenant sender account (callers never choose an\naddress); `dispatchDue()` leases due rows by compare-and-set\n(`NotificationDelivery.transition()`), creates the single outbound `Email`\nunder the lease, and settles sent/retry/failed/uncertain. Never resend an\n`uncertain` row automatically. Contract, retry, and reconciliation policy:\n[agents/notification-outbox.md](agents/notification-outbox.md). New table:\nconsumers run `db:migrate`.\n\n`NotificationOptOut` (`notification_opt_outs`, tenant-required, generated\nsurfaces off) is the per-recipient opt-out ledger for the outbox's\n`isSuppressed` hook, keyed `(tenant, recipient, channel, scope)` with scope `*`\nor `project:<uuid>`-style keys. `NotificationOptOutService`: idempotent\n`optOut`/`optIn` (with a `principal` only `userId === recipientUserId` may\nchange a row, and only in the principal's own `tenantId`, else\n`NotificationOptOutDeniedError`; no principal = trusted host code), trusted `isOptedOut` (a `*` row matches every scope), `listForRecipient`\n(principal required). `optOutSuppression(service, scopeOf)` builds the\n`isSuppressed` function. Details in the outbox doc; consumers run `db:migrate`.\n\n## Credential Security\n\nAccount credentials stored via tenant-bound `credentialSecretId` →\nsmrt-secrets. Use `setCredentials()`/`getCredentials()` — never store passwords\ndirectly. Credential descriptor schemas contain field definitions, never values.\n\n## Send Lifecycle\n\n`message.send()`: resolves account → creates provider sender → updates sendStatus. Retry support with `maxRetries` budget.\nA failure the provider may still have accepted carries\n`MessageSendResult.outcomeUnknown` (set by `EmailSender` unless\n`isDefiniteSendRejection()` proves a refusal, and when a sender throws) and is\npersisted as `metadata.sendOutcomeUnknown`; never auto-resend it.\n`EmailSender` attaches the message's stored `Attachment` rows (read through\n`Attachment.readContent()`, under the message's tenant context) plus\n`SendEmailOptions.attachments` bytes; an unreadable or file-less row fails the\nsend with the error on `sendError`, never a silent drop (#3808).\n`PersonaMessagingService.send({ attachments })` accepts them on email routes only.\n\n## Provider entry points (bundle boundary, #1979)\n\nThe package root is provider-neutral: models, collections, services,\npermissions, and the provider registry carry **zero provider-SDK weight**.\nProvider SDK wrappers (`@happyvertical/email`, `@happyvertical/messages`) are\nreachable only through explicit entry points, imported once at server startup:\n\n```ts\nimport '@happyvertical/smrt-messages/providers/email'; // smtp/imap/pop3/gmail\nimport '@happyvertical/smrt-messages/providers/slack';\nimport '@happyvertical/smrt-messages/providers/twitter';\nimport '@happyvertical/smrt-messages/providers/all'; // all of the above\n```\n\n- Without the matching entry, `EmailAccount.createClient()` (send + mailbox\n sync) throws an actionable error and `SlackSender`/`TweetSender` return a\n failure result naming the entry to import. Telegram and Zulip are\n fetch-based and always work from the root.\n- Builtin registry definitions stay metadata-only (setup fields for UIs); the\n entries upgrade them with `createEmailClient`/`createMessageClient`/\n `createSender` hooks. Never import a provider SDK from any module reachable\n from `src/index.ts` — the consumer bundle gate (`packages/bundle-gate`)\n fails CI when one becomes reachable.\n- `Attachment.readContent()` loads `@happyvertical/files` through core's\n `importOptionalDependency` boundary and keeps its null-on-failure contract\n in builds where the SDK is absent.\n\n## Gotchas\n\n- **Manifest before decorators**: every decorated model imports\n `../__smrt-register__.js`, and `package.json#sideEffects` lists\n `./src/__smrt-register__.ts`. Without both, the library build dropped or\n reordered the self-registration, so dist classes registered with only their\n decorated fields and could adopt smrt-ledgers' same-named `Account` (#3098).\n- **`Account` is not unique**: smrt-ledgers also declares `Account` (on\n `ledger_accounts`). Resolve by constructor or qualified name; the\n coexistence tests (`ledger-account-identity-*`, and the PostgreSQL lane\n `pnpm test:postgres`) load both packages in both orders.\n Both declare the `accounts` collection, so registering the ledgers `Account`\n auto-loads this family from its manifest as STI siblings. Core loads this\n base with them and never takes the ledgers `Account` for it (#4735,\n `ledger-account-identity-sti-siblings.test.ts`).\n- **STI `_meta_type`**: qualified format `@happyvertical/smrt-messages:Email`\n- **JSON fields**: all address/metadata fields are JSON strings with `getX()`/`setX()` helpers\n- **RFC 822 threading**: Email uses `inReplyTo`/`messageId`/`references` — manual management required\n- **Attachment.messageId**: use this field (not `emailId`); old getter/setter mapped via deprecation wrapper\n- **Optional tenancy**: `@TenantScoped({ mode: 'optional' })` on Message, Account, Attachment\n- **Required tenancy**: endpoints and persona routes are always tenant scoped\n- **Secrets are write-only**: never serialize credentials or endpoint.address to an app\n\n## Intake byte snapshots\n\n`EmailAccount.readIntakeMessage(providerLookup, maxBytes, imapIdentity?)` is the authorized host seam for\nopt-in ingestion. It copies full-message attachment bytes from the registered\nemail provider and fails when only attachment metadata is available; it never\nreads provider-supplied paths or advances sync checkpoints. Keep this path\nprovider-neutral and exclude arbitrary headers/credentials from its snapshot.\nIMAP lookup must include folder/UIDVALIDITY/UID verification; sender Message-ID\nis a lookup hint, never the durable delivery identity.\n\nProtected notification Emails carry durable delivery provenance. Their canonical\n`send`/`retrySend`, ordinary save/delete, and default EmailSender handoff are\nconstrained by `protected-notification-handoff.ts` (package-private, never a root\nexport). Only the outbox enters its exact one-use scope after current trusted\npolicy/byte validation. Preserve old-row/constructor identity checks, current\npersisted lease checks at the actual provider boundary, copied byte buffers and\nunknown-outcome marker protection. See the outbox contract and shared protected\nhandoff suite (SQLite and migrated PostgreSQL).\n\n## Protected external contacts\n\nProfile email uses exclusive `recipientProfileId` plus `resolveProfileRecipient`, a reserved `profileNotificationPolicy` and exact current tenant-owned public Profile email. No User account is required. Before activating profiles, run normal framework schema migration and public `planNotificationProfileRecipients` / `migrateNotificationProfileRecipients`; runtime verifies physical constraints and never applies DDL. Legacy User notification and opt-out paths remain User-only. See [profile recipient contract and matrix](agents/profile-recipients.md).\n",
|
|
13732
|
+
"agentDoc": "# @happyvertical/smrt-messages\n\nMulti-channel messaging with STI hierarchies for both messages and accounts. Credential encryption via smrt-secrets.\n\n## STI Hierarchies\n\n**Messages** (share `messages` table):\n- `Message` (base): accountId, personaId, endpointId, correlationId, threadId, subject, body, fromAddress, toAddresses (JSON), sendStatus (draft/sending/sent/failed), retryCount\n- `Email`: messageId (RFC 822), inReplyTo, ccAddresses, bccAddresses, htmlBody, textBody, folderId, labels, headers\n- `Tweet`: tweetId, retweetCount, likeCount, mediaUrls, hashtags, mentions\n- `SlackMessage`: channelId, slackTs, slackThreadTs, reactions, blocks\n\n**Accounts** (share `accounts` table):\n- `Account` (base): channelType, providerType, public configuration,\n credentialSecretId, isActive, lastSyncAt, deprecated sensitive settings\n- `EmailAccount`, `TwitterAccount`, `SlackAccount`, `ZulipAccount`,\n `TelegramAccount`: provider-specific identity/sender behavior\n\n## Persona messaging\n\n- `MessagingEndpoint`: tenant-owned, write-only destination JSON with masked\n display helper.\n- `PersonaMessageRoute`: persona → account + endpoint, selected by purpose and\n descending priority.\n- `PersonaMessagingService`: persists and sends through an enabled route.\n- Provider registry: public setup descriptors + optional sender factory. Keep\n channel (`sms`) separate from provider (`twilio`).\n- Permissions: `messages.send`, `messages.manage-routes`,\n `messages.manage-credentials`.\n- `MessagingSettingsService` is the permissioned server boundary;\n its host-supplied `resolvePersonaTenantId` proves cross-package ownership.\n `MessagingSettingsPanel` is the callback-driven Svelte surface.\n- Account, endpoint, and route generated surfaces are read-only. Do not add\n generated mutations around the settings service or make secret fields writable.\n- **Recipe `messages.slack`** (`src/recipes.ts`, help in `src/help/slack.md`): lists Slack messages and workspaces beside the Mailbox and Notifications recipes; workspaces stay read-only and sending goes through the senders, not generated routes. Fields it shows carry `@field({ description })` in plain words; keep them when editing the models.\n\n## Per-account mail access (owner + grants)\n\nOptional by default: `Account.ownerUserId` is nullable, and an account without\nan owner stays tenant-wide. Apps that want private or shared mailboxes set\nowners and call `configureMailAccess({ options, resolvePrincipal })` at startup\n(`access.ts`); smrt never knows the host's credential model, the host returns a\n`MailPrincipal` (`userId` + tenant, optional `scopes` / `accountIds` ceilings).\n\n- Scopes `read`, `triage`, `draft`, `send` are `ResourceGrant` rows (resource\n type `messages:account`, permission `messages.<scope>`) checked by\n `checkResourceOperationPermission`, so the grantee also needs the tenant\n `messages.<scope>` permission (the ceiling). The owner holds every scope\n implicitly. Agents are `User` rows the host maps its credential to; the\n principal ceilings are intersected with the grant, never added to it.\n- `access-enforcement.ts` is a `GlobalInterceptors` entry registered at package\n load. Emails, folders and attachments (matched by STI ancestry) are filtered\n in `beforeList`/`afterList`/`afterGet`; raw `query()` on them is refused while\n any account is closed to the principal. Fail closed: no principal, no\n resolver or a foreign tenant means owned accounts are invisible. No tenant\n admin or super-admin bypass; trusted work (sync, outbox) uses\n `runWithMailSystemAccess()`. `EmailAccount.syncFrom()` does so itself.\n- Attachments carry a denormalized `accountId` (always derived from the message in a\n `beforeSave` interceptor, never caller-supplied) so lists, projections and counts filter in SQL; run\n `AttachmentCollection.backfillAccountIds()` once after upgrading (legacy rows\n without it are hidden from every read until then).\n- `connectMailbox` refuses by default: give the service `allowedMailHosts`\n (and optionally `allowedMailPorts`) or your own `validateMailbox`. The\n built-in validator never connects to private, loopback or link-local\n addresses and returns only a generic error. Policy lookups use the\n configured db handle, not a caller's transaction.\n- `Message.send()` needs the `send` scope on an owned account. Account rows are\n not filtered (senders, routes and the outbox read them without a principal).\n- `MailAccessService` (`grant`, `revoke`, `list`, `setOwner`) needs tenant\n `messages.manage-access` AND ownership (or delegation); an administrator\n cannot read, self-grant or take over an owned mailbox. Unowned accounts can be\n claimed once with `messages.manage-credentials`.\n- Before `configureMailAccess` is called the policy still fails closed on\n owned accounts: every collection operation on a mail class (the core `onCollectionReady`\n interceptor hook, so STI subclasses on a default collection are covered) registers its\n database, per database, and the policy hides every owned account's mail\n through list, count, projections, facets and raw queries; it learns the database from the first mail or account row it\n sees and, with no principal resolver, hides every owned account's mail.\n Direct hydration (`new Email({ id }).initialize()`, `loadRelated()`) is gated\n in the models' `loadFromId`/`loadFromSlug`.\n- `connectionStatus` (`connected` / `needs_reconnect`) and `statusMessage` mark\n an account whose sign-in the server refused; `syncFrom()` sets it.\n\n## Mailbox connect (provider-neutral)\n\nCredentials reach smrt-secrets in two ways; neither writes the plaintext `settings` fallback.\n\n- **Write-only app password**: `MessagingSettingsService.connectMailbox()`\n (permission `messages.manage-credentials`). The candidate credential is\n validated by opening a session first (`validateMailbox` option, default the\n provider's email client); a refusal leaves no account and no secret, and the\n error text has the secret redacted. The connecting user becomes the owner;\n `label` and the per-account endpoint (`configuration`) are stored; reconnect\n replaces the secret and is owner-only. `setAccountActive()` pauses/resumes\n (`isActive`), `removeAccount()` deletes the secret, the synced mail and the\n account. IMAP/POP3 are admitted here (receive-only), not by `saveAccount`.\n- **Generic OAuth 2.0 / OIDC**: `@happyvertical/smrt-messages/connect`\n (`startMailOAuthConnect`, `completeMailOAuthConnect`, `MailOAuthProvider`)\n on the shared kernel `@happyvertical/smrt-secrets/connect` (single-use\n tenant- and user-bound `ConnectState`, PKCE, safe return path, OIDC\n discovery with issuer check). The signed-in user becomes the owner; an\n account owned by someone else or by no one is never taken over. No role\n checks in the flow: authorize before calling.\n- **Reconnect**: `syncFrom()` marks an auth failure `connectionStatus =\n 'needs_reconnect'` (`Account.markNeedsReconnect/markConnected`) instead of\n failing silently.\n- The Google provider is a later step (sdk#1405), not part of this flow.\n\n## In-app notifications (`UserNotification`)\n\nThe in-app channel: one stored row per person, with read state.\n`user_notifications`: `tenantId` (required), `recipientUserId`\n(`@crossPackageRef` smrt-users:User, uuid), `kind`, `title`, `body`, `href`,\n`severity` (info/success/warning/error), `sourceRef`, `occurredAt`, `readAt`,\n`dismissedAt`. Conflict identity `(tenant_id, recipient_user_id, source_ref)`.\n\n- `UserNotificationService` is the only access path: `notify()` /\n `notifyMany()` (dedupe on `sourceRef`, existing row returned untouched;\n a unique ref is generated when omitted), `listForUser()` / `countUnread()`\n across explicit `tenantIds` (each read under `withTenant`), `markRead()`,\n `dismiss()` (also marks read), `markAllRead()`. Every write filters on the\n recipient, so another user's id matches nothing.\n- Generated REST/MCP/CLI are off (`api`/`mcp`/`cli: false`): a tenant-scoped\n list would expose every member's rows. Hosts expose their own routes that\n pass the signed-in user's id, never a request-chosen one.\n- Hosts decide who is told (e.g. `SocialPost.createdByUserId` for a failed\n post). New table: consumers run `db:migrate`.\n\n## Notification email outbox (`NotificationDelivery`)\n\n`NotificationOutboxService` is the external-channel counterpart of\n`UserNotificationService`: `enqueueEmail()` stores one delivery per\n`(tenant, recipient, channel, sourceRef)` after the host resolves the\nrecipient address and same-tenant sender account (callers never choose an\naddress); `dispatchDue()` leases due rows by compare-and-set\n(`NotificationDelivery.transition()`), creates the single outbound `Email`\nunder the lease, and settles sent/retry/failed/uncertain. Never resend an\n`uncertain` row automatically. Contract, retry, and reconciliation policy:\n[agents/notification-outbox.md](agents/notification-outbox.md). New table:\nconsumers run `db:migrate`.\n\n`NotificationOptOut` (`notification_opt_outs`, tenant-required, generated\nsurfaces off) is the per-recipient opt-out ledger for the outbox's\n`isSuppressed` hook, keyed `(tenant, recipient, channel, scope)` with scope `*`\nor `project:<uuid>`-style keys. `NotificationOptOutService`: idempotent\n`optOut`/`optIn` (with a `principal` only `userId === recipientUserId` may\nchange a row, and only in the principal's own `tenantId`, else\n`NotificationOptOutDeniedError`; no principal = trusted host code), trusted `isOptedOut` (a `*` row matches every scope), `listForRecipient`\n(principal required). `optOutSuppression(service, scopeOf)` builds the\n`isSuppressed` function. Details in the outbox doc; consumers run `db:migrate`.\n\n## Credential Security\n\nAccount credentials stored via tenant-bound `credentialSecretId` →\nsmrt-secrets. Use `setCredentials()`/`getCredentials()` — never store passwords\ndirectly. Credential descriptor schemas contain field definitions, never values.\n\n## Send Lifecycle\n\n`message.send()`: resolves account → creates provider sender → updates sendStatus. Retry support with `maxRetries` budget.\nA failure the provider may still have accepted carries\n`MessageSendResult.outcomeUnknown` (set by `EmailSender` unless\n`isDefiniteSendRejection()` proves a refusal, and when a sender throws) and is\npersisted as `metadata.sendOutcomeUnknown`; never auto-resend it.\n`EmailSender` attaches the message's stored `Attachment` rows (read through\n`Attachment.readContent()`, under the message's tenant context) plus\n`SendEmailOptions.attachments` bytes; an unreadable or file-less row fails the\nsend with the error on `sendError`, never a silent drop (#3808).\n`PersonaMessagingService.send({ attachments })` accepts them on email routes only.\n\n## Provider entry points (bundle boundary, #1979)\n\nThe package root is provider-neutral: models, collections, services,\npermissions, and the provider registry carry **zero provider-SDK weight**.\nProvider SDK wrappers (`@happyvertical/email`, `@happyvertical/messages`) are\nreachable only through explicit entry points, imported once at server startup:\n\n```ts\nimport '@happyvertical/smrt-messages/providers/email'; // smtp/imap/pop3/gmail\nimport '@happyvertical/smrt-messages/providers/slack';\nimport '@happyvertical/smrt-messages/providers/twitter';\nimport '@happyvertical/smrt-messages/providers/all'; // all of the above\n```\n\n- Without the matching entry, `EmailAccount.createClient()` (send + mailbox\n sync) throws an actionable error and `SlackSender`/`TweetSender` return a\n failure result naming the entry to import. Telegram and Zulip are\n fetch-based and always work from the root.\n- Builtin registry definitions stay metadata-only (setup fields for UIs); the\n entries upgrade them with `createEmailClient`/`createMessageClient`/\n `createSender` hooks. Never import a provider SDK from any module reachable\n from `src/index.ts` — the consumer bundle gate (`packages/bundle-gate`)\n fails CI when one becomes reachable.\n- `Attachment.readContent()` loads `@happyvertical/files` through core's\n `importOptionalDependency` boundary and keeps its null-on-failure contract\n in builds where the SDK is absent.\n\n## Gotchas\n\n- **Manifest before decorators**: every decorated model imports\n `../__smrt-register__.js`, and `package.json#sideEffects` lists\n `./src/__smrt-register__.ts`. Without both, the library build dropped or\n reordered the self-registration, so dist classes registered with only their\n decorated fields and could adopt smrt-ledgers' same-named `Account` (#3098).\n- **`Account` is not unique**: smrt-ledgers also declares `Account` (on\n `ledger_accounts`). Resolve by constructor or qualified name; the\n coexistence tests (`ledger-account-identity-*`, and the PostgreSQL lane\n `pnpm test:postgres`) load both packages in both orders.\n Both declare the `accounts` collection, so registering the ledgers `Account`\n auto-loads this family from its manifest as STI siblings. Core loads this\n base with them and never takes the ledgers `Account` for it (#4735,\n `ledger-account-identity-sti-siblings.test.ts`).\n- **STI `_meta_type`**: qualified format `@happyvertical/smrt-messages:Email`\n- **JSON fields**: all address/metadata fields are JSON strings with `getX()`/`setX()` helpers\n- **RFC 822 threading**: Email uses `inReplyTo`/`messageId`/`references` — manual management required\n- **Attachment.messageId**: use this field (not `emailId`); old getter/setter mapped via deprecation wrapper\n- **Optional tenancy**: `@TenantScoped({ mode: 'optional' })` on Message, Account, Attachment\n- **Required tenancy**: endpoints and persona routes are always tenant scoped\n- **Secrets are write-only**: never serialize credentials or endpoint.address to an app\n\n## Intake byte snapshots\n\n`EmailAccount.readIntakeMessage(providerLookup, maxBytes, imapIdentity?)` is the authorized host seam for\nopt-in ingestion. It copies full-message attachment bytes from the registered\nemail provider and fails when only attachment metadata is available; it never\nreads provider-supplied paths or advances sync checkpoints. Keep this path\nprovider-neutral and exclude arbitrary headers/credentials from its snapshot.\nIMAP lookup must include folder/UIDVALIDITY/UID verification; sender Message-ID\nis a lookup hint, never the durable delivery identity.\n\nProtected notification Emails carry durable delivery provenance. Their canonical\n`send`/`retrySend`, ordinary save/delete, and default EmailSender handoff are\nconstrained by `protected-notification-handoff.ts` (package-private, never a root\nexport). Only the outbox enters its exact one-use scope after current trusted\npolicy/byte validation. Preserve old-row/constructor identity checks, current\npersisted lease checks at the actual provider boundary, copied byte buffers and\nunknown-outcome marker protection. See the outbox contract and shared protected\nhandoff suite (SQLite and migrated PostgreSQL).\n\n## Protected external contacts\n\nProfile email uses exclusive `recipientProfileId` plus `resolveProfileRecipient`, a reserved `profileNotificationPolicy` and exact current tenant-owned public Profile email. No User account is required. Before activating profiles, run normal framework schema migration and public `planNotificationProfileRecipients` / `migrateNotificationProfileRecipients`; runtime verifies physical constraints and never applies DDL. Legacy User notification and opt-out paths remain User-only. See [profile recipient contract and matrix](agents/profile-recipients.md).\n",
|
|
12992
13733
|
"moduleDocs": [
|
|
12993
13734
|
{
|
|
12994
13735
|
"path": "agents/notification-outbox.md",
|