@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
@@ -469,13 +469,28 @@ exports.OptionsGreeksHistory = {
469
469
  await new Promise(resolve => setTimeout(resolve, delay));
470
470
  continue;
471
471
  }
472
- // Log structured error details and rethrow
473
- logger_1.logger.error("Database create operation failed", {
474
- operation: 'createOneOptionsGreeksHistory',
475
- model: 'OptionsGreeksHistory',
476
- error: String(error),
477
- isRetryable: isConnectionError,
478
- });
472
+ // Log structured error details and rethrow.
473
+ // Demote transient failures to WARN with explicit transient+recoveryHint
474
+ // metadata so log analytics can distinguish recoverable upstream retries
475
+ // from true defects.
476
+ if (isConnectionError) {
477
+ logger_1.logger.warn("Database create operation failed (transient after retries)", {
478
+ operation: 'createOneOptionsGreeksHistory',
479
+ model: 'OptionsGreeksHistory',
480
+ error: String(error),
481
+ isRetryable: true,
482
+ transient: true,
483
+ recoveryHint: "Upstream caller should retry on next cycle",
484
+ });
485
+ }
486
+ else {
487
+ logger_1.logger.error("Database create operation failed", {
488
+ operation: 'createOneOptionsGreeksHistory',
489
+ model: 'OptionsGreeksHistory',
490
+ error: String(error),
491
+ isRetryable: false,
492
+ });
493
+ }
479
494
  throw error;
480
495
  }
481
496
  }
@@ -611,13 +626,25 @@ exports.OptionsGreeksHistory = {
611
626
  await new Promise(resolve => setTimeout(resolve, delay));
612
627
  continue;
613
628
  }
614
- // Log structured error details and rethrow
615
- logger_1.logger.error("Database createMany operation failed", {
616
- operation: 'createManyOptionsGreeksHistory',
617
- model: 'OptionsGreeksHistory',
618
- error: String(error),
619
- isRetryable: isConnectionError,
620
- });
629
+ // Log structured error details and rethrow (transient -> WARN).
630
+ if (isConnectionError) {
631
+ logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
632
+ operation: 'createManyOptionsGreeksHistory',
633
+ model: 'OptionsGreeksHistory',
634
+ error: String(error),
635
+ isRetryable: true,
636
+ transient: true,
637
+ recoveryHint: "Upstream caller should retry on next cycle",
638
+ });
639
+ }
640
+ else {
641
+ logger_1.logger.error("Database createMany operation failed", {
642
+ operation: 'createManyOptionsGreeksHistory',
643
+ model: 'OptionsGreeksHistory',
644
+ error: String(error),
645
+ isRetryable: false,
646
+ });
647
+ }
621
648
  throw error;
622
649
  }
623
650
  }
@@ -1859,14 +1886,27 @@ exports.OptionsGreeksHistory = {
1859
1886
  await new Promise(resolve => setTimeout(resolve, delay));
1860
1887
  continue;
1861
1888
  }
1862
- // Log structured error details and rethrow
1863
- logger_1.logger.error("Database update operation failed", {
1864
- operation: 'updateOneOptionsGreeksHistory',
1865
- model: 'OptionsGreeksHistory',
1866
- error: String(error),
1867
- recordId: props.id,
1868
- isRetryable: isConnectionError,
1869
- });
1889
+ // Log structured error details and rethrow (transient -> WARN).
1890
+ if (isConnectionError) {
1891
+ logger_1.logger.warn("Database update operation failed (transient after retries)", {
1892
+ operation: 'updateOneOptionsGreeksHistory',
1893
+ model: 'OptionsGreeksHistory',
1894
+ error: String(error),
1895
+ recordId: props.id,
1896
+ isRetryable: true,
1897
+ transient: true,
1898
+ recoveryHint: "Upstream caller should retry on next cycle",
1899
+ });
1900
+ }
1901
+ else {
1902
+ logger_1.logger.error("Database update operation failed", {
1903
+ operation: 'updateOneOptionsGreeksHistory',
1904
+ model: 'OptionsGreeksHistory',
1905
+ error: String(error),
1906
+ recordId: props.id,
1907
+ isRetryable: false,
1908
+ });
1909
+ }
1870
1910
  throw error;
