@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.
- package/dist/cdp/app-discovery.d.ts +57 -0
- package/dist/cdp/app-discovery.d.ts.map +1 -1
- package/dist/cdp/app-discovery.js +90 -7
- package/dist/cdp/app-discovery.js.map +1 -1
- package/dist/cdp/app-discovery.test.js +180 -9
- package/dist/cdp/app-discovery.test.js.map +1 -1
- package/dist/cdp/client.d.ts +8 -1
- package/dist/cdp/client.d.ts.map +1 -1
- package/dist/cdp/client.js +8 -1
- package/dist/cdp/client.js.map +1 -1
- package/dist/cdp/discovery.d.ts.map +1 -1
- package/dist/cdp/discovery.js +5 -1
- package/dist/cdp/discovery.js.map +1 -1
- package/dist/cdp/discovery.test.js +7 -0
- package/dist/cdp/discovery.test.js.map +1 -1
- package/dist/cdp/index.d.ts +1 -1
- package/dist/cdp/index.d.ts.map +1 -1
- package/dist/cdp/index.js +1 -1
- package/dist/cdp/index.js.map +1 -1
- package/dist/cdp/instance-discovery.d.ts.map +1 -1
- package/dist/cdp/instance-discovery.js +25 -10
- package/dist/cdp/instance-discovery.js.map +1 -1
- package/dist/cdp/instance-discovery.test.js +17 -0
- package/dist/cdp/instance-discovery.test.js.map +1 -1
- package/dist/cdp/testing/launch-chromium.d.ts +1 -1
- package/dist/cdp/testing/launch-chromium.js +2 -2
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +3 -0
- package/dist/db/client.js.map +1 -1
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +1 -1
- package/dist/db/index.js.map +1 -1
- package/dist/db/repositories/action-budget.d.ts +29 -0
- package/dist/db/repositories/action-budget.d.ts.map +1 -0
- package/dist/db/repositories/action-budget.js +100 -0
- package/dist/db/repositories/action-budget.js.map +1 -0
- package/dist/db/repositories/action-budget.test.d.ts +2 -0
- package/dist/db/repositories/action-budget.test.d.ts.map +1 -0
- package/dist/db/repositories/action-budget.test.js +181 -0
- package/dist/db/repositories/action-budget.test.js.map +1 -0
- package/dist/db/repositories/campaign-hard-delete.integration.test.d.ts +2 -0
- package/dist/db/repositories/campaign-hard-delete.integration.test.d.ts.map +1 -0
- package/dist/db/repositories/campaign-hard-delete.integration.test.js +78 -0
- package/dist/db/repositories/campaign-hard-delete.integration.test.js.map +1 -0
- package/dist/db/repositories/campaign.d.ts +14 -0
- package/dist/db/repositories/campaign.d.ts.map +1 -1
- package/dist/db/repositories/campaign.js +125 -0
- package/dist/db/repositories/campaign.js.map +1 -1
- package/dist/db/repositories/collection-list.integration.test.js +6 -4
- package/dist/db/repositories/collection-list.integration.test.js.map +1 -1
- package/dist/db/repositories/index.d.ts +1 -0
- package/dist/db/repositories/index.d.ts.map +1 -1
- package/dist/db/repositories/index.js +1 -0
- package/dist/db/repositories/index.js.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -7
- package/dist/index.js.map +1 -1
- package/dist/linkedin/__tests__/dom-automation.integration.test.d.ts +2 -0
- package/dist/linkedin/__tests__/dom-automation.integration.test.d.ts.map +1 -0
- package/dist/linkedin/__tests__/dom-automation.integration.test.js +160 -0
- package/dist/linkedin/__tests__/dom-automation.integration.test.js.map +1 -0
- package/dist/linkedin/dom-automation-retry.test.d.ts +2 -0
- package/dist/linkedin/dom-automation-retry.test.d.ts.map +1 -0
- package/dist/linkedin/dom-automation-retry.test.js +51 -0
- package/dist/linkedin/dom-automation-retry.test.js.map +1 -0
- package/dist/linkedin/dom-automation.d.ts +224 -0
- package/dist/linkedin/dom-automation.d.ts.map +1 -0
- package/dist/linkedin/dom-automation.js +614 -0
- package/dist/linkedin/dom-automation.js.map +1 -0
- package/dist/linkedin/humanized-mouse.d.ts +69 -0
- package/dist/linkedin/humanized-mouse.d.ts.map +1 -0
- package/dist/linkedin/humanized-mouse.js +109 -0
- package/dist/linkedin/humanized-mouse.js.map +1 -0
- package/dist/linkedin/index.d.ts +4 -0
- package/dist/linkedin/index.d.ts.map +1 -0
- package/dist/linkedin/index.js +6 -0
- package/dist/linkedin/index.js.map +1 -0
- package/dist/linkedin/selectors.d.ts +67 -0
- package/dist/linkedin/selectors.d.ts.map +1 -0
- package/dist/linkedin/selectors.js +74 -0
- package/dist/linkedin/selectors.js.map +1 -0
- package/dist/operations/add-people-to-collection.d.ts +1 -1
- package/dist/operations/add-people-to-collection.d.ts.map +1 -1
- package/dist/operations/add-people-to-collection.js +3 -6
- package/dist/operations/add-people-to-collection.js.map +1 -1
- package/dist/operations/build-linkedin-url.test.d.ts +2 -0
- package/dist/operations/build-linkedin-url.test.d.ts.map +1 -0
- package/dist/operations/build-linkedin-url.test.js +158 -0
- package/dist/operations/build-linkedin-url.test.js.map +1 -0
- package/dist/operations/campaign-add-action.d.ts +1 -1
- package/dist/operations/campaign-add-action.d.ts.map +1 -1
- package/dist/operations/campaign-add-action.js +3 -6
- package/dist/operations/campaign-add-action.js.map +1 -1
- package/dist/operations/campaign-create.d.ts +1 -1
- package/dist/operations/campaign-create.d.ts.map +1 -1
- package/dist/operations/campaign-create.js +3 -6
- package/dist/operations/campaign-create.js.map +1 -1
- package/dist/operations/campaign-delete.d.ts +7 -3
- package/dist/operations/campaign-delete.d.ts.map +1 -1
- package/dist/operations/campaign-delete.js +12 -8
- package/dist/operations/campaign-delete.js.map +1 -1
- package/dist/operations/campaign-delete.test.js +41 -1
- package/dist/operations/campaign-delete.test.js.map +1 -1
- package/dist/operations/campaign-erase.d.ts +19 -0
- package/dist/operations/campaign-erase.d.ts.map +1 -0
- package/dist/operations/campaign-erase.js +19 -0
- package/dist/operations/campaign-erase.js.map +1 -0
- package/dist/operations/campaign-erase.test.d.ts +2 -0
- package/dist/operations/campaign-erase.test.d.ts.map +1 -0
- package/dist/operations/campaign-erase.test.js +101 -0
- package/dist/operations/campaign-erase.test.js.map +1 -0
- package/dist/operations/campaign-exclude-add.d.ts +1 -1
- package/dist/operations/campaign-exclude-add.d.ts.map +1 -1
- package/dist/operations/campaign-exclude-add.js +3 -6
- package/dist/operations/campaign-exclude-add.js.map +1 -1
- package/dist/operations/campaign-exclude-list.d.ts +1 -1
- package/dist/operations/campaign-exclude-list.d.ts.map +1 -1
- package/dist/operations/campaign-exclude-list.js +3 -6
- package/dist/operations/campaign-exclude-list.js.map +1 -1
- package/dist/operations/campaign-exclude-remove.d.ts +1 -1
- package/dist/operations/campaign-exclude-remove.d.ts.map +1 -1
- package/dist/operations/campaign-exclude-remove.js +3 -6
- package/dist/operations/campaign-exclude-remove.js.map +1 -1
- package/dist/operations/campaign-export.d.ts +1 -1
- package/dist/operations/campaign-export.d.ts.map +1 -1
- package/dist/operations/campaign-export.js +3 -6
- package/dist/operations/campaign-export.js.map +1 -1
- package/dist/operations/campaign-get.d.ts +1 -1
- package/dist/operations/campaign-get.d.ts.map +1 -1
- package/dist/operations/campaign-get.js +3 -6
- package/dist/operations/campaign-get.js.map +1 -1
- package/dist/operations/campaign-list-people.d.ts +1 -1
- package/dist/operations/campaign-list-people.d.ts.map +1 -1
- package/dist/operations/campaign-list-people.js +3 -6
- package/dist/operations/campaign-list-people.js.map +1 -1
- package/dist/operations/campaign-list.d.ts +1 -1
- package/dist/operations/campaign-list.d.ts.map +1 -1
- package/dist/operations/campaign-list.js +3 -6
- package/dist/operations/campaign-list.js.map +1 -1
- package/dist/operations/campaign-move-next.d.ts +1 -1
- package/dist/operations/campaign-move-next.d.ts.map +1 -1
- package/dist/operations/campaign-move-next.js +3 -6
- package/dist/operations/campaign-move-next.js.map +1 -1
- package/dist/operations/campaign-remove-action.d.ts +1 -1
- package/dist/operations/campaign-remove-action.d.ts.map +1 -1
- package/dist/operations/campaign-remove-action.js +3 -6
- package/dist/operations/campaign-remove-action.js.map +1 -1
- package/dist/operations/campaign-remove-people.d.ts +1 -1
- package/dist/operations/campaign-remove-people.d.ts.map +1 -1
- package/dist/operations/campaign-remove-people.js +3 -6
- package/dist/operations/campaign-remove-people.js.map +1 -1
- package/dist/operations/campaign-reorder-actions.d.ts +1 -1
- package/dist/operations/campaign-reorder-actions.d.ts.map +1 -1
- package/dist/operations/campaign-reorder-actions.js +3 -6
- package/dist/operations/campaign-reorder-actions.js.map +1 -1
- package/dist/operations/campaign-retry.d.ts +1 -1
- package/dist/operations/campaign-retry.d.ts.map +1 -1
- package/dist/operations/campaign-retry.js +3 -6
- package/dist/operations/campaign-retry.js.map +1 -1
- package/dist/operations/campaign-start.d.ts +1 -1
- package/dist/operations/campaign-start.d.ts.map +1 -1
- package/dist/operations/campaign-start.js +3 -6
- package/dist/operations/campaign-start.js.map +1 -1
- package/dist/operations/campaign-statistics.d.ts +1 -1
- package/dist/operations/campaign-statistics.d.ts.map +1 -1
- package/dist/operations/campaign-statistics.js +3 -6
- package/dist/operations/campaign-statistics.js.map +1 -1
- package/dist/operations/campaign-status.d.ts +1 -1
- package/dist/operations/campaign-status.d.ts.map +1 -1
- package/dist/operations/campaign-status.js +3 -6
- package/dist/operations/campaign-status.js.map +1 -1
- package/dist/operations/campaign-stop.d.ts +1 -1
- package/dist/operations/campaign-stop.d.ts.map +1 -1
- package/dist/operations/campaign-stop.js +3 -6
- package/dist/operations/campaign-stop.js.map +1 -1
- package/dist/operations/campaign-update-action.d.ts +1 -1
- package/dist/operations/campaign-update-action.d.ts.map +1 -1
- package/dist/operations/campaign-update-action.js +3 -6
- package/dist/operations/campaign-update-action.js.map +1 -1
- package/dist/operations/campaign-update.d.ts +1 -1
- package/dist/operations/campaign-update.d.ts.map +1 -1
- package/dist/operations/campaign-update.js +3 -6
- package/dist/operations/campaign-update.js.map +1 -1
- package/dist/operations/check-replies.d.ts +3 -1
- package/dist/operations/check-replies.d.ts.map +1 -1
- package/dist/operations/check-replies.js +132 -17
- package/dist/operations/check-replies.js.map +1 -1
- package/dist/operations/check-replies.test.js +177 -17
- package/dist/operations/check-replies.test.js.map +1 -1
- package/dist/operations/collect-people.d.ts +1 -1
- package/dist/operations/collect-people.d.ts.map +1 -1
- package/dist/operations/collect-people.js +3 -6
- package/dist/operations/collect-people.js.map +1 -1
- package/dist/operations/comment-on-post.d.ts +37 -0
- package/dist/operations/comment-on-post.d.ts.map +1 -0
- package/dist/operations/comment-on-post.js +104 -0
- package/dist/operations/comment-on-post.js.map +1 -0
- package/dist/operations/comment-on-post.test.d.ts +2 -0
- package/dist/operations/comment-on-post.test.d.ts.map +1 -0
- package/dist/operations/comment-on-post.test.js +242 -0
- package/dist/operations/comment-on-post.test.js.map +1 -0
- package/dist/operations/create-collection.d.ts +1 -1
- package/dist/operations/create-collection.d.ts.map +1 -1
- package/dist/operations/create-collection.js +3 -6
- package/dist/operations/create-collection.js.map +1 -1
- package/dist/operations/delete-collection.d.ts +1 -1
- package/dist/operations/delete-collection.d.ts.map +1 -1
- package/dist/operations/delete-collection.js +3 -6
- package/dist/operations/delete-collection.js.map +1 -1
- package/dist/operations/dismiss-errors.d.ts +25 -0
- package/dist/operations/dismiss-errors.d.ts.map +1 -0
- package/dist/operations/dismiss-errors.js +74 -0
- package/dist/operations/dismiss-errors.js.map +1 -0
- package/dist/operations/dismiss-errors.test.d.ts +2 -0
- package/dist/operations/dismiss-errors.test.d.ts.map +1 -0
- package/dist/operations/dismiss-errors.test.js +183 -0
- package/dist/operations/dismiss-errors.test.js.map +1 -0
- package/dist/operations/endorse-skills.d.ts +10 -0
- package/dist/operations/endorse-skills.d.ts.map +1 -0
- package/dist/operations/endorse-skills.js +12 -0
- package/dist/operations/endorse-skills.js.map +1 -0
- package/dist/operations/endorse-skills.test.d.ts +2 -0
- package/dist/operations/endorse-skills.test.d.ts.map +1 -0
- package/dist/operations/endorse-skills.test.js +70 -0
- package/dist/operations/endorse-skills.test.js.map +1 -0
- package/dist/operations/enrich-profile.d.ts +18 -0
- package/dist/operations/enrich-profile.d.ts.map +1 -0
- package/dist/operations/enrich-profile.js +15 -0
- package/dist/operations/enrich-profile.js.map +1 -0
- package/dist/operations/enrich-profile.test.d.ts +2 -0
- package/dist/operations/enrich-profile.test.d.ts.map +1 -0
- package/dist/operations/enrich-profile.test.js +73 -0
- package/dist/operations/enrich-profile.test.js.map +1 -0
- package/dist/operations/ephemeral-action.d.ts +22 -0
- package/dist/operations/ephemeral-action.d.ts.map +1 -0
- package/dist/operations/ephemeral-action.js +28 -0
- package/dist/operations/ephemeral-action.js.map +1 -0
- package/dist/operations/ephemeral-action.test.d.ts +2 -0
- package/dist/operations/ephemeral-action.test.d.ts.map +1 -0
- package/dist/operations/ephemeral-action.test.js +140 -0
- package/dist/operations/ephemeral-action.test.js.map +1 -0
- package/dist/operations/follow-person.d.ts +9 -0
- package/dist/operations/follow-person.d.ts.map +1 -0
- package/dist/operations/follow-person.js +11 -0
- package/dist/operations/follow-person.js.map +1 -0
- package/dist/operations/follow-person.test.d.ts +2 -0
- package/dist/operations/follow-person.test.d.ts.map +1 -0
- package/dist/operations/follow-person.test.js +57 -0
- package/dist/operations/follow-person.test.js.map +1 -0
- package/dist/operations/get-action-budget.d.ts +6 -0
- package/dist/operations/get-action-budget.d.ts.map +1 -0
- package/dist/operations/get-action-budget.js +19 -0
- package/dist/operations/get-action-budget.js.map +1 -0
- package/dist/operations/get-action-budget.test.d.ts +2 -0
- package/dist/operations/get-action-budget.test.d.ts.map +1 -0
- package/dist/operations/get-action-budget.test.js +79 -0
- package/dist/operations/get-action-budget.test.js.map +1 -0
- package/dist/operations/get-errors.d.ts +14 -4
- package/dist/operations/get-errors.d.ts.map +1 -1
- package/dist/operations/get-errors.js +72 -13
- package/dist/operations/get-errors.js.map +1 -1
- package/dist/operations/get-errors.test.js +108 -43
- package/dist/operations/get-errors.test.js.map +1 -1
- package/dist/operations/get-feed.d.ts +112 -0
- package/dist/operations/get-feed.d.ts.map +1 -0
- package/dist/operations/get-feed.js +467 -0
- package/dist/operations/get-feed.js.map +1 -0
- package/dist/operations/get-feed.test.d.ts +2 -0
- package/dist/operations/get-feed.test.d.ts.map +1 -0
- package/dist/operations/get-feed.test.js +502 -0
- package/dist/operations/get-feed.test.js.map +1 -0
- package/dist/operations/get-post-engagers.d.ts +43 -0
- package/dist/operations/get-post-engagers.d.ts.map +1 -0
- package/dist/operations/get-post-engagers.js +328 -0
- package/dist/operations/get-post-engagers.js.map +1 -0
- package/dist/operations/get-post-engagers.test.d.ts +2 -0
- package/dist/operations/get-post-engagers.test.d.ts.map +1 -0
- package/dist/operations/get-post-engagers.test.js +297 -0
- package/dist/operations/get-post-engagers.test.js.map +1 -0
- package/dist/operations/get-post-stats.d.ts +43 -0
- package/dist/operations/get-post-stats.d.ts.map +1 -0
- package/dist/operations/get-post-stats.js +164 -0
- package/dist/operations/get-post-stats.js.map +1 -0
- package/dist/operations/get-post-stats.test.d.ts +2 -0
- package/dist/operations/get-post-stats.test.d.ts.map +1 -0
- package/dist/operations/get-post-stats.test.js +169 -0
- package/dist/operations/get-post-stats.test.js.map +1 -0
- package/dist/operations/get-post.d.ts +42 -0
- package/dist/operations/get-post.d.ts.map +1 -0
- package/dist/operations/get-post.js +416 -0
- package/dist/operations/get-post.js.map +1 -0
- package/dist/operations/get-post.test.d.ts +2 -0
- package/dist/operations/get-post.test.d.ts.map +1 -0
- package/dist/operations/get-post.test.js +272 -0
- package/dist/operations/get-post.test.js.map +1 -0
- package/dist/operations/get-profile-activity.d.ts +50 -0
- package/dist/operations/get-profile-activity.d.ts.map +1 -0
- package/dist/operations/get-profile-activity.js +381 -0
- package/dist/operations/get-profile-activity.js.map +1 -0
- package/dist/operations/get-profile-activity.test.d.ts +2 -0
- package/dist/operations/get-profile-activity.test.d.ts.map +1 -0
- package/dist/operations/get-profile-activity.test.js +324 -0
- package/dist/operations/get-profile-activity.test.js.map +1 -0
- package/dist/operations/get-throttle-status.d.ts +6 -0
- package/dist/operations/get-throttle-status.d.ts.map +1 -0
- package/dist/operations/get-throttle-status.js +24 -0
- package/dist/operations/get-throttle-status.js.map +1 -0
- package/dist/operations/get-throttle-status.test.d.ts +2 -0
- package/dist/operations/get-throttle-status.test.d.ts.map +1 -0
- package/dist/operations/get-throttle-status.test.js +62 -0
- package/dist/operations/get-throttle-status.test.js.map +1 -0
- package/dist/operations/import-people-from-collection.d.ts +1 -1
- package/dist/operations/import-people-from-collection.d.ts.map +1 -1
- package/dist/operations/import-people-from-collection.js +3 -6
- package/dist/operations/import-people-from-collection.js.map +1 -1
- package/dist/operations/import-people-from-urls.d.ts +1 -1
- package/dist/operations/import-people-from-urls.d.ts.map +1 -1
- package/dist/operations/import-people-from-urls.js +3 -6
- package/dist/operations/import-people-from-urls.js.map +1 -1
- package/dist/operations/index.d.ts +23 -1
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +33 -0
- package/dist/operations/index.js.map +1 -1
- package/dist/operations/like-person-posts.d.ts +14 -0
- package/dist/operations/like-person-posts.d.ts.map +1 -0
- package/dist/operations/like-person-posts.js +28 -0
- package/dist/operations/like-person-posts.js.map +1 -0
- package/dist/operations/like-person-posts.test.d.ts +2 -0
- package/dist/operations/like-person-posts.test.d.ts.map +1 -0
- package/dist/operations/like-person-posts.test.js +103 -0
- package/dist/operations/like-person-posts.test.js.map +1 -0
- package/dist/operations/list-collections.d.ts +1 -1
- package/dist/operations/list-collections.d.ts.map +1 -1
- package/dist/operations/list-collections.js +3 -6
- package/dist/operations/list-collections.js.map +1 -1
- package/dist/operations/message-person.d.ts +11 -0
- package/dist/operations/message-person.d.ts.map +1 -0
- package/dist/operations/message-person.js +19 -0
- package/dist/operations/message-person.js.map +1 -0
- package/dist/operations/message-person.test.d.ts +2 -0
- package/dist/operations/message-person.test.d.ts.map +1 -0
- package/dist/operations/message-person.test.js +108 -0
- package/dist/operations/message-person.test.js.map +1 -0
- package/dist/operations/navigate-away.d.ts +14 -0
- package/dist/operations/navigate-away.d.ts.map +1 -0
- package/dist/operations/navigate-away.js +24 -0
- package/dist/operations/navigate-away.js.map +1 -0
- package/dist/operations/navigate-away.test.d.ts +2 -0
- package/dist/operations/navigate-away.test.d.ts.map +1 -0
- package/dist/operations/navigate-away.test.js +51 -0
- package/dist/operations/navigate-away.test.js.map +1 -0
- package/dist/operations/query-messages.d.ts +1 -1
- package/dist/operations/query-messages.d.ts.map +1 -1
- package/dist/operations/query-messages.js +3 -6
- package/dist/operations/query-messages.js.map +1 -1
- package/dist/operations/react-to-post.d.ts +41 -0
- package/dist/operations/react-to-post.d.ts.map +1 -0
- package/dist/operations/react-to-post.js +80 -0
- package/dist/operations/react-to-post.js.map +1 -0
- package/dist/operations/react-to-post.test.d.ts +2 -0
- package/dist/operations/react-to-post.test.d.ts.map +1 -0
- package/dist/operations/react-to-post.test.js +157 -0
- package/dist/operations/react-to-post.test.js.map +1 -0
- package/dist/operations/remove-connection.d.ts +6 -0
- package/dist/operations/remove-connection.d.ts.map +1 -0
- package/dist/operations/remove-connection.js +7 -0
- package/dist/operations/remove-connection.js.map +1 -0
- package/dist/operations/remove-connection.test.d.ts +2 -0
- package/dist/operations/remove-connection.test.d.ts.map +1 -0
- package/dist/operations/remove-connection.test.js +45 -0
- package/dist/operations/remove-connection.test.js.map +1 -0
- package/dist/operations/remove-people-from-collection.d.ts +1 -1
- package/dist/operations/remove-people-from-collection.d.ts.map +1 -1
- package/dist/operations/remove-people-from-collection.js +3 -6
- package/dist/operations/remove-people-from-collection.js.map +1 -1
- package/dist/operations/resolve-linkedin-entity.d.ts.map +1 -1
- package/dist/operations/resolve-linkedin-entity.js +2 -2
- package/dist/operations/resolve-linkedin-entity.js.map +1 -1
- package/dist/operations/resolve-linkedin-entity.test.d.ts +2 -0
- package/dist/operations/resolve-linkedin-entity.test.d.ts.map +1 -0
- package/dist/operations/resolve-linkedin-entity.test.js +343 -0
- package/dist/operations/resolve-linkedin-entity.test.js.map +1 -0
- package/dist/operations/scrape-messaging-history.d.ts +2 -1
- package/dist/operations/scrape-messaging-history.d.ts.map +1 -1
- package/dist/operations/scrape-messaging-history.js +121 -18
- package/dist/operations/scrape-messaging-history.js.map +1 -1
- package/dist/operations/scrape-messaging-history.test.js +134 -12
- package/dist/operations/scrape-messaging-history.test.js.map +1 -1
- package/dist/operations/search-posts.d.ts +51 -0
- package/dist/operations/search-posts.d.ts.map +1 -0
- package/dist/operations/search-posts.js +419 -0
- package/dist/operations/search-posts.js.map +1 -0
- package/dist/operations/search-posts.test.d.ts +2 -0
- package/dist/operations/search-posts.test.d.ts.map +1 -0
- package/dist/operations/search-posts.test.js +300 -0
- package/dist/operations/search-posts.test.js.map +1 -0
- package/dist/operations/send-inmail.d.ts +11 -0
- package/dist/operations/send-inmail.d.ts.map +1 -0
- package/dist/operations/send-inmail.js +19 -0
- package/dist/operations/send-inmail.js.map +1 -0
- package/dist/operations/send-inmail.test.d.ts +2 -0
- package/dist/operations/send-inmail.test.d.ts.map +1 -0
- package/dist/operations/send-inmail.test.js +108 -0
- package/dist/operations/send-inmail.test.js.map +1 -0
- package/dist/operations/send-invite.d.ts +9 -0
- package/dist/operations/send-invite.d.ts.map +1 -0
- package/dist/operations/send-invite.js +14 -0
- package/dist/operations/send-invite.js.map +1 -0
- package/dist/operations/send-invite.test.d.ts +2 -0
- package/dist/operations/send-invite.test.d.ts.map +1 -0
- package/dist/operations/send-invite.test.js +59 -0
- package/dist/operations/send-invite.test.js.map +1 -0
- package/dist/operations/types.d.ts +24 -1
- package/dist/operations/types.d.ts.map +1 -1
- package/dist/operations/types.js +13 -1
- package/dist/operations/types.js.map +1 -1
- package/dist/operations/visit-profile.d.ts +14 -0
- package/dist/operations/visit-profile.d.ts.map +1 -0
- package/dist/operations/visit-profile.js +46 -0
- package/dist/operations/visit-profile.js.map +1 -0
- package/dist/operations/visit-profile.test.d.ts +2 -0
- package/dist/operations/visit-profile.test.d.ts.map +1 -0
- package/dist/operations/visit-profile.test.js +193 -0
- package/dist/operations/visit-profile.test.js.map +1 -0
- package/dist/services/account-resolution.d.ts +9 -4
- package/dist/services/account-resolution.d.ts.map +1 -1
- package/dist/services/account-resolution.js +60 -5
- package/dist/services/account-resolution.js.map +1 -1
- package/dist/services/app.d.ts +6 -2
- package/dist/services/app.d.ts.map +1 -1
- package/dist/services/app.js +18 -6
- package/dist/services/app.js.map +1 -1
- package/dist/services/app.test.js +41 -7
- package/dist/services/app.test.js.map +1 -1
- package/dist/services/campaign.d.ts +44 -2
- package/dist/services/campaign.d.ts.map +1 -1
- package/dist/services/campaign.js +124 -1
- package/dist/services/campaign.js.map +1 -1
- package/dist/services/collection.d.ts +5 -2
- package/dist/services/collection.d.ts.map +1 -1
- package/dist/services/collection.js +24 -5
- package/dist/services/collection.js.map +1 -1
- package/dist/services/collection.test.js +51 -9
- package/dist/services/collection.test.js.map +1 -1
- package/dist/services/ephemeral-campaign.d.ts +64 -0
- package/dist/services/ephemeral-campaign.d.ts.map +1 -0
- package/dist/services/ephemeral-campaign.js +210 -0
- package/dist/services/ephemeral-campaign.js.map +1 -0
- package/dist/services/ephemeral-campaign.test.d.ts +2 -0
- package/dist/services/ephemeral-campaign.test.d.ts.map +1 -0
- package/dist/services/ephemeral-campaign.test.js +333 -0
- package/dist/services/ephemeral-campaign.test.js.map +1 -0
- package/dist/services/errors.d.ts +12 -1
- package/dist/services/errors.d.ts.map +1 -1
- package/dist/services/errors.js +26 -3
- package/dist/services/errors.js.map +1 -1
- package/dist/services/index.d.ts +2 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +2 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/instance-context.d.ts +5 -1
- package/dist/services/instance-context.d.ts.map +1 -1
- package/dist/services/instance-context.js +87 -20
- package/dist/services/instance-context.js.map +1 -1
- package/dist/services/instance-context.test.js +82 -2
- package/dist/services/instance-context.test.js.map +1 -1
- package/dist/services/instance-lifecycle.d.ts.map +1 -1
- package/dist/services/instance-lifecycle.js +32 -1
- package/dist/services/instance-lifecycle.js.map +1 -1
- package/dist/services/instance-lifecycle.test.js +52 -1
- package/dist/services/instance-lifecycle.test.js.map +1 -1
- package/dist/services/instance.d.ts +43 -0
- package/dist/services/instance.d.ts.map +1 -1
- package/dist/services/instance.js +163 -1
- package/dist/services/instance.js.map +1 -1
- package/dist/services/instance.test.js +135 -0
- package/dist/services/instance.test.js.map +1 -1
- package/dist/services/launcher.d.ts +54 -3
- package/dist/services/launcher.d.ts.map +1 -1
- package/dist/services/launcher.js +223 -34
- package/dist/services/launcher.js.map +1 -1
- package/dist/services/launcher.test.js +133 -6
- package/dist/services/launcher.test.js.map +1 -1
- package/dist/services/status.d.ts +6 -2
- package/dist/services/status.d.ts.map +1 -1
- package/dist/services/status.js +67 -34
- package/dist/services/status.js.map +1 -1
- package/dist/services/status.test.js +9 -2
- package/dist/services/status.test.js.map +1 -1
- package/dist/testing/e2e-helpers.d.ts +23 -1
- package/dist/testing/e2e-helpers.d.ts.map +1 -1
- package/dist/testing/e2e-helpers.js +110 -5
- package/dist/testing/e2e-helpers.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/types/account.d.ts +1 -1
- package/dist/types/action-budget.d.ts +52 -0
- package/dist/types/action-budget.d.ts.map +1 -0
- package/dist/types/action-budget.js +4 -0
- package/dist/types/action-budget.js.map +1 -0
- package/dist/types/campaign.d.ts +24 -0
- package/dist/types/campaign.d.ts.map +1 -1
- package/dist/types/feed.d.ts +30 -0
- package/dist/types/feed.d.ts.map +1 -0
- package/dist/types/feed.js +4 -0
- package/dist/types/feed.js.map +1 -0
- package/dist/types/index.d.ts +6 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/post-analytics.d.ts +40 -0
- package/dist/types/post-analytics.d.ts.map +1 -0
- package/dist/types/post-analytics.js +4 -0
- package/dist/types/post-analytics.js.map +1 -0
- package/dist/types/post.d.ts +43 -0
- package/dist/types/post.d.ts.map +1 -0
- package/dist/types/post.js +4 -0
- package/dist/types/post.js.map +1 -0
- package/dist/types/ui-health.d.ts +16 -0
- package/dist/types/ui-health.d.ts.map +1 -1
- package/dist/utils/cdp-port.d.ts.map +1 -1
- package/dist/utils/cdp-port.js +3 -1
- package/dist/utils/cdp-port.js.map +1 -1
- package/dist/utils/cdp-port.test.js +1 -1
- package/dist/utils/cdp-port.test.js.map +1 -1
- package/dist/utils/delay.d.ts +79 -0
- package/dist/utils/delay.d.ts.map +1 -1
- package/dist/utils/delay.js +118 -0
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/delay.test.js +111 -1
- package/dist/utils/delay.test.js.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/session-pacer.d.ts +27 -0
- package/dist/utils/session-pacer.d.ts.map +1 -0
- package/dist/utils/session-pacer.js +55 -0
- package/dist/utils/session-pacer.js.map +1 -0
- package/dist/utils/session-pacer.test.d.ts +2 -0
- package/dist/utils/session-pacer.test.d.ts.map +1 -0
- package/dist/utils/session-pacer.test.js +111 -0
- package/dist/utils/session-pacer.test.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { InstanceService } from "../services/instance.js";
|
|
2
|
+
/**
|
|
3
|
+
* Humanized mouse interaction via LinkedHelper's VirtualMouse.
|
|
4
|
+
*
|
|
5
|
+
* Accesses LH's VirtualMouse through `@electron/remote` from the
|
|
6
|
+
* instance UI target. VirtualMouse provides Bezier-curve mouse paths
|
|
7
|
+
* with intentional overshoot, recorded human track replay, velocity
|
|
8
|
+
* variation, and proper press/release click timing — all dispatched
|
|
9
|
+
* to the LinkedIn WebView via CDP `Input.dispatchMouseEvent`.
|
|
10
|
+
*
|
|
11
|
+
* Call {@link initialize} after `InstanceService.connect()` to probe
|
|
12
|
+
* whether VirtualMouse is accessible. If not, all methods throw.
|
|
13
|
+
*/
|
|
14
|
+
export declare class HumanizedMouse {
|
|
15
|
+
private readonly instance;
|
|
16
|
+
private available;
|
|
17
|
+
constructor(instance: InstanceService);
|
|
18
|
+
/**
|
|
19
|
+
* Probe whether LH's VirtualMouse is accessible via `@electron/remote`.
|
|
20
|
+
*
|
|
21
|
+
* @returns `true` if VirtualMouse is available and methods can be called.
|
|
22
|
+
*/
|
|
23
|
+
initialize(): Promise<boolean>;
|
|
24
|
+
/** Whether LH's native VirtualMouse is available. */
|
|
25
|
+
get isAvailable(): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Move the cursor to the given coordinates along a humanized path.
|
|
28
|
+
*
|
|
29
|
+
* Uses Bezier curves with random cubic anchors (creating wrist-arc
|
|
30
|
+
* paths), intentional overshoot (40–91 % probability depending on
|
|
31
|
+
* distance), and variable velocity (fast start, slow finish).
|
|
32
|
+
* When recorded human tracks are available, replays a matching track
|
|
33
|
+
* rotated and scaled to fit the movement vector.
|
|
34
|
+
*/
|
|
35
|
+
move(x: number, y: number): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Move the cursor to the given coordinates and click.
|
|
38
|
+
*
|
|
39
|
+
* The cursor follows a humanized path to the target, then dispatches
|
|
40
|
+
* `mousePressed` → 100 ms delay → `mouseReleased` via CDP.
|
|
41
|
+
*/
|
|
42
|
+
click(x: number, y: number): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Move the cursor to the given coordinates and scroll vertically.
|
|
45
|
+
*
|
|
46
|
+
* Scrolling is emulated as incremental mouse-wheel strokes (150 px
|
|
47
|
+
* every 25 ms by default) to mimic a physical scroll wheel.
|
|
48
|
+
*
|
|
49
|
+
* @param deltaY - Pixels to scroll (positive = down, negative = up).
|
|
50
|
+
* @param x - Cursor X position for the scroll.
|
|
51
|
+
* @param y - Cursor Y position for the scroll.
|
|
52
|
+
*/
|
|
53
|
+
scrollY(deltaY: number, x: number, y: number): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Get the current VirtualMouse cursor position.
|
|
56
|
+
*/
|
|
57
|
+
position(): Promise<{
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Evaluate an expression on the VirtualMouse instance (awaited).
|
|
63
|
+
*
|
|
64
|
+
* The expression must reference the VirtualMouse instance as `vm`.
|
|
65
|
+
*/
|
|
66
|
+
private vmEval;
|
|
67
|
+
private ensureAvailable;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=humanized-mouse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanized-mouse.d.ts","sourceRoot":"","sources":["../../src/linkedin/humanized-mouse.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;;;;;;;;;GAWG;AACH,qBAAa,cAAc;IAGb,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,OAAO,CAAC,SAAS,CAAS;gBAEG,QAAQ,EAAE,eAAe;IAEtD;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAkBpC,qDAAqD;IACrD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;;;;;;OAQG;IACG,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C;;;;;OAKG;IACG,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD;;;;;;;;;OASG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMlE;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAYnD;;;;OAIG;YACW,MAAM;IAYpB,OAAO,CAAC,eAAe;CAOxB"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
/**
|
|
4
|
+
* Humanized mouse interaction via LinkedHelper's VirtualMouse.
|
|
5
|
+
*
|
|
6
|
+
* Accesses LH's VirtualMouse through `@electron/remote` from the
|
|
7
|
+
* instance UI target. VirtualMouse provides Bezier-curve mouse paths
|
|
8
|
+
* with intentional overshoot, recorded human track replay, velocity
|
|
9
|
+
* variation, and proper press/release click timing — all dispatched
|
|
10
|
+
* to the LinkedIn WebView via CDP `Input.dispatchMouseEvent`.
|
|
11
|
+
*
|
|
12
|
+
* Call {@link initialize} after `InstanceService.connect()` to probe
|
|
13
|
+
* whether VirtualMouse is accessible. If not, all methods throw.
|
|
14
|
+
*/
|
|
15
|
+
export class HumanizedMouse {
|
|
16
|
+
instance;
|
|
17
|
+
available = false;
|
|
18
|
+
constructor(instance) {
|
|
19
|
+
this.instance = instance;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Probe whether LH's VirtualMouse is accessible via `@electron/remote`.
|
|
23
|
+
*
|
|
24
|
+
* @returns `true` if VirtualMouse is available and methods can be called.
|
|
25
|
+
*/
|
|
26
|
+
async initialize() {
|
|
27
|
+
try {
|
|
28
|
+
this.available = await this.instance.evaluateUI(`(() => {
|
|
29
|
+
try {
|
|
30
|
+
const remote = require('@electron/remote');
|
|
31
|
+
const mw = remote.getGlobal('mainWindow');
|
|
32
|
+
return typeof mw?.contentWindow?.virtualMouse?.click === 'function';
|
|
33
|
+
} catch { return false; }
|
|
34
|
+
})()`, false);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
this.available = false;
|
|
38
|
+
}
|
|
39
|
+
return this.available;
|
|
40
|
+
}
|
|
41
|
+
/** Whether LH's native VirtualMouse is available. */
|
|
42
|
+
get isAvailable() {
|
|
43
|
+
return this.available;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Move the cursor to the given coordinates along a humanized path.
|
|
47
|
+
*
|
|
48
|
+
* Uses Bezier curves with random cubic anchors (creating wrist-arc
|
|
49
|
+
* paths), intentional overshoot (40–91 % probability depending on
|
|
50
|
+
* distance), and variable velocity (fast start, slow finish).
|
|
51
|
+
* When recorded human tracks are available, replays a matching track
|
|
52
|
+
* rotated and scaled to fit the movement vector.
|
|
53
|
+
*/
|
|
54
|
+
async move(x, y) {
|
|
55
|
+
await this.vmEval(`vm.move({ x: ${String(x)}, y: ${String(y)} })`);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Move the cursor to the given coordinates and click.
|
|
59
|
+
*
|
|
60
|
+
* The cursor follows a humanized path to the target, then dispatches
|
|
61
|
+
* `mousePressed` → 100 ms delay → `mouseReleased` via CDP.
|
|
62
|
+
*/
|
|
63
|
+
async click(x, y) {
|
|
64
|
+
await this.vmEval(`vm.click({ x: ${String(x)}, y: ${String(y)} })`);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Move the cursor to the given coordinates and scroll vertically.
|
|
68
|
+
*
|
|
69
|
+
* Scrolling is emulated as incremental mouse-wheel strokes (150 px
|
|
70
|
+
* every 25 ms by default) to mimic a physical scroll wheel.
|
|
71
|
+
*
|
|
72
|
+
* @param deltaY - Pixels to scroll (positive = down, negative = up).
|
|
73
|
+
* @param x - Cursor X position for the scroll.
|
|
74
|
+
* @param y - Cursor Y position for the scroll.
|
|
75
|
+
*/
|
|
76
|
+
async scrollY(deltaY, x, y) {
|
|
77
|
+
await this.vmEval(`vm.scrollY(${String(deltaY)}, { x: ${String(x)}, y: ${String(y)} })`);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get the current VirtualMouse cursor position.
|
|
81
|
+
*/
|
|
82
|
+
async position() {
|
|
83
|
+
this.ensureAvailable();
|
|
84
|
+
return this.instance.evaluateUI(`(() => {
|
|
85
|
+
const remote = require('@electron/remote');
|
|
86
|
+
const vm = remote.getGlobal('mainWindow').contentWindow.virtualMouse;
|
|
87
|
+
return { x: vm.position.x, y: vm.position.y };
|
|
88
|
+
})()`, false);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Evaluate an expression on the VirtualMouse instance (awaited).
|
|
92
|
+
*
|
|
93
|
+
* The expression must reference the VirtualMouse instance as `vm`.
|
|
94
|
+
*/
|
|
95
|
+
async vmEval(expr) {
|
|
96
|
+
this.ensureAvailable();
|
|
97
|
+
await this.instance.evaluateUI(`(async () => {
|
|
98
|
+
const remote = require('@electron/remote');
|
|
99
|
+
const vm = remote.getGlobal('mainWindow').contentWindow.virtualMouse;
|
|
100
|
+
await ${expr};
|
|
101
|
+
})()`, true);
|
|
102
|
+
}
|
|
103
|
+
ensureAvailable() {
|
|
104
|
+
if (!this.available) {
|
|
105
|
+
throw new Error("HumanizedMouse is not available — call initialize() first or check isAvailable");
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=humanized-mouse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanized-mouse.js","sourceRoot":"","sources":["../../src/linkedin/humanized-mouse.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAIpC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,cAAc;IAGI;IAFrB,SAAS,GAAG,KAAK,CAAC;IAE1B,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D;;;;OAIG;IACH,KAAK,CAAC,UAAU;QACd,IAAI,CAAC;YACH,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAC7C;;;;;;aAMK,EACL,KAAK,CACN,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACzB,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,qDAAqD;IACrD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAI,CAAC,CAAS,EAAE,CAAS;QAC7B,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,MAAM,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACrE,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CAAC,CAAS,EAAE,CAAS;QAC9B,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,MAAM,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,CAAS,EAAE,CAAS;QAChD,MAAM,IAAI,CAAC,MAAM,CACf,cAAc,MAAM,CAAC,MAAM,CAAC,UAAU,MAAM,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,KAAK,CACtE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAC7B;;;;WAIK,EACL,KAAK,CACN,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACK,KAAK,CAAC,MAAM,CAAC,IAAY;QAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAC5B;;;gBAGU,IAAI;WACT,EACL,IAAI,CACL,CAAC;IACJ,CAAC;IAEO,eAAe;QACrB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CACb,gFAAgF,CACjF,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { click, getElementCenter, hover, humanizedClick, humanizedHover, humanizedScrollY, scrollTo, typeText, type TypeMethod, waitForDOMStable, waitForElement, type WaitForElementOptions, } from "./dom-automation.js";
|
|
2
|
+
export { HumanizedMouse } from "./humanized-mouse.js";
|
|
3
|
+
export { COMMENT_INPUT, COMMENT_SUBMIT_BUTTON, FEED_POST_CONTAINER, PAGINATION_TRIGGER, POST_AUTHOR_INFO, POST_AUTHOR_NAME, POST_TEXT_CONTENT, REACTION_CELEBRATE, REACTION_FUNNY, REACTION_INSIGHTFUL, REACTION_LIKE, REACTION_LOVE, REACTION_SUPPORT, REACTION_TRIGGER, REACTIONS_MENU, SCROLL_CONTAINER, SELECTORS, type SelectorName, } from "./selectors.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/linkedin/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,KAAK,EACL,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,KAAK,UAAU,EACf,gBAAgB,EAChB,cAAc,EACd,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
export { click, getElementCenter, hover, humanizedClick, humanizedHover, humanizedScrollY, scrollTo, typeText, waitForDOMStable, waitForElement, } from "./dom-automation.js";
|
|
4
|
+
export { HumanizedMouse } from "./humanized-mouse.js";
|
|
5
|
+
export { COMMENT_INPUT, COMMENT_SUBMIT_BUTTON, FEED_POST_CONTAINER, PAGINATION_TRIGGER, POST_AUTHOR_INFO, POST_AUTHOR_NAME, POST_TEXT_CONTENT, REACTION_CELEBRATE, REACTION_FUNNY, REACTION_INSIGHTFUL, REACTION_LIKE, REACTION_LOVE, REACTION_SUPPORT, REACTION_TRIGGER, REACTIONS_MENU, SCROLL_CONTAINER, SELECTORS, } from "./selectors.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/linkedin/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,KAAK,EACL,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EAER,gBAAgB,EAChB,cAAc,GAEf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,SAAS,GAEV,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized CSS selector registry for LinkedIn DOM elements.
|
|
3
|
+
*
|
|
4
|
+
* Each selector targets a specific UI element needed for content
|
|
5
|
+
* interaction (feed reading, commenting, reacting). When LinkedIn
|
|
6
|
+
* changes their DOM structure, integration tests identify broken
|
|
7
|
+
* selectors by name.
|
|
8
|
+
*/
|
|
9
|
+
/** Individual feed post wrapper. */
|
|
10
|
+
export declare const FEED_POST_CONTAINER = "div.feed-shared-update-v2";
|
|
11
|
+
/** Text content within a feed post. */
|
|
12
|
+
export declare const POST_TEXT_CONTENT = ".feed-shared-update-v2__description";
|
|
13
|
+
/** Post author's display name. */
|
|
14
|
+
export declare const POST_AUTHOR_NAME = ".update-components-actor__title";
|
|
15
|
+
/** Post author's headline / description line. */
|
|
16
|
+
export declare const POST_AUTHOR_INFO = ".update-components-actor__description";
|
|
17
|
+
/** Rich-text editor for writing comments (Quill-based). */
|
|
18
|
+
export declare const COMMENT_INPUT = ".comments-comment-texteditor .ql-editor";
|
|
19
|
+
/** Main reaction trigger button (Like / React). */
|
|
20
|
+
export declare const REACTION_TRIGGER = "button.react-button__trigger";
|
|
21
|
+
/** Reactions popup menu container (appears on hover). */
|
|
22
|
+
export declare const REACTIONS_MENU = ".reactions-menu";
|
|
23
|
+
/** Like reaction button inside the reactions menu. */
|
|
24
|
+
export declare const REACTION_LIKE = ".reactions-menu button[aria-label=\"React Like\"]";
|
|
25
|
+
/** Celebrate reaction button inside the reactions menu. */
|
|
26
|
+
export declare const REACTION_CELEBRATE = ".reactions-menu button[aria-label=\"React Celebrate\"]";
|
|
27
|
+
/** Support reaction button inside the reactions menu. */
|
|
28
|
+
export declare const REACTION_SUPPORT = ".reactions-menu button[aria-label=\"React Support\"]";
|
|
29
|
+
/** Love reaction button inside the reactions menu. */
|
|
30
|
+
export declare const REACTION_LOVE = ".reactions-menu button[aria-label=\"React Love\"]";
|
|
31
|
+
/** Insightful reaction button inside the reactions menu. */
|
|
32
|
+
export declare const REACTION_INSIGHTFUL = ".reactions-menu button[aria-label=\"React Insightful\"]";
|
|
33
|
+
/** Funny reaction button inside the reactions menu. */
|
|
34
|
+
export declare const REACTION_FUNNY = ".reactions-menu button[aria-label=\"React Funny\"]";
|
|
35
|
+
/** Submit button for the comment form. */
|
|
36
|
+
export declare const COMMENT_SUBMIT_BUTTON = "button[class*=\"comments-comment-box__submit-button\"]";
|
|
37
|
+
/** Main scrollable feed container. */
|
|
38
|
+
export declare const SCROLL_CONTAINER = ".scaffold-finite-scroll";
|
|
39
|
+
/** "Show more" / load-more button for feed pagination. */
|
|
40
|
+
export declare const PAGINATION_TRIGGER = ".scaffold-finite-scroll__load-button";
|
|
41
|
+
/**
|
|
42
|
+
* Aggregated registry of all selectors, keyed by name.
|
|
43
|
+
*
|
|
44
|
+
* Useful for iterating over all selectors in tests or for
|
|
45
|
+
* dynamic lookup by name at runtime.
|
|
46
|
+
*/
|
|
47
|
+
export declare const SELECTORS: {
|
|
48
|
+
readonly FEED_POST_CONTAINER: "div.feed-shared-update-v2";
|
|
49
|
+
readonly POST_TEXT_CONTENT: ".feed-shared-update-v2__description";
|
|
50
|
+
readonly POST_AUTHOR_NAME: ".update-components-actor__title";
|
|
51
|
+
readonly POST_AUTHOR_INFO: ".update-components-actor__description";
|
|
52
|
+
readonly COMMENT_INPUT: ".comments-comment-texteditor .ql-editor";
|
|
53
|
+
readonly REACTION_TRIGGER: "button.react-button__trigger";
|
|
54
|
+
readonly REACTIONS_MENU: ".reactions-menu";
|
|
55
|
+
readonly REACTION_LIKE: ".reactions-menu button[aria-label=\"React Like\"]";
|
|
56
|
+
readonly REACTION_CELEBRATE: ".reactions-menu button[aria-label=\"React Celebrate\"]";
|
|
57
|
+
readonly REACTION_SUPPORT: ".reactions-menu button[aria-label=\"React Support\"]";
|
|
58
|
+
readonly REACTION_LOVE: ".reactions-menu button[aria-label=\"React Love\"]";
|
|
59
|
+
readonly REACTION_INSIGHTFUL: ".reactions-menu button[aria-label=\"React Insightful\"]";
|
|
60
|
+
readonly REACTION_FUNNY: ".reactions-menu button[aria-label=\"React Funny\"]";
|
|
61
|
+
readonly COMMENT_SUBMIT_BUTTON: "button[class*=\"comments-comment-box__submit-button\"]";
|
|
62
|
+
readonly SCROLL_CONTAINER: ".scaffold-finite-scroll";
|
|
63
|
+
readonly PAGINATION_TRIGGER: ".scaffold-finite-scroll__load-button";
|
|
64
|
+
};
|
|
65
|
+
/** Union of all selector names in the registry. */
|
|
66
|
+
export type SelectorName = keyof typeof SELECTORS;
|
|
67
|
+
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/linkedin/selectors.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAIH,oCAAoC;AACpC,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAE/D,uCAAuC;AACvC,eAAO,MAAM,iBAAiB,wCAAwC,CAAC;AAIvE,kCAAkC;AAClC,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAElE,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,0CAA0C,CAAC;AAIxE,2DAA2D;AAC3D,eAAO,MAAM,aAAa,4CAA4C,CAAC;AAIvE,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,iCAAiC,CAAC;AAE/D,yDAAyD;AACzD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD,sDAAsD;AACtD,eAAO,MAAM,aAAa,sDAAoD,CAAC;AAE/E,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,2DAAyD,CAAC;AAEzF,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,yDAAuD,CAAC;AAErF,sDAAsD;AACtD,eAAO,MAAM,aAAa,sDAAoD,CAAC;AAE/E,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,4DAA0D,CAAC;AAE3F,uDAAuD;AACvD,eAAO,MAAM,cAAc,uDAAqD,CAAC;AAIjF,0CAA0C;AAC1C,eAAO,MAAM,qBAAqB,2DAAyD,CAAC;AAI5F,sCAAsC;AACtC,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAI1D,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,yCAAyC,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAiBZ,CAAC;AAEX,mDAAmD;AACnD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,SAAS,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
/**
|
|
4
|
+
* Centralized CSS selector registry for LinkedIn DOM elements.
|
|
5
|
+
*
|
|
6
|
+
* Each selector targets a specific UI element needed for content
|
|
7
|
+
* interaction (feed reading, commenting, reacting). When LinkedIn
|
|
8
|
+
* changes their DOM structure, integration tests identify broken
|
|
9
|
+
* selectors by name.
|
|
10
|
+
*/
|
|
11
|
+
// ── Feed post containers ──────────────────────────────────────────
|
|
12
|
+
/** Individual feed post wrapper. */
|
|
13
|
+
export const FEED_POST_CONTAINER = "div.feed-shared-update-v2";
|
|
14
|
+
/** Text content within a feed post. */
|
|
15
|
+
export const POST_TEXT_CONTENT = ".feed-shared-update-v2__description";
|
|
16
|
+
// ── Author info ───────────────────────────────────────────────────
|
|
17
|
+
/** Post author's display name. */
|
|
18
|
+
export const POST_AUTHOR_NAME = ".update-components-actor__title";
|
|
19
|
+
/** Post author's headline / description line. */
|
|
20
|
+
export const POST_AUTHOR_INFO = ".update-components-actor__description";
|
|
21
|
+
// ── Comment input fields ──────────────────────────────────────────
|
|
22
|
+
/** Rich-text editor for writing comments (Quill-based). */
|
|
23
|
+
export const COMMENT_INPUT = ".comments-comment-texteditor .ql-editor";
|
|
24
|
+
// ── Reaction buttons ──────────────────────────────────────────────
|
|
25
|
+
/** Main reaction trigger button (Like / React). */
|
|
26
|
+
export const REACTION_TRIGGER = "button.react-button__trigger";
|
|
27
|
+
/** Reactions popup menu container (appears on hover). */
|
|
28
|
+
export const REACTIONS_MENU = ".reactions-menu";
|
|
29
|
+
/** Like reaction button inside the reactions menu. */
|
|
30
|
+
export const REACTION_LIKE = '.reactions-menu button[aria-label="React Like"]';
|
|
31
|
+
/** Celebrate reaction button inside the reactions menu. */
|
|
32
|
+
export const REACTION_CELEBRATE = '.reactions-menu button[aria-label="React Celebrate"]';
|
|
33
|
+
/** Support reaction button inside the reactions menu. */
|
|
34
|
+
export const REACTION_SUPPORT = '.reactions-menu button[aria-label="React Support"]';
|
|
35
|
+
/** Love reaction button inside the reactions menu. */
|
|
36
|
+
export const REACTION_LOVE = '.reactions-menu button[aria-label="React Love"]';
|
|
37
|
+
/** Insightful reaction button inside the reactions menu. */
|
|
38
|
+
export const REACTION_INSIGHTFUL = '.reactions-menu button[aria-label="React Insightful"]';
|
|
39
|
+
/** Funny reaction button inside the reactions menu. */
|
|
40
|
+
export const REACTION_FUNNY = '.reactions-menu button[aria-label="React Funny"]';
|
|
41
|
+
// ── Send / submit buttons ─────────────────────────────────────────
|
|
42
|
+
/** Submit button for the comment form. */
|
|
43
|
+
export const COMMENT_SUBMIT_BUTTON = 'button[class*="comments-comment-box__submit-button"]';
|
|
44
|
+
// ── Scroll containers ─────────────────────────────────────────────
|
|
45
|
+
/** Main scrollable feed container. */
|
|
46
|
+
export const SCROLL_CONTAINER = ".scaffold-finite-scroll";
|
|
47
|
+
// ── Pagination triggers ───────────────────────────────────────────
|
|
48
|
+
/** "Show more" / load-more button for feed pagination. */
|
|
49
|
+
export const PAGINATION_TRIGGER = ".scaffold-finite-scroll__load-button";
|
|
50
|
+
/**
|
|
51
|
+
* Aggregated registry of all selectors, keyed by name.
|
|
52
|
+
*
|
|
53
|
+
* Useful for iterating over all selectors in tests or for
|
|
54
|
+
* dynamic lookup by name at runtime.
|
|
55
|
+
*/
|
|
56
|
+
export const SELECTORS = {
|
|
57
|
+
FEED_POST_CONTAINER,
|
|
58
|
+
POST_TEXT_CONTENT,
|
|
59
|
+
POST_AUTHOR_NAME,
|
|
60
|
+
POST_AUTHOR_INFO,
|
|
61
|
+
COMMENT_INPUT,
|
|
62
|
+
REACTION_TRIGGER,
|
|
63
|
+
REACTIONS_MENU,
|
|
64
|
+
REACTION_LIKE,
|
|
65
|
+
REACTION_CELEBRATE,
|
|
66
|
+
REACTION_SUPPORT,
|
|
67
|
+
REACTION_LOVE,
|
|
68
|
+
REACTION_INSIGHTFUL,
|
|
69
|
+
REACTION_FUNNY,
|
|
70
|
+
COMMENT_SUBMIT_BUTTON,
|
|
71
|
+
SCROLL_CONTAINER,
|
|
72
|
+
PAGINATION_TRIGGER,
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=selectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../src/linkedin/selectors.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC;;;;;;;GAOG;AAEH,qEAAqE;AAErE,oCAAoC;AACpC,MAAM,CAAC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAE/D,uCAAuC;AACvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,qCAAqC,CAAC;AAEvE,qEAAqE;AAErE,kCAAkC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,iCAAiC,CAAC;AAElE,iDAAiD;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,uCAAuC,CAAC;AAExE,qEAAqE;AAErE,2DAA2D;AAC3D,MAAM,CAAC,MAAM,aAAa,GAAG,yCAAyC,CAAC;AAEvE,qEAAqE;AAErE,mDAAmD;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG,8BAA8B,CAAC;AAE/D,yDAAyD;AACzD,MAAM,CAAC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEhD,sDAAsD;AACtD,MAAM,CAAC,MAAM,aAAa,GAAG,iDAAiD,CAAC;AAE/E,2DAA2D;AAC3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,sDAAsD,CAAC;AAEzF,yDAAyD;AACzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,oDAAoD,CAAC;AAErF,sDAAsD;AACtD,MAAM,CAAC,MAAM,aAAa,GAAG,iDAAiD,CAAC;AAE/E,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,uDAAuD,CAAC;AAE3F,uDAAuD;AACvD,MAAM,CAAC,MAAM,cAAc,GAAG,kDAAkD,CAAC;AAEjF,qEAAqE;AAErE,0CAA0C;AAC1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,sDAAsD,CAAC;AAE5F,qEAAqE;AAErE,sCAAsC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,yBAAyB,CAAC;AAE1D,qEAAqE;AAErE,0DAA0D;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,sCAAsC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,mBAAmB;IACnB,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,aAAa;IACb,kBAAkB;IAClB,gBAAgB;IAChB,aAAa;IACb,mBAAmB;IACnB,cAAc;IACd,qBAAqB;IACrB,gBAAgB;IAChB,kBAAkB;CACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-people-to-collection.d.ts","sourceRoot":"","sources":["../../src/operations/add-people-to-collection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-people-to-collection.d.ts","sourceRoot":"","sources":["../../src/operations/add-people-to-collection.ts"],"names":[],"mappings":"AAMA,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,2BAA2B,CAAC,CAetC"}
|
|
@@ -3,16 +3,13 @@
|
|
|
3
3
|
import { resolveAccount } from "../services/account-resolution.js";
|
|
4
4
|
import { withDatabase } from "../services/instance-context.js";
|
|
5
5
|
import { CollectionListRepository } from "../db/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { buildCdpOptions } from "./types.js";
|
|
7
7
|
/**
|
|
8
8
|
* Add people to a collection by person IDs.
|
|
9
9
|
*/
|
|
10
10
|
export async function addPeopleToCollection(input) {
|
|
11
|
-
const cdpPort = input.cdpPort
|
|
12
|
-
const accountId = await resolveAccount(cdpPort,
|
|
13
|
-
...(input.cdpHost !== undefined && { host: input.cdpHost }),
|
|
14
|
-
...(input.allowRemote !== undefined && { allowRemote: input.allowRemote }),
|
|
15
|
-
});
|
|
11
|
+
const cdpPort = input.cdpPort;
|
|
12
|
+
const accountId = await resolveAccount(cdpPort, buildCdpOptions(input));
|
|
16
13
|
return withDatabase(accountId, ({ db }) => {
|
|
17
14
|
const repo = new CollectionListRepository(db);
|
|
18
15
|
const added = repo.addPeople(input.collectionId, input.personIds);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-people-to-collection.js","sourceRoot":"","sources":["../../src/operations/add-people-to-collection.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"add-people-to-collection.js","sourceRoot":"","sources":["../../src/operations/add-people-to-collection.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAA0B,MAAM,YAAY,CAAC;AAoBrE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAAiC;IAEjC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAE9B,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;IAExE,OAAO,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;QACxC,MAAM,IAAI,GAAG,IAAI,wBAAwB,CAAC,EAAE,CAAC,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAClE,OAAO;YACL,OAAO,EAAE,IAAa;YACtB,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,KAAK;YACL,mBAAmB,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,KAAK;SACpD,CAAC;IACJ,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-linkedin-url.test.d.ts","sourceRoot":"","sources":["../../src/operations/build-linkedin-url.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,158 @@
|
|
|
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/source-type-registry.js", () => ({
|
|
5
|
+
validateSourceType: vi.fn(),
|
|
6
|
+
}));
|
|
7
|
+
vi.mock("../services/url-builder.js", () => ({
|
|
8
|
+
buildBasicSearchUrl: vi.fn(),
|
|
9
|
+
}));
|
|
10
|
+
vi.mock("../services/sn-url-builder.js", () => ({
|
|
11
|
+
buildSNSearchUrl: vi.fn(),
|
|
12
|
+
}));
|
|
13
|
+
vi.mock("../services/url-templates.js", () => ({
|
|
14
|
+
isSearchBuilderType: vi.fn(),
|
|
15
|
+
isSNSearchBuilderType: vi.fn(),
|
|
16
|
+
isParameterisedType: vi.fn(),
|
|
17
|
+
isFixedUrlType: vi.fn(),
|
|
18
|
+
buildParameterisedUrl: vi.fn(),
|
|
19
|
+
getFixedUrl: vi.fn(),
|
|
20
|
+
}));
|
|
21
|
+
import { validateSourceType } from "../services/source-type-registry.js";
|
|
22
|
+
import { buildBasicSearchUrl } from "../services/url-builder.js";
|
|
23
|
+
import { buildSNSearchUrl } from "../services/sn-url-builder.js";
|
|
24
|
+
import { isSearchBuilderType, isSNSearchBuilderType, isParameterisedType, isFixedUrlType, buildParameterisedUrl, getFixedUrl, } from "../services/url-templates.js";
|
|
25
|
+
import { buildLinkedInUrl } from "./build-linkedin-url.js";
|
|
26
|
+
describe("buildLinkedInUrl", () => {
|
|
27
|
+
beforeEach(() => {
|
|
28
|
+
vi.clearAllMocks();
|
|
29
|
+
// Default: all type checks return false
|
|
30
|
+
vi.mocked(isSearchBuilderType).mockReturnValue(false);
|
|
31
|
+
vi.mocked(isSNSearchBuilderType).mockReturnValue(false);
|
|
32
|
+
vi.mocked(isParameterisedType).mockReturnValue(false);
|
|
33
|
+
vi.mocked(isFixedUrlType).mockReturnValue(false);
|
|
34
|
+
});
|
|
35
|
+
afterEach(() => {
|
|
36
|
+
vi.restoreAllMocks();
|
|
37
|
+
});
|
|
38
|
+
it("throws on unknown source type", () => {
|
|
39
|
+
vi.mocked(validateSourceType).mockReturnValue(false);
|
|
40
|
+
expect(() => buildLinkedInUrl({ sourceType: "UnknownType" })).toThrow('Unknown source type: "UnknownType"');
|
|
41
|
+
});
|
|
42
|
+
it("dispatches SearchPage to basic search builder", () => {
|
|
43
|
+
vi.mocked(validateSourceType).mockReturnValue(true);
|
|
44
|
+
vi.mocked(isSearchBuilderType).mockReturnValue(true);
|
|
45
|
+
vi.mocked(buildBasicSearchUrl).mockReturnValue({
|
|
46
|
+
url: "https://www.linkedin.com/search/results/people/?keywords=test",
|
|
47
|
+
sourceType: "SearchPage",
|
|
48
|
+
warnings: [],
|
|
49
|
+
});
|
|
50
|
+
const result = buildLinkedInUrl({
|
|
51
|
+
sourceType: "SearchPage",
|
|
52
|
+
keywords: "test",
|
|
53
|
+
});
|
|
54
|
+
expect(buildBasicSearchUrl).toHaveBeenCalledWith({ keywords: "test" });
|
|
55
|
+
expect(result.url).toBe("https://www.linkedin.com/search/results/people/?keywords=test");
|
|
56
|
+
});
|
|
57
|
+
it("passes all search params to basic search builder", () => {
|
|
58
|
+
vi.mocked(validateSourceType).mockReturnValue(true);
|
|
59
|
+
vi.mocked(isSearchBuilderType).mockReturnValue(true);
|
|
60
|
+
vi.mocked(buildBasicSearchUrl).mockReturnValue({
|
|
61
|
+
url: "https://example.com",
|
|
62
|
+
sourceType: "SearchPage",
|
|
63
|
+
warnings: [],
|
|
64
|
+
});
|
|
65
|
+
buildLinkedInUrl({
|
|
66
|
+
sourceType: "SearchPage",
|
|
67
|
+
keywords: "engineer",
|
|
68
|
+
currentCompany: ["1234"],
|
|
69
|
+
pastCompany: ["5678"],
|
|
70
|
+
geoUrn: ["101"],
|
|
71
|
+
industry: ["96"],
|
|
72
|
+
school: ["abc"],
|
|
73
|
+
network: ["F"],
|
|
74
|
+
profileLanguage: ["en"],
|
|
75
|
+
serviceCategory: ["cat1"],
|
|
76
|
+
});
|
|
77
|
+
expect(buildBasicSearchUrl).toHaveBeenCalledWith({
|
|
78
|
+
keywords: "engineer",
|
|
79
|
+
currentCompany: ["1234"],
|
|
80
|
+
pastCompany: ["5678"],
|
|
81
|
+
geoUrn: ["101"],
|
|
82
|
+
industry: ["96"],
|
|
83
|
+
school: ["abc"],
|
|
84
|
+
network: ["F"],
|
|
85
|
+
profileLanguage: ["en"],
|
|
86
|
+
serviceCategory: ["cat1"],
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
it("omits undefined search params", () => {
|
|
90
|
+
vi.mocked(validateSourceType).mockReturnValue(true);
|
|
91
|
+
vi.mocked(isSearchBuilderType).mockReturnValue(true);
|
|
92
|
+
vi.mocked(buildBasicSearchUrl).mockReturnValue({
|
|
93
|
+
url: "https://example.com",
|
|
94
|
+
sourceType: "SearchPage",
|
|
95
|
+
warnings: [],
|
|
96
|
+
});
|
|
97
|
+
buildLinkedInUrl({ sourceType: "SearchPage" });
|
|
98
|
+
expect(buildBasicSearchUrl).toHaveBeenCalledWith({});
|
|
99
|
+
});
|
|
100
|
+
it("dispatches SNSearchPage to SN search builder", () => {
|
|
101
|
+
vi.mocked(validateSourceType).mockReturnValue(true);
|
|
102
|
+
vi.mocked(isSNSearchBuilderType).mockReturnValue(true);
|
|
103
|
+
vi.mocked(buildSNSearchUrl).mockReturnValue({
|
|
104
|
+
url: "https://www.linkedin.com/sales/search/people?query=test",
|
|
105
|
+
sourceType: "SNSearchPage",
|
|
106
|
+
warnings: [],
|
|
107
|
+
});
|
|
108
|
+
const filters = [{ type: "COMPANY_SIZE", values: [{ id: "B", selectionType: "INCLUDED" }] }];
|
|
109
|
+
const result = buildLinkedInUrl({
|
|
110
|
+
sourceType: "SNSearchPage",
|
|
111
|
+
keywords: "test",
|
|
112
|
+
filters,
|
|
113
|
+
});
|
|
114
|
+
expect(buildSNSearchUrl).toHaveBeenCalledWith({
|
|
115
|
+
keywords: "test",
|
|
116
|
+
filters,
|
|
117
|
+
});
|
|
118
|
+
expect(result.sourceType).toBe("SNSearchPage");
|
|
119
|
+
});
|
|
120
|
+
it("dispatches parameterised type to template builder", () => {
|
|
121
|
+
vi.mocked(validateSourceType).mockReturnValue(true);
|
|
122
|
+
vi.mocked(isParameterisedType).mockReturnValue(true);
|
|
123
|
+
vi.mocked(buildParameterisedUrl).mockReturnValue("https://www.linkedin.com/company/acme/people/");
|
|
124
|
+
const result = buildLinkedInUrl({
|
|
125
|
+
sourceType: "OrganizationPeople",
|
|
126
|
+
slug: "acme",
|
|
127
|
+
});
|
|
128
|
+
expect(buildParameterisedUrl).toHaveBeenCalledWith("OrganizationPeople", { slug: "acme" });
|
|
129
|
+
expect(result.url).toBe("https://www.linkedin.com/company/acme/people/");
|
|
130
|
+
expect(result.warnings).toEqual([]);
|
|
131
|
+
});
|
|
132
|
+
it("throws when parameterised type returns undefined (missing param)", () => {
|
|
133
|
+
vi.mocked(validateSourceType).mockReturnValue(true);
|
|
134
|
+
vi.mocked(isParameterisedType).mockReturnValue(true);
|
|
135
|
+
vi.mocked(buildParameterisedUrl).mockReturnValue(undefined);
|
|
136
|
+
expect(() => buildLinkedInUrl({ sourceType: "OrganizationPeople" })).toThrow("Missing required parameter");
|
|
137
|
+
});
|
|
138
|
+
it("dispatches fixed URL type", () => {
|
|
139
|
+
vi.mocked(validateSourceType).mockReturnValue(true);
|
|
140
|
+
vi.mocked(isFixedUrlType).mockReturnValue(true);
|
|
141
|
+
vi.mocked(getFixedUrl).mockReturnValue("https://www.linkedin.com/mynetwork/invite-connect/connections/");
|
|
142
|
+
const result = buildLinkedInUrl({ sourceType: "MyConnections" });
|
|
143
|
+
expect(getFixedUrl).toHaveBeenCalledWith("MyConnections");
|
|
144
|
+
expect(result.url).toBe("https://www.linkedin.com/mynetwork/invite-connect/connections/");
|
|
145
|
+
expect(result.warnings).toEqual([]);
|
|
146
|
+
});
|
|
147
|
+
it("throws when fixed URL type returns undefined", () => {
|
|
148
|
+
vi.mocked(validateSourceType).mockReturnValue(true);
|
|
149
|
+
vi.mocked(isFixedUrlType).mockReturnValue(true);
|
|
150
|
+
vi.mocked(getFixedUrl).mockReturnValue(undefined);
|
|
151
|
+
expect(() => buildLinkedInUrl({ sourceType: "MyConnections" })).toThrow("Missing fixed URL");
|
|
152
|
+
});
|
|
153
|
+
it("throws when no builder matches a validated source type", () => {
|
|
154
|
+
vi.mocked(validateSourceType).mockReturnValue(true);
|
|
155
|
+
expect(() => buildLinkedInUrl({ sourceType: "SearchPage" })).toThrow("No URL builder available");
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
//# sourceMappingURL=build-linkedin-url.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-linkedin-url.test.js","sourceRoot":"","sources":["../../src/operations/build-linkedin-url.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,qCAAqC,EAAE,GAAG,EAAE,CAAC,CAAC;IACpD,kBAAkB,EAAE,EAAE,CAAC,EAAE,EAAE;CAC5B,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3C,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAE;CAC7B,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,+BAA+B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9C,gBAAgB,EAAE,EAAE,CAAC,EAAE,EAAE;CAC1B,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,8BAA8B,EAAE,GAAG,EAAE,CAAC,CAAC;IAC7C,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAE;IAC5B,qBAAqB,EAAE,EAAE,CAAC,EAAE,EAAE;IAC9B,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAE;IAC5B,cAAc,EAAE,EAAE,CAAC,EAAE,EAAE;IACvB,qBAAqB,EAAE,EAAE,CAAC,EAA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CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACpD,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAChD,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAElD,MAAM,CAAC,GAAG,EAAE,CACV,gBAAgB,CAAC,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC,CAClD,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAChE,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAEpD,MAAM,CAAC,GAAG,EAAE,CACV,gBAAgB,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAC/C,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CampaignAction } from "../types/index.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type ConnectionOptions } from "./types.js";
|
|
3
3
|
export interface CampaignAddActionInput extends ConnectionOptions {
|
|
4
4
|
readonly campaignId: number;
|
|
5
5
|
readonly name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"campaign-add-action.d.ts","sourceRoot":"","sources":["../../src/operations/campaign-add-action.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"campaign-add-action.d.ts","sourceRoot":"","sources":["../../src/operations/campaign-add-action.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,mBAAmB,CAAC;AAI9E,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAErE,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,QAAQ,CAAC,4BAA4B,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC/D;AAED,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,uBAAuB,CAAC,CA0BlC"}
|
|
@@ -3,13 +3,10 @@
|
|
|
3
3
|
import { resolveAccount } from "../services/account-resolution.js";
|
|
4
4
|
import { withDatabase } from "../services/instance-context.js";
|
|
5
5
|
import { CampaignRepository } from "../db/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { buildCdpOptions } from "./types.js";
|
|
7
7
|
export async function campaignAddAction(input) {
|
|
8
|
-
const cdpPort = input.cdpPort
|
|
9
|
-
const accountId = await resolveAccount(cdpPort,
|
|
10
|
-
...(input.cdpHost !== undefined && { host: input.cdpHost }),
|
|
11
|
-
...(input.allowRemote !== undefined && { allowRemote: input.allowRemote }),
|
|
12
|
-
});
|
|
8
|
+
const cdpPort = input.cdpPort;
|
|
9
|
+
const accountId = await resolveAccount(cdpPort, buildCdpOptions(input));
|
|
13
10
|
return withDatabase(accountId, ({ db }) => {
|
|
14
11
|
const campaignRepo = new CampaignRepository(db);
|
|
15
12
|
const campaign = campaignRepo.getCampaign(input.campaignId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"campaign-add-action.js","sourceRoot":"","sources":["../../src/operations/campaign-add-action.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"campaign-add-action.js","sourceRoot":"","sources":["../../src/operations/campaign-add-action.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAA0B,MAAM,YAAY,CAAC;AAcrE,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,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;QACxC,MAAM,YAAY,GAAG,IAAI,kBAAkB,CAAC,EAAE,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,YAAY,CAAC,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAE5D,MAAM,YAAY,GAAyB;YACzC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,UAAU,EAAE,KAAK,CAAC,UAAU;YA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