@adaptic/backend-legacy 0.0.918 → 0.0.919

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