@happyvertical/smrt-messages 0.43.8 → 0.43.10

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.
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-messages",
6
- "packageVersion": "0.43.8",
6
+ "packageVersion": "0.43.10",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "e7cee253e2e17f4674f311c7b495dff9309d3b9dc9d94541040618056fc88bab",
11
- "packageJson": "9b01c3a9b7129317eaa57b86f9f8a9c6a80c9d9a86d82a2e2e017e4f0a8778dc",
10
+ "manifest": "b2c4b6f1c083b5732a8173daa7dbe3af67b99ee9668019254b31975861e9c1ae",
11
+ "packageJson": "b3b079df3482098dab05ca4d25631120a43a7de948eb6afd899fad0a238de474",
12
12
  "agents": "712dcc2f244d01db8b49d764b8c076e94cb9274fa4b458d7c902434a0473f127"
13
13
  },
14
14
  "exports": [
@@ -1307,6 +1307,7 @@
1307
1307
  "methods": [
1308
1308
  "_setLoadedRelationship",
1309
1309
  "activate",
1310
+ "claimRevision",
1310
1311
  "classifyConstraintError",
1311
1312
  "clearEmbeddings",
1312
1313
  "createSender",
@@ -1355,7 +1356,8 @@
1355
1356
  "toJSON",
1356
1357
  "toPlainObject",
1357
1358
  "toPublicJSON",
1358
- "withDatabase"
1359
+ "withDatabase",
1360
+ "withTransaction"
1359
1361
  ],
1360
1362
  "methodSignatures": [
1361
1363
  {
@@ -1371,6 +1373,14 @@
1371
1373
  "async": true,
1372
1374
  "returns": "Promise<void>"
1373
1375
  },
1376
+ {
1377
+ "name": "claimRevision",
1378
+ "async": true,
1379
+ "params": [
1380
+ "expectedUpdatedAt: Date | string"
1381
+ ],
1382
+ "returns": "Promise"
1383
+ },
1374
1384
  {
1375
1385
  "name": "classifyConstraintError",
1376
1386
  "static": true,
@@ -1625,6 +1635,9 @@
1625
1635
  {
1626
1636
  "name": "save",
1627
1637
  "async": true,
1638
+ "params": [
1639
+ "options?: SmrtSaveOptions"
1640
+ ],
1628
1641
  "returns": "any"
1629
1642
  },
1630
1643
  {
@@ -1681,6 +1694,14 @@
1681
1694
  "operation: Function"
1682
1695
  ],
1683
1696
  "returns": "Promise<T>"
1697
+ },
1698
+ {
1699
+ "name": "withTransaction",
1700
+ "async": true,
1701
+ "params": [
1702
+ "operation: Function"
1703
+ ],
1704
+ "returns": "Promise<T>"
1684
1705
  }
1685
1706
  ],
1686
1707
  "tenant": {
@@ -2425,6 +2446,7 @@
2425
2446
  ],
2426
2447
  "methods": [
2427
2448
  "_setLoadedRelationship",
2449
+ "claimRevision",
2428
2450
  "classifyConstraintError",
2429
2451
  "clearEmbeddings",
2430
2452
  "createForward",
@@ -2493,7 +2515,8 @@
2493
2515
  "toPlainObject",
2494
2516
  "toPublicJSON",
2495
2517
  "toggleFlagged",
2496
- "withDatabase"
2518
+ "withDatabase",
2519
+ "withTransaction"
2497
2520
  ],
2498
2521
  "methodSignatures": [
2499
2522
  {
@@ -2504,6 +2527,14 @@
2504
2527
  ],
2505
2528
  "returns": "void"
2506
2529
  },
2530
+ {
2531
+ "name": "claimRevision",
2532
+ "async": true,
2533
+ "params": [
2534
+ "expectedUpdatedAt: Date | string"
2535
+ ],
2536
+ "returns": "Promise"
2537
+ },
2507
2538
  {
2508
2539
  "name": "classifyConstraintError",
2509
2540
  "static": true,
@@ -2837,6 +2868,9 @@
2837
2868
  {
2838
2869
  "name": "save",
2839
2870
  "async": true,
2871
+ "params": [
2872
+ "options?: SmrtSaveOptions"
2873
+ ],
2840
2874
  "returns": "any"
2841
2875
  },
2842
2876
  {
@@ -2918,6 +2952,14 @@
2918
2952
  "operation: Function"
2919
2953
  ],
2920
2954
  "returns": "Promise<T>"
2955
+ },
2956
+ {
2957
+ "name": "withTransaction",
2958
+ "async": true,
2959
+ "params": [
2960
+ "operation: Function"
2961
+ ],
2962
+ "returns": "Promise<T>"
2921
2963
  }
2922
2964
  ],
