lumnisai 0.1.22 → 0.1.24

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
@@ -1115,6 +1115,44 @@ class MessagingResource {
1115
1115
  throw error;
1116
1116
  }
1117
1117
  }
1118
+ /**
1119
+ * Update a draft's content, subject, status, or outreach method.
1120
+ *
1121
+ * @param userId - User ID or email
1122
+ * @param draftId - Draft UUID to update
1123
+ * @param request - Draft update parameters
1124
+ * @param request.content - Optional new content
1125
+ * @param request.subject - Optional new subject
1126
+ * @param request.status - Optional new status
1127
+ * @param request.outreachMethod - Optional new outreach method (LinkedIn only)
1128
+ * @returns Updated draft
1129
+ * @throws MessagingNotFoundError if draft not found
1130
+ *
1131
+ * @example
1132
+ * ```typescript
1133
+ * // Update draft outreach method
1134
+ * const draft = await client.messaging.updateDraft(
1135
+ * 'user@example.com',
1136
+ * 'draft-uuid',
1137
+ * { outreachMethod: OutreachMethod.INMAIL }
1138
+ * );
1139
+ * ```
1140
+ */
1141
+ async updateDraft(userId, draftId, request) {
1142
+ try {
1143
+ const queryParams = new URLSearchParams();
1144
+ queryParams.append("user_id", userId);
1145
+ return await this.http.patch(
1146
+ `/messaging/drafts/${encodeURIComponent(draftId)}?${queryParams.toString()}`,
1147
+ request
1148
+ );
1149
+ } catch (error) {
1150
+ if (error instanceof NotFoundError) {
1151
+ throw new MessagingNotFoundError(`Draft not found: ${draftId}`);
1152
+ }
1153
+ throw error;
1154
+ }
1155
+ }
1118
1156
  /**
1119
1157
  * Create drafts for multiple prospects with AI generation.
1120
1158
  *
@@ -1528,7 +1566,15 @@ class MessagingResource {
1528
1566
  );
1529
1567
  }
1530
1568
  /**
1531
- * Send multiple drafts with rate limiting
1569
+ * Send multiple drafts with rate limiting and optional per-draft overrides.
1570
+ *
1571
+ * @param userId - User ID or email
1572
+ * @param request - Batch send parameters
1573
+ * @param request.draftIds - List of draft IDs to send
1574
+ * @param request.sendRatePerDay - Optional daily send limit (1-100)
1575
+ * @param request.priority - Optional queue priority (0-10)
1576
+ * @param request.draftOverrides - Optional per-draft overrides
1577
+ * @returns Batch send response with results
1532
1578
  */
1533
1579
  async sendBatchDrafts(userId, request) {
1534
1580
  const queryParams = new URLSearchParams();
package/dist/index.d.cts CHANGED
@@ -1436,6 +1436,11 @@ declare enum LinkedInSubscriptionType {
1436
1436
  RECRUITER_LITE = "recruiter_lite",
1437
1437
  RECRUITER_CORPORATE = "recruiter_corporate"
1438
1438
  }
1439
+ /**
1440
+ * InMail subscription types for explicit subscription selection when sending InMails.
1441
+ * Use null or omit to auto-select based on available credits.
1442
+ */
1443
+ type InmailSubscription = 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate' | 'premium';
1439
1444
  /**
1440
1445
  * LinkedIn network distance values
1441
1446
  */
@@ -1548,6 +1553,37 @@ interface CreateDraftRequest {
1548
1553
  isPriority?: boolean;
1549
1554
  outreachMethod?: string | null;
1550
1555
  organizationId?: string | null;
1556
+ /**
1557
+ * Explicit InMail subscription to use for sending (LinkedIn InMail only).
1558
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1559
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1560
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1561
+ * - 'premium': Use Premium/Career InMail credits
1562
+ * - null/undefined: Auto-select subscription with available credits (default)
1563
+ */
1564
+ inmailSubscription?: InmailSubscription | null;
1565
+ }
1566
+ /**
1567
+ * Request to update a draft
1568
+ */
1569
+ interface UpdateDraftRequest {
1570
+ content?: string | null;
1571
+ subject?: string | null;
1572
+ status?: string | null;
1573
+ /**
1574
+ * Override outreach method (LinkedIn only).
1575
+ * Valid values: 'connection_request' | 'direct_message' | 'inmail' | 'inmail_escalation'
1576
+ */
1577
+ outreachMethod?: OutreachMethod | null;
1578
+ /**
1579
+ * Explicit InMail subscription to use for sending (LinkedIn InMail only).
1580
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1581
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1582
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1583
+ * - 'premium': Use Premium/Career InMail credits
1584
+ * - null/undefined: Auto-select subscription with available credits (default)
1585
+ */
1586
+ inmailSubscription?: InmailSubscription | null;
1551
1587
  }
1552
1588
  /**
1553
1589
  * Prospect info for batch draft creation
@@ -1583,6 +1619,16 @@ interface ProspectInfo {
1583
1619
  * @default 0
1584
1620
  */
1585
1621
  priority?: number;
1622
+ /**
1623
+ * Explicit InMail subscription to use for this prospect (LinkedIn InMail only).
1624
+ * Overrides batch-level auto-selection when outreachMethod is 'inmail'.
1625
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1626
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1627
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1628
+ * - 'premium': Use Premium/Career InMail credits
1629
+ * - null/undefined: Auto-select subscription with available credits (default)
1630
+ */
1631
+ inmailSubscription?: InmailSubscription | null;
1586
1632
  }
