linkedin-secret-sauce 0.3.11 → 0.3.12

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.
@@ -56,11 +56,11 @@ function parseFullProfile(rawResponse, vanity) {
56
56
  title: rec?.title,
57
57
  companyName: rec?.companyName,
58
58
  description: rec?.description,
59
- isCurrent: !rec?.timePeriod?.endDate,
60
- startYear: rec?.timePeriod?.startDate?.year,
61
- startMonth: rec?.timePeriod?.startDate?.month,
62
- endYear: rec?.timePeriod?.endDate?.year,
63
- endMonth: rec?.timePeriod?.endDate?.month,
59
+ isCurrent: !rec?.timePeriod?.endDate && !rec?.dateRange?.end,
60
+ startYear: rec?.timePeriod?.startDate?.year || rec?.dateRange?.start?.year,
61
+ startMonth: rec?.timePeriod?.startDate?.month || rec?.dateRange?.start?.month,
62
+ endYear: rec?.timePeriod?.endDate?.year || rec?.dateRange?.end?.year,
63
+ endMonth: rec?.timePeriod?.endDate?.month || rec?.dateRange?.end?.month,
64
64
  };
65
65
  // Try to extract company URN and numeric id robustly
66
66
  const candUrns = [
@@ -88,10 +88,10 @@ function parseFullProfile(rawResponse, vanity) {
88
88
  schoolName: rec?.schoolName,
89
89
  degree: rec?.degreeName,
90
90
  fieldOfStudy: rec?.fieldOfStudy,
91
- startYear: rec?.timePeriod?.startDate?.year,
92
- startMonth: rec?.timePeriod?.startDate?.month,
93
- endYear: rec?.timePeriod?.endDate?.year,
94
- endMonth: rec?.timePeriod?.endDate?.month,
91
+ startYear: rec?.timePeriod?.startDate?.year || rec?.dateRange?.start?.year,
92
+ startMonth: rec?.timePeriod?.startDate?.month || rec?.dateRange?.start?.month,
93
+ endYear: rec?.timePeriod?.endDate?.year || rec?.dateRange?.end?.year,
94
+ endMonth: rec?.timePeriod?.endDate?.month || rec?.dateRange?.end?.month,
95
95
  };
96
96
  profile.educations.push(edu);
97
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkedin-secret-sauce",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
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",