@satorijs/adapter-dingtalk 2.0.0 → 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.
Files changed (50) hide show
  1. package/lib/api/alitrip.d.ts +12 -12
  2. package/lib/api/attendance.d.ts +3 -3
  3. package/lib/api/badge.d.ts +8 -8
  4. package/lib/api/blackboard.d.ts +1 -1
  5. package/lib/api/calendar.d.ts +28 -28
  6. package/lib/api/card.d.ts +6 -6
  7. package/lib/api/conference.d.ts +23 -23
  8. package/lib/api/connector.d.ts +3 -3
  9. package/lib/api/contact.d.ts +2 -2
  10. package/lib/api/convFile.d.ts +4 -4
  11. package/lib/api/crm.d.ts +28 -28
  12. package/lib/api/customerService.d.ts +4 -4
  13. package/lib/api/datacenter.d.ts +26 -26
  14. package/lib/api/devicemng.d.ts +5 -5
  15. package/lib/api/diot.d.ts +1 -1
  16. package/lib/api/doc.d.ts +8 -8
  17. package/lib/api/drive.d.ts +4 -4
  18. package/lib/api/edu.d.ts +5 -5
  19. package/lib/api/esign.d.ts +2 -2
  20. package/lib/api/exclusive.d.ts +14 -14
  21. package/lib/api/h3yun.d.ts +20 -20
  22. package/lib/api/hrm.d.ts +9 -9
  23. package/lib/api/im.d.ts +37 -37
  24. package/lib/api/industry.d.ts +5 -5
  25. package/lib/api/jzcrm.d.ts +13 -13
  26. package/lib/api/link.d.ts +4 -4
  27. package/lib/api/live.d.ts +6 -6
  28. package/lib/api/microApp.d.ts +12 -12
  29. package/lib/api/oapi.d.ts +257 -257
  30. package/lib/api/oauth2.d.ts +7 -7
  31. package/lib/api/pedia.d.ts +6 -6
  32. package/lib/api/project.d.ts +50 -50
  33. package/lib/api/resident.d.ts +6 -6
  34. package/lib/api/robot.d.ts +14 -14
  35. package/lib/api/rooms.d.ts +12 -12
  36. package/lib/api/serviceGroup.d.ts +8 -8
  37. package/lib/api/storage.d.ts +51 -51
  38. package/lib/api/swform.d.ts +3 -3
  39. package/lib/api/todo.d.ts +5 -5
  40. package/lib/api/wiki.d.ts +6 -6
  41. package/lib/api/workbench.d.ts +3 -3
  42. package/lib/api/yida.d.ts +60 -60
  43. package/lib/bot.d.ts +5 -6
  44. package/lib/http.d.ts +2 -3
  45. package/lib/index.js +164 -165
  46. package/lib/index.js.map +2 -2
  47. package/lib/message.d.ts +2 -2
  48. package/lib/utils.d.ts +2 -2
  49. package/lib/ws.d.ts +3 -3
  50. 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 { Session } from '@satorijs/satori';
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, body: Message): Promise<Session>;
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,12 +1,12 @@
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
  }
8
8
  export declare namespace WsClient {
9
- interface Config extends Adapter.WsClient.Config {
9
+ interface Config extends Adapter.WsClientConfig {
10
10
  }
11
11
  const Config: Schema<Config>;
12
12
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@satorijs/adapter-dingtalk",
3
- "description": "Dingtalk Adapter for Satorijs",
4
- "version": "2.0.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-alpha.0"
32
+ "@satorijs/satori": "^3.0.0"
30
33
  }
31
34
  }