@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luckylillia-dev/plugin-onebot11",
3
- "version": "1.0.4",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "description": "OneBot 11 HTTP and WebSocket adapter for LuckyLillia NTQQ",
6
6
  "main": "./lib/index.js",
@@ -10,6 +10,10 @@
10
10
  "types": "./lib/types/index.d.ts",
11
11
  "default": "./lib/index.js"
12
12
  },
13
+ "./api": {
14
+ "types": "./lib/types/api.d.ts",
15
+ "default": "./lib/api.js"
16
+ },
13
17
  "./package.json": "./package.json"
14
18
  },
15
19
  "files": [
@@ -40,11 +44,12 @@
40
44
  "@hono/node-server": "^2.1.1",
41
45
  "hono": "^4.13.5",
42
46
  "sift": "^17.1.3",
43
- "ws": "^8.21.3"
47
+ "ws": "^8.21.3",
48
+ "ts-case-convert": "^2.3.2"
44
49
  },
45
50
  "peerDependencies": {
46
51
  "@luckylillia-dev/plugin-sdk": "^1.0.1",
47
- "@luckylillia-dev/plugin-nt-protocol": "^1.0.0",
52
+ "@luckylillia-dev/plugin-nt-protocol": "^1.1.2",
48
53
  "cordis": "4.0.0-rc.11",
49
54
  "cosmokit": "^1.8.1",
50
55
  "schemastery": "^3.18.0",
@@ -91,14 +96,13 @@
91
96
  "icon": "radio",
92
97
  "description": "通过 NTQQ 提供 OneBot 11 HTTP、正向和反向 WebSocket、HTTP POST 上报。",
93
98
  "dependencies": {
94
- "@luckylillia-dev/plugin-nt-protocol": "^1.0.0"
99
+ "@luckylillia-dev/plugin-nt-protocol": "^1.1.2"
95
100
  },
96
101
  "service": {
97
102
  "implements": [
98
103
  "onebot"
99
104
  ],
100
105
  "required": [
101
- "ntOnebot",
102
106
  "qqProtocol",
103
107
  "app",
104
108
  "store",
@@ -111,7 +115,6 @@
111
115
  "ntWebApi"
112
116
  ],
113
117
  "labels": {
114
- "ntOnebot": "NTQQ 账号接口",
115
118
  "qqProtocol": "NTQQ 协议",
116
119
  "app": "NTQQ 账号登录",
117
120
  "store": "NTQQ 消息缓存",
@@ -120,16 +123,86 @@
120
123
  },
121
124
  "webui": "./lib/client/index.js",
122
125
  "launch": [
123
- { "field": "connect[type=ws].host", "arg": "--onebot-ws-host", "env": "ONEBOT_WS_HOST", "set": { "connect[type=ws].enable": true } },
124
- { "field": "connect[type=ws].port", "arg": "--onebot-ws-port", "env": "ONEBOT_WS_PORT", "set": { "connect[type=ws].enable": true } },
125
- { "field": "connect[type=ws].token", "arg": "--onebot-ws-token", "env": "ONEBOT_WS_TOKEN", "set": { "connect[type=ws].enable": true } },
126
- { "field": "connect[type=http].host", "arg": "--onebot-http-host", "env": "ONEBOT_HTTP_HOST", "set": { "connect[type=http].enable": true } },
127
- { "field": "connect[type=http].port", "arg": "--onebot-http-port", "env": "ONEBOT_HTTP_PORT", "set": { "connect[type=http].enable": true } },
128
- { "field": "connect[type=http].token", "arg": "--onebot-http-token", "env": "ONEBOT_HTTP_TOKEN", "set": { "connect[type=http].enable": true } },
129
- { "field": "connect[type=ws-reverse].url", "arg": "--onebot-ws-reverse-url", "env": "ONEBOT_WS_REVERSE_URL", "set": { "connect[type=ws-reverse].enable": true } },
130
- { "field": "connect[type=ws-reverse].token", "arg": "--onebot-ws-reverse-token", "env": "ONEBOT_WS_REVERSE_TOKEN", "set": { "connect[type=ws-reverse].enable": true } },
131
- { "field": "connect[type=http-post].url", "arg": "--onebot-http-post-url", "env": "ONEBOT_HTTP_POST_URL", "set": { "connect[type=http-post].enable": true } },
132
- { "field": "connect[type=http-post].token", "arg": "--onebot-http-post-token", "env": "ONEBOT_HTTP_POST_TOKEN", "set": { "connect[type=http-post].enable": true } }
126
+ {
127
+ "field": "connect[type=ws].host",
128
+ "arg": "--onebot-ws-host",
129
+ "env": "ONEBOT_WS_HOST",
130
+ "set": {
131
+ "connect[type=ws].enable": true
132
+ }
133
+ },
134
+ {
135
+ "field": "connect[type=ws].port",
136
+ "arg": "--onebot-ws-port",
137
+ "env": "ONEBOT_WS_PORT",
138
+ "set": {
139
+ "connect[type=ws].enable": true
140
+ }
141
+ },
142
+ {
143
+ "field": "connect[type=ws].token",
144
+ "arg": "--onebot-ws-token",
145
+ "env": "ONEBOT_WS_TOKEN",
146
+ "set": {
147
+ "connect[type=ws].enable": true
148
+ }
149
+ },
150
+ {
151
+ "field": "connect[type=http].host",
152
+ "arg": "--onebot-http-host",
153
+ "env": "ONEBOT_HTTP_HOST",
154
+ "set": {
155
+ "connect[type=http].enable": true
156
+ }
157
+ },
158
+ {
159
+ "field": "connect[type=http].port",
160
+ "arg": "--onebot-http-port",
161
+ "env": "ONEBOT_HTTP_PORT",
162
+ "set": {
163
+ "connect[type=http].enable": true
164
+ }
165
+ },
166
+ {
167
+ "field": "connect[type=http].token",
168
+ "arg": "--onebot-http-token",
169
+ "env": "ONEBOT_HTTP_TOKEN",
170
+ "set": {
171
+ "connect[type=http].enable": true
172
+ }
173
+ },
174
+ {
175
+ "field": "connect[type=ws-reverse].url",
176
+ "arg": "--onebot-ws-reverse-url",
177
+ "env": "ONEBOT_WS_REVERSE_URL",
178
+ "set": {
179
+ "connect[type=ws-reverse].enable": true
180
+ }
181
+ },
182
+ {
183
+ "field": "connect[type=ws-reverse].token",
184
+ "arg": "--onebot-ws-reverse-token",
185
+ "env": "ONEBOT_WS_REVERSE_TOKEN",
186
+ "set": {
187
+ "connect[type=ws-reverse].enable": true
188
+ }
189
+ },
190
+ {
191
+ "field": "connect[type=http-post].url",
192
+ "arg": "--onebot-http-post-url",
193
+ "env": "ONEBOT_HTTP_POST_URL",
194
+ "set": {
195
+ "connect[type=http-post].enable": true
196
+ }
197
+ },
198
+ {
199
+ "field": "connect[type=http-post].token",
200
+ "arg": "--onebot-http-post-token",
201
+ "env": "ONEBOT_HTTP_POST_TOKEN",
202
+ "set": {
203
+ "connect[type=http-post].enable": true
204
+ }
205
+ }
133
206
  ]
134
207
  }
135
208
  }