@adaptic/backend-legacy 0.0.960 → 0.0.962

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 (269) 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/client.cjs +131 -9
  66. package/client.d.ts +32 -0
  67. package/esm/ABTest.d.ts.map +1 -1
  68. package/esm/ABTest.js.map +1 -1
  69. package/esm/ABTest.mjs +180 -66
  70. package/esm/Account.d.ts.map +1 -1
  71. package/esm/Account.js.map +1 -1
  72. package/esm/Account.mjs +180 -66
  73. package/esm/AccountDecisionRecord.d.ts.map +1 -1
  74. package/esm/AccountDecisionRecord.js.map +1 -1
  75. package/esm/AccountDecisionRecord.mjs +180 -66
  76. package/esm/AccountLinkingRequest.d.ts.map +1 -1
  77. package/esm/AccountLinkingRequest.js.map +1 -1
  78. package/esm/AccountLinkingRequest.mjs +180 -66
  79. package/esm/Action.d.ts.map +1 -1
  80. package/esm/Action.js.map +1 -1
  81. package/esm/Action.mjs +180 -66
  82. package/esm/Alert.d.ts.map +1 -1
  83. package/esm/Alert.js.map +1 -1
  84. package/esm/Alert.mjs +180 -66
  85. package/esm/Allocation.d.ts.map +1 -1
  86. package/esm/Allocation.js.map +1 -1
  87. package/esm/Allocation.mjs +180 -66
  88. package/esm/AlpacaAccount.d.ts.map +1 -1
  89. package/esm/AlpacaAccount.js.map +1 -1
  90. package/esm/AlpacaAccount.mjs +180 -66
  91. package/esm/AnalyticsConfiguration.d.ts.map +1 -1
  92. package/esm/AnalyticsConfiguration.js.map +1 -1
  93. package/esm/AnalyticsConfiguration.mjs +180 -66
  94. package/esm/AnalyticsSnapshot.d.ts.map +1 -1
  95. package/esm/AnalyticsSnapshot.js.map +1 -1
  96. package/esm/AnalyticsSnapshot.mjs +180 -66
  97. package/esm/Asset.d.ts.map +1 -1
  98. package/esm/Asset.js.map +1 -1
  99. package/esm/Asset.mjs +180 -66
  100. package/esm/AuditLog.d.ts.map +1 -1
  101. package/esm/AuditLog.js.map +1 -1
  102. package/esm/AuditLog.mjs +180 -66
  103. package/esm/Authenticator.d.ts.map +1 -1
  104. package/esm/Authenticator.js.map +1 -1
  105. package/esm/Authenticator.mjs +180 -66
  106. package/esm/Configuration.d.ts.map +1 -1
  107. package/esm/Configuration.js.map +1 -1
  108. package/esm/Configuration.mjs +180 -66
  109. package/esm/ConflictEvent.d.ts.map +1 -1
  110. package/esm/ConflictEvent.js.map +1 -1
  111. package/esm/ConflictEvent.mjs +180 -66
  112. package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
  113. package/esm/ConnectionHealthSnapshot.js.map +1 -1
  114. package/esm/ConnectionHealthSnapshot.mjs +180 -66
  115. package/esm/Customer.d.ts.map +1 -1
  116. package/esm/Customer.js.map +1 -1
  117. package/esm/Customer.mjs +180 -66
  118. package/esm/DeadLetterMessage.d.ts.map +1 -1
  119. package/esm/DeadLetterMessage.js.map +1 -1
  120. package/esm/DeadLetterMessage.mjs +180 -66
  121. package/esm/DecisionMemorySummary.d.ts.map +1 -1
  122. package/esm/DecisionMemorySummary.js.map +1 -1
  123. package/esm/DecisionMemorySummary.mjs +180 -66
  124. package/esm/EconomicEvent.d.ts.map +1 -1
  125. package/esm/EconomicEvent.js.map +1 -1
  126. package/esm/EconomicEvent.mjs +180 -66
  127. package/esm/EquityBar.d.ts.map +1 -1
  128. package/esm/EquityBar.js.map +1 -1
  129. package/esm/EquityBar.mjs +180 -66
  130. package/esm/Event.d.ts.map +1 -1
  131. package/esm/Event.js.map +1 -1
  132. package/esm/Event.mjs +180 -66
  133. package/esm/EventSnapshot.d.ts.map +1 -1
  134. package/esm/EventSnapshot.js.map +1 -1
  135. package/esm/EventSnapshot.mjs +180 -66
  136. package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
  137. package/esm/FeatureImportanceAnalysis.js.map +1 -1
  138. package/esm/FeatureImportanceAnalysis.mjs +180 -66
  139. package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
  140. package/esm/InstitutionalFlowSignal.js.map +1 -1
  141. package/esm/InstitutionalFlowSignal.mjs +180 -66
  142. package/esm/InstitutionalHolding.d.ts.map +1 -1
  143. package/esm/InstitutionalHolding.js.map +1 -1
  144. package/esm/InstitutionalHolding.mjs +180 -66
  145. package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
  146. package/esm/InstitutionalSentimentAlerts.js.map +1 -1
  147. package/esm/InstitutionalSentimentAlerts.mjs +180 -66
  148. package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
  149. package/esm/InstitutionalSentimentErrors.js.map +1 -1
  150. package/esm/InstitutionalSentimentErrors.mjs +180 -66
  151. package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
  152. package/esm/InstitutionalSentimentHistory.js.map +1 -1
  153. package/esm/InstitutionalSentimentHistory.mjs +180 -66
  154. package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
  155. package/esm/InstitutionalSentimentMetrics.js.map +1 -1
  156. package/esm/InstitutionalSentimentMetrics.mjs +180 -66
  157. package/esm/InviteToken.d.ts.map +1 -1
  158. package/esm/InviteToken.js.map +1 -1
  159. package/esm/InviteToken.mjs +180 -66
  160. package/esm/LinkedProvider.d.ts.map +1 -1
  161. package/esm/LinkedProvider.js.map +1 -1
  162. package/esm/LinkedProvider.mjs +180 -66
  163. package/esm/LlmConfiguration.d.ts.map +1 -1
  164. package/esm/LlmConfiguration.js.map +1 -1
  165. package/esm/LlmConfiguration.mjs +180 -66
  166. package/esm/MLModelVersion.d.ts.map +1 -1
  167. package/esm/MLModelVersion.js.map +1 -1
  168. package/esm/MLModelVersion.mjs +180 -66
  169. package/esm/MLTrainingData.d.ts.map +1 -1
  170. package/esm/MLTrainingData.js.map +1 -1
  171. package/esm/MLTrainingData.mjs +180 -66
  172. package/esm/MarketSentiment.d.ts.map +1 -1
  173. package/esm/MarketSentiment.js.map +1 -1
  174. package/esm/MarketSentiment.mjs +180 -66
  175. package/esm/ModelArtifact.d.ts.map +1 -1
  176. package/esm/ModelArtifact.js.map +1 -1
  177. package/esm/ModelArtifact.mjs +180 -66
  178. package/esm/ModelVersion.d.ts.map +1 -1
  179. package/esm/ModelVersion.js.map +1 -1
  180. package/esm/ModelVersion.mjs +180 -66
  181. package/esm/ModelVersionArtifact.d.ts.map +1 -1
  182. package/esm/ModelVersionArtifact.js.map +1 -1
  183. package/esm/ModelVersionArtifact.mjs +180 -66
  184. package/esm/NewsArticle.d.ts.map +1 -1
  185. package/esm/NewsArticle.js.map +1 -1
  186. package/esm/NewsArticle.mjs +180 -66
  187. package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
  188. package/esm/NewsArticleAssetSentiment.js.map +1 -1
  189. package/esm/NewsArticleAssetSentiment.mjs +180 -66
  190. package/esm/OptionsContract.d.ts.map +1 -1
  191. package/esm/OptionsContract.js.map +1 -1
  192. package/esm/OptionsContract.mjs +180 -66
  193. package/esm/OptionsGreeksHistory.d.ts.map +1 -1
  194. package/esm/OptionsGreeksHistory.js.map +1 -1
  195. package/esm/OptionsGreeksHistory.mjs +180 -66
  196. package/esm/OptionsPosition.d.ts.map +1 -1
  197. package/esm/OptionsPosition.js.map +1 -1
  198. package/esm/OptionsPosition.mjs +180 -66
  199. package/esm/OptionsPositionEvent.d.ts.map +1 -1
  200. package/esm/OptionsPositionEvent.js.map +1 -1
  201. package/esm/OptionsPositionEvent.mjs +180 -66
  202. package/esm/OptionsTradeExecution.d.ts.map +1 -1
  203. package/esm/OptionsTradeExecution.js.map +1 -1
  204. package/esm/OptionsTradeExecution.mjs +180 -66
  205. package/esm/PolicyOverlay.d.ts.map +1 -1
  206. package/esm/PolicyOverlay.js.map +1 -1
  207. package/esm/PolicyOverlay.mjs +180 -66
  208. package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
  209. package/esm/PortfolioGreeksHistory.js.map +1 -1
  210. package/esm/PortfolioGreeksHistory.mjs +180 -66
  211. package/esm/ScheduledOptionOrder.d.ts.map +1 -1
  212. package/esm/ScheduledOptionOrder.js.map +1 -1
  213. package/esm/ScheduledOptionOrder.mjs +180 -66
  214. package/esm/Session.d.ts.map +1 -1
  215. package/esm/Session.js.map +1 -1
  216. package/esm/Session.mjs +180 -66
  217. package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
  218. package/esm/SignalGeneratorMetrics.js.map +1 -1
  219. package/esm/SignalGeneratorMetrics.mjs +180 -66
  220. package/esm/SignalLineage.d.ts.map +1 -1
  221. package/esm/SignalLineage.js.map +1 -1
  222. package/esm/SignalLineage.mjs +180 -66
  223. package/esm/SignalOutcome.d.ts.map +1 -1
  224. package/esm/SignalOutcome.js.map +1 -1
  225. package/esm/SignalOutcome.mjs +180 -66
  226. package/esm/SignalPriorityQueue.d.ts.map +1 -1
  227. package/esm/SignalPriorityQueue.js.map +1 -1
  228. package/esm/SignalPriorityQueue.mjs +180 -66
  229. package/esm/SyncEvent.d.ts.map +1 -1
  230. package/esm/SyncEvent.js.map +1 -1
  231. package/esm/SyncEvent.mjs +180 -66
  232. package/esm/SystemAlert.d.ts.map +1 -1
  233. package/esm/SystemAlert.js.map +1 -1
  234. package/esm/SystemAlert.mjs +180 -66
  235. package/esm/Trade.d.ts.map +1 -1
  236. package/esm/Trade.js.map +1 -1
  237. package/esm/Trade.mjs +180 -66
  238. package/esm/TradeAuditEvent.d.ts.map +1 -1
  239. package/esm/TradeAuditEvent.js.map +1 -1
  240. package/esm/TradeAuditEvent.mjs +180 -66
  241. package/esm/TradeExecutionHistory.d.ts.map +1 -1
  242. package/esm/TradeExecutionHistory.js.map +1 -1
  243. package/esm/TradeExecutionHistory.mjs +180 -66
  244. package/esm/TradeOutcome.d.ts.map +1 -1
  245. package/esm/TradeOutcome.js.map +1 -1
  246. package/esm/TradeOutcome.mjs +180 -66
  247. package/esm/TradingPolicy.d.ts.map +1 -1
  248. package/esm/TradingPolicy.js.map +1 -1
  249. package/esm/TradingPolicy.mjs +180 -66
  250. package/esm/User.d.ts.map +1 -1
  251. package/esm/User.js.map +1 -1
  252. package/esm/User.mjs +180 -66
  253. package/esm/VerificationToken.d.ts.map +1 -1
  254. package/esm/VerificationToken.js.map +1 -1
  255. package/esm/VerificationToken.mjs +180 -66
  256. package/esm/WaitlistEntry.d.ts.map +1 -1
  257. package/esm/WaitlistEntry.js.map +1 -1
  258. package/esm/WaitlistEntry.mjs +180 -66
  259. package/esm/client.d.ts +32 -0
  260. package/esm/client.d.ts.map +1 -1
  261. package/esm/client.js.map +1 -1
  262. package/esm/client.mjs +130 -9
  263. package/esm/index.d.ts +2 -2
  264. package/esm/index.d.ts.map +1 -1
  265. package/esm/index.js.map +1 -1
  266. package/esm/index.mjs +1 -1
  267. package/index.cjs +2 -1
  268. package/index.d.ts +2 -2
  269. package/package.json +1 -1
