@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.
- package/ABTest.cjs +180 -66
- package/Account.cjs +180 -66
- package/AccountDecisionRecord.cjs +180 -66
- package/AccountLinkingRequest.cjs +180 -66
- package/Action.cjs +180 -66
- package/Alert.cjs +180 -66
- package/Allocation.cjs +180 -66
- package/AlpacaAccount.cjs +180 -66
- package/AnalyticsConfiguration.cjs +180 -66
- package/AnalyticsSnapshot.cjs +180 -66
- package/Asset.cjs +180 -66
- package/AuditLog.cjs +180 -66
- package/Authenticator.cjs +180 -66
- package/Configuration.cjs +180 -66
- package/ConflictEvent.cjs +180 -66
- package/ConnectionHealthSnapshot.cjs +180 -66
- package/Customer.cjs +180 -66
- package/DeadLetterMessage.cjs +180 -66
- package/DecisionMemorySummary.cjs +180 -66
- package/EconomicEvent.cjs +180 -66
- package/EquityBar.cjs +180 -66
- package/Event.cjs +180 -66
- package/EventSnapshot.cjs +180 -66
- package/FeatureImportanceAnalysis.cjs +180 -66
- package/InstitutionalFlowSignal.cjs +180 -66
- package/InstitutionalHolding.cjs +180 -66
- package/InstitutionalSentimentAlerts.cjs +180 -66
- package/InstitutionalSentimentErrors.cjs +180 -66
- package/InstitutionalSentimentHistory.cjs +180 -66
- package/InstitutionalSentimentMetrics.cjs +180 -66
- package/InviteToken.cjs +180 -66
- package/LinkedProvider.cjs +180 -66
- package/LlmConfiguration.cjs +180 -66
- package/MLModelVersion.cjs +180 -66
- package/MLTrainingData.cjs +180 -66
- package/MarketSentiment.cjs +180 -66
- package/ModelArtifact.cjs +180 -66
- package/ModelVersion.cjs +180 -66
- package/ModelVersionArtifact.cjs +180 -66
- package/NewsArticle.cjs +180 -66
- package/NewsArticleAssetSentiment.cjs +180 -66
- package/OptionsContract.cjs +180 -66
- package/OptionsGreeksHistory.cjs +180 -66
- package/OptionsPosition.cjs +180 -66
- package/OptionsPositionEvent.cjs +180 -66
- package/OptionsTradeExecution.cjs +180 -66
- package/PolicyOverlay.cjs +180 -66
- package/PortfolioGreeksHistory.cjs +180 -66
- package/ScheduledOptionOrder.cjs +180 -66
- package/Session.cjs +180 -66
- package/SignalGeneratorMetrics.cjs +180 -66
- package/SignalLineage.cjs +180 -66
- package/SignalOutcome.cjs +180 -66
- package/SignalPriorityQueue.cjs +180 -66
- package/SyncEvent.cjs +180 -66
- package/SystemAlert.cjs +180 -66
- package/Trade.cjs +180 -66
- package/TradeAuditEvent.cjs +180 -66
- package/TradeExecutionHistory.cjs +180 -66
- package/TradeOutcome.cjs +180 -66
- package/TradingPolicy.cjs +180 -66
- package/User.cjs +180 -66
- package/VerificationToken.cjs +180 -66
- package/WaitlistEntry.cjs +180 -66
- package/client.cjs +131 -9
- package/client.d.ts +32 -0
- package/esm/ABTest.d.ts.map +1 -1
- package/esm/ABTest.js.map +1 -1
- package/esm/ABTest.mjs +180 -66
- package/esm/Account.d.ts.map +1 -1
- package/esm/Account.js.map +1 -1
- package/esm/Account.mjs +180 -66
- package/esm/AccountDecisionRecord.d.ts.map +1 -1
- package/esm/AccountDecisionRecord.js.map +1 -1
- package/esm/AccountDecisionRecord.mjs +180 -66
- package/esm/AccountLinkingRequest.d.ts.map +1 -1
- package/esm/AccountLinkingRequest.js.map +1 -1
- package/esm/AccountLinkingRequest.mjs +180 -66
- package/esm/Action.d.ts.map +1 -1
- package/esm/Action.js.map +1 -1
- package/esm/Action.mjs +180 -66
- package/esm/Alert.d.ts.map +1 -1
- package/esm/Alert.js.map +1 -1
- package/esm/Alert.mjs +180 -66
- package/esm/Allocation.d.ts.map +1 -1
- package/esm/Allocation.js.map +1 -1
- package/esm/Allocation.mjs +180 -66
- package/esm/AlpacaAccount.d.ts.map +1 -1
- package/esm/AlpacaAccount.js.map +1 -1
- package/esm/AlpacaAccount.mjs +180 -66
- package/esm/AnalyticsConfiguration.d.ts.map +1 -1
- package/esm/AnalyticsConfiguration.js.map +1 -1
- package/esm/AnalyticsConfiguration.mjs +180 -66
- package/esm/AnalyticsSnapshot.d.ts.map +1 -1
- package/esm/AnalyticsSnapshot.js.map +1 -1
- package/esm/AnalyticsSnapshot.mjs +180 -66
- package/esm/Asset.d.ts.map +1 -1
- package/esm/Asset.js.map +1 -1
- package/esm/Asset.mjs +180 -66
- package/esm/AuditLog.d.ts.map +1 -1
- package/esm/AuditLog.js.map +1 -1
- package/esm/AuditLog.mjs +180 -66
- package/esm/Authenticator.d.ts.map +1 -1
- package/esm/Authenticator.js.map +1 -1
- package/esm/Authenticator.mjs +180 -66
- package/esm/Configuration.d.ts.map +1 -1
- package/esm/Configuration.js.map +1 -1
- package/esm/Configuration.mjs +180 -66
- package/esm/ConflictEvent.d.ts.map +1 -1
- package/esm/ConflictEvent.js.map +1 -1
- package/esm/ConflictEvent.mjs +180 -66
- package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
- package/esm/ConnectionHealthSnapshot.js.map +1 -1
- package/esm/ConnectionHealthSnapshot.mjs +180 -66
- package/esm/Customer.d.ts.map +1 -1
- package/esm/Customer.js.map +1 -1
- package/esm/Customer.mjs +180 -66
- package/esm/DeadLetterMessage.d.ts.map +1 -1
- package/esm/DeadLetterMessage.js.map +1 -1
- package/esm/DeadLetterMessage.mjs +180 -66
- package/esm/DecisionMemorySummary.d.ts.map +1 -1
- package/esm/DecisionMemorySummary.js.map +1 -1
- package/esm/DecisionMemorySummary.mjs +180 -66
- package/esm/EconomicEvent.d.ts.map +1 -1
- package/esm/EconomicEvent.js.map +1 -1
- package/esm/EconomicEvent.mjs +180 -66
- package/esm/EquityBar.d.ts.map +1 -1
- package/esm/EquityBar.js.map +1 -1
- package/esm/EquityBar.mjs +180 -66
- package/esm/Event.d.ts.map +1 -1
- package/esm/Event.js.map +1 -1
- package/esm/Event.mjs +180 -66
- package/esm/EventSnapshot.d.ts.map +1 -1
- package/esm/EventSnapshot.js.map +1 -1
- package/esm/EventSnapshot.mjs +180 -66
- package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
- package/esm/FeatureImportanceAnalysis.js.map +1 -1
- package/esm/FeatureImportanceAnalysis.mjs +180 -66
- package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
- package/esm/InstitutionalFlowSignal.js.map +1 -1
- package/esm/InstitutionalFlowSignal.mjs +180 -66
- package/esm/InstitutionalHolding.d.ts.map +1 -1
- package/esm/InstitutionalHolding.js.map +1 -1
- package/esm/InstitutionalHolding.mjs +180 -66
- package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
- package/esm/InstitutionalSentimentAlerts.js.map +1 -1
- package/esm/InstitutionalSentimentAlerts.mjs +180 -66
- package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
- package/esm/InstitutionalSentimentErrors.js.map +1 -1
- package/esm/InstitutionalSentimentErrors.mjs +180 -66
- package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
- package/esm/InstitutionalSentimentHistory.js.map +1 -1
- package/esm/InstitutionalSentimentHistory.mjs +180 -66
- package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
- package/esm/InstitutionalSentimentMetrics.js.map +1 -1
- package/esm/InstitutionalSentimentMetrics.mjs +180 -66
- package/esm/InviteToken.d.ts.map +1 -1
- package/esm/InviteToken.js.map +1 -1
- package/esm/InviteToken.mjs +180 -66
- package/esm/LinkedProvider.d.ts.map +1 -1
- package/esm/LinkedProvider.js.map +1 -1
- package/esm/LinkedProvider.mjs +180 -66
- package/esm/LlmConfiguration.d.ts.map +1 -1
- package/esm/LlmConfiguration.js.map +1 -1
- package/esm/LlmConfiguration.mjs +180 -66
- package/esm/MLModelVersion.d.ts.map +1 -1
- package/esm/MLModelVersion.js.map +1 -1
- package/esm/MLModelVersion.mjs +180 -66
- package/esm/MLTrainingData.d.ts.map +1 -1
- package/esm/MLTrainingData.js.map +1 -1
- package/esm/MLTrainingData.mjs +180 -66
- package/esm/MarketSentiment.d.ts.map +1 -1
- package/esm/MarketSentiment.js.map +1 -1
- package/esm/MarketSentiment.mjs +180 -66
- package/esm/ModelArtifact.d.ts.map +1 -1
- package/esm/ModelArtifact.js.map +1 -1
- package/esm/ModelArtifact.mjs +180 -66
- package/esm/ModelVersion.d.ts.map +1 -1
- package/esm/ModelVersion.js.map +1 -1
- package/esm/ModelVersion.mjs +180 -66
- package/esm/ModelVersionArtifact.d.ts.map +1 -1
- package/esm/ModelVersionArtifact.js.map +1 -1
- package/esm/ModelVersionArtifact.mjs +180 -66
- package/esm/NewsArticle.d.ts.map +1 -1
- package/esm/NewsArticle.js.map +1 -1
- package/esm/NewsArticle.mjs +180 -66
- package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/esm/NewsArticleAssetSentiment.js.map +1 -1
- package/esm/NewsArticleAssetSentiment.mjs +180 -66
- package/esm/OptionsContract.d.ts.map +1 -1
- package/esm/OptionsContract.js.map +1 -1
- package/esm/OptionsContract.mjs +180 -66
- package/esm/OptionsGreeksHistory.d.ts.map +1 -1
- package/esm/OptionsGreeksHistory.js.map +1 -1
- package/esm/OptionsGreeksHistory.mjs +180 -66
- package/esm/OptionsPosition.d.ts.map +1 -1
- package/esm/OptionsPosition.js.map +1 -1
- package/esm/OptionsPosition.mjs +180 -66
- package/esm/OptionsPositionEvent.d.ts.map +1 -1
- package/esm/OptionsPositionEvent.js.map +1 -1
- package/esm/OptionsPositionEvent.mjs +180 -66
- package/esm/OptionsTradeExecution.d.ts.map +1 -1
- package/esm/OptionsTradeExecution.js.map +1 -1
- package/esm/OptionsTradeExecution.mjs +180 -66
- package/esm/PolicyOverlay.d.ts.map +1 -1
- package/esm/PolicyOverlay.js.map +1 -1
- package/esm/PolicyOverlay.mjs +180 -66
- package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
- package/esm/PortfolioGreeksHistory.js.map +1 -1
- package/esm/PortfolioGreeksHistory.mjs +180 -66
- package/esm/ScheduledOptionOrder.d.ts.map +1 -1
- package/esm/ScheduledOptionOrder.js.map +1 -1
- package/esm/ScheduledOptionOrder.mjs +180 -66
- package/esm/Session.d.ts.map +1 -1
- package/esm/Session.js.map +1 -1
- package/esm/Session.mjs +180 -66
- package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
- package/esm/SignalGeneratorMetrics.js.map +1 -1
- package/esm/SignalGeneratorMetrics.mjs +180 -66
- package/esm/SignalLineage.d.ts.map +1 -1
- package/esm/SignalLineage.js.map +1 -1
- package/esm/SignalLineage.mjs +180 -66
- package/esm/SignalOutcome.d.ts.map +1 -1
- package/esm/SignalOutcome.js.map +1 -1
- package/esm/SignalOutcome.mjs +180 -66
- package/esm/SignalPriorityQueue.d.ts.map +1 -1
- package/esm/SignalPriorityQueue.js.map +1 -1
- package/esm/SignalPriorityQueue.mjs +180 -66
- package/esm/SyncEvent.d.ts.map +1 -1
- package/esm/SyncEvent.js.map +1 -1
- package/esm/SyncEvent.mjs +180 -66
- package/esm/SystemAlert.d.ts.map +1 -1
- package/esm/SystemAlert.js.map +1 -1
- package/esm/SystemAlert.mjs +180 -66
- package/esm/Trade.d.ts.map +1 -1
- package/esm/Trade.js.map +1 -1
- package/esm/Trade.mjs +180 -66
- package/esm/TradeAuditEvent.d.ts.map +1 -1
- package/esm/TradeAuditEvent.js.map +1 -1
- package/esm/TradeAuditEvent.mjs +180 -66
- package/esm/TradeExecutionHistory.d.ts.map +1 -1
- package/esm/TradeExecutionHistory.js.map +1 -1
- package/esm/TradeExecutionHistory.mjs +180 -66
- package/esm/TradeOutcome.d.ts.map +1 -1
- package/esm/TradeOutcome.js.map +1 -1
- package/esm/TradeOutcome.mjs +180 -66
- package/esm/TradingPolicy.d.ts.map +1 -1
- package/esm/TradingPolicy.js.map +1 -1
- package/esm/TradingPolicy.mjs +180 -66
- package/esm/User.d.ts.map +1 -1
- package/esm/User.js.map +1 -1
- package/esm/User.mjs +180 -66
- package/esm/VerificationToken.d.ts.map +1 -1
- package/esm/VerificationToken.js.map +1 -1
- package/esm/VerificationToken.mjs +180 -66
- package/esm/WaitlistEntry.d.ts.map +1 -1
- package/esm/WaitlistEntry.js.map +1 -1
- package/esm/WaitlistEntry.mjs +180 -66
- package/esm/client.d.ts +32 -0
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js.map +1 -1
- package/esm/client.mjs +130 -9
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/index.mjs +1 -1
- package/index.cjs +2 -1
- package/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -142,13 +142,28 @@ exports.AnalyticsConfiguration = {
|
|
|
142
142
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
143
143
|
continue;
|
|
144
144
|
}
|
|
145
|
-
// Log structured error details and rethrow
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
145
|
+
// Log structured error details and rethrow.
|
|
146
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
147
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
148
|
+
// from true defects.
|
|
149
|
+
if (isConnectionError) {
|
|
150
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
151
|
+
operation: 'createOneAnalyticsConfiguration',
|
|
152
|
+
model: 'AnalyticsConfiguration',
|
|
153
|
+
error: String(error),
|
|
154
|
+
isRetryable: true,
|
|
155
|
+
transient: true,
|
|
156
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
logger_1.logger.error("Database create operation failed", {
|
|
161
|
+
operation: 'createOneAnalyticsConfiguration',
|
|
162
|
+
model: 'AnalyticsConfiguration',
|
|
163
|
+
error: String(error),
|
|
164
|
+
isRetryable: false,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
152
167
|
throw error;
|
|
153
168
|
}
|
|
154
169
|
}
|
|
@@ -271,13 +286,25 @@ exports.AnalyticsConfiguration = {
|
|
|
271
286
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
272
287
|
continue;
|
|
273
288
|
}
|
|
274
|
-
// Log structured error details and rethrow
|
|
275
|
-
|
|
276
|
-
operation
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
289
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
290
|
+
if (isConnectionError) {
|
|
291
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
292
|
+
operation: 'createManyAnalyticsConfiguration',
|
|
293
|
+
model: 'AnalyticsConfiguration',
|
|
294
|
+
error: String(error),
|
|
295
|
+
isRetryable: true,
|
|
296
|
+
transient: true,
|
|
297
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
302
|
+
operation: 'createManyAnalyticsConfiguration',
|
|
303
|
+
model: 'AnalyticsConfiguration',
|
|
304
|
+
error: String(error),
|
|
305
|
+
isRetryable: false,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
281
308
|
throw error;
|
|
282
309
|
}
|
|
283
310
|
}
|
|
@@ -419,14 +446,27 @@ exports.AnalyticsConfiguration = {
|
|
|
419
446
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
420
447
|
continue;
|
|
421
448
|
}
|
|
422
|
-
// Log structured error details and rethrow
|
|
423
|
-
|
|
424
|
-
operation
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
449
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
450
|
+
if (isConnectionError) {
|
|
451
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
452
|
+
operation: 'updateOneAnalyticsConfiguration',
|
|
453
|
+
model: 'AnalyticsConfiguration',
|
|
454
|
+
error: String(error),
|
|
455
|
+
recordId: props.id,
|
|
456
|
+
isRetryable: true,
|
|
457
|
+
transient: true,
|
|
458
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
logger_1.logger.error("Database update operation failed", {
|
|
463
|
+
operation: 'updateOneAnalyticsConfiguration',
|
|
464
|
+
model: 'AnalyticsConfiguration',
|
|
465
|
+
error: String(error),
|
|
466
|
+
recordId: props.id,
|
|
467
|
+
isRetryable: false,
|
|
468
|
+
});
|
|
469
|
+
}
|
|
430
470
|
throw error;
|
|
431
471
|
}
|
|
432
472
|
}
|
|
@@ -570,14 +610,27 @@ exports.AnalyticsConfiguration = {
|
|
|
570
610
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
571
611
|
continue;
|
|
572
612
|
}
|
|
573
|
-
// Log structured error details and rethrow
|
|
574
|
-
|
|
575
|
-
operation
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
613
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
614
|
+
if (isConnectionError) {
|
|
615
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
616
|
+
operation: 'upsertOneAnalyticsConfiguration',
|
|
617
|
+
model: 'AnalyticsConfiguration',
|
|
618
|
+
error: String(error),
|
|
619
|
+
recordId: props.id,
|
|
620
|
+
isRetryable: true,
|
|
621
|
+
transient: true,
|
|
622
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
else {
|
|
626
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
627
|
+
operation: 'upsertOneAnalyticsConfiguration',
|
|
628
|
+
model: 'AnalyticsConfiguration',
|
|
629
|
+
error: String(error),
|
|
630
|
+
recordId: props.id,
|
|
631
|
+
isRetryable: false,
|
|
632
|
+
});
|
|
633
|
+
}
|
|
581
634
|
throw error;
|
|
582
635
|
}
|
|
583
636
|
}
|
|
@@ -717,13 +770,25 @@ exports.AnalyticsConfiguration = {
|
|
|
717
770
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
718
771
|
continue;
|
|
719
772
|
}
|
|
720
|
-
// Log structured error details and rethrow
|
|
721
|
-
|
|
722
|
-
operation
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
773
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
774
|
+
if (isConnectionError) {
|
|
775
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
776
|
+
operation: 'updateManyAnalyticsConfiguration',
|
|
777
|
+
model: 'AnalyticsConfiguration',
|
|
778
|
+
error: String(error),
|
|
779
|
+
isRetryable: true,
|
|
780
|
+
transient: true,
|
|
781
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
else {
|
|
785
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
786
|
+
operation: 'updateManyAnalyticsConfiguration',
|
|
787
|
+
model: 'AnalyticsConfiguration',
|
|
788
|
+
error: String(error),
|
|
789
|
+
isRetryable: false,
|
|
790
|
+
});
|
|
791
|
+
}
|
|
727
792
|
throw error;
|
|
728
793
|
}
|
|
729
794
|
}
|
|
@@ -846,14 +911,27 @@ exports.AnalyticsConfiguration = {
|
|
|
846
911
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
847
912
|
continue;
|
|
848
913
|
}
|
|
849
|
-
// Log structured error details and rethrow
|
|
850
|
-
|
|
851
|
-
operation
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
914
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
915
|
+
if (isConnectionError) {
|
|
916
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
917
|
+
operation: 'deleteOneAnalyticsConfiguration',
|
|
918
|
+
model: 'AnalyticsConfiguration',
|
|
919
|
+
error: String(error),
|
|
920
|
+
recordId: props.id,
|
|
921
|
+
isRetryable: true,
|
|
922
|
+
transient: true,
|
|
923
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
else {
|
|
927
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
928
|
+
operation: 'deleteOneAnalyticsConfiguration',
|
|
929
|
+
model: 'AnalyticsConfiguration',
|
|
930
|
+
error: String(error),
|
|
931
|
+
recordId: props.id,
|
|
932
|
+
isRetryable: false,
|
|
933
|
+
});
|
|
934
|
+
}
|
|
857
935
|
throw error;
|
|
858
936
|
}
|
|
859
937
|
}
|
|
@@ -953,13 +1031,25 @@ exports.AnalyticsConfiguration = {
|
|
|
953
1031
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
954
1032
|
continue;
|
|
955
1033
|
}
|
|
956
|
-
// Log structured error details and rethrow
|
|
957
|
-
|
|
958
|
-
operation
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1034
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1035
|
+
if (isConnectionError) {
|
|
1036
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1037
|
+
operation: 'getAnalyticsConfiguration',
|
|
1038
|
+
model: 'AnalyticsConfiguration',
|
|
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_1.logger.error("Database get operation failed", {
|
|
1047
|
+
operation: 'getAnalyticsConfiguration',
|
|
1048
|
+
model: 'AnalyticsConfiguration',
|
|
1049
|
+
error: String(error),
|
|
1050
|
+
isRetryable: false,
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
963
1053
|
throw error;
|
|
964
1054
|
}
|
|
965
1055
|
}
|
|
@@ -1046,13 +1136,25 @@ exports.AnalyticsConfiguration = {
|
|
|
1046
1136
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1047
1137
|
continue;
|
|
1048
1138
|
}
|
|
1049
|
-
// Log structured error details and rethrow
|
|
1050
|
-
|
|
1051
|
-
operation
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1139
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1140
|
+
if (isConnectionError) {
|
|
1141
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1142
|
+
operation: 'getAllAnalyticsConfiguration',
|
|
1143
|
+
model: 'AnalyticsConfiguration',
|
|
1144
|
+
error: String(error),
|
|
1145
|
+
isRetryable: true,
|
|
1146
|
+
transient: true,
|
|
1147
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
else {
|
|
1151
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1152
|
+
operation: 'getAllAnalyticsConfiguration',
|
|
1153
|
+
model: 'AnalyticsConfiguration',
|
|
1154
|
+
error: String(error),
|
|
1155
|
+
isRetryable: false,
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1056
1158
|
throw error;
|
|
1057
1159
|
}
|
|
1058
1160
|
}
|
|
@@ -1166,13 +1268,25 @@ exports.AnalyticsConfiguration = {
|
|
|
1166
1268
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1167
1269
|
continue;
|
|
1168
1270
|
}
|
|
1169
|
-
// Log structured error details and rethrow
|
|
1170
|
-
|
|
1171
|
-
operation
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1271
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1272
|
+
if (isConnectionError) {
|
|
1273
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1274
|
+
operation: 'findManyAnalyticsConfiguration',
|
|
1275
|
+
model: 'AnalyticsConfiguration',
|
|
1276
|
+
error: String(error),
|
|
1277
|
+
isRetryable: true,
|
|
1278
|
+
transient: true,
|
|
1279
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
else {
|
|
1283
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1284
|
+
operation: 'findManyAnalyticsConfiguration',
|
|
1285
|
+
model: 'AnalyticsConfiguration',
|
|
1286
|
+
error: String(error),
|
|
1287
|
+
isRetryable: false,
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1176
1290
|
throw error;
|
|
1177
1291
|
}
|
|
1178
1292
|
}
|
package/AnalyticsSnapshot.cjs
CHANGED
|
@@ -140,13 +140,28 @@ exports.AnalyticsSnapshot = {
|
|
|
140
140
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
141
141
|
continue;
|
|
142
142
|
}
|
|
143
|
-
// Log structured error details and rethrow
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
// Log structured error details and rethrow.
|
|
144
|
+
// Demote transient failures to WARN with explicit transient+recoveryHint
|
|
145
|
+
// metadata so log analytics can distinguish recoverable upstream retries
|
|
146
|
+
// from true defects.
|
|
147
|
+
if (isConnectionError) {
|
|
148
|
+
logger_1.logger.warn("Database create operation failed (transient after retries)", {
|
|
149
|
+
operation: 'createOneAnalyticsSnapshot',
|
|
150
|
+
model: 'AnalyticsSnapshot',
|
|
151
|
+
error: String(error),
|
|
152
|
+
isRetryable: true,
|
|
153
|
+
transient: true,
|
|
154
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
logger_1.logger.error("Database create operation failed", {
|
|
159
|
+
operation: 'createOneAnalyticsSnapshot',
|
|
160
|
+
model: 'AnalyticsSnapshot',
|
|
161
|
+
error: String(error),
|
|
162
|
+
isRetryable: false,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
150
165
|
throw error;
|
|
151
166
|
}
|
|
152
167
|
}
|
|
@@ -268,13 +283,25 @@ exports.AnalyticsSnapshot = {
|
|
|
268
283
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
269
284
|
continue;
|
|
270
285
|
}
|
|
271
|
-
// Log structured error details and rethrow
|
|
272
|
-
|
|
273
|
-
operation
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
286
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
287
|
+
if (isConnectionError) {
|
|
288
|
+
logger_1.logger.warn("Database createMany operation failed (transient after retries)", {
|
|
289
|
+
operation: 'createManyAnalyticsSnapshot',
|
|
290
|
+
model: 'AnalyticsSnapshot',
|
|
291
|
+
error: String(error),
|
|
292
|
+
isRetryable: true,
|
|
293
|
+
transient: true,
|
|
294
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
logger_1.logger.error("Database createMany operation failed", {
|
|
299
|
+
operation: 'createManyAnalyticsSnapshot',
|
|
300
|
+
model: 'AnalyticsSnapshot',
|
|
301
|
+
error: String(error),
|
|
302
|
+
isRetryable: false,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
278
305
|
throw error;
|
|
279
306
|
}
|
|
280
307
|
}
|
|
@@ -415,14 +442,27 @@ exports.AnalyticsSnapshot = {
|
|
|
415
442
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
416
443
|
continue;
|
|
417
444
|
}
|
|
418
|
-
// Log structured error details and rethrow
|
|
419
|
-
|
|
420
|
-
operation
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
445
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
446
|
+
if (isConnectionError) {
|
|
447
|
+
logger_1.logger.warn("Database update operation failed (transient after retries)", {
|
|
448
|
+
operation: 'updateOneAnalyticsSnapshot',
|
|
449
|
+
model: 'AnalyticsSnapshot',
|
|
450
|
+
error: String(error),
|
|
451
|
+
recordId: props.id,
|
|
452
|
+
isRetryable: true,
|
|
453
|
+
transient: true,
|
|
454
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
logger_1.logger.error("Database update operation failed", {
|
|
459
|
+
operation: 'updateOneAnalyticsSnapshot',
|
|
460
|
+
model: 'AnalyticsSnapshot',
|
|
461
|
+
error: String(error),
|
|
462
|
+
recordId: props.id,
|
|
463
|
+
isRetryable: false,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
426
466
|
throw error;
|
|
427
467
|
}
|
|
428
468
|
}
|
|
@@ -563,14 +603,27 @@ exports.AnalyticsSnapshot = {
|
|
|
563
603
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
564
604
|
continue;
|
|
565
605
|
}
|
|
566
|
-
// Log structured error details and rethrow
|
|
567
|
-
|
|
568
|
-
operation
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
606
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
607
|
+
if (isConnectionError) {
|
|
608
|
+
logger_1.logger.warn("Database upsert operation failed (transient after retries)", {
|
|
609
|
+
operation: 'upsertOneAnalyticsSnapshot',
|
|
610
|
+
model: 'AnalyticsSnapshot',
|
|
611
|
+
error: String(error),
|
|
612
|
+
recordId: props.id,
|
|
613
|
+
isRetryable: true,
|
|
614
|
+
transient: true,
|
|
615
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
logger_1.logger.error("Database upsert operation failed", {
|
|
620
|
+
operation: 'upsertOneAnalyticsSnapshot',
|
|
621
|
+
model: 'AnalyticsSnapshot',
|
|
622
|
+
error: String(error),
|
|
623
|
+
recordId: props.id,
|
|
624
|
+
isRetryable: false,
|
|
625
|
+
});
|
|
626
|
+
}
|
|
574
627
|
throw error;
|
|
575
628
|
}
|
|
576
629
|
}
|
|
@@ -709,13 +762,25 @@ exports.AnalyticsSnapshot = {
|
|
|
709
762
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
710
763
|
continue;
|
|
711
764
|
}
|
|
712
|
-
// Log structured error details and rethrow
|
|
713
|
-
|
|
714
|
-
operation
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
765
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
766
|
+
if (isConnectionError) {
|
|
767
|
+
logger_1.logger.warn("Database updateMany operation failed (transient after retries)", {
|
|
768
|
+
operation: 'updateManyAnalyticsSnapshot',
|
|
769
|
+
model: 'AnalyticsSnapshot',
|
|
770
|
+
error: String(error),
|
|
771
|
+
isRetryable: true,
|
|
772
|
+
transient: true,
|
|
773
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
logger_1.logger.error("Database updateMany operation failed", {
|
|
778
|
+
operation: 'updateManyAnalyticsSnapshot',
|
|
779
|
+
model: 'AnalyticsSnapshot',
|
|
780
|
+
error: String(error),
|
|
781
|
+
isRetryable: false,
|
|
782
|
+
});
|
|
783
|
+
}
|
|
719
784
|
throw error;
|
|
720
785
|
}
|
|
721
786
|
}
|
|
@@ -838,14 +903,27 @@ exports.AnalyticsSnapshot = {
|
|
|
838
903
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
839
904
|
continue;
|
|
840
905
|
}
|
|
841
|
-
// Log structured error details and rethrow
|
|
842
|
-
|
|
843
|
-
operation
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
906
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
907
|
+
if (isConnectionError) {
|
|
908
|
+
logger_1.logger.warn("Database delete operation failed (transient after retries)", {
|
|
909
|
+
operation: 'deleteOneAnalyticsSnapshot',
|
|
910
|
+
model: 'AnalyticsSnapshot',
|
|
911
|
+
error: String(error),
|
|
912
|
+
recordId: props.id,
|
|
913
|
+
isRetryable: true,
|
|
914
|
+
transient: true,
|
|
915
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
else {
|
|
919
|
+
logger_1.logger.error("Database delete operation failed", {
|
|
920
|
+
operation: 'deleteOneAnalyticsSnapshot',
|
|
921
|
+
model: 'AnalyticsSnapshot',
|
|
922
|
+
error: String(error),
|
|
923
|
+
recordId: props.id,
|
|
924
|
+
isRetryable: false,
|
|
925
|
+
});
|
|
926
|
+
}
|
|
849
927
|
throw error;
|
|
850
928
|
}
|
|
851
929
|
}
|
|
@@ -944,13 +1022,25 @@ exports.AnalyticsSnapshot = {
|
|
|
944
1022
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
945
1023
|
continue;
|
|
946
1024
|
}
|
|
947
|
-
// Log structured error details and rethrow
|
|
948
|
-
|
|
949
|
-
operation
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1025
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1026
|
+
if (isConnectionError) {
|
|
1027
|
+
logger_1.logger.warn("Database get operation failed (transient after retries)", {
|
|
1028
|
+
operation: 'getAnalyticsSnapshot',
|
|
1029
|
+
model: 'AnalyticsSnapshot',
|
|
1030
|
+
error: String(error),
|
|
1031
|
+
isRetryable: true,
|
|
1032
|
+
transient: true,
|
|
1033
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
else {
|
|
1037
|
+
logger_1.logger.error("Database get operation failed", {
|
|
1038
|
+
operation: 'getAnalyticsSnapshot',
|
|
1039
|
+
model: 'AnalyticsSnapshot',
|
|
1040
|
+
error: String(error),
|
|
1041
|
+
isRetryable: false,
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
954
1044
|
throw error;
|
|
955
1045
|
}
|
|
956
1046
|
}
|
|
@@ -1037,13 +1127,25 @@ exports.AnalyticsSnapshot = {
|
|
|
1037
1127
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1038
1128
|
continue;
|
|
1039
1129
|
}
|
|
1040
|
-
// Log structured error details and rethrow
|
|
1041
|
-
|
|
1042
|
-
operation
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1130
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1131
|
+
if (isConnectionError) {
|
|
1132
|
+
logger_1.logger.warn("Database getAll operation failed (transient after retries)", {
|
|
1133
|
+
operation: 'getAllAnalyticsSnapshot',
|
|
1134
|
+
model: 'AnalyticsSnapshot',
|
|
1135
|
+
error: String(error),
|
|
1136
|
+
isRetryable: true,
|
|
1137
|
+
transient: true,
|
|
1138
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
else {
|
|
1142
|
+
logger_1.logger.error("Database getAll operation failed", {
|
|
1143
|
+
operation: 'getAllAnalyticsSnapshot',
|
|
1144
|
+
model: 'AnalyticsSnapshot',
|
|
1145
|
+
error: String(error),
|
|
1146
|
+
isRetryable: false,
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1047
1149
|
throw error;
|
|
1048
1150
|
}
|
|
1049
1151
|
}
|
|
@@ -1154,13 +1256,25 @@ exports.AnalyticsSnapshot = {
|
|
|
1154
1256
|
await new Promise(resolve => setTimeout(resolve, delay));
|
|
1155
1257
|
continue;
|
|
1156
1258
|
}
|
|
1157
|
-
// Log structured error details and rethrow
|
|
1158
|
-
|
|
1159
|
-
operation
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1259
|
+
// Log structured error details and rethrow (transient -> WARN).
|
|
1260
|
+
if (isConnectionError) {
|
|
1261
|
+
logger_1.logger.warn("Database findMany operation failed (transient after retries)", {
|
|
1262
|
+
operation: 'findManyAnalyticsSnapshot',
|
|
1263
|
+
model: 'AnalyticsSnapshot',
|
|
1264
|
+
error: String(error),
|
|
1265
|
+
isRetryable: true,
|
|
1266
|
+
transient: true,
|
|
1267
|
+
recoveryHint: "Upstream caller should retry on next cycle",
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
else {
|
|
1271
|
+
logger_1.logger.error("Database findMany operation failed", {
|
|
1272
|
+
operation: 'findManyAnalyticsSnapshot',
|
|
1273
|
+
model: 'AnalyticsSnapshot',
|
|
1274
|
+
error: String(error),
|
|
1275
|
+
isRetryable: false,
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1164
1278
|
throw error;
|
|
1165
1279
|
}
|
|
1166
1280
|
}
|