@lhremote/core 0.7.0 → 0.8.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 (288) hide show
  1. package/dist/db/index.d.ts +1 -1
  2. package/dist/db/index.d.ts.map +1 -1
  3. package/dist/db/index.js +1 -1
  4. package/dist/db/index.js.map +1 -1
  5. package/dist/db/repositories/action-budget.d.ts +29 -0
  6. package/dist/db/repositories/action-budget.d.ts.map +1 -0
  7. package/dist/db/repositories/action-budget.js +100 -0
  8. package/dist/db/repositories/action-budget.js.map +1 -0
  9. package/dist/db/repositories/action-budget.test.d.ts +2 -0
  10. package/dist/db/repositories/action-budget.test.d.ts.map +1 -0
  11. package/dist/db/repositories/action-budget.test.js +181 -0
  12. package/dist/db/repositories/action-budget.test.js.map +1 -0
  13. package/dist/db/repositories/campaign-hard-delete.integration.test.d.ts +2 -0
  14. package/dist/db/repositories/campaign-hard-delete.integration.test.d.ts.map +1 -0
  15. package/dist/db/repositories/campaign-hard-delete.integration.test.js +78 -0
  16. package/dist/db/repositories/campaign-hard-delete.integration.test.js.map +1 -0
  17. package/dist/db/repositories/campaign.d.ts +14 -0
  18. package/dist/db/repositories/campaign.d.ts.map +1 -1
  19. package/dist/db/repositories/campaign.js +125 -0
  20. package/dist/db/repositories/campaign.js.map +1 -1
  21. package/dist/db/repositories/index.d.ts +1 -0
  22. package/dist/db/repositories/index.d.ts.map +1 -1
  23. package/dist/db/repositories/index.js +1 -0
  24. package/dist/db/repositories/index.js.map +1 -1
  25. package/dist/index.d.ts +5 -4
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +24 -4
  28. package/dist/index.js.map +1 -1
  29. package/dist/linkedin/__tests__/dom-automation.integration.test.d.ts +2 -0
  30. package/dist/linkedin/__tests__/dom-automation.integration.test.d.ts.map +1 -0
  31. package/dist/linkedin/__tests__/dom-automation.integration.test.js +160 -0
  32. package/dist/linkedin/__tests__/dom-automation.integration.test.js.map +1 -0
  33. package/dist/linkedin/__tests__/selectors.integration.test.d.ts +2 -0
  34. package/dist/linkedin/__tests__/selectors.integration.test.d.ts.map +1 -0
  35. package/dist/linkedin/__tests__/selectors.integration.test.js +258 -0
  36. package/dist/linkedin/__tests__/selectors.integration.test.js.map +1 -0
  37. package/dist/linkedin/dom-automation.d.ts +67 -0
  38. package/dist/linkedin/dom-automation.d.ts.map +1 -0
  39. package/dist/linkedin/dom-automation.js +139 -0
  40. package/dist/linkedin/dom-automation.js.map +1 -0
  41. package/dist/linkedin/index.d.ts +3 -0
  42. package/dist/linkedin/index.d.ts.map +1 -0
  43. package/dist/linkedin/index.js +5 -0
  44. package/dist/linkedin/index.js.map +1 -0
  45. package/dist/linkedin/selectors.d.ts +67 -0
  46. package/dist/linkedin/selectors.d.ts.map +1 -0
  47. package/dist/linkedin/selectors.js +74 -0
  48. package/dist/linkedin/selectors.js.map +1 -0
  49. package/dist/operations/campaign-delete.d.ts +6 -2
  50. package/dist/operations/campaign-delete.d.ts.map +1 -1
  51. package/dist/operations/campaign-delete.js +9 -2
  52. package/dist/operations/campaign-delete.js.map +1 -1
  53. package/dist/operations/campaign-delete.test.js +41 -1
  54. package/dist/operations/campaign-delete.test.js.map +1 -1
  55. package/dist/operations/campaign-erase.d.ts +19 -0
  56. package/dist/operations/campaign-erase.d.ts.map +1 -0
  57. package/dist/operations/campaign-erase.js +22 -0
  58. package/dist/operations/campaign-erase.js.map +1 -0
  59. package/dist/operations/campaign-erase.test.d.ts +2 -0
  60. package/dist/operations/campaign-erase.test.d.ts.map +1 -0
  61. package/dist/operations/campaign-erase.test.js +101 -0
  62. package/dist/operations/campaign-erase.test.js.map +1 -0
  63. package/dist/operations/comment-on-post.d.ts +34 -0
  64. package/dist/operations/comment-on-post.d.ts.map +1 -0
  65. package/dist/operations/comment-on-post.js +108 -0
  66. package/dist/operations/comment-on-post.js.map +1 -0
  67. package/dist/operations/comment-on-post.test.d.ts +2 -0
  68. package/dist/operations/comment-on-post.test.d.ts.map +1 -0
  69. package/dist/operations/comment-on-post.test.js +240 -0
  70. package/dist/operations/comment-on-post.test.js.map +1 -0
  71. package/dist/operations/dismiss-errors.d.ts +22 -0
  72. package/dist/operations/dismiss-errors.d.ts.map +1 -0
  73. package/dist/operations/dismiss-errors.js +55 -0
  74. package/dist/operations/dismiss-errors.js.map +1 -0
  75. package/dist/operations/dismiss-errors.test.d.ts +2 -0
  76. package/dist/operations/dismiss-errors.test.d.ts.map +1 -0
  77. package/dist/operations/dismiss-errors.test.js +136 -0
  78. package/dist/operations/dismiss-errors.test.js.map +1 -0
  79. package/dist/operations/endorse-skills.d.ts +10 -0
  80. package/dist/operations/endorse-skills.d.ts.map +1 -0
  81. package/dist/operations/endorse-skills.js +12 -0
  82. package/dist/operations/endorse-skills.js.map +1 -0
  83. package/dist/operations/enrich-profile.d.ts +18 -0
  84. package/dist/operations/enrich-profile.d.ts.map +1 -0
  85. package/dist/operations/enrich-profile.js +15 -0
  86. package/dist/operations/enrich-profile.js.map +1 -0
  87. package/dist/operations/ephemeral-action.d.ts +22 -0
  88. package/dist/operations/ephemeral-action.d.ts.map +1 -0
  89. package/dist/operations/ephemeral-action.js +31 -0
  90. package/dist/operations/ephemeral-action.js.map +1 -0
  91. package/dist/operations/follow-person.d.ts +9 -0
  92. package/dist/operations/follow-person.d.ts.map +1 -0
  93. package/dist/operations/follow-person.js +11 -0
  94. package/dist/operations/follow-person.js.map +1 -0
  95. package/dist/operations/get-action-budget.d.ts +6 -0
  96. package/dist/operations/get-action-budget.d.ts.map +1 -0
  97. package/dist/operations/get-action-budget.js +22 -0
  98. package/dist/operations/get-action-budget.js.map +1 -0
  99. package/dist/operations/get-action-budget.test.d.ts +2 -0
  100. package/dist/operations/get-action-budget.test.d.ts.map +1 -0
  101. package/dist/operations/get-action-budget.test.js +79 -0
  102. package/dist/operations/get-action-budget.test.js.map +1 -0
  103. package/dist/operations/get-errors.d.ts +9 -3
  104. package/dist/operations/get-errors.d.ts.map +1 -1
  105. package/dist/operations/get-errors.js +41 -4
  106. package/dist/operations/get-errors.js.map +1 -1
  107. package/dist/operations/get-errors.test.js +108 -42
  108. package/dist/operations/get-errors.test.js.map +1 -1
  109. package/dist/operations/get-feed.d.ts +33 -0
  110. package/dist/operations/get-feed.d.ts.map +1 -0
  111. package/dist/operations/get-feed.js +220 -0
  112. package/dist/operations/get-feed.js.map +1 -0
  113. package/dist/operations/get-feed.test.d.ts +2 -0
  114. package/dist/operations/get-feed.test.d.ts.map +1 -0
  115. package/dist/operations/get-feed.test.js +276 -0
  116. package/dist/operations/get-feed.test.js.map +1 -0
  117. package/dist/operations/get-post-engagers.d.ts +40 -0
  118. package/dist/operations/get-post-engagers.d.ts.map +1 -0
  119. package/dist/operations/get-post-engagers.js +128 -0
  120. package/dist/operations/get-post-engagers.js.map +1 -0
  121. package/dist/operations/get-post-engagers.test.d.ts +2 -0
  122. package/dist/operations/get-post-engagers.test.d.ts.map +1 -0
  123. package/dist/operations/get-post-engagers.test.js +19 -0
  124. package/dist/operations/get-post-engagers.test.js.map +1 -0
  125. package/dist/operations/get-post-stats.d.ts +38 -0
  126. package/dist/operations/get-post-stats.d.ts.map +1 -0
  127. package/dist/operations/get-post-stats.js +100 -0
  128. package/dist/operations/get-post-stats.js.map +1 -0
  129. package/dist/operations/get-post-stats.test.d.ts +2 -0
  130. package/dist/operations/get-post-stats.test.d.ts.map +1 -0
  131. package/dist/operations/get-post-stats.test.js +34 -0
  132. package/dist/operations/get-post-stats.test.js.map +1 -0
  133. package/dist/operations/get-post.d.ts +183 -0
  134. package/dist/operations/get-post.d.ts.map +1 -0
  135. package/dist/operations/get-post.js +270 -0
  136. package/dist/operations/get-post.js.map +1 -0
  137. package/dist/operations/get-post.test.d.ts +2 -0
  138. package/dist/operations/get-post.test.d.ts.map +1 -0
  139. package/dist/operations/get-post.test.js +449 -0
  140. package/dist/operations/get-post.test.js.map +1 -0
  141. package/dist/operations/get-profile-activity.d.ts +129 -0
  142. package/dist/operations/get-profile-activity.d.ts.map +1 -0
  143. package/dist/operations/get-profile-activity.js +181 -0
  144. package/dist/operations/get-profile-activity.js.map +1 -0
  145. package/dist/operations/get-profile-activity.test.d.ts +2 -0
  146. package/dist/operations/get-profile-activity.test.d.ts.map +1 -0
  147. package/dist/operations/get-profile-activity.test.js +205 -0
  148. package/dist/operations/get-profile-activity.test.js.map +1 -0
  149. package/dist/operations/get-throttle-status.d.ts +6 -0
  150. package/dist/operations/get-throttle-status.d.ts.map +1 -0
  151. package/dist/operations/get-throttle-status.js +30 -0
  152. package/dist/operations/get-throttle-status.js.map +1 -0
  153. package/dist/operations/get-throttle-status.test.d.ts +2 -0
  154. package/dist/operations/get-throttle-status.test.d.ts.map +1 -0
  155. package/dist/operations/get-throttle-status.test.js +62 -0
  156. package/dist/operations/get-throttle-status.test.js.map +1 -0
  157. package/dist/operations/index.d.ts +22 -0
  158. package/dist/operations/index.d.ts.map +1 -1
  159. package/dist/operations/index.js +32 -0
  160. package/dist/operations/index.js.map +1 -1
  161. package/dist/operations/like-person-posts.d.ts +14 -0
  162. package/dist/operations/like-person-posts.d.ts.map +1 -0
  163. package/dist/operations/like-person-posts.js +28 -0
  164. package/dist/operations/like-person-posts.js.map +1 -0
  165. package/dist/operations/message-person.d.ts +11 -0
  166. package/dist/operations/message-person.d.ts.map +1 -0
  167. package/dist/operations/message-person.js +19 -0
  168. package/dist/operations/message-person.js.map +1 -0
  169. package/dist/operations/react-to-post.d.ts +38 -0
  170. package/dist/operations/react-to-post.d.ts.map +1 -0
  171. package/dist/operations/react-to-post.js +82 -0
  172. package/dist/operations/react-to-post.js.map +1 -0
  173. package/dist/operations/react-to-post.test.d.ts +2 -0
  174. package/dist/operations/react-to-post.test.d.ts.map +1 -0
  175. package/dist/operations/react-to-post.test.js +154 -0
  176. package/dist/operations/react-to-post.test.js.map +1 -0
  177. package/dist/operations/remove-connection.d.ts +6 -0
  178. package/dist/operations/remove-connection.d.ts.map +1 -0
  179. package/dist/operations/remove-connection.js +7 -0
  180. package/dist/operations/remove-connection.js.map +1 -0
  181. package/dist/operations/search-posts.d.ts +143 -0
  182. package/dist/operations/search-posts.d.ts.map +1 -0
  183. package/dist/operations/search-posts.js +220 -0
  184. package/dist/operations/search-posts.js.map +1 -0
  185. package/dist/operations/search-posts.test.d.ts +2 -0
  186. package/dist/operations/search-posts.test.d.ts.map +1 -0
  187. package/dist/operations/search-posts.test.js +261 -0
  188. package/dist/operations/search-posts.test.js.map +1 -0
  189. package/dist/operations/send-inmail.d.ts +11 -0
  190. package/dist/operations/send-inmail.d.ts.map +1 -0
  191. package/dist/operations/send-inmail.js +19 -0
  192. package/dist/operations/send-inmail.js.map +1 -0
  193. package/dist/operations/send-invite.d.ts +9 -0
  194. package/dist/operations/send-invite.d.ts.map +1 -0
  195. package/dist/operations/send-invite.js +14 -0
  196. package/dist/operations/send-invite.js.map +1 -0
  197. package/dist/operations/visit-profile.d.ts +14 -0
  198. package/dist/operations/visit-profile.d.ts.map +1 -0
  199. package/dist/operations/visit-profile.js +49 -0
  200. package/dist/operations/visit-profile.js.map +1 -0
  201. package/dist/operations/visit-profile.test.d.ts +2 -0
  202. package/dist/operations/visit-profile.test.d.ts.map +1 -0
  203. package/dist/operations/visit-profile.test.js +193 -0
  204. package/dist/operations/visit-profile.test.js.map +1 -0
  205. package/dist/services/campaign.d.ts +10 -0
  206. package/dist/services/campaign.d.ts.map +1 -1
  207. package/dist/services/campaign.js +16 -0
  208. package/dist/services/campaign.js.map +1 -1
  209. package/dist/services/collection.d.ts +5 -2
  210. package/dist/services/collection.d.ts.map +1 -1
  211. package/dist/services/collection.js +24 -5
  212. package/dist/services/collection.js.map +1 -1
  213. package/dist/services/collection.test.js +51 -9
  214. package/dist/services/collection.test.js.map +1 -1
  215. package/dist/services/ephemeral-campaign.d.ts +64 -0
  216. package/dist/services/ephemeral-campaign.d.ts.map +1 -0
  217. package/dist/services/ephemeral-campaign.js +210 -0
  218. package/dist/services/ephemeral-campaign.js.map +1 -0
  219. package/dist/services/ephemeral-campaign.test.d.ts +2 -0
  220. package/dist/services/ephemeral-campaign.test.d.ts.map +1 -0
  221. package/dist/services/ephemeral-campaign.test.js +333 -0
  222. package/dist/services/ephemeral-campaign.test.js.map +1 -0
  223. package/dist/services/errors.d.ts +10 -0
  224. package/dist/services/errors.d.ts.map +1 -1
  225. package/dist/services/errors.js +20 -0
  226. package/dist/services/errors.js.map +1 -1
  227. package/dist/services/index.d.ts +3 -1
  228. package/dist/services/index.d.ts.map +1 -1
  229. package/dist/services/index.js +3 -1
  230. package/dist/services/index.js.map +1 -1
  231. package/dist/services/instance-context.d.ts.map +1 -1
  232. package/dist/services/instance-context.js +9 -1
  233. package/dist/services/instance-context.js.map +1 -1
  234. package/dist/services/instance-context.test.js +77 -1
  235. package/dist/services/instance-context.test.js.map +1 -1
  236. package/dist/services/instance.d.ts +31 -0
  237. package/dist/services/instance.d.ts.map +1 -1
  238. package/dist/services/instance.js +123 -0
  239. package/dist/services/instance.js.map +1 -1
  240. package/dist/services/instance.test.js +70 -0
  241. package/dist/services/instance.test.js.map +1 -1
  242. package/dist/services/launcher.d.ts +7 -0
  243. package/dist/services/launcher.d.ts.map +1 -1
  244. package/dist/services/launcher.js +18 -1
  245. package/dist/services/launcher.js.map +1 -1
  246. package/dist/types/action-budget.d.ts +52 -0
  247. package/dist/types/action-budget.d.ts.map +1 -0
  248. package/dist/types/action-budget.js +4 -0
  249. package/dist/types/action-budget.js.map +1 -0
  250. package/dist/types/campaign.d.ts +24 -0
  251. package/dist/types/campaign.d.ts.map +1 -1
  252. package/dist/types/feed.d.ts +32 -0
  253. package/dist/types/feed.d.ts.map +1 -0
  254. package/dist/types/feed.js +4 -0
  255. package/dist/types/feed.js.map +1 -0
  256. package/dist/types/index.d.ts +7 -2
  257. package/dist/types/index.d.ts.map +1 -1
  258. package/dist/types/post-analytics.d.ts +40 -0
  259. package/dist/types/post-analytics.d.ts.map +1 -0
  260. package/dist/types/post-analytics.js +4 -0
  261. package/dist/types/post-analytics.js.map +1 -0
  262. package/dist/types/post.d.ts +43 -0
  263. package/dist/types/post.d.ts.map +1 -0
  264. package/dist/types/post.js +4 -0
  265. package/dist/types/post.js.map +1 -0
  266. package/dist/types/search-posts.d.ts +22 -0
  267. package/dist/types/search-posts.d.ts.map +1 -0
  268. package/dist/types/search-posts.js +4 -0
  269. package/dist/types/search-posts.js.map +1 -0
  270. package/dist/types/ui-health.d.ts +16 -0
  271. package/dist/types/ui-health.d.ts.map +1 -1
  272. package/dist/voyager/index.d.ts +2 -0
  273. package/dist/voyager/index.d.ts.map +1 -0
  274. package/dist/voyager/index.js +4 -0
  275. package/dist/voyager/index.js.map +1 -0
  276. package/dist/voyager/interceptor.d.ts +100 -0
  277. package/dist/voyager/interceptor.d.ts.map +1 -0
  278. package/dist/voyager/interceptor.integration.test.d.ts +2 -0
  279. package/dist/voyager/interceptor.integration.test.d.ts.map +1 -0
  280. package/dist/voyager/interceptor.integration.test.js +89 -0
  281. package/dist/voyager/interceptor.integration.test.js.map +1 -0
  282. package/dist/voyager/interceptor.js +235 -0
  283. package/dist/voyager/interceptor.js.map +1 -0
  284. package/dist/voyager/interceptor.test.d.ts +2 -0
  285. package/dist/voyager/interceptor.test.d.ts.map +1 -0
  286. package/dist/voyager/interceptor.test.js +372 -0
  287. package/dist/voyager/interceptor.test.js.map +1 -0
  288. package/package.json +1 -1
