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