2923
2965
  "tableStrategy": "sti",
@@ -3106,6 +3148,7 @@
3106
3148
  "methods": [
3107
3149
  "_setLoadedRelationship",
3108
3150
  "activate",
3151
+ "claimRevision",
3109
3152
  "classifyConstraintError",
3110
3153
  "clearEmbeddings",
3111
3154
  "createClient",
@@ -3161,7 +3204,8 @@
3161
3204
  "toJSON",
3162
3205
  "toPlainObject",
3163
3206
  "toPublicJSON",
3164
- "withDatabase"
3207
+ "withDatabase",
3208
+ "withTransaction"
3165
3209
  ],
3166
3210
  "methodSignatures": [
3167
3211
  {
@@ -3177,6 +3221,14 @@
3177
3221
  "async": true,
3178
3222
  "returns": "Promise<void>"
3179
3223
  },
3224
+ {
3225
+ "name": "claimRevision",
3226
+ "async": true,
3227
+ "params": [
3228
+ "expectedUpdatedAt: Date | string"
3229
+ ],
3230
+ "returns": "Promise"
3231
+ },
3180
3232
  {
3181
3233
  "name": "classifyConstraintError",
3182
3234
  "static": true,
@@ -3459,6 +3511,9 @@
3459
3511
  {
3460
3512
  "name": "save",
3461
3513
  "async": true,
3514
+ "params": [
3515
+ "options?: SmrtSaveOptions"
3516
+ ],
3462
3517
  "returns": "any"
3463
3518
  },
3464
3519
  {
@@ -3531,6 +3586,14 @@
3531
3586
  "operation: Function"
3532
3587
  ],
3533
3588
  "returns": "Promise<T>"
3589
+ },
3590
+ {
3591
+ "name": "withTransaction",
3592
+ "async": true,
3593
+ "params": [
3594
+ "operation: Function"
3595
+ ],
3596
+ "returns": "Promise<T>"
3534
3597
  }
3535
3598
  ],
3536
3599
  "tableStrategy": "sti",
@@ -4093,6 +4156,7 @@
4093
4156
  ],
4094
4157
  "methods": [
4095
4158
  "_setLoadedRelationship",
4159
+ "claimRevision",
4096
4160
  "classifyConstraintError",
4097
4161
  "clearEmbeddings",
4098
4162
  "createForward",
@@ -4150,7 +4214,8 @@
4150
4214
  "toPlainObject",
4151
4215
  "toPublicJSON",
4152
4216
  "toggleFlagged",
4153
- "withDatabase"
4217
+ "withDatabase",
4218
+ "withTransaction"
4154
4219
  ],
4155
4220
  "methodSignatures": [
4156
4221
  {
@@ -4161,6 +4226,14 @@
4161
4226
  ],
4162
4227
  "returns": "void"
4163
4228
  },
4229
+ {
4230
+ "name": "claimRevision",
4231
+ "async": true,
4232
+ "params": [
4233
+ "expectedUpdatedAt: Date | string"
4234
+ ],
4235
+ "returns": "Promise"
4236
+ },
4164
4237
  {
4165
4238
  "name": "classifyConstraintError",
4166
4239
  "static": true,
@@ -4460,6 +4533,9 @@
4460
4533
  {
4461
4534
  "name": "save",
4462
4535
  "async": true,
4536
+ "params": [
4537
+ "options?: SmrtSaveOptions"
4538
+ ],
4463
4539
  "returns": "any"
4464
4540
  },
4465
4541
  {
@@ -4520,6 +4596,14 @@
4520
4596
  "operation: Function"
4521
4597
  ],
4522
4598
  "returns": "Promise<T>"
4599
+ },
4600
+ {
4601
+ "name": "withTransaction",
4602
+ "async": true,
4603
+ "params": [
4604
+ "operation: Function"
4605
+ ],
4606
+ "returns": "Promise<T>"
4523
4607
  }
4524
4608
  ],
