linkedin-secret-sauce 0.3.25 → 0.3.26
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.js +9 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/linkedin-api.js
CHANGED
|
@@ -289,10 +289,18 @@ async function searchSalesLeads(keywords, options) {
|
|
|
289
289
|
// Extract metadata.totalDisplayCount (LinkedIn's display string like "500K+")
|
|
290
290
|
const metadataVal = rrec && 'metadata' in rrec ? rrec.metadata : undefined;
|
|
291
291
|
const metadata = (metadataVal && typeof metadataVal === 'object') ? metadataVal : undefined;
|
|
292
|
+
// Calculate hasMore: if we got a full page of results, there may be more
|
|
293
|
+
// This is more reliable than relying on total, which is often undefined
|
|
294
|
+
const hasMore = items.length === count;
|
|
292
295
|
const result = options
|
|
293
296
|
? {
|
|
294
297
|
items,
|
|
295
|
-
page: {
|
|
298
|
+
page: {
|
|
299
|
+
start: Number(paging.start ?? start),
|
|
300
|
+
count: Number(paging.count ?? count),
|
|
301
|
+
total: paging?.total,
|
|
302
|
+
hasMore
|
|
303
|
+
},
|
|
296
304
|
metadata: metadata?.totalDisplayCount ? { totalDisplayCount: metadata.totalDisplayCount } : undefined,
|
|
297
305
|
_meta: { sessionId } // Return sessionId to consumer
|
|
298
306
|
}
|
package/dist/types.d.ts
CHANGED