@adaptic/backend-legacy 0.0.959 → 0.0.961

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/ABTest.cjs +180 -66
  2. package/Account.cjs +180 -66
  3. package/AccountDecisionRecord.cjs +180 -66
  4. package/AccountLinkingRequest.cjs +180 -66
  5. package/Action.cjs +180 -66
  6. package/Alert.cjs +180 -66
  7. package/Allocation.cjs +180 -66
  8. package/AlpacaAccount.cjs +180 -66
  9. package/AnalyticsConfiguration.cjs +180 -66
  10. package/AnalyticsSnapshot.cjs +180 -66
  11. package/Asset.cjs +180 -66
  12. package/AuditLog.cjs +180 -66
  13. package/Authenticator.cjs +180 -66
  14. package/Configuration.cjs +180 -66
  15. package/ConflictEvent.cjs +180 -66
  16. package/ConnectionHealthSnapshot.cjs +180 -66
  17. package/Customer.cjs +180 -66
  18. package/DeadLetterMessage.cjs +180 -66
  19. package/DecisionMemorySummary.cjs +180 -66
  20. package/EconomicEvent.cjs +180 -66
  21. package/EquityBar.cjs +180 -66
  22. package/Event.cjs +180 -66
  23. package/EventSnapshot.cjs +180 -66
  24. package/FeatureImportanceAnalysis.cjs +180 -66
  25. package/InstitutionalFlowSignal.cjs +180 -66
  26. package/InstitutionalHolding.cjs +180 -66
  27. package/InstitutionalSentimentAlerts.cjs +180 -66
  28. package/InstitutionalSentimentErrors.cjs +180 -66
  29. package/InstitutionalSentimentHistory.cjs +180 -66
  30. package/InstitutionalSentimentMetrics.cjs +180 -66
  31. package/InviteToken.cjs +180 -66
  32. package/LinkedProvider.cjs +180 -66
  33. package/LlmConfiguration.cjs +180 -66
  34. package/MLModelVersion.cjs +180 -66
  35. package/MLTrainingData.cjs +180 -66
  36. package/MarketSentiment.cjs +180 -66
  37. package/ModelArtifact.cjs +180 -66
  38. package/ModelVersion.cjs +180 -66
  39. package/ModelVersionArtifact.cjs +180 -66
  40. package/NewsArticle.cjs +180 -66
  41. package/NewsArticleAssetSentiment.cjs +180 -66
  42. package/OptionsContract.cjs +180 -66
  43. package/OptionsGreeksHistory.cjs +180 -66
  44. package/OptionsPosition.cjs +180 -66
  45. package/OptionsPositionEvent.cjs +180 -66
  46. package/OptionsTradeExecution.cjs +180 -66
  47. package/PolicyOverlay.cjs +180 -66
  48. package/PortfolioGreeksHistory.cjs +180 -66
  49. package/ScheduledOptionOrder.cjs +180 -66
  50. package/Session.cjs +180 -66
  51. package/SignalGeneratorMetrics.cjs +180 -66
  52. package/SignalLineage.cjs +180 -66
  53. package/SignalOutcome.cjs +180 -66
  54. package/SignalPriorityQueue.cjs +180 -66
  55. package/SyncEvent.cjs +180 -66
  56. package/SystemAlert.cjs +180 -66
  57. package/Trade.cjs +180 -66
  58. package/TradeAuditEvent.cjs +180 -66
  59. package/TradeExecutionHistory.cjs +180 -66
  60. package/TradeOutcome.cjs +180 -66
  61. package/TradingPolicy.cjs +180 -66
  62. package/User.cjs +180 -66
  63. package/VerificationToken.cjs +180 -66
  64. package/WaitlistEntry.cjs +180 -66
  65. package/esm/ABTest.d.ts.map +1 -1
  66. package/esm/ABTest.js.map +1 -1
  67. package/esm/ABTest.mjs +180 -66
  68. package/esm/Account.d.ts.map +1 -1
  69. package/esm/Account.js.map +1 -1
  70. package/esm/Account.mjs +180 -66
  71. package/esm/AccountDecisionRecord.d.ts.map +1 -1
  72. package/esm/AccountDecisionRecord.js.map +1 -1
  73. package/esm/AccountDecisionRecord.mjs +180 -66
  74. package/esm/AccountLinkingRequest.d.ts.map +1 -1
  75. package/esm/AccountLinkingRequest.js.map +1 -1
  76. package/esm/AccountLinkingRequest.mjs +180 -66
  77. package/esm/Action.d.ts.map +1 -1
  78. package/esm/Action.js.map +1 -1
  79. package/esm/Action.mjs +180 -66
  80. package/esm/Alert.d.ts.map +1 -1
  81. package/esm/Alert.js.map +1 -1
  82. package/esm/Alert.mjs +180 -66
  83. package/esm/Allocation.d.ts.map +1 -1
  84. package/esm/Allocation.js.map +1 -1
  85. package/esm/Allocation.mjs +180 -66
  86. package/esm/AlpacaAccount.d.ts.map +1 -1
  87. package/esm/AlpacaAccount.js.map +1 -1
  88. package/esm/AlpacaAccount.mjs +180 -66
  89. package/esm/AnalyticsConfiguration.d.ts.map +1 -1
  90. package/esm/AnalyticsConfiguration.js.map +1 -1
  91. package/esm/AnalyticsConfiguration.mjs +180 -66
  92. package/esm/AnalyticsSnapshot.d.ts.map +1 -1
  93. package/esm/AnalyticsSnapshot.js.map +1 -1
  94. package/esm/AnalyticsSnapshot.mjs +180 -66
  95. package/esm/Asset.d.ts.map +1 -1
  96. package/esm/Asset.js.map +1 -1
  97. package/esm/Asset.mjs +180 -66
  98. package/esm/AuditLog.d.ts.map +1 -1
  99. package/esm/AuditLog.js.map +1 -1
  100. package/esm/AuditLog.mjs +180 -66
  101. package/esm/Authenticator.d.ts.map +1 -1
  102. package/esm/Authenticator.js.map +1 -1
  103. package/esm/Authenticator.mjs +180 -66
  104. package/esm/Configuration.d.ts.map +1 -1
  105. package/esm/Configuration.js.map +1 -1
  106. package/esm/Configuration.mjs +180 -66
  107. package/esm/ConflictEvent.d.ts.map +1 -1
  108. package/esm/ConflictEvent.js.map +1 -1
  109. package/esm/ConflictEvent.mjs +180 -66
  110. package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
  111. package/esm/ConnectionHealthSnapshot.js.map +1 -1
  112. package/esm/ConnectionHealthSnapshot.mjs +180 -66
  113. package/esm/Customer.d.ts.map +1 -1
  114. package/esm/Customer.js.map +1 -1
  115. package/esm/Customer.mjs +180 -66
  116. package/esm/DeadLetterMessage.d.ts.map +1 -1
  117. package/esm/DeadLetterMessage.js.map +1 -1
  118. package/esm/DeadLetterMessage.mjs +180 -66
  119. package/esm/DecisionMemorySummary.d.ts.map +1 -1
  120. package/esm/DecisionMemorySummary.js.map +1 -1
  121. package/esm/DecisionMemorySummary.mjs +180 -66
  122. package/esm/EconomicEvent.d.ts.map +1 -1
  123. package/esm/EconomicEvent.js.map +1 -1
  124. package/esm/EconomicEvent.mjs +180 -66
  125. package/esm/EquityBar.d.ts.map +1 -1
  126. package/esm/EquityBar.js.map +1 -1
  127. package/esm/EquityBar.mjs +180 -66
  128. package/esm/Event.d.ts.map +1 -1
  129. package/esm/Event.js.map +1 -1
  130. package/esm/Event.mjs +180 -66
  131. package/esm/EventSnapshot.d.ts.map +1 -1
  132. package/esm/EventSnapshot.js.map +1 -1
  133. package/esm/EventSnapshot.mjs +180 -66
  134. package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
  135. package/esm/FeatureImportanceAnalysis.js.map +1 -1
  136. package/esm/FeatureImportanceAnalysis.mjs +180 -66
  137. package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
  138. package/esm/InstitutionalFlowSignal.js.map +1 -1
  139. package/esm/InstitutionalFlowSignal.mjs +180 -66
  140. package/esm/InstitutionalHolding.d.ts.map +1 -1
  141. package/esm/InstitutionalHolding.js.map +1 -1
  142. package/esm/InstitutionalHolding.mjs +180 -66
  143. package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
  144. package/esm/InstitutionalSentimentAlerts.js.map +1 -1
  145. package/esm/InstitutionalSentimentAlerts.mjs +180 -66
  146. package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
  147. package/esm/InstitutionalSentimentErrors.js.map +1 -1
  148. package/esm/InstitutionalSentimentErrors.mjs +180 -66
  149. package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
  150. package/esm/InstitutionalSentimentHistory.js.map +1 -1
  151. package/esm/InstitutionalSentimentHistory.mjs +180 -66
  152. package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
  153. package/esm/InstitutionalSentimentMetrics.js.map +1 -1
  154. package/esm/InstitutionalSentimentMetrics.mjs +180 -66
  155. package/esm/InviteToken.d.ts.map +1 -1
  156. package/esm/InviteToken.js.map +1 -1
  157. package/esm/InviteToken.mjs +180 -66
  158. package/esm/LinkedProvider.d.ts.map +1 -1
  159. package/esm/LinkedProvider.js.map +1 -1
  160. package/esm/LinkedProvider.mjs +180 -66
  161. package/esm/LlmConfiguration.d.ts.map +1 -1
  162. package/esm/LlmConfiguration.js.map +1 -1
  163. package/esm/LlmConfiguration.mjs +180 -66
  164. package/esm/MLModelVersion.d.ts.map +1 -1
  165. package/esm/MLModelVersion.js.map +1 -1
  166. package/esm/MLModelVersion.mjs +180 -66
  167. package/esm/MLTrainingData.d.ts.map +1 -1
  168. package/esm/MLTrainingData.js.map +1 -1
  169. package/esm/MLTrainingData.mjs +180 -66
  170. package/esm/MarketSentiment.d.ts.map +1 -1
  171. package/esm/MarketSentiment.js.map +1 -1
  172. package/esm/MarketSentiment.mjs +180 -66
  173. package/esm/ModelArtifact.d.ts.map +1 -1
  174. package/esm/ModelArtifact.js.map +1 -1
  175. package/esm/ModelArtifact.mjs +180 -66
  176. package/esm/ModelVersion.d.ts.map +1 -1
  177. package/esm/ModelVersion.js.map +1 -1
  178. package/esm/ModelVersion.mjs +180 -66
  179. package/esm/ModelVersionArtifact.d.ts.map +1 -1
  180. package/esm/ModelVersionArtifact.js.map +1 -1
  181. package/esm/ModelVersionArtifact.mjs +180 -66
  182. package/esm/NewsArticle.d.ts.map +1 -1
  183. package/esm/NewsArticle.js.map +1 -1
  184. package/esm/NewsArticle.mjs +180 -66
  185. package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
  186. package/esm/NewsArticleAssetSentiment.js.map +1 -1
  187. package/esm/NewsArticleAssetSentiment.mjs +180 -66
  188. package/esm/OptionsContract.d.ts.map +1 -1
  189. package/esm/OptionsContract.js.map +1 -1
  190. package/esm/OptionsContract.mjs +180 -66
  191. package/esm/OptionsGreeksHistory.d.ts.map +1 -1
  192. package/esm/OptionsGreeksHistory.js.map +1 -1
  193. package/esm/OptionsGreeksHistory.mjs +180 -66
  194. package/esm/OptionsPosition.d.ts.map +1 -1
  195. package/esm/OptionsPosition.js.map +1 -1
  196. package/esm/OptionsPosition.mjs +180 -66
  197. package/esm/OptionsPositionEvent.d.ts.map +1 -1
  198. package/esm/OptionsPositionEvent.js.map +1 -1
  199. package/esm/OptionsPositionEvent.mjs +180 -66
  200. package/esm/OptionsTradeExecution.d.ts.map +1 -1
  201. package/esm/OptionsTradeExecution.js.map +1 -1
  202. package/esm/OptionsTradeExecution.mjs +180 -66
  203. package/esm/PolicyOverlay.d.ts.map +1 -1
  204. package/esm/PolicyOverlay.js.map +1 -1
  205. package/esm/PolicyOverlay.mjs +180 -66
  206. package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
  207. package/esm/PortfolioGreeksHistory.js.map +1 -1
  208. package/esm/PortfolioGreeksHistory.mjs +180 -66
  209. package/esm/ScheduledOptionOrder.d.ts.map +1 -1
  210. package/esm/ScheduledOptionOrder.js.map +1 -1
  211. package/esm/ScheduledOptionOrder.mjs +180 -66
  212. package/esm/Session.d.ts.map +1 -1
  213. package/esm/Session.js.map +1 -1
  214. package/esm/Session.mjs +180 -66
  215. package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
  216. package/esm/SignalGeneratorMetrics.js.map +1 -1
  217. package/esm/SignalGeneratorMetrics.mjs +180 -66
  218. package/esm/SignalLineage.d.ts.map +1 -1
  219. package/esm/SignalLineage.js.map +1 -1
  220. package/esm/SignalLineage.mjs +180 -66
  221. package/esm/SignalOutcome.d.ts.map +1 -1
  222. package/esm/SignalOutcome.js.map +1 -1
  223. package/esm/SignalOutcome.mjs +180 -66
  224. package/esm/SignalPriorityQueue.d.ts.map +1 -1
  225. package/esm/SignalPriorityQueue.js.map +1 -1
  226. package/esm/SignalPriorityQueue.mjs +180 -66
  227. package/esm/SyncEvent.d.ts.map +1 -1
  228. package/esm/SyncEvent.js.map +1 -1
  229. package/esm/SyncEvent.mjs +180 -66
  230. package/esm/SystemAlert.d.ts.map +1 -1
  231. package/esm/SystemAlert.js.map +1 -1
  232. package/esm/SystemAlert.mjs +180 -66
  233. package/esm/Trade.d.ts.map +1 -1
  234. package/esm/Trade.js.map +1 -1
  235. package/esm/Trade.mjs +180 -66
  236. package/esm/TradeAuditEvent.d.ts.map +1 -1
  237. package/esm/TradeAuditEvent.js.map +1 -1
  238. package/esm/TradeAuditEvent.mjs +180 -66
  239. package/esm/TradeExecutionHistory.d.ts.map +1 -1
  240. package/esm/TradeExecutionHistory.js.map +1 -1
  241. package/esm/TradeExecutionHistory.mjs +180 -66
  242. package/esm/TradeOutcome.d.ts.map +1 -1
  243. package/esm/TradeOutcome.js.map +1 -1
  244. package/esm/TradeOutcome.mjs +180 -66
  245. package/esm/TradingPolicy.d.ts.map +1 -1
  246. package/esm/TradingPolicy.js.map +1 -1
  247. package/esm/TradingPolicy.mjs +180 -66
  248. package/esm/User.d.ts.map +1 -1
  249. package/esm/User.js.map +1 -1
  250. package/esm/User.mjs +180 -66
  251. package/esm/VerificationToken.d.ts.map +1 -1
  252. package/esm/VerificationToken.js.map +1 -1
  253. package/esm/VerificationToken.mjs +180 -66
  254. package/esm/WaitlistEntry.d.ts.map +1 -1
  255. package/esm/WaitlistEntry.js.map +1 -1
  256. package/esm/WaitlistEntry.mjs +180 -66
  257. package/esm/index.d.ts.map +1 -1
  258. package/package.json +1 -1