package/Authenticator.cjs CHANGED
@@ -591,13 +591,28 @@ exports.Authenticator = {
591
591
  await new Promise(resolve => setTimeout(resolve, delay));
592
592
  continue;
593
593
  }
594
- // Log structured error details and rethrow
595
- logger_1.logger.error("Database create operation failed", {
596
- operation: 'createOneAuthenticator',
597
- model: 'Authenticator',
598
- error: String(error),
599
- isRetryable: isConnectionError,
600
- });
594
+ // Log structured error details and rethrow.
595
+ // Demote transient failures to WARN with explicit transient+recoveryHint
596
+ // metadata so log analytics can distinguish recoverable upstream retries
597
+ // from true defects.
598
+ if (isConnectionError) {
599
+ logger_1.logger.warn("Database create operation failed (transient after retries)", {
600
+ operation: 'createOneAuthenticator',
601
+ model: 'Authenticator',
602
+ error: String(error),
603
+ isRetryable: true,
604
+ transient: true,
605
+ recoveryHint: "Upstream caller should retry on next cycle",
606
+ });
607
+ }
608
+ else {
609
+ logger_1.logger.error("Database create operation failed", {
610
+ operation: 'createOneAuthenticator',
611
+ model: 'Authenticator',
612
+ error: String(error),
613
+ isRetryable: false,
614
+ });
615
+ }
601
616
  throw error;
