linkedin-secret-sauce 0.3.14 → 0.3.15

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.
@@ -13,7 +13,7 @@ function parseFullProfile(rawResponse, vanity) {
13
13
  lastName: identity.lastName,
14
14
  headline: identity.headline,
15
15
  summary: identity.summary,
16
- locationText: identity.locationName || identity.geoLocationName,
16
+ locationText: undefined, // Will be set below after geo lookup
17
17
  objectUrn: identity.objectUrn,
18
18
  premium: identity.premium,
19
19
  influencer: identity.influencer,
@@ -26,6 +26,16 @@ function parseFullProfile(rawResponse, vanity) {
26
26
  const geoLocation = identity.geoLocation;
27
27
  if (geoLocation?.geoUrn) {
28
28
  profile.geoLocationUrn = geoLocation.geoUrn;
29
+ // Lookup the geo object in included array to get the actual location name
30
+ const geoUrn = geoLocation.geoUrn;
31
+ const geoObj = included.find((it) => it?.entityUrn === geoUrn);
32
+ if (geoObj?.defaultLocalizedName) {
33
+ profile.locationText = geoObj.defaultLocalizedName;
34
+ }
35
+ }
36
+ // Fallback to direct location fields if geo lookup didn't work
37
+ if (!profile.locationText) {
38
+ profile.locationText = identity.locationName || identity.geoLocationName;
29
39
  }
30
40
  const location = identity.location;
31
41
  if (location?.countryCode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkedin-secret-sauce",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "Private LinkedIn Sales Navigator client with automatic cookie management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",