1587
1633
  /**
1588
1634
  * Request to create batch drafts
@@ -1605,6 +1651,33 @@ interface BatchDraftRequest {
1605
1651
  aiContext?: Record<string, any> | null;
1606
1652
  organizationId?: string | null;
1607
1653
  }
1654
+ /**
1655
+ * Per-draft override options for batch send.
1656
+ */
1657
+ interface DraftSendOverride {
1658
+ /** Draft ID to apply override to */
1659
+ draftId: string;
1660
+ /**
1661
+ * If true, send connection request without personalized note (empty content).
1662
+ * Only applies to LinkedIn connection requests.
1663
+ */
1664
+ skipNote?: boolean;
1665
+ /**
1666
+ * Override the outreach method (e.g., switch to InMail).
1667
+ * Valid values: 'connection_request' | 'direct_message' | 'inmail' | 'inmail_escalation'
1668
+ * Note: Only applies to LinkedIn drafts.
1669
+ */
1670
+ outreachMethod?: OutreachMethod;
1671
+ /**
1672
+ * Override the InMail subscription for this draft (LinkedIn InMail only).
1673
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1674
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1675
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1676
+ * - 'premium': Use Premium/Career InMail credits
1677
+ * - null: Clear any previous selection and auto-select
1678
+ */
1679
+ inmailSubscription?: InmailSubscription | null;
1680
+ }
1608
1681
  /**
1609
1682
  * Request to batch send drafts with optional rate limiting and queue priority.
1610
1683
  */
@@ -1613,12 +1686,17 @@ interface BatchSendRequest {
1613
1686
  /**
1614
1687
  * Daily send limit (1-100). If not provided, uses subscription-based limits for LinkedIn.
1615
1688
  */
1616
- sendRatePerDay?: number;
1689
+ sendRatePerDay?: number | null;
1617
1690
  /**
1618
1691
  * Queue priority (0-10). Higher = processed first. Only applies to rate-limited items.
1619
1692
  * @default 0
1620
1693
  */
1621
1694
  priority?: number;
1695
+ /**
1696
+ * Optional per-draft overrides.
1697
+ * Applied before sending (updates drafts via PATCH).
1698
+ */
1699
+ draftOverrides?: DraftSendOverride[];
1622
1700
  }
1623
1701
  /**
1624
1702
  * Request to update LinkedIn subscription
@@ -1831,6 +1909,11 @@ interface DraftResponse {
1831
1909
  scheduledFor?: string | null;
1832
1910
  /** Error details if status is 'failed' */
1833
1911
  errorMessage?: string | null;
1912
+ /**
1913
+ * InMail subscription selected for this draft (LinkedIn InMail only).
1914
+ * null means auto-selection will be used when sending.
1915
+ */
1916
+ inmailSubscription?: InmailSubscription | null;
1834
1917
  }