602
617
  }
603
618
  }
@@ -719,13 +734,25 @@ exports.Authenticator = {
719
734
  await new Promise(resolve => setTimeout(resolve, delay));
720
735
  continue;
721
736
  }
722
- // Log structured error details and rethrow
723
- logger_1.logger.error("Database createMany operation failed", {
724
- operation: 'createManyAuthenticator',
725
- model: 'Authenticator',
726
- error: String(error),
727
- isRetryable: isConnectionError,
728
- });
737
+ // Log structured error details and rethrow (transient -> WARN).
738
+ if (isConnectionError) {
739
+ logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
740
+ operation: 'createManyAuthenticator',
741
+ model: 'Authenticator',
742
+ error: String(error),
743
+ isRetryable: true,
744
+ transient: true,
745
+ recoveryHint: "Upstream caller should retry on next cycle",
746
+ });
747
+ }
748
+ else {
749
+ logger_1.logger.error("Database createMany operation failed", {
750
+ operation: 'createManyAuthenticator',
751
+ model: 'Authenticator',
752
+ error: String(error),
753
+ isRetryable: false,
754
+ });
755
+ }
729
756
  throw error;
730
757
  }
731
758
  }
@@ -2525,14 +2552,27 @@ exports.Authenticator = {
2525
2552
  await new Promise(resolve => setTimeout(resolve, delay));
2526
2553
  continue;
2527
2554
  }
