@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
package/Event.cjs CHANGED
@@ -174,9 +174,10 @@ exports.Event = {
174
174
  * Enhanced with connection resilience against Prisma connection errors.
175
175
  * @param props - Array of Event objects for the new records.
176
176
  * @param globalClient - Apollo Client instance.
177
+ * @param options - Optional control flags (e.g., skipDuplicates).
177
178
  * @returns The count of created records or null.
178
179
  */
179
- async createMany(props, globalClient) {
180
+ async createMany(props, globalClient, options) {
180
181
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
181
182
  // Maximum number of retries for database connection issues
182
183
  const MAX_RETRIES = 3;
@@ -193,8 +194,8 @@ exports.Event = {
193
194
  ]);
194
195
  const { gql, ApolloError } = modules;
195
196
  const CREATE_MANY_EVENT = gql `
196
- mutation createManyEvent($data: [EventCreateManyInput!]!) {
197
- createManyEvent(data: $data) {
197
+ mutation createManyEvent($data: [EventCreateManyInput!]!, $skipDuplicates: Boolean) {
198
+ createManyEvent(data: $data, skipDuplicates: $skipDuplicates) {
198
199
  count
199
200
  }
200
201
  }`;
@@ -223,6 +224,7 @@ exports.Event = {
223
224
  archived: prop.archived !== undefined ? prop.archived : undefined,
224
225
  tags: prop.tags !== undefined ? prop.tags : undefined,
225
226
  })),
227
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
226
228
  };
