@lhremote/core 0.7.0 → 0.9.0

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 (546) hide show
  1. package/dist/cdp/app-discovery.d.ts +57 -0
  2. package/dist/cdp/app-discovery.d.ts.map +1 -1
  3. package/dist/cdp/app-discovery.js +90 -7
  4. package/dist/cdp/app-discovery.js.map +1 -1
  5. package/dist/cdp/app-discovery.test.js +180 -9
  6. package/dist/cdp/app-discovery.test.js.map +1 -1
  7. package/dist/cdp/client.d.ts +8 -1
  8. package/dist/cdp/client.d.ts.map +1 -1
  9. package/dist/cdp/client.js +8 -1
  10. package/dist/cdp/client.js.map +1 -1
  11. package/dist/cdp/discovery.d.ts.map +1 -1
  12. package/dist/cdp/discovery.js +5 -1
  13. package/dist/cdp/discovery.js.map +1 -1
  14. package/dist/cdp/discovery.test.js +7 -0
  15. package/dist/cdp/discovery.test.js.map +1 -1
  16. package/dist/cdp/index.d.ts +1 -1
  17. package/dist/cdp/index.d.ts.map +1 -1
  18. package/dist/cdp/index.js +1 -1
  19. package/dist/cdp/index.js.map +1 -1
  20. package/dist/cdp/instance-discovery.d.ts.map +1 -1
  21. package/dist/cdp/instance-discovery.js +25 -10
  22. package/dist/cdp/instance-discovery.js.map +1 -1
  23. package/dist/cdp/instance-discovery.test.js +17 -0
  24. package/dist/cdp/instance-discovery.test.js.map +1 -1
  25. package/dist/cdp/testing/launch-chromium.d.ts +1 -1
  26. package/dist/cdp/testing/launch-chromium.js +2 -2
  27. package/dist/db/client.d.ts.map +1 -1
  28. package/dist/db/client.js +3 -0
  29. package/dist/db/client.js.map +1 -1
  30. package/dist/db/index.d.ts +1 -1
  31. package/dist/db/index.d.ts.map +1 -1
  32. package/dist/db/index.js +1 -1
  33. package/dist/db/index.js.map +1 -1
  34. package/dist/db/repositories/action-budget.d.ts +29 -0
  35. package/dist/db/repositories/action-budget.d.ts.map +1 -0
  36. package/dist/db/repositories/action-budget.js +100 -0
  37. package/dist/db/repositories/action-budget.js.map +1 -0
  38. package/dist/db/repositories/action-budget.test.d.ts +2 -0
  39. package/dist/db/repositories/action-budget.test.d.ts.map +1 -0
  40. package/dist/db/repositories/action-budget.test.js +181 -0
  41. package/dist/db/repositories/action-budget.test.js.map +1 -0
  42. package/dist/db/repositories/campaign-hard-delete.integration.test.d.ts +2 -0
  43. package/dist/db/repositories/campaign-hard-delete.integration.test.d.ts.map +1 -0
  44. package/dist/db/repositories/campaign-hard-delete.integration.test.js +78 -0
  45. package/dist/db/repositories/campaign-hard-delete.integration.test.js.map +1 -0
  46. package/dist/db/repositories/campaign.d.ts +14 -0
  47. package/dist/db/repositories/campaign.d.ts.map +1 -1
  48. package/dist/db/repositories/campaign.js +125 -0
  49. package/dist/db/repositories/campaign.js.map +1 -1
  50. package/dist/db/repositories/collection-list.integration.test.js +6 -4
  51. package/dist/db/repositories/collection-list.integration.test.js.map +1 -1
  52. package/dist/db/repositories/index.d.ts +1 -0
  53. package/dist/db/repositories/index.d.ts.map +1 -1
  54. package/dist/db/repositories/index.js +1 -0
  55. package/dist/db/repositories/index.js.map +1 -1
  56. package/dist/index.d.ts +7 -6
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +27 -7
  59. package/dist/index.js.map +1 -1
  60. package/dist/linkedin/__tests__/dom-automation.integration.test.d.ts +2 -0
  61. package/dist/linkedin/__tests__/dom-automation.integration.test.d.ts.map +1 -0
  62. package/dist/linkedin/__tests__/dom-automation.integration.test.js +160 -0
  63. package/dist/linkedin/__tests__/dom-automation.integration.test.js.map +1 -0
  64. package/dist/linkedin/dom-automation-retry.test.d.ts +2 -0
  65. package/dist/linkedin/dom-automation-retry.test.d.ts.map +1 -0
  66. package/dist/linkedin/dom-automation-retry.test.js +51 -0
  67. package/dist/linkedin/dom-automation-retry.test.js.map +1 -0
  68. package/dist/linkedin/dom-automation.d.ts +224 -0
  69. package/dist/linkedin/dom-automation.d.ts.map +1 -0
  70. package/dist/linkedin/dom-automation.js +614 -0
  71. package/dist/linkedin/dom-automation.js.map +1 -0
  72. package/dist/linkedin/humanized-mouse.d.ts +69 -0
  73. package/dist/linkedin/humanized-mouse.d.ts.map +1 -0
  74. package/dist/linkedin/humanized-mouse.js +109 -0
  75. package/dist/linkedin/humanized-mouse.js.map +1 -0
  76. package/dist/linkedin/index.d.ts +4 -0
  77. package/dist/linkedin/index.d.ts.map +1 -0
  78. package/dist/linkedin/index.js +6 -0
  79. package/dist/linkedin/index.js.map +1 -0
  80. package/dist/linkedin/selectors.d.ts +67 -0
  81. package/dist/linkedin/selectors.d.ts.map +1 -0
  82. package/dist/linkedin/selectors.js +74 -0
  83. package/dist/linkedin/selectors.js.map +1 -0
  84. package/dist/operations/add-people-to-collection.d.ts +1 -1
  85. package/dist/operations/add-people-to-collection.d.ts.map +1 -1
  86. package/dist/operations/add-people-to-collection.js +3 -6
  87. package/dist/operations/add-people-to-collection.js.map +1 -1
  88. package/dist/operations/build-linkedin-url.test.d.ts +2 -0
  89. package/dist/operations/build-linkedin-url.test.d.ts.map +1 -0
  90. package/dist/operations/build-linkedin-url.test.js +158 -0
  91. package/dist/operations/build-linkedin-url.test.js.map +1 -0
  92. package/dist/operations/campaign-add-action.d.ts +1 -1
  93. package/dist/operations/campaign-add-action.d.ts.map +1 -1
  94. package/dist/operations/campaign-add-action.js +3 -6
  95. package/dist/operations/campaign-add-action.js.map +1 -1
  96. package/dist/operations/campaign-create.d.ts +1 -1
  97. package/dist/operations/campaign-create.d.ts.map +1 -1
  98. package/dist/operations/campaign-create.js +3 -6
  99. package/dist/operations/campaign-create.js.map +1 -1
  100. package/dist/operations/campaign-delete.d.ts +7 -3
  101. package/dist/operations/campaign-delete.d.ts.map +1 -1
  102. package/dist/operations/campaign-delete.js +12 -8
  103. package/dist/operations/campaign-delete.js.map +1 -1
  104. package/dist/operations/campaign-delete.test.js +41 -1
  105. package/dist/operations/campaign-delete.test.js.map +1 -1
  106. package/dist/operations/campaign-erase.d.ts +19 -0
  107. package/dist/operations/campaign-erase.d.ts.map +1 -0
  108. package/dist/operations/campaign-erase.js +19 -0
  109. package/dist/operations/campaign-erase.js.map +1 -0
  110. package/dist/operations/campaign-erase.test.d.ts +2 -0
  111. package/dist/operations/campaign-erase.test.d.ts.map +1 -0
  112. package/dist/operations/campaign-erase.test.js +101 -0
  113. package/dist/operations/campaign-erase.test.js.map +1 -0
  114. package/dist/operations/campaign-exclude-add.d.ts +1 -1
  115. package/dist/operations/campaign-exclude-add.d.ts.map +1 -1
  116. package/dist/operations/campaign-exclude-add.js +3 -6
  117. package/dist/operations/campaign-exclude-add.js.map +1 -1
  118. package/dist/operations/campaign-exclude-list.d.ts +1 -1
  119. package/dist/operations/campaign-exclude-list.d.ts.map +1 -1
  120. package/dist/operations/campaign-exclude-list.js +3 -6
  121. package/dist/operations/campaign-exclude-list.js.map +1 -1
  122. package/dist/operations/campaign-exclude-remove.d.ts +1 -1
  123. package/dist/operations/campaign-exclude-remove.d.ts.map +1 -1
  124. package/dist/operations/campaign-exclude-remove.js +3 -6
  125. package/dist/operations/campaign-exclude-remove.js.map +1 -1
  126. package/dist/operations/campaign-export.d.ts +1 -1
  127. package/dist/operations/campaign-export.d.ts.map +1 -1
  128. package/dist/operations/campaign-export.js +3 -6
  129. package/dist/operations/campaign-export.js.map +1 -1
  130. package/dist/operations/campaign-get.d.ts +1 -1
  131. package/dist/operations/campaign-get.d.ts.map +1 -1
  132. package/dist/operations/campaign-get.js +3 -6
  133. package/dist/operations/campaign-get.js.map +1 -1
  134. package/dist/operations/campaign-list-people.d.ts +1 -1
  135. package/dist/operations/campaign-list-people.d.ts.map +1 -1
  136. package/dist/operations/campaign-list-people.js +3 -6
  137. package/dist/operations/campaign-list-people.js.map +1 -1
  138. package/dist/operations/campaign-list.d.ts +1 -1
  139. package/dist/operations/campaign-list.d.ts.map +1 -1
  140. package/dist/operations/campaign-list.js +3 -6
  141. package/dist/operations/campaign-list.js.map +1 -1
  142. package/dist/operations/campaign-move-next.d.ts +1 -1
  143. package/dist/operations/campaign-move-next.d.ts.map +1 -1
  144. package/dist/operations/campaign-move-next.js +3 -6
  145. package/dist/operations/campaign-move-next.js.map +1 -1
  146. package/dist/operations/campaign-remove-action.d.ts +1 -1
  147. package/dist/operations/campaign-remove-action.d.ts.map +1 -1
  148. package/dist/operations/campaign-remove-action.js +3 -6
  149. package/dist/operations/campaign-remove-action.js.map +1 -1
  150. package/dist/operations/campaign-remove-people.d.ts +1 -1
  151. package/dist/operations/campaign-remove-people.d.ts.map +1 -1
  152. package/dist/operations/campaign-remove-people.js +3 -6
  153. package/dist/operations/campaign-remove-people.js.map +1 -1
  154. package/dist/operations/campaign-reorder-actions.d.ts +1 -1
  155. package/dist/operations/campaign-reorder-actions.d.ts.map +1 -1
  156. package/dist/operations/campaign-reorder-actions.js +3 -6
  157. package/dist/operations/campaign-reorder-actions.js.map +1 -1
  158. package/dist/operations/campaign-retry.d.ts +1 -1
  159. package/dist/operations/campaign-retry.d.ts.map +1 -1
  160. package/dist/operations/campaign-retry.js +3 -6
  161. package/dist/operations/campaign-retry.js.map +1 -1
  162. package/dist/operations/campaign-start.d.ts +1 -1
  163. package/dist/operations/campaign-start.d.ts.map +1 -1
  164. package/dist/operations/campaign-start.js +3 -6
  165. package/dist/operations/campaign-start.js.map +1 -1
  166. package/dist/operations/campaign-statistics.d.ts +1 -1
  167. package/dist/operations/campaign-statistics.d.ts.map +1 -1
  168. package/dist/operations/campaign-statistics.js +3 -6
  169. package/dist/operations/campaign-statistics.js.map +1 -1
  170. package/dist/operations/campaign-status.d.ts +1 -1
  171. package/dist/operations/campaign-status.d.ts.map +1 -1
  172. package/dist/operations/campaign-status.js +3 -6
  173. package/dist/operations/campaign-status.js.map +1 -1
  174. package/dist/operations/campaign-stop.d.ts +1 -1
  175. package/dist/operations/campaign-stop.d.ts.map +1 -1
  176. package/dist/operations/campaign-stop.js +3 -6
  177. package/dist/operations/campaign-stop.js.map +1 -1
  178. package/dist/operations/campaign-update-action.d.ts +1 -1
  179. package/dist/operations/campaign-update-action.d.ts.map +1 -1
  180. package/dist/operations/campaign-update-action.js +3 -6
  181. package/dist/operations/campaign-update-action.js.map +1 -1
  182. package/dist/operations/campaign-update.d.ts +1 -1
  183. package/dist/operations/campaign-update.d.ts.map +1 -1
  184. package/dist/operations/campaign-update.js +3 -6
  185. package/dist/operations/campaign-update.js.map +1 -1
  186. package/dist/operations/check-replies.d.ts +3 -1
  187. package/dist/operations/check-replies.d.ts.map +1 -1
  188. package/dist/operations/check-replies.js +132 -17
  189. package/dist/operations/check-replies.js.map +1 -1
  190. package/dist/operations/check-replies.test.js +177 -17
  191. package/dist/operations/check-replies.test.js.map +1 -1
  192. package/dist/operations/collect-people.d.ts +1 -1
  193. package/dist/operations/collect-people.d.ts.map +1 -1
  194. package/dist/operations/collect-people.js +3 -6
  195. package/dist/operations/collect-people.js.map +1 -1
  196. package/dist/operations/comment-on-post.d.ts +37 -0
  197. package/dist/operations/comment-on-post.d.ts.map +1 -0
  198. package/dist/operations/comment-on-post.js +104 -0
  199. package/dist/operations/comment-on-post.js.map +1 -0
  200. package/dist/operations/comment-on-post.test.d.ts +2 -0
  201. package/dist/operations/comment-on-post.test.d.ts.map +1 -0
  202. package/dist/operations/comment-on-post.test.js +242 -0
  203. package/dist/operations/comment-on-post.test.js.map +1 -0
  204. package/dist/operations/create-collection.d.ts +1 -1
  205. package/dist/operations/create-collection.d.ts.map +1 -1
  206. package/dist/operations/create-collection.js +3 -6
  207. package/dist/operations/create-collection.js.map +1 -1
  208. package/dist/operations/delete-collection.d.ts +1 -1
  209. package/dist/operations/delete-collection.d.ts.map +1 -1
  210. package/dist/operations/delete-collection.js +3 -6
  211. package/dist/operations/delete-collection.js.map +1 -1
  212. package/dist/operations/dismiss-errors.d.ts +25 -0
  213. package/dist/operations/dismiss-errors.d.ts.map +1 -0
  214. package/dist/operations/dismiss-errors.js +74 -0
  215. package/dist/operations/dismiss-errors.js.map +1 -0
  216. package/dist/operations/dismiss-errors.test.d.ts +2 -0
  217. package/dist/operations/dismiss-errors.test.d.ts.map +1 -0
  218. package/dist/operations/dismiss-errors.test.js +183 -0
  219. package/dist/operations/dismiss-errors.test.js.map +1 -0
  220. package/dist/operations/endorse-skills.d.ts +10 -0
  221. package/dist/operations/endorse-skills.d.ts.map +1 -0
  222. package/dist/operations/endorse-skills.js +12 -0
  223. package/dist/operations/endorse-skills.js.map +1 -0
  224. package/dist/operations/endorse-skills.test.d.ts +2 -0
  225. package/dist/operations/endorse-skills.test.d.ts.map +1 -0
  226. package/dist/operations/endorse-skills.test.js +70 -0
  227. package/dist/operations/endorse-skills.test.js.map +1 -0
  228. package/dist/operations/enrich-profile.d.ts +18 -0
  229. package/dist/operations/enrich-profile.d.ts.map +1 -0
  230. package/dist/operations/enrich-profile.js +15 -0
  231. package/dist/operations/enrich-profile.js.map +1 -0
  232. package/dist/operations/enrich-profile.test.d.ts +2 -0
  233. package/dist/operations/enrich-profile.test.d.ts.map +1 -0
  234. package/dist/operations/enrich-profile.test.js +73 -0
  235. package/dist/operations/enrich-profile.test.js.map +1 -0
  236. package/dist/operations/ephemeral-action.d.ts +22 -0
  237. package/dist/operations/ephemeral-action.d.ts.map +1 -0
  238. package/dist/operations/ephemeral-action.js +28 -0
  239. package/dist/operations/ephemeral-action.js.map +1 -0
  240. package/dist/operations/ephemeral-action.test.d.ts +2 -0
  241. package/dist/operations/ephemeral-action.test.d.ts.map +1 -0
  242. package/dist/operations/ephemeral-action.test.js +140 -0
  243. package/dist/operations/ephemeral-action.test.js.map +1 -0
  244. package/dist/operations/follow-person.d.ts +9 -0
  245. package/dist/operations/follow-person.d.ts.map +1 -0
  246. package/dist/operations/follow-person.js +11 -0
  247. package/dist/operations/follow-person.js.map +1 -0
  248. package/dist/operations/follow-person.test.d.ts +2 -0
  249. package/dist/operations/follow-person.test.d.ts.map +1 -0
  250. package/dist/operations/follow-person.test.js +57 -0
  251. package/dist/operations/follow-person.test.js.map +1 -0
  252. package/dist/operations/get-action-budget.d.ts +6 -0
  253. package/dist/operations/get-action-budget.d.ts.map +1 -0
  254. package/dist/operations/get-action-budget.js +19 -0
  255. package/dist/operations/get-action-budget.js.map +1 -0
  256. package/dist/operations/get-action-budget.test.d.ts +2 -0
  257. package/dist/operations/get-action-budget.test.d.ts.map +1 -0
  258. package/dist/operations/get-action-budget.test.js +79 -0
  259. package/dist/operations/get-action-budget.test.js.map +1 -0
  260. package/dist/operations/get-errors.d.ts +14 -4
  261. package/dist/operations/get-errors.d.ts.map +1 -1
  262. package/dist/operations/get-errors.js +72 -13
  263. package/dist/operations/get-errors.js.map +1 -1
  264. package/dist/operations/get-errors.test.js +108 -43
  265. package/dist/operations/get-errors.test.js.map +1 -1
  266. package/dist/operations/get-feed.d.ts +112 -0
  267. package/dist/operations/get-feed.d.ts.map +1 -0
  268. package/dist/operations/get-feed.js +467 -0
  269. package/dist/operations/get-feed.js.map +1 -0
  270. package/dist/operations/get-feed.test.d.ts +2 -0
  271. package/dist/operations/get-feed.test.d.ts.map +1 -0
  272. package/dist/operations/get-feed.test.js +502 -0
  273. package/dist/operations/get-feed.test.js.map +1 -0
  274. package/dist/operations/get-post-engagers.d.ts +43 -0
  275. package/dist/operations/get-post-engagers.d.ts.map +1 -0
  276. package/dist/operations/get-post-engagers.js +328 -0
  277. package/dist/operations/get-post-engagers.js.map +1 -0
  278. package/dist/operations/get-post-engagers.test.d.ts +2 -0
  279. package/dist/operations/get-post-engagers.test.d.ts.map +1 -0
  280. package/dist/operations/get-post-engagers.test.js +297 -0
  281. package/dist/operations/get-post-engagers.test.js.map +1 -0
  282. package/dist/operations/get-post-stats.d.ts +43 -0
  283. package/dist/operations/get-post-stats.d.ts.map +1 -0
  284. package/dist/operations/get-post-stats.js +164 -0
  285. package/dist/operations/get-post-stats.js.map +1 -0
  286. package/dist/operations/get-post-stats.test.d.ts +2 -0
  287. package/dist/operations/get-post-stats.test.d.ts.map +1 -0
  288. package/dist/operations/get-post-stats.test.js +169 -0
  289. package/dist/operations/get-post-stats.test.js.map +1 -0
  290. package/dist/operations/get-post.d.ts +42 -0
  291. package/dist/operations/get-post.d.ts.map +1 -0
  292. package/dist/operations/get-post.js +416 -0
  293. package/dist/operations/get-post.js.map +1 -0
  294. package/dist/operations/get-post.test.d.ts +2 -0
  295. package/dist/operations/get-post.test.d.ts.map +1 -0
  296. package/dist/operations/get-post.test.js +272 -0
  297. package/dist/operations/get-post.test.js.map +1 -0
  298. package/dist/operations/get-profile-activity.d.ts +50 -0
  299. package/dist/operations/get-profile-activity.d.ts.map +1 -0
  300. package/dist/operations/get-profile-activity.js +381 -0
  301. package/dist/operations/get-profile-activity.js.map +1 -0
  302. package/dist/operations/get-profile-activity.test.d.ts +2 -0
  303. package/dist/operations/get-profile-activity.test.d.ts.map +1 -0
  304. package/dist/operations/get-profile-activity.test.js +324 -0
  305. package/dist/operations/get-profile-activity.test.js.map +1 -0
  306. package/dist/operations/get-throttle-status.d.ts +6 -0
  307. package/dist/operations/get-throttle-status.d.ts.map +1 -0
  308. package/dist/operations/get-throttle-status.js +24 -0
  309. package/dist/operations/get-throttle-status.js.map +1 -0
  310. package/dist/operations/get-throttle-status.test.d.ts +2 -0
  311. package/dist/operations/get-throttle-status.test.d.ts.map +1 -0
  312. package/dist/operations/get-throttle-status.test.js +62 -0
  313. package/dist/operations/get-throttle-status.test.js.map +1 -0
  314. package/dist/operations/import-people-from-collection.d.ts +1 -1
  315. package/dist/operations/import-people-from-collection.d.ts.map +1 -1
  316. package/dist/operations/import-people-from-collection.js +3 -6
  317. package/dist/operations/import-people-from-collection.js.map +1 -1
  318. package/dist/operations/import-people-from-urls.d.ts +1 -1
  319. package/dist/operations/import-people-from-urls.d.ts.map +1 -1
  320. package/dist/operations/import-people-from-urls.js +3 -6
  321. package/dist/operations/import-people-from-urls.js.map +1 -1
  322. package/dist/operations/index.d.ts +23 -1
  323. package/dist/operations/index.d.ts.map +1 -1
  324. package/dist/operations/index.js +33 -0
  325. package/dist/operations/index.js.map +1 -1
  326. package/dist/operations/like-person-posts.d.ts +14 -0
  327. package/dist/operations/like-person-posts.d.ts.map +1 -0
  328. package/dist/operations/like-person-posts.js +28 -0
  329. package/dist/operations/like-person-posts.js.map +1 -0
  330. package/dist/operations/like-person-posts.test.d.ts +2 -0
  331. package/dist/operations/like-person-posts.test.d.ts.map +1 -0
  332. package/dist/operations/like-person-posts.test.js +103 -0
  333. package/dist/operations/like-person-posts.test.js.map +1 -0
  334. package/dist/operations/list-collections.d.ts +1 -1
  335. package/dist/operations/list-collections.d.ts.map +1 -1
  336. package/dist/operations/list-collections.js +3 -6
  337. package/dist/operations/list-collections.js.map +1 -1
  338. package/dist/operations/message-person.d.ts +11 -0
  339. package/dist/operations/message-person.d.ts.map +1 -0
  340. package/dist/operations/message-person.js +19 -0
  341. package/dist/operations/message-person.js.map +1 -0
  342. package/dist/operations/message-person.test.d.ts +2 -0
  343. package/dist/operations/message-person.test.d.ts.map +1 -0
  344. package/dist/operations/message-person.test.js +108 -0
  345. package/dist/operations/message-person.test.js.map +1 -0
  346. package/dist/operations/navigate-away.d.ts +14 -0
  347. package/dist/operations/navigate-away.d.ts.map +1 -0
  348. package/dist/operations/navigate-away.js +24 -0
  349. package/dist/operations/navigate-away.js.map +1 -0
  350. package/dist/operations/navigate-away.test.d.ts +2 -0
  351. package/dist/operations/navigate-away.test.d.ts.map +1 -0
  352. package/dist/operations/navigate-away.test.js +51 -0
  353. package/dist/operations/navigate-away.test.js.map +1 -0
  354. package/dist/operations/query-messages.d.ts +1 -1
  355. package/dist/operations/query-messages.d.ts.map +1 -1
  356. package/dist/operations/query-messages.js +3 -6
  357. package/dist/operations/query-messages.js.map +1 -1
  358. package/dist/operations/react-to-post.d.ts +41 -0
  359. package/dist/operations/react-to-post.d.ts.map +1 -0
  360. package/dist/operations/react-to-post.js +80 -0
  361. package/dist/operations/react-to-post.js.map +1 -0
  362. package/dist/operations/react-to-post.test.d.ts +2 -0
  363. package/dist/operations/react-to-post.test.d.ts.map +1 -0
  364. package/dist/operations/react-to-post.test.js +157 -0
  365. package/dist/operations/react-to-post.test.js.map +1 -0
  366. package/dist/operations/remove-connection.d.ts +6 -0
  367. package/dist/operations/remove-connection.d.ts.map +1 -0
  368. package/dist/operations/remove-connection.js +7 -0
  369. package/dist/operations/remove-connection.js.map +1 -0
  370. package/dist/operations/remove-connection.test.d.ts +2 -0
  371. package/dist/operations/remove-connection.test.d.ts.map +1 -0
  372. package/dist/operations/remove-connection.test.js +45 -0
  373. package/dist/operations/remove-connection.test.js.map +1 -0
  374. package/dist/operations/remove-people-from-collection.d.ts +1 -1
  375. package/dist/operations/remove-people-from-collection.d.ts.map +1 -1
  376. package/dist/operations/remove-people-from-collection.js +3 -6
  377. package/dist/operations/remove-people-from-collection.js.map +1 -1
  378. package/dist/operations/resolve-linkedin-entity.d.ts.map +1 -1
  379. package/dist/operations/resolve-linkedin-entity.js +2 -2
  380. package/dist/operations/resolve-linkedin-entity.js.map +1 -1
  381. package/dist/operations/resolve-linkedin-entity.test.d.ts +2 -0
  382. package/dist/operations/resolve-linkedin-entity.test.d.ts.map +1 -0
  383. package/dist/operations/resolve-linkedin-entity.test.js +343 -0
  384. package/dist/operations/resolve-linkedin-entity.test.js.map +1 -0
  385. package/dist/operations/scrape-messaging-history.d.ts +2 -1
  386. package/dist/operations/scrape-messaging-history.d.ts.map +1 -1
  387. package/dist/operations/scrape-messaging-history.js +121 -18
  388. package/dist/operations/scrape-messaging-history.js.map +1 -1
  389. package/dist/operations/scrape-messaging-history.test.js +134 -12
  390. package/dist/operations/scrape-messaging-history.test.js.map +1 -1
  391. package/dist/operations/search-posts.d.ts +51 -0
  392. package/dist/operations/search-posts.d.ts.map +1 -0
  393. package/dist/operations/search-posts.js +419 -0
  394. package/dist/operations/search-posts.js.map +1 -0
  395. package/dist/operations/search-posts.test.d.ts +2 -0
  396. package/dist/operations/search-posts.test.d.ts.map +1 -0
  397. package/dist/operations/search-posts.test.js +300 -0
  398. package/dist/operations/search-posts.test.js.map +1 -0
  399. package/dist/operations/send-inmail.d.ts +11 -0
  400. package/dist/operations/send-inmail.d.ts.map +1 -0
  401. package/dist/operations/send-inmail.js +19 -0
  402. package/dist/operations/send-inmail.js.map +1 -0
  403. package/dist/operations/send-inmail.test.d.ts +2 -0
  404. package/dist/operations/send-inmail.test.d.ts.map +1 -0
  405. package/dist/operations/send-inmail.test.js +108 -0
  406. package/dist/operations/send-inmail.test.js.map +1 -0
  407. package/dist/operations/send-invite.d.ts +9 -0
  408. package/dist/operations/send-invite.d.ts.map +1 -0
  409. package/dist/operations/send-invite.js +14 -0
  410. package/dist/operations/send-invite.js.map +1 -0
  411. package/dist/operations/send-invite.test.d.ts +2 -0
  412. package/dist/operations/send-invite.test.d.ts.map +1 -0
  413. package/dist/operations/send-invite.test.js +59 -0
  414. package/dist/operations/send-invite.test.js.map +1 -0
  415. package/dist/operations/types.d.ts +24 -1
  416. package/dist/operations/types.d.ts.map +1 -1
  417. package/dist/operations/types.js +13 -1
  418. package/dist/operations/types.js.map +1 -1
  419. package/dist/operations/visit-profile.d.ts +14 -0
  420. package/dist/operations/visit-profile.d.ts.map +1 -0
  421. package/dist/operations/visit-profile.js +46 -0
  422. package/dist/operations/visit-profile.js.map +1 -0
  423. package/dist/operations/visit-profile.test.d.ts +2 -0
  424. package/dist/operations/visit-profile.test.d.ts.map +1 -0
  425. package/dist/operations/visit-profile.test.js +193 -0
  426. package/dist/operations/visit-profile.test.js.map +1 -0
  427. package/dist/services/account-resolution.d.ts +9 -4
  428. package/dist/services/account-resolution.d.ts.map +1 -1
  429. package/dist/services/account-resolution.js +60 -5
  430. package/dist/services/account-resolution.js.map +1 -1
  431. package/dist/services/app.d.ts +6 -2
  432. package/dist/services/app.d.ts.map +1 -1
  433. package/dist/services/app.js +18 -6
  434. package/dist/services/app.js.map +1 -1
  435. package/dist/services/app.test.js +41 -7
  436. package/dist/services/app.test.js.map +1 -1
  437. package/dist/services/campaign.d.ts +44 -2
  438. package/dist/services/campaign.d.ts.map +1 -1
  439. package/dist/services/campaign.js +124 -1
  440. package/dist/services/campaign.js.map +1 -1
  441. package/dist/services/collection.d.ts +5 -2
  442. package/dist/services/collection.d.ts.map +1 -1
  443. package/dist/services/collection.js +24 -5
  444. package/dist/services/collection.js.map +1 -1
  445. package/dist/services/collection.test.js +51 -9
  446. package/dist/services/collection.test.js.map +1 -1
  447. package/dist/services/ephemeral-campaign.d.ts +64 -0
  448. package/dist/services/ephemeral-campaign.d.ts.map +1 -0
  449. package/dist/services/ephemeral-campaign.js +210 -0
  450. package/dist/services/ephemeral-campaign.js.map +1 -0
  451. package/dist/services/ephemeral-campaign.test.d.ts +2 -0
  452. package/dist/services/ephemeral-campaign.test.d.ts.map +1 -0
  453. package/dist/services/ephemeral-campaign.test.js +333 -0
  454. package/dist/services/ephemeral-campaign.test.js.map +1 -0
  455. package/dist/services/errors.d.ts +12 -1
  456. package/dist/services/errors.d.ts.map +1 -1
  457. package/dist/services/errors.js +26 -3
  458. package/dist/services/errors.js.map +1 -1
  459. package/dist/services/index.d.ts +2 -1
  460. package/dist/services/index.d.ts.map +1 -1
  461. package/dist/services/index.js +2 -1
  462. package/dist/services/index.js.map +1 -1
  463. package/dist/services/instance-context.d.ts +5 -1
  464. package/dist/services/instance-context.d.ts.map +1 -1
  465. package/dist/services/instance-context.js +87 -20
  466. package/dist/services/instance-context.js.map +1 -1
  467. package/dist/services/instance-context.test.js +82 -2
  468. package/dist/services/instance-context.test.js.map +1 -1
  469. package/dist/services/instance-lifecycle.d.ts.map +1 -1
  470. package/dist/services/instance-lifecycle.js +32 -1
  471. package/dist/services/instance-lifecycle.js.map +1 -1
  472. package/dist/services/instance-lifecycle.test.js +52 -1
  473. package/dist/services/instance-lifecycle.test.js.map +1 -1
  474. package/dist/services/instance.d.ts +43 -0
  475. package/dist/services/instance.d.ts.map +1 -1
  476. package/dist/services/instance.js +163 -1
  477. package/dist/services/instance.js.map +1 -1
  478. package/dist/services/instance.test.js +135 -0
  479. package/dist/services/instance.test.js.map +1 -1
  480. package/dist/services/launcher.d.ts +54 -3
  481. package/dist/services/launcher.d.ts.map +1 -1
  482. package/dist/services/launcher.js +223 -34
  483. package/dist/services/launcher.js.map +1 -1
  484. package/dist/services/launcher.test.js +133 -6
  485. package/dist/services/launcher.test.js.map +1 -1
  486. package/dist/services/status.d.ts +6 -2
  487. package/dist/services/status.d.ts.map +1 -1
  488. package/dist/services/status.js +67 -34
  489. package/dist/services/status.js.map +1 -1
  490. package/dist/services/status.test.js +9 -2
  491. package/dist/services/status.test.js.map +1 -1
  492. package/dist/testing/e2e-helpers.d.ts +23 -1
  493. package/dist/testing/e2e-helpers.d.ts.map +1 -1
  494. package/dist/testing/e2e-helpers.js +110 -5
  495. package/dist/testing/e2e-helpers.js.map +1 -1
  496. package/dist/testing/index.d.ts +1 -1
  497. package/dist/testing/index.d.ts.map +1 -1
  498. package/dist/testing/index.js +1 -1
  499. package/dist/testing/index.js.map +1 -1
  500. package/dist/types/account.d.ts +1 -1
  501. package/dist/types/action-budget.d.ts +52 -0
  502. package/dist/types/action-budget.d.ts.map +1 -0
  503. package/dist/types/action-budget.js +4 -0
  504. package/dist/types/action-budget.js.map +1 -0
  505. package/dist/types/campaign.d.ts +24 -0
  506. package/dist/types/campaign.d.ts.map +1 -1
  507. package/dist/types/feed.d.ts +30 -0
  508. package/dist/types/feed.d.ts.map +1 -0
  509. package/dist/types/feed.js +4 -0
  510. package/dist/types/feed.js.map +1 -0
  511. package/dist/types/index.d.ts +6 -2
  512. package/dist/types/index.d.ts.map +1 -1
  513. package/dist/types/post-analytics.d.ts +40 -0
  514. package/dist/types/post-analytics.d.ts.map +1 -0
  515. package/dist/types/post-analytics.js +4 -0
  516. package/dist/types/post-analytics.js.map +1 -0
  517. package/dist/types/post.d.ts +43 -0
  518. package/dist/types/post.d.ts.map +1 -0
  519. package/dist/types/post.js +4 -0
  520. package/dist/types/post.js.map +1 -0
  521. package/dist/types/ui-health.d.ts +16 -0
  522. package/dist/types/ui-health.d.ts.map +1 -1
  523. package/dist/utils/cdp-port.d.ts.map +1 -1
  524. package/dist/utils/cdp-port.js +3 -1
  525. package/dist/utils/cdp-port.js.map +1 -1
  526. package/dist/utils/cdp-port.test.js +1 -1
  527. package/dist/utils/cdp-port.test.js.map +1 -1
  528. package/dist/utils/delay.d.ts +79 -0
  529. package/dist/utils/delay.d.ts.map +1 -1
  530. package/dist/utils/delay.js +118 -0
  531. package/dist/utils/delay.js.map +1 -1
  532. package/dist/utils/delay.test.js +111 -1
  533. package/dist/utils/delay.test.js.map +1 -1
  534. package/dist/utils/index.d.ts +2 -1
  535. package/dist/utils/index.d.ts.map +1 -1
  536. package/dist/utils/index.js +2 -1
  537. package/dist/utils/index.js.map +1 -1
  538. package/dist/utils/session-pacer.d.ts +27 -0
  539. package/dist/utils/session-pacer.d.ts.map +1 -0
  540. package/dist/utils/session-pacer.js +55 -0
  541. package/dist/utils/session-pacer.js.map +1 -0
  542. package/dist/utils/session-pacer.test.d.ts +2 -0
  543. package/dist/utils/session-pacer.test.d.ts.map +1 -0
  544. package/dist/utils/session-pacer.test.js +111 -0
  545. package/dist/utils/session-pacer.test.js.map +1 -0
  546. package/package.json +1 -1