2528
- // Log structured error details and rethrow
2529
- logger_1.logger.error("Database update operation failed", {
2530
- operation: 'updateOneAuthenticator',
2531
- model: 'Authenticator',
2532
- error: String(error),
2533
- recordId: props.id,
2534
- isRetryable: isConnectionError,
2535
- });
2555
+ // Log structured error details and rethrow (transient -> WARN).
2556
+ if (isConnectionError) {
2557
+ logger_1.logger.warn("Database update operation failed (transient after retries)", {
2558
+ operation: 'updateOneAuthenticator',
2559
+ model: 'Authenticator',
2560
+ error: String(error),
2561
+ recordId: props.id,
2562
+ isRetryable: true,
2563
+ transient: true,
2564
+ recoveryHint: "Upstream caller should retry on next cycle",
2565
+ });
2566
+ }
2567
+ else {
2568
+ logger_1.logger.error("Database update operation failed", {
2569
+ operation: 'updateOneAuthenticator',
2570
+ model: 'Authenticator',
2571
+ error: String(error),
2572
+ recordId: props.id,
2573
+ isRetryable: false,
2574
+ });
2575
+ }
2536
2576
  throw error;
2537
2577
  }
2538
2578
  }
@@ -4783,14 +4823,27 @@ exports.Authenticator = {
4783
4823
  await new Promise(resolve => setTimeout(resolve, delay));
4784
4824
  continue;
4785
4825
  }
4786
- // Log structured error details and rethrow
4787
- logger_1.logger.error("Database upsert operation failed", {
4788
- operation: 'upsertOneAuthenticator',
4789
- model: 'Authenticator',
4790
- error: String(error),
4791
- recordId: props.id,
4792
- isRetryable: isConnectionError,
4793
- });
4826
+ // Log structured error details and rethrow (transient -> WARN).
4827
+ if (isConnectionError) {
4828
+ logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
4829
+ operation: 'upsertOneAuthenticator',
4830
+ model: 'Authenticator',
4831
+ error: String(error),
4832
+ recordId: props.id,
4833
+ isRetryable: true,
4834
+ transient: true,
4835
+ recoveryHint: "Upstream caller should retry on next cycle",
4836
+ });
4837
+ }
4838
+ else {
4839
+ logger_1.logger.error("Database upsert operation failed", {
4840
+ operation: 'upsertOneAuthenticator',
4841
+ model: 'Authenticator',
4842
+ error: String(error),
4843
+ recordId: props.id,
4844
+ isRetryable: false,
4845
+ });
4846
+ }
4794
4847
  throw error;