1871
1911
  }
1872
1912
  }
@@ -3395,14 +3435,27 @@ exports.OptionsGreeksHistory = {
3395
3435
  await new Promise(resolve => setTimeout(resolve, delay));
3396
3436
  continue;
3397
3437
  }
3398
- // Log structured error details and rethrow
3399
- logger_1.logger.error("Database upsert operation failed", {
3400
- operation: 'upsertOneOptionsGreeksHistory',
3401
- model: 'OptionsGreeksHistory',
3402
- error: String(error),
3403
- recordId: props.id,
3404
- isRetryable: isConnectionError,
3405
- });
3438
+ // Log structured error details and rethrow (transient -> WARN).
3439
+ if (isConnectionError) {
3440
+ logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
3441
+ operation: 'upsertOneOptionsGreeksHistory',
3442
+ model: 'OptionsGreeksHistory',
3443
+ error: String(error),
3444
+ recordId: props.id,
3445
+ isRetryable: true,
3446
+ transient: true,
3447
+ recoveryHint: "Upstream caller should retry on next cycle",
3448
+ });
3449
+ }
3450
+ else {
3451
+ logger_1.logger.error("Database upsert operation failed", {
3452
+ operation: 'upsertOneOptionsGreeksHistory',
3453
+ model: 'OptionsGreeksHistory',
3454
+ error: String(error),
3455
+ recordId: props.id,
3456
+ isRetryable: false,
3457
+ });
3458
+ }
3406
3459
  throw error;
3407
3460
  }
3408
3461
  }
@@ -4642,13 +4695,25 @@ exports.OptionsGreeksHistory = {
4642
4695
  await new Promise(resolve => setTimeout(resolve, delay));
4643
4696
  continue;
4644
4697
  }
4645
- // Log structured error details and rethrow
4646
- logger_1.logger.error("Database updateMany operation failed", {
4647
- operation: 'updateManyOptionsGreeksHistory',
4648
- model: 'OptionsGreeksHistory',
4649
- error: String(error),
4650
- isRetryable: isConnectionError,
4651
- });
4698
+ // Log structured error details and rethrow (transient -> WARN).
4699
+ if (isConnectionError) {
4700
+ logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
4701
+ operation: 'updateManyOptionsGreeksHistory',
4702
+ model: 'OptionsGreeksHistory',
4703
+ error: String(error),
4704
+ isRetryable: true,
4705
+ transient: true,
4706
+ recoveryHint: "Upstream caller should retry on next cycle",
4707
+ });
4708
+ }
4709
+ else {
4710
+ logger_1.logger.error("Database updateMany operation failed", {
4711
+ operation: 'updateManyOptionsGreeksHistory',
4712
+ model: 'OptionsGreeksHistory',
4713
+ error: String(error),
4714
+ isRetryable: false,
4715
+ });
4716
+ }
4652
4717
  throw error;
4653
4718
  }
4654
4719
  }
@@ -4771,14 +4836,27 @@ exports.OptionsGreeksHistory = {
4771
4836
  await new Promise(resolve => setTimeout(resolve, delay));
4772
4837
  continue;
4773
4838
  }
4774
- // Log structured error details and rethrow
4775
- logger_1.logger.error("Database delete operation failed", {
4776
- operation: 'deleteOneOptionsGreeksHistory',
4777
- model: 'OptionsGreeksHistory',
4778
- error: String(error),
4779
- recordId: props.id,
4780
- isRetryable: isConnectionError,
4781
- });
4839
+ // Log structured error details and rethrow (transient -> WARN).
4840
+ if (isConnectionError) {
4841
+ logger_1.logger.warn("Database delete operation failed (transient after retries)", {
4842
+ operation: 'deleteOneOptionsGreeksHistory',
4843
+ model: 'OptionsGreeksHistory',
4844
+ error: String(error),
4845
+ recordId: props.id,
4846
+ isRetryable: true,
4847
+ transient: true,
4848
+ recoveryHint: "Upstream caller should retry on next cycle",
4849
+ });
4850
+ }
4851
+ else {
4852
+ logger_1.logger.error("Database delete operation failed", {
4853
+ operation: 'deleteOneOptionsGreeksHistory',
4854
+ model: 'OptionsGreeksHistory',
4855
+ error: String(error),
4856
+ recordId: props.id,
4857
+ isRetryable: false,
4858
+ });
4859
+ }
4782
4860
  throw error;
