n8n-nodes-ume-v4 4.0.1 → 4.2.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.
- package/dist/nodes/UmeSocialSeeding/UmeSocialSeeding.node.js +20 -0
- package/dist/nodes/UmeSocialSeeding/UmeSocialSeedingHelpers.d.ts +1 -0
- package/dist/nodes/UmeSocialSeeding/UmeSocialSeedingHelpers.js +23 -0
- package/dist/nodes/UmeSocialSeeding/operations-data.json +1023 -189
- package/dist/nodes/UmeSocialSeeding/services-data.json +1637 -5493
- package/package.json +1 -1
@@ -145,6 +145,26 @@ class UmeSocialSeeding {
|
|
145
145
|
// Set default note if empty
|
146
146
|
formBody[parameter.name] = value.trim() || "Auto-generated by n8n UME Social Seeding";
|
147
147
|
}
|
148
|
+
else if (parameter.name === 'list_comment') {
|
149
|
+
// Process comment list - convert multiline to API format
|
150
|
+
const processedComments = (0, UmeSocialSeedingHelpers_1.processCommentList)(value.trim());
|
151
|
+
if (processedComments) {
|
152
|
+
formBody[parameter.name] = processedComments;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
else if (value && value.trim() !== "") {
|
156
|
+
formBody[parameter.name] = value.trim();
|
157
|
+
}
|
158
|
+
}
|
159
|
+
else if (parameter.type === 'textarea') {
|
160
|
+
const value = this.getNodeParameter(parameter.name, itemIndex, "");
|
161
|
+
if (parameter.name === 'list_comment') {
|
162
|
+
// Process comment list - convert multiline to API format
|
163
|
+
const processedComments = (0, UmeSocialSeedingHelpers_1.processCommentList)(value.trim());
|
164
|
+
if (processedComments) {
|
165
|
+
formBody[parameter.name] = processedComments;
|
166
|
+
}
|
167
|
+
}
|
148
168
|
else if (value && value.trim() !== "") {
|
149
169
|
formBody[parameter.name] = value.trim();
|
150
170
|
}
|
@@ -2,3 +2,4 @@ import type { INodeProperties } from "n8n-workflow";
|
|
2
2
|
export declare function getDynamicProperties(): INodeProperties[];
|
3
3
|
export declare function extractIdFromUrl(url: string, serviceKey?: string): string;
|
4
4
|
export declare function generateAutoNote(serviceName: string, platform: string, inputData: any): string;
|
5
|
+
export declare function processCommentList(commentList: string): string;
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getDynamicProperties = getDynamicProperties;
|
7
7
|
exports.extractIdFromUrl = extractIdFromUrl;
|
8
8
|
exports.generateAutoNote = generateAutoNote;
|
9
|
+
exports.processCommentList = processCommentList;
|
9
10
|
const services_data_json_1 = __importDefault(require("./services-data.json"));
|
10
11
|
function getServerDetails(serviceData, serverId) {
|
11
12
|
if (!serviceData || !serviceData.servers) {
|
@@ -351,6 +352,28 @@ function extractIdFromUrl(url, serviceKey) {
|
|
351
352
|
return url;
|
352
353
|
}
|
353
354
|
|
355
|
+
// Process comment list - convert multiline input to API format
|
356
|
+
function processCommentList(commentList) {
|
357
|
+
if (!commentList || typeof commentList !== 'string') {
|
358
|
+
return commentList;
|
359
|
+
}
|
360
|
+
|
361
|
+
// Split by newlines and filter empty lines
|
362
|
+
const comments = commentList
|
363
|
+
.split('\n')
|
364
|
+
.map(line => line.trim())
|
365
|
+
.filter(line => line.length > 0);
|
366
|
+
|
367
|
+
// If only one comment, return as is
|
368
|
+
if (comments.length === 1) {
|
369
|
+
return comments[0];
|
370
|
+
}
|
371
|
+
|
372
|
+
// If multiple comments, join with newline for API that supports it
|
373
|
+
// or return first comment for APIs that only accept single comment
|
374
|
+
return comments.join('\n');
|
375
|
+
}
|
376
|
+
|
354
377
|
// Generate auto note from n8n execution context
|
355
378
|
function generateAutoNote(serviceName, platform, inputData) {
|
356
379
|
const timestamp = new Date().toISOString();
|