@lhremote/core 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -0
- package/dist/cdp/client.d.ts +5 -1
- package/dist/cdp/client.d.ts.map +1 -1
- package/dist/cdp/client.js +11 -3
- package/dist/cdp/client.js.map +1 -1
- package/dist/data/index.d.ts +1 -0
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/index.js +1 -0
- package/dist/data/index.js.map +1 -1
- package/dist/data/linkedin-reference.d.ts +44 -0
- package/dist/data/linkedin-reference.d.ts.map +1 -0
- package/dist/data/linkedin-reference.js +316 -0
- package/dist/data/linkedin-reference.js.map +1 -0
- package/dist/data/linkedin-reference.test.d.ts +2 -0
- package/dist/data/linkedin-reference.test.d.ts.map +1 -0
- package/dist/data/linkedin-reference.test.js +124 -0
- package/dist/data/linkedin-reference.test.js.map +1 -0
- 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/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 +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -6
- 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/__tests__/selectors.integration.test.d.ts +2 -0
- package/dist/linkedin/__tests__/selectors.integration.test.d.ts.map +1 -0
- package/dist/linkedin/__tests__/selectors.integration.test.js +258 -0
- package/dist/linkedin/__tests__/selectors.integration.test.js.map +1 -0
- package/dist/linkedin/dom-automation.d.ts +67 -0
- package/dist/linkedin/dom-automation.d.ts.map +1 -0
- package/dist/linkedin/dom-automation.js +139 -0
- package/dist/linkedin/dom-automation.js.map +1 -0
- package/dist/linkedin/index.d.ts +3 -0
- package/dist/linkedin/index.d.ts.map +1 -0
- package/dist/linkedin/index.js +5 -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/build-linkedin-url.d.ts +39 -0
- package/dist/operations/build-linkedin-url.d.ts.map +1 -0
- package/dist/operations/build-linkedin-url.js +72 -0
- package/dist/operations/build-linkedin-url.js.map +1 -0
- package/dist/operations/campaign-delete.d.ts +6 -2
- package/dist/operations/campaign-delete.d.ts.map +1 -1
- package/dist/operations/campaign-delete.js +9 -2
- 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 +22 -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/comment-on-post.d.ts +34 -0
- package/dist/operations/comment-on-post.d.ts.map +1 -0
- package/dist/operations/comment-on-post.js +108 -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 +240 -0
- package/dist/operations/comment-on-post.test.js.map +1 -0
- package/dist/operations/dismiss-errors.d.ts +22 -0
- package/dist/operations/dismiss-errors.d.ts.map +1 -0
- package/dist/operations/dismiss-errors.js +55 -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 +136 -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/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/ephemeral-action.d.ts +22 -0
- package/dist/operations/ephemeral-action.d.ts.map +1 -0
- package/dist/operations/ephemeral-action.js +31 -0
- package/dist/operations/ephemeral-action.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/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 +22 -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 +9 -3
- package/dist/operations/get-errors.d.ts.map +1 -1
- package/dist/operations/get-errors.js +41 -4
- package/dist/operations/get-errors.js.map +1 -1
- package/dist/operations/get-errors.test.js +108 -42
- package/dist/operations/get-errors.test.js.map +1 -1
- package/dist/operations/get-feed.d.ts +33 -0
- package/dist/operations/get-feed.d.ts.map +1 -0
- package/dist/operations/get-feed.js +220 -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 +276 -0
- package/dist/operations/get-feed.test.js.map +1 -0
- package/dist/operations/get-post-engagers.d.ts +40 -0
- package/dist/operations/get-post-engagers.d.ts.map +1 -0
- package/dist/operations/get-post-engagers.js +128 -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 +19 -0
- package/dist/operations/get-post-engagers.test.js.map +1 -0
- package/dist/operations/get-post-stats.d.ts +38 -0
- package/dist/operations/get-post-stats.d.ts.map +1 -0
- package/dist/operations/get-post-stats.js +100 -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 +34 -0
- package/dist/operations/get-post-stats.test.js.map +1 -0
- package/dist/operations/get-post.d.ts +183 -0
- package/dist/operations/get-post.d.ts.map +1 -0
- package/dist/operations/get-post.js +270 -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 +449 -0
- package/dist/operations/get-post.test.js.map +1 -0
- package/dist/operations/get-profile-activity.d.ts +129 -0
- package/dist/operations/get-profile-activity.d.ts.map +1 -0
- package/dist/operations/get-profile-activity.js +181 -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 +205 -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 +30 -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/index.d.ts +24 -0
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +35 -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/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/react-to-post.d.ts +38 -0
- package/dist/operations/react-to-post.d.ts.map +1 -0
- package/dist/operations/react-to-post.js +82 -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 +154 -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/resolve-linkedin-entity.d.ts +33 -0
- package/dist/operations/resolve-linkedin-entity.d.ts.map +1 -0
- package/dist/operations/resolve-linkedin-entity.js +198 -0
- package/dist/operations/resolve-linkedin-entity.js.map +1 -0
- package/dist/operations/search-posts.d.ts +143 -0
- package/dist/operations/search-posts.d.ts.map +1 -0
- package/dist/operations/search-posts.js +220 -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 +261 -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-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/visit-profile.d.ts +14 -0
- package/dist/operations/visit-profile.d.ts.map +1 -0
- package/dist/operations/visit-profile.js +49 -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/app.d.ts.map +1 -1
- package/dist/services/app.js +37 -12
- package/dist/services/app.js.map +1 -1
- package/dist/services/app.test.js +57 -0
- package/dist/services/app.test.js.map +1 -1
- package/dist/services/boolean-expression.d.ts +29 -0
- package/dist/services/boolean-expression.d.ts.map +1 -0
- package/dist/services/boolean-expression.js +79 -0
- package/dist/services/boolean-expression.js.map +1 -0
- package/dist/services/boolean-expression.test.d.ts +2 -0
- package/dist/services/boolean-expression.test.d.ts.map +1 -0
- package/dist/services/boolean-expression.test.js +64 -0
- package/dist/services/boolean-expression.test.js.map +1 -0
- package/dist/services/campaign.d.ts +10 -0
- package/dist/services/campaign.d.ts.map +1 -1
- package/dist/services/campaign.js +16 -0
- 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 +33 -5
- package/dist/services/collection.js.map +1 -1
- package/dist/services/collection.test.js +64 -6
- 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 +21 -0
- package/dist/services/errors.d.ts.map +1 -1
- package/dist/services/errors.js +35 -0
- package/dist/services/errors.js.map +1 -1
- package/dist/services/index.d.ts +7 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +7 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/instance-context.d.ts.map +1 -1
- package/dist/services/instance-context.js +9 -1
- package/dist/services/instance-context.js.map +1 -1
- package/dist/services/instance-context.test.js +77 -1
- package/dist/services/instance-context.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 +151 -0
- package/dist/services/instance.js.map +1 -1
- package/dist/services/instance.test.js +101 -0
- package/dist/services/instance.test.js.map +1 -1
- package/dist/services/launcher.d.ts +23 -0
- package/dist/services/launcher.d.ts.map +1 -1
- package/dist/services/launcher.js +81 -11
- package/dist/services/launcher.js.map +1 -1
- package/dist/services/launcher.test.js +109 -42
- package/dist/services/launcher.test.js.map +1 -1
- package/dist/services/sn-url-builder.d.ts +21 -0
- package/dist/services/sn-url-builder.d.ts.map +1 -0
- package/dist/services/sn-url-builder.js +132 -0
- package/dist/services/sn-url-builder.js.map +1 -0
- package/dist/services/sn-url-builder.test.d.ts +2 -0
- package/dist/services/sn-url-builder.test.d.ts.map +1 -0
- package/dist/services/sn-url-builder.test.js +130 -0
- package/dist/services/sn-url-builder.test.js.map +1 -0
- package/dist/services/url-builder.d.ts +12 -0
- package/dist/services/url-builder.d.ts.map +1 -0
- package/dist/services/url-builder.js +100 -0
- package/dist/services/url-builder.js.map +1 -0
- package/dist/services/url-builder.test.d.ts +2 -0
- package/dist/services/url-builder.test.d.ts.map +1 -0
- package/dist/services/url-builder.test.js +79 -0
- package/dist/services/url-builder.test.js.map +1 -0
- package/dist/services/url-templates.d.ts +41 -0
- package/dist/services/url-templates.d.ts.map +1 -0
- package/dist/services/url-templates.js +118 -0
- package/dist/services/url-templates.js.map +1 -0
- package/dist/services/url-templates.test.d.ts +2 -0
- package/dist/services/url-templates.test.d.ts.map +1 -0
- package/dist/services/url-templates.test.js +159 -0
- package/dist/services/url-templates.test.js.map +1 -0
- 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 +32 -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 +8 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/linkedin-url.d.ts +109 -0
- package/dist/types/linkedin-url.d.ts.map +1 -0
- package/dist/types/linkedin-url.js +4 -0
- package/dist/types/linkedin-url.js.map +1 -0
- 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/search-posts.d.ts +22 -0
- package/dist/types/search-posts.d.ts.map +1 -0
- package/dist/types/search-posts.js +4 -0
- package/dist/types/search-posts.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/voyager/index.d.ts +2 -0
- package/dist/voyager/index.d.ts.map +1 -0
- package/dist/voyager/index.js +4 -0
- package/dist/voyager/index.js.map +1 -0
- package/dist/voyager/interceptor.d.ts +100 -0
- package/dist/voyager/interceptor.d.ts.map +1 -0
- package/dist/voyager/interceptor.integration.test.d.ts +2 -0
- package/dist/voyager/interceptor.integration.test.d.ts.map +1 -0
- package/dist/voyager/interceptor.integration.test.js +89 -0
- package/dist/voyager/interceptor.integration.test.js.map +1 -0
- package/dist/voyager/interceptor.js +235 -0
- package/dist/voyager/interceptor.js.map +1 -0
- package/dist/voyager/interceptor.test.d.ts +2 -0
- package/dist/voyager/interceptor.test.d.ts.map +1 -0
- package/dist/voyager/interceptor.test.js +372 -0
- package/dist/voyager/interceptor.test.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { CDPClient } from "../cdp/client.js";
|
|
4
|
+
import { discoverTargets } from "../cdp/discovery.js";
|
|
5
|
+
import { VoyagerInterceptor } from "../voyager/interceptor.js";
|
|
6
|
+
import { DEFAULT_CDP_PORT } from "../constants.js";
|
|
7
|
+
/** Regex to extract the public ID from a LinkedIn profile URL. */
|
|
8
|
+
const LINKEDIN_PROFILE_RE = /linkedin\.com\/in\/([^/?#]+)/;
|
|
9
|
+
/**
|
|
10
|
+
* Extract a LinkedIn public profile ID from a URL or bare identifier.
|
|
11
|
+
*
|
|
12
|
+
* Accepts:
|
|
13
|
+
* - Full URL: `https://www.linkedin.com/in/johndoe`
|
|
14
|
+
* - Bare public ID: `johndoe`
|
|
15
|
+
*
|
|
16
|
+
* @returns The decoded public ID.
|
|
17
|
+
*/
|
|
18
|
+
export function extractProfileId(input) {
|
|
19
|
+
const match = LINKEDIN_PROFILE_RE.exec(input);
|
|
20
|
+
if (match?.[1]) {
|
|
21
|
+
return decodeURIComponent(match[1]);
|
|
22
|
+
}
|
|
23
|
+
// Treat as bare public ID if it doesn't look like a URL
|
|
24
|
+
if (input.length > 0 && !input.includes("/") && !input.includes(":")) {
|
|
25
|
+
return input;
|
|
26
|
+
}
|
|
27
|
+
throw new Error(`Cannot extract profile ID from: ${input}. ` +
|
|
28
|
+
"Expected a LinkedIn profile URL (https://www.linkedin.com/in/<id>) or a bare public ID.");
|
|
29
|
+
}
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
// Response parsing
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a headline value that may be a string or an object with a `text` field.
|
|
35
|
+
*/
|
|
36
|
+
function resolveText(value) {
|
|
37
|
+
if (value === undefined || value === null)
|
|
38
|
+
return null;
|
|
39
|
+
if (typeof value === "string")
|
|
40
|
+
return value;
|
|
41
|
+
return value.text ?? null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Build a lookup map of included mini-profile entities by URN.
|
|
45
|
+
*/
|
|
46
|
+
function buildProfileLookup(included) {
|
|
47
|
+
const map = new Map();
|
|
48
|
+
for (const entity of included) {
|
|
49
|
+
if (entity.entityUrn) {
|
|
50
|
+
map.set(entity.entityUrn, entity);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return map;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Parse the Voyager profile-updates response into normalised FeedPost entries.
|
|
57
|
+
*
|
|
58
|
+
* @internal Exported for testing only.
|
|
59
|
+
*/
|
|
60
|
+
export function parseProfileUpdatesResponse(raw) {
|
|
61
|
+
const elements = raw.data?.elements ?? raw.elements ?? [];
|
|
62
|
+
const paging = raw.data?.paging ?? raw.paging;
|
|
63
|
+
const included = raw.included ?? [];
|
|
64
|
+
const profilesByUrn = buildProfileLookup(included);
|
|
65
|
+
const posts = [];
|
|
66
|
+
for (const el of elements) {
|
|
67
|
+
const urn = el.updateMetadata?.urn ?? el.urn;
|
|
68
|
+
if (!urn)
|
|
69
|
+
continue;
|
|
70
|
+
// Resolve text — primary commentary, fall back to reshared
|
|
71
|
+
const text = resolveText(el.commentary?.text) ??
|
|
72
|
+
resolveText(el.resharedUpdate?.commentary?.text) ??
|
|
73
|
+
null;
|
|
74
|
+
// Resolve author info — inline actor or included entity lookup
|
|
75
|
+
let authorName = resolveText(el.actor?.name) ?? null;
|
|
76
|
+
let authorPublicId = el.actor?.publicIdentifier ?? null;
|
|
77
|
+
let authorHeadline = resolveText(el.actor?.description) ?? null;
|
|
78
|
+
if (authorName === null) {
|
|
79
|
+
const actorUrn = el.actor?.urn ?? el.actor?.["*miniProfile"];
|
|
80
|
+
if (actorUrn) {
|
|
81
|
+
const profile = profilesByUrn.get(actorUrn);
|
|
82
|
+
if (profile) {
|
|
83
|
+
authorName = [profile.firstName, profile.lastName]
|
|
84
|
+
.filter(Boolean)
|
|
85
|
+
.join(" ") || null;
|
|
86
|
+
authorPublicId = profile.publicIdentifier ?? null;
|
|
87
|
+
authorHeadline =
|
|
88
|
+
resolveText(profile.headline) ?? profile.occupation ?? null;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Build post URL from share URL or URN
|
|
93
|
+
const url = el.updateMetadata?.shareUrl ?? null;
|
|
94
|
+
// Social counts
|
|
95
|
+
const counts = el.socialDetail?.totalSocialActivityCounts;
|
|
96
|
+
posts.push({
|
|
97
|
+
urn,
|
|
98
|
+
url,
|
|
99
|
+
authorName,
|
|
100
|
+
authorHeadline,
|
|
101
|
+
authorProfileUrl: null,
|
|
102
|
+
authorPublicId,
|
|
103
|
+
text,
|
|
104
|
+
mediaType: null,
|
|
105
|
+
reactionCount: counts?.numLikes ?? 0,
|
|
106
|
+
commentCount: counts?.numComments ?? 0,
|
|
107
|
+
shareCount: counts?.numShares ?? 0,
|
|
108
|
+
timestamp: el.publishedAt ?? null,
|
|
109
|
+
hashtags: [],
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
posts,
|
|
114
|
+
paging: {
|
|
115
|
+
start: paging?.start ?? 0,
|
|
116
|
+
count: paging?.count ?? posts.length,
|
|
117
|
+
total: paging?.total ?? posts.length,
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
// ---------------------------------------------------------------------------
|
|
122
|
+
// Main operation
|
|
123
|
+
// ---------------------------------------------------------------------------
|
|
124
|
+
/**
|
|
125
|
+
* Retrieve recent posts/activity from a LinkedIn profile.
|
|
126
|
+
*
|
|
127
|
+
* Connects to the LinkedIn webview in LinkedHelper and calls the
|
|
128
|
+
* Voyager identity/profileUpdates API to get the profile's recent
|
|
129
|
+
* posts with engagement counts.
|
|
130
|
+
*
|
|
131
|
+
* @param input - Profile identifier, pagination, and CDP connection options.
|
|
132
|
+
* @returns List of posts with pagination metadata.
|
|
133
|
+
*/
|
|
134
|
+
export async function getProfileActivity(input) {
|
|
135
|
+
const cdpPort = input.cdpPort ?? DEFAULT_CDP_PORT;
|
|
136
|
+
const cdpHost = input.cdpHost ?? "127.0.0.1";
|
|
137
|
+
const allowRemote = input.allowRemote ?? false;
|
|
138
|
+
const count = input.count ?? 20;
|
|
139
|
+
const start = input.start ?? 0;
|
|
140
|
+
const profilePublicId = extractProfileId(input.profile);
|
|
141
|
+
// Enforce loopback guard
|
|
142
|
+
if (!allowRemote && cdpHost !== "127.0.0.1" && cdpHost !== "localhost") {
|
|
143
|
+
throw new Error(`Non-loopback CDP host "${cdpHost}" requires --allow-remote. ` +
|
|
144
|
+
"This is a security measure to prevent remote code execution.");
|
|
145
|
+
}
|
|
146
|
+
const targets = await discoverTargets(cdpPort, cdpHost);
|
|
147
|
+
const linkedInTarget = targets.find((t) => t.type === "page" && t.url?.includes("linkedin.com"));
|
|
148
|
+
if (!linkedInTarget) {
|
|
149
|
+
throw new Error("No LinkedIn page found in LinkedHelper. " +
|
|
150
|
+
"Ensure LinkedHelper is running with an active LinkedIn session.");
|
|
151
|
+
}
|
|
152
|
+
const client = new CDPClient(cdpPort, { host: cdpHost, allowRemote });
|
|
153
|
+
await client.connect(linkedInTarget.id);
|
|
154
|
+
try {
|
|
155
|
+
const voyager = new VoyagerInterceptor(client);
|
|
156
|
+
const encodedId = encodeURIComponent(profilePublicId);
|
|
157
|
+
const profileUrn = `urn:li:fsd_profile:${encodedId}`;
|
|
158
|
+
const encodedUrn = encodeURIComponent(profileUrn);
|
|
159
|
+
const path = `/voyager/api/identity/dash/profileUpdates` +
|
|
160
|
+
`?q=memberShareFeed&profileUrn=${encodedUrn}` +
|
|
161
|
+
`&start=${String(start)}&count=${String(count)}`;
|
|
162
|
+
const response = await voyager.fetch(path);
|
|
163
|
+
if (response.status !== 200) {
|
|
164
|
+
throw new Error(`Voyager API returned HTTP ${String(response.status)} for profile activity`);
|
|
165
|
+
}
|
|
166
|
+
const body = response.body;
|
|
167
|
+
if (body === null || typeof body !== "object") {
|
|
168
|
+
throw new Error("Voyager API returned an unexpected response format for profile activity");
|
|
169
|
+
}
|
|
170
|
+
const parsed = parseProfileUpdatesResponse(body);
|
|
171
|
+
return {
|
|
172
|
+
profilePublicId,
|
|
173
|
+
posts: parsed.posts,
|
|
174
|
+
paging: parsed.paging,
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
finally {
|
|
178
|
+
client.disconnect();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=get-profile-activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-profile-activity.js","sourceRoot":"","sources":["../../src/operations/get-profile-activity.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AA+BnD,kEAAkE;AAClE,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,MAAM,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACf,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,wDAAwD;IACxD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACrE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,IAAI,KAAK,CACb,mCAAmC,KAAK,IAAI;QAC1C,yFAAyF,CAC5F,CAAC;AACJ,CAAC;AA+DD,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E;;GAEG;AACH,SAAS,WAAW,CAClB,KAA6C;IAE7C,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACvD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,KAAK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,CAAC,KAAK;YACnB,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-profile-activity.test.d.ts","sourceRoot":"","sources":["../../src/operations/get-profile-activity.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { describe, expect, it } from "vitest";
|
|
4
|
+
import { extractProfileId, parseProfileUpdatesResponse, } from "./get-profile-activity.js";
|
|
5
|
+
describe("extractProfileId", () => {
|
|
6
|
+
it("extracts public ID from full profile URL", () => {
|
|
7
|
+
expect(extractProfileId("https://www.linkedin.com/in/johndoe")).toBe("johndoe");
|
|
8
|
+
});
|
|
9
|
+
it("extracts public ID from profile URL with trailing slash", () => {
|
|
10
|
+
expect(extractProfileId("https://www.linkedin.com/in/johndoe/")).toBe("johndoe");
|
|
11
|
+
});
|
|
12
|
+
it("extracts public ID from profile URL with query params", () => {
|
|
13
|
+
expect(extractProfileId("https://www.linkedin.com/in/johndoe?miniProfileUrn=urn")).toBe("johndoe");
|
|
14
|
+
});
|
|
15
|
+
it("extracts public ID from profile URL with hash", () => {
|
|
16
|
+
expect(extractProfileId("https://www.linkedin.com/in/johndoe#section")).toBe("johndoe");
|
|
17
|
+
});
|
|
18
|
+
it("decodes URL-encoded public ID", () => {
|
|
19
|
+
expect(extractProfileId("https://www.linkedin.com/in/john%20doe")).toBe("john doe");
|
|
20
|
+
});
|
|
21
|
+
it("passes through bare public ID", () => {
|
|
22
|
+
expect(extractProfileId("johndoe")).toBe("johndoe");
|
|
23
|
+
});
|
|
24
|
+
it("passes through bare public ID with hyphens", () => {
|
|
25
|
+
expect(extractProfileId("john-doe-123")).toBe("john-doe-123");
|
|
26
|
+
});
|
|
27
|
+
it("throws on unrecognised URL", () => {
|
|
28
|
+
expect(() => extractProfileId("https://example.com/foo")).toThrow("Cannot extract profile ID from");
|
|
29
|
+
});
|
|
30
|
+
it("throws on empty input", () => {
|
|
31
|
+
expect(() => extractProfileId("")).toThrow("Cannot extract profile ID from");
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
describe("parseProfileUpdatesResponse", () => {
|
|
35
|
+
it("parses elements from data wrapper", () => {
|
|
36
|
+
const result = parseProfileUpdatesResponse({
|
|
37
|
+
data: {
|
|
38
|
+
elements: [
|
|
39
|
+
{
|
|
40
|
+
updateMetadata: {
|
|
41
|
+
urn: "urn:li:activity:123",
|
|
42
|
+
shareUrl: "https://www.linkedin.com/feed/update/urn:li:activity:123",
|
|
43
|
+
},
|
|
44
|
+
commentary: { text: { text: "Hello world" } },
|
|
45
|
+
actor: {
|
|
46
|
+
name: { text: "Jane Doe" },
|
|
47
|
+
publicIdentifier: "janedoe",
|
|
48
|
+
description: { text: "Engineer at Acme" },
|
|
49
|
+
},
|
|
50
|
+
publishedAt: 1679000000000,
|
|
51
|
+
socialDetail: {
|
|
52
|
+
totalSocialActivityCounts: {
|
|
53
|
+
numLikes: 10,
|
|
54
|
+
numComments: 5,
|
|
55
|
+
numShares: 2,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
paging: { start: 0, count: 20, total: 1 },
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
expect(result.posts).toHaveLength(1);
|
|
64
|
+
expect(result.posts[0]).toEqual({
|
|
65
|
+
urn: "urn:li:activity:123",
|
|
66
|
+
text: "Hello world",
|
|
67
|
+
authorName: "Jane Doe",
|
|
68
|
+
authorPublicId: "janedoe",
|
|
69
|
+
authorHeadline: "Engineer at Acme",
|
|
70
|
+
authorProfileUrl: null,
|
|
71
|
+
url: "https://www.linkedin.com/feed/update/urn:li:activity:123",
|
|
72
|
+
timestamp: 1679000000000,
|
|
73
|
+
mediaType: null,
|
|
74
|
+
reactionCount: 10,
|
|
75
|
+
commentCount: 5,
|
|
76
|
+
shareCount: 2,
|
|
77
|
+
hashtags: [],
|
|
78
|
+
});
|
|
79
|
+
expect(result.paging).toEqual({ start: 0, count: 20, total: 1 });
|
|
80
|
+
});
|
|
81
|
+
it("parses elements from top-level (no data wrapper)", () => {
|
|
82
|
+
const result = parseProfileUpdatesResponse({
|
|
83
|
+
elements: [
|
|
84
|
+
{
|
|
85
|
+
urn: "urn:li:activity:456",
|
|
86
|
+
commentary: { text: { text: "Top-level element" } },
|
|
87
|
+
actor: { name: { text: "Bob" }, publicIdentifier: "bob" },
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
paging: { start: 5, count: 10, total: 50 },
|
|
91
|
+
});
|
|
92
|
+
expect(result.posts).toHaveLength(1);
|
|
93
|
+
const post = result.posts[0];
|
|
94
|
+
expect(post?.urn).toBe("urn:li:activity:456");
|
|
95
|
+
expect(post?.text).toBe("Top-level element");
|
|
96
|
+
expect(result.paging).toEqual({ start: 5, count: 10, total: 50 });
|
|
97
|
+
});
|
|
98
|
+
it("skips elements without URN", () => {
|
|
99
|
+
const result = parseProfileUpdatesResponse({
|
|
100
|
+
elements: [
|
|
101
|
+
{ commentary: { text: { text: "No URN" } } },
|
|
102
|
+
{ urn: "urn:li:activity:789", commentary: { text: { text: "Has URN" } } },
|
|
103
|
+
],
|
|
104
|
+
});
|
|
105
|
+
expect(result.posts).toHaveLength(1);
|
|
106
|
+
expect(result.posts[0]?.urn).toBe("urn:li:activity:789");
|
|
107
|
+
});
|
|
108
|
+
it("resolves author from included entities via actor URN", () => {
|
|
109
|
+
const result = parseProfileUpdatesResponse({
|
|
110
|
+
elements: [
|
|
111
|
+
{
|
|
112
|
+
urn: "urn:li:activity:100",
|
|
113
|
+
actor: { urn: "urn:li:fsd_profile:alice" },
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
included: [
|
|
117
|
+
{
|
|
118
|
+
entityUrn: "urn:li:fsd_profile:alice",
|
|
119
|
+
firstName: "Alice",
|
|
120
|
+
lastName: "Smith",
|
|
121
|
+
publicIdentifier: "alicesmith",
|
|
122
|
+
headline: { text: "PM at Corp" },
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
});
|
|
126
|
+
expect(result.posts[0]?.authorName).toBe("Alice Smith");
|
|
127
|
+
expect(result.posts[0]?.authorPublicId).toBe("alicesmith");
|
|
128
|
+
expect(result.posts[0]?.authorHeadline).toBe("PM at Corp");
|
|
129
|
+
});
|
|
130
|
+
it("resolves author from included entities via *miniProfile ref", () => {
|
|
131
|
+
const result = parseProfileUpdatesResponse({
|
|
132
|
+
elements: [
|
|
133
|
+
{
|
|
134
|
+
urn: "urn:li:activity:200",
|
|
135
|
+
actor: { "*miniProfile": "urn:li:fsd_profile:charlie" },
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
included: [
|
|
139
|
+
{
|
|
140
|
+
entityUrn: "urn:li:fsd_profile:charlie",
|
|
141
|
+
firstName: "Charlie",
|
|
142
|
+
lastName: "Brown",
|
|
143
|
+
publicIdentifier: "charlieb",
|
|
144
|
+
occupation: "Designer",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
});
|
|
148
|
+
expect(result.posts[0]?.authorName).toBe("Charlie Brown");
|
|
149
|
+
expect(result.posts[0]?.authorPublicId).toBe("charlieb");
|
|
150
|
+
expect(result.posts[0]?.authorHeadline).toBe("Designer");
|
|
151
|
+
});
|
|
152
|
+
it("falls back to resharedUpdate text", () => {
|
|
153
|
+
const result = parseProfileUpdatesResponse({
|
|
154
|
+
elements: [
|
|
155
|
+
{
|
|
156
|
+
urn: "urn:li:activity:300",
|
|
157
|
+
resharedUpdate: {
|
|
158
|
+
commentary: { text: { text: "Reshared post text" } },
|
|
159
|
+
},
|
|
160
|
+
actor: { name: { text: "Resharer" } },
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
});
|
|
164
|
+
expect(result.posts[0]?.text).toBe("Reshared post text");
|
|
165
|
+
});
|
|
166
|
+
it("handles empty elements array", () => {
|
|
167
|
+
const result = parseProfileUpdatesResponse({ elements: [] });
|
|
168
|
+
expect(result.posts).toHaveLength(0);
|
|
169
|
+
expect(result.paging).toEqual({ start: 0, count: 0, total: 0 });
|
|
170
|
+
});
|
|
171
|
+
it("handles empty response", () => {
|
|
172
|
+
const result = parseProfileUpdatesResponse({});
|
|
173
|
+
expect(result.posts).toHaveLength(0);
|
|
174
|
+
});
|
|
175
|
+
it("defaults social counts to zero when missing", () => {
|
|
176
|
+
const result = parseProfileUpdatesResponse({
|
|
177
|
+
elements: [
|
|
178
|
+
{
|
|
179
|
+
urn: "urn:li:activity:400",
|
|
180
|
+
actor: { name: { text: "Test" } },
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
});
|
|
184
|
+
expect(result.posts[0]?.reactionCount).toBe(0);
|
|
185
|
+
expect(result.posts[0]?.commentCount).toBe(0);
|
|
186
|
+
expect(result.posts[0]?.shareCount).toBe(0);
|
|
187
|
+
});
|
|
188
|
+
it("handles null text fields gracefully", () => {
|
|
189
|
+
const result = parseProfileUpdatesResponse({
|
|
190
|
+
elements: [
|
|
191
|
+
{
|
|
192
|
+
urn: "urn:li:activity:500",
|
|
193
|
+
actor: {},
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
});
|
|
197
|
+
expect(result.posts[0]?.text).toBeNull();
|
|
198
|
+
expect(result.posts[0]?.authorName).toBeNull();
|
|
199
|
+
expect(result.posts[0]?.authorPublicId).toBeNull();
|
|
200
|
+
expect(result.posts[0]?.authorHeadline).toBeNull();
|
|
201
|
+
expect(result.posts[0]?.url).toBeNull();
|
|
202
|
+
expect(result.posts[0]?.timestamp).toBeNull();
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
//# sourceMappingURL=get-profile-activity.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get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AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ThrottleStatus } from "../types/index.js";
|
|
2
|
+
import type { ConnectionOptions } from "./types.js";
|
|
3
|
+
export type GetThrottleStatusInput = ConnectionOptions;
|
|
4
|
+
export type GetThrottleStatusOutput = ThrottleStatus;
|
|
5
|
+
export declare function getThrottleStatus(input: GetThrottleStatusInput): Promise<GetThrottleStatusOutput>;
|
|
6
|
+
//# sourceMappingURL=get-throttle-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-throttle-status.d.ts","sourceRoot":"","sources":["../../src/operations/get-throttle-status.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAEvD,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAErD,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,uBAAuB,CAAC,CA2BlC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { resolveAccount } from "../services/account-resolution.js";
|
|
4
|
+
import { withInstanceDatabase } from "../services/instance-context.js";
|
|
5
|
+
import { DEFAULT_CDP_PORT } from "../constants.js";
|
|
6
|
+
export async function getThrottleStatus(input) {
|
|
7
|
+
const cdpPort = input.cdpPort ?? DEFAULT_CDP_PORT;
|
|
8
|
+
const accountId = await resolveAccount(cdpPort, {
|
|
9
|
+
...(input.cdpHost !== undefined && { host: input.cdpHost }),
|
|
10
|
+
...(input.allowRemote !== undefined && { allowRemote: input.allowRemote }),
|
|
11
|
+
});
|
|
12
|
+
return withInstanceDatabase(cdpPort, accountId, async ({ instance }) => {
|
|
13
|
+
return instance.evaluateUI(`(() => {
|
|
14
|
+
const mws = window.mainWindowService;
|
|
15
|
+
if (!mws) return { throttled: false, since: null };
|
|
16
|
+
const td = mws.throttleDetector;
|
|
17
|
+
if (!td) return { throttled: false, since: null };
|
|
18
|
+
const throttled = !!td.isThrottling();
|
|
19
|
+
const lastDate = td.getLastThrottleDate();
|
|
20
|
+
const since = lastDate ? new Date(lastDate).toISOString() : null;
|
|
21
|
+
return { throttled, since };
|
|
22
|
+
})()`);
|
|
23
|
+
}, {
|
|
24
|
+
launcher: {
|
|
25
|
+
...(input.cdpHost !== undefined && { host: input.cdpHost }),
|
|
26
|
+
...(input.allowRemote !== undefined && { allowRemote: input.allowRemote }),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=get-throttle-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-throttle-status.js","sourceRoot":"","sources":["../../src/operations/get-throttle-status.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAOnD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAA6B;IAE7B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,gBAAgB,CAAC;IAElD,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,OAAO,EAAE;QAC9C,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;QAC3D,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC;KAC3E,CAAC,CAAC;IAEH,OAAO,oBAAoB,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACrE,OAAO,QAAQ,CAAC,UAAU,CACxB;;;;;;;;;WASK,CACN,CAAC;IACJ,CAAC,EAAE;QACD,QAAQ,EAAE;YACR,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;YAC3D,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC;SAC3E;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-throttle-status.test.d.ts","sourceRoot":"","sources":["../../src/operations/get-throttle-status.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
vi.mock("../services/account-resolution.js", () => ({
|
|
5
|
+
resolveAccount: vi.fn(),
|
|
6
|
+
}));
|
|
7
|
+
vi.mock("../services/instance-context.js", () => ({
|
|
8
|
+
withInstanceDatabase: vi.fn(),
|
|
9
|
+
}));
|
|
10
|
+
import { resolveAccount } from "../services/account-resolution.js";
|
|
11
|
+
import { withInstanceDatabase } from "../services/instance-context.js";
|
|
12
|
+
import { getThrottleStatus } from "./get-throttle-status.js";
|
|
13
|
+
function setupMocks(throttleResult) {
|
|
14
|
+
vi.mocked(resolveAccount).mockResolvedValue(1);
|
|
15
|
+
vi.mocked(withInstanceDatabase).mockImplementation(async (_cdpPort, _accountId, callback) => callback({
|
|
16
|
+
instance: {
|
|
17
|
+
evaluateUI: vi.fn().mockResolvedValue(throttleResult),
|
|
18
|
+
},
|
|
19
|
+
db: {},
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
describe("getThrottleStatus", () => {
|
|
23
|
+
beforeEach(() => {
|
|
24
|
+
vi.clearAllMocks();
|
|
25
|
+
});
|
|
26
|
+
afterEach(() => {
|
|
27
|
+
vi.restoreAllMocks();
|
|
28
|
+
});
|
|
29
|
+
it("returns not throttled when ThrottleDetector reports no throttling", async () => {
|
|
30
|
+
setupMocks({ throttled: false, since: null });
|
|
31
|
+
const result = await getThrottleStatus({ cdpPort: 9222 });
|
|
32
|
+
expect(result).toEqual({ throttled: false, since: null });
|
|
33
|
+
});
|
|
34
|
+
it("returns throttled with timestamp when ThrottleDetector reports throttling", async () => {
|
|
35
|
+
const since = "2026-03-21T10:00:00.000Z";
|
|
36
|
+
setupMocks({ throttled: true, since });
|
|
37
|
+
const result = await getThrottleStatus({ cdpPort: 9222 });
|
|
38
|
+
expect(result).toEqual({ throttled: true, since });
|
|
39
|
+
});
|
|
40
|
+
it("passes connection options to resolveAccount", async () => {
|
|
41
|
+
setupMocks({ throttled: false, since: null });
|
|
42
|
+
await getThrottleStatus({
|
|
43
|
+
cdpPort: 1234,
|
|
44
|
+
cdpHost: "192.168.1.1",
|
|
45
|
+
allowRemote: true,
|
|
46
|
+
});
|
|
47
|
+
expect(resolveAccount).toHaveBeenCalledWith(1234, {
|
|
48
|
+
host: "192.168.1.1",
|
|
49
|
+
allowRemote: true,
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
it("propagates resolveAccount errors", async () => {
|
|
53
|
+
vi.mocked(resolveAccount).mockRejectedValue(new Error("connection refused"));
|
|
54
|
+
await expect(getThrottleStatus({ cdpPort: 9222 })).rejects.toThrow("connection refused");
|
|
55
|
+
});
|
|
56
|
+
it("propagates withInstanceDatabase errors", async () => {
|
|
57
|
+
vi.mocked(resolveAccount).mockResolvedValue(1);
|
|
58
|
+
vi.mocked(withInstanceDatabase).mockRejectedValue(new Error("instance not running"));
|
|
59
|
+
await expect(getThrottleStatus({ cdpPort: 9222 })).rejects.toThrow("instance not running");
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=get-throttle-status.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-throttle-status.test.js","sourceRoot":"","sources":["../../src/operations/get-throttle-status.test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzE,EAAE,CAAC,IAAI,CAAC,mCAAmC,EAAE,GAAG,EAAE,CAAC,CAAC;IAClD,cAAc,EAAE,EAAE,CAAC,EAAE,EAAE;CACxB,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAAC,CAAC;IAChD,oBAAoB,EAAE,EAAE,CAAC,EAAE,EAAE;CAC9B,CAAC,CAAC,CAAC;AAGJ,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,SAAS,UAAU,CAAC,cAA4D;IAC9E,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAE/C,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,kBAAkB,CAChD,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,CACvC,QAAQ,CAAC;QACP,QAAQ,EAAE;YACR,UAAU,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC;SACtD;QACD,EAAE,EAAE,EAAE;KAC+B,CAAC,CAC3C,CAAC;AACJ,CAAC;AAED,Q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,CAAC,CAAC,oBAAoB,CAAC,IAAI,EAAE;YAChD,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC;QAE7E,MAAM,MAAM,CACV,iBAAiB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CACrC,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;QACtD,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;QAC/C,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,iBAAiB,CAC/C,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAClC,CAAC;QAEF,MAAM,MAAM,CACV,iBAAiB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CACrC,CAAC,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -4,6 +4,7 @@ export { campaignList, type CampaignListInput, type CampaignListOutput, } from "
|
|
|
4
4
|
export { campaignCreate, type CampaignCreateInput, type CampaignCreateOutput, } from "./campaign-create.js";
|
|
5
5
|
export { campaignUpdate, type CampaignUpdateInput, type CampaignUpdateOutput, } from "./campaign-update.js";
|
|
6
6
|
export { campaignDelete, type CampaignDeleteInput, type CampaignDeleteOutput, } from "./campaign-delete.js";
|
|
7
|
+
export { campaignErase, type CampaignEraseInput, type CampaignEraseOutput, } from "./campaign-erase.js";
|
|
7
8
|
export { campaignListPeople, type CampaignListPeopleInput, type CampaignListPeopleOutput, } from "./campaign-list-people.js";
|
|
8
9
|
export { campaignStart, type CampaignStartInput, type CampaignStartOutput, } from "./campaign-start.js";
|
|
9
10
|
export { campaignStop, type CampaignStopInput, type CampaignStopOutput, } from "./campaign-stop.js";
|
|
@@ -20,6 +21,7 @@ export { campaignExcludeAdd, type CampaignExcludeAddInput, type CampaignExcludeA
|
|
|
20
21
|
export { campaignExcludeRemove, type CampaignExcludeRemoveInput, type CampaignExcludeRemoveOutput, } from "./campaign-exclude-remove.js";
|
|
21
22
|
export { campaignExcludeList, type CampaignExcludeListInput, type CampaignExcludeListOutput, } from "./campaign-exclude-list.js";
|
|
22
23
|
export { getErrors, type GetErrorsInput, type GetErrorsOutput, } from "./get-errors.js";
|
|
24
|
+
export { dismissErrors, type DismissErrorsInput, type DismissErrorsOutput, } from "./dismiss-errors.js";
|
|
23
25
|
export { queryMessages, type QueryMessagesInput, type QueryMessagesOutput, } from "./query-messages.js";
|
|
24
26
|
export { checkReplies, type CheckRepliesInput, type CheckRepliesOutput, } from "./check-replies.js";
|
|
25
27
|
export { scrapeMessagingHistory, type ScrapeMessagingHistoryInput, type ScrapeMessagingHistoryOutput, } from "./scrape-messaging-history.js";
|
|
@@ -32,4 +34,26 @@ export { deleteCollection, type DeleteCollectionInput, type DeleteCollectionOutp
|
|
|
32
34
|
export { addPeopleToCollection, type AddPeopleToCollectionInput, type AddPeopleToCollectionOutput, } from "./add-people-to-collection.js";
|
|
33
35
|
export { removePeopleFromCollection, type RemovePeopleFromCollectionInput, type RemovePeopleFromCollectionOutput, } from "./remove-people-from-collection.js";
|
|
34
36
|
export { importPeopleFromCollection, type ImportPeopleFromCollectionInput, type ImportPeopleFromCollectionOutput, } from "./import-people-from-collection.js";
|
|
37
|
+
export { commentOnPost, type CommentOnPostInput, type CommentOnPostOutput, } from "./comment-on-post.js";
|
|
38
|
+
export { getPost, type GetPostInput, type GetPostOutput, } from "./get-post.js";
|
|
39
|
+
export { getPostStats, extractPostUrn, type GetPostStatsInput, type GetPostStatsOutput, } from "./get-post-stats.js";
|
|
40
|
+
export { getPostEngagers, type GetPostEngagersInput, type GetPostEngagersOutput, } from "./get-post-engagers.js";
|
|
41
|
+
export { searchPosts, type SearchPostsInput, type SearchPostsOutput, } from "./search-posts.js";
|
|
42
|
+
export { getFeed, type GetFeedInput, type GetFeedOutput, } from "./get-feed.js";
|
|
43
|
+
export { getProfileActivity, extractProfileId, type GetProfileActivityInput, type GetProfileActivityOutput, } from "./get-profile-activity.js";
|
|
44
|
+
export { getActionBudget, type GetActionBudgetInput, type GetActionBudgetOutput, } from "./get-action-budget.js";
|
|
45
|
+
export { getThrottleStatus, type GetThrottleStatusInput, type GetThrottleStatusOutput, } from "./get-throttle-status.js";
|
|
46
|
+
export { visitProfile, type VisitProfileInput, type VisitProfileOutput, } from "./visit-profile.js";
|
|
47
|
+
export { reactToPost, REACTION_TYPES, type ReactToPostInput, type ReactToPostOutput, type ReactionType, } from "./react-to-post.js";
|
|
48
|
+
export { type EphemeralActionInput, } from "./ephemeral-action.js";
|
|
49
|
+
export { messagePerson, type MessagePersonInput, type MessagePersonOutput, } from "./message-person.js";
|
|
50
|
+
export { sendInvite, type SendInviteInput, type SendInviteOutput, } from "./send-invite.js";
|
|
51
|
+
export { sendInmail, type SendInmailInput, type SendInmailOutput, } from "./send-inmail.js";
|
|
52
|
+
export { followPerson, type FollowPersonInput, type FollowPersonOutput, } from "./follow-person.js";
|
|
53
|
+
export { endorseSkills, type EndorseSkillsInput, type EndorseSkillsOutput, } from "./endorse-skills.js";
|
|
54
|
+
export { likePersonPosts, type LikePersonPostsInput, type LikePersonPostsOutput, } from "./like-person-posts.js";
|
|
55
|
+
export { removeConnection, type RemoveConnectionInput, type RemoveConnectionOutput, } from "./remove-connection.js";
|
|
56
|
+
export { enrichProfile, type EnrichProfileInput, type EnrichProfileOutput, type EnrichmentCategory, } from "./enrich-profile.js";
|
|
57
|
+
export { buildLinkedInUrl, type BuildLinkedInUrlInput, type BuildLinkedInUrlOutput, } from "./build-linkedin-url.js";
|
|
58
|
+
export { resolveLinkedInEntity, type ResolveLinkedInEntityInput, type ResolveLinkedInEntityOutput, } from "./resolve-linkedin-entity.js";
|
|
35
59
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpD,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/operations/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGpD,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,oB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