lumnisai 0.1.17 → 0.1.19

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.cjs CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  const node_buffer = require('node:buffer');
6
4
  const crypto$1 = require('node:crypto');
7
5
 
@@ -942,8 +940,17 @@ class MessagingResource {
942
940
  );
943
941
  }
944
942
  /**
945
- * Get InMail credit information.
943
+ * Get InMail credit information with multi-subscription support.
944
+ *
945
+ * A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
946
+ * Each subscription has its own InMail credit pool.
947
+ *
946
948
  * By default returns cached data. Set forceRefresh=true to fetch real-time data from Unipile API.
949
+ *
950
+ * @param userId - User ID or email
951
+ * @param options - Optional parameters
952
+ * @param options.forceRefresh - If true, fetch real-time data from Unipile API
953
+ * @returns LinkedInCreditsResponse with subscriptions array and totals
947
954
  */
948
955
  async getLinkedInCredits(userId, options) {
949
956
  const queryParams = new URLSearchParams();
@@ -957,7 +964,12 @@ class MessagingResource {
957
964
  }
958
965
  /**
959
966
  * Force refresh InMail credits from Unipile API.
967
+ *
960
968
  * Fetches real-time credit balance from provider and updates cache.
969
+ * Returns multi-subscription breakdown with per-subscription credit pools.
970
+ *
971
+ * @param userId - User ID or email
972
+ * @returns LinkedInCreditsResponse with isRealTime=true and subscriptions array
961
973
  */
962
974
  async refreshLinkedInCredits(userId) {
963
975
  const queryParams = new URLSearchParams();
@@ -1340,9 +1352,9 @@ class MessagingResource {
1340
1352
  *
1341
1353
  * @param conversationId - UUID of the conversation to delete
1342
1354
  * @param userId - User ID or email
1343
- * @returns DeleteConversationResponse with success status and conversation_id
1355
+ * @returns DeleteConversationResponse with success status and conversationId
1344
1356
  * @throws MessagingNotFoundError if conversation not found (404)
1345
- * @throws MessagingValidationError if conversation_id is invalid (400)
1357
+ * @throws MessagingValidationError if conversationId is invalid (400)
1346
1358
  */
1347
1359
  async deleteConversation(conversationId, userId) {
1348
1360
  try {
@@ -2744,7 +2756,6 @@ exports.SourcesNotAvailableError = SourcesNotAvailableError;
2744
2756
  exports.SyncJobStatus = SyncJobStatus;
2745
2757
  exports.ValidationError = ValidationError;
2746
2758
  exports.canSendInmail = canSendInmail;
2747
- exports.default = LumnisClient;
2748
2759
  exports.displayProgress = displayProgress;
2749
2760
  exports.formatProgressEntry = formatProgressEntry;
2750
2761
  exports.getBestSubscriptionForAction = getBestSubscriptionForAction;
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * LinkedIn subscription types
3
3
  */
4
- type LinkedInSubscriptionType$1 = 'basic' | 'premium_career' | 'premium_business' | 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate';
4
+ type LinkedInLimitSubscriptionType = 'basic' | 'premium_career' | 'premium_business' | 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate';
5
5
  /**
6
6
  * LinkedIn limits by subscription type
7
7
  */
@@ -27,7 +27,7 @@ interface LinkedInLimits {
27
27
  /**
28
28
  * LinkedIn rate limits by subscription type
29
29
  */
30
- declare const LINKEDIN_LIMITS: Record<LinkedInSubscriptionType$1, LinkedInLimits>;
30
+ declare const LINKEDIN_LIMITS: Record<LinkedInLimitSubscriptionType, LinkedInLimits>;
31
31
  /**
32
32
  * Action delays for human-like behavior (in seconds)
33
33
  */
@@ -40,19 +40,19 @@ declare const ACTION_DELAYS: {
40
40
  /**
41
41
  * Get all limits for a subscription type
42
42
  */
43
- declare function getLimits(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined): LinkedInLimits;
43
+ declare function getLimits(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): LinkedInLimits;
44
44
  /**
45
45
  * Get connection request limit for a subscription type
46
46
  */
47
- declare function getConnectionRequestLimit(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined, useSafeLimit?: boolean): number;
47
+ declare function getConnectionRequestLimit(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined, useSafeLimit?: boolean): number;
48
48
  /**
49
49
  * Get message limit for a subscription type
50
50
  */
51
- declare function getMessageLimit(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined, useSafeLimit?: boolean): number;
51
+ declare function getMessageLimit(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined, useSafeLimit?: boolean): number;
52
52
  /**
53
53
  * Get InMail allowance for a subscription type
54
54
  */
55
- declare function getInmailAllowance(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined): {
55
+ declare function getInmailAllowance(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): {
56
56
  monthlyCredits: number;
57
57
  maxAccumulation: number;
58
58
  rollover: boolean;
@@ -60,11 +60,11 @@ declare function getInmailAllowance(subscriptionType: LinkedInSubscriptionType$1
60
60
  /**
61
61
  * Check if subscription can send InMail
62
62
  */
63
- declare function canSendInmail(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined): boolean;
63
+ declare function canSendInmail(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): boolean;
64
64
  /**
65
65
  * Get best subscription for a specific action when user has multiple subscriptions
66
66
  */
67
- declare function getBestSubscriptionForAction(subscriptionTypes: (LinkedInSubscriptionType$1 | string)[], action: 'inmail' | 'connection_requests' | 'messages'): LinkedInSubscriptionType$1 | string | null;
67
+ declare function getBestSubscriptionForAction(subscriptionTypes: (LinkedInLimitSubscriptionType | string)[], action: 'inmail' | 'connection_requests' | 'messages'): LinkedInLimitSubscriptionType | string | null;
68
68
 
69
69
  interface PaginationParams {
70
70
  page?: number;
@@ -1594,16 +1594,22 @@ interface BatchConnectionStatusResponse {
1594
1594
  summary: ConnectionSummary;
1595
1595
  }
1596
1596
  /**
1597
- * LinkedIn credits response
1597
+ * LinkedIn credits response with multiple subscription support.
1598
+ *
1599
+ * A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
1600
+ * Each subscription has its own InMail credit pool.
1598
1601
  */
1599
1602
  interface LinkedInCreditsResponse {
1603
+ subscriptions: LinkedInSubscriptionInfo[];
1600
1604
  subscriptionType?: string | null;
1601
1605
  creditsRemaining?: number | null;
1602
1606
  creditsUpdatedAt?: string | null;
1603
1607
  isRealTime?: boolean;
1608
+ canSendInmail: boolean;
1604
1609
  }
1605
1610
  /**
1606
- * LinkedIn subscription information
1611
+ * Individual LinkedIn subscription with its own InMail credit pool.
1612
+ * A LinkedIn account can have multiple subscriptions simultaneously.
1607
1613
  */
1608
1614
  interface LinkedInSubscriptionInfo {
1609
1615
  type: string;
@@ -1809,23 +1815,23 @@ interface BatchSendResponse {
1809
1815
  */
1810
1816
  interface DeleteConversationResponse {
1811
1817
  success: boolean;
1812
- conversation_id: string;
1818
+ conversationId: string;
1813
1819
  }
1814
1820
  /**
1815
1821
  * Response from deleting conversations by project
1816
1822
  */
1817
1823
  interface DeleteConversationsByProjectResponse {
1818
1824
  success: boolean;
1819
- project_id: string;
1820
- deleted_count: number;
1825
+ projectId: string;
1826
+ deletedCount: number;
1821
1827
  }
1822
1828
  /**
1823
1829
  * Response from unlinking conversations from project
1824
1830
  */
1825
1831
  interface UnlinkConversationsResponse {
1826
1832
  success: boolean;
1827
- project_id: string;
1828
- unlinked_count: number;
1833
+ projectId: string;
1834
+ unlinkedCount: number;
1829
1835
  }
1830
1836
  /**
1831
1837
  * Request to check if there's been prior contact with a person
@@ -2057,15 +2063,29 @@ declare class MessagingResource {
2057
2063
  forceRefresh?: boolean;
2058
2064
  }): Promise<LinkedInAccountInfoResponse>;
2059
2065
  /**
2060
- * Get InMail credit information.
2066
+ * Get InMail credit information with multi-subscription support.
2067
+ *
2068
+ * A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
2069
+ * Each subscription has its own InMail credit pool.
2070
+ *
2061
2071
  * By default returns cached data. Set forceRefresh=true to fetch real-time data from Unipile API.
2072
+ *
2073
+ * @param userId - User ID or email
2074
+ * @param options - Optional parameters
2075
+ * @param options.forceRefresh - If true, fetch real-time data from Unipile API
2076
+ * @returns LinkedInCreditsResponse with subscriptions array and totals
2062
2077
  */
2063
2078
  getLinkedInCredits(userId: string, options?: {
2064
2079
  forceRefresh?: boolean;
2065
2080
  }): Promise<LinkedInCreditsResponse>;
2066
2081
  /**
2067
2082
  * Force refresh InMail credits from Unipile API.
2083
+ *
2068
2084
  * Fetches real-time credit balance from provider and updates cache.
2085
+ * Returns multi-subscription breakdown with per-subscription credit pools.
2086
+ *
2087
+ * @param userId - User ID or email
2088
+ * @returns LinkedInCreditsResponse with isRealTime=true and subscriptions array
2069
2089
  */
2070
2090
  refreshLinkedInCredits(userId: string): Promise<LinkedInCreditsResponse>;
2071
2091
  /**
@@ -2192,9 +2212,9 @@ declare class MessagingResource {
2192
2212
  *
2193
2213
  * @param conversationId - UUID of the conversation to delete
2194
2214
  * @param userId - User ID or email
2195
- * @returns DeleteConversationResponse with success status and conversation_id
2215
+ * @returns DeleteConversationResponse with success status and conversationId
2196
2216
  * @throws MessagingNotFoundError if conversation not found (404)
2197
- * @throws MessagingValidationError if conversation_id is invalid (400)
2217
+ * @throws MessagingValidationError if conversationId is invalid (400)
2198
2218
  */
2199
2219
  deleteConversation(conversationId: string, userId: string): Promise<DeleteConversationResponse>;
2200
2220
  /**
@@ -2888,5 +2908,4 @@ declare class ProgressTracker {
2888
2908
  */
2889
2909
  declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
2890
2910
 
2891
- export = LumnisClient;
2892
- export { ACTION_DELAYS, type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchCheckPriorContactRequest, type BatchCheckPriorContactResponse, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftCompleteData, type BatchDraftCreatedData, type BatchDraftErrorData, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, type ChannelContactHistory, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type CheckPriorContactRequest, type CheckPriorContactResponse, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DeleteConversationResponse, type DeleteConversationsByProjectResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, LINKEDIN_LIMITS, type LinkedInAccountInfoResponse, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInLimits, type LinkedInSendRequest, type LinkedInSubscriptionInfo, type LinkedInSubscriptionType$1 as LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type PriorContactMessage, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectPriorContactResult, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, canSendInmail, displayProgress, formatProgressEntry, getBestSubscriptionForAction, getConnectionRequestLimit, getInmailAllowance, getLimits, getMessageLimit, verifyWebhookSignature };
2911
+ export { ACTION_DELAYS, type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchCheckPriorContactRequest, type BatchCheckPriorContactResponse, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftCompleteData, type BatchDraftCreatedData, type BatchDraftErrorData, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, type ChannelContactHistory, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type CheckPriorContactRequest, type CheckPriorContactResponse, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DeleteConversationResponse, type DeleteConversationsByProjectResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, LINKEDIN_LIMITS, type LinkedInAccountInfoResponse, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInLimitSubscriptionType, type LinkedInLimits, type LinkedInSendRequest, type LinkedInSubscriptionInfo, LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type PriorContactMessage, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectPriorContactResult, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, canSendInmail, displayProgress, formatProgressEntry, getBestSubscriptionForAction, getConnectionRequestLimit, getInmailAllowance, getLimits, getMessageLimit, verifyWebhookSignature };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * LinkedIn subscription types
3
3
  */
4
- type LinkedInSubscriptionType$1 = 'basic' | 'premium_career' | 'premium_business' | 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate';
4
+ type LinkedInLimitSubscriptionType = 'basic' | 'premium_career' | 'premium_business' | 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate';
5
5
  /**
6
6
  * LinkedIn limits by subscription type
7
7
  */
@@ -27,7 +27,7 @@ interface LinkedInLimits {
27
27
  /**
28
28
  * LinkedIn rate limits by subscription type
29
29
  */
30
- declare const LINKEDIN_LIMITS: Record<LinkedInSubscriptionType$1, LinkedInLimits>;
30
+ declare const LINKEDIN_LIMITS: Record<LinkedInLimitSubscriptionType, LinkedInLimits>;
31
31
  /**
32
32
  * Action delays for human-like behavior (in seconds)
33
33
  */
@@ -40,19 +40,19 @@ declare const ACTION_DELAYS: {
40
40
  /**
41
41
  * Get all limits for a subscription type
42
42
  */
43
- declare function getLimits(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined): LinkedInLimits;
43
+ declare function getLimits(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): LinkedInLimits;
44
44
  /**
45
45
  * Get connection request limit for a subscription type
46
46
  */
47
- declare function getConnectionRequestLimit(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined, useSafeLimit?: boolean): number;
47
+ declare function getConnectionRequestLimit(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined, useSafeLimit?: boolean): number;
48
48
  /**
49
49
  * Get message limit for a subscription type
50
50
  */
51
- declare function getMessageLimit(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined, useSafeLimit?: boolean): number;
51
+ declare function getMessageLimit(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined, useSafeLimit?: boolean): number;
52
52
  /**
53
53
  * Get InMail allowance for a subscription type
54
54
  */
55
- declare function getInmailAllowance(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined): {
55
+ declare function getInmailAllowance(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): {
56
56
  monthlyCredits: number;
57
57
  maxAccumulation: number;
58
58
  rollover: boolean;
@@ -60,11 +60,11 @@ declare function getInmailAllowance(subscriptionType: LinkedInSubscriptionType$1
60
60
  /**
61
61
  * Check if subscription can send InMail
62
62
  */
63
- declare function canSendInmail(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined): boolean;
63
+ declare function canSendInmail(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): boolean;
64
64
  /**
65
65
  * Get best subscription for a specific action when user has multiple subscriptions
66
66
  */
67
- declare function getBestSubscriptionForAction(subscriptionTypes: (LinkedInSubscriptionType$1 | string)[], action: 'inmail' | 'connection_requests' | 'messages'): LinkedInSubscriptionType$1 | string | null;
67
+ declare function getBestSubscriptionForAction(subscriptionTypes: (LinkedInLimitSubscriptionType | string)[], action: 'inmail' | 'connection_requests' | 'messages'): LinkedInLimitSubscriptionType | string | null;
68
68
 
69
69
  interface PaginationParams {
70
70
  page?: number;
@@ -1594,16 +1594,22 @@ interface BatchConnectionStatusResponse {
1594
1594
  summary: ConnectionSummary;
1595
1595
  }
1596
1596
  /**
1597
- * LinkedIn credits response
1597
+ * LinkedIn credits response with multiple subscription support.
1598
+ *
1599
+ * A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
1600
+ * Each subscription has its own InMail credit pool.
1598
1601
  */
1599
1602
  interface LinkedInCreditsResponse {
1603
+ subscriptions: LinkedInSubscriptionInfo[];
1600
1604
  subscriptionType?: string | null;
1601
1605
  creditsRemaining?: number | null;
1602
1606
  creditsUpdatedAt?: string | null;
1603
1607
  isRealTime?: boolean;
1608
+ canSendInmail: boolean;
1604
1609
  }
1605
1610
  /**
1606
- * LinkedIn subscription information
1611
+ * Individual LinkedIn subscription with its own InMail credit pool.
1612
+ * A LinkedIn account can have multiple subscriptions simultaneously.
1607
1613
  */
1608
1614
  interface LinkedInSubscriptionInfo {
1609
1615
  type: string;
@@ -1809,23 +1815,23 @@ interface BatchSendResponse {
1809
1815
  */
1810
1816
  interface DeleteConversationResponse {
1811
1817
  success: boolean;
1812
- conversation_id: string;
1818
+ conversationId: string;
1813
1819
  }
1814
1820
  /**
1815
1821
  * Response from deleting conversations by project
1816
1822
  */
1817
1823
  interface DeleteConversationsByProjectResponse {
1818
1824
  success: boolean;
1819
- project_id: string;
1820
- deleted_count: number;
1825
+ projectId: string;
1826
+ deletedCount: number;
1821
1827
  }
1822
1828
  /**
1823
1829
  * Response from unlinking conversations from project
1824
1830
  */
1825
1831
  interface UnlinkConversationsResponse {
1826
1832
  success: boolean;
1827
- project_id: string;
1828
- unlinked_count: number;
1833
+ projectId: string;
1834
+ unlinkedCount: number;
1829
1835
  }
1830
1836
  /**
1831
1837
  * Request to check if there's been prior contact with a person
@@ -2057,15 +2063,29 @@ declare class MessagingResource {
2057
2063
  forceRefresh?: boolean;
2058
2064
  }): Promise<LinkedInAccountInfoResponse>;
2059
2065
  /**
2060
- * Get InMail credit information.
2066
+ * Get InMail credit information with multi-subscription support.
2067
+ *
2068
+ * A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
2069
+ * Each subscription has its own InMail credit pool.
2070
+ *
2061
2071
  * By default returns cached data. Set forceRefresh=true to fetch real-time data from Unipile API.
2072
+ *
2073
+ * @param userId - User ID or email
2074
+ * @param options - Optional parameters
2075
+ * @param options.forceRefresh - If true, fetch real-time data from Unipile API
2076
+ * @returns LinkedInCreditsResponse with subscriptions array and totals
2062
2077
  */
2063
2078
  getLinkedInCredits(userId: string, options?: {
2064
2079
  forceRefresh?: boolean;
2065
2080
  }): Promise<LinkedInCreditsResponse>;
2066
2081
  /**
2067
2082
  * Force refresh InMail credits from Unipile API.
2083
+ *
2068
2084
  * Fetches real-time credit balance from provider and updates cache.
2085
+ * Returns multi-subscription breakdown with per-subscription credit pools.
2086
+ *
2087
+ * @param userId - User ID or email
2088
+ * @returns LinkedInCreditsResponse with isRealTime=true and subscriptions array
2069
2089
  */
2070
2090
  refreshLinkedInCredits(userId: string): Promise<LinkedInCreditsResponse>;
2071
2091
  /**
@@ -2192,9 +2212,9 @@ declare class MessagingResource {
2192
2212
  *
2193
2213
  * @param conversationId - UUID of the conversation to delete
2194
2214
  * @param userId - User ID or email
2195
- * @returns DeleteConversationResponse with success status and conversation_id
2215
+ * @returns DeleteConversationResponse with success status and conversationId
2196
2216
  * @throws MessagingNotFoundError if conversation not found (404)
2197
- * @throws MessagingValidationError if conversation_id is invalid (400)
2217
+ * @throws MessagingValidationError if conversationId is invalid (400)
2198
2218
  */
2199
2219
  deleteConversation(conversationId: string, userId: string): Promise<DeleteConversationResponse>;
2200
2220
  /**
@@ -2888,4 +2908,4 @@ declare class ProgressTracker {
2888
2908
  */
2889
2909
  declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
2890
2910
 
2891
- export { ACTION_DELAYS, type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchCheckPriorContactRequest, type BatchCheckPriorContactResponse, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftCompleteData, type BatchDraftCreatedData, type BatchDraftErrorData, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, type ChannelContactHistory, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type CheckPriorContactRequest, type CheckPriorContactResponse, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DeleteConversationResponse, type DeleteConversationsByProjectResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, LINKEDIN_LIMITS, type LinkedInAccountInfoResponse, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInLimits, type LinkedInSendRequest, type LinkedInSubscriptionInfo, type LinkedInSubscriptionType$1 as LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type PriorContactMessage, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectPriorContactResult, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, canSendInmail, LumnisClient as default, displayProgress, formatProgressEntry, getBestSubscriptionForAction, getConnectionRequestLimit, getInmailAllowance, getLimits, getMessageLimit, verifyWebhookSignature };
2911
+ export { ACTION_DELAYS, type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchCheckPriorContactRequest, type BatchCheckPriorContactResponse, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftCompleteData, type BatchDraftCreatedData, type BatchDraftErrorData, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, type ChannelContactHistory, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type CheckPriorContactRequest, type CheckPriorContactResponse, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DeleteConversationResponse, type DeleteConversationsByProjectResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, LINKEDIN_LIMITS, type LinkedInAccountInfoResponse, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInLimitSubscriptionType, type LinkedInLimits, type LinkedInSendRequest, type LinkedInSubscriptionInfo, LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type PriorContactMessage, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectPriorContactResult, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, canSendInmail, displayProgress, formatProgressEntry, getBestSubscriptionForAction, getConnectionRequestLimit, getInmailAllowance, getLimits, getMessageLimit, verifyWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * LinkedIn subscription types
3
3
  */
4
- type LinkedInSubscriptionType$1 = 'basic' | 'premium_career' | 'premium_business' | 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate';
4
+ type LinkedInLimitSubscriptionType = 'basic' | 'premium_career' | 'premium_business' | 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate';
5
5
  /**
6
6
  * LinkedIn limits by subscription type
7
7
  */
@@ -27,7 +27,7 @@ interface LinkedInLimits {
27
27
  /**
28
28
  * LinkedIn rate limits by subscription type
29
29
  */
30
- declare const LINKEDIN_LIMITS: Record<LinkedInSubscriptionType$1, LinkedInLimits>;
30
+ declare const LINKEDIN_LIMITS: Record<LinkedInLimitSubscriptionType, LinkedInLimits>;
31
31
  /**
32
32
  * Action delays for human-like behavior (in seconds)
33
33
  */
@@ -40,19 +40,19 @@ declare const ACTION_DELAYS: {
40
40
  /**
41
41
  * Get all limits for a subscription type
42
42
  */
43
- declare function getLimits(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined): LinkedInLimits;
43
+ declare function getLimits(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): LinkedInLimits;
44
44
  /**
45
45
  * Get connection request limit for a subscription type
46
46
  */
47
- declare function getConnectionRequestLimit(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined, useSafeLimit?: boolean): number;
47
+ declare function getConnectionRequestLimit(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined, useSafeLimit?: boolean): number;
48
48
  /**
49
49
  * Get message limit for a subscription type
50
50
  */
51
- declare function getMessageLimit(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined, useSafeLimit?: boolean): number;
51
+ declare function getMessageLimit(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined, useSafeLimit?: boolean): number;
52
52
  /**
53
53
  * Get InMail allowance for a subscription type
54
54
  */
55
- declare function getInmailAllowance(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined): {
55
+ declare function getInmailAllowance(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): {
56
56
  monthlyCredits: number;
57
57
  maxAccumulation: number;
58
58
  rollover: boolean;
@@ -60,11 +60,11 @@ declare function getInmailAllowance(subscriptionType: LinkedInSubscriptionType$1
60
60
  /**
61
61
  * Check if subscription can send InMail
62
62
  */
63
- declare function canSendInmail(subscriptionType: LinkedInSubscriptionType$1 | string | null | undefined): boolean;
63
+ declare function canSendInmail(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): boolean;
64
64
  /**
65
65
  * Get best subscription for a specific action when user has multiple subscriptions
66
66
  */
67
- declare function getBestSubscriptionForAction(subscriptionTypes: (LinkedInSubscriptionType$1 | string)[], action: 'inmail' | 'connection_requests' | 'messages'): LinkedInSubscriptionType$1 | string | null;
67
+ declare function getBestSubscriptionForAction(subscriptionTypes: (LinkedInLimitSubscriptionType | string)[], action: 'inmail' | 'connection_requests' | 'messages'): LinkedInLimitSubscriptionType | string | null;
68
68
 
69
69
  interface PaginationParams {
70
70
  page?: number;
@@ -1594,16 +1594,22 @@ interface BatchConnectionStatusResponse {
1594
1594
  summary: ConnectionSummary;
1595
1595
  }
1596
1596
  /**
1597
- * LinkedIn credits response
1597
+ * LinkedIn credits response with multiple subscription support.
1598
+ *
1599
+ * A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
1600
+ * Each subscription has its own InMail credit pool.
1598
1601
  */
1599
1602
  interface LinkedInCreditsResponse {
1603
+ subscriptions: LinkedInSubscriptionInfo[];
1600
1604
  subscriptionType?: string | null;
1601
1605
  creditsRemaining?: number | null;
1602
1606
  creditsUpdatedAt?: string | null;
1603
1607
  isRealTime?: boolean;
1608
+ canSendInmail: boolean;
1604
1609
  }
1605
1610
  /**
1606
- * LinkedIn subscription information
1611
+ * Individual LinkedIn subscription with its own InMail credit pool.
1612
+ * A LinkedIn account can have multiple subscriptions simultaneously.
1607
1613
  */
1608
1614
  interface LinkedInSubscriptionInfo {
1609
1615
  type: string;
@@ -1809,23 +1815,23 @@ interface BatchSendResponse {
1809
1815
  */
1810
1816
  interface DeleteConversationResponse {
1811
1817
  success: boolean;
1812
- conversation_id: string;
1818
+ conversationId: string;
1813
1819
  }
1814
1820
  /**
1815
1821
  * Response from deleting conversations by project
1816
1822
  */
1817
1823
  interface DeleteConversationsByProjectResponse {
1818
1824
  success: boolean;
1819
- project_id: string;
1820
- deleted_count: number;
1825
+ projectId: string;
1826
+ deletedCount: number;
1821
1827
  }
1822
1828
  /**
1823
1829
  * Response from unlinking conversations from project
1824
1830
  */
1825
1831
  interface UnlinkConversationsResponse {
1826
1832
  success: boolean;
1827
- project_id: string;
1828
- unlinked_count: number;
1833
+ projectId: string;
1834
+ unlinkedCount: number;
1829
1835
  }
1830
1836
  /**
1831
1837
  * Request to check if there's been prior contact with a person
@@ -2057,15 +2063,29 @@ declare class MessagingResource {
2057
2063
  forceRefresh?: boolean;
2058
2064
  }): Promise<LinkedInAccountInfoResponse>;
2059
2065
  /**
2060
- * Get InMail credit information.
2066
+ * Get InMail credit information with multi-subscription support.
2067
+ *
2068
+ * A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
2069
+ * Each subscription has its own InMail credit pool.
2070
+ *
2061
2071
  * By default returns cached data. Set forceRefresh=true to fetch real-time data from Unipile API.
2072
+ *
2073
+ * @param userId - User ID or email
2074
+ * @param options - Optional parameters
2075
+ * @param options.forceRefresh - If true, fetch real-time data from Unipile API
2076
+ * @returns LinkedInCreditsResponse with subscriptions array and totals
2062
2077
  */
2063
2078
  getLinkedInCredits(userId: string, options?: {
2064
2079
  forceRefresh?: boolean;
2065
2080
  }): Promise<LinkedInCreditsResponse>;
2066
2081
  /**
2067
2082
  * Force refresh InMail credits from Unipile API.
2083
+ *
2068
2084
  * Fetches real-time credit balance from provider and updates cache.
2085
+ * Returns multi-subscription breakdown with per-subscription credit pools.
2086
+ *
2087
+ * @param userId - User ID or email
2088
+ * @returns LinkedInCreditsResponse with isRealTime=true and subscriptions array
2069
2089
  */
2070
2090
  refreshLinkedInCredits(userId: string): Promise<LinkedInCreditsResponse>;
2071
2091
  /**
@@ -2192,9 +2212,9 @@ declare class MessagingResource {
2192
2212
  *
2193
2213
  * @param conversationId - UUID of the conversation to delete
2194
2214
  * @param userId - User ID or email
2195
- * @returns DeleteConversationResponse with success status and conversation_id
2215
+ * @returns DeleteConversationResponse with success status and conversationId
2196
2216
  * @throws MessagingNotFoundError if conversation not found (404)
2197
- * @throws MessagingValidationError if conversation_id is invalid (400)
2217
+ * @throws MessagingValidationError if conversationId is invalid (400)
2198
2218
  */
2199
2219
  deleteConversation(conversationId: string, userId: string): Promise<DeleteConversationResponse>;
2200
2220
  /**
@@ -2888,5 +2908,4 @@ declare class ProgressTracker {
2888
2908
  */
2889
2909
  declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
2890
2910
 
2891
- export = LumnisClient;
2892
- export { ACTION_DELAYS, type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchCheckPriorContactRequest, type BatchCheckPriorContactResponse, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftCompleteData, type BatchDraftCreatedData, type BatchDraftErrorData, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, type ChannelContactHistory, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type CheckPriorContactRequest, type CheckPriorContactResponse, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DeleteConversationResponse, type DeleteConversationsByProjectResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, LINKEDIN_LIMITS, type LinkedInAccountInfoResponse, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInLimits, type LinkedInSendRequest, type LinkedInSubscriptionInfo, type LinkedInSubscriptionType$1 as LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type PriorContactMessage, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectPriorContactResult, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, canSendInmail, displayProgress, formatProgressEntry, getBestSubscriptionForAction, getConnectionRequestLimit, getInmailAllowance, getLimits, getMessageLimit, verifyWebhookSignature };
2911
+ export { ACTION_DELAYS, type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppliedFilters, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BatchCheckConnectionRequest, type BatchCheckPriorContactRequest, type BatchCheckPriorContactResponse, type BatchConnectionRequest, type BatchConnectionResponse, type BatchConnectionStatus, type BatchConnectionStatusResponse, type BatchDraftCompleteData, type BatchDraftCreatedData, type BatchDraftErrorData, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, type ChannelContactHistory, ChannelType, type CheckAppEnabledParams, type CheckLinkedInConnectionRequest, type CheckPriorContactRequest, type CheckPriorContactResponse, type ChunkingStrategy, type ConnectionAcceptedData, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ConnectionSummary, type ContentType, type ConversationDetail, ConversationStatus, type ConversationSummary, type CreateDraftRequest, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DeleteConversationResponse, type DeleteConversationsByProjectResponse, type DisconnectRequest, type DisconnectResponse, type DraftResponse, DraftStatus, type DuplicateHandling, type Email, type EmailThreadSummary, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type FilterLogic, type FilterValue, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, LINKEDIN_LIMITS, type LinkedInAccountInfoResponse, type LinkedInConnectionStatus, type LinkedInCreditsResponse, type LinkedInLimitSubscriptionType, type LinkedInLimits, type LinkedInSendRequest, type LinkedInSubscriptionInfo, LinkedInSubscriptionType, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type MessageReceivedData, type MessageResponse, type MessageSentData, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingResource, MessagingSendError, MessagingValidationError, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, type PaginationInfo, type PaginationParams, PeopleDataSource, PeopleResource, type PeopleSearchRequest, type PeopleSearchResponse, type PersonResult, type Plan, type PriorContactMessage, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, type ProspectConnectionCheck, type ProspectInfo, type ProspectPriorContactResult, type ProspectSyncIdentifier, type ProspectSyncResult, ProviderType, QueueItemStatus, type QuickPeopleSearchOutput, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type SalaryRange, type Scope, type SelectedSkill, type SendMessageRequest, type SendMessageResponse, type SendReplyRequest, type SendResult, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, SourcesNotAvailableError, type SpecializedAgentParams, type SpecializedAgentType, type StoreApiKeyRequest, type SyncJobResponse, SyncJobStatus, type SyncProspectRequest, type SyncProspectResponse, type SyncRequest, type SyncStats, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateLinkedInSubscriptionRequest, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, type WebhookEvent, type WebhookPayload, canSendInmail, displayProgress, formatProgressEntry, getBestSubscriptionForAction, getConnectionRequestLimit, getInmailAllowance, getLimits, getMessageLimit, verifyWebhookSignature };
package/dist/index.mjs CHANGED
@@ -934,8 +934,17 @@ class MessagingResource {
934
934
  );
935
935
  }
936
936
  /**
937
- * Get InMail credit information.
937
+ * Get InMail credit information with multi-subscription support.
938
+ *
939
+ * A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
940
+ * Each subscription has its own InMail credit pool.
941
+ *
938
942
  * By default returns cached data. Set forceRefresh=true to fetch real-time data from Unipile API.
943
+ *
944
+ * @param userId - User ID or email
945
+ * @param options - Optional parameters
946
+ * @param options.forceRefresh - If true, fetch real-time data from Unipile API
947
+ * @returns LinkedInCreditsResponse with subscriptions array and totals
939
948
  */
940
949
  async getLinkedInCredits(userId, options) {
941
950
  const queryParams = new URLSearchParams();
@@ -949,7 +958,12 @@ class MessagingResource {
949
958
  }
950
959
  /**
951
960
  * Force refresh InMail credits from Unipile API.
961
+ *
952
962
  * Fetches real-time credit balance from provider and updates cache.
963
+ * Returns multi-subscription breakdown with per-subscription credit pools.
964
+ *
965
+ * @param userId - User ID or email
966
+ * @returns LinkedInCreditsResponse with isRealTime=true and subscriptions array
953
967
  */
954
968
  async refreshLinkedInCredits(userId) {
955
969
  const queryParams = new URLSearchParams();
@@ -1332,9 +1346,9 @@ class MessagingResource {
1332
1346
  *
1333
1347
  * @param conversationId - UUID of the conversation to delete
1334
1348
  * @param userId - User ID or email
1335
- * @returns DeleteConversationResponse with success status and conversation_id
1349
+ * @returns DeleteConversationResponse with success status and conversationId
1336
1350
  * @throws MessagingNotFoundError if conversation not found (404)
1337
- * @throws MessagingValidationError if conversation_id is invalid (400)
1351
+ * @throws MessagingValidationError if conversationId is invalid (400)
1338
1352
  */
1339
1353
  async deleteConversation(conversationId, userId) {
1340
1354
  try {
@@ -2706,4 +2720,4 @@ function verifyWebhookSignature(payload, signature, secret) {
2706
2720
  );
2707
2721
  }
2708
2722
 
2709
- export { ACTION_DELAYS, AuthenticationError, ChannelType, ConversationStatus, DraftStatus, InternalServerError, LINKEDIN_LIMITS, LinkedInSubscriptionType, LocalFileNotSupportedError, LumnisClient, LumnisError, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingSendError, MessagingValidationError, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, PeopleDataSource, ProgressTracker, ProviderType, QueueItemStatus, RateLimitError, SourcesNotAvailableError, SyncJobStatus, ValidationError, canSendInmail, LumnisClient as default, displayProgress, formatProgressEntry, getBestSubscriptionForAction, getConnectionRequestLimit, getInmailAllowance, getLimits, getMessageLimit, verifyWebhookSignature };
2723
+ export { ACTION_DELAYS, AuthenticationError, ChannelType, ConversationStatus, DraftStatus, InternalServerError, LINKEDIN_LIMITS, LinkedInSubscriptionType, LocalFileNotSupportedError, LumnisClient, LumnisError, MessageType, MessagingAPIError, MessagingConnectionError, MessagingNotFoundError, MessagingSendError, MessagingValidationError, NetworkDistance, NoDataSourcesError, NotFoundError, OutreachMethod, PeopleDataSource, ProgressTracker, ProviderType, QueueItemStatus, RateLimitError, SourcesNotAvailableError, SyncJobStatus, ValidationError, canSendInmail, displayProgress, formatProgressEntry, getBestSubscriptionForAction, getConnectionRequestLimit, getInmailAllowance, getLimits, getMessageLimit, verifyWebhookSignature };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lumnisai",
3
3
  "type": "module",
4
- "version": "0.1.17",
4
+ "version": "0.1.19",
5
5
  "description": "Official Node.js SDK for the Lumnis AI API",
6
6
  "author": "Lumnis AI",
7
7
  "license": "MIT",