package/Action.cjs CHANGED
@@ -202,13 +202,28 @@ exports.Action = {
202
202
  await new Promise(resolve => setTimeout(resolve, delay));
203
203
  continue;
204
204
  }
205
- // Log structured error details and rethrow
206
- logger_1.logger.error("Database create operation failed", {
207
- operation: 'createOneAction',
208
- model: 'Action',
209
- error: String(error),
210
- isRetryable: isConnectionError,
211
- });
205
+ // Log structured error details and rethrow.
206
+ // Demote transient failures to WARN with explicit transient+recoveryHint
207
+ // metadata so log analytics can distinguish recoverable upstream retries
208
+ // from true defects.
209
+ if (isConnectionError) {
210
+ logger_1.logger.warn("Database create operation failed (transient after retries)", {
211
+ operation: 'createOneAction',
212
+ model: 'Action',
213
+ error: String(error),
214
+ isRetryable: true,
215
+ transient: true,
216
+ recoveryHint: "Upstream caller should retry on next cycle",
217
+ });
218
+ }
219
+ else {
220
+ logger_1.logger.error("Database create operation failed", {
221
+ operation: 'createOneAction',
222
+ model: 'Action',
223
+ error: String(error),
224
+ isRetryable: false,
225
+ });
226
+ }
212
227
  throw error;
