linkedin-secret-sauce 0.3.2 → 0.3.4

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/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { parseFullProfile } from './parsers/profile-parser';
7
7
  export { parseSalesSearchResults } from './parsers/search-parser';
8
8
  export * from './linkedin-api';
9
9
  export * from './types';
10
+ export type { LinkedInTenure, LinkedInPosition, LinkedInSpotlightBadge, SalesLeadSearchResult, } from './types';
10
11
  export * from './utils/metrics';
11
12
  export { getRequestHistory, clearRequestHistory } from './utils/request-history';
12
13
  export type { RequestHistoryEntry } from './utils/request-history';
@@ -196,23 +196,8 @@ async function searchSalesLeads(keywords, options) {
196
196
  catch { }
197
197
  return out;
198
198
  }
199
- let raw;
200
- try {
201
- raw = await doRequest(deco);
202
- }
203
- catch (e) {
204
- if ((e?.status ?? 0) === 400) {
205
- const fallback = deco.replace(/LeadSearchResult-\d+/, 'LeadSearchResult-17');
206
- try {
207
- (0, logger_1.log)('warn', 'api.decoFallback', { from: deco, to: fallback });
208
- }
209
- catch { }
210
- raw = await doRequest(fallback);
211
- }
212
- else {
213
- throw e;
214
- }
215
- }
199
+ // Use only the specified decoration ID - no fallbacks to ensure consistent data structure
200
+ const raw = await doRequest(deco);
216
201
  const items = (0, search_parser_1.parseSalesSearchResults)(raw);
217
202
  const rrec = (raw && typeof raw === 'object') ? raw : undefined;
218
203
  const pagingVal = rrec && 'paging' in rrec ? rrec.paging : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkedin-secret-sauce",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
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",