@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
@@ -184,13 +184,28 @@ export const AccountDecisionRecord = {
184
184
  await new Promise(resolve => setTimeout(resolve, delay));
185
185
  continue;
186
186
  }
187
- // Log structured error details and rethrow
188
- logger.error("Database create operation failed", {
189
- operation: 'createOneAccountDecisionRecord',
190
- model: 'AccountDecisionRecord',
191
- error: String(error),
192
- isRetryable: isConnectionError,
193
- });
187
+ // Log structured error details and rethrow.
188
+ // Demote transient failures to WARN with explicit transient+recoveryHint
189
+ // metadata so log analytics can distinguish recoverable upstream retries
190
+ // from true defects.
191
+ if (isConnectionError) {
192
+ logger.warn("Database create operation failed (transient after retries)", {
193
+ operation: 'createOneAccountDecisionRecord',
194
+ model: 'AccountDecisionRecord',
195
+ error: String(error),
196
+ isRetryable: true,
197
+ transient: true,
198
+ recoveryHint: "Upstream caller should retry on next cycle",
199
+ });
200
+ }
201
+ else {
202
+ logger.error("Database create operation failed", {
203
+ operation: 'createOneAccountDecisionRecord',
204
+ model: 'AccountDecisionRecord',
205
+ error: String(error),
206
+ isRetryable: false,
207
+ });
208
+ }
194
209
  throw error;
195
210
  }
196
211
  }
@@ -335,13 +350,25 @@ export const AccountDecisionRecord = {
335
350
  await new Promise(resolve => setTimeout(resolve, delay));
336
351
  continue;
337
352
  }
338
- // Log structured error details and rethrow
339
- logger.error("Database createMany operation failed", {
340
- operation: 'createManyAccountDecisionRecord',
341
- model: 'AccountDecisionRecord',
342
- error: String(error),
343
- isRetryable: isConnectionError,
344
- });
353
+ // Log structured error details and rethrow (transient -> WARN).
354
+ if (isConnectionError) {
355
+ logger.warn("Database createMany operation failed (transient after retries)", {
356
+ operation: 'createManyAccountDecisionRecord',
357
+ model: 'AccountDecisionRecord',
358
+ error: String(error),
359
+ isRetryable: true,
360
+ transient: true,
361
+ recoveryHint: "Upstream caller should retry on next cycle",
362
+ });
363
+ }
364
+ else {
365
+ logger.error("Database createMany operation failed", {
366
+ operation: 'createManyAccountDecisionRecord',
367
+ model: 'AccountDecisionRecord',
368
+ error: String(error),
369
+ isRetryable: false,
370
+ });
371
+ }
345
372
  throw error;
346
373
  }
347
374
  }
@@ -537,14 +564,27 @@ export const AccountDecisionRecord = {
537
564
  await new Promise(resolve => setTimeout(resolve, delay));
538
565
  continue;
539
566
  }
540
- // Log structured error details and rethrow
541
- logger.error("Database update operation failed", {
542
- operation: 'updateOneAccountDecisionRecord',
543
- model: 'AccountDecisionRecord',
544
- error: String(error),
545
- recordId: props.id,
546
- isRetryable: isConnectionError,
547
- });
567
+ // Log structured error details and rethrow (transient -> WARN).
568
+ if (isConnectionError) {
569
+ logger.warn("Database update operation failed (transient after retries)", {
570
+ operation: 'updateOneAccountDecisionRecord',
571
+ model: 'AccountDecisionRecord',
572
+ error: String(error),
573
+ recordId: props.id,
574
+ isRetryable: true,
575
+ transient: true,
576
+ recoveryHint: "Upstream caller should retry on next cycle",
577
+ });
578
+ }
579
+ else {
580
+ logger.error("Database update operation failed", {
581
+ operation: 'updateOneAccountDecisionRecord',
582
+ model: 'AccountDecisionRecord',
583
+ error: String(error),
584
+ recordId: props.id,
585
+ isRetryable: false,
586
+ });
587
+ }
548
588
  throw error;
549
589
  }
550
590
  }
@@ -777,14 +817,27 @@ export const AccountDecisionRecord = {
777
817
  await new Promise(resolve => setTimeout(resolve, delay));
778
818
  continue;
779
819
  }
