@twolions/linkedin-private-api
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -73,2 +73,19 @@ import { Country } from '../types/country-code.enum'; | ||
} | ||
export interface LinkedInProfileContactInfo { | ||
birthDateOn: number; | ||
birthdayVisibilitySetting: string; | ||
address: string; | ||
weChatContactInfo: string; | ||
primaryTwitterHandle: string; | ||
twitterHandles: string[]; | ||
phoneNumbers: string[]; | ||
ims: string[]; | ||
$type: "com.linkedin.voyager.identity.profile.ProfileContactInfo"; | ||
emailAddress: string; | ||
entityUrn: ProfileUrn; | ||
connectedAt: number; | ||
websites: string[]; | ||
sesameCreditGradeInfo: string; | ||
interests: string[]; | ||
} | ||
export {}; |
import { Client } from '../core/client'; | ||
import { LinkedInMiniProfile } from '../entities/linkedin-mini-profile.entity'; | ||
import { LinkedInProfileContactInfo } from '../entities/linkedin-profile.entity'; | ||
import { MiniProfile, ProfileId } from '../entities/mini-profile.entity'; | ||
@@ -19,2 +20,11 @@ import { Profile } from '../entities/profile.entity'; | ||
getOwnProfile(): Promise<Profile | null>; | ||
getContactInfo({ publicIdentifier }: { | ||
publicIdentifier: string; | ||
}): Promise<LinkedInProfileContactInfo>; | ||
follow({ profileId }: { | ||
profileId: string; | ||
}): Promise<void>; | ||
unfollow({ profileId }: { | ||
profileId: string; | ||
}): Promise<void>; | ||
} |
@@ -45,4 +45,14 @@ "use strict"; | ||
} | ||
async getContactInfo({ publicIdentifier }) { | ||
const response = await this.client.request.profile.getContactInfo({ publicIdentifier }); | ||
return response.data; | ||
} | ||
async follow({ profileId }) { | ||
await this.client.request.profile.follow({ profileId }); | ||
} | ||
async unfollow({ profileId }) { | ||
await this.client.request.profile.unfollow({ profileId }); | ||
} | ||
} | ||
exports.ProfileRepository = ProfileRepository; | ||
//# sourceMappingURL=profile.repository.js.map |
import { LinkedInRequest } from '../core/linkedin-request'; | ||
import { GetOwnProfileResponse } from '../responses/own-profile.response.get'; | ||
import { GetProfileResponse } from '../responses/profile.response.get'; | ||
import { GetProfileContactInfoResponse } from '../responses/profile.contact-info.response.get'; | ||
export declare class ProfileRequest { | ||
@@ -13,2 +14,11 @@ private request; | ||
getOwnProfile(): Promise<GetOwnProfileResponse>; | ||
getContactInfo({ publicIdentifier }: { | ||
publicIdentifier: string; | ||
}): Promise<GetProfileContactInfoResponse>; | ||
follow({ profileId }: { | ||
profileId: string; | ||
}): void; | ||
unfollow({ profileId }: { | ||
profileId: string; | ||
}): void; | ||
} |
@@ -12,3 +12,3 @@ "use strict"; | ||
memberIdentity: publicIdentifier, | ||
decorationId: 'com.linkedin.voyager.dash.deco.identity.profile.FullProfileWithEntities-35', | ||
decorationId: 'com.linkedin.voyager.dash.deco.identity.profile.TopCardSupplementary-100', | ||
}; | ||
@@ -22,4 +22,19 @@ return this.request.get('identity/dash/profiles', { | ||
} | ||
getContactInfo({ publicIdentifier }) { | ||
return this.request.get(`identity/profiles/${publicIdentifier}/profileContactInfo`); | ||
} | ||
follow({ profileId }) { | ||
const requestPayload = { | ||
patch: { "$set": { following: true } } | ||
}; | ||
this.request.post(`feed/dash/followingStates/urn:li:fsd_followingState:urn:li:fsd_profile:${profileId}`, requestPayload); | ||
} | ||
unfollow({ profileId }) { | ||
const requestPayload = { | ||
patch: { "$set": { following: false } } | ||
}; | ||
this.request.post(`feed/dash/followingStates/urn:li:fsd_followingState:urn:li:fsd_profile:${profileId}`, requestPayload); | ||
} | ||
} | ||
exports.ProfileRequest = ProfileRequest; | ||
//# sourceMappingURL=profile.request.js.map |
@@ -7,4 +7,5 @@ export * from './blended-search.reponse.get'; | ||
export * from './own-profile.response.get'; | ||
export * from './profile.contact-info.response.get'; | ||
export * from './profile.response.get'; | ||
export * from './received-invitations.response.get'; | ||
export * from './sent-invitations.response.get'; |
@@ -23,2 +23,3 @@ "use strict"; | ||
__exportStar(require("./own-profile.response.get"), exports); | ||
__exportStar(require("./profile.contact-info.response.get"), exports); | ||
__exportStar(require("./profile.response.get"), exports); | ||
@@ -25,0 +26,0 @@ __exportStar(require("./received-invitations.response.get"), exports); |
{ | ||
"name": "@twolions/linkedin-private-api", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
241990
283
3435
1