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.
- package/LICENSE +21 -0
- package/README.md +204 -0
- package/dist/credentials/UmeApi.credentials.d.ts +7 -0
- package/dist/credentials/UmeApi.credentials.js +41 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -0
- package/dist/nodes/FacebookComment/FacebookComment.node.d.ts +5 -0
- package/dist/nodes/FacebookComment/FacebookComment.node.js +155 -0
- package/dist/nodes/FacebookCommentLike/FacebookCommentLike.node.d.ts +5 -0
- package/dist/nodes/FacebookCommentLike/FacebookCommentLike.node.js +122 -0
- package/dist/nodes/FacebookLike/FacebookLike.node.d.ts +5 -0
- package/dist/nodes/FacebookLike/FacebookLike.node.js +160 -0
- package/dist/nodes/FacebookShare/FacebookShare.node.d.ts +5 -0
- package/dist/nodes/FacebookShare/FacebookShare.node.js +141 -0
- package/dist/nodes/FacebookStoryView/FacebookStoryView.node.d.ts +5 -0
- package/dist/nodes/FacebookStoryView/FacebookStoryView.node.js +122 -0
- package/dist/nodes/FacebookView/FacebookView.node.d.ts +5 -0
- package/dist/nodes/FacebookView/FacebookView.node.js +127 -0
- package/dist/nodes/InstagramComment/InstagramComment.node.d.ts +5 -0
- package/dist/nodes/InstagramComment/InstagramComment.node.js +145 -0
- package/dist/nodes/InstagramLike/InstagramLike.node.d.ts +5 -0
- package/dist/nodes/InstagramLike/InstagramLike.node.js +138 -0
- package/dist/nodes/InstagramView/InstagramView.node.d.ts +5 -0
- package/dist/nodes/InstagramView/InstagramView.node.js +151 -0
- package/dist/nodes/TikTokComment/TikTokComment.node.d.ts +5 -0
- package/dist/nodes/TikTokComment/TikTokComment.node.js +136 -0
- package/dist/nodes/TikTokCommentLike/TikTokCommentLike.node.d.ts +5 -0
- package/dist/nodes/TikTokCommentLike/TikTokCommentLike.node.js +122 -0
- package/dist/nodes/TikTokFavorite/TikTokFavorite.node.d.ts +5 -0
- package/dist/nodes/TikTokFavorite/TikTokFavorite.node.js +127 -0
- package/dist/nodes/TikTokLike/TikTokLike.node.d.ts +5 -0
- package/dist/nodes/TikTokLike/TikTokLike.node.js +141 -0
- package/dist/nodes/TikTokShare/TikTokShare.node.d.ts +5 -0
- package/dist/nodes/TikTokShare/TikTokShare.node.js +131 -0
- package/dist/nodes/TikTokView/TikTokView.node.d.ts +5 -0
- package/dist/nodes/TikTokView/TikTokView.node.js +136 -0
- package/dist/nodes/Ume/Ume.node.d.ts +5 -0
- package/dist/nodes/Ume/Ume.node.js +244 -0
- package/dist/nodes/Ume/operations-data.json +2246 -0
- package/dist/nodes/UmeSocialSeeding/UmeSocialSeeding.node.d.ts +5 -0
- package/dist/nodes/UmeSocialSeeding/UmeSocialSeeding.node.js +203 -0
- package/dist/nodes/UmeSocialSeeding/UmeSocialSeedingHelpers.d.ts +4 -0
- package/dist/nodes/UmeSocialSeeding/UmeSocialSeedingHelpers.js +382 -0
- package/dist/nodes/UmeSocialSeeding/operations-data.json +673 -0
- package/dist/nodes/UmeSocialSeeding/reaction.png +0 -0
- package/dist/nodes/UmeSocialSeeding/server-info.json +431 -0
- package/dist/nodes/UmeSocialSeeding/services-data-backup.json +3525 -0
- package/dist/nodes/UmeSocialSeeding/services-data-old.json +2704 -0
- package/dist/nodes/UmeSocialSeeding/services-data.json +7341 -0
- package/dist/nodes/UmeSocialSeeding/services-data.json.backup +3525 -0
- package/dist/nodes/UmeSocialSeeding/services-data.json.backup.1759909364606 +1927 -0
- package/dist/nodes/YouTubeComment/YouTubeComment.node.d.ts +5 -0
- package/dist/nodes/YouTubeComment/YouTubeComment.node.js +152 -0
- package/dist/nodes/YouTubeLike/YouTubeLike.node.d.ts +5 -0
- package/dist/nodes/YouTubeLike/YouTubeLike.node.js +141 -0
- package/dist/nodes/YouTubeView/YouTubeView.node.d.ts +5 -0
- package/dist/nodes/YouTubeView/YouTubeView.node.js +142 -0
- package/package.json +62 -0
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
|
2
|
+
export declare class YouTubeComment implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,152 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.YouTubeComment = void 0;
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
5
|
+
const BASE_URL_FALLBACK = "https://ume.com.vn/api";
|
6
|
+
class YouTubeComment {
|
7
|
+
constructor() {
|
8
|
+
this.description = {
|
9
|
+
displayName: "🌱 YouTube Comment",
|
10
|
+
name: "youTubeComment",
|
11
|
+
group: ["transform"],
|
12
|
+
version: 1,
|
13
|
+
subtitle: '={{$parameter["server"]}}',
|
14
|
+
description: "Tạo bình luận cho video YouTube",
|
15
|
+
defaults: {
|
16
|
+
name: "🌱 YouTube 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 1 - Đa quốc gia (1,274₫/cmt)",
|
35
|
+
value: "1",
|
36
|
+
description: "Tốc độ rất nhanh. Tối thiểu: 10, Tối đa: 1,500",
|
37
|
+
},
|
38
|
+
{
|
39
|
+
name: "Server 4 - Việt Nam (2,184₫/cmt)",
|
40
|
+
value: "4",
|
41
|
+
description: "Ít tỉ lệ trùng hơn. Tối thiểu: 5, Tối đa: 1,000",
|
42
|
+
},
|
43
|
+
{
|
44
|
+
name: "Server 6 - Việt Nam, comment AI (2,184₫/cmt)",
|
45
|
+
value: "6",
|
46
|
+
description: "AI tự động soạn bình luận. Tối thiểu: 5, Tối đa: 1,000",
|
47
|
+
},
|
48
|
+
],
|
49
|
+
default: "1",
|
50
|
+
description: "Chọn server để tạo bình luận",
|
51
|
+
},
|
52
|
+
{
|
53
|
+
displayName: "Link video YouTube",
|
54
|
+
name: "link",
|
55
|
+
type: "string",
|
56
|
+
required: true,
|
57
|
+
default: "",
|
58
|
+
description: "Link video YouTube cần bình luận",
|
59
|
+
},
|
60
|
+
{
|
61
|
+
displayName: "Số lượng",
|
62
|
+
name: "amount",
|
63
|
+
type: "number",
|
64
|
+
required: true,
|
65
|
+
default: 20,
|
66
|
+
description: "Số lượng bình luận cần tạo",
|
67
|
+
typeOptions: {
|
68
|
+
minValue: 5,
|
69
|
+
maxValue: 1500,
|
70
|
+
},
|
71
|
+
validateType: 'number',
|
72
|
+
},
|
73
|
+
{
|
74
|
+
displayName: "Nội dung bình luận",
|
75
|
+
name: "comment",
|
76
|
+
type: "string",
|
77
|
+
required: true,
|
78
|
+
default: "",
|
79
|
+
typeOptions: {
|
80
|
+
rows: 3,
|
81
|
+
},
|
82
|
+
description: "Nội dung bình luận (server AI sẽ tự động tạo)",
|
83
|
+
},
|
84
|
+
],
|
85
|
+
};
|
86
|
+
}
|
87
|
+
async execute() {
|
88
|
+
var _a;
|
89
|
+
const returnData = [];
|
90
|
+
const items = this.getInputData();
|
91
|
+
const credentials = (await this.getCredentials("umeApi"));
|
92
|
+
if (!credentials || !credentials.token) {
|
93
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "API token is missing in the UME credentials.");
|
94
|
+
}
|
95
|
+
const baseUrl = ((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : BASE_URL_FALLBACK).replace(/\/+$/, "");
|
96
|
+
for (let itemIndex = 0; itemIndex < items.length; itemIndex += 1) {
|
97
|
+
const server = this.getNodeParameter("server", itemIndex);
|
98
|
+
const link = this.getNodeParameter("link", itemIndex);
|
99
|
+
const amount = this.getNodeParameter("amount", itemIndex);
|
100
|
+
const comment = this.getNodeParameter("comment", itemIndex);
|
101
|
+
// Validate min/max based on server
|
102
|
+
let minAmount = 10;
|
103
|
+
let maxAmount = 1500;
|
104
|
+
if (server === "4" || server === "6") {
|
105
|
+
minAmount = 5;
|
106
|
+
maxAmount = 1000;
|
107
|
+
}
|
108
|
+
if (amount < minAmount || amount > maxAmount) {
|
109
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Số lượng phải từ ${minAmount} đến ${maxAmount} cho server ${server}`, { itemIndex });
|
110
|
+
}
|
111
|
+
const formBody = {
|
112
|
+
token: credentials.token,
|
113
|
+
link: link,
|
114
|
+
amount: amount.toString(),
|
115
|
+
comment: comment,
|
116
|
+
};
|
117
|
+
const requestOptions = {
|
118
|
+
method: "POST",
|
119
|
+
uri: `${baseUrl}/youtube/${server}/comment`,
|
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
|
+
comment,
|
143
|
+
},
|
144
|
+
pairedItem: {
|
145
|
+
item: itemIndex,
|
146
|
+
},
|
147
|
+
});
|
148
|
+
}
|
149
|
+
return [returnData];
|
150
|
+
}
|
151
|
+
}
|
152
|
+
exports.YouTubeComment = YouTubeComment;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
|
2
|
+
export declare class YouTubeLike implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,141 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.YouTubeLike = void 0;
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
5
|
+
const BASE_URL_FALLBACK = "https://ume.com.vn/api";
|
6
|
+
class YouTubeLike {
|
7
|
+
constructor() {
|
8
|
+
this.description = {
|
9
|
+
displayName: "🌱 YouTube Like",
|
10
|
+
name: "youTubeLike",
|
11
|
+
group: ["transform"],
|
12
|
+
version: 1,
|
13
|
+
subtitle: '={{$parameter["server"]}}',
|
14
|
+
description: "Tăng like video YouTube",
|
15
|
+
defaults: {
|
16
|
+
name: "🌱 YouTube 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 - Tốc độ trung bình, BH 15 ngày (73.9₫/like)",
|
35
|
+
value: "1",
|
36
|
+
description: "Tốc độ trung bình. Tối thiểu: 50, Tối đa: 20,000",
|
37
|
+
},
|
38
|
+
{
|
39
|
+
name: "Server 2 - Lên nhanh, BH 15 ngày (109.2₫/like)",
|
40
|
+
value: "2",
|
41
|
+
description: "Có tỉ lệ tụt thấp, hỗ trợ live. Tối thiểu: 100, Tối đa: 50,000",
|
42
|
+
},
|
43
|
+
{
|
44
|
+
name: "Server 3 - Lên nhanh, BH 30 ngày (125.7₫/like)",
|
45
|
+
value: "3",
|
46
|
+
description: "Có dư like, hỗ trợ live. Tối thiểu: 50, Tối đa: 500,000",
|
47
|
+
},
|
48
|
+
],
|
49
|
+
default: "1",
|
50
|
+
description: "Chọn server để tăng like",
|
51
|
+
},
|
52
|
+
{
|
53
|
+
displayName: "Link video YouTube",
|
54
|
+
name: "link",
|
55
|
+
type: "string",
|
56
|
+
required: true,
|
57
|
+
default: "",
|
58
|
+
description: "Link video YouTube 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: 500000,
|
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 = 20000;
|
92
|
+
if (server === "2") {
|
93
|
+
minAmount = 100;
|
94
|
+
maxAmount = 50000;
|
95
|
+
}
|
96
|
+
else if (server === "3") {
|
97
|
+
maxAmount = 500000;
|
98
|
+
}
|
99
|
+
if (amount < minAmount || amount > maxAmount) {
|
100
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Số lượng phải từ ${minAmount} đến ${maxAmount} cho server ${server}`, { itemIndex });
|
101
|
+
}
|
102
|
+
const formBody = {
|
103
|
+
token: credentials.token,
|
104
|
+
link: link,
|
105
|
+
amount: amount.toString(),
|
106
|
+
};
|
107
|
+
const requestOptions = {
|
108
|
+
method: "POST",
|
109
|
+
uri: `${baseUrl}/youtube/${server}/like`,
|
110
|
+
form: formBody,
|
111
|
+
json: true,
|
112
|
+
};
|
113
|
+
let responseData;
|
114
|
+
try {
|
115
|
+
responseData = await this.helpers.request(requestOptions);
|
116
|
+
}
|
117
|
+
catch (error) {
|
118
|
+
if (error instanceof n8n_workflow_1.NodeOperationError) {
|
119
|
+
throw error;
|
120
|
+
}
|
121
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex });
|
122
|
+
}
|
123
|
+
const responseObject = typeof responseData === "object" && responseData !== null
|
124
|
+
? responseData
|
125
|
+
: { data: responseData };
|
126
|
+
returnData.push({
|
127
|
+
json: {
|
128
|
+
...responseObject,
|
129
|
+
server,
|
130
|
+
link,
|
131
|
+
amount,
|
132
|
+
},
|
133
|
+
pairedItem: {
|
134
|
+
item: itemIndex,
|
135
|
+
},
|
136
|
+
});
|
137
|
+
}
|
138
|
+
return [returnData];
|
139
|
+
}
|
140
|
+
}
|
141
|
+
exports.YouTubeLike = YouTubeLike;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
|
2
|
+
export declare class YouTubeView implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,142 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.YouTubeView = void 0;
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
5
|
+
const BASE_URL_FALLBACK = "https://ume.com.vn/api";
|
6
|
+
class YouTubeView {
|
7
|
+
constructor() {
|
8
|
+
this.description = {
|
9
|
+
displayName: "🌱 YouTube View",
|
10
|
+
name: "youTubeView",
|
11
|
+
group: ["transform"],
|
12
|
+
version: 1,
|
13
|
+
subtitle: '={{$parameter["server"]}}',
|
14
|
+
description: "Tăng view video YouTube",
|
15
|
+
defaults: {
|
16
|
+
name: "🌱 YouTube 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 - Min 500, Speed 1k/day (157.2₫/view)",
|
35
|
+
value: "1",
|
36
|
+
description: "Bảo hành view 30 ngày. Tối thiểu: 500, Tối đa: 1,000,000",
|
37
|
+
},
|
38
|
+
{
|
39
|
+
name: "Server 9 - Min 1k, speed 1k/day (209.3₫/view)",
|
40
|
+
value: "9",
|
41
|
+
description: "Thời lượng xem 10s-2p. Bảo hành 30 ngày. Tối thiểu: 1,000, Tối đa: 10,000,000",
|
42
|
+
},
|
43
|
+
{
|
44
|
+
name: "Server 4 - Min 10K, Tốc độ nhanh (121.8₫/view)",
|
45
|
+
value: "4",
|
46
|
+
description: "[Native ADS] Bảo hành 30 ngày. Tối thiểu: 10,000, Tối đa: 30,000,000",
|
47
|
+
},
|
48
|
+
],
|
49
|
+
default: "1",
|
50
|
+
description: "Chọn server để tăng view",
|
51
|
+
},
|
52
|
+
{
|
53
|
+
displayName: "Link video YouTube",
|
54
|
+
name: "link",
|
55
|
+
type: "string",
|
56
|
+
required: true,
|
57
|
+
default: "",
|
58
|
+
description: "Link video YouTube cần tăng view",
|
59
|
+
},
|
60
|
+
{
|
61
|
+
displayName: "Số lượng",
|
62
|
+
name: "amount",
|
63
|
+
type: "number",
|
64
|
+
required: true,
|
65
|
+
default: 1000,
|
66
|
+
description: "Số lượng view cần tăng",
|
67
|
+
typeOptions: {
|
68
|
+
minValue: 500,
|
69
|
+
maxValue: 30000000,
|
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 = 500;
|
91
|
+
let maxAmount = 1000000;
|
92
|
+
if (server === "9") {
|
93
|
+
minAmount = 1000;
|
94
|
+
maxAmount = 10000000;
|
95
|
+
}
|
96
|
+
else if (server === "4") {
|
97
|
+
minAmount = 10000;
|
98
|
+
maxAmount = 30000000;
|
99
|
+
}
|
100
|
+
if (amount < minAmount || amount > maxAmount) {
|
101
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Số lượng phải từ ${minAmount} đến ${maxAmount} cho server ${server}`, { itemIndex });
|
102
|
+
}
|
103
|
+
const formBody = {
|
104
|
+
token: credentials.token,
|
105
|
+
link: link,
|
106
|
+
amount: amount.toString(),
|
107
|
+
};
|
108
|
+
const requestOptions = {
|
109
|
+
method: "POST",
|
110
|
+
uri: `${baseUrl}/youtube/${server}/view`,
|
111
|
+
form: formBody,
|
112
|
+
json: true,
|
113
|
+
};
|
114
|
+
let responseData;
|
115
|
+
try {
|
116
|
+
responseData = await this.helpers.request(requestOptions);
|
117
|
+
}
|
118
|
+
catch (error) {
|
119
|
+
if (error instanceof n8n_workflow_1.NodeOperationError) {
|
120
|
+
throw error;
|
121
|
+
}
|
122
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex });
|
123
|
+
}
|
124
|
+
const responseObject = typeof responseData === "object" && responseData !== null
|
125
|
+
? responseData
|
126
|
+
: { data: responseData };
|
127
|
+
returnData.push({
|
128
|
+
json: {
|
129
|
+
...responseObject,
|
130
|
+
server,
|
131
|
+
link,
|
132
|
+
amount,
|
133
|
+
},
|
134
|
+
pairedItem: {
|
135
|
+
item: itemIndex,
|
136
|
+
},
|
137
|
+
});
|
138
|
+
}
|
139
|
+
return [returnData];
|
140
|
+
}
|
141
|
+
}
|
142
|
+
exports.YouTubeView = YouTubeView;
|
package/package.json
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
{
|
2
|
+
"name": "n8n-nodes-ume-v4",
|
3
|
+
"version": "4.0.0",
|
4
|
+
"description": "UME Social Seeding Services for n8n - Version 4 with updated features",
|
5
|
+
"license": "MIT",
|
6
|
+
"main": "dist/index.js",
|
7
|
+
"types": "dist/index.d.ts",
|
8
|
+
"scripts": {
|
9
|
+
"build": "echo 'Package already built'",
|
10
|
+
"clean": "rimraf dist",
|
11
|
+
"prepare": "echo 'Skip build - package already compiled'",
|
12
|
+
"generate:operations": "node scripts/generate-operations.js"
|
13
|
+
},
|
14
|
+
"n8n": {
|
15
|
+
"nodes": [
|
16
|
+
"dist/nodes/UmeSocialSeeding/UmeSocialSeeding.node.js"
|
17
|
+
],
|
18
|
+
"credentials": [
|
19
|
+
"dist/credentials/UmeApi.credentials.js"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
"devDependencies": {
|
23
|
+
"@types/node": "^20.14.0",
|
24
|
+
"copyfiles": "^2.4.1",
|
25
|
+
"n8n-core": "^1.14.1",
|
26
|
+
"n8n-workflow": "^1.17.0",
|
27
|
+
"rimraf": "^5.0.5",
|
28
|
+
"typescript": "^5.4.0"
|
29
|
+
},
|
30
|
+
"publishConfig": {
|
31
|
+
"access": "public"
|
32
|
+
},
|
33
|
+
"keywords": [
|
34
|
+
"n8n-community-node-package",
|
35
|
+
"ume",
|
36
|
+
"social",
|
37
|
+
"seeding",
|
38
|
+
"facebook",
|
39
|
+
"instagram",
|
40
|
+
"tiktok",
|
41
|
+
"youtube",
|
42
|
+
"telegram",
|
43
|
+
"twitter",
|
44
|
+
"threads",
|
45
|
+
"shopee",
|
46
|
+
"vietnam",
|
47
|
+
"social-media",
|
48
|
+
"automation"
|
49
|
+
],
|
50
|
+
"peerDependencies": {
|
51
|
+
"n8n-core": "^1.14.1",
|
52
|
+
"n8n-workflow": ">=1.86.0"
|
53
|
+
},
|
54
|
+
"files": [
|
55
|
+
"dist/**/*"
|
56
|
+
],
|
57
|
+
"dependencies": {
|
58
|
+
"cheerio": "^1.0.0-rc.12",
|
59
|
+
"form-data": "^4.0.4",
|
60
|
+
"node-fetch": "^2.7.0"
|
61
|
+
}
|
62
|
+
}
|