1835
1918
  /**
1836
1919
  * Response from batch draft creation (legacy synchronous mode)
@@ -2291,6 +2374,30 @@ declare class MessagingResource {
2291
2374
  * ```
2292
2375
  */
2293
2376
  getDraft(userId: string, draftId: string): Promise<DraftResponse>;
2377
+ /**
2378
+ * Update a draft's content, subject, status, or outreach method.
2379
+ *
2380
+ * @param userId - User ID or email
2381
+ * @param draftId - Draft UUID to update
2382
+ * @param request - Draft update parameters
2383
+ * @param request.content - Optional new content
2384
+ * @param request.subject - Optional new subject
2385
+ * @param request.status - Optional new status
2386
+ * @param request.outreachMethod - Optional new outreach method (LinkedIn only)
2387
+ * @returns Updated draft
2388
+ * @throws MessagingNotFoundError if draft not found
2389
+ *
2390
+ * @example
2391
+ * ```typescript
2392
+ * // Update draft outreach method
2393
+ * const draft = await client.messaging.updateDraft(
2394
+ * 'user@example.com',
2395
+ * 'draft-uuid',
2396
+ * { outreachMethod: OutreachMethod.INMAIL }
2397
+ * );
2398
+ * ```
2399
+ */
2400
+ updateDraft(userId: string, draftId: string, request: UpdateDraftRequest): Promise<DraftResponse>;
2294
2401
  /**
2295
2402
  * Create drafts for multiple prospects with AI generation.
2296
2403
  *
@@ -2472,7 +2579,15 @@ declare class MessagingResource {
2472
2579
  */
2473
2580
  sendDraft(draftId: string, userId: string): Promise<SendResult>;
2474
2581
  /**
2475
- * Send multiple drafts with rate limiting
2582
+ * Send multiple drafts with rate limiting and optional per-draft overrides.
2583
+ *
2584
+ * @param userId - User ID or email
2585
+ * @param request - Batch send parameters
2586
+ * @param request.draftIds - List of draft IDs to send
2587
+ * @param request.sendRatePerDay - Optional daily send limit (1-100)
2588
+ * @param request.priority - Optional queue priority (0-10)
2589
+ * @param request.draftOverrides - Optional per-draft overrides
2590
+ * @returns Batch send response with results
2476
2591
  */
2477
2592
  sendBatchDrafts(userId: string, request: BatchSendRequest): Promise<BatchSendResponse>;
2478
2593
  /**
@@ -3200,4 +3315,4 @@ declare class ProgressTracker {
3200
3315
  */
3201
3316
  declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
3202
3317
 
3203
- 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 BatchDraftJobProgress, type BatchDraftJobResponse, type BatchDraftJobStartedData, type BatchDraftJobStatusResponse, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, BatchJobStatus, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelDraftResponse, 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, RATE_LIMIT_COOLDOWNS, 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, UNIPILE_RATE_LIMIT_ERRORS, UNIPILE_SAFE_LIMITS, 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, hasOpenProfileMessages, verifyWebhookSignature };
3318
+ 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 BatchDraftJobProgress, type BatchDraftJobResponse, type BatchDraftJobStartedData, type BatchDraftJobStatusResponse, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, BatchJobStatus, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelDraftResponse, 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, type DraftSendOverride, 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, type InmailSubscription, 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, RATE_LIMIT_COOLDOWNS, 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, UNIPILE_RATE_LIMIT_ERRORS, UNIPILE_SAFE_LIMITS, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateDraftRequest, 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, hasOpenProfileMessages, verifyWebhookSignature };
package/dist/index.d.mts CHANGED
@@ -1436,6 +1436,11 @@ declare enum LinkedInSubscriptionType {
1436
1436
  RECRUITER_LITE = "recruiter_lite",
1437
1437
  RECRUITER_CORPORATE = "recruiter_corporate"
1438
1438
  }
1439
+ /**
1440
+ * InMail subscription types for explicit subscription selection when sending InMails.
1441
+ * Use null or omit to auto-select based on available credits.
1442
+ */
1443
+ type InmailSubscription = 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate' | 'premium';
1439
1444
  /**
1440
1445
  * LinkedIn network distance values
1441
1446
  */