213
228
  }
214
229
  }
@@ -336,13 +351,25 @@ exports.Action = {
336
351
  await new Promise(resolve => setTimeout(resolve, delay));
337
352
  continue;
338
353
  }
339
- // Log structured error details and rethrow
340
- logger_1.logger.error("Database createMany operation failed", {
341
- operation: 'createManyAction',
342
- model: 'Action',
343
- error: String(error),
344
- isRetryable: isConnectionError,
345
- });
354
+ // Log structured error details and rethrow (transient -> WARN).
355
+ if (isConnectionError) {
356
+ logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
357
+ operation: 'createManyAction',
358
+ model: 'Action',
359
+ error: String(error),
360
+ isRetryable: true,
361
+ transient: true,
362
+ recoveryHint: "Upstream caller should retry on next cycle",
363
+ });
364
+ }
365
+ else {
366
+ logger_1.logger.error("Database createMany operation failed", {
367
+ operation: 'createManyAction',
368
+ model: 'Action',
369
+ error: String(error),
370
+ isRetryable: false,
371
+ });
372
+ }
346
373
  throw error;
347
374
  }
348
375
  }
@@ -645,14 +672,27 @@ exports.Action = {
645
672
  await new Promise(resolve => setTimeout(resolve, delay));
646
673
  continue;
647
674
  }
