@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/OptionsPosition.cjs
CHANGED
|
@@ -474,9 +474,10 @@ exports.OptionsPosition = {
|
|
|
474
474
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
475
475
|
* @param props - Array of OptionsPosition objects for the new records.
|
|
476
476
|
* @param globalClient - Apollo Client instance.
|
|
477
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
477
478
|
* @returns The count of created records or null.
|
|
478
479
|
*/
|
|
479
|
-
async createMany(props, globalClient) {
|
|
480
|
+
async createMany(props, globalClient, options) {
|
|
480
481
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
481
482
|
// Maximum number of retries for database connection issues
|
|
482
483
|
const MAX_RETRIES = 3;
|
|
@@ -493,8 +494,8 @@ exports.OptionsPosition = {
|
|
|
493
494
|
]);
|
|
494
495
|
const { gql, ApolloError } = modules;
|
|
495
496
|
const CREATE_MANY_OPTIONSPOSITION = gql `
|
|
496
|
-
mutation createManyOptionsPosition($data: [OptionsPositionCreateManyInput!]
|
|
497
|
-
createManyOptionsPosition(data: $data) {
|
|
497
|
+
mutation createManyOptionsPosition($data: [OptionsPositionCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
498
|
+
createManyOptionsPosition(data: $data, skipDuplicates: $skipDuplicates) {
|
|
498
499
|
count
|
|
499
500
|
}
|
|
500
501
|
}`;
|
|
@@ -513,6 +514,7 @@ exports.OptionsPosition = {
|
|
|
513
514
|
tradeId: prop.tradeId !== undefined ? prop.tradeId : undefined,
|
|
514
515
|
metadata: prop.metadata !== undefined ? prop.metadata : undefined,
|
|
515
516
|
})),
|
|
517
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
516
518
|
};
|
|
517
519
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
518
520
|
const response = await client.mutate({
|
|
@@ -543,10 +545,9 @@ exports.OptionsPosition = {
|
|
|
543
545
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
544
546
|
if (isConstraintViolation) {
|
|
545
547
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
546
|
-
logger_1.logger.
|
|
548
|
+
logger_1.logger.warn("Duplicate key in createManyOptionsPosition (expected during overlapping fetches)", {
|
|
547
549
|
operation: 'createManyOptionsPosition',
|
|
548
550
|
model: 'OptionsPosition',
|
|
549
|
-
error: String(error),
|
|
550
551
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
551
552
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
552
553
|
isRetryable: false,
|
package/OptionsPosition.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const OptionsPosition: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of OptionsPosition 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: OptionsPositionType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: OptionsPositionType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
|
@@ -473,9 +473,10 @@ exports.OptionsTradeExecution = {
|
|
|
473
473
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
474
474
|
* @param props - Array of OptionsTradeExecution objects for the new records.
|
|
475
475
|
* @param globalClient - Apollo Client instance.
|
|
476
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
476
477
|
* @returns The count of created records or null.
|
|
477
478
|
*/
|
|
478
|
-
async createMany(props, globalClient) {
|
|
479
|
+
async createMany(props, globalClient, options) {
|
|
479
480
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
480
481
|
// Maximum number of retries for database connection issues
|
|
481
482
|
const MAX_RETRIES = 3;
|
|
@@ -492,8 +493,8 @@ exports.OptionsTradeExecution = {
|
|
|
492
493
|
]);
|
|
493
494
|
const { gql, ApolloError } = modules;
|
|
494
495
|
const CREATE_MANY_OPTIONSTRADEEXECUTION = gql `
|
|
495
|
-
mutation createManyOptionsTradeExecution($data: [OptionsTradeExecutionCreateManyInput!]
|
|
496
|
-
createManyOptionsTradeExecution(data: $data) {
|
|
496
|
+
mutation createManyOptionsTradeExecution($data: [OptionsTradeExecutionCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
497
|
+
createManyOptionsTradeExecution(data: $data, skipDuplicates: $skipDuplicates) {
|
|
497
498
|
count
|
|
498
499
|
}
|
|
499
500
|
}`;
|
|
@@ -512,6 +513,7 @@ exports.OptionsTradeExecution = {
|
|
|
512
513
|
notes: prop.notes !== undefined ? prop.notes : undefined,
|
|
513
514
|
metadata: prop.metadata !== undefined ? prop.metadata : undefined,
|
|
514
515
|
})),
|
|
516
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
515
517
|
};
|
|
516
518
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
517
519
|
const response = await client.mutate({
|
|
@@ -542,10 +544,9 @@ exports.OptionsTradeExecution = {
|
|
|
542
544
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
543
545
|
if (isConstraintViolation) {
|
|
544
546
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
545
|
-
logger_1.logger.
|
|
547
|
+
logger_1.logger.warn("Duplicate key in createManyOptionsTradeExecution (expected during overlapping fetches)", {
|
|
546
548
|
operation: 'createManyOptionsTradeExecution',
|
|
547
549
|
model: 'OptionsTradeExecution',
|
|
548
|
-
error: String(error),
|
|
549
550
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
550
551
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
551
552
|
isRetryable: false,
|
|
@@ -20,9 +20,12 @@ export declare const OptionsTradeExecution: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of OptionsTradeExecution 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: OptionsTradeExecutionType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: OptionsTradeExecutionType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/PolicyOverlay.cjs
CHANGED
|
@@ -369,9 +369,10 @@ exports.PolicyOverlay = {
|
|
|
369
369
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
370
370
|
* @param props - Array of PolicyOverlay objects for the new records.
|
|
371
371
|
* @param globalClient - Apollo Client instance.
|
|
372
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
372
373
|
* @returns The count of created records or null.
|
|
373
374
|
*/
|
|
374
|
-
async createMany(props, globalClient) {
|
|
375
|
+
async createMany(props, globalClient, options) {
|
|
375
376
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
376
377
|
// Maximum number of retries for database connection issues
|
|
377
378
|
const MAX_RETRIES = 3;
|
|
@@ -388,8 +389,8 @@ exports.PolicyOverlay = {
|
|
|
388
389
|
]);
|
|
389
390
|
const { gql, ApolloError } = modules;
|
|
390
391
|
const CREATE_MANY_POLICYOVERLAY = gql `
|
|
391
|
-
mutation createManyPolicyOverlay($data: [PolicyOverlayCreateManyInput!]
|
|
392
|
-
createManyPolicyOverlay(data: $data) {
|
|
392
|
+
mutation createManyPolicyOverlay($data: [PolicyOverlayCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
393
|
+
createManyPolicyOverlay(data: $data, skipDuplicates: $skipDuplicates) {
|
|
393
394
|
count
|
|
394
395
|
}
|
|
395
396
|
}`;
|
|
@@ -410,6 +411,7 @@ exports.PolicyOverlay = {
|
|
|
410
411
|
correlationId: prop.correlationId !== undefined ? prop.correlationId : undefined,
|
|
411
412
|
triggerEventId: prop.triggerEventId !== undefined ? prop.triggerEventId : undefined,
|
|
412
413
|
})),
|
|
414
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
413
415
|
};
|
|
414
416
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
415
417
|
const response = await client.mutate({
|
|
@@ -440,10 +442,9 @@ exports.PolicyOverlay = {
|
|
|
440
442
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
441
443
|
if (isConstraintViolation) {
|
|
442
444
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
443
|
-
logger_1.logger.
|
|
445
|
+
logger_1.logger.warn("Duplicate key in createManyPolicyOverlay (expected during overlapping fetches)", {
|
|
444
446
|
operation: 'createManyPolicyOverlay',
|
|
445
447
|
model: 'PolicyOverlay',
|
|
446
|
-
error: String(error),
|
|
447
448
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
448
449
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
449
450
|
isRetryable: false,
|
package/PolicyOverlay.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const PolicyOverlay: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of PolicyOverlay 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: PolicyOverlayType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: PolicyOverlayType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
|
@@ -149,9 +149,10 @@ exports.PortfolioGreeksHistory = {
|
|
|
149
149
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
150
150
|
* @param props - Array of PortfolioGreeksHistory objects for the new records.
|
|
151
151
|
* @param globalClient - Apollo Client instance.
|
|
152
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
152
153
|
* @returns The count of created records or null.
|
|
153
154
|
*/
|
|
154
|
-
async createMany(props, globalClient) {
|
|
155
|
+
async createMany(props, globalClient, options) {
|
|
155
156
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
156
157
|
// Maximum number of retries for database connection issues
|
|
157
158
|
const MAX_RETRIES = 3;
|
|
@@ -168,8 +169,8 @@ exports.PortfolioGreeksHistory = {
|
|
|
168
169
|
]);
|
|
169
170
|
const { gql, ApolloError } = modules;
|
|
170
171
|
const CREATE_MANY_PORTFOLIOGREEKSHISTORY = gql `
|
|
171
|
-
mutation createManyPortfolioGreeksHistory($data: [PortfolioGreeksHistoryCreateManyInput!]
|
|
172
|
-
createManyPortfolioGreeksHistory(data: $data) {
|
|
172
|
+
mutation createManyPortfolioGreeksHistory($data: [PortfolioGreeksHistoryCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
173
|
+
createManyPortfolioGreeksHistory(data: $data, skipDuplicates: $skipDuplicates) {
|
|
173
174
|
count
|
|
174
175
|
}
|
|
175
176
|
}`;
|
|
@@ -186,6 +187,7 @@ exports.PortfolioGreeksHistory = {
|
|
|
186
187
|
marketHours: prop.marketHours !== undefined ? prop.marketHours : undefined,
|
|
187
188
|
source: prop.source !== undefined ? prop.source : undefined,
|
|
188
189
|
})),
|
|
190
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
189
191
|
};
|
|
190
192
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
191
193
|
const response = await client.mutate({
|
|
@@ -216,10 +218,9 @@ exports.PortfolioGreeksHistory = {
|
|
|
216
218
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
217
219
|
if (isConstraintViolation) {
|
|
218
220
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
219
|
-
logger_1.logger.
|
|
221
|
+
logger_1.logger.warn("Duplicate key in createManyPortfolioGreeksHistory (expected during overlapping fetches)", {
|
|
220
222
|
operation: 'createManyPortfolioGreeksHistory',
|
|
221
223
|
model: 'PortfolioGreeksHistory',
|
|
222
|
-
error: String(error),
|
|
223
224
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
224
225
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
225
226
|
isRetryable: false,
|
|
@@ -20,9 +20,12 @@ export declare const PortfolioGreeksHistory: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of PortfolioGreeksHistory 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: PortfolioGreeksHistoryType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: PortfolioGreeksHistoryType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/ScheduledOptionOrder.cjs
CHANGED
|
@@ -132,9 +132,10 @@ exports.ScheduledOptionOrder = {
|
|
|
132
132
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
133
133
|
* @param props - Array of ScheduledOptionOrder objects for the new records.
|
|
134
134
|
* @param globalClient - Apollo Client instance.
|
|
135
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
135
136
|
* @returns The count of created records or null.
|
|
136
137
|
*/
|
|
137
|
-
async createMany(props, globalClient) {
|
|
138
|
+
async createMany(props, globalClient, options) {
|
|
138
139
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
139
140
|
// Maximum number of retries for database connection issues
|
|
140
141
|
const MAX_RETRIES = 3;
|
|
@@ -151,8 +152,8 @@ exports.ScheduledOptionOrder = {
|
|
|
151
152
|
]);
|
|
152
153
|
const { gql, ApolloError } = modules;
|
|
153
154
|
const CREATE_MANY_SCHEDULEDOPTIONORDER = gql `
|
|
154
|
-
mutation createManyScheduledOptionOrder($data: [ScheduledOptionOrderCreateManyInput!]
|
|
155
|
-
createManyScheduledOptionOrder(data: $data) {
|
|
155
|
+
mutation createManyScheduledOptionOrder($data: [ScheduledOptionOrderCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
156
|
+
createManyScheduledOptionOrder(data: $data, skipDuplicates: $skipDuplicates) {
|
|
156
157
|
count
|
|
157
158
|
}
|
|
158
159
|
}`;
|
|
@@ -161,6 +162,7 @@ exports.ScheduledOptionOrder = {
|
|
|
161
162
|
payload: prop.payload !== undefined ? prop.payload : undefined,
|
|
162
163
|
status: prop.status !== undefined ? prop.status : undefined,
|
|
163
164
|
})),
|
|
165
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
164
166
|
};
|
|
165
167
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
166
168
|
const response = await client.mutate({
|
|
@@ -191,10 +193,9 @@ exports.ScheduledOptionOrder = {
|
|
|
191
193
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
192
194
|
if (isConstraintViolation) {
|
|
193
195
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
194
|
-
logger_1.logger.
|
|
196
|
+
logger_1.logger.warn("Duplicate key in createManyScheduledOptionOrder (expected during overlapping fetches)", {
|
|
195
197
|
operation: 'createManyScheduledOptionOrder',
|
|
196
198
|
model: 'ScheduledOptionOrder',
|
|
197
|
-
error: String(error),
|
|
198
199
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
199
200
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
200
201
|
isRetryable: false,
|
|
@@ -20,9 +20,12 @@ export declare const ScheduledOptionOrder: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of ScheduledOptionOrder 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: ScheduledOptionOrderType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: ScheduledOptionOrderType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Session.cjs
CHANGED
|
@@ -576,9 +576,10 @@ exports.Session = {
|
|
|
576
576
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
577
577
|
* @param props - Array of Session objects for the new records.
|
|
578
578
|
* @param globalClient - Apollo Client instance.
|
|
579
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
579
580
|
* @returns The count of created records or null.
|
|
580
581
|
*/
|
|
581
|
-
async createMany(props, globalClient) {
|
|
582
|
+
async createMany(props, globalClient, options) {
|
|
582
583
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
583
584
|
// Maximum number of retries for database connection issues
|
|
584
585
|
const MAX_RETRIES = 3;
|
|
@@ -595,8 +596,8 @@ exports.Session = {
|
|
|
595
596
|
]);
|
|
596
597
|
const { gql, ApolloError } = modules;
|
|
597
598
|
const CREATE_MANY_SESSION = gql `
|
|
598
|
-
mutation createManySession($data: [SessionCreateManyInput!]
|
|
599
|
-
createManySession(data: $data) {
|
|
599
|
+
mutation createManySession($data: [SessionCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
600
|
+
createManySession(data: $data, skipDuplicates: $skipDuplicates) {
|
|
600
601
|
count
|
|
601
602
|
}
|
|
602
603
|
}`;
|
|
@@ -606,6 +607,7 @@ exports.Session = {
|
|
|
606
607
|
userId: prop.userId !== undefined ? prop.userId : undefined,
|
|
607
608
|
expires: prop.expires !== undefined ? prop.expires : undefined,
|
|
608
609
|
})),
|
|
610
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
609
611
|
};
|
|
610
612
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
611
613
|
const response = await client.mutate({
|
|
@@ -636,10 +638,9 @@ exports.Session = {
|
|
|
636
638
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
637
639
|
if (isConstraintViolation) {
|
|
638
640
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
639
|
-
logger_1.logger.
|
|
641
|
+
logger_1.logger.warn("Duplicate key in createManySession (expected during overlapping fetches)", {
|
|
640
642
|
operation: 'createManySession',
|
|
641
643
|
model: 'Session',
|
|
642
|
-
error: String(error),
|
|
643
644
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
644
645
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
645
646
|
isRetryable: false,
|
package/Session.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Session: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Session 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: SessionType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: SessionType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
|
@@ -157,9 +157,10 @@ exports.SignalGeneratorMetrics = {
|
|
|
157
157
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
158
158
|
* @param props - Array of SignalGeneratorMetrics objects for the new records.
|
|
159
159
|
* @param globalClient - Apollo Client instance.
|
|
160
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
160
161
|
* @returns The count of created records or null.
|
|
161
162
|
*/
|
|
162
|
-
async createMany(props, globalClient) {
|
|
163
|
+
async createMany(props, globalClient, options) {
|
|
163
164
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
164
165
|
// Maximum number of retries for database connection issues
|
|
165
166
|
const MAX_RETRIES = 3;
|
|
@@ -176,8 +177,8 @@ exports.SignalGeneratorMetrics = {
|
|
|
176
177
|
]);
|
|
177
178
|
const { gql, ApolloError } = modules;
|
|
178
179
|
const CREATE_MANY_SIGNALGENERATORMETRICS = gql `
|
|
179
|
-
mutation createManySignalGeneratorMetrics($data: [SignalGeneratorMetricsCreateManyInput!]
|
|
180
|
-
createManySignalGeneratorMetrics(data: $data) {
|
|
180
|
+
mutation createManySignalGeneratorMetrics($data: [SignalGeneratorMetricsCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
181
|
+
createManySignalGeneratorMetrics(data: $data, skipDuplicates: $skipDuplicates) {
|
|
181
182
|
count
|
|
182
183
|
}
|
|
183
184
|
}`;
|
|
@@ -194,6 +195,7 @@ exports.SignalGeneratorMetrics = {
|
|
|
194
195
|
healthStatus: prop.healthStatus !== undefined ? prop.healthStatus : undefined,
|
|
195
196
|
healthIssues: prop.healthIssues !== undefined ? prop.healthIssues : undefined,
|
|
196
197
|
})),
|
|
198
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
197
199
|
};
|
|
198
200
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
199
201
|
const response = await client.mutate({
|
|
@@ -224,10 +226,9 @@ exports.SignalGeneratorMetrics = {
|
|
|
224
226
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
225
227
|
if (isConstraintViolation) {
|
|
226
228
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
227
|
-
logger_1.logger.
|
|
229
|
+
logger_1.logger.warn("Duplicate key in createManySignalGeneratorMetrics (expected during overlapping fetches)", {
|
|
228
230
|
operation: 'createManySignalGeneratorMetrics',
|
|
229
231
|
model: 'SignalGeneratorMetrics',
|
|
230
|
-
error: String(error),
|
|
231
232
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
232
233
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
233
234
|
isRetryable: false,
|
|
@@ -20,9 +20,12 @@ export declare const SignalGeneratorMetrics: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of SignalGeneratorMetrics 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: SignalGeneratorMetricsType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: SignalGeneratorMetricsType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/SignalLineage.cjs
CHANGED
|
@@ -181,9 +181,10 @@ exports.SignalLineage = {
|
|
|
181
181
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
182
182
|
* @param props - Array of SignalLineage objects for the new records.
|
|
183
183
|
* @param globalClient - Apollo Client instance.
|
|
184
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
184
185
|
* @returns The count of created records or null.
|
|
185
186
|
*/
|
|
186
|
-
async createMany(props, globalClient) {
|
|
187
|
+
async createMany(props, globalClient, options) {
|
|
187
188
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
188
189
|
// Maximum number of retries for database connection issues
|
|
189
190
|
const MAX_RETRIES = 3;
|
|
@@ -200,8 +201,8 @@ exports.SignalLineage = {
|
|
|
200
201
|
]);
|
|
201
202
|
const { gql, ApolloError } = modules;
|
|
202
203
|
const CREATE_MANY_SIGNALLINEAGE = gql `
|
|
203
|
-
mutation createManySignalLineage($data: [SignalLineageCreateManyInput!]
|
|
204
|
-
createManySignalLineage(data: $data) {
|
|
204
|
+
mutation createManySignalLineage($data: [SignalLineageCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
205
|
+
createManySignalLineage(data: $data, skipDuplicates: $skipDuplicates) {
|
|
205
206
|
count
|
|
206
207
|
}
|
|
207
208
|
}`;
|
|
@@ -233,6 +234,7 @@ exports.SignalLineage = {
|
|
|
233
234
|
executionStatus: prop.executionStatus !== undefined ? prop.executionStatus : undefined,
|
|
234
235
|
decisionType: prop.decisionType !== undefined ? prop.decisionType : undefined,
|
|
235
236
|
})),
|
|
237
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
236
238
|
};
|
|
237
239
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
238
240
|
const response = await client.mutate({
|
|
@@ -263,10 +265,9 @@ exports.SignalLineage = {
|
|
|
263
265
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
264
266
|
if (isConstraintViolation) {
|
|
265
267
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
266
|
-
logger_1.logger.
|
|
268
|
+
logger_1.logger.warn("Duplicate key in createManySignalLineage (expected during overlapping fetches)", {
|
|
267
269
|
operation: 'createManySignalLineage',
|
|
268
270
|
model: 'SignalLineage',
|
|
269
|
-
error: String(error),
|
|
270
271
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
271
272
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
272
273
|
isRetryable: false,
|
package/SignalLineage.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const SignalLineage: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of SignalLineage 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: SignalLineageType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: SignalLineageType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/SignalOutcome.cjs
CHANGED
|
@@ -153,9 +153,10 @@ exports.SignalOutcome = {
|
|
|
153
153
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
154
154
|
* @param props - Array of SignalOutcome objects for the new records.
|
|
155
155
|
* @param globalClient - Apollo Client instance.
|
|
156
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
156
157
|
* @returns The count of created records or null.
|
|
157
158
|
*/
|
|
158
|
-
async createMany(props, globalClient) {
|
|
159
|
+
async createMany(props, globalClient, options) {
|
|
159
160
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
160
161
|
// Maximum number of retries for database connection issues
|
|
161
162
|
const MAX_RETRIES = 3;
|
|
@@ -172,8 +173,8 @@ exports.SignalOutcome = {
|
|
|
172
173
|
]);
|
|
173
174
|
const { gql, ApolloError } = modules;
|
|
174
175
|
const CREATE_MANY_SIGNALOUTCOME = gql `
|
|
175
|
-
mutation createManySignalOutcome($data: [SignalOutcomeCreateManyInput!]
|
|
176
|
-
createManySignalOutcome(data: $data) {
|
|
176
|
+
mutation createManySignalOutcome($data: [SignalOutcomeCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
177
|
+
createManySignalOutcome(data: $data, skipDuplicates: $skipDuplicates) {
|
|
177
178
|
count
|
|
178
179
|
}
|
|
179
180
|
}`;
|
|
@@ -191,6 +192,7 @@ exports.SignalOutcome = {
|
|
|
191
192
|
generatedAt: prop.generatedAt !== undefined ? prop.generatedAt : undefined,
|
|
192
193
|
marketConditions: prop.marketConditions !== undefined ? prop.marketConditions : undefined,
|
|
193
194
|
})),
|
|
195
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
194
196
|
};
|
|
195
197
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
196
198
|
const response = await client.mutate({
|
|
@@ -221,10 +223,9 @@ exports.SignalOutcome = {
|
|
|
221
223
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
222
224
|
if (isConstraintViolation) {
|
|
223
225
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
224
|
-
logger_1.logger.
|
|
226
|
+
logger_1.logger.warn("Duplicate key in createManySignalOutcome (expected during overlapping fetches)", {
|
|
225
227
|
operation: 'createManySignalOutcome',
|
|
226
228
|
model: 'SignalOutcome',
|
|
227
|
-
error: String(error),
|
|
228
229
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
229
230
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
230
231
|
isRetryable: false,
|
package/SignalOutcome.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const SignalOutcome: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of SignalOutcome 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: SignalOutcomeType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: SignalOutcomeType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/SignalPriorityQueue.cjs
CHANGED
|
@@ -161,9 +161,10 @@ exports.SignalPriorityQueue = {
|
|
|
161
161
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
162
162
|
* @param props - Array of SignalPriorityQueue objects for the new records.
|
|
163
163
|
* @param globalClient - Apollo Client instance.
|
|
164
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
164
165
|
* @returns The count of created records or null.
|
|
165
166
|
*/
|
|
166
|
-
async createMany(props, globalClient) {
|
|
167
|
+
async createMany(props, globalClient, options) {
|
|
167
168
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
168
169
|
// Maximum number of retries for database connection issues
|
|
169
170
|
const MAX_RETRIES = 3;
|
|
@@ -180,8 +181,8 @@ exports.SignalPriorityQueue = {
|
|
|
180
181
|
]);
|
|
181
182
|
const { gql, ApolloError } = modules;
|
|
182
183
|
const CREATE_MANY_SIGNALPRIORITYQUEUE = gql `
|
|
183
|
-
mutation createManySignalPriorityQueue($data: [SignalPriorityQueueCreateManyInput!]
|
|
184
|
-
createManySignalPriorityQueue(data: $data) {
|
|
184
|
+
mutation createManySignalPriorityQueue($data: [SignalPriorityQueueCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
185
|
+
createManySignalPriorityQueue(data: $data, skipDuplicates: $skipDuplicates) {
|
|
185
186
|
count
|
|
186
187
|
}
|
|
187
188
|
}`;
|
|
@@ -202,6 +203,7 @@ exports.SignalPriorityQueue = {
|
|
|
202
203
|
timeInQueueMs: prop.timeInQueueMs !== undefined ? prop.timeInQueueMs : undefined,
|
|
203
204
|
signalData: prop.signalData !== undefined ? prop.signalData : undefined,
|
|
204
205
|
})),
|
|
206
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
205
207
|
};
|
|
206
208
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
207
209
|
const response = await client.mutate({
|
|
@@ -232,10 +234,9 @@ exports.SignalPriorityQueue = {
|
|
|
232
234
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
233
235
|
if (isConstraintViolation) {
|
|
234
236
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
235
|
-
logger_1.logger.
|
|
237
|
+
logger_1.logger.warn("Duplicate key in createManySignalPriorityQueue (expected during overlapping fetches)", {
|
|
236
238
|
operation: 'createManySignalPriorityQueue',
|
|
237
239
|
model: 'SignalPriorityQueue',
|
|
238
|
-
error: String(error),
|
|
239
240
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
240
241
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
241
242
|
isRetryable: false,
|
package/SignalPriorityQueue.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const SignalPriorityQueue: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of SignalPriorityQueue 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: SignalPriorityQueueType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: SignalPriorityQueueType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/SyncEvent.cjs
CHANGED
|
@@ -146,9 +146,10 @@ exports.SyncEvent = {
|
|
|
146
146
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
147
147
|
* @param props - Array of SyncEvent objects for the new records.
|
|
148
148
|
* @param globalClient - Apollo Client instance.
|
|
149
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
149
150
|
* @returns The count of created records or null.
|
|
150
151
|
*/
|
|
151
|
-
async createMany(props, globalClient) {
|
|
152
|
+
async createMany(props, globalClient, options) {
|
|
152
153
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
153
154
|
// Maximum number of retries for database connection issues
|
|
154
155
|
const MAX_RETRIES = 3;
|
|
@@ -165,8 +166,8 @@ exports.SyncEvent = {
|
|
|
165
166
|
]);
|
|
166
167
|
const { gql, ApolloError } = modules;
|
|
167
168
|
const CREATE_MANY_SYNCEVENT = gql `
|
|
168
|
-
mutation createManySyncEvent($data: [SyncEventCreateManyInput!]
|
|
169
|
-
createManySyncEvent(data: $data) {
|
|
169
|
+
mutation createManySyncEvent($data: [SyncEventCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
170
|
+
createManySyncEvent(data: $data, skipDuplicates: $skipDuplicates) {
|
|
170
171
|
count
|
|
171
172
|
}
|
|
172
173
|
}`;
|
|
@@ -182,6 +183,7 @@ exports.SyncEvent = {
|
|
|
182
183
|
error: prop.error !== undefined ? prop.error : undefined,
|
|
183
184
|
metadata: prop.metadata !== undefined ? prop.metadata : undefined,
|
|
184
185
|
})),
|
|
186
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
185
187
|
};
|
|
186
188
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
187
189
|
const response = await client.mutate({
|
|
@@ -212,10 +214,9 @@ exports.SyncEvent = {
|
|
|
212
214
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
213
215
|
if (isConstraintViolation) {
|
|
214
216
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
215
|
-
logger_1.logger.
|
|
217
|
+
logger_1.logger.warn("Duplicate key in createManySyncEvent (expected during overlapping fetches)", {
|
|
216
218
|
operation: 'createManySyncEvent',
|
|
217
219
|
model: 'SyncEvent',
|
|
218
|
-
error: String(error),
|
|
219
220
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
220
221
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
221
222
|
isRetryable: false,
|