@satorijs/adapter-lark 3.4.1 → 3.5.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 CHANGED
@@ -1,5 +1,4 @@
1
- /// <reference types="node" />
2
- import { Bot, Context, h, Quester, Schema } from '@satorijs/satori';
1
+ import { Bot, Context, h, HTTP, Schema, Universal } from '@satorijs/core';
3
2
  import { HttpServer } from './http';
4
3
  import { LarkMessageEncoder } from './message';
5
4
  import { Internal } from './types';
@@ -8,29 +7,30 @@ export declare class LarkBot<C extends Context = Context> extends Bot<C, LarkBot
8
7
  static MessageEncoder: typeof LarkMessageEncoder;
9
8
  _token?: string;
10
9
  _refresher?: NodeJS.Timeout;
11
- http: Quester;
12
- assetsQuester: Quester;
10
+ http: HTTP;
11
+ assetsQuester: HTTP;
13
12
  internal: Internal;
14
13
  constructor(ctx: C, config: LarkBot.Config);
14
+ get appId(): string;
15
15
  initialize(): Promise<void>;
16
16
  private refreshToken;
17
17
  get token(): string;
18
18
  set token(v: string);
19
19
  editMessage(channelId: string, messageId: string, content: h.Fragment): Promise<void>;
20
20
  deleteMessage(channelId: string, messageId: string): Promise<void>;
21
- getMessage(channelId: string, messageId: string): Promise<import("@satorijs/protocol").Message>;
21
+ getMessage(channelId: string, messageId: string, recursive?: boolean): Promise<Universal.Message>;
22
22
  getMessageList(channelId: string, before?: string): Promise<{
23
- data: import("@satorijs/protocol").Message[];
23
+ data: Universal.Message[];
24
24
  next: string;
25
25
  }>;
26
- getUser(userId: string, guildId?: string): Promise<import("@satorijs/protocol").User>;
27
- getChannel(channelId: string): Promise<import("@satorijs/protocol").Channel>;
26
+ getUser(userId: string, guildId?: string): Promise<Universal.User>;
27
+ getChannel(channelId: string): Promise<Universal.Channel>;
28
28
  getChannelList(guildId: string): Promise<{
29
- data: import("@satorijs/protocol").Channel[];
29
+ data: Universal.Channel[];
30
30
  }>;
31
- getGuild(guildId: string): Promise<import("@satorijs/protocol").Guild>;
31
+ getGuild(guildId: string): Promise<Universal.Guild>;
32
32
  getGuildList(after?: string): Promise<{
33
- data: import("@satorijs/protocol").Guild[];
33
+ data: Universal.Guild[];
34
34
  next: string;
35
35
  }>;
36
36
  getGuildMemberList(guildId: string, after?: string): Promise<{
@@ -45,7 +45,7 @@ export declare class LarkBot<C extends Context = Context> extends Bot<C, LarkBot
45
45
  }>;
46
46
  }
47
47
  export declare namespace LarkBot {
48
- interface Config extends HttpServer.Options, Quester.Config {
48
+ interface Config extends HttpServer.Options, HTTP.Config {
49
49
  appId: string;
50
50
  appSecret: string;
51
51
  encryptKey?: string;
package/lib/http.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Adapter, Context, Schema } from '@satorijs/satori';
1
+ import { Adapter, Context, Schema } from '@satorijs/core';
2
2
  import { FeishuBot } from './bot';
3
3
  import { AllEvents } from './types';
4
4
  export declare class HttpServer<C extends Context = Context> extends Adapter<C, FeishuBot<C>> {
@@ -8,7 +8,7 @@ export declare class HttpServer<C extends Context = Context> extends Adapter<C,
8
8
  constructor(ctx: C, bot: FeishuBot<C>);
9
9
  fork(ctx: C, bot: FeishuBot<C>): Promise<void>;
10
10
  connect(bot: FeishuBot): Promise<void>;
11
- dispatchSession(body: AllEvents): void;
11
+ dispatchSession(body: AllEvents): Promise<void>;
12
12
  private _tryDecryptBody;
13
13
  private _refreshCipher;
14
14
  }