@@ -0,0 +1,324 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
4
+ import { extractProfileId } from "./get-profile-activity.js";
5
+ vi.mock("../cdp/discovery.js", () => ({
6
+ discoverTargets: vi.fn(),
7
+ }));
8
+ vi.mock("../cdp/client.js", () => ({
9
+ CDPClient: vi.fn(),
10
+ }));
11
+ vi.mock("./navigate-away.js", () => ({
12
+ navigateAwayIf: vi.fn().mockResolvedValue(undefined),
13
+ }));
14
+ vi.mock("./get-feed.js", async (importOriginal) => {
15
+ const actual = await importOriginal();
16
+ return {
17
+ ...actual,
18
+ delay: vi.fn().mockResolvedValue(undefined),
19
+ };
20
+ });
21
+ vi.mock("../utils/delay.js", () => ({
22
+ delay: vi.fn().mockResolvedValue(undefined),
23
+ gaussianDelay: vi.fn().mockResolvedValue(undefined),
24
+ gaussianBetween: vi.fn().mockReturnValue(800),
25
+ maybeHesitate: vi.fn().mockResolvedValue(undefined),
26
+ maybeBreak: vi.fn().mockResolvedValue(undefined),
27
+ simulateReadingTime: vi.fn().mockResolvedValue(undefined),
28
+ }));
29
+ import { discoverTargets } from "../cdp/discovery.js";
30
+ import { CDPClient } from "../cdp/client.js";
31
+ import { getProfileActivity } from "./get-profile-activity.js";
32
+ const CDP_PORT = 9222;
33
+ function rawPost(overrides = {}) {
34
+ return {
35
+ url: null,
36
+ authorName: "Jane Doe",
37
+ authorHeadline: "Engineer at Acme",
38
+ authorProfileUrl: "https://www.linkedin.com/in/janedoe",
39
+ text: "Hello world from my profile",
40
+ mediaType: null,
41
+ reactionCount: 5,
42
+ commentCount: 2,
43
+ shareCount: 1,
44
+ timestamp: "2h",
45
+ ...overrides,
46
+ };
47
+ }
48
+ /** Build a LinkedIn feed URL from a URN for test fixtures. */
49
+ function urnToUrl(urn) {
50
+ return `https://www.linkedin.com/feed/update/${urn}/`;
51
+ }
52
+ function setupMocks(scrapedPosts = [], urlResults = []) {
53
+ vi.mocked(discoverTargets).mockResolvedValue([
54
+ {
55
+ id: "target-1",
56
+ type: "page",
57
+ title: "LinkedIn",
58
+ url: "https://www.linkedin.com/feed/",
59
+ description: "",
60
+ devtoolsFrontendUrl: "",
61
+ },
62
+ ]);
63
+ const disconnect = vi.fn();
64
+ const navigate = vi.fn().mockResolvedValue({ frameId: "F1" });
65
+ let urlCallIdx = 0;
66
+ const evaluate = vi.fn().mockImplementation((script) => {
67
+ // waitForActivityLoad poll — return true (ready)
68
+ if (typeof script === "string" && script.includes("div[role=\"article\"]") && script.includes("return true")) {
69
+ return Promise.resolve(true);
70
+ }
71
+ // Clipboard interceptor install
72
+ if (typeof script === "string" && script.includes("navigator.clipboard.writeText")) {
73
+ return Promise.resolve(undefined);
74
+ }
75
+ // Clipboard reset
76
+ if (typeof script === "string" && script.includes("__capturedClipboard = null")) {
77
+ return Promise.resolve(undefined);
78
+ }
79
+ // "Copy link to post" menu item click
80
+ if (typeof script === "string" && script.includes("Copy link to post")) {
81
+ return Promise.resolve(undefined);
82
+ }
83
+ // Read captured clipboard URL (exact match — not the reset)
84
+ if (script === "window.__capturedClipboard") {
85
+ const url = urlResults[urlCallIdx++] ?? null;
86
+ return Promise.resolve(url);
87
+ }
88
+ // captureActivityPostUrl — click phase (split from scroll)
89
+ if (typeof script === "string" && script.includes("btn.click()")) {
90
+ return Promise.resolve(true);
91
+ }
92
+ // humanizedScrollToByIndex fallback — scrollIntoView
93
+ if (typeof script === "string" && script.includes("scrollIntoView")) {
94
+ return Promise.resolve(undefined);
95
+ }
96
+ // SCRAPE_ACTIVITY_POSTS_SCRIPT — return posts
97
+ return Promise.resolve(scrapedPosts);
98
+ });
99
+ const send = vi.fn().mockResolvedValue(undefined);
100
+ vi.mocked(CDPClient).mockImplementation(function () {
101
+ return {
102
+ connect: vi.fn().mockResolvedValue(undefined),
103
+ disconnect,
104
+ navigate,
105
+ evaluate,
106
+ send,
107
+ };
108
+ });
109
+ return { navigate, disconnect, evaluate, send };
110
+ }
111
+ describe("extractProfileId", () => {
112
+ it("extracts public ID from full profile URL", () => {
113
+ expect(extractProfileId("https://www.linkedin.com/in/johndoe")).toBe("johndoe");
114
+ });
115
+ it("extracts public ID from profile URL with trailing slash", () => {
116
+ expect(extractProfileId("https://www.linkedin.com/in/johndoe/")).toBe("johndoe");
117
+ });
118
+ it("extracts public ID from profile URL with query params", () => {
119
+ expect(extractProfileId("https://www.linkedin.com/in/johndoe?miniProfileUrn=urn")).toBe("johndoe");
120
+ });
121
+ it("extracts public ID from profile URL with hash", () => {
122
+ expect(extractProfileId("https://www.linkedin.com/in/johndoe#section")).toBe("johndoe");
123
+ });
124
+ it("decodes URL-encoded public ID", () => {
125
+ expect(extractProfileId("https://www.linkedin.com/in/john%20doe")).toBe("john doe");
126
+ });
127
+ it("passes through bare public ID", () => {
128
+ expect(extractProfileId("johndoe")).toBe("johndoe");
129
+ });
130
+ it("passes through bare public ID with hyphens", () => {
131
+ expect(extractProfileId("john-doe-123")).toBe("john-doe-123");
132
+ });
133
+ it("throws on unrecognised URL", () => {
134
+ expect(() => extractProfileId("https://example.com/foo")).toThrow("Cannot extract profile ID from");
135
+ });
136
+ it("throws on empty input", () => {
137
+ expect(() => extractProfileId("")).toThrow("Cannot extract profile ID from");
138
+ });
139
+ });
140
+ describe("getProfileActivity", () => {
141
+ beforeEach(() => {
142
+ vi.clearAllMocks();
143
+ });
144
+ afterEach(() => {
145
+ vi.restoreAllMocks();
146
+ });
147
+ it("navigates to the profile recent-activity page", async () => {
148
+ const { navigate } = setupMocks([]);
149
+ await getProfileActivity({ cdpPort: CDP_PORT, profile: "johndoe" });
150
+ expect(navigate).toHaveBeenCalledWith("https://www.linkedin.com/in/johndoe/recent-activity/all/");
151
+ });
152
+ it("URL-encodes the profile public ID in the navigation URL", async () => {
153
+ const { navigate } = setupMocks([]);
154
+ await getProfileActivity({
155
+ cdpPort: CDP_PORT,
156
+ profile: "https://www.linkedin.com/in/john%20doe",
157
+ });
158
+ expect(navigate).toHaveBeenCalledWith("https://www.linkedin.com/in/john%20doe/recent-activity/all/");
159
+ });
160
+ it("extracts profile ID from URL input for navigation", async () => {
161
+ const { navigate } = setupMocks([]);
162
+ await getProfileActivity({
163
+ cdpPort: CDP_PORT,
164
+ profile: "https://www.linkedin.com/in/janedoe",
165
+ });
166
+ expect(navigate).toHaveBeenCalledWith("https://www.linkedin.com/in/janedoe/recent-activity/all/");
167
+ });
168
+ it("scrapes posts from the DOM", async () => {
169
+ const posts = [rawPost()];
170
+ const { evaluate } = setupMocks(posts);
171
+ await getProfileActivity({ cdpPort: CDP_PORT, profile: "johndoe" });
172
+ expect(evaluate).toHaveBeenCalled();
173
+ });
174
+ it("extracts URLs via three-dot menu for each post", async () => {
175
+ const posts = [rawPost(), rawPost({ authorName: "Bob" })];
176
+ setupMocks(posts, [urnToUrl("urn:li:share:111"), urnToUrl("urn:li:share:222")]);
177
+ const result = await getProfileActivity({
178
+ cdpPort: CDP_PORT,
179
+ profile: "johndoe",
180
+ });
181
+ expect(result.posts[0]?.url).toBe("https://www.linkedin.com/feed/update/urn:li:share:111/");
182
+ expect(result.posts[1]?.url).toBe("https://www.linkedin.com/feed/update/urn:li:share:222/");
183
+ });
184
+ it("returns posts with profilePublicId and nextCursor", async () => {
185
+ const posts = [rawPost()];
186
+ setupMocks(posts, [urnToUrl("urn:li:share:111")]);
187
+ const result = await getProfileActivity({
188
+ cdpPort: CDP_PORT,
189
+ profile: "janedoe",
190
+ });
191
+ expect(result.profilePublicId).toBe("janedoe");
192
+ expect(result.posts).toHaveLength(1);
193
+ expect(result.posts[0]?.authorName).toBe("Jane Doe");
194
+ expect(result.posts[0]?.reactionCount).toBe(5);
195
+ expect(result.nextCursor).toBeNull();
196
+ });
197
+ it("returns nextCursor when more posts available", async () => {
198
+ const posts = Array.from({ length: 15 }, (_, i) => rawPost({ authorName: `User ${String(i)}` }));
199
+ const urls = posts.map((_, i) => urnToUrl(`urn:li:share:${String(i)}`));
200
+ setupMocks(posts, urls);
201
+ const result = await getProfileActivity({
202
+ cdpPort: CDP_PORT,
203
+ profile: "johndoe",
204
+ count: 10,
205
+ });
206
+ expect(result.posts).toHaveLength(10);
207
+ expect(result.nextCursor).toBe("https://www.linkedin.com/feed/update/urn:li:share:9/");
208
+ });
209
+ it("uses cursor to skip past already-seen posts", async () => {
210
+ const posts = Array.from({ length: 15 }, (_, i) => rawPost({ authorName: `User ${String(i)}` }));
211
+ const urls = posts.map((_, i) => urnToUrl(`urn:li:share:${String(i)}`));
212
+ setupMocks(posts, urls);
213
+ const result = await getProfileActivity({
214
+ cdpPort: CDP_PORT,
215
+ profile: "johndoe",
216
+ count: 5,
217
+ cursor: "https://www.linkedin.com/feed/update/urn:li:share:4/",
218
+ });
219
+ expect(result.posts).toHaveLength(5);
220
+ expect(result.posts[0]?.authorName).toBe("User 5");
221
+ });
222
+ it("builds post URLs from extracted URNs", async () => {
223
+ setupMocks([rawPost()], [urnToUrl("urn:li:share:999")]);
224
+ const result = await getProfileActivity({
225
+ cdpPort: CDP_PORT,
226
+ profile: "johndoe",
227
+ });
228
+ expect(result.posts[0]?.url).toBe("https://www.linkedin.com/feed/update/urn:li:share:999/");
229
+ });
230
+ it("handles posts where URL extraction fails", async () => {
231
+ setupMocks([rawPost()], [null, null, null]);
232
+ const result = await getProfileActivity({
233
+ cdpPort: CDP_PORT,
234
+ profile: "johndoe",
235
+ });
236
+ expect(result.posts[0]?.url).toBeNull();
237
+ });
238
+ it("retries URL extraction when clipboard capture fails on first attempt", async () => {
239
+ const retryUrl = "https://www.linkedin.com/feed/update/urn:li:share:retried/";
240
+ setupMocks([rawPost()], [null, retryUrl]);
241
+ const result = await getProfileActivity({
242
+ cdpPort: CDP_PORT,
243
+ profile: "johndoe",
244
+ });
245
+ expect(result.posts[0]?.url).toBe(retryUrl);
246
+ });
247
+ it("throws when no LinkedIn page found", async () => {
248
+ vi.mocked(discoverTargets).mockResolvedValue([]);
249
+ await expect(getProfileActivity({ cdpPort: CDP_PORT, profile: "johndoe" })).rejects.toThrow("No LinkedIn page found in LinkedHelper");
250
+ });
251
+ it("throws on non-loopback host without allowRemote", async () => {
252
+ await expect(getProfileActivity({
253
+ cdpPort: CDP_PORT,
254
+ profile: "johndoe",
255
+ cdpHost: "192.168.1.1",
256
+ })).rejects.toThrow("requires --allow-remote");
257
+ });
258
+ it("disconnects CDP client after operation", async () => {
259
+ const { disconnect } = setupMocks([]);
260
+ await getProfileActivity({ cdpPort: CDP_PORT, profile: "johndoe" });
261
+ expect(disconnect).toHaveBeenCalled();
262
+ });
263
+ it("disconnects CDP client even on error", async () => {
264
+ vi.mocked(discoverTargets).mockResolvedValue([
265
+ {
266
+ id: "target-1",
267
+ type: "page",
268
+ title: "LinkedIn",
269
+ url: "https://www.linkedin.com/feed/",
270
+ description: "",
271
+ devtoolsFrontendUrl: "",
272
+ },
273
+ ]);
274
+ const disconnect = vi.fn();
275
+ vi.mocked(CDPClient).mockImplementation(function () {
276
+ return {
277
+ connect: vi.fn().mockResolvedValue(undefined),
278
+ disconnect,
279
+ navigate: vi.fn().mockRejectedValue(new Error("Navigation failed")),
280
+ evaluate: vi.fn().mockResolvedValue(true),
281
+ send: vi.fn().mockResolvedValue(undefined),
282
+ };
283
+ });
284
+ await expect(getProfileActivity({ cdpPort: CDP_PORT, profile: "johndoe" })).rejects.toThrow("Navigation failed");
285
+ expect(disconnect).toHaveBeenCalled();
286
+ });
287
+ it("only extracts URLs for posts in the result window (no cursor)", async () => {
288
+ const posts = Array.from({ length: 8 }, (_, i) => rawPost({ authorName: `User ${String(i)}` }));
289
+ const urls = posts.map((_, i) => urnToUrl(`urn:li:share:${String(i)}`));
290
+ const { evaluate } = setupMocks(posts, urls);
291
+ await getProfileActivity({
292
+ cdpPort: CDP_PORT,
293
+ profile: "johndoe",
294
+ count: 3,
295
+ });
296
+ // Each successful extraction reads the clipboard exactly once
297
+ const clipboardReads = evaluate.mock.calls.filter((call) => call[0] === "window.__capturedClipboard");
298
+ expect(clipboardReads).toHaveLength(3);
299
+ });
300
+ it("only extracts URLs for cursor scan plus result window (with cursor)", async () => {
301
+ const posts = Array.from({ length: 15 }, (_, i) => rawPost({ authorName: `User ${String(i)}` }));
302
+ const urls = posts.map((_, i) => urnToUrl(`urn:li:share:${String(i)}`));
303
+ const { evaluate } = setupMocks(posts, urls);
304
+ await getProfileActivity({
305
+ cdpPort: CDP_PORT,
306
+ profile: "johndoe",
307
+ count: 5,
308
+ cursor: "https://www.linkedin.com/feed/update/urn:li:share:4/",
309
+ });
310
+ // 5 reads to find cursor (posts 0–4) + 5 reads for the window (posts 5–9)
311
+ const clipboardReads = evaluate.mock.calls.filter((call) => call[0] === "window.__capturedClipboard");
312
+ expect(clipboardReads).toHaveLength(10);
313
+ });
314
+ it("returns empty posts array when no activity found", async () => {
315
+ setupMocks([]);
316
+ const result = await getProfileActivity({
317
+ cdpPort: CDP_PORT,
318
+ profile: "johndoe",
319
+ });
320
+ expect(result.posts).toHaveLength(0);
321
+ expect(result.nextCursor).toBeNull();
322
+ });
323
+ });
324
+ //# sourceMappingURL=get-profile-activity.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-profile-activity.test.js","sourceRoot":"","sources":["../../src/operations/get-profile-activity.test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,GAAG,EAAE,CAAC,CAAC;IACpC,eAAe,EAAE,EAAE,CAAC,EAAE,EAAE;CACzB,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,CAAC;IACjC,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE;CACnB,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,CAAC;IACnC,cAAc,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;CACrD,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;IAChD,MAAM,MAAM,GAAG,MAAM,cAAc,EAAkC,CAAC;IACtE,OAAO;QACL,GAAG,MAAM;QACT,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;KAC5C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAA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QACrC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ThrottleStatus } from "../types/index.js";
2
+ import { type ConnectionOptions } from "./types.js";
3
+ export type GetThrottleStatusInput = ConnectionOptions;
4
+ export type GetThrottleStatusOutput = ThrottleStatus;
5
+ export declare function getThrottleStatus(input: GetThrottleStatusInput): Promise<GetThrottleStatusOutput>;
6
+ //# sourceMappingURL=get-throttle-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-throttle-status.d.ts","sourceRoot":"","sources":["../../src/operations/get-throttle-status.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAErE,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAEvD,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,uBAAuB,CAAC,CAqBlC"}
@@ -0,0 +1,24 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { resolveAccount } from "../services/account-resolution.js";
4
+ import { withInstanceDatabase } from "../services/instance-context.js";
5
+ import { buildCdpOptions } from "./types.js";
6
+ export async function getThrottleStatus(input) {
7
+ const cdpPort = input.cdpPort;
8
+ const accountId = await resolveAccount(cdpPort, buildCdpOptions(input));
9
+ return withInstanceDatabase(cdpPort, accountId, async ({ instance }) => {
10
+ return instance.evaluateUI(`(() => {
11
+ const mws = window.mainWindowService;
12
+ if (!mws) return { throttled: false, since: null };
13
+ const td = mws.throttleDetector;
14
+ if (!td) return { throttled: false, since: null };
15
+ const throttled = !!td.isThrottling();
16
+ const lastDate = td.getLastThrottleDate();
17
+ const since = lastDate ? new Date(lastDate).toISOString() : null;
18
+ return { throttled, since };
19
+ })()`);
20
+ }, {
21
+ launcher: buildCdpOptions(input),
22
+ });
23
+ }
24
+ //# sourceMappingURL=get-throttle-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-throttle-status.js","sourceRoot":"","sources":["../../src/operations/get-throttle-status.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,eAAe,EAA0B,MAAM,YAAY,CAAC;AAMrE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAA6B;IAE7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAE9B,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;IAExE,OAAO,oBAAoB,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACrE,OAAO,QAAQ,CAAC,UAAU,CACxB;;;;;;;;;WASK,CACN,CAAC;IACJ,CAAC,EAAE;QACD,QAAQ,EAAE,eAAe,CAAC,KAAK,CAAC;KACjC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=get-throttle-status.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-throttle-status.test.d.ts","sourceRoot":"","sources":["../../src/operations/get-throttle-status.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
4
+ vi.mock("../services/account-resolution.js", () => ({
5
+ resolveAccount: vi.fn(),
6
+ }));
7
+ vi.mock("../services/instance-context.js", () => ({
8
+ withInstanceDatabase: vi.fn(),
9
+ }));
10
+ import { resolveAccount } from "../services/account-resolution.js";
11
+ import { withInstanceDatabase } from "../services/instance-context.js";
12
+ import { getThrottleStatus } from "./get-throttle-status.js";
13
+ function setupMocks(throttleResult) {
14
+ vi.mocked(resolveAccount).mockResolvedValue(1);
15
+ vi.mocked(withInstanceDatabase).mockImplementation(async (_cdpPort, _accountId, callback) => callback({
16
+ instance: {
17
+ evaluateUI: vi.fn().mockResolvedValue(throttleResult),
18
+ },
19
+ db: {},
20
+ }));
21
+ }
22
+ describe("getThrottleStatus", () => {
23
+ beforeEach(() => {
24
+ vi.clearAllMocks();
25
+ });
26
+ afterEach(() => {
27
+ vi.restoreAllMocks();
28
+ });
29
+ it("returns not throttled when ThrottleDetector reports no throttling", async () => {
30
+ setupMocks({ throttled: false, since: null });
31
+ const result = await getThrottleStatus({ cdpPort: 9222 });
32
+ expect(result).toEqual({ throttled: false, since: null });
33
+ });
34
+ it("returns throttled with timestamp when ThrottleDetector reports throttling", async () => {
35
+ const since = "2026-03-21T10:00:00.000Z";
36
+ setupMocks({ throttled: true, since });
37
+ const result = await getThrottleStatus({ cdpPort: 9222 });
38
+ expect(result).toEqual({ throttled: true, since });
39
+ });
40
+ it("passes connection options to resolveAccount", async () => {
41
+ setupMocks({ throttled: false, since: null });
42
+ await getThrottleStatus({
43
+ cdpPort: 1234,
44
+ cdpHost: "192.168.1.1",
45
+ allowRemote: true,
46
+ });
47
+ expect(resolveAccount).toHaveBeenCalledWith(1234, {
48
+ host: "192.168.1.1",
49
+ allowRemote: true,
50
+ });
51
+ });
52
+ it("propagates resolveAccount errors", async () => {
53
+ vi.mocked(resolveAccount).mockRejectedValue(new Error("connection refused"));
54
+ await expect(getThrottleStatus({ cdpPort: 9222 })).rejects.toThrow("connection refused");
55
+ });
56
+ it("propagates withInstanceDatabase errors", async () => {
57
+ vi.mocked(resolveAccount).mockResolvedValue(1);
58
+ vi.mocked(withInstanceDatabase).mockRejectedValue(new Error("instance not running"));
59
+ await expect(getThrottleStatus({ cdpPort: 9222 })).rejects.toThrow("instance not running");
60
+ });
61
+ });
62
+ //# sourceMappingURL=get-throttle-status.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-throttle-status.test.js","sourceRoot":"","sources":["../../src/operations/get-throttle-status.test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzE,EAAE,CAAC,IAAI,CAAC,mCAAmC,EAAE,GAAG,EAAE,CAAC,CAAC;IAClD,cAAc,EAAE,EAAE,CAAC,EAAE,EAAE;CACxB,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAAC,CAAC;IAChD,oBAAoB,EAAE,EAAE,CAAC,EAAE,EAAE;CAC9B,CAAC,CAAC,CAAC;AAGJ,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,SAAS,UAAU,CAAC,cAA4D;IAC9E,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAE/C,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,kBAAkB,CAChD,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,CACvC,QAAQ,CAAC;QACP,QAAQ,EAAE;YACR,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC;SACtD;QACD,EAAE,EAAE,EAAE;KAC+B,CAAC,CAC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AAC;QAEH,MAAM,CAAC,cAAc,CAAC,CAAC,oBAAoB,CAAC,IAAI,EAAE;YAChD,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC;QAE7E,MAAM,MAAM,CACV,iBAAiB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CACrC,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACtD,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;QAC/C,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,iBAAiB,CAC/C,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAClC,CAAC;QAEF,MAAM,MAAM,CACV,iBAAiB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CACrC,CAAC,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ConnectionOptions } from "./types.js";
1
+ import { type ConnectionOptions } from "./types.js";
2
2
  /**
3
3
  * Input for the import-people-from-collection operation.
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"import-people-from-collection.d.ts","sourceRoot":"","sources":["../../src/operations/import-people-from-collection.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,iBAAiB;IACxE,Q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M,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,+BAA+B,GACrC,OAAO,CAAC,gCAAgC,CAAC,CA0D3C"}
@@ -4,8 +4,8 @@ import { resolveAccount } from "../services/account-resolution.js";
4
4
  import { withInstanceDatabase } from "../services/instance-context.js";
5
5
  import { CampaignService } from "../services/campaign.js";
6
6
  import { CollectionListRepository } from "../db/index.js";
7
- import { DEFAULT_CDP_PORT } from "../constants.js";
8
7
  import { IMPORT_CHUNK_SIZE } from "./import-people-from-urls.js";
8
+ import { buildCdpOptions } from "./types.js";
9
9
  /**
10
10
  * Import all people from a collection into a campaign action.
11
11
  *
@@ -13,11 +13,8 @@ import { IMPORT_CHUNK_SIZE } from "./import-people-from-urls.js";
13
13
  * feeds them into the campaign via `importPeopleFromUrls`.
14
14
  */
