n8n-nodes-zalo-custom 1.1.0 → 1.1.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.
@@ -1,644 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zaloUserFields = exports.zaloUserOperations = void 0;
4
- exports.zaloUserOperations = [
5
- {
6
- displayName: 'Operation',
7
- name: 'operation',
8
- type: 'options',
9
- noDataExpression: true,
10
- displayOptions: {
11
- show: {
12
- resource: ['zaloUser'],
13
- },
14
- },
15
- options: [
16
- {
17
- name: 'Lấy Danh Sách Bạn Bè',
18
- value: 'getAllFriends',
19
- action: 'Lấy danh sách bạn bè',
20
- description: 'Lấy danh sách bạn bè',
21
- },
22
- // {
23
- // name: 'Lấy Trạng Thái Online Của Bạn Bè',
24
- // value: 'getFriendOnlines',
25
- // action: 'Lấy trạng thái online của bạn bè',
26
- // description: 'Lấy trạng thái online và thời gian truy cập cuối của bạn bè',
27
- // },
28
- {
29
- name: 'Chấp Nhận Lời Mời Kết Bạn',
30
- value: 'acceptFriendRequest',
31
- action: 'Chấp nhận lời mời kết bạn',
32
- description: 'Chấp nhận lời mời kết bạn',
33
- },
34
- {
35
- name: 'Từ Chối Lời Mời Kết Bạn',
36
- value: 'rejectFriendRequest',
37
- action: 'Từ chối lời mời kết bạn',
38
- description: 'Từ chối lời mời kết bạn',
39
- },
40
- {
41
- name: 'Xóa Bạn',
42
- value: 'removeFriend',
43
- action: 'Xóa bạn',
44
- description: 'Xóa bạn bè',
45
- },
46
- {
47
- name: 'Lấy Danh Sách Gợi Ý Kết Bạn',
48
- value: 'getFriendRecommendations',
49
- action: 'Lấy danh sách gợi ý kết bạn',
50
- description: 'Lấy danh sách gợi ý kết bạn',
51
- },
52
- {
53
- name: 'Gửi Lời Mời Kết Bạn',
54
- value: 'sendFriendRequest',
55
- action: 'Gửi lời mời kết bạn',
56
- description: 'Gửi lời mời kết bạn',
57
- },
58
- {
59
- name: 'Thu Hồi Lời Mời Kết Bạn',
60
- value: 'undoFriendRequest',
61
- action: 'Thu hồi lời mời kết bạn',
62
- description: 'Thu hồi lời mời kết bạn',
63
- },
64
- {
65
- name: 'Lấy Danh Sách Lời Mời Đã Gửi',
66
- value: 'getSentFriendRequest',
67
- action: 'Lấy danh sách lời mời đã gửi',
68
- description: 'Lấy danh sách lời mời đã gửi',
69
- },
70
- {
71
- name: 'Tìm Người Dùng Theo User ID',
72
- value: 'getUserInfo',
73
- action: 'Tìm người dùng theo user ID',
74
- description: 'Tìm người dùng theo user ID',
75
- },
76
- {
77
- name: 'Tìm Người Dùng Theo Số Điện Thoại',
78
- value: 'findUser',
79
- action: 'Tìm người dùng theo số điện thoại',
80
- description: 'Tìm người dùng theo số điện thoại',
81
- },
82
- {
83
- name: 'Đổi Tên Gợi Nhớ Của Người Dùng',
84
- value: 'changeAliasName',
85
- action: 'Đổi tên gợi nhớ của người dùng',
86
- description: 'Đổi tên gợi nhớ của người dùng',
87
- },
88
- {
89
- name: 'Lấy QR Người Dùng',
90
- value: 'getQR',
91
- action: 'Lấy QR người dùng',
92
- description: 'Lấy QR của người dùng',
93
- },
94
- {
95
- name: 'Bỏ Chặn Người Dùng',
96
- value: 'unblockUser',
97
- action: 'Bỏ chặn người dùng',
98
- description: 'Bỏ chặn người dùng',
99
- },
100
- {
101
- name: 'Chặn Người Dùng',
102
- value: 'blockUser',
103
- action: 'Chặn người dùng',
104
- description: 'Chặn người dùng',
105
- },
106
- {
107
- name: 'Đánh Dấu Tin Nhắn Chưa Đọc',
108
- value: 'addUnreadMark',
109
- action: 'Đánh dấu tin nhắn chưa đọc',
110
- description: 'Đánh dấu tin nhắn là chưa đọc',
111
- },
112
- {
113
- name: 'Đánh Dấu Tin Nhắn Đã Đọc',
114
- value: 'removeUnreadMark',
115
- action: 'Đánh dấu tin nhắn đã đọc',
116
- description: 'Đánh dấu tin nhắn là đã đọc',
117
- },
118
- {
119
- name: 'Lấy Trạng Thái Hoạt Động Của Người Dùng',
120
- value: 'getLastOnline',
121
- action: 'Lấy trạng thái hoạt động của người dùng',
122
- description: 'Lấy thời gian hoạt động cuối cùng của một người dùng qua User ID',
123
- },
124
- {
125
- name: 'Tắt Hoặc Bật Thông Báo',
126
- value: 'setMute',
127
- action: 'Tắt hoặc bật thông báo',
128
- description: 'Tắt hoặc bật thông báo cho Người dùng/Nhóm',
129
- },
130
- {
131
- name: 'Xóa Tin Nhắn',
132
- value: 'deleteMessage',
133
- action: 'Xóa tin nhắn',
134
- description: 'Xóa tin nhắn (chỉ mình tôi hoặc mọi người nếu là admin)',
135
- },
136
- {
137
- name: 'Thu Hồi Tin Nhắn',
138
- value: 'undoMessage',
139
- action: 'Thu hồi tin nhắn',
140
- description: 'Thu hồi tin nhắn đã gửi',
141
- },
142
- {
143
- name: 'Lấy Thông Tin Tài Khoản',
144
- value: 'fetchAccountInfo',
145
- action: 'Lấy thông tin tài khoản',
146
- description: 'Lấy thông tin của tài khoản đã đăng nhập',
147
- },
148
- {
149
- name: 'Lấy Ngữ Cảnh Tài Khoản Hiện Tại',
150
- value: 'getContext',
151
- action: 'Lấy ngữ cảnh tài khoản hiện tại',
152
- description: 'Lấy ngữ cảnh (context) của phiên làm việc hiện tại',
153
- },
154
- {
155
- name: 'Lấy Tin Nhắn Đến Cũ Của Tài Khoản',
156
- value: 'getOldMessages',
157
- action: 'Lấy tin nhắn đến cũ của tài khoản',
158
- description: 'Lấy các tin nhắn cũ hơn trong một cuộc trò chuyện',
159
- },
160
- {
161
- name: 'Cập Nhật Thông Tin Tài Khoản',
162
- value: 'updateProfile',
163
- action: 'Cập nhật thông tin tài khoản',
164
- description: 'Cập nhật tên, ngày sinh, giới tính của tài khoản',
165
- },
166
- {
167
- name: 'Đổi Avatar Tài Khoản',
168
- value: 'changeAccountAvatar',
169
- action: 'Đổi avatar tài khoản',
170
- description: 'Đổi ảnh đại diện của tài khoản hiện tại',
171
- },
172
- {
173
- name: 'Cập Nhật Cài Đặt Quyền Riêng Tư',
174
- value: 'updateSettings',
175
- action: 'Cập nhật cài đặt quyền riêng tư',
176
- description: 'Cập nhật các cài đặt quyền riêng tư (ngày sinh, trạng thái online, nguồn kết bạn...)',
177
- },
178
- ],
179
- default: 'getUserInfo',
180
- },
181
- ];
182
- exports.zaloUserFields = [
183
- {
184
- displayName: 'Thread Type',
185
- name: 'threadType',
186
- type: 'options',
187
- required: true,
188
- displayOptions: {
189
- show: {
190
- resource: ['zaloUser'],
191
- operation: ['removeUnreadMark', 'addUnreadMark', 'undoMessage', 'getOldMessages', 'setMute', 'deleteMessage'],
192
- },
193
- },
194
- options: [
195
- {
196
- name: 'User',
197
- value: 0,
198
- description: 'Người dùng',
199
- },
200
- {
201
- name: 'Group',
202
- value: 1,
203
- description: 'Nhóm',
204
- },
205
- ],
206
- default: 0,
207
- description: 'Loại cuộc trò chuyện đang tương tác',
208
- },
209
- {
210
- displayName: 'Thread ID',
211
- name: 'threadId',
212
- type: 'string',
213
- required: true,
214
- displayOptions: {
215
- show: {
216
- resource: ['zaloUser'],
217
- operation: ['undoMessage', 'removeUnreadMark', 'addUnreadMark', 'setMute', 'deleteMessage'],
218
- },
219
- },
220
- default: '',
221
- description: 'ID của cuộc trò chuyện (có thể là user ID hoặc group ID)',
222
- },
223
- {
224
- displayName: 'msgId',
225
- name: 'msgId',
226
- type: 'string',
227
- required: true,
228
- displayOptions: {
229
- show: {
230
- resource: ['zaloUser'],
231
- operation: ['undoMessage', 'deleteMessage'],
232
- },
233
- },
234
- default: '',
235
- description: 'Message ID',
236
- },
237
- {
238
- displayName: 'cliMsgId',
239
- name: 'cliMsgId',
240
- type: 'string',
241
- required: true,
242
- displayOptions: {
243
- show: {
244
- resource: ['zaloUser'],
245
- operation: ['undoMessage', 'deleteMessage'],
246
- },
247
- },
248
- default: '',
249
- description: 'Client message ID',
250
- },
251
- {
252
- displayName: 'User ID',
253
- name: 'userId',
254
- type: 'string',
255
- required: true,
256
- displayOptions: {
257
- show: {
258
- resource: ['zaloUser'],
259
- operation: [
260
- 'changeAliasName',
261
- 'acceptFriendRequest',
262
- 'sendFriendRequest',
263
- 'blockUser',
264
- 'unblockUser',
265
- 'rejectFriendRequest',
266
- 'removeFriend',
267
- 'getUserInfo',
268
- 'undoFriendRequest',
269
- 'getQR',
270
- 'getLastOnline',
271
- 'deleteMessage',
272
- ],
273
- },
274
- },
275
- default: '',
276
- description: 'ID của người dùng',
277
- },
278
- {
279
- displayName: 'Last Message ID',
280
- name: 'lastMsgId',
281
- type: 'string',
282
- displayOptions: {
283
- show: {
284
- resource: ['zaloUser'],
285
- operation: ['getOldMessages'],
286
- },
287
- },
288
- default: '',
289
- placeholder: 'Để trống để lấy tin nhắn gần nhất',
290
- description: 'Lấy các tin nhắn cũ hơn ID này, để trống để lấy tin nhắn mới nhất (chức năng này có thể không hoạt động như mong muốn)',
291
- },
292
- {
293
- displayName: 'Alias Name',
294
- name: 'aliasName',
295
- type: 'string',
296
- required: true,
297
- displayOptions: {
298
- show: {
299
- resource: ['zaloUser'],
300
- operation: ['changeAliasName'],
301
- },
302
- },
303
- default: '',
304
- description: 'Tên gợi nhớ mới',
305
- },
306
- {
307
- displayName: 'Message',
308
- name: 'message',
309
- type: 'string',
310
- required: true,
311
- displayOptions: {
312
- show: {
313
- resource: ['zaloUser'],
314
- operation: ['sendFriendRequest'],
315
- },
316
- },
317
- default: '',
318
- placeholder: 'Xin chào, kết bạn với mình nhé!',
319
- description: 'Tin nhắn kèm theo lời mời kết bạn',
320
- },
321
- {
322
- displayName: 'Name',
323
- name: 'name',
324
- type: 'string',
325
- required: true,
326
- displayOptions: {
327
- show: {
328
- resource: ['zaloUser'],
329
- operation: ['updateProfile'],
330
- },
331
- },
332
- default: '',
333
- description: 'Tên hiển thị',
334
- },
335
- {
336
- displayName: 'Date of Birth',
337
- name: 'dob',
338
- type: 'string',
339
- required: true,
340
- displayOptions: {
341
- show: {
342
- resource: ['zaloUser'],
343
- operation: ['updateProfile'],
344
- },
345
- },
346
- default: '',
347
- description: 'Ngày sinh (YYYY-MM-DD)',
348
- },
349
- {
350
- displayName: 'Gender',
351
- name: 'gender',
352
- type: 'options',
353
- required: true,
354
- displayOptions: {
355
- show: {
356
- resource: ['zaloUser'],
357
- operation: ['updateProfile'],
358
- },
359
- },
360
- options: [
361
- {
362
- name: 'Male',
363
- value: 1,
364
- },
365
- {
366
- name: 'Female',
367
- value: 2,
368
- },
369
- {
370
- name: 'Other',
371
- value: 3,
372
- },
373
- ],
374
- default: 1,
375
- description: 'Giới tính',
376
- },
377
- {
378
- displayName: 'URL Ảnh',
379
- name: 'imageUrl',
380
- type: 'string',
381
- required: true,
382
- default: '',
383
- displayOptions: {
384
- show: {
385
- resource: ['zaloUser'],
386
- operation: ['changeAccountAvatar'],
387
- },
388
- },
389
- description: 'URL ảnh (nếu avatar cần ảnh hơn 240x240 rõ nét để tránh bị gỡ)',
390
- },
391
- {
392
- displayName: 'Language',
393
- name: 'language',
394
- type: 'string',
395
- required: false,
396
- displayOptions: {
397
- show: {
398
- resource: ['zaloUser'],
399
- operation: ['updateLang'],
400
- },
401
- },
402
- default: '',
403
- description: 'Ngôn ngữ (vi, en)',
404
- },
405
- {
406
- displayName: 'Phone Number',
407
- name: 'phoneNumber',
408
- type: 'string',
409
- required: true,
410
- displayOptions: {
411
- show: {
412
- resource: ['zaloUser'],
413
- operation: ['findUser'],
414
- },
415
- },
416
- default: '',
417
- description: 'Số điện thoại cần tìm kiếm',
418
- },
419
- {
420
- displayName: 'Hành Động',
421
- name: 'muteAction',
422
- type: 'options',
423
- options: [
424
- {
425
- name: 'Tắt Thông Báo',
426
- value: 1,
427
- },
428
- {
429
- name: 'Bật Thông Báo',
430
- value: 3,
431
- },
432
- ],
433
- default: 1,
434
- displayOptions: {
435
- show: {
436
- resource: ['zaloUser'],
437
- operation: ['setMute'],
438
- },
439
- },
440
- description: 'Chọn hành động tắt hoặc bật thông báo',
441
- },
442
- {
443
- displayName: 'Thời Gian Tắt',
444
- name: 'muteDuration',
445
- type: 'options',
446
- options: [
447
- {
448
- name: '1 Giờ',
449
- value: 3600,
450
- },
451
- {
452
- name: '4 Giờ',
453
- value: 14400,
454
- },
455
- {
456
- name: 'Đến 8h Sáng',
457
- value: 'until8AM',
458
- },
459
- {
460
- name: 'Vĩnh Viễn',
461
- value: -1,
462
- },
463
- {
464
- name: 'Tùy Chỉnh (Phút)',
465
- value: -2,
466
- },
467
- ],
468
- default: -1,
469
- displayOptions: {
470
- show: {
471
- resource: ['zaloUser'],
472
- operation: ['setMute'],
473
- muteAction: [1],
474
- },
475
- },
476
- description: 'Thời gian tắt thông báo',
477
- },
478
- {
479
- displayName: 'Số Phút',
480
- name: 'customMuteDuration',
481
- type: 'number',
482
- default: 5,
483
- required: true,
484
- displayOptions: {
485
- show: {
486
- resource: ['zaloUser'],
487
- operation: ['setMute'],
488
- muteAction: [1],
489
- muteDuration: [-2],
490
- },
491
- },
492
- description: 'Nhập số phút muốn tắt thông báo',
493
- },
494
- {
495
- displayName: 'Only Me',
496
- name: 'onlyMe',
497
- type: 'boolean',
498
- default: true,
499
- displayOptions: {
500
- show: {
501
- resource: ['zaloUser'],
502
- operation: ['deleteMessage'],
503
- },
504
- },
505
- description: 'Bật để xóa tin nhắn ở phía bạn. Tắt để xóa với mọi người (quyền admin)',
506
- },
507
- {
508
- displayName: 'Cài Đặt Quyền Riêng Tư',
509
- name: 'updateSettingsOptions',
510
- type: 'collection',
511
- placeholder: 'Thêm Cài Đặt',
512
- default: {},
513
- displayOptions: {
514
- show: {
515
- resource: ['zaloUser'],
516
- operation: ['updateSettings'],
517
- },
518
- },
519
- options: [
520
- {
521
- displayName: 'Hiển Thị Ngày Sinh',
522
- name: 'view_birthday',
523
- type: 'options',
524
- default: 0,
525
- options: [
526
- { name: 'Ẩn', value: 0 },
527
- { name: 'Hiện Ngày/Tháng/Năm', value: 1 },
528
- { name: 'Hiện Ngày/Tháng', value: 2 },
529
- ],
530
- },
531
- {
532
- displayName: 'Trạng Thái Online',
533
- name: 'show_online_status',
534
- type: 'options',
535
- default: 1,
536
- options: [
537
- { name: 'Ẩn', value: 0 },
538
- { name: 'Hiện', value: 1 },
539
- ],
540
- },
541
- {
542
- displayName: 'Trạng Thái Đã Xem',
543
- name: 'display_seen_status',
544
- type: 'options',
545
- default: 1,
546
- options: [
547
- { name: 'Ẩn', value: 0 },
548
- { name: 'Hiện', value: 1 },
549
- ],
550
- },
551
- {
552
- displayName: 'Nhận Tin Nhắn Từ',
553
- name: 'receive_message',
554
- type: 'options',
555
- default: 1,
556
- options: [
557
- { name: 'Mọi Người', value: 1 },
558
- { name: 'Chỉ Bạn Bè', value: 2 },
559
- ],
560
- },
561
- {
562
- displayName: 'Nhận Cuộc Gọi Từ',
563
- name: 'accept_stranger_call',
564
- type: 'options',
565
- default: 3,
566
- options: [
567
- { name: 'Chỉ Bạn Bè', value: 2 },
568
- { name: 'Mọi Người', value: 3 },
569
- { name: 'Bạn Bè & Người Lạ Từng Liên Hệ', value: 4 },
570
- ],
571
- },
572
- {
573
- displayName: 'Nguồn Kết Bạn: Số Điện Thoại',
574
- name: 'add_friend_via_phone',
575
- type: 'options',
576
- default: 1,
577
- options: [
578
- { name: 'Tắt', value: 0 },
579
- { name: 'Bật', value: 1 },
580
- ],
581
- },
582
- {
583
- displayName: 'Nguồn Kết Bạn: Mã QR',
584
- name: 'add_friend_via_qr',
585
- type: 'options',
586
- default: 1,
587
- options: [
588
- { name: 'Tắt', value: 0 },
589
- { name: 'Bật', value: 1 },
590
- ],
591
- },
592
- {
593
- displayName: 'Nguồn Kết Bạn: Nhóm',
594
- name: 'add_friend_via_group',
595
- type: 'options',
596
- default: 1,
597
- options: [
598
- { name: 'Tắt', value: 0 },
599
- { name: 'Bật', value: 1 },
600
- ],
601
- },
602
- {
603
- displayName: 'Nguồn Kết Bạn: Danh Thiếp',
604
- name: 'add_friend_via_contact',
605
- type: 'options',
606
- default: 1,
607
- options: [
608
- { name: 'Tắt', value: 0 },
609
- { name: 'Bật', value: 1 },
610
- ],
611
- },
612
- {
613
- displayName: 'Hiện Trong Gợi Ý Kết Bạn',
614
- name: 'display_on_recommend_friend',
615
- type: 'options',
616
- default: 1,
617
- options: [
618
- { name: 'Tắt', value: 0 },
619
- { name: 'Bật', value: 1 },
620
- ],
621
- },
622
- {
623
- displayName: 'Ẩn Trò Chuyện',
624
- name: 'archivedChatStatus',
625
- type: 'options',
626
- default: 1,
627
- options: [
628
- { name: 'Tắt', value: 0 },
629
- { name: 'Bật', value: 1 },
630
- ],
631
- },
632
- {
633
- displayName: 'Tin Nhắn Nhanh',
634
- name: 'quickMessageStatus',
635
- type: 'options',
636
- default: 1,
637
- options: [
638
- { name: 'Tắt', value: 0 },
639
- { name: 'Bật', value: 1 },
640
- ],
641
- },
642
- ],
643
- },
644
- ];
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zaloSessionProperties = exports.zaloApiCredential = void 0;
4
-
5
- exports.zaloApiCredential = [{
6
- displayName: 'Zalo Credential to connect with',
7
- name: 'zaloApi',
8
- required: false,
9
- }];
10
-
11
- exports.zaloSessionProperties = [
12
- {
13
- displayName: 'use Credential to connect with Zalo',
14
- name: 'userIdNoticeCredential',
15
- type: 'notice',
16
- default: '',
17
- displayOptions: {
18
- show: {
19
- useSession: [false],
20
- },
21
- },
22
- },
23
- {
24
- displayName: 'custom ID to connect with Zalo',
25
- name: 'userIdNoticeUserId',
26
- type: 'notice',
27
- default: '',
28
- displayOptions: {
29
- show: {
30
- useSession: [true],
31
- },
32
- },
33
- },
34
- {
35
- displayName: 'Select a custom credential from ID',
36
- name: 'useSession',
37
- type: 'boolean',
38
- default: false,
39
- description: 'sử dụng User ID or Phone để kết nối Zalo (credential sẽ luôn bị bỏ qua)',
40
- },
41
- {
42
- displayName: 'User ID or Phone to connect with',
43
- name: 'connectToId',
44
- type: 'string',
45
- default: '',
46
- required: true,
47
- placeholder: 'user id or 09xxx',
48
- description: 'User ID hoặc Số điện thoại (nhấn vào chỉnh sửa credential để xem)',
49
- displayOptions: {
50
- show: {
51
- useSession: [true],
52
- },
53
- },
54
- },
55
- ];