@ikenxuan/amagi 5.0.4 → 5.1.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.
- package/dist/default/cjs/index.cjs +49 -4
- package/dist/default/esm/index.mjs +47 -4
- package/dist/default/index.d.ts +4589 -2496
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ var express__default = /*#__PURE__*/_interopDefault(express);
|
|
|
27
27
|
* GPL-3.0 Licensed
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
// node_modules/.pnpm/tsup@8.5.0_@swc+core@1.13.
|
|
30
|
+
// node_modules/.pnpm/tsup@8.5.0_@swc+core@1.13.4_tsx@4.20.4_typescript@5.9.2/node_modules/tsup/assets/cjs_shims.js
|
|
31
31
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
32
32
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
33
33
|
var getPackageLogsPath = () => {
|
|
@@ -226,8 +226,19 @@ var qtparam = async (BASEURL, cookie) => {
|
|
|
226
226
|
let isvip;
|
|
227
227
|
logininfo.data.vipStatus === 1 ? isvip = true : isvip = false;
|
|
228
228
|
if (isvip) {
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
const fnval = 4048;
|
|
230
|
+
return {
|
|
231
|
+
QUERY: `&fnval=${fnval}&fourk=1&${sign}`,
|
|
232
|
+
STATUS: "isLogin",
|
|
233
|
+
isvip
|
|
234
|
+
};
|
|
235
|
+
} else {
|
|
236
|
+
return {
|
|
237
|
+
QUERY: `&qn=${qn[3]}&fnval=16&${sign}`,
|
|
238
|
+
STATUS: "isLogin",
|
|
239
|
+
isvip
|
|
240
|
+
};
|
|
241
|
+
}
|
|
231
242
|
};
|
|
232
243
|
|
|
233
244
|
// src/platform/bilibili/sign/bv2av.ts
|
|
@@ -555,7 +566,7 @@ var fetchBilibili = async (data2, cookie, requestConfig) => {
|
|
|
555
566
|
}
|
|
556
567
|
case "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E": {
|
|
557
568
|
const BASEURL = bilibiliApiUrls.\u89C6\u9891\u6D41\u4FE1\u606F({ avid: data2.avid, cid: data2.cid });
|
|
558
|
-
const SIGN = await qtparam(BASEURL, (_a = baseRequestConfig.headers) == null ? void 0 : _a.
|
|
569
|
+
const SIGN = await qtparam(BASEURL, (_a = baseRequestConfig.headers) == null ? void 0 : _a.Cookie);
|
|
559
570
|
const DATA = await GlobalGetData(data2.methodType, {
|
|
560
571
|
...baseRequestConfig,
|
|
561
572
|
url: bilibiliApiUrls.\u89C6\u9891\u6D41\u4FE1\u606F({ avid: data2.avid, cid: data2.cid }) + SIGN.QUERY
|
|
@@ -3429,6 +3440,38 @@ var createAmagiClient = (options) => {
|
|
|
3429
3440
|
};
|
|
3430
3441
|
};
|
|
3431
3442
|
|
|
3443
|
+
// src/types/ReturnDataType/Bilibili/DynamicInfo.ts
|
|
3444
|
+
var DynamicType = /* @__PURE__ */ ((DynamicType2) => {
|
|
3445
|
+
DynamicType2["AV"] = "DYNAMIC_TYPE_AV";
|
|
3446
|
+
DynamicType2["DRAW"] = "DYNAMIC_TYPE_DRAW";
|
|
3447
|
+
DynamicType2["WORD"] = "DYNAMIC_TYPE_WORD";
|
|
3448
|
+
DynamicType2["LIVE_RCMD"] = "DYNAMIC_TYPE_LIVE_RCMD";
|
|
3449
|
+
DynamicType2["FORWARD"] = "DYNAMIC_TYPE_FORWARD";
|
|
3450
|
+
return DynamicType2;
|
|
3451
|
+
})(DynamicType || {});
|
|
3452
|
+
|
|
3453
|
+
// src/types/ReturnDataType/Bilibili/Dynamic/index.ts
|
|
3454
|
+
var MajorType = /* @__PURE__ */ ((MajorType2) => {
|
|
3455
|
+
MajorType2["NONE"] = "MAJOR_TYPE_NONE";
|
|
3456
|
+
MajorType2["OPUS"] = "MAJOR_TYPE_OPUS";
|
|
3457
|
+
MajorType2["ARCHIVE"] = "MAJOR_TYPE_ARCHIVE";
|
|
3458
|
+
MajorType2["PGC"] = "MAJOR_TYPE_PGC";
|
|
3459
|
+
MajorType2["COURSES"] = "MAJOR_TYPE_COURSES";
|
|
3460
|
+
MajorType2["DRAW"] = "MAJOR_TYPE_DRAW";
|
|
3461
|
+
MajorType2["ARTICLE"] = "MAJOR_TYPE_ARTICLE";
|
|
3462
|
+
MajorType2["MUSIC"] = "MAJOR_TYPE_MUSIC";
|
|
3463
|
+
MajorType2["COMMON"] = "MAJOR_TYPE_COMMON";
|
|
3464
|
+
MajorType2["LIVE"] = "MAJOR_TYPE_LIVE";
|
|
3465
|
+
MajorType2["MEDIALIST"] = "MAJOR_TYPE_MEDIALIST";
|
|
3466
|
+
MajorType2["APPLET"] = "MAJOR_TYPE_APPLET";
|
|
3467
|
+
MajorType2["SUBSCRIPTION"] = "MAJOR_TYPE_SUBSCRIPTION";
|
|
3468
|
+
MajorType2["LIVE_RCMD"] = "MAJOR_TYPE_LIVE_RCMD";
|
|
3469
|
+
MajorType2["UGC_SEASON"] = "MAJOR_TYPE_UGC_SEASON";
|
|
3470
|
+
MajorType2["SUBSCRIPTION_NEW"] = "MAJOR_TYPE_SUBSCRIPTION_NEW";
|
|
3471
|
+
MajorType2["UPOWER_COMMON"] = "MAJOR_TYPE_UPOWER_COMMON";
|
|
3472
|
+
return MajorType2;
|
|
3473
|
+
})(MajorType || {});
|
|
3474
|
+
|
|
3432
3475
|
// src/index.ts
|
|
3433
3476
|
var amagiClient = createAmagiClient;
|
|
3434
3477
|
function CreateAmagiApp(options = {}) {
|
|
@@ -3479,10 +3522,12 @@ exports.DouyinSearchParamsSchema = DouyinSearchParamsSchema;
|
|
|
3479
3522
|
exports.DouyinUserParamsSchema = DouyinUserParamsSchema;
|
|
3480
3523
|
exports.DouyinValidationSchemas = DouyinValidationSchemas2;
|
|
3481
3524
|
exports.DouyinWorkParamsSchema = DouyinWorkParamsSchema;
|
|
3525
|
+
exports.DynamicType = DynamicType;
|
|
3482
3526
|
exports.KuaishouCommentParamsSchema = KuaishouCommentParamsSchema;
|
|
3483
3527
|
exports.KuaishouEmojiParamsSchema = KuaishouEmojiParamsSchema;
|
|
3484
3528
|
exports.KuaishouValidationSchemas = KuaishouValidationSchemas2;
|
|
3485
3529
|
exports.KuaishouVideoParamsSchema = KuaishouVideoParamsSchema;
|
|
3530
|
+
exports.MajorType = MajorType;
|
|
3486
3531
|
exports.ValidationError = ValidationError;
|
|
3487
3532
|
exports.amagi = amagi;
|
|
3488
3533
|
exports.amagiClient = amagiClient;
|
|
@@ -210,8 +210,19 @@ var qtparam = async (BASEURL, cookie) => {
|
|
|
210
210
|
let isvip;
|
|
211
211
|
logininfo.data.vipStatus === 1 ? isvip = true : isvip = false;
|
|
212
212
|
if (isvip) {
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
const fnval = 4048;
|
|
214
|
+
return {
|
|
215
|
+
QUERY: `&fnval=${fnval}&fourk=1&${sign}`,
|
|
216
|
+
STATUS: "isLogin",
|
|
217
|
+
isvip
|
|
218
|
+
};
|
|
219
|
+
} else {
|
|
220
|
+
return {
|
|
221
|
+
QUERY: `&qn=${qn[3]}&fnval=16&${sign}`,
|
|
222
|
+
STATUS: "isLogin",
|
|
223
|
+
isvip
|
|
224
|
+
};
|
|
225
|
+
}
|
|
215
226
|
};
|
|
216
227
|
|
|
217
228
|
// src/platform/bilibili/sign/bv2av.ts
|
|
@@ -539,7 +550,7 @@ var fetchBilibili = async (data2, cookie, requestConfig) => {
|
|
|
539
550
|
}
|
|
540
551
|
case "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E": {
|
|
541
552
|
const BASEURL = bilibiliApiUrls.\u89C6\u9891\u6D41\u4FE1\u606F({ avid: data2.avid, cid: data2.cid });
|
|
542
|
-
const SIGN = await qtparam(BASEURL, (_a = baseRequestConfig.headers) == null ? void 0 : _a.
|
|
553
|
+
const SIGN = await qtparam(BASEURL, (_a = baseRequestConfig.headers) == null ? void 0 : _a.Cookie);
|
|
543
554
|
const DATA = await GlobalGetData(data2.methodType, {
|
|
544
555
|
...baseRequestConfig,
|
|
545
556
|
url: bilibiliApiUrls.\u89C6\u9891\u6D41\u4FE1\u606F({ avid: data2.avid, cid: data2.cid }) + SIGN.QUERY
|
|
@@ -3413,6 +3424,38 @@ var createAmagiClient = (options) => {
|
|
|
3413
3424
|
};
|
|
3414
3425
|
};
|
|
3415
3426
|
|
|
3427
|
+
// src/types/ReturnDataType/Bilibili/DynamicInfo.ts
|
|
3428
|
+
var DynamicType = /* @__PURE__ */ ((DynamicType2) => {
|
|
3429
|
+
DynamicType2["AV"] = "DYNAMIC_TYPE_AV";
|
|
3430
|
+
DynamicType2["DRAW"] = "DYNAMIC_TYPE_DRAW";
|
|
3431
|
+
DynamicType2["WORD"] = "DYNAMIC_TYPE_WORD";
|
|
3432
|
+
DynamicType2["LIVE_RCMD"] = "DYNAMIC_TYPE_LIVE_RCMD";
|
|
3433
|
+
DynamicType2["FORWARD"] = "DYNAMIC_TYPE_FORWARD";
|
|
3434
|
+
return DynamicType2;
|
|
3435
|
+
})(DynamicType || {});
|
|
3436
|
+
|
|
3437
|
+
// src/types/ReturnDataType/Bilibili/Dynamic/index.ts
|
|
3438
|
+
var MajorType = /* @__PURE__ */ ((MajorType2) => {
|
|
3439
|
+
MajorType2["NONE"] = "MAJOR_TYPE_NONE";
|
|
3440
|
+
MajorType2["OPUS"] = "MAJOR_TYPE_OPUS";
|
|
3441
|
+
MajorType2["ARCHIVE"] = "MAJOR_TYPE_ARCHIVE";
|
|
3442
|
+
MajorType2["PGC"] = "MAJOR_TYPE_PGC";
|
|
3443
|
+
MajorType2["COURSES"] = "MAJOR_TYPE_COURSES";
|
|
3444
|
+
MajorType2["DRAW"] = "MAJOR_TYPE_DRAW";
|
|
3445
|
+
MajorType2["ARTICLE"] = "MAJOR_TYPE_ARTICLE";
|
|
3446
|
+
MajorType2["MUSIC"] = "MAJOR_TYPE_MUSIC";
|
|
3447
|
+
MajorType2["COMMON"] = "MAJOR_TYPE_COMMON";
|
|
3448
|
+
MajorType2["LIVE"] = "MAJOR_TYPE_LIVE";
|
|
3449
|
+
MajorType2["MEDIALIST"] = "MAJOR_TYPE_MEDIALIST";
|
|
3450
|
+
MajorType2["APPLET"] = "MAJOR_TYPE_APPLET";
|
|
3451
|
+
MajorType2["SUBSCRIPTION"] = "MAJOR_TYPE_SUBSCRIPTION";
|
|
3452
|
+
MajorType2["LIVE_RCMD"] = "MAJOR_TYPE_LIVE_RCMD";
|
|
3453
|
+
MajorType2["UGC_SEASON"] = "MAJOR_TYPE_UGC_SEASON";
|
|
3454
|
+
MajorType2["SUBSCRIPTION_NEW"] = "MAJOR_TYPE_SUBSCRIPTION_NEW";
|
|
3455
|
+
MajorType2["UPOWER_COMMON"] = "MAJOR_TYPE_UPOWER_COMMON";
|
|
3456
|
+
return MajorType2;
|
|
3457
|
+
})(MajorType || {});
|
|
3458
|
+
|
|
3416
3459
|
// src/index.ts
|
|
3417
3460
|
var amagiClient = createAmagiClient;
|
|
3418
3461
|
function CreateAmagiApp(options = {}) {
|
|
@@ -3436,4 +3479,4 @@ var amagi = Client;
|
|
|
3436
3479
|
* GPL-3.0 Licensed
|
|
3437
3480
|
*/
|
|
3438
3481
|
|
|
3439
|
-
export { ApiError, BilibiliAv2BvParamsSchema, BilibiliBangumiInfoParamsSchema, BilibiliBangumiStreamParamsSchema, BilibiliBv2AvParamsSchema, BilibiliCommentParamsSchema, BilibiliDynamicParamsSchema, BilibiliEmojiParamsSchema, BilibiliLiveParamsSchema, BilibiliLoginParamsSchema, BilibiliQrcodeParamsSchema, BilibiliQrcodeStatusParamsSchema, BilibiliUserParamsSchema, BilibiliValidationSchemas2 as BilibiliValidationSchemas, BilibiliVideoDownloadParamsSchema, BilibiliVideoParamsSchema, CreateApp, DouyinCommentParamsSchema, DouyinCommentReplyParamsSchema, DouyinEmojiListParamsSchema, DouyinEmojiProParamsSchema, DouyinMusicParamsSchema, DouyinQrcodeParamsSchema, DouyinSearchParamsSchema, DouyinUserParamsSchema, DouyinValidationSchemas2 as DouyinValidationSchemas, DouyinWorkParamsSchema, KuaishouCommentParamsSchema, KuaishouEmojiParamsSchema, KuaishouValidationSchemas2 as KuaishouValidationSchemas, KuaishouVideoParamsSchema, ValidationError, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createDouyinRoutes, createErrorResponse, createKuaishouRoutes, createSuccessResponse, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, createBilibiliRoutes as registerBilibiliRoutes, createDouyinRoutes as registerDouyinRoutes, createKuaishouRoutes as registerKuaishouRoutes, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, wbi_sign };
|
|
3482
|
+
export { ApiError, BilibiliAv2BvParamsSchema, BilibiliBangumiInfoParamsSchema, BilibiliBangumiStreamParamsSchema, BilibiliBv2AvParamsSchema, BilibiliCommentParamsSchema, BilibiliDynamicParamsSchema, BilibiliEmojiParamsSchema, BilibiliLiveParamsSchema, BilibiliLoginParamsSchema, BilibiliQrcodeParamsSchema, BilibiliQrcodeStatusParamsSchema, BilibiliUserParamsSchema, BilibiliValidationSchemas2 as BilibiliValidationSchemas, BilibiliVideoDownloadParamsSchema, BilibiliVideoParamsSchema, CreateApp, DouyinCommentParamsSchema, DouyinCommentReplyParamsSchema, DouyinEmojiListParamsSchema, DouyinEmojiProParamsSchema, DouyinMusicParamsSchema, DouyinQrcodeParamsSchema, DouyinSearchParamsSchema, DouyinUserParamsSchema, DouyinValidationSchemas2 as DouyinValidationSchemas, DouyinWorkParamsSchema, DynamicType, KuaishouCommentParamsSchema, KuaishouEmojiParamsSchema, KuaishouValidationSchemas2 as KuaishouValidationSchemas, KuaishouVideoParamsSchema, MajorType, ValidationError, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createDouyinRoutes, createErrorResponse, createKuaishouRoutes, createSuccessResponse, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, createBilibiliRoutes as registerBilibiliRoutes, createDouyinRoutes as registerDouyinRoutes, createKuaishouRoutes as registerKuaishouRoutes, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, wbi_sign };
|