@@ -6,6 +6,7 @@ export { campaignList, } from "./campaign-list.js";
6
6
  export { campaignCreate, } from "./campaign-create.js";
7
7
  export { campaignUpdate, } from "./campaign-update.js";
8
8
  export { campaignDelete, } from "./campaign-delete.js";
9
+ export { campaignErase, } from "./campaign-erase.js";
9
10
  // Campaign people
10
11
  export { campaignListPeople, } from "./campaign-list-people.js";
11
12
  // Campaign execution
@@ -27,6 +28,7 @@ export { campaignExcludeRemove, } from "./campaign-exclude-remove.js";
27
28
  export { campaignExcludeList, } from "./campaign-exclude-list.js";
28
29
  // Error detection
29
30
  export { getErrors, } from "./get-errors.js";
31
+ export { dismissErrors, } from "./dismiss-errors.js";
30
32
  // Messaging
31
33
  export { queryMessages, } from "./query-messages.js";
32
34
  export { checkReplies, } from "./check-replies.js";
@@ -42,6 +44,36 @@ export { deleteCollection, } from "./delete-collection.js";
42
44
  export { addPeopleToCollection, } from "./add-people-to-collection.js";
43
45
  export { removePeopleFromCollection, } from "./remove-people-from-collection.js";
44
46
  export { importPeopleFromCollection, } from "./import-people-from-collection.js";