780
- // Log structured error details and rethrow
781
- logger.error("Database upsert operation failed", {
782
- operation: 'upsertOneAccountDecisionRecord',
783
- model: 'AccountDecisionRecord',
784
- error: String(error),
785
- recordId: props.id,
786
- isRetryable: isConnectionError,
787
- });
820
+ // Log structured error details and rethrow (transient -> WARN).
821
+ if (isConnectionError) {
822
+ logger.warn("Database upsert operation failed (transient after retries)", {
823
+ operation: 'upsertOneAccountDecisionRecord',
824
+ model: 'AccountDecisionRecord',
825
+ error: String(error),
826
+ recordId: props.id,
827
+ isRetryable: true,
828
+ transient: true,
829
+ recoveryHint: "Upstream caller should retry on next cycle",
830
+ });
831
+ }
832
+ else {
833
+ logger.error("Database upsert operation failed", {
834
+ operation: 'upsertOneAccountDecisionRecord',
835
+ model: 'AccountDecisionRecord',
836
+ error: String(error),
837
+ recordId: props.id,
838
+ isRetryable: false,
839
+ });
840
+ }
788
841
  throw error;
789
842
  }
790
843
  }
@@ -978,13 +1031,25 @@ export const AccountDecisionRecord = {
978
1031
  await new Promise(resolve => setTimeout(resolve, delay));
979
1032
  continue;
980
1033
  }
981
- // Log structured error details and rethrow
982
- logger.error("Database updateMany operation failed", {
983
- operation: 'updateManyAccountDecisionRecord',
984
- model: 'AccountDecisionRecord',
985
- error: String(error),
986
- isRetryable: isConnectionError,
987
- });
1034
+ // Log structured error details and rethrow (transient -> WARN).
1035
+ if (isConnectionError) {
1036
+ logger.warn("Database updateMany operation failed (transient after retries)", {
1037
+ operation: 'updateManyAccountDecisionRecord',
1038
+ model: 'AccountDecisionRecord',
1039
+ error: String(error),
1040
+ isRetryable: true,
1041
+ transient: true,
1042
+ recoveryHint: "Upstream caller should retry on next cycle",
1043
+ });
1044
+ }
1045
+ else {
1046
+ logger.error("Database updateMany operation failed", {
1047
+ operation: 'updateManyAccountDecisionRecord',
1048
+ model: 'AccountDecisionRecord',
1049
+ error: String(error),
1050
+ isRetryable: false,
1051
+ });
1052
+ }
988
1053
  throw error;
989
1054
  }
990
1055
  }
@@ -1106,14 +1171,27 @@ export const AccountDecisionRecord = {
1106
1171
  await new Promise(resolve => setTimeout(resolve, delay));
1107
1172
  continue;
1108
1173
  }
1109
- // Log structured error details and rethrow
1110
- logger.error("Database delete operation failed", {
1111
- operation: 'deleteOneAccountDecisionRecord',
1112
- model: 'AccountDecisionRecord',
1113
- error: String(error),
1114
- recordId: props.id,
1115
- isRetryable: isConnectionError,
1116
- });
1174
+ // Log structured error details and rethrow (transient -> WARN).
1175
+ if (isConnectionError) {
1176
+ logger.warn("Database delete operation failed (transient after retries)", {
1177
+ operation: 'deleteOneAccountDecisionRecord',
1178
+ model: 'AccountDecisionRecord',
1179
+ error: String(error),
1180
+ recordId: props.id,
1181
+ isRetryable: true,
1182
+ transient: true,
1183
+ recoveryHint: "Upstream caller should retry on next cycle",
1184
+ });
1185
+ }
1186
+ else {
1187
+ logger.error("Database delete operation failed", {
1188
+ operation: 'deleteOneAccountDecisionRecord',
1189
+ model: 'AccountDecisionRecord',
1190
+ error: String(error),
1191
+ recordId: props.id,
1192
+ isRetryable: false,
1193
+ });
1194
+ }
1117
1195
  throw error;
1118
1196
  }
1119
1197
  }
@@ -1224,13 +1302,25 @@ export const AccountDecisionRecord = {
1224
1302
  await new Promise(resolve => setTimeout(resolve, delay));
1225
1303
  continue;
1226
1304
  }
