@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/Asset.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Asset: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Asset 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: AssetType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AssetType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/AuditLog.cjs
CHANGED
|
@@ -146,9 +146,10 @@ exports.AuditLog = {
|
|
|
146
146
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
147
147
|
* @param props - Array of AuditLog 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.AuditLog = {
|
|
|
165
166
|
]);
|
|
166
167
|
const { gql, ApolloError } = modules;
|
|
167
168
|
const CREATE_MANY_AUDITLOG = gql `
|
|
168
|
-
mutation createManyAuditLog($data: [AuditLogCreateManyInput!]
|
|
169
|
-
createManyAuditLog(data: $data) {
|
|
169
|
+
mutation createManyAuditLog($data: [AuditLogCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
170
|
+
createManyAuditLog(data: $data, skipDuplicates: $skipDuplicates) {
|
|
170
171
|
count
|
|
171
172
|
}
|
|
172
173
|
}`;
|
|
@@ -182,6 +183,7 @@ exports.AuditLog = {
|
|
|
182
183
|
ipAddress: prop.ipAddress !== undefined ? prop.ipAddress : 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.AuditLog = {
|
|
|
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 createManyAuditLog (expected during overlapping fetches)", {
|
|
216
218
|
operation: 'createManyAuditLog',
|
|
217
219
|
model: 'AuditLog',
|
|
218
|
-
error: String(error),
|
|
219
220
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
220
221
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
221
222
|
isRetryable: false,
|
package/AuditLog.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const AuditLog: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of AuditLog 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: AuditLogType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AuditLogType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Authenticator.cjs
CHANGED
|
@@ -577,9 +577,10 @@ exports.Authenticator = {
|
|
|
577
577
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
578
578
|
* @param props - Array of Authenticator objects for the new records.
|
|
579
579
|
* @param globalClient - Apollo Client instance.
|
|
580
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
580
581
|
* @returns The count of created records or null.
|
|
581
582
|
*/
|
|
582
|
-
async createMany(props, globalClient) {
|
|
583
|
+
async createMany(props, globalClient, options) {
|
|
583
584
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
584
585
|
// Maximum number of retries for database connection issues
|
|
585
586
|
const MAX_RETRIES = 3;
|
|
@@ -596,8 +597,8 @@ exports.Authenticator = {
|
|
|
596
597
|
]);
|
|
597
598
|
const { gql, ApolloError } = modules;
|
|
598
599
|
const CREATE_MANY_AUTHENTICATOR = gql `
|
|
599
|
-
mutation createManyAuthenticator($data: [AuthenticatorCreateManyInput!]
|
|
600
|
-
createManyAuthenticator(data: $data) {
|
|
600
|
+
mutation createManyAuthenticator($data: [AuthenticatorCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
601
|
+
createManyAuthenticator(data: $data, skipDuplicates: $skipDuplicates) {
|
|
601
602
|
count
|
|
602
603
|
}
|
|
603
604
|
}`;
|
|
@@ -608,6 +609,7 @@ exports.Authenticator = {
|
|
|
608
609
|
publicKey: prop.publicKey !== undefined ? prop.publicKey : undefined,
|
|
609
610
|
counter: prop.counter !== undefined ? prop.counter : undefined,
|
|
610
611
|
})),
|
|
612
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
611
613
|
};
|
|
612
614
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
613
615
|
const response = await client.mutate({
|
|
@@ -638,10 +640,9 @@ exports.Authenticator = {
|
|
|
638
640
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
639
641
|
if (isConstraintViolation) {
|
|
640
642
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
641
|
-
logger_1.logger.
|
|
643
|
+
logger_1.logger.warn("Duplicate key in createManyAuthenticator (expected during overlapping fetches)", {
|
|
642
644
|
operation: 'createManyAuthenticator',
|
|
643
645
|
model: 'Authenticator',
|
|
644
|
-
error: String(error),
|
|
645
646
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
646
647
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
647
648
|
isRetryable: false,
|
package/Authenticator.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Authenticator: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Authenticator 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: AuthenticatorType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: AuthenticatorType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Configuration.cjs
CHANGED
|
@@ -142,9 +142,10 @@ exports.Configuration = {
|
|
|
142
142
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
143
143
|
* @param props - Array of Configuration objects for the new records.
|
|
144
144
|
* @param globalClient - Apollo Client instance.
|
|
145
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
145
146
|
* @returns The count of created records or null.
|
|
146
147
|
*/
|
|
147
|
-
async createMany(props, globalClient) {
|
|
148
|
+
async createMany(props, globalClient, options) {
|
|
148
149
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
149
150
|
// Maximum number of retries for database connection issues
|
|
150
151
|
const MAX_RETRIES = 3;
|
|
@@ -161,8 +162,8 @@ exports.Configuration = {
|
|
|
161
162
|
]);
|
|
162
163
|
const { gql, ApolloError } = modules;
|
|
163
164
|
const CREATE_MANY_CONFIGURATION = gql `
|
|
164
|
-
mutation createManyConfiguration($data: [ConfigurationCreateManyInput!]
|
|
165
|
-
createManyConfiguration(data: $data) {
|
|
165
|
+
mutation createManyConfiguration($data: [ConfigurationCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
166
|
+
createManyConfiguration(data: $data, skipDuplicates: $skipDuplicates) {
|
|
166
167
|
count
|
|
167
168
|
}
|
|
168
169
|
}`;
|
|
@@ -177,6 +178,7 @@ exports.Configuration = {
|
|
|
177
178
|
isActive: prop.isActive !== undefined ? prop.isActive : undefined,
|
|
178
179
|
expiresAt: prop.expiresAt !== undefined ? prop.expiresAt : undefined,
|
|
179
180
|
})),
|
|
181
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
180
182
|
};
|
|
181
183
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
182
184
|
const response = await client.mutate({
|
|
@@ -207,10 +209,9 @@ exports.Configuration = {
|
|
|
207
209
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
208
210
|
if (isConstraintViolation) {
|
|
209
211
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
210
|
-
logger_1.logger.
|
|
212
|
+
logger_1.logger.warn("Duplicate key in createManyConfiguration (expected during overlapping fetches)", {
|
|
211
213
|
operation: 'createManyConfiguration',
|
|
212
214
|
model: 'Configuration',
|
|
213
|
-
error: String(error),
|
|
214
215
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
215
216
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
216
217
|
isRetryable: false,
|
package/Configuration.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Configuration: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Configuration 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: ConfigurationType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: ConfigurationType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/ConflictEvent.cjs
CHANGED
|
@@ -139,9 +139,10 @@ exports.ConflictEvent = {
|
|
|
139
139
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
140
140
|
* @param props - Array of ConflictEvent objects for the new records.
|
|
141
141
|
* @param globalClient - Apollo Client instance.
|
|
142
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
142
143
|
* @returns The count of created records or null.
|
|
143
144
|
*/
|
|
144
|
-
async createMany(props, globalClient) {
|
|
145
|
+
async createMany(props, globalClient, options) {
|
|
145
146
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
146
147
|
// Maximum number of retries for database connection issues
|
|
147
148
|
const MAX_RETRIES = 3;
|
|
@@ -158,8 +159,8 @@ exports.ConflictEvent = {
|
|
|
158
159
|
]);
|
|
159
160
|
const { gql, ApolloError } = modules;
|
|
160
161
|
const CREATE_MANY_CONFLICTEVENT = gql `
|
|
161
|
-
mutation createManyConflictEvent($data: [ConflictEventCreateManyInput!]
|
|
162
|
-
createManyConflictEvent(data: $data) {
|
|
162
|
+
mutation createManyConflictEvent($data: [ConflictEventCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
163
|
+
createManyConflictEvent(data: $data, skipDuplicates: $skipDuplicates) {
|
|
163
164
|
count
|
|
164
165
|
}
|
|
165
166
|
}`;
|
|
@@ -175,6 +176,7 @@ exports.ConflictEvent = {
|
|
|
175
176
|
resolution: prop.resolution !== undefined ? prop.resolution : undefined,
|
|
176
177
|
resolutionTime: prop.resolutionTime !== undefined ? prop.resolutionTime : undefined,
|
|
177
178
|
})),
|
|
179
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
178
180
|
};
|
|
179
181
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
180
182
|
const response = await client.mutate({
|
|
@@ -205,10 +207,9 @@ exports.ConflictEvent = {
|
|
|
205
207
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
206
208
|
if (isConstraintViolation) {
|
|
207
209
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
208
|
-
logger_1.logger.
|
|
210
|
+
logger_1.logger.warn("Duplicate key in createManyConflictEvent (expected during overlapping fetches)", {
|
|
209
211
|
operation: 'createManyConflictEvent',
|
|
210
212
|
model: 'ConflictEvent',
|
|
211
|
-
error: String(error),
|
|
212
213
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
213
214
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
214
215
|
isRetryable: false,
|
package/ConflictEvent.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const ConflictEvent: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of ConflictEvent 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: ConflictEventType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: ConflictEventType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
|
@@ -141,9 +141,10 @@ exports.ConnectionHealthSnapshot = {
|
|
|
141
141
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
142
142
|
* @param props - Array of ConnectionHealthSnapshot objects for the new records.
|
|
143
143
|
* @param globalClient - Apollo Client instance.
|
|
144
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
144
145
|
* @returns The count of created records or null.
|
|
145
146
|
*/
|
|
146
|
-
async createMany(props, globalClient) {
|
|
147
|
+
async createMany(props, globalClient, options) {
|
|
147
148
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
148
149
|
// Maximum number of retries for database connection issues
|
|
149
150
|
const MAX_RETRIES = 3;
|
|
@@ -160,8 +161,8 @@ exports.ConnectionHealthSnapshot = {
|
|
|
160
161
|
]);
|
|
161
162
|
const { gql, ApolloError } = modules;
|
|
162
163
|
const CREATE_MANY_CONNECTIONHEALTHSNAPSHOT = gql `
|
|
163
|
-
mutation createManyConnectionHealthSnapshot($data: [ConnectionHealthSnapshotCreateManyInput!]
|
|
164
|
-
createManyConnectionHealthSnapshot(data: $data) {
|
|
164
|
+
mutation createManyConnectionHealthSnapshot($data: [ConnectionHealthSnapshotCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
165
|
+
createManyConnectionHealthSnapshot(data: $data, skipDuplicates: $skipDuplicates) {
|
|
165
166
|
count
|
|
166
167
|
}
|
|
167
168
|
}`;
|
|
@@ -174,6 +175,7 @@ exports.ConnectionHealthSnapshot = {
|
|
|
174
175
|
metrics: prop.metrics !== undefined ? prop.metrics : undefined,
|
|
175
176
|
metadata: prop.metadata !== undefined ? prop.metadata : undefined,
|
|
176
177
|
})),
|
|
178
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
177
179
|
};
|
|
178
180
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
179
181
|
const response = await client.mutate({
|
|
@@ -204,10 +206,9 @@ exports.ConnectionHealthSnapshot = {
|
|
|
204
206
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
205
207
|
if (isConstraintViolation) {
|
|
206
208
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
207
|
-
logger_1.logger.
|
|
209
|
+
logger_1.logger.warn("Duplicate key in createManyConnectionHealthSnapshot (expected during overlapping fetches)", {
|
|
208
210
|
operation: 'createManyConnectionHealthSnapshot',
|
|
209
211
|
model: 'ConnectionHealthSnapshot',
|
|
210
|
-
error: String(error),
|
|
211
212
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
212
213
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
213
214
|
isRetryable: false,
|
|
@@ -20,9 +20,12 @@ export declare const ConnectionHealthSnapshot: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of ConnectionHealthSnapshot 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: ConnectionHealthSnapshotType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: ConnectionHealthSnapshotType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Customer.cjs
CHANGED
|
@@ -678,9 +678,10 @@ exports.Customer = {
|
|
|
678
678
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
679
679
|
* @param props - Array of Customer objects for the new records.
|
|
680
680
|
* @param globalClient - Apollo Client instance.
|
|
681
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
681
682
|
* @returns The count of created records or null.
|
|
682
683
|
*/
|
|
683
|
-
async createMany(props, globalClient) {
|
|
684
|
+
async createMany(props, globalClient, options) {
|
|
684
685
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
685
686
|
// Maximum number of retries for database connection issues
|
|
686
687
|
const MAX_RETRIES = 3;
|
|
@@ -697,8 +698,8 @@ exports.Customer = {
|
|
|
697
698
|
]);
|
|
698
699
|
const { gql, ApolloError } = modules;
|
|
699
700
|
const CREATE_MANY_CUSTOMER = gql `
|
|
700
|
-
mutation createManyCustomer($data: [CustomerCreateManyInput!]
|
|
701
|
-
createManyCustomer(data: $data) {
|
|
701
|
+
mutation createManyCustomer($data: [CustomerCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
702
|
+
createManyCustomer(data: $data, skipDuplicates: $skipDuplicates) {
|
|
702
703
|
count
|
|
703
704
|
}
|
|
704
705
|
}`;
|
|
@@ -712,6 +713,7 @@ exports.Customer = {
|
|
|
712
713
|
stripePriceId: prop.stripePriceId !== undefined ? prop.stripePriceId : undefined,
|
|
713
714
|
stripeCurrentPeriodEnd: prop.stripeCurrentPeriodEnd !== undefined ? prop.stripeCurrentPeriodEnd : undefined,
|
|
714
715
|
})),
|
|
716
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
715
717
|
};
|
|
716
718
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
717
719
|
const response = await client.mutate({
|
|
@@ -742,10 +744,9 @@ exports.Customer = {
|
|
|
742
744
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
743
745
|
if (isConstraintViolation) {
|
|
744
746
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
745
|
-
logger_1.logger.
|
|
747
|
+
logger_1.logger.warn("Duplicate key in createManyCustomer (expected during overlapping fetches)", {
|
|
746
748
|
operation: 'createManyCustomer',
|
|
747
749
|
model: 'Customer',
|
|
748
|
-
error: String(error),
|
|
749
750
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
750
751
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
751
752
|
isRetryable: false,
|
package/Customer.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Customer: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Customer 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: CustomerType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: CustomerType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/DeadLetterMessage.cjs
CHANGED
|
@@ -191,9 +191,10 @@ exports.DeadLetterMessage = {
|
|
|
191
191
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
192
192
|
* @param props - Array of DeadLetterMessage objects for the new records.
|
|
193
193
|
* @param globalClient - Apollo Client instance.
|
|
194
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
194
195
|
* @returns The count of created records or null.
|
|
195
196
|
*/
|
|
196
|
-
async createMany(props, globalClient) {
|
|
197
|
+
async createMany(props, globalClient, options) {
|
|
197
198
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
198
199
|
// Maximum number of retries for database connection issues
|
|
199
200
|
const MAX_RETRIES = 3;
|
|
@@ -210,8 +211,8 @@ exports.DeadLetterMessage = {
|
|
|
210
211
|
]);
|
|
211
212
|
const { gql, ApolloError } = modules;
|
|
212
213
|
const CREATE_MANY_DEADLETTERMESSAGE = gql `
|
|
213
|
-
mutation createManyDeadLetterMessage($data: [DeadLetterMessageCreateManyInput!]
|
|
214
|
-
createManyDeadLetterMessage(data: $data) {
|
|
214
|
+
mutation createManyDeadLetterMessage($data: [DeadLetterMessageCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
215
|
+
createManyDeadLetterMessage(data: $data, skipDuplicates: $skipDuplicates) {
|
|
215
216
|
count
|
|
216
217
|
}
|
|
217
218
|
}`;
|
|
@@ -248,6 +249,7 @@ exports.DeadLetterMessage = {
|
|
|
248
249
|
createdBy: prop.createdBy !== undefined ? prop.createdBy : undefined,
|
|
249
250
|
notes: prop.notes !== undefined ? prop.notes : undefined,
|
|
250
251
|
})),
|
|
252
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
251
253
|
};
|
|
252
254
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
253
255
|
const response = await client.mutate({
|
|
@@ -278,10 +280,9 @@ exports.DeadLetterMessage = {
|
|
|
278
280
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
279
281
|
if (isConstraintViolation) {
|
|
280
282
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
281
|
-
logger_1.logger.
|
|
283
|
+
logger_1.logger.warn("Duplicate key in createManyDeadLetterMessage (expected during overlapping fetches)", {
|
|
282
284
|
operation: 'createManyDeadLetterMessage',
|
|
283
285
|
model: 'DeadLetterMessage',
|
|
284
|
-
error: String(error),
|
|
285
286
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
286
287
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
287
288
|
isRetryable: false,
|
package/DeadLetterMessage.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const DeadLetterMessage: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of DeadLetterMessage 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: DeadLetterMessageType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: DeadLetterMessageType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
|
@@ -146,9 +146,10 @@ exports.DecisionMemorySummary = {
|
|
|
146
146
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
147
147
|
* @param props - Array of DecisionMemorySummary 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.DecisionMemorySummary = {
|
|
|
165
166
|
]);
|
|
166
167
|
const { gql, ApolloError } = modules;
|
|
167
168
|
const CREATE_MANY_DECISIONMEMORYSUMMARY = gql `
|
|
168
|
-
mutation createManyDecisionMemorySummary($data: [DecisionMemorySummaryCreateManyInput!]
|
|
169
|
-
createManyDecisionMemorySummary(data: $data) {
|
|
169
|
+
mutation createManyDecisionMemorySummary($data: [DecisionMemorySummaryCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
170
|
+
createManyDecisionMemorySummary(data: $data, skipDuplicates: $skipDuplicates) {
|
|
170
171
|
count
|
|
171
172
|
}
|
|
172
173
|
}`;
|
|
@@ -185,6 +186,7 @@ exports.DecisionMemorySummary = {
|
|
|
185
186
|
relevanceScore: prop.relevanceScore !== undefined ? prop.relevanceScore : undefined,
|
|
186
187
|
expiresAt: prop.expiresAt !== undefined ? prop.expiresAt : undefined,
|
|
187
188
|
})),
|
|
189
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
188
190
|
};
|
|
189
191
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
190
192
|
const response = await client.mutate({
|
|
@@ -215,10 +217,9 @@ exports.DecisionMemorySummary = {
|
|
|
215
217
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
216
218
|
if (isConstraintViolation) {
|
|
217
219
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
218
|
-
logger_1.logger.
|
|
220
|
+
logger_1.logger.warn("Duplicate key in createManyDecisionMemorySummary (expected during overlapping fetches)", {
|
|
219
221
|
operation: 'createManyDecisionMemorySummary',
|
|
220
222
|
model: 'DecisionMemorySummary',
|
|
221
|
-
error: String(error),
|
|
222
223
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
223
224
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
224
225
|
isRetryable: false,
|
|
@@ -20,9 +20,12 @@ export declare const DecisionMemorySummary: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of DecisionMemorySummary 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: DecisionMemorySummaryType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: DecisionMemorySummaryType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/EconomicEvent.cjs
CHANGED
|
@@ -138,9 +138,10 @@ exports.EconomicEvent = {
|
|
|
138
138
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
139
139
|
* @param props - Array of EconomicEvent 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.EconomicEvent = {
|
|
|
157
158
|
]);
|
|
158
159
|
const { gql, ApolloError } = modules;
|
|
159
160
|
const CREATE_MANY_ECONOMICEVENT = gql `
|
|
160
|
-
mutation createManyEconomicEvent($data: [EconomicEventCreateManyInput!]
|
|
161
|
-
createManyEconomicEvent(data: $data) {
|
|
161
|
+
mutation createManyEconomicEvent($data: [EconomicEventCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
162
|
+
createManyEconomicEvent(data: $data, skipDuplicates: $skipDuplicates) {
|
|
162
163
|
count
|
|
163
164
|
}
|
|
164
165
|
}`;
|
|
@@ -169,6 +170,7 @@ exports.EconomicEvent = {
|
|
|
169
170
|
date: prop.date !== undefined ? prop.date : undefined,
|
|
170
171
|
importance: prop.importance !== undefined ? prop.importance : 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.EconomicEvent = {
|
|
|
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 createManyEconomicEvent (expected during overlapping fetches)", {
|
|
203
205
|
operation: 'createManyEconomicEvent',
|
|
204
206
|
model: 'EconomicEvent',
|
|
205
|
-
error: String(error),
|
|
206
207
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
207
208
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
208
209
|
isRetryable: false,
|
package/EconomicEvent.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const EconomicEvent: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of EconomicEvent 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: EconomicEventType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: EconomicEventType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/EquityBar.cjs
CHANGED
|
@@ -148,9 +148,10 @@ exports.EquityBar = {
|
|
|
148
148
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
149
149
|
* @param props - Array of EquityBar objects for the new records.
|
|
150
150
|
* @param globalClient - Apollo Client instance.
|
|
151
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
151
152
|
* @returns The count of created records or null.
|
|
152
153
|
*/
|
|
153
|
-
async createMany(props, globalClient) {
|
|
154
|
+
async createMany(props, globalClient, options) {
|
|
154
155
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
155
156
|
// Maximum number of retries for database connection issues
|
|
156
157
|
const MAX_RETRIES = 3;
|
|
@@ -167,8 +168,8 @@ exports.EquityBar = {
|
|
|
167
168
|
]);
|
|
168
169
|
const { gql, ApolloError } = modules;
|
|
169
170
|
const CREATE_MANY_EQUITYBAR = gql `
|
|
170
|
-
mutation createManyEquityBar($data: [EquityBarCreateManyInput!]
|
|
171
|
-
createManyEquityBar(data: $data) {
|
|
171
|
+
mutation createManyEquityBar($data: [EquityBarCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
172
|
+
createManyEquityBar(data: $data, skipDuplicates: $skipDuplicates) {
|
|
172
173
|
count
|
|
173
174
|
}
|
|
174
175
|
}`;
|
|
@@ -186,6 +187,7 @@ exports.EquityBar = {
|
|
|
186
187
|
trades: prop.trades !== undefined ? prop.trades : 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.EquityBar = {
|
|
|
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 createManyEquityBar (expected during overlapping fetches)", {
|
|
220
222
|
operation: 'createManyEquityBar',
|
|
221
223
|
model: 'EquityBar',
|
|
222
|
-
error: String(error),
|
|
223
224
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
224
225
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
225
226
|
isRetryable: false,
|
package/EquityBar.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const EquityBar: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of EquityBar 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: EquityBarType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: EquityBarType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|