@alemonjs/kook 2.1.4 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/sdk/api.js CHANGED
@@ -107,6 +107,13 @@ class KOOKAPI {
107
107
  data
108
108
  });
109
109
  }
110
+ messageList(target_id, params) {
111
+ return this.service({
112
+ method: 'get',
113
+ url: ApiEnum.MessageList,
114
+ params: { target_id, ...params }
115
+ });
116
+ }
110
117
  messageAddReaction(data) {
111
118
  return this.service({
112
119
  method: 'post',
@@ -158,6 +165,152 @@ class KOOKAPI {
158
165
  }
159
166
  });
160
167
  }
168
+ guildList() {
169
+ return this.service({
170
+ method: 'get',
171
+ url: ApiEnum.GuildList
172
+ });
173
+ }
174
+ guildView(guild_id) {
175
+ return this.service({
176
+ method: 'get',
177
+ url: ApiEnum.GuildView,
178
+ params: { guild_id }
179
+ });
180
+ }
181
+ guildUserList(guild_id, params) {
182
+ return this.service({
183
+ method: 'get',
184
+ url: ApiEnum.GuildUserList,
185
+ params: { guild_id, ...params }
186
+ });
187
+ }
188
+ guildLeave(guild_id) {
189
+ return this.service({
190
+ method: 'post',
191
+ url: ApiEnum.GuildLeave,
192
+ data: { guild_id }
193
+ });
194
+ }
195
+ guildNickname(guild_id, nickname, user_id) {
196
+ return this.service({
197
+ method: 'post',
198
+ url: ApiEnum.GuildNickname,
199
+ data: { guild_id, nickname, ...(user_id ? { user_id } : {}) }
200
+ });
201
+ }
202
+ guildMuteCreate(guild_id, user_id, type) {
203
+ return this.service({
204
+ method: 'post',
205
+ url: ApiEnum.GuildMuteCreate,
206
+ data: { guild_id, user_id, type }
207
+ });
208
+ }
209
+ guildMuteDelete(guild_id, user_id, type) {
210
+ return this.service({
211
+ method: 'post',
212
+ url: ApiEnum.GuildMuteDelete,
213
+ data: { guild_id, user_id, type }
214
+ });
215
+ }
216
+ messageView(msg_id) {
217
+ return this.service({
218
+ method: 'get',
219
+ url: ApiEnum.MessageView,
220
+ params: { msg_id }
221
+ });
222
+ }
223
+ channelList(guild_id) {
224
+ return this.service({
225
+ method: 'get',
226
+ url: ApiEnum.ChannelList,
227
+ params: { guild_id }
228
+ });
229
+ }
230
+ channelView(channel_id) {
231
+ return this.service({
232
+ method: 'get',
233
+ url: ApiEnum.ChannelView,
234
+ params: { target_id: channel_id }
235
+ });
236
+ }
237
+ channelCreate(data) {
238
+ return this.service({
239
+ method: 'post',
240
+ url: ApiEnum.ChannelCreate,
241
+ data
242
+ });
243
+ }
244
+ channelUpdate(data) {
245
+ return this.service({
246
+ method: 'post',
247
+ url: ApiEnum.ChannelUpdate,
248
+ data
249
+ });
250
+ }
251
+ channelDelete(channel_id) {
252
+ return this.service({
253
+ method: 'post',
254
+ url: ApiEnum.ChannelDelete,
255
+ data: { channel_id }
256
+ });
257
+ }
258
+ guildRoleList(guild_id) {
259
+ return this.service({
260
+ method: 'get',
261
+ url: ApiEnum.GuildRoleList,
262
+ params: { guild_id }
263
+ });
264
+ }
265
+ guildRoleCreate(data) {
266
+ return this.service({
267
+ method: 'post',
268
+ url: ApiEnum.GuildRoleCreate,
269
+ data
270
+ });
271
+ }
272
+ guildRoleUpdate(data) {
273
+ return this.service({
274
+ method: 'post',
275
+ url: ApiEnum.GuildRoleUpdate,
276
+ data
277
+ });
278
+ }
279
+ guildRoleDelete(data) {
280
+ return this.service({
281
+ method: 'post',
282
+ url: ApiEnum.GuildRoleDelete,
283
+ data
284
+ });
285
+ }
286
+ guildRoleGrant(data) {
287
+ return this.service({
288
+ method: 'post',
289
+ url: ApiEnum.GuildRoleGrant,
290
+ data
291
+ });
292
+ }
293
+ guildRoleRevoke(data) {
294
+ return this.service({
295
+ method: 'post',
296
+ url: ApiEnum.GuildRoleRevoke,
297
+ data
298
+ });
299
+ }
300
+ blacklistCreate(data) {
301
+ return this.service({
302
+ method: 'post',
303
+ url: ApiEnum.BlacklistCreate,
304
+ data
305
+ });
306
+ }
307
+ blacklistDelete(data) {
308
+ return this.service({
309
+ method: 'post',
310
+ url: ApiEnum.BlacklistDelete,
311
+ data
312
+ });
313
+ }
161
314
  }
162
315
 
163
316
  export { API_URL, KOOKAPI };
package/lib/sdk/wss.js CHANGED
@@ -5,7 +5,6 @@ import { ConversationMap } from './conversation.js';
5
5
 
6
6
  class KOOKClient extends KOOKAPI {
7
7
  #isConnected = false;
8
- #sessionId = null;
9
8
  #lastMessageSN = 0;
10
9
  constructor(opstion) {
11
10
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/kook",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "kook platform connection",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",
@@ -58,5 +58,6 @@
58
58
  "repository": {
59
59
  "type": "git",
60
60
  "url": "https://github.com/lemonade-lab/alemonjs.git"
61
- }
62
- }
61
+ },
62
+ "gitHead": "743b70375f728a1584ae149bbadcd04378540ade"
63
+ }