47
+ // Post interaction
48
+ export { commentOnPost, } from "./comment-on-post.js";
49
+ // Post detail
50
+ export { getPost, } from "./get-post.js";
51
+ // Post analytics
52
+ export { getPostStats, extractPostUrn, } from "./get-post-stats.js";
53
+ export { getPostEngagers, } from "./get-post-engagers.js";
54
+ // Post search
55
+ export { searchPosts, } from "./search-posts.js";
56
+ // Feed
57
+ export { getFeed, } from "./get-feed.js";
58
+ // Profile activity
59
+ export { getProfileActivity, extractProfileId, } from "./get-profile-activity.js";
60
+ // Action budget & throttle status
61
+ export { getActionBudget, } from "./get-action-budget.js";
62
+ export { getThrottleStatus, } from "./get-throttle-status.js";
63
+ // Standalone actions
64
+ export { visitProfile, } from "./visit-profile.js";
65
+ // Post interaction
66
+ export { reactToPost, REACTION_TYPES, } from "./react-to-post.js";
67
+ // Individual actions (ephemeral campaign)
68
+ export {} from "./ephemeral-action.js";
69
+ export { messagePerson, } from "./message-person.js";
70
+ export { sendInvite, } from "./send-invite.js";
71
+ export { sendInmail, } from "./send-inmail.js";
72
+ export { followPerson, } from "./follow-person.js";
73
+ export { endorseSkills, } from "./endorse-skills.js";
74
+ export { likePersonPosts, } from "./like-person-posts.js";
75
+ export { removeConnection, } from "./remove-connection.js";
76
+ export { enrichProfile, } from "./enrich-profile.js";
45
77
  // URL building & entity resolution
