@saltify/milky-types 1.2.0 → 1.2.1-rc.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.
- package/README.md +56 -2
- package/dist/index.d.mts +6206 -2
- package/dist/index.mjs +807 -757
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -11
- package/dist/index-DDmZsVX4.d.mts +0 -5134
- package/dist/namings.d.mts +0 -20
- package/dist/namings.mjs +0 -439
- package/dist/namings.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,638 +1,684 @@
|
|
|
1
|
-
import
|
|
2
|
-
//#region src/
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/index.g.ts
|
|
3
|
+
const milkyVersion = "1.2";
|
|
4
|
+
const milkyPackageVersion = "1.2.1-rc.1";
|
|
5
|
+
const zUin = z.number().int().min(10001).max(4294967295);
|
|
6
|
+
function zDropBadElementArray(element) {
|
|
7
|
+
return z.array(element.catch(null)).transform((val) => val.filter((item) => item !== null));
|
|
8
|
+
}
|
|
9
|
+
const BotOfflineEventData = z.object({ reason: z.string().describe("下线原因") }).describe("机器人离线事件");
|
|
10
|
+
const BotOfflineEvent = BotOfflineEventData;
|
|
11
|
+
const MessageRecallEventData = z.object({
|
|
12
|
+
message_scene: z.enum([
|
|
13
|
+
"friend",
|
|
14
|
+
"group",
|
|
15
|
+
"temp"
|
|
16
|
+
]).describe("消息场景"),
|
|
17
|
+
peer_id: zUin.describe("好友 QQ 号或群号"),
|
|
18
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
19
|
+
sender_id: zUin.describe("被撤回的消息的发送者 QQ 号"),
|
|
20
|
+
operator_id: zUin.describe("操作者 QQ 号"),
|
|
21
|
+
display_suffix: z.string().describe("撤回提示的后缀文本")
|
|
22
|
+
}).describe("消息撤回事件");
|
|
23
|
+
const MessageRecallEvent = MessageRecallEventData;
|
|
24
|
+
const PeerPinChangeEventData = z.object({
|
|
25
|
+
message_scene: z.enum([
|
|
26
|
+
"friend",
|
|
27
|
+
"group",
|
|
28
|
+
"temp"
|
|
29
|
+
]).describe("发生改变的会话的消息场景"),
|
|
30
|
+
peer_id: zUin.describe("发生改变的好友 QQ 号或群号"),
|
|
31
|
+
is_pinned: z.boolean().describe("是否被置顶, `false` 表示取消置顶")
|
|
32
|
+
}).describe("会话置顶变更事件");
|
|
33
|
+
const PeerPinChangeEvent = PeerPinChangeEventData;
|
|
34
|
+
const FriendRequestEventData = z.object({
|
|
35
|
+
initiator_id: zUin.describe("申请好友的用户 QQ 号"),
|
|
36
|
+
initiator_uid: z.string().describe("用户 UID"),
|
|
37
|
+
comment: z.string().describe("申请附加信息"),
|
|
38
|
+
via: z.string().describe("申请来源")
|
|
39
|
+
}).describe("好友请求事件");
|
|
40
|
+
const FriendRequestEvent = FriendRequestEventData;
|
|
41
|
+
const GroupJoinRequestEventData = z.object({
|
|
42
|
+
group_id: zUin.describe("群号"),
|
|
43
|
+
notification_seq: z.number().int().nonnegative().describe("请求对应的通知序列号"),
|
|
44
|
+
is_filtered: z.boolean().describe("请求是否被过滤(发起自风险账户)"),
|
|
45
|
+
initiator_id: zUin.describe("申请入群的用户 QQ 号"),
|
|
46
|
+
comment: z.string().describe("申请附加信息")
|
|
47
|
+
}).describe("入群请求事件");
|
|
48
|
+
const GroupJoinRequestEvent = GroupJoinRequestEventData;
|
|
49
|
+
const GroupInvitedJoinRequestEventData = z.object({
|
|
50
|
+
group_id: zUin.describe("群号"),
|
|
51
|
+
notification_seq: z.number().int().nonnegative().describe("请求对应的通知序列号"),
|
|
52
|
+
initiator_id: zUin.describe("邀请者 QQ 号"),
|
|
53
|
+
target_user_id: zUin.describe("被邀请者 QQ 号")
|
|
54
|
+
}).describe("群成员邀请他人入群请求事件");
|
|
55
|
+
const GroupInvitedJoinRequestEvent = GroupInvitedJoinRequestEventData;
|
|
56
|
+
const GroupInvitationEventData = z.object({
|
|
57
|
+
group_id: zUin.describe("群号"),
|
|
58
|
+
invitation_seq: z.number().int().nonnegative().describe("邀请序列号"),
|
|
59
|
+
initiator_id: zUin.describe("邀请者 QQ 号"),
|
|
60
|
+
source_group_id: z.number().int().nonnegative().nullish().describe("来源群号,如果是通过 QQ 群邀请")
|
|
61
|
+
}).describe("他人邀请自身入群事件");
|
|
62
|
+
const GroupInvitationEvent = GroupInvitationEventData;
|
|
63
|
+
const FriendNudgeEventData = z.object({
|
|
64
|
+
user_id: zUin.describe("好友 QQ 号"),
|
|
65
|
+
is_self_send: z.boolean().describe("是否是自己发送的戳一戳"),
|
|
66
|
+
is_self_receive: z.boolean().describe("是否是自己接收的戳一戳"),
|
|
67
|
+
display_action: z.string().describe("戳一戳提示的动作文本"),
|
|
68
|
+
display_suffix: z.string().describe("戳一戳提示的后缀文本"),
|
|
69
|
+
display_action_img_url: z.string().describe("戳一戳提示的动作图片 URL,用于取代动作提示文本")
|
|
70
|
+
}).describe("好友戳一戳事件");
|
|
71
|
+
const FriendNudgeEvent = FriendNudgeEventData;
|
|
72
|
+
const FriendFileUploadEventData = z.object({
|
|
73
|
+
user_id: zUin.describe("好友 QQ 号"),
|
|
74
|
+
file_id: z.string().describe("文件 ID"),
|
|
75
|
+
file_name: z.string().describe("文件名称"),
|
|
76
|
+
file_size: z.number().int().nonnegative().describe("文件大小(字节)"),
|
|
77
|
+
file_hash: z.string().describe("文件的 TriSHA1 哈希值"),
|
|
78
|
+
is_self: z.boolean().describe("是否是自己发送的文件")
|
|
79
|
+
}).describe("好友文件上传事件");
|
|
80
|
+
const FriendFileUploadEvent = FriendFileUploadEventData;
|
|
81
|
+
const GroupAdminChangeEventData = z.object({
|
|
82
|
+
group_id: zUin.describe("群号"),
|
|
83
|
+
user_id: zUin.describe("发生变更的用户 QQ 号"),
|
|
84
|
+
operator_id: zUin.describe("操作者 QQ 号"),
|
|
85
|
+
is_set: z.boolean().describe("是否被设置为管理员,`false` 表示被取消管理员")
|
|
86
|
+
}).describe("群管理员变更事件");
|
|
87
|
+
const GroupAdminChangeEvent = GroupAdminChangeEventData;
|
|
88
|
+
const GroupEssenceMessageChangeEventData = z.object({
|
|
89
|
+
group_id: zUin.describe("群号"),
|
|
90
|
+
message_seq: z.number().int().nonnegative().describe("发生变更的消息序列号"),
|
|
91
|
+
operator_id: zUin.describe("操作者 QQ 号"),
|
|
92
|
+
is_set: z.boolean().describe("是否被设置为精华,`false` 表示被取消精华")
|
|
93
|
+
}).describe("群精华消息变更事件");
|
|
94
|
+
const GroupEssenceMessageChangeEvent = GroupEssenceMessageChangeEventData;
|
|
95
|
+
const GroupMemberIncreaseEventData = z.object({
|
|
96
|
+
group_id: zUin.describe("群号"),
|
|
97
|
+
user_id: zUin.describe("发生变更的用户 QQ 号"),
|
|
98
|
+
operator_id: z.number().int().nonnegative().nullish().describe("管理员 QQ 号,如果是管理员同意入群"),
|
|
99
|
+
invitor_id: z.number().int().nonnegative().nullish().describe("邀请者 QQ 号,如果是邀请入群")
|
|
100
|
+
}).describe("群成员增加事件");
|
|
101
|
+
const GroupMemberIncreaseEvent = GroupMemberIncreaseEventData;
|
|
102
|
+
const GroupMemberDecreaseEventData = z.object({
|
|
103
|
+
group_id: zUin.describe("群号"),
|
|
104
|
+
user_id: zUin.describe("发生变更的用户 QQ 号"),
|
|
105
|
+
operator_id: z.number().int().nonnegative().nullish().describe("管理员 QQ 号,如果是管理员踢出")
|
|
106
|
+
}).describe("群成员减少事件");
|
|
107
|
+
const GroupMemberDecreaseEvent = GroupMemberDecreaseEventData;
|
|
108
|
+
const GroupNameChangeEventData = z.object({
|
|
109
|
+
group_id: zUin.describe("群号"),
|
|
110
|
+
new_group_name: z.string().describe("新的群名称"),
|
|
111
|
+
operator_id: zUin.describe("操作者 QQ 号")
|
|
112
|
+
}).describe("群名称变更事件");
|
|
113
|
+
const GroupNameChangeEvent = GroupNameChangeEventData;
|
|
114
|
+
const GroupMessageReactionEventData = z.object({
|
|
115
|
+
group_id: zUin.describe("群号"),
|
|
116
|
+
user_id: zUin.describe("发送回应者 QQ 号"),
|
|
117
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
118
|
+
face_id: z.string().describe("表情 ID"),
|
|
119
|
+
reaction_type: z.enum(["face", "emoji"]).describe("收到的回应类型"),
|
|
120
|
+
is_add: z.boolean().describe("是否为添加,`false` 表示取消回应")
|
|
121
|
+
}).describe("群消息表情回应事件");
|
|
122
|
+
const GroupMessageReactionEvent = GroupMessageReactionEventData;
|
|
123
|
+
const GroupMuteEventData = z.object({
|
|
124
|
+
group_id: zUin.describe("群号"),
|
|
125
|
+
user_id: zUin.describe("发生变更的用户 QQ 号"),
|
|
126
|
+
operator_id: zUin.describe("操作者 QQ 号"),
|
|
127
|
+
duration: z.number().int().nonnegative().describe("禁言时长(秒),为 0 表示取消禁言")
|
|
128
|
+
}).describe("群禁言事件");
|
|
129
|
+
const GroupMuteEvent = GroupMuteEventData;
|
|
130
|
+
const GroupWholeMuteEventData = z.object({
|
|
131
|
+
group_id: zUin.describe("群号"),
|
|
132
|
+
operator_id: zUin.describe("操作者 QQ 号"),
|
|
133
|
+
is_mute: z.boolean().describe("是否全员禁言,`false` 表示取消全员禁言")
|
|
134
|
+
}).describe("群全体禁言事件");
|
|
135
|
+
const GroupWholeMuteEvent = GroupWholeMuteEventData;
|
|
136
|
+
const GroupNudgeEventData = z.object({
|
|
137
|
+
group_id: zUin.describe("群号"),
|
|
138
|
+
sender_id: zUin.describe("发送者 QQ 号"),
|
|
139
|
+
receiver_id: zUin.describe("接收者 QQ 号"),
|
|
140
|
+
display_action: z.string().describe("戳一戳提示的动作文本"),
|
|
141
|
+
display_suffix: z.string().describe("戳一戳提示的后缀文本"),
|
|
142
|
+
display_action_img_url: z.string().describe("戳一戳提示的动作图片 URL,用于取代动作提示文本")
|
|
143
|
+
}).describe("群戳一戳事件");
|
|
144
|
+
const GroupNudgeEvent = GroupNudgeEventData;
|
|
145
|
+
const GroupFileUploadEventData = z.object({
|
|
146
|
+
group_id: zUin.describe("群号"),
|
|
147
|
+
user_id: zUin.describe("发送者 QQ 号"),
|
|
148
|
+
file_id: z.string().describe("文件 ID"),
|
|
149
|
+
file_name: z.string().describe("文件名称"),
|
|
150
|
+
file_size: z.number().int().nonnegative().describe("文件大小(字节)")
|
|
151
|
+
}).describe("群文件上传事件");
|
|
152
|
+
const GroupFileUploadEvent = GroupFileUploadEventData;
|
|
153
|
+
const Event = z.discriminatedUnion("event_type", [
|
|
154
|
+
z.object({
|
|
155
|
+
event_type: z.literal("bot_offline"),
|
|
156
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
157
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
158
|
+
data: BotOfflineEventData.describe("机器人离线事件")
|
|
159
|
+
}).describe("机器人离线事件"),
|
|
160
|
+
z.object({
|
|
161
|
+
event_type: z.literal("message_receive"),
|
|
162
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
163
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
164
|
+
data: z.lazy(() => IncomingMessage).describe("消息接收事件")
|
|
165
|
+
}).describe("消息接收事件"),
|
|
166
|
+
z.object({
|
|
167
|
+
event_type: z.literal("message_recall"),
|
|
168
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
169
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
170
|
+
data: MessageRecallEventData.describe("消息撤回事件")
|
|
171
|
+
}).describe("消息撤回事件"),
|
|
172
|
+
z.object({
|
|
173
|
+
event_type: z.literal("peer_pin_change"),
|
|
174
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
175
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
176
|
+
data: PeerPinChangeEventData.describe("会话置顶变更事件")
|
|
177
|
+
}).describe("会话置顶变更事件"),
|
|
178
|
+
z.object({
|
|
179
|
+
event_type: z.literal("friend_request"),
|
|
180
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
181
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
182
|
+
data: FriendRequestEventData.describe("好友请求事件")
|
|
183
|
+
}).describe("好友请求事件"),
|
|
184
|
+
z.object({
|
|
185
|
+
event_type: z.literal("group_join_request"),
|
|
186
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
187
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
188
|
+
data: GroupJoinRequestEventData.describe("入群请求事件")
|
|
189
|
+
}).describe("入群请求事件"),
|
|
190
|
+
z.object({
|
|
191
|
+
event_type: z.literal("group_invited_join_request"),
|
|
192
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
193
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
194
|
+
data: GroupInvitedJoinRequestEventData.describe("群成员邀请他人入群请求事件")
|
|
195
|
+
}).describe("群成员邀请他人入群请求事件"),
|
|
196
|
+
z.object({
|
|
197
|
+
event_type: z.literal("group_invitation"),
|
|
198
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
199
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
200
|
+
data: GroupInvitationEventData.describe("他人邀请自身入群事件")
|
|
201
|
+
}).describe("他人邀请自身入群事件"),
|
|
202
|
+
z.object({
|
|
203
|
+
event_type: z.literal("friend_nudge"),
|
|
204
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
205
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
206
|
+
data: FriendNudgeEventData.describe("好友戳一戳事件")
|
|
207
|
+
}).describe("好友戳一戳事件"),
|
|
208
|
+
z.object({
|
|
209
|
+
event_type: z.literal("friend_file_upload"),
|
|
210
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
211
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
212
|
+
data: FriendFileUploadEventData.describe("好友文件上传事件")
|
|
213
|
+
}).describe("好友文件上传事件"),
|
|
214
|
+
z.object({
|
|
215
|
+
event_type: z.literal("group_admin_change"),
|
|
216
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
217
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
218
|
+
data: GroupAdminChangeEventData.describe("群管理员变更事件")
|
|
219
|
+
}).describe("群管理员变更事件"),
|
|
220
|
+
z.object({
|
|
221
|
+
event_type: z.literal("group_essence_message_change"),
|
|
222
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
223
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
224
|
+
data: GroupEssenceMessageChangeEventData.describe("群精华消息变更事件")
|
|
225
|
+
}).describe("群精华消息变更事件"),
|
|
226
|
+
z.object({
|
|
227
|
+
event_type: z.literal("group_member_increase"),
|
|
228
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
229
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
230
|
+
data: GroupMemberIncreaseEventData.describe("群成员增加事件")
|
|
231
|
+
}).describe("群成员增加事件"),
|
|
232
|
+
z.object({
|
|
233
|
+
event_type: z.literal("group_member_decrease"),
|
|
234
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
235
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
236
|
+
data: GroupMemberDecreaseEventData.describe("群成员减少事件")
|
|
237
|
+
}).describe("群成员减少事件"),
|
|
238
|
+
z.object({
|
|
239
|
+
event_type: z.literal("group_name_change"),
|
|
240
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
241
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
242
|
+
data: GroupNameChangeEventData.describe("群名称变更事件")
|
|
243
|
+
}).describe("群名称变更事件"),
|
|
244
|
+
z.object({
|
|
245
|
+
event_type: z.literal("group_message_reaction"),
|
|
246
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
247
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
248
|
+
data: GroupMessageReactionEventData.describe("群消息表情回应事件")
|
|
249
|
+
}).describe("群消息表情回应事件"),
|
|
250
|
+
z.object({
|
|
251
|
+
event_type: z.literal("group_mute"),
|
|
252
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
253
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
254
|
+
data: GroupMuteEventData.describe("群禁言事件")
|
|
255
|
+
}).describe("群禁言事件"),
|
|
256
|
+
z.object({
|
|
257
|
+
event_type: z.literal("group_whole_mute"),
|
|
258
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
259
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
260
|
+
data: GroupWholeMuteEventData.describe("群全体禁言事件")
|
|
261
|
+
}).describe("群全体禁言事件"),
|
|
262
|
+
z.object({
|
|
263
|
+
event_type: z.literal("group_nudge"),
|
|
264
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
265
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
266
|
+
data: GroupNudgeEventData.describe("群戳一戳事件")
|
|
267
|
+
}).describe("群戳一戳事件"),
|
|
268
|
+
z.object({
|
|
269
|
+
event_type: z.literal("group_file_upload"),
|
|
270
|
+
time: z.number().int().nonnegative().describe("事件 Unix 时间戳(秒)"),
|
|
271
|
+
self_id: zUin.describe("机器人 QQ 号"),
|
|
272
|
+
data: GroupFileUploadEventData.describe("群文件上传事件")
|
|
273
|
+
}).describe("群文件上传事件")
|
|
274
|
+
]).describe("事件");
|
|
275
|
+
const FriendEntity = z.object({
|
|
276
|
+
user_id: zUin.describe("用户 QQ 号"),
|
|
277
|
+
nickname: z.string().describe("用户昵称"),
|
|
17
278
|
sex: z.enum([
|
|
18
279
|
"male",
|
|
19
280
|
"female",
|
|
20
281
|
"unknown"
|
|
21
|
-
]).describe("用户性别")
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
category_id: ZInt32.describe("好友分组 ID"),
|
|
25
|
-
category_name: ZString.describe("好友分组名称")
|
|
26
|
-
}).describe("好友分组实体");
|
|
27
|
-
const FriendEntity = UserEntityBase.extend({
|
|
28
|
-
qid: ZString.describe("用户 QID"),
|
|
29
|
-
remark: ZString.describe("好友备注"),
|
|
282
|
+
]).describe("用户性别"),
|
|
283
|
+
qid: z.string().describe("用户 QID"),
|
|
284
|
+
remark: z.string().describe("好友备注"),
|
|
30
285
|
category: z.lazy(() => FriendCategoryEntity).describe("好友分组")
|
|
31
286
|
}).describe("好友实体");
|
|
287
|
+
const FriendCategoryEntity = z.object({
|
|
288
|
+
category_id: z.number().int().nonnegative().describe("好友分组 ID"),
|
|
289
|
+
category_name: z.string().describe("好友分组名称")
|
|
290
|
+
}).describe("好友分组实体");
|
|
32
291
|
const GroupEntity = z.object({
|
|
33
|
-
group_id:
|
|
34
|
-
group_name:
|
|
35
|
-
member_count:
|
|
36
|
-
max_member_count:
|
|
37
|
-
remark:
|
|
38
|
-
created_time:
|
|
39
|
-
description:
|
|
40
|
-
question:
|
|
41
|
-
announcement:
|
|
292
|
+
group_id: zUin.describe("群号"),
|
|
293
|
+
group_name: z.string().describe("群名称"),
|
|
294
|
+
member_count: z.number().int().nonnegative().describe("群成员数量"),
|
|
295
|
+
max_member_count: z.number().int().nonnegative().describe("群容量"),
|
|
296
|
+
remark: z.string().describe("群备注"),
|
|
297
|
+
created_time: z.number().int().nonnegative().describe("群创建时间,Unix 时间戳(秒)"),
|
|
298
|
+
description: z.string().describe("群简介"),
|
|
299
|
+
question: z.string().describe("加群验证问题"),
|
|
300
|
+
announcement: z.string().describe("群公告预览")
|
|
42
301
|
}).describe("群实体");
|
|
43
|
-
const GroupMemberEntity =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
302
|
+
const GroupMemberEntity = z.object({
|
|
303
|
+
user_id: zUin.describe("用户 QQ 号"),
|
|
304
|
+
nickname: z.string().describe("用户昵称"),
|
|
305
|
+
sex: z.enum([
|
|
306
|
+
"male",
|
|
307
|
+
"female",
|
|
308
|
+
"unknown"
|
|
309
|
+
]).describe("用户性别"),
|
|
310
|
+
group_id: zUin.describe("群号"),
|
|
311
|
+
card: z.string().describe("成员备注"),
|
|
312
|
+
title: z.string().describe("专属头衔"),
|
|
313
|
+
level: z.number().int().nonnegative().describe("群等级,注意和 QQ 等级区分"),
|
|
48
314
|
role: z.enum([
|
|
49
315
|
"owner",
|
|
50
316
|
"admin",
|
|
51
317
|
"member"
|
|
52
318
|
]).describe("权限等级"),
|
|
53
|
-
join_time:
|
|
54
|
-
last_sent_time:
|
|
55
|
-
shut_up_end_time:
|
|
319
|
+
join_time: z.number().int().nonnegative().describe("入群时间,Unix 时间戳(秒)"),
|
|
320
|
+
last_sent_time: z.number().int().nonnegative().describe("最后发言时间,Unix 时间戳(秒)"),
|
|
321
|
+
shut_up_end_time: z.number().int().nonnegative().nullish().describe("禁言结束时间,Unix 时间戳(秒)")
|
|
56
322
|
}).describe("群成员实体");
|
|
57
323
|
const GroupAnnouncementEntity = z.object({
|
|
58
|
-
group_id:
|
|
59
|
-
announcement_id:
|
|
60
|
-
user_id:
|
|
61
|
-
time:
|
|
62
|
-
content:
|
|
63
|
-
image_url:
|
|
324
|
+
group_id: zUin.describe("群号"),
|
|
325
|
+
announcement_id: z.string().describe("公告 ID"),
|
|
326
|
+
user_id: zUin.describe("发送者 QQ 号"),
|
|
327
|
+
time: z.number().int().nonnegative().describe("Unix 时间戳(秒)"),
|
|
328
|
+
content: z.string().describe("公告内容"),
|
|
329
|
+
image_url: z.string().nullish().describe("公告图片 URL")
|
|
64
330
|
}).describe("群公告实体");
|
|
65
331
|
const GroupFileEntity = z.object({
|
|
66
|
-
group_id:
|
|
67
|
-
file_id:
|
|
68
|
-
file_name:
|
|
69
|
-
parent_folder_id:
|
|
70
|
-
file_size:
|
|
71
|
-
uploaded_time:
|
|
72
|
-
expire_time:
|
|
73
|
-
uploader_id:
|
|
74
|
-
downloaded_times:
|
|
332
|
+
group_id: zUin.describe("群号"),
|
|
333
|
+
file_id: z.string().describe("文件 ID"),
|
|
334
|
+
file_name: z.string().describe("文件名称"),
|
|
335
|
+
parent_folder_id: z.string().describe("父文件夹 ID"),
|
|
336
|
+
file_size: z.number().int().nonnegative().describe("文件大小(字节)"),
|
|
337
|
+
uploaded_time: z.number().int().nonnegative().describe("上传时的 Unix 时间戳(秒)"),
|
|
338
|
+
expire_time: z.number().int().nonnegative().nullish().describe("过期时的 Unix 时间戳(秒)"),
|
|
339
|
+
uploader_id: zUin.describe("上传者 QQ 号"),
|
|
340
|
+
downloaded_times: z.number().int().nonnegative().describe("下载次数")
|
|
75
341
|
}).describe("群文件实体");
|
|
76
342
|
const GroupFolderEntity = z.object({
|
|
77
|
-
group_id:
|
|
78
|
-
folder_id:
|
|
79
|
-
parent_folder_id:
|
|
80
|
-
folder_name:
|
|
81
|
-
created_time:
|
|
82
|
-
last_modified_time:
|
|
83
|
-
creator_id:
|
|
84
|
-
file_count:
|
|
343
|
+
group_id: zUin.describe("群号"),
|
|
344
|
+
folder_id: z.string().describe("文件夹 ID"),
|
|
345
|
+
parent_folder_id: z.string().describe("父文件夹 ID"),
|
|
346
|
+
folder_name: z.string().describe("文件夹名称"),
|
|
347
|
+
created_time: z.number().int().nonnegative().describe("创建时的 Unix 时间戳(秒)"),
|
|
348
|
+
last_modified_time: z.number().int().nonnegative().describe("最后修改时的 Unix 时间戳(秒)"),
|
|
349
|
+
creator_id: zUin.describe("创建者 QQ 号"),
|
|
350
|
+
file_count: z.number().int().nonnegative().describe("文件数量")
|
|
85
351
|
}).describe("群文件夹实体");
|
|
86
352
|
const FriendRequest = z.object({
|
|
87
|
-
time:
|
|
88
|
-
initiator_id:
|
|
89
|
-
initiator_uid:
|
|
90
|
-
target_user_id:
|
|
91
|
-
target_user_uid:
|
|
353
|
+
time: z.number().int().nonnegative().describe("请求发起时的 Unix 时间戳(秒)"),
|
|
354
|
+
initiator_id: zUin.describe("请求发起者 QQ 号"),
|
|
355
|
+
initiator_uid: z.string().describe("请求发起者 UID"),
|
|
356
|
+
target_user_id: zUin.describe("目标用户 QQ 号"),
|
|
357
|
+
target_user_uid: z.string().describe("目标用户 UID"),
|
|
92
358
|
state: z.enum([
|
|
93
359
|
"pending",
|
|
94
360
|
"accepted",
|
|
95
361
|
"rejected",
|
|
96
362
|
"ignored"
|
|
97
363
|
]).describe("请求状态"),
|
|
98
|
-
comment:
|
|
99
|
-
via:
|
|
100
|
-
is_filtered:
|
|
364
|
+
comment: z.string().describe("申请附加信息"),
|
|
365
|
+
via: z.string().describe("申请来源"),
|
|
366
|
+
is_filtered: z.boolean().describe("请求是否被过滤(发起自风险账户)")
|
|
101
367
|
}).describe("好友请求实体");
|
|
368
|
+
const GroupJoinRequestNotification = z.object({
|
|
369
|
+
type: z.literal("join_request"),
|
|
370
|
+
group_id: zUin.describe("群号"),
|
|
371
|
+
notification_seq: z.number().int().nonnegative().describe("通知序列号"),
|
|
372
|
+
is_filtered: z.boolean().describe("请求是否被过滤(发起自风险账户)"),
|
|
373
|
+
initiator_id: zUin.describe("发起者 QQ 号"),
|
|
374
|
+
state: z.enum([
|
|
375
|
+
"pending",
|
|
376
|
+
"accepted",
|
|
377
|
+
"rejected",
|
|
378
|
+
"ignored"
|
|
379
|
+
]).describe("请求状态"),
|
|
380
|
+
operator_id: z.number().int().nonnegative().nullish().describe("处理请求的管理员 QQ 号"),
|
|
381
|
+
comment: z.string().describe("入群请求附加信息")
|
|
382
|
+
}).describe("用户入群请求");
|
|
383
|
+
const GroupAdminChangeNotification = z.object({
|
|
384
|
+
type: z.literal("admin_change"),
|
|
385
|
+
group_id: zUin.describe("群号"),
|
|
386
|
+
notification_seq: z.number().int().nonnegative().describe("通知序列号"),
|
|
387
|
+
target_user_id: zUin.describe("被设置/取消用户 QQ 号"),
|
|
388
|
+
is_set: z.boolean().describe("是否被设置为管理员,`false` 表示被取消管理员"),
|
|
389
|
+
operator_id: zUin.describe("操作者(群主)QQ 号")
|
|
390
|
+
}).describe("群管理员变更通知");
|
|
391
|
+
const GroupKickNotification = z.object({
|
|
392
|
+
type: z.literal("kick"),
|
|
393
|
+
group_id: zUin.describe("群号"),
|
|
394
|
+
notification_seq: z.number().int().nonnegative().describe("通知序列号"),
|
|
395
|
+
target_user_id: zUin.describe("被移除用户 QQ 号"),
|
|
396
|
+
operator_id: zUin.describe("移除用户的管理员 QQ 号")
|
|
397
|
+
}).describe("群成员被移除通知");
|
|
398
|
+
const GroupQuitNotification = z.object({
|
|
399
|
+
type: z.literal("quit"),
|
|
400
|
+
group_id: zUin.describe("群号"),
|
|
401
|
+
notification_seq: z.number().int().nonnegative().describe("通知序列号"),
|
|
402
|
+
target_user_id: zUin.describe("退群用户 QQ 号")
|
|
403
|
+
}).describe("群成员退群通知");
|
|
404
|
+
const GroupInvitedJoinRequestNotification = z.object({
|
|
405
|
+
type: z.literal("invited_join_request"),
|
|
406
|
+
group_id: zUin.describe("群号"),
|
|
407
|
+
notification_seq: z.number().int().nonnegative().describe("通知序列号"),
|
|
408
|
+
initiator_id: zUin.describe("邀请者 QQ 号"),
|
|
409
|
+
target_user_id: zUin.describe("被邀请用户 QQ 号"),
|
|
410
|
+
state: z.enum([
|
|
411
|
+
"pending",
|
|
412
|
+
"accepted",
|
|
413
|
+
"rejected",
|
|
414
|
+
"ignored"
|
|
415
|
+
]).describe("请求状态"),
|
|
416
|
+
operator_id: z.number().int().nonnegative().nullish().describe("处理请求的管理员 QQ 号")
|
|
417
|
+
}).describe("群成员邀请他人入群请求");
|
|
102
418
|
const GroupNotification = z.discriminatedUnion("type", [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
initiator_id: ZUin.describe("发起者 QQ 号"),
|
|
109
|
-
state: z.enum([
|
|
110
|
-
"pending",
|
|
111
|
-
"accepted",
|
|
112
|
-
"rejected",
|
|
113
|
-
"ignored"
|
|
114
|
-
]).describe("请求状态"),
|
|
115
|
-
operator_id: ZUin.nullish().describe("处理请求的管理员 QQ 号"),
|
|
116
|
-
comment: ZString.describe("入群请求附加信息")
|
|
117
|
-
}).describe("用户入群请求"),
|
|
118
|
-
z.object({
|
|
119
|
-
type: z.literal("admin_change"),
|
|
120
|
-
group_id: ZUin.describe("群号"),
|
|
121
|
-
notification_seq: ZInt64.describe("通知序列号"),
|
|
122
|
-
target_user_id: ZUin.describe("被设置/取消用户 QQ 号"),
|
|
123
|
-
is_set: ZBoolean.describe("是否被设置为管理员,`false` 表示被取消管理员"),
|
|
124
|
-
operator_id: ZUin.describe("操作者(群主)QQ 号")
|
|
125
|
-
}).describe("群管理员变更通知"),
|
|
126
|
-
z.object({
|
|
127
|
-
type: z.literal("kick"),
|
|
128
|
-
group_id: ZUin.describe("群号"),
|
|
129
|
-
notification_seq: ZInt64.describe("通知序列号"),
|
|
130
|
-
target_user_id: ZUin.describe("被移除用户 QQ 号"),
|
|
131
|
-
operator_id: ZUin.describe("移除用户的管理员 QQ 号")
|
|
132
|
-
}).describe("群成员被移除通知"),
|
|
133
|
-
z.object({
|
|
134
|
-
type: z.literal("quit"),
|
|
135
|
-
group_id: ZUin.describe("群号"),
|
|
136
|
-
notification_seq: ZInt64.describe("通知序列号"),
|
|
137
|
-
target_user_id: ZUin.describe("退群用户 QQ 号")
|
|
138
|
-
}).describe("群成员退群通知"),
|
|
139
|
-
z.object({
|
|
140
|
-
type: z.literal("invited_join_request"),
|
|
141
|
-
group_id: ZUin.describe("群号"),
|
|
142
|
-
notification_seq: ZInt64.describe("通知序列号"),
|
|
143
|
-
initiator_id: ZUin.describe("邀请者 QQ 号"),
|
|
144
|
-
target_user_id: ZUin.describe("被邀请用户 QQ 号"),
|
|
145
|
-
state: z.enum([
|
|
146
|
-
"pending",
|
|
147
|
-
"accepted",
|
|
148
|
-
"rejected",
|
|
149
|
-
"ignored"
|
|
150
|
-
]).describe("请求状态"),
|
|
151
|
-
operator_id: ZUin.nullish().describe("处理请求的管理员 QQ 号")
|
|
152
|
-
}).describe("群成员邀请他人入群请求")
|
|
419
|
+
GroupJoinRequestNotification,
|
|
420
|
+
GroupAdminChangeNotification,
|
|
421
|
+
GroupKickNotification,
|
|
422
|
+
GroupQuitNotification,
|
|
423
|
+
GroupInvitedJoinRequestNotification
|
|
153
424
|
]).describe("群通知实体");
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
425
|
+
const IncomingFriendMessage = z.object({
|
|
426
|
+
message_scene: z.literal("friend"),
|
|
427
|
+
peer_id: zUin.describe("好友 QQ 号或群号"),
|
|
428
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
429
|
+
sender_id: zUin.describe("发送者 QQ 号"),
|
|
430
|
+
time: z.number().int().nonnegative().describe("消息 Unix 时间戳(秒)"),
|
|
431
|
+
segments: z.array(z.lazy(() => IncomingSegment)).describe("消息段列表"),
|
|
432
|
+
friend: z.lazy(() => FriendEntity).describe("好友信息")
|
|
433
|
+
}).describe("好友消息");
|
|
434
|
+
const IncomingGroupMessage = z.object({
|
|
435
|
+
message_scene: z.literal("group"),
|
|
436
|
+
peer_id: zUin.describe("好友 QQ 号或群号"),
|
|
437
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
438
|
+
sender_id: zUin.describe("发送者 QQ 号"),
|
|
439
|
+
time: z.number().int().nonnegative().describe("消息 Unix 时间戳(秒)"),
|
|
440
|
+
segments: z.array(z.lazy(() => IncomingSegment)).describe("消息段列表"),
|
|
441
|
+
group: z.lazy(() => GroupEntity).describe("群信息"),
|
|
442
|
+
group_member: z.lazy(() => GroupMemberEntity).describe("群成员信息")
|
|
443
|
+
}).describe("群消息");
|
|
444
|
+
const IncomingTempMessage = z.object({
|
|
445
|
+
message_scene: z.literal("temp"),
|
|
446
|
+
peer_id: zUin.describe("好友 QQ 号或群号"),
|
|
447
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
448
|
+
sender_id: zUin.describe("发送者 QQ 号"),
|
|
449
|
+
time: z.number().int().nonnegative().describe("消息 Unix 时间戳(秒)"),
|
|
450
|
+
segments: z.array(z.lazy(() => IncomingSegment)).describe("消息段列表"),
|
|
451
|
+
group: z.lazy(() => GroupEntity).nullish().describe("临时会话发送者的所在的群信息")
|
|
452
|
+
}).describe("临时会话消息");
|
|
453
|
+
const IncomingMessage = z.discriminatedUnion("message_scene", [
|
|
454
|
+
IncomingFriendMessage,
|
|
455
|
+
IncomingGroupMessage,
|
|
456
|
+
IncomingTempMessage
|
|
457
|
+
]).describe("接收消息");
|
|
458
|
+
const IncomingForwardedMessage = z.object({
|
|
459
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
460
|
+
sender_name: z.string().describe("发送者名称"),
|
|
461
|
+
avatar_url: z.string().describe("发送者头像 URL"),
|
|
462
|
+
time: z.number().int().nonnegative().describe("消息 Unix 时间戳(秒)"),
|
|
463
|
+
segments: z.array(z.lazy(() => IncomingSegment)).describe("消息段列表")
|
|
464
|
+
}).describe("接收转发消息");
|
|
465
|
+
const GroupEssenceMessage = z.object({
|
|
466
|
+
group_id: zUin.describe("群号"),
|
|
467
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
468
|
+
message_time: z.number().int().nonnegative().describe("消息发送时的 Unix 时间戳(秒)"),
|
|
469
|
+
sender_id: zUin.describe("发送者 QQ 号"),
|
|
470
|
+
sender_name: z.string().describe("发送者名称"),
|
|
471
|
+
operator_id: zUin.describe("设置精华的操作者 QQ 号"),
|
|
472
|
+
operator_name: z.string().describe("设置精华的操作者名称"),
|
|
473
|
+
operation_time: z.number().int().nonnegative().describe("消息被设置精华时的 Unix 时间戳(秒)"),
|
|
474
|
+
segments: z.array(z.lazy(() => IncomingSegment)).describe("消息段列表")
|
|
475
|
+
}).describe("群精华消息");
|
|
476
|
+
const IncomingTextSegmentData = z.object({ text: z.string().describe("文本内容") }).describe("文本消息段");
|
|
477
|
+
const IncomingMentionSegmentData = z.object({
|
|
478
|
+
user_id: zUin.describe("提及的 QQ 号"),
|
|
479
|
+
name: z.string().describe("去掉 `@` 前缀的提及的名称")
|
|
480
|
+
}).describe("提及消息段");
|
|
481
|
+
const IncomingMentionAllSegmentData = z.object({}).describe("提及全体消息段");
|
|
482
|
+
const IncomingFaceSegmentData = z.object({
|
|
483
|
+
face_id: z.string().describe("表情 ID"),
|
|
484
|
+
is_large: z.boolean().describe("是否为超级表情")
|
|
485
|
+
}).describe("表情消息段");
|
|
486
|
+
const IncomingReplySegmentData = z.object({
|
|
487
|
+
message_seq: z.number().int().nonnegative().describe("被引用的消息序列号"),
|
|
488
|
+
sender_id: zUin.describe("被引用的消息发送者 QQ 号"),
|
|
489
|
+
sender_name: z.string().nullish().describe("被引用的消息发送者名称,仅在合并转发中能够获取"),
|
|
490
|
+
time: z.number().int().nonnegative().describe("被引用的消息的 Unix 时间戳(秒)"),
|
|
491
|
+
get segments() {
|
|
492
|
+
return z.array(z.lazy(() => IncomingSegment)).describe("回复消息内容");
|
|
493
|
+
}
|
|
494
|
+
}).describe("回复消息段");
|
|
495
|
+
const IncomingImageSegmentData = z.object({
|
|
496
|
+
resource_id: z.string().describe("资源 ID"),
|
|
497
|
+
temp_url: z.string().describe("临时 URL"),
|
|
498
|
+
width: z.number().int().nonnegative().describe("图片宽度"),
|
|
499
|
+
height: z.number().int().nonnegative().describe("图片高度"),
|
|
500
|
+
summary: z.string().describe("图片预览文本"),
|
|
501
|
+
sub_type: z.enum(["normal", "sticker"]).describe("图片类型")
|
|
502
|
+
}).describe("图片消息段");
|
|
503
|
+
const IncomingRecordSegmentData = z.object({
|
|
504
|
+
resource_id: z.string().describe("资源 ID"),
|
|
505
|
+
temp_url: z.string().describe("临时 URL"),
|
|
506
|
+
duration: z.number().int().nonnegative().describe("语音时长(秒)")
|
|
507
|
+
}).describe("语音消息段");
|
|
508
|
+
const IncomingVideoSegmentData = z.object({
|
|
509
|
+
resource_id: z.string().describe("资源 ID"),
|
|
510
|
+
temp_url: z.string().describe("临时 URL"),
|
|
511
|
+
width: z.number().int().nonnegative().describe("视频宽度"),
|
|
512
|
+
height: z.number().int().nonnegative().describe("视频高度"),
|
|
513
|
+
duration: z.number().int().nonnegative().describe("视频时长(秒)")
|
|
514
|
+
}).describe("视频消息段");
|
|
515
|
+
const IncomingFileSegmentData = z.object({
|
|
516
|
+
file_id: z.string().describe("文件 ID"),
|
|
517
|
+
file_name: z.string().describe("文件名称"),
|
|
518
|
+
file_size: z.number().int().nonnegative().describe("文件大小(字节)"),
|
|
519
|
+
file_hash: z.string().nullish().describe("文件的 TriSHA1 哈希值,仅在私聊文件中存在")
|
|
520
|
+
}).describe("文件消息段");
|
|
521
|
+
const IncomingForwardSegmentData = z.object({
|
|
522
|
+
forward_id: z.string().describe("合并转发 ID"),
|
|
523
|
+
title: z.string().describe("合并转发标题"),
|
|
524
|
+
preview: z.array(z.string()).describe("合并转发预览文本"),
|
|
525
|
+
summary: z.string().describe("合并转发摘要")
|
|
526
|
+
}).describe("合并转发消息段");
|
|
527
|
+
const IncomingMarketFaceSegmentData = z.object({
|
|
528
|
+
emoji_package_id: z.number().int().nonnegative().describe("市场表情包 ID"),
|
|
529
|
+
emoji_id: z.string().describe("市场表情 ID"),
|
|
530
|
+
key: z.string().describe("市场表情 Key"),
|
|
531
|
+
summary: z.string().describe("市场表情预览文本"),
|
|
532
|
+
url: z.string().describe("市场表情 URL")
|
|
533
|
+
}).describe("市场表情消息段");
|
|
534
|
+
const IncomingLightAppSegmentData = z.object({
|
|
535
|
+
app_name: z.string().describe("小程序名称"),
|
|
536
|
+
json_payload: z.string().describe("小程序 JSON 数据")
|
|
537
|
+
}).describe("小程序消息段");
|
|
538
|
+
const IncomingXmlSegmentData = z.object({
|
|
539
|
+
service_id: z.number().int().nonnegative().describe("服务 ID"),
|
|
540
|
+
xml_payload: z.string().describe("XML 数据")
|
|
541
|
+
}).describe("XML 消息段");
|
|
161
542
|
const IncomingSegment = z.discriminatedUnion("type", [
|
|
162
543
|
z.object({
|
|
163
544
|
type: z.literal("text"),
|
|
164
|
-
data:
|
|
545
|
+
data: IncomingTextSegmentData.describe("文本消息段")
|
|
165
546
|
}).describe("文本消息段"),
|
|
166
547
|
z.object({
|
|
167
548
|
type: z.literal("mention"),
|
|
168
|
-
data:
|
|
169
|
-
user_id: ZUin.describe("提及的 QQ 号"),
|
|
170
|
-
name: ZString.describe("去掉 `@` 前缀的提及的名称")
|
|
171
|
-
})
|
|
549
|
+
data: IncomingMentionSegmentData.describe("提及消息段")
|
|
172
550
|
}).describe("提及消息段"),
|
|
173
551
|
z.object({
|
|
174
552
|
type: z.literal("mention_all"),
|
|
175
|
-
data:
|
|
553
|
+
data: IncomingMentionAllSegmentData.describe("提及全体消息段")
|
|
176
554
|
}).describe("提及全体消息段"),
|
|
177
555
|
z.object({
|
|
178
556
|
type: z.literal("face"),
|
|
179
|
-
data:
|
|
180
|
-
face_id: ZString.describe("表情 ID"),
|
|
181
|
-
is_large: ZBoolean.describe("是否为超级表情")
|
|
182
|
-
})
|
|
557
|
+
data: IncomingFaceSegmentData.describe("表情消息段")
|
|
183
558
|
}).describe("表情消息段"),
|
|
184
559
|
z.object({
|
|
185
560
|
type: z.literal("reply"),
|
|
186
|
-
data:
|
|
187
|
-
message_seq: ZInt64.describe("被引用的消息序列号"),
|
|
188
|
-
sender_id: ZUin.describe("被引用的消息发送者 QQ 号"),
|
|
189
|
-
sender_name: ZString.nullish().describe("被引用的消息发送者名称,仅在合并转发中能够获取"),
|
|
190
|
-
time: ZInt64.describe("被引用的消息的 Unix 时间戳(秒)"),
|
|
191
|
-
get segments() {
|
|
192
|
-
return z.array(z.lazy(() => IncomingSegment)).describe("被引用的消息内容");
|
|
193
|
-
}
|
|
194
|
-
})
|
|
561
|
+
data: IncomingReplySegmentData.describe("回复消息段")
|
|
195
562
|
}).describe("回复消息段"),
|
|
196
563
|
z.object({
|
|
197
564
|
type: z.literal("image"),
|
|
198
|
-
data:
|
|
199
|
-
width: ZInt32.describe("图片宽度"),
|
|
200
|
-
height: ZInt32.describe("图片高度"),
|
|
201
|
-
summary: ZString.describe("图片预览文本"),
|
|
202
|
-
sub_type: z.enum(["normal", "sticker"]).describe("图片类型")
|
|
203
|
-
})
|
|
565
|
+
data: IncomingImageSegmentData.describe("图片消息段")
|
|
204
566
|
}).describe("图片消息段"),
|
|
205
567
|
z.object({
|
|
206
568
|
type: z.literal("record"),
|
|
207
|
-
data:
|
|
569
|
+
data: IncomingRecordSegmentData.describe("语音消息段")
|
|
208
570
|
}).describe("语音消息段"),
|
|
209
571
|
z.object({
|
|
210
572
|
type: z.literal("video"),
|
|
211
|
-
data:
|
|
212
|
-
width: ZInt32.describe("视频宽度"),
|
|
213
|
-
height: ZInt32.describe("视频高度"),
|
|
214
|
-
duration: ZInt32.describe("视频时长(秒)")
|
|
215
|
-
})
|
|
573
|
+
data: IncomingVideoSegmentData.describe("视频消息段")
|
|
216
574
|
}).describe("视频消息段"),
|
|
217
575
|
z.object({
|
|
218
576
|
type: z.literal("file"),
|
|
219
|
-
data:
|
|
220
|
-
file_id: ZString.describe("文件 ID"),
|
|
221
|
-
file_name: ZString.describe("文件名称"),
|
|
222
|
-
file_size: ZInt64.describe("文件大小(字节)"),
|
|
223
|
-
file_hash: ZString.nullish().describe("文件的 TriSHA1 哈希值,仅在私聊文件中存在")
|
|
224
|
-
})
|
|
577
|
+
data: IncomingFileSegmentData.describe("文件消息段")
|
|
225
578
|
}).describe("文件消息段"),
|
|
226
579
|
z.object({
|
|
227
580
|
type: z.literal("forward"),
|
|
228
|
-
data:
|
|
229
|
-
forward_id: ZString.describe("合并转发 ID"),
|
|
230
|
-
title: ZString.describe("合并转发标题"),
|
|
231
|
-
preview: z.array(ZString).describe("合并转发预览文本"),
|
|
232
|
-
summary: ZString.describe("合并转发摘要")
|
|
233
|
-
})
|
|
581
|
+
data: IncomingForwardSegmentData.describe("合并转发消息段")
|
|
234
582
|
}).describe("合并转发消息段"),
|
|
235
583
|
z.object({
|
|
236
584
|
type: z.literal("market_face"),
|
|
237
|
-
data:
|
|
238
|
-
emoji_package_id: ZInt32.describe("市场表情包 ID"),
|
|
239
|
-
emoji_id: ZString.describe("市场表情 ID"),
|
|
240
|
-
key: ZString.describe("市场表情 Key"),
|
|
241
|
-
summary: ZString.describe("市场表情预览文本"),
|
|
242
|
-
url: ZString.describe("市场表情 URL")
|
|
243
|
-
})
|
|
585
|
+
data: IncomingMarketFaceSegmentData.describe("市场表情消息段")
|
|
244
586
|
}).describe("市场表情消息段"),
|
|
245
587
|
z.object({
|
|
246
588
|
type: z.literal("light_app"),
|
|
247
|
-
data:
|
|
248
|
-
app_name: ZString.describe("小程序名称"),
|
|
249
|
-
json_payload: ZString.describe("小程序 JSON 数据")
|
|
250
|
-
})
|
|
589
|
+
data: IncomingLightAppSegmentData.describe("小程序消息段")
|
|
251
590
|
}).describe("小程序消息段"),
|
|
252
591
|
z.object({
|
|
253
592
|
type: z.literal("xml"),
|
|
254
|
-
data:
|
|
255
|
-
service_id: ZInt32.describe("服务 ID"),
|
|
256
|
-
xml_payload: ZString.describe("XML 数据")
|
|
257
|
-
})
|
|
593
|
+
data: IncomingXmlSegmentData.describe("XML 消息段")
|
|
258
594
|
}).describe("XML 消息段")
|
|
259
595
|
]).catch({
|
|
260
596
|
type: "text",
|
|
261
597
|
data: { text: "[unknown]" }
|
|
262
598
|
}).describe("接收消息段");
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
sender_name:
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}).describe("
|
|
599
|
+
const OutgoingForwardedMessage = z.object({
|
|
600
|
+
user_id: zUin.describe("发送者 QQ 号"),
|
|
601
|
+
sender_name: z.string().describe("发送者名称"),
|
|
602
|
+
segments: z.array(z.lazy(() => OutgoingSegment)).describe("消息段列表")
|
|
603
|
+
}).describe("发送转发消息");
|
|
604
|
+
const OutgoingTextSegmentData = z.object({ text: z.string().describe("文本内容") }).describe("文本消息段");
|
|
605
|
+
const OutgoingMentionSegmentData = z.object({ user_id: zUin.describe("提及的 QQ 号") }).describe("提及消息段");
|
|
606
|
+
const OutgoingMentionAllSegmentData = z.object({}).describe("提及全体消息段");
|
|
607
|
+
const OutgoingFaceSegmentData = z.object({
|
|
608
|
+
face_id: z.string().describe("表情 ID"),
|
|
609
|
+
is_large: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否为超级表情")
|
|
610
|
+
}).describe("表情消息段");
|
|
611
|
+
const OutgoingReplySegmentData = z.object({ message_seq: z.number().int().nonnegative().describe("被引用的消息序列号") }).describe("回复消息段");
|
|
612
|
+
const OutgoingImageSegmentData = z.object({
|
|
613
|
+
uri: z.string().describe("文件 URI,支持 `file://` `http(s)://` `base64://` 三种格式"),
|
|
614
|
+
sub_type: z.enum(["normal", "sticker"]).nullish().default("normal").transform((val) => val ?? "normal").describe("图片类型"),
|
|
615
|
+
summary: z.string().nullish().describe("图片预览文本")
|
|
616
|
+
}).describe("图片消息段");
|
|
617
|
+
const OutgoingRecordSegmentData = z.object({ uri: z.string().describe("文件 URI,支持 `file://` `http(s)://` `base64://` 三种格式") }).describe("语音消息段");
|
|
618
|
+
const OutgoingVideoSegmentData = z.object({
|
|
619
|
+
uri: z.string().describe("文件 URI,支持 `file://` `http(s)://` `base64://` 三种格式"),
|
|
620
|
+
thumb_uri: z.string().nullish().describe("封面图片 URI")
|
|
621
|
+
}).describe("视频消息段");
|
|
622
|
+
const OutgoingForwardSegmentData = z.object({
|
|
623
|
+
get messages() {
|
|
624
|
+
return z.array(z.lazy(() => OutgoingForwardedMessage)).describe("合并转发消息内容");
|
|
625
|
+
},
|
|
626
|
+
title: z.string().nullish().describe("合并转发标题"),
|
|
627
|
+
preview: z.array(z.string()).nullish().describe("合并转发预览文本,若提供,至少 1 条,至多 4 条"),
|
|
628
|
+
summary: z.string().nullish().describe("合并转发摘要"),
|
|
629
|
+
prompt: z.string().nullish().describe("合并转发的预览外显文本,仅对移动端 QQ 有效")
|
|
630
|
+
}).describe("合并转发消息段");
|
|
631
|
+
const OutgoingLightAppSegmentData = z.object({ json_payload: z.string().describe("小程序 JSON 数据") }).describe("小程序消息段");
|
|
270
632
|
const OutgoingSegment = z.discriminatedUnion("type", [
|
|
271
633
|
z.object({
|
|
272
634
|
type: z.literal("text"),
|
|
273
|
-
data:
|
|
635
|
+
data: OutgoingTextSegmentData.describe("文本消息段")
|
|
274
636
|
}).describe("文本消息段"),
|
|
275
637
|
z.object({
|
|
276
638
|
type: z.literal("mention"),
|
|
277
|
-
data:
|
|
639
|
+
data: OutgoingMentionSegmentData.describe("提及消息段")
|
|
278
640
|
}).describe("提及消息段"),
|
|
279
641
|
z.object({
|
|
280
642
|
type: z.literal("mention_all"),
|
|
281
|
-
data:
|
|
643
|
+
data: OutgoingMentionAllSegmentData.describe("提及全体消息段")
|
|
282
644
|
}).describe("提及全体消息段"),
|
|
283
645
|
z.object({
|
|
284
646
|
type: z.literal("face"),
|
|
285
|
-
data:
|
|
286
|
-
face_id: ZString.describe("表情 ID"),
|
|
287
|
-
is_large: ZBoolean.default(false).describe("是否为超级表情")
|
|
288
|
-
})
|
|
647
|
+
data: OutgoingFaceSegmentData.describe("表情消息段")
|
|
289
648
|
}).describe("表情消息段"),
|
|
290
649
|
z.object({
|
|
291
650
|
type: z.literal("reply"),
|
|
292
|
-
data:
|
|
651
|
+
data: OutgoingReplySegmentData.describe("回复消息段")
|
|
293
652
|
}).describe("回复消息段"),
|
|
294
653
|
z.object({
|
|
295
654
|
type: z.literal("image"),
|
|
296
|
-
data:
|
|
297
|
-
sub_type: z.enum(["normal", "sticker"]).default("normal").describe("图片类型"),
|
|
298
|
-
summary: ZString.nullish().describe("图片预览文本")
|
|
299
|
-
})
|
|
655
|
+
data: OutgoingImageSegmentData.describe("图片消息段")
|
|
300
656
|
}).describe("图片消息段"),
|
|
301
657
|
z.object({
|
|
302
658
|
type: z.literal("record"),
|
|
303
|
-
data:
|
|
659
|
+
data: OutgoingRecordSegmentData.describe("语音消息段")
|
|
304
660
|
}).describe("语音消息段"),
|
|
305
661
|
z.object({
|
|
306
662
|
type: z.literal("video"),
|
|
307
|
-
data:
|
|
663
|
+
data: OutgoingVideoSegmentData.describe("视频消息段")
|
|
308
664
|
}).describe("视频消息段"),
|
|
309
665
|
z.object({
|
|
310
666
|
type: z.literal("forward"),
|
|
311
|
-
data:
|
|
312
|
-
get messages() {
|
|
313
|
-
return z.array(z.lazy(() => OutgoingForwardedMessage)).describe("合并转发消息内容");
|
|
314
|
-
},
|
|
315
|
-
title: ZString.nullish().describe("合并转发标题"),
|
|
316
|
-
preview: z.array(ZString).min(1).max(4).nullish().describe("合并转发预览文本,若提供,至少 1 条,至多 4 条"),
|
|
317
|
-
summary: ZString.nullish().describe("合并转发摘要"),
|
|
318
|
-
prompt: ZString.nullish().describe("合并转发的预览外显文本,仅对移动端 QQ 有效")
|
|
319
|
-
})
|
|
667
|
+
data: OutgoingForwardSegmentData.describe("合并转发消息段")
|
|
320
668
|
}).describe("合并转发消息段"),
|
|
321
669
|
z.object({
|
|
322
670
|
type: z.literal("light_app"),
|
|
323
|
-
data:
|
|
671
|
+
data: OutgoingLightAppSegmentData.describe("小程序消息段")
|
|
324
672
|
}).describe("小程序消息段")
|
|
325
673
|
]).describe("发送消息段");
|
|
326
|
-
const OutgoingForwardedMessage = z.object({
|
|
327
|
-
user_id: ZUin.describe("发送者 QQ 号"),
|
|
328
|
-
sender_name: ZString.describe("发送者名称"),
|
|
329
|
-
segments: z.array(z.lazy(() => OutgoingSegment)).describe("消息段列表")
|
|
330
|
-
}).describe("发送转发消息");
|
|
331
|
-
const IncomingMessage = z.discriminatedUnion("message_scene", [
|
|
332
|
-
z.object({
|
|
333
|
-
message_scene: z.literal("friend"),
|
|
334
|
-
peer_id: ZUin.describe("好友 QQ 号或群号"),
|
|
335
|
-
message_seq: ZInt64.describe("消息序列号"),
|
|
336
|
-
sender_id: ZUin.describe("发送者 QQ 号"),
|
|
337
|
-
time: ZInt64.describe("消息 Unix 时间戳(秒)"),
|
|
338
|
-
segments: z.array(z.lazy(() => IncomingSegment)).describe("消息段列表"),
|
|
339
|
-
friend: z.lazy(() => FriendEntity).describe("好友信息")
|
|
340
|
-
}).describe("好友消息"),
|
|
341
|
-
z.object({
|
|
342
|
-
message_scene: z.literal("group"),
|
|
343
|
-
peer_id: ZUin.describe("好友 QQ 号或群号"),
|
|
344
|
-
message_seq: ZInt64.describe("消息序列号"),
|
|
345
|
-
sender_id: ZUin.describe("发送者 QQ 号"),
|
|
346
|
-
time: ZInt64.describe("消息 Unix 时间戳(秒)"),
|
|
347
|
-
segments: z.array(z.lazy(() => IncomingSegment)).describe("消息段列表"),
|
|
348
|
-
group: z.lazy(() => GroupEntity).describe("群信息"),
|
|
349
|
-
group_member: z.lazy(() => GroupMemberEntity).describe("群成员信息")
|
|
350
|
-
}).describe("群消息"),
|
|
351
|
-
z.object({
|
|
352
|
-
message_scene: z.literal("temp"),
|
|
353
|
-
peer_id: ZUin.describe("好友 QQ 号或群号"),
|
|
354
|
-
message_seq: ZInt64.describe("消息序列号"),
|
|
355
|
-
sender_id: ZUin.describe("发送者 QQ 号"),
|
|
356
|
-
time: ZInt64.describe("消息 Unix 时间戳(秒)"),
|
|
357
|
-
segments: z.array(z.lazy(() => IncomingSegment)).describe("消息段列表"),
|
|
358
|
-
group: z.lazy(() => GroupEntity).nullish().describe("临时会话发送者的所在的群信息")
|
|
359
|
-
}).describe("临时会话消息")
|
|
360
|
-
]).describe("接收消息");
|
|
361
|
-
const GroupEssenceMessage = z.object({
|
|
362
|
-
group_id: ZUin.describe("群号"),
|
|
363
|
-
message_seq: ZInt64.describe("消息序列号"),
|
|
364
|
-
message_time: ZInt64.describe("消息发送时的 Unix 时间戳(秒)"),
|
|
365
|
-
sender_id: ZUin.describe("发送者 QQ 号"),
|
|
366
|
-
sender_name: ZString.describe("发送者名称"),
|
|
367
|
-
operator_id: ZUin.describe("设置精华的操作者 QQ 号"),
|
|
368
|
-
operator_name: ZString.describe("设置精华的操作者名称"),
|
|
369
|
-
operation_time: ZInt64.describe("消息被设置精华时的 Unix 时间戳(秒)"),
|
|
370
|
-
segments: z.array(z.lazy(() => IncomingSegment)).describe("消息段列表")
|
|
371
|
-
}).describe("群精华消息");
|
|
372
|
-
//#endregion
|
|
373
|
-
//#region src/event.ts
|
|
374
|
-
const BotOfflineEvent = z.object({ reason: ZString.describe("下线原因") });
|
|
375
|
-
const MessageRecallEvent = z.object({
|
|
376
|
-
message_scene: z.enum([
|
|
377
|
-
"friend",
|
|
378
|
-
"group",
|
|
379
|
-
"temp"
|
|
380
|
-
]).describe("消息场景"),
|
|
381
|
-
peer_id: ZUin.describe("好友 QQ 号或群号"),
|
|
382
|
-
message_seq: ZInt64.describe("消息序列号"),
|
|
383
|
-
sender_id: ZUin.describe("被撤回的消息的发送者 QQ 号"),
|
|
384
|
-
operator_id: ZUin.describe("操作者 QQ 号"),
|
|
385
|
-
display_suffix: ZString.describe("撤回提示的后缀文本")
|
|
386
|
-
});
|
|
387
|
-
const PeerPinChangeEvent = z.object({
|
|
388
|
-
message_scene: z.enum([
|
|
389
|
-
"friend",
|
|
390
|
-
"group",
|
|
391
|
-
"temp"
|
|
392
|
-
]).describe("发生改变的会话的消息场景"),
|
|
393
|
-
peer_id: ZUin.describe("发生改变的好友 QQ 号或群号"),
|
|
394
|
-
is_pinned: ZBoolean.describe("是否被置顶, `false` 表示取消置顶")
|
|
395
|
-
});
|
|
396
|
-
const FriendRequestEvent = z.object({
|
|
397
|
-
initiator_id: ZUin.describe("申请好友的用户 QQ 号"),
|
|
398
|
-
initiator_uid: ZString.describe("用户 UID"),
|
|
399
|
-
comment: ZString.describe("申请附加信息"),
|
|
400
|
-
via: ZString.describe("申请来源")
|
|
401
|
-
});
|
|
402
|
-
const GroupJoinRequestEvent = z.object({
|
|
403
|
-
group_id: ZUin.describe("群号"),
|
|
404
|
-
notification_seq: ZInt64.describe("请求对应的通知序列号"),
|
|
405
|
-
is_filtered: ZBoolean.describe("请求是否被过滤(发起自风险账户)"),
|
|
406
|
-
initiator_id: ZUin.describe("申请入群的用户 QQ 号"),
|
|
407
|
-
comment: ZString.describe("申请附加信息")
|
|
408
|
-
});
|
|
409
|
-
const GroupInvitedJoinRequestEvent = z.object({
|
|
410
|
-
group_id: ZUin.describe("群号"),
|
|
411
|
-
notification_seq: ZInt64.describe("请求对应的通知序列号"),
|
|
412
|
-
initiator_id: ZUin.describe("邀请者 QQ 号"),
|
|
413
|
-
target_user_id: ZUin.describe("被邀请者 QQ 号")
|
|
414
|
-
});
|
|
415
|
-
const GroupInvitationEvent = z.object({
|
|
416
|
-
group_id: ZUin.describe("群号"),
|
|
417
|
-
invitation_seq: ZInt64.describe("邀请序列号"),
|
|
418
|
-
initiator_id: ZUin.describe("邀请者 QQ 号"),
|
|
419
|
-
source_group_id: ZUin.nullish().describe("来源群号,如果是通过 QQ 群邀请")
|
|
420
|
-
});
|
|
421
|
-
const FriendNudgeEvent = z.object({
|
|
422
|
-
user_id: ZUin.describe("好友 QQ 号"),
|
|
423
|
-
is_self_send: ZBoolean.describe("是否是自己发送的戳一戳"),
|
|
424
|
-
is_self_receive: ZBoolean.describe("是否是自己接收的戳一戳"),
|
|
425
|
-
display_action: ZString.describe("戳一戳提示的动作文本"),
|
|
426
|
-
display_suffix: ZString.describe("戳一戳提示的后缀文本"),
|
|
427
|
-
display_action_img_url: ZString.describe("戳一戳提示的动作图片 URL,用于取代动作提示文本")
|
|
428
|
-
});
|
|
429
|
-
const FriendFileUploadEvent = z.object({
|
|
430
|
-
user_id: ZUin.describe("好友 QQ 号"),
|
|
431
|
-
file_id: ZString.describe("文件 ID"),
|
|
432
|
-
file_name: ZString.describe("文件名称"),
|
|
433
|
-
file_size: ZInt64.describe("文件大小(字节)"),
|
|
434
|
-
file_hash: ZString.describe("文件的 TriSHA1 哈希值"),
|
|
435
|
-
is_self: ZBoolean.describe("是否是自己发送的文件")
|
|
436
|
-
});
|
|
437
|
-
const GroupAdminChangeEvent = z.object({
|
|
438
|
-
group_id: ZUin.describe("群号"),
|
|
439
|
-
user_id: ZUin.describe("发生变更的用户 QQ 号"),
|
|
440
|
-
operator_id: ZUin.describe("操作者 QQ 号"),
|
|
441
|
-
is_set: ZBoolean.describe("是否被设置为管理员,`false` 表示被取消管理员")
|
|
442
|
-
});
|
|
443
|
-
const GroupEssenceMessageChangeEvent = z.object({
|
|
444
|
-
group_id: ZUin.describe("群号"),
|
|
445
|
-
message_seq: ZInt64.describe("发生变更的消息序列号"),
|
|
446
|
-
operator_id: ZUin.describe("操作者 QQ 号"),
|
|
447
|
-
is_set: ZBoolean.describe("是否被设置为精华,`false` 表示被取消精华")
|
|
448
|
-
});
|
|
449
|
-
const GroupMemberIncreaseEvent = z.object({
|
|
450
|
-
group_id: ZUin.describe("群号"),
|
|
451
|
-
user_id: ZUin.describe("发生变更的用户 QQ 号"),
|
|
452
|
-
operator_id: ZUin.nullish().describe("管理员 QQ 号,如果是管理员同意入群"),
|
|
453
|
-
invitor_id: ZUin.nullish().describe("邀请者 QQ 号,如果是邀请入群")
|
|
454
|
-
});
|
|
455
|
-
const GroupMemberDecreaseEvent = z.object({
|
|
456
|
-
group_id: ZUin.describe("群号"),
|
|
457
|
-
user_id: ZUin.describe("发生变更的用户 QQ 号"),
|
|
458
|
-
operator_id: ZUin.nullish().describe("管理员 QQ 号,如果是管理员踢出")
|
|
459
|
-
});
|
|
460
|
-
const GroupNameChangeEvent = z.object({
|
|
461
|
-
group_id: ZUin.describe("群号"),
|
|
462
|
-
new_group_name: ZString.describe("新的群名称"),
|
|
463
|
-
operator_id: ZUin.describe("操作者 QQ 号")
|
|
464
|
-
});
|
|
465
|
-
const GroupMessageReactionEvent = z.object({
|
|
466
|
-
group_id: ZUin.describe("群号"),
|
|
467
|
-
user_id: ZUin.describe("发送回应者 QQ 号"),
|
|
468
|
-
message_seq: ZInt64.describe("消息序列号"),
|
|
469
|
-
face_id: ZString.describe("表情 ID"),
|
|
470
|
-
reaction_type: z.enum(["face", "emoji"]).describe("收到的回应类型"),
|
|
471
|
-
is_add: ZBoolean.describe("是否为添加,`false` 表示取消回应")
|
|
472
|
-
});
|
|
473
|
-
const GroupMuteEvent = z.object({
|
|
474
|
-
group_id: ZUin.describe("群号"),
|
|
475
|
-
user_id: ZUin.describe("发生变更的用户 QQ 号"),
|
|
476
|
-
operator_id: ZUin.describe("操作者 QQ 号"),
|
|
477
|
-
duration: ZInt32.describe("禁言时长(秒),为 0 表示取消禁言")
|
|
478
|
-
});
|
|
479
|
-
const GroupWholeMuteEvent = z.object({
|
|
480
|
-
group_id: ZUin.describe("群号"),
|
|
481
|
-
operator_id: ZUin.describe("操作者 QQ 号"),
|
|
482
|
-
is_mute: ZBoolean.describe("是否全员禁言,`false` 表示取消全员禁言")
|
|
483
|
-
});
|
|
484
|
-
const GroupNudgeEvent = z.object({
|
|
485
|
-
group_id: ZUin.describe("群号"),
|
|
486
|
-
sender_id: ZUin.describe("发送者 QQ 号"),
|
|
487
|
-
receiver_id: ZUin.describe("接收者 QQ 号"),
|
|
488
|
-
display_action: ZString.describe("戳一戳提示的动作文本"),
|
|
489
|
-
display_suffix: ZString.describe("戳一戳提示的后缀文本"),
|
|
490
|
-
display_action_img_url: ZString.describe("戳一戳提示的动作图片 URL,用于取代动作提示文本")
|
|
491
|
-
});
|
|
492
|
-
const GroupFileUploadEvent = z.object({
|
|
493
|
-
group_id: ZUin.describe("群号"),
|
|
494
|
-
user_id: ZUin.describe("发送者 QQ 号"),
|
|
495
|
-
file_id: ZString.describe("文件 ID"),
|
|
496
|
-
file_name: ZString.describe("文件名称"),
|
|
497
|
-
file_size: ZInt64.describe("文件大小(字节)")
|
|
498
|
-
});
|
|
499
|
-
const Event = z.discriminatedUnion("event_type", [
|
|
500
|
-
z.object({
|
|
501
|
-
event_type: z.literal("bot_offline"),
|
|
502
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
503
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
504
|
-
data: BotOfflineEvent
|
|
505
|
-
}).describe("机器人离线事件"),
|
|
506
|
-
z.object({
|
|
507
|
-
event_type: z.literal("message_receive"),
|
|
508
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
509
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
510
|
-
data: IncomingMessage
|
|
511
|
-
}).describe("消息接收事件"),
|
|
512
|
-
z.object({
|
|
513
|
-
event_type: z.literal("message_recall"),
|
|
514
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
515
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
516
|
-
data: MessageRecallEvent
|
|
517
|
-
}).describe("消息撤回事件"),
|
|
518
|
-
z.object({
|
|
519
|
-
event_type: z.literal("peer_pin_change"),
|
|
520
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
521
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
522
|
-
data: PeerPinChangeEvent
|
|
523
|
-
}).describe("会话置顶变更事件"),
|
|
524
|
-
z.object({
|
|
525
|
-
event_type: z.literal("friend_request"),
|
|
526
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
527
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
528
|
-
data: FriendRequestEvent
|
|
529
|
-
}).describe("好友请求事件"),
|
|
530
|
-
z.object({
|
|
531
|
-
event_type: z.literal("group_join_request"),
|
|
532
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
533
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
534
|
-
data: GroupJoinRequestEvent
|
|
535
|
-
}).describe("入群请求事件"),
|
|
536
|
-
z.object({
|
|
537
|
-
event_type: z.literal("group_invited_join_request"),
|
|
538
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
539
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
540
|
-
data: GroupInvitedJoinRequestEvent
|
|
541
|
-
}).describe("群成员邀请他人入群请求事件"),
|
|
542
|
-
z.object({
|
|
543
|
-
event_type: z.literal("group_invitation"),
|
|
544
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
545
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
546
|
-
data: GroupInvitationEvent
|
|
547
|
-
}).describe("他人邀请自身入群事件"),
|
|
548
|
-
z.object({
|
|
549
|
-
event_type: z.literal("friend_nudge"),
|
|
550
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
551
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
552
|
-
data: FriendNudgeEvent
|
|
553
|
-
}).describe("好友戳一戳事件"),
|
|
554
|
-
z.object({
|
|
555
|
-
event_type: z.literal("friend_file_upload"),
|
|
556
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
557
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
558
|
-
data: FriendFileUploadEvent
|
|
559
|
-
}).describe("好友文件上传事件"),
|
|
560
|
-
z.object({
|
|
561
|
-
event_type: z.literal("group_admin_change"),
|
|
562
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
563
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
564
|
-
data: GroupAdminChangeEvent
|
|
565
|
-
}).describe("群管理员变更事件"),
|
|
566
|
-
z.object({
|
|
567
|
-
event_type: z.literal("group_essence_message_change"),
|
|
568
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
569
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
570
|
-
data: GroupEssenceMessageChangeEvent
|
|
571
|
-
}).describe("群精华消息变更事件"),
|
|
572
|
-
z.object({
|
|
573
|
-
event_type: z.literal("group_member_increase"),
|
|
574
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
575
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
576
|
-
data: GroupMemberIncreaseEvent
|
|
577
|
-
}).describe("群成员增加事件"),
|
|
578
|
-
z.object({
|
|
579
|
-
event_type: z.literal("group_member_decrease"),
|
|
580
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
581
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
582
|
-
data: GroupMemberDecreaseEvent
|
|
583
|
-
}).describe("群成员减少事件"),
|
|
584
|
-
z.object({
|
|
585
|
-
event_type: z.literal("group_name_change"),
|
|
586
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
587
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
588
|
-
data: GroupNameChangeEvent
|
|
589
|
-
}).describe("群名称变更事件"),
|
|
590
|
-
z.object({
|
|
591
|
-
event_type: z.literal("group_message_reaction"),
|
|
592
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
593
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
594
|
-
data: GroupMessageReactionEvent
|
|
595
|
-
}).describe("群消息表情回应事件"),
|
|
596
|
-
z.object({
|
|
597
|
-
event_type: z.literal("group_mute"),
|
|
598
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
599
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
600
|
-
data: GroupMuteEvent
|
|
601
|
-
}).describe("群禁言事件"),
|
|
602
|
-
z.object({
|
|
603
|
-
event_type: z.literal("group_whole_mute"),
|
|
604
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
605
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
606
|
-
data: GroupWholeMuteEvent
|
|
607
|
-
}).describe("群全体禁言事件"),
|
|
608
|
-
z.object({
|
|
609
|
-
event_type: z.literal("group_nudge"),
|
|
610
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
611
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
612
|
-
data: GroupNudgeEvent
|
|
613
|
-
}).describe("群戳一戳事件"),
|
|
614
|
-
z.object({
|
|
615
|
-
event_type: z.literal("group_file_upload"),
|
|
616
|
-
time: ZInt64.describe("事件 Unix 时间戳(秒)"),
|
|
617
|
-
self_id: ZUin.describe("机器人 QQ 号"),
|
|
618
|
-
data: GroupFileUploadEvent
|
|
619
|
-
}).describe("群文件上传事件")
|
|
620
|
-
]).describe("事件");
|
|
621
|
-
//#endregion
|
|
622
|
-
//#region src/constants.ts
|
|
623
|
-
const milkyPackageVersion = "1.2.0";
|
|
624
|
-
const milkyVersion = milkyPackageVersion.split(".").slice(0, 2).join(".");
|
|
625
|
-
//#endregion
|
|
626
|
-
//#region src/api/system.ts
|
|
627
|
-
const CachedApiBase = z.object({ no_cache: ZBooleanWithDefault(false).describe("是否强制不使用缓存") });
|
|
628
674
|
const GetLoginInfoOutput = z.object({
|
|
629
|
-
uin:
|
|
630
|
-
nickname:
|
|
631
|
-
});
|
|
675
|
+
uin: zUin.describe("登录 QQ 号"),
|
|
676
|
+
nickname: z.string().describe("登录昵称")
|
|
677
|
+
}).describe("get_login_info 响应数据");
|
|
632
678
|
const GetImplInfoOutput = z.object({
|
|
633
|
-
impl_name:
|
|
634
|
-
impl_version:
|
|
635
|
-
qq_protocol_version:
|
|
679
|
+
impl_name: z.string().describe("协议端名称"),
|
|
680
|
+
impl_version: z.string().describe("协议端版本"),
|
|
681
|
+
qq_protocol_version: z.string().describe("协议端使用的 QQ 协议版本"),
|
|
636
682
|
qq_protocol_type: z.enum([
|
|
637
683
|
"windows",
|
|
638
684
|
"linux",
|
|
@@ -644,317 +690,321 @@ const GetImplInfoOutput = z.object({
|
|
|
644
690
|
"harmony",
|
|
645
691
|
"watch"
|
|
646
692
|
]).describe("协议端使用的 QQ 协议平台"),
|
|
647
|
-
milky_version:
|
|
648
|
-
});
|
|
649
|
-
const GetUserProfileInput = z.object({ user_id:
|
|
693
|
+
milky_version: z.string().describe("协议端实现的 Milky 协议版本,目前为 \"1.2\"")
|
|
694
|
+
}).describe("get_impl_info 响应数据");
|
|
695
|
+
const GetUserProfileInput = z.object({ user_id: zUin.describe("用户 QQ 号") }).describe("get_user_profile 请求参数");
|
|
650
696
|
const GetUserProfileOutput = z.object({
|
|
651
|
-
nickname:
|
|
652
|
-
qid:
|
|
653
|
-
age:
|
|
697
|
+
nickname: z.string().describe("昵称"),
|
|
698
|
+
qid: z.string().describe("QID"),
|
|
699
|
+
age: z.number().int().nonnegative().describe("年龄"),
|
|
654
700
|
sex: z.enum([
|
|
655
701
|
"male",
|
|
656
702
|
"female",
|
|
657
703
|
"unknown"
|
|
658
704
|
]).describe("性别"),
|
|
659
|
-
remark:
|
|
660
|
-
bio:
|
|
661
|
-
level:
|
|
662
|
-
country:
|
|
663
|
-
city:
|
|
664
|
-
school:
|
|
665
|
-
});
|
|
666
|
-
const GetFriendListInput =
|
|
667
|
-
const GetFriendListOutput = z.object({ friends: z.array(z.lazy(() => FriendEntity)).describe("好友列表") });
|
|
668
|
-
const GetFriendInfoInput = z.object({
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
const
|
|
673
|
-
const
|
|
674
|
-
const
|
|
675
|
-
const
|
|
705
|
+
remark: z.string().describe("备注"),
|
|
706
|
+
bio: z.string().describe("个性签名"),
|
|
707
|
+
level: z.number().int().nonnegative().describe("QQ 等级"),
|
|
708
|
+
country: z.string().describe("国家或地区"),
|
|
709
|
+
city: z.string().describe("城市"),
|
|
710
|
+
school: z.string().describe("学校")
|
|
711
|
+
}).describe("get_user_profile 响应数据");
|
|
712
|
+
const GetFriendListInput = z.object({ no_cache: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否强制不使用缓存") }).describe("get_friend_list 请求参数");
|
|
713
|
+
const GetFriendListOutput = z.object({ friends: z.array(z.lazy(() => FriendEntity)).describe("好友列表") }).describe("get_friend_list 响应数据");
|
|
714
|
+
const GetFriendInfoInput = z.object({
|
|
715
|
+
user_id: zUin.describe("好友 QQ 号"),
|
|
716
|
+
no_cache: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否强制不使用缓存")
|
|
717
|
+
}).describe("get_friend_info 请求参数");
|
|
718
|
+
const GetFriendInfoOutput = z.object({ friend: z.lazy(() => FriendEntity).describe("好友信息") }).describe("get_friend_info 响应数据");
|
|
719
|
+
const GetGroupListInput = z.object({ no_cache: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否强制不使用缓存") }).describe("get_group_list 请求参数");
|
|
720
|
+
const GetGroupListOutput = z.object({ groups: z.array(z.lazy(() => GroupEntity)).describe("群列表") }).describe("get_group_list 响应数据");
|
|
721
|
+
const GetGroupInfoInput = z.object({
|
|
722
|
+
group_id: zUin.describe("群号"),
|
|
723
|
+
no_cache: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否强制不使用缓存")
|
|
724
|
+
}).describe("get_group_info 请求参数");
|
|
725
|
+
const GetGroupInfoOutput = z.object({ group: z.lazy(() => GroupEntity).describe("群信息") }).describe("get_group_info 响应数据");
|
|
726
|
+
const GetGroupMemberListInput = z.object({
|
|
727
|
+
group_id: zUin.describe("群号"),
|
|
728
|
+
no_cache: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否强制不使用缓存")
|
|
729
|
+
}).describe("get_group_member_list 请求参数");
|
|
730
|
+
const GetGroupMemberListOutput = z.object({ members: z.array(z.lazy(() => GroupMemberEntity)).describe("群成员列表") }).describe("get_group_member_list 响应数据");
|
|
676
731
|
const GetGroupMemberInfoInput = z.object({
|
|
677
|
-
group_id:
|
|
678
|
-
user_id:
|
|
679
|
-
|
|
680
|
-
|
|
732
|
+
group_id: zUin.describe("群号"),
|
|
733
|
+
user_id: zUin.describe("群成员 QQ 号"),
|
|
734
|
+
no_cache: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否强制不使用缓存")
|
|
735
|
+
}).describe("get_group_member_info 请求参数");
|
|
736
|
+
const GetGroupMemberInfoOutput = z.object({ member: z.lazy(() => GroupMemberEntity).describe("群成员信息") }).describe("get_group_member_info 响应数据");
|
|
681
737
|
const GetPeerPinsOutput = z.object({
|
|
682
738
|
friends: z.array(z.lazy(() => FriendEntity)).describe("置顶的好友列表"),
|
|
683
739
|
groups: z.array(z.lazy(() => GroupEntity)).describe("置顶的群列表")
|
|
684
|
-
});
|
|
740
|
+
}).describe("get_peer_pins 响应数据");
|
|
685
741
|
const SetPeerPinInput = z.object({
|
|
686
742
|
message_scene: z.enum([
|
|
687
743
|
"friend",
|
|
688
744
|
"group",
|
|
689
745
|
"temp"
|
|
690
746
|
]).describe("要设置的会话的消息场景"),
|
|
691
|
-
peer_id:
|
|
692
|
-
is_pinned:
|
|
693
|
-
});
|
|
694
|
-
const SetAvatarInput = z.object({ uri:
|
|
695
|
-
const SetNicknameInput = z.object({ new_nickname:
|
|
696
|
-
const SetBioInput = z.object({ new_bio:
|
|
697
|
-
const GetCustomFaceUrlListOutput = z.object({ urls: z.array(
|
|
698
|
-
const GetCookiesInput = z.object({ domain:
|
|
699
|
-
const GetCookiesOutput = z.object({ cookies:
|
|
700
|
-
const GetCSRFTokenOutput = z.object({ csrf_token:
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
|
|
747
|
+
peer_id: zUin.describe("要设置的好友 QQ 号或群号"),
|
|
748
|
+
is_pinned: z.boolean().nullish().default(true).transform((val) => val ?? true).describe("是否置顶, `false` 表示取消置顶")
|
|
749
|
+
}).describe("set_peer_pin 请求参数");
|
|
750
|
+
const SetAvatarInput = z.object({ uri: z.string().describe("头像文件 URI,支持 `file://` `http(s)://` `base64://` 三种格式") }).describe("set_avatar 请求参数");
|
|
751
|
+
const SetNicknameInput = z.object({ new_nickname: z.string().describe("新昵称") }).describe("set_nickname 请求参数");
|
|
752
|
+
const SetBioInput = z.object({ new_bio: z.string().describe("新个性签名") }).describe("set_bio 请求参数");
|
|
753
|
+
const GetCustomFaceUrlListOutput = z.object({ urls: z.array(z.string()).describe("自定义表情 URL 列表") }).describe("get_custom_face_url_list 响应数据");
|
|
754
|
+
const GetCookiesInput = z.object({ domain: z.string().describe("需要获取 Cookies 的域名") }).describe("get_cookies 请求参数");
|
|
755
|
+
const GetCookiesOutput = z.object({ cookies: z.string().describe("域名对应的 Cookies 字符串") }).describe("get_cookies 响应数据");
|
|
756
|
+
const GetCSRFTokenOutput = z.object({ csrf_token: z.string().describe("CSRF Token") }).describe("get_csrf_token 响应数据");
|
|
757
|
+
const SendPrivateMessageInput = z.object({
|
|
758
|
+
user_id: zUin.describe("好友 QQ 号"),
|
|
759
|
+
message: z.array(z.lazy(() => OutgoingSegment)).describe("消息内容")
|
|
760
|
+
}).describe("send_private_message 请求参数");
|
|
761
|
+
const SendPrivateMessageOutput = z.object({
|
|
762
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
763
|
+
time: z.number().int().nonnegative().describe("消息发送时间")
|
|
764
|
+
}).describe("send_private_message 响应数据");
|
|
765
|
+
const SendGroupMessageInput = z.object({
|
|
766
|
+
group_id: zUin.describe("群号"),
|
|
767
|
+
message: z.array(z.lazy(() => OutgoingSegment)).describe("消息内容")
|
|
768
|
+
}).describe("send_group_message 请求参数");
|
|
769
|
+
const SendGroupMessageOutput = z.object({
|
|
770
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
771
|
+
time: z.number().int().nonnegative().describe("消息发送时间")
|
|
772
|
+
}).describe("send_group_message 响应数据");
|
|
712
773
|
const RecallPrivateMessageInput = z.object({
|
|
713
|
-
user_id:
|
|
714
|
-
message_seq:
|
|
715
|
-
});
|
|
774
|
+
user_id: zUin.describe("好友 QQ 号"),
|
|
775
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号")
|
|
776
|
+
}).describe("recall_private_message 请求参数");
|
|
716
777
|
const RecallGroupMessageInput = z.object({
|
|
717
|
-
group_id:
|
|
718
|
-
message_seq:
|
|
719
|
-
});
|
|
778
|
+
group_id: zUin.describe("群号"),
|
|
779
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号")
|
|
780
|
+
}).describe("recall_group_message 请求参数");
|
|
720
781
|
const GetMessageInput = z.object({
|
|
721
782
|
message_scene: z.enum([
|
|
722
783
|
"friend",
|
|
723
784
|
"group",
|
|
724
785
|
"temp"
|
|
725
786
|
]).describe("消息场景"),
|
|
726
|
-
peer_id:
|
|
727
|
-
message_seq:
|
|
728
|
-
});
|
|
729
|
-
const GetMessageOutput = z.object({ message: z.lazy(() => IncomingMessage).describe("消息内容") });
|
|
787
|
+
peer_id: zUin.describe("好友 QQ 号或群号"),
|
|
788
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号")
|
|
789
|
+
}).describe("get_message 请求参数");
|
|
790
|
+
const GetMessageOutput = z.object({ message: z.lazy(() => IncomingMessage).describe("消息内容") }).describe("get_message 响应数据");
|
|
730
791
|
const GetHistoryMessagesInput = z.object({
|
|
731
792
|
message_scene: z.enum([
|
|
732
793
|
"friend",
|
|
733
794
|
"group",
|
|
734
795
|
"temp"
|
|
735
796
|
]).describe("消息场景"),
|
|
736
|
-
peer_id:
|
|
737
|
-
start_message_seq:
|
|
738
|
-
limit: z.number().int().
|
|
739
|
-
});
|
|
797
|
+
peer_id: zUin.describe("好友 QQ 号或群号"),
|
|
798
|
+
start_message_seq: z.number().int().nonnegative().nullish().describe("起始消息序列号,由此开始从新到旧查询,不提供则从最新消息开始"),
|
|
799
|
+
limit: z.number().int().nonnegative().nullish().default(20).transform((val) => val ?? 20).describe("期望获取到的消息数量,最多 30 条")
|
|
800
|
+
}).describe("get_history_messages 请求参数");
|
|
740
801
|
const GetHistoryMessagesOutput = z.object({
|
|
741
802
|
messages: z.array(z.lazy(() => IncomingMessage)).describe("获取到的消息(message_seq 升序排列),部分消息可能不存在,如撤回的消息"),
|
|
742
|
-
next_message_seq:
|
|
743
|
-
});
|
|
744
|
-
const GetResourceTempUrlInput = z.object({ resource_id:
|
|
745
|
-
const GetResourceTempUrlOutput = z.object({ url:
|
|
746
|
-
const GetForwardedMessagesInput = z.object({ forward_id:
|
|
747
|
-
const GetForwardedMessagesOutput = z.object({ messages: z.array(z.lazy(() => IncomingForwardedMessage)).describe("转发消息内容") });
|
|
803
|
+
next_message_seq: z.number().int().nonnegative().nullish().describe("下一页起始消息序列号")
|
|
804
|
+
}).describe("get_history_messages 响应数据");
|
|
805
|
+
const GetResourceTempUrlInput = z.object({ resource_id: z.string().describe("资源 ID") }).describe("get_resource_temp_url 请求参数");
|
|
806
|
+
const GetResourceTempUrlOutput = z.object({ url: z.string().describe("临时资源链接") }).describe("get_resource_temp_url 响应数据");
|
|
807
|
+
const GetForwardedMessagesInput = z.object({ forward_id: z.string().describe("转发消息 ID") }).describe("get_forwarded_messages 请求参数");
|
|
808
|
+
const GetForwardedMessagesOutput = z.object({ messages: z.array(z.lazy(() => IncomingForwardedMessage)).describe("转发消息内容") }).describe("get_forwarded_messages 响应数据");
|
|
748
809
|
const MarkMessageAsReadInput = z.object({
|
|
749
810
|
message_scene: z.enum([
|
|
750
811
|
"friend",
|
|
751
812
|
"group",
|
|
752
813
|
"temp"
|
|
753
814
|
]).describe("消息场景"),
|
|
754
|
-
peer_id:
|
|
755
|
-
message_seq:
|
|
756
|
-
});
|
|
757
|
-
//#endregion
|
|
758
|
-
//#region src/api/friend.ts
|
|
815
|
+
peer_id: zUin.describe("好友 QQ 号或群号"),
|
|
816
|
+
message_seq: z.number().int().nonnegative().describe("标为已读的消息序列号,该消息及更早的消息将被标记为已读")
|
|
817
|
+
}).describe("mark_message_as_read 请求参数");
|
|
759
818
|
const SendFriendNudgeInput = z.object({
|
|
760
|
-
user_id:
|
|
761
|
-
is_self:
|
|
762
|
-
});
|
|
819
|
+
user_id: zUin.describe("好友 QQ 号"),
|
|
820
|
+
is_self: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否戳自己")
|
|
821
|
+
}).describe("send_friend_nudge 请求参数");
|
|
763
822
|
const SendProfileLikeInput = z.object({
|
|
764
|
-
user_id:
|
|
765
|
-
count:
|
|
766
|
-
});
|
|
767
|
-
const DeleteFriendInput = z.object({ user_id:
|
|
823
|
+
user_id: zUin.describe("好友 QQ 号"),
|
|
824
|
+
count: z.number().int().nonnegative().nullish().default(1).transform((val) => val ?? 1).describe("点赞数量")
|
|
825
|
+
}).describe("send_profile_like 请求参数");
|
|
826
|
+
const DeleteFriendInput = z.object({ user_id: zUin.describe("好友 QQ 号") }).describe("delete_friend 请求参数");
|
|
768
827
|
const GetFriendRequestsInput = z.object({
|
|
769
|
-
limit:
|
|
770
|
-
is_filtered:
|
|
771
|
-
});
|
|
772
|
-
const GetFriendRequestsOutput = z.object({ requests: z.array(z.lazy(() => FriendRequest)).describe("好友请求列表") });
|
|
828
|
+
limit: z.number().int().nonnegative().nullish().default(20).transform((val) => val ?? 20).describe("获取的最大请求数量"),
|
|
829
|
+
is_filtered: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("`true` 表示只获取被过滤(由风险账号发起)的通知,`false` 表示只获取未被过滤的通知")
|
|
830
|
+
}).describe("get_friend_requests 请求参数");
|
|
831
|
+
const GetFriendRequestsOutput = z.object({ requests: z.array(z.lazy(() => FriendRequest)).describe("好友请求列表") }).describe("get_friend_requests 响应数据");
|
|
773
832
|
const AcceptFriendRequestInput = z.object({
|
|
774
|
-
initiator_uid:
|
|
775
|
-
is_filtered:
|
|
776
|
-
});
|
|
833
|
+
initiator_uid: z.string().describe("请求发起者 UID"),
|
|
834
|
+
is_filtered: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否是被过滤的请求")
|
|
835
|
+
}).describe("accept_friend_request 请求参数");
|
|
777
836
|
const RejectFriendRequestInput = z.object({
|
|
778
|
-
initiator_uid:
|
|
779
|
-
is_filtered:
|
|
780
|
-
reason:
|
|
781
|
-
});
|
|
782
|
-
//#endregion
|
|
783
|
-
//#region src/robust.ts
|
|
784
|
-
function ZRobustArray(element) {
|
|
785
|
-
return z$1.array(element.catch(null)).transform((val) => val.filter((item) => item !== null));
|
|
786
|
-
}
|
|
787
|
-
//#endregion
|
|
788
|
-
//#region src/api/group.ts
|
|
837
|
+
initiator_uid: z.string().describe("请求发起者 UID"),
|
|
838
|
+
is_filtered: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否是被过滤的请求"),
|
|
839
|
+
reason: z.string().nullish().describe("拒绝理由")
|
|
840
|
+
}).describe("reject_friend_request 请求参数");
|
|
789
841
|
const SetGroupNameInput = z.object({
|
|
790
|
-
group_id:
|
|
791
|
-
new_group_name:
|
|
792
|
-
});
|
|
842
|
+
group_id: zUin.describe("群号"),
|
|
843
|
+
new_group_name: z.string().describe("新群名称")
|
|
844
|
+
}).describe("set_group_name 请求参数");
|
|
793
845
|
const SetGroupAvatarInput = z.object({
|
|
794
|
-
group_id:
|
|
795
|
-
image_uri:
|
|
796
|
-
});
|
|
846
|
+
group_id: zUin.describe("群号"),
|
|
847
|
+
image_uri: z.string().describe("头像文件 URI,支持 `file://` `http(s)://` `base64://` 三种格式")
|
|
848
|
+
}).describe("set_group_avatar 请求参数");
|
|
797
849
|
const SetGroupMemberCardInput = z.object({
|
|
798
|
-
group_id:
|
|
799
|
-
user_id:
|
|
800
|
-
card:
|
|
801
|
-
});
|
|
850
|
+
group_id: zUin.describe("群号"),
|
|
851
|
+
user_id: zUin.describe("被设置的群成员 QQ 号"),
|
|
852
|
+
card: z.string().describe("新群名片")
|
|
853
|
+
}).describe("set_group_member_card 请求参数");
|
|
802
854
|
const SetGroupMemberSpecialTitleInput = z.object({
|
|
803
|
-
group_id:
|
|
804
|
-
user_id:
|
|
805
|
-
special_title:
|
|
806
|
-
});
|
|
855
|
+
group_id: zUin.describe("群号"),
|
|
856
|
+
user_id: zUin.describe("被设置的群成员 QQ 号"),
|
|
857
|
+
special_title: z.string().describe("新专属头衔")
|
|
858
|
+
}).describe("set_group_member_special_title 请求参数");
|
|
807
859
|
const SetGroupMemberAdminInput = z.object({
|
|
808
|
-
group_id:
|
|
809
|
-
user_id:
|
|
810
|
-
is_set:
|
|
811
|
-
});
|
|
860
|
+
group_id: zUin.describe("群号"),
|
|
861
|
+
user_id: zUin.describe("被设置的 QQ 号"),
|
|
862
|
+
is_set: z.boolean().nullish().default(true).transform((val) => val ?? true).describe("是否设置为管理员,`false` 表示取消管理员")
|
|
863
|
+
}).describe("set_group_member_admin 请求参数");
|
|
812
864
|
const SetGroupMemberMuteInput = z.object({
|
|
813
|
-
group_id:
|
|
814
|
-
user_id:
|
|
815
|
-
duration:
|
|
816
|
-
});
|
|
865
|
+
group_id: zUin.describe("群号"),
|
|
866
|
+
user_id: zUin.describe("被设置的 QQ 号"),
|
|
867
|
+
duration: z.number().int().nonnegative().nullish().default(0).transform((val) => val ?? 0).describe("禁言持续时间(秒),设为 `0` 为取消禁言")
|
|
868
|
+
}).describe("set_group_member_mute 请求参数");
|
|
817
869
|
const SetGroupWholeMuteInput = z.object({
|
|
818
|
-
group_id:
|
|
819
|
-
is_mute:
|
|
820
|
-
});
|
|
870
|
+
group_id: zUin.describe("群号"),
|
|
871
|
+
is_mute: z.boolean().nullish().default(true).transform((val) => val ?? true).describe("是否开启全员禁言,`false` 表示取消全员禁言")
|
|
872
|
+
}).describe("set_group_whole_mute 请求参数");
|
|
821
873
|
const KickGroupMemberInput = z.object({
|
|
822
|
-
group_id:
|
|
823
|
-
user_id:
|
|
824
|
-
reject_add_request:
|
|
825
|
-
});
|
|
826
|
-
const GetGroupAnnouncementsInput = z.object({ group_id:
|
|
827
|
-
const GetGroupAnnouncementsOutput = z.object({ announcements: z.array(z.lazy(() => GroupAnnouncementEntity)).describe("群公告列表") });
|
|
874
|
+
group_id: zUin.describe("群号"),
|
|
875
|
+
user_id: zUin.describe("被踢的 QQ 号"),
|
|
876
|
+
reject_add_request: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否拒绝加群申请,`false` 表示不拒绝")
|
|
877
|
+
}).describe("kick_group_member 请求参数");
|
|
878
|
+
const GetGroupAnnouncementsInput = z.object({ group_id: zUin.describe("群号") }).describe("get_group_announcements 请求参数");
|
|
879
|
+
const GetGroupAnnouncementsOutput = z.object({ announcements: z.array(z.lazy(() => GroupAnnouncementEntity)).describe("群公告列表") }).describe("get_group_announcements 响应数据");
|
|
828
880
|
const SendGroupAnnouncementInput = z.object({
|
|
829
|
-
group_id:
|
|
830
|
-
content:
|
|
831
|
-
image_uri:
|
|
832
|
-
});
|
|
881
|
+
group_id: zUin.describe("群号"),
|
|
882
|
+
content: z.string().describe("公告内容"),
|
|
883
|
+
image_uri: z.string().nullish().describe("公告附带图像文件 URI,支持 `file://` `http(s)://` `base64://` 三种格式")
|
|
884
|
+
}).describe("send_group_announcement 请求参数");
|
|
833
885
|
const DeleteGroupAnnouncementInput = z.object({
|
|
834
|
-
group_id:
|
|
835
|
-
announcement_id:
|
|
836
|
-
});
|
|
886
|
+
group_id: zUin.describe("群号"),
|
|
887
|
+
announcement_id: z.string().describe("公告 ID")
|
|
888
|
+
}).describe("delete_group_announcement 请求参数");
|
|
837
889
|
const GetGroupEssenceMessagesInput = z.object({
|
|
838
|
-
group_id:
|
|
839
|
-
page_index:
|
|
840
|
-
page_size:
|
|
841
|
-
});
|
|
890
|
+
group_id: zUin.describe("群号"),
|
|
891
|
+
page_index: z.number().int().nonnegative().describe("页码索引,从 0 开始"),
|
|
892
|
+
page_size: z.number().int().nonnegative().describe("每页包含的精华消息数量")
|
|
893
|
+
}).describe("get_group_essence_messages 请求参数");
|
|
842
894
|
const GetGroupEssenceMessagesOutput = z.object({
|
|
843
895
|
messages: z.array(z.lazy(() => GroupEssenceMessage)).describe("精华消息列表"),
|
|
844
|
-
is_end:
|
|
845
|
-
});
|
|
896
|
+
is_end: z.boolean().describe("是否已到最后一页")
|
|
897
|
+
}).describe("get_group_essence_messages 响应数据");
|
|
846
898
|
const SetGroupEssenceMessageInput = z.object({
|
|
847
|
-
group_id:
|
|
848
|
-
message_seq:
|
|
849
|
-
is_set:
|
|
850
|
-
});
|
|
851
|
-
const QuitGroupInput = z.object({ group_id:
|
|
899
|
+
group_id: zUin.describe("群号"),
|
|
900
|
+
message_seq: z.number().int().nonnegative().describe("消息序列号"),
|
|
901
|
+
is_set: z.boolean().nullish().default(true).transform((val) => val ?? true).describe("是否设置为精华消息,`false` 表示取消精华")
|
|
902
|
+
}).describe("set_group_essence_message 请求参数");
|
|
903
|
+
const QuitGroupInput = z.object({ group_id: zUin.describe("群号") }).describe("quit_group 请求参数");
|
|
852
904
|
const SendGroupMessageReactionInput = z.object({
|
|
853
|
-
group_id:
|
|
854
|
-
message_seq:
|
|
855
|
-
reaction:
|
|
856
|
-
reaction_type: z.enum(["face", "emoji"]).default("face").describe("发送的回应类型"),
|
|
857
|
-
is_add:
|
|
858
|
-
});
|
|
905
|
+
group_id: zUin.describe("群号"),
|
|
906
|
+
message_seq: z.number().int().nonnegative().describe("要回应的消息序列号"),
|
|
907
|
+
reaction: z.string().describe("发送的回应的表情 ID"),
|
|
908
|
+
reaction_type: z.enum(["face", "emoji"]).nullish().default("face").transform((val) => val ?? "face").describe("发送的回应类型"),
|
|
909
|
+
is_add: z.boolean().nullish().default(true).transform((val) => val ?? true).describe("是否添加表情,`false` 表示取消")
|
|
910
|
+
}).describe("send_group_message_reaction 请求参数");
|
|
859
911
|
const SendGroupNudgeInput = z.object({
|
|
860
|
-
group_id:
|
|
861
|
-
user_id:
|
|
862
|
-
});
|
|
912
|
+
group_id: zUin.describe("群号"),
|
|
913
|
+
user_id: zUin.describe("被戳的群成员 QQ 号")
|
|
914
|
+
}).describe("send_group_nudge 请求参数");
|
|
863
915
|
const GetGroupNotificationsInput = z.object({
|
|
864
|
-
start_notification_seq:
|
|
865
|
-
is_filtered:
|
|
866
|
-
limit:
|
|
867
|
-
});
|
|
916
|
+
start_notification_seq: z.number().int().nonnegative().nullish().describe("起始通知序列号"),
|
|
917
|
+
is_filtered: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("`true` 表示只获取被过滤(由风险账号发起)的通知,`false` 表示只获取未被过滤的通知"),
|
|
918
|
+
limit: z.number().int().nonnegative().nullish().default(20).transform((val) => val ?? 20).describe("获取的最大通知数量")
|
|
919
|
+
}).describe("get_group_notifications 请求参数");
|
|
868
920
|
const GetGroupNotificationsOutput = z.object({
|
|
869
|
-
notifications:
|
|
870
|
-
next_notification_seq:
|
|
871
|
-
});
|
|
921
|
+
notifications: zDropBadElementArray(GroupNotification).describe("获取到的群通知(notification_seq 降序排列),序列号不一定连续"),
|
|
922
|
+
next_notification_seq: z.number().int().nonnegative().nullish().describe("下一页起始通知序列号")
|
|
923
|
+
}).describe("get_group_notifications 响应数据");
|
|
872
924
|
const AcceptGroupRequestInput = z.object({
|
|
873
|
-
notification_seq:
|
|
925
|
+
notification_seq: z.number().int().nonnegative().describe("请求对应的通知序列号"),
|
|
874
926
|
notification_type: z.enum(["join_request", "invited_join_request"]).describe("请求对应的通知类型"),
|
|
875
|
-
group_id:
|
|
876
|
-
is_filtered:
|
|
877
|
-
});
|
|
927
|
+
group_id: zUin.describe("请求所在的群号"),
|
|
928
|
+
is_filtered: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否是被过滤的请求")
|
|
929
|
+
}).describe("accept_group_request 请求参数");
|
|
878
930
|
const RejectGroupRequestInput = z.object({
|
|
879
|
-
notification_seq:
|
|
931
|
+
notification_seq: z.number().int().nonnegative().describe("请求对应的通知序列号"),
|
|
880
932
|
notification_type: z.enum(["join_request", "invited_join_request"]).describe("请求对应的通知类型"),
|
|
881
|
-
group_id:
|
|
882
|
-
is_filtered:
|
|
883
|
-
reason:
|
|
884
|
-
});
|
|
933
|
+
group_id: zUin.describe("请求所在的群号"),
|
|
934
|
+
is_filtered: z.boolean().nullish().default(false).transform((val) => val ?? false).describe("是否是被过滤的请求"),
|
|
935
|
+
reason: z.string().nullish().describe("拒绝理由")
|
|
936
|
+
}).describe("reject_group_request 请求参数");
|
|
885
937
|
const AcceptGroupInvitationInput = z.object({
|
|
886
|
-
group_id:
|
|
887
|
-
invitation_seq:
|
|
888
|
-
});
|
|
938
|
+
group_id: zUin.describe("群号"),
|
|
939
|
+
invitation_seq: z.number().int().nonnegative().describe("邀请序列号")
|
|
940
|
+
}).describe("accept_group_invitation 请求参数");
|
|
889
941
|
const RejectGroupInvitationInput = z.object({
|
|
890
|
-
group_id:
|
|
891
|
-
invitation_seq:
|
|
892
|
-
});
|
|
893
|
-
//#endregion
|
|
894
|
-
//#region src/api/file.ts
|
|
942
|
+
group_id: zUin.describe("群号"),
|
|
943
|
+
invitation_seq: z.number().int().nonnegative().describe("邀请序列号")
|
|
944
|
+
}).describe("reject_group_invitation 请求参数");
|
|
895
945
|
const UploadPrivateFileInput = z.object({
|
|
896
|
-
user_id:
|
|
897
|
-
file_uri:
|
|
898
|
-
file_name:
|
|
899
|
-
});
|
|
900
|
-
const UploadPrivateFileOutput = z.object({ file_id:
|
|
946
|
+
user_id: zUin.describe("好友 QQ 号"),
|
|
947
|
+
file_uri: z.string().describe("文件 URI,支持 `file://` `http(s)://` `base64://` 三种格式"),
|
|
948
|
+
file_name: z.string().describe("文件名称")
|
|
949
|
+
}).describe("upload_private_file 请求参数");
|
|
950
|
+
const UploadPrivateFileOutput = z.object({ file_id: z.string().describe("文件 ID") }).describe("upload_private_file 响应数据");
|
|
901
951
|
const UploadGroupFileInput = z.object({
|
|
902
|
-
group_id:
|
|
903
|
-
parent_folder_id:
|
|
904
|
-
file_uri:
|
|
905
|
-
file_name:
|
|
906
|
-
});
|
|
907
|
-
const UploadGroupFileOutput = z.object({ file_id:
|
|
952
|
+
group_id: zUin.describe("群号"),
|
|
953
|
+
parent_folder_id: z.string().nullish().default("/").transform((val) => val ?? "/").describe("目标文件夹 ID"),
|
|
954
|
+
file_uri: z.string().describe("文件 URI,支持 `file://` `http(s)://` `base64://` 三种格式"),
|
|
955
|
+
file_name: z.string().describe("文件名称")
|
|
956
|
+
}).describe("upload_group_file 请求参数");
|
|
957
|
+
const UploadGroupFileOutput = z.object({ file_id: z.string().describe("文件 ID") }).describe("upload_group_file 响应数据");
|
|
908
958
|
const GetPrivateFileDownloadUrlInput = z.object({
|
|
909
|
-
user_id:
|
|
910
|
-
file_id:
|
|
911
|
-
file_hash:
|
|
912
|
-
});
|
|
913
|
-
const GetPrivateFileDownloadUrlOutput = z.object({ download_url:
|
|
959
|
+
user_id: zUin.describe("好友 QQ 号"),
|
|
960
|
+
file_id: z.string().describe("文件 ID"),
|
|
961
|
+
file_hash: z.string().describe("文件的 TriSHA1 哈希值")
|
|
962
|
+
}).describe("get_private_file_download_url 请求参数");
|
|
963
|
+
const GetPrivateFileDownloadUrlOutput = z.object({ download_url: z.string().describe("文件下载链接") }).describe("get_private_file_download_url 响应数据");
|
|
914
964
|
const GetGroupFileDownloadUrlInput = z.object({
|
|
915
|
-
group_id:
|
|
916
|
-
file_id:
|
|
917
|
-
});
|
|
918
|
-
const GetGroupFileDownloadUrlOutput = z.object({ download_url:
|
|
965
|
+
group_id: zUin.describe("群号"),
|
|
966
|
+
file_id: z.string().describe("文件 ID")
|
|
967
|
+
}).describe("get_group_file_download_url 请求参数");
|
|
968
|
+
const GetGroupFileDownloadUrlOutput = z.object({ download_url: z.string().describe("文件下载链接") }).describe("get_group_file_download_url 响应数据");
|
|
919
969
|
const GetGroupFilesInput = z.object({
|
|
920
|
-
group_id:
|
|
921
|
-
parent_folder_id:
|
|
922
|
-
});
|
|
970
|
+
group_id: zUin.describe("群号"),
|
|
971
|
+
parent_folder_id: z.string().nullish().default("/").transform((val) => val ?? "/").describe("父文件夹 ID")
|
|
972
|
+
}).describe("get_group_files 请求参数");
|
|
923
973
|
const GetGroupFilesOutput = z.object({
|
|
924
974
|
files: z.array(z.lazy(() => GroupFileEntity)).describe("文件列表"),
|
|
925
975
|
folders: z.array(z.lazy(() => GroupFolderEntity)).describe("文件夹列表")
|
|
926
|
-
});
|
|
976
|
+
}).describe("get_group_files 响应数据");
|
|
927
977
|
const MoveGroupFileInput = z.object({
|
|
928
|
-
group_id:
|
|
929
|
-
file_id:
|
|
930
|
-
parent_folder_id:
|
|
931
|
-
target_folder_id:
|
|
932
|
-
});
|
|
978
|
+
group_id: zUin.describe("群号"),
|
|
979
|
+
file_id: z.string().describe("文件 ID"),
|
|
980
|
+
parent_folder_id: z.string().nullish().default("/").transform((val) => val ?? "/").describe("文件所在的文件夹 ID"),
|
|
981
|
+
target_folder_id: z.string().nullish().default("/").transform((val) => val ?? "/").describe("目标文件夹 ID")
|
|
982
|
+
}).describe("move_group_file 请求参数");
|
|
933
983
|
const RenameGroupFileInput = z.object({
|
|
934
|
-
group_id:
|
|
935
|
-
file_id:
|
|
936
|
-
parent_folder_id:
|
|
937
|
-
new_file_name:
|
|
938
|
-
});
|
|
984
|
+
group_id: zUin.describe("群号"),
|
|
985
|
+
file_id: z.string().describe("文件 ID"),
|
|
986
|
+
parent_folder_id: z.string().nullish().default("/").transform((val) => val ?? "/").describe("文件所在的文件夹 ID"),
|
|
987
|
+
new_file_name: z.string().describe("新文件名称")
|
|
988
|
+
}).describe("rename_group_file 请求参数");
|
|
939
989
|
const DeleteGroupFileInput = z.object({
|
|
940
|
-
group_id:
|
|
941
|
-
file_id:
|
|
942
|
-
});
|
|
990
|
+
group_id: zUin.describe("群号"),
|
|
991
|
+
file_id: z.string().describe("文件 ID")
|
|
992
|
+
}).describe("delete_group_file 请求参数");
|
|
943
993
|
const CreateGroupFolderInput = z.object({
|
|
944
|
-
group_id:
|
|
945
|
-
folder_name:
|
|
946
|
-
});
|
|
947
|
-
const CreateGroupFolderOutput = z.object({ folder_id:
|
|
994
|
+
group_id: zUin.describe("群号"),
|
|
995
|
+
folder_name: z.string().describe("文件夹名称")
|
|
996
|
+
}).describe("create_group_folder 请求参数");
|
|
997
|
+
const CreateGroupFolderOutput = z.object({ folder_id: z.string().describe("文件夹 ID") }).describe("create_group_folder 响应数据");
|
|
948
998
|
const RenameGroupFolderInput = z.object({
|
|
949
|
-
group_id:
|
|
950
|
-
folder_id:
|
|
951
|
-
new_folder_name:
|
|
952
|
-
});
|
|
999
|
+
group_id: zUin.describe("群号"),
|
|
1000
|
+
folder_id: z.string().describe("文件夹 ID"),
|
|
1001
|
+
new_folder_name: z.string().describe("新文件夹名")
|
|
1002
|
+
}).describe("rename_group_folder 请求参数");
|
|
953
1003
|
const DeleteGroupFolderInput = z.object({
|
|
954
|
-
group_id:
|
|
955
|
-
folder_id:
|
|
956
|
-
});
|
|
1004
|
+
group_id: zUin.describe("群号"),
|
|
1005
|
+
folder_id: z.string().describe("文件夹 ID")
|
|
1006
|
+
}).describe("delete_group_folder 请求参数");
|
|
957
1007
|
//#endregion
|
|
958
|
-
export { AcceptFriendRequestInput, AcceptGroupInvitationInput, AcceptGroupRequestInput, BotOfflineEvent, CreateGroupFolderInput, CreateGroupFolderOutput, DeleteFriendInput, DeleteGroupAnnouncementInput, DeleteGroupFileInput, DeleteGroupFolderInput, Event, FriendCategoryEntity, FriendEntity, FriendFileUploadEvent, FriendNudgeEvent, FriendRequest, FriendRequestEvent, GetCSRFTokenOutput, GetCookiesInput, GetCookiesOutput, GetCustomFaceUrlListOutput, GetForwardedMessagesInput, GetForwardedMessagesOutput, GetFriendInfoInput, GetFriendInfoOutput, GetFriendListInput, GetFriendListOutput, GetFriendRequestsInput, GetFriendRequestsOutput, GetGroupAnnouncementsInput, GetGroupAnnouncementsOutput, GetGroupEssenceMessagesInput, GetGroupEssenceMessagesOutput, GetGroupFileDownloadUrlInput, GetGroupFileDownloadUrlOutput, GetGroupFilesInput, GetGroupFilesOutput, GetGroupInfoInput, GetGroupInfoOutput, GetGroupListInput, GetGroupListOutput, GetGroupMemberInfoInput, GetGroupMemberInfoOutput, GetGroupMemberListInput, GetGroupMemberListOutput, GetGroupNotificationsInput, GetGroupNotificationsOutput, GetHistoryMessagesInput, GetHistoryMessagesOutput, GetImplInfoOutput, GetLoginInfoOutput, GetMessageInput, GetMessageOutput, GetPeerPinsOutput, GetPrivateFileDownloadUrlInput, GetPrivateFileDownloadUrlOutput, GetResourceTempUrlInput, GetResourceTempUrlOutput, GetUserProfileInput, GetUserProfileOutput, GroupAdminChangeEvent, GroupAnnouncementEntity, GroupEntity, GroupEssenceMessage, GroupEssenceMessageChangeEvent, GroupFileEntity, GroupFileUploadEvent, GroupFolderEntity, GroupInvitationEvent, GroupInvitedJoinRequestEvent, GroupJoinRequestEvent, GroupMemberDecreaseEvent, GroupMemberEntity, GroupMemberIncreaseEvent, GroupMessageReactionEvent, GroupMuteEvent, GroupNameChangeEvent, GroupNotification, GroupNudgeEvent, GroupWholeMuteEvent, IncomingForwardedMessage, IncomingMessage,
|
|
1008
|
+
export { AcceptFriendRequestInput, AcceptGroupInvitationInput, AcceptGroupRequestInput, BotOfflineEvent, BotOfflineEventData, CreateGroupFolderInput, CreateGroupFolderOutput, DeleteFriendInput, DeleteGroupAnnouncementInput, DeleteGroupFileInput, DeleteGroupFolderInput, Event, FriendCategoryEntity, FriendEntity, FriendFileUploadEvent, FriendFileUploadEventData, FriendNudgeEvent, FriendNudgeEventData, FriendRequest, FriendRequestEvent, FriendRequestEventData, GetCSRFTokenOutput, GetCookiesInput, GetCookiesOutput, GetCustomFaceUrlListOutput, GetForwardedMessagesInput, GetForwardedMessagesOutput, GetFriendInfoInput, GetFriendInfoOutput, GetFriendListInput, GetFriendListOutput, GetFriendRequestsInput, GetFriendRequestsOutput, GetGroupAnnouncementsInput, GetGroupAnnouncementsOutput, GetGroupEssenceMessagesInput, GetGroupEssenceMessagesOutput, GetGroupFileDownloadUrlInput, GetGroupFileDownloadUrlOutput, GetGroupFilesInput, GetGroupFilesOutput, GetGroupInfoInput, GetGroupInfoOutput, GetGroupListInput, GetGroupListOutput, GetGroupMemberInfoInput, GetGroupMemberInfoOutput, GetGroupMemberListInput, GetGroupMemberListOutput, GetGroupNotificationsInput, GetGroupNotificationsOutput, GetHistoryMessagesInput, GetHistoryMessagesOutput, GetImplInfoOutput, GetLoginInfoOutput, GetMessageInput, GetMessageOutput, GetPeerPinsOutput, GetPrivateFileDownloadUrlInput, GetPrivateFileDownloadUrlOutput, GetResourceTempUrlInput, GetResourceTempUrlOutput, GetUserProfileInput, GetUserProfileOutput, GroupAdminChangeEvent, GroupAdminChangeEventData, GroupAdminChangeNotification, GroupAnnouncementEntity, GroupEntity, GroupEssenceMessage, GroupEssenceMessageChangeEvent, GroupEssenceMessageChangeEventData, GroupFileEntity, GroupFileUploadEvent, GroupFileUploadEventData, GroupFolderEntity, GroupInvitationEvent, GroupInvitationEventData, GroupInvitedJoinRequestEvent, GroupInvitedJoinRequestEventData, GroupInvitedJoinRequestNotification, GroupJoinRequestEvent, GroupJoinRequestEventData, GroupJoinRequestNotification, GroupKickNotification, GroupMemberDecreaseEvent, GroupMemberDecreaseEventData, GroupMemberEntity, GroupMemberIncreaseEvent, GroupMemberIncreaseEventData, GroupMessageReactionEvent, GroupMessageReactionEventData, GroupMuteEvent, GroupMuteEventData, GroupNameChangeEvent, GroupNameChangeEventData, GroupNotification, GroupNudgeEvent, GroupNudgeEventData, GroupQuitNotification, GroupWholeMuteEvent, GroupWholeMuteEventData, IncomingFaceSegmentData, IncomingFileSegmentData, IncomingForwardSegmentData, IncomingForwardedMessage, IncomingFriendMessage, IncomingGroupMessage, IncomingImageSegmentData, IncomingLightAppSegmentData, IncomingMarketFaceSegmentData, IncomingMentionAllSegmentData, IncomingMentionSegmentData, IncomingMessage, IncomingRecordSegmentData, IncomingReplySegmentData, IncomingSegment, IncomingTempMessage, IncomingTextSegmentData, IncomingVideoSegmentData, IncomingXmlSegmentData, KickGroupMemberInput, MarkMessageAsReadInput, MessageRecallEvent, MessageRecallEventData, MoveGroupFileInput, OutgoingFaceSegmentData, OutgoingForwardSegmentData, OutgoingForwardedMessage, OutgoingImageSegmentData, OutgoingLightAppSegmentData, OutgoingMentionAllSegmentData, OutgoingMentionSegmentData, OutgoingRecordSegmentData, OutgoingReplySegmentData, OutgoingSegment, OutgoingTextSegmentData, OutgoingVideoSegmentData, PeerPinChangeEvent, PeerPinChangeEventData, QuitGroupInput, RecallGroupMessageInput, RecallPrivateMessageInput, RejectFriendRequestInput, RejectGroupInvitationInput, RejectGroupRequestInput, RenameGroupFileInput, RenameGroupFolderInput, SendFriendNudgeInput, SendGroupAnnouncementInput, SendGroupMessageInput, SendGroupMessageOutput, SendGroupMessageReactionInput, SendGroupNudgeInput, SendPrivateMessageInput, SendPrivateMessageOutput, SendProfileLikeInput, SetAvatarInput, SetBioInput, SetGroupAvatarInput, SetGroupEssenceMessageInput, SetGroupMemberAdminInput, SetGroupMemberCardInput, SetGroupMemberMuteInput, SetGroupMemberSpecialTitleInput, SetGroupNameInput, SetGroupWholeMuteInput, SetNicknameInput, SetPeerPinInput, UploadGroupFileInput, UploadGroupFileOutput, UploadPrivateFileInput, UploadPrivateFileOutput, milkyPackageVersion, milkyVersion, zDropBadElementArray, zUin };
|
|
959
1009
|
|
|
960
1010
|
//# sourceMappingURL=index.mjs.map
|