@ikenxuan/amagi 5.12.1 → 5.13.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.
- package/dist/default/index.cjs +447 -280
- package/dist/default/index.d.cts +145 -31
- package/dist/default/index.d.cts.map +1 -0
- package/dist/default/index.d.ts +145 -31
- package/dist/default/index.d.ts.map +1 -0
- package/dist/default/index.js +443 -278
- package/dist/default/index.js.map +1 -0
- package/package.json +17 -16
package/dist/default/index.d.cts
CHANGED
|
@@ -2157,6 +2157,20 @@ interface BilibiliMethodOptionsMap {
|
|
|
2157
2157
|
*/
|
|
2158
2158
|
id: string;
|
|
2159
2159
|
};
|
|
2160
|
+
/**
|
|
2161
|
+
* 实时弹幕参数
|
|
2162
|
+
* @see https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/danmaku/danmaku_proto.md
|
|
2163
|
+
*/
|
|
2164
|
+
DanmakuParams: {
|
|
2165
|
+
methodType: '实时弹幕';
|
|
2166
|
+
/** 稿件cid */
|
|
2167
|
+
cid: number;
|
|
2168
|
+
/**
|
|
2169
|
+
* 分段序号(从1开始),每6分钟为一段
|
|
2170
|
+
* @defaultValue 1
|
|
2171
|
+
*/
|
|
2172
|
+
segment_index?: number;
|
|
2173
|
+
};
|
|
2160
2174
|
/** 从_v_voucher_申请_captcha */
|
|
2161
2175
|
ApplyVoucherCaptchaParams: {
|
|
2162
2176
|
methodType: '从_v_voucher_申请_captcha';
|
|
@@ -2261,6 +2275,7 @@ type BilibiliMethodOptMap = {
|
|
|
2261
2275
|
文集基本信息: BilibiliMethodOptionsMap['ColumnInfoParams'];
|
|
2262
2276
|
从_v_voucher_申请_captcha: BilibiliMethodOptionsMap['ApplyVoucherCaptchaParams'];
|
|
2263
2277
|
验证验证码结果: BilibiliMethodOptionsMap['ValidateCaptchaParams'];
|
|
2278
|
+
实时弹幕: BilibiliMethodOptionsMap['DanmakuParams'];
|
|
2264
2279
|
};
|
|
2265
2280
|
//#endregion
|
|
2266
2281
|
//#region src/validation/bilibili.d.ts
|
|
@@ -2285,6 +2300,7 @@ declare const BilibiliArticleInfoParamsSchema: zod.ZodType<BilibiliMethodOptions
|
|
|
2285
2300
|
declare const BilibiliColumnInfoParamsSchema: zod.ZodType<BilibiliMethodOptionsMap['ColumnInfoParams']>;
|
|
2286
2301
|
declare const BilibiliApplyCaptchaParamsSchema: zod.ZodType<BilibiliMethodOptionsMap['ApplyVoucherCaptchaParams']>;
|
|
2287
2302
|
declare const BilibiliValidateCaptchaParamsSchema: zod.ZodType<BilibiliMethodOptionsMap['ValidateCaptchaParams']>;
|
|
2303
|
+
declare const BilibiliDanmakuParamsSchema: zod.ZodType<BilibiliMethodOptionsMap['DanmakuParams']>;
|
|
2288
2304
|
declare const BilibiliValidationSchemas: {
|
|
2289
2305
|
readonly 单个视频作品数据: zod.ZodType<{
|
|
2290
2306
|
methodType: "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E";
|
|
@@ -2498,6 +2514,15 @@ declare const BilibiliValidationSchemas: {
|
|
|
2498
2514
|
validate: string;
|
|
2499
2515
|
seccode: string;
|
|
2500
2516
|
}, unknown>>;
|
|
2517
|
+
readonly 实时弹幕: zod.ZodType<{
|
|
2518
|
+
methodType: "\u5B9E\u65F6\u5F39\u5E55";
|
|
2519
|
+
cid: number;
|
|
2520
|
+
segment_index?: number;
|
|
2521
|
+
}, unknown, zod.core.$ZodTypeInternals<{
|
|
2522
|
+
methodType: "\u5B9E\u65F6\u5F39\u5E55";
|
|
2523
|
+
cid: number;
|
|
2524
|
+
segment_index?: number;
|
|
2525
|
+
}, unknown>>;
|
|
2501
2526
|
};
|
|
2502
2527
|
declare const BilibiliMethodRoutes: {
|
|
2503
2528
|
readonly 单个视频作品数据: "/fetch_one_video";
|
|
@@ -2526,6 +2551,7 @@ declare const BilibiliMethodRoutes: {
|
|
|
2526
2551
|
readonly 文集基本信息: "/fetch_column_info";
|
|
2527
2552
|
readonly 从_v_voucher_申请_captcha: "/apply_captcha";
|
|
2528
2553
|
readonly 验证验证码结果: "/validate_captcha";
|
|
2554
|
+
readonly 实时弹幕: "/fetch_danmaku";
|
|
2529
2555
|
};
|
|
2530
2556
|
type BilibiliMethodType = keyof typeof BilibiliValidationSchemas;
|
|
2531
2557
|
//#endregion
|
|
@@ -3410,12 +3436,12 @@ declare enum xiaohongshuAPIErrorCode {
|
|
|
3410
3436
|
//#region src/types/ReturnDataType/Bilibili/ArticleCard.d.ts
|
|
3411
3437
|
type ArticleCard = {
|
|
3412
3438
|
code: number;
|
|
3413
|
-
data: DataData$
|
|
3439
|
+
data: DataData$27;
|
|
3414
3440
|
message: string;
|
|
3415
3441
|
ttl: number;
|
|
3416
3442
|
[property: string]: any;
|
|
3417
3443
|
};
|
|
3418
|
-
type DataData$
|
|
3444
|
+
type DataData$27 = {
|
|
3419
3445
|
av2: Av2;
|
|
3420
3446
|
cv1: Cv1;
|
|
3421
3447
|
cv2: Cv2;
|
|
@@ -3774,12 +3800,12 @@ type Lv5440 = {
|
|
|
3774
3800
|
//#region src/types/ReturnDataType/Bilibili/ArticleContent.d.ts
|
|
3775
3801
|
type ArticleContent = {
|
|
3776
3802
|
code: number;
|
|
3777
|
-
data: DataData$
|
|
3803
|
+
data: DataData$26;
|
|
3778
3804
|
message: string;
|
|
3779
3805
|
ttl: number;
|
|
3780
3806
|
[property: string]: any;
|
|
3781
3807
|
};
|
|
3782
|
-
type DataData$
|
|
3808
|
+
type DataData$26 = {
|
|
3783
3809
|
act_id: number;
|
|
3784
3810
|
apply_time: string;
|
|
3785
3811
|
authenMark: null;
|
|
@@ -3991,12 +4017,12 @@ type Stats$1 = {
|
|
|
3991
4017
|
//#region src/types/ReturnDataType/Bilibili/ArticleInfo.d.ts
|
|
3992
4018
|
type ArticleInfo = {
|
|
3993
4019
|
code: number;
|
|
3994
|
-
data: DataData$
|
|
4020
|
+
data: DataData$25;
|
|
3995
4021
|
message: string;
|
|
3996
4022
|
ttl: number;
|
|
3997
4023
|
[property: string]: any;
|
|
3998
4024
|
};
|
|
3999
|
-
type DataData$
|
|
4025
|
+
type DataData$25 = {
|
|
4000
4026
|
attention: boolean;
|
|
4001
4027
|
author_name: string;
|
|
4002
4028
|
banner_url: string;
|
|
@@ -4762,12 +4788,12 @@ type Setting = {
|
|
|
4762
4788
|
//#region src/types/ReturnDataType/Bilibili/BiliCommentReply.d.ts
|
|
4763
4789
|
type BiliCommentReply = {
|
|
4764
4790
|
code: number;
|
|
4765
|
-
data: DataData$
|
|
4791
|
+
data: DataData$24;
|
|
4766
4792
|
message: string;
|
|
4767
4793
|
ttl: number;
|
|
4768
4794
|
[property: string]: any;
|
|
4769
4795
|
};
|
|
4770
|
-
type DataData$
|
|
4796
|
+
type DataData$24 = {
|
|
4771
4797
|
assist: number;
|
|
4772
4798
|
blacklist: number;
|
|
4773
4799
|
callbacks: {
|
|
@@ -5272,12 +5298,12 @@ type Data$13 = {
|
|
|
5272
5298
|
//#region src/types/ReturnDataType/Bilibili/Captcha/ApplyCaptcha.d.ts
|
|
5273
5299
|
type ApplyCaptcha = {
|
|
5274
5300
|
code: number;
|
|
5275
|
-
data: DataData$
|
|
5301
|
+
data: DataData$23;
|
|
5276
5302
|
message: string;
|
|
5277
5303
|
ttl: number;
|
|
5278
5304
|
[property: string]: any;
|
|
5279
5305
|
};
|
|
5280
|
-
type DataData$
|
|
5306
|
+
type DataData$23 = {
|
|
5281
5307
|
biliword: null;
|
|
5282
5308
|
geetest: Geetest;
|
|
5283
5309
|
phone: null;
|
|
@@ -5296,12 +5322,12 @@ type Geetest = {
|
|
|
5296
5322
|
//#region src/types/ReturnDataType/Bilibili/Captcha/ValidateCaptcha.d.ts
|
|
5297
5323
|
type ValidateCaptcha = {
|
|
5298
5324
|
code: number;
|
|
5299
|
-
data: DataData$
|
|
5325
|
+
data: DataData$22;
|
|
5300
5326
|
message: string;
|
|
5301
5327
|
ttl: number;
|
|
5302
5328
|
[property: string]: any;
|
|
5303
5329
|
};
|
|
5304
|
-
type DataData$
|
|
5330
|
+
type DataData$22 = {
|
|
5305
5331
|
grisk_id: string;
|
|
5306
5332
|
is_valid: number;
|
|
5307
5333
|
[property: string]: any;
|
|
@@ -5310,12 +5336,12 @@ type DataData$21 = {
|
|
|
5310
5336
|
//#region src/types/ReturnDataType/Bilibili/ColumnInfo.d.ts
|
|
5311
5337
|
type ColumnInfo = {
|
|
5312
5338
|
code: number;
|
|
5313
|
-
data: DataData$
|
|
5339
|
+
data: DataData$21;
|
|
5314
5340
|
message: string;
|
|
5315
5341
|
ttl: number;
|
|
5316
5342
|
[property: string]: any;
|
|
5317
5343
|
};
|
|
5318
|
-
type DataData$
|
|
5344
|
+
type DataData$21 = {
|
|
5319
5345
|
articles: null;
|
|
5320
5346
|
attention: boolean;
|
|
5321
5347
|
author: Author$6;
|
|
@@ -5564,12 +5590,12 @@ type DynamicTypeItemMap$1 = {
|
|
|
5564
5590
|
[DynamicType.FORWARD]: DynamicTypeForwardUnion['data']['item'];
|
|
5565
5591
|
[DynamicType.ARTICLE]: DynamicTypeArticle['data']['item'];
|
|
5566
5592
|
};
|
|
5567
|
-
type DataData$
|
|
5593
|
+
type DataData$20<T extends DynamicType> = {
|
|
5568
5594
|
item: DynamicTypeItemMap$1[T];
|
|
5569
5595
|
};
|
|
5570
5596
|
type BiliDynamicInfo<T extends DynamicType> = {
|
|
5571
5597
|
code: number;
|
|
5572
|
-
data: DataData$
|
|
5598
|
+
data: DataData$20<T>;
|
|
5573
5599
|
message: string;
|
|
5574
5600
|
ttl: number;
|
|
5575
5601
|
[property: string]: any;
|
|
@@ -5875,6 +5901,35 @@ type UserGarb = {
|
|
|
5875
5901
|
[property: string]: any;
|
|
5876
5902
|
};
|
|
5877
5903
|
//#endregion
|
|
5904
|
+
//#region src/types/ReturnDataType/Bilibili/ProtobufDanmaku.d.ts
|
|
5905
|
+
type BiliProtobufDanmaku = {
|
|
5906
|
+
code: number;
|
|
5907
|
+
data: DataData$19;
|
|
5908
|
+
message: string;
|
|
5909
|
+
[property: string]: any;
|
|
5910
|
+
};
|
|
5911
|
+
type DataData$19 = {
|
|
5912
|
+
elems: Elem[];
|
|
5913
|
+
[property: string]: any;
|
|
5914
|
+
};
|
|
5915
|
+
type Elem = {
|
|
5916
|
+
action: string;
|
|
5917
|
+
animation: string;
|
|
5918
|
+
attr: number;
|
|
5919
|
+
color: number;
|
|
5920
|
+
content: string;
|
|
5921
|
+
ctime: string;
|
|
5922
|
+
fontsize: number;
|
|
5923
|
+
id: string;
|
|
5924
|
+
idStr: string;
|
|
5925
|
+
midHash: string;
|
|
5926
|
+
mode: number;
|
|
5927
|
+
pool: number;
|
|
5928
|
+
progress: number;
|
|
5929
|
+
weight: number;
|
|
5930
|
+
[property: string]: any;
|
|
5931
|
+
};
|
|
5932
|
+
//#endregion
|
|
5878
5933
|
//#region src/types/ReturnDataType/Bilibili/UserDynamic.d.ts
|
|
5879
5934
|
type BiliUserDynamic = {
|
|
5880
5935
|
code: number;
|
|
@@ -11926,6 +11981,7 @@ interface BilibiliReturnTypeMap {
|
|
|
11926
11981
|
文集基本信息: ColumnInfo;
|
|
11927
11982
|
从_v_voucher_申请_captcha: ApplyCaptcha;
|
|
11928
11983
|
验证验证码结果: ValidateCaptcha;
|
|
11984
|
+
实时弹幕: BiliProtobufDanmaku;
|
|
11929
11985
|
}
|
|
11930
11986
|
//#endregion
|
|
11931
11987
|
//#region src/types/ReturnDataType/Douyin/CommentReply.d.ts
|
|
@@ -21094,6 +21150,14 @@ declare const av2bv: (aid: number) => `BV1${string}`;
|
|
|
21094
21150
|
*/
|
|
21095
21151
|
declare const bv2av: (bvid: string) => number;
|
|
21096
21152
|
//#endregion
|
|
21153
|
+
//#region src/platform/bilibili/sign/danmaku_proto.d.ts
|
|
21154
|
+
/**
|
|
21155
|
+
* 解析弹幕分段响应
|
|
21156
|
+
* @param data - 二进制 protobuf 数据
|
|
21157
|
+
* @returns 解析后的弹幕数据
|
|
21158
|
+
*/
|
|
21159
|
+
declare function parseDmSegMobileReply(data: ArrayBuffer | Uint8Array): BiliProtobufDanmaku['data']['elems'][number];
|
|
21160
|
+
//#endregion
|
|
21097
21161
|
//#region src/platform/bilibili/API.d.ts
|
|
21098
21162
|
type BilibiliMethodOptionsWithoutMethodType = { [K in keyof BilibiliMethodOptionsMap]: OmitMethodType<BilibiliMethodOptionsMap[K]> };
|
|
21099
21163
|
declare class BiLiBiLiAPI {
|
|
@@ -21139,6 +21203,11 @@ declare class BiLiBiLiAPI {
|
|
|
21139
21203
|
seccode: string;
|
|
21140
21204
|
};
|
|
21141
21205
|
};
|
|
21206
|
+
/**
|
|
21207
|
+
* 获取实时弹幕(web端 protobuf 接口)
|
|
21208
|
+
* @see https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/danmaku/danmaku_proto.md
|
|
21209
|
+
*/
|
|
21210
|
+
实时弹幕(data: BilibiliMethodOptionsWithoutMethodType['DanmakuParams']): string;
|
|
21142
21211
|
}
|
|
21143
21212
|
/** 该类下的所有方法只会返回拼接好参数后的 Url 地址,需要手动请求该地址以获取数据 */
|
|
21144
21213
|
declare const bilibiliApiUrls: BiLiBiLiAPI;
|
|
@@ -21622,6 +21691,22 @@ declare const bilibili: {
|
|
|
21622
21691
|
} & {
|
|
21623
21692
|
typeMode?: M | undefined;
|
|
21624
21693
|
}, cookie?: string) => Promise<Result<ConditionalReturnType<ValidateCaptcha, M>>>;
|
|
21694
|
+
/**
|
|
21695
|
+
* 获取实时弹幕
|
|
21696
|
+
* @param options 请求参数,包含 cid 和可选的 segment_index
|
|
21697
|
+
* @param cookie 有效的用户 Cookie
|
|
21698
|
+
* @returns 统一格式的API响应,包含弹幕列表
|
|
21699
|
+
* @see https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/danmaku/danmaku_proto.md
|
|
21700
|
+
*/
|
|
21701
|
+
getDanmaku: <M extends TypeMode>(options: Omit<{
|
|
21702
|
+
methodType: "\u5B9E\u65F6\u5F39\u5E55";
|
|
21703
|
+
cid: number;
|
|
21704
|
+
segment_index?: number;
|
|
21705
|
+
}, "methodType"> & {
|
|
21706
|
+
typeMode?: TypeMode;
|
|
21707
|
+
} & {
|
|
21708
|
+
typeMode?: M | undefined;
|
|
21709
|
+
}, cookie?: string) => Promise<Result<ConditionalReturnType<BiliProtobufDanmaku, M>>>;
|
|
21625
21710
|
};
|
|
21626
21711
|
/**
|
|
21627
21712
|
* 创建绑定了cookie的B站API对象
|
|
@@ -21982,6 +22067,21 @@ declare const createBoundBilibiliApi: (cookie: string, requestConfig: RequestCon
|
|
|
21982
22067
|
} & {
|
|
21983
22068
|
typeMode?: M | undefined;
|
|
21984
22069
|
}) => Promise<Result<ConditionalReturnType<ValidateCaptcha, M>>>;
|
|
22070
|
+
/**
|
|
22071
|
+
* 获取实时弹幕
|
|
22072
|
+
* @param options 请求参数,包含 cid 和可选的 segment_index
|
|
22073
|
+
* @returns 统一格式的API响应,包含弹幕列表
|
|
22074
|
+
* @see https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/danmaku/danmaku_proto.md
|
|
22075
|
+
*/
|
|
22076
|
+
getDanmaku: <M extends TypeMode>(options: Omit<{
|
|
22077
|
+
methodType: "\u5B9E\u65F6\u5F39\u5E55";
|
|
22078
|
+
cid: number;
|
|
22079
|
+
segment_index?: number;
|
|
22080
|
+
}, "methodType"> & {
|
|
22081
|
+
typeMode?: TypeMode;
|
|
22082
|
+
} & {
|
|
22083
|
+
typeMode?: M | undefined;
|
|
22084
|
+
}) => Promise<Result<ConditionalReturnType<BiliProtobufDanmaku, M>>>;
|
|
21985
22085
|
};
|
|
21986
22086
|
/**
|
|
21987
22087
|
* 绑定cookie的B站API对象类型
|
|
@@ -22087,6 +22187,11 @@ type bilibiliUtilsModel = {
|
|
|
22087
22187
|
/** BV号转AV号 */
|
|
22088
22188
|
bv2av: typeof bv2av;
|
|
22089
22189
|
};
|
|
22190
|
+
/** 弹幕解析相关 */
|
|
22191
|
+
danmaku: {
|
|
22192
|
+
/** 解析弹幕 protobuf 数据 */
|
|
22193
|
+
parseDmSegMobileReply: typeof parseDmSegMobileReply;
|
|
22194
|
+
};
|
|
22090
22195
|
/** 该类下的所有方法只会返回拼接好参数后的 Url 地址,需要手动请求该地址以获取数据 */
|
|
22091
22196
|
bilibiliApiUrls: typeof bilibiliApiUrls;
|
|
22092
22197
|
/**
|
|
@@ -22781,27 +22886,17 @@ declare class xiaohongshuSign {
|
|
|
22781
22886
|
* @returns X-S签名
|
|
22782
22887
|
*/
|
|
22783
22888
|
static generateXSPost(path: string, a1Cookie: string, clientType?: string, body?: Record<string, any>): string;
|
|
22784
|
-
/**
|
|
22785
|
-
* 生成X-S签名(兼容旧接口)
|
|
22786
|
-
* @param url - 请求URL
|
|
22787
|
-
* @param body - 请求体
|
|
22788
|
-
* @param userAgent - User-Agent(暂未使用)
|
|
22789
|
-
* @param method - 请求方法,默认为 'POST'
|
|
22790
|
-
* @param a1Cookie - a1 cookie值
|
|
22791
|
-
* @returns X-S签名
|
|
22792
|
-
*/
|
|
22793
|
-
static generateXS(url: string, body: any, userAgent: string, method?: string, a1Cookie?: string): string;
|
|
22794
22889
|
/**
|
|
22795
22890
|
* 生成X-S-Common参数
|
|
22796
|
-
* @param
|
|
22891
|
+
* @param cookies - cookie字符串
|
|
22797
22892
|
* @returns Base64编码的随机字符串
|
|
22798
22893
|
*/
|
|
22799
|
-
static generateXSCommon(
|
|
22894
|
+
static generateXSCommon(cookies: string): string;
|
|
22800
22895
|
/**
|
|
22801
22896
|
* 生成X-T时间戳
|
|
22802
22897
|
* @returns 当前时间戳字符串
|
|
22803
22898
|
*/
|
|
22804
|
-
static generateXT():
|
|
22899
|
+
static generateXT(): number;
|
|
22805
22900
|
/**
|
|
22806
22901
|
* 生成X-B3-Traceid
|
|
22807
22902
|
* @returns 16位随机字符串
|
|
@@ -23427,12 +23522,24 @@ declare const createAmagiClient: (options?: Options) => {
|
|
|
23427
23522
|
} & {
|
|
23428
23523
|
typeMode?: M | undefined;
|
|
23429
23524
|
}) => Promise<Result<ConditionalReturnType<ValidateCaptcha, M>>>;
|
|
23525
|
+
getDanmaku: <M extends TypeMode>(options: Omit<{
|
|
23526
|
+
methodType: "\u5B9E\u65F6\u5F39\u5E55";
|
|
23527
|
+
cid: number;
|
|
23528
|
+
segment_index?: number;
|
|
23529
|
+
}, "methodType"> & {
|
|
23530
|
+
typeMode?: TypeMode;
|
|
23531
|
+
} & {
|
|
23532
|
+
typeMode?: M | undefined;
|
|
23533
|
+
}) => Promise<Result<ConditionalReturnType<BiliProtobufDanmaku, M>>>;
|
|
23430
23534
|
};
|
|
23431
23535
|
sign: {
|
|
23432
23536
|
wbi_sign: typeof wbi_sign;
|
|
23433
23537
|
av2bv: typeof av2bv;
|
|
23434
23538
|
bv2av: typeof bv2av;
|
|
23435
23539
|
};
|
|
23540
|
+
danmaku: {
|
|
23541
|
+
parseDmSegMobileReply: typeof parseDmSegMobileReply;
|
|
23542
|
+
};
|
|
23436
23543
|
bilibiliApiUrls: typeof bilibiliApiUrls;
|
|
23437
23544
|
};
|
|
23438
23545
|
kuaishou: {
|
|
@@ -23755,8 +23862,11 @@ declare const handleError: (error: unknown, requestPath?: string) => {
|
|
|
23755
23862
|
};
|
|
23756
23863
|
//#endregion
|
|
23757
23864
|
//#region src/model/logger.d.ts
|
|
23865
|
+
/** 初始化 logger 配置 */
|
|
23866
|
+
declare const initLogger: () => void;
|
|
23758
23867
|
declare class CustomLogger {
|
|
23759
23868
|
private logger;
|
|
23869
|
+
private queue;
|
|
23760
23870
|
chalk: ChalkInstance;
|
|
23761
23871
|
red: (text: string) => string;
|
|
23762
23872
|
green: (text: string) => string;
|
|
@@ -23767,6 +23877,8 @@ declare class CustomLogger {
|
|
|
23767
23877
|
white: (text: string) => string;
|
|
23768
23878
|
gray: (text: string) => string;
|
|
23769
23879
|
constructor(name: string);
|
|
23880
|
+
private flush;
|
|
23881
|
+
private proxy;
|
|
23770
23882
|
info(message: any, ...args: any[]): void;
|
|
23771
23883
|
warn(message: any, ...args: any[]): void;
|
|
23772
23884
|
error(message: any, ...args: any[]): void;
|
|
@@ -23801,7 +23913,8 @@ declare const fetchResponse: <T = unknown>(config: AxiosRequestConfig, maxRetrie
|
|
|
23801
23913
|
* 判断结果是否为网络错误响应
|
|
23802
23914
|
* @param result - 请求结果
|
|
23803
23915
|
* @returns 是否为ErrorResult
|
|
23804
|
-
*
|
|
23916
|
+
*
|
|
23917
|
+
* 通过检查 error 字段中的 amagiError 来区分网络错误和业务错误
|
|
23805
23918
|
*/
|
|
23806
23919
|
declare const isNetworkErrorResult: (result: unknown) => result is ErrorResult;
|
|
23807
23920
|
/**
|
|
@@ -23879,4 +23992,5 @@ declare const amagi: typeof Client;
|
|
|
23879
23992
|
*/
|
|
23880
23993
|
|
|
23881
23994
|
//#endregion
|
|
23882
|
-
export { APIErrorType, AdditionalType, ApiError, ApiResponse, ArticleCard, ArticleContent, ArticleInfo, BaseResponse, BiliAv2Bv, BiliBangumiVideoInfo, BiliBangumiVideoPlayurlIsLogin, BiliBangumiVideoPlayurlNoLogin, BiliBiliVideoPlayurlNoLogin, BiliBv2AV, BiliCheckQrcode, BiliCommentReply, BiliDynamicCard, BiliDynamicInfo, BiliDynamicInfoUnion, BiliEmojiList, BiliLiveRoomDef, BiliLiveRoomDetail, BiliNewLoginQrcode, BiliOneWork, BiliUserDynamic, BiliUserFullView, BiliUserProfile, BiliVideoPlayurlIsLogin, BiliWorkComments, BilibiliApplyCaptchaParamsSchema, BilibiliArticleCardParamsSchema, BilibiliArticleInfoParamsSchema, BilibiliArticleParamsSchema, BilibiliAv2BvParamsSchema, BilibiliBangumiInfoParamsSchema, BilibiliBangumiStreamParamsSchema, BilibiliBv2AvParamsSchema, BilibiliColumnInfoParamsSchema, BilibiliCommentParamsSchema, BilibiliCommentReplyParamsSchema, BilibiliDataOptions, BilibiliDataOptionsMap, BilibiliDynamicParamsSchema, BilibiliEmojiParamsSchema, BilibiliLiveParamsSchema, BilibiliLoginParamsSchema, BilibiliMethodOptMap, BilibiliMethodOptionsMap, BilibiliMethodRoutes, type BilibiliMethodType, BilibiliQrcodeParamsSchema, BilibiliQrcodeStatusParamsSchema, BilibiliReturnTypeMap, BilibiliUserParamsSchema, BilibiliValidateCaptchaParamsSchema, BilibiliValidationSchemas, BilibiliVideoDownloadParamsSchema, BilibiliVideoParamsSchema, BoundBilibiliApi, BoundDouyinApi, BoundKuaishouApi, BoundXiaohongshuApi, ColumnInfo, CommentReply, CommentType, CookieConfig, CreateApp, DouyinCommentParamsSchema, DouyinCommentReplyParamsSchema, DouyinDanmakuParamsSchema, DouyinDataOptions, DouyinDataOptionsMap, DouyinEmojiListParamsSchema, DouyinEmojiProParamsSchema, DouyinHotWordsParamsSchema, DouyinLiveRoomParamsSchema, DouyinMethodOptMap, DouyinMethodOptionsMap, DouyinMethodRoutes, type DouyinMethodType, DouyinMusicParamsSchema, DouyinQrcodeParamsSchema, DouyinReturnTypeMap, DouyinSearchParamsSchema, DouyinUserParamsSchema, DouyinValidationSchemas, DouyinWorkParamsSchema, DyDanmakuList, DyEmojiList, DyEmojiProList, DyImageAlbumWork, DyMusicWork, DySearchInfo, DySlidesWork, DySuggestWords, DyTextWork, DyUserInfo, DyUserLiveVideos, DyUserPostVideos, DyVideoWork, DyWorkComments, DynamicType, DynamicTypeAV, DynamicTypeArticle, DynamicTypeDraw, DynamicTypeForward, DynamicTypeForwardUnion, DynamicTypeLiveRcmd, DynamicTypeWord, ErrorResult, HomeFeed, KsEmojiList, KsOneWork, KsWorkComments, KuaishouCommentParamsSchema, KuaishouDataOptions, KuaishouDataOptionsMap, KuaishouEmojiParamsSchema, KuaishouMethodOptMap, KuaishouMethodOptionsMap, KuaishouMethodRoutes, type KuaishouMethodType, KuaishouReturnTypeMap, KuaishouValidationSchemas, KuaishouVideoParamsSchema, MajorType, type NetworksConfigType, NoteComments, OmitMethodType, OneNote, Options, RequestConfig, Result, SearchInfoGeneralData, SearchInfoUser, SearchInfoVideo, SearchNotes, SuccessResult, TypeControl, ValidationError, XiaohongshuDataOptions, XiaohongshuDataOptionsMap, XiaohongshuEmojiList, XiaohongshuMethodOptMap, XiaohongshuMethodOptionsMap, XiaohongshuMethodRoutes, XiaohongshuMethodType, XiaohongshuReturnTypeMap, XiaohongshuUserProfile, XiaohongshuValidationSchemas, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBilibiliRoutes as registerBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createBoundXiaohongshuApi, createDouyinRoutes, createDouyinRoutes as registerDouyinRoutes, createErrorResponse, createKuaishouRoutes, createKuaishouRoutes as registerKuaishouRoutes, createSuccessResponse, createXiaohongshuRoutes, createXiaohongshuRoutes as registerXiaohongshuRoutes, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, isNetworkErrorResult, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, validateXiaohongshuParams, wbi_sign, xiaohongshu, xiaohongshuApiUrls, xiaohongshuSign, xiaohongshuUtils };
|
|
23995
|
+
export { APIErrorType, AdditionalType, ApiError, ApiResponse, ArticleCard, ArticleContent, ArticleInfo, BaseResponse, BiliAv2Bv, BiliBangumiVideoInfo, BiliBangumiVideoPlayurlIsLogin, BiliBangumiVideoPlayurlNoLogin, BiliBiliVideoPlayurlNoLogin, BiliBv2AV, BiliCheckQrcode, BiliCommentReply, BiliDynamicCard, BiliDynamicInfo, BiliDynamicInfoUnion, BiliEmojiList, BiliLiveRoomDef, BiliLiveRoomDetail, BiliNewLoginQrcode, BiliOneWork, BiliProtobufDanmaku, BiliUserDynamic, BiliUserFullView, BiliUserProfile, BiliVideoPlayurlIsLogin, BiliWorkComments, BilibiliApplyCaptchaParamsSchema, BilibiliArticleCardParamsSchema, BilibiliArticleInfoParamsSchema, BilibiliArticleParamsSchema, BilibiliAv2BvParamsSchema, BilibiliBangumiInfoParamsSchema, BilibiliBangumiStreamParamsSchema, BilibiliBv2AvParamsSchema, BilibiliColumnInfoParamsSchema, BilibiliCommentParamsSchema, BilibiliCommentReplyParamsSchema, BilibiliDanmakuParamsSchema, BilibiliDataOptions, BilibiliDataOptionsMap, BilibiliDynamicParamsSchema, BilibiliEmojiParamsSchema, BilibiliLiveParamsSchema, BilibiliLoginParamsSchema, BilibiliMethodOptMap, BilibiliMethodOptionsMap, BilibiliMethodRoutes, type BilibiliMethodType, BilibiliQrcodeParamsSchema, BilibiliQrcodeStatusParamsSchema, BilibiliReturnTypeMap, BilibiliUserParamsSchema, BilibiliValidateCaptchaParamsSchema, BilibiliValidationSchemas, BilibiliVideoDownloadParamsSchema, BilibiliVideoParamsSchema, BoundBilibiliApi, BoundDouyinApi, BoundKuaishouApi, BoundXiaohongshuApi, ColumnInfo, CommentReply, CommentType, CookieConfig, CreateApp, DouyinCommentParamsSchema, DouyinCommentReplyParamsSchema, DouyinDanmakuParamsSchema, DouyinDataOptions, DouyinDataOptionsMap, DouyinEmojiListParamsSchema, DouyinEmojiProParamsSchema, DouyinHotWordsParamsSchema, DouyinLiveRoomParamsSchema, DouyinMethodOptMap, DouyinMethodOptionsMap, DouyinMethodRoutes, type DouyinMethodType, DouyinMusicParamsSchema, DouyinQrcodeParamsSchema, DouyinReturnTypeMap, DouyinSearchParamsSchema, DouyinUserParamsSchema, DouyinValidationSchemas, DouyinWorkParamsSchema, DyDanmakuList, DyEmojiList, DyEmojiProList, DyImageAlbumWork, DyMusicWork, DySearchInfo, DySlidesWork, DySuggestWords, DyTextWork, DyUserInfo, DyUserLiveVideos, DyUserPostVideos, DyVideoWork, DyWorkComments, DynamicType, DynamicTypeAV, DynamicTypeArticle, DynamicTypeDraw, DynamicTypeForward, DynamicTypeForwardUnion, DynamicTypeLiveRcmd, DynamicTypeWord, ErrorResult, HomeFeed, KsEmojiList, KsOneWork, KsWorkComments, KuaishouCommentParamsSchema, KuaishouDataOptions, KuaishouDataOptionsMap, KuaishouEmojiParamsSchema, KuaishouMethodOptMap, KuaishouMethodOptionsMap, KuaishouMethodRoutes, type KuaishouMethodType, KuaishouReturnTypeMap, KuaishouValidationSchemas, KuaishouVideoParamsSchema, MajorType, type NetworksConfigType, NoteComments, OmitMethodType, OneNote, Options, RequestConfig, Result, SearchInfoGeneralData, SearchInfoUser, SearchInfoVideo, SearchNotes, SuccessResult, TypeControl, ValidationError, XiaohongshuDataOptions, XiaohongshuDataOptionsMap, XiaohongshuEmojiList, XiaohongshuMethodOptMap, XiaohongshuMethodOptionsMap, XiaohongshuMethodRoutes, XiaohongshuMethodType, XiaohongshuReturnTypeMap, XiaohongshuUserProfile, XiaohongshuValidationSchemas, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBilibiliRoutes as registerBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createBoundXiaohongshuApi, createDouyinRoutes, createDouyinRoutes as registerDouyinRoutes, createErrorResponse, createKuaishouRoutes, createKuaishouRoutes as registerKuaishouRoutes, createSuccessResponse, createXiaohongshuRoutes, createXiaohongshuRoutes as registerXiaohongshuRoutes, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, initLogger, isNetworkErrorResult, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, parseDmSegMobileReply, qtparam, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, validateXiaohongshuParams, wbi_sign, xiaohongshu, xiaohongshuApiUrls, xiaohongshuSign, xiaohongshuUtils };
|
|
23996
|
+
//# sourceMappingURL=index.d.cts.map
|