648
- // Log structured error details and rethrow
649
- logger_1.logger.error("Database update operation failed", {
650
- operation: 'updateOneAction',
651
- model: 'Action',
652
- error: String(error),
653
- recordId: props.id,
654
- isRetryable: isConnectionError,
655
- });
675
+ // Log structured error details and rethrow (transient -> WARN).
676
+ if (isConnectionError) {
677
+ logger_1.logger.warn("Database update operation failed (transient after retries)", {
678
+ operation: 'updateOneAction',
679
+ model: 'Action',
680
+ error: String(error),
681
+ recordId: props.id,
682
+ isRetryable: true,
683
+ transient: true,
684
+ recoveryHint: "Upstream caller should retry on next cycle",
685
+ });
686
+ }
687
+ else {
688
+ logger_1.logger.error("Database update operation failed", {
689
+ operation: 'updateOneAction',
690
+ model: 'Action',
691
+ error: String(error),
692
+ recordId: props.id,
693
+ isRetryable: false,
694
+ });
695
+ }
656
696
  throw error;
657
697
  }
658
698
  }
@@ -1018,14 +1058,27 @@ exports.Action = {
1018
1058
  await new Promise(resolve => setTimeout(resolve, delay));
1019
1059
  continue;
1020
1060
  }
1021
- // Log structured error details and rethrow
1022
- logger_1.logger.error("Database upsert operation failed", {
1023
- operation: 'upsertOneAction',
1024
- model: 'Action',
1025
- error: String(error),
1026
- recordId: props.id,
1027
- isRetryable: isConnectionError,
1028
- });
1061
+ // Log structured error details and rethrow (transient -> WARN).
1062
+ if (isConnectionError) {
1063
+ logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
1064
+ operation: 'upsertOneAction',
1065
+ model: 'Action',
1066
+ error: String(error),
1067
+ recordId: props.id,
1068
+ isRetryable: true,
1069
+ transient: true,
1070
+ recoveryHint: "Upstream caller should retry on next cycle",
1071
+ });
1072
+ }
1073
+ else {
1074
+ logger_1.logger.error("Database upsert operation failed", {
1075
+ operation: 'upsertOneAction',
1076
+ model: 'Action',
1077
+ error: String(error),
1078
+ recordId: props.id,
1079
+ isRetryable: false,
1080
+ });
1081
+ }
1029
1082
  throw error;