46
78
  export { buildLinkedInUrl, } from "./build-linkedin-url.js";
47
79
  export { resolveLinkedInEntity, } from "./resolve-linkedin-entity.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAAA,yC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1B,OAAO,EACL,UAAU,GAGX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,YAAY,GAGb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,aAAa,GAGd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,eAAe,GAGhB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,gBAAgB,GAGjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,aAAa,GAId,MAAM,qBAAqB,CAAC;AAE7B,mCAAmC;AACnC,OAAO,EACL,gBAAgB,GAGjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,qBAAqB,GAGtB,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { ActionSettings, EphemeralActionResult } from "../types/index.js";
2
+ import { type EphemeralActionInput } from "./ephemeral-action.js";
3
+ export interface LikePersonPostsInput extends EphemeralActionInput {
4
+ readonly numberOfArticles?: number | undefined;
5
+ readonly numberOfPosts?: number | undefined;
6
+ readonly maxAgeOfArticles?: number | undefined;
7
+ readonly maxAgeOfPosts?: number | undefined;
8
+ readonly shouldAddComment?: boolean | undefined;
9
+ readonly messageTemplate?: ActionSettings | undefined;
10
+ readonly skipIfNotLiked?: boolean | undefined;
11
+ }
12
+ export type LikePersonPostsOutput = EphemeralActionResult;
13
+ export declare function likePersonPosts(input: LikePersonPostsInput): Promise<LikePersonPostsOutput>;
14
+ //# sourceMappingURL=like-person-posts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"like-person-posts.d.ts","sourceRoot":"","sources":["../../src/operations/like-person-posts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,eAAe,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtD,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/C;AAED,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAE1D,wBAAsB,eAAe,CACnC,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,qBAAqB,CAAC,CAwBhC"}
@@ -0,0 +1,28 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { executeEphemeralAction, } from "./ephemeral-action.js";
4
+ export async function likePersonPosts(input) {
5
+ const actionSettings = {
6
+ skipIfNotLiked: input.skipIfNotLiked ?? true,
7
+ ...(input.numberOfArticles !== undefined && {
8
+ numberOfArticles: input.numberOfArticles,
9
+ }),
10
+ ...(input.numberOfPosts !== undefined && {
11
+ numberOfPosts: input.numberOfPosts,
12
+ }),
13
+ ...(input.maxAgeOfArticles !== undefined && {
14
+ maxAgeOfArticles: input.maxAgeOfArticles,
15
+ }),
16
+ ...(input.maxAgeOfPosts !== undefined && {
17
+ maxAgeOfPosts: input.maxAgeOfPosts,
18
+ }),
19
+ ...(input.shouldAddComment !== undefined && {
20
+ shouldAddComment: input.shouldAddComment,
21
+ }),
22
+ ...(input.messageTemplate !== undefined && {
23
+ messageTemplate: input.messageTemplate,
24
+ }),
25
+ };
26
+ return executeEphemeralAction("PersonPostsLiker", input, actionSettings);
27
+ }
28
+ //# sourceMappingURL=like-person-posts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"like-person-posts.js","sourceRoot":"","sources":["../../src/operations/like-person-posts.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EACL,sBAAsB,GAEvB,MAAM,uBAAuB,CAAC;AAc/B,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,KAA2B;IAE3B,MAAM,cAAc,GAAmB;QACrC,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,IAAI;QAC5C,GAAG,CAAC,KAAK,CAAC,gBAAgB,KAAK,SAAS,IAAI;YAC1C,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;SACzC,CAAC;QACF,GAAG,CAAC,KAAK,CAAC,aAAa,KAAK,SAAS,IAAI;YACvC,aAAa,EAAE,KAAK,CAAC,aAAa;SACnC,CAAC;QACF,GAAG,CAAC,KAAK,CAAC,gBAAgB,KAAK,SAAS,IAAI;YAC1C,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;SACzC,CAAC;QACF,GAAG,CAAC,KAAK,CAAC,aAAa,KAAK,SAAS,IAAI;YACvC,aAAa,EAAE,KAAK,CAAC,aAAa;SACnC,CAAC;QACF,GAAG,CAAC,KAAK,CAAC,gBAAgB,KAAK,SAAS,IAAI;YAC1C,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;SACzC,CAAC;QACF,GAAG,CAAC,KAAK,CAAC,eAAe,KAAK,SAAS,IAAI;YACzC,eAAe,EAAE,KAAK,CAAC,eAAe;SACvC,CAAC;KACH,CAAC;IAEF,OAAO,sBAAsB,CAAC,kBAAkB,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ActionSettings, EphemeralActionResult } from "../types/index.js";
2
+ import { type EphemeralActionInput } from "./ephemeral-action.js";
3
+ export interface MessagePersonInput extends EphemeralActionInput {
4
+ readonly messageTemplate: ActionSettings;
5
+ readonly subjectTemplate?: ActionSettings | undefined;
6
+ readonly rejectIfReplied?: boolean | undefined;
7
+ readonly rejectIfMessaged?: boolean | undefined;
8
+ }
9
+ export type MessagePersonOutput = EphemeralActionResult;
10
+ export declare function messagePerson(input: MessagePersonInput): Promise<MessagePersonOutput>;
11
+ //# sourceMappingURL=message-person.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-person.d.ts","sourceRoot":"","sources":["../../src/operations/message-person.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D,QAAQ,CAAC,eAAe,EAAE,cAAc,CAAC;IACzC,QAAQ,CAAC,eAAe,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtD,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjD;AAED,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAExD,wBAAsB,aAAa,CACjC,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CAe9B"}
@@ -0,0 +1,19 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { executeEphemeralAction, } from "./ephemeral-action.js";
4
+ export async function messagePerson(input) {
5
+ const actionSettings = {
6
+ messageTemplate: input.messageTemplate,
7
+ ...(input.subjectTemplate !== undefined && {
8
+ subjectTemplate: input.subjectTemplate,
9
+ }),
10
+ ...(input.rejectIfReplied !== undefined && {
11
+ rejectIfReplied: input.rejectIfReplied,
12
+ }),
13
+ ...(input.rejectIfMessaged !== undefined && {
14
+ rejectIfMessaged: input.rejectIfMessaged,
15
+ }),
16
+ };
17
+ return executeEphemeralAction("MessageToPerson", input, actionSettings);
18
+ }
19
+ //# sourceMappingURL=message-person.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-person.js","sourceRoot":"","sources":["../../src/operations/message-person.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EACL,sBAAsB,GAEvB,MAAM,uBAAuB,CAAC;AAW/B,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,KAAyB;IAEzB,MAAM,cAAc,GAAmB;QACrC,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,GAAG,CAAC,KAAK,CAAC,eAAe,KAAK,SAAS,IAAI;YACzC,eAAe,EAAE,KAAK,CAAC,eAAe;SACvC,CAAC;QACF,GAAG,CAAC,KAAK,CAAC,eAAe,KAAK,SAAS,IAAI;YACzC,eAAe,EAAE,KAAK,CAAC,eAAe;SACvC,CAAC;QACF,GAAG,CAAC,KAAK,CAAC,gBAAgB,KAAK,SAAS,IAAI;YAC1C,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;SACzC,CAAC;KACH,CAAC;IAEF,OAAO,sBAAsB,CAAC,iBAAiB,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;AAC1E,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { ConnectionOptions } from "./types.js";
2
+ /**
3
+ * Supported LinkedIn reaction types.
4
+ *
5
+ * Mapping follows the Voyager API names used by LinkedIn internally:
6
+ * - `LIKE` → Like (thumbs up)
7
+ * - `CELEBRATE` → Celebrate (clapping hands)
8
+ * - `SUPPORT` → Support (heart-in-hands)
9
+ * - `LOVE` → Love (heart)
10
+ * - `INSIGHTFUL` → Insightful (light bulb)
11
+ * - `FUNNY` → Funny (laughing face)
12
+ */
13
+ export type ReactionType = "like" | "celebrate" | "support" | "love" | "insightful" | "funny";
14
+ /** All valid reaction type values. */
15
+ export declare const REACTION_TYPES: readonly ReactionType[];
16
+ export interface ReactToPostInput extends ConnectionOptions {
17
+ /** LinkedIn post URL (any format accepted by the LinkedIn WebView). */
18
+ readonly postUrl: string;
19
+ /** Reaction type to apply (default: `"like"`). */
20
+ readonly reactionType?: ReactionType | undefined;
21
+ }
22
+ export interface ReactToPostOutput {
23
+ readonly success: true;
24
+ readonly postUrl: string;
25
+ readonly reactionType: ReactionType;
26
+ }
27
+ /**
28
+ * React to a LinkedIn post with a specified reaction type.
29
+ *
30
+ * Navigates to the post URL in the LinkedIn WebView, hovers over the
31
+ * reaction trigger to expand the reaction picker, and clicks the
32
+ * requested reaction button.
33
+ *
34
+ * @param input - Post URL, reaction type, and CDP connection parameters.
35
+ * @returns Confirmation of the reaction applied.
36
+ */
37
+ export declare function reactToPost(input: ReactToPostInput): Promise<ReactToPostOutput>;
38
+ //# sourceMappingURL=react-to-post.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-to-post.d.ts","sourceRoot":"","sources":["../../src/operations/react-to-post.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,WAAW,GACX,SAAS,GACT,MAAM,GACN,YAAY,GACZ,OAAO,CAAC;AAYZ,sCAAsC;AACtC,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAE/B,CAAC;AAEpB,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,kDAAkD;IAClD,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CAClD;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACrC;AAQD;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,iBAAiB,CAAC,CAkE5B"}
@@ -0,0 +1,82 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { CDPClient } from "../cdp/client.js";
4
+ import { discoverTargets } from "../cdp/discovery.js";
5
+ import { DEFAULT_CDP_PORT } from "../constants.js";
6
+ import { click, hover, waitForElement } from "../linkedin/dom-automation.js";
7
+ import { REACTION_CELEBRATE, REACTION_FUNNY, REACTION_INSIGHTFUL, REACTION_LIKE, REACTION_LOVE, REACTION_SUPPORT, REACTION_TRIGGER, REACTIONS_MENU, } from "../linkedin/selectors.js";
8
+ import { delay } from "../utils/delay.js";
9
+ /** Map from reaction type to its CSS selector in the reactions menu. */
10
+ const REACTION_SELECTORS = {
11
+ like: REACTION_LIKE,
12
+ celebrate: REACTION_CELEBRATE,
13
+ support: REACTION_SUPPORT,
14
+ love: REACTION_LOVE,
15
+ insightful: REACTION_INSIGHTFUL,
16
+ funny: REACTION_FUNNY,
17
+ };
18
+ /** All valid reaction type values. */
19
+ export const REACTION_TYPES = Object.keys(REACTION_SELECTORS);
20
+ /** Delay after hover to let the reactions menu render (ms). */
21
+ const REACTIONS_MENU_DELAY = 1_500;
22
+ /** Delay after clicking a reaction to let the UI settle (ms). */
23
+ const POST_REACTION_DELAY = 500;
24
+ /**
25
+ * React to a LinkedIn post with a specified reaction type.
26
+ *
27
+ * Navigates to the post URL in the LinkedIn WebView, hovers over the
28
+ * reaction trigger to expand the reaction picker, and clicks the
29
+ * requested reaction button.
30
+ *
31
+ * @param input - Post URL, reaction type, and CDP connection parameters.
32
+ * @returns Confirmation of the reaction applied.
33
+ */
34
+ export async function reactToPost(input) {
35
+ const cdpPort = input.cdpPort ?? DEFAULT_CDP_PORT;
36
+ const cdpHost = input.cdpHost ?? "127.0.0.1";
37
+ const allowRemote = input.allowRemote ?? false;
38
+ const reactionType = input.reactionType ?? "like";
39
+ if (!REACTION_TYPES.includes(reactionType)) {
40
+ throw new Error(`Invalid reaction type "${reactionType}". ` +
41
+ `Valid types: ${REACTION_TYPES.join(", ")}`);
42
+ }
43
+ // Enforce loopback guard
44
+ if (!allowRemote && cdpHost !== "127.0.0.1" && cdpHost !== "localhost") {
45
+ throw new Error(`Non-loopback CDP host "${cdpHost}" requires --allow-remote. ` +
46
+ "This is a security measure to prevent remote code execution.");
47
+ }
48
+ const targets = await discoverTargets(cdpPort, cdpHost);
49
+ const linkedInTarget = targets.find((t) => t.type === "page" && t.url?.includes("linkedin.com"));
50
+ if (!linkedInTarget) {
51
+ throw new Error("No LinkedIn page found in LinkedHelper. " +
52
+ "Ensure LinkedHelper is running with an active LinkedIn session.");
53
+ }
54
+ const client = new CDPClient(cdpPort, { host: cdpHost, allowRemote });
55
+ await client.connect(linkedInTarget.id);
56
+ try {
57
+ // Navigate to the post URL
58
+ await client.navigate(input.postUrl);
59
+ // Wait for the reaction trigger button to appear
60
+ await waitForElement(client, REACTION_TRIGGER);
61
+ // Hover over the reaction trigger to expand the reactions menu
62
+ await hover(client, REACTION_TRIGGER);
63
+ await delay(REACTIONS_MENU_DELAY);
64
+ // Wait for the reactions menu to appear
65
+ await waitForElement(client, REACTIONS_MENU, { timeout: 5_000 });
66
+ // Click the specific reaction button
67
+ const reactionSelector = REACTION_SELECTORS[reactionType];
68
+ await waitForElement(client, reactionSelector, { timeout: 5_000 });
69
+ await click(client, reactionSelector);
70
+ // Let the UI settle
71
+ await delay(POST_REACTION_DELAY);
72
+ return {
73
+ success: true,
74
+ postUrl: input.postUrl,
75
+ reactionType,
76
+ };
77
+ }
78
+ finally {
79
+ client.disconnect();
80
+ }
81
+ }
82
+ //# sourceMappingURL=react-to-post.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-to-post.js","sourceRoot":"","sources":["../../src/operations/react-to-post.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO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Y,CAAC,CAAC;QAC1D,MAAM,cAAc,CAAC,MAAM,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACnE,MAAM,KAAK,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAEtC,oBAAoB;QACpB,MAAM,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAEjC,OAAO;YACL,OAAO,EAAE,IAAa;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,YAAY;SACb,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=react-to-post.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-to-post.test.d.ts","sourceRoot":"","sources":["../../src/operations/react-to-post.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,154 @@
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("../cdp/client.js", () => ({
5
+ CDPClient: vi.fn(),
6
+ }));
7
+ vi.mock("../cdp/discovery.js", () => ({
8
+ discoverTargets: vi.fn(),
9
+ }));
10
+ vi.mock("../linkedin/dom-automation.js", () => ({
11
+ waitForElement: vi.fn(),
12
+ hover: vi.fn(),
13
+ click: vi.fn(),
14
+ }));
15
+ vi.mock("../utils/delay.js", () => ({
16
+ delay: vi.fn().mockResolvedValue(undefined),
17
+ }));
18
+ import { CDPClient } from "../cdp/client.js";
19
+ import { discoverTargets } from "../cdp/discovery.js";
20
+ import { waitForElement, hover, click } from "../linkedin/dom-automation.js";
21
+ import { reactToPost, REACTION_TYPES } from "./react-to-post.js";
22
+ const mockClient = {
23
+ connect: vi.fn().mockResolvedValue(undefined),
24
+ navigate: vi.fn().mockResolvedValue(undefined),
25
+ disconnect: vi.fn(),
26
+ };
27
+ function setupMocks() {
28
+ vi.mocked(CDPClient).mockImplementation(function () {
29
+ return mockClient;
30
+ });
31
+ vi.mocked(discoverTargets).mockResolvedValue([
32
+ { id: "target-1", type: "page", title: "LinkedIn", url: "https://www.linkedin.com/feed/", description: "", devtoolsFrontendUrl: "" },
33
+ ]);
34
+ vi.mocked(waitForElement).mockResolvedValue(undefined);
35
+ vi.mocked(hover).mockResolvedValue(undefined);
36
+ vi.mocked(click).mockResolvedValue(undefined);
37
+ }
38
+ describe("reactToPost", () => {
39
+ beforeEach(() => {
40
+ vi.clearAllMocks();
41
+ });
42
+ afterEach(() => {
43
+ vi.restoreAllMocks();
44
+ });
45
+ it("throws on invalid reaction type", async () => {
46
+ await expect(reactToPost({
47
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
48
+ reactionType: "angry",
49
+ cdpPort: 9222,
50
+ })).rejects.toThrow('Invalid reaction type "angry"');
51
+ });
52
+ it("throws on non-loopback host without allowRemote", async () => {
53
+ await expect(reactToPost({
54
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
55
+ cdpPort: 9222,
56
+ cdpHost: "192.168.1.100",
57
+ })).rejects.toThrow("requires --allow-remote");
58
+ });
59
+ it("allows non-loopback host with allowRemote", async () => {
60
+ setupMocks();
61
+ const result = await reactToPost({
62
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
63
+ cdpPort: 9222,
64
+ cdpHost: "192.168.1.100",
65
+ allowRemote: true,
66
+ });
67
+ expect(result.success).toBe(true);
68
+ });
69
+ it("throws when no LinkedIn page is found", async () => {
70
+ vi.mocked(discoverTargets).mockResolvedValue([
71
+ { id: "target-1", type: "page", title: "Example", url: "https://example.com", description: "", devtoolsFrontendUrl: "" },
72
+ ]);
73
+ await expect(reactToPost({
74
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
75
+ cdpPort: 9222,
76
+ })).rejects.toThrow("No LinkedIn page found");
77
+ });
78
+ it("defaults reaction type to like", async () => {
79
+ setupMocks();
80
+ const result = await reactToPost({
81
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
82
+ cdpPort: 9222,
83
+ });
84
+ expect(result.reactionType).toBe("like");
85
+ });
86
+ it("returns success with provided reaction type", async () => {
87
+ setupMocks();
88
+ const result = await reactToPost({
89
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
90
+ reactionType: "celebrate",
91
+ cdpPort: 9222,
92
+ });
93
+ expect(result).toEqual({
94
+ success: true,
95
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
96
+ reactionType: "celebrate",
97
+ });
98
+ });
99
+ it("navigates to the post URL", async () => {
100
+ setupMocks();
101
+ await reactToPost({
102
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
103
+ cdpPort: 9222,
104
+ });
105
+ expect(mockClient.navigate).toHaveBeenCalledWith("https://www.linkedin.com/feed/update/urn:li:activity:123/");
106
+ });
107
+ it("hovers the reaction trigger to expand the menu", async () => {
108
+ setupMocks();
109
+ await reactToPost({
110
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
111
+ cdpPort: 9222,
112
+ });
113
+ expect(hover).toHaveBeenCalledWith(mockClient, "button.react-button__trigger");
114
+ });
115
+ it("clicks the correct reaction selector for each type", async () => {
116
+ setupMocks();
117
+ await reactToPost({
118
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
119
+ reactionType: "funny",
120
+ cdpPort: 9222,
121
+ });
122
+ expect(click).toHaveBeenCalledWith(mockClient, '.reactions-menu button[aria-label="React Funny"]');
123
+ });
124
+ it("disconnects the CDP client even when an error occurs", async () => {
125
+ setupMocks();
126
+ vi.mocked(waitForElement).mockRejectedValueOnce(new Error("timeout"));
127
+ await expect(reactToPost({
128
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
129
+ cdpPort: 9222,
130
+ })).rejects.toThrow("timeout");
131
+ expect(mockClient.disconnect).toHaveBeenCalled();
132
+ });
133
+ it("uses default CDP port when not specified", async () => {
134
+ setupMocks();
135
+ await reactToPost({
136
+ postUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123/",
137
+ cdpPort: 35000,
138
+ });
139
+ expect(discoverTargets).toHaveBeenCalledWith(35000, "127.0.0.1");
140
+ });
141
+ });
142
+ describe("REACTION_TYPES", () => {
143
+ it("contains all six reaction types", () => {
144
+ expect(REACTION_TYPES).toEqual([
145
+ "like",
146
+ "celebrate",
147
+ "support",
148
+ "love",
149
+ "insightful",
150
+ "funny",
151
+ ]);
152
+ });
153
+ });
154
+ //# sourceMappingURL=react-to-post.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-to-post.test.js","sourceRoot":"","sources":["../../src/operations/react-to-post.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,kBAAkB,EAAE,GAAG,EAAE,CAAC,CAAC;IACjC,SAAS,EAAE,EAAE,CAAC,EAAE,EAAE;CACnB,CAAC,CAAC,CAAC;AAEJ,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,+BAA+B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9C,cAAc,EAAE,EAAE,CAAC,EAAE,EAAE;IACvB,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;IACd,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE;CACf,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,CAAC;IAClC,KAAK,EAAE,EAAE,CAAC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AAEH,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC;YAC7B,MAAM;YACN,WAAW;YACX,SAAS;YACT,MAAM;YACN,YAAY;YACZ,OAAO;SACR,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { EphemeralActionResult } from "../types/index.js";
2
+ import { type EphemeralActionInput } from "./ephemeral-action.js";
3
+ export type RemoveConnectionInput = EphemeralActionInput;
4
+ export type RemoveConnectionOutput = EphemeralActionResult;
5
+ export declare function removeConnection(input: RemoveConnectionInput): Promise<RemoveConnectionOutput>;
6
+ //# sourceMappingURL=remove-connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-connection.d.ts","sourceRoot":"","sources":["../../src/operations/remove-connection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAEzD,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,CAAC;AAE3D,wBAAsB,gBAAgB,CACpC,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC,sBAAsB,CAAC,CAEjC"}
@@ -0,0 +1,7 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { executeEphemeralAction, } from "./ephemeral-action.js";
4
+ export async function removeConnection(input) {
5
+ return executeEphemeralAction("RemoveFromFirstConnection", input);
6
+ }
7
+ //# sourceMappingURL=remove-connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-connection.js","sourceRoot":"","sources":["../../src/operations/remove-connection.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EACL,sBAAsB,GAEvB,MAAM,uBAAuB,CAAC;AAM/B,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,KAA4B;IAE5B,OAAO,sBAAsB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;AACpE,CAAC"}
@@ -0,0 +1,143 @@
1
+ import type { SearchPostResult } from "../types/search-posts.js";
2
+ import type { ConnectionOptions } from "./types.js";
3
+ /**
4
+ * Input for the search-posts operation.
5
+ */
6
+ export interface SearchPostsInput extends ConnectionOptions {
7
+ /** Search query (keywords or hashtag, e.g. `"AI agents"` or `"#AIAgents"`). */
8
+ readonly query: string;
9
+ /** Number of results per page (default: 10). */
10
+ readonly count?: number | undefined;
11
+ /** Pagination offset (default: 0). */
12
+ readonly start?: number | undefined;
13
+ }
14
+ /**
15
+ * Output from the search-posts operation.
16
+ */
17
+ export interface SearchPostsOutput {
18
+ /** The search query that was executed. */
19
+ readonly query: string;
20
+ /** List of matching posts. */
21
+ readonly posts: SearchPostResult[];
22
+ /** Pagination metadata. */
23
+ readonly paging: {
24
+ readonly start: number;
25
+ readonly count: number;
26
+ readonly total: number;
27
+ };
28
+ }
29
+ /** Top-level search clusters response. */
30
+ interface VoyagerSearchResponse {
31
+ data?: {
32
+ elements?: VoyagerSearchCluster[];
33
+ paging?: VoyagerPaging;
34
+ };
35
+ elements?: VoyagerSearchCluster[];
36
+ paging?: VoyagerPaging;
37
+ included?: VoyagerIncludedEntity[];
38
+ }
39
+ interface VoyagerSearchCluster {
40
+ items?: VoyagerSearchItem[];
41
+ }
42
+ interface VoyagerSearchItem {
43
+ item?: {
44
+ entityResult?: VoyagerEntityResult;
45
+ };
46
+ }
47
+ interface VoyagerEntityResult {
48
+ /** URN of the search result entity (e.g. `urn:li:activity:...`). */
49
+ entityUrn?: string;
50
+ /** Reference to the underlying update entity in `included`. */
51
+ "*entity"?: string;
52
+ title?: VoyagerTextWrapper;
53
+ primarySubtitle?: VoyagerTextWrapper;
54
+ summary?: VoyagerTextWrapper;
55
+ insightsResolutionResults?: VoyagerInsight[];
56
+ socialProofText?: string;
57
+ secondarySubtitle?: VoyagerTextWrapper;
58
+ }
59
+ interface VoyagerTextWrapper {
60
+ text?: string;
61
+ }
62
+ interface VoyagerInsight {
63
+ simpleInsight?: {
64
+ title?: VoyagerTextWrapper;
65
+ };
66
+ }
67
+ interface VoyagerIncludedEntity {
68
+ $type?: string;
69
+ entityUrn?: string;
70
+ /** Reference to the actor profile. */
71
+ "*actor"?: string;
72
+ actor?: VoyagerActor;
73
+ commentary?: VoyagerTextWrapper;
74
+ socialDetail?: VoyagerSocialDetail | string;
75
+ numLikes?: number;
76
+ numComments?: number;
77
+ firstName?: string;
78
+ lastName?: string;
79
+ publicIdentifier?: string;
80
+ headline?: VoyagerTextWrapper | string;
81
+ occupation?: string;
82
+ }
83
+ interface VoyagerActor {
84
+ name?: VoyagerTextWrapper;
85
+ description?: VoyagerTextWrapper;
86
+ navigationUrl?: string;
87
+ }
88
+ interface VoyagerSocialDetail {
89
+ totalSocialActivityCounts?: {
90
+ numLikes?: number;
91
+ numComments?: number;
92
+ };
93
+ }
94
+ interface VoyagerPaging {
95
+ start?: number;
96
+ count?: number;
97
+ total?: number;
98
+ }
99
+ /**
100
+ * Extract a LinkedIn public identifier from a navigation URL.
101
+ *
102
+ * Handles patterns like:
103
+ * - `https://www.linkedin.com/in/johndoe`
104
+ * - `https://www.linkedin.com/in/johndoe?miniProfileUrn=...`
105
+ */
106
+ export declare function extractPublicId(url: string | undefined): string | null;
107
+ /**
108
+ * Extract the activity URN from the entity URN.
109
+ *
110
+ * The search API may return URNs in several formats:
111
+ * - `urn:li:fs_updateV2:(urn:li:activity:1234,...)` → extract `urn:li:activity:1234`
112
+ * - `urn:li:activity:1234` → use directly
113
+ * - `urn:li:ugcPost:1234` → use directly
114
+ */
115
+ export declare function extractActivityUrn(urn: string | undefined): string | null;
116
+ /**
117
+ * Parse the Voyager content search response into normalised search results.
118
+ *
119
+ * LinkedIn's search API returns results in a "clusters" structure with
120
+ * entities referenced via URN in the `included` array. This parser
121
+ * handles both inline and reference-based entity resolution.
122
+ */
123
+ export declare function parseSearchResponse(raw: VoyagerSearchResponse): {
124
+ posts: SearchPostResult[];
125
+ paging: {
126
+ start: number;
127
+ count: number;
128
+ total: number;
129
+ };
130
+ };
131
+ /**
132
+ * Search LinkedIn for posts matching a keyword query.
133
+ *
134
+ * Connects to the LinkedIn webview in LinkedHelper and calls the
135
+ * Voyager search API with content-type filtering to find posts.
136
+ * Supports keyword search, hashtag search, and cursor-based pagination.
137
+ *
138
+ * @param input - Search query, pagination parameters, and CDP connection options.
139
+ * @returns List of matching posts with pagination metadata.
140
+ */
141
+ export declare function searchPosts(input: SearchPostsInput): Promise<SearchPostsOutput>;
142
+ export {};
143
+ //# sourceMappingURL=search-posts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-posts.d.ts","sourceRoot":"","sources":["../../src/operations/search-posts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAKjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,sCAAsC;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IACnC,2BAA2B;IAC3B,QAAQ,CAAC,M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