linkedin-secret-sauce 0.2.0 → 0.3.1
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/linkedin-api.d.ts +75 -0
- package/dist/linkedin-api.js +67 -0
- package/package.json +58 -59
package/dist/linkedin-api.d.ts
CHANGED
|
@@ -21,4 +21,79 @@ export declare function typeahead(options: {
|
|
|
21
21
|
start?: number;
|
|
22
22
|
count?: number;
|
|
23
23
|
}): Promise<TypeaheadResult>;
|
|
24
|
+
export declare const YEARS_AT_COMPANY_OPTIONS: readonly [{
|
|
25
|
+
readonly id: 1;
|
|
26
|
+
readonly text: "Less than 1 year";
|
|
27
|
+
readonly displayValue: "< 1 year";
|
|
28
|
+
}, {
|
|
29
|
+
readonly id: 2;
|
|
30
|
+
readonly text: "1 to 2 years";
|
|
31
|
+
readonly displayValue: "1-2 years";
|
|
32
|
+
}, {
|
|
33
|
+
readonly id: 3;
|
|
34
|
+
readonly text: "3 to 5 years";
|
|
35
|
+
readonly displayValue: "3-5 years";
|
|
36
|
+
}, {
|
|
37
|
+
readonly id: 4;
|
|
38
|
+
readonly text: "6 to 10 years";
|
|
39
|
+
readonly displayValue: "6-10 years";
|
|
40
|
+
}, {
|
|
41
|
+
readonly id: 5;
|
|
42
|
+
readonly text: "More than 10 years";
|
|
43
|
+
readonly displayValue: "10+ years";
|
|
44
|
+
}];
|
|
45
|
+
export declare const YEARS_IN_POSITION_OPTIONS: readonly [{
|
|
46
|
+
readonly id: 1;
|
|
47
|
+
readonly text: "Less than 1 year";
|
|
48
|
+
readonly displayValue: "< 1 year";
|
|
49
|
+
}, {
|
|
50
|
+
readonly id: 2;
|
|
51
|
+
readonly text: "1 to 2 years";
|
|
52
|
+
readonly displayValue: "1-2 years";
|
|
53
|
+
}, {
|
|
54
|
+
readonly id: 3;
|
|
55
|
+
readonly text: "3 to 5 years";
|
|
56
|
+
readonly displayValue: "3-5 years";
|
|
57
|
+
}, {
|
|
58
|
+
readonly id: 4;
|
|
59
|
+
readonly text: "6 to 10 years";
|
|
60
|
+
readonly displayValue: "6-10 years";
|
|
61
|
+
}, {
|
|
62
|
+
readonly id: 5;
|
|
63
|
+
readonly text: "More than 10 years";
|
|
64
|
+
readonly displayValue: "10+ years";
|
|
65
|
+
}];
|
|
66
|
+
export declare const YEARS_OF_EXPERIENCE_OPTIONS: readonly [{
|
|
67
|
+
readonly id: 1;
|
|
68
|
+
readonly text: "Less than 1 year";
|
|
69
|
+
readonly displayValue: "< 1 year";
|
|
70
|
+
}, {
|
|
71
|
+
readonly id: 2;
|
|
72
|
+
readonly text: "1 to 2 years";
|
|
73
|
+
readonly displayValue: "1-2 years";
|
|
74
|
+
}, {
|
|
75
|
+
readonly id: 3;
|
|
76
|
+
readonly text: "3 to 5 years";
|
|
77
|
+
readonly displayValue: "3-5 years";
|
|
78
|
+
}, {
|
|
79
|
+
readonly id: 4;
|
|
80
|
+
readonly text: "6 to 10 years";
|
|
81
|
+
readonly displayValue: "6-10 years";
|
|
82
|
+
}, {
|
|
83
|
+
readonly id: 5;
|
|
84
|
+
readonly text: "More than 10 years";
|
|
85
|
+
readonly displayValue: "10+ years";
|
|
86
|
+
}];
|
|
87
|
+
/**
|
|
88
|
+
* Returns static years at company options (no API call needed)
|
|
89
|
+
*/
|
|
90
|
+
export declare function getYearsAtCompanyOptions(): Promise<TypeaheadResult>;
|
|
91
|
+
/**
|
|
92
|
+
* Returns static years in position options (no API call needed)
|
|
93
|
+
*/
|
|
94
|
+
export declare function getYearsInPositionOptions(): Promise<TypeaheadResult>;
|
|
95
|
+
/**
|
|
96
|
+
* Returns static years of experience options (no API call needed)
|
|
97
|
+
*/
|
|
98
|
+
export declare function getYearsOfExperienceOptions(): Promise<TypeaheadResult>;
|
|
24
99
|
export declare function getSalesNavigatorProfileDetails(profileUrnOrId: string): Promise<SalesNavigatorProfile>;
|
package/dist/linkedin-api.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.YEARS_OF_EXPERIENCE_OPTIONS = exports.YEARS_IN_POSITION_OPTIONS = exports.YEARS_AT_COMPANY_OPTIONS = void 0;
|
|
3
4
|
exports.getProfileByVanity = getProfileByVanity;
|
|
4
5
|
exports.getProfileByUrn = getProfileByUrn;
|
|
5
6
|
exports.searchSalesLeads = searchSalesLeads;
|
|
@@ -8,6 +9,9 @@ exports.resolveCompanyUniversalName = resolveCompanyUniversalName;
|
|
|
8
9
|
exports.getCompanyById = getCompanyById;
|
|
9
10
|
exports.getCompanyByUrl = getCompanyByUrl;
|
|
10
11
|
exports.typeahead = typeahead;
|
|
12
|
+
exports.getYearsAtCompanyOptions = getYearsAtCompanyOptions;
|
|
13
|
+
exports.getYearsInPositionOptions = getYearsInPositionOptions;
|
|
14
|
+
exports.getYearsOfExperienceOptions = getYearsOfExperienceOptions;
|
|
11
15
|
exports.getSalesNavigatorProfileDetails = getSalesNavigatorProfileDetails;
|
|
12
16
|
const config_1 = require("./config");
|
|
13
17
|
const http_client_1 = require("./http-client");
|
|
@@ -395,6 +399,69 @@ async function typeahead(options) {
|
|
|
395
399
|
return result;
|
|
396
400
|
}
|
|
397
401
|
// ---------------------------------------------------------------------------
|
|
402
|
+
// Static Filters (Years) - LinkedIn has fixed ranges, no need for API calls
|
|
403
|
+
// ---------------------------------------------------------------------------
|
|
404
|
+
exports.YEARS_AT_COMPANY_OPTIONS = [
|
|
405
|
+
{ id: 1, text: "Less than 1 year", displayValue: "< 1 year" },
|
|
406
|
+
{ id: 2, text: "1 to 2 years", displayValue: "1-2 years" },
|
|
407
|
+
{ id: 3, text: "3 to 5 years", displayValue: "3-5 years" },
|
|
408
|
+
{ id: 4, text: "6 to 10 years", displayValue: "6-10 years" },
|
|
409
|
+
{ id: 5, text: "More than 10 years", displayValue: "10+ years" },
|
|
410
|
+
];
|
|
411
|
+
exports.YEARS_IN_POSITION_OPTIONS = [
|
|
412
|
+
{ id: 1, text: "Less than 1 year", displayValue: "< 1 year" },
|
|
413
|
+
{ id: 2, text: "1 to 2 years", displayValue: "1-2 years" },
|
|
414
|
+
{ id: 3, text: "3 to 5 years", displayValue: "3-5 years" },
|
|
415
|
+
{ id: 4, text: "6 to 10 years", displayValue: "6-10 years" },
|
|
416
|
+
{ id: 5, text: "More than 10 years", displayValue: "10+ years" },
|
|
417
|
+
];
|
|
418
|
+
exports.YEARS_OF_EXPERIENCE_OPTIONS = [
|
|
419
|
+
{ id: 1, text: "Less than 1 year", displayValue: "< 1 year" },
|
|
420
|
+
{ id: 2, text: "1 to 2 years", displayValue: "1-2 years" },
|
|
421
|
+
{ id: 3, text: "3 to 5 years", displayValue: "3-5 years" },
|
|
422
|
+
{ id: 4, text: "6 to 10 years", displayValue: "6-10 years" },
|
|
423
|
+
{ id: 5, text: "More than 10 years", displayValue: "10+ years" },
|
|
424
|
+
];
|
|
425
|
+
/**
|
|
426
|
+
* Returns static years at company options (no API call needed)
|
|
427
|
+
*/
|
|
428
|
+
async function getYearsAtCompanyOptions() {
|
|
429
|
+
return {
|
|
430
|
+
items: exports.YEARS_AT_COMPANY_OPTIONS.map(opt => ({ id: String(opt.id), text: opt.displayValue })),
|
|
431
|
+
page: {
|
|
432
|
+
start: 0,
|
|
433
|
+
count: exports.YEARS_AT_COMPANY_OPTIONS.length,
|
|
434
|
+
total: exports.YEARS_AT_COMPANY_OPTIONS.length
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Returns static years in position options (no API call needed)
|
|
440
|
+
*/
|
|
441
|
+
async function getYearsInPositionOptions() {
|
|
442
|
+
return {
|
|
443
|
+
items: exports.YEARS_IN_POSITION_OPTIONS.map(opt => ({ id: String(opt.id), text: opt.displayValue })),
|
|
444
|
+
page: {
|
|
445
|
+
start: 0,
|
|
446
|
+
count: exports.YEARS_IN_POSITION_OPTIONS.length,
|
|
447
|
+
total: exports.YEARS_IN_POSITION_OPTIONS.length
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Returns static years of experience options (no API call needed)
|
|
453
|
+
*/
|
|
454
|
+
async function getYearsOfExperienceOptions() {
|
|
455
|
+
return {
|
|
456
|
+
items: exports.YEARS_OF_EXPERIENCE_OPTIONS.map(opt => ({ id: String(opt.id), text: opt.displayValue })),
|
|
457
|
+
page: {
|
|
458
|
+
start: 0,
|
|
459
|
+
count: exports.YEARS_OF_EXPERIENCE_OPTIONS.length,
|
|
460
|
+
total: exports.YEARS_OF_EXPERIENCE_OPTIONS.length
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
// ---------------------------------------------------------------------------
|
|
398
465
|
// Sales Navigator profile details
|
|
399
466
|
// ---------------------------------------------------------------------------
|
|
400
467
|
async function getSalesNavigatorProfileDetails(profileUrnOrId) {
|
package/package.json
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "linkedin-secret-sauce",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Private LinkedIn Sales Navigator client with automatic cookie management",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist"
|
|
9
|
-
],
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"registry": "https://registry.npmjs.org/"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"dev:playground": "pnpm -C apps/playground dev",
|
|
15
|
-
"search": "node scripts/rg-fast.mjs",
|
|
16
|
-
"rg:fast": "node scripts/rg-fast.mjs",
|
|
17
|
-
"build": "tsc -p tsconfig.json",
|
|
18
|
-
"lint": "eslint \"src/**/*.ts\" --max-warnings=0",
|
|
19
|
-
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
20
|
-
"dev": "tsc -w -p tsconfig.json",
|
|
21
|
-
"test": "vitest run",
|
|
22
|
-
"
|
|
23
|
-
"prepublishOnly": "npm run build",
|
|
24
|
-
"release:patch": "npm version patch && git push --follow-tags",
|
|
25
|
-
"release:minor": "npm version minor && git push --follow-tags",
|
|
26
|
-
"release:major": "npm version major && git push --follow-tags"
|
|
27
|
-
},
|
|
28
|
-
"keywords": [
|
|
29
|
-
"linkedin",
|
|
30
|
-
"sales-navigator",
|
|
31
|
-
"client",
|
|
32
|
-
"typescript"
|
|
33
|
-
],
|
|
34
|
-
"author": "Your Company",
|
|
35
|
-
"license": "UNLICENSED",
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=18.0.0"
|
|
38
|
-
},
|
|
39
|
-
"repository": {
|
|
40
|
-
"type": "git",
|
|
41
|
-
"url": "git+https://github.com/enerage/LinkedInSecretSauce.git"
|
|
42
|
-
},
|
|
43
|
-
"bugs": {
|
|
44
|
-
"url": "https://github.com/enerage/LinkedInSecretSauce/issues"
|
|
45
|
-
},
|
|
46
|
-
"homepage": "https://github.com/enerage/LinkedInSecretSauce#readme",
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"eslint": "^9.
|
|
52
|
-
"typescript": "^
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "linkedin-secret-sauce",
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "Private LinkedIn Sales Navigator client with automatic cookie management",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"registry": "https://registry.npmjs.org/"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev:playground": "pnpm -C apps/playground dev",
|
|
15
|
+
"search": "node scripts/rg-fast.mjs",
|
|
16
|
+
"rg:fast": "node scripts/rg-fast.mjs",
|
|
17
|
+
"build": "tsc -p tsconfig.json",
|
|
18
|
+
"lint": "eslint \"src/**/*.ts\" --max-warnings=0",
|
|
19
|
+
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
20
|
+
"dev": "tsc -w -p tsconfig.json",
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"_prepare": "husky",
|
|
23
|
+
"prepublishOnly": "npm run build",
|
|
24
|
+
"release:patch": "npm version patch && git push --follow-tags",
|
|
25
|
+
"release:minor": "npm version minor && git push --follow-tags",
|
|
26
|
+
"release:major": "npm version major && git push --follow-tags"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"linkedin",
|
|
30
|
+
"sales-navigator",
|
|
31
|
+
"client",
|
|
32
|
+
"typescript"
|
|
33
|
+
],
|
|
34
|
+
"author": "Your Company",
|
|
35
|
+
"license": "UNLICENSED",
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18.0.0"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/enerage/LinkedInSecretSauce.git"
|
|
42
|
+
},
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/enerage/LinkedInSecretSauce/issues"
|
|
45
|
+
},
|
|
46
|
+
"homepage": "https://github.com/enerage/LinkedInSecretSauce#readme",
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@commitlint/cli": "^19.4.0",
|
|
49
|
+
"@commitlint/config-conventional": "^19.4.0",
|
|
50
|
+
"@types/node": "^20.11.0",
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^8.9.0",
|
|
52
|
+
"@typescript-eslint/parser": "^8.9.0",
|
|
53
|
+
"eslint": "^9.12.0",
|
|
54
|
+
"husky": "^9.0.11",
|
|
55
|
+
"typescript": "^5.9.3",
|
|
56
|
+
"vitest": "^1.6.0"
|
|
57
|
+
}
|
|
58
|
+
}
|