@iflyrpa/actions 4.0.1 → 4.0.2-beta.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/bundle.js +200 -105
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +200 -105
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +200 -105
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -8736,9 +8736,7 @@ var __webpack_exports__ = {};
|
|
|
8736
8736
|
var package_namespaceObject = {
|
|
8737
8737
|
i8: "0.1.2"
|
|
8738
8738
|
};
|
|
8739
|
-
var package_namespaceObject_0 = {
|
|
8740
|
-
i8: "4.0.1"
|
|
8741
|
-
};
|
|
8739
|
+
var package_namespaceObject_0 = JSON.parse('{"i8":"4.0.2-beta.0"}');
|
|
8742
8740
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
8743
8741
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
8744
8742
|
const external_node_http_namespaceObject = require("node:http");
|
|
@@ -29020,6 +29018,7 @@ var __webpack_exports__ = {};
|
|
|
29020
29018
|
platform: "baijiahao",
|
|
29021
29019
|
publishParams: publishData
|
|
29022
29020
|
});
|
|
29021
|
+
task.logger.info(`[baijiahaoPublish] publishResult: ${JSON.stringify(res)} `);
|
|
29023
29022
|
const isSuccess = 0 === res.errno;
|
|
29024
29023
|
const data = res?.ret?.article_id;
|
|
29025
29024
|
const message = isSuccess ? isDraft ? "文章同步成功!" : `文章发布成功!${res.proxyInfo || ""}` : res.errmsg || (isDraft ? "文章同步失败,请稍后重试。" : "文章发布失败,请稍后重试。");
|
|
@@ -34783,7 +34782,6 @@ var __webpack_exports__ = {};
|
|
|
34783
34782
|
}
|
|
34784
34783
|
publishData.item.common.creation_id = generateRandomString(8) + Date.now();
|
|
34785
34784
|
let decision = null;
|
|
34786
|
-
task.logger.info(`[douyinPublish] proxyHttp 代理信息: ${proxyHttp.proxyInfo} `);
|
|
34787
34785
|
proxyHttp.addResponseInterceptor((response)=>{
|
|
34788
34786
|
console.log("拦截器收到响应:", JSON.stringify(response.data));
|
|
34789
34787
|
task.logger.warn(`[douyinPublish] 拦截器收到响应response.headers: ${JSON.stringify(response.headers)} `);
|
|
@@ -34927,9 +34925,6 @@ var __webpack_exports__ = {};
|
|
|
34927
34925
|
task.logger.error(`生成 sessionDtrait 失败: ${error}`);
|
|
34928
34926
|
return utils_response(414, "安全参数 sessionDtrait 生成异常,请重试", "");
|
|
34929
34927
|
}
|
|
34930
|
-
task.logger.info("[douyinPublish] 发布数据", {
|
|
34931
|
-
data: JSON.stringify(publishData)
|
|
34932
|
-
});
|
|
34933
34928
|
task.logger.info(`[douyinPublish] headers: ${JSON.stringify({
|
|
34934
34929
|
...headers,
|
|
34935
34930
|
Referer: "https://creator.douyin.com/creator-micro/content/post/image?default-tab=3&enter_from=publish_page&media_type=image&type=new",
|
|
@@ -34944,29 +34939,55 @@ var __webpack_exports__ = {};
|
|
|
34944
34939
|
"x-tt-session-dtrait": sessionDtrait || ""
|
|
34945
34940
|
})}`);
|
|
34946
34941
|
task.logger.info(`[douyinPublish] url: https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`);
|
|
34947
|
-
|
|
34948
|
-
|
|
34949
|
-
|
|
34950
|
-
|
|
34951
|
-
|
|
34952
|
-
|
|
34953
|
-
|
|
34954
|
-
|
|
34955
|
-
|
|
34956
|
-
|
|
34957
|
-
|
|
34958
|
-
|
|
34959
|
-
|
|
34960
|
-
|
|
34961
|
-
|
|
34962
|
-
|
|
34963
|
-
|
|
34942
|
+
let publishResult;
|
|
34943
|
+
try {
|
|
34944
|
+
publishResult = await proxyHttp.api({
|
|
34945
|
+
method: "post",
|
|
34946
|
+
url: `https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`,
|
|
34947
|
+
data: publishData,
|
|
34948
|
+
defaultErrorMsg: "发布异常,请稍后重试。",
|
|
34949
|
+
headers: {
|
|
34950
|
+
...headers,
|
|
34951
|
+
Referer: "https://creator.douyin.com/creator-micro/content/post/image?default-tab=3&enter_from=publish_page&media_type=image&type=new",
|
|
34952
|
+
"Content-Type": "application/json",
|
|
34953
|
+
Accept: "application/json, text/plain, */*",
|
|
34954
|
+
"bd-ticket-guard-client-data": bdTicketGuardClientData["headers_bd_ticket_guard_client_data"],
|
|
34955
|
+
"bd-ticket-guard-ree-public-key": bdTicketGuardClientData["headers_bd_ticket_guard_ree_public_key"],
|
|
34956
|
+
"bd-ticket-guard-version": "2",
|
|
34957
|
+
"bd-ticket-guard-web-sign-type": "1",
|
|
34958
|
+
"bd-ticket-guard-web-version": "2",
|
|
34959
|
+
"x-secsdk-csrf-token": csrfToken,
|
|
34960
|
+
"x-tt-session-dtrait": sessionDtrait || ""
|
|
34961
|
+
}
|
|
34962
|
+
}, {
|
|
34963
|
+
timeout: 60000,
|
|
34964
|
+
retries: 3,
|
|
34965
|
+
retryDelay: 2000
|
|
34966
|
+
});
|
|
34967
|
+
} catch (error) {
|
|
34968
|
+
const handledError = Http.handleApiError(error);
|
|
34969
|
+
const isProxyOrNetworkError = [
|
|
34970
|
+
599,
|
|
34971
|
+
500,
|
|
34972
|
+
502,
|
|
34973
|
+
503,
|
|
34974
|
+
504
|
|
34975
|
+
].includes(handledError.code);
|
|
34976
|
+
if (isProxyOrNetworkError) {
|
|
34977
|
+
const message = `图文发布失败,原因:${handledError.message}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
34978
|
+
task.logger.error(`[douyinPublish] 代理/网络错误,直接返回: ${message}`, stringifyError(handledError));
|
|
34979
|
+
await updateTaskState?.({
|
|
34980
|
+
state: types_TaskState.FAILED,
|
|
34981
|
+
error: message
|
|
34982
|
+
});
|
|
34983
|
+
return {
|
|
34984
|
+
code: 414,
|
|
34985
|
+
data: "",
|
|
34986
|
+
message
|
|
34987
|
+
};
|
|
34964
34988
|
}
|
|
34965
|
-
|
|
34966
|
-
|
|
34967
|
-
retries: 3,
|
|
34968
|
-
retryDelay: 2000
|
|
34969
|
-
});
|
|
34989
|
+
throw error;
|
|
34990
|
+
}
|
|
34970
34991
|
task.logger.info(`[douyinPublish] decision值: ${JSON.stringify(decision)}, needsVerification(decision): ${needsVerification(decision)}`);
|
|
34971
34992
|
if (needsVerification(decision)) {
|
|
34972
34993
|
const details = [
|
|
@@ -36267,7 +36288,7 @@ var __webpack_exports__ = {};
|
|
|
36267
36288
|
ajax: 1
|
|
36268
36289
|
}
|
|
36269
36290
|
});
|
|
36270
|
-
return success(res.list_resp
|
|
36291
|
+
return success(res.list_resp?.items ?? [], 0 === res.base_resp.ret ? "微信合计信息获取成功!" : "微信合集信息获取失败!");
|
|
36271
36292
|
};
|
|
36272
36293
|
const getWeixinConfig = async (_task, params)=>{
|
|
36273
36294
|
const http = new Http({
|
|
@@ -39394,28 +39415,55 @@ var __webpack_exports__ = {};
|
|
|
39394
39415
|
address: params.address.address,
|
|
39395
39416
|
uid: params.address.poi_id
|
|
39396
39417
|
} : void 0;
|
|
39397
|
-
|
|
39398
|
-
|
|
39399
|
-
|
|
39400
|
-
|
|
39401
|
-
|
|
39402
|
-
|
|
39403
|
-
|
|
39404
|
-
|
|
39405
|
-
|
|
39406
|
-
|
|
39407
|
-
|
|
39408
|
-
|
|
39409
|
-
|
|
39410
|
-
|
|
39411
|
-
|
|
39412
|
-
|
|
39413
|
-
|
|
39414
|
-
|
|
39415
|
-
|
|
39416
|
-
|
|
39417
|
-
|
|
39418
|
-
|
|
39418
|
+
let publishResult;
|
|
39419
|
+
try {
|
|
39420
|
+
publishResult = await publishDynamic(cookieString, uin, fingerPrintDeviceId, aId, proxyHttp, {
|
|
39421
|
+
token: params.huiwenToken || "",
|
|
39422
|
+
enverionment: task.enverionment || "development",
|
|
39423
|
+
articleId: params.articleId,
|
|
39424
|
+
postId: params.articleId,
|
|
39425
|
+
eip: proxyHttp.proxyInfo,
|
|
39426
|
+
proxyIp: params.localIP,
|
|
39427
|
+
accountId: params.accountId,
|
|
39428
|
+
uid: params.uid
|
|
39429
|
+
}, {
|
|
39430
|
+
title: params.title,
|
|
39431
|
+
content: params.content,
|
|
39432
|
+
images: uploadedImages,
|
|
39433
|
+
finderUsername,
|
|
39434
|
+
publishType: params.publishType || "1",
|
|
39435
|
+
topic: topicNames,
|
|
39436
|
+
link: params.link,
|
|
39437
|
+
address: addressInfo,
|
|
39438
|
+
collection: params.collection,
|
|
39439
|
+
scheduledPublish: params.scheduledPublish,
|
|
39440
|
+
music: params.music
|
|
39441
|
+
});
|
|
39442
|
+
} catch (error) {
|
|
39443
|
+
const handledError = Http.handleApiError(error);
|
|
39444
|
+
const isProxyOrNetworkError = [
|
|
39445
|
+
599,
|
|
39446
|
+
500,
|
|
39447
|
+
502,
|
|
39448
|
+
503,
|
|
39449
|
+
504
|
|
39450
|
+
].includes(handledError.code);
|
|
39451
|
+
if (isProxyOrNetworkError) {
|
|
39452
|
+
const message = `图文发布失败,原因:${handledError.message}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
39453
|
+
task.logger.error(`[shipinhaoPublish] 代理/网络错误,直接返回: ${message}`, stringifyError(handledError));
|
|
39454
|
+
await updateTaskState?.({
|
|
39455
|
+
state: types_TaskState.FAILED,
|
|
39456
|
+
error: message
|
|
39457
|
+
});
|
|
39458
|
+
return {
|
|
39459
|
+
code: 414,
|
|
39460
|
+
data: "",
|
|
39461
|
+
message
|
|
39462
|
+
};
|
|
39463
|
+
}
|
|
39464
|
+
throw error;
|
|
39465
|
+
}
|
|
39466
|
+
task.logger.info(`[shipinhaoPublish] publishResult: ${JSON.stringify(publishResult)} `);
|
|
39419
39467
|
const resultCode = publishResult.data?.baseResp?.errcode ?? publishResult.errCode;
|
|
39420
39468
|
const resultMsg = publishResult.data?.baseResp?.errmsg ?? publishResult.errMsg;
|
|
39421
39469
|
if (0 === resultCode) {
|
|
@@ -42730,28 +42778,53 @@ var __webpack_exports__ = {};
|
|
|
42730
42778
|
isNeedCode: "true",
|
|
42731
42779
|
userType: "1"
|
|
42732
42780
|
});
|
|
42733
|
-
|
|
42734
|
-
|
|
42735
|
-
|
|
42736
|
-
|
|
42737
|
-
|
|
42738
|
-
|
|
42739
|
-
|
|
42740
|
-
|
|
42741
|
-
...params.
|
|
42742
|
-
|
|
42743
|
-
|
|
42744
|
-
|
|
42745
|
-
|
|
42746
|
-
|
|
42747
|
-
|
|
42748
|
-
|
|
42749
|
-
|
|
42750
|
-
|
|
42751
|
-
|
|
42752
|
-
|
|
42753
|
-
|
|
42754
|
-
|
|
42781
|
+
try {
|
|
42782
|
+
await proxyHttp.api({
|
|
42783
|
+
method: "post",
|
|
42784
|
+
url: "https://mp.weixin.qq.com/cgi-bin/masssend",
|
|
42785
|
+
params: {
|
|
42786
|
+
t: "ajax-response",
|
|
42787
|
+
token: params.token,
|
|
42788
|
+
lang: "zh_CN",
|
|
42789
|
+
...params.masssend ? {
|
|
42790
|
+
...params.settingInfo.timer ? {
|
|
42791
|
+
action: "time_send"
|
|
42792
|
+
} : {}
|
|
42793
|
+
} : {
|
|
42794
|
+
is_release_publish_page: 1
|
|
42795
|
+
}
|
|
42796
|
+
},
|
|
42797
|
+
data: publishData,
|
|
42798
|
+
defaultErrorMsg: params.masssend ? "文章群发异常,请尝试关闭群发或稍后重试。" : "文章发布异常,请稍后重试。"
|
|
42799
|
+
}, {
|
|
42800
|
+
retries: 3,
|
|
42801
|
+
retryDelay: 500,
|
|
42802
|
+
timeout: 12000
|
|
42803
|
+
});
|
|
42804
|
+
} catch (error) {
|
|
42805
|
+
const handledError = Http.handleApiError(error);
|
|
42806
|
+
const isProxyOrNetworkError = [
|
|
42807
|
+
599,
|
|
42808
|
+
500,
|
|
42809
|
+
502,
|
|
42810
|
+
503,
|
|
42811
|
+
504
|
|
42812
|
+
].includes(handledError.code);
|
|
42813
|
+
if (isProxyOrNetworkError) {
|
|
42814
|
+
const message = `文章发布失败,原因:${handledError.message}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
42815
|
+
task.logger.error(`[weixinPublish] 代理/网络错误,直接返回: ${message}`, stringifyError(handledError));
|
|
42816
|
+
await updateTaskState?.({
|
|
42817
|
+
state: types_TaskState.FAILED,
|
|
42818
|
+
error: message
|
|
42819
|
+
});
|
|
42820
|
+
return {
|
|
42821
|
+
code: 414,
|
|
42822
|
+
data: "",
|
|
42823
|
+
message
|
|
42824
|
+
};
|
|
42825
|
+
}
|
|
42826
|
+
throw error;
|
|
42827
|
+
}
|
|
42755
42828
|
if ("publish" === params.saveType) reportLogger({
|
|
42756
42829
|
token: params.huiwenToken || "",
|
|
42757
42830
|
enverionment: task.enverionment || "development",
|
|
@@ -43896,7 +43969,7 @@ var __webpack_exports__ = {};
|
|
|
43896
43969
|
});
|
|
43897
43970
|
const proxyHttp = new Http(...args);
|
|
43898
43971
|
proxyHttp.addResponseInterceptor((response)=>{
|
|
43899
|
-
const responseData = response
|
|
43972
|
+
const responseData = response?.data;
|
|
43900
43973
|
if (response && responseData?.code && 0 !== responseData.code || responseData?.code && !responseData.success) {
|
|
43901
43974
|
const errmsg = xiaohongshuPublish_mock_errnoMap[responseData.code] || response.config.defaultErrorMsg || "文章发布异常,请稍后重试。";
|
|
43902
43975
|
return {
|
|
@@ -43919,11 +43992,6 @@ var __webpack_exports__ = {};
|
|
|
43919
43992
|
if (params.banners.length > 18) {
|
|
43920
43993
|
const num = Math.ceil(params.banners.length / 14);
|
|
43921
43994
|
for(let i = 0; i < num; i++){
|
|
43922
|
-
const start = 14 * i;
|
|
43923
|
-
params.banners.length;
|
|
43924
|
-
({
|
|
43925
|
-
...fetchCoverParams
|
|
43926
|
-
});
|
|
43927
43995
|
const batchCoverIdInfo = await proxyHttp.api({
|
|
43928
43996
|
method: "get",
|
|
43929
43997
|
baseURL: "https://creator.xiaohongshu.com",
|
|
@@ -43936,7 +44004,7 @@ var __webpack_exports__ = {};
|
|
|
43936
44004
|
retryDelay: 20,
|
|
43937
44005
|
timeout: 3000
|
|
43938
44006
|
});
|
|
43939
|
-
for (const item of batchCoverIdInfo
|
|
44007
|
+
for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
|
|
43940
44008
|
bucket: item.bucket || "",
|
|
43941
44009
|
uploadAddr: item.uploadAddr || "",
|
|
43942
44010
|
fileIds: fileId,
|
|
@@ -43956,7 +44024,7 @@ var __webpack_exports__ = {};
|
|
|
43956
44024
|
retryDelay: 20,
|
|
43957
44025
|
timeout: 3000
|
|
43958
44026
|
});
|
|
43959
|
-
for (const item of coverIdInfo
|
|
44027
|
+
for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
|
|
43960
44028
|
bucket: item.bucket || "",
|
|
43961
44029
|
uploadAddr: item.uploadAddr || "",
|
|
43962
44030
|
fileIds: fileId,
|
|
@@ -44153,7 +44221,7 @@ var __webpack_exports__ = {};
|
|
|
44153
44221
|
retries: 3,
|
|
44154
44222
|
retryDelay: 20,
|
|
44155
44223
|
timeout: 3000
|
|
44156
|
-
}).then((userData)=>userData
|
|
44224
|
+
}).then((userData)=>userData?.data?.userDetail?.id));
|
|
44157
44225
|
const business_binds = {
|
|
44158
44226
|
version: 1,
|
|
44159
44227
|
bizType: "",
|
|
@@ -44214,18 +44282,43 @@ var __webpack_exports__ = {};
|
|
|
44214
44282
|
});
|
|
44215
44283
|
return success(data, message);
|
|
44216
44284
|
}
|
|
44217
|
-
|
|
44218
|
-
|
|
44219
|
-
|
|
44220
|
-
|
|
44221
|
-
|
|
44222
|
-
|
|
44223
|
-
|
|
44224
|
-
|
|
44225
|
-
|
|
44226
|
-
|
|
44227
|
-
|
|
44228
|
-
|
|
44285
|
+
let publishResult;
|
|
44286
|
+
try {
|
|
44287
|
+
publishResult = await proxyHttp.api({
|
|
44288
|
+
method: "post",
|
|
44289
|
+
url: "https://edith.xiaohongshu.com/web_api/sns/v2/note",
|
|
44290
|
+
data: publishData,
|
|
44291
|
+
headers: publishXsHeader,
|
|
44292
|
+
defaultErrorMsg: "文章发布异常,请稍后重试。"
|
|
44293
|
+
}, {
|
|
44294
|
+
retries: 2,
|
|
44295
|
+
retryDelay: 500,
|
|
44296
|
+
timeout: 12000
|
|
44297
|
+
});
|
|
44298
|
+
} catch (error) {
|
|
44299
|
+
const handledError = Http.handleApiError(error);
|
|
44300
|
+
const isProxyOrNetworkError = [
|
|
44301
|
+
599,
|
|
44302
|
+
500,
|
|
44303
|
+
502,
|
|
44304
|
+
503,
|
|
44305
|
+
504
|
|
44306
|
+
].includes(handledError.code);
|
|
44307
|
+
if (isProxyOrNetworkError) {
|
|
44308
|
+
const message = `文章发布失败,原因:${handledError.message}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
44309
|
+
task.logger.error(`[xiaohongshuPublish] 代理/网络错误,直接返回: ${message}`, stringifyError(handledError));
|
|
44310
|
+
await updateTaskState?.({
|
|
44311
|
+
state: types_TaskState.FAILED,
|
|
44312
|
+
error: message
|
|
44313
|
+
});
|
|
44314
|
+
return {
|
|
44315
|
+
code: 414,
|
|
44316
|
+
data: "",
|
|
44317
|
+
message
|
|
44318
|
+
};
|
|
44319
|
+
}
|
|
44320
|
+
throw error;
|
|
44321
|
+
}
|
|
44229
44322
|
reportLogger({
|
|
44230
44323
|
token: params.huiwenToken || "",
|
|
44231
44324
|
enverionment: task.enverionment || "development",
|
|
@@ -44237,9 +44330,10 @@ var __webpack_exports__ = {};
|
|
|
44237
44330
|
platform: "xiaohongshu",
|
|
44238
44331
|
publishParams: publishData
|
|
44239
44332
|
});
|
|
44333
|
+
task.logger.info(`[xiaohongshuPublish] publishResult: ${JSON.stringify(publishResult)} `);
|
|
44240
44334
|
const isSuccess = publishResult.success;
|
|
44241
44335
|
const message = `文章发布${isSuccess ? "成功" : `失败,原因:${publishResult.msg}`}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
44242
|
-
const data = isSuccess ? publishResult
|
|
44336
|
+
const data = isSuccess ? publishResult?.data?.id || "" : "";
|
|
44243
44337
|
if (!isSuccess) {
|
|
44244
44338
|
await updateTaskState?.({
|
|
44245
44339
|
state: types_TaskState.FAILED,
|
|
@@ -44938,7 +45032,7 @@ var __webpack_exports__ = {};
|
|
|
44938
45032
|
});
|
|
44939
45033
|
const proxyHttp = new Http(...args);
|
|
44940
45034
|
proxyHttp.addResponseInterceptor((response)=>{
|
|
44941
|
-
const responseData = response
|
|
45035
|
+
const responseData = response?.data;
|
|
44942
45036
|
if (response && responseData?.code && 0 !== responseData.code || responseData?.code && !responseData.success) {
|
|
44943
45037
|
const errmsg = rpa_server_mock_errnoMap[responseData.code] || response.config.defaultErrorMsg || "文章发布异常,请稍后重试。";
|
|
44944
45038
|
return {
|
|
@@ -44959,7 +45053,7 @@ var __webpack_exports__ = {};
|
|
|
44959
45053
|
const fetchCoverXsHeader = rpa_server_mock_xsEncrypt.signHeadersGet(fetchCoverUrl, recordCookie, "ugc", fetchCoverParams);
|
|
44960
45054
|
const uploadInfos = [];
|
|
44961
45055
|
if (params.banners.length > 18) {
|
|
44962
|
-
|
|
45056
|
+
const num = Math.ceil(params.banners.length / 14);
|
|
44963
45057
|
for(let i = 0; i < num; i++){
|
|
44964
45058
|
const start = 14 * i;
|
|
44965
45059
|
params.banners.length;
|
|
@@ -44978,7 +45072,7 @@ var __webpack_exports__ = {};
|
|
|
44978
45072
|
retryDelay: 20,
|
|
44979
45073
|
timeout: 3000
|
|
44980
45074
|
});
|
|
44981
|
-
for (const item of batchCoverIdInfo
|
|
45075
|
+
for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
|
|
44982
45076
|
bucket: item.bucket || "",
|
|
44983
45077
|
uploadAddr: item.uploadAddr || "",
|
|
44984
45078
|
fileIds: fileId,
|
|
@@ -44998,7 +45092,7 @@ var __webpack_exports__ = {};
|
|
|
44998
45092
|
retryDelay: 20,
|
|
44999
45093
|
timeout: 3000
|
|
45000
45094
|
});
|
|
45001
|
-
for (const item of coverIdInfo
|
|
45095
|
+
for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
|
|
45002
45096
|
bucket: item.bucket || "",
|
|
45003
45097
|
uploadAddr: item.uploadAddr || "",
|
|
45004
45098
|
fileIds: fileId,
|
|
@@ -45080,7 +45174,7 @@ var __webpack_exports__ = {};
|
|
|
45080
45174
|
retryDelay: 20,
|
|
45081
45175
|
timeout: 3000
|
|
45082
45176
|
});
|
|
45083
|
-
Object.assign(topic, createTopic
|
|
45177
|
+
Object.assign(topic, createTopic?.data?.topic_infos[0]);
|
|
45084
45178
|
}
|
|
45085
45179
|
}));
|
|
45086
45180
|
const visibleRangeMap = {
|
|
@@ -45164,7 +45258,7 @@ var __webpack_exports__ = {};
|
|
|
45164
45258
|
retries: 3,
|
|
45165
45259
|
retryDelay: 20,
|
|
45166
45260
|
timeout: 3000
|
|
45167
|
-
}).then((userData)=>userData
|
|
45261
|
+
}).then((userData)=>userData?.data?.userDetail?.id));
|
|
45168
45262
|
const business_binds = {
|
|
45169
45263
|
version: 1,
|
|
45170
45264
|
bizType: "",
|
|
@@ -45255,9 +45349,10 @@ var __webpack_exports__ = {};
|
|
|
45255
45349
|
retryDelay: 500,
|
|
45256
45350
|
timeout: 12000
|
|
45257
45351
|
});
|
|
45352
|
+
task.logger.info(`[xiaohongshuPublish server mock] publishResult: ${JSON.stringify(publishResult)} `);
|
|
45258
45353
|
const isSuccess = publishResult.success;
|
|
45259
45354
|
const message = `文章发布${isSuccess ? "成功" : `失败,原因:${publishResult.msg}`}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
45260
|
-
const data = isSuccess ? publishResult
|
|
45355
|
+
const data = isSuccess ? publishResult?.data?.id || "" : "";
|
|
45261
45356
|
if (!isSuccess) {
|
|
45262
45357
|
await updateTaskState?.({
|
|
45263
45358
|
state: types_TaskState.FAILED,
|
|
@@ -45456,7 +45551,7 @@ var __webpack_exports__ = {};
|
|
|
45456
45551
|
timeout: 3000
|
|
45457
45552
|
});
|
|
45458
45553
|
const isSuccess = 0 === res.code;
|
|
45459
|
-
if (isSuccess) intimacyDetail = res.data
|
|
45554
|
+
if (isSuccess) intimacyDetail = res.data?.items;
|
|
45460
45555
|
const message = `搜索@列表数据${isSuccess ? "成功" : `失败,原因:${res.msg}`}${_task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
45461
45556
|
return utils_response(isSuccess ? 0 : 414, message, intimacyDetail);
|
|
45462
45557
|
};
|
|
@@ -45638,7 +45733,7 @@ var __webpack_exports__ = {};
|
|
|
45638
45733
|
timeout: 3000
|
|
45639
45734
|
});
|
|
45640
45735
|
_task.logger.info(`API 响应: ${JSON.stringify(res)}`);
|
|
45641
|
-
const isSuccess = 0 === res.code && res.data && res.data
|
|
45736
|
+
const isSuccess = 0 === res.code && res.data && res.data?.items && res.data?.items.length > 0;
|
|
45642
45737
|
const message = `获取指定文章详情${isSuccess ? "成功" : `失败,原因:${res.msg || "返回数据为空,可能笔记不存在或参数错误"}`}${_task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
45643
45738
|
const data = isSuccess ? res.data?.items[0].note_card || {} : {};
|
|
45644
45739
|
return utils_response(isSuccess ? 0 : 414, message, data);
|