lumnisai 0.1.8 → 0.1.10
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 +470 -47
- package/dist/index.d.cts +661 -1
- package/dist/index.d.mts +661 -1
- package/dist/index.d.ts +661 -1
- package/dist/index.mjs +452 -48
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
const node_buffer = require('node:buffer');
|
|
6
|
+
const crypto$1 = require('node:crypto');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
9
|
+
|
|
10
|
+
const crypto__default = /*#__PURE__*/_interopDefaultCompat(crypto$1);
|
|
11
|
+
|
|
5
12
|
const DEFAULT_BASE_URL = "https://api.lumnis.ai";
|
|
6
13
|
const DEFAULT_POLL_INTERVAL_MS = 2e3;
|
|
7
14
|
const LONG_POLL_TIMEOUT_S = 10;
|
|
@@ -207,15 +214,33 @@ class IntegrationsResource {
|
|
|
207
214
|
* Check the status of a specific connection
|
|
208
215
|
*/
|
|
209
216
|
async getConnectionStatus(params) {
|
|
210
|
-
const { userId, appName, provider } = params;
|
|
217
|
+
const { userId, appName, provider, includeEnabled } = params;
|
|
211
218
|
const queryParams = new URLSearchParams();
|
|
212
219
|
if (provider)
|
|
213
220
|
queryParams.append("provider", provider);
|
|
221
|
+
if (includeEnabled)
|
|
222
|
+
queryParams.append("include_enabled", "true");
|
|
214
223
|
const query = queryParams.toString() ? `?${queryParams.toString()}` : "";
|
|
215
224
|
return this.http.get(
|
|
216
225
|
`/integrations/connections/${encodeURIComponent(userId)}/${appName.toUpperCase()}${query}`
|
|
217
226
|
);
|
|
218
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Check connection status for multiple apps in a single request
|
|
230
|
+
* Optimized for onboarding flows - checks multiple connections in parallel
|
|
231
|
+
*/
|
|
232
|
+
async getConnectionsBatch(params) {
|
|
233
|
+
const requestData = {
|
|
234
|
+
userId: params.userId,
|
|
235
|
+
appNames: params.appNames.map((name) => name.toUpperCase()),
|
|
236
|
+
provider: params.provider || "composio",
|
|
237
|
+
includeEnabledStatus: params.includeEnabledStatus ?? true
|
|
238
|
+
};
|
|
239
|
+
return this.http.post(
|
|
240
|
+
"/integrations/connections/batch",
|
|
241
|
+
requestData
|
|
242
|
+
);
|
|
243
|
+
}
|
|
219
244
|
/**
|
|
220
245
|
* Get all connections for a user
|
|
221
246
|
*/
|
|
@@ -391,50 +416,6 @@ class MCPServersResource {
|
|
|
391
416
|
}
|
|
392
417
|
}
|
|
393
418
|
|
|
394
|
-
class ModelPreferencesResource {
|
|
395
|
-
constructor(http) {
|
|
396
|
-
this.http = http;
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Get all model preferences for the tenant
|
|
400
|
-
*/
|
|
401
|
-
async get(includeDefaults = true) {
|
|
402
|
-
const params = new URLSearchParams();
|
|
403
|
-
params.append("include_defaults", includeDefaults.toString());
|
|
404
|
-
return this.http.get(`/model-preferences?${params.toString()}`);
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Update multiple model preferences in a single request
|
|
408
|
-
*/
|
|
409
|
-
async updateBulk(data) {
|
|
410
|
-
return this.http.put("/model-preferences", data);
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Update a specific model type preference
|
|
414
|
-
*/
|
|
415
|
-
async update(modelType, data) {
|
|
416
|
-
return this.http.patch(`/model-preferences/${modelType}`, data);
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Delete a model preference to revert to system default
|
|
420
|
-
*/
|
|
421
|
-
async delete(modelType) {
|
|
422
|
-
await this.http.delete(`/model-preferences/${modelType}`);
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* Check which models are available based on API key configuration
|
|
426
|
-
*/
|
|
427
|
-
async checkAvailability(models) {
|
|
428
|
-
return this.http.post("/model-preferences/check-availability", models);
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* List all model preferences (alias for get)
|
|
432
|
-
*/
|
|
433
|
-
async list(params) {
|
|
434
|
-
return this.get(params?.includeDefaults);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
|
|
438
419
|
class LumnisError extends Error {
|
|
439
420
|
code;
|
|
440
421
|
statusCode;
|
|
@@ -508,6 +489,319 @@ class SourcesNotAvailableError extends ValidationError {
|
|
|
508
489
|
this.availableSources = availableSources;
|
|
509
490
|
}
|
|
510
491
|
}
|
|
492
|
+
class MessagingAPIError extends LumnisError {
|
|
493
|
+
constructor(message, options = {}) {
|
|
494
|
+
super(message, options);
|
|
495
|
+
this.name = "MessagingAPIError";
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
class MessagingNotFoundError extends MessagingAPIError {
|
|
499
|
+
constructor(message, options = {}) {
|
|
500
|
+
super(message, { ...options, statusCode: 404 });
|
|
501
|
+
this.name = "MessagingNotFoundError";
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
class MessagingValidationError extends MessagingAPIError {
|
|
505
|
+
constructor(message, options = {}) {
|
|
506
|
+
super(message, { ...options, statusCode: 400 });
|
|
507
|
+
this.name = "MessagingValidationError";
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
class MessagingSendError extends MessagingAPIError {
|
|
511
|
+
constructor(message, options = {}) {
|
|
512
|
+
super(message, { ...options, statusCode: 400 });
|
|
513
|
+
this.name = "MessagingSendError";
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
class MessagingConnectionError extends MessagingAPIError {
|
|
517
|
+
constructor(message, options = {}) {
|
|
518
|
+
super(message, { ...options, statusCode: 400 });
|
|
519
|
+
this.name = "MessagingConnectionError";
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
class MessagingResource {
|
|
524
|
+
constructor(http) {
|
|
525
|
+
this.http = http;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Sync conversations from connected providers for specific prospects.
|
|
529
|
+
* Prospects list is REQUIRED.
|
|
530
|
+
*/
|
|
531
|
+
async syncConversations(userId, request) {
|
|
532
|
+
if (!request.prospects || request.prospects.length === 0) {
|
|
533
|
+
throw new MessagingValidationError("prospects array is required and must not be empty", { code: "VALIDATION_ERROR" });
|
|
534
|
+
}
|
|
535
|
+
for (const prospect of request.prospects) {
|
|
536
|
+
const hasIdentifier = prospect.email || prospect.linkedinUrl || prospect.providerId;
|
|
537
|
+
if (!hasIdentifier) {
|
|
538
|
+
throw new MessagingValidationError("Each prospect must have at least one identifier (email, linkedinUrl, or providerId)", { code: "VALIDATION_ERROR" });
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
const queryParams = new URLSearchParams();
|
|
542
|
+
queryParams.append("user_id", userId);
|
|
543
|
+
return this.http.post(
|
|
544
|
+
`/messaging/sync?${queryParams.toString()}`,
|
|
545
|
+
request
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Sync conversation for a single prospect on-demand.
|
|
550
|
+
* Use when viewing a prospect's detail page.
|
|
551
|
+
*/
|
|
552
|
+
async syncProspect(userId, request) {
|
|
553
|
+
const queryParams = new URLSearchParams();
|
|
554
|
+
queryParams.append("user_id", userId);
|
|
555
|
+
return this.http.post(
|
|
556
|
+
`/messaging/sync/prospect?${queryParams.toString()}`,
|
|
557
|
+
request
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Get sync job status
|
|
562
|
+
*/
|
|
563
|
+
async getSyncStatus(jobId) {
|
|
564
|
+
return this.http.get(`/messaging/sync/${encodeURIComponent(jobId)}`);
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* List conversations with filtering
|
|
568
|
+
*/
|
|
569
|
+
async listConversations(userId, params) {
|
|
570
|
+
const queryParams = new URLSearchParams();
|
|
571
|
+
queryParams.append("user_id", userId);
|
|
572
|
+
if (params?.status)
|
|
573
|
+
queryParams.append("status", params.status);
|
|
574
|
+
if (params?.channel)
|
|
575
|
+
queryParams.append("channel", params.channel);
|
|
576
|
+
if (params?.projectId)
|
|
577
|
+
queryParams.append("project_id", params.projectId);
|
|
578
|
+
if (params?.networkDistance)
|
|
579
|
+
queryParams.append("network_distance", params.networkDistance);
|
|
580
|
+
if (params?.limit !== void 0)
|
|
581
|
+
queryParams.append("limit", String(params.limit));
|
|
582
|
+
if (params?.offset !== void 0)
|
|
583
|
+
queryParams.append("offset", String(params.offset));
|
|
584
|
+
return this.http.get(
|
|
585
|
+
`/messaging/conversations?${queryParams.toString()}`
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Get all conversations for a project
|
|
590
|
+
*/
|
|
591
|
+
async listConversationsByProject(projectId, userId, params) {
|
|
592
|
+
const queryParams = new URLSearchParams();
|
|
593
|
+
queryParams.append("user_id", userId);
|
|
594
|
+
if (params?.limit !== void 0)
|
|
595
|
+
queryParams.append("limit", String(params.limit));
|
|
596
|
+
if (params?.offset !== void 0)
|
|
597
|
+
queryParams.append("offset", String(params.offset));
|
|
598
|
+
return this.http.get(
|
|
599
|
+
`/messaging/conversations/by-project/${encodeURIComponent(projectId)}?${queryParams.toString()}`
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Get conversation with messages
|
|
604
|
+
*/
|
|
605
|
+
async getConversation(conversationId, userId, params) {
|
|
606
|
+
const queryParams = new URLSearchParams();
|
|
607
|
+
queryParams.append("user_id", userId);
|
|
608
|
+
if (params?.fetchLive !== void 0)
|
|
609
|
+
queryParams.append("fetch_live", String(params.fetchLive));
|
|
610
|
+
return this.http.get(
|
|
611
|
+
`/messaging/conversations/${encodeURIComponent(conversationId)}?${queryParams.toString()}`
|
|
612
|
+
);
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Send a message (creates new conversation or adds to existing)
|
|
616
|
+
*/
|
|
617
|
+
async sendMessage(userId, request) {
|
|
618
|
+
const queryParams = new URLSearchParams();
|
|
619
|
+
queryParams.append("user_id", userId);
|
|
620
|
+
return this.http.post(
|
|
621
|
+
`/messaging/send?${queryParams.toString()}`,
|
|
622
|
+
request
|
|
623
|
+
);
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Reply to an existing conversation
|
|
627
|
+
*/
|
|
628
|
+
async replyToConversation(conversationId, userId, request) {
|
|
629
|
+
const queryParams = new URLSearchParams();
|
|
630
|
+
queryParams.append("user_id", userId);
|
|
631
|
+
return this.http.post(
|
|
632
|
+
`/messaging/conversations/${encodeURIComponent(conversationId)}/reply?${queryParams.toString()}`,
|
|
633
|
+
request
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Get all email threads with a specific person
|
|
638
|
+
*/
|
|
639
|
+
async getEmailThreads(emailAddress, userId, params) {
|
|
640
|
+
const queryParams = new URLSearchParams();
|
|
641
|
+
queryParams.append("user_id", userId);
|
|
642
|
+
if (params?.limit !== void 0)
|
|
643
|
+
queryParams.append("limit", String(params.limit));
|
|
644
|
+
return this.http.get(
|
|
645
|
+
`/messaging/email-threads/${encodeURIComponent(emailAddress)}?${queryParams.toString()}`
|
|
646
|
+
);
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Check if user is connected to a prospect on LinkedIn
|
|
650
|
+
*/
|
|
651
|
+
async checkLinkedInConnection(userId, request) {
|
|
652
|
+
const queryParams = new URLSearchParams();
|
|
653
|
+
queryParams.append("user_id", userId);
|
|
654
|
+
return this.http.post(
|
|
655
|
+
`/messaging/linkedin/check-connection?${queryParams.toString()}`,
|
|
656
|
+
request
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* Batch check connection status for multiple prospects
|
|
661
|
+
*/
|
|
662
|
+
async batchCheckLinkedInConnections(userId, request) {
|
|
663
|
+
const queryParams = new URLSearchParams();
|
|
664
|
+
queryParams.append("user_id", userId);
|
|
665
|
+
return this.http.post(
|
|
666
|
+
`/messaging/linkedin/check-connections/batch?${queryParams.toString()}`,
|
|
667
|
+
request
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Smart LinkedIn outreach with automatic method selection
|
|
672
|
+
*/
|
|
673
|
+
async sendLinkedInOutreach(userId, request) {
|
|
674
|
+
const queryParams = new URLSearchParams();
|
|
675
|
+
queryParams.append("user_id", userId);
|
|
676
|
+
return this.http.post(
|
|
677
|
+
`/messaging/linkedin/send?${queryParams.toString()}`,
|
|
678
|
+
request
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Get InMail credit information.
|
|
683
|
+
* By default returns cached data. Set forceRefresh=true to fetch real-time data from Unipile API.
|
|
684
|
+
*/
|
|
685
|
+
async getLinkedInCredits(userId, options) {
|
|
686
|
+
const queryParams = new URLSearchParams();
|
|
687
|
+
queryParams.append("user_id", userId);
|
|
688
|
+
if (options?.forceRefresh) {
|
|
689
|
+
queryParams.append("force_refresh", "true");
|
|
690
|
+
}
|
|
691
|
+
return this.http.get(
|
|
692
|
+
`/messaging/linkedin/credits?${queryParams.toString()}`
|
|
693
|
+
);
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Force refresh InMail credits from Unipile API.
|
|
697
|
+
* Fetches real-time credit balance from provider and updates cache.
|
|
698
|
+
*/
|
|
699
|
+
async refreshLinkedInCredits(userId) {
|
|
700
|
+
const queryParams = new URLSearchParams();
|
|
701
|
+
queryParams.append("user_id", userId);
|
|
702
|
+
return this.http.post(
|
|
703
|
+
`/messaging/linkedin/refresh-credits?${queryParams.toString()}`
|
|
704
|
+
);
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Update LinkedIn subscription type and credits
|
|
708
|
+
*/
|
|
709
|
+
async updateLinkedInSubscription(userId, request) {
|
|
710
|
+
const queryParams = new URLSearchParams();
|
|
711
|
+
queryParams.append("user_id", userId);
|
|
712
|
+
return this.http.put(
|
|
713
|
+
`/messaging/linkedin/subscription?${queryParams.toString()}`,
|
|
714
|
+
request
|
|
715
|
+
);
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Create a single draft message
|
|
719
|
+
*/
|
|
720
|
+
async createDraft(userId, request) {
|
|
721
|
+
const queryParams = new URLSearchParams();
|
|
722
|
+
queryParams.append("user_id", userId);
|
|
723
|
+
return this.http.post(
|
|
724
|
+
`/messaging/drafts?${queryParams.toString()}`,
|
|
725
|
+
request
|
|
726
|
+
);
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* Create drafts for multiple prospects with AI generation
|
|
730
|
+
*/
|
|
731
|
+
async createBatchDrafts(userId, request) {
|
|
732
|
+
const queryParams = new URLSearchParams();
|
|
733
|
+
queryParams.append("user_id", userId);
|
|
734
|
+
return this.http.post(
|
|
735
|
+
`/messaging/drafts/batch?${queryParams.toString()}`,
|
|
736
|
+
request
|
|
737
|
+
);
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* Approve and send a single draft
|
|
741
|
+
*/
|
|
742
|
+
async sendDraft(draftId, userId) {
|
|
743
|
+
const queryParams = new URLSearchParams();
|
|
744
|
+
queryParams.append("user_id", userId);
|
|
745
|
+
return this.http.post(
|
|
746
|
+
`/messaging/drafts/${encodeURIComponent(draftId)}/send?${queryParams.toString()}`
|
|
747
|
+
);
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Send multiple drafts with rate limiting
|
|
751
|
+
*/
|
|
752
|
+
async sendBatchDrafts(userId, request) {
|
|
753
|
+
const queryParams = new URLSearchParams();
|
|
754
|
+
queryParams.append("user_id", userId);
|
|
755
|
+
return this.http.post(
|
|
756
|
+
`/messaging/drafts/batch/send?${queryParams.toString()}`,
|
|
757
|
+
request
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
class ModelPreferencesResource {
|
|
763
|
+
constructor(http) {
|
|
764
|
+
this.http = http;
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Get all model preferences for the tenant
|
|
768
|
+
*/
|
|
769
|
+
async get(includeDefaults = true) {
|
|
770
|
+
const params = new URLSearchParams();
|
|
771
|
+
params.append("include_defaults", includeDefaults.toString());
|
|
772
|
+
return this.http.get(`/model-preferences?${params.toString()}`);
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Update multiple model preferences in a single request
|
|
776
|
+
*/
|
|
777
|
+
async updateBulk(data) {
|
|
778
|
+
return this.http.put("/model-preferences", data);
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Update a specific model type preference
|
|
782
|
+
*/
|
|
783
|
+
async update(modelType, data) {
|
|
784
|
+
return this.http.patch(`/model-preferences/${modelType}`, data);
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Delete a model preference to revert to system default
|
|
788
|
+
*/
|
|
789
|
+
async delete(modelType) {
|
|
790
|
+
await this.http.delete(`/model-preferences/${modelType}`);
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Check which models are available based on API key configuration
|
|
794
|
+
*/
|
|
795
|
+
async checkAvailability(models) {
|
|
796
|
+
return this.http.post("/model-preferences/check-availability", models);
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* List all model preferences (alias for get)
|
|
800
|
+
*/
|
|
801
|
+
async list(params) {
|
|
802
|
+
return this.get(params?.includeDefaults);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
511
805
|
|
|
512
806
|
var PeopleDataSource = /* @__PURE__ */ ((PeopleDataSource2) => {
|
|
513
807
|
PeopleDataSource2["PDL"] = "PDL";
|
|
@@ -972,12 +1266,20 @@ class UsersResource {
|
|
|
972
1266
|
}
|
|
973
1267
|
}
|
|
974
1268
|
|
|
1269
|
+
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
1270
|
+
function isUUID(s) {
|
|
1271
|
+
return UUID_PATTERN.test(s);
|
|
1272
|
+
}
|
|
975
1273
|
function toCamel(s) {
|
|
1274
|
+
if (isUUID(s))
|
|
1275
|
+
return s;
|
|
976
1276
|
return s.replace(/([-_][a-z])/gi, ($1) => {
|
|
977
1277
|
return $1.toUpperCase().replace("-", "").replace("_", "");
|
|
978
1278
|
});
|
|
979
1279
|
}
|
|
980
1280
|
function toSnake(s) {
|
|
1281
|
+
if (isUUID(s))
|
|
1282
|
+
return s;
|
|
981
1283
|
return s.replace(/[A-Z]/g, (letter, index) => {
|
|
982
1284
|
return index === 0 ? letter.toLowerCase() : `_${letter.toLowerCase()}`;
|
|
983
1285
|
});
|
|
@@ -1150,6 +1452,7 @@ class LumnisClient {
|
|
|
1150
1452
|
mcpServers;
|
|
1151
1453
|
skills;
|
|
1152
1454
|
people;
|
|
1455
|
+
messaging;
|
|
1153
1456
|
_scopedUserId;
|
|
1154
1457
|
_defaultScope;
|
|
1155
1458
|
constructor(options = {}) {
|
|
@@ -1181,6 +1484,7 @@ class LumnisClient {
|
|
|
1181
1484
|
this.mcpServers = new MCPServersResource(this.http);
|
|
1182
1485
|
this.skills = new SkillsResource(this.http);
|
|
1183
1486
|
this.people = new PeopleResource(this.http);
|
|
1487
|
+
this.messaging = new MessagingResource(this.http);
|
|
1184
1488
|
}
|
|
1185
1489
|
forUser(userId) {
|
|
1186
1490
|
return new LumnisClient({
|
|
@@ -1360,8 +1664,28 @@ class LumnisClient {
|
|
|
1360
1664
|
async initiateConnection(params) {
|
|
1361
1665
|
return this.integrations.initiateConnection(params);
|
|
1362
1666
|
}
|
|
1363
|
-
async getConnectionStatus(userId, appName,
|
|
1364
|
-
|
|
1667
|
+
async getConnectionStatus(userId, appName, providerOrOptions) {
|
|
1668
|
+
if (typeof providerOrOptions === "string") {
|
|
1669
|
+
return this.integrations.getConnectionStatus({
|
|
1670
|
+
userId,
|
|
1671
|
+
appName,
|
|
1672
|
+
provider: providerOrOptions
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1675
|
+
return this.integrations.getConnectionStatus({
|
|
1676
|
+
userId,
|
|
1677
|
+
appName,
|
|
1678
|
+
provider: providerOrOptions?.provider,
|
|
1679
|
+
includeEnabled: providerOrOptions?.includeEnabled
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
async getConnectionsBatch(params) {
|
|
1683
|
+
return this.integrations.getConnectionsBatch({
|
|
1684
|
+
userId: params.userId,
|
|
1685
|
+
appNames: params.appNames,
|
|
1686
|
+
provider: params.provider,
|
|
1687
|
+
includeEnabledStatus: params.includeEnabledStatus
|
|
1688
|
+
});
|
|
1365
1689
|
}
|
|
1366
1690
|
async listConnections(userId, params) {
|
|
1367
1691
|
return this.integrations.listConnections(userId, params);
|
|
@@ -1466,6 +1790,76 @@ var ProviderType = /* @__PURE__ */ ((ProviderType2) => {
|
|
|
1466
1790
|
return ProviderType2;
|
|
1467
1791
|
})(ProviderType || {});
|
|
1468
1792
|
|
|
1793
|
+
var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
|
|
1794
|
+
ChannelType2["GMAIL"] = "gmail";
|
|
1795
|
+
ChannelType2["OUTLOOK"] = "outlook";
|
|
1796
|
+
ChannelType2["LINKEDIN"] = "linkedin";
|
|
1797
|
+
return ChannelType2;
|
|
1798
|
+
})(ChannelType || {});
|
|
1799
|
+
var OutreachMethod = /* @__PURE__ */ ((OutreachMethod2) => {
|
|
1800
|
+
OutreachMethod2["CONNECTION_REQUEST"] = "connection_request";
|
|
1801
|
+
OutreachMethod2["DIRECT_MESSAGE"] = "direct_message";
|
|
1802
|
+
OutreachMethod2["INMAIL"] = "inmail";
|
|
1803
|
+
OutreachMethod2["INMAIL_ESCALATION"] = "inmail_escalation";
|
|
1804
|
+
OutreachMethod2["EMAIL"] = "email";
|
|
1805
|
+
return OutreachMethod2;
|
|
1806
|
+
})(OutreachMethod || {});
|
|
1807
|
+
var ConversationStatus = /* @__PURE__ */ ((ConversationStatus2) => {
|
|
1808
|
+
ConversationStatus2["ACTIVE"] = "active";
|
|
1809
|
+
ConversationStatus2["NEEDS_RESPONSE"] = "needs_response";
|
|
1810
|
+
ConversationStatus2["WAITING"] = "waiting";
|
|
1811
|
+
ConversationStatus2["BOOKED"] = "booked";
|
|
1812
|
+
ConversationStatus2["CLOSED"] = "closed";
|
|
1813
|
+
return ConversationStatus2;
|
|
1814
|
+
})(ConversationStatus || {});
|
|
1815
|
+
var MessageType = /* @__PURE__ */ ((MessageType2) => {
|
|
1816
|
+
MessageType2["MESSAGE"] = "message";
|
|
1817
|
+
MessageType2["CONNECTION_REQUEST"] = "connection_request";
|
|
1818
|
+
MessageType2["CONNECTION_ACCEPTED"] = "connection_accepted";
|
|
1819
|
+
MessageType2["INMAIL"] = "inmail";
|
|
1820
|
+
return MessageType2;
|
|
1821
|
+
})(MessageType || {});
|
|
1822
|
+
var DraftStatus = /* @__PURE__ */ ((DraftStatus2) => {
|
|
1823
|
+
DraftStatus2["PENDING_REVIEW"] = "pending_review";
|
|
1824
|
+
DraftStatus2["APPROVED"] = "approved";
|
|
1825
|
+
DraftStatus2["SCHEDULED"] = "scheduled";
|
|
1826
|
+
DraftStatus2["SENDING"] = "sending";
|
|
1827
|
+
DraftStatus2["SENT"] = "sent";
|
|
1828
|
+
DraftStatus2["FAILED"] = "failed";
|
|
1829
|
+
DraftStatus2["DISCARDED"] = "discarded";
|
|
1830
|
+
return DraftStatus2;
|
|
1831
|
+
})(DraftStatus || {});
|
|
1832
|
+
var SyncJobStatus = /* @__PURE__ */ ((SyncJobStatus2) => {
|
|
1833
|
+
SyncJobStatus2["QUEUED"] = "queued";
|
|
1834
|
+
SyncJobStatus2["IN_PROGRESS"] = "in_progress";
|
|
1835
|
+
SyncJobStatus2["COMPLETED"] = "completed";
|
|
1836
|
+
SyncJobStatus2["FAILED"] = "failed";
|
|
1837
|
+
return SyncJobStatus2;
|
|
1838
|
+
})(SyncJobStatus || {});
|
|
1839
|
+
var QueueItemStatus = /* @__PURE__ */ ((QueueItemStatus2) => {
|
|
1840
|
+
QueueItemStatus2["QUEUED"] = "queued";
|
|
1841
|
+
QueueItemStatus2["PROCESSING"] = "processing";
|
|
1842
|
+
QueueItemStatus2["COMPLETED"] = "completed";
|
|
1843
|
+
QueueItemStatus2["FAILED"] = "failed";
|
|
1844
|
+
QueueItemStatus2["CANCELLED"] = "cancelled";
|
|
1845
|
+
return QueueItemStatus2;
|
|
1846
|
+
})(QueueItemStatus || {});
|
|
1847
|
+
var LinkedInSubscriptionType = /* @__PURE__ */ ((LinkedInSubscriptionType2) => {
|
|
1848
|
+
LinkedInSubscriptionType2["BASIC"] = "basic";
|
|
1849
|
+
LinkedInSubscriptionType2["PREMIUM"] = "premium";
|
|
1850
|
+
LinkedInSubscriptionType2["SALES_NAVIGATOR"] = "sales_navigator";
|
|
1851
|
+
LinkedInSubscriptionType2["RECRUITER_LITE"] = "recruiter_lite";
|
|
1852
|
+
LinkedInSubscriptionType2["RECRUITER_CORPORATE"] = "recruiter_corporate";
|
|
1853
|
+
return LinkedInSubscriptionType2;
|
|
1854
|
+
})(LinkedInSubscriptionType || {});
|
|
1855
|
+
var NetworkDistance = /* @__PURE__ */ ((NetworkDistance2) => {
|
|
1856
|
+
NetworkDistance2["FIRST_DEGREE"] = "FIRST_DEGREE";
|
|
1857
|
+
NetworkDistance2["SECOND_DEGREE"] = "SECOND_DEGREE";
|
|
1858
|
+
NetworkDistance2["THIRD_DEGREE"] = "THIRD_DEGREE";
|
|
1859
|
+
NetworkDistance2["OUT_OF_NETWORK"] = "OUT_OF_NETWORK";
|
|
1860
|
+
return NetworkDistance2;
|
|
1861
|
+
})(NetworkDistance || {});
|
|
1862
|
+
|
|
1469
1863
|
function displayProgress(update, indent = " ") {
|
|
1470
1864
|
if (update.state === "tool_update") {
|
|
1471
1865
|
if (update.toolCalls && update.toolCalls.length > 0) {
|
|
@@ -1561,19 +1955,48 @@ class ProgressTracker {
|
|
|
1561
1955
|
}
|
|
1562
1956
|
}
|
|
1563
1957
|
|
|
1958
|
+
function verifyWebhookSignature(payload, signature, secret) {
|
|
1959
|
+
if (!signature || !secret) {
|
|
1960
|
+
return false;
|
|
1961
|
+
}
|
|
1962
|
+
const expectedSignature = crypto__default.createHmac("sha256", secret).update(payload).digest("hex");
|
|
1963
|
+
if (signature.length !== expectedSignature.length) {
|
|
1964
|
+
return false;
|
|
1965
|
+
}
|
|
1966
|
+
return crypto__default.timingSafeEqual(
|
|
1967
|
+
node_buffer.Buffer.from(signature),
|
|
1968
|
+
node_buffer.Buffer.from(expectedSignature)
|
|
1969
|
+
);
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1564
1972
|
exports.AuthenticationError = AuthenticationError;
|
|
1973
|
+
exports.ChannelType = ChannelType;
|
|
1974
|
+
exports.ConversationStatus = ConversationStatus;
|
|
1975
|
+
exports.DraftStatus = DraftStatus;
|
|
1565
1976
|
exports.InternalServerError = InternalServerError;
|
|
1977
|
+
exports.LinkedInSubscriptionType = LinkedInSubscriptionType;
|
|
1566
1978
|
exports.LocalFileNotSupportedError = LocalFileNotSupportedError;
|
|
1567
1979
|
exports.LumnisClient = LumnisClient;
|
|
1568
1980
|
exports.LumnisError = LumnisError;
|
|
1981
|
+
exports.MessageType = MessageType;
|
|
1982
|
+
exports.MessagingAPIError = MessagingAPIError;
|
|
1983
|
+
exports.MessagingConnectionError = MessagingConnectionError;
|
|
1984
|
+
exports.MessagingNotFoundError = MessagingNotFoundError;
|
|
1985
|
+
exports.MessagingSendError = MessagingSendError;
|
|
1986
|
+
exports.MessagingValidationError = MessagingValidationError;
|
|
1987
|
+
exports.NetworkDistance = NetworkDistance;
|
|
1569
1988
|
exports.NoDataSourcesError = NoDataSourcesError;
|
|
1570
1989
|
exports.NotFoundError = NotFoundError;
|
|
1990
|
+
exports.OutreachMethod = OutreachMethod;
|
|
1571
1991
|
exports.PeopleDataSource = PeopleDataSource;
|
|
1572
1992
|
exports.ProgressTracker = ProgressTracker;
|
|
1573
1993
|
exports.ProviderType = ProviderType;
|
|
1994
|
+
exports.QueueItemStatus = QueueItemStatus;
|
|
1574
1995
|
exports.RateLimitError = RateLimitError;
|
|
1575
1996
|
exports.SourcesNotAvailableError = SourcesNotAvailableError;
|
|
1997
|
+
exports.SyncJobStatus = SyncJobStatus;
|
|
1576
1998
|
exports.ValidationError = ValidationError;
|
|
1577
1999
|
exports.default = LumnisClient;
|
|
1578
2000
|
exports.displayProgress = displayProgress;
|
|
1579
2001
|
exports.formatProgressEntry = formatProgressEntry;
|
|
2002
|
+
exports.verifyWebhookSignature = verifyWebhookSignature;
|