n8n-nodes-zalo-custom 1.0.10 → 1.1.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/README.md +51 -48
- package/nodes/ZaloGroup/ZaloGroup.node.js +127 -136
- package/nodes/ZaloGroup/ZaloGroupDescription.js +79 -70
- package/nodes/ZaloSendMessage/ZaloSendMessage.node.js +3 -532
- package/nodes/ZaloSendMessage/ZaloSendMessageDescription.js +389 -0
- package/nodes/ZaloUploadAttachment/ZaloUploadAttachment.node.js +24 -26
- package/nodes/ZaloUploadAttachment/ZaloUploadAttachmentDescription.js +1 -1
- package/nodes/ZaloUser/ZaloUser.node.js +95 -1
- package/nodes/ZaloUser/ZaloUserDescription.js +297 -47
- package/nodes/utils/helper.js +148 -0
- package/nodes/utils/zalo.helper.js +12 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Hoạt động độc lập trong môi trường **n8n của bạn** — **khôn
|
|
|
6
6
|
|
|
7
7
|
Đây là một dự án **mã nguồn mở**, chúng tôi khuyến khích cộng đồng cùng đóng góp và phát triển thêm các tính năng mới.
|
|
8
8
|
|
|
9
|
-
## 📱 Liên hệ &
|
|
9
|
+
## 📱 Liên hệ & Báo lỗi
|
|
10
10
|
|
|
11
11
|
**Github:** [codedao12](https://github.com/codedao12)
|
|
12
12
|
**Email:** codedao12@gmail.com
|
|
@@ -17,53 +17,56 @@ Vui lòng liên hệ để yêu cầu tính năng mới hoặc báo lỗi.
|
|
|
17
17
|
|
|
18
18
|
## ✨ Các Tính Năng Chính
|
|
19
19
|
|
|
20
|
-
| 💯 | Tính Năng
|
|
21
|
-
|
|
22
|
-
| 🔑 | **_XÁC THỰC & KẾT NỐI_**
|
|
23
|
-
| ✓ | Đăng nhập bằng Mã QR
|
|
24
|
-
| ✓✓ | Expression Zalo Credential
|
|
25
|
-
| ✓ | Hỗ trợ đăng nhập nhiều tài khoản, proxy
|
|
26
|
-
| ✓✓ | Đăng nhập, thông báo qua telegram
|
|
27
|
-
| ⚡️ | **_TRIGGER_**
|
|
28
|
-
| ✓ | Sự kiện tin nhắn mới (lọc theo từ khóa, nhóm)
|
|
29
|
-
| ✓ | Sự kiện thu hồi tin nhắn, thả cảm xúc
|
|
30
|
-
| ✓ | Sự kiện trong nhóm (tham gia, rời, đổi quyền,...)
|
|
31
|
-
| ✓✓
|
|
32
|
-
| ✓✓
|
|
33
|
-
| ✓✓
|
|
34
|
-
| 💬 | **_NHẮN TIN_**
|
|
35
|
-
| ✓ | Gửi tin nhắn (Văn bản, Ảnh, Sticker)
|
|
36
|
-
| ✓ | Trả lời tin nhắn (Quote)
|
|
37
|
-
| ✓ | Gắn thẻ (Tag) thành viên trong nhóm
|
|
38
|
-
| ✓✓
|
|
39
|
-
| ✓ | Thu hồi tin nhắn đã gửi
|
|
40
|
-
| ✓✓
|
|
41
|
-
| ✓ | Mô phỏng trạng thái "Đang soạn tin..."
|
|
42
|
-
| 👤 | **_QUẢN LÝ TÀI KHOẢN & BẠN BÈ_**
|
|
43
|
-
| ✓ | Gửi / Hủy lời mời kết bạn
|
|
44
|
-
| ✓ | Chấp nhận / Từ chối lời mời kết bạn
|
|
45
|
-
| ✓ | Hủy kết bạn (xóa bạn)
|
|
46
|
-
| ✓ | Lấy danh sách bạn bè & lời mời đã gửi
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
| ✓ |
|
|
51
|
-
|
|
|
52
|
-
| ✓ |
|
|
53
|
-
| ✓ |
|
|
54
|
-
|
|
|
55
|
-
| ✓ |
|
|
56
|
-
|
|
|
57
|
-
| ✓ |
|
|
58
|
-
|
|
|
59
|
-
| ✓ |
|
|
60
|
-
| ✓ |
|
|
61
|
-
|
|
|
62
|
-
| ✓ |
|
|
63
|
-
|
|
|
64
|
-
| ✓ |
|
|
65
|
-
| ✓ |
|
|
66
|
-
|
|
|
20
|
+
| 💯 | Tính Năng |
|
|
21
|
+
|:----:|:----------------------------------------------------|
|
|
22
|
+
| 🔑 | **_XÁC THỰC & KẾT NỐI_** |
|
|
23
|
+
| ✓ | Đăng nhập bằng Mã QR |
|
|
24
|
+
| ✓✓ | Expression Zalo Credential |
|
|
25
|
+
| ✓ | Hỗ trợ đăng nhập nhiều tài khoản, proxy |
|
|
26
|
+
| ✓✓ | Đăng nhập, thông báo qua telegram |
|
|
27
|
+
| ⚡️ | **_TRIGGER_** |
|
|
28
|
+
| ✓ | Sự kiện tin nhắn mới (lọc theo từ khóa, nhóm) |
|
|
29
|
+
| ✓ | Sự kiện thu hồi tin nhắn, thả cảm xúc |
|
|
30
|
+
| ✓ | Sự kiện trong nhóm (tham gia, rời, đổi quyền,...) |
|
|
31
|
+
| ✓✓ | Sự kiện về bạn bè (kết bạn, hủy bạn) |
|
|
32
|
+
| ✓✓ | Sự kiện bạn bè đã xem tin nhắn |
|
|
33
|
+
| ✓✓ | Sự kiện bạn bè đang soạn tin |
|
|
34
|
+
| 💬 | **_NHẮN TIN_** |
|
|
35
|
+
| ✓ | Gửi tin nhắn (Văn bản, Ảnh, Sticker) |
|
|
36
|
+
| ✓ | Trả lời tin nhắn (Quote) |
|
|
37
|
+
| ✓ | Gắn thẻ (Tag) thành viên trong nhóm |
|
|
38
|
+
| ✓✓ | Thả/Gỡ cảm xúc (Reaction) vào tin nhắn |
|
|
39
|
+
| ✓ | Thu hồi tin nhắn đã gửi |
|
|
40
|
+
| ✓✓ | Lấy danh sách tin nhắn cũ |
|
|
41
|
+
| ✓ | Mô phỏng trạng thái "Đang soạn tin..." |
|
|
42
|
+
| 👤 | **_QUẢN LÝ TÀI KHOẢN & BẠN BÈ_** |
|
|
43
|
+
| ✓ | Gửi / Hủy lời mời kết bạn |
|
|
44
|
+
| ✓ | Chấp nhận / Từ chối lời mời kết bạn |
|
|
45
|
+
| ✓ | Hủy kết bạn (xóa bạn) |
|
|
46
|
+
| ✓ | Lấy danh sách bạn bè & lời mời đã gửi |
|
|
47
|
+
| ✓✓ | Xóa tin nhắn của User/Group |
|
|
48
|
+
| ✓✓ | Tắt mở thông báo User/Group |
|
|
49
|
+
| ✓✓ | Cập nhật quyền riêng tư |
|
|
50
|
+
| ✓ | Cập nhật thông tin cá nhân (name, gender, avatar..) |
|
|
51
|
+
| ✓ | Tìm người dùng bằng SĐT hoặc User ID |
|
|
52
|
+
| ✓ | Lấy thông tin chi tiết người dùng |
|
|
53
|
+
| ✓ | Chặn / Bỏ chặn người dùng |
|
|
54
|
+
| 👥 | **_QUẢN LÝ NHÓM_** |
|
|
55
|
+
| ✓ | Tạo nhóm |
|
|
56
|
+
| ✓✓ | Cập nhật cài đặt nhóm |
|
|
57
|
+
| ✓ | Thêm / Xóa thành viên khỏi nhóm |
|
|
58
|
+
| ✓ | Giải tán nhóm |
|
|
59
|
+
| ✓ | Thay đổi tên & ảnh đại diện nhóm |
|
|
60
|
+
| ✓ | Bổ nhiệm quyền Phó nhóm |
|
|
61
|
+
| ✓✓ | Chuyển quyền Trưởng nhóm |
|
|
62
|
+
| ✓ | Lấy danh sách tất cả các nhóm đã tham gia |
|
|
63
|
+
| ✓ | Lấy thông tin nhóm (từ ID hoặc link) |
|
|
64
|
+
| ✓ | Tham gia nhóm bằng link / Rời nhóm |
|
|
65
|
+
| ✓ | Tạo ghi chú (Note) trong nhóm |
|
|
66
|
+
| 🎨 | **_KHÁC_** |
|
|
67
|
+
| ✓ | Tạo bình chọn (Poll) trong nhóm |
|
|
68
|
+
| ✓ | Quản lý thẻ phân loại (Tag) |
|
|
69
|
+
| ✓ | Tìm kiếm sticker |
|
|
67
70
|
|
|
68
71
|
|
|
69
72
|
## 🚀 Hướng Dẫn Cài Đặt
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ZaloGroup = void 0;
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
const
|
|
5
|
+
const zca_js_1 = require("zca-js");
|
|
6
|
+
const ZaloGroupDescription_1 = require("./ZaloGroupDescription");
|
|
6
7
|
const ZaloNodeProperties_1 = require("../shared/ZaloNodeProperties");
|
|
7
8
|
const helper_1 = require("../utils/helper");
|
|
8
9
|
const zalo_helper_1 = require("../utils/zalo.helper");
|
|
@@ -103,89 +104,6 @@ class ZaloGroup {
|
|
|
103
104
|
returnData.push({ json: { success: true, response }, pairedItem: { item: i } });
|
|
104
105
|
break;
|
|
105
106
|
}
|
|
106
|
-
case 'addUserToGroup': {
|
|
107
|
-
const groupId = this.getNodeParameter('groupId', i);
|
|
108
|
-
const userIdsParam = this.getNodeParameter('userIds', i, '');
|
|
109
|
-
const phoneNumber = this.getNodeParameter('phoneNumber', i, '');
|
|
110
|
-
if (!userIdsParam && !phoneNumber) {
|
|
111
|
-
returnData.push({
|
|
112
|
-
json: {
|
|
113
|
-
success: false,
|
|
114
|
-
error: 'You must provide either User IDs or a Phone Number.'
|
|
115
|
-
},
|
|
116
|
-
pairedItem: {
|
|
117
|
-
item: i
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
const userList = new Set();
|
|
123
|
-
if (userIdsParam) {
|
|
124
|
-
userIdsParam.split(',').map(id => id.trim()).filter(id => id).forEach(id => userList.add(id));
|
|
125
|
-
}
|
|
126
|
-
if (phoneNumber) {
|
|
127
|
-
try {
|
|
128
|
-
const userFound = await api.findUser(phoneNumber);
|
|
129
|
-
if (userFound && userFound.uid) {
|
|
130
|
-
userList.add(userFound.uid);
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
this.logger.warn(`User not found for phone number: ${phoneNumber}. Skipping.`);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
catch (error) {
|
|
137
|
-
this.logger.warn(`Failed to find user by phone number ${phoneNumber}: ${error.message}`);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
const finalUserList = Array.from(userList);
|
|
141
|
-
if (finalUserList.length > 0) {
|
|
142
|
-
const response = await api.addUserToGroup(finalUserList, groupId);
|
|
143
|
-
const errorMembers = response.errorMembers || [];
|
|
144
|
-
const allErrorMembers = errorMembers.length === finalUserList.length;
|
|
145
|
-
returnData.push({
|
|
146
|
-
json: { success: true, all_error: allErrorMembers, response: response },
|
|
147
|
-
pairedItem: { item: i }
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
returnData.push({
|
|
152
|
-
json: { success: false, error: 'No valid users to add to the group.' },
|
|
153
|
-
pairedItem: { item: i }
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
break;
|
|
158
|
-
}
|
|
159
|
-
case 'changeGroupAvatar': {
|
|
160
|
-
const groupId = this.getNodeParameter('groupId', i);
|
|
161
|
-
const imageUrl = this.getNodeParameter('imageUrl', i);
|
|
162
|
-
let finalAvatarSource;
|
|
163
|
-
let tempFilePath;
|
|
164
|
-
try {
|
|
165
|
-
if (!imageUrl) {
|
|
166
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Image URL is required for changing group avatar.', { itemIndex: i });
|
|
167
|
-
}
|
|
168
|
-
try {
|
|
169
|
-
new URL(imageUrl);
|
|
170
|
-
this.logger.info(`Downloading image from URL for avatar: ${imageUrl}`);
|
|
171
|
-
tempFilePath = await (0, helper_1.saveFile)(imageUrl);
|
|
172
|
-
finalAvatarSource = tempFilePath;
|
|
173
|
-
}
|
|
174
|
-
catch (urlError) {
|
|
175
|
-
this.logger.info(`Treating image URL as local file path for avatar: ${imageUrl}`);
|
|
176
|
-
finalAvatarSource = imageUrl;
|
|
177
|
-
}
|
|
178
|
-
const response = await api.changeGroupAvatar(finalAvatarSource, groupId);
|
|
179
|
-
returnData.push({ json: { success: true, response }, pairedItem: { item: i } });
|
|
180
|
-
}
|
|
181
|
-
finally {
|
|
182
|
-
if (tempFilePath) {
|
|
183
|
-
await (0, helper_1.removeFile)(tempFilePath);
|
|
184
|
-
this.logger.info(`Successfully removed temporary avatar file: ${tempFilePath}`);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
107
|
case 'changeGroupName': {
|
|
190
108
|
const groupId = this.getNodeParameter('groupId', i);
|
|
191
109
|
const newName = this.getNodeParameter('newName', i);
|
|
@@ -193,43 +111,6 @@ class ZaloGroup {
|
|
|
193
111
|
returnData.push({ json: { success: true, response }, pairedItem: { item: i } });
|
|
194
112
|
break;
|
|
195
113
|
}
|
|
196
|
-
case 'getGroupMembers': {
|
|
197
|
-
const groupId = this.getNodeParameter('groupId', i);
|
|
198
|
-
const response = await api.getGroupInfo(groupId);
|
|
199
|
-
const groupDetails = response?.gridInfoMap?.[groupId];
|
|
200
|
-
const memberIds = groupDetails?.memVerList || [];
|
|
201
|
-
if (memberIds.length > 0) {
|
|
202
|
-
const membersInfo = await api.getGroupMembersInfo(memberIds);
|
|
203
|
-
const profiles = membersInfo.profiles;
|
|
204
|
-
returnData.push({
|
|
205
|
-
json: {
|
|
206
|
-
success: true,
|
|
207
|
-
memberIds,
|
|
208
|
-
profiles,
|
|
209
|
-
totalMembers: memberIds.length,
|
|
210
|
-
groupInfo: groupDetails
|
|
211
|
-
},
|
|
212
|
-
pairedItem: {
|
|
213
|
-
item: i,
|
|
214
|
-
},
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
returnData.push({
|
|
219
|
-
json: {
|
|
220
|
-
success: true,
|
|
221
|
-
memberIds: [],
|
|
222
|
-
profiles: {},
|
|
223
|
-
totalMembers: 0,
|
|
224
|
-
groupInfo: groupDetails || null
|
|
225
|
-
},
|
|
226
|
-
pairedItem: {
|
|
227
|
-
item: i,
|
|
228
|
-
},
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
114
|
case 'getAllGroups': {
|
|
234
115
|
const response = await api.getAllGroups();
|
|
235
116
|
returnData.push({ json: { success: true, response }, pairedItem: { item: i } });
|
|
@@ -293,21 +174,131 @@ class ZaloGroup {
|
|
|
293
174
|
returnData.push({ json: { success: true, response }, pairedItem: { item: i } });
|
|
294
175
|
break;
|
|
295
176
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
177
|
+
case 'updateGroupSettings' : {
|
|
178
|
+
const groupId = this.getNodeParameter('groupId', i);
|
|
179
|
+
const settings = this.getNodeParameter('settings', i, {});
|
|
180
|
+
const response = await api.updateGroupSettings(settings, groupId);
|
|
181
|
+
returnData.push({ json: { success: true, response }, pairedItem: { item: i } });
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
case 'getGroupMembers': {
|
|
185
|
+
const groupId = this.getNodeParameter('groupId', i);
|
|
186
|
+
const response = await api.getGroupInfo(groupId);
|
|
187
|
+
const groupDetails = response?.gridInfoMap?.[groupId];
|
|
188
|
+
const memberIds = groupDetails?.memVerList || [];
|
|
189
|
+
if (memberIds.length > 0) {
|
|
190
|
+
const membersInfo = await api.getGroupMembersInfo(memberIds);
|
|
191
|
+
const profiles = membersInfo.profiles;
|
|
192
|
+
returnData.push({
|
|
193
|
+
json: {
|
|
194
|
+
success: true,
|
|
195
|
+
memberIds,
|
|
196
|
+
profiles,
|
|
197
|
+
totalMembers: memberIds.length,
|
|
198
|
+
groupInfo: groupDetails
|
|
199
|
+
},
|
|
200
|
+
pairedItem: {
|
|
201
|
+
item: i,
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
returnData.push({
|
|
207
|
+
json: {
|
|
208
|
+
success: true,
|
|
209
|
+
memberIds: [],
|
|
210
|
+
profiles: {},
|
|
211
|
+
totalMembers: 0,
|
|
212
|
+
groupInfo: groupDetails || null
|
|
213
|
+
},
|
|
214
|
+
pairedItem: {
|
|
215
|
+
item: i,
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
case 'addUserToGroup': {
|
|
222
|
+
const groupId = this.getNodeParameter('groupId', i);
|
|
223
|
+
const userIdsParam = this.getNodeParameter('userIds', i, '');
|
|
224
|
+
const phoneNumber = this.getNodeParameter('phoneNumber', i, '');
|
|
225
|
+
if (!userIdsParam && !phoneNumber) {
|
|
226
|
+
returnData.push({
|
|
227
|
+
json: {
|
|
228
|
+
success: false,
|
|
229
|
+
error: 'You must provide either User IDs or a Phone Number.'
|
|
230
|
+
},
|
|
231
|
+
pairedItem: {
|
|
232
|
+
item: i
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
const userList = new Set();
|
|
238
|
+
if (userIdsParam) {
|
|
239
|
+
userIdsParam.split(',').map(id => id.trim()).filter(id => id).forEach(id => userList.add(id));
|
|
240
|
+
}
|
|
241
|
+
if (phoneNumber) {
|
|
242
|
+
try {
|
|
243
|
+
const userFound = await api.findUser(phoneNumber);
|
|
244
|
+
if (userFound && userFound.uid) {
|
|
245
|
+
userList.add(userFound.uid);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
this.logger.warn(`User not found for phone number: ${phoneNumber}. Skipping.`);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
this.logger.warn(`Failed to find user by phone number ${phoneNumber}: ${error.message}`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
const finalUserList = Array.from(userList);
|
|
256
|
+
if (finalUserList.length > 0) {
|
|
257
|
+
const response = await api.addUserToGroup(finalUserList, groupId);
|
|
258
|
+
const errorMembers = response.errorMembers || [];
|
|
259
|
+
const allErrorMembers = errorMembers.length === finalUserList.length;
|
|
260
|
+
returnData.push({
|
|
261
|
+
json: { success: true, all_error: allErrorMembers, response: response },
|
|
262
|
+
pairedItem: { item: i }
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
returnData.push({
|
|
267
|
+
json: { success: false, error: 'No valid users to add to the group.' },
|
|
268
|
+
pairedItem: { item: i }
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
case 'changeGroupAvatar': {
|
|
275
|
+
const groupId = this.getNodeParameter('groupId', i);
|
|
276
|
+
const imageUrl = this.getNodeParameter('imageUrl', i);
|
|
277
|
+
let finalAvatarSource;
|
|
278
|
+
let tempFilePath;
|
|
279
|
+
try {
|
|
280
|
+
if (!imageUrl) {
|
|
281
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Image URL is required for changing group avatar.', { itemIndex: i });
|
|
282
|
+
}
|
|
283
|
+
try {
|
|
284
|
+
new URL(imageUrl);
|
|
285
|
+
tempFilePath = await (0, helper_1.saveFile)(imageUrl);
|
|
286
|
+
finalAvatarSource = tempFilePath;
|
|
287
|
+
}
|
|
288
|
+
catch (urlError) {
|
|
289
|
+
finalAvatarSource = imageUrl;
|
|
290
|
+
}
|
|
291
|
+
const response = await api.changeGroupAvatar(finalAvatarSource, groupId);
|
|
292
|
+
returnData.push({ json: { success: true, response }, pairedItem: { item: i } });
|
|
293
|
+
}
|
|
294
|
+
finally {
|
|
295
|
+
if (tempFilePath) {
|
|
296
|
+
await (0, helper_1.removeFile)(tempFilePath);
|
|
297
|
+
this.logger.info(`Successfully removed temporary avatar file: ${tempFilePath}`);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
311
302
|
}
|
|
312
303
|
}
|
|
313
304
|
}
|
|
@@ -37,6 +37,12 @@ exports.zaloGroupOperations = [
|
|
|
37
37
|
description: 'Tạo một nhóm mới',
|
|
38
38
|
action: 'Tạo Nhóm',
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Cập Nhật Cài Đặt Nhóm',
|
|
42
|
+
value: 'updateGroupSettings',
|
|
43
|
+
description: 'Cập nhật các cài đặt quyền hạn trong nhóm',
|
|
44
|
+
action: 'Cập Nhật Cài Đặt Nhóm',
|
|
45
|
+
},
|
|
40
46
|
{
|
|
41
47
|
name: 'Chuyển Quyền Chủ Nhóm',
|
|
42
48
|
value: 'changeGroupOwner',
|
|
@@ -109,12 +115,6 @@ exports.zaloGroupOperations = [
|
|
|
109
115
|
description: 'Giải tán một nhóm. Chỉ chủ nhóm mới có thể thực hiện.',
|
|
110
116
|
action: 'Giải Tán Nhóm',
|
|
111
117
|
},
|
|
112
|
-
{
|
|
113
|
-
name: 'Xóa Tin Nhắn Của Thành Viên',
|
|
114
|
-
value: 'deleteMessage',
|
|
115
|
-
description: 'Xóa tin nhắn của thành viên trong nhóm (yêu cầu quyền admin)',
|
|
116
|
-
action: 'Xóa Tin Nhắn Của Thành Viên',
|
|
117
|
-
},
|
|
118
118
|
],
|
|
119
119
|
default: 'createGroup',
|
|
120
120
|
},
|
|
@@ -156,11 +156,11 @@ exports.zaloGroupFields = [
|
|
|
156
156
|
'changeGroupOwner',
|
|
157
157
|
'leaveGroup',
|
|
158
158
|
'disperseGroup',
|
|
159
|
-
'
|
|
159
|
+
'updateGroupSettings',
|
|
160
160
|
],
|
|
161
161
|
},
|
|
162
162
|
},
|
|
163
|
-
description: 'ID nhóm',
|
|
163
|
+
description: 'ID nhóm / threadID',
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
displayName: 'User ID Người Dùng',
|
|
@@ -171,7 +171,7 @@ exports.zaloGroupFields = [
|
|
|
171
171
|
displayOptions: {
|
|
172
172
|
show: {
|
|
173
173
|
resource: ['zaloGroup'],
|
|
174
|
-
operation: ['addGroupDeputy', 'changeGroupOwner'
|
|
174
|
+
operation: ['addGroupDeputy', 'changeGroupOwner'],
|
|
175
175
|
},
|
|
176
176
|
},
|
|
177
177
|
description: 'ID của người dùng',
|
|
@@ -309,78 +309,87 @@ exports.zaloGroupFields = [
|
|
|
309
309
|
displayOptions: {
|
|
310
310
|
show: {
|
|
311
311
|
resource: ['zaloGroup'],
|
|
312
|
-
operation: ['joinGroupLink'],
|
|
312
|
+
operation: ['joinGroupLink', 'getGroupLinkInfo'],
|
|
313
313
|
},
|
|
314
314
|
},
|
|
315
|
-
description: 'Link
|
|
315
|
+
description: 'Link tham gia nhóm (ví dụ: https://zalo.me/g/xxxxxx)',
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
|
-
displayName: '
|
|
319
|
-
name: '
|
|
320
|
-
type: '
|
|
321
|
-
|
|
322
|
-
default:
|
|
318
|
+
displayName: 'Cài Đặt',
|
|
319
|
+
name: 'settings',
|
|
320
|
+
type: 'collection',
|
|
321
|
+
placeholder: 'Thêm Cài Đặt',
|
|
322
|
+
default: {},
|
|
323
323
|
displayOptions: {
|
|
324
324
|
show: {
|
|
325
325
|
resource: ['zaloGroup'],
|
|
326
|
-
operation: ['
|
|
326
|
+
operation: ['updateGroupSettings'],
|
|
327
327
|
},
|
|
328
328
|
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
default: '',
|
|
337
|
-
displayOptions: {
|
|
338
|
-
show: {
|
|
339
|
-
resource: ['zaloGroup'],
|
|
340
|
-
operation: ['deleteMessage'],
|
|
329
|
+
options: [
|
|
330
|
+
{
|
|
331
|
+
displayName: 'Chặn Đổi Tên/Avatar',
|
|
332
|
+
name: 'blockName',
|
|
333
|
+
type: 'boolean',
|
|
334
|
+
default: false,
|
|
335
|
+
description: 'Không cho phép thành viên thay đổi tên và ảnh đại diện nhóm',
|
|
341
336
|
},
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
type: 'boolean',
|
|
349
|
-
default: true,
|
|
350
|
-
displayOptions: {
|
|
351
|
-
show: {
|
|
352
|
-
resource: ['zaloGroup'],
|
|
353
|
-
operation: ['deleteMessage'],
|
|
337
|
+
{
|
|
338
|
+
displayName: 'Đánh Dấu Tin Của Trưởng/Phó Nhóm',
|
|
339
|
+
name: 'signAdminMsg',
|
|
340
|
+
type: 'boolean',
|
|
341
|
+
default: false,
|
|
342
|
+
description: 'Đánh dấu tin nhắn từ trưởng/phó nhóm',
|
|
354
343
|
},
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
// type: 'number',
|
|
362
|
-
// default: 50,
|
|
363
|
-
// required: true,
|
|
364
|
-
// displayOptions: {
|
|
365
|
-
// show: {
|
|
366
|
-
// resource: ['zaloGroup'],
|
|
367
|
-
// operation: [],
|
|
368
|
-
// },
|
|
369
|
-
// },
|
|
370
|
-
// description: 'Số lượng tối đa cần lấy',
|
|
371
|
-
// },
|
|
372
|
-
{
|
|
373
|
-
displayName: 'Link Mời Nhóm',
|
|
374
|
-
name: 'groupLink',
|
|
375
|
-
type: 'string',
|
|
376
|
-
required: true,
|
|
377
|
-
default: '',
|
|
378
|
-
displayOptions: {
|
|
379
|
-
show: {
|
|
380
|
-
resource: ['zaloGroup'],
|
|
381
|
-
operation: ['getGroupLinkInfo'],
|
|
344
|
+
{
|
|
345
|
+
displayName: 'Chặn Ghim Tin Nhắn',
|
|
346
|
+
name: 'setTopicOnly',
|
|
347
|
+
type: 'boolean',
|
|
348
|
+
default: false,
|
|
349
|
+
description: 'Không cho phép thành viên ghim tin nhắn, ghi chú, bình chọn',
|
|
382
350
|
},
|
|
383
|
-
|
|
384
|
-
|
|
351
|
+
{
|
|
352
|
+
displayName: 'Xem Tin Nhắn Cũ',
|
|
353
|
+
name: 'enableMsgHistory',
|
|
354
|
+
type: 'boolean',
|
|
355
|
+
default: false,
|
|
356
|
+
description: 'Cho phép thành viên mới đọc tin nhắn gần nhất',
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
displayName: 'Duyệt Thành Viên',
|
|
360
|
+
name: 'joinAppr',
|
|
361
|
+
type: 'boolean',
|
|
362
|
+
default: false,
|
|
363
|
+
description: 'Bật chế độ phê duyệt thành viên mới',
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
displayName: 'Chặn Tạo Ghi Chú',
|
|
367
|
+
name: 'lockCreatePost',
|
|
368
|
+
type: 'boolean',
|
|
369
|
+
default: false,
|
|
370
|
+
description: 'Không cho phép thành viên tạo mới ghi chú, nhắc hẹn',
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
displayName: 'Chặn Tạo Bình Chọn',
|
|
374
|
+
name: 'lockCreatePoll',
|
|
375
|
+
type: 'boolean',
|
|
376
|
+
default: false,
|
|
377
|
+
description: 'Không cho phép thành viên tạo mới bình chọn',
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
displayName: 'Chặn Gửi Tin Nhắn',
|
|
381
|
+
name: 'lockSendMsg',
|
|
382
|
+
type: 'boolean',
|
|
383
|
+
default: false,
|
|
384
|
+
description: 'Không cho phép thành viên gửi tin nhắn',
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
displayName: 'Chặn Xem Thành Viên',
|
|
388
|
+
name: 'lockViewMember',
|
|
389
|
+
type: 'boolean',
|
|
390
|
+
default: false,
|
|
391
|
+
description: 'Không cho phép thành viên xem đầy đủ danh sách thành viên',
|
|
392
|
+
},
|
|
393
|
+
],
|
|
385
394
|
},
|
|
386
395
|
];
|