@lhremote/core 0.8.0 → 0.10.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/repositories/campaign-hard-delete.integration.test.js +4 -1
- package/dist/db/repositories/campaign-hard-delete.integration.test.js.map +1 -1
- package/dist/db/repositories/campaign.d.ts.map +1 -1
- package/dist/db/repositories/campaign.js +81 -33
- package/dist/db/repositories/campaign.js.map +1 -1
- package/dist/db/repositories/campaign.test.js +2 -2
- package/dist/db/repositories/collection-list.d.ts +11 -0
- package/dist/db/repositories/collection-list.d.ts.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/collection-list.js +92 -2
- package/dist/db/repositories/collection-list.js.map +1 -1
- package/dist/db/testing/create-fixture.js +36 -2
- package/dist/db/testing/create-fixture.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- 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 +166 -6
- package/dist/linkedin/dom-automation.d.ts.map +1 -1
- package/dist/linkedin/dom-automation.js +496 -21
- package/dist/linkedin/dom-automation.js.map +1 -1
- 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 +3 -2
- package/dist/linkedin/index.d.ts.map +1 -1
- package/dist/linkedin/index.js +3 -2
- package/dist/linkedin/index.js.map +1 -1
- package/dist/linkedin/selectors.d.ts +74 -48
- package/dist/linkedin/selectors.d.ts.map +1 -1
- package/dist/linkedin/selectors.js +64 -41
- package/dist/linkedin/selectors.js.map +1 -1
- 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 +1 -1
- package/dist/operations/campaign-delete.d.ts.map +1 -1
- package/dist/operations/campaign-delete.js +3 -6
- package/dist/operations/campaign-delete.js.map +1 -1
- package/dist/operations/campaign-erase.d.ts +1 -1
- package/dist/operations/campaign-erase.d.ts.map +1 -1
- package/dist/operations/campaign-erase.js +3 -6
- package/dist/operations/campaign-erase.js.map +1 -1
- 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 +124 -17
- package/dist/operations/check-replies.js.map +1 -1
- package/dist/operations/check-replies.test.js +152 -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 +18 -12
- package/dist/operations/collect-people.js.map +1 -1
- package/dist/operations/collect-people.test.js +21 -5
- package/dist/operations/collect-people.test.js.map +1 -1
- package/dist/operations/comment-on-post.d.ts +4 -1
- package/dist/operations/comment-on-post.d.ts.map +1 -1
- package/dist/operations/comment-on-post.js +15 -19
- package/dist/operations/comment-on-post.js.map +1 -1
- package/dist/operations/comment-on-post.test.js +8 -6
- package/dist/operations/comment-on-post.test.js.map +1 -1
- 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 +5 -7
- package/dist/operations/create-collection.js.map +1 -1
- package/dist/operations/create-collection.test.js +3 -1
- package/dist/operations/create-collection.test.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 +11 -5
- package/dist/operations/dismiss-errors.d.ts.map +1 -1
- package/dist/operations/dismiss-errors.js +68 -34
- package/dist/operations/dismiss-errors.js.map +1 -1
- package/dist/operations/dismiss-errors.test.js +129 -8
- package/dist/operations/dismiss-errors.test.js.map +1 -1
- 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.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 +2 -1
- package/dist/operations/ephemeral-action.d.ts.map +1 -1
- package/dist/operations/ephemeral-action.js +5 -7
- package/dist/operations/ephemeral-action.js.map +1 -1
- 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 +159 -0
- package/dist/operations/ephemeral-action.test.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 +1 -1
- package/dist/operations/get-action-budget.d.ts.map +1 -1
- package/dist/operations/get-action-budget.js +3 -6
- package/dist/operations/get-action-budget.js.map +1 -1
- package/dist/operations/get-errors.d.ts +5 -1
- package/dist/operations/get-errors.d.ts.map +1 -1
- package/dist/operations/get-errors.js +55 -33
- package/dist/operations/get-errors.js.map +1 -1
- package/dist/operations/get-errors.test.js +54 -55
- package/dist/operations/get-errors.test.js.map +1 -1
- package/dist/operations/get-feed.d.ts +83 -4
- package/dist/operations/get-feed.d.ts.map +1 -1
- package/dist/operations/get-feed.js +400 -153
- package/dist/operations/get-feed.js.map +1 -1
- package/dist/operations/get-feed.test.js +416 -190
- package/dist/operations/get-feed.test.js.map +1 -1
- package/dist/operations/get-post-engagers.d.ts +6 -3
- package/dist/operations/get-post-engagers.d.ts.map +1 -1
- package/dist/operations/get-post-engagers.js +278 -78
- package/dist/operations/get-post-engagers.js.map +1 -1
- package/dist/operations/get-post-engagers.test.js +292 -14
- package/dist/operations/get-post-engagers.test.js.map +1 -1
- package/dist/operations/get-post-stats.d.ts +8 -3
- package/dist/operations/get-post-stats.d.ts.map +1 -1
- package/dist/operations/get-post-stats.js +101 -37
- package/dist/operations/get-post-stats.js.map +1 -1
- package/dist/operations/get-post-stats.test.js +137 -2
- package/dist/operations/get-post-stats.test.js.map +1 -1
- package/dist/operations/get-post.d.ts +9 -150
- package/dist/operations/get-post.d.ts.map +1 -1
- package/dist/operations/get-post.js +356 -210
- package/dist/operations/get-post.js.map +1 -1
- package/dist/operations/get-post.test.js +210 -387
- package/dist/operations/get-post.test.js.map +1 -1
- package/dist/operations/get-profile-activity.d.ts +13 -92
- package/dist/operations/get-profile-activity.d.ts.map +1 -1
- package/dist/operations/get-profile-activity.js +305 -105
- package/dist/operations/get-profile-activity.js.map +1 -1
- package/dist/operations/get-profile-activity.test.js +277 -158
- package/dist/operations/get-profile-activity.test.js.map +1 -1
- package/dist/operations/get-throttle-status.d.ts +1 -1
- package/dist/operations/get-throttle-status.d.ts.map +1 -1
- package/dist/operations/get-throttle-status.js +4 -10
- package/dist/operations/get-throttle-status.js.map +1 -1
- 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 +2 -2
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +2 -1
- package/dist/operations/index.js.map +1 -1
- 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.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 +16 -4
- package/dist/operations/react-to-post.d.ts.map +1 -1
- package/dist/operations/react-to-post.js +86 -24
- package/dist/operations/react-to-post.js.map +1 -1
- package/dist/operations/react-to-post.test.js +55 -5
- package/dist/operations/react-to-post.test.js.map +1 -1
- 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 +113 -18
- package/dist/operations/scrape-messaging-history.js.map +1 -1
- package/dist/operations/scrape-messaging-history.test.js +109 -12
- package/dist/operations/scrape-messaging-history.test.js.map +1 -1
- package/dist/operations/search-posts.d.ts +20 -112
- package/dist/operations/search-posts.d.ts.map +1 -1
- package/dist/operations/search-posts.js +369 -170
- package/dist/operations/search-posts.js.map +1 -1
- package/dist/operations/search-posts.test.js +273 -234
- package/dist/operations/search-posts.test.js.map +1 -1
- 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.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 +27 -1
- package/dist/operations/types.d.ts.map +1 -1
- package/dist/operations/types.js +14 -1
- package/dist/operations/types.js.map +1 -1
- package/dist/operations/visit-profile.d.ts +1 -1
- package/dist/operations/visit-profile.d.ts.map +1 -1
- package/dist/operations/visit-profile.js +3 -6
- package/dist/operations/visit-profile.js.map +1 -1
- package/dist/services/account-resolution.d.ts +10 -4
- package/dist/services/account-resolution.d.ts.map +1 -1
- package/dist/services/account-resolution.js +63 -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 +40 -4
- package/dist/services/campaign.d.ts.map +1 -1
- package/dist/services/campaign.js +176 -10
- package/dist/services/campaign.js.map +1 -1
- package/dist/services/campaign.test.js +53 -15
- package/dist/services/campaign.test.js.map +1 -1
- package/dist/services/collection.d.ts +16 -21
- package/dist/services/collection.d.ts.map +1 -1
- package/dist/services/collection.js +34 -47
- package/dist/services/collection.js.map +1 -1
- package/dist/services/collection.test.js +30 -91
- package/dist/services/collection.test.js.map +1 -1
- package/dist/services/ephemeral-campaign.d.ts +6 -0
- package/dist/services/ephemeral-campaign.d.ts.map +1 -1
- package/dist/services/ephemeral-campaign.js +54 -10
- package/dist/services/ephemeral-campaign.js.map +1 -1
- package/dist/services/ephemeral-campaign.test.js +23 -10
- package/dist/services/ephemeral-campaign.test.js.map +1 -1
- package/dist/services/errors.d.ts +2 -1
- package/dist/services/errors.d.ts.map +1 -1
- package/dist/services/errors.js +6 -3
- package/dist/services/errors.js.map +1 -1
- package/dist/services/index.d.ts +1 -2
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +1 -2
- 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 -28
- package/dist/services/instance-context.js.map +1 -1
- package/dist/services/instance-context.test.js +5 -1
- 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 +37 -9
- package/dist/services/instance.d.ts.map +1 -1
- package/dist/services/instance.js +100 -25
- package/dist/services/instance.js.map +1 -1
- package/dist/services/instance.test.js +157 -0
- package/dist/services/instance.test.js.map +1 -1
- package/dist/services/launcher.d.ts +47 -3
- package/dist/services/launcher.d.ts.map +1 -1
- package/dist/services/launcher.js +205 -33
- 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/source-type-registry.d.ts +8 -0
- package/dist/services/source-type-registry.d.ts.map +1 -1
- package/dist/services/source-type-registry.js +39 -0
- package/dist/services/source-type-registry.js.map +1 -1
- package/dist/services/source-type-registry.test.js +31 -1
- package/dist/services/source-type-registry.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 +47 -1
- package/dist/testing/e2e-helpers.d.ts.map +1 -1
- package/dist/testing/e2e-helpers.js +244 -7
- 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/campaign.d.ts +1 -1
- package/dist/types/campaign.d.ts.map +1 -1
- package/dist/types/feed.d.ts +1 -3
- package/dist/types/feed.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.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
- package/dist/linkedin/__tests__/selectors.integration.test.d.ts +0 -2
- package/dist/linkedin/__tests__/selectors.integration.test.d.ts.map +0 -1
- package/dist/linkedin/__tests__/selectors.integration.test.js +0 -258
- package/dist/linkedin/__tests__/selectors.integration.test.js.map +0 -1
- package/dist/types/search-posts.d.ts +0 -22
- package/dist/types/search-posts.d.ts.map +0 -1
- package/dist/types/search-posts.js +0 -4
- package/dist/types/search-posts.js.map +0 -1
- package/dist/voyager/index.d.ts +0 -2
- package/dist/voyager/index.d.ts.map +0 -1
- package/dist/voyager/index.js +0 -4
- package/dist/voyager/index.js.map +0 -1
- package/dist/voyager/interceptor.d.ts +0 -100
- package/dist/voyager/interceptor.d.ts.map +0 -1
- package/dist/voyager/interceptor.integration.test.d.ts +0 -2
- package/dist/voyager/interceptor.integration.test.d.ts.map +0 -1
- package/dist/voyager/interceptor.integration.test.js +0 -89
- package/dist/voyager/interceptor.integration.test.js.map +0 -1
- package/dist/voyager/interceptor.js +0 -235
- package/dist/voyager/interceptor.js.map +0 -1
- package/dist/voyager/interceptor.test.d.ts +0 -2
- package/dist/voyager/interceptor.test.d.ts.map +0 -1
- package/dist/voyager/interceptor.test.js +0 -372
- package/dist/voyager/interceptor.test.js.map +0 -1
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
3
|
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
|
4
4
|
import { DatabaseClient } from "../client.js";
|
|
5
|
-
import {
|
|
5
|
+
import { openFixture } from "../testing/open-fixture.js";
|
|
6
6
|
import { CollectionListRepository } from "./collection-list.js";
|
|
7
7
|
describe("CollectionListRepository (integration)", () => {
|
|
8
|
+
let rawDb;
|
|
8
9
|
let client;
|
|
9
10
|
let repo;
|
|
10
11
|
beforeAll(() => {
|
|
11
|
-
//
|
|
12
|
-
|
|
12
|
+
// Use openFixture() for an isolated writable copy
|
|
13
|
+
rawDb = openFixture();
|
|
14
|
+
client = { db: rawDb, close: () => rawDb.close() };
|
|
13
15
|
repo = new CollectionListRepository(client);
|
|
14
16
|
});
|
|
15
17
|
afterAll(() => {
|
|
16
|
-
|
|
18
|
+
rawDb.close();
|
|
17
19
|
});
|
|
18
20
|
describe("listCollections", () => {
|
|
19
21
|
it("returns named collections with people counts from fixture", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-list.integration.test.js","sourceRoot":"","sources":["../../../src/db/repositories/collection-list.integration.test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"collection-list.integration.test.js","sourceRoot":"","sources":["../../../src/db/repositories/collection-list.integration.test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAGnE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,QAAQ,CAAC,wCAAwC,EAAE,GAAG,EAAE;IACtD,IAAI,KAAmB,CAAC;IACxB,IAAI,MAAsB,CAAC;IAC3B,IAAI,IAA8B,CAAC;IAEnC,SAAS,CAAC,GAAG,EAAE;QACb,kDAAkD;QAClD,KAAK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AI,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -27,6 +27,32 @@ export class CollectionListRepository {
|
|
|
27
27
|
GROUP BY c.id
|
|
28
28
|
ORDER BY c.id`);
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Resolve the external account ID to the internal `li_accounts.id`.
|
|
32
|
+
*
|
|
33
|
+
* The external ID corresponds to the partition-level account
|
|
34
|
+
* identifier used by the launcher and database discovery. The
|
|
35
|
+
* internal ID is what the `collections` foreign key references.
|
|
36
|
+
*
|
|
37
|
+
* @returns The internal `li_accounts.id`, or the input value if the
|
|
38
|
+
* `li_accounts` table does not exist (test fixtures).
|
|
39
|
+
*/
|
|
40
|
+
resolveInternalAccountId(externalAccountId) {
|
|
41
|
+
try {
|
|
42
|
+
const row = this.client.db
|
|
43
|
+
.prepare("SELECT id FROM li_accounts WHERE external_id = ?")
|
|
44
|
+
.get(externalAccountId);
|
|
45
|
+
if (row)
|
|
46
|
+
return row.id;
|
|
47
|
+
throw new Error(`No li_accounts mapping found for external account ID ${externalAccountId}`);
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
if (error instanceof Error && error.message.includes("no such table")) {
|
|
51
|
+
return externalAccountId;
|
|
52
|
+
}
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
30
56
|
/**
|
|
31
57
|
* List all named collections with people counts.
|
|
32
58
|
*/
|
|
@@ -46,8 +72,20 @@ export class CollectionListRepository {
|
|
|
46
72
|
*/
|
|
47
73
|
createCollection(accountId, name) {
|
|
48
74
|
const stmts = this.getWriteStatements();
|
|
49
|
-
|
|
50
|
-
|
|
75
|
+
this.client.db.exec("BEGIN");
|
|
76
|
+
try {
|
|
77
|
+
const result = stmts.insertCollection.run(accountId, name);
|
|
78
|
+
const collectionId = Number(result.lastInsertRowid);
|
|
79
|
+
if (stmts.insertCollectionPeopleVersion) {
|
|
80
|
+
stmts.insertCollectionPeopleVersion.run(collectionId);
|
|
81
|
+
}
|
|
82
|
+
this.client.db.exec("COMMIT");
|
|
83
|
+
return collectionId;
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
this.client.db.exec("ROLLBACK");
|
|
87
|
+
throw e;
|
|
88
|
+
}
|
|
51
89
|
}
|
|
52
90
|
/**
|
|
53
91
|
* Delete a collection and all its people associations.
|
|
@@ -56,9 +94,35 @@ export class CollectionListRepository {
|
|
|
56
94
|
*/
|
|
57
95
|
deleteCollection(collectionId) {
|
|
58
96
|
const stmts = this.getWriteStatements();
|
|
97
|
+
// Only delete named collections; exclude lists (name IS NULL) are skipped.
|
|
98
|
+
const row = this.client.db
|
|
99
|
+
.prepare("SELECT name FROM collections WHERE id = ? AND name IS NOT NULL")
|
|
100
|
+
.get(collectionId);
|
|
101
|
+
if (!row)
|
|
102
|
+
return false;
|
|
59
103
|
this.client.db.exec("BEGIN");
|
|
60
104
|
try {
|
|
61
105
|
stmts.deleteCollectionPeople.run(collectionId);
|
|
106
|
+
if (stmts.deleteCollectionPeopleVersionsLogs) {
|
|
107
|
+
try {
|
|
108
|
+
stmts.deleteCollectionPeopleVersionsLogs.run(collectionId);
|
|
109
|
+
}
|
|
110
|
+
catch (err) {
|
|
111
|
+
// FK violation expected when logs reference still-needed versions; rethrow anything else
|
|
112
|
+
if (!(err instanceof Error) || !err.message.includes("constraint"))
|
|
113
|
+
throw err;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (stmts.deleteCollectionPeopleVersions) {
|
|
117
|
+
try {
|
|
118
|
+
stmts.deleteCollectionPeopleVersions.run(collectionId);
|
|
119
|
+
}
|
|
120
|
+
catch (err) {
|
|
121
|
+
// FK violation expected when campaign/action versions still reference these entries
|
|
122
|
+
if (!(err instanceof Error) || !err.message.includes("constraint"))
|
|
123
|
+
throw err;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
62
126
|
const result = stmts.deleteCollection.run(collectionId);
|
|
63
127
|
this.client.db.exec("COMMIT");
|
|
64
128
|
return result.changes > 0;
|
|
@@ -145,9 +209,35 @@ export class CollectionListRepository {
|
|
|
145
209
|
if (this.writeStatements)
|
|
146
210
|
return this.writeStatements;
|
|
147
211
|
const { db } = this.client;
|
|
212
|
+
let insertCollectionPeopleVersion = null;
|
|
213
|
+
try {
|
|
214
|
+
insertCollectionPeopleVersion = db.prepare(`INSERT INTO collection_people_versions
|
|
215
|
+
(collection_id, version_operation_status, created_at, updated_at)
|
|
216
|
+
VALUES (?, 'addToTarget', datetime('now'), datetime('now'))`);
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
// Table may not exist in older schemas
|
|
220
|
+
}
|
|
221
|
+
let deleteCollectionPeopleVersionsLogs = null;
|
|
222
|
+
try {
|
|
223
|
+
deleteCollectionPeopleVersionsLogs = db.prepare(`DELETE FROM collection_people_versions_logs WHERE collection_id = ?`);
|
|
224
|
+
}
|
|
225
|
+
catch {
|
|
226
|
+
// Table may not exist in older schemas
|
|
227
|
+
}
|
|
228
|
+
let deleteCollectionPeopleVersions = null;
|
|
229
|
+
try {
|
|
230
|
+
deleteCollectionPeopleVersions = db.prepare(`DELETE FROM collection_people_versions WHERE collection_id = ?`);
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
// Table may not exist in older schemas
|
|
234
|
+
}
|
|
148
235
|
this.writeStatements = {
|
|
149
236
|
insertCollection: db.prepare(`INSERT INTO collections (li_account_id, name, created_at, updated_at)
|
|
150
237
|
VALUES (?, ?, datetime('now'), datetime('now'))`),
|
|
238
|
+
insertCollectionPeopleVersion,
|
|
239
|
+
deleteCollectionPeopleVersionsLogs,
|
|
240
|
+
deleteCollectionPeopleVersions,
|
|
151
241
|
deleteCollectionPeople: db.prepare(`DELETE FROM collection_people WHERE collection_id = ?`),
|
|
152
242
|
deleteCollection: db.prepare(`DELETE FROM collections WHERE id = ? AND name IS NOT NULL`),
|
|
153
243
|
insertCollectionPerson: db.prepare(`INSERT OR IGNORE INTO collection_people (collection_id, person_id)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-list.js","sourceRoot":"","sources":["../../../src/db/repositories/collection-list.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAkBpC;;;;;;;;;GASG;AACH,MAAM,OAAO,wBAAwB;
|
|
1
|
+
{"version":3,"file":"collection-list.js","sourceRoot":"","sources":["../../../src/db/repositories/collection-list.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAkBpC;;;;;;;;;GASG;AACH,MAAM,OAAO,wBAAwB;IAeN;IAdZ,mBAAmB,CAAC;IAErC,yEAAyE;IACjE,eAAe,GASZ,IAAI,CAAC;IAEhB,YAA6B,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;QACjD,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QAEtB,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC,OAAO,CACnC;;;;;;;qBAOe,CAChB,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,wBAAwB,CAAC,iBAAyB;QAChD,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE;iBACvB,OAAO,CAAC,kDAAkD,CAAC;iBAC3D,GAAG,CAAC,iBAAiB,CAA+B,CAAC;YACxD,IAAI,GAAG;gBAAE,OAAO,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,wDAAwD,iBAAiB,EAAE,CAC5E,CAAC;QACJ,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;gBACtE,OAAO,iBAAiB,CAAC;YAC3B,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC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AuC;QACzC,CAAC;QAED,IAAI,8BAA8B,GAA6B,IAAI,CAAC;QACpE,IAAI,CAAC;YACH,8BAA8B,GAAG,EAAE,CAAC,OAAO,CACzC,gEAAgE,CACjE,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,uCAAuC;QACzC,CAAC;QAED,IAAI,CAAC,eAAe,GAAG;YACrB,gBAAgB,EAAE,EAAE,CAAC,OAAO,CAC1B;yDACiD,CAClD;YACD,6BAA6B;YAC7B,kCAAkC;YAClC,8BAA8B;YAC9B,sBAAsB,EAAE,EAAE,CAAC,OAAO,CAChC,uDAAuD,CACxD;YACD,gBAAgB,EAAE,EAAE,CAAC,OAAO,CAC1B,2DAA2D,CAC5D;YACD,sBAAsB,EAAE,EAAE,CAAC,OAAO,CAChC;uBACe,CAChB;YACD,sBAAsB,EAAE,EAAE,CAAC,OAAO,CAChC;mDAC2C,CAC5C;SACF,CAAC;QAEF,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -458,7 +458,8 @@ db.exec(`
|
|
|
458
458
|
created_at DATETIME DEFAULT (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW')),
|
|
459
459
|
updated_at DATETIME DEFAULT (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW')),
|
|
460
460
|
FOREIGN KEY(action_id) REFERENCES actions(id),
|
|
461
|
-
FOREIGN KEY(config_id) REFERENCES action_configs(id)
|
|
461
|
+
FOREIGN KEY(config_id) REFERENCES action_configs(id),
|
|
462
|
+
FOREIGN KEY(exclude_list_id) REFERENCES collection_people_versions(id)
|
|
462
463
|
);
|
|
463
464
|
CREATE INDEX action_versions_action_idx ON action_versions(action_id);
|
|
464
465
|
|
|
@@ -549,12 +550,25 @@ db.exec(`
|
|
|
549
550
|
CREATE INDEX action_result_messages_result_idx ON action_result_messages(action_result_id);
|
|
550
551
|
`);
|
|
551
552
|
db.exec(`
|
|
553
|
+
CREATE TABLE li_accounts(
|
|
554
|
+
id INTEGER PRIMARY KEY,
|
|
555
|
+
external_id INTEGER NOT NULL,
|
|
556
|
+
full_name TEXT,
|
|
557
|
+
created_at DATETIME DEFAULT (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW')),
|
|
558
|
+
updated_at DATETIME DEFAULT (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW')),
|
|
559
|
+
UNIQUE(external_id)
|
|
560
|
+
);
|
|
561
|
+
|
|
562
|
+
INSERT INTO li_accounts (id, external_id, full_name) VALUES (1, 1, 'Test Account');
|
|
563
|
+
INSERT INTO li_accounts (id, external_id, full_name) VALUES (2, 5, 'Test Account 2');
|
|
564
|
+
|
|
552
565
|
CREATE TABLE collections(
|
|
553
566
|
id INTEGER PRIMARY KEY,
|
|
554
567
|
li_account_id INTEGER NOT NULL,
|
|
555
568
|
name TEXT,
|
|
556
569
|
created_at DATETIME DEFAULT (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW')),
|
|
557
|
-
updated_at DATETIME DEFAULT (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW'))
|
|
570
|
+
updated_at DATETIME DEFAULT (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW')),
|
|
571
|
+
FOREIGN KEY(li_account_id) REFERENCES li_accounts(id)
|
|
558
572
|
);
|
|
559
573
|
|
|
560
574
|
CREATE TABLE collection_people_versions(
|
|
@@ -568,6 +582,21 @@ db.exec(`
|
|
|
568
582
|
);
|
|
569
583
|
CREATE INDEX collection_people_versions_collection_idx ON collection_people_versions(collection_id);
|
|
570
584
|
|
|
585
|
+
CREATE TABLE collection_people_versions_logs(
|
|
586
|
+
id INTEGER PRIMARY KEY,
|
|
587
|
+
collection_id INTEGER NOT NULL,
|
|
588
|
+
person_id INTEGER NOT NULL,
|
|
589
|
+
collect_id INTEGER,
|
|
590
|
+
created_at DATETIME DEFAULT (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW')),
|
|
591
|
+
updated_at DATETIME DEFAULT (STRFTIME('%Y-%m-%dT%H:%M:%fZ', 'NOW')),
|
|
592
|
+
collection_people_id INTEGER NOT NULL,
|
|
593
|
+
version_id INTEGER NOT NULL,
|
|
594
|
+
status INTEGER NOT NULL,
|
|
595
|
+
UNIQUE(collection_people_id, version_id, status),
|
|
596
|
+
FOREIGN KEY(collection_id) REFERENCES collections(id),
|
|
597
|
+
FOREIGN KEY(version_id) REFERENCES collection_people_versions(id)
|
|
598
|
+
);
|
|
599
|
+
|
|
571
600
|
CREATE TABLE collection_people(
|
|
572
601
|
collection_id INTEGER,
|
|
573
602
|
person_id INTEGER,
|
|
@@ -710,6 +739,11 @@ db.exec(`
|
|
|
710
739
|
|
|
711
740
|
INSERT INTO collection_people (collection_id, person_id)
|
|
712
741
|
VALUES (1, 2);
|
|
742
|
+
|
|
743
|
+
INSERT INTO collection_people_versions_logs
|
|
744
|
+
(id, collection_id, person_id, collection_people_id, version_id, status, created_at, updated_at)
|
|
745
|
+
VALUES
|
|
746
|
+
(1, 1, 2, 1, 1, 1, '${NOW}', '${NOW}');
|
|
713
747
|
`);
|
|
714
748
|
// Campaign 5: campaign-level + action-level exclude list chains
|
|
715
749
|
// collection 3 → CPV 3 → campaign_version for campaign 5
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-fixture.js","sourceRoot":"","sources":["../../../src/db/testing/create-fixture.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,E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AAG;6BACb,GAAG,OAAO,GAAG;6BACb,GAAG,OAAO,GAAG;;;sBAGpB,GAAG,OAAO,GAAG;;;;;CAKlC,CAAC,CAAC;AAEH,uEAAuE;AAEvE,+DAA+D;AAC/D,oDAAoD;AACpD,6CAA6C;AAC7C,EAAE,CAAC,IAAI,CAAC;;;4BAGoB,GAAG,OAAO,GAAG;0BACf,GAAG,OAAO,GAAG;6BACV,GAAG,OAAO,GAAG;;;;;;;CAOzC,CAAC,CAAC;AAEH,uEAAuE;AAEvE,MAAM,MAAM,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;AAC/B,EAAE,CAAC,KAAK,EAAE,CAAC;AAEX,OAAO,CAAC,GAAG,CAAC,sBAAsB,YAAY,EAAE,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export type { Account, ActionBudget, ActionBudgetEntry, ActionConfig, ActionErrorSummary, ActionPeopleCounts, ActionStatistics, CampaignActionConfig, CampaignActionResult, CampaignActionUpdateConfig, ActionSettings, ActionTargetPerson, Campaign, CampaignAction, CampaignConfig, CampaignPersonEntry, CampaignPersonState, CampaignRunResult, CampaignState, EphemeralActionResult, EphemeralExecuteOptions, ResultProfileData, CampaignStatistics, CampaignStatus, CampaignSummary, CampaignUpdateConfig, CriticalErrorIssueData, DialogIssueData, ExcludeListEntry, Chat, ChatParticipant, ConversationMessages, ConversationThread, CurrentPosition, Education, ExternalId, ExternalIdTypeGroup, FeedPost, GetResultsOptions, GetStatisticsOptions, ImportPeopleResult, LimitType, RemovePeopleResult, InstanceInfo, InstanceIssue, InstancePopup, InstanceStatus, ListCampaignPeopleOptions, ListCampaignsOptions, Message, MessageStats, MessageSummary, MiniProfile, PopupState, PostComment, PostDetail, PostEngager, PostStats, Position, Profile, ProfileFindOptions, ProfileSearchOptions, ProfileSearchResult, ProfileSummary, ReactionCount, RunnerState,
|
|
2
|
-
export { AccountResolutionError, ActionExecutionError, type ActionResult, AppLaunchError, AppNotFoundError, AppService, type AppServiceOptions, BudgetExceededError, CampaignExecutionError, CampaignService, CampaignTimeoutError, EphemeralCampaignService, CollectionBusyError, CollectionError, type DatabaseContext, buildBasicSearchUrl, buildBooleanExpression, buildParameterisedUrl, buildSNSearchUrl, detectSourceType, getFixedUrl, getParameterType, isFixedUrlType, isParameterisedType, isSNSearchBuilderType, isSearchBuilderType, ExtractionTimeoutError, type InstanceDatabaseContext, InstanceNotRunningError, InstanceService, InvalidProfileUrlError, LauncherService, LinkedHelperNotRunningError, LinkedHelperUnreachableError, resolveAccount, ServiceError, StartInstanceError, startInstanceWithRecovery, UIBlockedError, validateSourceType, type StartInstanceOutcome, checkStatus, type AccountInstanceStatus, type DatabaseStatus, type LauncherStatus, type StatusReport, waitForInstancePort, waitForInstanceShutdown, withDatabase, withInstanceDatabase, NodeIntegrationUnavailableError,
|
|
1
|
+
export type { Account, ActionBudget, ActionBudgetEntry, ActionConfig, ActionErrorSummary, ActionPeopleCounts, ActionStatistics, CampaignActionConfig, CampaignActionResult, CampaignActionUpdateConfig, ActionSettings, ActionTargetPerson, Campaign, CampaignAction, CampaignConfig, CampaignPersonEntry, CampaignPersonState, CampaignRunResult, CampaignState, EphemeralActionResult, EphemeralExecuteOptions, ResultProfileData, CampaignStatistics, CampaignStatus, CampaignSummary, CampaignUpdateConfig, CriticalErrorIssueData, DialogIssueData, ExcludeListEntry, Chat, ChatParticipant, ConversationMessages, ConversationThread, CurrentPosition, Education, ExternalId, ExternalIdTypeGroup, FeedPost, GetResultsOptions, GetStatisticsOptions, ImportPeopleResult, LimitType, RemovePeopleResult, InstanceInfo, InstanceIssue, InstancePopup, InstanceStatus, ListCampaignPeopleOptions, ListCampaignsOptions, Message, MessageStats, MessageSummary, MiniProfile, PopupState, PostComment, PostDetail, PostEngager, PostStats, Position, Profile, ProfileFindOptions, ProfileSearchOptions, ProfileSearchResult, ProfileSummary, ReactionCount, RunnerState, Skill, BasicSearchParams, BooleanExpressionInput, BooleanExpressionRaw, BooleanExpressionStructured, CompanySizeEntry, ConnectionDegreeEntry, EntityMatch, EntityType, FunctionEntry, IndustryEntry, ProfileLanguageEntry, ReferenceDataType, SNFilter, SNFilterValue, SNSearchParams, SeniorityEntry, SourceTier, SourceType, StartInstanceParams, StartInstanceResult, ThrottleStatus, UIHealthStatus, UrlBuilderResult, } from "./types/index.js";
|
|
2
|
+
export { AccountResolutionError, ActionExecutionError, type ActionResult, AppLaunchError, AppNotFoundError, AppService, type AppServiceOptions, BudgetExceededError, CampaignExecutionError, CampaignService, CampaignTimeoutError, EphemeralCampaignService, CollectionBusyError, CollectionError, type DatabaseContext, buildBasicSearchUrl, buildBooleanExpression, buildParameterisedUrl, buildSNSearchUrl, detectSourceType, getFixedUrl, getParameterType, isFixedUrlType, isParameterisedType, isSNSearchBuilderType, isSearchBuilderType, ExtractionTimeoutError, type InstanceDatabaseContext, InstanceNotRunningError, InstanceService, InvalidProfileUrlError, LauncherService, LinkedHelperNotRunningError, LinkedHelperUnreachableError, resolveAccount, ServiceError, StartInstanceError, startInstanceWithRecovery, UIBlockedError, validateSourceType, type StartInstanceOutcome, checkStatus, type AccountInstanceStatus, type DatabaseStatus, type LauncherStatus, type StatusReport, waitForInstancePort, waitForInstanceShutdown, withDatabase, withInstanceDatabase, NodeIntegrationUnavailableError, WrongPortError, } from "./services/index.js";
|
|
3
3
|
export { ActionBudgetRepository, CampaignExcludeListRepository, CampaignRepository, CampaignStatisticsRepository, CollectionListRepository, type CollectionSummary, DatabaseClient, type DatabaseClientOptions, discoverAllDatabases, discoverDatabase, MessageRepository, ProfileRepository, } from "./db/index.js";
|
|
4
4
|
export { CampaignFormatError, FormatError, parseCampaignJson, parseCampaignYaml, serializeCampaignJson, serializeCampaignYaml, } from "./formats/index.js";
|
|
5
5
|
export { type ActionCategory, type ActionType, type ActionTypeCatalog, type ActionTypeInfo, type ConfigFieldSchema, getActionTypeCatalog, getActionTypeInfo, getFunctionById, getIndustryById, getLinkedInReferenceData, getSeniorityById, isReferenceDataType, } from "./data/index.js";
|
|
6
6
|
export { ActionNotFoundError, CampaignNotFoundError, ChatNotFoundError, DatabaseError, DatabaseNotFoundError, ExcludeListNotFoundError, NoNextActionError, ProfileNotFoundError, } from "./db/index.js";
|
|
7
|
-
export { CDPConnectionError, CDPError, CDPEvaluationError, CDPTimeoutError, discoverInstancePort, discoverTargets, findApp, type DiscoveredApp, killInstanceProcesses, } from "./cdp/index.js";
|
|
8
|
-
export { type ConnectionOptions, campaignGet, type CampaignGetInput, type CampaignGetOutput, campaignList, type CampaignListInput, type CampaignListOutput, campaignCreate, type CampaignCreateInput, type CampaignCreateOutput, campaignUpdate, type CampaignUpdateInput, type CampaignUpdateOutput, campaignDelete, type CampaignDeleteInput, type CampaignDeleteOutput, campaignErase, type CampaignEraseInput, type CampaignEraseOutput, collectPeople, type CollectPeopleInput, type CollectPeopleOutput, campaignListPeople, type CampaignListPeopleInput, type CampaignListPeopleOutput, campaignStart, type CampaignStartInput, type CampaignStartOutput, campaignStop, type CampaignStopInput, type CampaignStopOutput, campaignRetry, type CampaignRetryInput, type CampaignRetryOutput, campaignMoveNext, type CampaignMoveNextInput, type CampaignMoveNextOutput, campaignStatistics, type CampaignStatisticsInput, type CampaignStatisticsOutput, campaignStatus, type CampaignStatusInput, type CampaignStatusOutput, campaignAddAction, type CampaignAddActionInput, type CampaignAddActionOutput, campaignRemoveAction, type CampaignRemoveActionInput, type CampaignRemoveActionOutput, campaignUpdateAction, type CampaignUpdateActionInput, type CampaignUpdateActionOutput, campaignReorderActions, type CampaignReorderActionsInput, type CampaignReorderActionsOutput, campaignExport, type CampaignExportInput, type CampaignExportOutput, campaignExcludeAdd, type CampaignExcludeAddInput, type CampaignExcludeAddOutput, campaignExcludeRemove, type CampaignExcludeRemoveInput, type CampaignExcludeRemoveOutput, campaignExcludeList, type CampaignExcludeListInput, type CampaignExcludeListOutput, commentOnPost, type CommentOnPostInput, type CommentOnPostOutput, getFeed, type GetFeedInput, type GetFeedOutput, getPost, type GetPostInput, type GetPostOutput, getPostStats, extractPostUrn, type GetPostStatsInput, type GetPostStatsOutput, getPostEngagers, type GetPostEngagersInput, type GetPostEngagersOutput, searchPosts, type SearchPostsInput, type SearchPostsOutput, getProfileActivity, extractProfileId, type GetProfileActivityInput, type GetProfileActivityOutput, getActionBudget, type GetActionBudgetInput, type GetActionBudgetOutput, getThrottleStatus, type GetThrottleStatusInput, type GetThrottleStatusOutput, getErrors, type GetErrorsInput, type GetErrorsOutput, dismissErrors, type DismissErrorsInput, type DismissErrorsOutput, queryMessages, type QueryMessagesInput, type QueryMessagesOutput, checkReplies, type CheckRepliesInput, type CheckRepliesOutput, scrapeMessagingHistory, type ScrapeMessagingHistoryInput, type ScrapeMessagingHistoryOutput, importPeopleFromUrls, type ImportPeopleFromUrlsInput, type ImportPeopleFromUrlsOutput, campaignRemovePeople, type CampaignRemovePeopleInput, type CampaignRemovePeopleOutput, listCollections, type ListCollectionsInput, type ListCollectionsOutput, createCollection, type CreateCollectionInput, type CreateCollectionOutput, deleteCollection, type DeleteCollectionInput, type DeleteCollectionOutput, addPeopleToCollection, type AddPeopleToCollectionInput, type AddPeopleToCollectionOutput, removePeopleFromCollection, type RemovePeopleFromCollectionInput, type RemovePeopleFromCollectionOutput, importPeopleFromCollection, type ImportPeopleFromCollectionInput, type ImportPeopleFromCollectionOutput, visitProfile, type VisitProfileInput, type VisitProfileOutput, reactToPost, REACTION_TYPES, type ReactToPostInput, type ReactToPostOutput, type ReactionType, type EphemeralActionInput, messagePerson, type MessagePersonInput, type MessagePersonOutput, sendInvite, type SendInviteInput, type SendInviteOutput, sendInmail, type SendInmailInput, type SendInmailOutput, followPerson, type FollowPersonInput, type FollowPersonOutput, endorseSkills, type EndorseSkillsInput, type EndorseSkillsOutput, likePersonPosts, type LikePersonPostsInput, type LikePersonPostsOutput, removeConnection, type RemoveConnectionInput, type RemoveConnectionOutput, enrichProfile, type EnrichProfileInput, type EnrichProfileOutput, type EnrichmentCategory, buildLinkedInUrl, type BuildLinkedInUrlInput, type BuildLinkedInUrlOutput, resolveLinkedInEntity, type ResolveLinkedInEntityInput, type ResolveLinkedInEntityOutput, } from "./operations/index.js";
|
|
9
|
-
export { click, hover, scrollTo, typeText, type TypeMethod, waitForElement, type WaitForElementOptions, COMMENT_INPUT, COMMENT_SUBMIT_BUTTON, FEED_POST_CONTAINER,
|
|
7
|
+
export { CDPClient, CDPConnectionError, CDPError, CDPEvaluationError, CDPTimeoutError, discoverInstancePort, discoverTargets, findApp, resolveAppPort, resolveInstancePort, resolveLauncherPort, type AppRole, type DiscoveredApp, killInstanceProcesses, } from "./cdp/index.js";
|
|
8
|
+
export { buildCdpOptions, type ConnectionOptions, campaignGet, type CampaignGetInput, type CampaignGetOutput, campaignList, type CampaignListInput, type CampaignListOutput, campaignCreate, type CampaignCreateInput, type CampaignCreateOutput, campaignUpdate, type CampaignUpdateInput, type CampaignUpdateOutput, campaignDelete, type CampaignDeleteInput, type CampaignDeleteOutput, campaignErase, type CampaignEraseInput, type CampaignEraseOutput, collectPeople, type CollectPeopleInput, type CollectPeopleOutput, campaignListPeople, type CampaignListPeopleInput, type CampaignListPeopleOutput, campaignStart, type CampaignStartInput, type CampaignStartOutput, campaignStop, type CampaignStopInput, type CampaignStopOutput, campaignRetry, type CampaignRetryInput, type CampaignRetryOutput, campaignMoveNext, type CampaignMoveNextInput, type CampaignMoveNextOutput, campaignStatistics, type CampaignStatisticsInput, type CampaignStatisticsOutput, campaignStatus, type CampaignStatusInput, type CampaignStatusOutput, campaignAddAction, type CampaignAddActionInput, type CampaignAddActionOutput, campaignRemoveAction, type CampaignRemoveActionInput, type CampaignRemoveActionOutput, campaignUpdateAction, type CampaignUpdateActionInput, type CampaignUpdateActionOutput, campaignReorderActions, type CampaignReorderActionsInput, type CampaignReorderActionsOutput, campaignExport, type CampaignExportInput, type CampaignExportOutput, campaignExcludeAdd, type CampaignExcludeAddInput, type CampaignExcludeAddOutput, campaignExcludeRemove, type CampaignExcludeRemoveInput, type CampaignExcludeRemoveOutput, campaignExcludeList, type CampaignExcludeListInput, type CampaignExcludeListOutput, commentOnPost, type CommentOnPostInput, type CommentOnPostOutput, getFeed, type GetFeedInput, type GetFeedOutput, getPost, type GetPostInput, type GetPostOutput, getPostStats, extractPostUrn, resolvePostDetailUrl, type GetPostStatsInput, type GetPostStatsOutput, getPostEngagers, type GetPostEngagersInput, type GetPostEngagersOutput, searchPosts, type SearchPostsInput, type SearchPostsOutput, getProfileActivity, extractProfileId, type GetProfileActivityInput, type GetProfileActivityOutput, getActionBudget, type GetActionBudgetInput, type GetActionBudgetOutput, getThrottleStatus, type GetThrottleStatusInput, type GetThrottleStatusOutput, getErrors, type GetErrorsInput, type GetErrorsOutput, dismissErrors, type DismissErrorsInput, type DismissErrorsOutput, queryMessages, type QueryMessagesInput, type QueryMessagesOutput, checkReplies, type CheckRepliesInput, type CheckRepliesOutput, scrapeMessagingHistory, type ScrapeMessagingHistoryInput, type ScrapeMessagingHistoryOutput, importPeopleFromUrls, type ImportPeopleFromUrlsInput, type ImportPeopleFromUrlsOutput, campaignRemovePeople, type CampaignRemovePeopleInput, type CampaignRemovePeopleOutput, listCollections, type ListCollectionsInput, type ListCollectionsOutput, createCollection, type CreateCollectionInput, type CreateCollectionOutput, deleteCollection, type DeleteCollectionInput, type DeleteCollectionOutput, addPeopleToCollection, type AddPeopleToCollectionInput, type AddPeopleToCollectionOutput, removePeopleFromCollection, type RemovePeopleFromCollectionInput, type RemovePeopleFromCollectionOutput, importPeopleFromCollection, type ImportPeopleFromCollectionInput, type ImportPeopleFromCollectionOutput, visitProfile, type VisitProfileInput, type VisitProfileOutput, reactToPost, REACTION_TYPES, type ReactToPostInput, type ReactToPostOutput, type ReactionType, type EphemeralActionInput, messagePerson, type MessagePersonInput, type MessagePersonOutput, sendInvite, type SendInviteInput, type SendInviteOutput, sendInmail, type SendInmailInput, type SendInmailOutput, followPerson, type FollowPersonInput, type FollowPersonOutput, endorseSkills, type EndorseSkillsInput, type EndorseSkillsOutput, likePersonPosts, type LikePersonPostsInput, type LikePersonPostsOutput, removeConnection, type RemoveConnectionInput, type RemoveConnectionOutput, enrichProfile, type EnrichProfileInput, type EnrichProfileOutput, type EnrichmentCategory, buildLinkedInUrl, type BuildLinkedInUrlInput, type BuildLinkedInUrlOutput, resolveLinkedInEntity, type ResolveLinkedInEntityInput, type ResolveLinkedInEntityOutput, } from "./operations/index.js";
|
|
9
|
+
export { click, getElementCenter, hover, humanizedClick, humanizedHover, humanizedScrollY, HumanizedMouse, scrollTo, typeText, type TypeMethod, waitForElement, type WaitForElementOptions, COMMENT_INPUT, COMMENT_SUBMIT_BUTTON, FEED_POST_CONTAINER, REACTION_CELEBRATE, REACTION_FUNNY, REACTION_INSIGHTFUL, REACTION_LIKE, REACTION_LOVE, REACTION_SUPPORT, REACTION_TRIGGER, SELECTORS, type SelectorName, } from "./linkedin/index.js";
|
|
10
10
|
export { DEFAULT_CDP_PORT } from "./constants.js";
|
|
11
|
-
export { delay, errorMessage, isCdpPort, isLoopbackAddress } from "./utils/index.js";
|
|
11
|
+
export { delay, randomDelay, gaussianRandom, gaussianDelay, gaussianBetween, maybeBreak, errorMessage, isCdpPort, isLoopbackAddress, SessionPacer, rhythmMultiplier } from "./utils/index.js";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,IAAI,EACJ,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,QAAQ,EACR,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,yBAAyB,EACzB,oBAAoB,EACpB,OAAO,EACP,YAAY,EACZ,cAAc,EACd,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,OAAO,EACP,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,YAAY,EACV,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,IAAI,EACJ,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,QAAQ,EACR,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,c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L-3.0-only
|
|
2
2
|
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
3
|
// Services
|
|
4
|
-
export { AccountResolutionError, ActionExecutionError, AppLaunchError, AppNotFoundError, AppService, BudgetExceededError, CampaignExecutionError, CampaignService, CampaignTimeoutError, EphemeralCampaignService, CollectionBusyError, CollectionError, buildBasicSearchUrl, buildBooleanExpression, buildParameterisedUrl, buildSNSearchUrl, detectSourceType, getFixedUrl, getParameterType, isFixedUrlType, isParameterisedType, isSNSearchBuilderType, isSearchBuilderType, ExtractionTimeoutError, InstanceNotRunningError, InstanceService, InvalidProfileUrlError, LauncherService, LinkedHelperNotRunningError, LinkedHelperUnreachableError, resolveAccount, ServiceError, StartInstanceError, startInstanceWithRecovery, UIBlockedError, validateSourceType, checkStatus, waitForInstancePort, waitForInstanceShutdown, withDatabase, withInstanceDatabase, NodeIntegrationUnavailableError,
|
|
4
|
+
export { AccountResolutionError, ActionExecutionError, AppLaunchError, AppNotFoundError, AppService, BudgetExceededError, CampaignExecutionError, CampaignService, CampaignTimeoutError, EphemeralCampaignService, CollectionBusyError, CollectionError, buildBasicSearchUrl, buildBooleanExpression, buildParameterisedUrl, buildSNSearchUrl, detectSourceType, getFixedUrl, getParameterType, isFixedUrlType, isParameterisedType, isSNSearchBuilderType, isSearchBuilderType, ExtractionTimeoutError, InstanceNotRunningError, InstanceService, InvalidProfileUrlError, LauncherService, LinkedHelperNotRunningError, LinkedHelperUnreachableError, resolveAccount, ServiceError, StartInstanceError, startInstanceWithRecovery, UIBlockedError, validateSourceType, checkStatus, waitForInstancePort, waitForInstanceShutdown, withDatabase, withInstanceDatabase, NodeIntegrationUnavailableError, WrongPortError, } from "./services/index.js";
|
|
5
5
|
// Data access
|
|
6
6
|
export { ActionBudgetRepository, CampaignExcludeListRepository, CampaignRepository, CampaignStatisticsRepository, CollectionListRepository, DatabaseClient, discoverAllDatabases, discoverDatabase, MessageRepository, ProfileRepository, } from "./db/index.js";
|
|
7
7
|
// Formats
|
|
@@ -10,9 +10,9 @@ export { CampaignFormatError, FormatError, parseCampaignJson, parseCampaignYaml,
|
|
|
10
10
|
export { getActionTypeCatalog, getActionTypeInfo, getFunctionById, getIndustryById, getLinkedInReferenceData, getSeniorityById, isReferenceDataType, } from "./data/index.js";
|
|
11
11
|
// Errors (DB + CDP errors can propagate through the service layer)
|
|
12
12
|
export { ActionNotFoundError, CampaignNotFoundError, ChatNotFoundError, DatabaseError, DatabaseNotFoundError, ExcludeListNotFoundError, NoNextActionError, ProfileNotFoundError, } from "./db/index.js";
|
|
13
|
-
export { CDPConnectionError, CDPError, CDPEvaluationError, CDPTimeoutError, discoverInstancePort, discoverTargets, findApp, killInstanceProcesses, } from "./cdp/index.js";
|
|
13
|
+
export { CDPClient, CDPConnectionError, CDPError, CDPEvaluationError, CDPTimeoutError, discoverInstancePort, discoverTargets, findApp, resolveAppPort, resolveInstancePort, resolveLauncherPort, killInstanceProcesses, } from "./cdp/index.js";
|
|
14
14
|
// Operations (shared business logic for CLI + MCP)
|
|
15
|
-
export {
|
|
15
|
+
export { buildCdpOptions,
|
|
16
16
|
// Campaign CRUD
|
|
17
17
|
campaignGet, campaignList, campaignCreate, campaignUpdate, campaignDelete, campaignErase,
|
|
18
18
|
// People collection
|
|
@@ -32,7 +32,7 @@ getFeed,
|
|
|
32
32
|
// Post detail
|
|
33
33
|
getPost,
|
|
34
34
|
// Post analytics
|
|
35
|
-
getPostStats, extractPostUrn, getPostEngagers,
|
|
35
|
+
getPostStats, extractPostUrn, resolvePostDetailUrl, getPostEngagers,
|
|
36
36
|
// Post search
|
|
37
37
|
searchPosts,
|
|
38
38
|
// Profile activity
|
|
@@ -52,9 +52,9 @@ reactToPost, REACTION_TYPES, messagePerson, sendInvite, sendInmail, followPerson
|
|
|
52
52
|
// URL building & entity resolution
|
|
53
53
|
buildLinkedInUrl, resolveLinkedInEntity, } from "./operations/index.js";
|
|
54
54
|
// LinkedIn DOM automation & selectors
|
|
55
|
-
export { click, hover,
|
|
55
|
+
export { click, getElementCenter, hover, humanizedClick, humanizedHover, humanizedScrollY, HumanizedMouse, scrollTo, typeText, waitForElement, COMMENT_INPUT, COMMENT_SUBMIT_BUTTON, FEED_POST_CONTAINER, REACTION_CELEBRATE, REACTION_FUNNY, REACTION_INSIGHTFUL, REACTION_LIKE, REACTION_LOVE, REACTION_SUPPORT, REACTION_TRIGGER, SELECTORS, } from "./linkedin/index.js";
|
|
56
56
|
// Constants
|
|
57
57
|
export { DEFAULT_CDP_PORT } from "./constants.js";
|
|
58
58
|
// Utilities
|
|
59
|
-
export { delay, errorMessage, isCdpPort, isLoopbackAddress } from "./utils/index.js";
|
|
59
|
+
export { delay, randomDelay, gaussianRandom, gaussianDelay, gaussianBetween, maybeBreak, errorMessage, isCdpPort, isLoopbackAddress, SessionPacer, rhythmMultiplier } from "./utils/index.js";
|
|
60
60
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAgGpC,WAAW;AACX,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EAEpB,cAAc,EACd,gBAAgB,EAChB,UAAU,EAEV,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EAEf,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EAEtB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,2BAA2B,EAC3B,4BAA4B,EAC5B,cAA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AAE7B,YAAY;AACZ,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,YAAY;AACZ,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom-automation-retry.test.d.ts","sourceRoot":"","sources":["../../src/linkedin/dom-automation-retry.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { describe, expect, it, vi } from "vitest";
|
|
4
|
+
// Mock delay internals before importing the module under test so retries
|
|
5
|
+
// resolve instantly (Vitest hoists vi.mock, but explicit ordering is clearer).
|
|
6
|
+
vi.mock("../utils/delay.js", () => ({
|
|
7
|
+
delay: vi.fn().mockResolvedValue(undefined),
|
|
8
|
+
randomDelay: vi.fn().mockResolvedValue(undefined),
|
|
9
|
+
randomBetween: vi.fn().mockReturnValue(0),
|
|
10
|
+
gaussianRandom: vi.fn().mockReturnValue(0),
|
|
11
|
+
gaussianDelay: vi.fn().mockResolvedValue(undefined),
|
|
12
|
+
gaussianBetween: vi.fn().mockReturnValue(0),
|
|
13
|
+
maybeHesitate: vi.fn().mockResolvedValue(undefined),
|
|
14
|
+
maybeBreak: vi.fn().mockResolvedValue(undefined),
|
|
15
|
+
simulateReadingTime: vi.fn().mockResolvedValue(undefined),
|
|
16
|
+
}));
|
|
17
|
+
import { retryInteraction } from "./dom-automation.js";
|
|
18
|
+
describe("retryInteraction", () => {
|
|
19
|
+
it("returns the result on first success", async () => {
|
|
20
|
+
const fn = vi.fn().mockResolvedValue("ok");
|
|
21
|
+
const result = await retryInteraction(fn, 3);
|
|
22
|
+
expect(result).toBe("ok");
|
|
23
|
+
expect(fn).toHaveBeenCalledTimes(1);
|
|
24
|
+
});
|
|
25
|
+
it("retries on failure and returns eventual success", async () => {
|
|
26
|
+
const fn = vi
|
|
27
|
+
.fn()
|
|
28
|
+
.mockRejectedValueOnce(new Error("fail"))
|
|
29
|
+
.mockResolvedValue("recovered");
|
|
30
|
+
const result = await retryInteraction(fn, 3);
|
|
31
|
+
expect(result).toBe("recovered");
|
|
32
|
+
expect(fn).toHaveBeenCalledTimes(2);
|
|
33
|
+
});
|
|
34
|
+
it("throws after exhausting all attempts", async () => {
|
|
35
|
+
const fn = vi.fn().mockRejectedValue(new Error("persistent"));
|
|
36
|
+
await expect(retryInteraction(fn, 2)).rejects.toThrow("persistent");
|
|
37
|
+
expect(fn).toHaveBeenCalledTimes(2);
|
|
38
|
+
});
|
|
39
|
+
it("defaults to 2 max attempts", async () => {
|
|
40
|
+
const fn = vi.fn().mockRejectedValue(new Error("fail"));
|
|
41
|
+
await expect(retryInteraction(fn)).rejects.toThrow("fail");
|
|
42
|
+
expect(fn).toHaveBeenCalledTimes(2);
|
|
43
|
+
});
|
|
44
|
+
it("returns null without retrying when fn returns null", async () => {
|
|
45
|
+
const fn = vi.fn().mockResolvedValue(null);
|
|
46
|
+
const result = await retryInteraction(fn, 3);
|
|
47
|
+
expect(result).toBeNull();
|
|
48
|
+
expect(fn).toHaveBeenCalledTimes(1);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=dom-automation-retry.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom-automation-retry.test.js","sourceRoot":"","sources":["../../src/linkedin/dom-automation-retry.test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAElD,yEAAyE;AACzE,+EAA+E;AAC/E,EAAE,C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