node-karin 1.15.2 → 1.15.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # 更新日志
2
2
 
3
+ ## [1.15.4](https://github.com/KarinJS/Karin/compare/core-v1.15.3...core-v1.15.4) (2026-04-01)
4
+
5
+
6
+ ### 🐛 Bug Fixes
7
+
8
+ * getRkey returns undefined due to missing backward compatibility ([#639](https://github.com/KarinJS/Karin/issues/639)) ([87f1184](https://github.com/KarinJS/Karin/commit/87f1184e6c005e6dbe5283180b5a256378066967))
9
+
10
+ ## [1.15.3](https://github.com/KarinJS/Karin/compare/core-v1.15.2...core-v1.15.3) (2026-04-01)
11
+
12
+
13
+ ### 🐛 Bug Fixes
14
+
15
+ * 更新适配器平台、标准、协议和通信方式的类型定义,添加新选项 ([#636](https://github.com/KarinJS/Karin/issues/636)) ([295dc1a](https://github.com/KarinJS/Karin/commit/295dc1a6def09014815d38b7bac115fd0c39e62a))
16
+
3
17
  ## [1.15.2](https://github.com/KarinJS/Karin/compare/core-v1.15.1...core-v1.15.2) (2026-03-30)
4
18
 
5
19
 
package/dist/index.d.ts CHANGED
@@ -229,21 +229,28 @@ interface SenderGroup$1 {
229
229
  * 适配器所属平台
230
230
  * - `qq`: QQ
231
231
  * - `wechat`: 微信
232
+ * - `wecom`: 企业微信
232
233
  * - `telegram`: Telegram
233
234
  * - `discord`: Discord
234
235
  * - `koko`: 开黑吧
236
+ * - `dingtalk`: 钉钉
237
+ * - `feishu`: 飞书
238
+ * - `slack`: Slack
239
+ * - `whatsapp`: WhatsApp
235
240
  * - `other`: 其他
236
241
  */
237
- type AdapterPlatform = 'qq' | 'wechat' | 'telegram' | 'discord' | 'koko' | 'other';
242
+ type AdapterPlatform = 'qq' | 'wechat' | 'telegram' | 'discord' | 'koko' | 'dingtalk' | 'feishu' | 'slack' | 'wecom' | 'whatsapp' | 'other' | (string & {});
238
243
  /**
239
244
  * 适配器所使用的标准接口协议
240
245
  * - `onebot11`: OneBot v11 标准
241
246
  * - `onebot12`: OneBot v12 标准
242
247
  * - `oicq`: OICQ 标准
243
248
  * - `icqq`: OICQ fork 标准
249
+ * - `milky`: Milky 标准
250
+ * - `satori`: Satori 标准
244
251
  * - `other`: 其他标准
245
252
  */
246
- type AdapterStandard = 'onebot11' | 'onebot12' | 'oicq' | 'icqq' | 'other';
253
+ type AdapterStandard = 'onebot11' | 'onebot12' | 'oicq' | 'icqq' | 'milky' | 'satori' | 'other' | (string & {});
247
254
  /**
248
255
  * 适配器协议实现名称
249
256
  * - `console`: 控制台
@@ -255,17 +262,19 @@ type AdapterStandard = 'onebot11' | 'onebot12' | 'oicq' | 'icqq' | 'other';
255
262
  * - `llonebot`: https://llonebot.github.io/zh-CN/
256
263
  * - `conwechat`: https://justundertaker.github.io/ComWeChatBotClient/
257
264
  * - `lagrange`: https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/
265
+ * - `yogurt`: https://acidify.ntqqrev.org/
258
266
  */
259
- type AdapterProtocol = 'qqbot' | 'icqq' | 'gocq-http' | 'napcat' | 'oicq' | 'llonebot' | 'conwechat' | 'lagrange' | 'console' | 'other';
267
+ type AdapterProtocol = 'qqbot' | 'icqq' | 'gocq-http' | 'napcat' | 'oicq' | 'llonebot' | 'conwechat' | 'lagrange' | 'console' | 'yogurt' | 'other' | (string & {});
260
268
  /**
261
269
  * 适配器通信方式
262
270
  * - `http`: HTTP 通信
263
271
  * - `webSocketServer`: WebSocket 服务端
264
272
  * - `webSocketClient`: WebSocket 客户端
265
273
  * - `grpc`: gRPC 通信
274
+ * - `sse`: Server-Sent Events 通信
266
275
  * - `other`: 其他通信方式
267
276
  */
268
- type AdapterCommunication = 'http' | 'webSocketServer' | 'webSocketClient' | 'grpc' | 'other';
277
+ type AdapterCommunication = 'http' | 'webSocketServer' | 'webSocketClient' | 'grpc' | 'sse' | 'other' | (string & {});
269
278
  /**
270
279
  * 适配器基本信息
271
280
  */
@@ -13439,7 +13448,12 @@ interface OneBotBotApi {
13439
13448
  [OneBotBotApiAction.getRkey]: {
13440
13449
  action: 'get_rkey';
13441
13450
  params: Record<string, never>;
13442
- response: {
13451
+ response: Array<{
13452
+ type: 'private' | 'group';
13453
+ rkey: string;
13454
+ created_at: number;
13455
+ ttl: number;
13456
+ }> | {
13443
13457
  rkeys: Array<{
13444
13458
  type: 'private' | 'group';
13445
13459
  rkey: string;
@@ -15691,6 +15705,11 @@ declare abstract class OneBotCore extends EventEmitter$1 {
15691
15705
  * 社区扩展: 获取rkey
15692
15706
  */
15693
15707
  getRkey(): Promise<{
15708
+ type: "private" | "group";
15709
+ rkey: string;
15710
+ created_at: number;
15711
+ ttl: number;
15712
+ }[] | {
15694
15713
  rkeys: Array<{
15695
15714
  type: "private" | "group";
15696
15715
  rkey: string;
package/dist/index.mjs CHANGED
@@ -15524,7 +15524,7 @@ var init_core = __esm({
15524
15524
  */
15525
15525
  async getRkey() {
15526
15526
  const result = await this._onebot.getRkey();
15527
- return result.rkeys;
15527
+ return Array.isArray(result) ? result : result.rkeys;
15528
15528
  }
15529
15529
  };
15530
15530
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "1.15.2",
3
+ "version": "1.15.4",
4
4
  "description": "Lightweight, efficient, concise, and stable robot framework.",
5
5
  "keywords": [
6
6
  "node",