4795
4848
  }
4796
4849
  }
@@ -6588,13 +6641,25 @@ exports.Authenticator = {
6588
6641
  await new Promise(resolve => setTimeout(resolve, delay));
6589
6642
  continue;
6590
6643
  }
6591
- // Log structured error details and rethrow
6592
- logger_1.logger.error("Database updateMany operation failed", {
6593
- operation: 'updateManyAuthenticator',
6594
- model: 'Authenticator',
6595
- error: String(error),
6596
- isRetryable: isConnectionError,
6597
- });
6644
+ // Log structured error details and rethrow (transient -> WARN).
6645
+ if (isConnectionError) {
6646
+ logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
6647
+ operation: 'updateManyAuthenticator',
6648
+ model: 'Authenticator',
6649
+ error: String(error),
6650
+ isRetryable: true,
6651
+ transient: true,
6652
+ recoveryHint: "Upstream caller should retry on next cycle",
6653
+ });
6654
+ }
6655
+ else {
6656
+ logger_1.logger.error("Database updateMany operation failed", {
6657
+ operation: 'updateManyAuthenticator',
6658
+ model: 'Authenticator',
6659
+ error: String(error),
6660
+ isRetryable: false,
6661
+ });
6662
+ }
6598
6663
  throw error;
6599
6664
  }
6600
6665
  }
@@ -6717,14 +6782,27 @@ exports.Authenticator = {
6717
6782
  await new Promise(resolve => setTimeout(resolve, delay));
6718
6783
  continue;
6719
6784
  }
6720
- // Log structured error details and rethrow
6721
- logger_1.logger.error("Database delete operation failed", {
6722
- operation: 'deleteOneAuthenticator',
6723
- model: 'Authenticator',
6724
- error: String(error),
6725
- recordId: props.id,
6726
- isRetryable: isConnectionError,
6727
- });
6785
+ // Log structured error details and rethrow (transient -> WARN).
6786
+ if (isConnectionError) {
6787
+ logger_1.logger.warn("Database delete operation failed (transient after retries)", {
6788
+ operation: 'deleteOneAuthenticator',
6789
+ model: 'Authenticator',
6790
+ error: String(error),
6791
+ recordId: props.id,
6792
+ isRetryable: true,
6793
+ transient: true,
6794
+ recoveryHint: "Upstream caller should retry on next cycle",
6795
+ });
6796
+ }
6797
+ else {
6798
+ logger_1.logger.error("Database delete operation failed", {
6799
+ operation: 'deleteOneAuthenticator',
6800
+ model: 'Authenticator',
6801
+ error: String(error),
6802
+ recordId: props.id,
6803
+ isRetryable: false,
6804
+ });
6805
+ }
6728
6806
  throw error;
6729
6807
  }
6730
6808
  }
@@ -6823,13 +6901,25 @@ exports.Authenticator = {
6823
6901
  await new Promise(resolve => setTimeout(resolve, delay));
6824
6902
  continue;
6825
6903
  }
6826
- // Log structured error details and rethrow
6827
- logger_1.logger.error("Database get operation failed", {
6828
- operation: 'getAuthenticator',
6829
- model: 'Authenticator',
6830
- error: String(error),
6831
- isRetryable: isConnectionError,
6832
- });
6904
+ // Log structured error details and rethrow (transient -> WARN).
6905
+ if (isConnectionError) {
6906
+ logger_1.logger.warn("Database get operation failed (transient after retries)", {
6907
+ operation: 'getAuthenticator',
6908
+ model: 'Authenticator',
6909
+ error: String(error),
6910
+ isRetryable: true,
6911
+ transient: true,
6912
+ recoveryHint: "Upstream caller should retry on next cycle",
6913
+ });
6914
+ }
6915
+ else {
6916
+ logger_1.logger.error("Database get operation failed", {
6917
+ operation: 'getAuthenticator',
6918
+ model: 'Authenticator',
6919
+ error: String(error),
6920
+ isRetryable: false,
6921
+ });
6922
+ }
6833
6923
  throw error;
6834
6924
  }
6835
6925
  }
@@ -6916,13 +7006,25 @@ exports.Authenticator = {
6916
7006
  await new Promise(resolve => setTimeout(resolve, delay));
6917
7007
  continue;
6918
7008
  }
