n8n-nodes-waha-split 2026.15.10-dev1 → 2026.15.10-dev2
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.
|
@@ -88,63 +88,60 @@ const config = {
|
|
|
88
88
|
const parser = new n8n_openapi_node_1.N8NPropertiesBuilder(doc, config);
|
|
89
89
|
const properties = parser.build(customDefaults);
|
|
90
90
|
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
|
+
const supportedBinaryOps = ['Send Image', 'Send File', 'Send Voice', 'Send Video'];
|
|
91
92
|
if (chattingOp && chattingOp.options) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
];
|
|
98
|
-
endpoints.forEach((ep) => {
|
|
99
|
-
chattingOp.options.push({
|
|
100
|
-
name: `${ep.name} (Binary)`,
|
|
101
|
-
value: `${ep.name} (Binary)`,
|
|
102
|
-
action: `${ep.name} (Binary)`,
|
|
103
|
-
description: 'This feature usable with mininxd/waha v2026.1.5',
|
|
104
|
-
routing: {
|
|
105
|
-
request: {
|
|
106
|
-
method: 'POST',
|
|
107
|
-
url: `=${ep.path}`,
|
|
108
|
-
headers: {
|
|
109
|
-
'Content-Type': 'multipart/form-data',
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
send: {
|
|
113
|
-
type: 'body',
|
|
114
|
-
property: 'file',
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
properties.forEach((p) => {
|
|
121
|
-
var _a, _b;
|
|
122
|
-
if ((_b = (_a = p.displayOptions) === null || _a === void 0 ? void 0 : _a.show) === null || _b === void 0 ? void 0 : _b.operation) {
|
|
123
|
-
const ops = p.displayOptions.show.operation;
|
|
124
|
-
const newOps = [];
|
|
125
|
-
if (p.name !== 'file') {
|
|
126
|
-
if (ops.includes('Send Image'))
|
|
127
|
-
newOps.push('Send Image (Binary)');
|
|
128
|
-
if (ops.includes('Send File'))
|
|
129
|
-
newOps.push('Send File (Binary)');
|
|
130
|
-
if (ops.includes('Send Voice'))
|
|
131
|
-
newOps.push('Send Voice (Binary)');
|
|
132
|
-
if (ops.includes('Send Video'))
|
|
133
|
-
newOps.push('Send Video (Binary)');
|
|
134
|
-
}
|
|
135
|
-
if (newOps.length > 0) {
|
|
136
|
-
if (p.displayOptions) {
|
|
137
|
-
p.displayOptions = { ...p.displayOptions };
|
|
138
|
-
if (p.displayOptions.show) {
|
|
139
|
-
p.displayOptions.show = { ...p.displayOptions.show };
|
|
93
|
+
chattingOp.options.forEach((option) => {
|
|
94
|
+
if (supportedBinaryOps.includes(option.name)) {
|
|
95
|
+
if (option.routing && option.routing.request) {
|
|
96
|
+
if (!option.routing.request.headers) {
|
|
97
|
+
option.routing.request.headers = {};
|
|
140
98
|
}
|
|
99
|
+
option.routing.request.headers['Content-Type'] = '={{ $parameter.fileUploadMode === "Binary" ? "multipart/form-data" : "application/json" }}';
|
|
141
100
|
}
|
|
142
|
-
p.displayOptions.show.operation = [...new Set([...ops, ...newOps])];
|
|
143
101
|
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const filePropIndex = properties.findIndex((p) => p.name === 'file');
|
|
105
|
+
if (filePropIndex !== -1) {
|
|
106
|
+
properties.splice(filePropIndex, 0, {
|
|
107
|
+
displayName: 'File Upload Mode',
|
|
108
|
+
name: 'fileUploadMode',
|
|
109
|
+
type: 'options',
|
|
110
|
+
options: [
|
|
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
|
+
},
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
const fileProp = properties[filePropIndex + 1];
|
|
130
|
+
if (fileProp.displayOptions) {
|
|
131
|
+
fileProp.displayOptions = { ...fileProp.displayOptions };
|
|
144
132
|
}
|
|
145
|
-
|
|
133
|
+
else {
|
|
134
|
+
fileProp.displayOptions = {};
|
|
135
|
+
}
|
|
136
|
+
fileProp.displayOptions.hide = {
|
|
137
|
+
fileUploadMode: ['Binary'],
|
|
138
|
+
};
|
|
139
|
+
if (fileProp.routing && fileProp.routing.send && fileProp.routing.send.value) {
|
|
140
|
+
fileProp.routing.send.value = `={{ $parameter.fileUploadMode === 'Binary' ? undefined : JSON.parse($value) }}`;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
146
143
|
properties.push({
|
|
147
|
-
displayName: '
|
|
144
|
+
displayName: 'Binary Property',
|
|
148
145
|
name: 'binaryPropertyName',
|
|
149
146
|
type: 'string',
|
|
150
147
|
default: 'data',
|
|
@@ -152,15 +149,18 @@ properties.push({
|
|
|
152
149
|
displayOptions: {
|
|
153
150
|
show: {
|
|
154
151
|
resource: ['Chatting'],
|
|
155
|
-
operation:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
152
|
+
operation: supportedBinaryOps,
|
|
153
|
+
fileUploadMode: ['Binary'],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
routing: {
|
|
157
|
+
send: {
|
|
158
|
+
type: 'body',
|
|
159
|
+
property: 'file',
|
|
160
|
+
value: '={{ $binary[$value] }}',
|
|
161
161
|
},
|
|
162
162
|
},
|
|
163
|
-
description: 'Name of the binary property to upload',
|
|
163
|
+
description: 'Name of the binary property which contains the data to upload',
|
|
164
164
|
});
|
|
165
165
|
class WAHAv202502 {
|
|
166
166
|
constructor() {
|
|
@@ -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,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;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,QAAQ;SACd;QACD,OAAO,EAAE;YACR,OAAO,EAAE,2BAA2B;SACpC;KACD;IACD;QACC,IAAI,EAAE;YACL,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ;SACd;QACD,OAAO,EAAE;YACR,OAAO,EAAE,yBAAyB;SAClC;KACD;IACD;QACC,IAAI,EAAE;YACL,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;SACd;QACD,OAAO,EAAE;YACR,OAAO,EAAE,EAAE;SACX;KACD;CACD,CAAC;AAEF,MAAM,MAAM,GAA+B;IAC1C,mBAAmB,EAAE,iDAA8B;IACnD,SAAS,EAAE,IAAI,yCAAmB,EAAE;IACpC,QAAQ,EAAE,IAAI,uCAAkB,EAAE;CAClC,CAAC;AACF,MAAM,MAAM,GAAG,IAAI,uCAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AACrD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;AAGhD,MAAM,UAAU,GAAG,UAA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