@@ -1548,6 +1553,37 @@ interface CreateDraftRequest {
1548
1553
  isPriority?: boolean;
1549
1554
  outreachMethod?: string | null;
1550
1555
  organizationId?: string | null;
1556
+ /**
1557
+ * Explicit InMail subscription to use for sending (LinkedIn InMail only).
1558
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1559
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1560
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1561
+ * - 'premium': Use Premium/Career InMail credits
1562
+ * - null/undefined: Auto-select subscription with available credits (default)
1563
+ */
1564
+ inmailSubscription?: InmailSubscription | null;
1565
+ }
1566
+ /**
1567
+ * Request to update a draft
1568
+ */
1569
+ interface UpdateDraftRequest {
1570
+ content?: string | null;
1571
+ subject?: string | null;
1572
+ status?: string | null;
1573
+ /**
1574
+ * Override outreach method (LinkedIn only).
1575
+ * Valid values: 'connection_request' | 'direct_message' | 'inmail' | 'inmail_escalation'
1576
+ */
1577
+ outreachMethod?: OutreachMethod | null;
1578
+ /**
1579
+ * Explicit InMail subscription to use for sending (LinkedIn InMail only).
1580
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1581
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1582
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1583
+ * - 'premium': Use Premium/Career InMail credits
1584
+ * - null/undefined: Auto-select subscription with available credits (default)
1585
+ */
1586
+ inmailSubscription?: InmailSubscription | null;
1551
1587
  }
1552
1588
  /**
1553
1589
  * Prospect info for batch draft creation
@@ -1583,6 +1619,16 @@ interface ProspectInfo {
1583
1619
  * @default 0
1584
1620
  */
1585
1621
  priority?: number;
1622
+ /**
1623
+ * Explicit InMail subscription to use for this prospect (LinkedIn InMail only).
1624
+ * Overrides batch-level auto-selection when outreachMethod is 'inmail'.
1625
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1626
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1627
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1628
+ * - 'premium': Use Premium/Career InMail credits
1629
+ * - null/undefined: Auto-select subscription with available credits (default)
1630
+ */
1631
+ inmailSubscription?: InmailSubscription | null;
1586
1632
  }
1587
1633
  /**
1588
1634
  * Request to create batch drafts
@@ -1605,6 +1651,33 @@ interface BatchDraftRequest {
1605
1651
  aiContext?: Record<string, any> | null;
1606
1652
  organizationId?: string | null;
1607
1653
  }
1654
+ /**
1655
+ * Per-draft override options for batch send.
1656
+ */
1657
+ interface DraftSendOverride {
1658
+ /** Draft ID to apply override to */
1659
+ draftId: string;
1660
+ /**
1661
+ * If true, send connection request without personalized note (empty content).
1662
+ * Only applies to LinkedIn connection requests.
1663
+ */
1664
+ skipNote?: boolean;
1665
+ /**
1666
+ * Override the outreach method (e.g., switch to InMail).
1667
+ * Valid values: 'connection_request' | 'direct_message' | 'inmail' | 'inmail_escalation'
1668
+ * Note: Only applies to LinkedIn drafts.
1669
+ */
1670
+ outreachMethod?: OutreachMethod;
1671
+ /**
1672
+ * Override the InMail subscription for this draft (LinkedIn InMail only).
1673
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1674
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1675
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1676
+ * - 'premium': Use Premium/Career InMail credits
1677
+ * - null: Clear any previous selection and auto-select
1678
+ */
1679
+ inmailSubscription?: InmailSubscription | null;
1680
+ }
1608
1681
  /**
1609
1682
  * Request to batch send drafts with optional rate limiting and queue priority.
1610
1683
  */
@@ -1613,12 +1686,17 @@ interface BatchSendRequest {
1613
1686
  /**
1614
1687
  * Daily send limit (1-100). If not provided, uses subscription-based limits for LinkedIn.
1615
1688
  */
1616
- sendRatePerDay?: number;
1689
+ sendRatePerDay?: number | null;
1617
1690
  /**
1618
1691
  * Queue priority (0-10). Higher = processed first. Only applies to rate-limited items.
1619
1692
  * @default 0
1620
1693
  */
1621
1694
  priority?: number;
1695
+ /**
1696
+ * Optional per-draft overrides.
1697
+ * Applied before sending (updates drafts via PATCH).
1698
+ */
1699
+ draftOverrides?: DraftSendOverride[];
1622
1700
  }
