n8n-nodes-ume-v4 4.1.0 → 4.2.1
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 +10 -2
- package/dist/nodes/UmeSocialSeeding/services-data.json +70 -117
- 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();
|
@@ -301,7 +301,11 @@
|
|
301
301
|
{
|
302
302
|
"name": "speed",
|
303
303
|
"defaultValue": "0",
|
304
|
-
"options": [
|
304
|
+
"options": [
|
305
|
+
"0",
|
306
|
+
"15",
|
307
|
+
"60"
|
308
|
+
]
|
305
309
|
},
|
306
310
|
{
|
307
311
|
"name": "note",
|
@@ -356,7 +360,11 @@
|
|
356
360
|
{
|
357
361
|
"name": "speed",
|
358
362
|
"defaultValue": "0",
|
359
|
-
"options": [
|
363
|
+
"options": [
|
364
|
+
"0",
|
365
|
+
"15",
|
366
|
+
"60"
|
367
|
+
]
|
360
368
|
},
|
361
369
|
{
|
362
370
|
"name": "note",
|
@@ -10,7 +10,7 @@
|
|
10
10
|
"displayName": "ID bài viết hoặc URL",
|
11
11
|
"type": "string",
|
12
12
|
"required": false,
|
13
|
-
"default": "",
|
13
|
+
"default": "123",
|
14
14
|
"description": "ID hoặc URL gốc của facebook (hệ thống sẽ tự động trích xuất ID từ URL) (Hệ thống sẽ tự động trích xuất ID từ URL nếu bạn nhập link) (Hệ thống sẽ tự động trích xuất ID từ URL nếu bạn nhập link)"
|
15
15
|
},
|
16
16
|
{
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"displayName": "Số lượng",
|
19
19
|
"type": "number",
|
20
20
|
"required": false,
|
21
|
-
"default": 100,
|
21
|
+
"default": "100",
|
22
22
|
"description": "Số lượng cần tăng",
|
23
23
|
"typeOptions": {
|
24
24
|
"minValue": 5,
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"displayName": "Chọn Server",
|
31
31
|
"type": "options",
|
32
32
|
"required": false,
|
33
|
-
"default": "
|
33
|
+
"default": "server_3",
|
34
34
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
35
35
|
"options": [
|
36
36
|
{
|
@@ -90,10 +90,11 @@
|
|
90
90
|
{
|
91
91
|
"name": "list_comment",
|
92
92
|
"displayName": "Danh sách bình luận",
|
93
|
-
"type": "
|
94
|
-
"required":
|
95
|
-
"default": "
|
96
|
-
"description": ""
|
93
|
+
"type": "textarea",
|
94
|
+
"required": true,
|
95
|
+
"default": "",
|
96
|
+
"description": "Mỗi bình luận trên một dòng. Hệ thống sẽ tự động xử lý trước khi gửi đi.",
|
97
|
+
"placeholder": "Nội dung bình luận 1\nNội dung bình luận 2\nNội dung bình luận 3"
|
97
98
|
},
|
98
99
|
{
|
99
100
|
"name": "speed",
|
@@ -106,22 +107,6 @@
|
|
106
107
|
"minValue": 1,
|
107
108
|
"maxValue": 60
|
108
109
|
}
|
109
|
-
},
|
110
|
-
{
|
111
|
-
"name": "list_sticker",
|
112
|
-
"displayName": "Danh sách sticker",
|
113
|
-
"type": "options",
|
114
|
-
"required": false,
|
115
|
-
"default": "sticker_id1|sticker_id2|sticker_id3",
|
116
|
-
"description": "Sticker tùy chỉnh (chỉ v4)"
|
117
|
-
},
|
118
|
-
{
|
119
|
-
"name": "list_link",
|
120
|
-
"displayName": "Danh sách link ảnh",
|
121
|
-
"type": "options",
|
122
|
-
"required": false,
|
123
|
-
"default": "link1|link2",
|
124
|
-
"description": "Danh sách link ảnh (url1|url2|url..) (chỉ v4)"
|
125
110
|
}
|
126
111
|
],
|
127
112
|
"warnings": [
|
@@ -357,7 +342,7 @@
|
|
357
342
|
"displayName": "Chọn Server",
|
358
343
|
"type": "options",
|
359
344
|
"required": false,
|
360
|
-
"default": "
|
345
|
+
"default": "server_1",
|
361
346
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
362
347
|
"options": [
|
363
348
|
{
|
@@ -762,7 +747,21 @@
|
|
762
747
|
"description": "0, 15, 50 tương ứng nhanh, bình thường, chậm",
|
763
748
|
"typeOptions": {
|
764
749
|
"minValue": 1,
|
765
|
-
"maxValue": 60
|
750
|
+
"maxValue": 60,
|
751
|
+
"options": [
|
752
|
+
{
|
753
|
+
"name": "Nhanh",
|
754
|
+
"value": "0"
|
755
|
+
},
|
756
|
+
{
|
757
|
+
"name": "Trung bình",
|
758
|
+
"value": "15"
|
759
|
+
},
|
760
|
+
{
|
761
|
+
"name": "Chậm",
|
762
|
+
"value": "60"
|
763
|
+
}
|
764
|
+
]
|
766
765
|
}
|
767
766
|
},
|
768
767
|
{
|
@@ -917,7 +916,7 @@
|
|
917
916
|
"displayName": "Chọn Server",
|
918
917
|
"type": "options",
|
919
918
|
"required": false,
|
920
|
-
"default": "
|
919
|
+
"default": "server_1",
|
921
920
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
922
921
|
"options": [
|
923
922
|
{
|
@@ -983,7 +982,21 @@
|
|
983
982
|
"description": "0, 15, 50 tương ứng nhanh, bình thường, chậm (sv 1 + 3)",
|
984
983
|
"typeOptions": {
|
985
984
|
"minValue": 1,
|
986
|
-
"maxValue": 60
|
985
|
+
"maxValue": 60,
|
986
|
+
"options": [
|
987
|
+
{
|
988
|
+
"name": "Nhanh",
|
989
|
+
"value": "0"
|
990
|
+
},
|
991
|
+
{
|
992
|
+
"name": "Trung bình",
|
993
|
+
"value": "15"
|
994
|
+
},
|
995
|
+
{
|
996
|
+
"name": "Chậm",
|
997
|
+
"value": "60"
|
998
|
+
}
|
999
|
+
]
|
987
1000
|
}
|
988
1001
|
},
|
989
1002
|
{
|
@@ -1055,7 +1068,7 @@
|
|
1055
1068
|
"displayName": "Chọn Server",
|
1056
1069
|
"type": "options",
|
1057
1070
|
"required": false,
|
1058
|
-
"default": "
|
1071
|
+
"default": "server_1",
|
1059
1072
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
1060
1073
|
"options": [
|
1061
1074
|
{
|
@@ -1138,7 +1151,7 @@
|
|
1138
1151
|
"displayName": "Chọn Server",
|
1139
1152
|
"type": "options",
|
1140
1153
|
"required": false,
|
1141
|
-
"default": "
|
1154
|
+
"default": "server_1",
|
1142
1155
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
1143
1156
|
"options": [
|
1144
1157
|
{
|
@@ -1281,7 +1294,7 @@
|
|
1281
1294
|
"displayName": "Chọn Server",
|
1282
1295
|
"type": "options",
|
1283
1296
|
"required": false,
|
1284
|
-
"default": "
|
1297
|
+
"default": "server_1",
|
1285
1298
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
1286
1299
|
"options": [
|
1287
1300
|
{
|
@@ -1321,10 +1334,11 @@
|
|
1321
1334
|
{
|
1322
1335
|
"name": "list_comment",
|
1323
1336
|
"displayName": "Danh sách bình luận",
|
1324
|
-
"type": "
|
1325
|
-
"required":
|
1326
|
-
"default": "
|
1327
|
-
"description": ""
|
1337
|
+
"type": "textarea",
|
1338
|
+
"required": true,
|
1339
|
+
"default": "",
|
1340
|
+
"description": "Mỗi bình luận trên một dòng. Hệ thống sẽ tự động xử lý trước khi gửi đi.",
|
1341
|
+
"placeholder": "Nội dung bình luận 1\nNội dung bình luận 2\nNội dung bình luận 3"
|
1328
1342
|
},
|
1329
1343
|
{
|
1330
1344
|
"name": "speed",
|
@@ -1337,22 +1351,6 @@
|
|
1337
1351
|
"minValue": 1,
|
1338
1352
|
"maxValue": 60
|
1339
1353
|
}
|
1340
|
-
},
|
1341
|
-
{
|
1342
|
-
"name": "list_sticker",
|
1343
|
-
"displayName": "Danh sách sticker",
|
1344
|
-
"type": "options",
|
1345
|
-
"required": false,
|
1346
|
-
"default": "sticker_id1|sticker_id2|sticker_id3",
|
1347
|
-
"description": "Sticker tùy chỉnh (chỉ v4)"
|
1348
|
-
},
|
1349
|
-
{
|
1350
|
-
"name": "list_link",
|
1351
|
-
"displayName": "Danh sách link ảnh",
|
1352
|
-
"type": "options",
|
1353
|
-
"required": false,
|
1354
|
-
"default": "link1|link2",
|
1355
|
-
"description": "Danh sách link ảnh (url1|url2|url..) (chỉ v4)"
|
1356
1354
|
}
|
1357
1355
|
],
|
1358
1356
|
"warnings": [
|
@@ -1734,7 +1732,7 @@
|
|
1734
1732
|
"displayName": "Chọn Server",
|
1735
1733
|
"type": "options",
|
1736
1734
|
"required": false,
|
1737
|
-
"default": "
|
1735
|
+
"default": "server_1",
|
1738
1736
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
1739
1737
|
"options": [
|
1740
1738
|
{
|
@@ -1946,7 +1944,7 @@
|
|
1946
1944
|
"displayName": "Chọn Server",
|
1947
1945
|
"type": "options",
|
1948
1946
|
"required": false,
|
1949
|
-
"default": "
|
1947
|
+
"default": "server_1",
|
1950
1948
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
1951
1949
|
"options": [
|
1952
1950
|
{
|
@@ -1986,10 +1984,11 @@
|
|
1986
1984
|
{
|
1987
1985
|
"name": "list_comment",
|
1988
1986
|
"displayName": "Danh sách bình luận",
|
1989
|
-
"type": "
|
1990
|
-
"required":
|
1991
|
-
"default": "
|
1992
|
-
"description": ""
|
1987
|
+
"type": "textarea",
|
1988
|
+
"required": true,
|
1989
|
+
"default": "",
|
1990
|
+
"description": "Mỗi bình luận trên một dòng. Hệ thống sẽ tự động xử lý trước khi gửi đi.",
|
1991
|
+
"placeholder": "Nội dung bình luận 1\nNội dung bình luận 2\nNội dung bình luận 3"
|
1993
1992
|
},
|
1994
1993
|
{
|
1995
1994
|
"name": "speed",
|
@@ -2002,22 +2001,6 @@
|
|
2002
2001
|
"minValue": 1,
|
2003
2002
|
"maxValue": 60
|
2004
2003
|
}
|
2005
|
-
},
|
2006
|
-
{
|
2007
|
-
"name": "list_sticker",
|
2008
|
-
"displayName": "Danh sách sticker",
|
2009
|
-
"type": "options",
|
2010
|
-
"required": false,
|
2011
|
-
"default": "sticker_id1|sticker_id2|sticker_id3",
|
2012
|
-
"description": "Sticker tùy chỉnh (chỉ v4)"
|
2013
|
-
},
|
2014
|
-
{
|
2015
|
-
"name": "list_link",
|
2016
|
-
"displayName": "Danh sách link ảnh",
|
2017
|
-
"type": "options",
|
2018
|
-
"required": false,
|
2019
|
-
"default": "link1|link2",
|
2020
|
-
"description": "Danh sách link ảnh (url1|url2|url..) (chỉ v4)"
|
2021
2004
|
}
|
2022
2005
|
],
|
2023
2006
|
"warnings": [
|
@@ -2216,7 +2199,7 @@
|
|
2216
2199
|
"displayName": "Chọn Server",
|
2217
2200
|
"type": "options",
|
2218
2201
|
"required": false,
|
2219
|
-
"default": "
|
2202
|
+
"default": "server_1",
|
2220
2203
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
2221
2204
|
"options": [
|
2222
2205
|
{
|
@@ -2691,7 +2674,7 @@
|
|
2691
2674
|
"displayName": "Chọn Server",
|
2692
2675
|
"type": "options",
|
2693
2676
|
"required": false,
|
2694
|
-
"default": "
|
2677
|
+
"default": "server_1",
|
2695
2678
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
2696
2679
|
"options": [
|
2697
2680
|
{
|
@@ -2893,10 +2876,11 @@
|
|
2893
2876
|
{
|
2894
2877
|
"name": "list_comment",
|
2895
2878
|
"displayName": "Danh sách bình luận",
|
2896
|
-
"type": "
|
2897
|
-
"required":
|
2898
|
-
"default": "
|
2899
|
-
"description": ""
|
2879
|
+
"type": "textarea",
|
2880
|
+
"required": true,
|
2881
|
+
"default": "",
|
2882
|
+
"description": "Mỗi bình luận trên một dòng. Hệ thống sẽ tự động xử lý trước khi gửi đi.",
|
2883
|
+
"placeholder": "Nội dung bình luận 1\nNội dung bình luận 2\nNội dung bình luận 3"
|
2900
2884
|
},
|
2901
2885
|
{
|
2902
2886
|
"name": "speed",
|
@@ -2909,22 +2893,6 @@
|
|
2909
2893
|
"minValue": 1,
|
2910
2894
|
"maxValue": 60
|
2911
2895
|
}
|
2912
|
-
},
|
2913
|
-
{
|
2914
|
-
"name": "list_sticker",
|
2915
|
-
"displayName": "Danh sách sticker",
|
2916
|
-
"type": "options",
|
2917
|
-
"required": false,
|
2918
|
-
"default": "sticker_id1|sticker_id2|sticker_id3",
|
2919
|
-
"description": "Sticker tùy chỉnh (chỉ v4)"
|
2920
|
-
},
|
2921
|
-
{
|
2922
|
-
"name": "list_link",
|
2923
|
-
"displayName": "Danh sách link ảnh",
|
2924
|
-
"type": "options",
|
2925
|
-
"required": false,
|
2926
|
-
"default": "link1|link2",
|
2927
|
-
"description": "Danh sách link ảnh (url1|url2|url..) (chỉ v4)"
|
2928
2896
|
}
|
2929
2897
|
],
|
2930
2898
|
"warnings": [],
|
@@ -2990,7 +2958,7 @@
|
|
2990
2958
|
"displayName": "Chọn Server",
|
2991
2959
|
"type": "options",
|
2992
2960
|
"required": false,
|
2993
|
-
"default": "
|
2961
|
+
"default": "server_1",
|
2994
2962
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
2995
2963
|
"options": [
|
2996
2964
|
{
|
@@ -3123,7 +3091,7 @@
|
|
3123
3091
|
"displayName": "Chọn Server",
|
3124
3092
|
"type": "options",
|
3125
3093
|
"required": false,
|
3126
|
-
"default": "
|
3094
|
+
"default": "server_1",
|
3127
3095
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
3128
3096
|
"options": [
|
3129
3097
|
{
|
@@ -3229,7 +3197,7 @@
|
|
3229
3197
|
"displayName": "Chọn Server",
|
3230
3198
|
"type": "options",
|
3231
3199
|
"required": false,
|
3232
|
-
"default": "
|
3200
|
+
"default": "server_1",
|
3233
3201
|
"description": "Chọn server phù hợp với yêu cầu của bạn",
|
3234
3202
|
"options": [
|
3235
3203
|
{
|
@@ -3399,10 +3367,11 @@
|
|
3399
3367
|
{
|
3400
3368
|
"name": "list_comment",
|
3401
3369
|
"displayName": "Danh sách bình luận",
|
3402
|
-
"type": "
|
3403
|
-
"required":
|
3404
|
-
"default": "
|
3405
|
-
"description": ""
|
3370
|
+
"type": "textarea",
|
3371
|
+
"required": true,
|
3372
|
+
"default": "",
|
3373
|
+
"description": "Mỗi bình luận trên một dòng. Hệ thống sẽ tự động xử lý trước khi gửi đi.",
|
3374
|
+
"placeholder": "Nội dung bình luận 1\nNội dung bình luận 2\nNội dung bình luận 3"
|
3406
3375
|
},
|
3407
3376
|
{
|
3408
3377
|
"name": "speed",
|
@@ -3415,22 +3384,6 @@
|
|
3415
3384
|
"minValue": 1,
|
3416
3385
|
"maxValue": 60
|
3417
3386
|
}
|
3418
|
-
},
|
3419
|
-
{
|
3420
|
-
"name": "list_sticker",
|
3421
|
-
"displayName": "Danh sách sticker",
|
3422
|
-
"type": "options",
|
3423
|
-
"required": false,
|
3424
|
-
"default": "sticker_id1|sticker_id2|sticker_id3",
|
3425
|
-
"description": "Sticker tùy chỉnh (chỉ v4)"
|
3426
|
-
},
|
3427
|
-
{
|
3428
|
-
"name": "list_link",
|
3429
|
-
"displayName": "Danh sách link ảnh",
|
3430
|
-
"type": "options",
|
3431
|
-
"required": false,
|
3432
|
-
"default": "link1|link2",
|
3433
|
-
"description": "Danh sách link ảnh (url1|url2|url..) (chỉ v4)"
|
3434
3387
|
}
|
3435
3388
|
],
|
3436
3389
|
"warnings": [
|