15
15
  export async function importPeopleFromCollection(input) {
16
- const cdpPort = input.cdpPort ?? DEFAULT_CDP_PORT;
17
- const accountId = await resolveAccount(cdpPort, {
18
- ...(input.cdpHost !== undefined && { host: input.cdpHost }),
19
- ...(input.allowRemote !== undefined && { allowRemote: input.allowRemote }),
20
- });
16
+ const cdpPort = input.cdpPort;
17
+ const accountId = await resolveAccount(cdpPort, buildCdpOptions(input));
21
18
  return withInstanceDatabase(cdpPort, accountId, async ({ instance, db }) => {
22
19
  const collectionRepo = new CollectionListRepository(db);
23
20
  const linkedInUrls = collectionRepo.getCollectionPeopleUrls(input.collectionId);
@@ -1 +1 @@
1
- {"version":3,"file":"import-people-from-collection.js","sourceRoot":"","sources":["../../src/operations/import-people-from-collection.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,E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AAC;aACV,CAAC;QACJ,CAAC;QAED,MAAM,eAAe,GAAG,IAAI,eAAe,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAE1D,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,cAAc,GAAG,CAAC,CAAC;QACvB,IAAI,gBAAgB,GAAG,CAAC,CAAC;QACzB,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,IAAI,iBAAiB,EAAE,CAAC;YAChE,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,CAAC;YAC3D,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,oBAAoB,CACvD,KAAK,CAAC,UAAU,EAChB,KAAK,CACN,CAAC;YACF,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YAC3B,QAAQ,IAAI,MAAM,CAAC,UAAU,CAAC;YAC9B,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC;YACxC,gBAAgB,IAAI,MAAM,CAAC,gBAAgB,CAAC;YAC5C,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAa;YACtB,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,QAAQ;YACR,SAAS,EAAE,YAAY,CAAC,MAAM;YAC9B,QAAQ;YACR,cAAc;YACd,gBAAgB;YAChB,MAAM;SACP,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"import-people-from-collection.js","sourceRoot":"","sources":["../../src/operations/import-people-from-collection.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAm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I,cAAc,GAAG,CAAC,CAAC;QACvB,IAAI,gBAAgB,GAAG,CAAC,CAAC;QACzB,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,IAAI,iBAAiB,EAAE,CAAC;YAChE,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,CAAC;YAC3D,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,oBAAoB,CACvD,KAAK,CAAC,UAAU,EAChB,KAAK,CACN,CAAC;YACF,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YAC3B,QAAQ,IAAI,MAAM,CAAC,UAAU,CAAC;YAC9B,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC;YACxC,gBAAgB,IAAI,MAAM,CAAC,gBAAgB,CAAC;YAC5C,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAa;YACtB,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,QAAQ;YACR,SAAS,EAAE,YAAY,CAAC,MAAM;YAC9B,QAAQ;YACR,cAAc;YACd,gBAAgB;YAChB,MAAM;SACP,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ConnectionOptions } from "./types.js";
1
+ import { type ConnectionOptions } from "./types.js";
2
2
  /** Maximum URLs per CDP call to avoid payload limits and timeouts. */
3
3
  export declare const IMPORT_CHUNK_SIZE = 200;
4
4
  export interface ImportPeopleFromUrlsInput extends ConnectionOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"import-people-from-urls.d.ts","sourceRoot":"","sources":["../../src/operations/import-people-from-urls.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,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C3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,0BAA0B,CAAC,CAsCrC"}
@@ -3,15 +3,12 @@
3
3
  import { resolveAccount } from "../services/account-resolution.js";
4
4
  import { withInstanceDatabase } from "../services/instance-context.js";
5
5
  import { CampaignService } from "../services/campaign.js";
6
- import { DEFAULT_CDP_PORT } from "../constants.js";
6
+ import { buildCdpOptions } from "./types.js";
7
7
  /** Maximum URLs per CDP call to avoid payload limits and timeouts. */
8
8
  export const IMPORT_CHUNK_SIZE = 200;
9
9
  export async function importPeopleFromUrls(input) {
10
- const cdpPort = input.cdpPort ?? DEFAULT_CDP_PORT;
11
- const accountId = await resolveAccount(cdpPort, {
12
- ...(input.cdpHost !== undefined && { host: input.cdpHost }),
13
- ...(input.allowRemote !== undefined && { allowRemote: input.allowRemote }),
14
- });
10
+ const cdpPort = input.cdpPort;
11
+ const accountId = await resolveAccount(cdpPort, buildCdpOptions(input));
15
12
  return withInstanceDatabase(cdpPort, accountId, async ({ instance, db }) => {
16
13
  const campaignService = new CampaignService(instance, db);
17
14
  let actionId = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"import-people-from-urls.js","sourceRoot":"","sources":["../../src/operations/import-people-from-urls.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,sEAAsE;AAC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AAC;QACvB,IAAI,gBAAgB,GAAG,CAAC,CAAC;QACzB,IAAI,MAAM,GAAG,CAAC,CAAC;QAEf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,IAAI,iBAAiB,EAAE,CAAC;YACtE,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,iBAAiB,CAAC,CAAC;YACjE,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,oBAAoB,CACvD,KAAK,CAAC,UAAU,EAChB,KAAK,CACN,CAAC;YACF,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YAC3B,QAAQ,IAAI,MAAM,CAAC,UAAU,CAAC;YAC9B,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC;YACxC,gBAAgB,IAAI,MAAM,CAAC,gBAAgB,CAAC;YAC5C,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC;QAC1B,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAa;YACtB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,QAAQ;YACR,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM;YACpC,QAAQ;YACR,cAAc;YACd,gBAAgB;YAChB,MAAM;SACP,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,9 +1,10 @@
1
- export type { ConnectionOptions } from "./types.js";
1
+ export { buildCdpOptions, type ConnectionOptions } from "./types.js";
2
2
  export { campaignGet, type CampaignGetInput, type CampaignGetOutput, } from "./campaign-get.js";
3
3
  export { campaignList, type CampaignListInput, type CampaignListOutput, } from "./campaign-list.js";
4
4
  export { campaignCreate, type CampaignCreateInput, type CampaignCreateOutput, } from "./campaign-create.js";
5
5
  export { campaignUpdate, type CampaignUpdateInput, type CampaignUpdateOutput, } from "./campaign-update.js";
6
6
  export { campaignDelete, type CampaignDeleteInput, type CampaignDeleteOutput, } from "./campaign-delete.js";
7
+ export { campaignErase, type CampaignEraseInput, type CampaignEraseOutput, } from "./campaign-erase.js";
7
8
  export { campaignListPeople, type CampaignListPeopleInput, type CampaignListPeopleOutput, } from "./campaign-list-people.js";
8
9
  export { campaignStart, type CampaignStartInput, type CampaignStartOutput, } from "./campaign-start.js";
9
10
  export { campaignStop, type CampaignStopInput, type CampaignStopOutput, } from "./campaign-stop.js";
@@ -20,6 +21,7 @@ export { campaignExcludeAdd, type CampaignExcludeAddInput, type CampaignExcludeA
20
21
  export { campaignExcludeRemove, type CampaignExcludeRemoveInput, type CampaignExcludeRemoveOutput, } from "./campaign-exclude-remove.js";
21
22
  export { campaignExcludeList, type CampaignExcludeListInput, type CampaignExcludeListOutput, } from "./campaign-exclude-list.js";
22
23
  export { getErrors, type GetErrorsInput, type GetErrorsOutput, } from "./get-errors.js";
24
+ export { dismissErrors, type DismissErrorsInput, type DismissErrorsOutput, } from "./dismiss-errors.js";
23
25
  export { queryMessages, type QueryMessagesInput, type QueryMessagesOutput, } from "./query-messages.js";
24
26
  export { checkReplies, type CheckRepliesInput, type CheckRepliesOutput, } from "./check-replies.js";
25
27
  export { scrapeMessagingHistory, type ScrapeMessagingHistoryInput, type ScrapeMessagingHistoryOutput, } from "./scrape-messaging-history.js";
@@ -32,6 +34,26 @@ export { deleteCollection, type DeleteCollectionInput, type DeleteCollectionOutp
32
34
  export { addPeopleToCollection, type AddPeopleToCollectionInput, type AddPeopleToCollectionOutput, } from "./add-people-to-collection.js";
33
35
  export { removePeopleFromCollection, type RemovePeopleFromCollectionInput, type RemovePeopleFromCollectionOutput, } from "./remove-people-from-collection.js";
34
36
  export { importPeopleFromCollection, type ImportPeopleFromCollectionInput, type ImportPeopleFromCollectionOutput, } from "./import-people-from-collection.js";
37
+ export { commentOnPost, type CommentOnPostInput, type CommentOnPostOutput, } from "./comment-on-post.js";
38
+ export { getPost, type GetPostInput, type GetPostOutput, } from "./get-post.js";
39
+ export { getPostStats, extractPostUrn, resolvePostDetailUrl, type GetPostStatsInput, type GetPostStatsOutput, } from "./get-post-stats.js";
40
+ export { getPostEngagers, type GetPostEngagersInput, type GetPostEngagersOutput, } from "./get-post-engagers.js";
41
+ export { searchPosts, type SearchPostsInput, type SearchPostsOutput, } from "./search-posts.js";
42
+ export { getFeed, type GetFeedInput, type GetFeedOutput, } from "./get-feed.js";
43
+ export { getProfileActivity, extractProfileId, type GetProfileActivityInput, type GetProfileActivityOutput, } from "./get-profile-activity.js";
44
+ export { getActionBudget, type GetActionBudgetInput, type GetActionBudgetOutput, } from "./get-action-budget.js";
45
+ export { getThrottleStatus, type GetThrottleStatusInput, type GetThrottleStatusOutput, } from "./get-throttle-status.js";
46
+ export { visitProfile, type VisitProfileInput, type VisitProfileOutput, } from "./visit-profile.js";
47
+ export { reactToPost, REACTION_TYPES, type ReactToPostInput, type ReactToPostOutput, type ReactionType, } from "./react-to-post.js";
48
+ export { type EphemeralActionInput, } from "./ephemeral-action.js";
49
+ export { messagePerson, type MessagePersonInput, type MessagePersonOutput, } from "./message-person.js";
50
+ export { sendInvite, type SendInviteInput, type SendInviteOutput, } from "./send-invite.js";
51
+ export { sendInmail, type SendInmailInput, type SendInmailOutput, } from "./send-inmail.js";
52
+ export { followPerson, type FollowPersonInput, type FollowPersonOutput, } from "./follow-person.js";
53
+ export { endorseSkills, type EndorseSkillsInput, type EndorseSkillsOutput, } from "./endorse-skills.js";
54
+ export { likePersonPosts, type LikePersonPostsInput, type LikePersonPostsOutput, } from "./like-person-posts.js";
55
+ export { removeConnection, type RemoveConnectionInput, type RemoveConnectionOutput, } from "./remove-connection.js";
56
+ export { enrichProfile, type EnrichProfileInput, type EnrichProfileOutput, type EnrichmentCategory, } from "./enrich-profile.js";
35
57
  export { buildLinkedInUrl, type BuildLinkedInUrlInput, type BuildLinkedInUrlOutput, } from "./build-linkedin-url.js";
36
58
  export { resolveLinkedInEntity, type ResolveLinkedInEntityInput, type ResolveLinkedInEntityOutput, } from "./resolve-linkedin-entity.js";
37
59
  //# sourceMappingURL=index.d.ts.map