n8n-nodes-waha-split 2026.15.10-dev2 → 2026.15.10-dev3
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/WAHA/v202502/WAHAv202502.js +69 -42
- package/dist/nodes/WAHA/v202502/WAHAv202502.js.map +1 -1
- package/dist/nodes/WAHA/v202502/WAHAv202502.test.js +250 -5
- package/dist/nodes/WAHA/v202502/WAHAv202502.test.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -32,6 +32,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var _a, _b, _c;
|
|
35
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
37
|
exports.WAHAv202502 = void 0;
|
|
37
38
|
const doc = __importStar(require("./openapi.json"));
|
|
@@ -89,9 +90,11 @@ const parser = new n8n_openapi_node_1.N8NPropertiesBuilder(doc, config);
|
|
|
89
90
|
const properties = parser.build(customDefaults);
|
|
90
91
|
const chattingOp = properties.find((p) => { var _a, _b, _c; return p.name === 'operation' && ((_c = (_b = (_a = p.displayOptions) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.resource) === null || _c === void 0 ? void 0 : _c.includes('Chatting')); });
|
|
91
92
|
const supportedBinaryOps = ['Send Image', 'Send File', 'Send Voice', 'Send Video'];
|
|
93
|
+
const supportedBinaryOpsValues = [];
|
|
92
94
|
if (chattingOp && chattingOp.options) {
|
|
93
95
|
chattingOp.options.forEach((option) => {
|
|
94
96
|
if (supportedBinaryOps.includes(option.name)) {
|
|
97
|
+
supportedBinaryOpsValues.push(option.value);
|
|
95
98
|
if (option.routing && option.routing.request) {
|
|
96
99
|
if (!option.routing.request.headers) {
|
|
97
100
|
option.routing.request.headers = {};
|
|
@@ -101,47 +104,30 @@ if (chattingOp && chattingOp.options) {
|
|
|
101
104
|
}
|
|
102
105
|
});
|
|
103
106
|
}
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
name: 'JSON',
|
|
113
|
-
value: 'JSON',
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name: 'Binary',
|
|
117
|
-
value: 'Binary',
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
default: 'JSON',
|
|
121
|
-
description: 'Select how to upload the file. This feature usable with mininxd/waha v2026.1.5.',
|
|
122
|
-
displayOptions: {
|
|
123
|
-
show: {
|
|
124
|
-
resource: ['Chatting'],
|
|
125
|
-
operation: supportedBinaryOps,
|
|
126
|
-
},
|
|
107
|
+
const fileUploadModeTemplate = {
|
|
108
|
+
displayName: 'File Upload Mode',
|
|
109
|
+
name: 'fileUploadMode',
|
|
110
|
+
type: 'options',
|
|
111
|
+
options: [
|
|
112
|
+
{
|
|
113
|
+
name: 'JSON',
|
|
114
|
+
value: 'JSON',
|
|
127
115
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
properties.push({
|
|
144
|
-
displayName: 'Binary Property',
|
|
116
|
+
{
|
|
117
|
+
name: 'Binary',
|
|
118
|
+
value: 'Binary',
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
default: 'JSON',
|
|
122
|
+
description: 'Select how to upload the file. This feature usable with mininxd/waha v2026.1.5.',
|
|
123
|
+
displayOptions: {
|
|
124
|
+
show: {
|
|
125
|
+
resource: ['Chatting'],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
const binaryPropTemplate = {
|
|
130
|
+
displayName: 'File',
|
|
145
131
|
name: 'binaryPropertyName',
|
|
146
132
|
type: 'string',
|
|
147
133
|
default: 'data',
|
|
@@ -149,7 +135,6 @@ properties.push({
|
|
|
149
135
|
displayOptions: {
|
|
150
136
|
show: {
|
|
151
137
|
resource: ['Chatting'],
|
|
152
|
-
operation: supportedBinaryOps,
|
|
153
138
|
fileUploadMode: ['Binary'],
|
|
154
139
|
},
|
|
155
140
|
},
|
|
@@ -161,7 +146,49 @@ properties.push({
|
|
|
161
146
|
},
|
|
162
147
|
},
|
|
163
148
|
description: 'Name of the binary property which contains the data to upload',
|
|
164
|
-
}
|
|
149
|
+
};
|
|
150
|
+
for (let i = properties.length - 1; i >= 0; i--) {
|
|
151
|
+
const p = properties[i];
|
|
152
|
+
if (p.name === 'file' && ((_c = (_b = (_a = p.displayOptions) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.resource) === null || _c === void 0 ? void 0 : _c.includes('Chatting'))) {
|
|
153
|
+
const ops = p.displayOptions.show.operation;
|
|
154
|
+
const supportedOp = ops && ops.find((op) => supportedBinaryOpsValues.includes(op));
|
|
155
|
+
if (supportedOp) {
|
|
156
|
+
const modeParam = JSON.parse(JSON.stringify(fileUploadModeTemplate));
|
|
157
|
+
modeParam.displayOptions.show.operation = [supportedOp];
|
|
158
|
+
const binaryParam = JSON.parse(JSON.stringify(binaryPropTemplate));
|
|
159
|
+
binaryParam.displayOptions.show.operation = [supportedOp];
|
|
160
|
+
properties.splice(i, 0, modeParam);
|
|
161
|
+
const fileProp = properties[i + 1];
|
|
162
|
+
if (fileProp.displayOptions) {
|
|
163
|
+
fileProp.displayOptions = { ...fileProp.displayOptions };
|
|
164
|
+
if (fileProp.displayOptions.show) {
|
|
165
|
+
fileProp.displayOptions.show = { ...fileProp.displayOptions.show };
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
fileProp.displayOptions = {};
|
|
170
|
+
}
|
|
171
|
+
if (!fileProp.displayOptions.show) {
|
|
172
|
+
fileProp.displayOptions.show = {};
|
|
173
|
+
}
|
|
174
|
+
fileProp.displayOptions.show.fileUploadMode = ['JSON'];
|
|
175
|
+
if (!fileProp.routing)
|
|
176
|
+
fileProp.routing = {};
|
|
177
|
+
if (!fileProp.routing.send)
|
|
178
|
+
fileProp.routing.send = {};
|
|
179
|
+
let originalValue = fileProp.routing.send.value || '$value';
|
|
180
|
+
if (originalValue.startsWith('=')) {
|
|
181
|
+
originalValue = originalValue.slice(1);
|
|
182
|
+
}
|
|
183
|
+
if (originalValue.startsWith('{{') && originalValue.endsWith('}}')) {
|
|
184
|
+
originalValue = originalValue.slice(2, -2);
|
|
185
|
+
}
|
|
186
|
+
const innerValue = originalValue.trim();
|
|
187
|
+
fileProp.routing.send.value = `={{ $parameter.fileUploadMode === 'Binary' ? undefined : ${innerValue} }}`;
|
|
188
|
+
properties.splice(i + 2, 0, binaryParam);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
165
192
|
class WAHAv202502 {
|
|
166
193
|
constructor() {
|
|
167
194
|
this.description = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WAHAv202502.js","sourceRoot":"","sources":["../../../../nodes/WAHA/v202502/WAHAv202502.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WAHAv202502.js","sourceRoot":"","sources":["../../../../nodes/WAHA/v202502/WAHAv202502.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,oDAAsC;AACtC,uCAAkE;AAClE,gFAA6E;AAC7E,oEAIuC;AACvC,wEAAmE;AACnE,sEAAiE;AAEjE,MAAM,cAAc,GAAe;IAClC;QACC,IAAI,EAAE;YACL,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;SACd;QACD,OAAO,EAAE;YACR,OAAO,EAAE,sBAAsB;SAC/B;KACD;IACD;QACC,IAAI,EAAE;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AAC,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC;QAC1C,CAAC;IACF,CAAC;AACF,CAAC;AAED,MAAa,WAAW;IAAxB;QACC,gBAAW,GAAyB;YACnC,GAAG,uBAAgB;YACnB,GAAG,uBAAgB;YACnB,OAAO,EAAE,MAAM;YAEf,UAAU,EAAE,UAAU;SACtB,CAAC;IACH,CAAC;CAAA;AARD,kCAQC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const WAHAv202502_1 = require("./WAHAv202502");
|
|
4
4
|
test('WAHAv202502.description.properties', () => {
|
|
5
5
|
const node = new WAHAv202502_1.WAHAv202502();
|
|
6
|
+
const properties = JSON.parse(JSON.stringify(node.description.properties));
|
|
6
7
|
const expected = [
|
|
7
8
|
{
|
|
8
9
|
"default": "",
|
|
@@ -366,6 +367,9 @@ test('WAHAv202502.description.properties', () => {
|
|
|
366
367
|
"name": "Send Image",
|
|
367
368
|
"routing": {
|
|
368
369
|
"request": {
|
|
370
|
+
"headers": {
|
|
371
|
+
"Content-Type": "={{ $parameter.fileUploadMode === \"Binary\" ? \"multipart/form-data\" : \"application/json\" }}"
|
|
372
|
+
},
|
|
369
373
|
"method": "POST",
|
|
370
374
|
"url": "=/api/sendImage"
|
|
371
375
|
}
|
|
@@ -378,6 +382,9 @@ test('WAHAv202502.description.properties', () => {
|
|
|
378
382
|
"name": "Send File",
|
|
379
383
|
"routing": {
|
|
380
384
|
"request": {
|
|
385
|
+
"headers": {
|
|
386
|
+
"Content-Type": "={{ $parameter.fileUploadMode === \"Binary\" ? \"multipart/form-data\" : \"application/json\" }}"
|
|
387
|
+
},
|
|
381
388
|
"method": "POST",
|
|
382
389
|
"url": "=/api/sendFile"
|
|
383
390
|
}
|
|
@@ -390,6 +397,9 @@ test('WAHAv202502.description.properties', () => {
|
|
|
390
397
|
"name": "Send Voice",
|
|
391
398
|
"routing": {
|
|
392
399
|
"request": {
|
|
400
|
+
"headers": {
|
|
401
|
+
"Content-Type": "={{ $parameter.fileUploadMode === \"Binary\" ? \"multipart/form-data\" : \"application/json\" }}"
|
|
402
|
+
},
|
|
393
403
|
"method": "POST",
|
|
394
404
|
"url": "=/api/sendVoice"
|
|
395
405
|
}
|
|
@@ -402,6 +412,9 @@ test('WAHAv202502.description.properties', () => {
|
|
|
402
412
|
"name": "Send Video",
|
|
403
413
|
"routing": {
|
|
404
414
|
"request": {
|
|
415
|
+
"headers": {
|
|
416
|
+
"Content-Type": "={{ $parameter.fileUploadMode === \"Binary\" ? \"multipart/form-data\" : \"application/json\" }}"
|
|
417
|
+
},
|
|
405
418
|
"method": "POST",
|
|
406
419
|
"url": "=/api/sendVideo"
|
|
407
420
|
}
|
|
@@ -2772,11 +2785,41 @@ test('WAHAv202502.description.properties', () => {
|
|
|
2772
2785
|
},
|
|
2773
2786
|
"type": "string"
|
|
2774
2787
|
},
|
|
2788
|
+
{
|
|
2789
|
+
"default": "JSON",
|
|
2790
|
+
"description": "Select how to upload the file. This feature usable with mininxd/waha v2026.1.5",
|
|
2791
|
+
"displayName": "File Upload Mode",
|
|
2792
|
+
"displayOptions": {
|
|
2793
|
+
"show": {
|
|
2794
|
+
"operation": [
|
|
2795
|
+
"Send Image"
|
|
2796
|
+
],
|
|
2797
|
+
"resource": [
|
|
2798
|
+
"Chatting"
|
|
2799
|
+
]
|
|
2800
|
+
}
|
|
2801
|
+
},
|
|
2802
|
+
"name": "fileUploadMode",
|
|
2803
|
+
"options": [
|
|
2804
|
+
{
|
|
2805
|
+
"name": "JSON",
|
|
2806
|
+
"value": "JSON"
|
|
2807
|
+
},
|
|
2808
|
+
{
|
|
2809
|
+
"name": "Binary",
|
|
2810
|
+
"value": "Binary"
|
|
2811
|
+
}
|
|
2812
|
+
],
|
|
2813
|
+
"type": "options"
|
|
2814
|
+
},
|
|
2775
2815
|
{
|
|
2776
2816
|
"default": "{\n \"mimetype\": \"image/jpeg\",\n \"filename\": \"filename.jpg\",\n \"url\": \"https://github.com/devlikeapro/waha/raw/core/examples/waha.jpg\"\n}",
|
|
2777
2817
|
"displayName": "File",
|
|
2778
2818
|
"displayOptions": {
|
|
2779
2819
|
"show": {
|
|
2820
|
+
"fileUploadMode": [
|
|
2821
|
+
"JSON"
|
|
2822
|
+
],
|
|
2780
2823
|
"operation": [
|
|
2781
2824
|
"Send Image"
|
|
2782
2825
|
],
|
|
@@ -2792,11 +2835,39 @@ test('WAHAv202502.description.properties', () => {
|
|
|
2792
2835
|
"property": "file",
|
|
2793
2836
|
"propertyInDotNotation": false,
|
|
2794
2837
|
"type": "body",
|
|
2795
|
-
"value": "={{ JSON.parse($value) }}"
|
|
2838
|
+
"value": "={{ $parameter.fileUploadMode === 'Binary' ? undefined : JSON.parse($value) }}"
|
|
2796
2839
|
}
|
|
2797
2840
|
},
|
|
2798
2841
|
"type": "json"
|
|
2799
2842
|
},
|
|
2843
|
+
{
|
|
2844
|
+
"default": "data",
|
|
2845
|
+
"description": "Name of the binary property which contains the data to upload",
|
|
2846
|
+
"displayName": "File",
|
|
2847
|
+
"displayOptions": {
|
|
2848
|
+
"show": {
|
|
2849
|
+
"fileUploadMode": [
|
|
2850
|
+
"Binary"
|
|
2851
|
+
],
|
|
2852
|
+
"operation": [
|
|
2853
|
+
"Send Image"
|
|
2854
|
+
],
|
|
2855
|
+
"resource": [
|
|
2856
|
+
"Chatting"
|
|
2857
|
+
]
|
|
2858
|
+
}
|
|
2859
|
+
},
|
|
2860
|
+
"name": "binaryPropertyName",
|
|
2861
|
+
"required": true,
|
|
2862
|
+
"routing": {
|
|
2863
|
+
"send": {
|
|
2864
|
+
"property": "file",
|
|
2865
|
+
"type": "body",
|
|
2866
|
+
"value": "={{ $binary[$value] }}"
|
|
2867
|
+
}
|
|
2868
|
+
},
|
|
2869
|
+
"type": "string"
|
|
2870
|
+
},
|
|
2800
2871
|
{
|
|
2801
2872
|
"default": "",
|
|
2802
2873
|
"description": "The ID of the message to reply to - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA",
|
|
@@ -2915,11 +2986,41 @@ test('WAHAv202502.description.properties', () => {
|
|
|
2915
2986
|
},
|
|
2916
2987
|
"type": "string"
|
|
2917
2988
|
},
|
|
2989
|
+
{
|
|
2990
|
+
"default": "JSON",
|
|
2991
|
+
"description": "Select how to upload the file. This feature usable with mininxd/waha v2026.1.5",
|
|
2992
|
+
"displayName": "File Upload Mode",
|
|
2993
|
+
"displayOptions": {
|
|
2994
|
+
"show": {
|
|
2995
|
+
"operation": [
|
|
2996
|
+
"Send File"
|
|
2997
|
+
],
|
|
2998
|
+
"resource": [
|
|
2999
|
+
"Chatting"
|
|
3000
|
+
]
|
|
3001
|
+
}
|
|
3002
|
+
},
|
|
3003
|
+
"name": "fileUploadMode",
|
|
3004
|
+
"options": [
|
|
3005
|
+
{
|
|
3006
|
+
"name": "JSON",
|
|
3007
|
+
"value": "JSON"
|
|
3008
|
+
},
|
|
3009
|
+
{
|
|
3010
|
+
"name": "Binary",
|
|
3011
|
+
"value": "Binary"
|
|
3012
|
+
}
|
|
3013
|
+
],
|
|
3014
|
+
"type": "options"
|
|
3015
|
+
},
|
|
2918
3016
|
{
|
|
2919
3017
|
"default": "{\n \"mimetype\": \"image/jpeg\",\n \"filename\": \"filename.jpg\",\n \"url\": \"https://github.com/devlikeapro/waha/raw/core/examples/waha.jpg\"\n}",
|
|
2920
3018
|
"displayName": "File",
|
|
2921
3019
|
"displayOptions": {
|
|
2922
3020
|
"show": {
|
|
3021
|
+
"fileUploadMode": [
|
|
3022
|
+
"JSON"
|
|
3023
|
+
],
|
|
2923
3024
|
"operation": [
|
|
2924
3025
|
"Send File"
|
|
2925
3026
|
],
|
|
@@ -2935,11 +3036,39 @@ test('WAHAv202502.description.properties', () => {
|
|
|
2935
3036
|
"property": "file",
|
|
2936
3037
|
"propertyInDotNotation": false,
|
|
2937
3038
|
"type": "body",
|
|
2938
|
-
"value": "={{ JSON.parse($value) }}"
|
|
3039
|
+
"value": "={{ $parameter.fileUploadMode === 'Binary' ? undefined : JSON.parse($value) }}"
|
|
2939
3040
|
}
|
|
2940
3041
|
},
|
|
2941
3042
|
"type": "json"
|
|
2942
3043
|
},
|
|
3044
|
+
{
|
|
3045
|
+
"default": "data",
|
|
3046
|
+
"description": "Name of the binary property which contains the data to upload",
|
|
3047
|
+
"displayName": "File",
|
|
3048
|
+
"displayOptions": {
|
|
3049
|
+
"show": {
|
|
3050
|
+
"fileUploadMode": [
|
|
3051
|
+
"Binary"
|
|
3052
|
+
],
|
|
3053
|
+
"operation": [
|
|
3054
|
+
"Send File"
|
|
3055
|
+
],
|
|
3056
|
+
"resource": [
|
|
3057
|
+
"Chatting"
|
|
3058
|
+
]
|
|
3059
|
+
}
|
|
3060
|
+
},
|
|
3061
|
+
"name": "binaryPropertyName",
|
|
3062
|
+
"required": true,
|
|
3063
|
+
"routing": {
|
|
3064
|
+
"send": {
|
|
3065
|
+
"property": "file",
|
|
3066
|
+
"type": "body",
|
|
3067
|
+
"value": "={{ $binary[$value] }}"
|
|
3068
|
+
}
|
|
3069
|
+
},
|
|
3070
|
+
"type": "string"
|
|
3071
|
+
},
|
|
2943
3072
|
{
|
|
2944
3073
|
"default": "",
|
|
2945
3074
|
"description": "The ID of the message to reply to - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA",
|
|
@@ -3058,11 +3187,41 @@ test('WAHAv202502.description.properties', () => {
|
|
|
3058
3187
|
},
|
|
3059
3188
|
"type": "string"
|
|
3060
3189
|
},
|
|
3190
|
+
{
|
|
3191
|
+
"default": "JSON",
|
|
3192
|
+
"description": "Select how to upload the file. This feature usable with mininxd/waha v2026.1.5",
|
|
3193
|
+
"displayName": "File Upload Mode",
|
|
3194
|
+
"displayOptions": {
|
|
3195
|
+
"show": {
|
|
3196
|
+
"operation": [
|
|
3197
|
+
"Send Voice"
|
|
3198
|
+
],
|
|
3199
|
+
"resource": [
|
|
3200
|
+
"Chatting"
|
|
3201
|
+
]
|
|
3202
|
+
}
|
|
3203
|
+
},
|
|
3204
|
+
"name": "fileUploadMode",
|
|
3205
|
+
"options": [
|
|
3206
|
+
{
|
|
3207
|
+
"name": "JSON",
|
|
3208
|
+
"value": "JSON"
|
|
3209
|
+
},
|
|
3210
|
+
{
|
|
3211
|
+
"name": "Binary",
|
|
3212
|
+
"value": "Binary"
|
|
3213
|
+
}
|
|
3214
|
+
],
|
|
3215
|
+
"type": "options"
|
|
3216
|
+
},
|
|
3061
3217
|
{
|
|
3062
3218
|
"default": "{\n \"mimetype\": \"audio/ogg; codecs=opus\",\n \"url\": \"https://github.com/devlikeapro/waha/raw/core/examples/dev.likeapro.opus\"\n}",
|
|
3063
3219
|
"displayName": "File",
|
|
3064
3220
|
"displayOptions": {
|
|
3065
3221
|
"show": {
|
|
3222
|
+
"fileUploadMode": [
|
|
3223
|
+
"JSON"
|
|
3224
|
+
],
|
|
3066
3225
|
"operation": [
|
|
3067
3226
|
"Send Voice"
|
|
3068
3227
|
],
|
|
@@ -3078,11 +3237,39 @@ test('WAHAv202502.description.properties', () => {
|
|
|
3078
3237
|
"property": "file",
|
|
3079
3238
|
"propertyInDotNotation": false,
|
|
3080
3239
|
"type": "body",
|
|
3081
|
-
"value": "={{ JSON.parse($value) }}"
|
|
3240
|
+
"value": "={{ $parameter.fileUploadMode === 'Binary' ? undefined : JSON.parse($value) }}"
|
|
3082
3241
|
}
|
|
3083
3242
|
},
|
|
3084
3243
|
"type": "json"
|
|
3085
3244
|
},
|
|
3245
|
+
{
|
|
3246
|
+
"default": "data",
|
|
3247
|
+
"description": "Name of the binary property which contains the data to upload",
|
|
3248
|
+
"displayName": "File",
|
|
3249
|
+
"displayOptions": {
|
|
3250
|
+
"show": {
|
|
3251
|
+
"fileUploadMode": [
|
|
3252
|
+
"Binary"
|
|
3253
|
+
],
|
|
3254
|
+
"operation": [
|
|
3255
|
+
"Send Voice"
|
|
3256
|
+
],
|
|
3257
|
+
"resource": [
|
|
3258
|
+
"Chatting"
|
|
3259
|
+
]
|
|
3260
|
+
}
|
|
3261
|
+
},
|
|
3262
|
+
"name": "binaryPropertyName",
|
|
3263
|
+
"required": true,
|
|
3264
|
+
"routing": {
|
|
3265
|
+
"send": {
|
|
3266
|
+
"property": "file",
|
|
3267
|
+
"type": "body",
|
|
3268
|
+
"value": "={{ $binary[$value] }}"
|
|
3269
|
+
}
|
|
3270
|
+
},
|
|
3271
|
+
"type": "string"
|
|
3272
|
+
},
|
|
3086
3273
|
{
|
|
3087
3274
|
"default": "",
|
|
3088
3275
|
"description": "The ID of the message to reply to - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA",
|
|
@@ -3177,11 +3364,41 @@ test('WAHAv202502.description.properties', () => {
|
|
|
3177
3364
|
},
|
|
3178
3365
|
"type": "string"
|
|
3179
3366
|
},
|
|
3367
|
+
{
|
|
3368
|
+
"default": "JSON",
|
|
3369
|
+
"description": "Select how to upload the file. This feature usable with mininxd/waha v2026.1.5",
|
|
3370
|
+
"displayName": "File Upload Mode",
|
|
3371
|
+
"displayOptions": {
|
|
3372
|
+
"show": {
|
|
3373
|
+
"operation": [
|
|
3374
|
+
"Send Video"
|
|
3375
|
+
],
|
|
3376
|
+
"resource": [
|
|
3377
|
+
"Chatting"
|
|
3378
|
+
]
|
|
3379
|
+
}
|
|
3380
|
+
},
|
|
3381
|
+
"name": "fileUploadMode",
|
|
3382
|
+
"options": [
|
|
3383
|
+
{
|
|
3384
|
+
"name": "JSON",
|
|
3385
|
+
"value": "JSON"
|
|
3386
|
+
},
|
|
3387
|
+
{
|
|
3388
|
+
"name": "Binary",
|
|
3389
|
+
"value": "Binary"
|
|
3390
|
+
}
|
|
3391
|
+
],
|
|
3392
|
+
"type": "options"
|
|
3393
|
+
},
|
|
3180
3394
|
{
|
|
3181
3395
|
"default": "{\n \"mimetype\": \"video/mp4\",\n \"filename\": \"video.mp4\",\n \"url\": \"https://github.com/devlikeapro/waha/raw/core/examples/video.mp4\"\n}",
|
|
3182
3396
|
"displayName": "File",
|
|
3183
3397
|
"displayOptions": {
|
|
3184
3398
|
"show": {
|
|
3399
|
+
"fileUploadMode": [
|
|
3400
|
+
"JSON"
|
|
3401
|
+
],
|
|
3185
3402
|
"operation": [
|
|
3186
3403
|
"Send Video"
|
|
3187
3404
|
],
|
|
@@ -3197,11 +3414,39 @@ test('WAHAv202502.description.properties', () => {
|
|
|
3197
3414
|
"property": "file",
|
|
3198
3415
|
"propertyInDotNotation": false,
|
|
3199
3416
|
"type": "body",
|
|
3200
|
-
"value": "={{ JSON.parse($value) }}"
|
|
3417
|
+
"value": "={{ $parameter.fileUploadMode === 'Binary' ? undefined : JSON.parse($value) }}"
|
|
3201
3418
|
}
|
|
3202
3419
|
},
|
|
3203
3420
|
"type": "json"
|
|
3204
3421
|
},
|
|
3422
|
+
{
|
|
3423
|
+
"default": "data",
|
|
3424
|
+
"description": "Name of the binary property which contains the data to upload",
|
|
3425
|
+
"displayName": "File",
|
|
3426
|
+
"displayOptions": {
|
|
3427
|
+
"show": {
|
|
3428
|
+
"fileUploadMode": [
|
|
3429
|
+
"Binary"
|
|
3430
|
+
],
|
|
3431
|
+
"operation": [
|
|
3432
|
+
"Send Video"
|
|
3433
|
+
],
|
|
3434
|
+
"resource": [
|
|
3435
|
+
"Chatting"
|
|
3436
|
+
]
|
|
3437
|
+
}
|
|
3438
|
+
},
|
|
3439
|
+
"name": "binaryPropertyName",
|
|
3440
|
+
"required": true,
|
|
3441
|
+
"routing": {
|
|
3442
|
+
"send": {
|
|
3443
|
+
"property": "file",
|
|
3444
|
+
"type": "body",
|
|
3445
|
+
"value": "={{ $binary[$value] }}"
|
|
3446
|
+
}
|
|
3447
|
+
},
|
|
3448
|
+
"type": "string"
|
|
3449
|
+
},
|
|
3205
3450
|
{
|
|
3206
3451
|
"default": "",
|
|
3207
3452
|
"description": "The ID of the message to reply to - false_11111111111@c.us_AAAAAAAAAAAAAAAAAAAA",
|
|
@@ -10673,6 +10918,6 @@ test('WAHAv202502.description.properties', () => {
|
|
|
10673
10918
|
}
|
|
10674
10919
|
}
|
|
10675
10920
|
];
|
|
10676
|
-
expect(
|
|
10921
|
+
expect(properties).toEqual(expected);
|
|
10677
10922
|
});
|
|
10678
10923
|
//# sourceMappingURL=WAHAv202502.test.js.map
|