@adaptic/backend-legacy 0.0.918 → 0.0.920
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 +6 -5
- package/ABTest.d.ts +4 -1
- package/Account.cjs +6 -5
- package/Account.d.ts +4 -1
- package/AccountDecisionRecord.cjs +6 -5
- package/AccountDecisionRecord.d.ts +4 -1
- package/AccountLinkingRequest.cjs +6 -5
- package/AccountLinkingRequest.d.ts +4 -1
- package/Action.cjs +6 -5
- package/Action.d.ts +4 -1
- package/Alert.cjs +6 -5
- package/Alert.d.ts +4 -1
- package/Allocation.cjs +6 -5
- package/Allocation.d.ts +4 -1
- package/AlpacaAccount.cjs +6 -5
- package/AlpacaAccount.d.ts +4 -1
- package/AnalyticsConfiguration.cjs +6 -5
- package/AnalyticsConfiguration.d.ts +4 -1
- package/AnalyticsSnapshot.cjs +6 -5
- package/AnalyticsSnapshot.d.ts +4 -1
- package/Asset.cjs +6 -5
- package/Asset.d.ts +4 -1
- package/AuditLog.cjs +6 -5
- package/AuditLog.d.ts +4 -1
- package/Authenticator.cjs +6 -5
- package/Authenticator.d.ts +4 -1
- package/Configuration.cjs +6 -5
- package/Configuration.d.ts +4 -1
- package/ConflictEvent.cjs +6 -5
- package/ConflictEvent.d.ts +4 -1
- package/ConnectionHealthSnapshot.cjs +6 -5
- package/ConnectionHealthSnapshot.d.ts +4 -1
- package/Customer.cjs +6 -5
- package/Customer.d.ts +4 -1
- package/DeadLetterMessage.cjs +6 -5
- package/DeadLetterMessage.d.ts +4 -1
- package/DecisionMemorySummary.cjs +6 -5
- package/DecisionMemorySummary.d.ts +4 -1
- package/EconomicEvent.cjs +6 -5
- package/EconomicEvent.d.ts +4 -1
- package/EquityBar.cjs +6 -5
- package/EquityBar.d.ts +4 -1
- package/Event.cjs +6 -5
- package/Event.d.ts +4 -1
- package/EventSnapshot.cjs +6 -5
- package/EventSnapshot.d.ts +4 -1
- package/FeatureImportanceAnalysis.cjs +6 -5
- package/FeatureImportanceAnalysis.d.ts +4 -1
- package/InstitutionalFlowSignal.cjs +6 -5
- package/InstitutionalFlowSignal.d.ts +4 -1
- package/InstitutionalHolding.cjs +6 -5
- package/InstitutionalHolding.d.ts +4 -1
- package/InstitutionalSentimentAlerts.cjs +6 -5
- package/InstitutionalSentimentAlerts.d.ts +4 -1
- package/InstitutionalSentimentErrors.cjs +6 -5
- package/InstitutionalSentimentErrors.d.ts +4 -1
- package/InstitutionalSentimentHistory.cjs +6 -5
- package/InstitutionalSentimentHistory.d.ts +4 -1
- package/InstitutionalSentimentMetrics.cjs +6 -5
- package/InstitutionalSentimentMetrics.d.ts +4 -1
- package/InviteToken.cjs +6 -5
- package/InviteToken.d.ts +4 -1
- package/LinkedProvider.cjs +6 -5
- package/LinkedProvider.d.ts +4 -1
- package/LlmConfiguration.cjs +6 -5
- package/LlmConfiguration.d.ts +4 -1
- package/MLTrainingData.cjs +6 -5
- package/MLTrainingData.d.ts +4 -1
- package/MarketSentiment.cjs +6 -5
- package/MarketSentiment.d.ts +4 -1
- package/ModelArtifact.cjs +6 -5
- package/ModelArtifact.d.ts +4 -1
- package/ModelVersion.cjs +6 -5
- package/ModelVersion.d.ts +4 -1
- package/ModelVersionArtifact.cjs +6 -5
- package/ModelVersionArtifact.d.ts +4 -1
- package/NewsArticle.cjs +6 -5
- package/NewsArticle.d.ts +4 -1
- package/NewsArticleAssetSentiment.cjs +6 -5
- package/NewsArticleAssetSentiment.d.ts +4 -1
- package/OptionsContract.cjs +6 -5
- package/OptionsContract.d.ts +4 -1
- package/OptionsGreeksHistory.cjs +6 -5
- package/OptionsGreeksHistory.d.ts +4 -1
- package/OptionsPosition.cjs +6 -5
- package/OptionsPosition.d.ts +4 -1
- package/OptionsTradeExecution.cjs +6 -5
- package/OptionsTradeExecution.d.ts +4 -1
- package/PolicyOverlay.cjs +6 -5
- package/PolicyOverlay.d.ts +4 -1
- package/PortfolioGreeksHistory.cjs +6 -5
- package/PortfolioGreeksHistory.d.ts +4 -1
- package/ScheduledOptionOrder.cjs +6 -5
- package/ScheduledOptionOrder.d.ts +4 -1
- package/Session.cjs +6 -5
- package/Session.d.ts +4 -1
- package/SignalGeneratorMetrics.cjs +6 -5
- package/SignalGeneratorMetrics.d.ts +4 -1
- package/SignalLineage.cjs +6 -5
- package/SignalLineage.d.ts +4 -1
- package/SignalOutcome.cjs +6 -5
- package/SignalOutcome.d.ts +4 -1
- package/SignalPriorityQueue.cjs +6 -5
- package/SignalPriorityQueue.d.ts +4 -1
- package/SyncEvent.cjs +6 -5
- package/SyncEvent.d.ts +4 -1
- package/SystemAlert.cjs +6 -5
- package/SystemAlert.d.ts +4 -1
- package/Trade.cjs +6 -5
- package/Trade.d.ts +4 -1
- package/TradeAuditEvent.cjs +6 -5
- package/TradeAuditEvent.d.ts +4 -1
- package/TradeExecutionHistory.cjs +9 -5
- package/TradeExecutionHistory.d.ts +4 -1
- package/TradingPolicy.cjs +6 -5
- package/TradingPolicy.d.ts +4 -1
- package/User.cjs +6 -5
- package/User.d.ts +4 -1
- package/VerificationToken.cjs +6 -5
- package/VerificationToken.d.ts +4 -1
- package/WaitlistEntry.cjs +6 -5
- package/WaitlistEntry.d.ts +4 -1
- package/esm/ABTest.d.ts +4 -1
- package/esm/ABTest.d.ts.map +1 -1
- package/esm/ABTest.js.map +1 -1
- package/esm/ABTest.mjs +6 -5
- package/esm/Account.d.ts +4 -1
- package/esm/Account.d.ts.map +1 -1
- package/esm/Account.js.map +1 -1
- package/esm/Account.mjs +6 -5
- package/esm/AccountDecisionRecord.d.ts +4 -1
- package/esm/AccountDecisionRecord.d.ts.map +1 -1
- package/esm/AccountDecisionRecord.js.map +1 -1
- package/esm/AccountDecisionRecord.mjs +6 -5
- package/esm/AccountLinkingRequest.d.ts +4 -1
- package/esm/AccountLinkingRequest.d.ts.map +1 -1
- package/esm/AccountLinkingRequest.js.map +1 -1
- package/esm/AccountLinkingRequest.mjs +6 -5
- package/esm/Action.d.ts +4 -1
- package/esm/Action.d.ts.map +1 -1
- package/esm/Action.js.map +1 -1
- package/esm/Action.mjs +6 -5
- package/esm/Alert.d.ts +4 -1
- package/esm/Alert.d.ts.map +1 -1
- package/esm/Alert.js.map +1 -1
- package/esm/Alert.mjs +6 -5
- package/esm/Allocation.d.ts +4 -1
- package/esm/Allocation.d.ts.map +1 -1
- package/esm/Allocation.js.map +1 -1
- package/esm/Allocation.mjs +6 -5
- package/esm/AlpacaAccount.d.ts +4 -1
- package/esm/AlpacaAccount.d.ts.map +1 -1
- package/esm/AlpacaAccount.js.map +1 -1
- package/esm/AlpacaAccount.mjs +6 -5
- package/esm/AnalyticsConfiguration.d.ts +4 -1
- package/esm/AnalyticsConfiguration.d.ts.map +1 -1
- package/esm/AnalyticsConfiguration.js.map +1 -1
- package/esm/AnalyticsConfiguration.mjs +6 -5
- package/esm/AnalyticsSnapshot.d.ts +4 -1
- package/esm/AnalyticsSnapshot.d.ts.map +1 -1
- package/esm/AnalyticsSnapshot.js.map +1 -1
- package/esm/AnalyticsSnapshot.mjs +6 -5
- package/esm/Asset.d.ts +4 -1
- package/esm/Asset.d.ts.map +1 -1
- package/esm/Asset.js.map +1 -1
- package/esm/Asset.mjs +6 -5
- package/esm/AuditLog.d.ts +4 -1
- package/esm/AuditLog.d.ts.map +1 -1
- package/esm/AuditLog.js.map +1 -1
- package/esm/AuditLog.mjs +6 -5
- package/esm/Authenticator.d.ts +4 -1
- package/esm/Authenticator.d.ts.map +1 -1
- package/esm/Authenticator.js.map +1 -1
- package/esm/Authenticator.mjs +6 -5
- package/esm/Configuration.d.ts +4 -1
- package/esm/Configuration.d.ts.map +1 -1
- package/esm/Configuration.js.map +1 -1
- package/esm/Configuration.mjs +6 -5
- package/esm/ConflictEvent.d.ts +4 -1
- package/esm/ConflictEvent.d.ts.map +1 -1
- package/esm/ConflictEvent.js.map +1 -1
- package/esm/ConflictEvent.mjs +6 -5
- package/esm/ConnectionHealthSnapshot.d.ts +4 -1
- package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
- package/esm/ConnectionHealthSnapshot.js.map +1 -1
- package/esm/ConnectionHealthSnapshot.mjs +6 -5
- package/esm/Customer.d.ts +4 -1
- package/esm/Customer.d.ts.map +1 -1
- package/esm/Customer.js.map +1 -1
- package/esm/Customer.mjs +6 -5
- package/esm/DeadLetterMessage.d.ts +4 -1
- package/esm/DeadLetterMessage.d.ts.map +1 -1
- package/esm/DeadLetterMessage.js.map +1 -1
- package/esm/DeadLetterMessage.mjs +6 -5
- package/esm/DecisionMemorySummary.d.ts +4 -1
- package/esm/DecisionMemorySummary.d.ts.map +1 -1
- package/esm/DecisionMemorySummary.js.map +1 -1
- package/esm/DecisionMemorySummary.mjs +6 -5
- package/esm/EconomicEvent.d.ts +4 -1
- package/esm/EconomicEvent.d.ts.map +1 -1
- package/esm/EconomicEvent.js.map +1 -1
- package/esm/EconomicEvent.mjs +6 -5
- package/esm/EquityBar.d.ts +4 -1
- package/esm/EquityBar.d.ts.map +1 -1
- package/esm/EquityBar.js.map +1 -1
- package/esm/EquityBar.mjs +6 -5
- package/esm/Event.d.ts +4 -1
- package/esm/Event.d.ts.map +1 -1
- package/esm/Event.js.map +1 -1
- package/esm/Event.mjs +6 -5
- package/esm/EventSnapshot.d.ts +4 -1
- package/esm/EventSnapshot.d.ts.map +1 -1
- package/esm/EventSnapshot.js.map +1 -1
- package/esm/EventSnapshot.mjs +6 -5
- package/esm/FeatureImportanceAnalysis.d.ts +4 -1
- package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
- package/esm/FeatureImportanceAnalysis.js.map +1 -1
- package/esm/FeatureImportanceAnalysis.mjs +6 -5
- package/esm/InstitutionalFlowSignal.d.ts +4 -1
- package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
- package/esm/InstitutionalFlowSignal.js.map +1 -1
- package/esm/InstitutionalFlowSignal.mjs +6 -5
- package/esm/InstitutionalHolding.d.ts +4 -1
- package/esm/InstitutionalHolding.d.ts.map +1 -1
- package/esm/InstitutionalHolding.js.map +1 -1
- package/esm/InstitutionalHolding.mjs +6 -5
- package/esm/InstitutionalSentimentAlerts.d.ts +4 -1
- package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
- package/esm/InstitutionalSentimentAlerts.js.map +1 -1
- package/esm/InstitutionalSentimentAlerts.mjs +6 -5
- package/esm/InstitutionalSentimentErrors.d.ts +4 -1
- package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
- package/esm/InstitutionalSentimentErrors.js.map +1 -1
- package/esm/InstitutionalSentimentErrors.mjs +6 -5
- package/esm/InstitutionalSentimentHistory.d.ts +4 -1
- package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
- package/esm/InstitutionalSentimentHistory.js.map +1 -1
- package/esm/InstitutionalSentimentHistory.mjs +6 -5
- package/esm/InstitutionalSentimentMetrics.d.ts +4 -1
- package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
- package/esm/InstitutionalSentimentMetrics.js.map +1 -1
- package/esm/InstitutionalSentimentMetrics.mjs +6 -5
- package/esm/InviteToken.d.ts +4 -1
- package/esm/InviteToken.d.ts.map +1 -1
- package/esm/InviteToken.js.map +1 -1
- package/esm/InviteToken.mjs +6 -5
- package/esm/LinkedProvider.d.ts +4 -1
- package/esm/LinkedProvider.d.ts.map +1 -1
- package/esm/LinkedProvider.js.map +1 -1
- package/esm/LinkedProvider.mjs +6 -5
- package/esm/LlmConfiguration.d.ts +4 -1
- package/esm/LlmConfiguration.d.ts.map +1 -1
- package/esm/LlmConfiguration.js.map +1 -1
- package/esm/LlmConfiguration.mjs +6 -5
- package/esm/MLTrainingData.d.ts +4 -1
- package/esm/MLTrainingData.d.ts.map +1 -1
- package/esm/MLTrainingData.js.map +1 -1
- package/esm/MLTrainingData.mjs +6 -5
- package/esm/MarketSentiment.d.ts +4 -1
- package/esm/MarketSentiment.d.ts.map +1 -1
- package/esm/MarketSentiment.js.map +1 -1
- package/esm/MarketSentiment.mjs +6 -5
- package/esm/ModelArtifact.d.ts +4 -1
- package/esm/ModelArtifact.d.ts.map +1 -1
- package/esm/ModelArtifact.js.map +1 -1
- package/esm/ModelArtifact.mjs +6 -5
- package/esm/ModelVersion.d.ts +4 -1
- package/esm/ModelVersion.d.ts.map +1 -1
- package/esm/ModelVersion.js.map +1 -1
- package/esm/ModelVersion.mjs +6 -5
- package/esm/ModelVersionArtifact.d.ts +4 -1
- package/esm/ModelVersionArtifact.d.ts.map +1 -1
- package/esm/ModelVersionArtifact.js.map +1 -1
- package/esm/ModelVersionArtifact.mjs +6 -5
- package/esm/NewsArticle.d.ts +4 -1
- package/esm/NewsArticle.d.ts.map +1 -1
- package/esm/NewsArticle.js.map +1 -1
- package/esm/NewsArticle.mjs +6 -5
- package/esm/NewsArticleAssetSentiment.d.ts +4 -1
- package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/esm/NewsArticleAssetSentiment.js.map +1 -1
- package/esm/NewsArticleAssetSentiment.mjs +6 -5
- package/esm/OptionsContract.d.ts +4 -1
- package/esm/OptionsContract.d.ts.map +1 -1
- package/esm/OptionsContract.js.map +1 -1
- package/esm/OptionsContract.mjs +6 -5
- package/esm/OptionsGreeksHistory.d.ts +4 -1
- package/esm/OptionsGreeksHistory.d.ts.map +1 -1
- package/esm/OptionsGreeksHistory.js.map +1 -1
- package/esm/OptionsGreeksHistory.mjs +6 -5
- package/esm/OptionsPosition.d.ts +4 -1
- package/esm/OptionsPosition.d.ts.map +1 -1
- package/esm/OptionsPosition.js.map +1 -1
- package/esm/OptionsPosition.mjs +6 -5
- package/esm/OptionsTradeExecution.d.ts +4 -1
- package/esm/OptionsTradeExecution.d.ts.map +1 -1
- package/esm/OptionsTradeExecution.js.map +1 -1
- package/esm/OptionsTradeExecution.mjs +6 -5
- package/esm/PolicyOverlay.d.ts +4 -1
- package/esm/PolicyOverlay.d.ts.map +1 -1
- package/esm/PolicyOverlay.js.map +1 -1
- package/esm/PolicyOverlay.mjs +6 -5
- package/esm/PortfolioGreeksHistory.d.ts +4 -1
- package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
- package/esm/PortfolioGreeksHistory.js.map +1 -1
- package/esm/PortfolioGreeksHistory.mjs +6 -5
- package/esm/ScheduledOptionOrder.d.ts +4 -1
- package/esm/ScheduledOptionOrder.d.ts.map +1 -1
- package/esm/ScheduledOptionOrder.js.map +1 -1
- package/esm/ScheduledOptionOrder.mjs +6 -5
- package/esm/Session.d.ts +4 -1
- package/esm/Session.d.ts.map +1 -1
- package/esm/Session.js.map +1 -1
- package/esm/Session.mjs +6 -5
- package/esm/SignalGeneratorMetrics.d.ts +4 -1
- package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
- package/esm/SignalGeneratorMetrics.js.map +1 -1
- package/esm/SignalGeneratorMetrics.mjs +6 -5
- package/esm/SignalLineage.d.ts +4 -1
- package/esm/SignalLineage.d.ts.map +1 -1
- package/esm/SignalLineage.js.map +1 -1
- package/esm/SignalLineage.mjs +6 -5
- package/esm/SignalOutcome.d.ts +4 -1
- package/esm/SignalOutcome.d.ts.map +1 -1
- package/esm/SignalOutcome.js.map +1 -1
- package/esm/SignalOutcome.mjs +6 -5
- package/esm/SignalPriorityQueue.d.ts +4 -1
- package/esm/SignalPriorityQueue.d.ts.map +1 -1
- package/esm/SignalPriorityQueue.js.map +1 -1
- package/esm/SignalPriorityQueue.mjs +6 -5
- package/esm/SyncEvent.d.ts +4 -1
- package/esm/SyncEvent.d.ts.map +1 -1
- package/esm/SyncEvent.js.map +1 -1
- package/esm/SyncEvent.mjs +6 -5
- package/esm/SystemAlert.d.ts +4 -1
- package/esm/SystemAlert.d.ts.map +1 -1
- package/esm/SystemAlert.js.map +1 -1
- package/esm/SystemAlert.mjs +6 -5
- package/esm/Trade.d.ts +4 -1
- package/esm/Trade.d.ts.map +1 -1
- package/esm/Trade.js.map +1 -1
- package/esm/Trade.mjs +6 -5
- package/esm/TradeAuditEvent.d.ts +4 -1
- package/esm/TradeAuditEvent.d.ts.map +1 -1
- package/esm/TradeAuditEvent.js.map +1 -1
- package/esm/TradeAuditEvent.mjs +6 -5
- package/esm/TradeExecutionHistory.d.ts +4 -1
- package/esm/TradeExecutionHistory.d.ts.map +1 -1
- package/esm/TradeExecutionHistory.js.map +1 -1
- package/esm/TradeExecutionHistory.mjs +9 -5
- package/esm/TradingPolicy.d.ts +4 -1
- package/esm/TradingPolicy.d.ts.map +1 -1
- package/esm/TradingPolicy.js.map +1 -1
- package/esm/TradingPolicy.mjs +6 -5
- package/esm/User.d.ts +4 -1
- package/esm/User.d.ts.map +1 -1
- package/esm/User.js.map +1 -1
- package/esm/User.mjs +6 -5
- package/esm/VerificationToken.d.ts +4 -1
- package/esm/VerificationToken.d.ts.map +1 -1
- package/esm/VerificationToken.js.map +1 -1
- package/esm/VerificationToken.mjs +6 -5
- package/esm/WaitlistEntry.d.ts +4 -1
- package/esm/WaitlistEntry.d.ts.map +1 -1
- package/esm/WaitlistEntry.js.map +1 -1
- package/esm/WaitlistEntry.mjs +6 -5
- package/esm/index.d.ts +183 -61
- package/esm/index.d.ts.map +1 -1
- package/index.d.ts +183 -61
- package/package.json +1 -1
package/ABTest.cjs
CHANGED
|
@@ -1778,9 +1778,10 @@ exports.ABTest = {
|
|
|
1778
1778
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
1779
1779
|
* @param props - Array of ABTest objects for the new records.
|
|
1780
1780
|
* @param globalClient - Apollo Client instance.
|
|
1781
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
1781
1782
|
* @returns The count of created records or null.
|
|
1782
1783
|
*/
|
|
1783
|
-
async createMany(props, globalClient) {
|
|
1784
|
+
async createMany(props, globalClient, options) {
|
|
1784
1785
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1785
1786
|
// Maximum number of retries for database connection issues
|
|
1786
1787
|
const MAX_RETRIES = 3;
|
|
@@ -1797,8 +1798,8 @@ exports.ABTest = {
|
|
|
1797
1798
|
]);
|
|
1798
1799
|
const { gql, ApolloError } = modules;
|
|
1799
1800
|
const CREATE_MANY_ABTEST = gql `
|
|
1800
|
-
mutation createManyABTest($data: [ABTestCreateManyInput!]
|
|
1801
|
-
createManyABTest(data: $data) {
|
|
1801
|
+
mutation createManyABTest($data: [ABTestCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
1802
|
+
createManyABTest(data: $data, skipDuplicates: $skipDuplicates) {
|
|
1802
1803
|
count
|
|
1803
1804
|
}
|
|
1804
1805
|
}`;
|
|
@@ -1831,6 +1832,7 @@ exports.ABTest = {
|
|
|
1831
1832
|
metadataSegmentationRules: prop.metadataSegmentationRules !== undefined ? prop.metadataSegmentationRules : undefined,
|
|
1832
1833
|
completedAt: prop.completedAt !== undefined ? prop.completedAt : undefined,
|
|
1833
1834
|
})),
|
|
1835
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
1834
1836
|
};
|
|
1835
1837
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
1836
1838
|
const response = await client.mutate({
|
|
@@ -1861,10 +1863,9 @@ exports.ABTest = {
|
|
|
1861
1863
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
1862
1864
|
if (isConstraintViolation) {
|
|
1863
1865
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
1864
|
-
logger_1.logger.
|
|
1866
|
+
logger_1.logger.warn("Duplicate key in createManyABTest (expected during overlapping fetches)", {
|
|
1865
1867
|
operation: 'createManyABTest',
|
|
1866
1868
|
model: 'ABTest',
|
|
1867
|
-
error: String(error),
|
|
1868
1869
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
1869
1870
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
1870
1871
|
isRetryable: false,
|
package/ABTest.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const ABTest: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of ABTest objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: ABTestType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: ABTestType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Account.cjs
CHANGED
|
@@ -580,9 +580,10 @@ exports.Account = {
|
|
|
580
580
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
581
581
|
* @param props - Array of Account objects for the new records.
|
|
582
582
|
* @param globalClient - Apollo Client instance.
|
|
583
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
583
584
|
* @returns The count of created records or null.
|
|
584
585
|
*/
|
|
585
|
-
async createMany(props, globalClient) {
|
|
586
|
+
async createMany(props, globalClient, options) {
|
|
586
587
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
587
588
|
// Maximum number of retries for database connection issues
|
|
588
589
|
const MAX_RETRIES = 3;
|
|
@@ -599,8 +600,8 @@ exports.Account = {
|
|
|
599
600
|
]);
|
|
600
601
|
const { gql, ApolloError } = modules;
|
|
601
602
|
const CREATE_MANY_ACCOUNT = gql `
|
|
602
|
-
mutation createManyAccount($data: [AccountCreateManyInput!]
|
|
603
|
-
createManyAccount(data: $data) {
|
|
603
|
+
mutation createManyAccount($data: [AccountCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
604
|
+
createManyAccount(data: $data, skipDuplicates: $skipDuplicates) {
|
|
604
605
|
count
|
|
605
606
|
}
|
|
606
607
|
}`;
|
|
@@ -618,6 +619,7 @@ exports.Account = {
|
|
|
618
619
|
id_token: prop.id_token !== undefined ? prop.id_token : undefined,
|
|
619
620
|
session_state: prop.session_state !== undefined ? prop.session_state : undefined,
|
|
620
621
|
})),
|
|
622
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
621
623
|
};
|
|
622
624
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
623
625
|
const response = await client.mutate({
|
|
@@ -648,10 +650,9 @@ exports.Account = {
|
|
|
648
650
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
649
651
|
if (isConstraintViolation) {
|
|
650
652
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
651
|
-
logger_1.logger.
|
|
653
|
+
logger_1.logger.warn("Duplicate key in createManyAccount (expected during overlapping fetches)", {
|
|
652
654
|
operation: 'createManyAccount',
|
|
653
655
|
model: 'Account',
|
|
654
|
-
error: String(error),
|
|
655
656
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
656
657
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
657
658
|
isRetryable: false,
|
package/Account.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Account: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Account objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: AccountType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AccountType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
|
@@ -186,9 +186,10 @@ exports.AccountDecisionRecord = {
|
|
|
186
186
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
187
187
|
* @param props - Array of AccountDecisionRecord objects for the new records.
|
|
188
188
|
* @param globalClient - Apollo Client instance.
|
|
189
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
189
190
|
* @returns The count of created records or null.
|
|
190
191
|
*/
|
|
191
|
-
async createMany(props, globalClient) {
|
|
192
|
+
async createMany(props, globalClient, options) {
|
|
192
193
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
193
194
|
// Maximum number of retries for database connection issues
|
|
194
195
|
const MAX_RETRIES = 3;
|
|
@@ -205,8 +206,8 @@ exports.AccountDecisionRecord = {
|
|
|
205
206
|
]);
|
|
206
207
|
const { gql, ApolloError } = modules;
|
|
207
208
|
const CREATE_MANY_ACCOUNTDECISIONRECORD = gql `
|
|
208
|
-
mutation createManyAccountDecisionRecord($data: [AccountDecisionRecordCreateManyInput!]
|
|
209
|
-
createManyAccountDecisionRecord(data: $data) {
|
|
209
|
+
mutation createManyAccountDecisionRecord($data: [AccountDecisionRecordCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
210
|
+
createManyAccountDecisionRecord(data: $data, skipDuplicates: $skipDuplicates) {
|
|
210
211
|
count
|
|
211
212
|
}
|
|
212
213
|
}`;
|
|
@@ -241,6 +242,7 @@ exports.AccountDecisionRecord = {
|
|
|
241
242
|
executionDurationMs: prop.executionDurationMs !== undefined ? prop.executionDurationMs : undefined,
|
|
242
243
|
status: prop.status !== undefined ? prop.status : undefined,
|
|
243
244
|
})),
|
|
245
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
244
246
|
};
|
|
245
247
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
246
248
|
const response = await client.mutate({
|
|
@@ -271,10 +273,9 @@ exports.AccountDecisionRecord = {
|
|
|
271
273
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
272
274
|
if (isConstraintViolation) {
|
|
273
275
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
274
|
-
logger_1.logger.
|
|
276
|
+
logger_1.logger.warn("Duplicate key in createManyAccountDecisionRecord (expected during overlapping fetches)", {
|
|
275
277
|
operation: 'createManyAccountDecisionRecord',
|
|
276
278
|
model: 'AccountDecisionRecord',
|
|
277
|
-
error: String(error),
|
|
278
279
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
279
280
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
280
281
|
isRetryable: false,
|
|
@@ -20,9 +20,12 @@ export declare const AccountDecisionRecord: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of AccountDecisionRecord objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: AccountDecisionRecordType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AccountDecisionRecordType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
|
@@ -575,9 +575,10 @@ exports.AccountLinkingRequest = {
|
|
|
575
575
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
576
576
|
* @param props - Array of AccountLinkingRequest objects for the new records.
|
|
577
577
|
* @param globalClient - Apollo Client instance.
|
|
578
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
578
579
|
* @returns The count of created records or null.
|
|
579
580
|
*/
|
|
580
|
-
async createMany(props, globalClient) {
|
|
581
|
+
async createMany(props, globalClient, options) {
|
|
581
582
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
582
583
|
// Maximum number of retries for database connection issues
|
|
583
584
|
const MAX_RETRIES = 3;
|
|
@@ -594,8 +595,8 @@ exports.AccountLinkingRequest = {
|
|
|
594
595
|
]);
|
|
595
596
|
const { gql, ApolloError } = modules;
|
|
596
597
|
const CREATE_MANY_ACCOUNTLINKINGREQUEST = gql `
|
|
597
|
-
mutation createManyAccountLinkingRequest($data: [AccountLinkingRequestCreateManyInput!]
|
|
598
|
-
createManyAccountLinkingRequest(data: $data) {
|
|
598
|
+
mutation createManyAccountLinkingRequest($data: [AccountLinkingRequestCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
599
|
+
createManyAccountLinkingRequest(data: $data, skipDuplicates: $skipDuplicates) {
|
|
599
600
|
count
|
|
600
601
|
}
|
|
601
602
|
}`;
|
|
@@ -614,6 +615,7 @@ exports.AccountLinkingRequest = {
|
|
|
614
615
|
approvedAt: prop.approvedAt !== undefined ? prop.approvedAt : undefined,
|
|
615
616
|
rejectedAt: prop.rejectedAt !== undefined ? prop.rejectedAt : undefined,
|
|
616
617
|
})),
|
|
618
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
617
619
|
};
|
|
618
620
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
619
621
|
const response = await client.mutate({
|
|
@@ -644,10 +646,9 @@ exports.AccountLinkingRequest = {
|
|
|
644
646
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
645
647
|
if (isConstraintViolation) {
|
|
646
648
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
647
|
-
logger_1.logger.
|
|
649
|
+
logger_1.logger.warn("Duplicate key in createManyAccountLinkingRequest (expected during overlapping fetches)", {
|
|
648
650
|
operation: 'createManyAccountLinkingRequest',
|
|
649
651
|
model: 'AccountLinkingRequest',
|
|
650
|
-
error: String(error),
|
|
651
652
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
652
653
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
653
654
|
isRetryable: false,
|
|
@@ -20,9 +20,12 @@ export declare const AccountLinkingRequest: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of AccountLinkingRequest objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: AccountLinkingRequestType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AccountLinkingRequestType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Action.cjs
CHANGED
|
@@ -193,9 +193,10 @@ exports.Action = {
|
|
|
193
193
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
194
194
|
* @param props - Array of Action objects for the new records.
|
|
195
195
|
* @param globalClient - Apollo Client instance.
|
|
196
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
196
197
|
* @returns The count of created records or null.
|
|
197
198
|
*/
|
|
198
|
-
async createMany(props, globalClient) {
|
|
199
|
+
async createMany(props, globalClient, options) {
|
|
199
200
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
200
201
|
// Maximum number of retries for database connection issues
|
|
201
202
|
const MAX_RETRIES = 3;
|
|
@@ -212,8 +213,8 @@ exports.Action = {
|
|
|
212
213
|
]);
|
|
213
214
|
const { gql, ApolloError } = modules;
|
|
214
215
|
const CREATE_MANY_ACTION = gql `
|
|
215
|
-
mutation createManyAction($data: [ActionCreateManyInput!]
|
|
216
|
-
createManyAction(data: $data) {
|
|
216
|
+
mutation createManyAction($data: [ActionCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
217
|
+
createManyAction(data: $data, skipDuplicates: $skipDuplicates) {
|
|
217
218
|
count
|
|
218
219
|
}
|
|
219
220
|
}`;
|
|
@@ -228,6 +229,7 @@ exports.Action = {
|
|
|
228
229
|
deletedAt: prop.deletedAt !== undefined ? prop.deletedAt : undefined,
|
|
229
230
|
alpacaOrderId: prop.alpacaOrderId !== undefined ? prop.alpacaOrderId : undefined,
|
|
230
231
|
})),
|
|
232
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
231
233
|
};
|
|
232
234
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
233
235
|
const response = await client.mutate({
|
|
@@ -258,10 +260,9 @@ exports.Action = {
|
|
|
258
260
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
259
261
|
if (isConstraintViolation) {
|
|
260
262
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
261
|
-
logger_1.logger.
|
|
263
|
+
logger_1.logger.warn("Duplicate key in createManyAction (expected during overlapping fetches)", {
|
|
262
264
|
operation: 'createManyAction',
|
|
263
265
|
model: 'Action',
|
|
264
|
-
error: String(error),
|
|
265
266
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
266
267
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
267
268
|
isRetryable: false,
|
package/Action.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Action: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Action objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: ActionType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: ActionType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Alert.cjs
CHANGED
|
@@ -591,9 +591,10 @@ exports.Alert = {
|
|
|
591
591
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
592
592
|
* @param props - Array of Alert objects for the new records.
|
|
593
593
|
* @param globalClient - Apollo Client instance.
|
|
594
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
594
595
|
* @returns The count of created records or null.
|
|
595
596
|
*/
|
|
596
|
-
async createMany(props, globalClient) {
|
|
597
|
+
async createMany(props, globalClient, options) {
|
|
597
598
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
598
599
|
// Maximum number of retries for database connection issues
|
|
599
600
|
const MAX_RETRIES = 3;
|
|
@@ -610,8 +611,8 @@ exports.Alert = {
|
|
|
610
611
|
]);
|
|
611
612
|
const { gql, ApolloError } = modules;
|
|
612
613
|
const CREATE_MANY_ALERT = gql `
|
|
613
|
-
mutation createManyAlert($data: [AlertCreateManyInput!]
|
|
614
|
-
createManyAlert(data: $data) {
|
|
614
|
+
mutation createManyAlert($data: [AlertCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
615
|
+
createManyAlert(data: $data, skipDuplicates: $skipDuplicates) {
|
|
615
616
|
count
|
|
616
617
|
}
|
|
617
618
|
}`;
|
|
@@ -631,6 +632,7 @@ exports.Alert = {
|
|
|
631
632
|
retryCount: prop.retryCount !== undefined ? prop.retryCount : undefined,
|
|
632
633
|
metadata: prop.metadata !== undefined ? prop.metadata : undefined,
|
|
633
634
|
})),
|
|
635
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
634
636
|
};
|
|
635
637
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
636
638
|
const response = await client.mutate({
|
|
@@ -661,10 +663,9 @@ exports.Alert = {
|
|
|
661
663
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
662
664
|
if (isConstraintViolation) {
|
|
663
665
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
664
|
-
logger_1.logger.
|
|
666
|
+
logger_1.logger.warn("Duplicate key in createManyAlert (expected during overlapping fetches)", {
|
|
665
667
|
operation: 'createManyAlert',
|
|
666
668
|
model: 'Alert',
|
|
667
|
-
error: String(error),
|
|
668
669
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
669
670
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
670
671
|
isRetryable: false,
|
package/Alert.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Alert: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Alert objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: AlertType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AlertType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Allocation.cjs
CHANGED
|
@@ -610,9 +610,10 @@ exports.Allocation = {
|
|
|
610
610
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
611
611
|
* @param props - Array of Allocation objects for the new records.
|
|
612
612
|
* @param globalClient - Apollo Client instance.
|
|
613
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
613
614
|
* @returns The count of created records or null.
|
|
614
615
|
*/
|
|
615
|
-
async createMany(props, globalClient) {
|
|
616
|
+
async createMany(props, globalClient, options) {
|
|
616
617
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
617
618
|
// Maximum number of retries for database connection issues
|
|
618
619
|
const MAX_RETRIES = 3;
|
|
@@ -629,8 +630,8 @@ exports.Allocation = {
|
|
|
629
630
|
]);
|
|
630
631
|
const { gql, ApolloError } = modules;
|
|
631
632
|
const CREATE_MANY_ALLOCATION = gql `
|
|
632
|
-
mutation createManyAllocation($data: [AllocationCreateManyInput!]
|
|
633
|
-
createManyAllocation(data: $data) {
|
|
633
|
+
mutation createManyAllocation($data: [AllocationCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
634
|
+
createManyAllocation(data: $data, skipDuplicates: $skipDuplicates) {
|
|
634
635
|
count
|
|
635
636
|
}
|
|
636
637
|
}`;
|
|
@@ -646,6 +647,7 @@ exports.Allocation = {
|
|
|
646
647
|
options: prop.options !== undefined ? prop.options : undefined,
|
|
647
648
|
alpacaAccountId: prop.alpacaAccountId !== undefined ? prop.alpacaAccountId : undefined,
|
|
648
649
|
})),
|
|
650
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
649
651
|
};
|
|
650
652
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
651
653
|
const response = await client.mutate({
|
|
@@ -676,10 +678,9 @@ exports.Allocation = {
|
|
|
676
678
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
677
679
|
if (isConstraintViolation) {
|
|
678
680
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
679
|
-
logger_1.logger.
|
|
681
|
+
logger_1.logger.warn("Duplicate key in createManyAllocation (expected during overlapping fetches)", {
|
|
680
682
|
operation: 'createManyAllocation',
|
|
681
683
|
model: 'Allocation',
|
|
682
|
-
error: String(error),
|
|
683
684
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
684
685
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
685
686
|
isRetryable: false,
|
package/Allocation.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Allocation: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Allocation objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: AllocationType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AllocationType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/AlpacaAccount.cjs
CHANGED
|
@@ -682,9 +682,10 @@ exports.AlpacaAccount = {
|
|
|
682
682
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
683
683
|
* @param props - Array of AlpacaAccount objects for the new records.
|
|
684
684
|
* @param globalClient - Apollo Client instance.
|
|
685
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
685
686
|
* @returns The count of created records or null.
|
|
686
687
|
*/
|
|
687
|
-
async createMany(props, globalClient) {
|
|
688
|
+
async createMany(props, globalClient, options) {
|
|
688
689
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
689
690
|
// Maximum number of retries for database connection issues
|
|
690
691
|
const MAX_RETRIES = 3;
|
|
@@ -701,8 +702,8 @@ exports.AlpacaAccount = {
|
|
|
701
702
|
]);
|
|
702
703
|
const { gql, ApolloError } = modules;
|
|
703
704
|
const CREATE_MANY_ALPACAACCOUNT = gql `
|
|
704
|
-
mutation createManyAlpacaAccount($data: [AlpacaAccountCreateManyInput!]
|
|
705
|
-
createManyAlpacaAccount(data: $data) {
|
|
705
|
+
mutation createManyAlpacaAccount($data: [AlpacaAccountCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
706
|
+
createManyAlpacaAccount(data: $data, skipDuplicates: $skipDuplicates) {
|
|
706
707
|
count
|
|
707
708
|
}
|
|
708
709
|
}`;
|
|
@@ -736,6 +737,7 @@ exports.AlpacaAccount = {
|
|
|
736
737
|
userId: prop.userId !== undefined ? prop.userId : undefined,
|
|
737
738
|
deletedAt: prop.deletedAt !== undefined ? prop.deletedAt : undefined,
|
|
738
739
|
})),
|
|
740
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
739
741
|
};
|
|
740
742
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
741
743
|
const response = await client.mutate({
|
|
@@ -766,10 +768,9 @@ exports.AlpacaAccount = {
|
|
|
766
768
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
767
769
|
if (isConstraintViolation) {
|
|
768
770
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
769
|
-
logger_1.logger.
|
|
771
|
+
logger_1.logger.warn("Duplicate key in createManyAlpacaAccount (expected during overlapping fetches)", {
|
|
770
772
|
operation: 'createManyAlpacaAccount',
|
|
771
773
|
model: 'AlpacaAccount',
|
|
772
|
-
error: String(error),
|
|
773
774
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
774
775
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
775
776
|
isRetryable: false,
|
package/AlpacaAccount.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const AlpacaAccount: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of AlpacaAccount objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: AlpacaAccountType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AlpacaAccountType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
|
@@ -140,9 +140,10 @@ exports.AnalyticsConfiguration = {
|
|
|
140
140
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
141
141
|
* @param props - Array of AnalyticsConfiguration objects for the new records.
|
|
142
142
|
* @param globalClient - Apollo Client instance.
|
|
143
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
143
144
|
* @returns The count of created records or null.
|
|
144
145
|
*/
|
|
145
|
-
async createMany(props, globalClient) {
|
|
146
|
+
async createMany(props, globalClient, options) {
|
|
146
147
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
147
148
|
// Maximum number of retries for database connection issues
|
|
148
149
|
const MAX_RETRIES = 3;
|
|
@@ -159,8 +160,8 @@ exports.AnalyticsConfiguration = {
|
|
|
159
160
|
]);
|
|
160
161
|
const { gql, ApolloError } = modules;
|
|
161
162
|
const CREATE_MANY_ANALYTICSCONFIGURATION = gql `
|
|
162
|
-
mutation createManyAnalyticsConfiguration($data: [AnalyticsConfigurationCreateManyInput!]
|
|
163
|
-
createManyAnalyticsConfiguration(data: $data) {
|
|
163
|
+
mutation createManyAnalyticsConfiguration($data: [AnalyticsConfigurationCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
164
|
+
createManyAnalyticsConfiguration(data: $data, skipDuplicates: $skipDuplicates) {
|
|
164
165
|
count
|
|
165
166
|
}
|
|
166
167
|
}`;
|
|
@@ -172,6 +173,7 @@ exports.AnalyticsConfiguration = {
|
|
|
172
173
|
symbol: prop.symbol !== undefined ? prop.symbol : undefined,
|
|
173
174
|
metadata: prop.metadata !== undefined ? prop.metadata : undefined,
|
|
174
175
|
})),
|
|
176
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
175
177
|
};
|
|
176
178
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
177
179
|
const response = await client.mutate({
|
|
@@ -202,10 +204,9 @@ exports.AnalyticsConfiguration = {
|
|
|
202
204
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
203
205
|
if (isConstraintViolation) {
|
|
204
206
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
205
|
-
logger_1.logger.
|
|
207
|
+
logger_1.logger.warn("Duplicate key in createManyAnalyticsConfiguration (expected during overlapping fetches)", {
|
|
206
208
|
operation: 'createManyAnalyticsConfiguration',
|
|
207
209
|
model: 'AnalyticsConfiguration',
|
|
208
|
-
error: String(error),
|
|
209
210
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
210
211
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
211
212
|
isRetryable: false,
|
|
@@ -20,9 +20,12 @@ export declare const AnalyticsConfiguration: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of AnalyticsConfiguration objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: AnalyticsConfigurationType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AnalyticsConfigurationType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/AnalyticsSnapshot.cjs
CHANGED
|
@@ -138,9 +138,10 @@ exports.AnalyticsSnapshot = {
|
|
|
138
138
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
139
139
|
* @param props - Array of AnalyticsSnapshot objects for the new records.
|
|
140
140
|
* @param globalClient - Apollo Client instance.
|
|
141
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
141
142
|
* @returns The count of created records or null.
|
|
142
143
|
*/
|
|
143
|
-
async createMany(props, globalClient) {
|
|
144
|
+
async createMany(props, globalClient, options) {
|
|
144
145
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
145
146
|
// Maximum number of retries for database connection issues
|
|
146
147
|
const MAX_RETRIES = 3;
|
|
@@ -157,8 +158,8 @@ exports.AnalyticsSnapshot = {
|
|
|
157
158
|
]);
|
|
158
159
|
const { gql, ApolloError } = modules;
|
|
159
160
|
const CREATE_MANY_ANALYTICSSNAPSHOT = gql `
|
|
160
|
-
mutation createManyAnalyticsSnapshot($data: [AnalyticsSnapshotCreateManyInput!]
|
|
161
|
-
createManyAnalyticsSnapshot(data: $data) {
|
|
161
|
+
mutation createManyAnalyticsSnapshot($data: [AnalyticsSnapshotCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
162
|
+
createManyAnalyticsSnapshot(data: $data, skipDuplicates: $skipDuplicates) {
|
|
162
163
|
count
|
|
163
164
|
}
|
|
164
165
|
}`;
|
|
@@ -169,6 +170,7 @@ exports.AnalyticsSnapshot = {
|
|
|
169
170
|
dataType: prop.dataType !== undefined ? prop.dataType : undefined,
|
|
170
171
|
metadata: prop.metadata !== undefined ? prop.metadata : undefined,
|
|
171
172
|
})),
|
|
173
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
172
174
|
};
|
|
173
175
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
174
176
|
const response = await client.mutate({
|
|
@@ -199,10 +201,9 @@ exports.AnalyticsSnapshot = {
|
|
|
199
201
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
200
202
|
if (isConstraintViolation) {
|
|
201
203
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
202
|
-
logger_1.logger.
|
|
204
|
+
logger_1.logger.warn("Duplicate key in createManyAnalyticsSnapshot (expected during overlapping fetches)", {
|
|
203
205
|
operation: 'createManyAnalyticsSnapshot',
|
|
204
206
|
model: 'AnalyticsSnapshot',
|
|
205
|
-
error: String(error),
|
|
206
207
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
207
208
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
208
209
|
isRetryable: false,
|
package/AnalyticsSnapshot.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const AnalyticsSnapshot: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of AnalyticsSnapshot objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: AnalyticsSnapshotType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AnalyticsSnapshotType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Asset.cjs
CHANGED
|
@@ -340,9 +340,10 @@ exports.Asset = {
|
|
|
340
340
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
341
341
|
* @param props - Array of Asset objects for the new records.
|
|
342
342
|
* @param globalClient - Apollo Client instance.
|
|
343
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
343
344
|
* @returns The count of created records or null.
|
|
344
345
|
*/
|
|
345
|
-
async createMany(props, globalClient) {
|
|
346
|
+
async createMany(props, globalClient, options) {
|
|
346
347
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
347
348
|
// Maximum number of retries for database connection issues
|
|
348
349
|
const MAX_RETRIES = 3;
|
|
@@ -359,8 +360,8 @@ exports.Asset = {
|
|
|
359
360
|
]);
|
|
360
361
|
const { gql, ApolloError } = modules;
|
|
361
362
|
const CREATE_MANY_ASSET = gql `
|
|
362
|
-
mutation createManyAsset($data: [AssetCreateManyInput!]
|
|
363
|
-
createManyAsset(data: $data) {
|
|
363
|
+
mutation createManyAsset($data: [AssetCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
364
|
+
createManyAsset(data: $data, skipDuplicates: $skipDuplicates) {
|
|
364
365
|
count
|
|
365
366
|
}
|
|
366
367
|
}`;
|
|
@@ -422,6 +423,7 @@ exports.Asset = {
|
|
|
422
423
|
askPrice: prop.askPrice !== undefined ? prop.askPrice : undefined,
|
|
423
424
|
bidPrice: prop.bidPrice !== undefined ? prop.bidPrice : undefined,
|
|
424
425
|
})),
|
|
426
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
425
427
|
};
|
|
426
428
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
427
429
|
const response = await client.mutate({
|
|
@@ -452,10 +454,9 @@ exports.Asset = {
|
|
|
452
454
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
453
455
|
if (isConstraintViolation) {
|
|
454
456
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
455
|
-
logger_1.logger.
|
|
457
|
+
logger_1.logger.warn("Duplicate key in createManyAsset (expected during overlapping fetches)", {
|
|
456
458
|
operation: 'createManyAsset',
|
|
457
459
|
model: 'Asset',
|
|
458
|
-
error: String(error),
|
|
459
460
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
460
461
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
461
462
|
isRetryable: false,
|