4525
4609
  "tenant": {
@@ -5004,6 +5088,7 @@
5004
5088
  "methods": [
5005
5089
  "_setLoadedRelationship",
5006
5090
  "activate",
5091
+ "claimRevision",
5007
5092
  "classifyConstraintError",
5008
5093
  "clearEmbeddings",
5009
5094
  "createSender",
@@ -5052,7 +5137,8 @@
5052
5137
  "toJSON",
5053
5138
  "toPlainObject",
5054
5139
  "toPublicJSON",
5055
- "withDatabase"
5140
+ "withDatabase",
5141
+ "withTransaction"
5056
5142
  ],
5057
5143
  "methodSignatures": [
5058
5144
  {
@@ -5068,6 +5154,14 @@
5068
5154
  "async": true,
5069
5155
  "returns": "Promise<void>"
5070
5156
  },
5157
+ {
5158
+ "name": "claimRevision",
5159
+ "async": true,
5160
+ "params": [
5161
+ "expectedUpdatedAt: Date | string"
5162
+ ],
5163
+ "returns": "Promise"
5164
+ },
5071
5165
  {
5072
5166
  "name": "classifyConstraintError",
5073
5167
  "static": true,
@@ -5322,6 +5416,9 @@
5322
5416
  {
5323
5417
  "name": "save",
5324
5418
  "async": true,
5419
+ "params": [
5420
+ "options?: SmrtSaveOptions"
5421
+ ],
5325
5422
  "returns": "any"
5326
5423
  },
5327
5424
  {
@@ -5378,6 +5475,14 @@
5378
5475
  "operation: Function"
5379
5476
  ],
5380
5477
  "returns": "Promise<T>"
5478
+ },
5479
+ {
5480
+ "name": "withTransaction",
5481
+ "async": true,
5482
+ "params": [
5483
+ "operation: Function"
5484
+ ],
5485
+ "returns": "Promise<T>"
5381
5486
  }
5382
5487
  ],
5383
5488
  "tableStrategy": "sti",
@@ -5698,6 +5803,7 @@
5698
5803
  ],
5699
5804
  "methods": [
5700
5805
  "_setLoadedRelationship",
5806
+ "claimRevision",
5701
5807
  "classifyConstraintError",
5702
5808
  "clearEmbeddings",
5703
5809
  "createForward",
@@ -5759,7 +5865,8 @@
5759
5865
  "toPlainObject",
5760
5866
  "toPublicJSON",
5761
5867
  "toggleFlagged",
5762
- "withDatabase"
5868
+ "withDatabase",
5869
+ "withTransaction"
5763
5870
  ],
5764
5871
  "methodSignatures": [
5765
5872
  {
@@ -5770,6 +5877,14 @@
5770
5877
  ],
5771
5878
  "returns": "void"
5772
5879
  },
5880
+ {
5881
+ "name": "claimRevision",
5882
+ "async": true,
5883
+ "params": [
5884
+ "expectedUpdatedAt: Date | string"
5885
+ ],
5886
+ "returns": "Promise"
5887
+ },
5773
5888
  {
5774
5889
  "name": "classifyConstraintError",
5775
5890
  "static": true,
@@ -6085,6 +6200,9 @@
6085
6200
  {
6086
6201
  "name": "save",
6087
6202
  "async": true,
6203
+ "params": [
6204
+ "options?: SmrtSaveOptions"
6205
+ ],
6088
6206
  "returns": "any"
6089
6207
  },
6090
6208
  {
@@ -6145,6 +6263,14 @@
6145
6263
  "operation: Function"
6146
6264
  ],
6147
6265
  "returns": "Promise<T>"
6266
+ },
6267
+ {
6268
+ "name": "withTransaction",
6269
+ "async": true,
6270
+ "params": [
6271
+ "operation: Function"
6272
+ ],
6273
+ "returns": "Promise<T>"
6148
6274
  }
6149
6275
  ],
6150
6276
  "tableStrategy": "sti",
@@ -6304,6 +6430,7 @@
6304
6430
  "methods": [
6305
6431
  "_setLoadedRelationship",
6306
6432
  "activate",
6433
+ "claimRevision",
6307
6434
  "classifyConstraintError",
6308
6435
  "clearEmbeddings",
6309
6436
  "createSender",
@@ -6352,7 +6479,8 @@
6352
6479
  "toJSON",
6353
6480
  "toPlainObject",
6354
6481
  "toPublicJSON",
6355
- "withDatabase"
6482
+ "withDatabase",
6483
+ "withTransaction"
6356
6484
  ],
6357
6485
  "methodSignatures": [
6358
6486
  {
@@ -6368,6 +6496,14 @@
6368
6496
  "async": true,
6369
6497
  "returns": "Promise<void>"
6370
6498
  },
6499
+ {
6500
+ "name": "claimRevision",
6501
+ "async": true,
6502
+ "params": [
6503
+ "expectedUpdatedAt: Date | string"
6504
+ ],
6505
+ "returns": "Promise"
6506
+ },
6371
6507
  {
6372
6508
  "name": "classifyConstraintError",
6373
6509
  "static": true,
@@ -6622,6 +6758,9 @@
6622
6758
  {
6623
6759
  "name": "save",
6624
6760
  "async": true,
6761
+ "params": [
6762
+ "options?: SmrtSaveOptions"
6763
+ ],
6625
6764
  "returns": "any"
6626
6765
  },
6627
6766
  {
@@ -6678,6 +6817,14 @@
6678
6817
  "operation: Function"
6679
6818
  ],
6680
6819
  "returns": "Promise<T>"
6820
+ },
6821
+ {
6822
+ "name": "withTransaction",
6823
+ "async": true,
6824
+ "params": [
6825
+ "operation: Function"
6826
+ ],
6827
+ "returns": "Promise<T>"
6681
6828
  }
6682
6829
  ],
