@victorhalla/n8n-nodes-wwebjsapi 1.0.8 → 1.1.0
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.
|
@@ -1350,7 +1350,7 @@ class WWebjsApi {
|
|
|
1350
1350
|
required: false,
|
|
1351
1351
|
description: "The content of the message, can be a string or an object",
|
|
1352
1352
|
typeOptions: { rows: 2 },
|
|
1353
|
-
hint: "
|
|
1353
|
+
hint: "Text message, or JSON object for media/location/contact",
|
|
1354
1354
|
displayOptions: { show: { resource: ["Client"], operation: ["postClientSendMessage"] } },
|
|
1355
1355
|
},
|
|
1356
1356
|
{
|
|
@@ -4119,7 +4119,7 @@ class WWebjsApi {
|
|
|
4119
4119
|
required: false,
|
|
4120
4120
|
description: "The content of the message, can be a string or an object",
|
|
4121
4121
|
typeOptions: { rows: 2 },
|
|
4122
|
-
hint: "
|
|
4122
|
+
hint: "Text message, or JSON object for media/location/contact",
|
|
4123
4123
|
displayOptions: { show: { resource: ["Message"], operation: ["postMessageReply"] } },
|
|
4124
4124
|
},
|
|
4125
4125
|
{
|
|
@@ -4832,7 +4832,7 @@ class WWebjsApi {
|
|
|
4832
4832
|
required: false,
|
|
4833
4833
|
description: "The content of the message, can be a string or an object",
|
|
4834
4834
|
typeOptions: { rows: 2 },
|
|
4835
|
-
hint: "
|
|
4835
|
+
hint: "Text message, or JSON object for media/location/contact",
|
|
4836
4836
|
displayOptions: { show: { resource: ["ChannelChat"], operation: ["postChannelSendMessage"] } },
|
|
4837
4837
|
},
|
|
4838
4838
|
{
|
|
@@ -5523,9 +5523,9 @@ class WWebjsApi {
|
|
|
5523
5523
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5524
5524
|
},
|
|
5525
5525
|
returnFullResponse: false,
|
|
5526
|
-
json:
|
|
5526
|
+
json: false,
|
|
5527
5527
|
};
|
|
5528
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5528
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5529
5529
|
break;
|
|
5530
5530
|
}
|
|
5531
5531
|
case "postChannelSendMessage": {
|
|
@@ -5539,11 +5539,11 @@ class WWebjsApi {
|
|
|
5539
5539
|
body: {
|
|
5540
5540
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5541
5541
|
contentType: this.getNodeParameter("body_contentType", i),
|
|
5542
|
-
content: (() => { try {
|
|
5543
|
-
return JSON.parse(
|
|
5542
|
+
content: (() => { const v = this.getNodeParameter("body_content", i); try {
|
|
5543
|
+
return JSON.parse(v);
|
|
5544
5544
|
}
|
|
5545
5545
|
catch {
|
|
5546
|
-
return
|
|
5546
|
+
return v;
|
|
5547
5547
|
} })(),
|
|
5548
5548
|
options: (() => { try {
|
|
5549
5549
|
return JSON.parse(this.getNodeParameter("body_options", i));
|
|
@@ -5553,9 +5553,9 @@ class WWebjsApi {
|
|
|
5553
5553
|
} })(),
|
|
5554
5554
|
},
|
|
5555
5555
|
returnFullResponse: false,
|
|
5556
|
-
json:
|
|
5556
|
+
json: false,
|
|
5557
5557
|
};
|
|
5558
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5558
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5559
5559
|
break;
|
|
5560
5560
|
}
|
|
5561
5561
|
case "postChannelFetchMessages": {
|
|
@@ -5576,9 +5576,9 @@ class WWebjsApi {
|
|
|
5576
5576
|
} })(),
|
|
5577
5577
|
},
|
|
5578
5578
|
returnFullResponse: false,
|
|
5579
|
-
json:
|
|
5579
|
+
json: false,
|
|
5580
5580
|
};
|
|
5581
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5581
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5582
5582
|
break;
|
|
5583
5583
|
}
|
|
5584
5584
|
case "postChannelSendSeen": {
|
|
@@ -5593,9 +5593,9 @@ class WWebjsApi {
|
|
|
5593
5593
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5594
5594
|
},
|
|
5595
5595
|
returnFullResponse: false,
|
|
5596
|
-
json:
|
|
5596
|
+
json: false,
|
|
5597
5597
|
};
|
|
5598
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5598
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5599
5599
|
break;
|
|
5600
5600
|
}
|
|
5601
5601
|
case "postChannelMute": {
|
|
@@ -5610,9 +5610,9 @@ class WWebjsApi {
|
|
|
5610
5610
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5611
5611
|
},
|
|
5612
5612
|
returnFullResponse: false,
|
|
5613
|
-
json:
|
|
5613
|
+
json: false,
|
|
5614
5614
|
};
|
|
5615
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5615
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5616
5616
|
break;
|
|
5617
5617
|
}
|
|
5618
5618
|
case "postChannelUnmute": {
|
|
@@ -5627,9 +5627,9 @@ class WWebjsApi {
|
|
|
5627
5627
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5628
5628
|
},
|
|
5629
5629
|
returnFullResponse: false,
|
|
5630
|
-
json:
|
|
5630
|
+
json: false,
|
|
5631
5631
|
};
|
|
5632
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5632
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5633
5633
|
break;
|
|
5634
5634
|
}
|
|
5635
5635
|
case "postChannelAcceptChannelAdminInvite": {
|
|
@@ -5644,9 +5644,9 @@ class WWebjsApi {
|
|
|
5644
5644
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5645
5645
|
},
|
|
5646
5646
|
returnFullResponse: false,
|
|
5647
|
-
json:
|
|
5647
|
+
json: false,
|
|
5648
5648
|
};
|
|
5649
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5649
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5650
5650
|
break;
|
|
5651
5651
|
}
|
|
5652
5652
|
case "postChannelSendChannelAdminInvite": {
|
|
@@ -5668,9 +5668,9 @@ class WWebjsApi {
|
|
|
5668
5668
|
} })(),
|
|
5669
5669
|
},
|
|
5670
5670
|
returnFullResponse: false,
|
|
5671
|
-
json:
|
|
5671
|
+
json: false,
|
|
5672
5672
|
};
|
|
5673
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5673
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5674
5674
|
break;
|
|
5675
5675
|
}
|
|
5676
5676
|
case "postChannelRevokeChannelAdminInvite": {
|
|
@@ -5686,9 +5686,9 @@ class WWebjsApi {
|
|
|
5686
5686
|
userId: this.getNodeParameter("body_userId", i),
|
|
5687
5687
|
},
|
|
5688
5688
|
returnFullResponse: false,
|
|
5689
|
-
json:
|
|
5689
|
+
json: false,
|
|
5690
5690
|
};
|
|
5691
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5691
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5692
5692
|
break;
|
|
5693
5693
|
}
|
|
5694
5694
|
case "postChannelTransferChannelOwnership": {
|
|
@@ -5710,9 +5710,9 @@ class WWebjsApi {
|
|
|
5710
5710
|
} })(),
|
|
5711
5711
|
},
|
|
5712
5712
|
returnFullResponse: false,
|
|
5713
|
-
json:
|
|
5713
|
+
json: false,
|
|
5714
5714
|
};
|
|
5715
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5715
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5716
5716
|
break;
|
|
5717
5717
|
}
|
|
5718
5718
|
case "postChannelDemoteChannelAdmin": {
|
|
@@ -5728,9 +5728,9 @@ class WWebjsApi {
|
|
|
5728
5728
|
userId: this.getNodeParameter("body_userId", i),
|
|
5729
5729
|
},
|
|
5730
5730
|
returnFullResponse: false,
|
|
5731
|
-
json:
|
|
5731
|
+
json: false,
|
|
5732
5732
|
};
|
|
5733
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5733
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5734
5734
|
break;
|
|
5735
5735
|
}
|
|
5736
5736
|
case "postChannelGetSubscribers": {
|
|
@@ -5746,9 +5746,9 @@ class WWebjsApi {
|
|
|
5746
5746
|
limit: this.getNodeParameter("body_limit", i),
|
|
5747
5747
|
},
|
|
5748
5748
|
returnFullResponse: false,
|
|
5749
|
-
json:
|
|
5749
|
+
json: false,
|
|
5750
5750
|
};
|
|
5751
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5751
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5752
5752
|
break;
|
|
5753
5753
|
}
|
|
5754
5754
|
case "postChannelSetProfilePicture": {
|
|
@@ -5770,9 +5770,9 @@ class WWebjsApi {
|
|
|
5770
5770
|
} })(),
|
|
5771
5771
|
},
|
|
5772
5772
|
returnFullResponse: false,
|
|
5773
|
-
json:
|
|
5773
|
+
json: false,
|
|
5774
5774
|
};
|
|
5775
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5775
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5776
5776
|
break;
|
|
5777
5777
|
}
|
|
5778
5778
|
case "postChannelSetDescription": {
|
|
@@ -5788,9 +5788,9 @@ class WWebjsApi {
|
|
|
5788
5788
|
newDescription: this.getNodeParameter("body_newDescription", i),
|
|
5789
5789
|
},
|
|
5790
5790
|
returnFullResponse: false,
|
|
5791
|
-
json:
|
|
5791
|
+
json: false,
|
|
5792
5792
|
};
|
|
5793
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5793
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5794
5794
|
break;
|
|
5795
5795
|
}
|
|
5796
5796
|
case "postChannelSetSubject": {
|
|
@@ -5806,9 +5806,9 @@ class WWebjsApi {
|
|
|
5806
5806
|
newSubject: this.getNodeParameter("body_newSubject", i),
|
|
5807
5807
|
},
|
|
5808
5808
|
returnFullResponse: false,
|
|
5809
|
-
json:
|
|
5809
|
+
json: false,
|
|
5810
5810
|
};
|
|
5811
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5811
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5812
5812
|
break;
|
|
5813
5813
|
}
|
|
5814
5814
|
case "postChannelSetReactionSetting": {
|
|
@@ -5824,9 +5824,9 @@ class WWebjsApi {
|
|
|
5824
5824
|
reactionCode: this.getNodeParameter("body_reactionCode", i),
|
|
5825
5825
|
},
|
|
5826
5826
|
returnFullResponse: false,
|
|
5827
|
-
json:
|
|
5827
|
+
json: false,
|
|
5828
5828
|
};
|
|
5829
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5829
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5830
5830
|
break;
|
|
5831
5831
|
}
|
|
5832
5832
|
case "postChannelDeleteChannel": {
|
|
@@ -5841,9 +5841,9 @@ class WWebjsApi {
|
|
|
5841
5841
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5842
5842
|
},
|
|
5843
5843
|
returnFullResponse: false,
|
|
5844
|
-
json:
|
|
5844
|
+
json: false,
|
|
5845
5845
|
};
|
|
5846
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5846
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5847
5847
|
break;
|
|
5848
5848
|
}
|
|
5849
5849
|
default:
|
|
@@ -5865,9 +5865,9 @@ class WWebjsApi {
|
|
|
5865
5865
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5866
5866
|
},
|
|
5867
5867
|
returnFullResponse: false,
|
|
5868
|
-
json:
|
|
5868
|
+
json: false,
|
|
5869
5869
|
};
|
|
5870
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5870
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5871
5871
|
break;
|
|
5872
5872
|
}
|
|
5873
5873
|
case "postChatClearMessages": {
|
|
@@ -5882,9 +5882,9 @@ class WWebjsApi {
|
|
|
5882
5882
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5883
5883
|
},
|
|
5884
5884
|
returnFullResponse: false,
|
|
5885
|
-
json:
|
|
5885
|
+
json: false,
|
|
5886
5886
|
};
|
|
5887
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5887
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5888
5888
|
break;
|
|
5889
5889
|
}
|
|
5890
5890
|
case "postChatClearState": {
|
|
@@ -5899,9 +5899,9 @@ class WWebjsApi {
|
|
|
5899
5899
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5900
5900
|
},
|
|
5901
5901
|
returnFullResponse: false,
|
|
5902
|
-
json:
|
|
5902
|
+
json: false,
|
|
5903
5903
|
};
|
|
5904
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5904
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5905
5905
|
break;
|
|
5906
5906
|
}
|
|
5907
5907
|
case "postChatDelete": {
|
|
@@ -5916,9 +5916,9 @@ class WWebjsApi {
|
|
|
5916
5916
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5917
5917
|
},
|
|
5918
5918
|
returnFullResponse: false,
|
|
5919
|
-
json:
|
|
5919
|
+
json: false,
|
|
5920
5920
|
};
|
|
5921
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5921
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5922
5922
|
break;
|
|
5923
5923
|
}
|
|
5924
5924
|
case "postChatFetchMessages": {
|
|
@@ -5939,9 +5939,9 @@ class WWebjsApi {
|
|
|
5939
5939
|
} })(),
|
|
5940
5940
|
},
|
|
5941
5941
|
returnFullResponse: false,
|
|
5942
|
-
json:
|
|
5942
|
+
json: false,
|
|
5943
5943
|
};
|
|
5944
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5944
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5945
5945
|
break;
|
|
5946
5946
|
}
|
|
5947
5947
|
case "postChatGetContact": {
|
|
@@ -5956,9 +5956,9 @@ class WWebjsApi {
|
|
|
5956
5956
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5957
5957
|
},
|
|
5958
5958
|
returnFullResponse: false,
|
|
5959
|
-
json:
|
|
5959
|
+
json: false,
|
|
5960
5960
|
};
|
|
5961
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5961
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5962
5962
|
break;
|
|
5963
5963
|
}
|
|
5964
5964
|
case "postChatSendStateRecording": {
|
|
@@ -5973,9 +5973,9 @@ class WWebjsApi {
|
|
|
5973
5973
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5974
5974
|
},
|
|
5975
5975
|
returnFullResponse: false,
|
|
5976
|
-
json:
|
|
5976
|
+
json: false,
|
|
5977
5977
|
};
|
|
5978
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5978
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5979
5979
|
break;
|
|
5980
5980
|
}
|
|
5981
5981
|
case "postChatSendStateTyping": {
|
|
@@ -5990,9 +5990,9 @@ class WWebjsApi {
|
|
|
5990
5990
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
5991
5991
|
},
|
|
5992
5992
|
returnFullResponse: false,
|
|
5993
|
-
json:
|
|
5993
|
+
json: false,
|
|
5994
5994
|
};
|
|
5995
|
-
responseData = await this.helpers.httpRequest(options);
|
|
5995
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
5996
5996
|
break;
|
|
5997
5997
|
}
|
|
5998
5998
|
case "postChatSendSeen": {
|
|
@@ -6007,9 +6007,9 @@ class WWebjsApi {
|
|
|
6007
6007
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6008
6008
|
},
|
|
6009
6009
|
returnFullResponse: false,
|
|
6010
|
-
json:
|
|
6010
|
+
json: false,
|
|
6011
6011
|
};
|
|
6012
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6012
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6013
6013
|
break;
|
|
6014
6014
|
}
|
|
6015
6015
|
case "postChatMarkUnread": {
|
|
@@ -6024,9 +6024,9 @@ class WWebjsApi {
|
|
|
6024
6024
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6025
6025
|
},
|
|
6026
6026
|
returnFullResponse: false,
|
|
6027
|
-
json:
|
|
6027
|
+
json: false,
|
|
6028
6028
|
};
|
|
6029
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6029
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6030
6030
|
break;
|
|
6031
6031
|
}
|
|
6032
6032
|
case "postChatSyncHistory": {
|
|
@@ -6041,9 +6041,9 @@ class WWebjsApi {
|
|
|
6041
6041
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6042
6042
|
},
|
|
6043
6043
|
returnFullResponse: false,
|
|
6044
|
-
json:
|
|
6044
|
+
json: false,
|
|
6045
6045
|
};
|
|
6046
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6046
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6047
6047
|
break;
|
|
6048
6048
|
}
|
|
6049
6049
|
case "postChatGetLabels": {
|
|
@@ -6058,9 +6058,9 @@ class WWebjsApi {
|
|
|
6058
6058
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6059
6059
|
},
|
|
6060
6060
|
returnFullResponse: false,
|
|
6061
|
-
json:
|
|
6061
|
+
json: false,
|
|
6062
6062
|
};
|
|
6063
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6063
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6064
6064
|
break;
|
|
6065
6065
|
}
|
|
6066
6066
|
case "postChatChangeLabels": {
|
|
@@ -6081,9 +6081,9 @@ class WWebjsApi {
|
|
|
6081
6081
|
} })(),
|
|
6082
6082
|
},
|
|
6083
6083
|
returnFullResponse: false,
|
|
6084
|
-
json:
|
|
6084
|
+
json: false,
|
|
6085
6085
|
};
|
|
6086
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6086
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6087
6087
|
break;
|
|
6088
6088
|
}
|
|
6089
6089
|
case "postChatRunMethod": {
|
|
@@ -6100,9 +6100,9 @@ class WWebjsApi {
|
|
|
6100
6100
|
options: this.getNodeParameter("body_options", i),
|
|
6101
6101
|
},
|
|
6102
6102
|
returnFullResponse: false,
|
|
6103
|
-
json:
|
|
6103
|
+
json: false,
|
|
6104
6104
|
};
|
|
6105
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6105
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6106
6106
|
break;
|
|
6107
6107
|
}
|
|
6108
6108
|
default:
|
|
@@ -6121,9 +6121,9 @@ class WWebjsApi {
|
|
|
6121
6121
|
url: `${baseUrl}${endpoint}`,
|
|
6122
6122
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6123
6123
|
returnFullResponse: false,
|
|
6124
|
-
json:
|
|
6124
|
+
json: false,
|
|
6125
6125
|
};
|
|
6126
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6126
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6127
6127
|
break;
|
|
6128
6128
|
}
|
|
6129
6129
|
case "postClientAcceptInvite": {
|
|
@@ -6138,9 +6138,9 @@ class WWebjsApi {
|
|
|
6138
6138
|
inviteCode: this.getNodeParameter("body_inviteCode", i),
|
|
6139
6139
|
},
|
|
6140
6140
|
returnFullResponse: false,
|
|
6141
|
-
json:
|
|
6141
|
+
json: false,
|
|
6142
6142
|
};
|
|
6143
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6143
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6144
6144
|
break;
|
|
6145
6145
|
}
|
|
6146
6146
|
case "postClientArchiveChat": {
|
|
@@ -6155,9 +6155,9 @@ class WWebjsApi {
|
|
|
6155
6155
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6156
6156
|
},
|
|
6157
6157
|
returnFullResponse: false,
|
|
6158
|
-
json:
|
|
6158
|
+
json: false,
|
|
6159
6159
|
};
|
|
6160
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6160
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6161
6161
|
break;
|
|
6162
6162
|
}
|
|
6163
6163
|
case "postClientCreateGroup": {
|
|
@@ -6184,9 +6184,9 @@ class WWebjsApi {
|
|
|
6184
6184
|
} })(),
|
|
6185
6185
|
},
|
|
6186
6186
|
returnFullResponse: false,
|
|
6187
|
-
json:
|
|
6187
|
+
json: false,
|
|
6188
6188
|
};
|
|
6189
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6189
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6190
6190
|
break;
|
|
6191
6191
|
}
|
|
6192
6192
|
case "postClientGetBlockedContacts": {
|
|
@@ -6198,9 +6198,9 @@ class WWebjsApi {
|
|
|
6198
6198
|
url: `${baseUrl}${endpoint}`,
|
|
6199
6199
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6200
6200
|
returnFullResponse: false,
|
|
6201
|
-
json:
|
|
6201
|
+
json: false,
|
|
6202
6202
|
};
|
|
6203
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6203
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6204
6204
|
break;
|
|
6205
6205
|
}
|
|
6206
6206
|
case "postClientGetChatById": {
|
|
@@ -6215,9 +6215,9 @@ class WWebjsApi {
|
|
|
6215
6215
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6216
6216
|
},
|
|
6217
6217
|
returnFullResponse: false,
|
|
6218
|
-
json:
|
|
6218
|
+
json: false,
|
|
6219
6219
|
};
|
|
6220
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6220
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6221
6221
|
break;
|
|
6222
6222
|
}
|
|
6223
6223
|
case "postClientGetChatLabels": {
|
|
@@ -6232,9 +6232,9 @@ class WWebjsApi {
|
|
|
6232
6232
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6233
6233
|
},
|
|
6234
6234
|
returnFullResponse: false,
|
|
6235
|
-
json:
|
|
6235
|
+
json: false,
|
|
6236
6236
|
};
|
|
6237
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6237
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6238
6238
|
break;
|
|
6239
6239
|
}
|
|
6240
6240
|
case "getClientGetChats": {
|
|
@@ -6246,9 +6246,9 @@ class WWebjsApi {
|
|
|
6246
6246
|
url: `${baseUrl}${endpoint}`,
|
|
6247
6247
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6248
6248
|
returnFullResponse: false,
|
|
6249
|
-
json:
|
|
6249
|
+
json: false,
|
|
6250
6250
|
};
|
|
6251
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6251
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6252
6252
|
break;
|
|
6253
6253
|
}
|
|
6254
6254
|
case "postClientGetChats": {
|
|
@@ -6263,9 +6263,9 @@ class WWebjsApi {
|
|
|
6263
6263
|
searchOptions: this.getNodeParameter("body_searchOptions", i),
|
|
6264
6264
|
},
|
|
6265
6265
|
returnFullResponse: false,
|
|
6266
|
-
json:
|
|
6266
|
+
json: false,
|
|
6267
6267
|
};
|
|
6268
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6268
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6269
6269
|
break;
|
|
6270
6270
|
}
|
|
6271
6271
|
case "postClientGetChatsByLabelId": {
|
|
@@ -6280,9 +6280,9 @@ class WWebjsApi {
|
|
|
6280
6280
|
labelId: this.getNodeParameter("body_labelId", i),
|
|
6281
6281
|
},
|
|
6282
6282
|
returnFullResponse: false,
|
|
6283
|
-
json:
|
|
6283
|
+
json: false,
|
|
6284
6284
|
};
|
|
6285
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6285
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6286
6286
|
break;
|
|
6287
6287
|
}
|
|
6288
6288
|
case "postClientGetCommonGroups": {
|
|
@@ -6297,9 +6297,9 @@ class WWebjsApi {
|
|
|
6297
6297
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
6298
6298
|
},
|
|
6299
6299
|
returnFullResponse: false,
|
|
6300
|
-
json:
|
|
6300
|
+
json: false,
|
|
6301
6301
|
};
|
|
6302
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6302
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6303
6303
|
break;
|
|
6304
6304
|
}
|
|
6305
6305
|
case "postClientGetContactById": {
|
|
@@ -6314,9 +6314,9 @@ class WWebjsApi {
|
|
|
6314
6314
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
6315
6315
|
},
|
|
6316
6316
|
returnFullResponse: false,
|
|
6317
|
-
json:
|
|
6317
|
+
json: false,
|
|
6318
6318
|
};
|
|
6319
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6319
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6320
6320
|
break;
|
|
6321
6321
|
}
|
|
6322
6322
|
case "getClientGetContacts": {
|
|
@@ -6328,9 +6328,9 @@ class WWebjsApi {
|
|
|
6328
6328
|
url: `${baseUrl}${endpoint}`,
|
|
6329
6329
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6330
6330
|
returnFullResponse: false,
|
|
6331
|
-
json:
|
|
6331
|
+
json: false,
|
|
6332
6332
|
};
|
|
6333
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6333
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6334
6334
|
break;
|
|
6335
6335
|
}
|
|
6336
6336
|
case "postClientGetInviteInfo": {
|
|
@@ -6345,9 +6345,9 @@ class WWebjsApi {
|
|
|
6345
6345
|
displayName: this.getNodeParameter("body_displayName", i),
|
|
6346
6346
|
},
|
|
6347
6347
|
returnFullResponse: false,
|
|
6348
|
-
json:
|
|
6348
|
+
json: false,
|
|
6349
6349
|
};
|
|
6350
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6350
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6351
6351
|
break;
|
|
6352
6352
|
}
|
|
6353
6353
|
case "postClientGetLabelById": {
|
|
@@ -6362,9 +6362,9 @@ class WWebjsApi {
|
|
|
6362
6362
|
labelId: this.getNodeParameter("body_labelId", i),
|
|
6363
6363
|
},
|
|
6364
6364
|
returnFullResponse: false,
|
|
6365
|
-
json:
|
|
6365
|
+
json: false,
|
|
6366
6366
|
};
|
|
6367
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6367
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6368
6368
|
break;
|
|
6369
6369
|
}
|
|
6370
6370
|
case "postClientGetLabels": {
|
|
@@ -6376,9 +6376,9 @@ class WWebjsApi {
|
|
|
6376
6376
|
url: `${baseUrl}${endpoint}`,
|
|
6377
6377
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6378
6378
|
returnFullResponse: false,
|
|
6379
|
-
json:
|
|
6379
|
+
json: false,
|
|
6380
6380
|
};
|
|
6381
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6381
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6382
6382
|
break;
|
|
6383
6383
|
}
|
|
6384
6384
|
case "postClientAddOrRemoveLabels": {
|
|
@@ -6404,9 +6404,9 @@ class WWebjsApi {
|
|
|
6404
6404
|
} })(),
|
|
6405
6405
|
},
|
|
6406
6406
|
returnFullResponse: false,
|
|
6407
|
-
json:
|
|
6407
|
+
json: false,
|
|
6408
6408
|
};
|
|
6409
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6409
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6410
6410
|
break;
|
|
6411
6411
|
}
|
|
6412
6412
|
case "postClientGetNumberId": {
|
|
@@ -6421,9 +6421,9 @@ class WWebjsApi {
|
|
|
6421
6421
|
number: this.getNodeParameter("body_number", i),
|
|
6422
6422
|
},
|
|
6423
6423
|
returnFullResponse: false,
|
|
6424
|
-
json:
|
|
6424
|
+
json: false,
|
|
6425
6425
|
};
|
|
6426
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6426
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6427
6427
|
break;
|
|
6428
6428
|
}
|
|
6429
6429
|
case "postClientIsRegisteredUser": {
|
|
@@ -6438,9 +6438,9 @@ class WWebjsApi {
|
|
|
6438
6438
|
number: this.getNodeParameter("body_number", i),
|
|
6439
6439
|
},
|
|
6440
6440
|
returnFullResponse: false,
|
|
6441
|
-
json:
|
|
6441
|
+
json: false,
|
|
6442
6442
|
};
|
|
6443
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6443
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6444
6444
|
break;
|
|
6445
6445
|
}
|
|
6446
6446
|
case "postClientGetProfilePicUrl": {
|
|
@@ -6455,9 +6455,9 @@ class WWebjsApi {
|
|
|
6455
6455
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
6456
6456
|
},
|
|
6457
6457
|
returnFullResponse: false,
|
|
6458
|
-
json:
|
|
6458
|
+
json: false,
|
|
6459
6459
|
};
|
|
6460
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6460
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6461
6461
|
break;
|
|
6462
6462
|
}
|
|
6463
6463
|
case "getClientGetState": {
|
|
@@ -6469,9 +6469,9 @@ class WWebjsApi {
|
|
|
6469
6469
|
url: `${baseUrl}${endpoint}`,
|
|
6470
6470
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6471
6471
|
returnFullResponse: false,
|
|
6472
|
-
json:
|
|
6472
|
+
json: false,
|
|
6473
6473
|
};
|
|
6474
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6474
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6475
6475
|
break;
|
|
6476
6476
|
}
|
|
6477
6477
|
case "postClientMarkChatUnread": {
|
|
@@ -6486,9 +6486,9 @@ class WWebjsApi {
|
|
|
6486
6486
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6487
6487
|
},
|
|
6488
6488
|
returnFullResponse: false,
|
|
6489
|
-
json:
|
|
6489
|
+
json: false,
|
|
6490
6490
|
};
|
|
6491
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6491
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6492
6492
|
break;
|
|
6493
6493
|
}
|
|
6494
6494
|
case "postClientMuteChat": {
|
|
@@ -6504,9 +6504,9 @@ class WWebjsApi {
|
|
|
6504
6504
|
unmuteDate: this.getNodeParameter("body_unmuteDate", i),
|
|
6505
6505
|
},
|
|
6506
6506
|
returnFullResponse: false,
|
|
6507
|
-
json:
|
|
6507
|
+
json: false,
|
|
6508
6508
|
};
|
|
6509
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6509
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6510
6510
|
break;
|
|
6511
6511
|
}
|
|
6512
6512
|
case "postClientPinChat": {
|
|
@@ -6521,9 +6521,9 @@ class WWebjsApi {
|
|
|
6521
6521
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6522
6522
|
},
|
|
6523
6523
|
returnFullResponse: false,
|
|
6524
|
-
json:
|
|
6524
|
+
json: false,
|
|
6525
6525
|
};
|
|
6526
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6526
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6527
6527
|
break;
|
|
6528
6528
|
}
|
|
6529
6529
|
case "postClientSearchMessages": {
|
|
@@ -6544,9 +6544,9 @@ class WWebjsApi {
|
|
|
6544
6544
|
} })(),
|
|
6545
6545
|
},
|
|
6546
6546
|
returnFullResponse: false,
|
|
6547
|
-
json:
|
|
6547
|
+
json: false,
|
|
6548
6548
|
};
|
|
6549
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6549
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6550
6550
|
break;
|
|
6551
6551
|
}
|
|
6552
6552
|
case "postClientSendMessage": {
|
|
@@ -6560,11 +6560,11 @@ class WWebjsApi {
|
|
|
6560
6560
|
body: {
|
|
6561
6561
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6562
6562
|
contentType: this.getNodeParameter("body_contentType", i),
|
|
6563
|
-
content: (() => { try {
|
|
6564
|
-
return JSON.parse(
|
|
6563
|
+
content: (() => { const v = this.getNodeParameter("body_content", i); try {
|
|
6564
|
+
return JSON.parse(v);
|
|
6565
6565
|
}
|
|
6566
6566
|
catch {
|
|
6567
|
-
return
|
|
6567
|
+
return v;
|
|
6568
6568
|
} })(),
|
|
6569
6569
|
options: (() => { try {
|
|
6570
6570
|
return JSON.parse(this.getNodeParameter("body_options", i));
|
|
@@ -6574,9 +6574,9 @@ class WWebjsApi {
|
|
|
6574
6574
|
} })(),
|
|
6575
6575
|
},
|
|
6576
6576
|
returnFullResponse: false,
|
|
6577
|
-
json:
|
|
6577
|
+
json: false,
|
|
6578
6578
|
};
|
|
6579
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6579
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6580
6580
|
break;
|
|
6581
6581
|
}
|
|
6582
6582
|
case "postClientSendPresenceAvailable": {
|
|
@@ -6588,9 +6588,9 @@ class WWebjsApi {
|
|
|
6588
6588
|
url: `${baseUrl}${endpoint}`,
|
|
6589
6589
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6590
6590
|
returnFullResponse: false,
|
|
6591
|
-
json:
|
|
6591
|
+
json: false,
|
|
6592
6592
|
};
|
|
6593
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6593
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6594
6594
|
break;
|
|
6595
6595
|
}
|
|
6596
6596
|
case "postClientSendPresenceUnavailable": {
|
|
@@ -6602,9 +6602,9 @@ class WWebjsApi {
|
|
|
6602
6602
|
url: `${baseUrl}${endpoint}`,
|
|
6603
6603
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6604
6604
|
returnFullResponse: false,
|
|
6605
|
-
json:
|
|
6605
|
+
json: false,
|
|
6606
6606
|
};
|
|
6607
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6607
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6608
6608
|
break;
|
|
6609
6609
|
}
|
|
6610
6610
|
case "postClientSendSeen": {
|
|
@@ -6619,9 +6619,9 @@ class WWebjsApi {
|
|
|
6619
6619
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6620
6620
|
},
|
|
6621
6621
|
returnFullResponse: false,
|
|
6622
|
-
json:
|
|
6622
|
+
json: false,
|
|
6623
6623
|
};
|
|
6624
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6624
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6625
6625
|
break;
|
|
6626
6626
|
}
|
|
6627
6627
|
case "postClientSetDisplayName": {
|
|
@@ -6637,9 +6637,9 @@ class WWebjsApi {
|
|
|
6637
6637
|
pictureData: this.getNodeParameter("body_pictureData", i),
|
|
6638
6638
|
},
|
|
6639
6639
|
returnFullResponse: false,
|
|
6640
|
-
json:
|
|
6640
|
+
json: false,
|
|
6641
6641
|
};
|
|
6642
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6642
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6643
6643
|
break;
|
|
6644
6644
|
}
|
|
6645
6645
|
case "postClientSetProfilePicture": {
|
|
@@ -6655,9 +6655,9 @@ class WWebjsApi {
|
|
|
6655
6655
|
pictureData: this.getNodeParameter("body_pictureData", i),
|
|
6656
6656
|
},
|
|
6657
6657
|
returnFullResponse: false,
|
|
6658
|
-
json:
|
|
6658
|
+
json: false,
|
|
6659
6659
|
};
|
|
6660
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6660
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6661
6661
|
break;
|
|
6662
6662
|
}
|
|
6663
6663
|
case "postClientSetStatus": {
|
|
@@ -6672,9 +6672,9 @@ class WWebjsApi {
|
|
|
6672
6672
|
status: this.getNodeParameter("body_status", i),
|
|
6673
6673
|
},
|
|
6674
6674
|
returnFullResponse: false,
|
|
6675
|
-
json:
|
|
6675
|
+
json: false,
|
|
6676
6676
|
};
|
|
6677
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6677
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6678
6678
|
break;
|
|
6679
6679
|
}
|
|
6680
6680
|
case "postClientUnarchiveChat": {
|
|
@@ -6689,9 +6689,9 @@ class WWebjsApi {
|
|
|
6689
6689
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6690
6690
|
},
|
|
6691
6691
|
returnFullResponse: false,
|
|
6692
|
-
json:
|
|
6692
|
+
json: false,
|
|
6693
6693
|
};
|
|
6694
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6694
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6695
6695
|
break;
|
|
6696
6696
|
}
|
|
6697
6697
|
case "postClientUnmuteChat": {
|
|
@@ -6706,9 +6706,9 @@ class WWebjsApi {
|
|
|
6706
6706
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6707
6707
|
},
|
|
6708
6708
|
returnFullResponse: false,
|
|
6709
|
-
json:
|
|
6709
|
+
json: false,
|
|
6710
6710
|
};
|
|
6711
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6711
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6712
6712
|
break;
|
|
6713
6713
|
}
|
|
6714
6714
|
case "postClientUnpinChat": {
|
|
@@ -6723,9 +6723,9 @@ class WWebjsApi {
|
|
|
6723
6723
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6724
6724
|
},
|
|
6725
6725
|
returnFullResponse: false,
|
|
6726
|
-
json:
|
|
6726
|
+
json: false,
|
|
6727
6727
|
};
|
|
6728
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6728
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6729
6729
|
break;
|
|
6730
6730
|
}
|
|
6731
6731
|
case "getClientGetWWebVersion": {
|
|
@@ -6737,9 +6737,9 @@ class WWebjsApi {
|
|
|
6737
6737
|
url: `${baseUrl}${endpoint}`,
|
|
6738
6738
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6739
6739
|
returnFullResponse: false,
|
|
6740
|
-
json:
|
|
6740
|
+
json: false,
|
|
6741
6741
|
};
|
|
6742
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6742
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6743
6743
|
break;
|
|
6744
6744
|
}
|
|
6745
6745
|
case "deleteClientDeleteProfilePicture": {
|
|
@@ -6751,9 +6751,9 @@ class WWebjsApi {
|
|
|
6751
6751
|
url: `${baseUrl}${endpoint}`,
|
|
6752
6752
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6753
6753
|
returnFullResponse: false,
|
|
6754
|
-
json:
|
|
6754
|
+
json: false,
|
|
6755
6755
|
};
|
|
6756
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6756
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6757
6757
|
break;
|
|
6758
6758
|
}
|
|
6759
6759
|
case "postClientSetAutoDownloadAudio": {
|
|
@@ -6768,9 +6768,9 @@ class WWebjsApi {
|
|
|
6768
6768
|
flag: this.getNodeParameter("body_flag", i),
|
|
6769
6769
|
},
|
|
6770
6770
|
returnFullResponse: false,
|
|
6771
|
-
json:
|
|
6771
|
+
json: false,
|
|
6772
6772
|
};
|
|
6773
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6773
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6774
6774
|
break;
|
|
6775
6775
|
}
|
|
6776
6776
|
case "postClientSetAutoDownloadDocuments": {
|
|
@@ -6785,9 +6785,9 @@ class WWebjsApi {
|
|
|
6785
6785
|
flag: this.getNodeParameter("body_flag", i),
|
|
6786
6786
|
},
|
|
6787
6787
|
returnFullResponse: false,
|
|
6788
|
-
json:
|
|
6788
|
+
json: false,
|
|
6789
6789
|
};
|
|
6790
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6790
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6791
6791
|
break;
|
|
6792
6792
|
}
|
|
6793
6793
|
case "postClientSetAutoDownloadPhotos": {
|
|
@@ -6802,9 +6802,9 @@ class WWebjsApi {
|
|
|
6802
6802
|
flag: this.getNodeParameter("body_flag", i),
|
|
6803
6803
|
},
|
|
6804
6804
|
returnFullResponse: false,
|
|
6805
|
-
json:
|
|
6805
|
+
json: false,
|
|
6806
6806
|
};
|
|
6807
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6807
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6808
6808
|
break;
|
|
6809
6809
|
}
|
|
6810
6810
|
case "postClientSetAutoDownloadVideos": {
|
|
@@ -6819,9 +6819,9 @@ class WWebjsApi {
|
|
|
6819
6819
|
flag: this.getNodeParameter("body_flag", i),
|
|
6820
6820
|
},
|
|
6821
6821
|
returnFullResponse: false,
|
|
6822
|
-
json:
|
|
6822
|
+
json: false,
|
|
6823
6823
|
};
|
|
6824
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6824
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6825
6825
|
break;
|
|
6826
6826
|
}
|
|
6827
6827
|
case "postClientSyncHistory": {
|
|
@@ -6836,9 +6836,9 @@ class WWebjsApi {
|
|
|
6836
6836
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6837
6837
|
},
|
|
6838
6838
|
returnFullResponse: false,
|
|
6839
|
-
json:
|
|
6839
|
+
json: false,
|
|
6840
6840
|
};
|
|
6841
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6841
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6842
6842
|
break;
|
|
6843
6843
|
}
|
|
6844
6844
|
case "postClientGetContactDeviceCount": {
|
|
@@ -6853,9 +6853,9 @@ class WWebjsApi {
|
|
|
6853
6853
|
userId: this.getNodeParameter("body_userId", i),
|
|
6854
6854
|
},
|
|
6855
6855
|
returnFullResponse: false,
|
|
6856
|
-
json:
|
|
6856
|
+
json: false,
|
|
6857
6857
|
};
|
|
6858
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6858
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6859
6859
|
break;
|
|
6860
6860
|
}
|
|
6861
6861
|
case "postClientGetCountryCode": {
|
|
@@ -6870,9 +6870,9 @@ class WWebjsApi {
|
|
|
6870
6870
|
number: this.getNodeParameter("body_number", i),
|
|
6871
6871
|
},
|
|
6872
6872
|
returnFullResponse: false,
|
|
6873
|
-
json:
|
|
6873
|
+
json: false,
|
|
6874
6874
|
};
|
|
6875
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6875
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6876
6876
|
break;
|
|
6877
6877
|
}
|
|
6878
6878
|
case "postClientGetFormattedNumber": {
|
|
@@ -6887,9 +6887,9 @@ class WWebjsApi {
|
|
|
6887
6887
|
number: this.getNodeParameter("body_number", i),
|
|
6888
6888
|
},
|
|
6889
6889
|
returnFullResponse: false,
|
|
6890
|
-
json:
|
|
6890
|
+
json: false,
|
|
6891
6891
|
};
|
|
6892
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6892
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6893
6893
|
break;
|
|
6894
6894
|
}
|
|
6895
6895
|
case "postClientOpenChatWindow": {
|
|
@@ -6904,9 +6904,9 @@ class WWebjsApi {
|
|
|
6904
6904
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
6905
6905
|
},
|
|
6906
6906
|
returnFullResponse: false,
|
|
6907
|
-
json:
|
|
6907
|
+
json: false,
|
|
6908
6908
|
};
|
|
6909
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6909
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6910
6910
|
break;
|
|
6911
6911
|
}
|
|
6912
6912
|
case "postClientOpenChatWindowAt": {
|
|
@@ -6921,9 +6921,9 @@ class WWebjsApi {
|
|
|
6921
6921
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
6922
6922
|
},
|
|
6923
6923
|
returnFullResponse: false,
|
|
6924
|
-
json:
|
|
6924
|
+
json: false,
|
|
6925
6925
|
};
|
|
6926
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6926
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6927
6927
|
break;
|
|
6928
6928
|
}
|
|
6929
6929
|
case "postClientResetState": {
|
|
@@ -6935,9 +6935,9 @@ class WWebjsApi {
|
|
|
6935
6935
|
url: `${baseUrl}${endpoint}`,
|
|
6936
6936
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
6937
6937
|
returnFullResponse: false,
|
|
6938
|
-
json:
|
|
6938
|
+
json: false,
|
|
6939
6939
|
};
|
|
6940
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6940
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6941
6941
|
break;
|
|
6942
6942
|
}
|
|
6943
6943
|
case "postClientSetBackgroundSync": {
|
|
@@ -6952,9 +6952,9 @@ class WWebjsApi {
|
|
|
6952
6952
|
flag: this.getNodeParameter("body_flag", i),
|
|
6953
6953
|
},
|
|
6954
6954
|
returnFullResponse: false,
|
|
6955
|
-
json:
|
|
6955
|
+
json: false,
|
|
6956
6956
|
};
|
|
6957
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6957
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6958
6958
|
break;
|
|
6959
6959
|
}
|
|
6960
6960
|
case "postClientGetContactLidAndPhone": {
|
|
@@ -6974,9 +6974,9 @@ class WWebjsApi {
|
|
|
6974
6974
|
} })(),
|
|
6975
6975
|
},
|
|
6976
6976
|
returnFullResponse: false,
|
|
6977
|
-
json:
|
|
6977
|
+
json: false,
|
|
6978
6978
|
};
|
|
6979
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6979
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6980
6980
|
break;
|
|
6981
6981
|
}
|
|
6982
6982
|
case "postClientGetChannelByInviteCode": {
|
|
@@ -6991,9 +6991,9 @@ class WWebjsApi {
|
|
|
6991
6991
|
inviteCode: this.getNodeParameter("body_inviteCode", i),
|
|
6992
6992
|
},
|
|
6993
6993
|
returnFullResponse: false,
|
|
6994
|
-
json:
|
|
6994
|
+
json: false,
|
|
6995
6995
|
};
|
|
6996
|
-
responseData = await this.helpers.httpRequest(options);
|
|
6996
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
6997
6997
|
break;
|
|
6998
6998
|
}
|
|
6999
6999
|
case "getClientGetChannels": {
|
|
@@ -7005,9 +7005,9 @@ class WWebjsApi {
|
|
|
7005
7005
|
url: `${baseUrl}${endpoint}`,
|
|
7006
7006
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
7007
7007
|
returnFullResponse: false,
|
|
7008
|
-
json:
|
|
7008
|
+
json: false,
|
|
7009
7009
|
};
|
|
7010
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7010
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7011
7011
|
break;
|
|
7012
7012
|
}
|
|
7013
7013
|
case "postClientCreateChannel": {
|
|
@@ -7028,9 +7028,9 @@ class WWebjsApi {
|
|
|
7028
7028
|
} })(),
|
|
7029
7029
|
},
|
|
7030
7030
|
returnFullResponse: false,
|
|
7031
|
-
json:
|
|
7031
|
+
json: false,
|
|
7032
7032
|
};
|
|
7033
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7033
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7034
7034
|
break;
|
|
7035
7035
|
}
|
|
7036
7036
|
case "postClientSubscribeToChannel": {
|
|
@@ -7045,9 +7045,9 @@ class WWebjsApi {
|
|
|
7045
7045
|
channelId: this.getNodeParameter("body_channelId", i),
|
|
7046
7046
|
},
|
|
7047
7047
|
returnFullResponse: false,
|
|
7048
|
-
json:
|
|
7048
|
+
json: false,
|
|
7049
7049
|
};
|
|
7050
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7050
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7051
7051
|
break;
|
|
7052
7052
|
}
|
|
7053
7053
|
case "postClientUnsubscribeFromChannel": {
|
|
@@ -7068,9 +7068,9 @@ class WWebjsApi {
|
|
|
7068
7068
|
} })(),
|
|
7069
7069
|
},
|
|
7070
7070
|
returnFullResponse: false,
|
|
7071
|
-
json:
|
|
7071
|
+
json: false,
|
|
7072
7072
|
};
|
|
7073
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7073
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7074
7074
|
break;
|
|
7075
7075
|
}
|
|
7076
7076
|
case "postClientSearchChannels": {
|
|
@@ -7085,9 +7085,9 @@ class WWebjsApi {
|
|
|
7085
7085
|
searchOptions: this.getNodeParameter("body_searchOptions", i),
|
|
7086
7086
|
},
|
|
7087
7087
|
returnFullResponse: false,
|
|
7088
|
-
json:
|
|
7088
|
+
json: false,
|
|
7089
7089
|
};
|
|
7090
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7090
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7091
7091
|
break;
|
|
7092
7092
|
}
|
|
7093
7093
|
case "postClientRunMethod": {
|
|
@@ -7103,9 +7103,9 @@ class WWebjsApi {
|
|
|
7103
7103
|
options: this.getNodeParameter("body_options", i),
|
|
7104
7104
|
},
|
|
7105
7105
|
returnFullResponse: false,
|
|
7106
|
-
json:
|
|
7106
|
+
json: false,
|
|
7107
7107
|
};
|
|
7108
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7108
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7109
7109
|
break;
|
|
7110
7110
|
}
|
|
7111
7111
|
default:
|
|
@@ -7127,9 +7127,9 @@ class WWebjsApi {
|
|
|
7127
7127
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
7128
7128
|
},
|
|
7129
7129
|
returnFullResponse: false,
|
|
7130
|
-
json:
|
|
7130
|
+
json: false,
|
|
7131
7131
|
};
|
|
7132
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7132
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7133
7133
|
break;
|
|
7134
7134
|
}
|
|
7135
7135
|
case "postContactBlock": {
|
|
@@ -7144,9 +7144,9 @@ class WWebjsApi {
|
|
|
7144
7144
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
7145
7145
|
},
|
|
7146
7146
|
returnFullResponse: false,
|
|
7147
|
-
json:
|
|
7147
|
+
json: false,
|
|
7148
7148
|
};
|
|
7149
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7149
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7150
7150
|
break;
|
|
7151
7151
|
}
|
|
7152
7152
|
case "postContactGetAbout": {
|
|
@@ -7161,9 +7161,9 @@ class WWebjsApi {
|
|
|
7161
7161
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
7162
7162
|
},
|
|
7163
7163
|
returnFullResponse: false,
|
|
7164
|
-
json:
|
|
7164
|
+
json: false,
|
|
7165
7165
|
};
|
|
7166
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7166
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7167
7167
|
break;
|
|
7168
7168
|
}
|
|
7169
7169
|
case "postContactGetChat": {
|
|
@@ -7178,9 +7178,9 @@ class WWebjsApi {
|
|
|
7178
7178
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
7179
7179
|
},
|
|
7180
7180
|
returnFullResponse: false,
|
|
7181
|
-
json:
|
|
7181
|
+
json: false,
|
|
7182
7182
|
};
|
|
7183
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7183
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7184
7184
|
break;
|
|
7185
7185
|
}
|
|
7186
7186
|
case "postContactUnblock": {
|
|
@@ -7195,9 +7195,9 @@ class WWebjsApi {
|
|
|
7195
7195
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
7196
7196
|
},
|
|
7197
7197
|
returnFullResponse: false,
|
|
7198
|
-
json:
|
|
7198
|
+
json: false,
|
|
7199
7199
|
};
|
|
7200
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7200
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7201
7201
|
break;
|
|
7202
7202
|
}
|
|
7203
7203
|
case "postContactGetFormattedNumber": {
|
|
@@ -7212,9 +7212,9 @@ class WWebjsApi {
|
|
|
7212
7212
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
7213
7213
|
},
|
|
7214
7214
|
returnFullResponse: false,
|
|
7215
|
-
json:
|
|
7215
|
+
json: false,
|
|
7216
7216
|
};
|
|
7217
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7217
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7218
7218
|
break;
|
|
7219
7219
|
}
|
|
7220
7220
|
case "postContactGetCountryCode": {
|
|
@@ -7229,9 +7229,9 @@ class WWebjsApi {
|
|
|
7229
7229
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
7230
7230
|
},
|
|
7231
7231
|
returnFullResponse: false,
|
|
7232
|
-
json:
|
|
7232
|
+
json: false,
|
|
7233
7233
|
};
|
|
7234
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7234
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7235
7235
|
break;
|
|
7236
7236
|
}
|
|
7237
7237
|
case "postContactGetProfilePicUrl": {
|
|
@@ -7246,9 +7246,9 @@ class WWebjsApi {
|
|
|
7246
7246
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
7247
7247
|
},
|
|
7248
7248
|
returnFullResponse: false,
|
|
7249
|
-
json:
|
|
7249
|
+
json: false,
|
|
7250
7250
|
};
|
|
7251
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7251
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7252
7252
|
break;
|
|
7253
7253
|
}
|
|
7254
7254
|
case "postContactGetCommonGroups": {
|
|
@@ -7263,9 +7263,9 @@ class WWebjsApi {
|
|
|
7263
7263
|
contactId: this.getNodeParameter("body_contactId", i),
|
|
7264
7264
|
},
|
|
7265
7265
|
returnFullResponse: false,
|
|
7266
|
-
json:
|
|
7266
|
+
json: false,
|
|
7267
7267
|
};
|
|
7268
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7268
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7269
7269
|
break;
|
|
7270
7270
|
}
|
|
7271
7271
|
default:
|
|
@@ -7287,9 +7287,9 @@ class WWebjsApi {
|
|
|
7287
7287
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
7288
7288
|
},
|
|
7289
7289
|
returnFullResponse: false,
|
|
7290
|
-
json:
|
|
7290
|
+
json: false,
|
|
7291
7291
|
};
|
|
7292
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7292
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7293
7293
|
break;
|
|
7294
7294
|
}
|
|
7295
7295
|
case "postGroupChatAddParticipants": {
|
|
@@ -7316,9 +7316,9 @@ class WWebjsApi {
|
|
|
7316
7316
|
} })(),
|
|
7317
7317
|
},
|
|
7318
7318
|
returnFullResponse: false,
|
|
7319
|
-
json:
|
|
7319
|
+
json: false,
|
|
7320
7320
|
};
|
|
7321
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7321
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7322
7322
|
break;
|
|
7323
7323
|
}
|
|
7324
7324
|
case "postGroupChatDemoteParticipants": {
|
|
@@ -7339,9 +7339,9 @@ class WWebjsApi {
|
|
|
7339
7339
|
} })(),
|
|
7340
7340
|
},
|
|
7341
7341
|
returnFullResponse: false,
|
|
7342
|
-
json:
|
|
7342
|
+
json: false,
|
|
7343
7343
|
};
|
|
7344
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7344
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7345
7345
|
break;
|
|
7346
7346
|
}
|
|
7347
7347
|
case "postGroupChatGetInviteCode": {
|
|
@@ -7356,9 +7356,9 @@ class WWebjsApi {
|
|
|
7356
7356
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
7357
7357
|
},
|
|
7358
7358
|
returnFullResponse: false,
|
|
7359
|
-
json:
|
|
7359
|
+
json: false,
|
|
7360
7360
|
};
|
|
7361
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7361
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7362
7362
|
break;
|
|
7363
7363
|
}
|
|
7364
7364
|
case "postGroupChatLeave": {
|
|
@@ -7373,9 +7373,9 @@ class WWebjsApi {
|
|
|
7373
7373
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
7374
7374
|
},
|
|
7375
7375
|
returnFullResponse: false,
|
|
7376
|
-
json:
|
|
7376
|
+
json: false,
|
|
7377
7377
|
};
|
|
7378
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7378
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7379
7379
|
break;
|
|
7380
7380
|
}
|
|
7381
7381
|
case "postGroupChatPromoteParticipants": {
|
|
@@ -7396,9 +7396,9 @@ class WWebjsApi {
|
|
|
7396
7396
|
} })(),
|
|
7397
7397
|
},
|
|
7398
7398
|
returnFullResponse: false,
|
|
7399
|
-
json:
|
|
7399
|
+
json: false,
|
|
7400
7400
|
};
|
|
7401
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7401
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7402
7402
|
break;
|
|
7403
7403
|
}
|
|
7404
7404
|
case "postGroupChatRemoveParticipants": {
|
|
@@ -7419,9 +7419,9 @@ class WWebjsApi {
|
|
|
7419
7419
|
} })(),
|
|
7420
7420
|
},
|
|
7421
7421
|
returnFullResponse: false,
|
|
7422
|
-
json:
|
|
7422
|
+
json: false,
|
|
7423
7423
|
};
|
|
7424
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7424
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7425
7425
|
break;
|
|
7426
7426
|
}
|
|
7427
7427
|
case "postGroupChatRevokeInvite": {
|
|
@@ -7436,9 +7436,9 @@ class WWebjsApi {
|
|
|
7436
7436
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
7437
7437
|
},
|
|
7438
7438
|
returnFullResponse: false,
|
|
7439
|
-
json:
|
|
7439
|
+
json: false,
|
|
7440
7440
|
};
|
|
7441
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7441
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7442
7442
|
break;
|
|
7443
7443
|
}
|
|
7444
7444
|
case "postGroupChatSetDescription": {
|
|
@@ -7454,9 +7454,9 @@ class WWebjsApi {
|
|
|
7454
7454
|
description: this.getNodeParameter("body_description", i),
|
|
7455
7455
|
},
|
|
7456
7456
|
returnFullResponse: false,
|
|
7457
|
-
json:
|
|
7457
|
+
json: false,
|
|
7458
7458
|
};
|
|
7459
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7459
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7460
7460
|
break;
|
|
7461
7461
|
}
|
|
7462
7462
|
case "postGroupChatSetInfoAdminsOnly": {
|
|
@@ -7472,9 +7472,9 @@ class WWebjsApi {
|
|
|
7472
7472
|
adminsOnly: this.getNodeParameter("body_adminsOnly", i),
|
|
7473
7473
|
},
|
|
7474
7474
|
returnFullResponse: false,
|
|
7475
|
-
json:
|
|
7475
|
+
json: false,
|
|
7476
7476
|
};
|
|
7477
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7477
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7478
7478
|
break;
|
|
7479
7479
|
}
|
|
7480
7480
|
case "postGroupChatSetMessagesAdminsOnly": {
|
|
@@ -7490,9 +7490,9 @@ class WWebjsApi {
|
|
|
7490
7490
|
adminsOnly: this.getNodeParameter("body_adminsOnly", i),
|
|
7491
7491
|
},
|
|
7492
7492
|
returnFullResponse: false,
|
|
7493
|
-
json:
|
|
7493
|
+
json: false,
|
|
7494
7494
|
};
|
|
7495
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7495
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7496
7496
|
break;
|
|
7497
7497
|
}
|
|
7498
7498
|
case "postGroupChatSetSubject": {
|
|
@@ -7508,9 +7508,9 @@ class WWebjsApi {
|
|
|
7508
7508
|
subject: this.getNodeParameter("body_subject", i),
|
|
7509
7509
|
},
|
|
7510
7510
|
returnFullResponse: false,
|
|
7511
|
-
json:
|
|
7511
|
+
json: false,
|
|
7512
7512
|
};
|
|
7513
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7513
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7514
7514
|
break;
|
|
7515
7515
|
}
|
|
7516
7516
|
case "postGroupChatSetPicture": {
|
|
@@ -7527,9 +7527,9 @@ class WWebjsApi {
|
|
|
7527
7527
|
pictureData: this.getNodeParameter("body_pictureData", i),
|
|
7528
7528
|
},
|
|
7529
7529
|
returnFullResponse: false,
|
|
7530
|
-
json:
|
|
7530
|
+
json: false,
|
|
7531
7531
|
};
|
|
7532
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7532
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7533
7533
|
break;
|
|
7534
7534
|
}
|
|
7535
7535
|
case "postGroupChatDeletePicture": {
|
|
@@ -7544,9 +7544,9 @@ class WWebjsApi {
|
|
|
7544
7544
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
7545
7545
|
},
|
|
7546
7546
|
returnFullResponse: false,
|
|
7547
|
-
json:
|
|
7547
|
+
json: false,
|
|
7548
7548
|
};
|
|
7549
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7549
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7550
7550
|
break;
|
|
7551
7551
|
}
|
|
7552
7552
|
case "postGroupChatGetGroupMembershipRequests": {
|
|
@@ -7561,9 +7561,9 @@ class WWebjsApi {
|
|
|
7561
7561
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
7562
7562
|
},
|
|
7563
7563
|
returnFullResponse: false,
|
|
7564
|
-
json:
|
|
7564
|
+
json: false,
|
|
7565
7565
|
};
|
|
7566
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7566
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7567
7567
|
break;
|
|
7568
7568
|
}
|
|
7569
7569
|
case "postGroupChatApproveGroupMembershipRequests": {
|
|
@@ -7584,9 +7584,9 @@ class WWebjsApi {
|
|
|
7584
7584
|
} })(),
|
|
7585
7585
|
},
|
|
7586
7586
|
returnFullResponse: false,
|
|
7587
|
-
json:
|
|
7587
|
+
json: false,
|
|
7588
7588
|
};
|
|
7589
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7589
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7590
7590
|
break;
|
|
7591
7591
|
}
|
|
7592
7592
|
case "postGroupChatRejectGroupMembershipRequests": {
|
|
@@ -7607,9 +7607,9 @@ class WWebjsApi {
|
|
|
7607
7607
|
} })(),
|
|
7608
7608
|
},
|
|
7609
7609
|
returnFullResponse: false,
|
|
7610
|
-
json:
|
|
7610
|
+
json: false,
|
|
7611
7611
|
};
|
|
7612
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7612
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7613
7613
|
break;
|
|
7614
7614
|
}
|
|
7615
7615
|
case "postGroupChatRunMethod": {
|
|
@@ -7626,9 +7626,9 @@ class WWebjsApi {
|
|
|
7626
7626
|
options: this.getNodeParameter("body_options", i),
|
|
7627
7627
|
},
|
|
7628
7628
|
returnFullResponse: false,
|
|
7629
|
-
json:
|
|
7629
|
+
json: false,
|
|
7630
7630
|
};
|
|
7631
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7631
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7632
7632
|
break;
|
|
7633
7633
|
}
|
|
7634
7634
|
default:
|
|
@@ -7651,9 +7651,9 @@ class WWebjsApi {
|
|
|
7651
7651
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7652
7652
|
},
|
|
7653
7653
|
returnFullResponse: false,
|
|
7654
|
-
json:
|
|
7654
|
+
json: false,
|
|
7655
7655
|
};
|
|
7656
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7656
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7657
7657
|
break;
|
|
7658
7658
|
}
|
|
7659
7659
|
case "postMessageDelete": {
|
|
@@ -7671,9 +7671,9 @@ class WWebjsApi {
|
|
|
7671
7671
|
clearMedia: this.getNodeParameter("body_clearMedia", i),
|
|
7672
7672
|
},
|
|
7673
7673
|
returnFullResponse: false,
|
|
7674
|
-
json:
|
|
7674
|
+
json: false,
|
|
7675
7675
|
};
|
|
7676
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7676
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7677
7677
|
break;
|
|
7678
7678
|
}
|
|
7679
7679
|
case "postMessageDownloadMedia": {
|
|
@@ -7689,9 +7689,9 @@ class WWebjsApi {
|
|
|
7689
7689
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7690
7690
|
},
|
|
7691
7691
|
returnFullResponse: false,
|
|
7692
|
-
json:
|
|
7692
|
+
json: false,
|
|
7693
7693
|
};
|
|
7694
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7694
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7695
7695
|
break;
|
|
7696
7696
|
}
|
|
7697
7697
|
case "postMessageDownloadMediaAsData": {
|
|
@@ -7707,9 +7707,9 @@ class WWebjsApi {
|
|
|
7707
7707
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7708
7708
|
},
|
|
7709
7709
|
returnFullResponse: false,
|
|
7710
|
-
json:
|
|
7710
|
+
json: false,
|
|
7711
7711
|
};
|
|
7712
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7712
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7713
7713
|
break;
|
|
7714
7714
|
}
|
|
7715
7715
|
case "postMessageForward": {
|
|
@@ -7726,9 +7726,9 @@ class WWebjsApi {
|
|
|
7726
7726
|
destinationChatId: this.getNodeParameter("body_destinationChatId", i),
|
|
7727
7727
|
},
|
|
7728
7728
|
returnFullResponse: false,
|
|
7729
|
-
json:
|
|
7729
|
+
json: false,
|
|
7730
7730
|
};
|
|
7731
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7731
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7732
7732
|
break;
|
|
7733
7733
|
}
|
|
7734
7734
|
case "postMessageGetInfo": {
|
|
@@ -7744,9 +7744,9 @@ class WWebjsApi {
|
|
|
7744
7744
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7745
7745
|
},
|
|
7746
7746
|
returnFullResponse: false,
|
|
7747
|
-
json:
|
|
7747
|
+
json: false,
|
|
7748
7748
|
};
|
|
7749
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7749
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7750
7750
|
break;
|
|
7751
7751
|
}
|
|
7752
7752
|
case "postMessageGetMentions": {
|
|
@@ -7762,9 +7762,9 @@ class WWebjsApi {
|
|
|
7762
7762
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7763
7763
|
},
|
|
7764
7764
|
returnFullResponse: false,
|
|
7765
|
-
json:
|
|
7765
|
+
json: false,
|
|
7766
7766
|
};
|
|
7767
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7767
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7768
7768
|
break;
|
|
7769
7769
|
}
|
|
7770
7770
|
case "postMessageGetOrder": {
|
|
@@ -7780,9 +7780,9 @@ class WWebjsApi {
|
|
|
7780
7780
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7781
7781
|
},
|
|
7782
7782
|
returnFullResponse: false,
|
|
7783
|
-
json:
|
|
7783
|
+
json: false,
|
|
7784
7784
|
};
|
|
7785
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7785
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7786
7786
|
break;
|
|
7787
7787
|
}
|
|
7788
7788
|
case "postMessageGetPayment": {
|
|
@@ -7798,9 +7798,9 @@ class WWebjsApi {
|
|
|
7798
7798
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7799
7799
|
},
|
|
7800
7800
|
returnFullResponse: false,
|
|
7801
|
-
json:
|
|
7801
|
+
json: false,
|
|
7802
7802
|
};
|
|
7803
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7803
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7804
7804
|
break;
|
|
7805
7805
|
}
|
|
7806
7806
|
case "postMessageGetQuotedMessage": {
|
|
@@ -7816,9 +7816,9 @@ class WWebjsApi {
|
|
|
7816
7816
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7817
7817
|
},
|
|
7818
7818
|
returnFullResponse: false,
|
|
7819
|
-
json:
|
|
7819
|
+
json: false,
|
|
7820
7820
|
};
|
|
7821
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7821
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7822
7822
|
break;
|
|
7823
7823
|
}
|
|
7824
7824
|
case "postMessageReact": {
|
|
@@ -7835,9 +7835,9 @@ class WWebjsApi {
|
|
|
7835
7835
|
reaction: this.getNodeParameter("body_reaction", i),
|
|
7836
7836
|
},
|
|
7837
7837
|
returnFullResponse: false,
|
|
7838
|
-
json:
|
|
7838
|
+
json: false,
|
|
7839
7839
|
};
|
|
7840
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7840
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7841
7841
|
break;
|
|
7842
7842
|
}
|
|
7843
7843
|
case "postMessageReply": {
|
|
@@ -7852,11 +7852,11 @@ class WWebjsApi {
|
|
|
7852
7852
|
chatId: this.getNodeParameter("body_chatId", i),
|
|
7853
7853
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7854
7854
|
contentType: this.getNodeParameter("body_contentType", i),
|
|
7855
|
-
content: (() => { try {
|
|
7856
|
-
return JSON.parse(
|
|
7855
|
+
content: (() => { const v = this.getNodeParameter("body_content", i); try {
|
|
7856
|
+
return JSON.parse(v);
|
|
7857
7857
|
}
|
|
7858
7858
|
catch {
|
|
7859
|
-
return
|
|
7859
|
+
return v;
|
|
7860
7860
|
} })(),
|
|
7861
7861
|
options: (() => { try {
|
|
7862
7862
|
return JSON.parse(this.getNodeParameter("body_options", i));
|
|
@@ -7866,9 +7866,9 @@ class WWebjsApi {
|
|
|
7866
7866
|
} })(),
|
|
7867
7867
|
},
|
|
7868
7868
|
returnFullResponse: false,
|
|
7869
|
-
json:
|
|
7869
|
+
json: false,
|
|
7870
7870
|
};
|
|
7871
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7871
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7872
7872
|
break;
|
|
7873
7873
|
}
|
|
7874
7874
|
case "postMessageStar": {
|
|
@@ -7884,9 +7884,9 @@ class WWebjsApi {
|
|
|
7884
7884
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7885
7885
|
},
|
|
7886
7886
|
returnFullResponse: false,
|
|
7887
|
-
json:
|
|
7887
|
+
json: false,
|
|
7888
7888
|
};
|
|
7889
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7889
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7890
7890
|
break;
|
|
7891
7891
|
}
|
|
7892
7892
|
case "postMessageUnstar": {
|
|
@@ -7902,9 +7902,9 @@ class WWebjsApi {
|
|
|
7902
7902
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7903
7903
|
},
|
|
7904
7904
|
returnFullResponse: false,
|
|
7905
|
-
json:
|
|
7905
|
+
json: false,
|
|
7906
7906
|
};
|
|
7907
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7907
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7908
7908
|
break;
|
|
7909
7909
|
}
|
|
7910
7910
|
case "postMessageGetReactions": {
|
|
@@ -7920,9 +7920,9 @@ class WWebjsApi {
|
|
|
7920
7920
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7921
7921
|
},
|
|
7922
7922
|
returnFullResponse: false,
|
|
7923
|
-
json:
|
|
7923
|
+
json: false,
|
|
7924
7924
|
};
|
|
7925
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7925
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7926
7926
|
break;
|
|
7927
7927
|
}
|
|
7928
7928
|
case "postMessageGetGroupMentions": {
|
|
@@ -7938,9 +7938,9 @@ class WWebjsApi {
|
|
|
7938
7938
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7939
7939
|
},
|
|
7940
7940
|
returnFullResponse: false,
|
|
7941
|
-
json:
|
|
7941
|
+
json: false,
|
|
7942
7942
|
};
|
|
7943
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7943
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7944
7944
|
break;
|
|
7945
7945
|
}
|
|
7946
7946
|
case "postMessageEdit": {
|
|
@@ -7963,9 +7963,9 @@ class WWebjsApi {
|
|
|
7963
7963
|
} })(),
|
|
7964
7964
|
},
|
|
7965
7965
|
returnFullResponse: false,
|
|
7966
|
-
json:
|
|
7966
|
+
json: false,
|
|
7967
7967
|
};
|
|
7968
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7968
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7969
7969
|
break;
|
|
7970
7970
|
}
|
|
7971
7971
|
case "postMessageGetContact": {
|
|
@@ -7981,9 +7981,9 @@ class WWebjsApi {
|
|
|
7981
7981
|
messageId: this.getNodeParameter("body_messageId", i),
|
|
7982
7982
|
},
|
|
7983
7983
|
returnFullResponse: false,
|
|
7984
|
-
json:
|
|
7984
|
+
json: false,
|
|
7985
7985
|
};
|
|
7986
|
-
responseData = await this.helpers.httpRequest(options);
|
|
7986
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
7987
7987
|
break;
|
|
7988
7988
|
}
|
|
7989
7989
|
case "postMessageRunMethod": {
|
|
@@ -8001,9 +8001,9 @@ class WWebjsApi {
|
|
|
8001
8001
|
options: this.getNodeParameter("body_options", i),
|
|
8002
8002
|
},
|
|
8003
8003
|
returnFullResponse: false,
|
|
8004
|
-
json:
|
|
8004
|
+
json: false,
|
|
8005
8005
|
};
|
|
8006
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8006
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8007
8007
|
break;
|
|
8008
8008
|
}
|
|
8009
8009
|
default:
|
|
@@ -8020,9 +8020,9 @@ class WWebjsApi {
|
|
|
8020
8020
|
url: `${baseUrl}${endpoint}`,
|
|
8021
8021
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8022
8022
|
returnFullResponse: false,
|
|
8023
|
-
json:
|
|
8023
|
+
json: false,
|
|
8024
8024
|
};
|
|
8025
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8025
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8026
8026
|
break;
|
|
8027
8027
|
}
|
|
8028
8028
|
case "getSessionStart": {
|
|
@@ -8034,9 +8034,9 @@ class WWebjsApi {
|
|
|
8034
8034
|
url: `${baseUrl}${endpoint}`,
|
|
8035
8035
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8036
8036
|
returnFullResponse: false,
|
|
8037
|
-
json:
|
|
8037
|
+
json: false,
|
|
8038
8038
|
};
|
|
8039
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8039
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8040
8040
|
break;
|
|
8041
8041
|
}
|
|
8042
8042
|
case "getSessionStop": {
|
|
@@ -8048,9 +8048,9 @@ class WWebjsApi {
|
|
|
8048
8048
|
url: `${baseUrl}${endpoint}`,
|
|
8049
8049
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8050
8050
|
returnFullResponse: false,
|
|
8051
|
-
json:
|
|
8051
|
+
json: false,
|
|
8052
8052
|
};
|
|
8053
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8053
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8054
8054
|
break;
|
|
8055
8055
|
}
|
|
8056
8056
|
case "getSessionStatus": {
|
|
@@ -8062,9 +8062,9 @@ class WWebjsApi {
|
|
|
8062
8062
|
url: `${baseUrl}${endpoint}`,
|
|
8063
8063
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8064
8064
|
returnFullResponse: false,
|
|
8065
|
-
json:
|
|
8065
|
+
json: false,
|
|
8066
8066
|
};
|
|
8067
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8067
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8068
8068
|
break;
|
|
8069
8069
|
}
|
|
8070
8070
|
case "getSessionQr": {
|
|
@@ -8076,9 +8076,9 @@ class WWebjsApi {
|
|
|
8076
8076
|
url: `${baseUrl}${endpoint}`,
|
|
8077
8077
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8078
8078
|
returnFullResponse: false,
|
|
8079
|
-
json:
|
|
8079
|
+
json: false,
|
|
8080
8080
|
};
|
|
8081
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8081
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8082
8082
|
break;
|
|
8083
8083
|
}
|
|
8084
8084
|
case "getSessionQrImage": {
|
|
@@ -8090,9 +8090,13 @@ class WWebjsApi {
|
|
|
8090
8090
|
url: `${baseUrl}${endpoint}`,
|
|
8091
8091
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8092
8092
|
returnFullResponse: false,
|
|
8093
|
-
json:
|
|
8093
|
+
json: false,
|
|
8094
8094
|
};
|
|
8095
|
-
|
|
8095
|
+
const _binaryOptions = { ...options, encoding: null };
|
|
8096
|
+
const _rawResp = await this.helpers.httpRequest(_binaryOptions);
|
|
8097
|
+
const _buffer = Buffer.isBuffer(_rawResp) ? _rawResp : Buffer.from(_rawResp);
|
|
8098
|
+
const _binaryData = await this.helpers.prepareBinaryData(_buffer, 'getSessionQrImage.png', 'image/png');
|
|
8099
|
+
responseData = { binary: _binaryData, mimeType: 'image/png' };
|
|
8096
8100
|
break;
|
|
8097
8101
|
}
|
|
8098
8102
|
case "postSessionRequestPairingCode": {
|
|
@@ -8108,9 +8112,9 @@ class WWebjsApi {
|
|
|
8108
8112
|
showNotification: this.getNodeParameter("body_showNotification", i),
|
|
8109
8113
|
},
|
|
8110
8114
|
returnFullResponse: false,
|
|
8111
|
-
json:
|
|
8115
|
+
json: false,
|
|
8112
8116
|
};
|
|
8113
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8117
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8114
8118
|
break;
|
|
8115
8119
|
}
|
|
8116
8120
|
case "getSessionRestart": {
|
|
@@ -8122,9 +8126,9 @@ class WWebjsApi {
|
|
|
8122
8126
|
url: `${baseUrl}${endpoint}`,
|
|
8123
8127
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8124
8128
|
returnFullResponse: false,
|
|
8125
|
-
json:
|
|
8129
|
+
json: false,
|
|
8126
8130
|
};
|
|
8127
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8131
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8128
8132
|
break;
|
|
8129
8133
|
}
|
|
8130
8134
|
case "getSessionTerminate": {
|
|
@@ -8136,9 +8140,9 @@ class WWebjsApi {
|
|
|
8136
8140
|
url: `${baseUrl}${endpoint}`,
|
|
8137
8141
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8138
8142
|
returnFullResponse: false,
|
|
8139
|
-
json:
|
|
8143
|
+
json: false,
|
|
8140
8144
|
};
|
|
8141
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8145
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8142
8146
|
break;
|
|
8143
8147
|
}
|
|
8144
8148
|
case "getSessionTerminateInactive": {
|
|
@@ -8148,9 +8152,9 @@ class WWebjsApi {
|
|
|
8148
8152
|
url: `${baseUrl}${endpoint}`,
|
|
8149
8153
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8150
8154
|
returnFullResponse: false,
|
|
8151
|
-
json:
|
|
8155
|
+
json: false,
|
|
8152
8156
|
};
|
|
8153
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8157
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8154
8158
|
break;
|
|
8155
8159
|
}
|
|
8156
8160
|
case "getSessionTerminateAll": {
|
|
@@ -8160,9 +8164,9 @@ class WWebjsApi {
|
|
|
8160
8164
|
url: `${baseUrl}${endpoint}`,
|
|
8161
8165
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8162
8166
|
returnFullResponse: false,
|
|
8163
|
-
json:
|
|
8167
|
+
json: false,
|
|
8164
8168
|
};
|
|
8165
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8169
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8166
8170
|
break;
|
|
8167
8171
|
}
|
|
8168
8172
|
case "getSessionGetPageScreenshot": {
|
|
@@ -8174,9 +8178,13 @@ class WWebjsApi {
|
|
|
8174
8178
|
url: `${baseUrl}${endpoint}`,
|
|
8175
8179
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8176
8180
|
returnFullResponse: false,
|
|
8177
|
-
json:
|
|
8181
|
+
json: false,
|
|
8178
8182
|
};
|
|
8179
|
-
|
|
8183
|
+
const _binaryOptions = { ...options, encoding: null };
|
|
8184
|
+
const _rawResp = await this.helpers.httpRequest(_binaryOptions);
|
|
8185
|
+
const _buffer = Buffer.isBuffer(_rawResp) ? _rawResp : Buffer.from(_rawResp);
|
|
8186
|
+
const _binaryData = await this.helpers.prepareBinaryData(_buffer, 'getSessionGetPageScreenshot.png', 'image/png');
|
|
8187
|
+
responseData = { binary: _binaryData, mimeType: 'image/png' };
|
|
8180
8188
|
break;
|
|
8181
8189
|
}
|
|
8182
8190
|
default:
|
|
@@ -8193,9 +8201,9 @@ class WWebjsApi {
|
|
|
8193
8201
|
url: `${baseUrl}${endpoint}`,
|
|
8194
8202
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8195
8203
|
returnFullResponse: false,
|
|
8196
|
-
json:
|
|
8204
|
+
json: false,
|
|
8197
8205
|
};
|
|
8198
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8206
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8199
8207
|
break;
|
|
8200
8208
|
}
|
|
8201
8209
|
case "postLocalCallbackExample": {
|
|
@@ -8205,9 +8213,9 @@ class WWebjsApi {
|
|
|
8205
8213
|
url: `${baseUrl}${endpoint}`,
|
|
8206
8214
|
headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
|
|
8207
8215
|
returnFullResponse: false,
|
|
8208
|
-
json:
|
|
8216
|
+
json: false,
|
|
8209
8217
|
};
|
|
8210
|
-
responseData = await this.helpers.httpRequest(options);
|
|
8218
|
+
responseData = await this.helpers.httpRequest({ ...options, json: true });
|
|
8211
8219
|
break;
|
|
8212
8220
|
}
|
|
8213
8221
|
default:
|
|
@@ -8218,7 +8226,17 @@ class WWebjsApi {
|
|
|
8218
8226
|
default:
|
|
8219
8227
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Resource não suportado: ${resource}`);
|
|
8220
8228
|
}
|
|
8221
|
-
|
|
8229
|
+
// Retorno binário (imagem) vs JSON normal
|
|
8230
|
+
if (responseData && responseData.binary && responseData.mimeType) {
|
|
8231
|
+
returnData.push({
|
|
8232
|
+
json: { mimeType: responseData.mimeType },
|
|
8233
|
+
binary: { data: responseData.binary },
|
|
8234
|
+
pairedItem: { item: i },
|
|
8235
|
+
});
|
|
8236
|
+
}
|
|
8237
|
+
else {
|
|
8238
|
+
returnData.push({ json: responseData !== null && responseData !== void 0 ? responseData : {}, pairedItem: { item: i } });
|
|
8239
|
+
}
|
|
8222
8240
|
}
|
|
8223
8241
|
catch (error) {
|
|
8224
8242
|
if (this.continueOnFail()) {
|