lumnisai 0.1.18 → 0.1.20
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 +136 -34
- package/dist/index.d.cts +120 -24
- package/dist/index.d.mts +120 -23
- package/dist/index.d.ts +120 -24
- package/dist/index.mjs +133 -32
- package/package.json +1 -1
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
|
|
|
@@ -13,7 +11,9 @@ const LINKEDIN_LIMITS = {
|
|
|
13
11
|
basic: {
|
|
14
12
|
connectionRequests: {
|
|
15
13
|
weeklyMax: 100,
|
|
16
|
-
dailySafe: 15
|
|
14
|
+
dailySafe: 15,
|
|
15
|
+
personalizedMonthly: 10
|
|
16
|
+
// Very limited personalized requests
|
|
17
17
|
},
|
|
18
18
|
messages: {
|
|
19
19
|
weeklyMax: 100,
|
|
@@ -27,13 +27,41 @@ const LINKEDIN_LIMITS = {
|
|
|
27
27
|
profileViews: {
|
|
28
28
|
dailyMax: 500,
|
|
29
29
|
dailySafe: 250
|
|
30
|
-
}
|
|
30
|
+
},
|
|
31
|
+
openProfileMessagesMonthly: null
|
|
31
32
|
},
|
|
32
|
-
|
|
33
|
+
premium: {
|
|
33
34
|
connectionRequests: {
|
|
35
|
+
weeklyMax: 150,
|
|
36
|
+
// Same as basic, SSI-dependent
|
|
37
|
+
dailySafe: 20,
|
|
38
|
+
personalizedMonthly: null
|
|
39
|
+
// Unlimited
|
|
40
|
+
},
|
|
41
|
+
messages: {
|
|
34
42
|
weeklyMax: 150,
|
|
35
43
|
dailySafe: 20
|
|
36
44
|
},
|
|
45
|
+
inmail: {
|
|
46
|
+
monthlyCredits: 5,
|
|
47
|
+
maxAccumulation: 15,
|
|
48
|
+
rollover: true
|
|
49
|
+
},
|
|
50
|
+
profileViews: {
|
|
51
|
+
dailyMax: 1e3,
|
|
52
|
+
// Premium (non-SN): 150-1000/day
|
|
53
|
+
dailySafe: 500
|
|
54
|
+
},
|
|
55
|
+
openProfileMessagesMonthly: null
|
|
56
|
+
},
|
|
57
|
+
premium_career: {
|
|
58
|
+
connectionRequests: {
|
|
59
|
+
weeklyMax: 150,
|
|
60
|
+
// Same as basic, SSI-dependent
|
|
61
|
+
dailySafe: 20,
|
|
62
|
+
personalizedMonthly: null
|
|
63
|
+
// Unlimited
|
|
64
|
+
},
|
|
37
65
|
messages: {
|
|
38
66
|
weeklyMax: 150,
|
|
39
67
|
dailySafe: 20
|
|
@@ -46,14 +74,16 @@ const LINKEDIN_LIMITS = {
|
|
|
46
74
|
profileViews: {
|
|
47
75
|
dailyMax: 1e3,
|
|
48
76
|
// Premium (non-SN): 150-1000/day
|
|
49
|
-
dailySafe:
|
|
50
|
-
}
|
|
77
|
+
dailySafe: 500
|
|
78
|
+
},
|
|
79
|
+
openProfileMessagesMonthly: null
|
|
51
80
|
},
|
|
52
81
|
premium_business: {
|
|
53
82
|
connectionRequests: {
|
|
54
83
|
weeklyMax: 150,
|
|
55
84
|
// Same as Premium Career, SSI-dependent
|
|
56
|
-
dailySafe: 20
|
|
85
|
+
dailySafe: 20,
|
|
86
|
+
personalizedMonthly: null
|
|
57
87
|
},
|
|
58
88
|
messages: {
|
|
59
89
|
weeklyMax: 150,
|
|
@@ -67,13 +97,15 @@ const LINKEDIN_LIMITS = {
|
|
|
67
97
|
profileViews: {
|
|
68
98
|
dailyMax: 1e3,
|
|
69
99
|
// Premium (non-SN): 150-1000/day
|
|
70
|
-
dailySafe:
|
|
71
|
-
}
|
|
100
|
+
dailySafe: 500
|
|
101
|
+
},
|
|
102
|
+
openProfileMessagesMonthly: null
|
|
72
103
|
},
|
|
73
104
|
sales_navigator: {
|
|
74
105
|
connectionRequests: {
|
|
75
106
|
weeklyMax: 200,
|
|
76
|
-
dailySafe: 25
|
|
107
|
+
dailySafe: 25,
|
|
108
|
+
personalizedMonthly: null
|
|
77
109
|
},
|
|
78
110
|
messages: {
|
|
79
111
|
weeklyMax: 150,
|
|
@@ -86,13 +118,15 @@ const LINKEDIN_LIMITS = {
|
|
|
86
118
|
},
|
|
87
119
|
profileViews: {
|
|
88
120
|
dailyMax: 2e3,
|
|
89
|
-
dailySafe:
|
|
90
|
-
}
|
|
121
|
+
dailySafe: 1e3
|
|
122
|
+
},
|
|
123
|
+
openProfileMessagesMonthly: null
|
|
91
124
|
},
|
|
92
125
|
recruiter_lite: {
|
|
93
126
|
connectionRequests: {
|
|
94
127
|
weeklyMax: 200,
|
|
95
|
-
dailySafe: 25
|
|
128
|
+
dailySafe: 25,
|
|
129
|
+
personalizedMonthly: null
|
|
96
130
|
},
|
|
97
131
|
messages: {
|
|
98
132
|
weeklyMax: 200,
|
|
@@ -106,13 +140,15 @@ const LINKEDIN_LIMITS = {
|
|
|
106
140
|
},
|
|
107
141
|
profileViews: {
|
|
108
142
|
dailyMax: 2e3,
|
|
109
|
-
dailySafe:
|
|
110
|
-
}
|
|
143
|
+
dailySafe: 1e3
|
|
144
|
+
},
|
|
145
|
+
openProfileMessagesMonthly: 1e3
|
|
111
146
|
},
|
|
112
147
|
recruiter_corporate: {
|
|
113
148
|
connectionRequests: {
|
|
114
149
|
weeklyMax: 250,
|
|
115
|
-
dailySafe: 30
|
|
150
|
+
dailySafe: 30,
|
|
151
|
+
personalizedMonthly: null
|
|
116
152
|
},
|
|
117
153
|
messages: {
|
|
118
154
|
weeklyMax: 200,
|
|
@@ -125,10 +161,63 @@ const LINKEDIN_LIMITS = {
|
|
|
125
161
|
},
|
|
126
162
|
profileViews: {
|
|
127
163
|
dailyMax: 2e3,
|
|
128
|
-
dailySafe:
|
|
129
|
-
}
|
|
164
|
+
dailySafe: 1e3
|
|
165
|
+
},
|
|
166
|
+
openProfileMessagesMonthly: 1e3
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
const UNIPILE_SAFE_LIMITS = {
|
|
170
|
+
// Connection requests per day (Unipile recommends 80-100 for paid)
|
|
171
|
+
connectionRequestsDaily: {
|
|
172
|
+
basic: 15,
|
|
173
|
+
premium: 20,
|
|
174
|
+
premium_career: 20,
|
|
175
|
+
premium_business: 20,
|
|
176
|
+
sales_navigator: 25,
|
|
177
|
+
recruiter_lite: 25,
|
|
178
|
+
recruiter_corporate: 30
|
|
179
|
+
},
|
|
180
|
+
// Messages per day (steady pace recommended)
|
|
181
|
+
messagesDaily: {
|
|
182
|
+
basic: 15,
|
|
183
|
+
premium: 20,
|
|
184
|
+
premium_career: 20,
|
|
185
|
+
premium_business: 20,
|
|
186
|
+
sales_navigator: 20,
|
|
187
|
+
recruiter_lite: 25,
|
|
188
|
+
recruiter_corporate: 30
|
|
189
|
+
},
|
|
190
|
+
// Profile views per day (stay under 50% of max)
|
|
191
|
+
profileViewsDaily: {
|
|
192
|
+
basic: 250,
|
|
193
|
+
premium: 300,
|
|
194
|
+
// 50% of 1000 max, conservative
|
|
195
|
+
premium_career: 300,
|
|
196
|
+
premium_business: 300,
|
|
197
|
+
sales_navigator: 500,
|
|
198
|
+
// 50% of 2000 max
|
|
199
|
+
recruiter_lite: 500,
|
|
200
|
+
recruiter_corporate: 500
|
|
130
201
|
}
|
|
131
202
|
};
|
|
203
|
+
const RATE_LIMIT_COOLDOWNS = {
|
|
204
|
+
connectionRequestRejected: 3600,
|
|
205
|
+
// 1 hour after rejection
|
|
206
|
+
messageRateLimited: 1800,
|
|
207
|
+
// 30 min after rate limit
|
|
208
|
+
dailyLimitReached: 86400,
|
|
209
|
+
// 24 hours
|
|
210
|
+
weeklyLimitReached: 604800
|
|
211
|
+
// 7 days
|
|
212
|
+
};
|
|
213
|
+
const UNIPILE_RATE_LIMIT_ERRORS = {
|
|
214
|
+
422: "cannot_resend_yet",
|
|
215
|
+
// Connection request limit
|
|
216
|
+
429: "rate_limited",
|
|
217
|
+
// Too many requests
|
|
218
|
+
500: "server_error_possibly_rate_limited"
|
|
219
|
+
// Sometimes indicates limits
|
|
220
|
+
};
|
|
132
221
|
const ACTION_DELAYS = {
|
|
133
222
|
betweenConnectionRequests: 30,
|
|
134
223
|
betweenMessages: 15,
|
|
@@ -155,27 +244,23 @@ function canSendInmail(subscriptionType) {
|
|
|
155
244
|
const limits = getLimits(subscriptionType);
|
|
156
245
|
return limits.inmail.monthlyCredits > 0;
|
|
157
246
|
}
|
|
247
|
+
function hasOpenProfileMessages(subscriptionType) {
|
|
248
|
+
const limits = getLimits(subscriptionType);
|
|
249
|
+
return limits.openProfileMessagesMonthly !== null;
|
|
250
|
+
}
|
|
158
251
|
function getBestSubscriptionForAction(subscriptionTypes, action) {
|
|
159
252
|
if (subscriptionTypes.length === 0)
|
|
160
253
|
return null;
|
|
161
254
|
if (subscriptionTypes.length === 1)
|
|
162
255
|
return subscriptionTypes[0];
|
|
163
256
|
if (action === "inmail") {
|
|
164
|
-
const priority = ["recruiter_corporate", "
|
|
165
|
-
for (const priorityType of priority) {
|
|
166
|
-
if (subscriptionTypes.includes(priorityType))
|
|
167
|
-
return priorityType;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
if (action === "connection_requests") {
|
|
171
|
-
const priority = ["recruiter_corporate", "sales_navigator", "recruiter_lite", "premium_business", "premium_career", "basic"];
|
|
257
|
+
const priority = ["recruiter_corporate", "sales_navigator", "recruiter_lite", "premium_business", "premium", "premium_career"];
|
|
172
258
|
for (const priorityType of priority) {
|
|
173
259
|
if (subscriptionTypes.includes(priorityType))
|
|
174
260
|
return priorityType;
|
|
175
261
|
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const priority = ["recruiter_corporate", "recruiter_lite", "sales_navigator", "premium_business", "premium_career", "basic"];
|
|
262
|
+
} else {
|
|
263
|
+
const priority = ["recruiter_corporate", "sales_navigator", "recruiter_lite", "premium_business", "premium", "premium_career", "basic"];
|
|
179
264
|
for (const priorityType of priority) {
|
|
180
265
|
if (subscriptionTypes.includes(priorityType))
|
|
181
266
|
return priorityType;
|
|
@@ -942,8 +1027,17 @@ class MessagingResource {
|
|
|
942
1027
|
);
|
|
943
1028
|
}
|
|
944
1029
|
/**
|
|
945
|
-
* Get InMail credit information.
|
|
1030
|
+
* Get InMail credit information with multi-subscription support.
|
|
1031
|
+
*
|
|
1032
|
+
* A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
|
|
1033
|
+
* Each subscription has its own InMail credit pool.
|
|
1034
|
+
*
|
|
946
1035
|
* By default returns cached data. Set forceRefresh=true to fetch real-time data from Unipile API.
|
|
1036
|
+
*
|
|
1037
|
+
* @param userId - User ID or email
|
|
1038
|
+
* @param options - Optional parameters
|
|
1039
|
+
* @param options.forceRefresh - If true, fetch real-time data from Unipile API
|
|
1040
|
+
* @returns LinkedInCreditsResponse with subscriptions array and totals
|
|
947
1041
|
*/
|
|
948
1042
|
async getLinkedInCredits(userId, options) {
|
|
949
1043
|
const queryParams = new URLSearchParams();
|
|
@@ -957,7 +1051,12 @@ class MessagingResource {
|
|
|
957
1051
|
}
|
|
958
1052
|
/**
|
|
959
1053
|
* Force refresh InMail credits from Unipile API.
|
|
1054
|
+
*
|
|
960
1055
|
* Fetches real-time credit balance from provider and updates cache.
|
|
1056
|
+
* Returns multi-subscription breakdown with per-subscription credit pools.
|
|
1057
|
+
*
|
|
1058
|
+
* @param userId - User ID or email
|
|
1059
|
+
* @returns LinkedInCreditsResponse with isRealTime=true and subscriptions array
|
|
961
1060
|
*/
|
|
962
1061
|
async refreshLinkedInCredits(userId) {
|
|
963
1062
|
const queryParams = new URLSearchParams();
|
|
@@ -1340,9 +1439,9 @@ class MessagingResource {
|
|
|
1340
1439
|
*
|
|
1341
1440
|
* @param conversationId - UUID of the conversation to delete
|
|
1342
1441
|
* @param userId - User ID or email
|
|
1343
|
-
* @returns DeleteConversationResponse with success status and
|
|
1442
|
+
* @returns DeleteConversationResponse with success status and conversationId
|
|
1344
1443
|
* @throws MessagingNotFoundError if conversation not found (404)
|
|
1345
|
-
* @throws MessagingValidationError if
|
|
1444
|
+
* @throws MessagingValidationError if conversationId is invalid (400)
|
|
1346
1445
|
*/
|
|
1347
1446
|
async deleteConversation(conversationId, userId) {
|
|
1348
1447
|
try {
|
|
@@ -2739,12 +2838,14 @@ exports.PeopleDataSource = PeopleDataSource;
|
|
|
2739
2838
|
exports.ProgressTracker = ProgressTracker;
|
|
2740
2839
|
exports.ProviderType = ProviderType;
|
|
2741
2840
|
exports.QueueItemStatus = QueueItemStatus;
|
|
2841
|
+
exports.RATE_LIMIT_COOLDOWNS = RATE_LIMIT_COOLDOWNS;
|
|
2742
2842
|
exports.RateLimitError = RateLimitError;
|
|
2743
2843
|
exports.SourcesNotAvailableError = SourcesNotAvailableError;
|
|
2744
2844
|
exports.SyncJobStatus = SyncJobStatus;
|
|
2845
|
+
exports.UNIPILE_RATE_LIMIT_ERRORS = UNIPILE_RATE_LIMIT_ERRORS;
|
|
2846
|
+
exports.UNIPILE_SAFE_LIMITS = UNIPILE_SAFE_LIMITS;
|
|
2745
2847
|
exports.ValidationError = ValidationError;
|
|
2746
2848
|
exports.canSendInmail = canSendInmail;
|
|
2747
|
-
exports.default = LumnisClient;
|
|
2748
2849
|
exports.displayProgress = displayProgress;
|
|
2749
2850
|
exports.formatProgressEntry = formatProgressEntry;
|
|
2750
2851
|
exports.getBestSubscriptionForAction = getBestSubscriptionForAction;
|
|
@@ -2752,4 +2853,5 @@ exports.getConnectionRequestLimit = getConnectionRequestLimit;
|
|
|
2752
2853
|
exports.getInmailAllowance = getInmailAllowance;
|
|
2753
2854
|
exports.getLimits = getLimits;
|
|
2754
2855
|
exports.getMessageLimit = getMessageLimit;
|
|
2856
|
+
exports.hasOpenProfileMessages = hasOpenProfileMessages;
|
|
2755
2857
|
exports.verifyWebhookSignature = verifyWebhookSignature;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* LinkedIn subscription types
|
|
3
3
|
*/
|
|
4
|
-
type
|
|
4
|
+
type LinkedInLimitSubscriptionType = 'basic' | 'premium' | 'premium_career' | 'premium_business' | 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate';
|
|
5
5
|
/**
|
|
6
6
|
* LinkedIn limits by subscription type
|
|
7
7
|
*/
|
|
@@ -9,6 +9,7 @@ interface LinkedInLimits {
|
|
|
9
9
|
connectionRequests: {
|
|
10
10
|
weeklyMax: number;
|
|
11
11
|
dailySafe: number;
|
|
12
|
+
personalizedMonthly: number | null;
|
|
12
13
|
};
|
|
13
14
|
messages: {
|
|
14
15
|
weeklyMax: number;
|
|
@@ -23,11 +24,58 @@ interface LinkedInLimits {
|
|
|
23
24
|
dailyMax: number;
|
|
24
25
|
dailySafe: number;
|
|
25
26
|
};
|
|
27
|
+
openProfileMessagesMonthly: number | null;
|
|
26
28
|
}
|
|
27
29
|
/**
|
|
28
30
|
* LinkedIn rate limits by subscription type
|
|
29
31
|
*/
|
|
30
|
-
declare const LINKEDIN_LIMITS: Record<
|
|
32
|
+
declare const LINKEDIN_LIMITS: Record<LinkedInLimitSubscriptionType, LinkedInLimits>;
|
|
33
|
+
/**
|
|
34
|
+
* Safe limits when using automation (more conservative than LinkedIn's limits)
|
|
35
|
+
* These are Unipile-recommended limits for automation
|
|
36
|
+
*/
|
|
37
|
+
declare const UNIPILE_SAFE_LIMITS: {
|
|
38
|
+
readonly connectionRequestsDaily: {
|
|
39
|
+
readonly basic: 15;
|
|
40
|
+
readonly premium: 20;
|
|
41
|
+
readonly premium_career: 20;
|
|
42
|
+
readonly premium_business: 20;
|
|
43
|
+
readonly sales_navigator: 25;
|
|
44
|
+
readonly recruiter_lite: 25;
|
|
45
|
+
readonly recruiter_corporate: 30;
|
|
46
|
+
};
|
|
47
|
+
readonly messagesDaily: {
|
|
48
|
+
readonly basic: 15;
|
|
49
|
+
readonly premium: 20;
|
|
50
|
+
readonly premium_career: 20;
|
|
51
|
+
readonly premium_business: 20;
|
|
52
|
+
readonly sales_navigator: 20;
|
|
53
|
+
readonly recruiter_lite: 25;
|
|
54
|
+
readonly recruiter_corporate: 30;
|
|
55
|
+
};
|
|
56
|
+
readonly profileViewsDaily: {
|
|
57
|
+
readonly basic: 250;
|
|
58
|
+
readonly premium: 300;
|
|
59
|
+
readonly premium_career: 300;
|
|
60
|
+
readonly premium_business: 300;
|
|
61
|
+
readonly sales_navigator: 500;
|
|
62
|
+
readonly recruiter_lite: 500;
|
|
63
|
+
readonly recruiter_corporate: 500;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Cooldown periods (in seconds) after hitting limits
|
|
68
|
+
*/
|
|
69
|
+
declare const RATE_LIMIT_COOLDOWNS: {
|
|
70
|
+
readonly connectionRequestRejected: 3600;
|
|
71
|
+
readonly messageRateLimited: 1800;
|
|
72
|
+
readonly dailyLimitReached: 86400;
|
|
73
|
+
readonly weeklyLimitReached: 604800;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* HTTP error codes from Unipile indicating rate limits
|
|
77
|
+
*/
|
|
78
|
+
declare const UNIPILE_RATE_LIMIT_ERRORS: Record<number, string>;
|
|
31
79
|
/**
|
|
32
80
|
* Action delays for human-like behavior (in seconds)
|
|
33
81
|
*/
|
|
@@ -40,19 +88,19 @@ declare const ACTION_DELAYS: {
|
|
|
40
88
|
/**
|
|
41
89
|
* Get all limits for a subscription type
|
|
42
90
|
*/
|
|
43
|
-
declare function getLimits(subscriptionType:
|
|
91
|
+
declare function getLimits(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): LinkedInLimits;
|
|
44
92
|
/**
|
|
45
93
|
* Get connection request limit for a subscription type
|
|
46
94
|
*/
|
|
47
|
-
declare function getConnectionRequestLimit(subscriptionType:
|
|
95
|
+
declare function getConnectionRequestLimit(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined, useSafeLimit?: boolean): number;
|
|
48
96
|
/**
|
|
49
97
|
* Get message limit for a subscription type
|
|
50
98
|
*/
|
|
51
|
-
declare function getMessageLimit(subscriptionType:
|
|
99
|
+
declare function getMessageLimit(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined, useSafeLimit?: boolean): number;
|
|
52
100
|
/**
|
|
53
101
|
* Get InMail allowance for a subscription type
|
|
54
102
|
*/
|
|
55
|
-
declare function getInmailAllowance(subscriptionType:
|
|
103
|
+
declare function getInmailAllowance(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): {
|
|
56
104
|
monthlyCredits: number;
|
|
57
105
|
maxAccumulation: number;
|
|
58
106
|
rollover: boolean;
|
|
@@ -60,11 +108,19 @@ declare function getInmailAllowance(subscriptionType: LinkedInSubscriptionType$1
|
|
|
60
108
|
/**
|
|
61
109
|
* Check if subscription can send InMail
|
|
62
110
|
*/
|
|
63
|
-
declare function canSendInmail(subscriptionType:
|
|
111
|
+
declare function canSendInmail(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Check if subscription has Open Profile messaging (Recruiter only)
|
|
114
|
+
*/
|
|
115
|
+
declare function hasOpenProfileMessages(subscriptionType: LinkedInLimitSubscriptionType | string | null | undefined): boolean;
|
|
64
116
|
/**
|
|
65
117
|
* Get best subscription for a specific action when user has multiple subscriptions
|
|
118
|
+
*
|
|
119
|
+
* Priority order matches backend:
|
|
120
|
+
* - InMail: recruiter_corporate > sales_navigator > recruiter_lite > premium_business > premium_career
|
|
121
|
+
* - Other actions: recruiter_corporate > sales_navigator > recruiter_lite > premium_business > premium_career > basic
|
|
66
122
|
*/
|
|
67
|
-
declare function getBestSubscriptionForAction(subscriptionTypes: (
|
|
123
|
+
declare function getBestSubscriptionForAction(subscriptionTypes: (LinkedInLimitSubscriptionType | string)[], action: 'inmail' | 'connection_requests' | 'messages'): LinkedInLimitSubscriptionType | string | null;
|
|
68
124
|
|
|
69
125
|
interface PaginationParams {
|
|
70
126
|
page?: number;
|
|
@@ -1390,10 +1446,14 @@ interface ProspectSyncIdentifier {
|
|
|
1390
1446
|
providerId?: string | null;
|
|
1391
1447
|
}
|
|
1392
1448
|
/**
|
|
1393
|
-
* Request to sync conversations
|
|
1449
|
+
* Request to sync conversations for specific prospects.
|
|
1450
|
+
*
|
|
1451
|
+
* Prospects list is required - syncs only conversations for the specified prospects.
|
|
1452
|
+
* This ensures efficient, targeted syncing without pulling unrelated inbox data.
|
|
1394
1453
|
*/
|
|
1395
1454
|
interface SyncRequest {
|
|
1396
1455
|
channels?: string[] | null;
|
|
1456
|
+
/** List of prospects to sync (required). Must include at least one prospect with an identifier. */
|
|
1397
1457
|
prospects: ProspectSyncIdentifier[];
|
|
1398
1458
|
}
|
|
1399
1459
|
/**
|
|
@@ -1504,7 +1564,8 @@ interface ProspectInfo {
|
|
|
1504
1564
|
interface BatchDraftRequest {
|
|
1505
1565
|
prospects: ProspectInfo[];
|
|
1506
1566
|
projectId: string;
|
|
1507
|
-
channel
|
|
1567
|
+
/** Default channel if not specified per prospect */
|
|
1568
|
+
channel: string;
|
|
1508
1569
|
subjectTemplate?: string | null;
|
|
1509
1570
|
contentTemplate?: string | null;
|
|
1510
1571
|
useAiGeneration?: boolean;
|
|
@@ -1594,19 +1655,29 @@ interface BatchConnectionStatusResponse {
|
|
|
1594
1655
|
summary: ConnectionSummary;
|
|
1595
1656
|
}
|
|
1596
1657
|
/**
|
|
1597
|
-
* LinkedIn credits response
|
|
1658
|
+
* LinkedIn credits response with multiple subscription support.
|
|
1659
|
+
*
|
|
1660
|
+
* A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
|
|
1661
|
+
* Each subscription has its own InMail credit pool.
|
|
1598
1662
|
*/
|
|
1599
1663
|
interface LinkedInCreditsResponse {
|
|
1664
|
+
subscriptions: LinkedInSubscriptionInfo[];
|
|
1600
1665
|
subscriptionType?: string | null;
|
|
1601
1666
|
creditsRemaining?: number | null;
|
|
1602
1667
|
creditsUpdatedAt?: string | null;
|
|
1603
|
-
isRealTime
|
|
1668
|
+
isRealTime: boolean;
|
|
1669
|
+
canSendInmail: boolean;
|
|
1604
1670
|
}
|
|
1605
1671
|
/**
|
|
1606
|
-
* LinkedIn subscription
|
|
1672
|
+
* Individual LinkedIn subscription with its own InMail credit pool.
|
|
1673
|
+
*
|
|
1674
|
+
* A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
|
|
1675
|
+
* Each subscription has its own InMail credits.
|
|
1607
1676
|
*/
|
|
1608
1677
|
interface LinkedInSubscriptionInfo {
|
|
1678
|
+
/** Subscription type: 'basic' | 'premium' | 'sales_navigator' | 'recruiter_lite' | 'recruiter_corporate' */
|
|
1609
1679
|
type: string;
|
|
1680
|
+
/** Raw Unipile feature: 'classic' | 'sales_navigator' | 'recruiter' */
|
|
1610
1681
|
feature: string;
|
|
1611
1682
|
inmailCreditsRemaining?: number | null;
|
|
1612
1683
|
inmailCreditsUpdatedAt?: string | null;
|
|
@@ -1615,7 +1686,14 @@ interface LinkedInSubscriptionInfo {
|
|
|
1615
1686
|
isActive: boolean;
|
|
1616
1687
|
}
|
|
1617
1688
|
/**
|
|
1618
|
-
*
|
|
1689
|
+
* Full LinkedIn account information with multiple subscription support.
|
|
1690
|
+
*
|
|
1691
|
+
* A LinkedIn account can have multiple subscriptions simultaneously:
|
|
1692
|
+
* - Sales Navigator (for sales professionals)
|
|
1693
|
+
* - Recruiter (for hiring)
|
|
1694
|
+
* - Premium Career (personal use)
|
|
1695
|
+
*
|
|
1696
|
+
* Each subscription has its own InMail credit pool.
|
|
1619
1697
|
*/
|
|
1620
1698
|
interface LinkedInAccountInfoResponse {
|
|
1621
1699
|
connected: boolean;
|
|
@@ -1631,6 +1709,11 @@ interface LinkedInAccountInfoResponse {
|
|
|
1631
1709
|
canSendInmail: boolean;
|
|
1632
1710
|
canUseSalesNavigatorApi: boolean;
|
|
1633
1711
|
canUseRecruiterApi: boolean;
|
|
1712
|
+
inmailSentToday?: number | null;
|
|
1713
|
+
directMessagesSentToday?: number | null;
|
|
1714
|
+
connectionRequestsSentToday?: number | null;
|
|
1715
|
+
gmailSentToday?: number | null;
|
|
1716
|
+
outlookSentToday?: number | null;
|
|
1634
1717
|
unipileStatus?: string | null;
|
|
1635
1718
|
}
|
|
1636
1719
|
/**
|
|
@@ -1809,23 +1892,23 @@ interface BatchSendResponse {
|
|
|
1809
1892
|
*/
|
|
1810
1893
|
interface DeleteConversationResponse {
|
|
1811
1894
|
success: boolean;
|
|
1812
|
-
|
|
1895
|
+
conversationId: string;
|
|
1813
1896
|
}
|
|
1814
1897
|
/**
|
|
1815
1898
|
* Response from deleting conversations by project
|
|
1816
1899
|
*/
|
|
1817
1900
|
interface DeleteConversationsByProjectResponse {
|
|
1818
1901
|
success: boolean;
|
|
1819
|
-
|
|
1820
|
-
|
|
1902
|
+
projectId: string;
|
|
1903
|
+
deletedCount: number;
|
|
1821
1904
|
}
|
|
1822
1905
|
/**
|
|
1823
1906
|
* Response from unlinking conversations from project
|
|
1824
1907
|
*/
|
|
1825
1908
|
interface UnlinkConversationsResponse {
|
|
1826
1909
|
success: boolean;
|
|
1827
|
-
|
|
1828
|
-
|
|
1910
|
+
projectId: string;
|
|
1911
|
+
unlinkedCount: number;
|
|
1829
1912
|
}
|
|
1830
1913
|
/**
|
|
1831
1914
|
* Request to check if there's been prior contact with a person
|
|
@@ -2057,15 +2140,29 @@ declare class MessagingResource {
|
|
|
2057
2140
|
forceRefresh?: boolean;
|
|
2058
2141
|
}): Promise<LinkedInAccountInfoResponse>;
|
|
2059
2142
|
/**
|
|
2060
|
-
* Get InMail credit information.
|
|
2143
|
+
* Get InMail credit information with multi-subscription support.
|
|
2144
|
+
*
|
|
2145
|
+
* A LinkedIn account can have multiple subscriptions (e.g., Sales Navigator + Recruiter).
|
|
2146
|
+
* Each subscription has its own InMail credit pool.
|
|
2147
|
+
*
|
|
2061
2148
|
* By default returns cached data. Set forceRefresh=true to fetch real-time data from Unipile API.
|
|
2149
|
+
*
|
|
2150
|
+
* @param userId - User ID or email
|
|
2151
|
+
* @param options - Optional parameters
|
|
2152
|
+
* @param options.forceRefresh - If true, fetch real-time data from Unipile API
|
|
2153
|
+
* @returns LinkedInCreditsResponse with subscriptions array and totals
|
|
2062
2154
|
*/
|
|
2063
2155
|
getLinkedInCredits(userId: string, options?: {
|
|
2064
2156
|
forceRefresh?: boolean;
|
|
2065
2157
|
}): Promise<LinkedInCreditsResponse>;
|
|
2066
2158
|
/**
|
|
2067
2159
|
* Force refresh InMail credits from Unipile API.
|
|
2160
|
+
*
|
|
2068
2161
|
* Fetches real-time credit balance from provider and updates cache.
|
|
2162
|
+
* Returns multi-subscription breakdown with per-subscription credit pools.
|
|
2163
|
+
*
|
|
2164
|
+
* @param userId - User ID or email
|
|
2165
|
+
* @returns LinkedInCreditsResponse with isRealTime=true and subscriptions array
|
|
2069
2166
|
*/
|
|
2070
2167
|
refreshLinkedInCredits(userId: string): Promise<LinkedInCreditsResponse>;
|
|
2071
2168
|
/**
|
|
@@ -2192,9 +2289,9 @@ declare class MessagingResource {
|
|
|
2192
2289
|
*
|
|
2193
2290
|
* @param conversationId - UUID of the conversation to delete
|
|
2194
2291
|
* @param userId - User ID or email
|
|
2195
|
-
* @returns DeleteConversationResponse with success status and
|
|
2292
|
+
* @returns DeleteConversationResponse with success status and conversationId
|
|
2196
2293
|
* @throws MessagingNotFoundError if conversation not found (404)
|
|
2197
|
-
* @throws MessagingValidationError if
|
|
2294
|
+
* @throws MessagingValidationError if conversationId is invalid (400)
|
|
2198
2295
|
*/
|
|
2199
2296
|
deleteConversation(conversationId: string, userId: string): Promise<DeleteConversationResponse>;
|
|
2200
2297
|
/**
|
|
@@ -2888,5 +2985,4 @@ declare class ProgressTracker {
|
|
|
2888
2985
|
*/
|
|
2889
2986
|
declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
|
|
2890
2987
|
|
|
2891
|
-
export
|
|
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 };
|
|
2988
|
+
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, 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 };
|