1227
- // Log structured error details and rethrow
1228
- logger.error("Database get operation failed", {
1229
- operation: 'getAccountDecisionRecord',
1230
- model: 'AccountDecisionRecord',
1231
- error: String(error),
1232
- isRetryable: isConnectionError,
1233
- });
1305
+ // Log structured error details and rethrow (transient -> WARN).
1306
+ if (isConnectionError) {
1307
+ logger.warn("Database get operation failed (transient after retries)", {
1308
+ operation: 'getAccountDecisionRecord',
1309
+ model: 'AccountDecisionRecord',
1310
+ error: String(error),
1311
+ isRetryable: true,
1312
+ transient: true,
1313
+ recoveryHint: "Upstream caller should retry on next cycle",
1314
+ });
1315
+ }
1316
+ else {
1317
+ logger.error("Database get operation failed", {
1318
+ operation: 'getAccountDecisionRecord',
1319
+ model: 'AccountDecisionRecord',
1320
+ error: String(error),
1321
+ isRetryable: false,
1322
+ });
1323
+ }
1234
1324
  throw error;
1235
1325
  }
1236
1326
  }
@@ -1316,13 +1406,25 @@ export const AccountDecisionRecord = {
1316
1406
  await new Promise(resolve => setTimeout(resolve, delay));
1317
1407
  continue;
1318
1408
  }
1319
- // Log structured error details and rethrow
1320
- logger.error("Database getAll operation failed", {
1321
- operation: 'getAllAccountDecisionRecord',
1322
- model: 'AccountDecisionRecord',
1323
- error: String(error),
1324
- isRetryable: isConnectionError,
1325
- });
1409
+ // Log structured error details and rethrow (transient -> WARN).
1410
+ if (isConnectionError) {
1411
+ logger.warn("Database getAll operation failed (transient after retries)", {
1412
+ operation: 'getAllAccountDecisionRecord',
1413
+ model: 'AccountDecisionRecord',
1414
+ error: String(error),
1415
+ isRetryable: true,
1416
+ transient: true,
1417
+ recoveryHint: "Upstream caller should retry on next cycle",
1418
+ });
1419
+ }
1420
+ else {
1421
+ logger.error("Database getAll operation failed", {
1422
+ operation: 'getAllAccountDecisionRecord',
1423
+ model: 'AccountDecisionRecord',
1424
+ error: String(error),
1425
+ isRetryable: false,
1426
+ });
1427
+ }
1326
1428
  throw error;
1327
1429
  }
1328
1430
  }
@@ -1447,13 +1549,25 @@ export const AccountDecisionRecord = {
1447
1549
  await new Promise(resolve => setTimeout(resolve, delay));
1448
1550
  continue;
1449
1551
  }
1450
- // Log structured error details and rethrow
1451
- logger.error("Database findMany operation failed", {
1452
- operation: 'findManyAccountDecisionRecord',
1453
- model: 'AccountDecisionRecord',
1454
- error: String(error),
1455
- isRetryable: isConnectionError,
1456
- });
1552
+ // Log structured error details and rethrow (transient -> WARN).
1553
+ if (isConnectionError) {
1554
+ logger.warn("Database findMany operation failed (transient after retries)", {
1555
+ operation: 'findManyAccountDecisionRecord',
1556
+ model: 'AccountDecisionRecord',
1557
+ error: String(error),
1558
+ isRetryable: true,
1559
+ transient: true,
1560
+ recoveryHint: "Upstream caller should retry on next cycle",
1561
+ });
1562
+ }
1563
+ else {
1564
+ logger.error("Database findMany operation failed", {
1565
+ operation: 'findManyAccountDecisionRecord',
1566
+ model: 'AccountDecisionRecord',
1567
+ error: String(error),
1568
+ isRetryable: false,
1569
+ });
1570
+ }
1457
1571
  throw error;
1458
1572
  }
1459
1573
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AccountLinkingRequest.d.ts","sourceRoot":"","sources":["../../src/AccountLinkingRequest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,IAAI,yBAAyB,EAAE,MAAM,6DAA6D,CAAC;AACjI,OAAO,EAAmB,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AA2BpG,eAAO,MAAM,qBAAqB;IAEhC;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,yBAAyB,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAkkB5I;;;;;;;OAOG;sBACqB,yBAAyB,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,YAAY;QAAE,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAA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