@luckylillia-dev/plugin-onebot11 1.0.4 → 1.1.0

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-DYMW7N7M.js +24193 -0
  4. package/lib/chunk-DYMW7N7M.js.map +7 -0
  5. package/lib/index.js +411 -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,31 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ message_id: number | string;
5
+ group_id?: number | string;
6
+ user_id?: number | string;
7
+ }
8
+ interface Response {
9
+ message_id: number;
10
+ }
11
+ declare abstract class ForwardSingleMsg extends BaseAction<Payload, Response> {
12
+ payloadSchema: Schema<Schemastery.ObjectS<{
13
+ message_id: Schema<string | number, string | number>;
14
+ group_id: Schema<string | number, string | number>;
15
+ user_id: Schema<string | number, string | number>;
16
+ }>, Schemastery.ObjectT<{
17
+ message_id: Schema<string | number, string | number>;
18
+ group_id: Schema<string | number, string | number>;
19
+ user_id: Schema<string | number, string | number>;
20
+ }>>;
21
+ protected _handle(payload: Payload): Promise<{
22
+ message_id: number;
23
+ }>;
24
+ }
25
+ export declare class ForwardFriendSingleMsg extends ForwardSingleMsg {
26
+ actionName: ActionName;
27
+ }
28
+ export declare class ForwardGroupSingleMsg extends ForwardSingleMsg {
29
+ actionName: ActionName;
30
+ }
31
+ export {};
@@ -0,0 +1,26 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ group_id: number | string;
5
+ chat_type: number | string;
6
+ }
7
+ type Response = {
8
+ type: string;
9
+ characters: {
10
+ character_id: string;
11
+ character_name: string;
12
+ preview_url: string;
13
+ }[];
14
+ }[];
15
+ export declare class GetAiCharacters extends BaseAction<Payload, Response> {
16
+ actionName: ActionName;
17
+ payloadSchema: Schema<Schemastery.ObjectS<{
18
+ group_id: Schema<string | number, string | number>;
19
+ chat_type: Schema<string | number, string | number>;
20
+ }>, Schemastery.ObjectT<{
21
+ group_id: Schema<string | number, string | number>;
22
+ chat_type: Schema<string | number, string | number>;
23
+ }>>;
24
+ _handle(payload: Payload): Promise<Response>;
25
+ }
26
+ export {};
@@ -0,0 +1,30 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { OB11Message } from '../../../types';
3
+ import { ActionName } from '../../types';
4
+ import { ParseMessageConfig } from '../../../types';
5
+ interface Payload {
6
+ user_id: number | string;
7
+ message_seq?: number | string;
8
+ count: number | string;
9
+ reverseOrder: boolean;
10
+ }
11
+ interface Response {
12
+ messages: OB11Message[];
13
+ }
14
+ export declare class GetFriendMsgHistory extends BaseAction<Payload, Response> {
15
+ actionName: ActionName;
16
+ payloadSchema: Schema<Schemastery.ObjectS<{
17
+ user_id: Schema<string | number, string | number>;
18
+ message_seq: Schema<string | number, string | number>;
19
+ count: Schema<string | number, string | number>;
20
+ reverseOrder: Schema<string | boolean, boolean>;
21
+ }>, Schemastery.ObjectT<{
22
+ user_id: Schema<string | number, string | number>;
23
+ message_seq: Schema<string | number, string | number>;
24
+ count: Schema<string | number, string | number>;
25
+ reverseOrder: Schema<string | boolean, boolean>;
26
+ }>>;
27
+ private fetchRangeRaw;
28
+ protected _handle(payload: Payload, config: ParseMessageConfig): Promise<Response>;
29
+ }
30
+ export {};
@@ -0,0 +1,20 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ word: string;
5
+ }
6
+ interface Response {
7
+ url: string[];
8
+ }
9
+ export declare class GetRecommendFace extends BaseAction<Payload, Response> {
10
+ actionName: ActionName;
11
+ payloadSchema: Schema<Schemastery.ObjectS<{
12
+ word: Schema<string, string>;
13
+ }>, Schemastery.ObjectT<{
14
+ word: Schema<string, string>;
15
+ }>>;
16
+ _handle(payload: Payload): Promise<{
17
+ url: string[];
18
+ }>;
19
+ }
20
+ export {};
@@ -0,0 +1,27 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ character: string;
5
+ group_id: number | string;
6
+ text: string;
7
+ chat_type: number | string;
8
+ }
9
+ interface Response {
10
+ message_id: number;
11
+ }
12
+ export declare class SendGroupAiRecord extends BaseAction<Payload, Response> {
13
+ actionName: ActionName;
14
+ payloadSchema: Schema<Schemastery.ObjectS<{
15
+ character: Schema<string, string>;
16
+ group_id: Schema<string | number, string | number>;
17
+ text: Schema<string, string>;
18
+ chat_type: Schema<string | number, string | number>;
19
+ }>, Schemastery.ObjectT<{
20
+ character: Schema<string, string>;
21
+ group_id: Schema<string | number, string | number>;
22
+ text: Schema<string, string>;
23
+ chat_type: Schema<string | number, string | number>;
24
+ }>>;
25
+ _handle(payload: Payload): Promise<Response>;
26
+ }
27
+ 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
+ target_id?: number | string;
7
+ }
8
+ export declare class SendPoke 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
+ target_id: 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
+ target_id: Schema<string | number, string | number>;
18
+ }>>;
19
+ _handle(payload: Payload): Promise<null>;
20
+ }
21
+ export {};
@@ -0,0 +1,26 @@
1
+ import { ActionName } from '../../types';
2
+ import { BaseAction, Schema } from '../../BaseAction';
3
+ interface Payload {
4
+ message_id: number | string;
5
+ emoji_id: number | string;
6
+ set: boolean;
7
+ }
8
+ export declare class SetMsgEmojiLike extends BaseAction<Payload, null> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ message_id: Schema<string | number, string | number>;
12
+ emoji_id: Schema<string | number, string | number>;
13
+ set: Schema<string | boolean, boolean>;
14
+ }>, Schemastery.ObjectT<{
15
+ message_id: Schema<string | number, string | number>;
16
+ emoji_id: Schema<string | number, string | number>;
17
+ set: Schema<string | boolean, boolean>;
18
+ }>>;
19
+ set?: boolean;
20
+ protected _handle(payload: Payload): Promise<null>;
21
+ }
22
+ export declare class UnSetMsgEmojiLike extends SetMsgEmojiLike {
23
+ actionName: ActionName;
24
+ set: boolean;
25
+ }
26
+ export {};
@@ -0,0 +1,17 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ export interface Payload {
4
+ message_id: string | number;
5
+ }
6
+ export interface Response {
7
+ text: string;
8
+ }
9
+ export declare class VoiceMsg2Text extends BaseAction<Payload, Response> {
10
+ actionName: ActionName;
11
+ payloadSchema: Schema<Schemastery.ObjectS<{
12
+ message_id: Schema<string | number, string | number>;
13
+ }>, Schemastery.ObjectT<{
14
+ message_id: Schema<string | number, string | number>;
15
+ }>>;
16
+ protected _handle(payload: Payload): Promise<Response>;
17
+ }
@@ -0,0 +1,32 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { LegacyConfig } from '@luckylillia-dev/plugin-nt-protocol/contracts';
3
+ import { ActionName } from '../../types';
4
+ export declare class GetConfigAction extends BaseAction<{}, LegacyConfig> {
5
+ actionName: ActionName;
6
+ protected _handle(): Promise<LegacyConfig>;
7
+ }
8
+ export declare class SetConfigAction extends BaseAction<LegacyConfig, null> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ milky: Schema<any, any>;
12
+ satori: Schema<any, any>;
13
+ ob11: Schema<any, any>;
14
+ webui: Schema<any, any>;
15
+ log: Schema<boolean, boolean>;
16
+ ffmpeg: Schema<string, string>;
17
+ musicCardSignUrl: Schema<string, string>;
18
+ musicSignUrl: Schema<string, string>;
19
+ msgCacheExpire: Schema<number, number>;
20
+ }>, Schemastery.ObjectT<{
21
+ milky: Schema<any, any>;
22
+ satori: Schema<any, any>;
23
+ ob11: Schema<any, any>;
24
+ webui: Schema<any, any>;
25
+ log: Schema<boolean, boolean>;
26
+ ffmpeg: Schema<string, string>;
27
+ musicCardSignUrl: Schema<string, string>;
28
+ musicSignUrl: Schema<string, string>;
29
+ msgCacheExpire: Schema<number, number>;
30
+ }>>;
31
+ protected _handle(payload: LegacyConfig): Promise<null>;
32
+ }
@@ -0,0 +1,21 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ apiClass: string;
5
+ method: string;
6
+ args: unknown[];
7
+ }
8
+ export default class Debug extends BaseAction<Payload, unknown> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ apiClass: Schema<string, string>;
12
+ method: Schema<string, string>;
13
+ args: Schema<any[], any[]>;
14
+ }>, Schemastery.ObjectT<{
15
+ apiClass: Schema<string, string>;
16
+ method: Schema<string, string>;
17
+ args: Schema<any[], any[]>;
18
+ }>>;
19
+ protected _handle(payload: Payload): Promise<any>;
20
+ }
21
+ export {};
@@ -0,0 +1,10 @@
1
+ import { BaseAction } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ import { Dict } from 'cosmokit';
4
+ export declare class GetRobotUinRange extends BaseAction<{}, Dict[]> {
5
+ actionName: ActionName;
6
+ _handle(): Promise<{
7
+ minUin: string;
8
+ maxUin: string;
9
+ }[]>;
10
+ }
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ file: string;
5
+ }
6
+ interface ScanResultItem {
7
+ text: string;
8
+ }
9
+ export declare class ScanQRCode extends BaseAction<Payload, ScanResultItem[]> {
10
+ actionName: ActionName;
11
+ payloadSchema: Schema<Schemastery.ObjectS<{
12
+ file: Schema<string, string>;
13
+ }>, Schemastery.ObjectT<{
14
+ file: Schema<string, string>;
15
+ }>>;
16
+ _handle(payload: Payload): Promise<ScanResultItem[]>;
17
+ }
18
+ export {};
@@ -0,0 +1,27 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ cmd: string;
5
+ hex: string;
6
+ }
7
+ interface PBData {
8
+ cmd: string;
9
+ hex: string;
10
+ echo?: string;
11
+ }
12
+ export declare class SendPB extends BaseAction<Payload, PBData> {
13
+ actionName: ActionName;
14
+ payloadSchema: Schema<Schemastery.ObjectS<{
15
+ cmd: Schema<string, string>;
16
+ hex: Schema<string, string>;
17
+ }>, Schemastery.ObjectT<{
18
+ cmd: Schema<string, string>;
19
+ hex: Schema<string, string>;
20
+ }>>;
21
+ _handle(payload: Payload): Promise<{
22
+ echo?: string | undefined;
23
+ cmd: string;
24
+ hex: string;
25
+ }>;
26
+ }
27
+ export {};
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ user_id: number | string;
5
+ target_id?: number | string;
6
+ }
7
+ export declare class FriendPoke extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ user_id: Schema<string | number, string | number>;
11
+ target_id: Schema<string | number, string | number>;
12
+ }>, Schemastery.ObjectT<{
13
+ user_id: Schema<string | number, string | number>;
14
+ target_id: Schema<string | number, string | number>;
15
+ }>>;
16
+ _handle(payload: Payload): Promise<null>;
17
+ }
18
+ export {};
@@ -0,0 +1,36 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ count: number | string;
5
+ }
6
+ interface Item {
7
+ flag: string;
8
+ uin: string;
9
+ nick: string;
10
+ source: string;
11
+ reason: string;
12
+ msg: string;
13
+ group_code: string;
14
+ time: string;
15
+ type: string;
16
+ }
17
+ export declare class GetDoubtFriendsAddRequest extends BaseAction<Payload, Item[]> {
18
+ actionName: ActionName;
19
+ payloadSchema: Schema<Schemastery.ObjectS<{
20
+ count: Schema<string | number, string | number>;
21
+ }>, Schemastery.ObjectT<{
22
+ count: Schema<string | number, string | number>;
23
+ }>>;
24
+ _handle(payload: Payload): Promise<{
25
+ flag: string;
26
+ uin: string;
27
+ nick: string;
28
+ source: string;
29
+ reason: string;
30
+ msg: string;
31
+ group_code: string;
32
+ time: string;
33
+ type: string;
34
+ }[]>;
35
+ }
36
+ export {};
@@ -0,0 +1,23 @@
1
+ import { BaseAction } from '../../BaseAction';
2
+ import { OB11User } from '../../../types';
3
+ import { ActionName } from '../../types';
4
+ interface Category {
5
+ categoryId: number;
6
+ categorySortId: number;
7
+ categoryName: string;
8
+ categoryMbCount: number;
9
+ onlineCount: number;
10
+ buddyList: OB11User[];
11
+ }
12
+ export declare class GetFriendWithCategory extends BaseAction<{}, Category[]> {
13
+ actionName: ActionName;
14
+ protected _handle(): Promise<{
15
+ categoryId: number;
16
+ categorySortId: number;
17
+ categoryName: string;
18
+ categoryMbCount: number;
19
+ onlineCount: number;
20
+ buddyList: OB11User[];
21
+ }[]>;
22
+ }
23
+ export {};
@@ -0,0 +1,41 @@
1
+ import { BaseAction } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ import { Dict } from 'cosmokit';
4
+ import { Schema } from '../../BaseAction';
5
+ interface Payload {
6
+ start: number | string;
7
+ count: number | string;
8
+ }
9
+ interface Response {
10
+ users: Dict[];
11
+ nextStart: number;
12
+ }
13
+ export declare class GetProfileLike extends BaseAction<Payload, Response> {
14
+ actionName: ActionName;
15
+ payloadSchema: Schema<Schemastery.ObjectS<{
16
+ start: Schema<string | number, string | number>;
17
+ count: Schema<string | number, string | number>;
18
+ }>, Schemastery.ObjectT<{
19
+ start: Schema<string | number, string | number>;
20
+ count: Schema<string | number, string | number>;
21
+ }>>;
22
+ _handle(payload: Payload): Promise<{
23
+ users: {
24
+ uid: string;
25
+ src: number;
26
+ latestTime: number;
27
+ count: number;
28
+ giftCount: number;
29
+ customId: number;
30
+ lastCharged: number;
31
+ bTodayVotedCnt: number;
32
+ nick: string;
33
+ gender: number;
34
+ age: number;
35
+ isvip: boolean;
36
+ isSvip: boolean;
37
+ }[];
38
+ nextStart: number;
39
+ }>;
40
+ }
41
+ export {};
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ user_id: number | string;
5
+ }
6
+ interface Response {
7
+ count: number;
8
+ }
9
+ export declare class GetProfileLikeCount extends BaseAction<Payload, Response> {
10
+ actionName: ActionName;
11
+ payloadSchema: Schema<Schemastery.ObjectS<{
12
+ user_id: Schema<string | number, string | number>;
13
+ }>, Schemastery.ObjectT<{
14
+ user_id: Schema<string | number, string | number>;
15
+ }>>;
16
+ _handle(payload: Payload): Promise<Response>;
17
+ }
18
+ export {};
@@ -0,0 +1,23 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ import { Dict } from 'cosmokit';
4
+ interface Payload {
5
+ start: number | string;
6
+ count: number | string;
7
+ }
8
+ interface Response {
9
+ users: Dict[];
10
+ nextStart: number;
11
+ }
12
+ export declare class GetProfileLikeMe extends BaseAction<Payload, Response> {
13
+ actionName: ActionName;
14
+ payloadSchema: Schema<Schemastery.ObjectS<{
15
+ start: Schema<string | number, string | number>;
16
+ count: Schema<string | number, string | number>;
17
+ }>, Schemastery.ObjectT<{
18
+ start: Schema<string | number, string | number>;
19
+ count: Schema<string | number, string | number>;
20
+ }>>;
21
+ _handle(payload: Payload): Promise<Response>;
22
+ }
23
+ export {};
@@ -0,0 +1,23 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ user_id?: number | string;
5
+ group_id?: number | string;
6
+ }
7
+ interface Response {
8
+ url: string;
9
+ }
10
+ export declare class GetQQAvatar extends BaseAction<Payload, Response> {
11
+ actionName: ActionName;
12
+ payloadSchema: Schema<Schemastery.ObjectS<{
13
+ user_id: Schema<string | number, string | number>;
14
+ group_id: Schema<string | number, string | number>;
15
+ }>, Schemastery.ObjectT<{
16
+ user_id: Schema<string | number, string | number>;
17
+ group_id: Schema<string | number, string | number>;
18
+ }>>;
19
+ protected _handle(payload: Payload): Promise<{
20
+ url: string;
21
+ }>;
22
+ }
23
+ export {};
@@ -0,0 +1,15 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ flag: string;
5
+ }
6
+ export declare class SetDoubtFriendsAddRequest extends BaseAction<Payload, null> {
7
+ actionName: ActionName;
8
+ payloadSchema: Schema<Schemastery.ObjectS<{
9
+ flag: Schema<string, string>;
10
+ }>, Schemastery.ObjectT<{
11
+ flag: Schema<string, string>;
12
+ }>>;
13
+ protected _handle(payload: Payload): Promise<null>;
14
+ }
15
+ export {};
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ user_id: number | string;
5
+ category_id: number | string;
6
+ }
7
+ export declare class SetFriendCategory extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ user_id: Schema<string | number, string | number>;
11
+ category_id: Schema<string | number, string | number>;
12
+ }>, Schemastery.ObjectT<{
13
+ user_id: Schema<string | number, string | number>;
14
+ category_id: 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
+ user_id: number | string;
5
+ remark: string;
6
+ }
7
+ export declare class SetFriendRemark extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ user_id: Schema<string | number, string | number>;
11
+ remark: Schema<string, string>;
12
+ }>, Schemastery.ObjectT<{
13
+ user_id: Schema<string | number, string | number>;
14
+ remark: 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
+ user_id: number | string;
5
+ event_type: number | string;
6
+ }
7
+ export declare class SetInputStatus extends BaseAction<Payload, null> {
8
+ actionName: ActionName;
9
+ payloadSchema: Schema<Schemastery.ObjectS<{
10
+ user_id: Schema<string | number, string | number>;
11
+ event_type: Schema<string | number, string | number>;
12
+ }>, Schemastery.ObjectT<{
13
+ user_id: Schema<string | number, string | number>;
14
+ event_type: Schema<string | number, string | number>;
15
+ }>>;
16
+ protected _handle(payload: Payload): Promise<null>;
17
+ }
18
+ export {};
@@ -0,0 +1,21 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ status: number | string;
5
+ ext_status: number | string;
6
+ battery_status: number | string;
7
+ }
8
+ export declare class SetOnlineStatus extends BaseAction<Payload, null> {
9
+ actionName: ActionName;
10
+ payloadSchema: Schema<Schemastery.ObjectS<{
11
+ status: Schema<string | number, string | number>;
12
+ ext_status: Schema<string | number, string | number>;
13
+ battery_status: Schema<string | number, string | number>;
14
+ }>, Schemastery.ObjectT<{
15
+ status: Schema<string | number, string | number>;
16
+ ext_status: Schema<string | number, string | number>;
17
+ battery_status: Schema<string | number, string | number>;
18
+ }>>;
19
+ _handle(payload: Payload): Promise<null>;
20
+ }
21
+ export {};
@@ -0,0 +1,15 @@
1
+ import { BaseAction, Schema } from '../../BaseAction';
2
+ import { ActionName } from '../../types';
3
+ interface Payload {
4
+ file: string;
5
+ }
6
+ export default class SetQQAvatar extends BaseAction<Payload, null> {
7
+ actionName: ActionName;
8
+ payloadSchema: Schema<Schemastery.ObjectS<{
9
+ file: Schema<string, string>;
10
+ }>, Schemastery.ObjectT<{
11
+ file: Schema<string, string>;
12
+ }>>;
13
+ protected _handle(payload: Payload): Promise<null>;
14
+ }
15
+ export {};
@@ -0,0 +1,15 @@
1
+ import { ActionName } from '../types';
2
+ import { BaseAction, Schema } from '../BaseAction';
3
+ interface Payload {
4
+ message_id: number | string;
5
+ }
6
+ declare class DeleteMsg extends BaseAction<Payload, null> {
7
+ actionName: ActionName;
8
+ payloadSchema: Schema<Schemastery.ObjectS<{
9
+ message_id: Schema<string | number, string | number>;
10
+ }>, Schemastery.ObjectT<{
11
+ message_id: Schema<string | number, string | number>;
12
+ }>>;
13
+ protected _handle(payload: Payload): Promise<null>;
14
+ }
15
+ export default DeleteMsg;
@@ -0,0 +1,18 @@
1
+ import { BaseAction, Schema } from '../BaseAction';
2
+ import { OB11Message } from '../../types';
3
+ import { ActionName } from '../types';
4
+ import { ParseMessageConfig } from '../../types';
5
+ export interface PayloadType {
6
+ message_id: number | string;
7
+ }
8
+ export type ReturnDataType = OB11Message;
9
+ declare class GetMsg extends BaseAction<PayloadType, OB11Message> {
10
+ actionName: ActionName;
11
+ payloadSchema: Schema<Schemastery.ObjectS<{
12
+ message_id: Schema<string | number, string | number>;
13
+ }>, Schemastery.ObjectT<{
14
+ message_id: Schema<string | number, string | number>;
15
+ }>>;
16
+ protected _handle(payload: PayloadType, config: ParseMessageConfig): Promise<OB11Message>;
17
+ }
18
+ export default GetMsg;