227
229
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
228
230
  const response = await client.mutate({
@@ -253,10 +255,9 @@ exports.Event = {
253
255
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
254
256
  if (isConstraintViolation) {
255
257
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
256
- logger_1.logger.error("Non-retryable constraint violation in createManyEvent", {
258
+ logger_1.logger.warn("Duplicate key in createManyEvent (expected during overlapping fetches)", {
257
259
  operation: 'createManyEvent',
258
260
  model: 'Event',
259
- error: String(error),
260
261
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
261
262
  errorCategory: 'CONSTRAINT_VIOLATION',
262
263
  isRetryable: false,
package/Event.d.ts CHANGED
@@ -20,9 +20,12 @@ export declare const Event: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of Event 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: EventType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: EventType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
package/EventSnapshot.cjs CHANGED
@@ -140,9 +140,10 @@ exports.EventSnapshot = {
140
140
  * Enhanced with connection resilience against Prisma connection errors.
141
141
  * @param props - Array of EventSnapshot objects for the new records.
142
142
  * @param globalClient - Apollo Client instance.
143
+ * @param options - Optional control flags (e.g., skipDuplicates).
143
144
  * @returns The count of created records or null.
144
145
  */
145
- async createMany(props, globalClient) {
146
+ async createMany(props, globalClient, options) {
146
147
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
147
148
  // Maximum number of retries for database connection issues
148
149
  const MAX_RETRIES = 3;
@@ -159,8 +160,8 @@ exports.EventSnapshot = {
159
160
  ]);
160
161
  const { gql, ApolloError } = modules;
161
162
  const CREATE_MANY_EVENTSNAPSHOT = gql `
162
- mutation createManyEventSnapshot($data: [EventSnapshotCreateManyInput!]!) {
163
- createManyEventSnapshot(data: $data) {
163
+ mutation createManyEventSnapshot($data: [EventSnapshotCreateManyInput!]!, $skipDuplicates: Boolean) {
164
+ createManyEventSnapshot(data: $data, skipDuplicates: $skipDuplicates) {
164
165
  count
165
166
  }
166
167
  }`;
@@ -172,6 +173,7 @@ exports.EventSnapshot = {
172
173
  state: prop.state !== undefined ? prop.state : undefined,
173
174
  timestamp: prop.timestamp !== undefined ? prop.timestamp : undefined,
174
175
  })),
176
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
175
177
  };
176
178
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
177
179
  const response = await client.mutate({
@@ -202,10 +204,9 @@ exports.EventSnapshot = {
202
204
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
203
205
  if (isConstraintViolation) {
204
206
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
205
- logger_1.logger.error("Non-retryable constraint violation in createManyEventSnapshot", {
207
+ logger_1.logger.warn("Duplicate key in createManyEventSnapshot (expected during overlapping fetches)", {
206
208
  operation: 'createManyEventSnapshot',
207
209
  model: 'EventSnapshot',
208
- error: String(error),
209
210
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
210
211
  errorCategory: 'CONSTRAINT_VIOLATION',
211
212
  isRetryable: false,
@@ -20,9 +20,12 @@ export declare const EventSnapshot: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of EventSnapshot 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: EventSnapshotType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: EventSnapshotType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -1027,9 +1027,10 @@ exports.FeatureImportanceAnalysis = {
1027
1027
  * Enhanced with connection resilience against Prisma connection errors.
1028
1028
  * @param props - Array of FeatureImportanceAnalysis objects for the new records.
1029
1029
  * @param globalClient - Apollo Client instance.
1030
+ * @param options - Optional control flags (e.g., skipDuplicates).
1030
1031
  * @returns The count of created records or null.
1031
1032
  */
1032
- async createMany(props, globalClient) {
1033
+ async createMany(props, globalClient, options) {
1033
1034
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
1034
1035
  // Maximum number of retries for database connection issues
1035
1036
  const MAX_RETRIES = 3;
@@ -1046,8 +1047,8 @@ exports.FeatureImportanceAnalysis = {
1046
1047
  ]);
1047
1048
  const { gql, ApolloError } = modules;
1048
1049
  const CREATE_MANY_FEATUREIMPORTANCEANALYSIS = gql `
1049
- mutation createManyFeatureImportanceAnalysis($data: [FeatureImportanceAnalysisCreateManyInput!]!) {
1050
- createManyFeatureImportanceAnalysis(data: $data) {
1050
+ mutation createManyFeatureImportanceAnalysis($data: [FeatureImportanceAnalysisCreateManyInput!]!, $skipDuplicates: Boolean) {
1051
+ createManyFeatureImportanceAnalysis(data: $data, skipDuplicates: $skipDuplicates) {
1051
1052
  count
1052
1053
  }
1053
1054
  }`;
@@ -1069,6 +1070,7 @@ exports.FeatureImportanceAnalysis = {
1069
1070
  insightsStabilityScore: prop.insightsStabilityScore !== undefined ? prop.insightsStabilityScore : undefined,
1070
1071
  insightsRecommendations: prop.insightsRecommendations !== undefined ? prop.insightsRecommendations : undefined,
1071
1072
  })),
1073
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
1072
1074
  };
1073
1075
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
1074
1076
  const response = await client.mutate({
@@ -1099,10 +1101,9 @@ exports.FeatureImportanceAnalysis = {
1099
1101
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
1100
1102
  if (isConstraintViolation) {
1101
1103
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
1102
- logger_1.logger.error("Non-retryable constraint violation in createManyFeatureImportanceAnalysis", {
1104
+ logger_1.logger.warn("Duplicate key in createManyFeatureImportanceAnalysis (expected during overlapping fetches)", {
1103
1105
  operation: 'createManyFeatureImportanceAnalysis',
1104
1106
  model: 'FeatureImportanceAnalysis',
1105
- error: String(error),
1106
1107
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
1107
1108
  errorCategory: 'CONSTRAINT_VIOLATION',
1108
1109
  isRetryable: false,
@@ -20,9 +20,12 @@ export declare const FeatureImportanceAnalysis: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of FeatureImportanceAnalysis 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: FeatureImportanceAnalysisType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: FeatureImportanceAnalysisType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -353,9 +353,10 @@ exports.InstitutionalFlowSignal = {
353
353
  * Enhanced with connection resilience against Prisma connection errors.
354
354
  * @param props - Array of InstitutionalFlowSignal objects for the new records.
355
355
  * @param globalClient - Apollo Client instance.
356
+ * @param options - Optional control flags (e.g., skipDuplicates).
356
357
  * @returns The count of created records or null.
357
358
  */
358
- async createMany(props, globalClient) {
359
+ async createMany(props, globalClient, options) {
359
360
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
360
361
  // Maximum number of retries for database connection issues
361
362
  const MAX_RETRIES = 3;
@@ -372,8 +373,8 @@ exports.InstitutionalFlowSignal = {
372
373
  ]);
373
374
  const { gql, ApolloError } = modules;
374
375
  const CREATE_MANY_INSTITUTIONALFLOWSIGNAL = gql `
375
- mutation createManyInstitutionalFlowSignal($data: [InstitutionalFlowSignalCreateManyInput!]!) {
376
- createManyInstitutionalFlowSignal(data: $data) {
376
+ mutation createManyInstitutionalFlowSignal($data: [InstitutionalFlowSignalCreateManyInput!]!, $skipDuplicates: Boolean) {
377
+ createManyInstitutionalFlowSignal(data: $data, skipDuplicates: $skipDuplicates) {
377
378
  count
378
379
  }
379
380
  }`;
@@ -384,6 +385,7 @@ exports.InstitutionalFlowSignal = {
384
385
  signalType: prop.signalType !== undefined ? prop.signalType : undefined,
385
386
  metadata: prop.metadata !== undefined ? prop.metadata : undefined,
386
387
  })),
388
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
387
389
  };
388
390
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
389
391
  const response = await client.mutate({
@@ -414,10 +416,9 @@ exports.InstitutionalFlowSignal = {
414
416
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
415
417
  if (isConstraintViolation) {
416
418
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
417
- logger_1.logger.error("Non-retryable constraint violation in createManyInstitutionalFlowSignal", {
419
+ logger_1.logger.warn("Duplicate key in createManyInstitutionalFlowSignal (expected during overlapping fetches)", {
418
420
  operation: 'createManyInstitutionalFlowSignal',
419
421
  model: 'InstitutionalFlowSignal',
420
- error: String(error),
421
422
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
422
423
  errorCategory: 'CONSTRAINT_VIOLATION',
423
424
  isRetryable: false,
@@ -20,9 +20,12 @@ export declare const InstitutionalFlowSignal: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of InstitutionalFlowSignal 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: InstitutionalFlowSignalType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: InstitutionalFlowSignalType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -357,9 +357,10 @@ exports.InstitutionalHolding = {
357
357
  * Enhanced with connection resilience against Prisma connection errors.
358
358
  * @param props - Array of InstitutionalHolding objects for the new records.
359
359
  * @param globalClient - Apollo Client instance.
360
+ * @param options - Optional control flags (e.g., skipDuplicates).
360
361
  * @returns The count of created records or null.
361
362
  */
362
- async createMany(props, globalClient) {
363
+ async createMany(props, globalClient, options) {
363
364
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
364
365
  // Maximum number of retries for database connection issues
365
366
  const MAX_RETRIES = 3;
@@ -376,8 +377,8 @@ exports.InstitutionalHolding = {
376
377
  ]);
377
378
  const { gql, ApolloError } = modules;
378
379
  const CREATE_MANY_INSTITUTIONALHOLDING = gql `
379
- mutation createManyInstitutionalHolding($data: [InstitutionalHoldingCreateManyInput!]!) {
380
- createManyInstitutionalHolding(data: $data) {
380
+ mutation createManyInstitutionalHolding($data: [InstitutionalHoldingCreateManyInput!]!, $skipDuplicates: Boolean) {
381
+ createManyInstitutionalHolding(data: $data, skipDuplicates: $skipDuplicates) {
381
382
  count
382
383
  }
383
384
  }`;
@@ -391,6 +392,7 @@ exports.InstitutionalHolding = {
391
392
  changeShares: prop.changeShares !== undefined ? prop.changeShares : undefined,
392
393
  metadata: prop.metadata !== undefined ? prop.metadata : undefined,
393
394
  })),
395
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
394
396
  };
395
397
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
396
398
  const response = await client.mutate({
@@ -421,10 +423,9 @@ exports.InstitutionalHolding = {
421
423
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
422
424
  if (isConstraintViolation) {
423
425
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
424
- logger_1.logger.error("Non-retryable constraint violation in createManyInstitutionalHolding", {
426
+ logger_1.logger.warn("Duplicate key in createManyInstitutionalHolding (expected during overlapping fetches)", {
425
427
  operation: 'createManyInstitutionalHolding',
426
428
  model: 'InstitutionalHolding',
427
- error: String(error),
428
429
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
429
430
  errorCategory: 'CONSTRAINT_VIOLATION',
430
431
  isRetryable: false,
@@ -20,9 +20,12 @@ export declare const InstitutionalHolding: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of InstitutionalHolding 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: InstitutionalHoldingType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: InstitutionalHoldingType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -148,9 +148,10 @@ exports.InstitutionalSentimentAlerts = {
148
148
  * Enhanced with connection resilience against Prisma connection errors.
149
149
  * @param props - Array of InstitutionalSentimentAlerts objects for the new records.
150
150
  * @param globalClient - Apollo Client instance.
151
+ * @param options - Optional control flags (e.g., skipDuplicates).
151
152
  * @returns The count of created records or null.
152
153
  */
153
- async createMany(props, globalClient) {
154
+ async createMany(props, globalClient, options) {
154
155
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
155
156
  // Maximum number of retries for database connection issues
156
157
  const MAX_RETRIES = 3;
@@ -167,8 +168,8 @@ exports.InstitutionalSentimentAlerts = {
167
168
  ]);
168
169
  const { gql, ApolloError } = modules;
169
170
  const CREATE_MANY_INSTITUTIONALSENTIMENTALERTS = gql `
170
- mutation createManyInstitutionalSentimentAlerts($data: [InstitutionalSentimentAlertsCreateManyInput!]!) {
171
- createManyInstitutionalSentimentAlerts(data: $data) {
171
+ mutation createManyInstitutionalSentimentAlerts($data: [InstitutionalSentimentAlertsCreateManyInput!]!, $skipDuplicates: Boolean) {
172
+ createManyInstitutionalSentimentAlerts(data: $data, skipDuplicates: $skipDuplicates) {
172
173
  count
173
174
  }
174
175
  }`;
@@ -184,6 +185,7 @@ exports.InstitutionalSentimentAlerts = {
184
185
  resolvedAt: prop.resolvedAt !== undefined ? prop.resolvedAt : undefined,
185
186
  resolvedBy: prop.resolvedBy !== undefined ? prop.resolvedBy : undefined,
186
187
  })),
188
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
187
189
  };
188
190
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
189
191
  const response = await client.mutate({
@@ -214,10 +216,9 @@ exports.InstitutionalSentimentAlerts = {
214
216
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
215
217
  if (isConstraintViolation) {
216
218
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
217
- logger_1.logger.error("Non-retryable constraint violation in createManyInstitutionalSentimentAlerts", {
219
+ logger_1.logger.warn("Duplicate key in createManyInstitutionalSentimentAlerts (expected during overlapping fetches)", {
218
220
  operation: 'createManyInstitutionalSentimentAlerts',
219
221
  model: 'InstitutionalSentimentAlerts',
220
- error: String(error),
221
222
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
222
223
  errorCategory: 'CONSTRAINT_VIOLATION',
223
224
  isRetryable: false,
@@ -20,9 +20,12 @@ export declare const InstitutionalSentimentAlerts: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of InstitutionalSentimentAlerts 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: InstitutionalSentimentAlertsType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: InstitutionalSentimentAlertsType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -139,9 +139,10 @@ exports.InstitutionalSentimentErrors = {
139
139
  * Enhanced with connection resilience against Prisma connection errors.
140
140
  * @param props - Array of InstitutionalSentimentErrors objects for the new records.
141
141
  * @param globalClient - Apollo Client instance.
142
+ * @param options - Optional control flags (e.g., skipDuplicates).
142
143
  * @returns The count of created records or null.
143
144
  */
144
- async createMany(props, globalClient) {
145
+ async createMany(props, globalClient, options) {
145
146
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
146
147
  // Maximum number of retries for database connection issues
147
148
  const MAX_RETRIES = 3;
@@ -158,8 +159,8 @@ exports.InstitutionalSentimentErrors = {
158
159
  ]);
159
160
  const { gql, ApolloError } = modules;
160
161
  const CREATE_MANY_INSTITUTIONALSENTIMENTERRORS = gql `
161
- mutation createManyInstitutionalSentimentErrors($data: [InstitutionalSentimentErrorsCreateManyInput!]!) {
162
- createManyInstitutionalSentimentErrors(data: $data) {
162
+ mutation createManyInstitutionalSentimentErrors($data: [InstitutionalSentimentErrorsCreateManyInput!]!, $skipDuplicates: Boolean) {
163
+ createManyInstitutionalSentimentErrors(data: $data, skipDuplicates: $skipDuplicates) {
163
164
  count
164
165
  }
165
166
  }`;
@@ -171,6 +172,7 @@ exports.InstitutionalSentimentErrors = {
171
172
  recordCount: prop.recordCount !== undefined ? prop.recordCount : undefined,
172
173
  severity: prop.severity !== undefined ? prop.severity : undefined,
173
174
  })),
175
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
174
176
  };
175
177
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
176
178
  const response = await client.mutate({
@@ -201,10 +203,9 @@ exports.InstitutionalSentimentErrors = {
201
203
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
202
204
  if (isConstraintViolation) {
203
205
  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 createManyInstitutionalSentimentErrors", {
206
+ logger_1.logger.warn("Duplicate key in createManyInstitutionalSentimentErrors (expected during overlapping fetches)", {
205
207
  operation: 'createManyInstitutionalSentimentErrors',
206
208
  model: 'InstitutionalSentimentErrors',
207
- error: String(error),
208
209
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
209
210
  errorCategory: 'CONSTRAINT_VIOLATION',
210
211
  isRetryable: false,
@@ -20,9 +20,12 @@ export declare const InstitutionalSentimentErrors: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of InstitutionalSentimentErrors 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: InstitutionalSentimentErrorsType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: InstitutionalSentimentErrorsType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -218,9 +218,10 @@ exports.InstitutionalSentimentHistory = {
218
218
  * Enhanced with connection resilience against Prisma connection errors.
219
219
  * @param props - Array of InstitutionalSentimentHistory objects for the new records.
220
220
  * @param globalClient - Apollo Client instance.
221
+ * @param options - Optional control flags (e.g., skipDuplicates).
221
222
  * @returns The count of created records or null.
222
223
  */
223
- async createMany(props, globalClient) {
224
+ async createMany(props, globalClient, options) {
224
225
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
225
226
  // Maximum number of retries for database connection issues
226
227
  const MAX_RETRIES = 3;
@@ -237,8 +238,8 @@ exports.InstitutionalSentimentHistory = {
237
238
  ]);
238
239
  const { gql, ApolloError } = modules;
239
240
  const CREATE_MANY_INSTITUTIONALSENTIMENTHISTORY = gql `
240
- mutation createManyInstitutionalSentimentHistory($data: [InstitutionalSentimentHistoryCreateManyInput!]!) {
241
- createManyInstitutionalSentimentHistory(data: $data) {
241
+ mutation createManyInstitutionalSentimentHistory($data: [InstitutionalSentimentHistoryCreateManyInput!]!, $skipDuplicates: Boolean) {
242
+ createManyInstitutionalSentimentHistory(data: $data, skipDuplicates: $skipDuplicates) {
242
243
  count
243
244
  }
244
245
  }`;
@@ -289,6 +290,7 @@ exports.InstitutionalSentimentHistory = {
289
290
  darkPoolVolumeSignificance: prop.darkPoolVolumeSignificance !== undefined ? prop.darkPoolVolumeSignificance : undefined,
290
291
  darkPoolPriceImpact: prop.darkPoolPriceImpact !== undefined ? prop.darkPoolPriceImpact : undefined,
291
292
  })),
293
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
292
294
  };
293
295
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
294
296
  const response = await client.mutate({
@@ -319,10 +321,9 @@ exports.InstitutionalSentimentHistory = {
319
321
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
320
322
  if (isConstraintViolation) {
321
323
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
322
- logger_1.logger.error("Non-retryable constraint violation in createManyInstitutionalSentimentHistory", {
324
+ logger_1.logger.warn("Duplicate key in createManyInstitutionalSentimentHistory (expected during overlapping fetches)", {
323
325
  operation: 'createManyInstitutionalSentimentHistory',
324
326
  model: 'InstitutionalSentimentHistory',
325
- error: String(error),
326
327
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
327
328
  errorCategory: 'CONSTRAINT_VIOLATION',
328
329
  isRetryable: false,
@@ -20,9 +20,12 @@ export declare const InstitutionalSentimentHistory: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of InstitutionalSentimentHistory 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: InstitutionalSentimentHistoryType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: InstitutionalSentimentHistoryType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -143,9 +143,10 @@ exports.InstitutionalSentimentMetrics = {
143
143
  * Enhanced with connection resilience against Prisma connection errors.
144
144
  * @param props - Array of InstitutionalSentimentMetrics objects for the new records.
145
145
  * @param globalClient - Apollo Client instance.
146
+ * @param options - Optional control flags (e.g., skipDuplicates).
146
147
  * @returns The count of created records or null.
147
148
  */
148
- async createMany(props, globalClient) {
149
+ async createMany(props, globalClient, options) {
149
150
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
150
151
  // Maximum number of retries for database connection issues
151
152
  const MAX_RETRIES = 3;
@@ -162,8 +163,8 @@ exports.InstitutionalSentimentMetrics = {
162
163
  ]);
163
164
  const { gql, ApolloError } = modules;
164
165
  const CREATE_MANY_INSTITUTIONALSENTIMENTMETRICS = gql `
165
- mutation createManyInstitutionalSentimentMetrics($data: [InstitutionalSentimentMetricsCreateManyInput!]!) {
166
- createManyInstitutionalSentimentMetrics(data: $data) {
166
+ mutation createManyInstitutionalSentimentMetrics($data: [InstitutionalSentimentMetricsCreateManyInput!]!, $skipDuplicates: Boolean) {
167
+ createManyInstitutionalSentimentMetrics(data: $data, skipDuplicates: $skipDuplicates) {
167
168
  count
168
169
  }
169
170
  }`;
@@ -177,6 +178,7 @@ exports.InstitutionalSentimentMetrics = {
177
178
  processingTimeMs: prop.processingTimeMs !== undefined ? prop.processingTimeMs : undefined,
178
179
  batchSize: prop.batchSize !== undefined ? prop.batchSize : undefined,
179
180
  })),
181
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
180
182
  };
181
183
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
182
184
  const response = await client.mutate({
@@ -207,10 +209,9 @@ exports.InstitutionalSentimentMetrics = {
207
209
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
208
210
  if (isConstraintViolation) {
209
211
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
210
- logger_1.logger.error("Non-retryable constraint violation in createManyInstitutionalSentimentMetrics", {
212
+ logger_1.logger.warn("Duplicate key in createManyInstitutionalSentimentMetrics (expected during overlapping fetches)", {
211
213
  operation: 'createManyInstitutionalSentimentMetrics',
212
214
  model: 'InstitutionalSentimentMetrics',
213
- error: String(error),
214
215
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
215
216
  errorCategory: 'CONSTRAINT_VIOLATION',
216
217
  isRetryable: false,
@@ -20,9 +20,12 @@ export declare const InstitutionalSentimentMetrics: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of InstitutionalSentimentMetrics 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: InstitutionalSentimentMetricsType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: InstitutionalSentimentMetricsType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
package/InviteToken.cjs CHANGED
@@ -441,9 +441,10 @@ exports.InviteToken = {
441
441
  * Enhanced with connection resilience against Prisma connection errors.
442
442
  * @param props - Array of InviteToken objects for the new records.
443
443
  * @param globalClient - Apollo Client instance.
444
+ * @param options - Optional control flags (e.g., skipDuplicates).
444
445
  * @returns The count of created records or null.
445
446
  */
446
- async createMany(props, globalClient) {
447
+ async createMany(props, globalClient, options) {
447
448
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
448
449
  // Maximum number of retries for database connection issues
449
450
  const MAX_RETRIES = 3;
@@ -460,8 +461,8 @@ exports.InviteToken = {
460
461
  ]);
461
462
  const { gql, ApolloError } = modules;
462
463
  const CREATE_MANY_INVITETOKEN = gql `
463
- mutation createManyInviteToken($data: [InviteTokenCreateManyInput!]!) {
464
- createManyInviteToken(data: $data) {
464
+ mutation createManyInviteToken($data: [InviteTokenCreateManyInput!]!, $skipDuplicates: Boolean) {
465
+ createManyInviteToken(data: $data, skipDuplicates: $skipDuplicates) {
465
466
  count
466
467
  }
467
468
  }`;
@@ -474,6 +475,7 @@ exports.InviteToken = {
474
475
  usedAt: prop.usedAt !== undefined ? prop.usedAt : undefined,
475
476
  expiresAt: prop.expiresAt !== undefined ? prop.expiresAt : undefined,
476
477
  })),
478
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
477
479
  };
478
480
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
479
481
  const response = await client.mutate({
@@ -504,10 +506,9 @@ exports.InviteToken = {
504
506
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
505
507
  if (isConstraintViolation) {
506
508
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
507
- logger_1.logger.error("Non-retryable constraint violation in createManyInviteToken", {
509
+ logger_1.logger.warn("Duplicate key in createManyInviteToken (expected during overlapping fetches)", {
508
510
  operation: 'createManyInviteToken',
509
511
  model: 'InviteToken',
510
- error: String(error),
511
512
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
512
513
  errorCategory: 'CONSTRAINT_VIOLATION',
513
514
  isRetryable: false,
package/InviteToken.d.ts CHANGED
@@ -20,9 +20,12 @@ export declare const InviteToken: {
20
20
  * Enhanced with connection resilience against Prisma connection errors.
21
21
  * @param props - Array of InviteToken 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: InviteTokenType[], globalClient?: ApolloClientType<NormalizedCacheObject>): Promise<{
26
+ createMany(props: InviteTokenType[], globalClient?: ApolloClientType<NormalizedCacheObject>, options?: {
27
+ skipDuplicates?: boolean;
28
+ }): Promise<{
26
29
  count: number;
27
30
  } | null>;
28
31
  /**
@@ -574,9 +574,10 @@ exports.LinkedProvider = {
574
574
  * Enhanced with connection resilience against Prisma connection errors.
575
575
  * @param props - Array of LinkedProvider objects for the new records.
576
576
  * @param globalClient - Apollo Client instance.
577
+ * @param options - Optional control flags (e.g., skipDuplicates).
577
578
  * @returns The count of created records or null.
578
579
  */
579
- async createMany(props, globalClient) {
580
+ async createMany(props, globalClient, options) {
580
581
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
581
582
  // Maximum number of retries for database connection issues
582
583
  const MAX_RETRIES = 3;
@@ -593,8 +594,8 @@ exports.LinkedProvider = {
593
594
  ]);
594
595
  const { gql, ApolloError } = modules;
595
596
  const CREATE_MANY_LINKEDPROVIDER = gql `
596
- mutation createManyLinkedProvider($data: [LinkedProviderCreateManyInput!]!) {
597
- createManyLinkedProvider(data: $data) {
597
+ mutation createManyLinkedProvider($data: [LinkedProviderCreateManyInput!]!, $skipDuplicates: Boolean) {
598
+ createManyLinkedProvider(data: $data, skipDuplicates: $skipDuplicates) {
598
599
  count
599
600
  }
600
601
  }`;
@@ -609,6 +610,7 @@ exports.LinkedProvider = {
609
610
  expiresAt: prop.expiresAt !== undefined ? prop.expiresAt : undefined,
610
611
  linkedAt: prop.linkedAt !== undefined ? prop.linkedAt : undefined,
611
612
  })),
613
+ ...((options === null || options === void 0 ? void 0 : options.skipDuplicates) ? { skipDuplicates: true } : {}),
612
614
  };
613
615
  const filteredVariables = (0, utils_1.removeUndefinedProps)(variables);
614
616
  const response = await client.mutate({
@@ -639,10 +641,9 @@ exports.LinkedProvider = {
639
641
  ((_h = error.message) === null || _h === void 0 ? void 0 : _h.includes('P2003'));
640
642
  if (isConstraintViolation) {
641
643
  const constraintMatch = (_j = error.message) === null || _j === void 0 ? void 0 : _j.match(/constraint\s+"([^"]+)"/);
642
- logger_1.logger.error("Non-retryable constraint violation in createManyLinkedProvider", {
644
+ logger_1.logger.warn("Duplicate key in createManyLinkedProvider (expected during overlapping fetches)", {
643
645
  operation: 'createManyLinkedProvider',
644
646
  model: 'LinkedProvider',
645
- error: String(error),
646
647
  constraintName: constraintMatch ? constraintMatch[1] : undefined,
647
648
  errorCategory: 'CONSTRAINT_VIOLATION',
648
649
  isRetryable: false,