6919
- // Log structured error details and rethrow
6920
- logger_1.logger.error("Database getAll operation failed", {
6921
- operation: 'getAllAuthenticator',
6922
- model: 'Authenticator',
6923
- error: String(error),
6924
- isRetryable: isConnectionError,
6925
- });
7009
+ // Log structured error details and rethrow (transient -> WARN).
7010
+ if (isConnectionError) {
7011
+ logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
7012
+ operation: 'getAllAuthenticator',
7013
+ model: 'Authenticator',
7014
+ error: String(error),
7015
+ isRetryable: true,
7016
+ transient: true,
7017
+ recoveryHint: "Upstream caller should retry on next cycle",
7018
+ });
7019
+ }
7020
+ else {
7021
+ logger_1.logger.error("Database getAll operation failed", {
7022
+ operation: 'getAllAuthenticator',
7023
+ model: 'Authenticator',
7024
+ error: String(error),
7025
+ isRetryable: false,
7026
+ });
7027
+ }
6926
7028
  throw error;
6927
7029
  }
6928
7030
  }
@@ -7033,13 +7135,25 @@ exports.Authenticator = {
7033
7135
  await new Promise(resolve => setTimeout(resolve, delay));
7034
7136
  continue;
7035
7137
  }
7036
- // Log structured error details and rethrow
7037
- logger_1.logger.error("Database findMany operation failed", {
7038
- operation: 'findManyAuthenticator',
7039
- model: 'Authenticator',
7040
- error: String(error),
7041
- isRetryable: isConnectionError,
7042
- });
7138
+ // Log structured error details and rethrow (transient -> WARN).
7139
+ if (isConnectionError) {
7140
+ logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
7141
+ operation: 'findManyAuthenticator',
7142
+ model: 'Authenticator',
7143
+ error: String(error),
7144
+ isRetryable: true,
7145
+ transient: true,
7146
+ recoveryHint: "Upstream caller should retry on next cycle",
7147
+ });
7148
+ }
7149
+ else {
7150
+ logger_1.logger.error("Database findMany operation failed", {
7151
+ operation: 'findManyAuthenticator',
7152
+ model: 'Authenticator',
7153
+ error: String(error),
7154
+ isRetryable: false,
7155
+ });
7156
+ }
7043
7157
  throw error;
7044
7158
  }
7045
7159
  }
package/Configuration.cjs CHANGED
@@ -144,13 +144,28 @@ exports.Configuration = {
144
144
  await new Promise(resolve => setTimeout(resolve, delay));
145
145
  continue;
146
146
  }
147
- // Log structured error details and rethrow
148
- logger_1.logger.error("Database create operation failed", {
149
- operation: 'createOneConfiguration',
150
- model: 'Configuration',
151
- error: String(error),
152
- isRetryable: isConnectionError,
153
- });
147
+ // Log structured error details and rethrow.
148
+ // Demote transient failures to WARN with explicit transient+recoveryHint
149
+ // metadata so log analytics can distinguish recoverable upstream retries
150
+ // from true defects.
151
+ if (isConnectionError) {
152
+ logger_1.logger.warn("Database create operation failed (transient after retries)", {
153
+ operation: 'createOneConfiguration',
154
+ model: 'Configuration',
155
+ error: String(error),
156
+ isRetryable: true,
157
+ transient: true,
158
+ recoveryHint: "Upstream caller should retry on next cycle",
159
+ });
160
+ }
161
+ else {
162
+ logger_1.logger.error("Database create operation failed", {
163
+ operation: 'createOneConfiguration',
164
+ model: 'Configuration',
165
+ error: String(error),
166
+ isRetryable: false,
167
+ });
168
+ }
154
169
  throw error;
155
170
  }
156
171
  }
@@ -276,13 +291,25 @@ exports.Configuration = {
276
291
  await new Promise(resolve => setTimeout(resolve, delay));
277
292
  continue;
278
293
  }
279
- // Log structured error details and rethrow
280
- logger_1.logger.error("Database createMany operation failed", {
281
- operation: 'createManyConfiguration',
282
- model: 'Configuration',
283
- error: String(error),
284
- isRetryable: isConnectionError,
285
- });
294
+ // Log structured error details and rethrow (transient -> WARN).
295
+ if (isConnectionError) {
296
+ logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
297
+ operation: 'createManyConfiguration',
298
+ model: 'Configuration',
299
+ error: String(error),
300
+ isRetryable: true,
301
+ transient: true,
302
+ recoveryHint: "Upstream caller should retry on next cycle",
303
+ });
304
+ }
305
+ else {
306
+ logger_1.logger.error("Database createMany operation failed", {
307
+ operation: 'createManyConfiguration',
308
+ model: 'Configuration',
309
+ error: String(error),
310
+ isRetryable: false,
311
+ });
312
+ }
286
313
  throw error;
