siluzan-tso-cli 1.1.67-beta.1 → 1.1.67-beta.2
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/README.md +1 -1
- package/dist/index.js +152 -0
- package/dist/skill/SKILL.md +1 -1
- package/dist/skill/_meta.json +2 -2
- package/dist/skill/references/accounts/accounts-balance-stats.md +27 -0
- package/dist/skill/references/core/workflows.md +2 -1
- package/dist/skill/scripts/install.ps1 +1 -1
- package/dist/skill/scripts/install.sh +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ siluzan-tso init -d /path/to/skills # 写入自定义目录
|
|
|
51
51
|
siluzan-tso init --force # 强制覆盖已存在文件
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
> **注意**:当前为测试版(1.1.67-beta.
|
|
54
|
+
> **注意**:当前为测试版(1.1.67-beta.2),供内部测试使用。正式发布后安装命令将改为 `npm install -g siluzan-tso-cli`。
|
|
55
55
|
|
|
56
56
|
| 助手 | 建议 `--ai` |
|
|
57
57
|
| ----------------------- | ------------------------------------ |
|
package/dist/index.js
CHANGED
|
@@ -133590,6 +133590,143 @@ Google \u8D26\u6237\u8BBF\u95EE\u6743\u9650\u6821\u9A8C ${mediaCustomerId}`);
|
|
|
133590
133590
|
}
|
|
133591
133591
|
}
|
|
133592
133592
|
|
|
133593
|
+
// src/commands/account-manage/google-promotions.ts
|
|
133594
|
+
init_auth();
|
|
133595
|
+
init_cli_json_snapshot();
|
|
133596
|
+
init_media_customer_id();
|
|
133597
|
+
var INCENTIVE_STATE_LABEL = {
|
|
133598
|
+
Redeemed: "\u5DF2\u5151\u6362\uFF0C\u5F85\u5B8C\u6210\u6D88\u8017",
|
|
133599
|
+
Fulfilled: "\u5DF2\u8FBE\u6210\u6761\u4EF6\uFF0C\u8D60\u9001\u91D1\u5C1A\u672A\u5230\u8D26",
|
|
133600
|
+
RewardGranted: "\u8D60\u9001\u91D1\u5DF2\u5230\u8D26",
|
|
133601
|
+
Expired: "\u672A\u5728\u671F\u9650\u5185\u8FBE\u6210\u6761\u4EF6",
|
|
133602
|
+
RewardExpired: "\u8D60\u9001\u91D1\u5DF2\u8FC7\u671F",
|
|
133603
|
+
RewardExhausted: "\u8D60\u9001\u91D1\u5DF2\u7528\u5B8C",
|
|
133604
|
+
Invalidated: "\u5DF2\u4F5C\u5E9F",
|
|
133605
|
+
Unknown: "\u672A\u77E5",
|
|
133606
|
+
Unspecified: "\u672A\u77E5"
|
|
133607
|
+
};
|
|
133608
|
+
function incentiveStateLabel(state) {
|
|
133609
|
+
return INCENTIVE_STATE_LABEL[state] ?? (state || "\u672A\u77E5");
|
|
133610
|
+
}
|
|
133611
|
+
function formatPromotionAmount(value) {
|
|
133612
|
+
if (value == null || !Number.isFinite(value)) return "\u2014";
|
|
133613
|
+
return value.toFixed(6).replace(/\.?0+$/, "");
|
|
133614
|
+
}
|
|
133615
|
+
function buildAppliedIncentivesUrl(googleApiUrl, mediaCustomerId) {
|
|
133616
|
+
const base2 = googleApiUrl.replace(/\/$/, "");
|
|
133617
|
+
return `${base2}/query/media-account/${mediaCustomerId}/applied-incentives`;
|
|
133618
|
+
}
|
|
133619
|
+
function readString(row, ...keys) {
|
|
133620
|
+
for (const key of keys) {
|
|
133621
|
+
const value = row[key];
|
|
133622
|
+
if (typeof value === "string" && value.trim()) return value.trim();
|
|
133623
|
+
}
|
|
133624
|
+
return null;
|
|
133625
|
+
}
|
|
133626
|
+
function readMoney(row, ...keys) {
|
|
133627
|
+
for (const key of keys) {
|
|
133628
|
+
if (!(key in row) || row[key] == null) continue;
|
|
133629
|
+
const value = row[key];
|
|
133630
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
133631
|
+
if (typeof value === "string" && value.trim() && Number.isFinite(Number(value))) return Number(value);
|
|
133632
|
+
}
|
|
133633
|
+
return null;
|
|
133634
|
+
}
|
|
133635
|
+
function parseAppliedIncentive(raw) {
|
|
133636
|
+
const row = raw && typeof raw === "object" ? raw : {};
|
|
133637
|
+
return {
|
|
133638
|
+
resourceName: readString(row, "resourceName", "ResourceName") ?? "",
|
|
133639
|
+
couponCode: readString(row, "couponCode", "CouponCode") ?? "",
|
|
133640
|
+
incentiveState: readString(row, "incentiveState", "IncentiveState") ?? "",
|
|
133641
|
+
currencyCode: readString(row, "currencyCode", "CurrencyCode"),
|
|
133642
|
+
redemptionDateTime: readString(row, "redemptionDateTime", "RedemptionDateTime"),
|
|
133643
|
+
fulfillmentExpirationDateTime: readString(
|
|
133644
|
+
row,
|
|
133645
|
+
"fulfillmentExpirationDateTime",
|
|
133646
|
+
"FulfillmentExpirationDateTime"
|
|
133647
|
+
),
|
|
133648
|
+
rewardGrantDateTime: readString(row, "rewardGrantDateTime", "RewardGrantDateTime"),
|
|
133649
|
+
rewardExpirationDateTime: readString(row, "rewardExpirationDateTime", "RewardExpirationDateTime"),
|
|
133650
|
+
rewardAmount: readMoney(row, "rewardAmount", "RewardAmount"),
|
|
133651
|
+
grantedAmount: readMoney(row, "grantedAmount", "GrantedAmount"),
|
|
133652
|
+
requiredMinSpend: readMoney(row, "requiredMinSpend", "RequiredMinSpend"),
|
|
133653
|
+
currentSpendTowardsFulfillment: readMoney(
|
|
133654
|
+
row,
|
|
133655
|
+
"currentSpendTowardsFulfillment",
|
|
133656
|
+
"CurrentSpendTowardsFulfillment"
|
|
133657
|
+
),
|
|
133658
|
+
rewardBalanceRemaining: readMoney(row, "rewardBalanceRemaining", "RewardBalanceRemaining")
|
|
133659
|
+
};
|
|
133660
|
+
}
|
|
133661
|
+
function parseAppliedIncentiveList(body) {
|
|
133662
|
+
const list = Array.isArray(body) ? body : body && typeof body === "object" && Array.isArray(body.items) ? body.items : null;
|
|
133663
|
+
if (!list) {
|
|
133664
|
+
throw new Error("\u8D60\u9001\u91D1\u63A5\u53E3\u8FD4\u56DE\u7684\u4E0D\u662F\u5217\u8868");
|
|
133665
|
+
}
|
|
133666
|
+
return list.map(parseAppliedIncentive);
|
|
133667
|
+
}
|
|
133668
|
+
function assertGoogleMediaCustomerId2(raw) {
|
|
133669
|
+
try {
|
|
133670
|
+
return requireNumericMediaCustomerId(raw, "--account");
|
|
133671
|
+
} catch (error) {
|
|
133672
|
+
console.error(`
|
|
133673
|
+
\u274C ${error instanceof Error ? error.message : String(error)}
|
|
133674
|
+
`);
|
|
133675
|
+
process.exit(1);
|
|
133676
|
+
}
|
|
133677
|
+
}
|
|
133678
|
+
function formatAppliedIncentivesText(payload) {
|
|
133679
|
+
if (payload.items.length === 0) {
|
|
133680
|
+
return [
|
|
133681
|
+
`\u8D26\u6237 ${payload.mediaCustomerId} \u6CA1\u6709\u5DF2\u5151\u6362\u7684 Google Ads \u8D60\u9001\u91D1\u3002`,
|
|
133682
|
+
"\u672A\u5151\u6362\u7684\u65B0\u5BA2\u4F18\u60E0\u4E0D\u5728\u8FD9\u4E2A\u63A5\u53E3\u91CC\u3002\u8D26\u6237\u9884\u7B97\u8C03\u6574\u5408\u8BA1\u8FD8\u6DF7\u6709\u65E0\u6548\u70B9\u51FB\u8D54\u4ED8\uFF0C\u4E0D\u80FD\u5F53\u6210\u8D60\u9001\u91D1\u3002"
|
|
133683
|
+
].join("\n");
|
|
133684
|
+
}
|
|
133685
|
+
const blocks = payload.items.map((item, index) => {
|
|
133686
|
+
const currency = item.currencyCode ? ` ${item.currencyCode}` : "";
|
|
133687
|
+
return [
|
|
133688
|
+
`${index + 1}. \u5238\u7801 ${item.couponCode || "\u2014"} ${incentiveStateLabel(item.incentiveState)}\uFF08${item.incentiveState || "\u2014"}\uFF09`,
|
|
133689
|
+
` \u6700\u9AD8\u53EF\u5F97${currency} ${formatPromotionAmount(item.rewardAmount)} \u5DF2\u53D1\u653E ${formatPromotionAmount(item.grantedAmount)} \u5269\u4F59 ${formatPromotionAmount(item.rewardBalanceRemaining)}`,
|
|
133690
|
+
` \u6700\u4F4E\u6D88\u8017 ${formatPromotionAmount(item.requiredMinSpend)} \u5DF2\u8BA1\u5165 ${formatPromotionAmount(item.currentSpendTowardsFulfillment)}`,
|
|
133691
|
+
` \u5151\u6362 ${item.redemptionDateTime ?? "\u2014"} UTC \u8FBE\u6210\u622A\u6B62 ${item.fulfillmentExpirationDateTime ?? "\u2014"} UTC`,
|
|
133692
|
+
` \u5230\u8D26 ${item.rewardGrantDateTime ?? "\u2014"} UTC \u8D60\u9001\u8FC7\u671F ${item.rewardExpirationDateTime ?? "\u2014"} UTC`
|
|
133693
|
+
].join("\n");
|
|
133694
|
+
});
|
|
133695
|
+
return [`Google \u8D60\u9001\u91D1\uFF08\u5DF2\u5151\u6362\uFF09 \u8D26\u6237 ${payload.mediaCustomerId} \u5171 ${payload.count} \u6761`, "", ...blocks].join(
|
|
133696
|
+
"\n"
|
|
133697
|
+
);
|
|
133698
|
+
}
|
|
133699
|
+
async function fetchAppliedIncentives(config, mediaCustomerId, verbose) {
|
|
133700
|
+
await ensureDataPermission(config);
|
|
133701
|
+
const url = buildAppliedIncentivesUrl(googleGatewayBase(config), mediaCustomerId);
|
|
133702
|
+
const body = await apiFetch2(url, config, {}, verbose);
|
|
133703
|
+
const items3 = parseAppliedIncentiveList(body);
|
|
133704
|
+
return { mediaCustomerId, count: items3.length, items: items3 };
|
|
133705
|
+
}
|
|
133706
|
+
async function runAccountPromotions(opts) {
|
|
133707
|
+
const mediaCustomerId = assertGoogleMediaCustomerId2(opts.account);
|
|
133708
|
+
const config = loadConfig(opts.token);
|
|
133709
|
+
let payload;
|
|
133710
|
+
try {
|
|
133711
|
+
payload = await fetchAppliedIncentives(config, mediaCustomerId, opts.verbose);
|
|
133712
|
+
} catch (error) {
|
|
133713
|
+
console.error(`
|
|
133714
|
+
\u274C ${error instanceof Error ? error.message : String(error)}
|
|
133715
|
+
`);
|
|
133716
|
+
process.exit(1);
|
|
133717
|
+
}
|
|
133718
|
+
if (await emitCliJsonOrSnapshot(opts, {
|
|
133719
|
+
section: "account-promotions",
|
|
133720
|
+
commandLabel: "account promotions",
|
|
133721
|
+
payload
|
|
133722
|
+
})) {
|
|
133723
|
+
return;
|
|
133724
|
+
}
|
|
133725
|
+
console.log(`
|
|
133726
|
+
${formatAppliedIncentivesText(payload)}
|
|
133727
|
+
`);
|
|
133728
|
+
}
|
|
133729
|
+
|
|
133593
133730
|
// src/commands/account-manage/share.ts
|
|
133594
133731
|
init_dist();
|
|
133595
133732
|
init_auth();
|
|
@@ -134651,6 +134788,21 @@ function register25(program2) {
|
|
|
134651
134788
|
});
|
|
134652
134789
|
}
|
|
134653
134790
|
);
|
|
134791
|
+
accountCmd.command("promotions").description(
|
|
134792
|
+
"\u67E5\u8BE2 Google \u5DF2\u5151\u6362\u8D60\u9001\u91D1\uFF08\u91D1\u989D\u3001\u5269\u4F59\u3001\u8FBE\u6210\u622A\u6B62\u3001\u8D60\u9001\u5230\u671F\uFF09\u3002\u4EC5 Google\uFF0C\u672A\u53D1\u653E\u5B57\u6BB5\u4E3A null"
|
|
134793
|
+
).requiredOption(
|
|
134794
|
+
"-a, --account <mediaCustomerId>",
|
|
134795
|
+
"Google mediaCustomerId\uFF08\u7EAF\u6570\u5B57\uFF0C\u6216\u5E26\u8FDE\u5B57\u7B26\u7684 CID\uFF09"
|
|
134796
|
+
).option("-t, --token <token>", "Auth Token").option("--json-out <path>", "\u843D\u76D8 JSON\uFF1Bstdout \u4E00\u884C\u6458\u8981").option("--verbose", "\u6253\u5370\u8BE6\u7EC6\u9519\u8BEF", false).action(
|
|
134797
|
+
async (opts) => {
|
|
134798
|
+
await runAccountPromotions({
|
|
134799
|
+
account: opts.account,
|
|
134800
|
+
token: opts.token,
|
|
134801
|
+
jsonOut: opts.jsonOut,
|
|
134802
|
+
verbose: opts.verbose
|
|
134803
|
+
});
|
|
134804
|
+
}
|
|
134805
|
+
);
|
|
134654
134806
|
accountCmd.command("delink").description(
|
|
134655
134807
|
"\u89E3\u9664\u6388\u6743\uFF1A\u65AD\u5F00\u5E7F\u544A\u8D26\u6237\u4E0E\u5F53\u524D\u4E1D\u8DEF\u8D5E\u8D26\u53F7\u7684\u5173\u8054\uFF08\u7834\u574F\u6027\uFF1B\u987B\u7528\u6237\u786E\u8BA4\u540E\u52A0 --i-confirm + --commit\uFF09"
|
|
134656
134808
|
).option("--id <entityId>", "\u5355\u4E2A\u8D26\u6237 entityId\uFF08\u6765\u81EA list-accounts \u7684 ma.entityId \u5B57\u6BB5\uFF09").option("--ids <entityIds>", "\u6279\u91CF entityId\uFF0C\u9017\u53F7\u5206\u9694\uFF08\u4E0E --id \u4E8C\u9009\u4E00\uFF0C\u53EF\u540C\u65F6\u4F20\uFF09").option("--i-confirm", "\u786E\u8BA4\u5DF2\u5411\u7528\u6237\u8BF4\u660E\u89E3\u7ED1\u98CE\u9669\u5E76\u83B7\u5F97\u660E\u786E\u540C\u610F", false).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: siluzan-tso
|
|
3
|
-
description: 丝路赞 TSO 广告平台(Google/Bing/Yandex/TikTok/MetaAd),凡涉及丝路赞/TSO、投广告、出价预算、广告账户管理,或需要做行业分析/市场分析/行业分析报告(含「写一份 XX 行业报告」「电商/制造/医疗等行业报告」「市场调查/战略市场/KA 市场报告」「竞品/GTM/市场格局/行业趋势」等,无论是否提及丝路赞/广告/客户)须加载本 skill。【§零·最高优先】网址/域名/官网+诊断/检测/监测/评估/体检/报告/符合投放要求/能不能投(含「网络诊断」混说)→P8 website-diagnosis collect(禁纯WebFetch/肉眼看页),禁止P9/P1/W3、禁止A/B/C/D追问;细则见 intent-routing.md §零。【§零·B·次高优先】未命中§零时,行业/市场分析报告类话术→必走P9 market-analysis collect+render出HTML,禁止纯WebSearch/WebFetch在对话里写Markdown/HTML当终稿、禁止改走P8/P1/P4/W5/google-analysis;细则见 references/core/intent-routing.md §零·B。【§零·C·关键词规划】Google Ads/谷歌广告拓词、关键词规划/推荐、Keyword Planner、长尾关键词、月搜索量/搜索量、竞争度、核心词/种子词扩词(含「阅读网址/文章/页面后针对核心词出带搜索量词表」,无论是否提及丝路赞/TSO/账户)→必走W5,一次 keyword -k … --google-only --min-monthly-search,禁止分批洗词脚本,禁止WebSearch/WebFetch编造搜索量当终稿;细则见 references/core/intent-routing.md §零·C。【报告/诊断消歧】其余报告类话术禁止默认某一CLI——行业/市场/战略/行业分析报告→P9 market-analysis(必走collect+render,禁止纯WebSearch代替);Google账户ID+健康诊断→P1 google-ads-diagnosis;只要周期数据/8维/花费转化汇总/Excel→P4;Demand Gen/需求开发投放数据分析或汇总报告→P4-DG(demand-gen-render 出 HTML,要 Excel 走对应纲要,不是创建 W3);Google/谷歌广告月度报告、月总结与规划、季度报告、Q3汇总、Q4规划、季度汇报、投放季报、客户版、大族模板、下月规划→P10 google-quarterly;Meta/TikTok/Bing周期→P4/P4-FB;多账户对比→P3/P5;OKKI周报→P6;Google询盘→P7;官网+明确要搜索广告方案/campaign JSON→W3;Meta Instant Form 线索广告→W13;仅要词表+搜索量/竞争度→W5;平台优化报告列表/推送→W7;对象仍不清→Read intent-routing.md
|
|
3
|
+
description: 丝路赞 TSO 广告平台(Google/Bing/Yandex/TikTok/MetaAd),凡涉及丝路赞/TSO、投广告、出价预算、广告账户管理,或需要做行业分析/市场分析/行业分析报告(含「写一份 XX 行业报告」「电商/制造/医疗等行业报告」「市场调查/战略市场/KA 市场报告」「竞品/GTM/市场格局/行业趋势」等,无论是否提及丝路赞/广告/客户)须加载本 skill。【§零·最高优先】网址/域名/官网+诊断/检测/监测/评估/体检/报告/符合投放要求/能不能投(含「网络诊断」混说)→P8 website-diagnosis collect(禁纯WebFetch/肉眼看页),禁止P9/P1/W3、禁止A/B/C/D追问;细则见 intent-routing.md §零。【§零·B·次高优先】未命中§零时,行业/市场分析报告类话术→必走P9 market-analysis collect+render出HTML,禁止纯WebSearch/WebFetch在对话里写Markdown/HTML当终稿、禁止改走P8/P1/P4/W5/google-analysis;细则见 references/core/intent-routing.md §零·B。【§零·C·关键词规划】Google Ads/谷歌广告拓词、关键词规划/推荐、Keyword Planner、长尾关键词、月搜索量/搜索量、竞争度、核心词/种子词扩词(含「阅读网址/文章/页面后针对核心词出带搜索量词表」,无论是否提及丝路赞/TSO/账户)→必走W5,一次 keyword -k … --google-only --min-monthly-search,禁止分批洗词脚本,禁止WebSearch/WebFetch编造搜索量当终稿;细则见 references/core/intent-routing.md §零·C。【报告/诊断消歧】其余报告类话术禁止默认某一CLI——行业/市场/战略/行业分析报告→P9 market-analysis(必走collect+render,禁止纯WebSearch代替);Google账户ID+健康诊断→P1 google-ads-diagnosis;只要周期数据/8维/花费转化汇总/Excel→P4;Demand Gen/需求开发投放数据分析或汇总报告→P4-DG(demand-gen-render 出 HTML,要 Excel 走对应纲要,不是创建 W3);Google/谷歌广告月度报告、月总结与规划、季度报告、Q3汇总、Q4规划、季度汇报、投放季报、客户版、大族模板、下月规划→P10 google-quarterly;Meta/TikTok/Bing周期→P4/P4-FB;多账户对比→P3/P5;OKKI周报→P6;Google询盘→P7;官网+明确要搜索广告方案/campaign JSON→W3;Meta Instant Form 线索广告→W13;仅要词表+搜索量/竞争度→W5;平台优化报告列表/推送→W7;对象仍不清→Read intent-routing.md。【账户】列表/余额/消耗/激活账单/Google赠送金(W1)、多账户余额预警 balance-scan(P2)、多户消耗汇总 accounts-digest(P3)、五大媒体开户与进度(W2)、分享/解绑/MCC/BC/BM/权限(W9)。【投放】**搭建仅 Google+Meta**:Google Search/PMax/Demand Gen(W3,无 Display;Demand Gen 用 ad demand-gen;含 CRUD/PMax/batch W4);Meta Instant Form(W13)。TikTok/Bing/Yandex **不能建广告**。另:拓词 W5、optimize W6。【财务】充值/钱包、转账记录、发票/开票/抬头(W8);写操作审计与 restore。【运营】智能预警 forewarning 创建/启停/记录(W10)、TikTok/Meta 线索 clue(W11)、日周巡检(W12)、宿主编排/投放自控/异常监控(hosted-automation)。【其他】RAG 知识库检索、Meta/Facebook 周期与诊断 HTML、Google/Meta 周期 Excel、多账户 google-analysis-batch。
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: 需要 Node.js 18+、已安装 siluzan-tso-cli,通过 send-login-code + login 或 config set 完成鉴权
|
|
6
6
|
metadata:
|
package/dist/skill/_meta.json
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
- balance-scan(P2)
|
|
9
9
|
- accounts-digest(P3)
|
|
10
10
|
- stats
|
|
11
|
+
- account promotions(Google 赠送金)
|
|
11
12
|
|
|
12
13
|
## balance-scan — 多账户余额续航扫描
|
|
13
14
|
|
|
@@ -260,3 +261,29 @@ siluzan-tso stats -m Google -a <mediaCustomerId> --json-out ./snap
|
|
|
260
261
|
```
|
|
261
262
|
|
|
262
263
|
---
|
|
264
|
+
|
|
265
|
+
## account promotions — Google 已兑换赠送金
|
|
266
|
+
|
|
267
|
+
只查 **已经兑换到这个 Google 广告账户上** 的赠送金。网关 `GET {googleApiUrl}/query/media-account/{id}/applied-incentives`,对应 Google Ads `applied_incentive`([Incentives](https://developers.google.com/google-ads/api/docs/billing/incentives))。Sammamish:`MediaAccountQueryController.GetAppliedIncentivesAsync` → `AppliedIncentiveService`。
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
siluzan-tso account promotions -a <mediaCustomerId>
|
|
271
|
+
siluzan-tso account promotions -a 123-456-7890 --json-out ./snap
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
| 字段 | 含义 |
|
|
275
|
+
| --- | --- |
|
|
276
|
+
| `incentiveState` | `Redeemed` 已兑换待消耗;`Fulfilled` 已达成但未到账;`RewardGranted` 已到账;`Expired` 未达成过期;`RewardExpired` 赠送过期;`RewardExhausted` 已用完;`Invalidated` 作废 |
|
|
277
|
+
| `rewardAmount` | 最高可得,主币种 |
|
|
278
|
+
| `grantedAmount` | 实际发放。未发放为 **null**,禁止写成 0 |
|
|
279
|
+
| `rewardBalanceRemaining` | 剩余赠送金。未发放为 **null** |
|
|
280
|
+
| `requiredMinSpend` / `currentSpendTowardsFulfillment` | 达成条件所需消耗 / 已计入消耗 |
|
|
281
|
+
| `fulfillmentExpirationDateTime` | 达成条件的截止时间,UTC `yyyy-MM-dd HH:mm:ss` |
|
|
282
|
+
| `rewardGrantDateTime` / `rewardExpirationDateTime` | 到账时间 / 赠送失效时间。未发放为 null |
|
|
283
|
+
| `currencyCode` / `couponCode` | 币种、券码 |
|
|
284
|
+
|
|
285
|
+
时间是 Google 的 UTC 原文,不要自行换算时区。空列表表示没有已兑换赠送金。未兑换的新客优惠不在本命令里。`account_budget.total_adjustments` 还混有无效点击赔付和超投抵扣,**禁止**把它说成赠送金。
|
|
286
|
+
|
|
287
|
+
开发者令牌若未开通 Incentives,接口会失败并带回 Google 的错误原文。这和「该户没有赠送金」不是一回事:失败要原文告诉用户,空数组才是没有记录。
|
|
288
|
+
|
|
289
|
+
---
|
|
@@ -24,13 +24,14 @@
|
|
|
24
24
|
|
|
25
25
|
## W1 · 账户查询(列表 / 余额 / 消耗 / 账单)
|
|
26
26
|
|
|
27
|
-
-
|
|
27
|
+
- **触发**:账户列表/有多少、单户余额、单户消耗、激活充值账单、Google 赠送金。
|
|
28
28
|
- **必读**:`references/accounts/accounts-list.md` + `accounts-balance-stats.md`。
|
|
29
29
|
- **步骤**:
|
|
30
30
|
1. 列表/数量:`list-accounts -m <媒体> --page-size 999 --json-out ./snap`,脚本读 `list-accounts-*.json` 的 `total` / `items[]`(**禁止**默认 20 条再翻页)。
|
|
31
31
|
2. 单户余额:`balance -m <媒体> -a <mediaCustomerId>`(Yandex 用 `porg-…`,**不是** `entityId`)。
|
|
32
32
|
3. 单户消耗:`stats -m <媒体> -a <mediaCustomerId> --start <S> --end <D>`(用户已给账户号则原样入 `-a`;空/`403` 先核验 ID,见 `accounts-balance-stats.md`;按日 Excel → **P4-DAILY**;多账户对比 → **P3**)。
|
|
33
33
|
4. 激活账单:先取 `entityId` → `account-active-bills -m <媒体> --id <entityId> --json-out ./snap`。
|
|
34
|
+
5. Google 赠送金:`account promotions -a <mediaCustomerId> --json-out ./snap`。只含已兑换赠金;未发放字段为 null,不要写成 0。细则见 `accounts-balance-stats.md`。
|
|
34
35
|
- **产物**:多账户余额预警走 **P2**、消耗汇总走 **P3**。
|
|
35
36
|
|
|
36
37
|
---
|
|
@@ -9,7 +9,7 @@ $ErrorActionPreference = 'Stop'
|
|
|
9
9
|
# -- Package info (injected at build time) ------------------------------------
|
|
10
10
|
$PKG_NAME = 'siluzan-tso-cli'
|
|
11
11
|
# PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
|
|
12
|
-
$PKG_VERSION = '1.1.67-beta.
|
|
12
|
+
$PKG_VERSION = '1.1.67-beta.2'
|
|
13
13
|
$CLI_BIN = 'siluzan-tso'
|
|
14
14
|
$SKILL_LABEL = 'Siluzan TSO'
|
|
15
15
|
$INSTALL_CMD = 'npm install -g siluzan-tso-cli@beta'
|
|
@@ -9,7 +9,7 @@ set -euo pipefail
|
|
|
9
9
|
# -- Package info (injected at build time) ------------------------------------
|
|
10
10
|
readonly PKG_NAME="siluzan-tso-cli"
|
|
11
11
|
# PKG_VERSION 锁定到与本脚本同批构建产物一致的版本,避免与 dist/skill 错位
|
|
12
|
-
readonly PKG_VERSION="1.1.67-beta.
|
|
12
|
+
readonly PKG_VERSION="1.1.67-beta.2"
|
|
13
13
|
readonly CLI_BIN="siluzan-tso"
|
|
14
14
|
readonly SKILL_LABEL="Siluzan TSO"
|
|
15
15
|
readonly INSTALL_CMD="npm install -g siluzan-tso-cli@beta"
|