4783
4861
  }
4784
4862
  }
@@ -4877,13 +4955,25 @@ exports.OptionsGreeksHistory = {
4877
4955
  await new Promise(resolve => setTimeout(resolve, delay));
4878
4956
  continue;
4879
4957
  }
4880
- // Log structured error details and rethrow
4881
- logger_1.logger.error("Database get operation failed", {
4882
- operation: 'getOptionsGreeksHistory',
4883
- model: 'OptionsGreeksHistory',
4884
- error: String(error),
4885
- isRetryable: isConnectionError,
4886
- });
4958
+ // Log structured error details and rethrow (transient -> WARN).
4959
+ if (isConnectionError) {
4960
+ logger_1.logger.warn("Database get operation failed (transient after retries)", {
4961
+ operation: 'getOptionsGreeksHistory',
4962
+ model: 'OptionsGreeksHistory',
4963
+ error: String(error),
4964
+ isRetryable: true,
4965
+ transient: true,
4966
+ recoveryHint: "Upstream caller should retry on next cycle",
4967
+ });
4968
+ }
4969
+ else {
4970
+ logger_1.logger.error("Database get operation failed", {
4971
+ operation: 'getOptionsGreeksHistory',
4972
+ model: 'OptionsGreeksHistory',
4973
+ error: String(error),
4974
+ isRetryable: false,
4975
+ });
4976
+ }
4887
4977
  throw error;
4888
4978
  }
4889
4979
  }
@@ -4970,13 +5060,25 @@ exports.OptionsGreeksHistory = {
4970
5060
  await new Promise(resolve => setTimeout(resolve, delay));
4971
5061
  continue;
4972
5062
  }
4973
- // Log structured error details and rethrow
4974
- logger_1.logger.error("Database getAll operation failed", {
4975
- operation: 'getAllOptionsGreeksHistory',
4976
- model: 'OptionsGreeksHistory',
4977
- error: String(error),
4978
- isRetryable: isConnectionError,
4979
- });
5063
+ // Log structured error details and rethrow (transient -> WARN).
5064
+ if (isConnectionError) {
5065
+ logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
5066
+ operation: 'getAllOptionsGreeksHistory',
5067
+ model: 'OptionsGreeksHistory',
5068
+ error: String(error),
5069
+ isRetryable: true,
5070
+ transient: true,
5071
+ recoveryHint: "Upstream caller should retry on next cycle",
5072
+ });
5073
+ }
5074
+ else {
5075
+ logger_1.logger.error("Database getAll operation failed", {
5076
+ operation: 'getAllOptionsGreeksHistory',
5077
+ model: 'OptionsGreeksHistory',
5078
+ error: String(error),
5079
+ isRetryable: false,
5080
+ });
5081
+ }
4980
5082
  throw error;
4981
5083
  }
4982
5084
  }
@@ -5087,13 +5189,25 @@ exports.OptionsGreeksHistory = {
5087
5189
  await new Promise(resolve => setTimeout(resolve, delay));
5088
5190
  continue;
5089
5191
  }
5090
- // Log structured error details and rethrow
5091
- logger_1.logger.error("Database findMany operation failed", {
5092
- operation: 'findManyOptionsGreeksHistory',
5093
- model: 'OptionsGreeksHistory',
5094
- error: String(error),
5095
- isRetryable: isConnectionError,
5096
- });
5192
+ // Log structured error details and rethrow (transient -> WARN).
5193
+ if (isConnectionError) {
5194
+ logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
5195
+ operation: 'findManyOptionsGreeksHistory',
5196
+ model: 'OptionsGreeksHistory',
5197
+ error: String(error),
5198
+ isRetryable: true,
5199
+ transient: true,
5200
+ recoveryHint: "Upstream caller should retry on next cycle",
5201
+ });
5202
+ }
5203
+ else {
5204
+ logger_1.logger.error("Database findMany operation failed", {
5205
+ operation: 'findManyOptionsGreeksHistory',
5206
+ model: 'OptionsGreeksHistory',
5207
+ error: String(error),
5208
+ isRetryable: false,
5209
+ });
5210
+ }
5097
5211
  throw error;
