oc-browser-relay 1.0.23 → 1.0.26
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/bundled-relay/index.js +49 -57
- package/bundled-relay/public/configs/pages/alimama-account-report.json +65 -0
- package/bundled-relay/public/configs/pages/sycm-taobao-home.json +37 -0
- package/bundled-relay/public/configs/task-templates/alimama-adgroup-report-download.json +166 -0
- package/bundled-relay/public/configs/task-templates/index.json +1 -0
- package/bundled-relay/public/configs/task-templates/sycm-taobao-home-live-metrics.json +49 -129
- package/index.js +35 -34
- package/package.json +2 -1
- package/skills/oc-browser-relay-alimama/SKILL.md +18 -1
- package/skills/oc-browser-relay-article/SKILL.md +8 -5
- package/skills/oc-browser-relay-douyin/SKILL.md +4 -2
- package/skills/oc-browser-relay-sycm/SKILL.md +22 -13
- package/skills/oc-browser-relay-xiaohongshu/SKILL.md +4 -5
package/bundled-relay/index.js
CHANGED
|
@@ -23043,25 +23043,24 @@ function formatDateLocal(date) {
|
|
|
23043
23043
|
const day = String(date.getDate()).padStart(2, "0");
|
|
23044
23044
|
return `${year}-${month}-${day}`;
|
|
23045
23045
|
}
|
|
23046
|
-
function
|
|
23047
|
-
const
|
|
23048
|
-
|
|
23049
|
-
|
|
23050
|
-
const date = formatDateLocal(target);
|
|
23051
|
-
return `${date}|${date}`;
|
|
23046
|
+
function shiftDate(d, days) {
|
|
23047
|
+
const r = new Date(d);
|
|
23048
|
+
r.setDate(r.getDate() + days);
|
|
23049
|
+
return r;
|
|
23052
23050
|
}
|
|
23053
|
-
function
|
|
23054
|
-
|
|
23055
|
-
|
|
23056
|
-
|
|
23057
|
-
const
|
|
23058
|
-
|
|
23059
|
-
|
|
23060
|
-
|
|
23061
|
-
};
|
|
23051
|
+
function diffDays(a, b) {
|
|
23052
|
+
return Math.round((b.getTime() - a.getTime()) / 864e5);
|
|
23053
|
+
}
|
|
23054
|
+
function buildCompareRange(currentStart, currentEnd) {
|
|
23055
|
+
const days = diffDays(currentStart, currentEnd) + 1;
|
|
23056
|
+
const compareEnd = shiftDate(currentStart, -1);
|
|
23057
|
+
const compareStart = shiftDate(compareEnd, -(days - 1));
|
|
23058
|
+
return `${formatDateLocal(currentStart)}|${formatDateLocal(currentEnd)},${formatDateLocal(compareStart)}|${formatDateLocal(compareEnd)}`;
|
|
23062
23059
|
}
|
|
23063
|
-
function
|
|
23064
|
-
|
|
23060
|
+
function buildDayRange(now = /* @__PURE__ */ new Date()) {
|
|
23061
|
+
const daysBack = now.getHours() < 6 ? 2 : 1;
|
|
23062
|
+
const d = shiftDate(now, -daysBack);
|
|
23063
|
+
return { dateRange: buildCompareRange(d, d), label: daysBack === 2 ? "\u524D\u5929" : "\u6628\u5929" };
|
|
23065
23064
|
}
|
|
23066
23065
|
function truncateByCharacters(value, maxLength) {
|
|
23067
23066
|
return Array.from(value).slice(0, maxLength).join("");
|
|
@@ -23191,46 +23190,21 @@ var TemplateExecutor = class _TemplateExecutor {
|
|
|
23191
23190
|
}
|
|
23192
23191
|
}
|
|
23193
23192
|
applySycmLiveMetricDerivedDefaults(template, rawInput, hydrated) {
|
|
23194
|
-
const isSycmLiveMetricsTemplate = template.siteId === "sycm_taobao" && template.taskType === "browser_action" && (template.optionalFields ?? []).some((field) => field.name === "
|
|
23193
|
+
const isSycmLiveMetricsTemplate = template.siteId === "sycm_taobao" && template.taskType === "browser_action" && (template.optionalFields ?? []).some((field) => field.name === "requestDateType");
|
|
23195
23194
|
if (!isSycmLiveMetricsTemplate) {
|
|
23196
23195
|
return;
|
|
23197
23196
|
}
|
|
23198
|
-
|
|
23199
|
-
|
|
23200
|
-
const hasExplicitDateRange = rawInput.requestDateRange !== void 0;
|
|
23201
|
-
const hasExplicitInvokeDirectly = rawInput.invokeDirectly !== void 0;
|
|
23202
|
-
const isYesterdayLabel = normalizedLabel === "\u6628\u5929";
|
|
23203
|
-
if (!hasExplicitDateType) {
|
|
23204
|
-
switch (normalizedLabel) {
|
|
23205
|
-
case "\u6628\u5929":
|
|
23206
|
-
case "\u65E5":
|
|
23207
|
-
hydrated.requestDateType = "day";
|
|
23208
|
-
break;
|
|
23209
|
-
case "\u5468":
|
|
23210
|
-
hydrated.requestDateType = "week";
|
|
23211
|
-
break;
|
|
23212
|
-
case "\u6708":
|
|
23213
|
-
hydrated.requestDateType = "month";
|
|
23214
|
-
break;
|
|
23215
|
-
case "\u5B9E\u65F6":
|
|
23216
|
-
hydrated.requestDateType = "today";
|
|
23217
|
-
break;
|
|
23218
|
-
default:
|
|
23219
|
-
break;
|
|
23220
|
-
}
|
|
23221
|
-
}
|
|
23222
|
-
if (!hasExplicitDateRange) {
|
|
23223
|
-
hydrated.requestDateRange = isYesterdayLabel ? buildPreviousAvailableDailyDateRange() : "";
|
|
23197
|
+
if (rawInput.requestDateType !== void 0) {
|
|
23198
|
+
return;
|
|
23224
23199
|
}
|
|
23225
|
-
if (
|
|
23226
|
-
const
|
|
23227
|
-
hydrated.
|
|
23228
|
-
hydrated.
|
|
23229
|
-
|
|
23230
|
-
|
|
23231
|
-
|
|
23232
|
-
|
|
23233
|
-
}
|
|
23200
|
+
if (!hydrated.requestDateRange) {
|
|
23201
|
+
const r = buildDayRange();
|
|
23202
|
+
hydrated.requestDateType = "compareRange";
|
|
23203
|
+
hydrated.requestDateRange = r.dateRange;
|
|
23204
|
+
hydrated.effectiveMetricPeriodLabel = r.label;
|
|
23205
|
+
hydrated.effectiveDateRange = r.dateRange.split(",")[0];
|
|
23206
|
+
} else if (!hydrated.requestDateType) {
|
|
23207
|
+
hydrated.requestDateType = "compareRange";
|
|
23234
23208
|
}
|
|
23235
23209
|
}
|
|
23236
23210
|
mergeXiaohongshuTopicsIntoContent(template, data) {
|
|
@@ -25543,7 +25517,7 @@ function getRuntimeClientIds(targetClientId) {
|
|
|
25543
25517
|
}
|
|
25544
25518
|
return runtimeIds;
|
|
25545
25519
|
}
|
|
25546
|
-
async function requestRuntimeQuery(clientId, queryType) {
|
|
25520
|
+
async function requestRuntimeQuery(clientId, queryType, params) {
|
|
25547
25521
|
const requestId = `runtime_query_${Date.now()}_${Math.random().toString(36).slice(2, 10)}`;
|
|
25548
25522
|
return new Promise(async (resolve4, reject) => {
|
|
25549
25523
|
const timer = setTimeout(() => {
|
|
@@ -25555,7 +25529,7 @@ async function requestRuntimeQuery(clientId, queryType) {
|
|
|
25555
25529
|
type: "runtime.query",
|
|
25556
25530
|
requestId,
|
|
25557
25531
|
timestamp: Date.now(),
|
|
25558
|
-
payload: { queryType }
|
|
25532
|
+
payload: { queryType, ...params || {} }
|
|
25559
25533
|
});
|
|
25560
25534
|
if (!sent) {
|
|
25561
25535
|
clearTimeout(timer);
|
|
@@ -25564,11 +25538,11 @@ async function requestRuntimeQuery(clientId, queryType) {
|
|
|
25564
25538
|
}
|
|
25565
25539
|
});
|
|
25566
25540
|
}
|
|
25567
|
-
async function requestRuntimeQueryAcrossClients(queryType, targetClientId) {
|
|
25541
|
+
async function requestRuntimeQueryAcrossClients(queryType, targetClientId, params) {
|
|
25568
25542
|
const runtimeIds = getRuntimeClientIds(targetClientId);
|
|
25569
25543
|
const results = await Promise.all(runtimeIds.map(async (clientId) => {
|
|
25570
25544
|
try {
|
|
25571
|
-
const payload = await requestRuntimeQuery(clientId, queryType);
|
|
25545
|
+
const payload = await requestRuntimeQuery(clientId, queryType, params);
|
|
25572
25546
|
return {
|
|
25573
25547
|
clientId,
|
|
25574
25548
|
payload
|
|
@@ -25637,6 +25611,24 @@ app.get("/api/tabs", async (req, res) => {
|
|
|
25637
25611
|
res.status(400).json({ success: false, error: err.message });
|
|
25638
25612
|
}
|
|
25639
25613
|
});
|
|
25614
|
+
app.get("/api/cookies", async (req, res) => {
|
|
25615
|
+
try {
|
|
25616
|
+
const targetClientId = typeof req.query.clientId === "string" ? req.query.clientId : void 0;
|
|
25617
|
+
const domain = typeof req.query.domain === "string" ? req.query.domain : void 0;
|
|
25618
|
+
const url = typeof req.query.url === "string" ? req.query.url : void 0;
|
|
25619
|
+
const domainsRaw = typeof req.query.domains === "string" ? req.query.domains : void 0;
|
|
25620
|
+
const domains = domainsRaw ? domainsRaw.split(",").map((d) => d.trim()).filter(Boolean) : void 0;
|
|
25621
|
+
if (!domain && !url && (!domains || domains.length === 0)) {
|
|
25622
|
+
return res.status(400).json({ success: false, error: "domain, url or domains is required" });
|
|
25623
|
+
}
|
|
25624
|
+
const results = await requestRuntimeQueryAcrossClients("get_cookies", targetClientId, { domain, url, domains });
|
|
25625
|
+
const cookies = results.flatMap((result) => result.payload?.items || []);
|
|
25626
|
+
const errors = results.filter((result) => result.error || result.payload?.error).map((result) => ({ clientId: result.clientId, error: result.error || result.payload?.error }));
|
|
25627
|
+
res.json({ success: true, partialSuccess: errors.length > 0, cookies, errors, count: cookies.length });
|
|
25628
|
+
} catch (err) {
|
|
25629
|
+
res.status(400).json({ success: false, error: err.message });
|
|
25630
|
+
}
|
|
25631
|
+
});
|
|
25640
25632
|
app.post("/api/workspaces", (req, res) => {
|
|
25641
25633
|
try {
|
|
25642
25634
|
const { name, rootDir, allowedRoots, targetRuntimeId, sourceClientId } = req.body || {};
|
|
@@ -221,6 +221,71 @@
|
|
|
221
221
|
"responsePath": "data.taskId",
|
|
222
222
|
"metaPath": "data"
|
|
223
223
|
},
|
|
224
|
+
"create_adgroup_download_task": {
|
|
225
|
+
"method": "POST",
|
|
226
|
+
"url": "https://one.alimama.com/report/createDownLoadTask.json",
|
|
227
|
+
"query": {
|
|
228
|
+
"csrfId": "{{payload.csrfId}}",
|
|
229
|
+
"bizCode": "universalBP"
|
|
230
|
+
},
|
|
231
|
+
"headers": {
|
|
232
|
+
"Content-Type": "application/json"
|
|
233
|
+
},
|
|
234
|
+
"body": {
|
|
235
|
+
"excelName": "{{payload.excelName}}",
|
|
236
|
+
"pageSize": 20,
|
|
237
|
+
"offset": 0,
|
|
238
|
+
"havingList": [],
|
|
239
|
+
"endTime": "{{payload.endTime}}",
|
|
240
|
+
"from": "pcBaseReport",
|
|
241
|
+
"unifyType": "zhai",
|
|
242
|
+
"effectEqual": 15,
|
|
243
|
+
"startTime": "{{payload.startTime}}",
|
|
244
|
+
"splitType": "{{payload.splitType}}",
|
|
245
|
+
"bizCodeIn": [
|
|
246
|
+
"onebpSearch"
|
|
247
|
+
],
|
|
248
|
+
"queryFieldIn": [
|
|
249
|
+
"adPv",
|
|
250
|
+
"click",
|
|
251
|
+
"charge",
|
|
252
|
+
"ctr",
|
|
253
|
+
"ecpc",
|
|
254
|
+
"alipayInshopAmt",
|
|
255
|
+
"alipayInshopNum",
|
|
256
|
+
"cvr",
|
|
257
|
+
"cartInshopNum",
|
|
258
|
+
"itemColInshopNum",
|
|
259
|
+
"shopColDirNum",
|
|
260
|
+
"colNum",
|
|
261
|
+
"itemColInshopCost"
|
|
262
|
+
],
|
|
263
|
+
"vsType": "{{payload.vsType}}",
|
|
264
|
+
"vsTime": "{{payload.vsTime}}",
|
|
265
|
+
"searchValue": "{{payload.searchValue}}",
|
|
266
|
+
"searchKey": "strategyCampaignIdOrName",
|
|
267
|
+
"queryDomains": [
|
|
268
|
+
"adgroup",
|
|
269
|
+
"date",
|
|
270
|
+
"campaign"
|
|
271
|
+
],
|
|
272
|
+
"adzonePkgIdIn": [
|
|
273
|
+
"114786650498",
|
|
274
|
+
"114790550288"
|
|
275
|
+
],
|
|
276
|
+
"fieldType": "all",
|
|
277
|
+
"rptType": "adgroup",
|
|
278
|
+
"parentAdcName": "report_frame_adgroup",
|
|
279
|
+
"byPage": false,
|
|
280
|
+
"fromRealTime": false,
|
|
281
|
+
"source": "async_dowdload",
|
|
282
|
+
"csrfId": "{{payload.csrfId}}",
|
|
283
|
+
"bizCode": "universalBP",
|
|
284
|
+
"loginPointId": "{{payload.loginPointId}}"
|
|
285
|
+
},
|
|
286
|
+
"responsePath": "data.taskId",
|
|
287
|
+
"metaPath": "data"
|
|
288
|
+
},
|
|
224
289
|
"get_download_url": {
|
|
225
290
|
"method": "GET",
|
|
226
291
|
"url": "https://bpcommon.alimama.com/commonapi/report/async/getDownloadUrl.json",
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
"apiSources": {
|
|
157
157
|
"live_metrics_overview": {
|
|
158
158
|
"method": "GET",
|
|
159
|
+
"removeHeaders": ["Bx-ua"],
|
|
159
160
|
"urlVariants": [
|
|
160
161
|
{
|
|
161
162
|
"whenPath": "payload.dateType",
|
|
@@ -182,6 +183,7 @@
|
|
|
182
183
|
},
|
|
183
184
|
"live_metrics_trend": {
|
|
184
185
|
"method": "GET",
|
|
186
|
+
"removeHeaders": ["Bx-ua"],
|
|
185
187
|
"urlVariants": [
|
|
186
188
|
{
|
|
187
189
|
"whenPath": "payload.dateType",
|
|
@@ -205,6 +207,41 @@
|
|
|
205
207
|
"responsePath": "content.data.data",
|
|
206
208
|
"metaPath": "content.data"
|
|
207
209
|
},
|
|
210
|
+
"live_metrics_custom_overview": {
|
|
211
|
+
"method": "GET",
|
|
212
|
+
"removeHeaders": ["Bx-ua"],
|
|
213
|
+
"url": "https://sycm.taobao.com/portal/long/period/nodistinct/coreIndex/getShopMainIndexes/v3.json",
|
|
214
|
+
"query": {
|
|
215
|
+
"needCycleCrc": "true",
|
|
216
|
+
"dateType": "compareRange",
|
|
217
|
+
"dateRange": "{{payload.dateRange}}",
|
|
218
|
+
"device": "{{payload.device}}",
|
|
219
|
+
"_": "{{runtime.timestamp}}",
|
|
220
|
+
"token": "{{session.token}}"
|
|
221
|
+
},
|
|
222
|
+
"headers": {
|
|
223
|
+
"sycm-referer": "/portal/home.htm"
|
|
224
|
+
},
|
|
225
|
+
"responsePath": "content.data.data",
|
|
226
|
+
"metaPath": "content.data"
|
|
227
|
+
},
|
|
228
|
+
"live_metrics_custom_trend": {
|
|
229
|
+
"method": "GET",
|
|
230
|
+
"removeHeaders": ["Bx-ua"],
|
|
231
|
+
"url": "https://sycm.taobao.com/portal/long/period/nodistinct/coreIndex/new/trend/v3.json",
|
|
232
|
+
"query": {
|
|
233
|
+
"dateType": "compareRange",
|
|
234
|
+
"dateRange": "{{payload.dateRange}}",
|
|
235
|
+
"device": "{{payload.device}}",
|
|
236
|
+
"_": "{{runtime.timestamp}}",
|
|
237
|
+
"token": "{{session.token}}"
|
|
238
|
+
},
|
|
239
|
+
"headers": {
|
|
240
|
+
"sycm-referer": "/portal/home.htm"
|
|
241
|
+
},
|
|
242
|
+
"responsePath": "content.data.data",
|
|
243
|
+
"metaPath": "content.data"
|
|
244
|
+
},
|
|
208
245
|
"growth_factor_overview": {
|
|
209
246
|
"method": "GET",
|
|
210
247
|
"url": "https://sycm.taobao.com/portal/board/grow/factor/overview.json",
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
{
|
|
2
|
+
"siteId": "alimama_report",
|
|
3
|
+
"taskType": "download_adgroup_report",
|
|
4
|
+
"platform": "taobao",
|
|
5
|
+
"name": "下载阿里妈妈单元报表",
|
|
6
|
+
"description": "打开阿里妈妈账户报表页,捕获鉴权信息,创建单元报表异步下载任务,轮询下载链接并将文件回传 relay 存储。",
|
|
7
|
+
"requiredFields": [
|
|
8
|
+
{
|
|
9
|
+
"name": "startTime",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "报表开始日期,格式 YYYY-MM-DD"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "endTime",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "报表结束日期,格式 YYYY-MM-DD"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"optionalFields": [
|
|
20
|
+
{
|
|
21
|
+
"name": "splitType",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "报表时间粒度,支持 sum/day/week/month/calendarmonth",
|
|
24
|
+
"default": "sum"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "returnHostPatterns",
|
|
28
|
+
"type": "array",
|
|
29
|
+
"description": "任务结束后若存在匹配这些 host 或 URL 片段的标签页,则切回该标签页"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"nodes": [
|
|
33
|
+
{
|
|
34
|
+
"nodeId": "s1",
|
|
35
|
+
"name": "open_alimama_report",
|
|
36
|
+
"goal": "打开阿里妈妈账户报表页并预抓鉴权接口",
|
|
37
|
+
"tool": "open_tab",
|
|
38
|
+
"args": {
|
|
39
|
+
"url": "https://one.alimama.com/index.html#!/report/account?rptType=account",
|
|
40
|
+
"captureNetwork": {
|
|
41
|
+
"capturePlanId": "auth_info"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"nodeId": "s2",
|
|
47
|
+
"name": "validate_alimama_report",
|
|
48
|
+
"goal": "校验当前页面已进入账户报表页",
|
|
49
|
+
"tool": "validate_page",
|
|
50
|
+
"args": {}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"nodeId": "s3",
|
|
54
|
+
"name": "collect_auth_info",
|
|
55
|
+
"goal": "从 checkAccess 响应中提取 csrfId 和 loginPointId",
|
|
56
|
+
"tool": "collect_structured_data",
|
|
57
|
+
"args": {
|
|
58
|
+
"extractor": "download_auth_info",
|
|
59
|
+
"sourceNodeId": "s1"
|
|
60
|
+
},
|
|
61
|
+
"storeAs": "authInfo"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"nodeId": "s4",
|
|
65
|
+
"name": "show_download_activity",
|
|
66
|
+
"goal": "在页面顶部展示独立提示,标记当前正在准备单元报表下载",
|
|
67
|
+
"tool": "present_page_activity",
|
|
68
|
+
"args": {
|
|
69
|
+
"mode": "start",
|
|
70
|
+
"message": "正在提交报表下载任务",
|
|
71
|
+
"style": "info",
|
|
72
|
+
"profile": "none"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"nodeId": "s5",
|
|
77
|
+
"name": "create_adgroup_download_task",
|
|
78
|
+
"goal": "创建单元报表异步下载任务",
|
|
79
|
+
"tool": "invoke_page_request",
|
|
80
|
+
"args": {
|
|
81
|
+
"sourceId": "create_adgroup_download_task",
|
|
82
|
+
"payload": {
|
|
83
|
+
"startTime": "{{data.startTime}}",
|
|
84
|
+
"endTime": "{{data.endTime}}",
|
|
85
|
+
"vsTime": "{{data.endTime}}",
|
|
86
|
+
"vsType": "week",
|
|
87
|
+
"searchValue": "",
|
|
88
|
+
"splitType": "{{data.splitType}}",
|
|
89
|
+
"excelName": "单元报表_{{data.startTime}}_{{data.endTime}}"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"fromContext": {
|
|
93
|
+
"payload.csrfId": "outputs.authInfo.data.csrfId",
|
|
94
|
+
"payload.loginPointId": "outputs.authInfo.data.loginPointId"
|
|
95
|
+
},
|
|
96
|
+
"storeAs": "downloadTask"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"nodeId": "s6",
|
|
100
|
+
"name": "update_download_activity",
|
|
101
|
+
"goal": "更新页面提示为等待报表生成完成",
|
|
102
|
+
"tool": "present_page_activity",
|
|
103
|
+
"args": {
|
|
104
|
+
"mode": "start",
|
|
105
|
+
"message": "正在等待报表生成完成",
|
|
106
|
+
"style": "info",
|
|
107
|
+
"profile": "none"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"nodeId": "s7",
|
|
112
|
+
"name": "poll_download_url",
|
|
113
|
+
"goal": "等待下载任务生成链接并轮询拿到下载地址",
|
|
114
|
+
"tool": "invoke_page_request",
|
|
115
|
+
"args": {
|
|
116
|
+
"sourceId": "get_download_url",
|
|
117
|
+
"payload": {},
|
|
118
|
+
"polling": {
|
|
119
|
+
"initialDelayMs": 30000,
|
|
120
|
+
"intervalMs": 5000,
|
|
121
|
+
"timeoutMs": 120000,
|
|
122
|
+
"maxAttempts": 25
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"fromContext": {
|
|
126
|
+
"payload.taskId": "outputs.downloadTask.response.data",
|
|
127
|
+
"payload.csrfId": "outputs.authInfo.data.csrfId",
|
|
128
|
+
"payload.loginPointId": "outputs.authInfo.data.loginPointId"
|
|
129
|
+
},
|
|
130
|
+
"storeAs": "downloadLink"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"nodeId": "s8",
|
|
134
|
+
"name": "download_report_file",
|
|
135
|
+
"goal": "拉取下载链接并把文件内容回传给 relay 存储",
|
|
136
|
+
"tool": "download_page_file",
|
|
137
|
+
"args": {
|
|
138
|
+
"filename": "单元报表_{{data.startTime}}_{{data.endTime}}.zip"
|
|
139
|
+
},
|
|
140
|
+
"fromContext": {
|
|
141
|
+
"url": "outputs.downloadLink.response.data"
|
|
142
|
+
},
|
|
143
|
+
"storeAs": "downloadResult"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"nodeId": "s9",
|
|
147
|
+
"name": "hide_download_activity",
|
|
148
|
+
"goal": "在下载链路结束后关闭页面提示",
|
|
149
|
+
"tool": "present_page_activity",
|
|
150
|
+
"args": {
|
|
151
|
+
"mode": "stop"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"nodeId": "s10",
|
|
156
|
+
"name": "switch_to_existing_host_tab",
|
|
157
|
+
"goal": "任务结束后若存在匹配的既有标签页则切回去",
|
|
158
|
+
"when": "exists(payload.returnHostPatterns)",
|
|
159
|
+
"tool": "switch_tab",
|
|
160
|
+
"args": {
|
|
161
|
+
"urlIncludesAny": "{{data.returnHostPatterns}}",
|
|
162
|
+
"optional": true
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"alimama-campaign-report-download.json",
|
|
4
4
|
"alimama-crowd-report-download.json",
|
|
5
5
|
"alimama-keyword-report-download.json",
|
|
6
|
+
"alimama-adgroup-report-download.json",
|
|
6
7
|
"sycm-taobao-home-live-metrics.json",
|
|
7
8
|
"sycm-taobao-api-group.json",
|
|
8
9
|
"pinduoduo-mms-home-overview.json",
|