n8n-nodes-ume-v4 4.0.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.
Files changed (58) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +204 -0
  3. package/dist/credentials/UmeApi.credentials.d.ts +7 -0
  4. package/dist/credentials/UmeApi.credentials.js +41 -0
  5. package/dist/index.d.ts +4 -0
  6. package/dist/index.js +9 -0
  7. package/dist/nodes/FacebookComment/FacebookComment.node.d.ts +5 -0
  8. package/dist/nodes/FacebookComment/FacebookComment.node.js +155 -0
  9. package/dist/nodes/FacebookCommentLike/FacebookCommentLike.node.d.ts +5 -0
  10. package/dist/nodes/FacebookCommentLike/FacebookCommentLike.node.js +122 -0
  11. package/dist/nodes/FacebookLike/FacebookLike.node.d.ts +5 -0
  12. package/dist/nodes/FacebookLike/FacebookLike.node.js +160 -0
  13. package/dist/nodes/FacebookShare/FacebookShare.node.d.ts +5 -0
  14. package/dist/nodes/FacebookShare/FacebookShare.node.js +141 -0
  15. package/dist/nodes/FacebookStoryView/FacebookStoryView.node.d.ts +5 -0
  16. package/dist/nodes/FacebookStoryView/FacebookStoryView.node.js +122 -0
  17. package/dist/nodes/FacebookView/FacebookView.node.d.ts +5 -0
  18. package/dist/nodes/FacebookView/FacebookView.node.js +127 -0
  19. package/dist/nodes/InstagramComment/InstagramComment.node.d.ts +5 -0
  20. package/dist/nodes/InstagramComment/InstagramComment.node.js +145 -0
  21. package/dist/nodes/InstagramLike/InstagramLike.node.d.ts +5 -0
  22. package/dist/nodes/InstagramLike/InstagramLike.node.js +138 -0
  23. package/dist/nodes/InstagramView/InstagramView.node.d.ts +5 -0
  24. package/dist/nodes/InstagramView/InstagramView.node.js +151 -0
  25. package/dist/nodes/TikTokComment/TikTokComment.node.d.ts +5 -0
  26. package/dist/nodes/TikTokComment/TikTokComment.node.js +136 -0
  27. package/dist/nodes/TikTokCommentLike/TikTokCommentLike.node.d.ts +5 -0
  28. package/dist/nodes/TikTokCommentLike/TikTokCommentLike.node.js +122 -0
  29. package/dist/nodes/TikTokFavorite/TikTokFavorite.node.d.ts +5 -0
  30. package/dist/nodes/TikTokFavorite/TikTokFavorite.node.js +127 -0
  31. package/dist/nodes/TikTokLike/TikTokLike.node.d.ts +5 -0
  32. package/dist/nodes/TikTokLike/TikTokLike.node.js +141 -0
  33. package/dist/nodes/TikTokShare/TikTokShare.node.d.ts +5 -0
  34. package/dist/nodes/TikTokShare/TikTokShare.node.js +131 -0
  35. package/dist/nodes/TikTokView/TikTokView.node.d.ts +5 -0
  36. package/dist/nodes/TikTokView/TikTokView.node.js +136 -0
  37. package/dist/nodes/Ume/Ume.node.d.ts +5 -0
  38. package/dist/nodes/Ume/Ume.node.js +244 -0
  39. package/dist/nodes/Ume/operations-data.json +2246 -0
  40. package/dist/nodes/UmeSocialSeeding/UmeSocialSeeding.node.d.ts +5 -0
  41. package/dist/nodes/UmeSocialSeeding/UmeSocialSeeding.node.js +203 -0
  42. package/dist/nodes/UmeSocialSeeding/UmeSocialSeedingHelpers.d.ts +4 -0
  43. package/dist/nodes/UmeSocialSeeding/UmeSocialSeedingHelpers.js +382 -0
  44. package/dist/nodes/UmeSocialSeeding/operations-data.json +673 -0
  45. package/dist/nodes/UmeSocialSeeding/reaction.png +0 -0
  46. package/dist/nodes/UmeSocialSeeding/server-info.json +431 -0
  47. package/dist/nodes/UmeSocialSeeding/services-data-backup.json +3525 -0
  48. package/dist/nodes/UmeSocialSeeding/services-data-old.json +2704 -0
  49. package/dist/nodes/UmeSocialSeeding/services-data.json +7341 -0
  50. package/dist/nodes/UmeSocialSeeding/services-data.json.backup +3525 -0
  51. package/dist/nodes/UmeSocialSeeding/services-data.json.backup.1759909364606 +1927 -0
  52. package/dist/nodes/YouTubeComment/YouTubeComment.node.d.ts +5 -0
  53. package/dist/nodes/YouTubeComment/YouTubeComment.node.js +152 -0
  54. package/dist/nodes/YouTubeLike/YouTubeLike.node.d.ts +5 -0
  55. package/dist/nodes/YouTubeLike/YouTubeLike.node.js +141 -0
  56. package/dist/nodes/YouTubeView/YouTubeView.node.d.ts +5 -0
  57. package/dist/nodes/YouTubeView/YouTubeView.node.js +142 -0
  58. package/package.json +62 -0
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstagramComment = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const BASE_URL_FALLBACK = "https://ume.com.vn/api";
6
+ class InstagramComment {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: "🌱 Instagram Comment",
10
+ name: "instagramComment",
11
+ group: ["transform"],
12
+ version: 1,
13
+ subtitle: '={{$parameter["server"]}}',
14
+ description: "Tạo bình luận cho bài viết Instagram",
15
+ defaults: {
16
+ name: "🌱 Instagram Comment",
17
+ },
18
+ inputs: ["main"],
19
+ outputs: ["main"],
20
+ credentials: [
21
+ {
22
+ name: "umeApi",
23
+ required: true,
24
+ },
25
+ ],
26
+ properties: [
27
+ {
28
+ displayName: "Server",
29
+ name: "server",
30
+ type: "options",
31
+ noDataExpression: true,
32
+ options: [
33
+ {
34
+ name: "Server 2 - Nick việt (2,730₫/cmt)",
35
+ value: "2",
36
+ description: "Tối thiểu: 10, Tối đa: 10,000",
37
+ },
38
+ {
39
+ name: "Server 3 - Nick ngoại (728₫/cmt)",
40
+ value: "3",
41
+ description: "Tăng sau vài giờ, tỉ lệ trùng cao. Tối thiểu: 10, Tối đa: 250",
42
+ },
43
+ ],
44
+ default: "2",
45
+ description: "Chọn server để tạo bình luận",
46
+ },
47
+ {
48
+ displayName: "Link bài viết",
49
+ name: "link",
50
+ type: "string",
51
+ required: true,
52
+ default: "",
53
+ description: "Link bài viết Instagram cần bình luận",
54
+ },
55
+ {
56
+ displayName: "Số lượng",
57
+ name: "amount",
58
+ type: "number",
59
+ required: true,
60
+ default: 20,
61
+ description: "Số lượng bình luận cần tạo",
62
+ typeOptions: {
63
+ minValue: 10,
64
+ maxValue: 10000,
65
+ },
66
+ validateType: 'number',
67
+ },
68
+ {
69
+ displayName: "Nội dung bình luận",
70
+ name: "comment",
71
+ type: "string",
72
+ required: true,
73
+ default: "",
74
+ typeOptions: {
75
+ rows: 3,
76
+ },
77
+ description: "Nội dung bình luận",
78
+ },
79
+ ],
80
+ };
81
+ }
82
+ async execute() {
83
+ var _a;
84
+ const returnData = [];
85
+ const items = this.getInputData();
86
+ const credentials = (await this.getCredentials("umeApi"));
87
+ if (!credentials || !credentials.token) {
88
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), "API token is missing in the UME credentials.");
89
+ }
90
+ const baseUrl = ((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : BASE_URL_FALLBACK).replace(/\/+$/, "");
91
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex += 1) {
92
+ const server = this.getNodeParameter("server", itemIndex);
93
+ const link = this.getNodeParameter("link", itemIndex);
94
+ const amount = this.getNodeParameter("amount", itemIndex);
95
+ const comment = this.getNodeParameter("comment", itemIndex);
96
+ // Validate min/max based on server
97
+ let maxAmount = 10000;
98
+ if (server === "3") {
99
+ maxAmount = 250;
100
+ }
101
+ if (amount < 10 || amount > maxAmount) {
102
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Số lượng phải từ 10 đến ${maxAmount} cho server ${server}`, { itemIndex });
103
+ }
104
+ const formBody = {
105
+ token: credentials.token,
106
+ link: link,
107
+ amount: amount.toString(),
108
+ comment: comment,
109
+ };
110
+ const requestOptions = {
111
+ method: "POST",
112
+ uri: `${baseUrl}/instagram/${server}/comment`,
113
+ form: formBody,
114
+ json: true,
115
+ };
116
+ let responseData;
117
+ try {
118
+ responseData = await this.helpers.request(requestOptions);
119
+ }
120
+ catch (error) {
121
+ if (error instanceof n8n_workflow_1.NodeOperationError) {
122
+ throw error;
123
+ }
124
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex });
125
+ }
126
+ const responseObject = typeof responseData === "object" && responseData !== null
127
+ ? responseData
128
+ : { data: responseData };
129
+ returnData.push({
130
+ json: {
131
+ ...responseObject,
132
+ server,
133
+ link,
134
+ amount,
135
+ comment,
136
+ },
137
+ pairedItem: {
138
+ item: itemIndex,
139
+ },
140
+ });
141
+ }
142
+ return [returnData];
143
+ }
144
+ }
145
+ exports.InstagramComment = InstagramComment;
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
2
+ export declare class InstagramLike implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstagramLike = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const BASE_URL_FALLBACK = "https://ume.com.vn/api";
6
+ class InstagramLike {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: "🌱 Instagram Like",
10
+ name: "instagramLike",
11
+ group: ["transform"],
12
+ version: 1,
13
+ subtitle: '={{$parameter["server"]}}',
14
+ description: "Tăng like bài viết Instagram",
15
+ defaults: {
16
+ name: "🌱 Instagram Like",
17
+ },
18
+ inputs: ["main"],
19
+ outputs: ["main"],
20
+ credentials: [
21
+ {
22
+ name: "umeApi",
23
+ required: true,
24
+ },
25
+ ],
26
+ properties: [
27
+ {
28
+ displayName: "Server",
29
+ name: "server",
30
+ type: "options",
31
+ noDataExpression: true,
32
+ options: [
33
+ {
34
+ name: "Server 1 - 100-300/24h (104.7₫/like)",
35
+ value: "1",
36
+ description: "Đang tụt 10-20%. Tối thiểu: 100, Tối đa: 50,000",
37
+ },
38
+ {
39
+ name: "Server 2 - 5k-10k/24h (95.6₫/like)",
40
+ value: "2",
41
+ description: "Tốc độ có thể thay đổi. Tối thiểu: 50, Tối đa: 10,000",
42
+ },
43
+ {
44
+ name: "Server 4 - Tốc độ trung bình (51.5₫/like)",
45
+ value: "4",
46
+ description: "Tối thiểu: 50, Tối đa: 10,000",
47
+ },
48
+ ],
49
+ default: "1",
50
+ description: "Chọn server để tăng like",
51
+ },
52
+ {
53
+ displayName: "Link bài viết",
54
+ name: "link",
55
+ type: "string",
56
+ required: true,
57
+ default: "",
58
+ description: "Link bài viết Instagram cần tăng like",
59
+ },
60
+ {
61
+ displayName: "Số lượng",
62
+ name: "amount",
63
+ type: "number",
64
+ required: true,
65
+ default: 200,
66
+ description: "Số lượng like cần tăng",
67
+ typeOptions: {
68
+ minValue: 50,
69
+ maxValue: 50000,
70
+ },
71
+ validateType: 'number',
72
+ },
73
+ ],
74
+ };
75
+ }
76
+ async execute() {
77
+ var _a;
78
+ const returnData = [];
79
+ const items = this.getInputData();
80
+ const credentials = (await this.getCredentials("umeApi"));
81
+ if (!credentials || !credentials.token) {
82
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), "API token is missing in the UME credentials.");
83
+ }
84
+ const baseUrl = ((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : BASE_URL_FALLBACK).replace(/\/+$/, "");
85
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex += 1) {
86
+ const server = this.getNodeParameter("server", itemIndex);
87
+ const link = this.getNodeParameter("link", itemIndex);
88
+ const amount = this.getNodeParameter("amount", itemIndex);
89
+ // Validate min/max based on server
90
+ let minAmount = 50;
91
+ let maxAmount = 10000;
92
+ if (server === "1") {
93
+ minAmount = 100;
94
+ maxAmount = 50000;
95
+ }
96
+ if (amount < minAmount || amount > maxAmount) {
97
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Số lượng phải từ ${minAmount} đến ${maxAmount} cho server ${server}`, { itemIndex });
98
+ }
99
+ const formBody = {
100
+ token: credentials.token,
101
+ link: link,
102
+ amount: amount.toString(),
103
+ };
104
+ const requestOptions = {
105
+ method: "POST",
106
+ uri: `${baseUrl}/instagram/${server}/like`,
107
+ form: formBody,
108
+ json: true,
109
+ };
110
+ let responseData;
111
+ try {
112
+ responseData = await this.helpers.request(requestOptions);
113
+ }
114
+ catch (error) {
115
+ if (error instanceof n8n_workflow_1.NodeOperationError) {
116
+ throw error;
117
+ }
118
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex });
119
+ }
120
+ const responseObject = typeof responseData === "object" && responseData !== null
121
+ ? responseData
122
+ : { data: responseData };
123
+ returnData.push({
124
+ json: {
125
+ ...responseObject,
126
+ server,
127
+ link,
128
+ amount,
129
+ },
130
+ pairedItem: {
131
+ item: itemIndex,
132
+ },
133
+ });
134
+ }
135
+ return [returnData];
136
+ }
137
+ }
138
+ exports.InstagramLike = InstagramLike;
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
2
+ export declare class InstagramView implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InstagramView = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const BASE_URL_FALLBACK = "https://ume.com.vn/api";
6
+ class InstagramView {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: "🌱 Instagram View",
10
+ name: "instagramView",
11
+ group: ["transform"],
12
+ version: 1,
13
+ subtitle: '={{$parameter["server"]}}',
14
+ description: "Tăng view video Instagram",
15
+ defaults: {
16
+ name: "🌱 Instagram View",
17
+ },
18
+ inputs: ["main"],
19
+ outputs: ["main"],
20
+ credentials: [
21
+ {
22
+ name: "umeApi",
23
+ required: true,
24
+ },
25
+ ],
26
+ properties: [
27
+ {
28
+ displayName: "Server",
29
+ name: "server",
30
+ type: "options",
31
+ noDataExpression: true,
32
+ options: [
33
+ {
34
+ name: "Server 1 - View Video+REEL+IGTV (39.9₫/view)",
35
+ value: "1",
36
+ description: "Tốc độ đạt ngày triệu view 1 ngày. Tối thiểu: 100, Tối đa: 1,000,000",
37
+ },
38
+ {
39
+ name: "Server 2 - Min 10k (1.8₫/view)",
40
+ value: "2",
41
+ description: "Tốc độ lên tốt nhưng có thể delay. Tối thiểu: 10,000, Tối đa: 10,000,000",
42
+ },
43
+ {
44
+ name: "Server 3 - View tốc độ (8₫/view)",
45
+ value: "3",
46
+ description: "Lên nhanh sau vài phút. Tối thiểu: 500, Tối đa: 5,000,000",
47
+ },
48
+ {
49
+ name: "Server 5 - View story (16.1₫/view)",
50
+ value: "5",
51
+ description: "Chỉ hỗ trợ stories 24 giờ. Tối thiểu: 200, Tối đa: 10,000",
52
+ },
53
+ ],
54
+ default: "1",
55
+ description: "Chọn server để tăng view",
56
+ },
57
+ {
58
+ displayName: "Link video/story",
59
+ name: "link",
60
+ type: "string",
61
+ required: true,
62
+ default: "",
63
+ description: "Link video/story Instagram cần tăng view",
64
+ },
65
+ {
66
+ displayName: "Số lượng",
67
+ name: "amount",
68
+ type: "number",
69
+ required: true,
70
+ default: 1000,
71
+ description: "Số lượng view cần tăng",
72
+ typeOptions: {
73
+ minValue: 100,
74
+ maxValue: 10000000,
75
+ },
76
+ validateType: 'number',
77
+ },
78
+ ],
79
+ };
80
+ }
81
+ async execute() {
82
+ var _a;
83
+ const returnData = [];
84
+ const items = this.getInputData();
85
+ const credentials = (await this.getCredentials("umeApi"));
86
+ if (!credentials || !credentials.token) {
87
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), "API token is missing in the UME credentials.");
88
+ }
89
+ const baseUrl = ((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : BASE_URL_FALLBACK).replace(/\/+$/, "");
90
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex += 1) {
91
+ const server = this.getNodeParameter("server", itemIndex);
92
+ const link = this.getNodeParameter("link", itemIndex);
93
+ const amount = this.getNodeParameter("amount", itemIndex);
94
+ // Validate min/max based on server
95
+ let minAmount = 100;
96
+ let maxAmount = 1000000;
97
+ if (server === "2") {
98
+ minAmount = 10000;
99
+ maxAmount = 10000000;
100
+ }
101
+ else if (server === "3") {
102
+ minAmount = 500;
103
+ maxAmount = 5000000;
104
+ }
105
+ else if (server === "5") {
106
+ minAmount = 200;
107
+ maxAmount = 10000;
108
+ }
109
+ if (amount < minAmount || amount > maxAmount) {
110
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Số lượng phải từ ${minAmount} đến ${maxAmount} cho server ${server}`, { itemIndex });
111
+ }
112
+ const formBody = {
113
+ token: credentials.token,
114
+ link: link,
115
+ amount: amount.toString(),
116
+ };
117
+ const requestOptions = {
118
+ method: "POST",
119
+ uri: `${baseUrl}/instagram/${server}/view`,
120
+ form: formBody,
121
+ json: true,
122
+ };
123
+ let responseData;
124
+ try {
125
+ responseData = await this.helpers.request(requestOptions);
126
+ }
127
+ catch (error) {
128
+ if (error instanceof n8n_workflow_1.NodeOperationError) {
129
+ throw error;
130
+ }
131
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex });
132
+ }
133
+ const responseObject = typeof responseData === "object" && responseData !== null
134
+ ? responseData
135
+ : { data: responseData };
136
+ returnData.push({
137
+ json: {
138
+ ...responseObject,
139
+ server,
140
+ link,
141
+ amount,
142
+ },
143
+ pairedItem: {
144
+ item: itemIndex,
145
+ },
146
+ });
147
+ }
148
+ return [returnData];
149
+ }
150
+ }
151
+ exports.InstagramView = InstagramView;
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
2
+ export declare class TikTokComment implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TikTokComment = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const BASE_URL_FALLBACK = "https://ume.com.vn/api";
6
+ class TikTokComment {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: "🌱 TikTok Comment",
10
+ name: "tiktokComment",
11
+ group: ["transform"],
12
+ version: 1,
13
+ subtitle: '={{$parameter["server"]}}',
14
+ description: "Tạo bình luận cho video TikTok",
15
+ defaults: {
16
+ name: "🌱 TikTok Comment",
17
+ },
18
+ inputs: ["main"],
19
+ outputs: ["main"],
20
+ credentials: [
21
+ {
22
+ name: "umeApi",
23
+ required: true,
24
+ },
25
+ ],
26
+ properties: [
27
+ {
28
+ displayName: "Server",
29
+ name: "server",
30
+ type: "options",
31
+ noDataExpression: true,
32
+ options: [
33
+ {
34
+ name: "Server 4 - Nick việt, tốc độ chậm (2,730₫/cmt)",
35
+ value: "4",
36
+ description: "Cần tối thiểu 1 bình luận. Tối thiểu: 10, Tối đa: 20",
37
+ },
38
+ ],
39
+ default: "4",
40
+ description: "Chọn server để tạo bình luận",
41
+ },
42
+ {
43
+ displayName: "Link video TikTok",
44
+ name: "link",
45
+ type: "string",
46
+ required: true,
47
+ default: "",
48
+ description: "Link video TikTok cần bình luận",
49
+ },
50
+ {
51
+ displayName: "Số lượng",
52
+ name: "amount",
53
+ type: "number",
54
+ required: true,
55
+ default: 15,
56
+ description: "Số lượng bình luận cần tạo",
57
+ typeOptions: {
58
+ minValue: 10,
59
+ maxValue: 20,
60
+ },
61
+ validateType: 'number',
62
+ },
63
+ {
64
+ displayName: "Nội dung bình luận",
65
+ name: "comment",
66
+ type: "string",
67
+ required: true,
68
+ default: "",
69
+ typeOptions: {
70
+ rows: 3,
71
+ },
72
+ description: "Nội dung bình luận (nghiêm cừu nội dung xấu, vi phạm pháp luật, icon, từ ngữ thô bạo)",
73
+ },
74
+ ],
75
+ };
76
+ }
77
+ async execute() {
78
+ var _a;
79
+ const returnData = [];
80
+ const items = this.getInputData();
81
+ const credentials = (await this.getCredentials("umeApi"));
82
+ if (!credentials || !credentials.token) {
83
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), "API token is missing in the UME credentials.");
84
+ }
85
+ const baseUrl = ((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : BASE_URL_FALLBACK).replace(/\/+$/, "");
86
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex += 1) {
87
+ const server = this.getNodeParameter("server", itemIndex);
88
+ const link = this.getNodeParameter("link", itemIndex);
89
+ const amount = this.getNodeParameter("amount", itemIndex);
90
+ const comment = this.getNodeParameter("comment", itemIndex);
91
+ // Validate min/max
92
+ if (amount < 10 || amount > 20) {
93
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Số lượng phải từ 10 đến 20", { itemIndex });
94
+ }
95
+ const formBody = {
96
+ token: credentials.token,
97
+ link: link,
98
+ amount: amount.toString(),
99
+ comment: comment,
100
+ };
101
+ const requestOptions = {
102
+ method: "POST",
103
+ uri: `${baseUrl}/tiktok/${server}/comment`,
104
+ form: formBody,
105
+ json: true,
106
+ };
107
+ let responseData;
108
+ try {
109
+ responseData = await this.helpers.request(requestOptions);
110
+ }
111
+ catch (error) {
112
+ if (error instanceof n8n_workflow_1.NodeOperationError) {
113
+ throw error;
114
+ }
115
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex });
116
+ }
117
+ const responseObject = typeof responseData === "object" && responseData !== null
118
+ ? responseData
119
+ : { data: responseData };
120
+ returnData.push({
121
+ json: {
122
+ ...responseObject,
123
+ server,
124
+ link,
125
+ amount,
126
+ comment,
127
+ },
128
+ pairedItem: {
129
+ item: itemIndex,
130
+ },
131
+ });
132
+ }
133
+ return [returnData];
134
+ }
135
+ }
136
+ exports.TikTokComment = TikTokComment;
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
2
+ export declare class TikTokCommentLike implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }