@luckylillia-dev/plugin-onebot11 1.0.4 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/lib/api.js +110 -0
  2. package/lib/api.js.map +7 -0
  3. package/lib/chunk-LPSGUUXW.js +5157 -0
  4. package/lib/chunk-LPSGUUXW.js.map +7 -0
  5. package/lib/index.js +413 -16848
  6. package/lib/index.js.map +4 -4
  7. package/lib/types/action/go-cqhttp/QuickOperation.d.ts +19 -0
  8. package/lib/types/action/index.d.ts +2 -0
  9. package/lib/types/action/llbot/system/GetEvent.d.ts +21 -0
  10. package/lib/types/adapter.d.ts +29 -0
  11. package/lib/types/api.d.ts +2 -0
  12. package/lib/types/config.d.ts +30 -64
  13. package/lib/types/connect/http.d.ts +43 -0
  14. package/lib/types/connect/ws.d.ts +47 -0
  15. package/lib/types/eventfilter.d.ts +2 -0
  16. package/lib/types/helper/eventForHttp.d.ts +6 -0
  17. package/lib/types/helper/quickOperation.d.ts +27 -0
  18. package/lib/types/index.d.ts +7 -7
  19. package/lib/types/protocol/action/BaseAction.d.ts +20 -0
  20. package/lib/types/protocol/action/OB11Response.d.ts +6 -0
  21. package/lib/types/protocol/action/file/GetFile.d.ts +39 -0
  22. package/lib/types/protocol/action/file/GetImage.d.ts +5 -0
  23. package/lib/types/protocol/action/file/GetRecord.d.ts +26 -0
  24. package/lib/types/protocol/action/go-cqhttp/CreateGroupFileFolder.d.ts +24 -0
  25. package/lib/types/protocol/action/go-cqhttp/DeleteEssenceMsg.d.ts +15 -0
  26. package/lib/types/protocol/action/go-cqhttp/DeleteFriend.d.ts +15 -0
  27. package/lib/types/protocol/action/go-cqhttp/DeleteGroupFile.d.ts +21 -0
  28. package/lib/types/protocol/action/go-cqhttp/DeleteGroupFolder.d.ts +18 -0
  29. package/lib/types/protocol/action/go-cqhttp/DownloadFile.d.ts +27 -0
  30. package/lib/types/protocol/action/go-cqhttp/GetForwardMsg.d.ts +25 -0
  31. package/lib/types/protocol/action/go-cqhttp/GetGroupAtAllRemain.d.ts +24 -0
  32. package/lib/types/protocol/action/go-cqhttp/GetGroupEssence.d.ts +24 -0
  33. package/lib/types/protocol/action/go-cqhttp/GetGroupFileSystemInfo.d.ts +26 -0
  34. package/lib/types/protocol/action/go-cqhttp/GetGroupFileUrl.d.ts +23 -0
  35. package/lib/types/protocol/action/go-cqhttp/GetGroupFilesByFolder.d.ts +38 -0
  36. package/lib/types/protocol/action/go-cqhttp/GetGroupMsgHistory.d.ts +30 -0
  37. package/lib/types/protocol/action/go-cqhttp/GetGroupNotice.d.ts +35 -0
  38. package/lib/types/protocol/action/go-cqhttp/GetGroupRootFiles.d.ts +46 -0
  39. package/lib/types/protocol/action/go-cqhttp/GetGroupSystemMsg.d.ts +28 -0
  40. package/lib/types/protocol/action/go-cqhttp/GetStrangerInfo.d.ts +52 -0
  41. package/lib/types/protocol/action/go-cqhttp/MarkMsgAsRead.d.ts +15 -0
  42. package/lib/types/protocol/action/go-cqhttp/OCRImage.d.ts +37 -0
  43. package/lib/types/protocol/action/go-cqhttp/SendForwardMsg.d.ts +76 -0
  44. package/lib/types/protocol/action/go-cqhttp/SendGroupNotice.d.ts +36 -0
  45. package/lib/types/protocol/action/go-cqhttp/SendGroupSign.d.ts +15 -0
  46. package/lib/types/protocol/action/go-cqhttp/SetEssenceMsg.d.ts +15 -0
  47. package/lib/types/protocol/action/go-cqhttp/SetGroupPortrait.d.ts +19 -0
  48. package/lib/types/protocol/action/go-cqhttp/SetGroupSpecialTitle.d.ts +21 -0
  49. package/lib/types/protocol/action/go-cqhttp/SetQQProfile.d.ts +18 -0
  50. package/lib/types/protocol/action/go-cqhttp/UploadGroupFile.d.ts +32 -0
  51. package/lib/types/protocol/action/go-cqhttp/UploadPrivateFile.d.ts +26 -0
  52. package/lib/types/protocol/action/group/GetGroupHonorInfo.d.ts +38 -0
  53. package/lib/types/protocol/action/group/GetGroupInfo.d.ts +32 -0
  54. package/lib/types/protocol/action/group/GetGroupList.d.ts +29 -0
  55. package/lib/types/protocol/action/group/GetGroupMemberInfo.d.ts +22 -0
  56. package/lib/types/protocol/action/group/GetGroupMemberList.d.ts +19 -0
  57. package/lib/types/protocol/action/group/GetGuildList.d.ts +6 -0
  58. package/lib/types/protocol/action/group/SendGroupMsg.d.ts +10 -0
  59. package/lib/types/protocol/action/group/SetGroupAddRequest.d.ts +21 -0
  60. package/lib/types/protocol/action/group/SetGroupAdmin.d.ts +21 -0
  61. package/lib/types/protocol/action/group/SetGroupBan.d.ts +21 -0
  62. package/lib/types/protocol/action/group/SetGroupCard.d.ts +21 -0
  63. package/lib/types/protocol/action/group/SetGroupKick.d.ts +21 -0
  64. package/lib/types/protocol/action/group/SetGroupLeave.d.ts +16 -0
  65. package/lib/types/protocol/action/group/SetGroupName.d.ts +18 -0
  66. package/lib/types/protocol/action/group/SetGroupWholeBan.d.ts +18 -0
  67. package/lib/types/protocol/action/index.d.ts +3 -0
  68. package/lib/types/protocol/action/llbot/file/DownloadFlashFile.d.ts +6 -0
  69. package/lib/types/protocol/action/llbot/file/GetFlashFileDownloadUrls.d.ts +26 -0
  70. package/lib/types/protocol/action/llbot/file/GetFlashFileInfo.d.ts +41 -0
  71. package/lib/types/protocol/action/llbot/file/GetPrivateFileUrl.d.ts +19 -0
  72. package/lib/types/protocol/action/llbot/file/GetRkey.d.ts +18 -0
  73. package/lib/types/protocol/action/llbot/file/MoveGroupFile.d.ts +24 -0
  74. package/lib/types/protocol/action/llbot/file/ReShareFlashFile.d.ts +17 -0
  75. package/lib/types/protocol/action/llbot/file/RenameGroupFile.d.ts +24 -0
  76. package/lib/types/protocol/action/llbot/file/RenameGroupFileFolder.d.ts +21 -0
  77. package/lib/types/protocol/action/llbot/file/SetGroupFileForever.d.ts +18 -0
  78. package/lib/types/protocol/action/llbot/file/UploadFlashFile.d.ts +41 -0
  79. package/lib/types/protocol/action/llbot/group/BatchDeleteGroupMember.d.ts +18 -0
  80. package/lib/types/protocol/action/llbot/group/DeleteGroupNotice.d.ts +18 -0
  81. package/lib/types/protocol/action/llbot/group/GetGroupAddRequest.d.ts +12 -0
  82. package/lib/types/protocol/action/llbot/group/GetGroupNoticeAcklist.d.ts +30 -0
  83. package/lib/types/protocol/action/llbot/group/GetGroupShutList.d.ts +38 -0
  84. package/lib/types/protocol/action/llbot/group/GetGroupSignedList.d.ts +26 -0
  85. package/lib/types/protocol/action/llbot/group/GroupAlbum/CreateGroupAlbum.d.ts +21 -0
  86. package/lib/types/protocol/action/llbot/group/GroupAlbum/DeleteGroupAlbum.d.ts +18 -0
  87. package/lib/types/protocol/action/llbot/group/GroupAlbum/GetGroupAlbumList.d.ts +132 -0
  88. package/lib/types/protocol/action/llbot/group/GroupAlbum/GetGroupAlbumMediaList.d.ts +306 -0
  89. package/lib/types/protocol/action/llbot/group/GroupAlbum/UploadGroupAlbum.d.ts +21 -0
  90. package/lib/types/protocol/action/llbot/group/GroupPoke.d.ts +18 -0
  91. package/lib/types/protocol/action/llbot/group/SetGroupMsgMask.d.ts +18 -0
  92. package/lib/types/protocol/action/llbot/group/SetGroupRemark.d.ts +18 -0
  93. package/lib/types/protocol/action/llbot/msg/FetchCustomFace.d.ts +6 -0
  94. package/lib/types/protocol/action/llbot/msg/FetchEmojiLike.d.ts +37 -0
  95. package/lib/types/protocol/action/llbot/msg/ForwardSingleMsg.d.ts +31 -0
  96. package/lib/types/protocol/action/llbot/msg/GetAiCharacters.d.ts +26 -0
  97. package/lib/types/protocol/action/llbot/msg/GetFriendMsgHistory.d.ts +30 -0
  98. package/lib/types/protocol/action/llbot/msg/GetRecommendFace.d.ts +20 -0
  99. package/lib/types/protocol/action/llbot/msg/SendGroupAiRecord.d.ts +27 -0
  100. package/lib/types/protocol/action/llbot/msg/SendPoke.d.ts +21 -0
  101. package/lib/types/protocol/action/llbot/msg/SetMsgEmojiLike.d.ts +26 -0
  102. package/lib/types/protocol/action/llbot/msg/VoiceMsg2Text.d.ts +17 -0
  103. package/lib/types/protocol/action/llbot/system/Config.d.ts +32 -0
  104. package/lib/types/protocol/action/llbot/system/Debug.d.ts +21 -0
  105. package/lib/types/protocol/action/llbot/system/GetRobotUinRange.d.ts +10 -0
  106. package/lib/types/protocol/action/llbot/system/ScanQRCode.d.ts +18 -0
  107. package/lib/types/protocol/action/llbot/system/SendPB.d.ts +27 -0
  108. package/lib/types/protocol/action/llbot/user/FriendPoke.d.ts +18 -0
  109. package/lib/types/protocol/action/llbot/user/GetDoubtFriendsAddRequest.d.ts +36 -0
  110. package/lib/types/protocol/action/llbot/user/GetFriendWithCategory.d.ts +23 -0
  111. package/lib/types/protocol/action/llbot/user/GetProfileLike.d.ts +41 -0
  112. package/lib/types/protocol/action/llbot/user/GetProfileLikeCount.d.ts +18 -0
  113. package/lib/types/protocol/action/llbot/user/GetProfileLikeMe.d.ts +23 -0
  114. package/lib/types/protocol/action/llbot/user/GetQQAvatar.d.ts +23 -0
  115. package/lib/types/protocol/action/llbot/user/SetDoubtFriendsAddRequest.d.ts +15 -0
  116. package/lib/types/protocol/action/llbot/user/SetFriendCategory.d.ts +18 -0
  117. package/lib/types/protocol/action/llbot/user/SetFriendRemark.d.ts +18 -0
  118. package/lib/types/protocol/action/llbot/user/SetInputStatus.d.ts +18 -0
  119. package/lib/types/protocol/action/llbot/user/SetOnlineStatus.d.ts +21 -0
  120. package/lib/types/protocol/action/llbot/user/SetQQAvatar.d.ts +15 -0
  121. package/lib/types/protocol/action/msg/DeleteMsg.d.ts +15 -0
  122. package/lib/types/protocol/action/msg/GetMsg.d.ts +18 -0
  123. package/lib/types/protocol/action/msg/SendMsg.d.ts +26 -0
  124. package/lib/types/protocol/action/msg/SendPrivateMsg.d.ts +10 -0
  125. package/lib/types/protocol/action/system/CanSendImage.d.ts +5 -0
  126. package/lib/types/protocol/action/system/CanSendRecord.d.ts +12 -0
  127. package/lib/types/protocol/action/system/CleanCache.d.ts +6 -0
  128. package/lib/types/protocol/action/system/GetCredentials.d.ts +22 -0
  129. package/lib/types/protocol/action/system/GetCsrfToken.d.ts +12 -0
  130. package/lib/types/protocol/action/system/GetLoginInfo.d.ts +11 -0
  131. package/lib/types/protocol/action/system/GetStatus.d.ts +7 -0
  132. package/lib/types/protocol/action/system/GetVersionInfo.d.ts +7 -0
  133. package/lib/types/protocol/action/system/SetRestart.d.ts +6 -0
  134. package/lib/types/protocol/action/types.d.ts +133 -0
  135. package/lib/types/protocol/action/user/GetCookie.d.ts +22 -0
  136. package/lib/types/protocol/action/user/GetFriendList.d.ts +7 -0
  137. package/lib/types/protocol/action/user/SendLike.d.ts +18 -0
  138. package/lib/types/protocol/action/user/SetFriendAddRequest.d.ts +21 -0
  139. package/lib/types/protocol/cqcode.d.ts +3 -0
  140. package/lib/types/protocol/entities.d.ts +14 -0
  141. package/lib/types/protocol/event/OB11BaseEvent.d.ts +15 -0
  142. package/lib/types/protocol/event/index.d.ts +47 -0
  143. package/lib/types/protocol/event/message/OB11MessageEvent.d.ts +2 -0
  144. package/lib/types/protocol/event/meta/OB11BaseMetaEvent.d.ts +5 -0
  145. package/lib/types/protocol/event/meta/OB11HeartbeatEvent.d.ts +12 -0
  146. package/lib/types/protocol/event/meta/OB11LifeCycleEvent.d.ts +11 -0
  147. package/lib/types/protocol/event/notice/OB11BaseNoticeEvent.d.ts +4 -0
  148. package/lib/types/protocol/event/notice/OB11FlashFileEvent.d.ts +36 -0
  149. package/lib/types/protocol/event/notice/OB11FriendAddNoticeEvent.d.ts +6 -0
  150. package/lib/types/protocol/event/notice/OB11FriendRecallNoticeEvent.d.ts +7 -0
  151. package/lib/types/protocol/event/notice/OB11GroupAdminNoticeEvent.d.ts +8 -0
  152. package/lib/types/protocol/event/notice/OB11GroupBanEvent.d.ts +10 -0
  153. package/lib/types/protocol/event/notice/OB11GroupCardEvent.d.ts +9 -0
  154. package/lib/types/protocol/event/notice/OB11GroupDecreaseEvent.d.ts +10 -0
  155. package/lib/types/protocol/event/notice/OB11GroupDismissEvent.d.ts +7 -0
  156. package/lib/types/protocol/event/notice/OB11GroupEssenceEvent.d.ts +11 -0
  157. package/lib/types/protocol/event/notice/OB11GroupIncreaseEvent.d.ts +11 -0
  158. package/lib/types/protocol/event/notice/OB11GroupNoticeEvent.d.ts +6 -0
  159. package/lib/types/protocol/event/notice/OB11GroupRecallNoticeEvent.d.ts +9 -0
  160. package/lib/types/protocol/event/notice/OB11GroupTitleEvent.d.ts +9 -0
  161. package/lib/types/protocol/event/notice/OB11GroupUploadNoticeEvent.d.ts +14 -0
  162. package/lib/types/protocol/event/notice/OB11MsgEmojiLikeEvent.d.ts +15 -0
  163. package/lib/types/protocol/event/notice/OB11PokeEvent.d.ts +25 -0
  164. package/lib/types/protocol/event/notice/OB11ProfileLikeEvent.d.ts +9 -0
  165. package/lib/types/protocol/event/request/OB11FriendRequest.d.ts +11 -0
  166. package/lib/types/protocol/event/request/OB11GroupRequest.d.ts +25 -0
  167. package/lib/types/protocol/host.d.ts +8 -0
  168. package/lib/types/protocol/index.d.ts +14 -0
  169. package/lib/types/protocol/support/utils.d.ts +28 -0
  170. package/lib/types/protocol/transform/message/incoming.d.ts +7 -0
  171. package/lib/types/protocol/transform/message/index.d.ts +1 -0
  172. package/lib/types/protocol/transform/message/outgoing.d.ts +8 -0
  173. package/lib/types/protocol/types.d.ts +389 -0
  174. package/lib/types/protocol/utils.d.ts +21 -0
  175. package/lib/types/settings.d.ts +5 -0
  176. package/lib/types/support.d.ts +3 -0
  177. package/package.json +89 -16