5098
5212
  }
5099
5213
  }
@@ -649,13 +649,28 @@ exports.OptionsPosition = {
649
649
  await new Promise(resolve => setTimeout(resolve, delay));
650
650
  continue;
651
651
  }
652
- // Log structured error details and rethrow
653
- logger_1.logger.error("Database create operation failed", {
654
- operation: 'createOneOptionsPosition',
655
- model: 'OptionsPosition',
656
- error: String(error),
657
- isRetryable: isConnectionError,
658
- });
652
+ // Log structured error details and rethrow.
653
+ // Demote transient failures to WARN with explicit transient+recoveryHint
654
+ // metadata so log analytics can distinguish recoverable upstream retries
655
+ // from true defects.
656
+ if (isConnectionError) {
657
+ logger_1.logger.warn("Database create operation failed (transient after retries)", {
658
+ operation: 'createOneOptionsPosition',
659
+ model: 'OptionsPosition',
660
+ error: String(error),
661
+ isRetryable: true,
662
+ transient: true,
663
+ recoveryHint: "Upstream caller should retry on next cycle",
664
+ });
665
+ }
666
+ else {
667
+ logger_1.logger.error("Database create operation failed", {
668
+ operation: 'createOneOptionsPosition',
669
+ model: 'OptionsPosition',
670
+ error: String(error),
671
+ isRetryable: false,
672
+ });
673
+ }
659
674
  throw error;
660
675
  }
661
676
  }
@@ -805,13 +820,25 @@ exports.OptionsPosition = {
805
820
  await new Promise(resolve => setTimeout(resolve, delay));
806
821
  continue;
807
822
  }
808
- // Log structured error details and rethrow
809
- logger_1.logger.error("Database createMany operation failed", {
810
- operation: 'createManyOptionsPosition',
811
- model: 'OptionsPosition',
812
- error: String(error),
813
- isRetryable: isConnectionError,
814
- });
823
+ // Log structured error details and rethrow (transient -> WARN).
824
+ if (isConnectionError) {
825
+ logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
826
+ operation: 'createManyOptionsPosition',
827
+ model: 'OptionsPosition',
828
+ error: String(error),
829
+ isRetryable: true,
830
+ transient: true,
831
+ recoveryHint: "Upstream caller should retry on next cycle",
832
+ });
833
+ }
834
+ else {
835
+ logger_1.logger.error("Database createMany operation failed", {
836
+ operation: 'createManyOptionsPosition',
837
+ model: 'OptionsPosition',
838
+ error: String(error),
839
+ isRetryable: false,
840
+ });
841
+ }
815
842
  throw error;
816
843
  }
817
844
  }
@@ -2460,14 +2487,27 @@ exports.OptionsPosition = {
2460
2487
  await new Promise(resolve => setTimeout(resolve, delay));
2461
2488
  continue;
2462
2489
  }
2463
- // Log structured error details and rethrow
2464
- logger_1.logger.error("Database update operation failed", {
2465
- operation: 'updateOneOptionsPosition',
2466
- model: 'OptionsPosition',
2467
- error: String(error),
2468
- recordId: props.id,
2469
- isRetryable: isConnectionError,
2470
- });
2490
+ // Log structured error details and rethrow (transient -> WARN).
2491
+ if (isConnectionError) {
2492
+ logger_1.logger.warn("Database update operation failed (transient after retries)", {
2493
+ operation: 'updateOneOptionsPosition',
2494
+ model: 'OptionsPosition',
2495
+ error: String(error),
2496
+ recordId: props.id,
2497
+ isRetryable: true,
2498
+ transient: true,
2499
+ recoveryHint: "Upstream caller should retry on next cycle",
2500
+ });
2501
+ }
2502
+ else {
2503
+ logger_1.logger.error("Database update operation failed", {
2504
+ operation: 'updateOneOptionsPosition',
2505
+ model: 'OptionsPosition',
2506
+ error: String(error),
2507
+ recordId: props.id,
2508
+ isRetryable: false,
2509
+ });
2510
+ }
2471
2511
  throw error;
