linkedin-secret-sauce 0.12.5 → 0.13.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/index.d.ts +1 -1
- package/dist/linkedin-api.d.ts +113 -1
- package/dist/linkedin-api.js +836 -3
- package/dist/parsers/profile-parser.js +1 -0
- package/dist/types.d.ts +164 -0
- package/docs/api/assets/hierarchy.js +1 -1
- package/docs/api/assets/navigation.js +1 -1
- package/docs/api/assets/search.js +1 -1
- package/docs/api/classes/LinkedInClientError.html +4 -4
- package/docs/api/functions/_testGetAccountCookies.html +2 -2
- package/docs/api/functions/_testGetAccountEntry.html +2 -2
- package/docs/api/functions/_testGetAllAccountIds.html +2 -2
- package/docs/api/functions/_testGetPoolState.html +2 -2
- package/docs/api/functions/adminResetAccount.html +1 -1
- package/docs/api/functions/adminSetCooldown.html +1 -1
- package/docs/api/functions/analyzeProfilePosts.html +14 -0
- package/docs/api/functions/buildCookieHeader.html +1 -1
- package/docs/api/functions/clearAllSmartLeadTokens.html +2 -2
- package/docs/api/functions/clearRequestHistory.html +1 -1
- package/docs/api/functions/clearSessionAccount.html +1 -1
- package/docs/api/functions/clearSmartLeadToken.html +2 -2
- package/docs/api/functions/createEnrichmentClient.html +2 -2
- package/docs/api/functions/extractCsrfToken.html +1 -1
- package/docs/api/functions/extractLinkedInHandle.html +2 -2
- package/docs/api/functions/fetchCookiesFromCosiall.html +2 -2
- package/docs/api/functions/fetchProfileEmailsFromCosiall.html +2 -2
- package/docs/api/functions/forceRefreshCookies.html +1 -1
- package/docs/api/functions/getAccountForSession.html +1 -1
- package/docs/api/functions/getAccountsSummary.html +1 -1
- package/docs/api/functions/getCompaniesBatch.html +2 -2
- package/docs/api/functions/getCompanyById.html +2 -2
- package/docs/api/functions/getCompanyByUrl.html +1 -1
- package/docs/api/functions/getConfig.html +1 -1
- package/docs/api/functions/getCookiePoolHealth.html +1 -1
- package/docs/api/functions/getPostComments.html +11 -0
- package/docs/api/functions/getPostHistory.html +12 -0
- package/docs/api/functions/getPostReactions.html +12 -0
- package/docs/api/functions/getProfileByUrn.html +2 -2
- package/docs/api/functions/getProfileByVanity.html +2 -2
- package/docs/api/functions/getProfilesBatch.html +1 -1
- package/docs/api/functions/getRequestHistory.html +1 -1
- package/docs/api/functions/getSalesNavigatorProfileDetails.html +1 -1
- package/docs/api/functions/getSalesNavigatorProfileFull.html +2 -2
- package/docs/api/functions/getSmartLeadToken.html +1 -1
- package/docs/api/functions/getSmartLeadTokenCacheStats.html +2 -2
- package/docs/api/functions/getSmartLeadUser.html +2 -2
- package/docs/api/functions/getSnapshot.html +1 -1
- package/docs/api/functions/getYearsAtCompanyOptions.html +2 -2
- package/docs/api/functions/getYearsInPositionOptions.html +2 -2
- package/docs/api/functions/getYearsOfExperienceOptions.html +2 -2
- package/docs/api/functions/incrementMetric.html +1 -1
- package/docs/api/functions/initializeCookiePool.html +1 -1
- package/docs/api/functions/initializeLinkedInClient.html +1 -1
- package/docs/api/functions/isBusinessEmail.html +2 -2
- package/docs/api/functions/isDisposableDomain.html +2 -2
- package/docs/api/functions/isDisposableEmail.html +2 -2
- package/docs/api/functions/isPersonalDomain.html +2 -2
- package/docs/api/functions/isPersonalEmail.html +2 -2
- package/docs/api/functions/isRoleAccount.html +2 -2
- package/docs/api/functions/isValidEmailSyntax.html +2 -2
- package/docs/api/functions/parseFullProfile.html +2 -2
- package/docs/api/functions/parseSalesSearchResults.html +1 -1
- package/docs/api/functions/reportAccountFailure.html +1 -1
- package/docs/api/functions/reportAccountSuccess.html +1 -1
- package/docs/api/functions/resolveCompanyUniversalName.html +1 -1
- package/docs/api/functions/searchSalesLeads.html +2 -2
- package/docs/api/functions/selectAccountForRequest.html +1 -1
- package/docs/api/functions/setAccountForSession.html +1 -1
- package/docs/api/functions/typeahead.html +1 -1
- package/docs/api/functions/verifyEmailMx.html +1 -1
- package/docs/api/hierarchy.html +1 -1
- package/docs/api/index.html +2 -2
- package/docs/api/interfaces/AccountCookies.html +2 -2
- package/docs/api/interfaces/AnalyzedPost.html +8 -0
- package/docs/api/interfaces/BatchEnrichmentOptions.html +8 -8
- package/docs/api/interfaces/CacheAdapter.html +4 -4
- package/docs/api/interfaces/CanonicalEmail.html +8 -8
- package/docs/api/interfaces/CommentAuthor.html +8 -0
- package/docs/api/interfaces/Company.html +2 -2
- package/docs/api/interfaces/ConstructConfig.html +5 -5
- package/docs/api/interfaces/CosiallProfileEmailsResponse.html +6 -6
- package/docs/api/interfaces/EnrichmentCandidate.html +4 -4
- package/docs/api/interfaces/EnrichmentClient.html +6 -6
- package/docs/api/interfaces/EnrichmentClientConfig.html +7 -7
- package/docs/api/interfaces/EnrichmentLogger.html +3 -3
- package/docs/api/interfaces/EnrichmentOptions.html +6 -6
- package/docs/api/interfaces/HunterConfig.html +3 -3
- package/docs/api/interfaces/LddConfig.html +3 -3
- package/docs/api/interfaces/LddProfileData.html +2 -2
- package/docs/api/interfaces/LinkedInClientConfig.html +2 -2
- package/docs/api/interfaces/LinkedInCookie.html +2 -2
- package/docs/api/interfaces/LinkedInPosition.html +2 -2
- package/docs/api/interfaces/LinkedInProfile.html +2 -2
- package/docs/api/interfaces/LinkedInSpotlightBadge.html +2 -2
- package/docs/api/interfaces/LinkedInTenure.html +2 -2
- package/docs/api/interfaces/Metrics.html +2 -2
- package/docs/api/interfaces/MetricsSnapshot.html +2 -2
- package/docs/api/interfaces/PostAnalytics.html +11 -0
- package/docs/api/interfaces/PostComment.html +8 -0
- package/docs/api/interfaces/PostCommentsResult.html +7 -0
- package/docs/api/interfaces/PostHistoryResult.html +4 -0
- package/docs/api/interfaces/PostReaction.html +5 -0
- package/docs/api/interfaces/PostReactionsResult.html +5 -0
- package/docs/api/interfaces/ProfileAnalysisOptions.html +14 -0
- package/docs/api/interfaces/ProfileAnalysisResult.html +9 -0
- package/docs/api/interfaces/ProfileEducation.html +2 -2
- package/docs/api/interfaces/ProfileEmailsLookupOptions.html +5 -5
- package/docs/api/interfaces/ProfilePosition.html +2 -2
- package/docs/api/interfaces/ProfilePost.html +14 -0
- package/docs/api/interfaces/ProfileSkill.html +2 -2
- package/docs/api/interfaces/ProviderResult.html +6 -6
- package/docs/api/interfaces/ProvidersConfig.html +6 -6
- package/docs/api/interfaces/ReactionActor.html +9 -0
- package/docs/api/interfaces/RequestHistoryEntry.html +2 -2
- package/docs/api/interfaces/SalesLeadSearchResult.html +2 -2
- package/docs/api/interfaces/SalesNavigatorContactInfo.html +2 -2
- package/docs/api/interfaces/SalesNavigatorPosition.html +2 -2
- package/docs/api/interfaces/SalesNavigatorProfile.html +2 -2
- package/docs/api/interfaces/SalesNavigatorProfileFull.html +4 -4
- package/docs/api/interfaces/SearchSalesResult.html +2 -2
- package/docs/api/interfaces/SmartLeadAuthConfig.html +4 -4
- package/docs/api/interfaces/SmartLeadCredentials.html +2 -2
- package/docs/api/interfaces/SmartLeadLoginResponse.html +2 -2
- package/docs/api/interfaces/SmartLeadUser.html +2 -2
- package/docs/api/interfaces/SmartProspectConfig.html +8 -8
- package/docs/api/interfaces/SmartProspectContact.html +2 -2
- package/docs/api/interfaces/SmartProspectSearchFilters.html +21 -21
- package/docs/api/interfaces/TypeaheadItem.html +2 -2
- package/docs/api/interfaces/TypeaheadResult.html +2 -2
- package/docs/api/interfaces/VerificationResult.html +9 -9
- package/docs/api/types/CostCallback.html +2 -2
- package/docs/api/types/Geo.html +2 -2
- package/docs/api/types/LddApiResponse.html +1 -1
- package/docs/api/types/LinkedInReactionType.html +2 -0
- package/docs/api/types/ProviderFunc.html +2 -2
- package/docs/api/types/ProviderName.html +2 -2
- package/docs/api/types/SalesSearchFilters.html +2 -2
- package/docs/api/types/TypeaheadType.html +1 -1
- package/docs/api/variables/COMPANY_SIZE_OPTIONS.html +1 -1
- package/docs/api/variables/DEFAULT_PROVIDER_ORDER.html +2 -2
- package/docs/api/variables/DISPOSABLE_DOMAINS.html +2 -2
- package/docs/api/variables/FUNCTION_OPTIONS.html +1 -1
- package/docs/api/variables/INDUSTRY_OPTIONS.html +1 -1
- package/docs/api/variables/LANGUAGE_OPTIONS.html +1 -1
- package/docs/api/variables/PERSONAL_DOMAINS.html +2 -2
- package/docs/api/variables/PROVIDER_COSTS.html +2 -2
- package/docs/api/variables/REGION_OPTIONS.html +1 -1
- package/docs/api/variables/SENIORITY_OPTIONS.html +2 -2
- package/docs/api/variables/YEARS_OPTIONS.html +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export { initializeLinkedInClient, getConfig } from "./config";
|
|
|
48
48
|
export type { LinkedInClientConfig } from "./config";
|
|
49
49
|
export * from "./linkedin-api";
|
|
50
50
|
export * from "./types";
|
|
51
|
-
export type { LinkedInTenure, LinkedInPosition, LinkedInSpotlightBadge, SalesLeadSearchResult, } from "./types";
|
|
51
|
+
export type { LinkedInTenure, LinkedInPosition, LinkedInSpotlightBadge, SalesLeadSearchResult, LinkedInReactionType, ReactionActor, PostReaction, PostReactionsResult, CommentAuthor, PostComment, PostCommentsResult, ProfilePost, PostHistoryResult, PostAnalytics, AnalyzedPost, ProfileAnalysisOptions, ProfileAnalysisResult, } from "./types";
|
|
52
52
|
export { LinkedInClientError } from "./utils/errors";
|
|
53
53
|
export * from "./cosiall-client";
|
|
54
54
|
export * from "./cookie-pool";
|
package/dist/linkedin-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SalesSearchFilters, LinkedInProfile, SearchSalesResult, TypeaheadResult, SalesNavigatorProfile, SalesNavigatorProfileFull, Company } from "./types";
|
|
1
|
+
import type { SalesSearchFilters, LinkedInProfile, SearchSalesResult, TypeaheadResult, SalesNavigatorProfile, SalesNavigatorProfileFull, Company, PostReactionsResult, PostCommentsResult, PostHistoryResult, ProfileAnalysisOptions, ProfileAnalysisResult } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Fetches a LinkedIn profile by vanity URL (public identifier).
|
|
4
4
|
* Results are cached for the configured TTL (default: 15 minutes).
|
|
@@ -81,6 +81,44 @@ export declare function searchSalesLeads(keywords: string, options?: {
|
|
|
81
81
|
rawQuery?: string;
|
|
82
82
|
sessionId?: string;
|
|
83
83
|
}): Promise<SearchSalesResult>;
|
|
84
|
+
/**
|
|
85
|
+
* Analyzes a LinkedIn profile's posts with engagement data (reactions and comments).
|
|
86
|
+
* This is a high-level convenience function that orchestrates multiple API calls:
|
|
87
|
+
* 1. Fetches the profile by vanity URL or URN
|
|
88
|
+
* 2. Retrieves the profile's post history
|
|
89
|
+
* 3. Fetches reactions and comments for each post
|
|
90
|
+
*
|
|
91
|
+
* @param profileIdentifier - LinkedIn vanity URL, full profile URL, or FSD profile URN
|
|
92
|
+
* @param options - Analysis options for controlling fetch behavior
|
|
93
|
+
* @returns Complete analysis result with profile, posts, engagement data, and summary statistics
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* // Analyze by vanity URL
|
|
98
|
+
* const analysis = await analyzeProfilePosts('john-doe');
|
|
99
|
+
* console.log(analysis.summary.totalReactions);
|
|
100
|
+
* console.log(analysis.summary.avgCommentsPerPost);
|
|
101
|
+
*
|
|
102
|
+
* // Analyze by full LinkedIn URL
|
|
103
|
+
* const analysis = await analyzeProfilePosts('https://www.linkedin.com/in/john-doe');
|
|
104
|
+
*
|
|
105
|
+
* // Analyze with options
|
|
106
|
+
* const analysis = await analyzeProfilePosts('john-doe', {
|
|
107
|
+
* postsCount: 20,
|
|
108
|
+
* reactionsPerPost: 50,
|
|
109
|
+
* commentsPerPost: 25,
|
|
110
|
+
* concurrency: 5,
|
|
111
|
+
* });
|
|
112
|
+
*
|
|
113
|
+
* // Access individual post engagement
|
|
114
|
+
* for (const analyzed of analysis.analyzedPosts) {
|
|
115
|
+
* console.log(`Post: ${analyzed.post.text?.substring(0, 50)}...`);
|
|
116
|
+
* console.log(` Reactions: ${analyzed.reactions.totalCount}`);
|
|
117
|
+
* console.log(` Comments: ${analyzed.comments.totalCount}`);
|
|
118
|
+
* }
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export declare function analyzeProfilePosts(profileIdentifier: string, options?: ProfileAnalysisOptions): Promise<ProfileAnalysisResult>;
|
|
84
122
|
export declare function getProfilesBatch(vanities: string[], concurrency?: number): Promise<(LinkedInProfile | null)[]>;
|
|
85
123
|
export declare function resolveCompanyUniversalName(universalName: string): Promise<{
|
|
86
124
|
companyId?: string;
|
|
@@ -167,3 +205,77 @@ export declare function getSalesNavigatorProfileFull(profileUrnOrId: string): Pr
|
|
|
167
205
|
* ```
|
|
168
206
|
*/
|
|
169
207
|
export declare function extractLinkedInHandle(flagshipProfileUrl: string | null | undefined): string | null;
|
|
208
|
+
/**
|
|
209
|
+
* Fetches reactions (likes, celebrates, etc.) for a LinkedIn post.
|
|
210
|
+
* Uses the Voyager GraphQL API with pagination support.
|
|
211
|
+
*
|
|
212
|
+
* @param activityUrn - The activity URN (e.g., "urn:li:activity:7419061111293083648") or bare ID
|
|
213
|
+
* @param options - Pagination options
|
|
214
|
+
* @param options.start - Pagination offset (default: 0)
|
|
215
|
+
* @param options.count - Number of reactions to fetch (default: 10, max: 100)
|
|
216
|
+
* @returns PostReactionsResult with reactions array and pagination info
|
|
217
|
+
* @throws LinkedInClientError with code NOT_FOUND if post doesn't exist
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```typescript
|
|
221
|
+
* // Get first 10 reactions
|
|
222
|
+
* const reactions = await getPostReactions('urn:li:activity:7419061111293083648');
|
|
223
|
+
* console.log(reactions.totalCount); // 37
|
|
224
|
+
* console.log(reactions.reactions[0].reactionType); // "LIKE"
|
|
225
|
+
*
|
|
226
|
+
* // Paginate through all reactions
|
|
227
|
+
* const page2 = await getPostReactions('7419061111293083648', { start: 10, count: 10 });
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
export declare function getPostReactions(activityUrn: string, options?: {
|
|
231
|
+
start?: number;
|
|
232
|
+
count?: number;
|
|
233
|
+
}): Promise<PostReactionsResult>;
|
|
234
|
+
/**
|
|
235
|
+
* Fetches comments for a LinkedIn post.
|
|
236
|
+
* Uses the voyagerFeedDashUpdates GraphQL API.
|
|
237
|
+
*
|
|
238
|
+
* @param activityUrn - The activity URN (e.g., "urn:li:activity:7419061111293083648") or bare ID
|
|
239
|
+
* @param options - Fetch options
|
|
240
|
+
* @param options.commentsCount - Number of comments to fetch (default: 10, max: 100)
|
|
241
|
+
* @returns PostCommentsResult with comments array
|
|
242
|
+
* @throws LinkedInClientError with code NOT_FOUND if post doesn't exist
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* ```typescript
|
|
246
|
+
* // Get comments for a post
|
|
247
|
+
* const comments = await getPostComments('urn:li:activity:7419061111293083648');
|
|
248
|
+
* console.log(comments.totalCount);
|
|
249
|
+
*
|
|
250
|
+
* // Get more comments
|
|
251
|
+
* const moreComments = await getPostComments('7419061111293083648', { commentsCount: 50 });
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
export declare function getPostComments(activityUrn: string, options?: {
|
|
255
|
+
commentsCount?: number;
|
|
256
|
+
}): Promise<PostCommentsResult>;
|
|
257
|
+
/**
|
|
258
|
+
* Fetches a user's post history (their published posts).
|
|
259
|
+
* Uses the Voyager profileUpdatesV2 API with pagination support.
|
|
260
|
+
*
|
|
261
|
+
* @param profileUrn - The FSD profile URN (e.g., "urn:li:fsd_profile:ABC123xyz") or bare key
|
|
262
|
+
* @param options - Pagination options
|
|
263
|
+
* @param options.start - Pagination offset (default: 0)
|
|
264
|
+
* @param options.count - Number of posts to fetch (default: 10, max: 100)
|
|
265
|
+
* @returns PostHistoryResult with posts array and pagination info
|
|
266
|
+
* @throws LinkedInClientError with code NOT_FOUND if profile doesn't exist
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* ```typescript
|
|
270
|
+
* // Get first 10 posts
|
|
271
|
+
* const posts = await getPostHistory('ABC123xyz');
|
|
272
|
+
* console.log(posts.posts.length);
|
|
273
|
+
*
|
|
274
|
+
* // Paginate
|
|
275
|
+
* const page2 = await getPostHistory('ABC123xyz', { start: 10, count: 10 });
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
export declare function getPostHistory(profileUrn: string, options?: {
|
|
279
|
+
start?: number;
|
|
280
|
+
count?: number;
|
|
281
|
+
}): Promise<PostHistoryResult>;
|