1030
1083
  }
1031
1084
  }
@@ -1326,13 +1379,25 @@ exports.Action = {
1326
1379
  await new Promise(resolve => setTimeout(resolve, delay));
1327
1380
  continue;
1328
1381
  }
1329
- // Log structured error details and rethrow
1330
- logger_1.logger.error("Database updateMany operation failed", {
1331
- operation: 'updateManyAction',
1332
- model: 'Action',
1333
- error: String(error),
1334
- isRetryable: isConnectionError,
1335
- });
1382
+ // Log structured error details and rethrow (transient -> WARN).
1383
+ if (isConnectionError) {
1384
+ logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
1385
+ operation: 'updateManyAction',
1386
+ model: 'Action',
1387
+ error: String(error),
1388
+ isRetryable: true,
1389
+ transient: true,
1390
+ recoveryHint: "Upstream caller should retry on next cycle",
1391
+ });
1392
+ }
1393
+ else {
1394
+ logger_1.logger.error("Database updateMany operation failed", {
1395
+ operation: 'updateManyAction',
1396
+ model: 'Action',
1397
+ error: String(error),
1398
+ isRetryable: false,
1399
+ });
1400
+ }
1336
1401
  throw error;
1337
1402
  }
1338
1403
  }
@@ -1455,14 +1520,27 @@ exports.Action = {
1455
1520
  await new Promise(resolve => setTimeout(resolve, delay));
1456
1521
  continue;
1457
1522
  }
1458
- // Log structured error details and rethrow
1459
- logger_1.logger.error("Database delete operation failed", {
1460
- operation: 'deleteOneAction',
1461
- model: 'Action',
1462
- error: String(error),
1463
- recordId: props.id,
1464
- isRetryable: isConnectionError,
1465
- });
1523
+ // Log structured error details and rethrow (transient -> WARN).
1524
+ if (isConnectionError) {
1525
+ logger_1.logger.warn("Database delete operation failed (transient after retries)", {
1526
+ operation: 'deleteOneAction',
1527
+ model: 'Action',
1528
+ error: String(error),
1529
+ recordId: props.id,
1530
+ isRetryable: true,
1531
+ transient: true,
1532
+ recoveryHint: "Upstream caller should retry on next cycle",
1533
+ });
1534
+ }
1535
+ else {
1536
+ logger_1.logger.error("Database delete operation failed", {
1537
+ operation: 'deleteOneAction',
1538
+ model: 'Action',
1539
+ error: String(error),
1540
+ recordId: props.id,
1541
+ isRetryable: false,
1542
+ });
1543
+ }
1466
1544
  throw error;
1467
1545
  }
1468
1546
  }
@@ -1568,13 +1646,25 @@ exports.Action = {
1568
1646
  await new Promise(resolve => setTimeout(resolve, delay));
1569
1647
  continue;
1570
1648
  }
