@satorijs/adapter-dingtalk 2.0.1 → 2.0.2
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/bot.d.ts +2 -2
- package/lib/http.d.ts +2 -3
- package/lib/index.js +5 -8
- package/lib/index.js.map +2 -2
- package/lib/message.d.ts +2 -2
- package/lib/utils.d.ts +2 -2
- package/lib/ws.d.ts +2 -2
- package/package.json +7 -4
package/lib/message.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Dict, h, MessageEncoder } from '@satorijs/satori';
|
|
1
|
+
import { Context, Dict, h, MessageEncoder } from '@satorijs/satori';
|
|
2
2
|
import { DingtalkBot } from './bot';
|
|
3
3
|
import { SendMessageData } from './types';
|
|
4
4
|
export declare const escape: (val: string) => string;
|
|
5
5
|
export declare const unescape: (val: string) => string;
|
|
6
|
-
export declare class DingtalkMessageEncoder extends MessageEncoder<DingtalkBot
|
|
6
|
+
export declare class DingtalkMessageEncoder<C extends Context = Context> extends MessageEncoder<C, DingtalkBot<C>> {
|
|
7
7
|
buffer: string;
|
|
8
8
|
/**
|
|
9
9
|
* Markdown: https://open.dingtalk.com/document/isvapp/robot-message-types-and-data-format
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Context } from '@satorijs/satori';
|
|
2
2
|
import { Message } from './types';
|
|
3
3
|
import { DingtalkBot } from './bot';
|
|
4
|
-
export declare function decodeMessage(bot: DingtalkBot
|
|
4
|
+
export declare function decodeMessage<C extends Context>(bot: DingtalkBot<C>, body: Message): Promise<C[typeof Context.session]>;
|
package/lib/ws.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="ws" />
|
|
2
|
-
import { Adapter, Schema } from '@satorijs/satori';
|
|
2
|
+
import { Adapter, Context, Schema } from '@satorijs/satori';
|
|
3
3
|
import { DingtalkBot } from './bot';
|
|
4
|
-
export declare class WsClient extends Adapter.WsClient<DingtalkBot
|
|
4
|
+
export declare class WsClient<C extends Context = Context> extends Adapter.WsClient<C, DingtalkBot<C>> {
|
|
5
5
|
prepare(): Promise<import("ws").WebSocket>;
|
|
6
6
|
accept(): void;
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@satorijs/adapter-dingtalk",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "2.0.
|
|
3
|
+
"description": "DingTalk (钉钉) Adapter for Satorijs",
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -20,12 +20,15 @@
|
|
|
20
20
|
"homepage": "https://koishi.chat/plugins/adapter/dingtalk.html",
|
|
21
21
|
"keywords": [
|
|
22
22
|
"bot",
|
|
23
|
+
"dingding",
|
|
23
24
|
"dingtalk",
|
|
24
25
|
"adapter",
|
|
25
26
|
"chatbot",
|
|
26
|
-
"satori"
|
|
27
|
+
"satori",
|
|
28
|
+
"im",
|
|
29
|
+
"chat"
|
|
27
30
|
],
|
|
28
31
|
"peerDependencies": {
|
|
29
|
-
"@satorijs/satori": "^3.0.0
|
|
32
|
+
"@satorijs/satori": "^3.0.0"
|
|
30
33
|
}
|
|
31
34
|
}
|