287
314
  }
288
315
  }
@@ -435,14 +462,27 @@ exports.Configuration = {
435
462
  await new Promise(resolve => setTimeout(resolve, delay));
436
463
  continue;
437
464
  }
438
- // Log structured error details and rethrow
439
- logger_1.logger.error("Database update operation failed", {
440
- operation: 'updateOneConfiguration',
441
- model: 'Configuration',
442
- error: String(error),
443
- recordId: props.id,
444
- isRetryable: isConnectionError,
445
- });
465
+ // Log structured error details and rethrow (transient -> WARN).
466
+ if (isConnectionError) {
467
+ logger_1.logger.warn("Database update operation failed (transient after retries)", {
468
+ operation: 'updateOneConfiguration',
469
+ model: 'Configuration',
470
+ error: String(error),
471
+ recordId: props.id,
472
+ isRetryable: true,
473
+ transient: true,
474
+ recoveryHint: "Upstream caller should retry on next cycle",
475
+ });
476
+ }
477
+ else {
478
+ logger_1.logger.error("Database update operation failed", {
479
+ operation: 'updateOneConfiguration',
480
+ model: 'Configuration',
481
+ error: String(error),
482
+ recordId: props.id,
483
+ isRetryable: false,
484
+ });
485
+ }
446
486
  throw error;
447
487
  }
448
488
  }
@@ -600,14 +640,27 @@ exports.Configuration = {
600
640
  await new Promise(resolve => setTimeout(resolve, delay));
601
641
  continue;
602
642
  }
603
- // Log structured error details and rethrow
604
- logger_1.logger.error("Database upsert operation failed", {
605
- operation: 'upsertOneConfiguration',
606
- model: 'Configuration',
607
- error: String(error),
608
- recordId: props.id,
609
- isRetryable: isConnectionError,
610
- });
643
+ // Log structured error details and rethrow (transient -> WARN).
644
+ if (isConnectionError) {
645
+ logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
646
+ operation: 'upsertOneConfiguration',
647
+ model: 'Configuration',
648
+ error: String(error),
649
+ recordId: props.id,
650
+ isRetryable: true,
651
+ transient: true,
652
+ recoveryHint: "Upstream caller should retry on next cycle",
653
+ });
654
+ }
655
+ else {
656
+ logger_1.logger.error("Database upsert operation failed", {
657
+ operation: 'upsertOneConfiguration',
658
+ model: 'Configuration',
659
+ error: String(error),
660
+ recordId: props.id,
661
+ isRetryable: false,
662
+ });
663
+ }
611
664
  throw error;
612
665
  }
613
666
  }
@@ -758,13 +811,25 @@ exports.Configuration = {
758
811
  await new Promise(resolve => setTimeout(resolve, delay));
759
812
  continue;
760
813
  }
761
- // Log structured error details and rethrow
762
- logger_1.logger.error("Database updateMany operation failed", {
763
- operation: 'updateManyConfiguration',
764
- model: 'Configuration',
765
- error: String(error),
766
- isRetryable: isConnectionError,
767
- });
814
+ // Log structured error details and rethrow (transient -> WARN).
815
+ if (isConnectionError) {
816
+ logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
817
+ operation: 'updateManyConfiguration',
818
+ model: 'Configuration',
819
+ error: String(error),
820
+ isRetryable: true,
821
+ transient: true,
822
+ recoveryHint: "Upstream caller should retry on next cycle",
823
+ });
824
+ }
825
+ else {
826
+ logger_1.logger.error("Database updateMany operation failed", {
827
+ operation: 'updateManyConfiguration',
828
+ model: 'Configuration',
829
+ error: String(error),
830
+ isRetryable: false,
831
+ });
832
+ }
768
833
  throw error;
769
834
  }
770
835
  }
@@ -887,14 +952,27 @@ exports.Configuration = {
887
952
  await new Promise(resolve => setTimeout(resolve, delay));
888
953
  continue;
889
954
  }