1571
- // Log structured error details and rethrow
1572
- logger_1.logger.error("Database get operation failed", {
1573
- operation: 'getAction',
1574
- model: 'Action',
1575
- error: String(error),
1576
- isRetryable: isConnectionError,
1577
- });
1649
+ // Log structured error details and rethrow (transient -> WARN).
1650
+ if (isConnectionError) {
1651
+ logger_1.logger.warn("Database get operation failed (transient after retries)", {
1652
+ operation: 'getAction',
1653
+ model: 'Action',
1654
+ error: String(error),
1655
+ isRetryable: true,
1656
+ transient: true,
1657
+ recoveryHint: "Upstream caller should retry on next cycle",
1658
+ });
1659
+ }
1660
+ else {
1661
+ logger_1.logger.error("Database get operation failed", {
1662
+ operation: 'getAction',
1663
+ model: 'Action',
1664
+ error: String(error),
1665
+ isRetryable: false,
1666
+ });
1667
+ }
1578
1668
  throw error;
1579
1669
  }
1580
1670
  }
@@ -1661,13 +1751,25 @@ exports.Action = {
1661
1751
  await new Promise(resolve => setTimeout(resolve, delay));
1662
1752
  continue;
1663
1753
  }
1664
- // Log structured error details and rethrow
1665
- logger_1.logger.error("Database getAll operation failed", {
1666
- operation: 'getAllAction',
1667
- model: 'Action',
1668
- error: String(error),
1669
- isRetryable: isConnectionError,
1670
- });
1754
+ // Log structured error details and rethrow (transient -> WARN).
1755
+ if (isConnectionError) {
1756
+ logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
1757
+ operation: 'getAllAction',
1758
+ model: 'Action',
1759
+ error: String(error),
1760
+ isRetryable: true,
1761
+ transient: true,
1762
+ recoveryHint: "Upstream caller should retry on next cycle",
1763
+ });
1764
+ }
1765
+ else {
1766
+ logger_1.logger.error("Database getAll operation failed", {
1767
+ operation: 'getAllAction',
1768
+ model: 'Action',
1769
+ error: String(error),
1770
+ isRetryable: false,
1771
+ });
1772
+ }
1671
1773
  throw error;
1672
1774
  }
1673
1775
  }
@@ -1784,13 +1886,25 @@ exports.Action = {
1784
1886
  await new Promise(resolve => setTimeout(resolve, delay));
1785
1887
  continue;
1786
1888
  }
1787
- // Log structured error details and rethrow
1788
- logger_1.logger.error("Database findMany operation failed", {
1789
- operation: 'findManyAction',
1790
- model: 'Action',
1791
- error: String(error),
1792
- isRetryable: isConnectionError,
1793
- });
1889
+ // Log structured error details and rethrow (transient -> WARN).
1890
+ if (isConnectionError) {
1891
+ logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
1892
+ operation: 'findManyAction',
1893
+ model: 'Action',
1894
+ error: String(error),
1895
+ isRetryable: true,
1896
+ transient: true,
1897
+ recoveryHint: "Upstream caller should retry on next cycle",
1898
+ });
1899
+ }
1900
+ else {
1901
+ logger_1.logger.error("Database findMany operation failed", {
1902
+ operation: 'findManyAction',
1903
+ model: 'Action',
1904
+ error: String(error),
1905
+ isRetryable: false,
1906
+ });
1907
+ }
1794
1908
  throw error;
1795
1909
  }
1796
1910
  }
package/Alert.cjs CHANGED
@@ -605,13 +605,28 @@ exports.Alert = {
605
605
  await new Promise(resolve => setTimeout(resolve, delay));
606
606
  continue;
607
607
  }
608
- // Log structured error details and rethrow
609
- logger_1.logger.error("Database create operation failed", {
610
- operation: 'createOneAlert',
611
- model: 'Alert',
612
- error: String(error),
613
- isRetryable: isConnectionError,
614
- });
608
+ // Log structured error details and rethrow.
609
+ // Demote transient failures to WARN with explicit transient+recoveryHint
610
+ // metadata so log analytics can distinguish recoverable upstream retries
611
+ // from true defects.
612
+ if (isConnectionError) {
613
+ logger_1.logger.warn("Database create operation failed (transient after retries)", {
614
+ operation: 'createOneAlert',
615
+ model: 'Alert',
616
+ error: String(error),
617
+ isRetryable: true,
618
+ transient: true,
619
+ recoveryHint: "Upstream caller should retry on next cycle",
620
+ });
621
+ }
622
+ else {
623
+ logger_1.logger.error("Database create operation failed", {
624
+ operation: 'createOneAlert',
625
+ model: 'Alert',
626
+ error: String(error),
627
+ isRetryable: false,
628
+ });
629
+ }
615
630
  throw error;
616
631
  }
617
632
  }
@@ -742,13 +757,25 @@ exports.Alert = {
742
757
  await new Promise(resolve => setTimeout(resolve, delay));
743
758
  continue;
744
759
  }
