n8n-nodes-linq 0.1.11 → 0.1.12
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/nodes/Linq/Linq.node.js +29 -25
- package/package.json +1 -1
|
@@ -442,9 +442,13 @@ class Linq {
|
|
|
442
442
|
if (resource === 'chat') {
|
|
443
443
|
if (operation === 'getAll') {
|
|
444
444
|
const phoneNumber = this.getNodeParameter('phoneNumber', i, '');
|
|
445
|
-
const page = this.getNodeParameter('page', i
|
|
446
|
-
const perPage = this.getNodeParameter('perPage', i
|
|
447
|
-
const qs = {
|
|
445
|
+
const page = this.getNodeParameter('page', i);
|
|
446
|
+
const perPage = this.getNodeParameter('perPage', i);
|
|
447
|
+
const qs = {};
|
|
448
|
+
if (page && page !== 1)
|
|
449
|
+
qs.page = page;
|
|
450
|
+
if (perPage && perPage !== 25)
|
|
451
|
+
qs.per_page = perPage;
|
|
448
452
|
if (phoneNumber)
|
|
449
453
|
qs.phone_number = phoneNumber;
|
|
450
454
|
responseData = await this.helpers.request({
|
|
@@ -453,7 +457,7 @@ class Linq {
|
|
|
453
457
|
qs,
|
|
454
458
|
headers: {
|
|
455
459
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
456
|
-
'Accept': 'application/
|
|
460
|
+
'Accept': 'application/json'
|
|
457
461
|
},
|
|
458
462
|
json: true,
|
|
459
463
|
});
|
|
@@ -465,7 +469,7 @@ class Linq {
|
|
|
465
469
|
url: `https://api.linqapp.com/api/partner/v2/chats/${chatId}`,
|
|
466
470
|
headers: {
|
|
467
471
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
468
|
-
'Accept': 'application/
|
|
472
|
+
'Accept': 'application/json'
|
|
469
473
|
},
|
|
470
474
|
json: true,
|
|
471
475
|
});
|
|
@@ -483,7 +487,7 @@ class Linq {
|
|
|
483
487
|
qs,
|
|
484
488
|
headers: {
|
|
485
489
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
486
|
-
'Accept': 'application/
|
|
490
|
+
'Accept': 'application/json'
|
|
487
491
|
},
|
|
488
492
|
json: true,
|
|
489
493
|
});
|
|
@@ -526,7 +530,7 @@ class Linq {
|
|
|
526
530
|
headers: {
|
|
527
531
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
528
532
|
'Content-Type': 'application/json',
|
|
529
|
-
'Accept': 'application/
|
|
533
|
+
'Accept': 'application/json'
|
|
530
534
|
},
|
|
531
535
|
json: true,
|
|
532
536
|
});
|
|
@@ -542,7 +546,7 @@ class Linq {
|
|
|
542
546
|
qs: { chat_id: chatId },
|
|
543
547
|
headers: {
|
|
544
548
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
545
|
-
'Accept': 'application/
|
|
549
|
+
'Accept': 'application/json'
|
|
546
550
|
},
|
|
547
551
|
json: true,
|
|
548
552
|
});
|
|
@@ -554,7 +558,7 @@ class Linq {
|
|
|
554
558
|
url: `https://api.linqapp.com/api/partner/v2/chat_messages/${chatMessageId}`,
|
|
555
559
|
headers: {
|
|
556
560
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
557
|
-
'Accept': 'application/
|
|
561
|
+
'Accept': 'application/json'
|
|
558
562
|
},
|
|
559
563
|
json: true,
|
|
560
564
|
});
|
|
@@ -572,7 +576,7 @@ class Linq {
|
|
|
572
576
|
headers: {
|
|
573
577
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
574
578
|
'Content-Type': 'application/json',
|
|
575
|
-
'Accept': 'application/
|
|
579
|
+
'Accept': 'application/json'
|
|
576
580
|
},
|
|
577
581
|
body: body,
|
|
578
582
|
json: true,
|
|
@@ -585,7 +589,7 @@ class Linq {
|
|
|
585
589
|
url: `https://api.linqapp.com/api/partner/v2/chat_messages/${chatMessageId}`,
|
|
586
590
|
headers: {
|
|
587
591
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
588
|
-
'Accept': 'application/
|
|
592
|
+
'Accept': 'application/json'
|
|
589
593
|
},
|
|
590
594
|
json: true,
|
|
591
595
|
});
|
|
@@ -602,7 +606,7 @@ class Linq {
|
|
|
602
606
|
headers: {
|
|
603
607
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
604
608
|
'Content-Type': 'application/json',
|
|
605
|
-
'Accept': 'application/
|
|
609
|
+
'Accept': 'application/json'
|
|
606
610
|
},
|
|
607
611
|
body: body,
|
|
608
612
|
json: true,
|
|
@@ -620,7 +624,7 @@ class Linq {
|
|
|
620
624
|
headers: {
|
|
621
625
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
622
626
|
'Content-Type': 'application/json',
|
|
623
|
-
'Accept': 'application/
|
|
627
|
+
'Accept': 'application/json'
|
|
624
628
|
},
|
|
625
629
|
body: body,
|
|
626
630
|
json: true,
|
|
@@ -633,7 +637,7 @@ class Linq {
|
|
|
633
637
|
url: `https://api.linqapp.com/api/partner/v2/chat_messages/${chatMessageId}/reaction`,
|
|
634
638
|
headers: {
|
|
635
639
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
636
|
-
'Accept': 'application/
|
|
640
|
+
'Accept': 'application/json'
|
|
637
641
|
},
|
|
638
642
|
json: true,
|
|
639
643
|
});
|
|
@@ -647,7 +651,7 @@ class Linq {
|
|
|
647
651
|
url: 'https://api.linqapp.com/api/partner/v2/phone_numbers',
|
|
648
652
|
headers: {
|
|
649
653
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
650
|
-
'Accept': 'application/
|
|
654
|
+
'Accept': 'application/json'
|
|
651
655
|
},
|
|
652
656
|
json: true,
|
|
653
657
|
});
|
|
@@ -663,7 +667,7 @@ class Linq {
|
|
|
663
667
|
headers: {
|
|
664
668
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
665
669
|
'Content-Type': 'application/json',
|
|
666
|
-
'Accept': 'application/
|
|
670
|
+
'Accept': 'application/json'
|
|
667
671
|
},
|
|
668
672
|
body: body,
|
|
669
673
|
json: true,
|
|
@@ -678,7 +682,7 @@ class Linq {
|
|
|
678
682
|
url: 'https://api.linqapp.com/api/partner/v2/webhook_subscriptions',
|
|
679
683
|
headers: {
|
|
680
684
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
681
|
-
'Accept': 'application/
|
|
685
|
+
'Accept': 'application/json'
|
|
682
686
|
},
|
|
683
687
|
json: true,
|
|
684
688
|
});
|
|
@@ -690,7 +694,7 @@ class Linq {
|
|
|
690
694
|
url: `https://api.linqapp.com/api/partner/v2/webhook_subscriptions/${webhookSubscriptionId}`,
|
|
691
695
|
headers: {
|
|
692
696
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
693
|
-
'Accept': 'application/
|
|
697
|
+
'Accept': 'application/json'
|
|
694
698
|
},
|
|
695
699
|
json: true,
|
|
696
700
|
});
|
|
@@ -714,7 +718,7 @@ class Linq {
|
|
|
714
718
|
headers: {
|
|
715
719
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
716
720
|
'Content-Type': 'application/json',
|
|
717
|
-
'Accept': 'application/
|
|
721
|
+
'Accept': 'application/json'
|
|
718
722
|
},
|
|
719
723
|
body: body,
|
|
720
724
|
json: true,
|
|
@@ -742,7 +746,7 @@ class Linq {
|
|
|
742
746
|
headers: {
|
|
743
747
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
744
748
|
'Content-Type': 'application/json',
|
|
745
|
-
'Accept': 'application/
|
|
749
|
+
'Accept': 'application/json'
|
|
746
750
|
},
|
|
747
751
|
body: body,
|
|
748
752
|
json: true,
|
|
@@ -755,7 +759,7 @@ class Linq {
|
|
|
755
759
|
url: `https://api.linqapp.com/api/partner/v2/webhook_subscriptions/${webhookSubscriptionId}`,
|
|
756
760
|
headers: {
|
|
757
761
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
758
|
-
'Accept': 'application/
|
|
762
|
+
'Accept': 'application/json'
|
|
759
763
|
},
|
|
760
764
|
json: true,
|
|
761
765
|
});
|
|
@@ -794,7 +798,7 @@ class Linq {
|
|
|
794
798
|
headers: {
|
|
795
799
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
796
800
|
'Content-Type': 'application/json',
|
|
797
|
-
'Accept': 'application/
|
|
801
|
+
'Accept': 'application/json'
|
|
798
802
|
},
|
|
799
803
|
body: body,
|
|
800
804
|
json: true,
|
|
@@ -807,7 +811,7 @@ class Linq {
|
|
|
807
811
|
url: `https://api.linqapp.com/api/partner/v2/contacts/${contactId}`,
|
|
808
812
|
headers: {
|
|
809
813
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
810
|
-
'Accept': 'application/
|
|
814
|
+
'Accept': 'application/json'
|
|
811
815
|
},
|
|
812
816
|
json: true,
|
|
813
817
|
});
|
|
@@ -844,7 +848,7 @@ class Linq {
|
|
|
844
848
|
headers: {
|
|
845
849
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
846
850
|
'Content-Type': 'application/json',
|
|
847
|
-
'Accept': 'application/
|
|
851
|
+
'Accept': 'application/json'
|
|
848
852
|
},
|
|
849
853
|
body: body,
|
|
850
854
|
json: true,
|
|
@@ -857,7 +861,7 @@ class Linq {
|
|
|
857
861
|
url: `https://api.linqapp.com/api/partner/v2/contacts/${contactId}`,
|
|
858
862
|
headers: {
|
|
859
863
|
'X-LINQ-INTEGRATION-TOKEN': credentials.integrationToken,
|
|
860
|
-
'Accept': 'application/
|
|
864
|
+
'Accept': 'application/json'
|
|
861
865
|
},
|
|
862
866
|
json: true,
|
|
863
867
|
});
|