@iflyrpa/actions 4.0.0 → 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/index.js
CHANGED
|
@@ -5489,9 +5489,7 @@ var __webpack_exports__ = {};
|
|
|
5489
5489
|
});
|
|
5490
5490
|
const package_json_namespaceObject = require("@iflyrpa/share/package.json");
|
|
5491
5491
|
var package_json_default = /*#__PURE__*/ __webpack_require__.n(package_json_namespaceObject);
|
|
5492
|
-
var package_namespaceObject = {
|
|
5493
|
-
i8: "3.1.1"
|
|
5494
|
-
};
|
|
5492
|
+
var package_namespaceObject = JSON.parse('{"i8":"4.0.2-beta.0"}');
|
|
5495
5493
|
const share_namespaceObject = require("@iflyrpa/share");
|
|
5496
5494
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
5497
5495
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
@@ -10276,6 +10274,7 @@ var __webpack_exports__ = {};
|
|
|
10276
10274
|
platform: "baijiahao",
|
|
10277
10275
|
publishParams: publishData
|
|
10278
10276
|
});
|
|
10277
|
+
task.logger.info(`[baijiahaoPublish] publishResult: ${JSON.stringify(res)} `);
|
|
10279
10278
|
const isSuccess = 0 === res.errno;
|
|
10280
10279
|
const data = res?.ret?.article_id;
|
|
10281
10280
|
const message = isSuccess ? isDraft ? "文章同步成功!" : `文章发布成功!${res.proxyInfo || ""}` : res.errmsg || (isDraft ? "文章同步失败,请稍后重试。" : "文章发布失败,请稍后重试。");
|
|
@@ -14555,7 +14554,6 @@ var __webpack_exports__ = {};
|
|
|
14555
14554
|
}
|
|
14556
14555
|
publishData.item.common.creation_id = generateRandomString(8) + Date.now();
|
|
14557
14556
|
let decision = null;
|
|
14558
|
-
task.logger.info(`[douyinPublish] proxyHttp 代理信息: ${proxyHttp.proxyInfo} `);
|
|
14559
14557
|
proxyHttp.addResponseInterceptor((response)=>{
|
|
14560
14558
|
console.log("拦截器收到响应:", JSON.stringify(response.data));
|
|
14561
14559
|
task.logger.warn(`[douyinPublish] 拦截器收到响应response.headers: ${JSON.stringify(response.headers)} `);
|
|
@@ -14699,9 +14697,6 @@ var __webpack_exports__ = {};
|
|
|
14699
14697
|
task.logger.error(`生成 sessionDtrait 失败: ${error}`);
|
|
14700
14698
|
return (0, share_namespaceObject.response)(414, "安全参数 sessionDtrait 生成异常,请重试", "");
|
|
14701
14699
|
}
|
|
14702
|
-
task.logger.info("[douyinPublish] 发布数据", {
|
|
14703
|
-
data: JSON.stringify(publishData)
|
|
14704
|
-
});
|
|
14705
14700
|
task.logger.info(`[douyinPublish] headers: ${JSON.stringify({
|
|
14706
14701
|
...headers,
|
|
14707
14702
|
Referer: "https://creator.douyin.com/creator-micro/content/post/image?default-tab=3&enter_from=publish_page&media_type=image&type=new",
|
|
@@ -14716,29 +14711,55 @@ var __webpack_exports__ = {};
|
|
|
14716
14711
|
"x-tt-session-dtrait": sessionDtrait || ""
|
|
14717
14712
|
})}`);
|
|
14718
14713
|
task.logger.info(`[douyinPublish] url: https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`);
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14727
|
-
|
|
14728
|
-
|
|
14729
|
-
|
|
14730
|
-
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
|
|
14734
|
-
|
|
14735
|
-
|
|
14714
|
+
let publishResult;
|
|
14715
|
+
try {
|
|
14716
|
+
publishResult = await proxyHttp.api({
|
|
14717
|
+
method: "post",
|
|
14718
|
+
url: `https://creator.douyin.com/web/api/media/aweme/create_v2/?${publishQueryParams}`,
|
|
14719
|
+
data: publishData,
|
|
14720
|
+
defaultErrorMsg: "发布异常,请稍后重试。",
|
|
14721
|
+
headers: {
|
|
14722
|
+
...headers,
|
|
14723
|
+
Referer: "https://creator.douyin.com/creator-micro/content/post/image?default-tab=3&enter_from=publish_page&media_type=image&type=new",
|
|
14724
|
+
"Content-Type": "application/json",
|
|
14725
|
+
Accept: "application/json, text/plain, */*",
|
|
14726
|
+
"bd-ticket-guard-client-data": bdTicketGuardClientData["headers_bd_ticket_guard_client_data"],
|
|
14727
|
+
"bd-ticket-guard-ree-public-key": bdTicketGuardClientData["headers_bd_ticket_guard_ree_public_key"],
|
|
14728
|
+
"bd-ticket-guard-version": "2",
|
|
14729
|
+
"bd-ticket-guard-web-sign-type": "1",
|
|
14730
|
+
"bd-ticket-guard-web-version": "2",
|
|
14731
|
+
"x-secsdk-csrf-token": csrfToken,
|
|
14732
|
+
"x-tt-session-dtrait": sessionDtrait || ""
|
|
14733
|
+
}
|
|
14734
|
+
}, {
|
|
14735
|
+
timeout: 60000,
|
|
14736
|
+
retries: 3,
|
|
14737
|
+
retryDelay: 2000
|
|
14738
|
+
});
|
|
14739
|
+
} catch (error) {
|
|
14740
|
+
const handledError = Http.handleApiError(error);
|
|
14741
|
+
const isProxyOrNetworkError = [
|
|
14742
|
+
599,
|
|
14743
|
+
500,
|
|
14744
|
+
502,
|
|
14745
|
+
503,
|
|
14746
|
+
504
|
|
14747
|
+
].includes(handledError.code);
|
|
14748
|
+
if (isProxyOrNetworkError) {
|
|
14749
|
+
const message = `图文发布失败,原因:${handledError.message}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
14750
|
+
task.logger.error(`[douyinPublish] 代理/网络错误,直接返回: ${message}`, stringifyError(handledError));
|
|
14751
|
+
await updateTaskState?.({
|
|
14752
|
+
state: share_namespaceObject.TaskState.FAILED,
|
|
14753
|
+
error: message
|
|
14754
|
+
});
|
|
14755
|
+
return {
|
|
14756
|
+
code: 414,
|
|
14757
|
+
data: "",
|
|
14758
|
+
message
|
|
14759
|
+
};
|
|
14736
14760
|
}
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
retries: 3,
|
|
14740
|
-
retryDelay: 2000
|
|
14741
|
-
});
|
|
14761
|
+
throw error;
|
|
14762
|
+
}
|
|
14742
14763
|
task.logger.info(`[douyinPublish] decision值: ${JSON.stringify(decision)}, needsVerification(decision): ${needsVerification(decision)}`);
|
|
14743
14764
|
if (needsVerification(decision)) {
|
|
14744
14765
|
const details = [
|
|
@@ -16039,7 +16060,7 @@ var __webpack_exports__ = {};
|
|
|
16039
16060
|
ajax: 1
|
|
16040
16061
|
}
|
|
16041
16062
|
});
|
|
16042
|
-
return (0, share_namespaceObject.success)(res.list_resp
|
|
16063
|
+
return (0, share_namespaceObject.success)(res.list_resp?.items ?? [], 0 === res.base_resp.ret ? "微信合计信息获取成功!" : "微信合集信息获取失败!");
|
|
16043
16064
|
};
|
|
16044
16065
|
const getWeixinConfig = async (_task, params)=>{
|
|
16045
16066
|
const http = new Http({
|
|
@@ -19166,28 +19187,55 @@ var __webpack_exports__ = {};
|
|
|
19166
19187
|
address: params.address.address,
|
|
19167
19188
|
uid: params.address.poi_id
|
|
19168
19189
|
} : void 0;
|
|
19169
|
-
|
|
19170
|
-
|
|
19171
|
-
|
|
19172
|
-
|
|
19173
|
-
|
|
19174
|
-
|
|
19175
|
-
|
|
19176
|
-
|
|
19177
|
-
|
|
19178
|
-
|
|
19179
|
-
|
|
19180
|
-
|
|
19181
|
-
|
|
19182
|
-
|
|
19183
|
-
|
|
19184
|
-
|
|
19185
|
-
|
|
19186
|
-
|
|
19187
|
-
|
|
19188
|
-
|
|
19189
|
-
|
|
19190
|
-
|
|
19190
|
+
let publishResult;
|
|
19191
|
+
try {
|
|
19192
|
+
publishResult = await publishDynamic(cookieString, uin, fingerPrintDeviceId, aId, proxyHttp, {
|
|
19193
|
+
token: params.huiwenToken || "",
|
|
19194
|
+
enverionment: task.enverionment || "development",
|
|
19195
|
+
articleId: params.articleId,
|
|
19196
|
+
postId: params.articleId,
|
|
19197
|
+
eip: proxyHttp.proxyInfo,
|
|
19198
|
+
proxyIp: params.localIP,
|
|
19199
|
+
accountId: params.accountId,
|
|
19200
|
+
uid: params.uid
|
|
19201
|
+
}, {
|
|
19202
|
+
title: params.title,
|
|
19203
|
+
content: params.content,
|
|
19204
|
+
images: uploadedImages,
|
|
19205
|
+
finderUsername,
|
|
19206
|
+
publishType: params.publishType || "1",
|
|
19207
|
+
topic: topicNames,
|
|
19208
|
+
link: params.link,
|
|
19209
|
+
address: addressInfo,
|
|
19210
|
+
collection: params.collection,
|
|
19211
|
+
scheduledPublish: params.scheduledPublish,
|
|
19212
|
+
music: params.music
|
|
19213
|
+
});
|
|
19214
|
+
} catch (error) {
|
|
19215
|
+
const handledError = Http.handleApiError(error);
|
|
19216
|
+
const isProxyOrNetworkError = [
|
|
19217
|
+
599,
|
|
19218
|
+
500,
|
|
19219
|
+
502,
|
|
19220
|
+
503,
|
|
19221
|
+
504
|
|
19222
|
+
].includes(handledError.code);
|
|
19223
|
+
if (isProxyOrNetworkError) {
|
|
19224
|
+
const message = `图文发布失败,原因:${handledError.message}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
19225
|
+
task.logger.error(`[shipinhaoPublish] 代理/网络错误,直接返回: ${message}`, stringifyError(handledError));
|
|
19226
|
+
await updateTaskState?.({
|
|
19227
|
+
state: share_namespaceObject.TaskState.FAILED,
|
|
19228
|
+
error: message
|
|
19229
|
+
});
|
|
19230
|
+
return {
|
|
19231
|
+
code: 414,
|
|
19232
|
+
data: "",
|
|
19233
|
+
message
|
|
19234
|
+
};
|
|
19235
|
+
}
|
|
19236
|
+
throw error;
|
|
19237
|
+
}
|
|
19238
|
+
task.logger.info(`[shipinhaoPublish] publishResult: ${JSON.stringify(publishResult)} `);
|
|
19191
19239
|
const resultCode = publishResult.data?.baseResp?.errcode ?? publishResult.errCode;
|
|
19192
19240
|
const resultMsg = publishResult.data?.baseResp?.errmsg ?? publishResult.errMsg;
|
|
19193
19241
|
if (0 === resultCode) {
|
|
@@ -22502,28 +22550,53 @@ var __webpack_exports__ = {};
|
|
|
22502
22550
|
isNeedCode: "true",
|
|
22503
22551
|
userType: "1"
|
|
22504
22552
|
});
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
|
|
22510
|
-
|
|
22511
|
-
|
|
22512
|
-
|
|
22513
|
-
...params.
|
|
22514
|
-
|
|
22515
|
-
|
|
22516
|
-
|
|
22517
|
-
|
|
22518
|
-
|
|
22519
|
-
|
|
22520
|
-
|
|
22521
|
-
|
|
22522
|
-
|
|
22523
|
-
|
|
22524
|
-
|
|
22525
|
-
|
|
22526
|
-
|
|
22553
|
+
try {
|
|
22554
|
+
await proxyHttp.api({
|
|
22555
|
+
method: "post",
|
|
22556
|
+
url: "https://mp.weixin.qq.com/cgi-bin/masssend",
|
|
22557
|
+
params: {
|
|
22558
|
+
t: "ajax-response",
|
|
22559
|
+
token: params.token,
|
|
22560
|
+
lang: "zh_CN",
|
|
22561
|
+
...params.masssend ? {
|
|
22562
|
+
...params.settingInfo.timer ? {
|
|
22563
|
+
action: "time_send"
|
|
22564
|
+
} : {}
|
|
22565
|
+
} : {
|
|
22566
|
+
is_release_publish_page: 1
|
|
22567
|
+
}
|
|
22568
|
+
},
|
|
22569
|
+
data: publishData,
|
|
22570
|
+
defaultErrorMsg: params.masssend ? "文章群发异常,请尝试关闭群发或稍后重试。" : "文章发布异常,请稍后重试。"
|
|
22571
|
+
}, {
|
|
22572
|
+
retries: 3,
|
|
22573
|
+
retryDelay: 500,
|
|
22574
|
+
timeout: 12000
|
|
22575
|
+
});
|
|
22576
|
+
} catch (error) {
|
|
22577
|
+
const handledError = Http.handleApiError(error);
|
|
22578
|
+
const isProxyOrNetworkError = [
|
|
22579
|
+
599,
|
|
22580
|
+
500,
|
|
22581
|
+
502,
|
|
22582
|
+
503,
|
|
22583
|
+
504
|
|
22584
|
+
].includes(handledError.code);
|
|
22585
|
+
if (isProxyOrNetworkError) {
|
|
22586
|
+
const message = `文章发布失败,原因:${handledError.message}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
22587
|
+
task.logger.error(`[weixinPublish] 代理/网络错误,直接返回: ${message}`, stringifyError(handledError));
|
|
22588
|
+
await updateTaskState?.({
|
|
22589
|
+
state: share_namespaceObject.TaskState.FAILED,
|
|
22590
|
+
error: message
|
|
22591
|
+
});
|
|
22592
|
+
return {
|
|
22593
|
+
code: 414,
|
|
22594
|
+
data: "",
|
|
22595
|
+
message
|
|
22596
|
+
};
|
|
22597
|
+
}
|
|
22598
|
+
throw error;
|
|
22599
|
+
}
|
|
22527
22600
|
if ("publish" === params.saveType) reportLogger({
|
|
22528
22601
|
token: params.huiwenToken || "",
|
|
22529
22602
|
enverionment: task.enverionment || "development",
|
|
@@ -23668,7 +23741,7 @@ var __webpack_exports__ = {};
|
|
|
23668
23741
|
});
|
|
23669
23742
|
const proxyHttp = new Http(...args);
|
|
23670
23743
|
proxyHttp.addResponseInterceptor((response)=>{
|
|
23671
|
-
const responseData = response
|
|
23744
|
+
const responseData = response?.data;
|
|
23672
23745
|
if (response && responseData?.code && 0 !== responseData.code || responseData?.code && !responseData.success) {
|
|
23673
23746
|
const errmsg = xiaohongshuPublish_mock_errnoMap[responseData.code] || response.config.defaultErrorMsg || "文章发布异常,请稍后重试。";
|
|
23674
23747
|
return {
|
|
@@ -23691,11 +23764,6 @@ var __webpack_exports__ = {};
|
|
|
23691
23764
|
if (params.banners.length > 18) {
|
|
23692
23765
|
const num = Math.ceil(params.banners.length / 14);
|
|
23693
23766
|
for(let i = 0; i < num; i++){
|
|
23694
|
-
const start = 14 * i;
|
|
23695
|
-
params.banners.length;
|
|
23696
|
-
({
|
|
23697
|
-
...fetchCoverParams
|
|
23698
|
-
});
|
|
23699
23767
|
const batchCoverIdInfo = await proxyHttp.api({
|
|
23700
23768
|
method: "get",
|
|
23701
23769
|
baseURL: "https://creator.xiaohongshu.com",
|
|
@@ -23708,7 +23776,7 @@ var __webpack_exports__ = {};
|
|
|
23708
23776
|
retryDelay: 20,
|
|
23709
23777
|
timeout: 3000
|
|
23710
23778
|
});
|
|
23711
|
-
for (const item of batchCoverIdInfo
|
|
23779
|
+
for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
|
|
23712
23780
|
bucket: item.bucket || "",
|
|
23713
23781
|
uploadAddr: item.uploadAddr || "",
|
|
23714
23782
|
fileIds: fileId,
|
|
@@ -23728,7 +23796,7 @@ var __webpack_exports__ = {};
|
|
|
23728
23796
|
retryDelay: 20,
|
|
23729
23797
|
timeout: 3000
|
|
23730
23798
|
});
|
|
23731
|
-
for (const item of coverIdInfo
|
|
23799
|
+
for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item.fileIds)uploadInfos.push({
|
|
23732
23800
|
bucket: item.bucket || "",
|
|
23733
23801
|
uploadAddr: item.uploadAddr || "",
|
|
23734
23802
|
fileIds: fileId,
|
|
@@ -23925,7 +23993,7 @@ var __webpack_exports__ = {};
|
|
|
23925
23993
|
retries: 3,
|
|
23926
23994
|
retryDelay: 20,
|
|
23927
23995
|
timeout: 3000
|
|
23928
|
-
}).then((userData)=>userData
|
|
23996
|
+
}).then((userData)=>userData?.data?.userDetail?.id));
|
|
23929
23997
|
const business_binds = {
|
|
23930
23998
|
version: 1,
|
|
23931
23999
|
bizType: "",
|
|
@@ -23986,18 +24054,43 @@ var __webpack_exports__ = {};
|
|
|
23986
24054
|
});
|
|
23987
24055
|
return (0, share_namespaceObject.success)(data, message);
|
|
23988
24056
|
}
|
|
23989
|
-
|
|
23990
|
-
|
|
23991
|
-
|
|
23992
|
-
|
|
23993
|
-
|
|
23994
|
-
|
|
23995
|
-
|
|
23996
|
-
|
|
23997
|
-
|
|
23998
|
-
|
|
23999
|
-
|
|
24000
|
-
|
|
24057
|
+
let publishResult;
|
|
24058
|
+
try {
|
|
24059
|
+
publishResult = await proxyHttp.api({
|
|
24060
|
+
method: "post",
|
|
24061
|
+
url: "https://edith.xiaohongshu.com/web_api/sns/v2/note",
|
|
24062
|
+
data: publishData,
|
|
24063
|
+
headers: publishXsHeader,
|
|
24064
|
+
defaultErrorMsg: "文章发布异常,请稍后重试。"
|
|
24065
|
+
}, {
|
|
24066
|
+
retries: 2,
|
|
24067
|
+
retryDelay: 500,
|
|
24068
|
+
timeout: 12000
|
|
24069
|
+
});
|
|
24070
|
+
} catch (error) {
|
|
24071
|
+
const handledError = Http.handleApiError(error);
|
|
24072
|
+
const isProxyOrNetworkError = [
|
|
24073
|
+
599,
|
|
24074
|
+
500,
|
|
24075
|
+
502,
|
|
24076
|
+
503,
|
|
24077
|
+
504
|
|
24078
|
+
].includes(handledError.code);
|
|
24079
|
+
if (isProxyOrNetworkError) {
|
|
24080
|
+
const message = `文章发布失败,原因:${handledError.message}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
24081
|
+
task.logger.error(`[xiaohongshuPublish] 代理/网络错误,直接返回: ${message}`, stringifyError(handledError));
|
|
24082
|
+
await updateTaskState?.({
|
|
24083
|
+
state: share_namespaceObject.TaskState.FAILED,
|
|
24084
|
+
error: message
|
|
24085
|
+
});
|
|
24086
|
+
return {
|
|
24087
|
+
code: 414,
|
|
24088
|
+
data: "",
|
|
24089
|
+
message
|
|
24090
|
+
};
|
|
24091
|
+
}
|
|
24092
|
+
throw error;
|
|
24093
|
+
}
|
|
24001
24094
|
reportLogger({
|
|
24002
24095
|
token: params.huiwenToken || "",
|
|
24003
24096
|
enverionment: task.enverionment || "development",
|
|
@@ -24009,9 +24102,10 @@ var __webpack_exports__ = {};
|
|
|
24009
24102
|
platform: "xiaohongshu",
|
|
24010
24103
|
publishParams: publishData
|
|
24011
24104
|
});
|
|
24105
|
+
task.logger.info(`[xiaohongshuPublish] publishResult: ${JSON.stringify(publishResult)} `);
|
|
24012
24106
|
const isSuccess = publishResult.success;
|
|
24013
24107
|
const message = `文章发布${isSuccess ? "成功" : `失败,原因:${publishResult.msg}`}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
24014
|
-
const data = isSuccess ? publishResult
|
|
24108
|
+
const data = isSuccess ? publishResult?.data?.id || "" : "";
|
|
24015
24109
|
if (!isSuccess) {
|
|
24016
24110
|
await updateTaskState?.({
|
|
24017
24111
|
state: share_namespaceObject.TaskState.FAILED,
|
|
@@ -24710,7 +24804,7 @@ var __webpack_exports__ = {};
|
|
|
24710
24804
|
});
|
|
24711
24805
|
const proxyHttp = new Http(...args);
|
|
24712
24806
|
proxyHttp.addResponseInterceptor((response)=>{
|
|
24713
|
-
const responseData = response
|
|
24807
|
+
const responseData = response?.data;
|
|
24714
24808
|
if (response && responseData?.code && 0 !== responseData.code || responseData?.code && !responseData.success) {
|
|
24715
24809
|
const errmsg = rpa_server_mock_errnoMap[responseData.code] || response.config.defaultErrorMsg || "文章发布异常,请稍后重试。";
|
|
24716
24810
|
return {
|
|
@@ -24731,7 +24825,7 @@ var __webpack_exports__ = {};
|
|
|
24731
24825
|
const fetchCoverXsHeader = rpa_server_mock_xsEncrypt.signHeadersGet(fetchCoverUrl, recordCookie, "ugc", fetchCoverParams);
|
|
24732
24826
|
const uploadInfos = [];
|
|
24733
24827
|
if (params.banners.length > 18) {
|
|
24734
|
-
|
|
24828
|
+
const num = Math.ceil(params.banners.length / 14);
|
|
24735
24829
|
for(let i = 0; i < num; i++){
|
|
24736
24830
|
const start = 14 * i;
|
|
24737
24831
|
params.banners.length;
|
|
@@ -24750,7 +24844,7 @@ var __webpack_exports__ = {};
|
|
|
24750
24844
|
retryDelay: 20,
|
|
24751
24845
|
timeout: 3000
|
|
24752
24846
|
});
|
|
24753
|
-
for (const item of batchCoverIdInfo
|
|
24847
|
+
for (const item of batchCoverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
|
|
24754
24848
|
bucket: item.bucket || "",
|
|
24755
24849
|
uploadAddr: item.uploadAddr || "",
|
|
24756
24850
|
fileIds: fileId,
|
|
@@ -24770,7 +24864,7 @@ var __webpack_exports__ = {};
|
|
|
24770
24864
|
retryDelay: 20,
|
|
24771
24865
|
timeout: 3000
|
|
24772
24866
|
});
|
|
24773
|
-
for (const item of coverIdInfo
|
|
24867
|
+
for (const item of coverIdInfo?.data?.uploadTempPermits ?? [])for (const fileId of item?.fileIds ?? [])uploadInfos.push({
|
|
24774
24868
|
bucket: item.bucket || "",
|
|
24775
24869
|
uploadAddr: item.uploadAddr || "",
|
|
24776
24870
|
fileIds: fileId,
|
|
@@ -24852,7 +24946,7 @@ var __webpack_exports__ = {};
|
|
|
24852
24946
|
retryDelay: 20,
|
|
24853
24947
|
timeout: 3000
|
|
24854
24948
|
});
|
|
24855
|
-
Object.assign(topic, createTopic
|
|
24949
|
+
Object.assign(topic, createTopic?.data?.topic_infos[0]);
|
|
24856
24950
|
}
|
|
24857
24951
|
}));
|
|
24858
24952
|
const visibleRangeMap = {
|
|
@@ -24936,7 +25030,7 @@ var __webpack_exports__ = {};
|
|
|
24936
25030
|
retries: 3,
|
|
24937
25031
|
retryDelay: 20,
|
|
24938
25032
|
timeout: 3000
|
|
24939
|
-
}).then((userData)=>userData
|
|
25033
|
+
}).then((userData)=>userData?.data?.userDetail?.id));
|
|
24940
25034
|
const business_binds = {
|
|
24941
25035
|
version: 1,
|
|
24942
25036
|
bizType: "",
|
|
@@ -25027,9 +25121,10 @@ var __webpack_exports__ = {};
|
|
|
25027
25121
|
retryDelay: 500,
|
|
25028
25122
|
timeout: 12000
|
|
25029
25123
|
});
|
|
25124
|
+
task.logger.info(`[xiaohongshuPublish server mock] publishResult: ${JSON.stringify(publishResult)} `);
|
|
25030
25125
|
const isSuccess = publishResult.success;
|
|
25031
25126
|
const message = `文章发布${isSuccess ? "成功" : `失败,原因:${publishResult.msg}`}${task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
25032
|
-
const data = isSuccess ? publishResult
|
|
25127
|
+
const data = isSuccess ? publishResult?.data?.id || "" : "";
|
|
25033
25128
|
if (!isSuccess) {
|
|
25034
25129
|
await updateTaskState?.({
|
|
25035
25130
|
state: share_namespaceObject.TaskState.FAILED,
|
|
@@ -25228,7 +25323,7 @@ var __webpack_exports__ = {};
|
|
|
25228
25323
|
timeout: 3000
|
|
25229
25324
|
});
|
|
25230
25325
|
const isSuccess = 0 === res.code;
|
|
25231
|
-
if (isSuccess) intimacyDetail = res.data
|
|
25326
|
+
if (isSuccess) intimacyDetail = res.data?.items;
|
|
25232
25327
|
const message = `搜索@列表数据${isSuccess ? "成功" : `失败,原因:${res.msg}`}${_task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
25233
25328
|
return (0, share_namespaceObject.response)(isSuccess ? 0 : 414, message, intimacyDetail);
|
|
25234
25329
|
};
|
|
@@ -25410,7 +25505,7 @@ var __webpack_exports__ = {};
|
|
|
25410
25505
|
timeout: 3000
|
|
25411
25506
|
});
|
|
25412
25507
|
_task.logger.info(`API 响应: ${JSON.stringify(res)}`);
|
|
25413
|
-
const isSuccess = 0 === res.code && res.data && res.data
|
|
25508
|
+
const isSuccess = 0 === res.code && res.data && res.data?.items && res.data?.items.length > 0;
|
|
25414
25509
|
const message = `获取指定文章详情${isSuccess ? "成功" : `失败,原因:${res.msg || "返回数据为空,可能笔记不存在或参数错误"}`}${_task.debug ? ` ${http.proxyInfo}` : ""}`;
|
|
25415
25510
|
const data = isSuccess ? res.data?.items[0].note_card || {} : {};
|
|
25416
25511
|
return (0, share_namespaceObject.response)(isSuccess ? 0 : 414, message, data);
|