745
- // Log structured error details and rethrow
746
- logger_1.logger.error("Database createMany operation failed", {
747
- operation: 'createManyAlert',
748
- model: 'Alert',
749
- error: String(error),
750
- isRetryable: isConnectionError,
751
- });
760
+ // Log structured error details and rethrow (transient -> WARN).
761
+ if (isConnectionError) {
762
+ logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
763
+ operation: 'createManyAlert',
764
+ model: 'Alert',
765
+ error: String(error),
766
+ isRetryable: true,
767
+ transient: true,
768
+ recoveryHint: "Upstream caller should retry on next cycle",
769
+ });
770
+ }
771
+ else {
772
+ logger_1.logger.error("Database createMany operation failed", {
773
+ operation: 'createManyAlert',
774
+ model: 'Alert',
775
+ error: String(error),
776
+ isRetryable: false,
777
+ });
778
+ }
752
779
  throw error;
753
780
  }
754
781
  }
@@ -2641,14 +2668,27 @@ exports.Alert = {
2641
2668
  await new Promise(resolve => setTimeout(resolve, delay));
2642
2669
  continue;
2643
2670
  }
2644
- // Log structured error details and rethrow
2645
- logger_1.logger.error("Database update operation failed", {
2646
- operation: 'updateOneAlert',
2647
- model: 'Alert',
2648
- error: String(error),
2649
- recordId: props.id,
2650
- isRetryable: isConnectionError,
2651
- });
2671
+ // Log structured error details and rethrow (transient -> WARN).
2672
+ if (isConnectionError) {
2673
+ logger_1.logger.warn("Database update operation failed (transient after retries)", {
2674
+ operation: 'updateOneAlert',
2675
+ model: 'Alert',
2676
+ error: String(error),
2677
+ recordId: props.id,
2678
+ isRetryable: true,
2679
+ transient: true,
2680
+ recoveryHint: "Upstream caller should retry on next cycle",
2681
+ });
2682
+ }
2683
+ else {
2684
+ logger_1.logger.error("Database update operation failed", {
2685
+ operation: 'updateOneAlert',
2686
+ model: 'Alert',
2687
+ error: String(error),
2688
+ recordId: props.id,
2689
+ isRetryable: false,
2690
+ });
2691
+ }
2652
2692
  throw error;
2653
2693
  }
2654
2694
  }
@@ -5008,14 +5048,27 @@ exports.Alert = {
5008
5048
  await new Promise(resolve => setTimeout(resolve, delay));
5009
5049
  continue;
5010
5050
  }
5011
- // Log structured error details and rethrow
5012
- logger_1.logger.error("Database upsert operation failed", {
5013
- operation: 'upsertOneAlert',
5014
- model: 'Alert',
5015
- error: String(error),
5016
- recordId: props.id,
5017
- isRetryable: isConnectionError,
5018
- });
5051
+ // Log structured error details and rethrow (transient -> WARN).
5052
+ if (isConnectionError) {
5053
+ logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
5054
+ operation: 'upsertOneAlert',
5055
+ model: 'Alert',
5056
+ error: String(error),
5057
+ recordId: props.id,
5058
+ isRetryable: true,
5059
+ transient: true,
5060
+ recoveryHint: "Upstream caller should retry on next cycle",
5061
+ });
5062
+ }
5063
+ else {
5064
+ logger_1.logger.error("Database upsert operation failed", {
5065
+ operation: 'upsertOneAlert',
5066
+ model: 'Alert',
5067
+ error: String(error),
5068
+ recordId: props.id,
5069
+ isRetryable: false,
5070
+ });
5071
+ }
5019
5072
  throw error;
5020
5073
  }
5021
5074
  }
@@ -6906,13 +6959,25 @@ exports.Alert = {
6906
6959
  await new Promise(resolve => setTimeout(resolve, delay));
6907
6960
  continue;
6908
6961
  }
6909
- // Log structured error details and rethrow
6910
- logger_1.logger.error("Database updateMany operation failed", {
6911
- operation: 'updateManyAlert',
6912
- model: 'Alert',
6913
- error: String(error),
6914
- isRetryable: isConnectionError,
6915
- });
6962
+ // Log structured error details and rethrow (transient -> WARN).
6963
+ if (isConnectionError) {
6964
+ logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
6965
+ operation: 'updateManyAlert',
6966
+ model: 'Alert',
6967
+ error: String(error),
6968
+ isRetryable: true,
6969
+ transient: true,
6970
+ recoveryHint: "Upstream caller should retry on next cycle",
6971
+ });
6972
+ }
6973
+ else {
6974
+ logger_1.logger.error("Database updateMany operation failed", {
6975
+ operation: 'updateManyAlert',
6976
+ model: 'Alert',
6977
+ error: String(error),
6978
+ isRetryable: false,
6979
+ });
6980
+ }
6916
6981
  throw error;
6917
6982
  }
6918
6983
  }
@@ -7035,14 +7100,27 @@ exports.Alert = {
7035
7100
  await new Promise(resolve => setTimeout(resolve, delay));
7036
7101
  continue;
7037
7102
  }