6683
6830
  "tableStrategy": "sti",
@@ -7008,6 +7155,7 @@
7008
7155
  ],
7009
7156
  "methods": [
7010
7157
  "_setLoadedRelationship",
7158
+ "claimRevision",
7011
7159
  "classifyConstraintError",
7012
7160
  "clearEmbeddings",
7013
7161
  "createForward",
@@ -7069,7 +7217,8 @@
7069
7217
  "toPlainObject",
7070
7218
  "toPublicJSON",
7071
7219
  "toggleFlagged",
7072
- "withDatabase"
7220
+ "withDatabase",
7221
+ "withTransaction"
7073
7222
  ],
7074
7223
  "methodSignatures": [
7075
7224
  {
@@ -7080,6 +7229,14 @@
7080
7229
  ],
7081
7230
  "returns": "void"
7082
7231
  },
7232
+ {
7233
+ "name": "claimRevision",
7234
+ "async": true,
7235
+ "params": [
7236
+ "expectedUpdatedAt: Date | string"
7237
+ ],
7238
+ "returns": "Promise"
7239
+ },
7083
7240
  {
7084
7241
  "name": "classifyConstraintError",
7085
7242
  "static": true,
@@ -7395,6 +7552,9 @@
7395
7552
  {
7396
7553
  "name": "save",
7397
7554
  "async": true,
7555
+ "params": [
7556
+ "options?: SmrtSaveOptions"
7557
+ ],
7398
7558
  "returns": "any"
7399
7559
  },
7400
7560
  {
@@ -7455,6 +7615,14 @@
7455
7615
  "operation: Function"
7456
7616
  ],
7457
7617
  "returns": "Promise<T>"
7618
+ },
7619
+ {
7620
+ "name": "withTransaction",
7621
+ "async": true,
7622
+ "params": [
7623
+ "operation: Function"
7624
+ ],
7625
+ "returns": "Promise<T>"
7458
7626
  }
7459
7627
  ],
7460
7628
  "tableStrategy": "sti",
@@ -7626,6 +7794,7 @@
7626
7794
  "methods": [
7627
7795
  "_setLoadedRelationship",
7628
7796
  "activate",
7797
+ "claimRevision",
7629
7798
  "classifyConstraintError",
7630
7799
  "clearEmbeddings",
7631
7800
  "createSender",
@@ -7674,7 +7843,8 @@
7674
7843
  "toJSON",
7675
7844
  "toPlainObject",
7676
7845
  "toPublicJSON",
7677
- "withDatabase"
7846
+ "withDatabase",
7847
+ "withTransaction"
7678
7848
  ],
7679
7849
  "methodSignatures": [
7680
7850
  {
@@ -7690,6 +7860,14 @@
7690
7860
  "async": true,
7691
7861
  "returns": "Promise<void>"
7692
7862
  },
7863
+ {
7864
+ "name": "claimRevision",
7865
+ "async": true,
7866
+ "params": [
7867
+ "expectedUpdatedAt: Date | string"
7868
+ ],
7869
+ "returns": "Promise"
7870
+ },
7693
7871
  {
7694
7872
  "name": "classifyConstraintError",
7695
7873
  "static": true,
@@ -7944,6 +8122,9 @@
7944
8122
  {
7945
8123
  "name": "save",
7946
8124
  "async": true,
8125
+ "params": [
8126
+ "options?: SmrtSaveOptions"
8127
+ ],
7947
8128
  "returns": "any"
7948
8129
  },
7949
8130
  {
@@ -8000,6 +8181,14 @@
8000
8181
  "operation: Function"
8001
8182
  ],
8002
8183
  "returns": "Promise<T>"
8184
+ },
8185
+ {
8186
+ "name": "withTransaction",
8187
+ "async": true,
8188
+ "params": [
8189
+ "operation: Function"
8190
+ ],
8191
+ "returns": "Promise<T>"
8003
8192
  }
8004
8193
  ],
8005
8194
  "tableStrategy": "sti",
