@saltify/milky-types 1.1.0 → 1.2.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- //#region src/api-endpoints.ts
2
- const commonStructs = [
1
+ //#region src/namings.ts
2
+ const commonStructNames = [
3
3
  "Event",
4
4
  "FriendEntity",
5
5
  "FriendCategoryEntity",
@@ -17,406 +17,423 @@ const commonStructs = [
17
17
  "OutgoingForwardedMessage",
18
18
  "OutgoingSegment"
19
19
  ];
20
- const apiCategories = {
21
- system: {
20
+ const apiSpecCategories = [
21
+ {
22
+ key: "system",
22
23
  name: "系统 API",
23
- apis: [
24
+ apiSpecs: [
24
25
  {
25
26
  endpoint: "get_login_info",
26
27
  description: "获取登录信息",
27
- inputStruct: null,
28
- outputStruct: "GetLoginInfoOutput"
28
+ inputStructName: null,
29
+ outputStructName: "GetLoginInfoOutput"
29
30
  },
30
31
  {
31
32
  endpoint: "get_impl_info",
32
33
  description: "获取协议端信息",
33
- inputStruct: null,
34
- outputStruct: "GetImplInfoOutput"
34
+ inputStructName: null,
35
+ outputStructName: "GetImplInfoOutput"
35
36
  },
36
37
  {
37
38
  endpoint: "get_user_profile",
38
39
  description: "获取用户个人信息",
39
- inputStruct: "GetUserProfileInput",
40
- outputStruct: "GetUserProfileOutput"
40
+ inputStructName: "GetUserProfileInput",
41
+ outputStructName: "GetUserProfileOutput"
41
42
  },
42
43
  {
43
44
  endpoint: "get_friend_list",
44
45
  description: "获取好友列表",
45
- inputStruct: "GetFriendListInput",
46
- outputStruct: "GetFriendListOutput"
46
+ inputStructName: "GetFriendListInput",
47
+ outputStructName: "GetFriendListOutput"
47
48
  },
48
49
  {
49
50
  endpoint: "get_friend_info",
50
51
  description: "获取好友信息",
51
- inputStruct: "GetFriendInfoInput",
52
- outputStruct: "GetFriendInfoOutput"
52
+ inputStructName: "GetFriendInfoInput",
53
+ outputStructName: "GetFriendInfoOutput"
53
54
  },
54
55
  {
55
56
  endpoint: "get_group_list",
56
57
  description: "获取群列表",
57
- inputStruct: "GetGroupListInput",
58
- outputStruct: "GetGroupListOutput"
58
+ inputStructName: "GetGroupListInput",
59
+ outputStructName: "GetGroupListOutput"
59
60
  },
60
61
  {
61
62
  endpoint: "get_group_info",
62
63
  description: "获取群信息",
63
- inputStruct: "GetGroupInfoInput",
64
- outputStruct: "GetGroupInfoOutput"
64
+ inputStructName: "GetGroupInfoInput",
65
+ outputStructName: "GetGroupInfoOutput"
65
66
  },
66
67
  {
67
68
  endpoint: "get_group_member_list",
68
69
  description: "获取群成员列表",
69
- inputStruct: "GetGroupMemberListInput",
70
- outputStruct: "GetGroupMemberListOutput"
70
+ inputStructName: "GetGroupMemberListInput",
71
+ outputStructName: "GetGroupMemberListOutput"
71
72
  },
72
73
  {
73
74
  endpoint: "get_group_member_info",
74
75
  description: "获取群成员信息",
75
- inputStruct: "GetGroupMemberInfoInput",
76
- outputStruct: "GetGroupMemberInfoOutput"
76
+ inputStructName: "GetGroupMemberInfoInput",
77
+ outputStructName: "GetGroupMemberInfoOutput"
78
+ },
79
+ {
80
+ endpoint: "get_peer_pins",
81
+ description: "获取置顶的好友和群列表",
82
+ inputStructName: null,
83
+ outputStructName: "GetPeerPinsOutput"
84
+ },
85
+ {
86
+ endpoint: "set_peer_pin",
87
+ description: "设置好友或群的置顶状态",
88
+ inputStructName: "SetPeerPinInput",
89
+ outputStructName: null
77
90
  },
78
91
  {
79
92
  endpoint: "set_avatar",
80
93
  description: "设置 QQ 账号头像",
81
- inputStruct: "SetAvatarInput",
82
- outputStruct: null
94
+ inputStructName: "SetAvatarInput",
95
+ outputStructName: null
83
96
  },
84
97
  {
85
98
  endpoint: "set_nickname",
86
99
  description: "设置 QQ 账号昵称",
87
- inputStruct: "SetNicknameInput",
88
- outputStruct: null
100
+ inputStructName: "SetNicknameInput",
101
+ outputStructName: null
89
102
  },
90
103
  {
91
104
  endpoint: "set_bio",
92
105
  description: "设置 QQ 账号个性签名",
93
- inputStruct: "SetBioInput",
94
- outputStruct: null
106
+ inputStructName: "SetBioInput",
107
+ outputStructName: null
95
108
  },
96
109
  {
97
110
  endpoint: "get_custom_face_url_list",
98
111
  description: "获取自定义表情 URL 列表",
99
- inputStruct: null,
100
- outputStruct: "GetCustomFaceUrlListOutput"
112
+ inputStructName: null,
113
+ outputStructName: "GetCustomFaceUrlListOutput"
101
114
  },
102
115
  {
103
116
  endpoint: "get_cookies",
104
117
  description: "获取 Cookies",
105
- inputStruct: "GetCookiesInput",
106
- outputStruct: "GetCookiesOutput"
118
+ inputStructName: "GetCookiesInput",
119
+ outputStructName: "GetCookiesOutput"
107
120
  },
108
121
  {
109
122
  endpoint: "get_csrf_token",
110
123
  description: "获取 CSRF Token",
111
- inputStruct: null,
112
- outputStruct: "GetCSRFTokenOutput"
124
+ inputStructName: null,
125
+ outputStructName: "GetCSRFTokenOutput"
113
126
  }
114
127
  ]
115
128
  },
116
- message: {
129
+ {
130
+ key: "message",
117
131
  name: "消息 API",
118
- apis: [
132
+ apiSpecs: [
119
133
  {
120
134
  endpoint: "send_private_message",
121
135
  description: "发送私聊消息",
122
- inputStruct: "SendPrivateMessageInput",
123
- outputStruct: "SendPrivateMessageOutput"
136
+ inputStructName: "SendPrivateMessageInput",
137
+ outputStructName: "SendPrivateMessageOutput"
124
138
  },
125
139
  {
126
140
  endpoint: "send_group_message",
127
141
  description: "发送群聊消息",
128
- inputStruct: "SendGroupMessageInput",
129
- outputStruct: "SendGroupMessageOutput"
142
+ inputStructName: "SendGroupMessageInput",
143
+ outputStructName: "SendGroupMessageOutput"
130
144
  },
131
145
  {
132
146
  endpoint: "recall_private_message",
133
147
  description: "撤回私聊消息",
134
- inputStruct: "RecallPrivateMessageInput",
135
- outputStruct: null
148
+ inputStructName: "RecallPrivateMessageInput",
149
+ outputStructName: null
136
150
  },
137
151
  {
138
152
  endpoint: "recall_group_message",
139
153
  description: "撤回群聊消息",
140
- inputStruct: "RecallGroupMessageInput",
141
- outputStruct: null
154
+ inputStructName: "RecallGroupMessageInput",
155
+ outputStructName: null
142
156
  },
143
157
  {
144
158
  endpoint: "get_message",
145
159
  description: "获取消息",
146
- inputStruct: "GetMessageInput",
147
- outputStruct: "GetMessageOutput"
160
+ inputStructName: "GetMessageInput",
161
+ outputStructName: "GetMessageOutput"
148
162
  },
149
163
  {
150
164
  endpoint: "get_history_messages",
151
165
  description: "获取历史消息列表",
152
- inputStruct: "GetHistoryMessagesInput",
153
- outputStruct: "GetHistoryMessagesOutput"
166
+ inputStructName: "GetHistoryMessagesInput",
167
+ outputStructName: "GetHistoryMessagesOutput"
154
168
  },
155
169
  {
156
170
  endpoint: "get_resource_temp_url",
157
171
  description: "获取临时资源链接",
158
- inputStruct: "GetResourceTempUrlInput",
159
- outputStruct: "GetResourceTempUrlOutput"
172
+ inputStructName: "GetResourceTempUrlInput",
173
+ outputStructName: "GetResourceTempUrlOutput"
160
174
  },
161
175
  {
162
176
  endpoint: "get_forwarded_messages",
163
177
  description: "获取合并转发消息内容",
164
- inputStruct: "GetForwardedMessagesInput",
165
- outputStruct: "GetForwardedMessagesOutput"
178
+ inputStructName: "GetForwardedMessagesInput",
179
+ outputStructName: "GetForwardedMessagesOutput"
166
180
  },
167
181
  {
168
182
  endpoint: "mark_message_as_read",
169
183
  description: "标记消息为已读",
170
- inputStruct: "MarkMessageAsReadInput",
171
- outputStruct: null
184
+ inputStructName: "MarkMessageAsReadInput",
185
+ outputStructName: null
172
186
  }
173
187
  ]
174
188
  },
175
- friend: {
189
+ {
190
+ key: "friend",
176
191
  name: "好友 API",
177
- apis: [
192
+ apiSpecs: [
178
193
  {
179
194
  endpoint: "send_friend_nudge",
180
195
  description: "发送好友戳一戳",
181
- inputStruct: "SendFriendNudgeInput",
182
- outputStruct: null
196
+ inputStructName: "SendFriendNudgeInput",
197
+ outputStructName: null
183
198
  },
184
199
  {
185
200
  endpoint: "send_profile_like",
186
201
  description: "发送名片点赞",
187
- inputStruct: "SendProfileLikeInput",
188
- outputStruct: null
202
+ inputStructName: "SendProfileLikeInput",
203
+ outputStructName: null
189
204
  },
190
205
  {
191
206
  endpoint: "delete_friend",
192
207
  description: "删除好友",
193
- inputStruct: "DeleteFriendInput",
194
- outputStruct: null
208
+ inputStructName: "DeleteFriendInput",
209
+ outputStructName: null
195
210
  },
196
211
  {
197
212
  endpoint: "get_friend_requests",
198
213
  description: "获取好友请求列表",
199
- inputStruct: "GetFriendRequestsInput",
200
- outputStruct: "GetFriendRequestsOutput"
214
+ inputStructName: "GetFriendRequestsInput",
215
+ outputStructName: "GetFriendRequestsOutput"
201
216
  },
202
217
  {
203
218
  endpoint: "accept_friend_request",
204
219
  description: "同意好友请求",
205
- inputStruct: "AcceptFriendRequestInput",
206
- outputStruct: null
220
+ inputStructName: "AcceptFriendRequestInput",
221
+ outputStructName: null
207
222
  },
208
223
  {
209
224
  endpoint: "reject_friend_request",
210
225
  description: "拒绝好友请求",
211
- inputStruct: "RejectFriendRequestInput",
212
- outputStruct: null
226
+ inputStructName: "RejectFriendRequestInput",
227
+ outputStructName: null
213
228
  }
214
229
  ]
215
230
  },
216
- group: {
231
+ {
232
+ key: "group",
217
233
  name: "群聊 API",
218
- apis: [
234
+ apiSpecs: [
219
235
  {
220
236
  endpoint: "set_group_name",
221
237
  description: "设置群名称",
222
- inputStruct: "SetGroupNameInput",
223
- outputStruct: null
238
+ inputStructName: "SetGroupNameInput",
239
+ outputStructName: null
224
240
  },
225
241
  {
226
242
  endpoint: "set_group_avatar",
227
243
  description: "设置群头像",
228
- inputStruct: "SetGroupAvatarInput",
229
- outputStruct: null
244
+ inputStructName: "SetGroupAvatarInput",
245
+ outputStructName: null
230
246
  },
231
247
  {
232
248
  endpoint: "set_group_member_card",
233
249
  description: "设置群名片",
234
- inputStruct: "SetGroupMemberCardInput",
235
- outputStruct: null
250
+ inputStructName: "SetGroupMemberCardInput",
251
+ outputStructName: null
236
252
  },
237
253
  {
238
254
  endpoint: "set_group_member_special_title",
239
255
  description: "设置群成员专属头衔",
240
- inputStruct: "SetGroupMemberSpecialTitleInput",
241
- outputStruct: null
256
+ inputStructName: "SetGroupMemberSpecialTitleInput",
257
+ outputStructName: null
242
258
  },
243
259
  {
244
260
  endpoint: "set_group_member_admin",
245
261
  description: "设置群管理员",
246
- inputStruct: "SetGroupMemberAdminInput",
247
- outputStruct: null
262
+ inputStructName: "SetGroupMemberAdminInput",
263
+ outputStructName: null
248
264
  },
249
265
  {
250
266
  endpoint: "set_group_member_mute",
251
267
  description: "设置群成员禁言",
252
- inputStruct: "SetGroupMemberMuteInput",
253
- outputStruct: null
268
+ inputStructName: "SetGroupMemberMuteInput",
269
+ outputStructName: null
254
270
  },
255
271
  {
256
272
  endpoint: "set_group_whole_mute",
257
273
  description: "设置群全员禁言",
258
- inputStruct: "SetGroupWholeMuteInput",
259
- outputStruct: null
274
+ inputStructName: "SetGroupWholeMuteInput",
275
+ outputStructName: null
260
276
  },
261
277
  {
262
278
  endpoint: "kick_group_member",
263
279
  description: "踢出群成员",
264
- inputStruct: "KickGroupMemberInput",
265
- outputStruct: null
280
+ inputStructName: "KickGroupMemberInput",
281
+ outputStructName: null
266
282
  },
267
283
  {
268
284
  endpoint: "get_group_announcements",
269
285
  description: "获取群公告列表",
270
- inputStruct: "GetGroupAnnouncementsInput",
271
- outputStruct: "GetGroupAnnouncementsOutput"
286
+ inputStructName: "GetGroupAnnouncementsInput",
287
+ outputStructName: "GetGroupAnnouncementsOutput"
272
288
  },
273
289
  {
274
290
  endpoint: "send_group_announcement",
275
291
  description: "发送群公告",
276
- inputStruct: "SendGroupAnnouncementInput",
277
- outputStruct: null
292
+ inputStructName: "SendGroupAnnouncementInput",
293
+ outputStructName: null
278
294
  },
279
295
  {
280
296
  endpoint: "delete_group_announcement",
281
297
  description: "删除群公告",
282
- inputStruct: "DeleteGroupAnnouncementInput",
283
- outputStruct: null
298
+ inputStructName: "DeleteGroupAnnouncementInput",
299
+ outputStructName: null
284
300
  },
285
301
  {
286
302
  endpoint: "get_group_essence_messages",
287
303
  description: "获取群精华消息列表",
288
- inputStruct: "GetGroupEssenceMessagesInput",
289
- outputStruct: "GetGroupEssenceMessagesOutput"
304
+ inputStructName: "GetGroupEssenceMessagesInput",
305
+ outputStructName: "GetGroupEssenceMessagesOutput"
290
306
  },
291
307
  {
292
308
  endpoint: "set_group_essence_message",
293
309
  description: "设置群精华消息",
294
- inputStruct: "SetGroupEssenceMessageInput",
295
- outputStruct: null
310
+ inputStructName: "SetGroupEssenceMessageInput",
311
+ outputStructName: null
296
312
  },
297
313
  {
298
314
  endpoint: "quit_group",
299
315
  description: "退出群",
300
- inputStruct: "QuitGroupInput",
301
- outputStruct: null
316
+ inputStructName: "QuitGroupInput",
317
+ outputStructName: null
302
318
  },
303
319
  {
304
320
  endpoint: "send_group_message_reaction",
305
321
  description: "发送群消息表情回应",
306
- inputStruct: "SendGroupMessageReactionInput",
307
- outputStruct: null
322
+ inputStructName: "SendGroupMessageReactionInput",
323
+ outputStructName: null
308
324
  },
309
325
  {
310
326
  endpoint: "send_group_nudge",
311
327
  description: "发送群戳一戳",
312
- inputStruct: "SendGroupNudgeInput",
313
- outputStruct: null
328
+ inputStructName: "SendGroupNudgeInput",
329
+ outputStructName: null
314
330
  },
315
331
  {
316
332
  endpoint: "get_group_notifications",
317
333
  description: "获取群通知列表",
318
- inputStruct: "GetGroupNotificationsInput",
319
- outputStruct: "GetGroupNotificationsOutput"
334
+ inputStructName: "GetGroupNotificationsInput",
335
+ outputStructName: "GetGroupNotificationsOutput"
320
336
  },
321
337
  {
322
338
  endpoint: "accept_group_request",
323
339
  description: "同意入群/邀请他人入群请求",
324
- inputStruct: "AcceptGroupRequestInput",
325
- outputStruct: null
340
+ inputStructName: "AcceptGroupRequestInput",
341
+ outputStructName: null
326
342
  },
327
343
  {
328
344
  endpoint: "reject_group_request",
329
345
  description: "拒绝入群/邀请他人入群请求",
330
- inputStruct: "RejectGroupRequestInput",
331
- outputStruct: null
346
+ inputStructName: "RejectGroupRequestInput",
347
+ outputStructName: null
332
348
  },
333
349
  {
334
350
  endpoint: "accept_group_invitation",
335
351
  description: "同意他人邀请自身入群",
336
- inputStruct: "AcceptGroupInvitationInput",
337
- outputStruct: null
352
+ inputStructName: "AcceptGroupInvitationInput",
353
+ outputStructName: null
338
354
  },
339
355
  {
340
356
  endpoint: "reject_group_invitation",
341
357
  description: "拒绝他人邀请自身入群",
342
- inputStruct: "RejectGroupInvitationInput",
343
- outputStruct: null
358
+ inputStructName: "RejectGroupInvitationInput",
359
+ outputStructName: null
344
360
  }
345
361
  ]
346
362
  },
347
- file: {
363
+ {
364
+ key: "file",
348
365
  name: "文件 API",
349
- apis: [
366
+ apiSpecs: [
350
367
  {
351
368
  endpoint: "upload_private_file",
352
369
  description: "上传私聊文件",
353
- inputStruct: "UploadPrivateFileInput",
354
- outputStruct: "UploadPrivateFileOutput"
370
+ inputStructName: "UploadPrivateFileInput",
371
+ outputStructName: "UploadPrivateFileOutput"
355
372
  },
356
373
  {
357
374
  endpoint: "upload_group_file",
358
375
  description: "上传群文件",
359
- inputStruct: "UploadGroupFileInput",
360
- outputStruct: "UploadGroupFileOutput"
376
+ inputStructName: "UploadGroupFileInput",
377
+ outputStructName: "UploadGroupFileOutput"
361
378
  },
362
379
  {
363
380
  endpoint: "get_private_file_download_url",
364
381
  description: "获取私聊文件下载链接",
365
- inputStruct: "GetPrivateFileDownloadUrlInput",
366
- outputStruct: "GetPrivateFileDownloadUrlOutput"
382
+ inputStructName: "GetPrivateFileDownloadUrlInput",
383
+ outputStructName: "GetPrivateFileDownloadUrlOutput"
367
384
  },
368
385
  {
369
386
  endpoint: "get_group_file_download_url",
370
387
  description: "获取群文件下载链接",
371
- inputStruct: "GetGroupFileDownloadUrlInput",
372
- outputStruct: "GetGroupFileDownloadUrlOutput"
388
+ inputStructName: "GetGroupFileDownloadUrlInput",
389
+ outputStructName: "GetGroupFileDownloadUrlOutput"
373
390
  },
374
391
  {
375
392
  endpoint: "get_group_files",
376
393
  description: "获取群文件列表",
377
- inputStruct: "GetGroupFilesInput",
378
- outputStruct: "GetGroupFilesOutput"
394
+ inputStructName: "GetGroupFilesInput",
395
+ outputStructName: "GetGroupFilesOutput"
379
396
  },
380
397
  {
381
398
  endpoint: "move_group_file",
382
399
  description: "移动群文件",
383
- inputStruct: "MoveGroupFileInput",
384
- outputStruct: null
400
+ inputStructName: "MoveGroupFileInput",
401
+ outputStructName: null
385
402
  },
386
403
  {
387
404
  endpoint: "rename_group_file",
388
405
  description: "重命名群文件",
389
- inputStruct: "RenameGroupFileInput",
390
- outputStruct: null
406
+ inputStructName: "RenameGroupFileInput",
407
+ outputStructName: null
391
408
  },
392
409
  {
393
410
  endpoint: "delete_group_file",
394
411
  description: "删除群文件",
395
- inputStruct: "DeleteGroupFileInput",
396
- outputStruct: null
412
+ inputStructName: "DeleteGroupFileInput",
413
+ outputStructName: null
397
414
  },
398
415
  {
399
416
  endpoint: "create_group_folder",
400
417
  description: "创建群文件夹",
401
- inputStruct: "CreateGroupFolderInput",
402
- outputStruct: "CreateGroupFolderOutput"
418
+ inputStructName: "CreateGroupFolderInput",
419
+ outputStructName: "CreateGroupFolderOutput"
403
420
  },
404
421
  {
405
422
  endpoint: "rename_group_folder",
406
423
  description: "重命名群文件夹",
407
- inputStruct: "RenameGroupFolderInput",
408
- outputStruct: null
424
+ inputStructName: "RenameGroupFolderInput",
425
+ outputStructName: null
409
426
  },
410
427
  {
411
428
  endpoint: "delete_group_folder",
412
429
  description: "删除群文件夹",
413
- inputStruct: "DeleteGroupFolderInput",
414
- outputStruct: null
430
+ inputStructName: "DeleteGroupFolderInput",
431
+ outputStructName: null
415
432
  }
416
433
  ]
417
434
  }
418
- };
435
+ ];
419
436
 
420
437
  //#endregion
421
- export { apiCategories, commonStructs };
422
- //# sourceMappingURL=api-endpoints.mjs.map
438
+ export { apiSpecCategories, commonStructNames };
439
+ //# sourceMappingURL=namings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namings.mjs","names":[],"sources":["../src/namings.ts"],"sourcesContent":["import type * as schema from '.';\n\nexport type MilkyStructName = keyof typeof schema;\n\nexport const commonStructNames: MilkyStructName[] = [\n 'Event',\n 'FriendEntity',\n 'FriendCategoryEntity',\n 'GroupEntity',\n 'GroupMemberEntity',\n 'GroupAnnouncementEntity',\n 'GroupFileEntity',\n 'GroupFolderEntity',\n 'FriendRequest',\n 'GroupNotification',\n 'IncomingMessage',\n 'IncomingForwardedMessage',\n 'GroupEssenceMessage',\n 'IncomingSegment',\n 'OutgoingForwardedMessage',\n 'OutgoingSegment',\n];\n\nexport interface ApiSpecCategory {\n key: string;\n name: string;\n apiSpecs: ApiSpec[];\n}\n\nexport interface ApiSpec {\n endpoint: string;\n description: string;\n inputStructName: MilkyStructName | null;\n outputStructName: MilkyStructName | null;\n}\n\nexport const apiSpecCategories: ApiSpecCategory[] = [\n {\n key: 'system',\n name: '系统 API',\n apiSpecs: [\n {\n endpoint: 'get_login_info',\n description: '获取登录信息',\n inputStructName: null,\n outputStructName: 'GetLoginInfoOutput',\n },\n {\n endpoint: 'get_impl_info',\n description: '获取协议端信息',\n inputStructName: null,\n outputStructName: 'GetImplInfoOutput',\n },\n {\n endpoint: 'get_user_profile',\n description: '获取用户个人信息',\n inputStructName: 'GetUserProfileInput',\n outputStructName: 'GetUserProfileOutput',\n },\n {\n endpoint: 'get_friend_list',\n description: '获取好友列表',\n inputStructName: 'GetFriendListInput',\n outputStructName: 'GetFriendListOutput',\n },\n {\n endpoint: 'get_friend_info',\n description: '获取好友信息',\n inputStructName: 'GetFriendInfoInput',\n outputStructName: 'GetFriendInfoOutput',\n },\n {\n endpoint: 'get_group_list',\n description: '获取群列表',\n inputStructName: 'GetGroupListInput',\n outputStructName: 'GetGroupListOutput',\n },\n {\n endpoint: 'get_group_info',\n description: '获取群信息',\n inputStructName: 'GetGroupInfoInput',\n outputStructName: 'GetGroupInfoOutput',\n },\n {\n endpoint: 'get_group_member_list',\n description: '获取群成员列表',\n inputStructName: 'GetGroupMemberListInput',\n outputStructName: 'GetGroupMemberListOutput',\n },\n {\n endpoint: 'get_group_member_info',\n description: '获取群成员信息',\n inputStructName: 'GetGroupMemberInfoInput',\n outputStructName: 'GetGroupMemberInfoOutput',\n },\n {\n endpoint: 'get_peer_pins',\n description: '获取置顶的好友和群列表',\n inputStructName: null,\n outputStructName: 'GetPeerPinsOutput',\n },\n {\n endpoint: 'set_peer_pin',\n description: '设置好友或群的置顶状态',\n inputStructName: 'SetPeerPinInput',\n outputStructName: null,\n },\n {\n endpoint: 'set_avatar',\n description: '设置 QQ 账号头像',\n inputStructName: 'SetAvatarInput',\n outputStructName: null,\n },\n {\n endpoint: 'set_nickname',\n description: '设置 QQ 账号昵称',\n inputStructName: 'SetNicknameInput',\n outputStructName: null,\n },\n {\n endpoint: 'set_bio',\n description: '设置 QQ 账号个性签名',\n inputStructName: 'SetBioInput',\n outputStructName: null,\n },\n {\n endpoint: 'get_custom_face_url_list',\n description: '获取自定义表情 URL 列表',\n inputStructName: null,\n outputStructName: 'GetCustomFaceUrlListOutput',\n },\n {\n endpoint: 'get_cookies',\n description: '获取 Cookies',\n inputStructName: 'GetCookiesInput',\n outputStructName: 'GetCookiesOutput',\n },\n {\n endpoint: 'get_csrf_token',\n description: '获取 CSRF Token',\n inputStructName: null,\n outputStructName: 'GetCSRFTokenOutput',\n },\n ],\n },\n {\n key: 'message',\n name: '消息 API',\n apiSpecs: [\n {\n endpoint: 'send_private_message',\n description: '发送私聊消息',\n inputStructName: 'SendPrivateMessageInput',\n outputStructName: 'SendPrivateMessageOutput',\n },\n {\n endpoint: 'send_group_message',\n description: '发送群聊消息',\n inputStructName: 'SendGroupMessageInput',\n outputStructName: 'SendGroupMessageOutput',\n },\n {\n endpoint: 'recall_private_message',\n description: '撤回私聊消息',\n inputStructName: 'RecallPrivateMessageInput',\n outputStructName: null,\n },\n {\n endpoint: 'recall_group_message',\n description: '撤回群聊消息',\n inputStructName: 'RecallGroupMessageInput',\n outputStructName: null,\n },\n {\n endpoint: 'get_message',\n description: '获取消息',\n inputStructName: 'GetMessageInput',\n outputStructName: 'GetMessageOutput',\n },\n {\n endpoint: 'get_history_messages',\n description: '获取历史消息列表',\n inputStructName: 'GetHistoryMessagesInput',\n outputStructName: 'GetHistoryMessagesOutput',\n },\n {\n endpoint: 'get_resource_temp_url',\n description: '获取临时资源链接',\n inputStructName: 'GetResourceTempUrlInput',\n outputStructName: 'GetResourceTempUrlOutput',\n },\n {\n endpoint: 'get_forwarded_messages',\n description: '获取合并转发消息内容',\n inputStructName: 'GetForwardedMessagesInput',\n outputStructName: 'GetForwardedMessagesOutput',\n },\n {\n endpoint: 'mark_message_as_read',\n description: '标记消息为已读',\n inputStructName: 'MarkMessageAsReadInput',\n outputStructName: null,\n },\n ],\n },\n {\n key: 'friend',\n name: '好友 API',\n apiSpecs: [\n {\n endpoint: 'send_friend_nudge',\n description: '发送好友戳一戳',\n inputStructName: 'SendFriendNudgeInput',\n outputStructName: null,\n },\n {\n endpoint: 'send_profile_like',\n description: '发送名片点赞',\n inputStructName: 'SendProfileLikeInput',\n outputStructName: null,\n },\n {\n endpoint: 'delete_friend',\n description: '删除好友',\n inputStructName: 'DeleteFriendInput',\n outputStructName: null,\n },\n {\n endpoint: 'get_friend_requests',\n description: '获取好友请求列表',\n inputStructName: 'GetFriendRequestsInput',\n outputStructName: 'GetFriendRequestsOutput',\n },\n {\n endpoint: 'accept_friend_request',\n description: '同意好友请求',\n inputStructName: 'AcceptFriendRequestInput',\n outputStructName: null,\n },\n {\n endpoint: 'reject_friend_request',\n description: '拒绝好友请求',\n inputStructName: 'RejectFriendRequestInput',\n outputStructName: null,\n },\n ],\n },\n {\n key: 'group',\n name: '群聊 API',\n apiSpecs: [\n {\n endpoint: 'set_group_name',\n description: '设置群名称',\n inputStructName: 'SetGroupNameInput',\n outputStructName: null,\n },\n {\n endpoint: 'set_group_avatar',\n description: '设置群头像',\n inputStructName: 'SetGroupAvatarInput',\n outputStructName: null,\n },\n {\n endpoint: 'set_group_member_card',\n description: '设置群名片',\n inputStructName: 'SetGroupMemberCardInput',\n outputStructName: null,\n },\n {\n endpoint: 'set_group_member_special_title',\n description: '设置群成员专属头衔',\n inputStructName: 'SetGroupMemberSpecialTitleInput',\n outputStructName: null,\n },\n {\n endpoint: 'set_group_member_admin',\n description: '设置群管理员',\n inputStructName: 'SetGroupMemberAdminInput',\n outputStructName: null,\n },\n {\n endpoint: 'set_group_member_mute',\n description: '设置群成员禁言',\n inputStructName: 'SetGroupMemberMuteInput',\n outputStructName: null,\n },\n {\n endpoint: 'set_group_whole_mute',\n description: '设置群全员禁言',\n inputStructName: 'SetGroupWholeMuteInput',\n outputStructName: null,\n },\n {\n endpoint: 'kick_group_member',\n description: '踢出群成员',\n inputStructName: 'KickGroupMemberInput',\n outputStructName: null,\n },\n {\n endpoint: 'get_group_announcements',\n description: '获取群公告列表',\n inputStructName: 'GetGroupAnnouncementsInput',\n outputStructName: 'GetGroupAnnouncementsOutput',\n },\n {\n endpoint: 'send_group_announcement',\n description: '发送群公告',\n inputStructName: 'SendGroupAnnouncementInput',\n outputStructName: null,\n },\n {\n endpoint: 'delete_group_announcement',\n description: '删除群公告',\n inputStructName: 'DeleteGroupAnnouncementInput',\n outputStructName: null,\n },\n {\n endpoint: 'get_group_essence_messages',\n description: '获取群精华消息列表',\n inputStructName: 'GetGroupEssenceMessagesInput',\n outputStructName: 'GetGroupEssenceMessagesOutput',\n },\n {\n endpoint: 'set_group_essence_message',\n description: '设置群精华消息',\n inputStructName: 'SetGroupEssenceMessageInput',\n outputStructName: null,\n },\n {\n endpoint: 'quit_group',\n description: '退出群',\n inputStructName: 'QuitGroupInput',\n outputStructName: null,\n },\n {\n endpoint: 'send_group_message_reaction',\n description: '发送群消息表情回应',\n inputStructName: 'SendGroupMessageReactionInput',\n outputStructName: null,\n },\n {\n endpoint: 'send_group_nudge',\n description: '发送群戳一戳',\n inputStructName: 'SendGroupNudgeInput',\n outputStructName: null,\n },\n {\n endpoint: 'get_group_notifications',\n description: '获取群通知列表',\n inputStructName: 'GetGroupNotificationsInput',\n outputStructName: 'GetGroupNotificationsOutput',\n },\n {\n endpoint: 'accept_group_request',\n description: '同意入群/邀请他人入群请求',\n inputStructName: 'AcceptGroupRequestInput',\n outputStructName: null,\n },\n {\n endpoint: 'reject_group_request',\n description: '拒绝入群/邀请他人入群请求',\n inputStructName: 'RejectGroupRequestInput',\n outputStructName: null,\n },\n {\n endpoint: 'accept_group_invitation',\n description: '同意他人邀请自身入群',\n inputStructName: 'AcceptGroupInvitationInput',\n outputStructName: null,\n },\n {\n endpoint: 'reject_group_invitation',\n description: '拒绝他人邀请自身入群',\n inputStructName: 'RejectGroupInvitationInput',\n outputStructName: null,\n },\n ],\n },\n {\n key: 'file',\n name: '文件 API',\n apiSpecs: [\n {\n endpoint: 'upload_private_file',\n description: '上传私聊文件',\n inputStructName: 'UploadPrivateFileInput',\n outputStructName: 'UploadPrivateFileOutput',\n },\n {\n endpoint: 'upload_group_file',\n description: '上传群文件',\n inputStructName: 'UploadGroupFileInput',\n outputStructName: 'UploadGroupFileOutput',\n },\n {\n endpoint: 'get_private_file_download_url',\n description: '获取私聊文件下载链接',\n inputStructName: 'GetPrivateFileDownloadUrlInput',\n outputStructName: 'GetPrivateFileDownloadUrlOutput',\n },\n {\n endpoint: 'get_group_file_download_url',\n description: '获取群文件下载链接',\n inputStructName: 'GetGroupFileDownloadUrlInput',\n outputStructName: 'GetGroupFileDownloadUrlOutput',\n },\n {\n endpoint: 'get_group_files',\n description: '获取群文件列表',\n inputStructName: 'GetGroupFilesInput',\n outputStructName: 'GetGroupFilesOutput',\n },\n {\n endpoint: 'move_group_file',\n description: '移动群文件',\n inputStructName: 'MoveGroupFileInput',\n outputStructName: null,\n },\n {\n endpoint: 'rename_group_file',\n description: '重命名群文件',\n inputStructName: 'RenameGroupFileInput',\n outputStructName: null,\n },\n {\n endpoint: 'delete_group_file',\n description: '删除群文件',\n inputStructName: 'DeleteGroupFileInput',\n outputStructName: null,\n },\n {\n endpoint: 'create_group_folder',\n description: '创建群文件夹',\n inputStructName: 'CreateGroupFolderInput',\n outputStructName: 'CreateGroupFolderOutput',\n },\n {\n endpoint: 'rename_group_folder',\n description: '重命名群文件夹',\n inputStructName: 'RenameGroupFolderInput',\n outputStructName: null,\n },\n {\n endpoint: 'delete_group_folder',\n description: '删除群文件夹',\n inputStructName: 'DeleteGroupFolderInput',\n outputStructName: null,\n },\n ],\n },\n];\n"],"mappings":";AAIA,MAAa,oBAAuC;CAClD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAeD,MAAa,oBAAuC;CAClD;EACE,KAAK;EACL,MAAM;EACN,UAAU;GACR;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACF;EACF;CACD;EACE,KAAK;EACL,MAAM;EACN,UAAU;GACR;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACF;EACF;CACD;EACE,KAAK;EACL,MAAM;EACN,UAAU;GACR;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACF;EACF;CACD;EACE,KAAK;EACL,MAAM;EACN,UAAU;GACR;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACF;EACF;CACD;EACE,KAAK;EACL,MAAM;EACN,UAAU;GACR;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACD;IACE,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IACnB;GACF;EACF;CACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@saltify/milky-types",
3
3
  "type": "module",
4
- "version": "1.1.0",
4
+ "version": "1.2.0-rc.2",
5
5
  "description": "Type definitions for Milky protocol",
6
6
  "main": "dist/index.mjs",
7
7
  "exports": {
@@ -9,9 +9,9 @@
9
9
  "import": "./dist/index.mjs",
10
10
  "types": "./dist/index.d.mts"
11
11
  },
12
- "./api": {
13
- "import": "./dist/api-endpoints.mjs",
14
- "types": "./dist/api-endpoints.d.mts"
12
+ "./namings": {
13
+ "import": "./dist/namings.mjs",
14
+ "types": "./dist/namings.d.mts"
15
15
  }
16
16
  },
17
17
  "files": [
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "license": "CC0-1.0",
27
27
  "dependencies": {
28
- "zod": "^4.3.5"
28
+ "zod": "^4.3.6"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "tsdown"
@@ -1,19 +0,0 @@
1
- import { t as index_d_exports } from "./index-DRIK9fKk.mjs";
2
-
3
- //#region src/api-endpoints.d.ts
4
- type TypeName = keyof typeof index_d_exports;
5
- declare const commonStructs: TypeName[];
6
- interface Api {
7
- endpoint: string;
8
- description: string;
9
- inputStruct: TypeName | null;
10
- outputStruct: TypeName | null;
11
- }
12
- interface ApiCategory {
13
- name: string;
14
- apis: Api[];
15
- }
16
- declare const apiCategories: Record<string, ApiCategory>;
17
- //#endregion
18
- export { Api, ApiCategory, apiCategories, commonStructs };
19
- //# sourceMappingURL=api-endpoints.d.mts.map