@satorijs/adapter-lark 3.11.9 → 3.12.0
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 +5 -5
- package/lib/http.d.ts +6 -3
- package/lib/index.cjs +293 -223
- package/lib/types/acs.d.ts +4 -1
- package/lib/types/apaas.d.ts +152 -0
- package/lib/types/application.d.ts +20 -4
- package/lib/types/approval.d.ts +0 -13
- package/lib/types/attendance.d.ts +11 -5
- package/lib/types/authen.d.ts +8 -2
- package/lib/types/bitable.d.ts +25 -4
- package/lib/types/board.d.ts +17 -0
- package/lib/types/calendar.d.ts +16 -5
- package/lib/types/contact.d.ts +55 -12
- package/lib/types/corehr.d.ts +754 -142
- package/lib/types/drive.d.ts +20 -3
- package/lib/types/ehr.d.ts +11 -2
- package/lib/types/helpdesk.d.ts +15 -6
- package/lib/types/hire.d.ts +13 -13
- package/lib/types/human_authentication.d.ts +1 -1
- package/lib/types/im.d.ts +76 -20
- package/lib/types/index.d.ts +712 -115
- package/lib/types/mail.d.ts +106 -16
- package/lib/types/search.d.ts +4 -1
- package/lib/ws.d.ts +30 -0
- package/package.json +6 -3
- package/src/bot.ts +28 -15
- package/src/http.ts +10 -4
- package/src/types/acs.ts +4 -1
- package/src/types/apaas.ts +185 -0
- package/src/types/application.ts +20 -4
- package/src/types/approval.ts +0 -15
- package/src/types/attendance.ts +11 -5
- package/src/types/authen.ts +8 -2
- package/src/types/bitable.ts +25 -4
- package/src/types/board.ts +22 -0
- package/src/types/calendar.ts +16 -5
- package/src/types/contact.ts +55 -12
- package/src/types/corehr.ts +796 -142
- package/src/types/drive.ts +20 -3
- package/src/types/ehr.ts +11 -2
- package/src/types/helpdesk.ts +15 -6
- package/src/types/hire.ts +17 -17
- package/src/types/human_authentication.ts +1 -1
- package/src/types/im.ts +76 -20
- package/src/types/index.ts +738 -115
- package/src/types/mail.ts +106 -16
- package/src/types/search.ts +4 -1
- package/src/ws.ts +183 -0
- package/lib/types/api.d.ts +0 -28510
- package/lib/types/internal.d.ts +0 -21
- package/lib/types/message/content.d.ts +0 -433
- package/lib/types/message/index.d.ts +0 -95
package/lib/bot.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { Bot, Context, h, HTTP, Schema, Universal } from '@satorijs/core';
|
|
2
2
|
import { HttpServer } from './http';
|
|
3
|
+
import { WsClient } from './ws';
|
|
3
4
|
import { LarkMessageEncoder } from './message';
|
|
4
5
|
import { Internal } from './internal';
|
|
5
|
-
export declare class LarkBot<C extends Context = Context> extends Bot<C,
|
|
6
|
+
export declare class LarkBot<C extends Context = Context, T extends LarkBot.Config = LarkBot.Config> extends Bot<C, T> {
|
|
6
7
|
static inject: string[];
|
|
7
8
|
static MessageEncoder: typeof LarkMessageEncoder;
|
|
8
9
|
_refresher?: NodeJS.Timeout;
|
|
9
10
|
http: HTTP;
|
|
10
11
|
assetsQuester: HTTP;
|
|
11
12
|
internal: Internal<C>;
|
|
12
|
-
constructor(ctx: C, config:
|
|
13
|
+
constructor(ctx: C, config: T);
|
|
13
14
|
getResourceUrl(type: string, message_id: string, file_key: string): string;
|
|
14
15
|
initialize(): Promise<void>;
|
|
15
16
|
private refreshToken;
|
|
@@ -43,12 +44,11 @@ export declare class LarkBot<C extends Context = Context> extends Bot<C, LarkBot
|
|
|
43
44
|
createUpload(...uploads: Universal.Upload[]): Promise<string[]>;
|
|
44
45
|
}
|
|
45
46
|
export declare namespace LarkBot {
|
|
46
|
-
interface
|
|
47
|
+
interface BaseConfig extends HTTP.Config {
|
|
47
48
|
appId: string;
|
|
48
49
|
appSecret: string;
|
|
49
|
-
encryptKey?: string;
|
|
50
|
-
verificationToken?: string;
|
|
51
50
|
}
|
|
51
|
+
type Config = BaseConfig & (HttpServer.Options | WsClient.Options);
|
|
52
52
|
const Config: Schema<Config>;
|
|
53
53
|
}
|
|
54
54
|
export { LarkBot as FeishuBot };
|
package/lib/http.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { Adapter, Context, Schema } from '@satorijs/core';
|
|
2
2
|
import { LarkBot } from './bot';
|
|
3
3
|
import { EventPayload } from './utils';
|
|
4
|
-
export declare class HttpServer<C extends Context = Context> extends Adapter<C, LarkBot<C>> {
|
|
4
|
+
export declare class HttpServer<C extends Context = Context> extends Adapter<C, LarkBot<C, LarkBot.BaseConfig & HttpServer.Options>> {
|
|
5
5
|
static inject: string[];
|
|
6
6
|
private logger;
|
|
7
7
|
private ciphers;
|
|
8
8
|
constructor(ctx: C, bot: LarkBot<C>);
|
|
9
|
-
fork(ctx: C, bot: LarkBot<C>): Promise<void>;
|
|
10
|
-
connect(bot: LarkBot): Promise<void>;
|
|
9
|
+
fork(ctx: C, bot: LarkBot<C, LarkBot.BaseConfig & HttpServer.Options>): Promise<void>;
|
|
10
|
+
connect(bot: LarkBot<C, LarkBot.BaseConfig & HttpServer.Options>): Promise<void>;
|
|
11
11
|
dispatchSession(body: EventPayload): Promise<void>;
|
|
12
12
|
private _tryDecryptBody;
|
|
13
13
|
private _refreshCipher;
|
|
14
14
|
}
|
|
15
15
|
export declare namespace HttpServer {
|
|
16
16
|
interface Options {
|
|
17
|
+
protocol: 'http';
|
|
17
18
|
selfUrl?: string;
|
|
18
19
|
path?: string;
|
|
20
|
+
encryptKey?: string;
|
|
21
|
+
verificationToken?: string;
|
|
19
22
|
verifyToken?: boolean;
|
|
20
23
|
verifySignature?: boolean;
|
|
21
24
|
}
|