@@ -8274,6 +8463,7 @@
8274
8463
  "methods": [
8275
8464
  "_setLoadedRelationship",
8276
8465
  "activate",
8466
+ "claimRevision",
8277
8467
  "classifyConstraintError",
8278
8468
  "clearEmbeddings",
8279
8469
  "createSender",
@@ -8322,7 +8512,8 @@
8322
8512
  "toJSON",
8323
8513
  "toPlainObject",
8324
8514
  "toPublicJSON",
8325
- "withDatabase"
8515
+ "withDatabase",
8516
+ "withTransaction"
8326
8517
  ],
8327
8518
  "methodSignatures": [
8328
8519
  {
@@ -8338,6 +8529,14 @@
8338
8529
  "async": true,
8339
8530
  "returns": "Promise<void>"
8340
8531
  },
8532
+ {
8533
+ "name": "claimRevision",
8534
+ "async": true,
8535
+ "params": [
8536
+ "expectedUpdatedAt: Date | string"
8537
+ ],
8538
+ "returns": "Promise"
8539
+ },
8341
8540
  {
8342
8541
  "name": "classifyConstraintError",
8343
8542
  "static": true,
@@ -8592,6 +8791,9 @@
8592
8791
  {
8593
8792
  "name": "save",
8594
8793
  "async": true,
8794
+ "params": [
8795
+ "options?: SmrtSaveOptions"
8796
+ ],
8595
8797
  "returns": "any"
8596
8798
  },
8597
8799
  {
@@ -8648,6 +8850,14 @@
8648
8850
  "operation: Function"
8649
8851
  ],
8650
8852
  "returns": "Promise<T>"
8853
+ },
8854
+ {
8855
+ "name": "withTransaction",
8856
+ "async": true,
8857
+ "params": [
8858
+ "operation: Function"
8859
+ ],
8860
+ "returns": "Promise<T>"
8651
8861
  }
8652
8862
  ],
8653
8863
  "tableStrategy": "sti",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-messages",
3
- "version": "0.43.8",
3
+ "version": "0.43.10",
4
4
  "description": "Unified multi-channel messaging with STI-based hierarchies",
5
5
  "type": "module",
6
6
  "smrtRawPrimitives": "strict",
@@ -56,18 +56,18 @@
56
56
  "./dist/svelte/index.js"
57
57
  ],
58
58
  "dependencies": {
59
- "@happyvertical/email": "^0.88.1",
60
- "@happyvertical/files": "^0.88.1",
61
- "@happyvertical/logger": "^0.88.1",
62
- "@happyvertical/messages": "^0.88.1",
63
- "@happyvertical/sql": "^0.88.1",
64
- "@happyvertical/utils": "^0.88.1",
65
- "@happyvertical/smrt-types": "0.43.8",
66
- "@happyvertical/smrt-secrets": "0.43.8",
67
- "@happyvertical/smrt-core": "0.43.8",
68
- "@happyvertical/smrt-tenancy": "0.43.8",
69
- "@happyvertical/smrt-ui": "0.43.8",
70
- "@happyvertical/smrt-users": "0.43.8"
59
+ "@happyvertical/email": "^0.89.4",
60
+ "@happyvertical/files": "^0.89.4",
61
+ "@happyvertical/logger": "^0.89.4",
62
+ "@happyvertical/messages": "^0.89.4",
63
+ "@happyvertical/sql": "^0.89.4",
64
+ "@happyvertical/utils": "^0.89.4",
65
+ "@happyvertical/smrt-core": "0.43.10",
66
+ "@happyvertical/smrt-types": "0.43.10",
67
+ "@happyvertical/smrt-secrets": "0.43.10",
68
+ "@happyvertical/smrt-tenancy": "0.43.10",
69
+ "@happyvertical/smrt-users": "0.43.10",
70
+ "@happyvertical/smrt-ui": "0.43.10"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "@happyvertical/encryption": "*",
@@ -90,7 +90,7 @@
90
90
  "typescript": "5.9.3",
91
91
  "vite": "8.1.4",
92
92
  "vitest": "4.1.10",
93
- "@happyvertical/smrt-vitest": "0.43.8"
93
+ "@happyvertical/smrt-vitest": "0.43.10"
94
94
  },
