@@ -16,6 +16,7 @@ import {
1616 NvSearchPeople ,
1717 NvSendMessage ,
1818 NvSyncConversation ,
19+ NvSyncInbox ,
1920 ReactToPost ,
2021 RemoveConnection ,
2122 RetrieveConnections ,
@@ -28,6 +29,7 @@ import {
2829 SendConnectionRequest ,
2930 SendMessage ,
3031 SyncConversation ,
32+ SyncInbox ,
3133 WithdrawConnectionRequest ,
3234} from './operations' ;
3335import {
@@ -38,6 +40,8 @@ import {
3840 TApiUsageParams ,
3941 TConversationPollRequest ,
4042 TConversationPollResult ,
43+ TInboxPollRequest ,
44+ TInboxPollResult ,
4145 TLinkedApiActionErrorType ,
4246 TLinkedApiErrorType ,
4347} from './types' ;
@@ -92,6 +96,7 @@ class LinkedApi {
9296 this . customWorkflow = new CustomWorkflow ( this . httpClient ) ;
9397 this . sendMessage = new SendMessage ( this . httpClient ) ;
9498 this . syncConversation = new SyncConversation ( this . httpClient ) ;
99+ this . syncInbox = new SyncInbox ( this . httpClient ) ;
95100 this . checkConnectionStatus = new CheckConnectionStatus ( this . httpClient ) ;
96101 this . sendConnectionRequest = new SendConnectionRequest ( this . httpClient ) ;
97102 this . withdrawConnectionRequest = new WithdrawConnectionRequest ( this . httpClient ) ;
@@ -112,6 +117,7 @@ class LinkedApi {
112117 this . retrievePerformance = new RetrievePerformance ( this . httpClient ) ;
113118 this . nvSendMessage = new NvSendMessage ( this . httpClient ) ;
114119 this . nvSyncConversation = new NvSyncConversation ( this . httpClient ) ;
120+ this . nvSyncInbox = new NvSyncInbox ( this . httpClient ) ;
115121 this . nvSearchCompanies = new NvSearchCompanies ( this . httpClient ) ;
116122 this . nvSearchPeople = new NvSearchPeople ( this . httpClient ) ;
117123 this . nvFetchCompany = new NvFetchCompany ( this . httpClient ) ;
@@ -121,6 +127,7 @@ class LinkedApi {
121127 this . customWorkflow ,
122128 this . sendMessage ,
123129 this . syncConversation ,
130+ this . syncInbox ,
124131 this . checkConnectionStatus ,
125132 this . sendConnectionRequest ,
126133 this . withdrawConnectionRequest ,
@@ -141,6 +148,7 @@ class LinkedApi {
141148 this . retrievePerformance ,
142149 this . nvSendMessage ,
143150 this . nvSyncConversation ,
151+ this . nvSyncInbox ,
144152 this . nvSearchCompanies ,
145153 this . nvSearchPeople ,
146154 this . nvFetchCompany ,
@@ -242,6 +250,29 @@ class LinkedApi {
242250 */
243251 public syncConversation : SyncConversation ;
244252
253+ /**
254+ * Enable whole-inbox monitoring for standard LinkedIn messaging.
255+ *
256+ * This method enables monitoring of your entire standard LinkedIn inbox, preparing it for future
257+ * message polling with {@link pollInbox}. Unlike {@link syncConversation}, it is not scoped to a single
258+ * person: once enabled, all conversations in the inbox are monitored. This action takes no parameters
259+ * and returns no data.
260+ *
261+ * @param params - No parameters are required
262+ * @returns Promise resolving to the sync action
263+ *
264+ * @see {@link https://linkedapi.io/docs/working-with-conversations/ Working with Conversations Documentation }
265+ *
266+ * @example
267+ * ```typescript
268+ * const workflow = await linkedapi.syncInbox.execute({});
269+ *
270+ * await linkedapi.syncInbox.result(workflow.workflowId);
271+ * console.log("Inbox monitoring enabled and ready for polling");
272+ * ```
273+ */
274+ public syncInbox : SyncInbox ;
275+
245276 /**
246277 * Send a message to a LinkedIn user via Sales Navigator.
247278 *
@@ -293,6 +324,30 @@ class LinkedApi {
293324 */
294325 public nvSyncConversation : NvSyncConversation ;
295326
327+ /**
328+ * Enable whole-inbox monitoring for Sales Navigator messaging.
329+ *
330+ * This method enables monitoring of your entire Sales Navigator inbox, preparing it for future
331+ * message polling with {@link pollInbox}. Unlike {@link nvSyncConversation}, it is not scoped to a
332+ * single person: once enabled, all Sales Navigator conversations are monitored. This action takes no
333+ * parameters and returns no data. It can fail with a `noSalesNavigator` error if the account does not
334+ * have Sales Navigator.
335+ *
336+ * @param params - No parameters are required
337+ * @returns Promise resolving to the sync action
338+ *
339+ * @see {@link https://linkedapi.io/docs/working-with-conversations/ Working with Conversations Documentation }
340+ *
341+ * @example
342+ * ```typescript
343+ * const workflow = await linkedapi.nvSyncInbox.execute({});
344+ *
345+ * await linkedapi.nvSyncInbox.result(workflow.workflowId);
346+ * console.log("Sales Navigator inbox monitoring enabled and ready for polling");
347+ * ```
348+ */
349+ public nvSyncInbox : NvSyncInbox ;
350+
296351 /**
297352 * Poll multiple conversations to retrieve message history and new messages.
298353 *
@@ -374,6 +429,56 @@ class LinkedApi {
374429 }
375430 }
376431
432+ /**
433+ * Poll the monitored inbox to retrieve message history and new messages.
434+ *
435+ * This method reads messages from the inbox previously enabled for monitoring via {@link syncInbox}
436+ * and/or {@link nvSyncInbox}, using a direct HTTP request. Unlike {@link pollConversations}, it is not
437+ * scoped to specific person URLs: it returns messages across the whole monitored inbox, newest-first.
438+ * You can optionally filter by `since` timestamp, messaging `type`, and `threadId`.
439+ *
440+ * @param request - Optional filters: `since` timestamp, `type` ("st" | "nv"), and `threadId`
441+ * @returns Promise resolving to a response containing the inbox messages
442+ *
443+ * @see {@link https://linkedapi.io/docs/working-with-conversations/ Working with Conversations Documentation }
444+ *
445+ * @example
446+ * ```typescript
447+ * const pollResponse = await linkedapi.pollInbox({
448+ * type: "st",
449+ * since: "2025-01-01T00:00:00Z",
450+ * });
451+ *
452+ * if (pollResponse.data) {
453+ * pollResponse.data.messages.forEach((message) => {
454+ * console.log(`${message.sender} in ${message.threadId}: ${message.text}`);
455+ * });
456+ * } else {
457+ * console.error("Polling failed:", pollResponse.errors);
458+ * }
459+ * ```
460+ */
461+ public async pollInbox (
462+ request : TInboxPollRequest = { } ,
463+ ) : Promise < TMappedResponse < TInboxPollResult > > {
464+ const response = await this . httpClient . post < TInboxPollResult > ( '/inbox/poll' , request ) ;
465+ if ( response . success && response . result ) {
466+ return {
467+ data : response . result ,
468+ errors : [ ] ,
469+ } ;
470+ }
471+ return {
472+ data : undefined ,
473+ errors : [
474+ {
475+ type : response . error ?. type as TLinkedApiActionErrorType ,
476+ message : response . error ?. message ?? '' ,
477+ } ,
478+ ] ,
479+ } ;
480+ }
481+
377482 /**
378483 * Retrieve detailed information about a LinkedIn person profile.
379484 *
0 commit comments