-
Notifications
You must be signed in to change notification settings - Fork 10
/
api_notify_models.go
129 lines (104 loc) · 3.11 KB
/
api_notify_models.go
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
package sdk
type WorkNoticeRecallResp struct {
BaseResp
}
type WorkNoticeMsg struct {
MsgType string `json:"msgtype"`
Text *TextNotice `json:"text"`
Image *ImageNotice `json:"image"`
Voice *VoiceNotice `json:"voice"`
File *FileNotice `json:"file"`
Link *LinkNotice `json:"link"`
OA *OANotice `json:"oa"`
Markdown *MarkdownNotice `json:"markdown"`
ActionCard *ActionCardNotice `json:"action_card"`
}
type SendWorkNoticeResp struct {
BaseResp
TaskId int64 `json:"task_id"`
}
type GetWorkNoticeProgressResp struct {
BaseResp
Progress NoticeProgress `json:"progress"`
}
type GetWorkNoticeResultResp struct {
BaseResp
SendResult NoticeSendResult `json:"send_result"`
}
type SendNormalNoticeResp struct {
BaseResp
Receiver string `json:"receiver"`
}
type NoticeSendResult struct {
InvalidUserIdList []string `json:"invalid_user_id_list"`
ForbiddenUserIdList []string `json:"forbidden_user_id_list"`
FailedUserIdList []string `json:"failed_user_id_list"`
ReadUserIdList []string `json:"read_user_id_list"`
UnreadUserIdList []string `json:"unread_user_id_list"`
InvalidDeptIdList []string `json:"invalid_dept_id_list"`
}
type NoticeProgress struct {
ProgressInPercent int64 `json:"progress_in_percent"`
Status int64 `json:"status"`
}
type TextNotice struct {
Content string `json:"content"`
}
type ImageNotice struct {
MediaId string `json:"media_id"`
}
type VoiceNotice struct {
MediaId string `json:"media_id"`
Duration string `json:"duration"`
}
type LinkNotice struct {
MsgUrl string `json:"messageUrl"`
PicUrl string `json:"picUrl"`
Title string `json:"title"`
Text string `json:"text"`
}
type FileNotice struct {
MediaId string `json:"media_id"`
}
type OANotice struct {
MsgUrl string `json:"message_url"`
Head OANoticeHead `json:"head"`
Body OANoticeBody `json:"body"`
}
type OANoticeHead struct {
BgColor string `json:"bgcolor"`
Text string `json:"text"`
}
type OANoticeBody struct {
Title *string `json:"title"`
Form *[]OANoticeBodyForm `json:"form"`
Rich *OANoticeBodyRich `json:"rich"`
Content *string `json:"content"`
Image *string `json:"image"`
FileCount *string `json:"file_count"`
Author *string `json:"author"`
}
type OANoticeBodyForm struct {
Key string `json:"key"`
Value string `json:"value"`
}
type OANoticeBodyRich struct {
Num string `json:"num"`
Unit string `json:"unit"`
}
type MarkdownNotice struct {
Title string `json:"title"`
Text string `json:"text"`
}
type ActionCardNotice struct {
Title string `json:"title"`
Markdown string `json:"markdown"`
SingleTitle *string `json:"single_title"`
SingleUrl *string `json:"single_url"`
BtnOrientation *int64 `json:"btn_orientation"`
BtnJsonList *[]ActionCardBtnJsonList `json:"btn_json_list"`
}
type ActionCardBtnJsonList struct {
Title string `json:"title"`
ActionUrl string `json:"action_url"`
}