1623
1701
  /**
1624
1702
  * Request to update LinkedIn subscription
@@ -1831,6 +1909,11 @@ interface DraftResponse {
1831
1909
  scheduledFor?: string | null;
1832
1910
  /** Error details if status is 'failed' */
1833
1911
  errorMessage?: string | null;
1912
+ /**
1913
+ * InMail subscription selected for this draft (LinkedIn InMail only).
1914
+ * null means auto-selection will be used when sending.
1915
+ */
1916
+ inmailSubscription?: InmailSubscription | null;
1834
1917
  }
1835
1918
  /**
1836
1919
  * Response from batch draft creation (legacy synchronous mode)
@@ -2291,6 +2374,30 @@ declare class MessagingResource {
2291
2374
  * ```
2292
2375
  */
2293
2376
  getDraft(userId: string, draftId: string): Promise<DraftResponse>;
2377
+ /**
2378
+ * Update a draft's content, subject, status, or outreach method.
2379
+ *
2380
+ * @param userId - User ID or email
2381
+ * @param draftId - Draft UUID to update
2382
+ * @param request - Draft update parameters
2383
+ * @param request.content - Optional new content
2384
+ * @param request.subject - Optional new subject
2385
+ * @param request.status - Optional new status
2386
+ * @param request.outreachMethod - Optional new outreach method (LinkedIn only)
2387
+ * @returns Updated draft
2388
+ * @throws MessagingNotFoundError if draft not found
2389
+ *
2390
+ * @example
2391
+ * ```typescript
2392
+ * // Update draft outreach method
2393
+ * const draft = await client.messaging.updateDraft(
2394
+ * 'user@example.com',
2395
+ * 'draft-uuid',
2396
+ * { outreachMethod: OutreachMethod.INMAIL }
2397
+ * );
2398
+ * ```
2399
+ */
2400
+ updateDraft(userId: string, draftId: string, request: UpdateDraftRequest): Promise<DraftResponse>;
2294
2401
  /**
2295
2402
  * Create drafts for multiple prospects with AI generation.
2296
2403
  *
@@ -2472,7 +2579,15 @@ declare class MessagingResource {
2472
2579
  */
2473
2580
  sendDraft(draftId: string, userId: string): Promise<SendResult>;
2474
2581
  /**
2475
- * Send multiple drafts with rate limiting
2582
+ * Send multiple drafts with rate limiting and optional per-draft overrides.
2583
+ *
2584
+ * @param userId - User ID or email
2585
+ * @param request - Batch send parameters
2586
+ * @param request.draftIds - List of draft IDs to send
2587
+ * @param request.sendRatePerDay - Optional daily send limit (1-100)
2588
+ * @param request.priority - Optional queue priority (0-10)
2589
+ * @param request.draftOverrides - Optional per-draft overrides
2590
+ * @returns Batch send response with results
2476
2591
  */
2477
2592
  sendBatchDrafts(userId: string, request: BatchSendRequest): Promise<BatchSendResponse>;
2478
2593
  /**
@@ -3200,4 +3315,4 @@ declare class ProgressTracker {
3200
3315
  */
3201
3316
  declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
3202
3317
 
3203
- 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 BatchDraftJobProgress, type BatchDraftJobResponse, type BatchDraftJobStartedData, type BatchDraftJobStatusResponse, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, BatchJobStatus, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelDraftResponse, 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, RATE_LIMIT_COOLDOWNS, 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, UNIPILE_RATE_LIMIT_ERRORS, UNIPILE_SAFE_LIMITS, 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, hasOpenProfileMessages, verifyWebhookSignature };
3318
+ 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 BatchDraftJobProgress, type BatchDraftJobResponse, type BatchDraftJobStartedData, type BatchDraftJobStatusResponse, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, BatchJobStatus, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelDraftResponse, 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, type DraftSendOverride, 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, type InmailSubscription, 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, RATE_LIMIT_COOLDOWNS, 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, UNIPILE_RATE_LIMIT_ERRORS, UNIPILE_SAFE_LIMITS, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateDraftRequest, 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, hasOpenProfileMessages, verifyWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -1436,6 +1436,11 @@ declare enum LinkedInSubscriptionType {
1436
1436
  RECRUITER_LITE = "recruiter_lite",
1437
1437
  RECRUITER_CORPORATE = "recruiter_corporate"
1438
1438
  }
