@zhin.js/adapter-github 0.1.19 → 0.1.20
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/adapter.d.ts +18 -0
- package/lib/adapter.d.ts.map +1 -0
- package/lib/adapter.js +1003 -0
- package/lib/adapter.js.map +1 -0
- package/lib/bot.d.ts +23 -0
- package/lib/bot.d.ts.map +1 -0
- package/lib/bot.js +167 -0
- package/lib/bot.js.map +1 -0
- package/lib/index.d.ts +6 -43
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -1179
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
package/lib/adapter.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Adapter, Plugin } from 'zhin.js';
|
|
2
|
+
import { GitHubBot } from './bot.js';
|
|
3
|
+
import type { GitHubBotConfig, GenericWebhookPayload } from './types.js';
|
|
4
|
+
import { GitHubOAuthClient } from './api.js';
|
|
5
|
+
export declare class GitHubAdapter extends Adapter<GitHubBot> {
|
|
6
|
+
get publicUrl(): string | undefined;
|
|
7
|
+
constructor(plugin: Plugin);
|
|
8
|
+
createBot(config: GitHubBotConfig): GitHubBot;
|
|
9
|
+
start(): Promise<void>;
|
|
10
|
+
/** 获取第一个可用 bot 的 API (工具用) */
|
|
11
|
+
private getAPI;
|
|
12
|
+
getOAuthClient(platform: string, platformUid: string): Promise<GitHubOAuthClient | null>;
|
|
13
|
+
setupOAuth(router: import('@zhin.js/http').Router): void;
|
|
14
|
+
setupWebhook(router: import('@zhin.js/http').Router): void;
|
|
15
|
+
private registerGitHubTools;
|
|
16
|
+
dispatchNotification(eventName: string, payload: GenericWebhookPayload): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,OAAO,EACP,MAAM,EAGP,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAa,qBAAqB,EAAmD,MAAM,YAAY,CAAC;AACrI,OAAO,EAAa,iBAAiB,EAAqB,MAAM,UAAU,CAAC;AAoD3E,qBAAa,aAAc,SAAQ,OAAO,CAAC,SAAS,CAAC;IACnD,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAGlC;gBAEW,MAAM,EAAE,MAAM;IAI1B,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS;IAIvC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiB5B,8BAA8B;IAC9B,OAAO,CAAC,MAAM;IAOR,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAW9F,UAAU,CAAC,MAAM,EAAE,OAAO,eAAe,EAAE,MAAM,GAAG,IAAI;IA6GxD,YAAY,CAAC,MAAM,EAAE,OAAO,eAAe,EAAE,MAAM,GAAG,IAAI;IAuF1D,OAAO,CAAC,mBAAmB;IAuqBrB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CA+C7F"}
|