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