koishi-plugin-video-parser-all 0.4.4 → 0.4.6

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