n8n-nodes-waha-split 2026.15.10-dev4 → 2026.15.10-dev5
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 +38 -73
- package/dist/nodes/WAHA/v202502/WAHAv202502.js.map +1 -1
- package/dist/nodes/WAHA/v202502/WAHAv202502.test.js +4785 -4779
- 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
|
@@ -90,44 +90,29 @@ const parser = new n8n_openapi_node_1.N8NPropertiesBuilder(doc, config);
|
|
|
90
90
|
const properties = parser.build(customDefaults);
|
|
91
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')); });
|
|
92
92
|
const supportedBinaryOps = ['Send Image', 'Send File', 'Send Voice', 'Send Video'];
|
|
93
|
-
const
|
|
93
|
+
const newOptions = [];
|
|
94
94
|
if (chattingOp && chattingOp.options) {
|
|
95
95
|
chattingOp.options.forEach((option) => {
|
|
96
96
|
if (supportedBinaryOps.includes(option.value)) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
const newOption = JSON.parse(JSON.stringify(option));
|
|
98
|
+
newOption.name = `${option.name} (Binary)`;
|
|
99
|
+
newOption.value = `${option.value}:Binary`;
|
|
100
|
+
newOption.description =
|
|
101
|
+
'Binary file operation is usable with <a href="https://hub.docker.com/r/mininxd/waha">mininxd/waha</a> v2026.1.5+. Uploads file via multipart/form-data.';
|
|
102
|
+
if (!newOption.routing)
|
|
103
|
+
newOption.routing = {};
|
|
104
|
+
newOption.routing.sendBinaryData = true;
|
|
105
|
+
newOption.routing.binaryPropertyName = '={{$parameter.binaryPropertyName}}';
|
|
106
|
+
if (newOption.routing.request && newOption.routing.request.headers) {
|
|
107
|
+
delete newOption.routing.request.headers['Content-Type'];
|
|
103
108
|
}
|
|
109
|
+
newOptions.push(newOption);
|
|
104
110
|
}
|
|
105
111
|
});
|
|
112
|
+
chattingOp.options.push(...newOptions);
|
|
106
113
|
}
|
|
107
|
-
const fileUploadModeTemplate = {
|
|
108
|
-
displayName: 'File Upload Mode',
|
|
109
|
-
name: 'fileUploadMode',
|
|
110
|
-
type: 'options',
|
|
111
|
-
options: [
|
|
112
|
-
{
|
|
113
|
-
name: 'JSON',
|
|
114
|
-
value: 'JSON',
|
|
115
|
-
},
|
|
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
114
|
const binaryPropTemplate = {
|
|
130
|
-
displayName: '
|
|
115
|
+
displayName: 'Input Binary Field',
|
|
131
116
|
name: 'binaryPropertyName',
|
|
132
117
|
type: 'string',
|
|
133
118
|
default: 'data',
|
|
@@ -135,60 +120,40 @@ const binaryPropTemplate = {
|
|
|
135
120
|
displayOptions: {
|
|
136
121
|
show: {
|
|
137
122
|
resource: ['Chatting'],
|
|
138
|
-
fileUploadMode: ['Binary'],
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
routing: {
|
|
142
|
-
send: {
|
|
143
|
-
type: 'body',
|
|
144
|
-
property: 'file',
|
|
145
|
-
value: '={{ $binary[$value] }}',
|
|
146
123
|
},
|
|
147
124
|
},
|
|
148
|
-
description: '
|
|
125
|
+
description: 'The name of the binary property which contains the file to be uploaded. Binary file operation is usable with <a href="https://hub.docker.com/r/mininxd/waha">mininxd/waha</a> v2026.1.5+.',
|
|
149
126
|
};
|
|
150
127
|
for (let i = properties.length - 1; i >= 0; i--) {
|
|
151
128
|
const p = properties[i];
|
|
152
129
|
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
130
|
const ops = p.displayOptions.show.operation;
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
157
|
-
modeParam.displayOptions.show.operation = [supportedOp];
|
|
131
|
+
const relevantOps = ops && ops.filter((op) => supportedBinaryOps.includes(op));
|
|
132
|
+
if (relevantOps && relevantOps.length > 0) {
|
|
133
|
+
const relevantBinaryOpsValues = relevantOps.map((op) => `${op}:Binary`);
|
|
158
134
|
const binaryParam = JSON.parse(JSON.stringify(binaryPropTemplate));
|
|
159
|
-
binaryParam.displayOptions.show.operation =
|
|
160
|
-
properties.splice(i, 0,
|
|
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);
|
|
135
|
+
binaryParam.displayOptions.show.operation = relevantBinaryOpsValues;
|
|
136
|
+
properties.splice(i + 1, 0, binaryParam);
|
|
189
137
|
}
|
|
190
138
|
}
|
|
191
139
|
}
|
|
140
|
+
properties.forEach((p) => {
|
|
141
|
+
var _a, _b;
|
|
142
|
+
if (p.name === 'file')
|
|
143
|
+
return;
|
|
144
|
+
if ((_b = (_a = p.displayOptions) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.operation) {
|
|
145
|
+
const ops = p.displayOptions.show.operation;
|
|
146
|
+
const newBinaryOps = [];
|
|
147
|
+
ops.forEach((op) => {
|
|
148
|
+
if (supportedBinaryOps.includes(op)) {
|
|
149
|
+
newBinaryOps.push(`${op}:Binary`);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
if (newBinaryOps.length > 0) {
|
|
153
|
+
ops.push(...newBinaryOps);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
192
157
|
class WAHAv202502 {
|
|
193
158
|
constructor() {
|
|
194
159
|
this.description = {
|
|
@@ -1 +1 @@
|
|
|
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,cA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