linkedin-secret-sauce 0.3.7 → 0.3.9
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/constants.d.ts +28 -0
- package/dist/constants.js +13 -1
- package/dist/linkedin-api.d.ts +1 -1
- package/dist/linkedin-api.js +13 -2
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -235,6 +235,34 @@ export declare const LANGUAGE_OPTIONS: readonly [{
|
|
|
235
235
|
readonly id: "tr";
|
|
236
236
|
readonly text: "Turkish";
|
|
237
237
|
}];
|
|
238
|
+
export declare const COMPANY_SIZE_OPTIONS: readonly [{
|
|
239
|
+
readonly id: "A";
|
|
240
|
+
readonly text: "Self-employed";
|
|
241
|
+
}, {
|
|
242
|
+
readonly id: "B";
|
|
243
|
+
readonly text: "1-10";
|
|
244
|
+
}, {
|
|
245
|
+
readonly id: "C";
|
|
246
|
+
readonly text: "11-50";
|
|
247
|
+
}, {
|
|
248
|
+
readonly id: "D";
|
|
249
|
+
readonly text: "51-200";
|
|
250
|
+
}, {
|
|
251
|
+
readonly id: "E";
|
|
252
|
+
readonly text: "201-500";
|
|
253
|
+
}, {
|
|
254
|
+
readonly id: "F";
|
|
255
|
+
readonly text: "501-1,000";
|
|
256
|
+
}, {
|
|
257
|
+
readonly id: "G";
|
|
258
|
+
readonly text: "1,001-5,000";
|
|
259
|
+
}, {
|
|
260
|
+
readonly id: "H";
|
|
261
|
+
readonly text: "5,001-10,000";
|
|
262
|
+
}, {
|
|
263
|
+
readonly id: "I";
|
|
264
|
+
readonly text: "10,001+";
|
|
265
|
+
}];
|
|
238
266
|
export declare const INDUSTRY_OPTIONS: readonly [{
|
|
239
267
|
readonly id: "1";
|
|
240
268
|
readonly text: "Defense & Space";
|
package/dist/constants.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* These provide instant default options without requiring API calls
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.INDUSTRY_OPTIONS = exports.LANGUAGE_OPTIONS = exports.REGION_OPTIONS = exports.FUNCTION_OPTIONS = exports.YEARS_OPTIONS = exports.SENIORITY_OPTIONS = void 0;
|
|
7
|
+
exports.INDUSTRY_OPTIONS = exports.COMPANY_SIZE_OPTIONS = exports.LANGUAGE_OPTIONS = exports.REGION_OPTIONS = exports.FUNCTION_OPTIONS = exports.YEARS_OPTIONS = exports.SENIORITY_OPTIONS = void 0;
|
|
8
8
|
// Seniority Levels - LinkedIn fixed levels
|
|
9
9
|
exports.SENIORITY_OPTIONS = [
|
|
10
10
|
{ id: "1", text: "Unpaid" },
|
|
@@ -96,6 +96,18 @@ exports.LANGUAGE_OPTIONS = [
|
|
|
96
96
|
{ id: "tl", text: "Tagalog" },
|
|
97
97
|
{ id: "tr", text: "Turkish" },
|
|
98
98
|
];
|
|
99
|
+
// Company Sizes - LinkedIn's 9 employee count ranges
|
|
100
|
+
exports.COMPANY_SIZE_OPTIONS = [
|
|
101
|
+
{ id: "A", text: "Self-employed" },
|
|
102
|
+
{ id: "B", text: "1-10" },
|
|
103
|
+
{ id: "C", text: "11-50" },
|
|
104
|
+
{ id: "D", text: "51-200" },
|
|
105
|
+
{ id: "E", text: "201-500" },
|
|
106
|
+
{ id: "F", text: "501-1,000" },
|
|
107
|
+
{ id: "G", text: "1,001-5,000" },
|
|
108
|
+
{ id: "H", text: "5,001-10,000" },
|
|
109
|
+
{ id: "I", text: "10,001+" },
|
|
110
|
+
];
|
|
99
111
|
// Industries - top 47 most common industries from 400+ available (duplicates removed)
|
|
100
112
|
exports.INDUSTRY_OPTIONS = [
|
|
101
113
|
{ id: "1", text: "Defense & Space" },
|
package/dist/linkedin-api.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare function typeahead(options: {
|
|
|
21
21
|
start?: number;
|
|
22
22
|
count?: number;
|
|
23
23
|
}): Promise<TypeaheadResult>;
|
|
24
|
-
export { YEARS_OPTIONS as YEARS_AT_COMPANY_OPTIONS, YEARS_OPTIONS as YEARS_IN_POSITION_OPTIONS, YEARS_OPTIONS as YEARS_OF_EXPERIENCE_OPTIONS, SENIORITY_OPTIONS, FUNCTION_OPTIONS, REGION_OPTIONS, LANGUAGE_OPTIONS, INDUSTRY_OPTIONS, } from './constants';
|
|
24
|
+
export { YEARS_OPTIONS as YEARS_AT_COMPANY_OPTIONS, YEARS_OPTIONS as YEARS_IN_POSITION_OPTIONS, YEARS_OPTIONS as YEARS_OF_EXPERIENCE_OPTIONS, SENIORITY_OPTIONS, FUNCTION_OPTIONS, REGION_OPTIONS, LANGUAGE_OPTIONS, INDUSTRY_OPTIONS, COMPANY_SIZE_OPTIONS, } from './constants';
|
|
25
25
|
/**
|
|
26
26
|
* Returns static years at company options (no API call needed)
|
|
27
27
|
*/
|
package/dist/linkedin-api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.INDUSTRY_OPTIONS = exports.LANGUAGE_OPTIONS = exports.REGION_OPTIONS = exports.FUNCTION_OPTIONS = exports.SENIORITY_OPTIONS = exports.YEARS_OF_EXPERIENCE_OPTIONS = exports.YEARS_IN_POSITION_OPTIONS = exports.YEARS_AT_COMPANY_OPTIONS = void 0;
|
|
3
|
+
exports.COMPANY_SIZE_OPTIONS = exports.INDUSTRY_OPTIONS = exports.LANGUAGE_OPTIONS = exports.REGION_OPTIONS = exports.FUNCTION_OPTIONS = exports.SENIORITY_OPTIONS = exports.YEARS_OF_EXPERIENCE_OPTIONS = exports.YEARS_IN_POSITION_OPTIONS = exports.YEARS_AT_COMPANY_OPTIONS = void 0;
|
|
4
4
|
exports.getProfileByVanity = getProfileByVanity;
|
|
5
5
|
exports.getProfileByUrn = getProfileByUrn;
|
|
6
6
|
exports.searchSalesLeads = searchSalesLeads;
|
|
@@ -204,8 +204,15 @@ async function searchSalesLeads(keywords, options) {
|
|
|
204
204
|
const pagingVal = rrec && 'paging' in rrec ? rrec.paging : undefined;
|
|
205
205
|
const p = (pagingVal && typeof pagingVal === 'object') ? pagingVal : undefined;
|
|
206
206
|
const paging = p ?? { start, count };
|
|
207
|
+
// Extract metadata.totalDisplayCount (LinkedIn's display string like "500K+")
|
|
208
|
+
const metadataVal = rrec && 'metadata' in rrec ? rrec.metadata : undefined;
|
|
209
|
+
const metadata = (metadataVal && typeof metadataVal === 'object') ? metadataVal : undefined;
|
|
207
210
|
const result = options
|
|
208
|
-
? {
|
|
211
|
+
? {
|
|
212
|
+
items,
|
|
213
|
+
page: { start: Number(paging.start ?? start), count: Number(paging.count ?? count), total: paging?.total },
|
|
214
|
+
metadata: metadata?.totalDisplayCount ? { totalDisplayCount: metadata.totalDisplayCount } : undefined
|
|
215
|
+
}
|
|
209
216
|
: items; // backward-compat: old tests expect an array when no options passed
|
|
210
217
|
searchCache.set(cacheKey, { data: result, ts: Date.now() });
|
|
211
218
|
(0, metrics_1.incrementMetric)('searchCacheMisses');
|
|
@@ -366,6 +373,9 @@ async function typeahead(options) {
|
|
|
366
373
|
case 'SENIORITY_LEVEL':
|
|
367
374
|
staticOptions = constants_1.SENIORITY_OPTIONS;
|
|
368
375
|
break;
|
|
376
|
+
case 'COMPANY_SIZE':
|
|
377
|
+
staticOptions = constants_1.COMPANY_SIZE_OPTIONS;
|
|
378
|
+
break;
|
|
369
379
|
}
|
|
370
380
|
if (staticOptions) {
|
|
371
381
|
return {
|
|
@@ -425,6 +435,7 @@ Object.defineProperty(exports, "FUNCTION_OPTIONS", { enumerable: true, get: func
|
|
|
425
435
|
Object.defineProperty(exports, "REGION_OPTIONS", { enumerable: true, get: function () { return constants_2.REGION_OPTIONS; } });
|
|
426
436
|
Object.defineProperty(exports, "LANGUAGE_OPTIONS", { enumerable: true, get: function () { return constants_2.LANGUAGE_OPTIONS; } });
|
|
427
437
|
Object.defineProperty(exports, "INDUSTRY_OPTIONS", { enumerable: true, get: function () { return constants_2.INDUSTRY_OPTIONS; } });
|
|
438
|
+
Object.defineProperty(exports, "COMPANY_SIZE_OPTIONS", { enumerable: true, get: function () { return constants_2.COMPANY_SIZE_OPTIONS; } });
|
|
428
439
|
/**
|
|
429
440
|
* Returns static years at company options (no API call needed)
|
|
430
441
|
*/
|
package/dist/types.d.ts
CHANGED