1439
+ /**
1440
+ * InMail subscription types for explicit subscription selection when sending InMails.
1441
+ * Use null or omit to auto-select based on available credits.
1442
+ */
1443
+ type InmailSubscription = 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate' | 'premium';
1439
1444
  /**
1440
1445
  * LinkedIn network distance values
1441
1446
  */
@@ -1548,6 +1553,37 @@ interface CreateDraftRequest {
1548
1553
  isPriority?: boolean;
1549
1554
  outreachMethod?: string | null;
1550
1555
  organizationId?: string | null;
1556
+ /**
1557
+ * Explicit InMail subscription to use for sending (LinkedIn InMail only).
1558
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1559
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1560
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1561
+ * - 'premium': Use Premium/Career InMail credits
1562
+ * - null/undefined: Auto-select subscription with available credits (default)
1563
+ */
1564
+ inmailSubscription?: InmailSubscription | null;
1565
+ }
1566
+ /**
1567
+ * Request to update a draft
1568
+ */
1569
+ interface UpdateDraftRequest {
1570
+ content?: string | null;
1571
+ subject?: string | null;
1572
+ status?: string | null;
1573
+ /**
1574
+ * Override outreach method (LinkedIn only).
1575
+ * Valid values: 'connection_request' | 'direct_message' | 'inmail' | 'inmail_escalation'
1576
+ */
1577
+ outreachMethod?: OutreachMethod | null;
1578
+ /**
1579
+ * Explicit InMail subscription to use for sending (LinkedIn InMail only).
1580
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1581
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1582
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1583
+ * - 'premium': Use Premium/Career InMail credits
1584
+ * - null/undefined: Auto-select subscription with available credits (default)
1585
+ */
1586
+ inmailSubscription?: InmailSubscription | null;
1551
1587
  }
1552
1588
  /**
1553
1589
  * Prospect info for batch draft creation
@@ -1583,6 +1619,16 @@ interface ProspectInfo {
1583
1619
  * @default 0
1584
1620
  */
1585
1621
  priority?: number;
1622
+ /**
1623
+ * Explicit InMail subscription to use for this prospect (LinkedIn InMail only).
1624
+ * Overrides batch-level auto-selection when outreachMethod is 'inmail'.
1625
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1626
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1627
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1628
+ * - 'premium': Use Premium/Career InMail credits
1629
+ * - null/undefined: Auto-select subscription with available credits (default)
1630
+ */
1631
+ inmailSubscription?: InmailSubscription | null;
1586
1632
  }
1587
1633
  /**
1588
1634
  * Request to create batch drafts
@@ -1605,6 +1651,33 @@ interface BatchDraftRequest {
1605
1651
  aiContext?: Record<string, any> | null;
1606
1652
  organizationId?: string | null;
1607
1653
  }
1654
+ /**
1655
+ * Per-draft override options for batch send.
1656
+ */
1657
+ interface DraftSendOverride {
1658
+ /** Draft ID to apply override to */
1659
+ draftId: string;
1660
+ /**
1661
+ * If true, send connection request without personalized note (empty content).
1662
+ * Only applies to LinkedIn connection requests.
1663
+ */
1664
+ skipNote?: boolean;
1665
+ /**
1666
+ * Override the outreach method (e.g., switch to InMail).
1667
+ * Valid values: 'connection_request' | 'direct_message' | 'inmail' | 'inmail_escalation'
1668
+ * Note: Only applies to LinkedIn drafts.
1669
+ */
1670
+ outreachMethod?: OutreachMethod;
1671
+ /**
1672
+ * Override the InMail subscription for this draft (LinkedIn InMail only).
1673
+ * - 'sales_navigator': Use Sales Navigator InMail credits
1674
+ * - 'recruiter_lite': Use Recruiter Lite InMail credits
1675
+ * - 'recruiter_corporate': Use Recruiter Corporate InMail credits
1676
+ * - 'premium': Use Premium/Career InMail credits
1677
+ * - null: Clear any previous selection and auto-select
1678
+ */
1679
+ inmailSubscription?: InmailSubscription | null;
1680
+ }
1608
1681
  /**
1609
1682
  * Request to batch send drafts with optional rate limiting and queue priority.
1610
1683
  */