7038
- // Log structured error details and rethrow
7039
- logger_1.logger.error("Database delete operation failed", {
7040
- operation: 'deleteOneAlert',
7041
- model: 'Alert',
7042
- error: String(error),
7043
- recordId: props.id,
7044
- isRetryable: isConnectionError,
7045
- });
7103
+ // Log structured error details and rethrow (transient -> WARN).
7104
+ if (isConnectionError) {
7105
+ logger_1.logger.warn("Database delete operation failed (transient after retries)", {
7106
+ operation: 'deleteOneAlert',
7107
+ model: 'Alert',
7108
+ error: String(error),
7109
+ recordId: props.id,
7110
+ isRetryable: true,
7111
+ transient: true,
7112
+ recoveryHint: "Upstream caller should retry on next cycle",
7113
+ });
7114
+ }
7115
+ else {
7116
+ logger_1.logger.error("Database delete operation failed", {
7117
+ operation: 'deleteOneAlert',
7118
+ model: 'Alert',
7119
+ error: String(error),
7120
+ recordId: props.id,
7121
+ isRetryable: false,
7122
+ });
7123
+ }
7046
7124
  throw error;
7047
7125
  }
7048
7126
  }
@@ -7150,13 +7228,25 @@ exports.Alert = {
7150
7228
  await new Promise(resolve => setTimeout(resolve, delay));
7151
7229
  continue;
7152
7230
  }
7153
- // Log structured error details and rethrow
7154
- logger_1.logger.error("Database get operation failed", {
7155
- operation: 'getAlert',
7156
- model: 'Alert',
7157
- error: String(error),
7158
- isRetryable: isConnectionError,
7159
- });
7231
+ // Log structured error details and rethrow (transient -> WARN).
7232
+ if (isConnectionError) {
7233
+ logger_1.logger.warn("Database get operation failed (transient after retries)", {
7234
+ operation: 'getAlert',
7235
+ model: 'Alert',
7236
+ error: String(error),
7237
+ isRetryable: true,
7238
+ transient: true,
7239
+ recoveryHint: "Upstream caller should retry on next cycle",
7240
+ });
7241
+ }
7242
+ else {
7243
+ logger_1.logger.error("Database get operation failed", {
7244
+ operation: 'getAlert',
7245
+ model: 'Alert',
7246
+ error: String(error),
7247
+ isRetryable: false,
7248
+ });
7249
+ }
7160
7250
  throw error;
7161
7251
  }
7162
7252
  }
@@ -7243,13 +7333,25 @@ exports.Alert = {
7243
7333
  await new Promise(resolve => setTimeout(resolve, delay));
7244
7334
  continue;
7245
7335
  }
7246
- // Log structured error details and rethrow
7247
- logger_1.logger.error("Database getAll operation failed", {
7248
- operation: 'getAllAlert',
7249
- model: 'Alert',
7250
- error: String(error),
7251
- isRetryable: isConnectionError,
7252
- });
7336
+ // Log structured error details and rethrow (transient -> WARN).
7337
+ if (isConnectionError) {
7338
+ logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
7339
+ operation: 'getAllAlert',
7340
+ model: 'Alert',
7341
+ error: String(error),
7342
+ isRetryable: true,
7343
+ transient: true,
7344
+ recoveryHint: "Upstream caller should retry on next cycle",
7345
+ });
7346
+ }
7347
+ else {
7348
+ logger_1.logger.error("Database getAll operation failed", {
7349
+ operation: 'getAllAlert',
7350
+ model: 'Alert',
7351
+ error: String(error),
7352
+ isRetryable: false,
7353
+ });
7354
+ }
7253
7355
  throw error;
7254
7356
  }
7255
7357
  }
@@ -7369,13 +7471,25 @@ exports.Alert = {
7369
7471
  await new Promise(resolve => setTimeout(resolve, delay));
7370
7472
  continue;
7371
7473
  }
7372
- // Log structured error details and rethrow
7373
- logger_1.logger.error("Database findMany operation failed", {
7374
- operation: 'findManyAlert',
7375
- model: 'Alert',
7376
- error: String(error),
7377
- isRetryable: isConnectionError,
7378
- });
7474
+ // Log structured error details and rethrow (transient -> WARN).
7475
+ if (isConnectionError) {
7476
+ logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
7477
+ operation: 'findManyAlert',
7478
+ model: 'Alert',
7479
+ error: String(error),
7480
+ isRetryable: true,
7481
+ transient: true,
7482
+ recoveryHint: "Upstream caller should retry on next cycle",
7483
+ });
7484
+ }
7485
+ else {
7486
+ logger_1.logger.error("Database findMany operation failed", {
7487
+ operation: 'findManyAlert',
7488
+ model: 'Alert',
7489
+ error: String(error),
7490
+ isRetryable: false,
7491
+ });
7492
+ }
7379
7493
  throw error;
7380
7494
  }
7381
7495
  }