koishi-plugin-bilibili-notify 3.2.4 → 3.2.5-alpha.1
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/biliAPI-BB6Ih4EM.mjs +659 -0
- package/lib/biliAPI-GF2e2-2V.js +664 -0
- package/lib/biliAPI.d.mts +82 -0
- package/lib/biliAPI.d.ts +75 -70
- package/lib/biliAPI.js +5 -762
- package/lib/biliAPI.mjs +4 -0
- package/lib/blive-BBVUYbxX.js +43 -0
- package/lib/blive-CyC_0-9A.mjs +37 -0
- package/lib/blive.d.mts +19 -0
- package/lib/blive.d.ts +15 -12
- package/lib/blive.js +4 -59
- package/lib/blive.mjs +3 -0
- package/lib/chunk-CrFLpmCJ.js +67 -0
- package/lib/chunk-DBmNgn_A.mjs +40 -0
- package/lib/comRegister-CcqOpkwB.mjs +1421 -0
- package/lib/comRegister-t7UnYFig.js +1426 -0
- package/lib/comRegister.d.mts +109 -0
- package/lib/comRegister.d.ts +103 -100
- package/lib/comRegister.js +6 -1896
- package/lib/comRegister.mjs +5 -0
- package/lib/database-4f9U--Ji.mjs +20 -0
- package/lib/database-Ct2yIdxk.js +37 -0
- package/lib/database-Do3O9MDA.d.mts +18 -0
- package/lib/database-KWDs372o.d.ts +18 -0
- package/lib/database.d.mts +2 -0
- package/lib/database.d.ts +2 -14
- package/lib/database.js +5 -14
- package/lib/database.mjs +3 -0
- package/lib/font/HYZhengYuan-75W.js +5 -0
- package/lib/font/HYZhengYuan-75W.mjs +5 -0
- package/lib/generateImg-E9JeFpQX.js +92628 -0
- package/lib/generateImg-zwzMYjw6.mjs +92623 -0
- package/lib/generateImg.d.mts +65 -0
- package/lib/generateImg.d.ts +59 -46
- package/lib/generateImg.js +4 -1504
- package/lib/generateImg.mjs +4 -0
- package/lib/img/arrow.js +5 -0
- package/lib/img/arrow.mjs +5 -0
- package/lib/index-DeGUe4jM.d.mts +265 -0
- package/lib/index-MJKYbMf7.d.ts +265 -0
- package/lib/index.d.mts +73 -0
- package/lib/index.d.ts +65 -62
- package/lib/index.js +296 -394
- package/lib/index.mjs +300 -0
- package/lib/page/0.mjs +0 -0
- package/lib/type/index.d.mts +2 -0
- package/lib/type/index.d.ts +2 -262
- package/lib/type/index.js +5 -18
- package/lib/type/index.mjs +3 -0
- package/lib/type-C5ZxPrgY.mjs +19 -0
- package/lib/type-WjCy4YMc.js +31 -0
- package/lib/utils/index.d.mts +15 -0
- package/lib/utils/index.d.ts +8 -6
- package/lib/utils/index.js +6 -102
- package/lib/utils/index.mjs +3 -0
- package/lib/utils-BoaYrSvG.js +79 -0
- package/lib/utils-C95cnBJG.mjs +61 -0
- package/package.json +16 -11
- package/readme.md +12 -2
- package/lib/img/arrow.png +0 -0
- /package/lib/{font/HYZhengYuan-75W.ttf → assets/HYZhengYuan-75W-CAgMN3FH.ttf} +0 -0
- /package/lib/page/{0.html → 0.js} +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Awaitable, Context, Schema, Service } from "koishi";
|
|
2
|
+
import { AxiosInstance } from "axios";
|
|
3
|
+
import { CookieJar } from "tough-cookie";
|
|
4
|
+
import { Notifier } from "@koishijs/plugin-notifier";
|
|
5
|
+
|
|
6
|
+
//#region src/biliAPI.d.ts
|
|
7
|
+
declare module "koishi" {
|
|
8
|
+
interface Context {
|
|
9
|
+
ba: BiliAPI;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
declare class BiliAPI extends Service {
|
|
13
|
+
static inject: string[];
|
|
14
|
+
jar: CookieJar;
|
|
15
|
+
client: AxiosInstance;
|
|
16
|
+
apiConfig: BiliAPI.Config;
|
|
17
|
+
cacheable: any;
|
|
18
|
+
loginData: any;
|
|
19
|
+
loginNotifier: Notifier;
|
|
20
|
+
refreshCookieTimer: () => void;
|
|
21
|
+
loginInfoIsLoaded: boolean;
|
|
22
|
+
constructor(ctx: Context, config: BiliAPI.Config);
|
|
23
|
+
protected start(): Promise<void>;
|
|
24
|
+
protected stop(): Awaitable<void>;
|
|
25
|
+
getMixinKey: (orig: string) => string;
|
|
26
|
+
encWbi(params: {
|
|
27
|
+
[key: string]: string | number | object;
|
|
28
|
+
}, img_key: string, sub_key: string): string;
|
|
29
|
+
getWbi(params: {
|
|
30
|
+
[key: string]: string | number | object;
|
|
31
|
+
}): Promise<string>;
|
|
32
|
+
encrypt(text: string): string;
|
|
33
|
+
decrypt(text: string): string;
|
|
34
|
+
getTheUserWhoIsLiveStreaming(): Promise<any>;
|
|
35
|
+
getLiveRoomInfoStreamKey(roomId: string): Promise<any>;
|
|
36
|
+
getLiveRoomInfoByUids(uids: string[]): Promise<any>;
|
|
37
|
+
getServerUTCTime(): Promise<number>;
|
|
38
|
+
getTimeNow(): Promise<any>;
|
|
39
|
+
getAllGroup(): Promise<any>;
|
|
40
|
+
removeUserFromGroup(mid: string): Promise<any>;
|
|
41
|
+
copyUserToGroup(mid: string, groupId: string): Promise<any>;
|
|
42
|
+
getUserSpaceDynamic(mid: string): Promise<any>;
|
|
43
|
+
createGroup(tag: string): Promise<any>;
|
|
44
|
+
getAllDynamic(): Promise<any>;
|
|
45
|
+
hasNewDynamic(updateBaseline: string): Promise<any>;
|
|
46
|
+
follow(fid: string): Promise<any>;
|
|
47
|
+
getRelationGroupDetail(tagid: string): Promise<any>;
|
|
48
|
+
getCookieInfo(refreshToken: string): Promise<any>;
|
|
49
|
+
getUserInfo(mid: string): Promise<any>;
|
|
50
|
+
getWbiKeys(): Promise<{
|
|
51
|
+
img_key: any;
|
|
52
|
+
sub_key: any;
|
|
53
|
+
}>;
|
|
54
|
+
getMyselfInfo(): Promise<any>;
|
|
55
|
+
getLoginQRCode(): Promise<any>;
|
|
56
|
+
getLoginStatus(qrcodeKey: string): Promise<any>;
|
|
57
|
+
getLiveRoomInfo(roomId: string): Promise<any>;
|
|
58
|
+
getMasterInfo(mid: string): Promise<any>;
|
|
59
|
+
disposeNotifier(): void;
|
|
60
|
+
getRandomUserAgent(): string;
|
|
61
|
+
createNewClient(): void;
|
|
62
|
+
getCookies(): string;
|
|
63
|
+
getCookiesForHeader(): Promise<string>;
|
|
64
|
+
getLoginInfoIsLoaded(): boolean;
|
|
65
|
+
getLoginInfoFromDB(): Promise<{
|
|
66
|
+
cookies: any;
|
|
67
|
+
refresh_token: string;
|
|
68
|
+
}>;
|
|
69
|
+
getCSRF(): any;
|
|
70
|
+
loadCookiesFromDatabase(): Promise<void>;
|
|
71
|
+
enableRefreshCookiesDetect(): void;
|
|
72
|
+
checkIfTokenNeedRefresh(refreshToken: string, csrf: string, times?: number): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
declare namespace BiliAPI {
|
|
75
|
+
interface Config {
|
|
76
|
+
userAgent: string;
|
|
77
|
+
key: string;
|
|
78
|
+
}
|
|
79
|
+
const Config: Schema<Config>;
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { BiliAPI as default };
|
package/lib/biliAPI.d.ts
CHANGED
|
@@ -1,77 +1,82 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Awaitable, Context, Schema, Service } from "koishi";
|
|
2
|
+
import { AxiosInstance } from "axios";
|
|
3
3
|
import { CookieJar } from "tough-cookie";
|
|
4
|
-
import
|
|
4
|
+
import { Notifier } from "@koishijs/plugin-notifier";
|
|
5
|
+
|
|
6
|
+
//#region src/biliAPI.d.ts
|
|
5
7
|
declare module "koishi" {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
interface Context {
|
|
9
|
+
ba: BiliAPI;
|
|
10
|
+
}
|
|
9
11
|
}
|
|
10
12
|
declare class BiliAPI extends Service {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
13
|
+
static inject: string[];
|
|
14
|
+
jar: CookieJar;
|
|
15
|
+
client: AxiosInstance;
|
|
16
|
+
apiConfig: BiliAPI.Config;
|
|
17
|
+
cacheable: any;
|
|
18
|
+
loginData: any;
|
|
19
|
+
loginNotifier: Notifier;
|
|
20
|
+
refreshCookieTimer: () => void;
|
|
21
|
+
loginInfoIsLoaded: boolean;
|
|
22
|
+
constructor(ctx: Context, config: BiliAPI.Config);
|
|
23
|
+
protected start(): Promise<void>;
|
|
24
|
+
protected stop(): Awaitable<void>;
|
|
25
|
+
getMixinKey: (orig: string) => string;
|
|
26
|
+
encWbi(params: {
|
|
27
|
+
[key: string]: string | number | object;
|
|
28
|
+
}, img_key: string, sub_key: string): string;
|
|
29
|
+
getWbi(params: {
|
|
30
|
+
[key: string]: string | number | object;
|
|
31
|
+
}): Promise<string>;
|
|
32
|
+
encrypt(text: string): string;
|
|
33
|
+
decrypt(text: string): string;
|
|
34
|
+
getTheUserWhoIsLiveStreaming(): Promise<any>;
|
|
35
|
+
getLiveRoomInfoStreamKey(roomId: string): Promise<any>;
|
|
36
|
+
getLiveRoomInfoByUids(uids: string[]): Promise<any>;
|
|
37
|
+
getServerUTCTime(): Promise<number>;
|
|
38
|
+
getTimeNow(): Promise<any>;
|
|
39
|
+
getAllGroup(): Promise<any>;
|
|
40
|
+
removeUserFromGroup(mid: string): Promise<any>;
|
|
41
|
+
copyUserToGroup(mid: string, groupId: string): Promise<any>;
|
|
42
|
+
getUserSpaceDynamic(mid: string): Promise<any>;
|
|
43
|
+
createGroup(tag: string): Promise<any>;
|
|
44
|
+
getAllDynamic(): Promise<any>;
|
|
45
|
+
hasNewDynamic(updateBaseline: string): Promise<any>;
|
|
46
|
+
follow(fid: string): Promise<any>;
|
|
47
|
+
getRelationGroupDetail(tagid: string): Promise<any>;
|
|
48
|
+
getCookieInfo(refreshToken: string): Promise<any>;
|
|
49
|
+
getUserInfo(mid: string): Promise<any>;
|
|
50
|
+
getWbiKeys(): Promise<{
|
|
51
|
+
img_key: any;
|
|
52
|
+
sub_key: any;
|
|
53
|
+
}>;
|
|
54
|
+
getMyselfInfo(): Promise<any>;
|
|
55
|
+
getLoginQRCode(): Promise<any>;
|
|
56
|
+
getLoginStatus(qrcodeKey: string): Promise<any>;
|
|
57
|
+
getLiveRoomInfo(roomId: string): Promise<any>;
|
|
58
|
+
getMasterInfo(mid: string): Promise<any>;
|
|
59
|
+
disposeNotifier(): void;
|
|
60
|
+
getRandomUserAgent(): string;
|
|
61
|
+
createNewClient(): void;
|
|
62
|
+
getCookies(): string;
|
|
63
|
+
getCookiesForHeader(): Promise<string>;
|
|
64
|
+
getLoginInfoIsLoaded(): boolean;
|
|
65
|
+
getLoginInfoFromDB(): Promise<{
|
|
66
|
+
cookies: any;
|
|
67
|
+
refresh_token: string;
|
|
68
|
+
}>;
|
|
69
|
+
getCSRF(): any;
|
|
70
|
+
loadCookiesFromDatabase(): Promise<void>;
|
|
71
|
+
enableRefreshCookiesDetect(): void;
|
|
72
|
+
checkIfTokenNeedRefresh(refreshToken: string, csrf: string, times?: number): Promise<void>;
|
|
69
73
|
}
|
|
70
74
|
declare namespace BiliAPI {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
interface Config {
|
|
76
|
+
userAgent: string;
|
|
77
|
+
key: string;
|
|
78
|
+
}
|
|
79
|
+
const Config: Schema<Config>;
|
|
76
80
|
}
|
|
77
|
-
|
|
81
|
+
//#endregion
|
|
82
|
+
export { BiliAPI as default };
|