2472
2512
  }
2473
2513
  }
@@ -4532,14 +4572,27 @@ exports.OptionsPosition = {
4532
4572
  await new Promise(resolve => setTimeout(resolve, delay));
4533
4573
  continue;
4534
4574
  }
4535
- // Log structured error details and rethrow
4536
- logger_1.logger.error("Database upsert operation failed", {
4537
- operation: 'upsertOneOptionsPosition',
4538
- model: 'OptionsPosition',
4539
- error: String(error),
4540
- recordId: props.id,
4541
- isRetryable: isConnectionError,
4542
- });
4575
+ // Log structured error details and rethrow (transient -> WARN).
4576
+ if (isConnectionError) {
4577
+ logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
4578
+ operation: 'upsertOneOptionsPosition',
4579
+ model: 'OptionsPosition',
4580
+ error: String(error),
4581
+ recordId: props.id,
4582
+ isRetryable: true,
4583
+ transient: true,
4584
+ recoveryHint: "Upstream caller should retry on next cycle",
4585
+ });
4586
+ }
4587
+ else {
4588
+ logger_1.logger.error("Database upsert operation failed", {
4589
+ operation: 'upsertOneOptionsPosition',
4590
+ model: 'OptionsPosition',
4591
+ error: String(error),
4592
+ recordId: props.id,
4593
+ isRetryable: false,
4594
+ });
4595
+ }
4543
4596
  throw error;
4544
4597
  }
4545
4598
  }
@@ -6186,13 +6239,25 @@ exports.OptionsPosition = {
6186
6239
  await new Promise(resolve => setTimeout(resolve, delay));
6187
6240
  continue;
6188
6241
  }
6189
- // Log structured error details and rethrow
6190
- logger_1.logger.error("Database updateMany operation failed", {
6191
- operation: 'updateManyOptionsPosition',
6192
- model: 'OptionsPosition',
6193
- error: String(error),
6194
- isRetryable: isConnectionError,
6195
- });
6242
+ // Log structured error details and rethrow (transient -> WARN).
6243
+ if (isConnectionError) {
6244
+ logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
6245
+ operation: 'updateManyOptionsPosition',
6246
+ model: 'OptionsPosition',
6247
+ error: String(error),
6248
+ isRetryable: true,
6249
+ transient: true,
6250
+ recoveryHint: "Upstream caller should retry on next cycle",
6251
+ });
6252
+ }
6253
+ else {
6254
+ logger_1.logger.error("Database updateMany operation failed", {
6255
+ operation: 'updateManyOptionsPosition',
6256
+ model: 'OptionsPosition',
6257
+ error: String(error),
6258
+ isRetryable: false,
6259
+ });
6260
+ }
6196
6261
  throw error;
6197
6262
  }
6198
6263
  }
@@ -6315,14 +6380,27 @@ exports.OptionsPosition = {
6315
6380
  await new Promise(resolve => setTimeout(resolve, delay));
6316
6381
  continue;
6317
6382
  }
6318
- // Log structured error details and rethrow
6319
- logger_1.logger.error("Database delete operation failed", {
6320
- operation: 'deleteOneOptionsPosition',
6321
- model: 'OptionsPosition',
6322
- error: String(error),
6323
- recordId: props.id,
6324
- isRetryable: isConnectionError,
6325
- });
6383
+ // Log structured error details and rethrow (transient -> WARN).
6384
+ if (isConnectionError) {
6385
+ logger_1.logger.warn("Database delete operation failed (transient after retries)", {
6386
+ operation: 'deleteOneOptionsPosition',
6387
+ model: 'OptionsPosition',
6388
+ error: String(error),
6389
+ recordId: props.id,
6390
+ isRetryable: true,
6391
+ transient: true,
6392
+ recoveryHint: "Upstream caller should retry on next cycle",
6393
+ });
6394
+ }
6395
+ else {
6396
+ logger_1.logger.error("Database delete operation failed", {
6397
+ operation: 'deleteOneOptionsPosition',
6398
+ model: 'OptionsPosition',
6399
+ error: String(error),
6400
+ recordId: props.id,
6401
+ isRetryable: false,
6402
+ });
6403
+ }
6326
6404
  throw error;