890
- // Log structured error details and rethrow
891
- logger_1.logger.error("Database delete operation failed", {
892
- operation: 'deleteOneConfiguration',
893
- model: 'Configuration',
894
- error: String(error),
895
- recordId: props.id,
896
- isRetryable: isConnectionError,
897
- });
955
+ // Log structured error details and rethrow (transient -> WARN).
956
+ if (isConnectionError) {
957
+ logger_1.logger.warn("Database delete operation failed (transient after retries)", {
958
+ operation: 'deleteOneConfiguration',
959
+ model: 'Configuration',
960
+ error: String(error),
961
+ recordId: props.id,
962
+ isRetryable: true,
963
+ transient: true,
964
+ recoveryHint: "Upstream caller should retry on next cycle",
965
+ });
966
+ }
967
+ else {
968
+ logger_1.logger.error("Database delete operation failed", {
969
+ operation: 'deleteOneConfiguration',
970
+ model: 'Configuration',
971
+ error: String(error),
972
+ recordId: props.id,
973
+ isRetryable: false,
974
+ });
975
+ }
898
976
  throw error;
899
977
  }
900
978
  }
@@ -994,13 +1072,25 @@ exports.Configuration = {
994
1072
  await new Promise(resolve => setTimeout(resolve, delay));
995
1073
  continue;
996
1074
  }
997
- // Log structured error details and rethrow
998
- logger_1.logger.error("Database get operation failed", {
999
- operation: 'getConfiguration',
1000
- model: 'Configuration',
1001
- error: String(error),
1002
- isRetryable: isConnectionError,
1003
- });
1075
+ // Log structured error details and rethrow (transient -> WARN).
1076
+ if (isConnectionError) {
1077
+ logger_1.logger.warn("Database get operation failed (transient after retries)", {
1078
+ operation: 'getConfiguration',
1079
+ model: 'Configuration',
1080
+ error: String(error),
1081
+ isRetryable: true,
1082
+ transient: true,
1083
+ recoveryHint: "Upstream caller should retry on next cycle",
1084
+ });
1085
+ }
1086
+ else {
1087
+ logger_1.logger.error("Database get operation failed", {
1088
+ operation: 'getConfiguration',
1089
+ model: 'Configuration',
1090
+ error: String(error),
1091
+ isRetryable: false,
1092
+ });
1093
+ }
1004
1094
  throw error;
1005
1095
  }
1006
1096
  }
@@ -1087,13 +1177,25 @@ exports.Configuration = {
1087
1177
  await new Promise(resolve => setTimeout(resolve, delay));
1088
1178
  continue;
1089
1179
  }
1090
- // Log structured error details and rethrow
1091
- logger_1.logger.error("Database getAll operation failed", {
1092
- operation: 'getAllConfiguration',
1093
- model: 'Configuration',
1094
- error: String(error),
1095
- isRetryable: isConnectionError,
1096
- });
1180
+ // Log structured error details and rethrow (transient -> WARN).
1181
+ if (isConnectionError) {
1182
+ logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
1183
+ operation: 'getAllConfiguration',
1184
+ model: 'Configuration',
1185
+ error: String(error),
1186
+ isRetryable: true,
1187
+ transient: true,
1188
+ recoveryHint: "Upstream caller should retry on next cycle",
1189
+ });
1190
+ }
1191
+ else {
1192
+ logger_1.logger.error("Database getAll operation failed", {
1193
+ operation: 'getAllConfiguration',
1194
+ model: 'Configuration',
1195
+ error: String(error),
1196
+ isRetryable: false,
1197
+ });
1198
+ }
1097
1199
  throw error;
1098
1200
  }
1099
1201
  }
@@ -1207,13 +1309,25 @@ exports.Configuration = {
1207
1309
  await new Promise(resolve => setTimeout(resolve, delay));
1208
1310
  continue;
1209
1311
  }
1210
- // Log structured error details and rethrow
1211
- logger_1.logger.error("Database findMany operation failed", {
1212
- operation: 'findManyConfiguration',
1213
- model: 'Configuration',
1214
- error: String(error),
1215
- isRetryable: isConnectionError,
1216
- });
1312
+ // Log structured error details and rethrow (transient -> WARN).
1313
+ if (isConnectionError) {
1314
+ logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
1315
+ operation: 'findManyConfiguration',
1316
+ model: 'Configuration',
1317
+ error: String(error),
1318
+ isRetryable: true,
1319
+ transient: true,
1320
+ recoveryHint: "Upstream caller should retry on next cycle",
1321
+ });
1322
+ }
1323
+ else {
1324
+ logger_1.logger.error("Database findMany operation failed", {
1325
+ operation: 'findManyConfiguration',
1326
+ model: 'Configuration',
1327
+ error: String(error),
1328
+ isRetryable: false,
1329
+ });
1330
+ }
1217
1331
  throw error;
1218
1332
  }
1219
1333
  }