@@ -0,0 +1,32 @@
1
+ import { OB11Group } from '../../types';
2
+ import { BaseAction, Schema } from '../BaseAction';
3
+ import { ActionName } from '../types';
4
+ interface Payload {
5
+ group_id: number | string;
6
+ no_cache: boolean;
7
+ }
8
+ declare class GetGroupInfo extends BaseAction<Payload, OB11Group> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ group_id: Schema<string | number, string | number>;
12
+ no_cache: Schema<string | boolean, boolean>;
13
+ }>, Schemastery.ObjectT<{
14
+ group_id: Schema<string | number, string | number>;
15
+ no_cache: Schema<string | boolean, boolean>;
16
+ }>>;
17
+ protected _handle(payload: Payload): Promise<{
18
+ group_id: number;
19
+ group_name: string;
20
+ group_memo: string;
21
+ group_create_time: number;
22
+ member_count: number;
23
+ max_member_count: number;
24
+ remark_name: string;
25
+ avatar_url: string;
26
+ owner_id: number;
27
+ is_top: boolean;
28
+ shut_up_all_timestamp: number;
29
+ shut_up_me_timestamp: number;
30
+ }>;
31
+ }
32
+ export default GetGroupInfo;
@@ -0,0 +1,29 @@
1
+ import { OB11Group } from '../../types';
2
+ import { BaseAction, Schema } from '../BaseAction';
3
+ import { ActionName } from '../types';
4
+ interface Payload {
5
+ no_cache: boolean;
6
+ }
7
+ declare class GetGroupList extends BaseAction<Payload, OB11Group[]> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ no_cache: Schema<string | boolean, boolean>;
11
+ }>, Schemastery.ObjectT<{
12
+ no_cache: Schema<string | boolean, boolean>;
13
+ }>>;
14
+ protected _handle(payload: Payload): Promise<{
15
+ group_id: number;
16
+ group_name: string;
17
+ group_memo: string;
18
+ group_create_time: number;
19
+ member_count: number;
20
+ max_member_count: number;
21
+ remark_name: string;
22
+ avatar_url: string;
23
+ owner_id: number;
24
+ is_top: boolean;
25
+ shut_up_all_timestamp: number;
26
+ shut_up_me_timestamp: number;
27
+ }[]>;
28
+ }
29
+ export default GetGroupList;
@@ -0,0 +1,22 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { OB11GroupMember } from '../../types';
3
+ import { ActionName } from '../types';
4
+ interface Payload {
5
+ group_id: number | string;
6
+ user_id: number | string;
7
+ no_cache: boolean;
8
+ }
9
+ declare class GetGroupMemberInfo extends BaseAction<Payload, OB11GroupMember> {
10
+ actionName: ActionName;
11
+ payloadSchema: Schema<Schemastery.ObjectS<{
12
+ group_id: Schema<string | number, string | number>;
13
+ user_id: Schema<string | number, string | number>;
14
+ no_cache: Schema<string | boolean, boolean>;
15
+ }>, Schemastery.ObjectT<{
16
+ group_id: Schema<string | number, string | number>;
17
+ user_id: Schema<string | number, string | number>;
18
+ no_cache: Schema<string | boolean, boolean>;
19
+ }>>;
20
+ protected _handle(payload: Payload): Promise<OB11GroupMember>;
21
+ }
22
+ export default GetGroupMemberInfo;
@@ -0,0 +1,19 @@
1
+ import { OB11GroupMember } from '../../types';
2
+ import { BaseAction, Schema } from '../BaseAction';
3
+ import { ActionName } from '../types';
4
+ interface Payload {
5
+ group_id: number | string;
6
+ no_cache: boolean;
7
+ }
8
+ declare class GetGroupMemberList extends BaseAction<Payload, OB11GroupMember[]> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ group_id: Schema<string | number, string | number>;
12
+ no_cache: Schema<string | boolean, boolean>;
13
+ }>, Schemastery.ObjectT<{
14
+ group_id: Schema<string | number, string | number>;
15
+ no_cache: Schema<string | boolean, boolean>;
16
+ }>>;
17
+ protected _handle(payload: Payload): Promise<OB11GroupMember[]>;
18
+ }
19
+ export default GetGroupMemberList;
@@ -0,0 +1,6 @@
1
+ import { BaseAction } from '../BaseAction';
2
+ import { ActionName } from '../types';
3
+ export default class GetGuildList extends BaseAction<{}, null> {
4
+ actionName: ActionName;
5
+ protected _handle(): Promise<null>;
6
+ }
@@ -0,0 +1,10 @@
1
+ import SendMsg from '../msg/SendMsg';
2
+ import { ActionName } from '../types';
3
+ import { OB11PostSendMsg } from '../../types';
4
+ declare class SendGroupMsg extends SendMsg {
5
+ actionName: ActionName;
6
+ protected _handle(payload: OB11PostSendMsg): Promise<{
7
+ message_id: number;
8
+ }>;
9
+ }
10
+ export default SendGroupMsg;
@@ -0,0 +1,21 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { ActionName } from '../types';
3
+ interface Payload {
4
+ flag: string;
5
+ approve: boolean;
6
+ reason?: string;
7
+ }
8
+ export default class SetGroupAddRequest extends BaseAction<Payload, null> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ flag: Schema<string, string>;
12
+ approve: Schema<string | boolean, boolean>;
13
+ reason: Schema<string, string>;
14
+ }>, Schemastery.ObjectT<{
15
+ flag: Schema<string, string>;
16
+ approve: Schema<string | boolean, boolean>;
17
+ reason: Schema<string, string>;
18
+ }>>;
19
+ protected _handle(payload: Payload): Promise<null>;
20
+ }
21
+ export {};
@@ -0,0 +1,21 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { ActionName } from '../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ user_id: number | string;
6
+ enable: boolean;
7
+ }
8
+ export default class SetGroupAdmin extends BaseAction<Payload, null> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ group_id: Schema<string | number, string | number>;
12
+ user_id: Schema<string | number, string | number>;
13
+ enable: Schema<string | boolean, boolean>;
14
+ }>, Schemastery.ObjectT<{
15
+ group_id: Schema<string | number, string | number>;
16
+ user_id: Schema<string | number, string | number>;
17
+ enable: Schema<string | boolean, boolean>;
18
+ }>>;
19
+ protected _handle(payload: Payload): Promise<null>;
20
+ }
21
+ export {};
@@ -0,0 +1,21 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { ActionName } from '../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ user_id: number | string;
6
+ duration: number | string;
7
+ }
8
+ export default class SetGroupBan extends BaseAction<Payload, null> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ group_id: Schema<string | number, string | number>;
12
+ user_id: Schema<string | number, string | number>;
13
+ duration: Schema<string | number, string | number>;
14
+ }>, Schemastery.ObjectT<{
15
+ group_id: Schema<string | number, string | number>;
16
+ user_id: Schema<string | number, string | number>;
17
+ duration: Schema<string | number, string | number>;
18
+ }>>;
19
+ protected _handle(payload: Payload): Promise<null>;
20
+ }
21
+ export {};
@@ -0,0 +1,21 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { ActionName } from '../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ user_id: number | string;
6
+ card: string;
7
+ }
8
+ export default class SetGroupCard extends BaseAction<Payload, null> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ group_id: Schema<string | number, string | number>;
12
+ user_id: Schema<string | number, string | number>;
13
+ card: Schema<string, string>;
14
+ }>, Schemastery.ObjectT<{
15
+ group_id: Schema<string | number, string | number>;
16
+ user_id: Schema<string | number, string | number>;
17
+ card: Schema<string, string>;
18
+ }>>;
19
+ protected _handle(payload: Payload): Promise<null>;
20
+ }
21
+ export {};
@@ -0,0 +1,21 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { ActionName } from '../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ user_id: number | string;
6
+ reject_add_request: boolean;
7
+ }
8
+ export default class SetGroupKick extends BaseAction<Payload, null> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ group_id: Schema<string | number, string | number>;
12
+ user_id: Schema<string | number, string | number>;
13
+ reject_add_request: Schema<string | boolean, boolean>;
14
+ }>, Schemastery.ObjectT<{
15
+ group_id: Schema<string | number, string | number>;
16
+ user_id: Schema<string | number, string | number>;
17
+ reject_add_request: Schema<string | boolean, boolean>;
18
+ }>>;
19
+ protected _handle(payload: Payload): Promise<null>;
20
+ }
21
+ export {};
@@ -0,0 +1,16 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { ActionName } from '../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ is_dismiss?: boolean;
6
+ }
7
+ export default class SetGroupLeave extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ group_id: Schema<string | number, string | number>;
11
+ }>, Schemastery.ObjectT<{
12
+ group_id: Schema<string | number, string | number>;
13
+ }>>;
14
+ protected _handle(payload: Payload): Promise<null>;
15
+ }
16
+ export {};
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { ActionName } from '../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ group_name: string;
6
+ }
7
+ export default class SetGroupName extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ group_id: Schema<string | number, string | number>;
11
+ group_name: Schema<string, string>;
12
+ }>, Schemastery.ObjectT<{
13
+ group_id: Schema<string | number, string | number>;
14
+ group_name: Schema<string, string>;
15
+ }>>;
16
+ protected _handle(payload: Payload): Promise<null>;
17
+ }
18
+ export {};
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { ActionName } from '../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ enable: boolean;
6
+ }
7
+ export default class SetGroupWholeBan extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ group_id: Schema<string | number, string | number>;
11
+ enable: Schema<string | boolean, boolean>;
12
+ }>, Schemastery.ObjectT<{
13
+ group_id: Schema<string | number, string | number>;
14
+ enable: Schema<string | boolean, boolean>;
15
+ }>>;
16
+ protected _handle(payload: Payload): Promise<null>;
17
+ }
18
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ActionHost } from './BaseAction';
2
+ import { BaseAction } from './BaseAction';
3
+ export declare function initActionMap(adapter: ActionHost): Map<string, BaseAction<any, unknown>>;
@@ -0,0 +1,6 @@
1
+ import { ActionName } from '../../types';
2
+ import { GetFlashFileInfoBase, GetFlashFilePayload } from './GetFlashFileInfo';
3
+ export declare class DownloadFlashFile extends GetFlashFileInfoBase<null> {
4
+ actionName: ActionName;
5
+ _handle(payload: GetFlashFilePayload): Promise<null>;
6
+ }
@@ -0,0 +1,26 @@
1
+ import { GetFlashFileInfoBase, GetFlashFilePayload } from './GetFlashFileInfo';
2
+ import { ActionName } from '../../types';
3
+ interface FileUrl {
4
+ name: string;
5
+ size: number;
6
+ url: string;
7
+ expire: number;
8
+ }
9
+ interface Response {
10
+ file_set_id: string;
11
+ share_link: string;
12
+ files: FileUrl[];
13
+ }
14
+ /**
15
+ * 列表请求要 field3=2 (Windows QQ 的发法), server 才返回 historyToken, 即 0x12a9_200 认的 fileId;
16
+ * Linux QQ 默认的 1 拿不到。Payload: { share_link } 或 { file_set_id }
17
+ */
18
+ export declare class GetFlashFileDownloadUrls extends GetFlashFileInfoBase<Response> {
19
+ actionName: ActionName;
20
+ _handle(payload: GetFlashFilePayload): Promise<{
21
+ file_set_id: string;
22
+ share_link: string;
23
+ files: FileUrl[];
24
+ }>;
25
+ }
26
+ export {};
@@ -0,0 +1,41 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ export interface GetFlashFilePayload {
4
+ share_link?: string;
5
+ file_set_id?: string;
6
+ }
7
+ interface Response {
8
+ file_set_id: string;
9
+ title: string;
10
+ share_link: string;
11
+ total_file_size: number;
12
+ files: Array<{
13
+ name: string;
14
+ size: number;
15
+ }>;
16
+ }
17
+ export declare abstract class GetFlashFileInfoBase<R> extends BaseAction<GetFlashFilePayload, R> {
18
+ actionName: ActionName;
19
+ payloadSchema: Schema<Schemastery.ObjectS<{
20
+ share_link: Schema<string, string>;
21
+ file_set_id: Schema<string, string>;
22
+ }>, Schemastery.ObjectT<{
23
+ share_link: Schema<string, string>;
24
+ file_set_id: Schema<string, string>;
25
+ }>>;
26
+ protected get_file_set_id(payload: GetFlashFilePayload): Promise<string>;
27
+ }
28
+ export declare class GetFlashFileInfo extends GetFlashFileInfoBase<Response> {
29
+ actionName: ActionName;
30
+ _handle(payload: GetFlashFilePayload): Promise<{
31
+ file_set_id: string;
32
+ title: string;
33
+ share_link: string;
34
+ total_file_size: number;
35
+ files: {
36
+ name: string;
37
+ size: number;
38
+ }[];
39
+ }>;
40
+ }
41
+ export {};
@@ -0,0 +1,19 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ export interface Payload {
4
+ file_id: string;
5
+ }
6
+ export interface Response {
7
+ url: string;
8
+ }
9
+ export declare class GetPrivateFileUrl extends BaseAction<Payload, Response> {
10
+ actionName: ActionName;
11
+ payloadSchema: Schema<Schemastery.ObjectS<{
12
+ file_id: Schema<string, string>;
13
+ }>, Schemastery.ObjectT<{
14
+ file_id: Schema<string, string>;
15
+ }>>;
16
+ protected _handle(payload: Payload): Promise<{
17
+ url: string;
18
+ }>;
19
+ }
@@ -0,0 +1,18 @@
1
+ import { BaseAction } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Response {
4
+ private_key: string;
5
+ group_key: string;
6
+ expired_time: number;
7
+ updated_time: string;
8
+ }
9
+ export declare class GetRKey extends BaseAction<{}, Response> {
10
+ actionName: ActionName;
11
+ _handle(): Promise<{
12
+ private_key: string;
13
+ group_key: string;
14
+ expired_time: number;
15
+ updated_time: string;
16
+ }>;
17
+ }
18
+ export {};
@@ -0,0 +1,24 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ file_id: string;
6
+ parent_directory: string;
7
+ target_directory: string;
8
+ }
9
+ export declare class MoveGroupFile extends BaseAction<Payload, null> {
10
+ actionName: ActionName;
11
+ payloadSchema: Schema<Schemastery.ObjectS<{
12
+ group_id: Schema<string | number, string | number>;
13
+ file_id: Schema<string, string>;
14
+ parent_directory: Schema<string, string>;
15
+ target_directory: Schema<string, string>;
16
+ }>, Schemastery.ObjectT<{
17
+ group_id: Schema<string | number, string | number>;
18
+ file_id: Schema<string, string>;
19
+ parent_directory: Schema<string, string>;
20
+ target_directory: Schema<string, string>;
21
+ }>>;
22
+ _handle(payload: Payload): Promise<null>;
23
+ }
24
+ export {};
@@ -0,0 +1,17 @@
1
+ import { GetFlashFileInfoBase, GetFlashFilePayload } from './GetFlashFileInfo';
2
+ import { ActionName } from '../../types';
3
+ interface Response {
4
+ file_set_id: string;
5
+ share_link: string;
6
+ expire_time: number;
7
+ }
8
+ /** 靠秒传完成, 不需要本地有原文件; 老 fileSet 必须还没过期。Payload: { share_link } 或 { file_set_id } */
9
+ export declare class ReShareFlashFile extends GetFlashFileInfoBase<Response> {
10
+ actionName: ActionName;
11
+ _handle(payload: GetFlashFilePayload): Promise<{
12
+ file_set_id: any;
13
+ share_link: any;
14
+ expire_time: number;
15
+ }>;
16
+ }
17
+ export {};
@@ -0,0 +1,24 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ file_id: string;
6
+ current_parent_directory: string;
7
+ new_name: string;
8
+ }
9
+ export declare class RenameGroupFile extends BaseAction<Payload, null> {
10
+ actionName: ActionName;
11
+ payloadSchema: Schema<Schemastery.ObjectS<{
12
+ group_id: Schema<string | number, string | number>;
13
+ file_id: Schema<string, string>;
14
+ current_parent_directory: Schema<string, string>;
15
+ new_name: Schema<string, string>;
16
+ }>, Schemastery.ObjectT<{
17
+ group_id: Schema<string | number, string | number>;
18
+ file_id: Schema<string, string>;
19
+ current_parent_directory: Schema<string, string>;
20
+ new_name: Schema<string, string>;
21
+ }>>;
22
+ _handle(payload: Payload): Promise<null>;
23
+ }
24
+ export {};
@@ -0,0 +1,21 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ folder_id: string;
6
+ new_folder_name: string;
7
+ }
8
+ export declare class RenameGroupFileFolder extends BaseAction<Payload, null> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ group_id: Schema<string | number, string | number>;
12
+ folder_id: Schema<string, string>;
13
+ new_folder_name: Schema<string, string>;
14
+ }>, Schemastery.ObjectT<{
15
+ group_id: Schema<string | number, string | number>;
16
+ folder_id: Schema<string, string>;
17
+ new_folder_name: Schema<string, string>;
18
+ }>>;
19
+ _handle(payload: Payload): Promise<null>;
20
+ }
21
+ export {};
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ file_id: string;
6
+ }
7
+ export declare class SetGroupFileForever extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ group_id: Schema<string | number, string | number>;
11
+ file_id: Schema<string, string>;
12
+ }>, Schemastery.ObjectT<{
13
+ group_id: Schema<string | number, string | number>;
14
+ file_id: Schema<string, string>;
15
+ }>>;
16
+ _handle(payload: Payload): Promise<null>;
17
+ }
18
+ export {};
@@ -0,0 +1,41 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ title: string;
5
+ paths: string[];
6
+ }
7
+ interface FileDownload {
8
+ name: string;
9
+ size: number;
10
+ url: string;
11
+ expire: number;
12
+ }
13
+ interface Response {
14
+ file_set_id: string;
15
+ share_link: string;
16
+ expire_time: number;
17
+ /** 上传时顺带拿到的签名 URL, 约 1 小时过期, 过期后没法重建 */
18
+ downloads?: FileDownload[];
19
+ }
20
+ export declare class UploadFlashFile extends BaseAction<Payload, Response> {
21
+ actionName: ActionName;
22
+ payloadSchema: Schema<Schemastery.ObjectS<{
23
+ title: Schema<string, string>;
24
+ paths: Schema<string[], string[]>;
25
+ }>, Schemastery.ObjectT<{
26
+ title: Schema<string, string>;
27
+ paths: Schema<string[], string[]>;
28
+ }>>;
29
+ _handle(payload: Payload): Promise<{
30
+ file_set_id: string;
31
+ share_link: string;
32
+ expire_time: number;
33
+ downloads?: undefined;
34
+ } | {
35
+ file_set_id: any;
36
+ share_link: any;
37
+ expire_time: number;
38
+ downloads: any;
39
+ }>;
40
+ }
41
+ export {};
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ user_ids: Array<number | string>;
6
+ }
7
+ export declare class BatchDeleteGroupMember extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ group_id: Schema<string | number, string | number>;
11
+ user_ids: Schema<(string | number)[], (string | number)[]>;
12
+ }>, Schemastery.ObjectT<{
13
+ group_id: Schema<string | number, string | number>;
14
+ user_ids: Schema<(string | number)[], (string | number)[]>;
15
+ }>>;
16
+ protected _handle(payload: Payload): Promise<null>;
17
+ }
18
+ export {};
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ notice_id: string;
6
+ }
7
+ export declare class DeleteGroupNotice extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ group_id: Schema<string | number, string | number>;
11
+ notice_id: Schema<string, string>;
12
+ }>, Schemastery.ObjectT<{
13
+ group_id: Schema<string | number, string | number>;
14
+ notice_id: Schema<string, string>;
15
+ }>>;
16
+ protected _handle(payload: Payload): Promise<null>;
17
+ }
18
+ export {};
@@ -0,0 +1,12 @@
1
+ import { BaseAction } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface OB11GroupRequestNotify {
4
+ group_id: number;
5
+ user_id: number;
6
+ flag: string;
7
+ }
8
+ export default class GetGroupAddRequest extends BaseAction<{}, OB11GroupRequestNotify[]> {
9
+ actionName: ActionName;
10
+ protected _handle(): Promise<OB11GroupRequestNotify[]>;
11
+ }
12
+ export {};
@@ -0,0 +1,30 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ notice_id: string;
6
+ list_type: 'ack' | 'unack';
7
+ }
8
+ interface User {
9
+ user_id: number;
10
+ avatar: string;
11
+ display_name: string;
12
+ }
13
+ export declare class GetGroupNoticeAcklist extends BaseAction<Payload, User[]> {
14
+ actionName: ActionName;
15
+ payloadSchema: Schema<Schemastery.ObjectS<{
16
+ group_id: Schema<string | number, string | number>;
17
+ notice_id: Schema<string, string>;
18
+ list_type: Schema<"ack" | "unack", "ack" | "unack">;
19
+ }>, Schemastery.ObjectT<{
20
+ group_id: Schema<string | number, string | number>;
21
+ notice_id: Schema<string, string>;
22
+ list_type: Schema<"ack" | "unack", "ack" | "unack">;
23
+ }>>;
24
+ protected _handle(payload: Payload): Promise<{
25
+ user_id: number;
26
+ avatar: string;
27
+ display_name: string;
28
+ }[]>;
29
+ }
30
+ export {};