6327
6405
  }
6328
6406
  }
@@ -6427,13 +6505,25 @@ exports.OptionsPosition = {
6427
6505
  await new Promise(resolve => setTimeout(resolve, delay));
6428
6506
  continue;
6429
6507
  }
6430
- // Log structured error details and rethrow
6431
- logger_1.logger.error("Database get operation failed", {
6432
- operation: 'getOptionsPosition',
6433
- model: 'OptionsPosition',
6434
- error: String(error),
6435
- isRetryable: isConnectionError,
6436
- });
6508
+ // Log structured error details and rethrow (transient -> WARN).
6509
+ if (isConnectionError) {
6510
+ logger_1.logger.warn("Database get operation failed (transient after retries)", {
6511
+ operation: 'getOptionsPosition',
6512
+ model: 'OptionsPosition',
6513
+ error: String(error),
6514
+ isRetryable: true,
6515
+ transient: true,
6516
+ recoveryHint: "Upstream caller should retry on next cycle",
6517
+ });
6518
+ }
6519
+ else {
6520
+ logger_1.logger.error("Database get operation failed", {
6521
+ operation: 'getOptionsPosition',
6522
+ model: 'OptionsPosition',
6523
+ error: String(error),
6524
+ isRetryable: false,
6525
+ });
6526
+ }
6437
6527
  throw error;
6438
6528
  }
6439
6529
  }
@@ -6520,13 +6610,25 @@ exports.OptionsPosition = {
6520
6610
  await new Promise(resolve => setTimeout(resolve, delay));
6521
6611
  continue;
6522
6612
  }
6523
- // Log structured error details and rethrow
6524
- logger_1.logger.error("Database getAll operation failed", {
6525
- operation: 'getAllOptionsPosition',
6526
- model: 'OptionsPosition',
6527
- error: String(error),
6528
- isRetryable: isConnectionError,
6529
- });
6613
+ // Log structured error details and rethrow (transient -> WARN).
6614
+ if (isConnectionError) {
6615
+ logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
6616
+ operation: 'getAllOptionsPosition',
6617
+ model: 'OptionsPosition',
6618
+ error: String(error),
6619
+ isRetryable: true,
6620
+ transient: true,
6621
+ recoveryHint: "Upstream caller should retry on next cycle",
6622
+ });
6623
+ }
6624
+ else {
6625
+ logger_1.logger.error("Database getAll operation failed", {
6626
+ operation: 'getAllOptionsPosition',
6627
+ model: 'OptionsPosition',
6628
+ error: String(error),
6629
+ isRetryable: false,
6630
+ });
6631
+ }
6530
6632
  throw error;
6531
6633
  }
6532
6634
  }
@@ -6643,13 +6745,25 @@ exports.OptionsPosition = {
6643
6745
  await new Promise(resolve => setTimeout(resolve, delay));
6644
6746
  continue;
6645
6747
  }
6646
- // Log structured error details and rethrow
6647
- logger_1.logger.error("Database findMany operation failed", {
6648
- operation: 'findManyOptionsPosition',
6649
- model: 'OptionsPosition',
6650
- error: String(error),
6651
- isRetryable: isConnectionError,
6652
- });
6748
+ // Log structured error details and rethrow (transient -> WARN).
6749
+ if (isConnectionError) {
6750
+ logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
6751
+ operation: 'findManyOptionsPosition',
6752
+ model: 'OptionsPosition',
6753
+ error: String(error),
6754
+ isRetryable: true,
6755
+ transient: true,
6756
+ recoveryHint: "Upstream caller should retry on next cycle",
6757
+ });
6758
+ }
6759
+ else {
6760
+ logger_1.logger.error("Database findMany operation failed", {
6761
+ operation: 'findManyOptionsPosition',
6762
+ model: 'OptionsPosition',
6763
+ error: String(error),
6764
+ isRetryable: false,
6765
+ });
6766
+ }
6653
6767
  throw error;
6654
6768
  }
6655
6769
  }