@@ -1613,12 +1686,17 @@ interface BatchSendRequest {
1613
1686
  /**
1614
1687
  * Daily send limit (1-100). If not provided, uses subscription-based limits for LinkedIn.
1615
1688
  */
1616
- sendRatePerDay?: number;
1689
+ sendRatePerDay?: number | null;
1617
1690
  /**
1618
1691
  * Queue priority (0-10). Higher = processed first. Only applies to rate-limited items.
1619
1692
  * @default 0
1620
1693
  */
1621
1694
  priority?: number;
1695
+ /**
1696
+ * Optional per-draft overrides.
1697
+ * Applied before sending (updates drafts via PATCH).
1698
+ */
1699
+ draftOverrides?: DraftSendOverride[];
1622
1700
  }
1623
1701
  /**
1624
1702
  * Request to update LinkedIn subscription
@@ -1831,6 +1909,11 @@ interface DraftResponse {
1831
1909
  scheduledFor?: string | null;
1832
1910
  /** Error details if status is 'failed' */
1833
1911
  errorMessage?: string | null;
1912
+ /**
1913
+ * InMail subscription selected for this draft (LinkedIn InMail only).
1914
+ * null means auto-selection will be used when sending.
1915
+ */
1916
+ inmailSubscription?: InmailSubscription | null;
1834
1917
  }
1835
1918
  /**
1836
1919
  * Response from batch draft creation (legacy synchronous mode)
@@ -2291,6 +2374,30 @@ declare class MessagingResource {
2291
2374
  * ```
2292
2375
  */
2293
2376
  getDraft(userId: string, draftId: string): Promise<DraftResponse>;
2377
+ /**
2378
+ * Update a draft's content, subject, status, or outreach method.
2379
+ *
2380
+ * @param userId - User ID or email
2381
+ * @param draftId - Draft UUID to update
2382
+ * @param request - Draft update parameters
2383
+ * @param request.content - Optional new content
2384
+ * @param request.subject - Optional new subject
2385
+ * @param request.status - Optional new status
2386
+ * @param request.outreachMethod - Optional new outreach method (LinkedIn only)
2387
+ * @returns Updated draft
2388
+ * @throws MessagingNotFoundError if draft not found
2389
+ *
2390
+ * @example
2391
+ * ```typescript
2392
+ * // Update draft outreach method
2393
+ * const draft = await client.messaging.updateDraft(
2394
+ * 'user@example.com',
2395
+ * 'draft-uuid',
2396
+ * { outreachMethod: OutreachMethod.INMAIL }
2397
+ * );
2398
+ * ```
2399
+ */
2400
+ updateDraft(userId: string, draftId: string, request: UpdateDraftRequest): Promise<DraftResponse>;
2294
2401
  /**
2295
2402
  * Create drafts for multiple prospects with AI generation.
2296
2403
  *
@@ -2472,7 +2579,15 @@ declare class MessagingResource {
2472
2579
  */
2473
2580
  sendDraft(draftId: string, userId: string): Promise<SendResult>;
2474
2581
  /**
2475
- * Send multiple drafts with rate limiting
2582
+ * Send multiple drafts with rate limiting and optional per-draft overrides.
2583
+ *
2584
+ * @param userId - User ID or email
2585
+ * @param request - Batch send parameters
2586
+ * @param request.draftIds - List of draft IDs to send
2587
+ * @param request.sendRatePerDay - Optional daily send limit (1-100)
2588
+ * @param request.priority - Optional queue priority (0-10)
2589
+ * @param request.draftOverrides - Optional per-draft overrides
2590
+ * @returns Batch send response with results
2476
2591
  */
2477
2592
  sendBatchDrafts(userId: string, request: BatchSendRequest): Promise<BatchSendResponse>;
2478
2593
  /**
@@ -3200,4 +3315,4 @@ declare class ProgressTracker {
3200
3315
  */
3201
3316
  declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
3202
3317
 