95
95
  "keywords": [
96
96
  "email",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Message-CORy3jwy.js","names":[],"sources":["../../src/models/Message.ts"],"sourcesContent":["/**\n * Message model - Base class for all message types (STI)\n *\n * Common fields shared across email, tweets, slack messages, etc.\n */\n\nimport {\n crossPackageRef,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type {\n MessageOptions,\n MessageSendResult,\n SendMessageOptions,\n SendStatus,\n} from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: { include: ['list', 'get'] },\n mcp: { include: ['list', 'get'] },\n cli: true,\n})\nexport class Message extends SmrtObject {\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @foreignKey('Account')\n accountId = '';\n @crossPackageRef('@happyvertical/smrt-personas:AgentPersona', {\n nullable: true,\n })\n personaId: string | null = null;\n @foreignKey('MessagingEndpoint')\n endpointId: string | null = null;\n correlationId = '';\n threadId = '';\n subject = '';\n body = ''; // Normalized plain text\n fromAddress = '';\n fromName = '';\n toAddresses = ''; // JSON array of {address, name}\n date: Date | null = null;\n isRead = false;\n isFlagged = false;\n hasAttachments = false;\n size = 0;\n metadata = ''; // JSON extension bag\n\n // Send lifecycle fields\n sendStatus: SendStatus = 'draft';\n sentAt: Date | null = null;\n sendError = '';\n retryCount = 0;\n maxRetries = 3;\n scheduledSendAt: Date | null = null;\n @foreignKey('Message')\n inReplyToMessageId = '';\n\n // Timestamps\n createdAt = new Date();\n updatedAt = new Date();\n\n constructor(options: MessageOptions = {}) {\n super(options);\n\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n if (options.accountId !== undefined) this.accountId = options.accountId;\n if (options.personaId !== undefined) this.personaId = options.personaId;\n if (options.endpointId !== undefined) this.endpointId = options.endpointId;\n if (options.correlationId !== undefined)\n this.correlationId = options.correlationId;\n if (options.threadId !== undefined) this.threadId = options.threadId;\n if (options.subject !== undefined) this.subject = options.subject;\n if (options.body !== undefined) this.body = options.body;\n if (options.fromAddress !== undefined)\n this.fromAddress = options.fromAddress;\n if (options.fromName !== undefined) this.fromName = options.fromName;\n if (options.toAddresses !== undefined)\n this.toAddresses = options.toAddresses;\n if (options.date !== undefined) this.date = options.date || null;\n if (options.isRead !== undefined) this.isRead = options.isRead;\n if (options.isFlagged !== undefined) this.isFlagged = options.isFlagged;\n if (options.hasAttachments !== undefined)\n this.hasAttachments = options.hasAttachments;\n if (options.size !== undefined) this.size = options.size;\n if (options.metadata !== undefined) this.metadata = options.metadata;\n if (options.sendStatus !== undefined) this.sendStatus = options.sendStatus;\n if (options.sentAt !== undefined) this.sentAt = options.sentAt || null;\n if (options.sendError !== undefined) this.sendError = options.sendError;\n if (options.retryCount !== undefined) this.retryCount = options.retryCount;\n if (options.maxRetries !== undefined) this.maxRetries = options.maxRetries;\n if (options.scheduledSendAt !== undefined)\n this.scheduledSendAt = options.scheduledSendAt || null;\n if (options.inReplyToMessageId !== undefined)\n this.inReplyToMessageId = options.inReplyToMessageId;\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n }\n\n /**\n * Get to addresses as parsed array\n */\n getToAddresses(): Array<{ address: string; name?: string }> {\n if (!this.toAddresses) return [];\n try {\n return JSON.parse(this.toAddresses);\n } catch {\n return [];\n }\n }\n\n /**\n * Set to addresses from array\n */\n setToAddresses(addresses: Array<{ address: string; name?: string }>): void {\n this.toAddresses = JSON.stringify(addresses);\n }\n\n /**\n * Get metadata as parsed object\n */\n getMetadata(): Record<string, unknown> {\n if (!this.metadata) return {};\n try {\n return JSON.parse(this.metadata);\n } catch {\n return {};\n }\n }\n\n /**\n * Set metadata from object\n */\n setMetadata(data: Record<string, unknown>): void {\n this.metadata = JSON.stringify(data);\n }\n\n /**\n * Mark message as read\n */\n async markRead(): Promise<void> {\n this.isRead = true;\n this.updatedAt = new Date();\n await this.save();\n }\n\n /**\n * Mark message as unread\n */\n async markUnread(): Promise<void> {\n this.isRead = false;\n this.updatedAt = new Date();\n await this.save();\n }\n\n /**\n * Toggle flagged status\n */\n async toggleFlagged(): Promise<void> {\n this.isFlagged = !this.isFlagged;\n this.updatedAt = new Date();\n await this.save();\n }\n\n /**\n * Check if message is unread\n */\n isUnread(): boolean {\n return !this.isRead;\n }\n\n /**\n * Get a short preview of the message body\n */\n getPreview(maxLength = 200): string {\n const text = this.body || '';\n if (text.length <= maxLength) return text;\n return `${text.slice(0, maxLength)}...`;\n }\n\n /**\n * Get the account for this message\n */\n async getAccount() {\n if (!this.accountId) return null;\n\n const { AccountCollection } = await import(\n '../collections/AccountCollection'\n );\n const collection = await AccountCollection.create(this.options);\n\n return await collection.get({ id: this.accountId });\n }\n\n async getEndpoint() {\n if (!this.endpointId) return null;\n const { MessagingEndpointCollection } = await import(\n '../collections/MessagingEndpointCollection.js'\n );\n const collection = await MessagingEndpointCollection.create(this.options);\n return collection.get({ id: this.endpointId });\n }\n\n /**\n * Get messages in the same thread\n */\n async getThreadMessages(): Promise<Message[]> {\n if (!this.threadId) return [this];\n\n const { MessageCollection } = await import(\n '../collections/MessageCollection'\n );\n const collection = await MessageCollection.create(this.options);\n\n return await collection.list({ where: { threadId: this.threadId } });\n }\n\n /**\n * Get attachments for this message\n */\n async getAttachments() {\n const { AttachmentCollection } = await import(\n '../collections/AttachmentCollection'\n );\n const collection = await AttachmentCollection.create(this.options);\n\n return await collection.list({ where: { messageId: this.id } });\n }\n\n // ─────────────────────────────────────────────────────────────────────────\n // Send Lifecycle\n // ─────────────────────────────────────────────────────────────────────────\n\n /**\n * Send this message via its account's sender\n */\n async send(options?: SendMessageOptions): Promise<MessageSendResult> {\n // Entry guard: a message that is already in flight or delivered must not be\n // sent again. Catches same-instance double-clicks before any work happens.\n if (this.sendStatus === 'sending' || this.sendStatus === 'sent') {\n return {\n success: false,\n error: `Cannot send: message is already '${this.sendStatus}'`,\n sentAt: new Date(),\n };\n }\n\n // Resolve account\n const account = await this.getAccount();\n if (!account) {\n const result: MessageSendResult = {\n success: false,\n error: 'No account associated with this message',\n sentAt: new Date(),\n };\n this.sendStatus = 'failed';\n this.sendError = result.error ?? '';\n this.updatedAt = new Date();\n await this.save();\n return result;\n }\n\n if (!account.isActive) {\n const result: MessageSendResult = {\n success: false,\n error: 'Messaging account is inactive',\n sentAt: new Date(),\n };\n this.sendStatus = 'failed';\n this.sendError = result.error ?? '';\n this.updatedAt = new Date();\n await this.save();\n return result;\n }\n\n // Get sender from account\n let sender: Awaited<ReturnType<typeof account.createSender>>;\n try {\n sender = await account.createSender();\n } catch (error) {\n const errorMessage =\n error instanceof Error ? error.message : String(error);\n this.sendStatus = 'failed';\n this.sendError = errorMessage;\n this.updatedAt = new Date();\n await this.save();\n return {\n success: false,\n error: errorMessage,\n sentAt: new Date(),\n };\n }\n\n // Claim the send. For a persisted row, do a compare-and-set so only one\n // concurrent sender wins: flip send_status to 'sending' atomically, gated on\n // the status we observed. If no row matched, another sender already claimed\n // it — abort without delivering (prevents duplicate sends). For an unsaved\n // draft there is no row yet, so the in-memory transition + save() (INSERT)\n // serves as the claim.\n const claimFromStatus = this.sendStatus;\n if (this.isPersisted && this.id) {\n const claim = await this.db.update(\n this.tableName,\n { id: this.id, send_status: claimFromStatus },\n { send_status: 'sending', updated_at: new Date() },\n );\n if (!claim || claim.affected < 1) {\n return {\n success: false,\n error: 'Cannot send: message is already being sent',\n sentAt: new Date(),\n };\n }\n this.sendStatus = 'sending';\n this.updatedAt = new Date();\n } else {\n this.sendStatus = 'sending';\n this.updatedAt = new Date();\n await this.save();\n }\n\n try {\n const result = await sender.send(this, options);\n\n if (result.success) {\n this.sendStatus = 'sent';\n this.sentAt = result.sentAt;\n this.sendError = '';\n } else {\n this.sendStatus = 'failed';\n this.sendError = result.error ?? 'Send failed';\n }\n\n this.updatedAt = new Date();\n await this.save();\n return result;\n } catch (error) {\n const errorMessage =\n error instanceof Error ? error.message : String(error);\n this.sendStatus = 'failed';\n this.sendError = errorMessage;\n this.updatedAt = new Date();\n await this.save();\n\n return {\n success: false,\n error: errorMessage,\n sentAt: new Date(),\n };\n }\n }\n\n /**\n * Retry sending a failed message\n */\n async retrySend(options?: SendMessageOptions): Promise<MessageSendResult> {\n if (this.sendStatus !== 'failed') {\n return {\n success: false,\n error: `Cannot retry: message status is '${this.sendStatus}', expected 'failed'`,\n sentAt: new Date(),\n };\n }\n\n if (this.retryCount >= this.maxRetries) {\n return {\n success: false,\n error: `Retry budget exhausted (${this.retryCount}/${this.maxRetries})`,\n sentAt: new Date(),\n };\n }\n\n this.retryCount++;\n this.updatedAt = new Date();\n await this.save();\n\n return this.send(options);\n }\n\n /**\n * Options for a derived draft (reply/forward) built from this message. Carries\n * the DB connection + tenant context from `this.options`, but strips this\n * message's own identity fields. When this message was hydrated from the DB,\n * `this.options` holds the row's `id`/`slug`/`context`/`_skipLoad`; spreading\n * those into a new draft would make `draft.save()` upsert onto the natural-key\n * conflict columns (`slug`/`context`/`_meta_type`) and overwrite the ORIGINAL\n * message instead of inserting a new row. See EmailAccount.childOptions().\n */\n protected draftOptions(): Record<string, unknown> {\n const rest = { ...(this.options as Record<string, unknown>) };\n delete rest.id;\n delete rest.slug;\n delete rest.context;\n delete rest._skipLoad;\n return rest;\n }\n\n /**\n * Create a reply to this message (returns unsaved draft)\n */\n createReply(_options?: { replyAll?: boolean }): Message {\n const reply = new (this.constructor as typeof Message)({\n ...this.draftOptions(),\n id: undefined,\n accountId: this.accountId,\n threadId: this.threadId || this.id || '',\n subject: this.subject.startsWith('Re:')\n ? this.subject\n : `Re: ${this.subject}`,\n toAddresses: JSON.stringify([\n { address: this.fromAddress, name: this.fromName },\n ]),\n fromAddress: '',\n fromName: '',\n body: this.buildQuotedBody(),\n inReplyToMessageId: this.id || '',\n sendStatus: 'draft',\n isRead: true,\n date: null,\n createdAt: undefined,\n updatedAt: undefined,\n });\n\n return reply;\n }\n\n /**\n * Create a forward of this message (returns unsaved draft)\n */\n createForward(): Message {\n const forward = new (this.constructor as typeof Message)({\n ...this.draftOptions(),\n id: undefined,\n accountId: this.accountId,\n threadId: '',\n subject: this.subject.startsWith('Fwd:')\n ? this.subject\n : `Fwd: ${this.subject}`,\n toAddresses: '[]',\n fromAddress: '',\n fromName: '',\n body: this.buildQuotedBody(),\n hasAttachments: this.hasAttachments,\n inReplyToMessageId: '',\n sendStatus: 'draft',\n isRead: true,\n date: null,\n createdAt: undefined,\n updatedAt: undefined,\n });\n\n return forward;\n }\n\n /**\n * Build quoted body for reply/forward\n */\n protected buildQuotedBody(): string {\n const dateStr = this.date ? this.date.toLocaleString() : 'unknown date';\n const from = this.fromName\n ? `${this.fromName} <${this.fromAddress}>`\n : this.fromAddress;\n\n const quotedLines = (this.body || '')\n .split('\\n')\n .map((line) => `> ${line}`)\n .join('\\n');\n\n return `\\n\\nOn ${dateStr}, ${from} wrote:\\n${quotedLines}`;\n }\n}\n"],"mappings":";;;;;;;;;;;AA2BO,IAAM,UAAN,cAAsB,WAAW;CAEtC,WAA0B;CAG1B,YAAY;CAIZ,YAA2B;CAE3B,aAA4B;CAC5B,gBAAgB;CAChB,WAAW;CACX,UAAU;CACV,OAAO;CACP,cAAc;CACd,WAAW;CACX,cAAc;CACd,OAAoB;CACpB,SAAS;CACT,YAAY;CACZ,iBAAiB;CACjB,OAAO;CACP,WAAW;CAGX,aAAyB;CACzB,SAAsB;CACtB,YAAY;CACZ,aAAa;CACb,aAAa;CACb,kBAA+B;CAE/B,qBAAqB;CAGrB,4BAAY,IAAI,KAAK;CACrB,4BAAY,IAAI,KAAK;CAErB,YAAY,UAA0B,CAAC,GAAG;EACxC,MAAM,OAAO;EAEb,IAAI,QAAQ,aAAa,KAAA,GAAW,KAAK,WAAW,QA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