koishi-plugin-video-parser-all 0.4.9 → 0.5.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.
Files changed (3) hide show
  1. package/lib/index.d.ts +11 -91
  2. package/lib/index.js +308 -830
  3. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -1,42 +1,22 @@
1
- import { Schema, Context } from 'koishi';
1
+ import { Context, Schema } from 'koishi';
2
2
  export declare const name = "video-parser-all";
3
3
  export declare const Config: Schema<{
4
4
  enable?: boolean | null | undefined;
5
- autoParse?: boolean | null | undefined;
6
- enableBvAvParse?: boolean | null | undefined;
7
5
  botName?: string | null | undefined;
8
6
  showWaitingTip?: boolean | null | undefined;
9
7
  waitingTipText?: string | null | undefined;
10
8
  sameLinkInterval?: number | null | undefined;
11
- maxVideoSize?: number | null | undefined;
12
- downloadThreads?: number | null | undefined;
13
- enableApiSelection?: boolean | null | undefined;
14
- debugMode?: boolean | null | undefined;
15
- logLevel?: "info" | "warn" | "error" | "debug" | null | undefined;
16
9
  } & import("cosmokit").Dict & {
17
- platformEnable?: ({
18
- bilibili?: boolean | null | undefined;
19
- douyin?: boolean | null | undefined;
20
- kuaishou?: boolean | null | undefined;
21
- xiaohongshu?: boolean | null | undefined;
22
- weibo?: boolean | null | undefined;
23
- toutiao?: boolean | null | undefined;
24
- pipigx?: boolean | null | undefined;
25
- pipixia?: boolean | null | undefined;
26
- zuiyou?: boolean | null | undefined;
27
- } & import("cosmokit").Dict) | null | undefined;
28
- } & {
29
- messageFormat?: string | null | undefined;
10
+ unifiedMessageFormat?: string | null | undefined;
30
11
  } & {
31
12
  showImageText?: boolean | null | undefined;
32
13
  showVideoFile?: boolean | null | undefined;
33
14
  } & {
34
15
  maxDescLength?: number | null | undefined;
35
- } & ({
16
+ } & {
36
17
  timeout?: number | null | undefined;
37
18
  videoSendTimeout?: number | null | undefined;
38
19
  userAgent?: string | null | undefined;
39
- bilibiliAccessKey?: string | null | undefined;
40
20
  } & {
41
21
  ignoreSendError?: boolean | null | undefined;
42
22
  retryTimes?: number | null | undefined;
@@ -44,62 +24,27 @@ export declare const Config: Schema<{
44
24
  } & {
45
25
  enableForward?: boolean | null | undefined;
46
26
  downloadVideoBeforeSend?: boolean | null | undefined;
47
- } & ({
27
+ } & {
48
28
  messageBufferDelay?: number | null | undefined;
49
- } & ({
29
+ } & {
50
30
  autoClearCacheInterval?: number | null | undefined;
51
- } & (({
52
- enableApiSelection?: false | null | undefined;
53
- } & import("cosmokit").Dict) | ({
54
- enableApiSelection?: true | null | undefined;
55
- preferredApi?: ({
56
- bilibili?: "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view" | null | undefined;
57
- douyin?: "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive" | null | undefined;
58
- kuaishou?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php" | null | undefined;
59
- xiaohongshu?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs" | null | undefined;
60
- weibo?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v" | null | undefined;
61
- toutiao?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao" | null | undefined;
62
- pipigx?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php" | null | undefined;
63
- pipixia?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia" | null | undefined;
64
- zuiyou?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php" | null | undefined;
65
- } & import("cosmokit").Dict) | null | undefined;
66
- } & import("cosmokit").Dict))))), {
31
+ }, {
67
32
  enable: boolean;
68
- autoParse: boolean;
69
- enableBvAvParse: boolean;
70
33
  botName: string;
71
34
  showWaitingTip: boolean;
72
35
  waitingTipText: string;
73
36
  sameLinkInterval: number;
74
- maxVideoSize: number;
75
- downloadThreads: number;
76
- enableApiSelection: boolean;
77
- debugMode: boolean;
78
- logLevel: "info" | "warn" | "error" | "debug";
79
37
  } & import("cosmokit").Dict & {
80
- platformEnable: Schemastery.ObjectT<{
81
- bilibili: Schema<boolean, boolean>;
82
- douyin: Schema<boolean, boolean>;
83
- kuaishou: Schema<boolean, boolean>;
84
- xiaohongshu: Schema<boolean, boolean>;
85
- weibo: Schema<boolean, boolean>;
86
- toutiao: Schema<boolean, boolean>;
87
- pipigx: Schema<boolean, boolean>;
88
- pipixia: Schema<boolean, boolean>;
89
- zuiyou: Schema<boolean, boolean>;
90
- }>;
91
- } & {
92
- messageFormat: string;
38
+ unifiedMessageFormat: string;
93
39
  } & {
94
40
  showImageText: boolean;
95
41
  showVideoFile: boolean;
96
42
  } & {
97
43
  maxDescLength: number;
98
- } & ({
44
+ } & {
99
45
  timeout: number;
100
46
  videoSendTimeout: number;
101
47
  userAgent: string;
102
- bilibiliAccessKey: string;
103
48
  } & {
104
49
  ignoreSendError: boolean;
105
50
  retryTimes: number;
@@ -107,34 +52,9 @@ export declare const Config: Schema<{
107
52
  } & {
108
53
  enableForward: boolean;
109
54
  downloadVideoBeforeSend: boolean;
110
- } & ({
55
+ } & {
111
56
  messageBufferDelay: number;
112
- } & ({
57
+ } & {
113
58
  autoClearCacheInterval: number;
114
- } & (Schemastery.ObjectT<{
115
- enableApiSelection: Schema<false, false>;
116
- }> | Schemastery.ObjectT<{
117
- enableApiSelection: Schema<true, true>;
118
- preferredApi: Schema<Schemastery.ObjectS<{
119
- bilibili: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view", "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view">;
120
- douyin: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive", "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive">;
121
- kuaishou: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php">;
122
- xiaohongshu: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs">;
123
- weibo: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v">;
124
- toutiao: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao">;
125
- pipigx: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php">;
126
- pipixia: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia">;
127
- zuiyou: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php">;
128
- }>, Schemastery.ObjectT<{
129
- bilibili: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view", "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view">;
130
- douyin: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive", "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive">;
131
- kuaishou: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php">;
132
- xiaohongshu: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs">;
133
- weibo: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v">;
134
- toutiao: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao">;
135
- pipigx: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php">;
136
- pipixia: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia">;
137
- zuiyou: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php">;
138
- }>>;
139
- }>))))>;
59
+ }>;
140
60
  export declare function apply(ctx: Context, config: any): void;