3203
- 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 BatchDraftJobProgress, type BatchDraftJobResponse, type BatchDraftJobStartedData, type BatchDraftJobStatusResponse, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, BatchJobStatus, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelDraftResponse, 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, RATE_LIMIT_COOLDOWNS, 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, UNIPILE_RATE_LIMIT_ERRORS, UNIPILE_SAFE_LIMITS, 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, hasOpenProfileMessages, verifyWebhookSignature };
3318
+ 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 BatchDraftJobProgress, type BatchDraftJobResponse, type BatchDraftJobStartedData, type BatchDraftJobStatusResponse, type BatchDraftProgressData, type BatchDraftRequest, type BatchDraftResponse, type BatchDraftStreamCallbacks, type BatchDraftStreamEvent, type BatchDraftStreamEventType, BatchJobStatus, type BatchProspectIdentifier, type BatchSendRequest, type BatchSendResponse, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelDraftResponse, 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, type DraftSendOverride, 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, type InmailSubscription, 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, RATE_LIMIT_COOLDOWNS, 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, UNIPILE_RATE_LIMIT_ERRORS, UNIPILE_SAFE_LIMITS, type UUID, type UnlinkConversationsResponse, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateDraftRequest, 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, hasOpenProfileMessages, verifyWebhookSignature };
package/dist/index.mjs CHANGED
@@ -1109,6 +1109,44 @@ class MessagingResource {
1109
1109
  throw error;
1110
1110
  }
1111
1111
  }
1112
+ /**
1113
+ * Update a draft's content, subject, status, or outreach method.
1114
+ *
1115
+ * @param userId - User ID or email
1116
+ * @param draftId - Draft UUID to update
1117
+ * @param request - Draft update parameters
1118
+ * @param request.content - Optional new content
1119
+ * @param request.subject - Optional new subject
1120
+ * @param request.status - Optional new status
1121
+ * @param request.outreachMethod - Optional new outreach method (LinkedIn only)
1122
+ * @returns Updated draft
1123
+ * @throws MessagingNotFoundError if draft not found
1124
+ *
1125
+ * @example
1126
+ * ```typescript
1127
+ * // Update draft outreach method
1128
+ * const draft = await client.messaging.updateDraft(
1129
+ * 'user@example.com',
1130
+ * 'draft-uuid',
1131
+ * { outreachMethod: OutreachMethod.INMAIL }
1132
+ * );
1133
+ * ```
1134
+ */
1135
+ async updateDraft(userId, draftId, request) {
1136
+ try {
1137
+ const queryParams = new URLSearchParams();
1138
+ queryParams.append("user_id", userId);
1139
+ return await this.http.patch(
1140
+ `/messaging/drafts/${encodeURIComponent(draftId)}?${queryParams.toString()}`,
1141
+ request
1142
+ );
1143
+ } catch (error) {
1144
+ if (error instanceof NotFoundError) {
1145
+ throw new MessagingNotFoundError(`Draft not found: ${draftId}`);
1146
+ }
1147
+ throw error;
1148
+ }
1149
+ }
1112
1150
  /**
1113
1151
  * Create drafts for multiple prospects with AI generation.
1114
1152
  *
@@ -1522,7 +1560,15 @@ class MessagingResource {
1522
1560
  );
1523
1561
  }
1524
1562
  /**
1525
- * Send multiple drafts with rate limiting
1563
+ * Send multiple drafts with rate limiting and optional per-draft overrides.
1564
+ *
1565
+ * @param userId - User ID or email
1566
+ * @param request - Batch send parameters
1567
+ * @param request.draftIds - List of draft IDs to send
1568
+ * @param request.sendRatePerDay - Optional daily send limit (1-100)
1569
+ * @param request.priority - Optional queue priority (0-10)
1570
+ * @param request.draftOverrides - Optional per-draft overrides
1571
+ * @returns Batch send response with results
1526
1572
  */
1527
1573
  async sendBatchDrafts(userId, request) {
1528
1574
  const queryParams = new URLSearchParams();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lumnisai",
3
3
  "type": "module",
4
- "version": "0.1.22",
4
+ "version": "0.1.24",
5
5
  "description": "Official Node.js SDK for the Lumnis AI API",
6
6
  "author": "Lumnis AI",
7
7
  "license": "MIT",