@adaptic/backend-legacy 0.0.953 → 0.0.954
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 +207 -36
- package/Account.cjs +207 -36
- package/AccountDecisionRecord.cjs +207 -36
- package/AccountLinkingRequest.cjs +207 -36
- package/Action.cjs +207 -36
- package/Alert.cjs +207 -36
- package/Allocation.cjs +207 -36
- package/AlpacaAccount.cjs +207 -36
- package/AnalyticsConfiguration.cjs +207 -36
- package/AnalyticsSnapshot.cjs +207 -36
- package/Asset.cjs +207 -36
- package/AuditLog.cjs +207 -36
- package/Authenticator.cjs +207 -36
- package/Configuration.cjs +207 -36
- package/ConflictEvent.cjs +207 -36
- package/ConnectionHealthSnapshot.cjs +207 -36
- package/Customer.cjs +207 -36
- package/DeadLetterMessage.cjs +207 -36
- package/DecisionMemorySummary.cjs +207 -36
- package/EconomicEvent.cjs +207 -36
- package/EquityBar.cjs +207 -36
- package/Event.cjs +207 -36
- package/EventSnapshot.cjs +207 -36
- package/FeatureImportanceAnalysis.cjs +207 -36
- package/InstitutionalFlowSignal.cjs +207 -36
- package/InstitutionalHolding.cjs +207 -36
- package/InstitutionalSentimentAlerts.cjs +207 -36
- package/InstitutionalSentimentErrors.cjs +207 -36
- package/InstitutionalSentimentHistory.cjs +207 -36
- package/InstitutionalSentimentMetrics.cjs +207 -36
- package/InviteToken.cjs +207 -36
- package/LinkedProvider.cjs +207 -36
- package/LlmConfiguration.cjs +207 -36
- package/MLModelVersion.cjs +207 -36
- package/MLTrainingData.cjs +207 -36
- package/MarketSentiment.cjs +207 -36
- package/ModelArtifact.cjs +207 -36
- package/ModelVersion.cjs +207 -36
- package/ModelVersionArtifact.cjs +207 -36
- package/NewsArticle.cjs +207 -36
- package/NewsArticleAssetSentiment.cjs +207 -36
- package/OptionsContract.cjs +207 -36
- package/OptionsGreeksHistory.cjs +207 -36
- package/OptionsPosition.cjs +207 -36
- package/OptionsPositionEvent.cjs +207 -36
- package/OptionsTradeExecution.cjs +207 -36
- package/PolicyOverlay.cjs +207 -36
- package/PortfolioGreeksHistory.cjs +207 -36
- package/ScheduledOptionOrder.cjs +207 -36
- package/Session.cjs +207 -36
- package/SignalGeneratorMetrics.cjs +207 -36
- package/SignalLineage.cjs +207 -36
- package/SignalOutcome.cjs +207 -36
- package/SignalPriorityQueue.cjs +207 -36
- package/SyncEvent.cjs +207 -36
- package/SystemAlert.cjs +207 -36
- package/Trade.cjs +207 -36
- package/TradeAuditEvent.cjs +207 -36
- package/TradeExecutionHistory.cjs +207 -36
- package/TradeOutcome.cjs +207 -36
- package/TradingPolicy.cjs +207 -36
- package/User.cjs +207 -36
- package/VerificationToken.cjs +207 -36
- package/WaitlistEntry.cjs +207 -36
- package/client.cjs +2 -0
- package/esm/ABTest.d.ts.map +1 -1
- package/esm/ABTest.js.map +1 -1
- package/esm/ABTest.mjs +189 -18
- package/esm/Account.d.ts.map +1 -1
- package/esm/Account.js.map +1 -1
- package/esm/Account.mjs +189 -18
- package/esm/AccountDecisionRecord.d.ts.map +1 -1
- package/esm/AccountDecisionRecord.js.map +1 -1
- package/esm/AccountDecisionRecord.mjs +189 -18
- package/esm/AccountLinkingRequest.d.ts.map +1 -1
- package/esm/AccountLinkingRequest.js.map +1 -1
- package/esm/AccountLinkingRequest.mjs +189 -18
- package/esm/Action.d.ts.map +1 -1
- package/esm/Action.js.map +1 -1
- package/esm/Action.mjs +189 -18
- package/esm/Alert.d.ts.map +1 -1
- package/esm/Alert.js.map +1 -1
- package/esm/Alert.mjs +189 -18
- package/esm/Allocation.d.ts.map +1 -1
- package/esm/Allocation.js.map +1 -1
- package/esm/Allocation.mjs +189 -18
- package/esm/AlpacaAccount.d.ts.map +1 -1
- package/esm/AlpacaAccount.js.map +1 -1
- package/esm/AlpacaAccount.mjs +189 -18
- package/esm/AnalyticsConfiguration.d.ts.map +1 -1
- package/esm/AnalyticsConfiguration.js.map +1 -1
- package/esm/AnalyticsConfiguration.mjs +189 -18
- package/esm/AnalyticsSnapshot.d.ts.map +1 -1
- package/esm/AnalyticsSnapshot.js.map +1 -1
- package/esm/AnalyticsSnapshot.mjs +189 -18
- package/esm/Asset.d.ts.map +1 -1
- package/esm/Asset.js.map +1 -1
- package/esm/Asset.mjs +189 -18
- package/esm/AuditLog.d.ts.map +1 -1
- package/esm/AuditLog.js.map +1 -1
- package/esm/AuditLog.mjs +189 -18
- package/esm/Authenticator.d.ts.map +1 -1
- package/esm/Authenticator.js.map +1 -1
- package/esm/Authenticator.mjs +189 -18
- package/esm/Configuration.d.ts.map +1 -1
- package/esm/Configuration.js.map +1 -1
- package/esm/Configuration.mjs +189 -18
- package/esm/ConflictEvent.d.ts.map +1 -1
- package/esm/ConflictEvent.js.map +1 -1
- package/esm/ConflictEvent.mjs +189 -18
- package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
- package/esm/ConnectionHealthSnapshot.js.map +1 -1
- package/esm/ConnectionHealthSnapshot.mjs +189 -18
- package/esm/Customer.d.ts.map +1 -1
- package/esm/Customer.js.map +1 -1
- package/esm/Customer.mjs +189 -18
- package/esm/DeadLetterMessage.d.ts.map +1 -1
- package/esm/DeadLetterMessage.js.map +1 -1
- package/esm/DeadLetterMessage.mjs +189 -18
- package/esm/DecisionMemorySummary.d.ts.map +1 -1
- package/esm/DecisionMemorySummary.js.map +1 -1
- package/esm/DecisionMemorySummary.mjs +189 -18
- package/esm/EconomicEvent.d.ts.map +1 -1
- package/esm/EconomicEvent.js.map +1 -1
- package/esm/EconomicEvent.mjs +189 -18
- package/esm/EquityBar.d.ts.map +1 -1
- package/esm/EquityBar.js.map +1 -1
- package/esm/EquityBar.mjs +189 -18
- package/esm/Event.d.ts.map +1 -1
- package/esm/Event.js.map +1 -1
- package/esm/Event.mjs +189 -18
- package/esm/EventSnapshot.d.ts.map +1 -1
- package/esm/EventSnapshot.js.map +1 -1
- package/esm/EventSnapshot.mjs +189 -18
- package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
- package/esm/FeatureImportanceAnalysis.js.map +1 -1
- package/esm/FeatureImportanceAnalysis.mjs +189 -18
- package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
- package/esm/InstitutionalFlowSignal.js.map +1 -1
- package/esm/InstitutionalFlowSignal.mjs +189 -18
- package/esm/InstitutionalHolding.d.ts.map +1 -1
- package/esm/InstitutionalHolding.js.map +1 -1
- package/esm/InstitutionalHolding.mjs +189 -18
- package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
- package/esm/InstitutionalSentimentAlerts.js.map +1 -1
- package/esm/InstitutionalSentimentAlerts.mjs +189 -18
- package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
- package/esm/InstitutionalSentimentErrors.js.map +1 -1
- package/esm/InstitutionalSentimentErrors.mjs +189 -18
- package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
- package/esm/InstitutionalSentimentHistory.js.map +1 -1
- package/esm/InstitutionalSentimentHistory.mjs +189 -18
- package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
- package/esm/InstitutionalSentimentMetrics.js.map +1 -1
- package/esm/InstitutionalSentimentMetrics.mjs +189 -18
- package/esm/InviteToken.d.ts.map +1 -1
- package/esm/InviteToken.js.map +1 -1
- package/esm/InviteToken.mjs +189 -18
- package/esm/LinkedProvider.d.ts.map +1 -1
- package/esm/LinkedProvider.js.map +1 -1
- package/esm/LinkedProvider.mjs +189 -18
- package/esm/LlmConfiguration.d.ts.map +1 -1
- package/esm/LlmConfiguration.js.map +1 -1
- package/esm/LlmConfiguration.mjs +189 -18
- package/esm/MLModelVersion.d.ts.map +1 -1
- package/esm/MLModelVersion.js.map +1 -1
- package/esm/MLModelVersion.mjs +189 -18
- package/esm/MLTrainingData.d.ts.map +1 -1
- package/esm/MLTrainingData.js.map +1 -1
- package/esm/MLTrainingData.mjs +189 -18
- package/esm/MarketSentiment.d.ts.map +1 -1
- package/esm/MarketSentiment.js.map +1 -1
- package/esm/MarketSentiment.mjs +189 -18
- package/esm/ModelArtifact.d.ts.map +1 -1
- package/esm/ModelArtifact.js.map +1 -1
- package/esm/ModelArtifact.mjs +189 -18
- package/esm/ModelVersion.d.ts.map +1 -1
- package/esm/ModelVersion.js.map +1 -1
- package/esm/ModelVersion.mjs +189 -18
- package/esm/ModelVersionArtifact.d.ts.map +1 -1
- package/esm/ModelVersionArtifact.js.map +1 -1
- package/esm/ModelVersionArtifact.mjs +189 -18
- package/esm/NewsArticle.d.ts.map +1 -1
- package/esm/NewsArticle.js.map +1 -1
- package/esm/NewsArticle.mjs +189 -18
- package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/esm/NewsArticleAssetSentiment.js.map +1 -1
- package/esm/NewsArticleAssetSentiment.mjs +189 -18
- package/esm/OptionsContract.d.ts.map +1 -1
- package/esm/OptionsContract.js.map +1 -1
- package/esm/OptionsContract.mjs +189 -18
- package/esm/OptionsGreeksHistory.d.ts.map +1 -1
- package/esm/OptionsGreeksHistory.js.map +1 -1
- package/esm/OptionsGreeksHistory.mjs +189 -18
- package/esm/OptionsPosition.d.ts.map +1 -1
- package/esm/OptionsPosition.js.map +1 -1
- package/esm/OptionsPosition.mjs +189 -18
- package/esm/OptionsPositionEvent.d.ts.map +1 -1
- package/esm/OptionsPositionEvent.js.map +1 -1
- package/esm/OptionsPositionEvent.mjs +189 -18
- package/esm/OptionsTradeExecution.d.ts.map +1 -1
- package/esm/OptionsTradeExecution.js.map +1 -1
- package/esm/OptionsTradeExecution.mjs +189 -18
- package/esm/PolicyOverlay.d.ts.map +1 -1
- package/esm/PolicyOverlay.js.map +1 -1
- package/esm/PolicyOverlay.mjs +189 -18
- package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
- package/esm/PortfolioGreeksHistory.js.map +1 -1
- package/esm/PortfolioGreeksHistory.mjs +189 -18
- package/esm/ScheduledOptionOrder.d.ts.map +1 -1
- package/esm/ScheduledOptionOrder.js.map +1 -1
- package/esm/ScheduledOptionOrder.mjs +189 -18
- package/esm/Session.d.ts.map +1 -1
- package/esm/Session.js.map +1 -1
- package/esm/Session.mjs +189 -18
- package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
- package/esm/SignalGeneratorMetrics.js.map +1 -1
- package/esm/SignalGeneratorMetrics.mjs +189 -18
- package/esm/SignalLineage.d.ts.map +1 -1
- package/esm/SignalLineage.js.map +1 -1
- package/esm/SignalLineage.mjs +189 -18
- package/esm/SignalOutcome.d.ts.map +1 -1
- package/esm/SignalOutcome.js.map +1 -1
- package/esm/SignalOutcome.mjs +189 -18
- package/esm/SignalPriorityQueue.d.ts.map +1 -1
- package/esm/SignalPriorityQueue.js.map +1 -1
- package/esm/SignalPriorityQueue.mjs +189 -18
- package/esm/SyncEvent.d.ts.map +1 -1
- package/esm/SyncEvent.js.map +1 -1
- package/esm/SyncEvent.mjs +189 -18
- package/esm/SystemAlert.d.ts.map +1 -1
- package/esm/SystemAlert.js.map +1 -1
- package/esm/SystemAlert.mjs +189 -18
- package/esm/Trade.d.ts.map +1 -1
- package/esm/Trade.js.map +1 -1
- package/esm/Trade.mjs +189 -18
- package/esm/TradeAuditEvent.d.ts.map +1 -1
- package/esm/TradeAuditEvent.js.map +1 -1
- package/esm/TradeAuditEvent.mjs +189 -18
- package/esm/TradeExecutionHistory.d.ts.map +1 -1
- package/esm/TradeExecutionHistory.js.map +1 -1
- package/esm/TradeExecutionHistory.mjs +189 -18
- package/esm/TradeOutcome.d.ts.map +1 -1
- package/esm/TradeOutcome.js.map +1 -1
- package/esm/TradeOutcome.mjs +189 -18
- package/esm/TradingPolicy.d.ts.map +1 -1
- package/esm/TradingPolicy.js.map +1 -1
- package/esm/TradingPolicy.mjs +189 -18
- package/esm/User.d.ts.map +1 -1
- package/esm/User.js.map +1 -1
- package/esm/User.mjs +189 -18
- package/esm/VerificationToken.d.ts.map +1 -1
- package/esm/VerificationToken.js.map +1 -1
- package/esm/VerificationToken.mjs +189 -18
- package/esm/WaitlistEntry.d.ts.map +1 -1
- package/esm/WaitlistEntry.js.map +1 -1
- package/esm/WaitlistEntry.mjs +189 -18
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js.map +1 -1
- package/esm/client.mjs +2 -0
- package/esm/index.d.ts.map +1 -1
- package/package.json +1 -1
package/Customer.cjs
CHANGED
|
@@ -201,7 +201,7 @@ exports.Customer = {
|
|
|
201
201
|
* @returns The created Customer or null.
|
|
202
202
|
*/
|
|
203
203
|
async create(props, globalClient) {
|
|
204
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
204
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
205
205
|
// Maximum number of retries for database connection issues
|
|
206
206
|
const MAX_RETRIES = 3;
|
|
207
207
|
let retryCount = 0;
|
|
@@ -703,12 +703,31 @@ exports.Customer = {
|
|
|
703
703
|
});
|
|
704
704
|
throw error;
|
|
705
705
|
}
|
|
706
|
-
// Check if this is a database connection error that we should retry
|
|
706
|
+
// Check if this is a database connection error that we should retry.
|
|
707
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
708
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
709
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
707
710
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
708
711
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
709
712
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
710
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
711
|
-
(
|
|
713
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
714
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
715
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
716
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
717
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
718
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
719
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
720
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
721
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
722
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
723
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
724
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
725
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
726
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
727
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
728
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
729
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
730
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
712
731
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
713
732
|
retryCount++;
|
|
714
733
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -743,7 +762,7 @@ exports.Customer = {
|
|
|
743
762
|
* @returns The count of created records or null.
|
|
744
763
|
*/
|
|
745
764
|
async createMany(props, globalClient, options) {
|
|
746
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
765
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
747
766
|
// Maximum number of retries for database connection issues
|
|
748
767
|
const MAX_RETRIES = 3;
|
|
749
768
|
let retryCount = 0;
|
|
@@ -814,12 +833,31 @@ exports.Customer = {
|
|
|
814
833
|
});
|
|
815
834
|
throw error;
|
|
816
835
|
}
|
|
817
|
-
// Check if this is a database connection error that we should retry
|
|
836
|
+
// Check if this is a database connection error that we should retry.
|
|
837
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
838
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
839
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
818
840
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
819
841
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
820
842
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
821
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
822
|
-
(
|
|
843
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
844
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
845
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
846
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
847
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
848
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
849
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
850
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
851
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
852
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
853
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
854
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
855
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
856
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
857
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
858
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
859
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
860
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
823
861
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
824
862
|
retryCount++;
|
|
825
863
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -853,7 +891,7 @@ exports.Customer = {
|
|
|
853
891
|
* @returns The updated Customer or null.
|
|
854
892
|
*/
|
|
855
893
|
async update(props, globalClient) {
|
|
856
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
894
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
857
895
|
// Maximum number of retries for database connection issues
|
|
858
896
|
const MAX_RETRIES = 3;
|
|
859
897
|
let retryCount = 0;
|
|
@@ -2503,12 +2541,31 @@ exports.Customer = {
|
|
|
2503
2541
|
});
|
|
2504
2542
|
throw error;
|
|
2505
2543
|
}
|
|
2506
|
-
// Check if this is a database connection error that we should retry
|
|
2544
|
+
// Check if this is a database connection error that we should retry.
|
|
2545
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
2546
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
2547
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
2507
2548
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
2508
2549
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
2509
2550
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
2510
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
2511
|
-
(
|
|
2551
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
2552
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
2553
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
2554
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
2555
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
2556
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
2557
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
2558
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
2559
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
2560
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
2561
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
2562
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
2563
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
2564
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
2565
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
2566
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
2567
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
2568
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
2512
2569
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
2513
2570
|
retryCount++;
|
|
2514
2571
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -2544,7 +2601,7 @@ exports.Customer = {
|
|
|
2544
2601
|
* @returns The updated Customer or null.
|
|
2545
2602
|
*/
|
|
2546
2603
|
async upsert(props, globalClient) {
|
|
2547
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
2604
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
2548
2605
|
// Maximum number of retries for database connection issues
|
|
2549
2606
|
const MAX_RETRIES = 3;
|
|
2550
2607
|
let retryCount = 0;
|
|
@@ -4638,12 +4695,31 @@ exports.Customer = {
|
|
|
4638
4695
|
});
|
|
4639
4696
|
throw error;
|
|
4640
4697
|
}
|
|
4641
|
-
// Check if this is a database connection error that we should retry
|
|
4698
|
+
// Check if this is a database connection error that we should retry.
|
|
4699
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
4700
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
4701
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
4642
4702
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
4643
4703
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
4644
4704
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
4645
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
4646
|
-
(
|
|
4705
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
4706
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
4707
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
4708
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
4709
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
4710
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
4711
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
4712
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
4713
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
4714
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
4715
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
4716
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
4717
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
4718
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
4719
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
4720
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
4721
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
4722
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
4647
4723
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
4648
4724
|
retryCount++;
|
|
4649
4725
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -4679,7 +4755,7 @@ exports.Customer = {
|
|
|
4679
4755
|
* @returns The count of created records or null.
|
|
4680
4756
|
*/
|
|
4681
4757
|
async updateMany(props, globalClient) {
|
|
4682
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
4758
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
4683
4759
|
// Maximum number of retries for database connection issues
|
|
4684
4760
|
const MAX_RETRIES = 3;
|
|
4685
4761
|
let retryCount = 0;
|
|
@@ -6328,12 +6404,31 @@ exports.Customer = {
|
|
|
6328
6404
|
});
|
|
6329
6405
|
throw error;
|
|
6330
6406
|
}
|
|
6331
|
-
// Check if this is a database connection error that we should retry
|
|
6407
|
+
// Check if this is a database connection error that we should retry.
|
|
6408
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
6409
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
6410
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
6332
6411
|
const isConnectionError = ((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('Server has closed the connection')) ||
|
|
6333
6412
|
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Cannot reach database server')) ||
|
|
6334
6413
|
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Connection timed out')) ||
|
|
6335
|
-
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('
|
|
6336
|
-
(
|
|
6414
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('aborted due to timeout')) ||
|
|
6415
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('TimeoutError')) ||
|
|
6416
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('fetch failed')) ||
|
|
6417
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('socket hang up')) ||
|
|
6418
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('ECONNRESET')) ||
|
|
6419
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('ECONNREFUSED')) ||
|
|
6420
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ETIMEDOUT')) ||
|
|
6421
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('Connection pool timeout')) ||
|
|
6422
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('P2024')) ||
|
|
6423
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('status code 408')) ||
|
|
6424
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('status code 502')) ||
|
|
6425
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 503')) ||
|
|
6426
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 504')) ||
|
|
6427
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
6428
|
+
(error.networkError && (((_2 = error.networkError.message) === null || _2 === void 0 ? void 0 : _2.includes('Failed to fetch')) ||
|
|
6429
|
+
((_3 = error.networkError.message) === null || _3 === void 0 ? void 0 : _3.includes('fetch failed')) ||
|
|
6430
|
+
((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('aborted due to timeout')) ||
|
|
6431
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('TimeoutError'))));
|
|
6337
6432
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
6338
6433
|
retryCount++;
|
|
6339
6434
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -6367,7 +6462,7 @@ exports.Customer = {
|
|
|
6367
6462
|
* @returns The deleted Customer or null.
|
|
6368
6463
|
*/
|
|
6369
6464
|
async delete(props, globalClient) {
|
|
6370
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
6465
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
6371
6466
|
// Maximum number of retries for database connection issues
|
|
6372
6467
|
const MAX_RETRIES = 3;
|
|
6373
6468
|
let retryCount = 0;
|
|
@@ -6436,12 +6531,31 @@ exports.Customer = {
|
|
|
6436
6531
|
});
|
|
6437
6532
|
throw error;
|
|
6438
6533
|
}
|
|
6439
|
-
// Check if this is a database connection error that we should retry
|
|
6534
|
+
// Check if this is a database connection error that we should retry.
|
|
6535
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
6536
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
6537
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
6440
6538
|
const isConnectionError = ((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('Server has closed the connection')) ||
|
|
6441
6539
|
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Cannot reach database server')) ||
|
|
6442
6540
|
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('Connection timed out')) ||
|
|
6443
|
-
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('
|
|
6444
|
-
(
|
|
6541
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('aborted due to timeout')) ||
|
|
6542
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('TimeoutError')) ||
|
|
6543
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('fetch failed')) ||
|
|
6544
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('socket hang up')) ||
|
|
6545
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('ECONNRESET')) ||
|
|
6546
|
+
((_v = error.message) === null || _v === void 0 ? void 0 : _v.includes('ECONNREFUSED')) ||
|
|
6547
|
+
((_w = error.message) === null || _w === void 0 ? void 0 : _w.includes('ETIMEDOUT')) ||
|
|
6548
|
+
((_x = error.message) === null || _x === void 0 ? void 0 : _x.includes('Connection pool timeout')) ||
|
|
6549
|
+
((_y = error.message) === null || _y === void 0 ? void 0 : _y.includes('P2024')) ||
|
|
6550
|
+
((_z = error.message) === null || _z === void 0 ? void 0 : _z.includes('status code 408')) ||
|
|
6551
|
+
((_0 = error.message) === null || _0 === void 0 ? void 0 : _0.includes('status code 502')) ||
|
|
6552
|
+
((_1 = error.message) === null || _1 === void 0 ? void 0 : _1.includes('status code 503')) ||
|
|
6553
|
+
((_2 = error.message) === null || _2 === void 0 ? void 0 : _2.includes('status code 504')) ||
|
|
6554
|
+
((_3 = error.message) === null || _3 === void 0 ? void 0 : _3.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
6555
|
+
(error.networkError && (((_4 = error.networkError.message) === null || _4 === void 0 ? void 0 : _4.includes('Failed to fetch')) ||
|
|
6556
|
+
((_5 = error.networkError.message) === null || _5 === void 0 ? void 0 : _5.includes('fetch failed')) ||
|
|
6557
|
+
((_6 = error.networkError.message) === null || _6 === void 0 ? void 0 : _6.includes('aborted due to timeout')) ||
|
|
6558
|
+
((_7 = error.networkError.message) === null || _7 === void 0 ? void 0 : _7.includes('TimeoutError'))));
|
|
6445
6559
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
6446
6560
|
retryCount++;
|
|
6447
6561
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -6478,7 +6592,7 @@ exports.Customer = {
|
|
|
6478
6592
|
* @returns The retrieved Customer or null.
|
|
6479
6593
|
*/
|
|
6480
6594
|
async get(props, globalClient, whereInput) {
|
|
6481
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
6595
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
6482
6596
|
// Maximum number of retries for database connection issues
|
|
6483
6597
|
const MAX_RETRIES = 3;
|
|
6484
6598
|
let retryCount = 0;
|
|
@@ -6531,12 +6645,31 @@ exports.Customer = {
|
|
|
6531
6645
|
if (error.message === 'No Customer found') {
|
|
6532
6646
|
return null;
|
|
6533
6647
|
}
|
|
6534
|
-
// Check if this is a database connection error that we should retry
|
|
6648
|
+
// Check if this is a database connection error that we should retry.
|
|
6649
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
6650
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
6651
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
6535
6652
|
const isConnectionError = ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Server has closed the connection')) ||
|
|
6536
6653
|
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Cannot reach database server')) ||
|
|
6537
6654
|
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('Connection timed out')) ||
|
|
6538
|
-
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('
|
|
6539
|
-
(
|
|
6655
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('aborted due to timeout')) ||
|
|
6656
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('TimeoutError')) ||
|
|
6657
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('fetch failed')) ||
|
|
6658
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('socket hang up')) ||
|
|
6659
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('ECONNRESET')) ||
|
|
6660
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('ECONNREFUSED')) ||
|
|
6661
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('ETIMEDOUT')) ||
|
|
6662
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Connection pool timeout')) ||
|
|
6663
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('P2024')) ||
|
|
6664
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('status code 408')) ||
|
|
6665
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('status code 502')) ||
|
|
6666
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('status code 503')) ||
|
|
6667
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('status code 504')) ||
|
|
6668
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
6669
|
+
(error.networkError && (((_v = error.networkError.message) === null || _v === void 0 ? void 0 : _v.includes('Failed to fetch')) ||
|
|
6670
|
+
((_w = error.networkError.message) === null || _w === void 0 ? void 0 : _w.includes('fetch failed')) ||
|
|
6671
|
+
((_x = error.networkError.message) === null || _x === void 0 ? void 0 : _x.includes('aborted due to timeout')) ||
|
|
6672
|
+
((_y = error.networkError.message) === null || _y === void 0 ? void 0 : _y.includes('TimeoutError'))));
|
|
6540
6673
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
6541
6674
|
retryCount++;
|
|
6542
6675
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -6569,7 +6702,7 @@ exports.Customer = {
|
|
|
6569
6702
|
* @returns An array of Customer records or null.
|
|
6570
6703
|
*/
|
|
6571
6704
|
async getAll(globalClient) {
|
|
6572
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
6705
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
6573
6706
|
// Maximum number of retries for database connection issues
|
|
6574
6707
|
const MAX_RETRIES = 3;
|
|
6575
6708
|
let retryCount = 0;
|
|
@@ -6604,12 +6737,31 @@ exports.Customer = {
|
|
|
6604
6737
|
if (error.message === 'No Customer found') {
|
|
6605
6738
|
return null;
|
|
6606
6739
|
}
|
|
6607
|
-
// Check if this is a database connection error that we should retry
|
|
6740
|
+
// Check if this is a database connection error that we should retry.
|
|
6741
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
6742
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
6743
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
6608
6744
|
const isConnectionError = ((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Server has closed the connection')) ||
|
|
6609
6745
|
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('Cannot reach database server')) ||
|
|
6610
6746
|
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('Connection timed out')) ||
|
|
6611
|
-
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('
|
|
6612
|
-
(
|
|
6747
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('aborted due to timeout')) ||
|
|
6748
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('TimeoutError')) ||
|
|
6749
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('fetch failed')) ||
|
|
6750
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('socket hang up')) ||
|
|
6751
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('ECONNRESET')) ||
|
|
6752
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('ECONNREFUSED')) ||
|
|
6753
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('ETIMEDOUT')) ||
|
|
6754
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('Connection pool timeout')) ||
|
|
6755
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('P2024')) ||
|
|
6756
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('status code 408')) ||
|
|
6757
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('status code 502')) ||
|
|
6758
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('status code 503')) ||
|
|
6759
|
+
((_t = error.message) === null || _t === void 0 ? void 0 : _t.includes('status code 504')) ||
|
|
6760
|
+
((_u = error.message) === null || _u === void 0 ? void 0 : _u.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
6761
|
+
(error.networkError && (((_v = error.networkError.message) === null || _v === void 0 ? void 0 : _v.includes('Failed to fetch')) ||
|
|
6762
|
+
((_w = error.networkError.message) === null || _w === void 0 ? void 0 : _w.includes('fetch failed')) ||
|
|
6763
|
+
((_x = error.networkError.message) === null || _x === void 0 ? void 0 : _x.includes('aborted due to timeout')) ||
|
|
6764
|
+
((_y = error.networkError.message) === null || _y === void 0 ? void 0 : _y.includes('TimeoutError'))));
|
|
6613
6765
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
6614
6766
|
retryCount++;
|
|
6615
6767
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|
|
@@ -6644,7 +6796,7 @@ exports.Customer = {
|
|
|
6644
6796
|
* @returns An array of found Customer records or null.
|
|
6645
6797
|
*/
|
|
6646
6798
|
async findMany(props, globalClient, whereInput) {
|
|
6647
|
-
var _a, _b, _c, _d, _e;
|
|
6799
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
6648
6800
|
// Maximum number of retries for database connection issues
|
|
6649
6801
|
const MAX_RETRIES = 3;
|
|
6650
6802
|
let retryCount = 0;
|
|
@@ -6713,12 +6865,31 @@ exports.Customer = {
|
|
|
6713
6865
|
if (error.message === 'No Customer found') {
|
|
6714
6866
|
return null;
|
|
6715
6867
|
}
|
|
6716
|
-
// Check if this is a database connection error that we should retry
|
|
6868
|
+
// Check if this is a database connection error that we should retry.
|
|
6869
|
+
// Covers undici/fetch timeouts, Prisma Accelerate transients, connection
|
|
6870
|
+
// pool exhaustion, and transient gateway statuses. Must stay consistent
|
|
6871
|
+
// with the transient classifier in client.ts (onError link + enqueueOperation).
|
|
6717
6872
|
const isConnectionError = ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('Server has closed the connection')) ||
|
|
6718
6873
|
((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('Cannot reach database server')) ||
|
|
6719
6874
|
((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('Connection timed out')) ||
|
|
6720
|
-
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('
|
|
6721
|
-
(
|
|
6875
|
+
((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('aborted due to timeout')) ||
|
|
6876
|
+
((_e = error.message) === null || _e === void 0 ? void 0 : _e.includes('TimeoutError')) ||
|
|
6877
|
+
((_f = error.message) === null || _f === void 0 ? void 0 : _f.includes('fetch failed')) ||
|
|
6878
|
+
((_g = error.message) === null || _g === void 0 ? void 0 : _g.includes('socket hang up')) ||
|
|
6879
|
+
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('ECONNRESET')) ||
|
|
6880
|
+
((_j = error.message) === null || _j === void 0 ? void 0 : _j.includes('ECONNREFUSED')) ||
|
|
6881
|
+
((_k = error.message) === null || _k === void 0 ? void 0 : _k.includes('ETIMEDOUT')) ||
|
|
6882
|
+
((_l = error.message) === null || _l === void 0 ? void 0 : _l.includes('Connection pool timeout')) ||
|
|
6883
|
+
((_m = error.message) === null || _m === void 0 ? void 0 : _m.includes('P2024')) ||
|
|
6884
|
+
((_o = error.message) === null || _o === void 0 ? void 0 : _o.includes('status code 408')) ||
|
|
6885
|
+
((_p = error.message) === null || _p === void 0 ? void 0 : _p.includes('status code 502')) ||
|
|
6886
|
+
((_q = error.message) === null || _q === void 0 ? void 0 : _q.includes('status code 503')) ||
|
|
6887
|
+
((_r = error.message) === null || _r === void 0 ? void 0 : _r.includes('status code 504')) ||
|
|
6888
|
+
((_s = error.message) === null || _s === void 0 ? void 0 : _s.includes('Accelerate')) || // Prisma Accelerate proxy errors
|
|
6889
|
+
(error.networkError && (((_t = error.networkError.message) === null || _t === void 0 ? void 0 : _t.includes('Failed to fetch')) ||
|
|
6890
|
+
((_u = error.networkError.message) === null || _u === void 0 ? void 0 : _u.includes('fetch failed')) ||
|
|
6891
|
+
((_v = error.networkError.message) === null || _v === void 0 ? void 0 : _v.includes('aborted due to timeout')) ||
|
|
6892
|
+
((_w = error.networkError.message) === null || _w === void 0 ? void 0 : _w.includes('TimeoutError'))));
|
|
6722
6893
|
if (isConnectionError && retryCount < MAX_RETRIES - 1) {
|
|
6723
6894
|
retryCount++;
|
|
6724
6895
|
const delay = Math.pow(2, retryCount) * 100; // Exponential backoff: 200ms, 400ms, 800ms
|