forked from binarywang/WxJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWxCpConsts.java
More file actions
779 lines (673 loc) · 17.7 KB
/
WxCpConsts.java
File metadata and controls
779 lines (673 loc) · 17.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
package me.chanjar.weixin.cp.constant;
import lombok.experimental.UtilityClass;
/**
* <pre>
* 企业微信常量
* Created by Binary Wang on 2018/8/25.
* </pre>
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
*/
@UtilityClass
public class WxCpConsts {
/**
* 企业微信端推送过来的事件类型.
* 参考文档:https://work.weixin.qq.com/api/doc#12974
*/
@UtilityClass
public static class EventType {
/**
* 成员关注事件.
*/
public static final String SUBSCRIBE = "subscribe";
/**
* 成员取消关注事件.
*/
public static final String UNSUBSCRIBE = "unsubscribe";
/**
* 进入应用事件.
*/
public static final String ENTER_AGENT = "enter_agent";
/**
* 上报地理位置.
*/
public static final String LOCATION = "LOCATION";
/**
* 异步任务完成事件推送.
*/
public static final String BATCH_JOB_RESULT = "batch_job_result";
/**
* 企业微信通讯录变更事件.
*/
public static final String CHANGE_CONTACT = "change_contact";
/**
* 企业微信模板卡片事件推送
*/
public static final String TEMPLATE_CARD_EVENT = "template_card_event";
/**
* 点击菜单拉取消息的事件推送.
*/
public static final String CLICK = "click";
/**
* 点击菜单跳转链接的事件推送.
*/
public static final String VIEW = "view";
/**
* 扫码推事件的事件推送.
*/
public static final String SCANCODE_PUSH = "scancode_push";
/**
* 扫码推事件且弹出“消息接收中”提示框的事件推送.
*/
public static final String SCANCODE_WAITMSG = "scancode_waitmsg";
/**
* 弹出系统拍照发图的事件推送.
*/
public static final String PIC_SYSPHOTO = "pic_sysphoto";
/**
* 弹出拍照或者相册发图的事件推送.
*/
public static final String PIC_PHOTO_OR_ALBUM = "pic_photo_or_album";
/**
* 弹出微信相册发图器的事件推送.
*/
public static final String PIC_WEIXIN = "pic_weixin";
/**
* 弹出地理位置选择器的事件推送.
*/
public static final String LOCATION_SELECT = "location_select";
/**
* 任务卡片事件推送.
*/
public static final String TASKCARD_CLICK = "taskcard_click";
/**
* 企业互联共享应用事件回调.
*/
public static final String SHARE_AGENT_CHANGE = "share_agent_change";
/**
* 上下游共享应用事件回调.
*/
public static final String SHARE_CHAIN_CHANGE = "share_chain_change";
/**
* 通用模板卡片右上角菜单事件推送.
*/
public static final String TEMPLATE_CARD_MENU_EVENT = "template_card_menu_event";
/**
* 长期未使用应用临时停用事件.
*/
public static final String CLOSE_INACTIVE_AGENT = "close_inactive_agent";
/**
* 长期未使用应用重新启用事件.
*/
public static final String REOPEN_INACTIVE_AGENT = "reopen_inactive_agent";
/**
* 企业成员添加外部联系人事件推送 & 会话存档客户同意进行聊天内容存档事件回调事件
*/
public static final String CHANGE_EXTERNAL_CONTACT = "change_external_contact";
/**
* 客户群事件推送
*/
public static final String CHANGE_EXTERNAL_CHAT = "change_external_chat";
/**
* 企业客户标签事件推送
*/
public static final String CHANGE_EXTERNAL_TAG = "change_external_tag";
/**
* 企业微信审批事件推送(自建应用审批)
* https://developer.work.weixin.qq.com/document/path/90269
*/
public static final String OPEN_APPROVAL_CHANGE = "open_approval_change";
/**
* 企业微信审批事件推送(系统审批)
*/
public static final String SYS_APPROVAL_CHANGE = "sys_approval_change";
/**
* 修改日历事件
*/
public static final String MODIFY_CALENDAR = "modify_calendar";
/**
* 删除日历事件
*/
public static final String DELETE_CALENDAR = "delete_calendar";
/**
* 添加日程事件
*/
public static final String ADD_SCHEDULE = "add_schedule";
/**
* 修改日程事件
*/
public static final String MODIFY_SCHEDULE = "modify_schedule";
/**
* 删除日程事件
*/
public static final String DELETE_SCHEDULE = "delete_schedule";
/**
* 日程回执事件
*/
public static final String RESPOND_SCHEDULE = "respond_schedule";
/**
* 会议室预定事件.
*/
public static final String BOOK_MEETING_ROOM = "book_meeting_room";
/**
* 会议室取消事件.
*/
public static final String CANCEL_MEETING_ROOM = "cancel_meeting_room";
/**
* 家校通讯录事件
*/
public static final String CHANGE_SCHOOL_CONTACT = "change_school_contact";
/**
* 产生会话回调事件
*/
public static final String MSGAUDIT_NOTIFY = "msgaudit_notify";
/**
* 直播回调事件
*/
public static final String LIVING_STATUS_CHANGE = "living_status_change";
/**
* 微信客服消息事件
*/
public static final String KF_MSG_OR_EVENT = "kf_msg_or_event";
/**
* 客服账号授权变更事件
*/
public static final String KF_ACCOUNT_AUTH_CHANGE = "kf_account_auth_change";
/**
* 获客助手事件通知
*/
public static final String CUSTOMER_ACQUISITION = "customer_acquisition";
/**
* <a href="https://developer.work.weixin.qq.com/document/path/96488#%E5%9B%9E%E8%B0%83%E5%BC%82%E6%AD%A5%E4%BB%BB%E5%8A%A1%E7%BB%93%E6%9E%9C">异步上传临时素材结果回调通知</a>
*/
public static final String UPLOAD_MEDIA_JOB_FINISH = "upload_media_job_finish";
}
/**
* 获客助手事件通知CHANGE_TYPE
* https://developer.work.weixin.qq.com/document/path/97299
*/
@UtilityClass
public static class CustomerAcquisitionChangeType {
/**
* 获客额度即将耗尽事件
*/
public static final String BALANCE_LOW = "balance_low";
/**
* 使用量已经耗尽事件
*/
public static final String BALANCE_EXHAUSTED = "balance_exhausted";
/**
* 获客链接不可用事件
*/
public static final String LINK_UNAVAILABLE = "link_unavailable";
/**
* 微信客户发起会话事件
*/
public static final String CUSTOMER_START_CHAT = "customer_start_chat";
/**
* 删除获客链接事件
*/
public static final String DELETE_LINK = "delete_link";
/**
* 通过获客链接申请好友事件
*/
public static final String friend_request = "friend_request";
}
/**
* 会话存档事件CHANGE_TYPE
* https://developer.work.weixin.qq.com/document/path/92005
*/
@UtilityClass
public static class MsgAuditChangeType {
/**
* The constant MSG_AUDIT_APPROVED.
*/
public static final String MSG_AUDIT_APPROVED = "msg_audit_approved";
}
/**
* 会话存档媒体类型
* https://developer.work.weixin.qq.com/document/path/91774
*/
@UtilityClass
public static class MsgAuditMediaType {
/**
* 图片
*/
public static final String IMAGE = "image";
/**
* 语音
*/
public static final String VOICE = "voice";
/**
* 视频
*/
public static final String VIDEO = "video";
/**
* 表情
*/
public static final String EMOTION = "emotion";
/**
* 文件
*/
public static final String FILE = "file";
/**
* 音频存档消息
*/
public static final String MEETING_VOICE_CALL = "meeting_voice_call";
/**
* 音频共享文档消息
*/
public static final String VOIP_DOC_SHARE = "voip_doc_share";
@UtilityClass
public static class MsgAuditSuffix {
public static final String JPG = ".jpg";
public static final String PNG = ".png";
public static final String GIF = ".gif";
public static final String MP4 = ".mp4";
public static final String AMR = ".amr";
}
}
/**
* 家校通讯录变更事件CHANGE_TYPE
*/
@UtilityClass
public static class SchoolContactChangeType {
/**
* 部门变更事件
* https://developer.work.weixin.qq.com/document/path/92052
*/
public static final String CREATE_DEPARTMENT = "create_department";
/**
* The constant UPDATE_DEPARTMENT.
*/
public static final String UPDATE_DEPARTMENT = "update_department";
/**
* The constant DELETE_DEPARTMENT.
*/
public static final String DELETE_DEPARTMENT = "delete_department";
/**
* 成员变更事件
* https://developer.work.weixin.qq.com/document/path/92032
*/
public static final String CREATE_STUDENT = "create_student";
/**
* The constant UPDATE_STUDENT.
*/
public static final String UPDATE_STUDENT = "update_student";
/**
* The constant DELETE_STUDENT.
*/
public static final String DELETE_STUDENT = "delete_student";
/**
* The constant CREATE_PARENT.
*/
public static final String CREATE_PARENT = "create_parent";
/**
* The constant UPDATE_PARENT.
*/
public static final String UPDATE_PARENT = "update_parent";
/**
* The constant DELETE_PARENT.
*/
public static final String DELETE_PARENT = "delete_parent";
/**
* The constant SUBSCRIBE.
*/
public static final String SUBSCRIBE = "subscribe";
/**
* The constant UNSUBSCRIBE.
*/
public static final String UNSUBSCRIBE = "unsubscribe";
}
/**
* 企业外部联系人变更事件的CHANGE_TYPE
*/
@UtilityClass
public static class ExternalContactChangeType {
/**
* 新增外部联系人
*/
public static final String ADD_EXTERNAL_CONTACT = "add_external_contact";
/**
* 编辑外部联系人
*/
public static final String EDIT_EXTERNAL_CONTACT = "edit_external_contact";
/**
* 删除外部联系人
*/
public static final String DEL_EXTERNAL_CONTACT = "del_external_contact";
/**
* 外部联系人免验证添加成员事件
*/
public static final String ADD_HALF_EXTERNAL_CONTACT = "add_half_external_contact";
/**
* 删除跟进成员事件
*/
public static final String DEL_FOLLOW_USER = "del_follow_user";
/**
* 客户接替失败事件
*/
public static final String TRANSFER_FAIL = "transfer_fail";
/**
* The type External contact transfer fail reason.
*/
@UtilityClass
public static class ExternalContactTransferFailReason {
/**
* 客户拒绝
*/
public static final String CUSTOMER_REFUSED = "customer_refused";
/**
* 接替成员的客户数达到上限
*/
public static final String CUSTOMER_LIMIT_EXCEED = "customer_limit_exceed";
}
}
/**
* The type External chat change type.
*/
@UtilityClass
public static class ExternalChatChangeType {
/**
* 客户群变更事件
*/
public static final String CREATE = "create";
/**
* 客户群变更事件
*/
public static final String UPDATE = "update";
/**
* 客户群解散事件
*/
public static final String DISMISS = "dismiss";
/**
* The type External chat update detail.
*/
@UtilityClass
public static class ExternalChatUpdateDetail {
/**
* 成员入群
*/
public static final String ADD_MEMBER = "add_member";
/**
* 成员退群
*/
public static final String DEL_MEMBER = "del_member";
/**
* 群主变更
*/
public static final String CHANGE_OWNER = "change_owner";
/**
* 群名变更
*/
public static final String CHANGE_NAME = "change_name";
/**
* 群公告变更
*/
public static final String CHANGE_NOTICE = "change_notice";
}
}
/**
* The type External tag change type.
*/
@UtilityClass
public static class ExternalTagChangeType {
/**
* 创建企业客户标签
*/
public static final String CREATE = "create";
/**
* 变更企业客户标签
*/
public static final String UPDATE = "update";
/**
* 删除企业客户标签
*/
public static final String DELETE = "delete";
/**
* 重排企业客户标签
*/
public static final String SHUFFLE = "shuffle";
}
/**
* The type Tage type.
*/
@UtilityClass
public static class TageType {
/**
* 标签
*/
public static final String TAG = "tag";
/**
* 标签组
*/
public static final String TAG_GROUP = "tag_group";
}
/**
* 企业微信通讯录变更事件.
*/
@UtilityClass
public static class ContactChangeType {
/**
* 新增成员事件.
*/
public static final String CREATE_USER = "create_user";
/**
* 更新成员事件.
*/
public static final String UPDATE_USER = "update_user";
/**
* 删除成员事件.
*/
public static final String DELETE_USER = "delete_user";
/**
* 新增部门事件.
*/
public static final String CREATE_PARTY = "create_party";
/**
* 更新部门事件.
*/
public static final String UPDATE_PARTY = "update_party";
/**
* 删除部门事件.
*/
public static final String DELETE_PARTY = "delete_party";
/**
* 标签成员变更事件.
*/
public static final String UPDATE_TAG = "update_tag";
}
/**
* 互联企业发送应用消息的消息类型.
*/
@UtilityClass
public static class LinkedCorpMsgType {
/**
* 文本消息.
*/
public static final String TEXT = "text";
/**
* 图片消息.
*/
public static final String IMAGE = "image";
/**
* 视频消息.
*/
public static final String VIDEO = "video";
/**
* 图文消息(点击跳转到外链).
*/
public static final String NEWS = "news";
/**
* 图文消息(点击跳转到图文消息页面).
*/
public static final String MPNEWS = "mpnews";
/**
* markdown消息.
* (目前仅支持markdown语法的子集,微工作台(原企业号)不支持展示markdown消息)
*/
public static final String MARKDOWN = "markdown";
/**
* 发送文件.
*/
public static final String FILE = "file";
/**
* 文本卡片消息.
*/
public static final String TEXTCARD = "textcard";
/**
* 小程序通知消息.
*/
public static final String MINIPROGRAM_NOTICE = "miniprogram_notice";
}
/**
* 群机器人的消息类型.
*/
@UtilityClass
public static class GroupRobotMsgType {
/**
* 文本消息.
*/
public static final String TEXT = "text";
/**
* 图片消息.
*/
public static final String IMAGE = "image";
/**
* markdown消息.
*/
public static final String MARKDOWN = "markdown";
/**
* markdown_v2消息.
*/
public static final String MARKDOWN_V2 = "markdown_v2";
/**
* 图文消息(点击跳转到外链).
*/
public static final String NEWS = "news";
/**
* 文件类型消息.
*/
public static final String FILE = "file";
/**
* 文件类型消息.
*/
public static final String VOICE = "voice";
/**
* 模版类型消息.
*/
public static final String TEMPLATE_CARD = "template_card";
}
/**
* 应用推送消息的消息类型.
*/
@UtilityClass
public static class AppChatMsgType {
/**
* 文本消息.
*/
public static final String TEXT = "text";
/**
* 图片消息.
*/
public static final String IMAGE = "image";
/**
* 语音消息.
*/
public static final String VOICE = "voice";
/**
* 视频消息.
*/
public static final String VIDEO = "video";
/**
* 发送文件(CP专用).
*/
public static final String FILE = "file";
/**
* 文本卡片消息(CP专用).
*/
public static final String TEXTCARD = "textcard";
/**
* 图文消息(点击跳转到外链).
*/
public static final String NEWS = "news";
/**
* 图文消息(点击跳转到图文消息页面).
*/
public static final String MPNEWS = "mpnews";
/**
* markdown消息.
*/
public static final String MARKDOWN = "markdown";
}
/**
* The type Work bench type.
*/
@UtilityClass
public static class WorkBenchType {
/**
* The constant KEYDATA.
*/
/*
* 关键数据型
* */
public static final String KEYDATA = "keydata";
/**
* The constant IMAGE.
*/
/*
* 图片型
* */
public static final String IMAGE = "image";
/**
* The constant LIST.
*/
/*
* 列表型
* */
public static final String LIST = "list";
/**
* The constant WEBVIEW.
*/
/*
* webview型
* */
public static final String WEBVIEW = "webview";
}
/**
* The type Welcome msg type.
*/
@UtilityClass
public static class WelcomeMsgType {
/**
* 图片消息.
*/
public static final String IMAGE = "image";
/**
* 图文消息.
*/
public static final String LINK = "link";
/**
* 视频消息.
*/
public static final String VIDEO = "video";
/**
* 小程序消息.
*/
public static final String MINIPROGRAM = "miniprogram";
/**
* 文件消息.
*/
public static final String FILE = "file";
}
/**
* The type Product attachment type.
*/
@UtilityClass
public static class ProductAttachmentType {
/**
* 图片消息.
*/
public static final String IMAGE = "image";
}
}