@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/SyncEvent.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const SyncEvent: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of SyncEvent 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: SyncEventType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: SyncEventType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/SystemAlert.cjs
CHANGED
|
@@ -170,9 +170,10 @@ exports.SystemAlert = {
|
|
|
170
170
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
171
171
|
* @param props - Array of SystemAlert objects for the new records.
|
|
172
172
|
* @param globalClient - Apollo Client instance.
|
|
173
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
173
174
|
* @returns The count of created records or null.
|
|
174
175
|
*/
|
|
175
|
-
async createMany(props, globalClient) {
|
|
176
|
+
async createMany(props, globalClient, options) {
|
|
176
177
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
177
178
|
// Maximum number of retries for database connection issues
|
|
178
179
|
const MAX_RETRIES = 3;
|
|
@@ -189,8 +190,8 @@ exports.SystemAlert = {
|
|
|
189
190
|
]);
|
|
190
191
|
const { gql, ApolloError } = modules;
|
|
191
192
|
const CREATE_MANY_SYSTEMALERT = gql `
|
|
192
|
-
mutation createManySystemAlert($data: [SystemAlertCreateManyInput!]
|
|
193
|
-
createManySystemAlert(data: $data) {
|
|
193
|
+
mutation createManySystemAlert($data: [SystemAlertCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
194
|
+
createManySystemAlert(data: $data, skipDuplicates: $skipDuplicates) {
|
|
194
195
|
count
|
|
195
196
|
}
|
|
196
197
|
}`;
|
|
@@ -217,6 +218,7 @@ exports.SystemAlert = {
|
|
|
217
218
|
escalationLevel: prop.escalationLevel !== undefined ? prop.escalationLevel : undefined,
|
|
218
219
|
notificationChannels: prop.notificationChannels !== undefined ? prop.notificationChannels : undefined,
|
|
219
220
|
})),
|
|
221
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
220
222
|
};
|
|
221
223
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
222
224
|
const response = await client.mutate({
|
|
@@ -247,10 +249,9 @@ exports.SystemAlert = {
|
|
|
247
249
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
248
250
|
if (isConstraintViolation) {
|
|
249
251
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
250
|
-
logger_1.logger.
|
|
252
|
+
logger_1.logger.warn("Duplicate key in createManySystemAlert (expected during overlapping fetches)", {
|
|
251
253
|
operation: 'createManySystemAlert',
|
|
252
254
|
model: 'SystemAlert',
|
|
253
|
-
error: String(error),
|
|
254
255
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
255
256
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
256
257
|
isRetryable: false,
|
package/SystemAlert.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const SystemAlert: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of SystemAlert 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: SystemAlertType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: SystemAlertType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/Trade.cjs
CHANGED
|
@@ -224,9 +224,10 @@ exports.Trade = {
|
|
|
224
224
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
225
225
|
* @param props - Array of Trade objects for the new records.
|
|
226
226
|
* @param globalClient - Apollo Client instance.
|
|
227
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
227
228
|
* @returns The count of created records or null.
|
|
228
229
|
*/
|
|
229
|
-
async createMany(props, globalClient) {
|
|
230
|
+
async createMany(props, globalClient, options) {
|
|
230
231
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
231
232
|
// Maximum number of retries for database connection issues
|
|
232
233
|
const MAX_RETRIES = 3;
|
|
@@ -243,8 +244,8 @@ exports.Trade = {
|
|
|
243
244
|
]);
|
|
244
245
|
const { gql, ApolloError } = modules;
|
|
245
246
|
const CREATE_MANY_TRADE = gql `
|
|
246
|
-
mutation createManyTrade($data: [TradeCreateManyInput!]
|
|
247
|
-
createManyTrade(data: $data) {
|
|
247
|
+
mutation createManyTrade($data: [TradeCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
248
|
+
createManyTrade(data: $data, skipDuplicates: $skipDuplicates) {
|
|
248
249
|
count
|
|
249
250
|
}
|
|
250
251
|
}`;
|
|
@@ -276,6 +277,7 @@ exports.Trade = {
|
|
|
276
277
|
sessionHorizonMinutes: prop.sessionHorizonMinutes !== undefined ? prop.sessionHorizonMinutes : undefined,
|
|
277
278
|
thresholdsJson: prop.thresholdsJson !== undefined ? prop.thresholdsJson : undefined,
|
|
278
279
|
})),
|
|
280
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
279
281
|
};
|
|
280
282
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
281
283
|
const response = await client.mutate({
|
|
@@ -306,10 +308,9 @@ exports.Trade = {
|
|
|
306
308
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
307
309
|
if (isConstraintViolation) {
|
|
308
310
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
309
|
-
logger_1.logger.
|
|
311
|
+
logger_1.logger.warn("Duplicate key in createManyTrade (expected during overlapping fetches)", {
|
|
310
312
|
operation: 'createManyTrade',
|
|
311
313
|
model: 'Trade',
|
|
312
|
-
error: String(error),
|
|
313
314
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
314
315
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
315
316
|
isRetryable: false,
|
package/Trade.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const Trade: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of Trade 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: TradeType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: TradeType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/TradeAuditEvent.cjs
CHANGED
|
@@ -173,9 +173,10 @@ exports.TradeAuditEvent = {
|
|
|
173
173
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
174
174
|
* @param props - Array of TradeAuditEvent objects for the new records.
|
|
175
175
|
* @param globalClient - Apollo Client instance.
|
|
176
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
176
177
|
* @returns The count of created records or null.
|
|
177
178
|
*/
|
|
178
|
-
async createMany(props, globalClient) {
|
|
179
|
+
async createMany(props, globalClient, options) {
|
|
179
180
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
180
181
|
// Maximum number of retries for database connection issues
|
|
181
182
|
const MAX_RETRIES = 3;
|
|
@@ -192,8 +193,8 @@ exports.TradeAuditEvent = {
|
|
|
192
193
|
]);
|
|
193
194
|
const { gql, ApolloError } = modules;
|
|
194
195
|
const CREATE_MANY_TRADEAUDITEVENT = gql `
|
|
195
|
-
mutation createManyTradeAuditEvent($data: [TradeAuditEventCreateManyInput!]
|
|
196
|
-
createManyTradeAuditEvent(data: $data) {
|
|
196
|
+
mutation createManyTradeAuditEvent($data: [TradeAuditEventCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
197
|
+
createManyTradeAuditEvent(data: $data, skipDuplicates: $skipDuplicates) {
|
|
197
198
|
count
|
|
198
199
|
}
|
|
199
200
|
}`;
|
|
@@ -222,6 +223,7 @@ exports.TradeAuditEvent = {
|
|
|
222
223
|
passed: prop.passed !== undefined ? prop.passed : undefined,
|
|
223
224
|
retentionDate: prop.retentionDate !== undefined ? prop.retentionDate : undefined,
|
|
224
225
|
})),
|
|
226
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
225
227
|
};
|
|
226
228
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
227
229
|
const response = await client.mutate({
|
|
@@ -252,10 +254,9 @@ exports.TradeAuditEvent = {
|
|
|
252
254
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
253
255
|
if (isConstraintViolation) {
|
|
254
256
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
255
|
-
logger_1.logger.
|
|
257
|
+
logger_1.logger.warn("Duplicate key in createManyTradeAuditEvent (expected during overlapping fetches)", {
|
|
256
258
|
operation: 'createManyTradeAuditEvent',
|
|
257
259
|
model: 'TradeAuditEvent',
|
|
258
|
-
error: String(error),
|
|
259
260
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
260
261
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
261
262
|
isRetryable: false,
|
package/TradeAuditEvent.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const TradeAuditEvent: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of TradeAuditEvent 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: TradeAuditEventType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: TradeAuditEventType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
|
@@ -57,6 +57,7 @@ exports.TradeExecutionHistory = {
|
|
|
57
57
|
`;
|
|
58
58
|
const variables = {
|
|
59
59
|
data: {
|
|
60
|
+
id: props.id !== undefined ? props.id : undefined,
|
|
60
61
|
ticker: props.ticker !== undefined ? props.ticker : undefined,
|
|
61
62
|
action: props.action !== undefined ? props.action : undefined,
|
|
62
63
|
timestamp: props.timestamp !== undefined ? props.timestamp : undefined,
|
|
@@ -139,9 +140,10 @@ exports.TradeExecutionHistory = {
|
|
|
139
140
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
140
141
|
* @param props - Array of TradeExecutionHistory objects for the new records.
|
|
141
142
|
* @param globalClient - Apollo Client instance.
|
|
143
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
142
144
|
* @returns The count of created records or null.
|
|
143
145
|
*/
|
|
144
|
-
async createMany(props, globalClient) {
|
|
146
|
+
async createMany(props, globalClient, options) {
|
|
145
147
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
146
148
|
// Maximum number of retries for database connection issues
|
|
147
149
|
const MAX_RETRIES = 3;
|
|
@@ -158,19 +160,21 @@ exports.TradeExecutionHistory = {
|
|
|
158
160
|
]);
|
|
159
161
|
const { gql, ApolloError } = modules;
|
|
160
162
|
const CREATE_MANY_TRADEEXECUTIONHISTORY = gql `
|
|
161
|
-
mutation createManyTradeExecutionHistory($data: [TradeExecutionHistoryCreateManyInput!]
|
|
162
|
-
createManyTradeExecutionHistory(data: $data) {
|
|
163
|
+
mutation createManyTradeExecutionHistory($data: [TradeExecutionHistoryCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
164
|
+
createManyTradeExecutionHistory(data: $data, skipDuplicates: $skipDuplicates) {
|
|
163
165
|
count
|
|
164
166
|
}
|
|
165
167
|
}`;
|
|
166
168
|
const variables = {
|
|
167
169
|
data: props.map(prop => ({
|
|
170
|
+
id: prop.id !== undefined ? prop.id : undefined,
|
|
168
171
|
ticker: prop.ticker !== undefined ? prop.ticker : undefined,
|
|
169
172
|
action: prop.action !== undefined ? prop.action : undefined,
|
|
170
173
|
timestamp: prop.timestamp !== undefined ? prop.timestamp : undefined,
|
|
171
174
|
accounts: prop.accounts !== undefined ? prop.accounts : undefined,
|
|
172
175
|
expiresAt: prop.expiresAt !== undefined ? prop.expiresAt : undefined,
|
|
173
176
|
})),
|
|
177
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
174
178
|
};
|
|
175
179
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
176
180
|
const response = await client.mutate({
|
|
@@ -201,10 +205,9 @@ exports.TradeExecutionHistory = {
|
|
|
201
205
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
202
206
|
if (isConstraintViolation) {
|
|
203
207
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
204
|
-
logger_1.logger.
|
|
208
|
+
logger_1.logger.warn("Duplicate key in createManyTradeExecutionHistory (expected during overlapping fetches)", {
|
|
205
209
|
operation: 'createManyTradeExecutionHistory',
|
|
206
210
|
model: 'TradeExecutionHistory',
|
|
207
|
-
error: String(error),
|
|
208
211
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
209
212
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
210
213
|
isRetryable: false,
|
|
@@ -406,6 +409,7 @@ exports.TradeExecutionHistory = {
|
|
|
406
409
|
id: props.id !== undefined ? props.id : undefined,
|
|
407
410
|
},
|
|
408
411
|
create: {
|
|
412
|
+
id: props.id !== undefined ? props.id : undefined,
|
|
409
413
|
ticker: props.ticker !== undefined ? props.ticker : undefined,
|
|
410
414
|
action: props.action !== undefined ? props.action : undefined,
|
|
411
415
|
timestamp: props.timestamp !== undefined ? props.timestamp : undefined,
|
|
@@ -20,9 +20,12 @@ export declare const TradeExecutionHistory: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of TradeExecutionHistory 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: TradeExecutionHistoryType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: TradeExecutionHistoryType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/TradingPolicy.cjs
CHANGED
|
@@ -634,9 +634,10 @@ exports.TradingPolicy = {
|
|
|
634
634
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
635
635
|
* @param props - Array of TradingPolicy objects for the new records.
|
|
636
636
|
* @param globalClient - Apollo Client instance.
|
|
637
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
637
638
|
* @returns The count of created records or null.
|
|
638
639
|
*/
|
|
639
|
-
async createMany(props, globalClient) {
|
|
640
|
+
async createMany(props, globalClient, options) {
|
|
640
641
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
641
642
|
// Maximum number of retries for database connection issues
|
|
642
643
|
const MAX_RETRIES = 3;
|
|
@@ -653,8 +654,8 @@ exports.TradingPolicy = {
|
|
|
653
654
|
]);
|
|
654
655
|
const { gql, ApolloError } = modules;
|
|
655
656
|
const CREATE_MANY_TRADINGPOLICY = gql `
|
|
656
|
-
mutation createManyTradingPolicy($data: [TradingPolicyCreateManyInput!]
|
|
657
|
-
createManyTradingPolicy(data: $data) {
|
|
657
|
+
mutation createManyTradingPolicy($data: [TradingPolicyCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
658
|
+
createManyTradingPolicy(data: $data, skipDuplicates: $skipDuplicates) {
|
|
658
659
|
count
|
|
659
660
|
}
|
|
660
661
|
}`;
|
|
@@ -713,6 +714,7 @@ exports.TradingPolicy = {
|
|
|
713
714
|
modelPrefs: prop.modelPrefs !== undefined ? prop.modelPrefs : undefined,
|
|
714
715
|
auditNotificationPrefs: prop.auditNotificationPrefs !== undefined ? prop.auditNotificationPrefs : undefined,
|
|
715
716
|
})),
|
|
717
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
716
718
|
};
|
|
717
719
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
718
720
|
const response = await client.mutate({
|
|
@@ -743,10 +745,9 @@ exports.TradingPolicy = {
|
|
|
743
745
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
744
746
|
if (isConstraintViolation) {
|
|
745
747
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
746
|
-
logger_1.logger.
|
|
748
|
+
logger_1.logger.warn("Duplicate key in createManyTradingPolicy (expected during overlapping fetches)", {
|
|
747
749
|
operation: 'createManyTradingPolicy',
|
|
748
750
|
model: 'TradingPolicy',
|
|
749
|
-
error: String(error),
|
|
750
751
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
751
752
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
752
753
|
isRetryable: false,
|
package/TradingPolicy.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const TradingPolicy: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of TradingPolicy 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: TradingPolicyType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: TradingPolicyType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/User.cjs
CHANGED
|
@@ -724,9 +724,10 @@ exports.User = {
|
|
|
724
724
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
725
725
|
* @param props - Array of User objects for the new records.
|
|
726
726
|
* @param globalClient - Apollo Client instance.
|
|
727
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
727
728
|
* @returns The count of created records or null.
|
|
728
729
|
*/
|
|
729
|
-
async createMany(props, globalClient) {
|
|
730
|
+
async createMany(props, globalClient, options) {
|
|
730
731
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
731
732
|
// Maximum number of retries for database connection issues
|
|
732
733
|
const MAX_RETRIES = 3;
|
|
@@ -743,8 +744,8 @@ exports.User = {
|
|
|
743
744
|
]);
|
|
744
745
|
const { gql, ApolloError } = modules;
|
|
745
746
|
const CREATE_MANY_USER = gql `
|
|
746
|
-
mutation createManyUser($data: [UserCreateManyInput!]
|
|
747
|
-
createManyUser(data: $data) {
|
|
747
|
+
mutation createManyUser($data: [UserCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
748
|
+
createManyUser(data: $data, skipDuplicates: $skipDuplicates) {
|
|
748
749
|
count
|
|
749
750
|
}
|
|
750
751
|
}`;
|
|
@@ -764,6 +765,7 @@ exports.User = {
|
|
|
764
765
|
openaiAPIKey: prop.openaiAPIKey !== undefined ? prop.openaiAPIKey : undefined,
|
|
765
766
|
openaiModel: prop.openaiModel !== undefined ? prop.openaiModel : undefined,
|
|
766
767
|
})),
|
|
768
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
767
769
|
};
|
|
768
770
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
769
771
|
const response = await client.mutate({
|
|
@@ -794,10 +796,9 @@ exports.User = {
|
|
|
794
796
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
795
797
|
if (isConstraintViolation) {
|
|
796
798
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
797
|
-
logger_1.logger.
|
|
799
|
+
logger_1.logger.warn("Duplicate key in createManyUser (expected during overlapping fetches)", {
|
|
798
800
|
operation: 'createManyUser',
|
|
799
801
|
model: 'User',
|
|
800
|
-
error: String(error),
|
|
801
802
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
802
803
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
803
804
|
isRetryable: false,
|
package/User.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const User: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of User 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: UserType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: UserType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/VerificationToken.cjs
CHANGED
|
@@ -134,9 +134,10 @@ exports.VerificationToken = {
|
|
|
134
134
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
135
135
|
* @param props - Array of VerificationToken objects for the new records.
|
|
136
136
|
* @param globalClient - Apollo Client instance.
|
|
137
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
137
138
|
* @returns The count of created records or null.
|
|
138
139
|
*/
|
|
139
|
-
async createMany(props, globalClient) {
|
|
140
|
+
async createMany(props, globalClient, options) {
|
|
140
141
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
141
142
|
// Maximum number of retries for database connection issues
|
|
142
143
|
const MAX_RETRIES = 3;
|
|
@@ -153,8 +154,8 @@ exports.VerificationToken = {
|
|
|
153
154
|
]);
|
|
154
155
|
const { gql, ApolloError } = modules;
|
|
155
156
|
const CREATE_MANY_VERIFICATIONTOKEN = gql `
|
|
156
|
-
mutation createManyVerificationToken($data: [VerificationTokenCreateManyInput!]
|
|
157
|
-
createManyVerificationToken(data: $data) {
|
|
157
|
+
mutation createManyVerificationToken($data: [VerificationTokenCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
158
|
+
createManyVerificationToken(data: $data, skipDuplicates: $skipDuplicates) {
|
|
158
159
|
count
|
|
159
160
|
}
|
|
160
161
|
}`;
|
|
@@ -164,6 +165,7 @@ exports.VerificationToken = {
|
|
|
164
165
|
token: prop.token !== undefined ? prop.token : undefined,
|
|
165
166
|
expires: prop.expires !== undefined ? prop.expires : undefined,
|
|
166
167
|
})),
|
|
168
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
167
169
|
};
|
|
168
170
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
169
171
|
const response = await client.mutate({
|
|
@@ -194,10 +196,9 @@ exports.VerificationToken = {
|
|
|
194
196
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
195
197
|
if (isConstraintViolation) {
|
|
196
198
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
197
|
-
logger_1.logger.
|
|
199
|
+
logger_1.logger.warn("Duplicate key in createManyVerificationToken (expected during overlapping fetches)", {
|
|
198
200
|
operation: 'createManyVerificationToken',
|
|
199
201
|
model: 'VerificationToken',
|
|
200
|
-
error: String(error),
|
|
201
202
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
202
203
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
203
204
|
isRetryable: false,
|
package/VerificationToken.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const VerificationToken: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of VerificationToken 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: VerificationTokenType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: VerificationTokenType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/WaitlistEntry.cjs
CHANGED
|
@@ -592,9 +592,10 @@ exports.WaitlistEntry = {
|
|
|
592
592
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
593
593
|
* @param props - Array of WaitlistEntry objects for the new records.
|
|
594
594
|
* @param globalClient - Apollo Client instance.
|
|
595
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
595
596
|
* @returns The count of created records or null.
|
|
596
597
|
*/
|
|
597
|
-
async createMany(props, globalClient) {
|
|
598
|
+
async createMany(props, globalClient, options) {
|
|
598
599
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
599
600
|
// Maximum number of retries for database connection issues
|
|
600
601
|
const MAX_RETRIES = 3;
|
|
@@ -611,8 +612,8 @@ exports.WaitlistEntry = {
|
|
|
611
612
|
]);
|
|
612
613
|
const { gql, ApolloError } = modules;
|
|
613
614
|
const CREATE_MANY_WAITLISTENTRY = gql `
|
|
614
|
-
mutation createManyWaitlistEntry($data: [WaitlistEntryCreateManyInput!]
|
|
615
|
-
createManyWaitlistEntry(data: $data) {
|
|
615
|
+
mutation createManyWaitlistEntry($data: [WaitlistEntryCreateManyInput!]!, $skipDuplicates: Boolean) {
|
|
616
|
+
createManyWaitlistEntry(data: $data, skipDuplicates: $skipDuplicates) {
|
|
616
617
|
count
|
|
617
618
|
}
|
|
618
619
|
}`;
|
|
@@ -629,6 +630,7 @@ exports.WaitlistEntry = {
|
|
|
629
630
|
reviewedAt: prop.reviewedAt !== undefined ? prop.reviewedAt : undefined,
|
|
630
631
|
reviewedById: prop.reviewedById !== undefined ? prop.reviewedById : undefined,
|
|
631
632
|
})),
|
|
633
|
+
...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
|
|
632
634
|
};
|
|
633
635
|
const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
|
|
634
636
|
const response = await client.mutate({
|
|
@@ -659,10 +661,9 @@ exports.WaitlistEntry = {
|
|
|
659
661
|
((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
|
|
660
662
|
if (isConstraintViolation) {
|
|
661
663
|
const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
|
|
662
|
-
logger_1.logger.
|
|
664
|
+
logger_1.logger.warn("Duplicate key in createManyWaitlistEntry (expected during overlapping fetches)", {
|
|
663
665
|
operation: 'createManyWaitlistEntry',
|
|
664
666
|
model: 'WaitlistEntry',
|
|
665
|
-
error: String(error),
|
|
666
667
|
constraintName: constraintMatch ? constraintMatch[1] : undefined,
|
|
667
668
|
errorCategory: 'CONSTRAINT_VIOLATION',
|
|
668
669
|
isRetryable: false,
|
package/WaitlistEntry.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const WaitlistEntry: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of WaitlistEntry 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: WaitlistEntryType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: WaitlistEntryType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/esm/ABTest.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export declare const ABTest: {
|
|
|
20
20
|
* Enhanced with connection resilience against Prisma connection errors.
|
|
21
21
|
* @param props - Array of ABTest objects for the new records.
|
|
22
22
|
* @param globalClient - Apollo Client instance.
|
|
23
|
+
* @param options - Optional control flags (e.g., skipDuplicates).
|
|
23
24
|
* @returns The count of created records or null.
|
|
24
25
|
*/
|
|
25
|
-
createMany(props: ABTestType[], globalClient?: ApolloClientType<NormalizedCacheObject
|
|
26
|
+
createMany(props: ABTestType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
|
|
27
|
+
skipDuplicates?: boolean;
|
|
28
|
+
}): Promise<{
|
|
26
29
|
count: number;
|
|
27
30
|
} | null>;
|
|
28
31
|
/**
|
package/esm/ABTest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ABTest.d.ts","sourceRoot":"","sources":["../../src/ABTest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAA4B,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAsL7G,eAAO,MAAM,MAAM;IAEjB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IA4jD9G
|
|
1
|
+
{"version":3,"file":"ABTest.d.ts","sourceRoot":"","sources":["../../src/ABTest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAA4B,gBAAgB,EAAE,qBAAqB,EAAoB,MAAM,UAAU,CAAC;AAsL7G,eAAO,MAAM,MAAM;IAEjB;;;;;OAKG;IAEH;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IA4jD9G;;;;;;;OAOG;sBACqB,UAAU,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,YAAY;QAAE,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAsIxK;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IA6yM5G;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAovP5G;;;;;;OAMG;sBACqB,UAAU,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IA4yMhI;;;;;;OAMG;kBACiB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAmH5G;;;;;;;OAOG;eACc,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,GAAG,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAgGlI;;;;;OAKG;0BACyB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;IA4ElG;;;;;;;OAOG;oBACmB,UAAU,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,eAAe,GAAG,GAAG,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC;CAsG1I,CAAC"}
|