@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.
Files changed (370) hide show
  1. package/ABTest.cjs +6 -5
  2. package/ABTest.d.ts +4 -1
  3. package/Account.cjs +6 -5
  4. package/Account.d.ts +4 -1
  5. package/AccountDecisionRecord.cjs +6 -5
  6. package/AccountDecisionRecord.d.ts +4 -1
  7. package/AccountLinkingRequest.cjs +6 -5
  8. package/AccountLinkingRequest.d.ts +4 -1
  9. package/Action.cjs +6 -5
  10. package/Action.d.ts +4 -1
  11. package/Alert.cjs +6 -5
  12. package/Alert.d.ts +4 -1
  13. package/Allocation.cjs +6 -5
  14. package/Allocation.d.ts +4 -1
  15. package/AlpacaAccount.cjs +6 -5
  16. package/AlpacaAccount.d.ts +4 -1
  17. package/AnalyticsConfiguration.cjs +6 -5
  18. package/AnalyticsConfiguration.d.ts +4 -1
  19. package/AnalyticsSnapshot.cjs +6 -5
  20. package/AnalyticsSnapshot.d.ts +4 -1
  21. package/Asset.cjs +6 -5
  22. package/Asset.d.ts +4 -1
  23. package/AuditLog.cjs +6 -5
  24. package/AuditLog.d.ts +4 -1
  25. package/Authenticator.cjs +6 -5
  26. package/Authenticator.d.ts +4 -1
  27. package/Configuration.cjs +6 -5
  28. package/Configuration.d.ts +4 -1
  29. package/ConflictEvent.cjs +6 -5
  30. package/ConflictEvent.d.ts +4 -1
  31. package/ConnectionHealthSnapshot.cjs +6 -5
  32. package/ConnectionHealthSnapshot.d.ts +4 -1
  33. package/Customer.cjs +6 -5
  34. package/Customer.d.ts +4 -1
  35. package/DeadLetterMessage.cjs +6 -5
  36. package/DeadLetterMessage.d.ts +4 -1
  37. package/DecisionMemorySummary.cjs +6 -5
  38. package/DecisionMemorySummary.d.ts +4 -1
  39. package/EconomicEvent.cjs +6 -5
  40. package/EconomicEvent.d.ts +4 -1
  41. package/EquityBar.cjs +6 -5
  42. package/EquityBar.d.ts +4 -1
  43. package/Event.cjs +6 -5
  44. package/Event.d.ts +4 -1
  45. package/EventSnapshot.cjs +6 -5
  46. package/EventSnapshot.d.ts +4 -1
  47. package/FeatureImportanceAnalysis.cjs +6 -5
  48. package/FeatureImportanceAnalysis.d.ts +4 -1
  49. package/InstitutionalFlowSignal.cjs +6 -5
  50. package/InstitutionalFlowSignal.d.ts +4 -1
  51. package/InstitutionalHolding.cjs +6 -5
  52. package/InstitutionalHolding.d.ts +4 -1
  53. package/InstitutionalSentimentAlerts.cjs +6 -5
  54. package/InstitutionalSentimentAlerts.d.ts +4 -1
  55. package/InstitutionalSentimentErrors.cjs +6 -5
  56. package/InstitutionalSentimentErrors.d.ts +4 -1
  57. package/InstitutionalSentimentHistory.cjs +6 -5
  58. package/InstitutionalSentimentHistory.d.ts +4 -1
  59. package/InstitutionalSentimentMetrics.cjs +6 -5
  60. package/InstitutionalSentimentMetrics.d.ts +4 -1
  61. package/InviteToken.cjs +6 -5
  62. package/InviteToken.d.ts +4 -1
  63. package/LinkedProvider.cjs +6 -5
  64. package/LinkedProvider.d.ts +4 -1
  65. package/LlmConfiguration.cjs +6 -5
  66. package/LlmConfiguration.d.ts +4 -1
  67. package/MLTrainingData.cjs +6 -5
  68. package/MLTrainingData.d.ts +4 -1
  69. package/MarketSentiment.cjs +6 -5
  70. package/MarketSentiment.d.ts +4 -1
  71. package/ModelArtifact.cjs +6 -5
  72. package/ModelArtifact.d.ts +4 -1
  73. package/ModelVersion.cjs +6 -5
  74. package/ModelVersion.d.ts +4 -1
  75. package/ModelVersionArtifact.cjs +6 -5
  76. package/ModelVersionArtifact.d.ts +4 -1
  77. package/NewsArticle.cjs +6 -5
  78. package/NewsArticle.d.ts +4 -1
  79. package/NewsArticleAssetSentiment.cjs +6 -5
  80. package/NewsArticleAssetSentiment.d.ts +4 -1
  81. package/OptionsContract.cjs +6 -5
  82. package/OptionsContract.d.ts +4 -1
  83. package/OptionsGreeksHistory.cjs +6 -5
  84. package/OptionsGreeksHistory.d.ts +4 -1
  85. package/OptionsPosition.cjs +6 -5
  86. package/OptionsPosition.d.ts +4 -1
  87. package/OptionsTradeExecution.cjs +6 -5
  88. package/OptionsTradeExecution.d.ts +4 -1
  89. package/PolicyOverlay.cjs +6 -5
  90. package/PolicyOverlay.d.ts +4 -1
  91. package/PortfolioGreeksHistory.cjs +6 -5
  92. package/PortfolioGreeksHistory.d.ts +4 -1
  93. package/ScheduledOptionOrder.cjs +6 -5
  94. package/ScheduledOptionOrder.d.ts +4 -1
  95. package/Session.cjs +6 -5
  96. package/Session.d.ts +4 -1
  97. package/SignalGeneratorMetrics.cjs +6 -5
  98. package/SignalGeneratorMetrics.d.ts +4 -1
  99. package/SignalLineage.cjs +6 -5
  100. package/SignalLineage.d.ts +4 -1
  101. package/SignalOutcome.cjs +6 -5
  102. package/SignalOutcome.d.ts +4 -1
  103. package/SignalPriorityQueue.cjs +6 -5
  104. package/SignalPriorityQueue.d.ts +4 -1
  105. package/SyncEvent.cjs +6 -5
  106. package/SyncEvent.d.ts +4 -1
  107. package/SystemAlert.cjs +6 -5
  108. package/SystemAlert.d.ts +4 -1
  109. package/Trade.cjs +6 -5
  110. package/Trade.d.ts +4 -1
  111. package/TradeAuditEvent.cjs +6 -5
  112. package/TradeAuditEvent.d.ts +4 -1
  113. package/TradeExecutionHistory.cjs +9 -5
  114. package/TradeExecutionHistory.d.ts +4 -1
  115. package/TradingPolicy.cjs +6 -5
  116. package/TradingPolicy.d.ts +4 -1
  117. package/User.cjs +6 -5
  118. package/User.d.ts +4 -1
  119. package/VerificationToken.cjs +6 -5
  120. package/VerificationToken.d.ts +4 -1
  121. package/WaitlistEntry.cjs +6 -5
  122. package/WaitlistEntry.d.ts +4 -1
  123. package/esm/ABTest.d.ts +4 -1
  124. package/esm/ABTest.d.ts.map +1 -1
  125. package/esm/ABTest.js.map +1 -1
  126. package/esm/ABTest.mjs +6 -5
  127. package/esm/Account.d.ts +4 -1
  128. package/esm/Account.d.ts.map +1 -1
  129. package/esm/Account.js.map +1 -1
  130. package/esm/Account.mjs +6 -5
  131. package/esm/AccountDecisionRecord.d.ts +4 -1
  132. package/esm/AccountDecisionRecord.d.ts.map +1 -1
  133. package/esm/AccountDecisionRecord.js.map +1 -1
  134. package/esm/AccountDecisionRecord.mjs +6 -5
  135. package/esm/AccountLinkingRequest.d.ts +4 -1
  136. package/esm/AccountLinkingRequest.d.ts.map +1 -1
  137. package/esm/AccountLinkingRequest.js.map +1 -1
  138. package/esm/AccountLinkingRequest.mjs +6 -5
  139. package/esm/Action.d.ts +4 -1
  140. package/esm/Action.d.ts.map +1 -1
  141. package/esm/Action.js.map +1 -1
  142. package/esm/Action.mjs +6 -5
  143. package/esm/Alert.d.ts +4 -1
  144. package/esm/Alert.d.ts.map +1 -1
  145. package/esm/Alert.js.map +1 -1
  146. package/esm/Alert.mjs +6 -5
  147. package/esm/Allocation.d.ts +4 -1
  148. package/esm/Allocation.d.ts.map +1 -1
  149. package/esm/Allocation.js.map +1 -1
  150. package/esm/Allocation.mjs +6 -5
  151. package/esm/AlpacaAccount.d.ts +4 -1
  152. package/esm/AlpacaAccount.d.ts.map +1 -1
  153. package/esm/AlpacaAccount.js.map +1 -1
  154. package/esm/AlpacaAccount.mjs +6 -5
  155. package/esm/AnalyticsConfiguration.d.ts +4 -1
  156. package/esm/AnalyticsConfiguration.d.ts.map +1 -1
  157. package/esm/AnalyticsConfiguration.js.map +1 -1
  158. package/esm/AnalyticsConfiguration.mjs +6 -5
  159. package/esm/AnalyticsSnapshot.d.ts +4 -1
  160. package/esm/AnalyticsSnapshot.d.ts.map +1 -1
  161. package/esm/AnalyticsSnapshot.js.map +1 -1
  162. package/esm/AnalyticsSnapshot.mjs +6 -5
  163. package/esm/Asset.d.ts +4 -1
  164. package/esm/Asset.d.ts.map +1 -1
  165. package/esm/Asset.js.map +1 -1
  166. package/esm/Asset.mjs +6 -5
  167. package/esm/AuditLog.d.ts +4 -1
  168. package/esm/AuditLog.d.ts.map +1 -1
  169. package/esm/AuditLog.js.map +1 -1
  170. package/esm/AuditLog.mjs +6 -5
  171. package/esm/Authenticator.d.ts +4 -1
  172. package/esm/Authenticator.d.ts.map +1 -1
  173. package/esm/Authenticator.js.map +1 -1
  174. package/esm/Authenticator.mjs +6 -5
  175. package/esm/Configuration.d.ts +4 -1
  176. package/esm/Configuration.d.ts.map +1 -1
  177. package/esm/Configuration.js.map +1 -1
  178. package/esm/Configuration.mjs +6 -5
  179. package/esm/ConflictEvent.d.ts +4 -1
  180. package/esm/ConflictEvent.d.ts.map +1 -1
  181. package/esm/ConflictEvent.js.map +1 -1
  182. package/esm/ConflictEvent.mjs +6 -5
  183. package/esm/ConnectionHealthSnapshot.d.ts +4 -1
  184. package/esm/ConnectionHealthSnapshot.d.ts.map +1 -1
  185. package/esm/ConnectionHealthSnapshot.js.map +1 -1
  186. package/esm/ConnectionHealthSnapshot.mjs +6 -5
  187. package/esm/Customer.d.ts +4 -1
  188. package/esm/Customer.d.ts.map +1 -1
  189. package/esm/Customer.js.map +1 -1
  190. package/esm/Customer.mjs +6 -5
  191. package/esm/DeadLetterMessage.d.ts +4 -1
  192. package/esm/DeadLetterMessage.d.ts.map +1 -1
  193. package/esm/DeadLetterMessage.js.map +1 -1
  194. package/esm/DeadLetterMessage.mjs +6 -5
  195. package/esm/DecisionMemorySummary.d.ts +4 -1
  196. package/esm/DecisionMemorySummary.d.ts.map +1 -1
  197. package/esm/DecisionMemorySummary.js.map +1 -1
  198. package/esm/DecisionMemorySummary.mjs +6 -5
  199. package/esm/EconomicEvent.d.ts +4 -1
  200. package/esm/EconomicEvent.d.ts.map +1 -1
  201. package/esm/EconomicEvent.js.map +1 -1
  202. package/esm/EconomicEvent.mjs +6 -5
  203. package/esm/EquityBar.d.ts +4 -1
  204. package/esm/EquityBar.d.ts.map +1 -1
  205. package/esm/EquityBar.js.map +1 -1
  206. package/esm/EquityBar.mjs +6 -5
  207. package/esm/Event.d.ts +4 -1
  208. package/esm/Event.d.ts.map +1 -1
  209. package/esm/Event.js.map +1 -1
  210. package/esm/Event.mjs +6 -5
  211. package/esm/EventSnapshot.d.ts +4 -1
  212. package/esm/EventSnapshot.d.ts.map +1 -1
  213. package/esm/EventSnapshot.js.map +1 -1
  214. package/esm/EventSnapshot.mjs +6 -5
  215. package/esm/FeatureImportanceAnalysis.d.ts +4 -1
  216. package/esm/FeatureImportanceAnalysis.d.ts.map +1 -1
  217. package/esm/FeatureImportanceAnalysis.js.map +1 -1
  218. package/esm/FeatureImportanceAnalysis.mjs +6 -5
  219. package/esm/InstitutionalFlowSignal.d.ts +4 -1
  220. package/esm/InstitutionalFlowSignal.d.ts.map +1 -1
  221. package/esm/InstitutionalFlowSignal.js.map +1 -1
  222. package/esm/InstitutionalFlowSignal.mjs +6 -5
  223. package/esm/InstitutionalHolding.d.ts +4 -1
  224. package/esm/InstitutionalHolding.d.ts.map +1 -1
  225. package/esm/InstitutionalHolding.js.map +1 -1
  226. package/esm/InstitutionalHolding.mjs +6 -5
  227. package/esm/InstitutionalSentimentAlerts.d.ts +4 -1
  228. package/esm/InstitutionalSentimentAlerts.d.ts.map +1 -1
  229. package/esm/InstitutionalSentimentAlerts.js.map +1 -1
  230. package/esm/InstitutionalSentimentAlerts.mjs +6 -5
  231. package/esm/InstitutionalSentimentErrors.d.ts +4 -1
  232. package/esm/InstitutionalSentimentErrors.d.ts.map +1 -1
  233. package/esm/InstitutionalSentimentErrors.js.map +1 -1
  234. package/esm/InstitutionalSentimentErrors.mjs +6 -5
  235. package/esm/InstitutionalSentimentHistory.d.ts +4 -1
  236. package/esm/InstitutionalSentimentHistory.d.ts.map +1 -1
  237. package/esm/InstitutionalSentimentHistory.js.map +1 -1
  238. package/esm/InstitutionalSentimentHistory.mjs +6 -5
  239. package/esm/InstitutionalSentimentMetrics.d.ts +4 -1
  240. package/esm/InstitutionalSentimentMetrics.d.ts.map +1 -1
  241. package/esm/InstitutionalSentimentMetrics.js.map +1 -1
  242. package/esm/InstitutionalSentimentMetrics.mjs +6 -5
  243. package/esm/InviteToken.d.ts +4 -1
  244. package/esm/InviteToken.d.ts.map +1 -1
  245. package/esm/InviteToken.js.map +1 -1
  246. package/esm/InviteToken.mjs +6 -5
  247. package/esm/LinkedProvider.d.ts +4 -1
  248. package/esm/LinkedProvider.d.ts.map +1 -1
  249. package/esm/LinkedProvider.js.map +1 -1
  250. package/esm/LinkedProvider.mjs +6 -5
  251. package/esm/LlmConfiguration.d.ts +4 -1
  252. package/esm/LlmConfiguration.d.ts.map +1 -1
  253. package/esm/LlmConfiguration.js.map +1 -1
  254. package/esm/LlmConfiguration.mjs +6 -5
  255. package/esm/MLTrainingData.d.ts +4 -1
  256. package/esm/MLTrainingData.d.ts.map +1 -1
  257. package/esm/MLTrainingData.js.map +1 -1
  258. package/esm/MLTrainingData.mjs +6 -5
  259. package/esm/MarketSentiment.d.ts +4 -1
  260. package/esm/MarketSentiment.d.ts.map +1 -1
  261. package/esm/MarketSentiment.js.map +1 -1
  262. package/esm/MarketSentiment.mjs +6 -5
  263. package/esm/ModelArtifact.d.ts +4 -1
  264. package/esm/ModelArtifact.d.ts.map +1 -1
  265. package/esm/ModelArtifact.js.map +1 -1
  266. package/esm/ModelArtifact.mjs +6 -5
  267. package/esm/ModelVersion.d.ts +4 -1
  268. package/esm/ModelVersion.d.ts.map +1 -1
  269. package/esm/ModelVersion.js.map +1 -1
  270. package/esm/ModelVersion.mjs +6 -5
  271. package/esm/ModelVersionArtifact.d.ts +4 -1
  272. package/esm/ModelVersionArtifact.d.ts.map +1 -1
  273. package/esm/ModelVersionArtifact.js.map +1 -1
  274. package/esm/ModelVersionArtifact.mjs +6 -5
  275. package/esm/NewsArticle.d.ts +4 -1
  276. package/esm/NewsArticle.d.ts.map +1 -1
  277. package/esm/NewsArticle.js.map +1 -1
  278. package/esm/NewsArticle.mjs +6 -5
  279. package/esm/NewsArticleAssetSentiment.d.ts +4 -1
  280. package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
  281. package/esm/NewsArticleAssetSentiment.js.map +1 -1
  282. package/esm/NewsArticleAssetSentiment.mjs +6 -5
  283. package/esm/OptionsContract.d.ts +4 -1
  284. package/esm/OptionsContract.d.ts.map +1 -1
  285. package/esm/OptionsContract.js.map +1 -1
  286. package/esm/OptionsContract.mjs +6 -5
  287. package/esm/OptionsGreeksHistory.d.ts +4 -1
  288. package/esm/OptionsGreeksHistory.d.ts.map +1 -1
  289. package/esm/OptionsGreeksHistory.js.map +1 -1
  290. package/esm/OptionsGreeksHistory.mjs +6 -5
  291. package/esm/OptionsPosition.d.ts +4 -1
  292. package/esm/OptionsPosition.d.ts.map +1 -1
  293. package/esm/OptionsPosition.js.map +1 -1
  294. package/esm/OptionsPosition.mjs +6 -5
  295. package/esm/OptionsTradeExecution.d.ts +4 -1
  296. package/esm/OptionsTradeExecution.d.ts.map +1 -1
  297. package/esm/OptionsTradeExecution.js.map +1 -1
  298. package/esm/OptionsTradeExecution.mjs +6 -5
  299. package/esm/PolicyOverlay.d.ts +4 -1
  300. package/esm/PolicyOverlay.d.ts.map +1 -1
  301. package/esm/PolicyOverlay.js.map +1 -1
  302. package/esm/PolicyOverlay.mjs +6 -5
  303. package/esm/PortfolioGreeksHistory.d.ts +4 -1
  304. package/esm/PortfolioGreeksHistory.d.ts.map +1 -1
  305. package/esm/PortfolioGreeksHistory.js.map +1 -1
  306. package/esm/PortfolioGreeksHistory.mjs +6 -5
  307. package/esm/ScheduledOptionOrder.d.ts +4 -1
  308. package/esm/ScheduledOptionOrder.d.ts.map +1 -1
  309. package/esm/ScheduledOptionOrder.js.map +1 -1
  310. package/esm/ScheduledOptionOrder.mjs +6 -5
  311. package/esm/Session.d.ts +4 -1
  312. package/esm/Session.d.ts.map +1 -1
  313. package/esm/Session.js.map +1 -1
  314. package/esm/Session.mjs +6 -5
  315. package/esm/SignalGeneratorMetrics.d.ts +4 -1
  316. package/esm/SignalGeneratorMetrics.d.ts.map +1 -1
  317. package/esm/SignalGeneratorMetrics.js.map +1 -1
  318. package/esm/SignalGeneratorMetrics.mjs +6 -5
  319. package/esm/SignalLineage.d.ts +4 -1
  320. package/esm/SignalLineage.d.ts.map +1 -1
  321. package/esm/SignalLineage.js.map +1 -1
  322. package/esm/SignalLineage.mjs +6 -5
  323. package/esm/SignalOutcome.d.ts +4 -1
  324. package/esm/SignalOutcome.d.ts.map +1 -1
  325. package/esm/SignalOutcome.js.map +1 -1
  326. package/esm/SignalOutcome.mjs +6 -5
  327. package/esm/SignalPriorityQueue.d.ts +4 -1
  328. package/esm/SignalPriorityQueue.d.ts.map +1 -1
  329. package/esm/SignalPriorityQueue.js.map +1 -1
  330. package/esm/SignalPriorityQueue.mjs +6 -5
  331. package/esm/SyncEvent.d.ts +4 -1
  332. package/esm/SyncEvent.d.ts.map +1 -1
  333. package/esm/SyncEvent.js.map +1 -1
  334. package/esm/SyncEvent.mjs +6 -5
  335. package/esm/SystemAlert.d.ts +4 -1
  336. package/esm/SystemAlert.d.ts.map +1 -1
  337. package/esm/SystemAlert.js.map +1 -1
  338. package/esm/SystemAlert.mjs +6 -5
  339. package/esm/Trade.d.ts +4 -1
  340. package/esm/Trade.d.ts.map +1 -1
  341. package/esm/Trade.js.map +1 -1
  342. package/esm/Trade.mjs +6 -5
  343. package/esm/TradeAuditEvent.d.ts +4 -1
  344. package/esm/TradeAuditEvent.d.ts.map +1 -1
  345. package/esm/TradeAuditEvent.js.map +1 -1
  346. package/esm/TradeAuditEvent.mjs +6 -5
  347. package/esm/TradeExecutionHistory.d.ts +4 -1
  348. package/esm/TradeExecutionHistory.d.ts.map +1 -1
  349. package/esm/TradeExecutionHistory.js.map +1 -1
  350. package/esm/TradeExecutionHistory.mjs +9 -5
  351. package/esm/TradingPolicy.d.ts +4 -1
  352. package/esm/TradingPolicy.d.ts.map +1 -1
  353. package/esm/TradingPolicy.js.map +1 -1
  354. package/esm/TradingPolicy.mjs +6 -5
  355. package/esm/User.d.ts +4 -1
  356. package/esm/User.d.ts.map +1 -1
  357. package/esm/User.js.map +1 -1
  358. package/esm/User.mjs +6 -5
  359. package/esm/VerificationToken.d.ts +4 -1
  360. package/esm/VerificationToken.d.ts.map +1 -1
  361. package/esm/VerificationToken.js.map +1 -1
  362. package/esm/VerificationToken.mjs +6 -5
  363. package/esm/WaitlistEntry.d.ts +4 -1
  364. package/esm/WaitlistEntry.d.ts.map +1 -1
  365. package/esm/WaitlistEntry.js.map +1 -1
  366. package/esm/WaitlistEntry.mjs +6 -5
  367. package/esm/index.d.ts +183 -61
  368. package/esm/index.d.ts.map +1 -1
  369. package/index.d.ts +183 -61
  370. 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>): Promise<{
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.error("Non-retryable constraint violation in createManySystemAlert", {
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>): Promise<{
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.error("Non-retryable constraint violation in createManyTrade", {
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>): Promise<{
26
+ createMany(props: TradeType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -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.error("Non-retryable constraint violation in createManyTradeAuditEvent", {
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,
@@ -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>): Promise<{
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.error("Non-retryable constraint violation in createManyTradeExecutionHistory", {
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>): Promise<{
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.error("Non-retryable constraint violation in createManyTradingPolicy", {
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,
@@ -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>): Promise<{
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.error("Non-retryable constraint violation in createManyUser", {
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>): Promise<{
26
+ createMany(props: UserType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -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.error("Non-retryable constraint violation in createManyVerificationToken", {
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,
@@ -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>): Promise<{
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.error("Non-retryable constraint violation in createManyWaitlistEntry", {
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,
@@ -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>): Promise<{
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>): Promise<{
26
+ createMany(props: ABTestType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -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;;;;;;OAMG;sBACqB,UAAU,EAAE,iBAAiB,gBAAgB,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAsIhI;;;;;;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"}
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"}