siluzan-tso-cli 1.1.21 → 1.1.22-beta.10

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.
Files changed (130) hide show
  1. package/README.md +3 -2
  2. package/dist/index.js +542 -533
  3. package/dist/skill/AGENTS.md +45 -0
  4. package/dist/skill/SKILL.md +55 -347
  5. package/dist/skill/_meta.json +2 -2
  6. package/dist/skill/assets/campaign-create-template.json +1 -1
  7. package/dist/skill/assets/campaign-create-template.md +5 -5
  8. package/dist/skill/assets/pmax-create-template.md +6 -5
  9. package/dist/skill/docs/skill-guide.md +44 -0
  10. package/dist/skill/references/README.md +73 -0
  11. package/dist/skill/references/{accounts.md → accounts/accounts.md} +37 -37
  12. package/dist/skill/references/{currency.md → accounts/currency.md} +7 -7
  13. package/dist/skill/references/{finance.md → accounts/finance.md} +18 -18
  14. package/dist/skill/references/accounts/open-account-by-media.md +153 -0
  15. package/dist/skill/references/{open-account-google-ui.md → accounts/open-account-google-ui.md} +2 -2
  16. package/dist/skill/references/{write-audit-restore.md → accounts/write-audit-restore.md} +4 -4
  17. package/dist/skill/references/{account-analytics.md → analytics/account-analytics.md} +37 -32
  18. package/dist/skill/references/{google-analysis-batch.md → analytics/google-analysis-batch.md} +2 -2
  19. package/dist/skill/references/{keyword-planner-workflows.md → analytics/keyword-planner-workflows.md} +15 -15
  20. package/dist/skill/references/{rag.md → analytics/rag.md} +11 -11
  21. package/dist/skill/references/{reporting.md → analytics/reporting.md} +16 -16
  22. package/dist/skill/references/core/agent-conventions.md +180 -0
  23. package/dist/skill/references/core/playbooks.md +141 -0
  24. package/dist/skill/references/{setup.md → core/setup.md} +5 -5
  25. package/dist/skill/references/core/skill-authoring.md +192 -0
  26. package/dist/skill/references/{tips.md → core/tips.md} +5 -6
  27. package/dist/skill/references/{workflows.md → core/workflows.md} +63 -65
  28. package/dist/skill/references/{google-ads-campaign-plan.md → google-ads/google-ads-campaign-plan.md} +25 -25
  29. package/dist/skill/references/{google-ads.md → google-ads/google-ads.md} +63 -67
  30. package/dist/skill/references/{pmax-api.md → google-ads/pmax-api.md} +0 -2
  31. package/dist/skill/references/google-ads/rules/README.md +21 -0
  32. package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-account-audit.md +19 -19
  33. package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-campaign-optimization.md +1 -1
  34. package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-keyword-optimization.md +1 -1
  35. package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-keyword-strategy.md +3 -3
  36. package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-keyword-taxonomy.md +2 -2
  37. package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-launch-plan-template.md +8 -8
  38. package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-pmax-guide.md +2 -2
  39. package/dist/skill/references/{tso-home.md → misc/tso-home.md} +5 -5
  40. package/dist/skill/references/{clue.md → operations/clue.md} +7 -7
  41. package/dist/skill/references/{forewarning.md → operations/forewarning.md} +6 -6
  42. package/dist/skill/references/{hosted-automation-monitoring-json.md → operations/hosted-automation-monitoring-json.md} +14 -14
  43. package/dist/skill/references/{hosted-automation-optimize-ab-winner.md → operations/hosted-automation-optimize-ab-winner.md} +4 -4
  44. package/dist/skill/references/{hosted-automation-optimize-index.md → operations/hosted-automation-optimize-index.md} +6 -6
  45. package/dist/skill/references/{hosted-automation-optimize-scale.md → operations/hosted-automation-optimize-scale.md} +8 -8
  46. package/dist/skill/references/{hosted-automation-optimize-weak-downbid.md → operations/hosted-automation-optimize-weak-downbid.md} +9 -9
  47. package/dist/skill/references/operations/hosted-automation-scenarios.md +23 -0
  48. package/dist/skill/references/{hosted-automation-self-control.md → operations/hosted-automation-self-control.md} +28 -28
  49. package/{assets/siluzan-ads/references → dist/skill/references/operations}/hosted-automation-user-catalog.md +13 -13
  50. package/dist/skill/references/{optimize.md → operations/optimize.md} +5 -5
  51. package/dist/skill/report-templates/README.md +2 -1
  52. package/dist/skill/report-templates/REPORT-WORKFLOW.md +2 -2
  53. package/dist/skill/report-templates/google-ads-diagnosis.md +2 -2
  54. package/dist/skill/report-templates/google-inquiry-analysis.md +11 -12
  55. package/dist/skill/report-templates/google-period-report.md +2 -2
  56. package/dist/skill/report-templates/okki-weekly-google-client.md +12 -12
  57. package/dist/skill/scripts/install.ps1 +3 -3
  58. package/dist/skill/scripts/install.sh +3 -3
  59. package/eval/cases/accounts-entityid-vs-mediaccustomerid.scenario.json +4 -4
  60. package/eval/cases/accounts-mcc-bind-inquiry.scenario.json +3 -3
  61. package/eval/cases/accounts-single-balance-not-bulk.scenario.json +3 -3
  62. package/eval/cases/budget-display-not-raw-micros.scenario.json +3 -3
  63. package/eval/cases/clue-meta-leads-json.scenario.json +4 -4
  64. package/eval/cases/clue-tiktok-leads-json.scenario.json +3 -3
  65. package/eval/cases/destructive-account-delink-needs-confirm.scenario.json +1 -1
  66. package/eval/cases/destructive-forewarning-delete-needs-confirm.scenario.json +1 -1
  67. package/eval/cases/destructive-invoice-apply-needs-confirm.scenario.json +1 -1
  68. package/eval/cases/finance-invoice-info-list.scenario.json +3 -3
  69. package/eval/cases/forewarning-list-google.scenario.json +3 -3
  70. package/eval/cases/google-ads-no-structural-without-confirm.scenario.json +3 -3
  71. package/eval/cases/google-analysis-keywords-route.scenario.json +2 -2
  72. package/eval/cases/hosted-sop-cpa-spike-downbid.scenario.json +6 -6
  73. package/eval/cases/hosted-sop-daily-budget-circuit-breaker.scenario.json +4 -4
  74. package/eval/cases/hosted-sop-empty-spend-pause-p1.scenario.json +5 -5
  75. package/eval/cases/human-p1-multiturn.scenario.json +1 -1
  76. package/eval/cases/meta-single-balance-not-bulk.scenario.json +4 -4
  77. package/eval/cases/no-legacy-json-flag.scenario.json +12 -0
  78. package/eval/cases/open-account-bing-noninteractive.scenario.json +3 -3
  79. package/eval/cases/open-account-google-noninteractive.scenario.json +2 -2
  80. package/eval/cases/open-account-tiktok-license-file.scenario.json +2 -2
  81. package/eval/cases/optimize-list-by-account.scenario.json +3 -3
  82. package/eval/cases/p1-single-account-profile.scenario.json +2 -2
  83. package/eval/cases/p2-balance-scan-bulk.scenario.json +1 -1
  84. package/eval/cases/p4-period-report-window.scenario.json +1 -1
  85. package/eval/cases/rag-before-keyword-expand.scenario.json +3 -3
  86. package/eval/cases/rag-list-then-query.scenario.json +5 -5
  87. package/eval/cases/report-list-google.scenario.json +3 -3
  88. package/eval/cases/report-push-list-google.scenario.json +3 -3
  89. package/eval/cases/reporting-vs-account-analytics-routing.scenario.json +4 -4
  90. package/eval/cases/setup-login-or-env.scenario.json +2 -2
  91. package/eval/cases/setup-siluzan-data-permission-env.scenario.json +2 -2
  92. package/eval/cases/skill-optimize-vs-google-ads-distinction.scenario.json +4 -4
  93. package/eval/cases/tiktok-bc-bind-inquiry.scenario.json +2 -2
  94. package/eval/cases/time-range-user-delegates-default.scenario.json +2 -2
  95. package/eval/cases/tips-json-out-filtering.scenario.json +12 -0
  96. package/eval/cases/tips-large-json-pagination.scenario.json +3 -3
  97. package/eval/cases/uj-ad-bluetooth-keywords-exclude-cheap-free.scenario.json +1 -1
  98. package/eval/cases/uj-ad-campaign-validate-before-create-stub.scenario.json +3 -3
  99. package/eval/cases/uj-ad-keywords-camping-tent-outdoor-plan.scenario.json +1 -1
  100. package/eval/cases/uj-ad-outdoor-campgear-search-plan.scenario.json +3 -3
  101. package/eval/cases/uj-analytics-30d-pdf-campaign-device-geo.scenario.json +2 -2
  102. package/eval/cases/uj-analytics-compare-google-tiktok-last-month-roi.scenario.json +3 -3
  103. package/eval/cases/uj-analytics-google-weekly-trends-campaigns-keywords.scenario.json +4 -4
  104. package/eval/cases/uj-analytics-report-push-weekly-email.scenario.json +3 -3
  105. package/eval/cases/uj-finance-invoice-records-this-month.scenario.json +4 -4
  106. package/eval/cases/uj-life-newbie-siluzan-google-end-to-end.scenario.json +2 -2
  107. package/eval/cases/uj-ops-google-accounts-list-normal.scenario.json +4 -4
  108. package/eval/cases/uj-ops-google-yesterday-spend-conversions.scenario.json +5 -5
  109. package/eval/cases/uj-ops-open-google-b2c-usd-shenzhen.scenario.json +3 -3
  110. package/eval/cases/uj-ops-pause-worst-adgroup-confirm.scenario.json +2 -2
  111. package/eval/cases/uj-ops-tiktok-leads-last-week.scenario.json +4 -4
  112. package/eval/cases/uj-patrol-cpc-spike-adgroups-over-15.scenario.json +3 -3
  113. package/eval/cases/uj-patrol-forewarning-create-daily-cap-3000.scenario.json +3 -3
  114. package/eval/cases/uj-patrol-forewarning-trigger-records.scenario.json +4 -4
  115. package/eval/cases/uj-patrol-google-balances-low.scenario.json +3 -3
  116. package/eval/cases/uj-roi-full-google-account-diagnosis.scenario.json +1 -1
  117. package/eval/cases/uj-roi-keywords-high-cpa-low-cvr-triage.scenario.json +1 -1
  118. package/eval/cases/uj-roi-optimize-records-then-execute-cautiously.scenario.json +4 -4
  119. package/eval/cases/uj-roi-search-terms-add-negative-keywords.scenario.json +2 -2
  120. package/package.json +4 -3
  121. package/dist/skill/references/hosted-automation-scenarios.md +0 -23
  122. package/dist/skill/references/hosted-automation-user-catalog.md +0 -38
  123. package/eval/cases/tips-json-filtering.scenario.json +0 -12
  124. /package/dist/skill/references/{geo-continents.json → analytics/geo-continents.json} +0 -0
  125. /package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-audience-strategy.md +0 -0
  126. /package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-compliance.md +0 -0
  127. /package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-conversion-architecture.md +0 -0
  128. /package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-creative-optimization.md +0 -0
  129. /package/dist/skill/references/{google-ads-rules → google-ads/rules}/google-ads-landing-page-discovery-via-webfetch.md +0 -0
  130. /package/dist/skill/references/{google-ads-rules → google-ads/rules}/sensitive-industries.md +0 -0
package/dist/index.js CHANGED
@@ -3328,7 +3328,7 @@ var DEFAULT_API_BASE;
3328
3328
  var init_defaults = __esm({
3329
3329
  "src/config/defaults.ts"() {
3330
3330
  "use strict";
3331
- DEFAULT_API_BASE = "https://tso-api.siluzan.com";
3331
+ DEFAULT_API_BASE = "https://tso-api-ci.siluzan.com";
3332
3332
  }
3333
3333
  });
3334
3334
 
@@ -3839,11 +3839,13 @@ function mergeCliSnapshotManifest(existing, params) {
3839
3839
  artifacts
3840
3840
  };
3841
3841
  }
3842
- function assertJsonXorJsonOut(json, jsonOut, commandLabel) {
3843
- if (json && jsonOut) {
3844
- console.error(`
3845
- \u274C ${commandLabel}\uFF1A--json \u4E0E --json-out \u4E0D\u80FD\u540C\u65F6\u4F7F\u7528\u3002
3846
- `);
3842
+ function rejectDeprecatedJsonFlag(json, commandLabel) {
3843
+ if (json) {
3844
+ console.error(
3845
+ `
3846
+ \u274C ${commandLabel}\uFF1A--json \u5DF2\u79FB\u9664\u3002\u8BF7\u4F7F\u7528 --json-out <\u76EE\u5F55\u6216 *.json \u6587\u4EF6> \u843D\u76D8\u7ED3\u6784\u5316\u6570\u636E\uFF08stdout \u4EC5\u4E00\u884C\u6458\u8981\uFF09\u3002
3847
+ `
3848
+ );
3847
3849
  process.exit(1);
3848
3850
  }
3849
3851
  }
@@ -3990,7 +3992,6 @@ async function writeCliJsonSnapshot(params) {
3990
3992
  };
3991
3993
  }
3992
3994
  async function emitCliJsonOrSnapshot(opts, params) {
3993
- assertJsonXorJsonOut(opts.json, opts.jsonOut, params.commandLabel);
3994
3995
  if (opts.jsonOut) {
3995
3996
  const summary = await writeCliJsonSnapshot({
3996
3997
  snapshotDir: opts.jsonOut,
@@ -4002,10 +4003,6 @@ async function emitCliJsonOrSnapshot(opts, params) {
4002
4003
  console.log(JSON.stringify(summary));
4003
4004
  return true;
4004
4005
  }
4005
- if (opts.json) {
4006
- console.log(JSON.stringify(params.payload, null, 2));
4007
- return true;
4008
- }
4009
4006
  return false;
4010
4007
  }
4011
4008
  var CLI_SNAPSHOT_MANIFEST_FILE, CLI_PACKAGE, SCHEMA_VERSION, OUTLINE_AGENT_HINT, DEFAULT_FIELD_GUIDE, TS_LIKE_ARRAY_SAMPLE_MAX;
@@ -4019,7 +4016,7 @@ var init_cli_json = __esm({
4019
4016
  SCHEMA_VERSION = 1;
4020
4017
  OUTLINE_AGENT_HINT = "\u5904\u7406\u987A\u5E8F\uFF1A\u5148\u8BFB outlineFile\uFF08schema \u63CF\u8FF0\uFF0C\u975E\u6570\u636E\uFF09\u4E86\u89E3\u5B57\u6BB5\u7C7B\u578B\uFF0C\u518D\u7528\u811A\u672C\u8BFB writtenFiles[0]\uFF08\u771F\u5B9E JSON \u6570\u636E\uFF09\u505A\u7B5B\u9009/\u805A\u5408\uFF1B\u4E0D\u8981\u628A outline \u5F53\u6210\u6570\u636E\uFF0C\u4E5F\u4E0D\u8981\u628A JSON \u5F53\u6210 schema\u3002";
4021
4018
  DEFAULT_FIELD_GUIDE = {
4022
- markdownRefs: ["references/currency.md", "references/tips.md", "references/accounts.md"]
4019
+ markdownRefs: ["references/accounts/currency.md", "references/core/tips.md", "references/accounts/accounts.md"]
4023
4020
  };
4024
4021
  TS_LIKE_ARRAY_SAMPLE_MAX = 8;
4025
4022
  }
@@ -4124,6 +4121,23 @@ function parseGoogleAccountSpendOverviewRows(raw) {
4124
4121
  if (!Number.isFinite(n)) return null;
4125
4122
  return Math.round(n / 1e6 * 100) / 100;
4126
4123
  };
4124
+ const rowsFromAccountsDict = (accounts2, mode) => {
4125
+ const rows = [];
4126
+ for (const [id, item] of Object.entries(accounts2)) {
4127
+ const data = item?.data;
4128
+ if (!data) continue;
4129
+ rows.push({
4130
+ mode,
4131
+ mediaAccountId: String(id),
4132
+ spend: typeof data.spend === "number" ? data.spend : void 0,
4133
+ impressions: typeof data.impressions === "number" ? data.impressions : void 0,
4134
+ clicks: typeof data.clicks === "number" ? data.clicks : void 0,
4135
+ conversions: typeof data.conversions === "number" ? data.conversions : void 0,
4136
+ costPerClick: typeof data.averageCpc === "number" ? data.averageCpc : void 0
4137
+ });
4138
+ }
4139
+ return rows;
4140
+ };
4127
4141
  const fromDbItem = (it) => {
4128
4142
  if (it == null || it.mediaAccountId == null) return null;
4129
4143
  return {
@@ -4148,25 +4162,23 @@ function parseGoogleAccountSpendOverviewRows(raw) {
4148
4162
  if (!raw || typeof raw !== "object") return [];
4149
4163
  const r = raw;
4150
4164
  if (r.mode === "googleCombined") {
4151
- const accounts = r.accounts ?? {};
4152
- const rows = [];
4153
- for (const [id, item] of Object.entries(
4154
- accounts
4155
- )) {
4156
- const data = item?.data;
4157
- if (!data) continue;
4158
- rows.push({
4159
- mode: "googleCombined",
4160
- mediaAccountId: String(id),
4161
- spend: typeof data.spend === "number" ? data.spend : void 0,
4162
- impressions: typeof data.impressions === "number" ? data.impressions : void 0,
4163
- clicks: typeof data.clicks === "number" ? data.clicks : void 0,
4164
- conversions: typeof data.conversions === "number" ? data.conversions : void 0,
4165
- // 实时模式下 averageCpc 即点击均价(CPC)
4166
- costPerClick: typeof data.averageCpc === "number" ? data.averageCpc : void 0
4167
- });
4165
+ return rowsFromAccountsDict(
4166
+ r.accounts ?? {},
4167
+ "googleCombined"
4168
+ );
4169
+ }
4170
+ if (r.mode === "database") {
4171
+ const items2 = Array.isArray(r.items) ? r.items : [];
4172
+ if (items2.length > 0) {
4173
+ return items2.map(fromDbItem).filter((row) => row !== null);
4168
4174
  }
4169
- return rows;
4175
+ }
4176
+ const accounts = r.accounts;
4177
+ if (accounts && Object.keys(accounts).length > 0) {
4178
+ return rowsFromAccountsDict(
4179
+ accounts,
4180
+ "database"
4181
+ );
4170
4182
  }
4171
4183
  const items = Array.isArray(r.items) ? r.items : [];
4172
4184
  return items.map(fromDbItem).filter((row) => row !== null);
@@ -4520,7 +4532,7 @@ ${media} \u8D26\u6237\u6295\u653E\u753B\u50CF\uFF1A\u8FD4\u56DE ${rows.length} \
4520
4532
  `
4521
4533
  \u6C47\u603B\uFF1A\u6D88\u8017 ${meta.totals.spend}\uFF0C\u70B9\u51FB ${meta.totals.clicks}\uFF0C\u5C55\u793A ${meta.totals.impressions}\uFF0C\u8F6C\u5316 ${meta.totals.conversions}
4522
4534
  \u63D0\u793A\uFF1A
4523
- - \u91D1\u989D\u4F7F\u7528\u5404\u8D26\u6237\u4E3B\u5E01\u79CD\uFF1B\u8DE8\u5E01\u79CD\u8D26\u6237\u52A0 --json \u81EA\u884C\u6309 currencyCode \u805A\u5408
4535
+ - \u91D1\u989D\u4F7F\u7528\u5404\u8D26\u6237\u4E3B\u5E01\u79CD\uFF1B\u8DE8\u5E01\u79CD\u8D26\u6237\u52A0 --json-out \u81EA\u884C\u6309 currencyCode \u805A\u5408
4524
4536
  - \u6307\u5B9A\u8D26\u6237\u5B50\u96C6\uFF1A--accounts <id1,id2,...>\uFF08\u4E0E list-accounts \u7684 mediaCustomerId \u4E00\u81F4\uFF09
4525
4537
  - \u8FC7\u6EE4\u4F4E\u6D88\u8017\uFF1A--min-spend 10\uFF08\u53EA\u4FDD\u7559\u533A\u95F4\u5185\u6D88\u8017 > 10 \u7684\u8D26\u6237\uFF09
4526
4538
  `
@@ -4552,9 +4564,9 @@ function register10(program2) {
4552
4564
  "--min-spend <n>",
4553
4565
  "\u8FC7\u6EE4\uFF1A\u533A\u95F4\u5185\u6D88\u8017 \u2264 \u6B64\u503C\u7684\u8D26\u6237\u4E0D\u8FD4\u56DE\uFF08\u9ED8\u8BA4 0\uFF09",
4554
4566
  (v) => parseFloat(v)
4555
- ).option("--page-size <n>", "\u8D26\u6237\u6E05\u5355\u5206\u9875\u5927\u5C0F\uFF08\u9ED8\u8BA4 200\uFF0C\u4E0A\u9650 500\uFF09", (v) => parseInt(v, 10)).option("--max-pages <n>", "\u6700\u591A\u626B\u63CF\u9875\u6570\uFF08\u9ED8\u8BA4 20\uFF0C\u4E0A\u9650 200\uFF09", (v) => parseInt(v, 10)).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--json", "\u8F93\u51FA\u7ED3\u6784\u5316 JSON\uFF0C\u542B data.items \u4E0E meta\uFF08\u533A\u95F4/\u6C47\u603B/\u5E01\u79CD\u5907\u6CE8\uFF09", false).option(
4567
+ ).option("--page-size <n>", "\u8D26\u6237\u6E05\u5355\u5206\u9875\u5927\u5C0F\uFF08\u9ED8\u8BA4 200\uFF0C\u4E0A\u9650 500\uFF09", (v) => parseInt(v, 10)).option("--max-pages <n>", "\u6700\u591A\u626B\u63CF\u9875\u6570\uFF08\u9ED8\u8BA4 20\uFF0C\u4E0A\u9650 200\uFF09", (v) => parseInt(v, 10)).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option(
4556
4568
  "--json-out <path>",
4557
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
4569
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
4558
4570
  void 0
4559
4571
  ).option("--refresh-dp", "\u5F3A\u5236\u91CD\u62C9 Datapermission \u540E\u518D\u8BF7\u6C42", false).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
4560
4572
  async (opts) => {
@@ -4567,7 +4579,6 @@ function register10(program2) {
4567
4579
  minSpend: opts.minSpend,
4568
4580
  pageSize: opts.pageSize,
4569
4581
  maxPages: opts.maxPages,
4570
- json: opts.json,
4571
4582
  jsonOut: opts.jsonOut,
4572
4583
  refreshDp: opts.refreshDp,
4573
4584
  verbose: opts.verbose
@@ -4731,7 +4742,7 @@ var init_google_analysis = __esm({
4731
4742
  CLI_PACKAGE2 = "siluzan-tso-cli";
4732
4743
  SCHEMA_VERSION2 = 2;
4733
4744
  DEFAULT_FIELD_GUIDE2 = {
4734
- markdownRefs: ["references/currency.md", "references/account-analytics.md"],
4745
+ markdownRefs: ["references/accounts/currency.md", "references/analytics/account-analytics.md"],
4735
4746
  tsTypesModule: "tso-cli/src/types/google-analysis-api.ts"
4736
4747
  };
4737
4748
  GOOGLE_ANALYSIS_CAMPAIGNS_OUTLINE_BUDGET_HINTS = [
@@ -4747,7 +4758,9 @@ var init_google_analysis = __esm({
4747
4758
  "extensions",
4748
4759
  "devices",
4749
4760
  "geographic",
4761
+ "geo-matched",
4750
4762
  "campaign-geo",
4763
+ "campaign-geo-matched",
4751
4764
  "campaign-device",
4752
4765
  "audience",
4753
4766
  "asset-images",
@@ -4770,6 +4783,12 @@ var init_google_analysis = __esm({
4770
4783
  ],
4771
4784
  "campaign-geo": [
4772
4785
  "// \u4E2D\u6587\u8BD1\u540D\uFF1A`countryOrRegionZh`\uFF08\u7531 `countryOrRegion` \u7ECF geo-en2zh.json \u7FFB\u8BD1\uFF0C\u76EE\u524D\u8986\u76D6 105 \u4E2A\u56FD\u5BB6/\u5730\u533A\uFF1B\u672A\u547D\u4E2D\u65F6\u8BE5\u5B57\u6BB5\u7F3A\u7701\uFF09\u3002"
4786
+ ],
4787
+ "campaign-geo-matched": [
4788
+ "// \u4E2D\u6587\u8BD1\u540D\uFF1A`countryOrRegionZh`\uFF08\u7531 `countryOrRegion` \u7ECF geo-en2zh.json \u7FFB\u8BD1\uFF0C\u76EE\u524D\u8986\u76D6 105 \u4E2A\u56FD\u5BB6/\u5730\u533A\uFF1B\u672A\u547D\u4E2D\u65F6\u8BE5\u5B57\u6BB5\u7F3A\u7701\uFF09\u3002"
4789
+ ],
4790
+ "geo-matched": [
4791
+ "// \u4E2D\u6587\u8BD1\u540D\uFF1A`countryOrRegionZh`\uFF08\u7531 `countryOrRegion` \u7ECF geo-en2zh.json \u7FFB\u8BD1\uFF0C\u76EE\u524D\u8986\u76D6 105 \u4E2A\u56FD\u5BB6/\u5730\u533A\uFF1B\u672A\u547D\u4E2D\u65F6\u8BE5\u5B57\u6BB5\u7F3A\u7701\uFF09\u3002"
4773
4792
  ]
4774
4793
  };
4775
4794
  }
@@ -4826,18 +4845,19 @@ var init_sections = __esm({
4826
4845
  },
4827
4846
  {
4828
4847
  name: "keywords",
4829
- description: "\u5173\u952E\u8BCD\u5206\u6BB5 KeywordSectionData",
4848
+ description: "\u5173\u952E\u8BCD\u5206\u6BB5 KeywordSectionData\uFF08\u9ED8\u8BA4 costGreater=0 \u4EC5\u6709\u6D88\u8017\u3001limit=0 \u4E0D\u5C01\u9876\uFF1B\u53EF\u7528 --limit \u9650\u5236\u6761\u6570\uFF09",
4830
4849
  dateMode: "range",
4831
4850
  path: (id) => `/reporting/media-account/${id}/KeywordSectionData`,
4832
- defaultQuery: { limit: 200, orderByCost: true },
4851
+ /** costGreater 单位:微分(0 → metrics.cost_micros>0);limit=0 表示网关不加 LIMIT */
4852
+ defaultQuery: { limit: 0, orderByCost: true, costGreater: 0 },
4833
4853
  keywordOptions: true
4834
4854
  },
4835
4855
  {
4836
4856
  name: "search-terms",
4837
- description: "\u641C\u7D22\u8BCD searchtermmanagement/v2/list",
4857
+ description: "\u641C\u7D22\u8BCD searchtermmanagement/v2/list\uFF08\u9ED8\u8BA4 limit=0 \u4E0D\u5C01\u9876\uFF0CCLI \u843D\u76D8\u524D\u8FC7\u6EE4 spend>0\uFF09",
4838
4858
  dateMode: "range",
4839
4859
  path: (id) => `/searchtermmanagement/v2/list/${id}`,
4840
- defaultQuery: { limit: 200, orderByCost: true },
4860
+ defaultQuery: { limit: 0, orderByCost: true },
4841
4861
  keywordOptions: true
4842
4862
  },
4843
4863
  {
@@ -4877,6 +4897,13 @@ var init_sections = __esm({
4877
4897
  dateMode: "range",
4878
4898
  path: (id) => `/reporting/media-account/${id}/GeographicSectionData`
4879
4899
  },
4900
+ {
4901
+ name: "geo-matched",
4902
+ description: "\u76F8\u7B26\u5730\u7406\u4F4D\u7F6E\uFF08Matched locations\uFF0Cuser_location_view\uFF09\u8D26\u6237\u7EA7\u6309\u56FD\u5BB6/\u5730\u533A\u6C47\u603B GET \u2026/reports/geo/matched/combined",
4903
+ dateMode: "range",
4904
+ path: (id) => `/reporting/media-account/${id}/reports/geo/matched/combined`,
4905
+ campaignGeoFilterOption: true
4906
+ },
4880
4907
  {
4881
4908
  name: "campaign-geo",
4882
4909
  description: "\u5E7F\u544A\u7CFB\u5217\u7EF4\u5EA6\u5730\u7406 GET \u2026/campaigns/reports/geo\uFF08GetCampaignGeoReport\uFF1B\u884C\u53EF\u542B campaign/adGroup\uFF09",
@@ -4884,6 +4911,13 @@ var init_sections = __esm({
4884
4911
  path: (id) => `/reporting/media-account/${id}/campaigns/reports/geo`,
4885
4912
  campaignGeoFilterOption: true
4886
4913
  },
4914
+ {
4915
+ name: "campaign-geo-matched",
4916
+ description: "\u76F8\u7B26\u5730\u7406\u4F4D\u7F6E\uFF08Matched locations\uFF0Cuser_location_view\uFF09\u7CFB\u5217\u7EA7\u660E\u7EC6 GET \u2026/campaigns/reports/geo/matched/combined",
4917
+ dateMode: "range",
4918
+ path: (id) => `/reporting/media-account/${id}/campaigns/reports/geo/matched/combined`,
4919
+ campaignGeoFilterOption: true
4920
+ },
4887
4921
  {
4888
4922
  name: "campaign-device",
4889
4923
  description: "\u5E7F\u544A\u7CFB\u5217\u7EF4\u5EA6\u8BBE\u5907 GET \u2026/campaigns/reports/device\uFF08GetCampaignDeviceReport\uFF1B\u884C\u53EF\u542B campaign/adGroup\uFF09",
@@ -100506,9 +100540,17 @@ function annotateZhFields(payload, section) {
100506
100540
  case "search-terms": {
100507
100541
  const rows = payload.data;
100508
100542
  annotateArrayRows(rows, "matchType", "matchTypeZh", MATCH_TYPE_DICT);
100543
+ annotateArrayRows(
100544
+ rows,
100545
+ "queryTargetingStatus",
100546
+ "queryTargetingStatusZh",
100547
+ QUERY_TARGETING_STATUS_ZH
100548
+ );
100509
100549
  break;
100510
100550
  }
100511
100551
  case "campaign-geo":
100552
+ case "campaign-geo-matched":
100553
+ case "geo-matched":
100512
100554
  case "geographic": {
100513
100555
  const rows = payload.countries;
100514
100556
  annotateArrayRows(rows, "countryOrRegion", "countryOrRegionZh", GEO_DICT);
@@ -100520,7 +100562,7 @@ function annotateZhFields(payload, section) {
100520
100562
  }
100521
100563
  return payload;
100522
100564
  }
100523
- var MATCH_TYPE_DICT, GEO_DICT, CITY_DICT, ISO_ZH_DICT;
100565
+ var MATCH_TYPE_DICT, GEO_DICT, CITY_DICT, ISO_ZH_DICT, QUERY_TARGETING_STATUS_ZH;
100524
100566
  var init_translate_fields = __esm({
100525
100567
  "src/commands/google-analysis/translate-fields.ts"() {
100526
100568
  "use strict";
@@ -100531,6 +100573,14 @@ var init_translate_fields = __esm({
100531
100573
  GEO_DICT = geo_en2zh_default;
100532
100574
  CITY_DICT = city_to_country_default.byName ?? {};
100533
100575
  ISO_ZH_DICT = city_to_country_default.isoToZh ?? {};
100576
+ QUERY_TARGETING_STATUS_ZH = {
100577
+ Added: "\u5DF2\u6DFB\u52A0",
100578
+ Excluded: "\u5DF2\u6392\u9664",
100579
+ None: "\u90FD\u6CA1\u6709",
100580
+ AddedExcluded: "\u5DF2\u6DFB\u52A0/\u5DF2\u6392\u9664",
100581
+ UNSPECIFIED: "\u90FD\u6CA1\u6709",
100582
+ UNKNOWN: "\u90FD\u6CA1\u6709"
100583
+ };
100534
100584
  }
100535
100585
  });
100536
100586
 
@@ -100596,6 +100646,22 @@ function mergeDeviceBidModifiersIntoReport(report, modifiers) {
100596
100646
  function assertNever(x, ctx) {
100597
100647
  throw new Error(`${ctx}\uFF1A\u672A\u5904\u7406\u7684\u5206\u652F ${String(x)}`);
100598
100648
  }
100649
+ function filterRowsWithPositiveSpend(rows) {
100650
+ return rows.filter((r) => typeof r.spend === "number" && r.spend > 0);
100651
+ }
100652
+ function applySpendOnlySectionFilter(payload, section) {
100653
+ if (section === "keywords") {
100654
+ const bag = payload;
100655
+ if (!Array.isArray(bag.keywords)) return payload;
100656
+ return { ...bag, keywords: filterRowsWithPositiveSpend(bag.keywords) };
100657
+ }
100658
+ if (section === "search-terms") {
100659
+ const bag = payload;
100660
+ if (!Array.isArray(bag.data)) return payload;
100661
+ return { ...bag, data: filterRowsWithPositiveSpend(bag.data) };
100662
+ }
100663
+ return payload;
100664
+ }
100599
100665
  function rowsFromAccountDailyReportsEnvelope(raw, mediaCustomerId) {
100600
100666
  const block = raw.accounts?.[mediaCustomerId];
100601
100667
  const list = block?.data;
@@ -100621,8 +100687,12 @@ async function fetchGoogleAnalysisSectionJson(config, fullPath, verbose, name2)
100621
100687
  return fetchJson(config, fullPath, verbose);
100622
100688
  case "geographic":
100623
100689
  return fetchJson(config, fullPath, verbose);
100690
+ case "geo-matched":
100691
+ return fetchJson(config, fullPath, verbose);
100624
100692
  case "campaign-geo":
100625
100693
  return fetchJson(config, fullPath, verbose);
100694
+ case "campaign-geo-matched":
100695
+ return fetchJson(config, fullPath, verbose);
100626
100696
  case "campaign-device":
100627
100697
  return fetchJson(config, fullPath, verbose);
100628
100698
  case "audience":
@@ -100751,6 +100821,9 @@ async function fetchSectionPayload(def, opts, config, id) {
100751
100821
  if (def.name === "overview") {
100752
100822
  payload = normalizeOverviewPayload(payload);
100753
100823
  }
100824
+ if (def.keywordOptions) {
100825
+ payload = applySpendOnlySectionFilter(payload, def.name);
100826
+ }
100754
100827
  return annotateZhFields(payload, def.name);
100755
100828
  }
100756
100829
  function endpointHintForSection(def) {
@@ -102173,7 +102246,7 @@ async function runAllSections(opts) {
102173
102246
  }
102174
102247
  if (!opts.jsonOut || !opts.jsonOut.trim()) {
102175
102248
  console.error(
102176
- "\n\u274C all \u6A21\u5F0F\u5FC5\u987B\u4F20 --json-out <\u76EE\u5F55>\uFF0823 \u4E2A\u7EF4\u5EA6\u7ED3\u679C\u843D\u76D8\u540E\u7531 manifest \u7D22\u5F15\uFF09\u3002\n"
102249
+ "\n\u274C all \u6A21\u5F0F\u5FC5\u987B\u4F20 --json-out <\u76EE\u5F55>\uFF0825 \u4E2A\u7EF4\u5EA6\u7ED3\u679C\u843D\u76D8\u540E\u7531 manifest \u7D22\u5F15\uFF09\u3002\n"
102177
102250
  );
102178
102251
  process.exit(1);
102179
102252
  }
@@ -102330,7 +102403,7 @@ function registerGoogleAnalysisCommands(program2) {
102330
102403
  "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08range \u7C7B\u7EF4\u5EA6\u751F\u6548\uFF1B\u7701\u7565=\u8FD1 7 \u5929\u622A\u81F3\u6628\u5929\uFF1B\u4E0E --end \u540C\u4F20\u6216\u540C\u7701\uFF09"
102331
102404
  ).option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option(
102332
102405
  "--sections <list>",
102333
- "\u4EC5\u6267\u884C\u6307\u5B9A\u7EF4\u5EA6\uFF08\u9017\u53F7\u5206\u9694\uFF09\uFF0C\u5982 overview,keywords,ads\uFF1B\u7701\u7565=\u5168\u90E8 23 \u4E2A"
102406
+ "\u4EC5\u6267\u884C\u6307\u5B9A\u7EF4\u5EA6\uFF08\u9017\u53F7\u5206\u9694\uFF09\uFF0C\u5982 overview,keywords,ads\uFF1B\u7701\u7565=\u5168\u90E8 25 \u4E2A"
102334
102407
  ).option(
102335
102408
  "--exclude <list>",
102336
102409
  "\u6392\u9664\u6307\u5B9A\u7EF4\u5EA6\uFF08\u9017\u53F7\u5206\u9694\uFF09\uFF0C\u5982 materials,gold-account\uFF1B\u4E0E --sections \u53EF\u53E0\u52A0"
@@ -102340,32 +102413,32 @@ function registerGoogleAnalysisCommands(program2) {
102340
102413
  (v) => parseInt(v, 10)
102341
102414
  ).option(
102342
102415
  "--limit <n>",
102343
- "\u900F\u4F20\u7ED9 keywords / search-terms \u7EF4\u5EA6\u7684\u6761\u6570\u4E0A\u9650\uFF08\u9ED8\u8BA4 200\uFF09",
102416
+ "\u900F\u4F20\u7ED9 keywords / search-terms \u7684\u6761\u6570\u4E0A\u9650\uFF08\u9ED8\u8BA4 0=\u4E0D\u5C01\u9876\uFF1Bkeywords \u9ED8\u8BA4\u53E6\u5E26 costGreater=0 \u4EC5\u6709\u6D88\u8017\uFF09",
102344
102417
  (v) => parseInt(v, 10)
102345
102418
  ).option("--no-order-by-cost", "\u900F\u4F20\uFF1Akeywords / search-terms \u4E0D\u6309\u6D88\u8017\u6392\u5E8F", false).option("--level <level>", "\u900F\u4F20\u7ED9 extensions \u7EF4\u5EA6\u7684 level \u8FC7\u6EE4\uFF1AAccount | Campaign | Ad Group").option(
102346
102419
  "--audience-type <type>",
102347
102420
  "\u900F\u4F20\u7ED9 audience \u7EF4\u5EA6\u7684 audienceTypeFilter\uFF1ASystemDefined | UserDefined"
102348
102421
  ).option(
102349
102422
  "--cost-greater <n>",
102350
- "\u4EC5 campaign-geo\uFF1A\u7F51\u5173\u53EF\u9009\u8FC7\u6EE4 costGreater\uFF08\u6574\u6570\uFF0C\u5355\u4F4D\u4EE5\u540E\u7AEF\u4E3A\u51C6\uFF09",
102423
+ "\u4EC5 geo-matched / campaign-geo / campaign-geo-matched\uFF1A\u7F51\u5173\u53EF\u9009\u8FC7\u6EE4 costGreater\uFF08\u6574\u6570\uFF0C\u5355\u4F4D\u4EE5\u540E\u7AEF\u4E3A\u51C6\uFF09",
102351
102424
  (v) => parseInt(v, 10)
102352
102425
  ).option(
102353
102426
  "--click-greater <n>",
102354
- "\u4EC5 campaign-geo\uFF1A\u7F51\u5173\u53EF\u9009\u8FC7\u6EE4 clickGreater\uFF08\u6574\u6570\uFF09",
102427
+ "\u4EC5 geo-matched / campaign-geo / campaign-geo-matched\uFF1A\u7F51\u5173\u53EF\u9009\u8FC7\u6EE4 clickGreater\uFF08\u6574\u6570\uFF09",
102355
102428
  (v) => parseInt(v, 10)
102356
102429
  ).option(
102357
102430
  "--conversions-greater <n>",
102358
- "\u4EC5 campaign-geo\uFF1A\u7F51\u5173\u53EF\u9009\u8FC7\u6EE4 conversionsGreater\uFF08\u6574\u6570\uFF09",
102431
+ "\u4EC5 geo-matched / campaign-geo / campaign-geo-matched\uFF1A\u7F51\u5173\u53EF\u9009\u8FC7\u6EE4 conversionsGreater\uFF08\u6574\u6570\uFF09",
102359
102432
  (v) => parseInt(v, 10)
102360
102433
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).addHelpText(
102361
102434
  "after",
102362
102435
  [
102363
102436
  "",
102364
- "\u53EF\u7528\u7EF4\u5EA6\uFF0823 \u4E2A\uFF0C\u4E0E --sections / --exclude \u53D6\u503C\u4E00\u81F4\uFF09\uFF1A",
102365
- ...SECTIONS.map((s) => ` ${s.name.padEnd(20)} ${s.description}`),
102437
+ "\u53EF\u7528\u7EF4\u5EA6\uFF0825 \u4E2A\uFF0C\u4E0E --sections / --exclude \u53D6\u503C\u4E00\u81F4\uFF09\uFF1A",
102438
+ ...SECTIONS.map((s) => ` ${s.name.padEnd(22)} ${s.description}`),
102366
102439
  "",
102367
102440
  "\u793A\u4F8B\uFF1A",
102368
- " # \u5355\u8D26\u6237\uFF1A\u62C9\u5168\u90E8 23 \u4E2A\u7EF4\u5EA6",
102441
+ " # \u5355\u8D26\u6237\uFF1A\u62C9\u5168\u90E8 25 \u4E2A\u7EF4\u5EA6",
102369
102442
  " siluzan-tso google-analysis -a <mediaCustomerId> --json-out ./snap",
102370
102443
  "",
102371
102444
  " # \u5355\u8D26\u6237\uFF1A\u4EC5\u62C9\u5355\u4E2A\u7EF4\u5EA6\uFF08\u66FF\u4EE3\u5386\u53F2\u7684 google-analysis overview ...\uFF09",
@@ -102381,8 +102454,8 @@ function registerGoogleAnalysisCommands(program2) {
102381
102454
  "",
102382
102455
  " # \u591A\u8D26\u6237\u573A\u666F\u5982\u9700 resume / \u81EA\u9002\u5E94\u9650\u6D41 / deadline\uFF0C\u8BF7\u76F4\u63A5\u7528 google-analysis-batch run -a ...",
102383
102456
  "",
102384
- " # campaign-geo \u53EF\u9009\u9608\u503C\uFF08\u4E0E\u7F51\u5173 GetCampaignsGeoReport \u4E00\u81F4\uFF09",
102385
- " siluzan-tso google-analysis -a <id> --sections campaign-geo --start <s> --end <e> \\",
102457
+ " # campaign-geo / geo-matched / campaign-geo-matched \u53EF\u9009\u9608\u503C\uFF08\u4E0E\u7F51\u5173\u4E00\u81F4\uFF09",
102458
+ " siluzan-tso google-analysis -a <id> --sections campaign-geo-matched --start <s> --end <e> \\",
102386
102459
  " --cost-greater 1000000 --json-out ./snap"
102387
102460
  ].join("\n")
102388
102461
  ).action(async (legacySection, opts) => {
@@ -103157,7 +103230,7 @@ ${r.urlRedacted}`);
103157
103230
  }
103158
103231
  }
103159
103232
  console.log(
103160
- "\n\u63D0\u793A\uFF1A\u5B8C\u6574 JSON \u4F7F\u7528 siluzan-tso audit list --days <N> [--match \u2026] --json\uFF1B\u5355\u6761 siluzan-tso audit show --id <auditId>\u3002\n \u8865\u507F\u5199\uFF08\u6062\u590D\u4FEE\u6539\u524D\uFF09\uFF1Aaudit restore-plan \u2192 \u4EBA\u786E\u8BA4 \u2192 audit restore-apply --i-confirm\u3002\n"
103233
+ "\n\u63D0\u793A\uFF1A\u5B8C\u6574 JSON \u4F7F\u7528 siluzan-tso audit list --days <N> [--match \u2026] --json-out <\u8DEF\u5F84>\uFF1B\u5355\u6761 siluzan-tso audit show --id <auditId> --json-out <\u8DEF\u5F84>\u3002\n \u8865\u507F\u5199\uFF08\u6062\u590D\u4FEE\u6539\u524D\uFF09\uFF1Aaudit restore-plan \u2192 \u4EBA\u786E\u8BA4 \u2192 audit restore-apply --i-confirm\u3002\n"
103161
103234
  );
103162
103235
  }
103163
103236
  async function runAuditShow(opts) {
@@ -103182,7 +103255,7 @@ async function runAuditShow(opts) {
103182
103255
  preSnapshotFileReadable: snapshotOk
103183
103256
  };
103184
103257
  if (await emitCliJsonOrSnapshot(
103185
- { json: Boolean(opts.json), jsonOut: opts.jsonOut },
103258
+ { jsonOut: opts.jsonOut },
103186
103259
  { section: "audit-show", commandLabel: "audit show", payload, idSuffix: opts.id }
103187
103260
  )) {
103188
103261
  return;
@@ -103387,7 +103460,7 @@ async function runAuditRestorePlan(opts) {
103387
103460
  plan
103388
103461
  };
103389
103462
  if (await emitCliJsonOrSnapshot(
103390
- { json: Boolean(opts.json), jsonOut: opts.jsonOut },
103463
+ { jsonOut: opts.jsonOut },
103391
103464
  {
103392
103465
  section: "audit-restore-plan",
103393
103466
  commandLabel: "audit restore-plan",
@@ -103437,7 +103510,7 @@ function printPlanForHuman(envelope) {
103437
103510
  }
103438
103511
  if (plan.subsequentWrites.length > 10) {
103439
103512
  console.log(
103440
- ` \u2026\u2026 \u8FD8\u6709 ${plan.subsequentWrites.length - 10} \u6761\uFF0C\u8BF7\u8FD0\u884C audit list --resource-key "${plan.resourceKey ?? ""}" --json \u67E5\u770B\u5B8C\u6574\u5386\u53F2`
103513
+ ` \u2026\u2026 \u8FD8\u6709 ${plan.subsequentWrites.length - 10} \u6761\uFF0C\u8BF7\u8FD0\u884C audit list --resource-key "${plan.resourceKey ?? ""}" --json-out <\u8DEF\u5F84> \u67E5\u770B\u5B8C\u6574\u5386\u53F2`
103441
103514
  );
103442
103515
  }
103443
103516
  }
@@ -103520,13 +103593,20 @@ async function runAuditRestoreApply(opts) {
103520
103593
  overwrittenSubsequentSuccessfulWrites: expected,
103521
103594
  message: "\u8865\u507F\u5199\u5DF2\u63D0\u4EA4\uFF08\u5E76\u8BB0\u5165\u65B0\u7684\u5BA1\u8BA1\u884C\uFF09\u3002"
103522
103595
  };
103523
- if (opts.json) {
103524
- console.log(JSON.stringify(out, null, 2));
103525
- } else {
103526
- console.log(`
103596
+ if (await emitCliJsonOrSnapshot(
103597
+ { jsonOut: opts.jsonOut },
103598
+ {
103599
+ section: "audit-restore-apply",
103600
+ commandLabel: "audit restore-apply",
103601
+ payload: out,
103602
+ idSuffix: auditId
103603
+ }
103604
+ )) {
103605
+ return;
103606
+ }
103607
+ console.log(`
103527
103608
  ${out.message}\uFF08\u5DF2\u8986\u76D6 ${expected} \u6761\u540E\u7EED\u6210\u529F\u5199\uFF09
103528
103609
  `);
103529
- }
103530
103610
  }
103531
103611
 
103532
103612
  // src/commands/audit.ts
@@ -103535,10 +103615,10 @@ function register3(program2) {
103535
103615
  "\u672C\u673A HTTP \u5199\u64CD\u4F5C\u5BA1\u8BA1\uFF08POST/PUT/PATCH/DELETE\uFF09\uFF1A~/.siluzan/write-audit/tso/\uFF1B\u987B --commit\uFF1B\u652F\u6301 list/show\u3001restore-plan\uFF08\u8865\u507F\u5199\u8BA1\u5212\uFF09\u4E0E restore-apply\uFF1B\u4FDD\u7559 90 \u65E5\uFF1B"
103536
103616
  );
103537
103617
  auditCmd.command("list").description(
103538
- "\u5217\u51FA\u6700\u8FD1 N \u4E2A\u5317\u4EAC\u65E5\u5386\u65E5\u7684\u5199\u8BF7\u6C42\u6458\u8981\uFF08\u6210\u529F/\u5931\u8D25\u3001\u8DEF\u5F84\u3001\u51ED\u636E\u63D0\u793A\uFF09\uFF1B--json \u542B\u8131\u654F body"
103539
- ).option("--days <n>", "\u56DE\u6EAF\u5929\u6570\uFF081\u2013400\uFF0C\u9ED8\u8BA4 7\uFF09", "7").option("--json", "\u8F93\u51FA JSON", false).option(
103618
+ "\u5217\u51FA\u6700\u8FD1 N \u4E2A\u5317\u4EAC\u65E5\u5386\u65E5\u7684\u5199\u8BF7\u6C42\u6458\u8981\uFF08\u6210\u529F/\u5931\u8D25\u3001\u8DEF\u5F84\u3001\u51ED\u636E\u63D0\u793A\uFF09\uFF1B--json-out \u542B\u8131\u654F body"
103619
+ ).option("--days <n>", "\u56DE\u6EAF\u5929\u6570\uFF081\u2013400\uFF0C\u9ED8\u8BA4 7\uFF09", "7").option(
103540
103620
  "--json-out <path>",
103541
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
103621
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
103542
103622
  void 0
103543
103623
  ).option("--failures-only", "\u4EC5\u5931\u8D25\u8BB0\u5F55", false).option(
103544
103624
  "--match <sub>",
@@ -103555,7 +103635,6 @@ function register3(program2) {
103555
103635
  ).action(async (opts) => {
103556
103636
  await runAuditList({
103557
103637
  days: opts.days,
103558
- json: Boolean(opts.json),
103559
103638
  jsonOut: opts.jsonOut,
103560
103639
  failuresOnly: Boolean(opts.failuresOnly),
103561
103640
  match: opts.match,
@@ -103566,11 +103645,11 @@ function register3(program2) {
103566
103645
  resourceKey: opts.resourceKey
103567
103646
  });
103568
103647
  });
103569
- auditCmd.command("show").description("\u6309 auditId \u5C55\u793A\u5355\u6761\u5BA1\u8BA1\uFF08\u4ECE\u672C\u673A JSONL \u68C0\u7D22\uFF0C\u4E0D\u4F9D\u8D56\u5BF9\u8BDD\u8BB0\u5FC6\uFF09").requiredOption("--id <auditId>", "\u5BA1\u8BA1\u884C auditId\uFF08v2\uFF09").option("--json", "\u8F93\u51FA JSON", false).option("--json-out <path>", "\u843D\u76D8\u5FEB\u7167\uFF08\u4E0E --json \u4E92\u65A5\uFF09", void 0).action(async (opts) => {
103570
- await runAuditShow({ id: opts.id, json: Boolean(opts.json), jsonOut: opts.jsonOut });
103648
+ auditCmd.command("show").description("\u6309 auditId \u5C55\u793A\u5355\u6761\u5BA1\u8BA1\uFF08\u4ECE\u672C\u673A JSONL \u68C0\u7D22\uFF0C\u4E0D\u4F9D\u8D56\u5BF9\u8BDD\u8BB0\u5FC6\uFF09").requiredOption("--id <auditId>", "\u5BA1\u8BA1\u884C auditId\uFF08v2\uFF09").option("--json-out <path>", "\u843D\u76D8\u5FEB\u7167", void 0).action(async (opts) => {
103649
+ await runAuditShow({ id: opts.id, jsonOut: opts.jsonOut });
103571
103650
  });
103572
- auditCmd.command("restore-plan").description("\u6839\u636E\u5BA1\u8BA1 + \u5199\u524D\u5FEB\u7167\u751F\u6210\u8865\u507F\u5199\u8BA1\u5212\uFF08\u53EA\u8BFB\uFF0C\u4E0D\u8C03\u7528\u4E1A\u52A1\u63A5\u53E3\uFF09").requiredOption("--id <auditId>", "\u76EE\u6807\u5BA1\u8BA1 auditId").option("--json", "\u8F93\u51FA JSON", false).option("--json-out <path>", "\u843D\u76D8\uFF08\u4E0E --json \u4E92\u65A5\uFF09", void 0).action(async (opts) => {
103573
- await runAuditRestorePlan({ id: opts.id, json: Boolean(opts.json), jsonOut: opts.jsonOut });
103651
+ auditCmd.command("restore-plan").description("\u6839\u636E\u5BA1\u8BA1 + \u5199\u524D\u5FEB\u7167\u751F\u6210\u8865\u507F\u5199\u8BA1\u5212\uFF08\u53EA\u8BFB\uFF0C\u4E0D\u8C03\u7528\u4E1A\u52A1\u63A5\u53E3\uFF09").requiredOption("--id <auditId>", "\u76EE\u6807\u5BA1\u8BA1 auditId").option("--json-out <path>", "\u843D\u76D8", void 0).action(async (opts) => {
103652
+ await runAuditRestorePlan({ id: opts.id, jsonOut: opts.jsonOut });
103574
103653
  });
103575
103654
  auditCmd.command("restore-apply").description(
103576
103655
  "\u6267\u884C\u8865\u507F\u5199\uFF08\u5C06\u8D44\u6E90\u5199\u56DE\u5FEB\u7167\u4E2D\u7684\u72B6\u6001\uFF09\uFF1B\u987B\u5148 restore-plan\uFF0C\u5E76\u7ECF --i-confirm + --ack-subsequent-writes \u5B88\u536B"
@@ -103578,14 +103657,14 @@ function register3(program2) {
103578
103657
  "--ack-subsequent-writes <n>",
103579
103658
  "\u663E\u5F0F\u786E\u8BA4\u4F1A\u88AB\u672C\u6B21\u56DE\u9000\u8986\u76D6\u7684\u540C resourceKey \u540E\u7EED\u6210\u529F\u5199\u6570\u91CF\uFF1B\u5FC5\u987B\u7B49\u4E8E restore-plan.guardChecks.ackSubsequentWrites",
103580
103659
  (v) => Number.parseInt(v, 10)
103581
- ).option("-t, --token <token>", "JWT\uFF08\u53EF\u9009\uFF0C\u4E0E\u5168\u5C40\u4E00\u81F4\uFF09", void 0).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF", false).option("--json", "stdout \u4EC5\u8F93\u51FA JSON", false).action(async (opts) => {
103660
+ ).option("-t, --token <token>", "JWT\uFF08\u53EF\u9009\uFF0C\u4E0E\u5168\u5C40\u4E00\u81F4\uFF09", void 0).option("--json-out <path>", "\u843D\u76D8 apply \u7ED3\u679C", void 0).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF", false).action(async (opts) => {
103582
103661
  await runAuditRestoreApply({
103583
103662
  id: opts.id,
103584
103663
  iConfirm: Boolean(opts.iConfirm),
103585
103664
  ackSubsequentWrites: opts.ackSubsequentWrites,
103586
103665
  token: opts.token,
103587
103666
  verbose: Boolean(opts.verbose),
103588
- json: Boolean(opts.json)
103667
+ jsonOut: opts.jsonOut
103589
103668
  });
103590
103669
  });
103591
103670
  }
@@ -104607,12 +104686,8 @@ function register6(program2) {
104607
104686
  "\u8D26\u6237\u72B6\u6001\uFF1Anormal\uFF08\u6B63\u5E38\uFF09| invalid\uFF08\u5931\u6548\uFF09| all\uFF08\u5168\u90E8\uFF0C\u9ED8\u8BA4\uFF09",
104608
104687
  "all"
104609
104688
  ).option("-p, --page <n>", "\u9875\u7801\uFF08\u9ED8\u8BA4 1\uFF09", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF\uFF08\u9ED8\u8BA4 20\uFF09", parseInt).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option(
104610
- "--json",
104611
- "\u4EE5 JSON \u8F93\u51FA\uFF08\u542B\u5206\u9875\u4FE1\u5C01\u4E0E items\uFF1B\u9ED8\u8BA4\u4ECD\u4F1A\u5408\u5E76\u4F59\u989D/\u6D88\u8017/Arit\uFF0C\u4E0E\u8868\u683C\u4E00\u81F4\u3002\u52A0 --quick \u5219 items \u4EC5\u542B\u5217\u8868\u63A5\u53E3\u5B57\u6BB5\uFF09",
104612
- false
104613
- ).option(
104614
104689
  "--json-out <path>",
104615
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
104690
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
104616
104691
  void 0
104617
104692
  ).option(
104618
104693
  "--quick",
@@ -104631,7 +104706,6 @@ function register6(program2) {
104631
104706
  status: opts.status,
104632
104707
  page: opts.page,
104633
104708
  pageSize: opts.pageSize,
104634
- json: opts.json,
104635
104709
  jsonOut: opts.jsonOut,
104636
104710
  quick: opts.quick,
104637
104711
  unicode: opts.unicode,
@@ -104731,16 +104805,16 @@ async function runAccountActiveBills(opts) {
104731
104805
  }
104732
104806
  function register7(program2) {
104733
104807
  program2.command("account-active-bills").description(
104734
- "\u67E5\u8BE2\u8D26\u6237\u6FC0\u6D3B/\u5145\u503C\u8D26\u5355\u660E\u7EC6\uFF08GET TSO /AccountActiveBills/{\u5A92\u4F53}/{entityId}\uFF1BentityId \u6765\u81EA list-accounts --json\uFF09"
104808
+ "\u67E5\u8BE2\u8D26\u6237\u6FC0\u6D3B/\u5145\u503C\u8D26\u5355\u660E\u7EC6\uFF08GET TSO /AccountActiveBills/{\u5A92\u4F53}/{entityId}\uFF1BentityId \u6765\u81EA list-accounts --json-out ./snap\uFF09"
104735
104809
  ).requiredOption(
104736
104810
  "-m, --media <type>",
104737
104811
  "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok | Yandex | MetaAd | BingV2 | Kwai"
104738
104812
  ).requiredOption(
104739
104813
  "--id <entityId>",
104740
- "\u8D26\u6237 entityId\uFF08list-accounts --json \u4E2D\u6BCF\u6761 ma.entityId\uFF0C\u975E mediaCustomerId\uFF09"
104741
- ).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF09").option("--json", "\u8F93\u51FA\u63A5\u53E3\u539F\u59CB JSON\uFF08\u542B totalRU\u3001results\u3001totalResultCount\uFF09", false).option(
104814
+ "\u8D26\u6237 entityId\uFF08list-accounts --json-out ./snap-out \u4E2D\u6BCF\u6761 ma.entityId\uFF0C\u975E mediaCustomerId\uFF09"
104815
+ ).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF09").option(
104742
104816
  "--json-out <path>",
104743
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
104817
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
104744
104818
  void 0
104745
104819
  ).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
104746
104820
  async (opts) => {
@@ -104748,7 +104822,6 @@ function register7(program2) {
104748
104822
  token: opts.token,
104749
104823
  media: opts.media,
104750
104824
  entityId: opts.id,
104751
- json: opts.json,
104752
104825
  jsonOut: opts.jsonOut,
104753
104826
  verbose: opts.verbose
104754
104827
  });
@@ -104888,9 +104961,9 @@ function register8(program2) {
104888
104961
  ).requiredOption(
104889
104962
  "-a, --accounts <ids>",
104890
104963
  "\u8D26\u6237 ID\uFF0C\u591A\u4E2A\u7528\u9017\u53F7\u5206\u9694\uFF08\u6765\u81EA list-accounts \u7684 mediaCustomerId\uFF09"
104891
- ).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--start-date <date>", "\u7EDF\u8BA1\u5F00\u59CB\u65E5\u671F yyyy-MM-dd\uFF08\u9ED8\u8BA4\uFF1A7 \u5929\u524D\uFF0CMetaAd \u4E0D\u9700\u8981\uFF09").option("--end-date <date>", "\u7EDF\u8BA1\u7ED3\u675F\u65E5\u671F yyyy-MM-dd\uFF08\u9ED8\u8BA4\uFF1A\u4ECA\u5929\uFF0CMetaAd \u4E0D\u9700\u8981\uFF09").option("--json", "\u4EE5 JSON \u683C\u5F0F\u8F93\u51FA\u539F\u59CB\u54CD\u5E94", false).option(
104964
+ ).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--start-date <date>", "\u7EDF\u8BA1\u5F00\u59CB\u65E5\u671F yyyy-MM-dd\uFF08\u9ED8\u8BA4\uFF1A7 \u5929\u524D\uFF0CMetaAd \u4E0D\u9700\u8981\uFF09").option("--end-date <date>", "\u7EDF\u8BA1\u7ED3\u675F\u65E5\u671F yyyy-MM-dd\uFF08\u9ED8\u8BA4\uFF1A\u4ECA\u5929\uFF0CMetaAd \u4E0D\u9700\u8981\uFF09").option(
104892
104965
  "--json-out <path>",
104893
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
104966
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
104894
104967
  void 0
104895
104968
  ).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
104896
104969
  async (opts) => {
@@ -104900,7 +104973,6 @@ function register8(program2) {
104900
104973
  accounts: opts.accounts,
104901
104974
  startDate: opts.startDate,
104902
104975
  endDate: opts.endDate,
104903
- json: opts.json,
104904
104976
  jsonOut: opts.jsonOut,
104905
104977
  verbose: opts.verbose
104906
104978
  });
@@ -105315,9 +105387,9 @@ function register9(program2) {
105315
105387
  "--max-pages <n>",
105316
105388
  "\u6700\u591A\u626B\u63CF\u9875\u6570\uFF08\u9ED8\u8BA4 20\uFF0C\u4E0A\u9650 200\uFF1B\u8D85\u51FA\u540E\u8BF7\u63D0\u9AD8 --page-size \u6216\u5206\u6B21\u626B\u63CF\uFF09",
105317
105389
  (v) => parseInt(v, 10)
105318
- ).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--json", "\u8F93\u51FA\u7ED3\u6784\u5316 JSON\uFF0C\u542B meta\uFF08\u626B\u63CF\u6570/\u547D\u4E2D\u6570/\u9608\u503C/\u65F6\u95F4\u6233\uFF09", false).option(
105390
+ ).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option(
105319
105391
  "--json-out <path>",
105320
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
105392
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
105321
105393
  void 0
105322
105394
  ).option("--refresh-dp", "\u5F3A\u5236\u91CD\u62C9 Datapermission \u540E\u518D\u626B\u63CF\uFF08\u6392\u67E5\u4F1A\u8BDD\u5F02\u5E38\uFF09", false).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
105323
105395
  async (opts) => {
@@ -105330,7 +105402,6 @@ function register9(program2) {
105330
105402
  targetDays: opts.targetDays,
105331
105403
  pageSize: opts.pageSize,
105332
105404
  maxPages: opts.maxPages,
105333
- json: opts.json,
105334
105405
  jsonOut: opts.jsonOut,
105335
105406
  refreshDp: opts.refreshDp,
105336
105407
  verbose: opts.verbose
@@ -105497,9 +105568,9 @@ function register11(program2) {
105497
105568
  program2.command("stats").description("\u67E5\u8BE2\u5E7F\u544A\u6D88\u8017\u3001\u70B9\u51FB\u3001\u8F6C\u5316\u7B49\u6295\u653E\u6570\u636E\uFF08\u9ED8\u8BA4\u8FD1 7 \u5929\uFF0C\u4E0D\u542B\u4ECA\u5929\uFF09").requiredOption(
105498
105569
  "-m, --media <type>",
105499
105570
  "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok | Yandex | MetaAd | BingV2 | Kwai"
105500
- ).option("-a, --accounts <ids>", "\u8D26\u6237 ID\uFF0C\u591A\u4E2A\u7528\u9017\u53F7\u5206\u9694\uFF08\u7559\u7A7A\u5219\u67E5\u5168\u90E8\u8D26\u6237\uFF09").option("--start <date>", "\u5F00\u59CB\u65E5\u671F\uFF0C\u683C\u5F0F YYYY-MM-DD\uFF08\u9ED8\u8BA4 7 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F\uFF0C\u683C\u5F0F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u6628\u5929\uFF09").option("--start-date <date>", "\u540C --start\uFF08\u6587\u6863/Playbook \u517C\u5BB9\u522B\u540D\uFF09").option("--end-date <date>", "\u540C --end\uFF08\u6587\u6863/Playbook \u517C\u5BB9\u522B\u540D\uFF09").option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--json", "\u4EE5 JSON \u683C\u5F0F\u8F93\u51FA\u539F\u59CB\u54CD\u5E94", false).option(
105571
+ ).option("-a, --accounts <ids>", "\u8D26\u6237 ID\uFF0C\u591A\u4E2A\u7528\u9017\u53F7\u5206\u9694\uFF08\u7559\u7A7A\u5219\u67E5\u5168\u90E8\u8D26\u6237\uFF09").option("--start <date>", "\u5F00\u59CB\u65E5\u671F\uFF0C\u683C\u5F0F YYYY-MM-DD\uFF08\u9ED8\u8BA4 7 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F\uFF0C\u683C\u5F0F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u6628\u5929\uFF09").option("--start-date <date>", "\u540C --start\uFF08\u6587\u6863/Playbook \u517C\u5BB9\u522B\u540D\uFF09").option("--end-date <date>", "\u540C --end\uFF08\u6587\u6863/Playbook \u517C\u5BB9\u522B\u540D\uFF09").option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option(
105501
105572
  "--json-out <path>",
105502
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
105573
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
105503
105574
  void 0
105504
105575
  ).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
105505
105576
  async (opts) => {
@@ -105509,7 +105580,6 @@ function register11(program2) {
105509
105580
  accounts: opts.accounts,
105510
105581
  startDate: opts.start ?? opts.startDate,
105511
105582
  endDate: opts.end ?? opts.endDate,
105512
- json: opts.json,
105513
105583
  jsonOut: opts.jsonOut,
105514
105584
  verbose: opts.verbose
105515
105585
  });
@@ -105604,9 +105674,9 @@ async function runAccountHistory(opts) {
105604
105674
  console.log();
105605
105675
  }
105606
105676
  function register12(program2) {
105607
- program2.command("account-history").description("\u67E5\u8BE2\u5F00\u6237\u7533\u8BF7\u5386\u53F2\u8BB0\u5F55").option("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok | MetaAd | BingV2 | Kwai").option("-s, --status <status>", "\u7533\u8BF7\u72B6\u6001\u5173\u952E\u5B57").option("-k, --keyword <text>", "\u641C\u7D22\u5173\u952E\u5B57\uFF08\u8D26\u6237\u540D/ID\uFF09").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF\uFF08\u9ED8\u8BA4 20\uFF09", parseInt).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
105677
+ program2.command("account-history").description("\u67E5\u8BE2\u5F00\u6237\u7533\u8BF7\u5386\u53F2\u8BB0\u5F55").option("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok | MetaAd | BingV2 | Kwai").option("-s, --status <status>", "\u7533\u8BF7\u72B6\u6001\u5173\u952E\u5B57").option("-k, --keyword <text>", "\u641C\u7D22\u5173\u952E\u5B57\uFF08\u8D26\u6237\u540D/ID\uFF09").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF\uFF08\u9ED8\u8BA4 20\uFF09", parseInt).option("-t, --token <token>", "Auth Token").option(
105608
105678
  "--json-out <path>",
105609
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
105679
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
105610
105680
  void 0
105611
105681
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
105612
105682
  async (opts) => {
@@ -105619,7 +105689,6 @@ function register12(program2) {
105619
105689
  endDate: opts.end,
105620
105690
  page: opts.page,
105621
105691
  pageSize: opts.pageSize,
105622
- json: opts.json,
105623
105692
  jsonOut: opts.jsonOut,
105624
105693
  verbose: opts.verbose
105625
105694
  });
@@ -105686,7 +105755,7 @@ function reportManifestFile(accountId) {
105686
105755
  return `${applyIdSuffix("report-manifest", accountId)}.json`;
105687
105756
  }
105688
105757
  var DEFAULT_FIELD_GUIDE3 = {
105689
- markdownRefs: ["references/account-analytics.md"]
105758
+ markdownRefs: ["references/analytics/account-analytics.md"]
105690
105759
  };
105691
105760
  function sectionToFilename(section, accountId) {
105692
105761
  if (!/^[a-z0-9_-]+$/.test(section)) {
@@ -105901,11 +105970,6 @@ async function runReportMetaOverview(opts) {
105901
105970
  `);
105902
105971
  process.exit(1);
105903
105972
  }
105904
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report meta-overview");
105905
- if (opts.json) {
105906
- console.log(JSON.stringify(data, null, 2));
105907
- return;
105908
- }
105909
105973
  if (opts.jsonOut) {
105910
105974
  const summary = await writeReportAnalysisSnapshot({
105911
105975
  snapshotDir: opts.jsonOut,
@@ -106032,7 +106096,6 @@ async function runReportCreate(opts) {
106032
106096
  `);
106033
106097
  process.exit(1);
106034
106098
  }
106035
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report create");
106036
106099
  if (await emitCliJsonOrSnapshot(opts, {
106037
106100
  section: "report-create",
106038
106101
  commandLabel: "report create",
@@ -106104,7 +106167,6 @@ async function runReportPushList(opts) {
106104
106167
  const total = data.totalResultCount ?? 0;
106105
106168
  const page = opts.page ?? 1;
106106
106169
  const pageSize = opts.pageSize ?? 20;
106107
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report push list");
106108
106170
  const pushListPayload = wrapListJson({ page, pageSize, total, items });
106109
106171
  if (await emitCliJsonOrSnapshot(opts, {
106110
106172
  section: "report-push-list",
@@ -106255,7 +106317,6 @@ async function runReportPushHistory(opts) {
106255
106317
  const total = data.totalResultCount ?? 0;
106256
106318
  const page = opts.page ?? 1;
106257
106319
  const pageSize = opts.pageSize ?? 20;
106258
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report push history");
106259
106320
  const pushHistoryPayload = wrapListJson({ page, pageSize, total, items });
106260
106321
  if (await emitCliJsonOrSnapshot(opts, {
106261
106322
  section: "report-push-history",
@@ -106310,7 +106371,6 @@ async function runReportPushReceiveEmails(opts) {
106310
106371
  process.exit(1);
106311
106372
  }
106312
106373
  const list = Array.isArray(data) ? data.map((x) => String(x)) : [];
106313
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report push receive-emails");
106314
106374
  if (await emitCliJsonOrSnapshot(opts, {
106315
106375
  section: "report-push-receive-emails",
106316
106376
  commandLabel: "report push receive-emails",
@@ -106405,11 +106465,6 @@ async function runReportTikTokOverview(opts) {
106405
106465
  const url = reportingUrl(config, id, "OverviewSectionData", params.toString());
106406
106466
  try {
106407
106467
  const data = await fetchTikTokJson(config, url, !!opts.verbose);
106408
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report tiktok-overview");
106409
- if (opts.json) {
106410
- console.log(JSON.stringify(data, null, 2));
106411
- return;
106412
- }
106413
106468
  if (opts.jsonOut) {
106414
106469
  await emitTiktokSnapshot(opts, "tiktok-overview", id, startDate, endDate, data);
106415
106470
  return;
@@ -106437,11 +106492,6 @@ async function runReportTikTokCampaigns(opts) {
106437
106492
  const url = reportingUrl(config, id, "CampaignSectionData", params.toString());
106438
106493
  try {
106439
106494
  const data = await fetchTikTokJson(config, url, !!opts.verbose);
106440
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report tiktok-campaigns");
106441
- if (opts.json) {
106442
- console.log(JSON.stringify(data, null, 2));
106443
- return;
106444
- }
106445
106495
  if (opts.jsonOut) {
106446
106496
  await emitTiktokSnapshot(opts, "tiktok-campaigns", id, startDate, endDate, data);
106447
106497
  return;
@@ -106469,11 +106519,6 @@ async function runReportTikTokAdGroups(opts) {
106469
106519
  const url = reportingUrl(config, id, "AdGroupReport", params.toString());
106470
106520
  try {
106471
106521
  const data = await fetchTikTokJson(config, url, !!opts.verbose);
106472
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report tiktok-ad-groups");
106473
- if (opts.json) {
106474
- console.log(JSON.stringify(data, null, 2));
106475
- return;
106476
- }
106477
106522
  if (opts.jsonOut) {
106478
106523
  await emitTiktokSnapshot(opts, "tiktok-ad-groups", id, startDate, endDate, data);
106479
106524
  return;
@@ -106501,11 +106546,6 @@ async function runReportTikTokAds(opts) {
106501
106546
  const url = reportingUrl(config, id, "AdReport", params.toString());
106502
106547
  try {
106503
106548
  const data = await fetchTikTokJson(config, url, !!opts.verbose);
106504
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report tiktok-ads");
106505
- if (opts.json) {
106506
- console.log(JSON.stringify(data, null, 2));
106507
- return;
106508
- }
106509
106549
  if (opts.jsonOut) {
106510
106550
  await emitTiktokSnapshot(opts, "tiktok-ads", id, startDate, endDate, data);
106511
106551
  return;
@@ -106534,11 +106574,6 @@ async function runReportTikTokAudience(opts) {
106534
106574
  const url = reportingUrl(config, id, "AudienceReport", params.toString());
106535
106575
  try {
106536
106576
  const data = await fetchTikTokJson(config, url, !!opts.verbose);
106537
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report tiktok-audience");
106538
- if (opts.json) {
106539
- console.log(JSON.stringify(data, null, 2));
106540
- return;
106541
- }
106542
106577
  if (opts.jsonOut) {
106543
106578
  await emitTiktokSnapshot(
106544
106579
  opts,
@@ -106579,7 +106614,6 @@ async function runReportTikTokAudienceMerged(opts) {
106579
106614
  parts[dimension] = await fetchTikTokJson(config, url, !!opts.verbose);
106580
106615
  }
106581
106616
  const merged = { mergedDimensions: dims, startDate, endDate, account: id, data: parts };
106582
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report tiktok-audience-merged");
106583
106617
  if (opts.jsonOut) {
106584
106618
  await emitTiktokSnapshot(opts, "tiktok-audience-merged", id, startDate, endDate, merged);
106585
106619
  return;
@@ -106605,11 +106639,6 @@ async function runReportTikTokVideos(opts) {
106605
106639
  const url = reportingUrl(config, id, "VideoReport", params.toString());
106606
106640
  try {
106607
106641
  const data = await fetchTikTokJson(config, url, !!opts.verbose);
106608
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report tiktok-videos");
106609
- if (opts.json) {
106610
- console.log(JSON.stringify(data, null, 2));
106611
- return;
106612
- }
106613
106642
  if (opts.jsonOut) {
106614
106643
  await emitTiktokSnapshot(opts, "tiktok-videos", id, startDate, endDate, data);
106615
106644
  return;
@@ -106634,11 +106663,6 @@ async function runReportTikTokAreacode(opts) {
106634
106663
  const url = `${base}/query/media-account/tiktok/TikTokAreacode/Read`;
106635
106664
  try {
106636
106665
  const data = await fetchTikTokJson(config, url, !!opts.verbose);
106637
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report tiktok-areacode");
106638
- if (opts.json) {
106639
- console.log(JSON.stringify(data, null, 2));
106640
- return;
106641
- }
106642
106666
  if (opts.jsonOut) {
106643
106667
  const summary = await writeReportAnalysisSnapshot({
106644
106668
  snapshotDir: opts.jsonOut,
@@ -106670,11 +106694,6 @@ async function runReportTikTokInterestList(opts) {
106670
106694
  const url = `${tt}/tiktokadgroupmanagement/adgroup/tiktok/GetInterestList?${params}`;
106671
106695
  try {
106672
106696
  const data = await fetchTikTokJson(config, url, !!opts.verbose);
106673
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report tiktok-interest-list");
106674
- if (opts.json) {
106675
- console.log(JSON.stringify(data, null, 2));
106676
- return;
106677
- }
106678
106697
  if (opts.jsonOut) {
106679
106698
  const summary = await writeReportAnalysisSnapshot({
106680
106699
  snapshotDir: opts.jsonOut,
@@ -106700,16 +106719,16 @@ async function runReportTikTokInterestList(opts) {
106700
106719
 
106701
106720
  // src/commands/report-tiktok-analysis/_register.ts
106702
106721
  function addDateAndFetchOptions(c) {
106703
- return c.requiredOption("-a, --account <id>", "TikTok \u5E7F\u544A\u4E3B mediaCustomerId\uFF08\u6570\u5B57\uFF09").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u4E0E --end \u540C\u4F20\u6216\u540C\u7701\u7565\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("--take <n>", "\u6D88\u8017/\u6761\u6570\u4E0A\u9650\uFF08\u9ED8\u8BA4 100\uFF0C\u4E0E\u524D\u7AEF take \u4E00\u81F4\uFF09", (v) => parseInt(v, 10)).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
106722
+ return c.requiredOption("-a, --account <id>", "TikTok \u5E7F\u544A\u4E3B mediaCustomerId\uFF08\u6570\u5B57\uFF09").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u4E0E --end \u540C\u4F20\u6216\u540C\u7701\u7565\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("--take <n>", "\u6D88\u8017/\u6761\u6570\u4E0A\u9650\uFF08\u9ED8\u8BA4 100\uFF0C\u4E0E\u524D\u7AEF take \u4E00\u81F4\uFF09", (v) => parseInt(v, 10)).option("-t, --token <token>", "Auth Token").option(
106704
106723
  "--json-out <dir>",
106705
- "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106724
+ "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106706
106725
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false);
106707
106726
  }
106708
106727
  function registerReportTiktokCommands(reportCmd) {
106709
106728
  const desc = "TikTok \u8D26\u6237\u5206\u6790\uFF08TSO reporting/media-account/TikTok/...\uFF0C\u4E0E\u5468\u671F\u62A5\u544A\u6570\u636E\u5757\u4E00\u81F4\uFF09";
106710
- reportCmd.command("tiktok-overview").description(`${desc} \u2014 \u603B\u89C8 OverviewSectionData`).requiredOption("-a, --account <id>", "TikTok mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
106729
+ reportCmd.command("tiktok-overview").description(`${desc} \u2014 \u603B\u89C8 OverviewSectionData`).requiredOption("-a, --account <id>", "TikTok mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("-t, --token <token>", "Auth Token").option(
106711
106730
  "--json-out <dir>",
106712
- "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106731
+ "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106713
106732
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
106714
106733
  await runReportTikTokOverview(opts);
106715
106734
  });
@@ -106724,9 +106743,9 @@ function registerReportTiktokCommands(reportCmd) {
106724
106743
  bindTake("tiktok-ad-groups", "AdGroupReport", runReportTikTokAdGroups);
106725
106744
  bindTake("tiktok-ads", "AdReport", runReportTikTokAds);
106726
106745
  bindTake("tiktok-videos", "VideoReport", runReportTikTokVideos);
106727
- reportCmd.command("tiktok-audience").description(`${desc} \u2014 AudienceReport\uFF08\u5355\u7EF4\u5EA6 dimensions\uFF09`).requiredOption("-a, --account <id>", "TikTok mediaCustomerId").requiredOption("-d, --dimension <dim>", `\u7EF4\u5EA6\uFF1A${AUDIENCE_DIMENSIONS.join(" | ")}`).option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("--take <n>", "\u6761\u6570\u4E0A\u9650\uFF08\u9ED8\u8BA4 100\uFF09", (v) => parseInt(v, 10)).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
106746
+ reportCmd.command("tiktok-audience").description(`${desc} \u2014 AudienceReport\uFF08\u5355\u7EF4\u5EA6 dimensions\uFF09`).requiredOption("-a, --account <id>", "TikTok mediaCustomerId").requiredOption("-d, --dimension <dim>", `\u7EF4\u5EA6\uFF1A${AUDIENCE_DIMENSIONS.join(" | ")}`).option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("--take <n>", "\u6761\u6570\u4E0A\u9650\uFF08\u9ED8\u8BA4 100\uFF09", (v) => parseInt(v, 10)).option("-t, --token <token>", "Auth Token").option(
106728
106747
  "--json-out <dir>",
106729
- "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106748
+ "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106730
106749
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
106731
106750
  const d = opts.dimension;
106732
106751
  if (!AUDIENCE_DIMENSIONS.includes(d)) {
@@ -106739,15 +106758,15 @@ function registerReportTiktokCommands(reportCmd) {
106739
106758
  });
106740
106759
  reportCmd.command("tiktok-audience-merged").description(
106741
106760
  `${desc} \u2014 \u5408\u5E76 gender + age + interest_category \u4E09\u6B21 AudienceReport\uFF08\u9ED8\u8BA4 stdout \u4E3A JSON\uFF09`
106742
- ).requiredOption("-a, --account <id>", "TikTok mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("--take <n>", "\u6761\u6570\u4E0A\u9650\uFF08\u9ED8\u8BA4 100\uFF09", (v) => parseInt(v, 10)).option("-t, --token <token>", "Auth Token").option("--json", "\u4E0E --json-out \u4E92\u65A5\uFF1B\u663E\u5F0F\u58F0\u660E stdout JSON\uFF08\u9ED8\u8BA4\u5DF2\u662F JSON\uFF09", false).option(
106761
+ ).requiredOption("-a, --account <id>", "TikTok mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("--take <n>", "\u6761\u6570\u4E0A\u9650\uFF08\u9ED8\u8BA4 100\uFF09", (v) => parseInt(v, 10)).option("-t, --token <token>", "Auth Token").option(
106743
106762
  "--json-out <dir>",
106744
106763
  "\u5C06\u5408\u5E76 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106745
106764
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
106746
106765
  await runReportTikTokAudienceMerged(opts);
106747
106766
  });
106748
- reportCmd.command("tiktok-areacode").description("TikTok \u5730\u533A\u4EE3\u7801\u679A\u4E3E\uFF08\u4E3B\u5E73\u53F0 query/media-account/tiktok/TikTokAreacode/Read\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
106767
+ reportCmd.command("tiktok-areacode").description("TikTok \u5730\u533A\u4EE3\u7801\u679A\u4E3E\uFF08\u4E3B\u5E73\u53F0 query/media-account/tiktok/TikTokAreacode/Read\uFF09").option("-t, --token <token>", "Auth Token").option(
106749
106768
  "--json-out <dir>",
106750
- "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106769
+ "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106751
106770
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
106752
106771
  async (opts) => {
106753
106772
  await runReportTikTokAreacode(opts);
@@ -106755,9 +106774,9 @@ function registerReportTiktokCommands(reportCmd) {
106755
106774
  );
106756
106775
  reportCmd.command("tiktok-interest-list").description(
106757
106776
  "TikTok \u5174\u8DA3\u7C7B\u76EE\uFF08tiktokApiUrl GetInterestList\uFF0C\u89E3\u6790 country_code/interest \u62A5\u8868\u65F6\u5E38\u7528\uFF09"
106758
- ).requiredOption("-a, --account <id>", "TikTok mediaCustomerId").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
106777
+ ).requiredOption("-a, --account <id>", "TikTok mediaCustomerId").option("-t, --token <token>", "Auth Token").option(
106759
106778
  "--json-out <dir>",
106760
- "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106779
+ "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
106761
106780
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
106762
106781
  async (opts) => {
106763
106782
  await runReportTikTokInterestList(opts);
@@ -106880,11 +106899,6 @@ async function runReportBingOverview(opts) {
106880
106899
  const url = reportingUrl2(config, id, "OverviewSectionData", params.toString());
106881
106900
  try {
106882
106901
  const data = await fetchBingJson(config, url, !!opts.verbose);
106883
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-overview");
106884
- if (opts.json) {
106885
- console.log(JSON.stringify(data, null, 2));
106886
- return;
106887
- }
106888
106902
  if (opts.jsonOut) {
106889
106903
  await emitBingSnapshot(opts, "bing-overview", id, startDate, endDate, data);
106890
106904
  return;
@@ -106907,11 +106921,6 @@ async function runReportBingDevice(opts) {
106907
106921
  const url = reportingUrl2(config, id, "DeviceSectionData", params.toString());
106908
106922
  try {
106909
106923
  const data = await fetchBingJson(config, url, !!opts.verbose);
106910
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-device");
106911
- if (opts.json) {
106912
- console.log(JSON.stringify(data, null, 2));
106913
- return;
106914
- }
106915
106924
  if (opts.jsonOut) {
106916
106925
  await emitBingSnapshot(opts, "bing-device", id, startDate, endDate, data);
106917
106926
  return;
@@ -106934,11 +106943,6 @@ async function runReportBingGeographic(opts) {
106934
106943
  const url = reportingUrl2(config, id, "GeographicSectionData", params.toString());
106935
106944
  try {
106936
106945
  const data = await fetchBingJson(config, url, !!opts.verbose);
106937
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-geographic");
106938
- if (opts.json) {
106939
- console.log(JSON.stringify(data, null, 2));
106940
- return;
106941
- }
106942
106946
  if (opts.jsonOut) {
106943
106947
  await emitBingSnapshot(opts, "bing-geographic", id, startDate, endDate, data);
106944
106948
  return;
@@ -106961,11 +106965,6 @@ async function runReportBingAgeAudience(opts) {
106961
106965
  const url = reportingUrl2(config, id, "AgeAudienceData", params.toString());
106962
106966
  try {
106963
106967
  const data = await fetchBingJson(config, url, !!opts.verbose);
106964
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-age-audience");
106965
- if (opts.json) {
106966
- console.log(JSON.stringify(data, null, 2));
106967
- return;
106968
- }
106969
106968
  if (opts.jsonOut) {
106970
106969
  await emitBingSnapshot(opts, "bing-age-audience", id, startDate, endDate, data);
106971
106970
  return;
@@ -106988,11 +106987,6 @@ async function runReportBingGenderAudience(opts) {
106988
106987
  const url = reportingUrl2(config, id, "GenderAudienceData", params.toString());
106989
106988
  try {
106990
106989
  const data = await fetchBingJson(config, url, !!opts.verbose);
106991
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-gender-audience");
106992
- if (opts.json) {
106993
- console.log(JSON.stringify(data, null, 2));
106994
- return;
106995
- }
106996
106990
  if (opts.jsonOut) {
106997
106991
  await emitBingSnapshot(opts, "bing-gender-audience", id, startDate, endDate, data);
106998
106992
  return;
@@ -107026,7 +107020,6 @@ async function runReportBingAudienceMerged(opts) {
107026
107020
  account: id,
107027
107021
  data: { ageAudience: ageData, genderAudience: genderData }
107028
107022
  };
107029
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-audience-merged");
107030
107023
  if (opts.jsonOut) {
107031
107024
  await emitBingSnapshot(opts, "bing-audience-merged", id, startDate, endDate, merged);
107032
107025
  return;
@@ -107047,11 +107040,6 @@ async function runReportBingCampaigns(opts) {
107047
107040
  const url = reportingUrl2(config, id, "CampaignReport", params.toString());
107048
107041
  try {
107049
107042
  const data = await fetchBingJson(config, url, !!opts.verbose);
107050
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-campaigns");
107051
- if (opts.json) {
107052
- console.log(JSON.stringify(data, null, 2));
107053
- return;
107054
- }
107055
107043
  if (opts.jsonOut) {
107056
107044
  await emitBingSnapshot(opts, "bing-campaigns", id, startDate, endDate, data);
107057
107045
  return;
@@ -107074,11 +107062,6 @@ async function runReportBingAdGroups(opts) {
107074
107062
  const url = reportingUrl2(config, id, "AdGroupReport", params.toString());
107075
107063
  try {
107076
107064
  const data = await fetchBingJson(config, url, !!opts.verbose);
107077
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-ad-groups");
107078
- if (opts.json) {
107079
- console.log(JSON.stringify(data, null, 2));
107080
- return;
107081
- }
107082
107065
  if (opts.jsonOut) {
107083
107066
  await emitBingSnapshot(opts, "bing-ad-groups", id, startDate, endDate, data);
107084
107067
  return;
@@ -107101,11 +107084,6 @@ async function runReportBingAds(opts) {
107101
107084
  const url = reportingUrl2(config, id, "AdReport", params.toString());
107102
107085
  try {
107103
107086
  const data = await fetchBingJson(config, url, !!opts.verbose);
107104
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-ads");
107105
- if (opts.json) {
107106
- console.log(JSON.stringify(data, null, 2));
107107
- return;
107108
- }
107109
107087
  if (opts.jsonOut) {
107110
107088
  await emitBingSnapshot(opts, "bing-ads", id, startDate, endDate, data);
107111
107089
  return;
@@ -107134,11 +107112,6 @@ async function runReportBingKeywords(opts) {
107134
107112
  const url = reportingUrl2(config, id, "KeywordReport", params.toString());
107135
107113
  try {
107136
107114
  const data = await fetchBingJson(config, url, !!opts.verbose);
107137
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-keywords");
107138
- if (opts.json) {
107139
- console.log(JSON.stringify(data, null, 2));
107140
- return;
107141
- }
107142
107115
  if (opts.jsonOut) {
107143
107116
  await emitBingSnapshot(opts, "bing-keywords", id, startDate, endDate, data);
107144
107117
  return;
@@ -107167,11 +107140,6 @@ async function runReportBingSearchTerms(opts) {
107167
107140
  const url = reportingUrl2(config, id, "SearchQueryReport", params.toString());
107168
107141
  try {
107169
107142
  const data = await fetchBingJson(config, url, !!opts.verbose);
107170
- assertJsonXorJsonOut(opts.json, opts.jsonOut, "report bing-search-terms");
107171
- if (opts.json) {
107172
- console.log(JSON.stringify(data, null, 2));
107173
- return;
107174
- }
107175
107143
  if (opts.jsonOut) {
107176
107144
  await emitBingSnapshot(opts, "bing-search-terms", id, startDate, endDate, data);
107177
107145
  return;
@@ -107192,9 +107160,9 @@ function addBingDateOptions(c) {
107192
107160
  return c.requiredOption(
107193
107161
  "-a, --account <id>",
107194
107162
  "Bing mediaCustomerId\uFF08\u6570\u5B57\uFF0C\u4E0E list-accounts -m BingV2 \u4E00\u81F4\uFF09"
107195
- ).option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u4E0E --end \u540C\u4F20\u6216\u540C\u7701\u7565\uFF1B\u4E0D\u53EF\u542B\u4ECA\u5929/\u6628\u5929\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
107163
+ ).option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u4E0E --end \u540C\u4F20\u6216\u540C\u7701\u7565\uFF1B\u4E0D\u53EF\u542B\u4ECA\u5929/\u6628\u5929\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-t, --token <token>", "Auth Token").option(
107196
107164
  "--json-out <dir>",
107197
- "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
107165
+ "\u5C06 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
107198
107166
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false);
107199
107167
  }
107200
107168
  function registerReportBingCommands(reportCmd) {
@@ -107214,7 +107182,7 @@ function registerReportBingCommands(reportCmd) {
107214
107182
  bindSimple("bing-campaigns", "\u5E7F\u544A\u7CFB\u5217 CampaignReport", runReportBingCampaigns);
107215
107183
  bindSimple("bing-ad-groups", "\u5E7F\u544A\u7EC4 AdGroupReport", runReportBingAdGroups);
107216
107184
  bindSimple("bing-ads", "\u5E7F\u544A AdReport", runReportBingAds);
107217
- reportCmd.command("bing-audience-merged").description(`${desc} \u2014 \u5408\u5E76 AgeAudienceData + GenderAudienceData\uFF08\u9ED8\u8BA4 stdout \u4E3A JSON\uFF09`).requiredOption("-a, --account <id>", "Bing mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("-t, --token <token>", "Auth Token").option("--json", "\u4E0E --json-out \u4E92\u65A5\uFF1B\u663E\u5F0F\u58F0\u660E stdout JSON\uFF08\u9ED8\u8BA4\u5DF2\u662F JSON\uFF09", false).option(
107185
+ reportCmd.command("bing-audience-merged").description(`${desc} \u2014 \u5408\u5E76 AgeAudienceData + GenderAudienceData\uFF08\u9ED8\u8BA4 stdout \u4E3A JSON\uFF09`).requiredOption("-a, --account <id>", "Bing mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("-t, --token <token>", "Auth Token").option(
107218
107186
  "--json-out <dir>",
107219
107187
  "\u5C06\u5408\u5E76 JSON \u5199\u5165\u76EE\u5F55\uFF08\u6587\u4EF6\u540D\u5E26 accountId \u540E\u7F00\uFF09\u5E76\u66F4\u65B0 report-manifest-<accountId>.json\uFF1Bstdout \u4EC5\u4E00\u884C\u6458\u8981 JSON"
107220
107188
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
@@ -107247,9 +107215,9 @@ function registerReportBingCommands(reportCmd) {
107247
107215
  // src/commands/report/register.ts
107248
107216
  function register13(program2) {
107249
107217
  const reportCmd = program2.command("report").description("\u4F18\u5316\u62A5\u544A\u4E0E\u63A8\u9001\u7BA1\u7406");
107250
- reportCmd.command("list").description("\u67E5\u8BE2\u4F18\u5316\u62A5\u544A\u5217\u8868").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").option("-t, --type <type>", "\u62A5\u544A\u7C7B\u578B\uFF08\u5982 Daily / Hourly\uFF09").option("-s, --status <ready>", "\u751F\u6210\u72B6\u6001\uFF08true/false\uFF09").option("-k, --keyword <text>", "\u62A5\u544A\u540D\u79F0\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("--token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
107218
+ reportCmd.command("list").description("\u67E5\u8BE2\u4F18\u5316\u62A5\u544A\u5217\u8868").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").option("-t, --type <type>", "\u62A5\u544A\u7C7B\u578B\uFF08\u5982 Daily / Hourly\uFF09").option("-s, --status <ready>", "\u751F\u6210\u72B6\u6001\uFF08true/false\uFF09").option("-k, --keyword <text>", "\u62A5\u544A\u540D\u79F0\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("--token <token>", "Auth Token").option(
107251
107219
  "--json-out <path>",
107252
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107220
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107253
107221
  void 0
107254
107222
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107255
107223
  await runReportList({
@@ -107262,14 +107230,13 @@ function register13(program2) {
107262
107230
  endDate: opts.end,
107263
107231
  page: opts.page,
107264
107232
  pageSize: opts.pageSize,
107265
- json: opts.json,
107266
107233
  jsonOut: opts.jsonOut,
107267
107234
  verbose: opts.verbose
107268
107235
  });
107269
107236
  });
107270
- reportCmd.command("create").description("\u6279\u91CF\u751F\u6210\u4F18\u5316\u62A5\u544A").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").requiredOption("-a, --accounts <ids>", "\u8D26\u6237 ID\uFF0C\u9017\u53F7\u5206\u9694").requiredOption("-t, --type <type>", "\u62A5\u544A\u7C7B\u578B\uFF0C\u5982 Daily").requiredOption("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").requiredOption("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("--token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
107237
+ reportCmd.command("create").description("\u6279\u91CF\u751F\u6210\u4F18\u5316\u62A5\u544A").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").requiredOption("-a, --accounts <ids>", "\u8D26\u6237 ID\uFF0C\u9017\u53F7\u5206\u9694").requiredOption("-t, --type <type>", "\u62A5\u544A\u7C7B\u578B\uFF0C\u5982 Daily").requiredOption("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").requiredOption("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("--token <token>", "Auth Token").option(
107271
107238
  "--json-out <path>",
107272
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107239
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107273
107240
  void 0
107274
107241
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107275
107242
  await runReportCreate({
@@ -107279,7 +107246,6 @@ function register13(program2) {
107279
107246
  type: opts.type,
107280
107247
  startDate: opts.start,
107281
107248
  endDate: opts.end,
107282
- json: opts.json,
107283
107249
  jsonOut: opts.jsonOut,
107284
107250
  verbose: opts.verbose
107285
107251
  });
@@ -107292,16 +107258,15 @@ function register13(program2) {
107292
107258
  verbose: opts.verbose
107293
107259
  });
107294
107260
  });
107295
- reportCmd.command("meta-overview").description("Meta \u8D26\u6237\u5206\u6790\u603B\u89C8\uFF08OverviewSectionData\uFF0C\u9700 tsoApiBaseUrl \u9274\u6743\uFF09").requiredOption("-a, --account <id>", "Meta \u5E7F\u544A\u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u4E0E --end \u540C\u4F20\u6216\u540C\u7701\u7565\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("--token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
107261
+ reportCmd.command("meta-overview").description("Meta \u8D26\u6237\u5206\u6790\u603B\u89C8\uFF08OverviewSectionData\uFF0C\u9700 tsoApiBaseUrl \u9274\u6743\uFF09").requiredOption("-a, --account <id>", "Meta \u5E7F\u544A\u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u4E0E --end \u540C\u4F20\u6216\u540C\u7701\u7565\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("--token <token>", "Auth Token").option(
107296
107262
  "--json-out <path>",
107297
- "\u843D\u76D8\u76EE\u5F55\u5E76\u66F4\u65B0 report-manifest[-<accountId>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u6587\u4EF6\u540D\u4E3A `<section>[-<accountId>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09"
107263
+ "\u843D\u76D8\u76EE\u5F55\u5E76\u66F4\u65B0 report-manifest[-<accountId>].json\uFF1B\u6587\u4EF6\u540D\u4E3A `<section>[-<accountId>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09"
107298
107264
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107299
107265
  await runReportMetaOverview({
107300
107266
  token: opts.token,
107301
107267
  account: opts.account,
107302
107268
  startDate: opts.start,
107303
107269
  endDate: opts.end,
107304
- json: opts.json,
107305
107270
  jsonOut: opts.jsonOut,
107306
107271
  verbose: opts.verbose
107307
107272
  });
@@ -107309,9 +107274,9 @@ function register13(program2) {
107309
107274
  registerReportTiktokCommands(reportCmd);
107310
107275
  registerReportBingCommands(reportCmd);
107311
107276
  const pushCmd = reportCmd.command("push").description("\u63A8\u9001\u7BA1\u7406\uFF08\u90AE\u4EF6\u62A5\u544A\u63A8\u9001\u4EFB\u52A1\uFF09");
107312
- pushCmd.command("list").description("\u67E5\u8BE2\u63A8\u9001\u4EFB\u52A1\u5217\u8868").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").option("-k, --keyword <text>", "\u63A8\u9001\u540D\u79F0\u5173\u952E\u5B57").option("-t, --type <type>", "\u62A5\u544A\u7C7B\u578B").option("--stopped", "\u53EA\u663E\u793A\u5DF2\u505C\u7528\u7684\u63A8\u9001", false).option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("--token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
107277
+ pushCmd.command("list").description("\u67E5\u8BE2\u63A8\u9001\u4EFB\u52A1\u5217\u8868").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").option("-k, --keyword <text>", "\u63A8\u9001\u540D\u79F0\u5173\u952E\u5B57").option("-t, --type <type>", "\u62A5\u544A\u7C7B\u578B").option("--stopped", "\u53EA\u663E\u793A\u5DF2\u505C\u7528\u7684\u63A8\u9001", false).option("--start <date>", "\u5F00\u59CB\u65E5\u671F").option("--end <date>", "\u7ED3\u675F\u65E5\u671F").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("--token <token>", "Auth Token").option(
107313
107278
  "--json-out <path>",
107314
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107279
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107315
107280
  void 0
107316
107281
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107317
107282
  await runReportPushList({
@@ -107324,7 +107289,6 @@ function register13(program2) {
107324
107289
  endDate: opts.end,
107325
107290
  page: opts.page,
107326
107291
  pageSize: opts.pageSize,
107327
- json: opts.json,
107328
107292
  jsonOut: opts.jsonOut,
107329
107293
  verbose: opts.verbose
107330
107294
  });
@@ -107333,7 +107297,7 @@ function register13(program2) {
107333
107297
  "\u65B0\u5EFA\u63A8\u9001\u914D\u7F6E\uFF08POST /command/report-push/settings/{\u5A92\u4F53}\uFF0C\u4E0E\u7F51\u9875\u300C\u6DFB\u52A0\u63A8\u9001\u300D\u4E00\u81F4\uFF09"
107334
107298
  ).requiredOption("-m, --media <type>", "\u5A92\u4F53\uFF1AGoogle | TikTok").requiredOption("--name <name>", "\u63A8\u9001\u540D\u79F0\uFF08\u5BF9\u5E94 body.Name\uFF09").requiredOption(
107335
107299
  "--media-accounts <ids>",
107336
- "\u5E7F\u544A\u8D26\u6237 entityId\uFF0C\u9017\u53F7\u5206\u9694\uFF08list-accounts --json \u2192 ma.entityId\uFF09",
107300
+ "\u5E7F\u544A\u8D26\u6237 entityId\uFF0C\u9017\u53F7\u5206\u9694\uFF08list-accounts --json-out \u2192 ma.entityId\uFF09",
107337
107301
  splitCsv
107338
107302
  ).requiredOption("--emails <list>", "\u6536\u4EF6\u90AE\u7BB1\uFF0C\u9017\u53F7\u5206\u9694", splitCsv).requiredOption("--types <list>", "\u62A5\u544A\u7C7B\u578B\uFF0C\u9017\u53F7\u5206\u9694\uFF1ADaily | Weekly | Monthly", splitCsv).option("--title <text>", "\u90AE\u4EF6\u6807\u9898\uFF08ReceiveTitle\uFF0C\u53EF\u7A7A\uFF09", "").option("--ai-suggest", "\u4EC5 Google\uFF1AAiSuggest=true", false).option("--token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107339
107303
  await runReportPushCreate({
@@ -107350,7 +107314,7 @@ function register13(program2) {
107350
107314
  });
107351
107315
  pushCmd.command("update").description(
107352
107316
  "\u7F16\u8F91\u63A8\u9001\u914D\u7F6E\uFF08PUT /command/report-push/settings/{\u5A92\u4F53}/{id}\uFF1Bid \u4E0E\u7F51\u9875\u7F16\u8F91\u7528 row.id \u4E00\u81F4\uFF0C\u901A\u5E38\u540C entityId\uFF09"
107353
- ).requiredOption("-m, --media <type>", "\u5A92\u4F53\uFF1AGoogle | TikTok").requiredOption("--id <id>", "\u63A8\u9001\u914D\u7F6E id\uFF08push list --json \u2192 items[].id \u6216 entityId\uFF09").requiredOption("--name <name>", "\u63A8\u9001\u540D\u79F0").requiredOption("--media-accounts <ids>", "\u5E7F\u544A\u8D26\u6237 entityId\uFF0C\u9017\u53F7\u5206\u9694", splitCsv).requiredOption("--emails <list>", "\u6536\u4EF6\u90AE\u7BB1\uFF0C\u9017\u53F7\u5206\u9694", splitCsv).requiredOption("--types <list>", "\u62A5\u544A\u7C7B\u578B\uFF0C\u9017\u53F7\u5206\u9694\uFF1ADaily | Weekly | Monthly", splitCsv).option("--title <text>", "\u90AE\u4EF6\u6807\u9898", "").option("--ai-suggest", "\u4EC5 Google\uFF1AAiSuggest=true", false).option("--token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107317
+ ).requiredOption("-m, --media <type>", "\u5A92\u4F53\uFF1AGoogle | TikTok").requiredOption("--id <id>", "\u63A8\u9001\u914D\u7F6E id\uFF08push list --json-out \u2192 items[].id \u6216 entityId\uFF09").requiredOption("--name <name>", "\u63A8\u9001\u540D\u79F0").requiredOption("--media-accounts <ids>", "\u5E7F\u544A\u8D26\u6237 entityId\uFF0C\u9017\u53F7\u5206\u9694", splitCsv).requiredOption("--emails <list>", "\u6536\u4EF6\u90AE\u7BB1\uFF0C\u9017\u53F7\u5206\u9694", splitCsv).requiredOption("--types <list>", "\u62A5\u544A\u7C7B\u578B\uFF0C\u9017\u53F7\u5206\u9694\uFF1ADaily | Weekly | Monthly", splitCsv).option("--title <text>", "\u90AE\u4EF6\u6807\u9898", "").option("--ai-suggest", "\u4EC5 Google\uFF1AAiSuggest=true", false).option("--token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107354
107318
  await runReportPushUpdate({
107355
107319
  token: opts.token,
107356
107320
  media: opts.media,
@@ -107369,9 +107333,9 @@ function register13(program2) {
107369
107333
  ).requiredOption("-m, --media <type>", "\u5A92\u4F53\uFF1AGoogle | TikTok").requiredOption(
107370
107334
  "--setting-id <id>",
107371
107335
  "\u63A8\u9001\u89C4\u5219 id\uFF08\u4E0E push list \u7684 entityId \u4E00\u81F4\uFF1B\u7F51\u9875\u8DEF\u7531 entityId\uFF09"
107372
- ).option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("--start <date>", "\u7B5B\u9009\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7B5B\u9009\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("--receive-email <email>", "\u7B5B\u9009\u6536\u4EF6\u90AE\u7BB1").option("--report-type <type>", "\u7B5B\u9009\u62A5\u544A\u7C7B\u578B").option("--media-account-id <entityId>", "\u7B5B\u9009\u8D26\u6237\uFF08\u4F20\u8D26\u6237 entityId\uFF09").option("--token <token>", "Auth Token").option("--json", "JSON \u8F93\u51FA", false).option(
107336
+ ).option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("--start <date>", "\u7B5B\u9009\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7B5B\u9009\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("--receive-email <email>", "\u7B5B\u9009\u6536\u4EF6\u90AE\u7BB1").option("--report-type <type>", "\u7B5B\u9009\u62A5\u544A\u7C7B\u578B").option("--media-account-id <entityId>", "\u7B5B\u9009\u8D26\u6237\uFF08\u4F20\u8D26\u6237 entityId\uFF09").option("--token <token>", "Auth Token").option(
107373
107337
  "--json-out <path>",
107374
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107338
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107375
107339
  void 0
107376
107340
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107377
107341
  await runReportPushHistory({
@@ -107385,22 +107349,20 @@ function register13(program2) {
107385
107349
  receiveEmail: opts.receiveEmail,
107386
107350
  reportType: opts.reportType,
107387
107351
  mediaAccountId: opts.mediaAccountId,
107388
- json: opts.json,
107389
107352
  jsonOut: opts.jsonOut,
107390
107353
  verbose: opts.verbose
107391
107354
  });
107392
107355
  });
107393
107356
  pushCmd.command("receive-emails").description(
107394
107357
  "\u67E5\u8BE2\u63A8\u9001\u66FE\u7528\u8FC7\u7684\u6536\u4EF6\u90AE\u7BB1\u5217\u8868\uFF08GET /query/report-push/settings/{\u5A92\u4F53}/all/receive-emails\uFF0C\u4E0E\u7F51\u9875\u4E0B\u62C9\u4E00\u81F4\uFF09"
107395
- ).requiredOption("-m, --media <type>", "\u5A92\u4F53\uFF1AGoogle | TikTok").option("--token <token>", "Auth Token").option("--json", "\u4EC5\u8F93\u51FA JSON \u6570\u7EC4", false).option(
107358
+ ).requiredOption("-m, --media <type>", "\u5A92\u4F53\uFF1AGoogle | TikTok").option("--token <token>", "Auth Token").option(
107396
107359
  "--json-out <path>",
107397
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107360
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107398
107361
  void 0
107399
107362
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107400
107363
  await runReportPushReceiveEmails({
107401
107364
  token: opts.token,
107402
107365
  media: opts.media,
107403
- json: opts.json,
107404
107366
  jsonOut: opts.jsonOut,
107405
107367
  verbose: opts.verbose
107406
107368
  });
@@ -107581,9 +107543,9 @@ async function runTransferList(opts) {
107581
107543
  }
107582
107544
  function register14(program2) {
107583
107545
  const transferCmd = program2.command("transfer").description("\u5A92\u4F53\u8D26\u6237\u8F6C\u8D26\uFF1A\u63D0\u4EA4\u8F6C\u8D26\u7533\u8BF7\u6216\u67E5\u8BE2\u8F6C\u8D26\u8BB0\u5F55");
107584
- transferCmd.command("create").description("\u63D0\u4EA4\u8D26\u6237\u95F4\u8F6C\u8D26\u7533\u8BF7\uFF08Google / TikTok / MetaAd / BingV2\uFF09").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok | MetaAd | BingV2").requiredOption("--out <id>", "\u8F6C\u51FA\u8D26\u6237 mediaCustomerId\uFF08\u6765\u81EA list-accounts\uFF09").requiredOption("--in <id>", "\u8F6C\u5165\u8D26\u6237 mediaCustomerId\uFF08\u6765\u81EA list-accounts\uFF09").requiredOption("--amount <amount>", "\u8F6C\u8D26\u91D1\u989D\uFF08\u4E0E\u8D26\u6237\u8D27\u5E01\u5355\u4F4D\u4E00\u81F4\uFF09").option("--customer-name <name>", "\u5BA2\u6237\u540D\u79F0\uFF08\u5907\u6CE8\uFF0C\u53EF\u9009\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
107546
+ transferCmd.command("create").description("\u63D0\u4EA4\u8D26\u6237\u95F4\u8F6C\u8D26\u7533\u8BF7\uFF08Google / TikTok / MetaAd / BingV2\uFF09").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok | MetaAd | BingV2").requiredOption("--out <id>", "\u8F6C\u51FA\u8D26\u6237 mediaCustomerId\uFF08\u6765\u81EA list-accounts\uFF09").requiredOption("--in <id>", "\u8F6C\u5165\u8D26\u6237 mediaCustomerId\uFF08\u6765\u81EA list-accounts\uFF09").requiredOption("--amount <amount>", "\u8F6C\u8D26\u91D1\u989D\uFF08\u4E0E\u8D26\u6237\u8D27\u5E01\u5355\u4F4D\u4E00\u81F4\uFF09").option("--customer-name <name>", "\u5BA2\u6237\u540D\u79F0\uFF08\u5907\u6CE8\uFF0C\u53EF\u9009\uFF09").option("-t, --token <token>", "Auth Token").option(
107585
107547
  "--json-out <path>",
107586
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107548
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107587
107549
  void 0
107588
107550
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107589
107551
  await runTransferCreate({
@@ -107593,14 +107555,13 @@ function register14(program2) {
107593
107555
  inAccount: opts.in,
107594
107556
  amount: opts.amount,
107595
107557
  customerName: opts.customerName,
107596
- json: opts.json,
107597
107558
  jsonOut: opts.jsonOut,
107598
107559
  verbose: opts.verbose
107599
107560
  });
107600
107561
  });
107601
- transferCmd.command("list").description("\u67E5\u8BE2\u5A92\u4F53\u8D26\u6237\u8F6C\u8D26\u8BB0\u5F55").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok | MetaAd | BingV2").option("-n, --number <no>", "\u8F6C\u8D26\u5355\u53F7").option("-s, --status <status>", "\u5230\u8D26\u72B6\u6001\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
107562
+ transferCmd.command("list").description("\u67E5\u8BE2\u5A92\u4F53\u8D26\u6237\u8F6C\u8D26\u8BB0\u5F55").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok | MetaAd | BingV2").option("-n, --number <no>", "\u8F6C\u8D26\u5355\u53F7").option("-s, --status <status>", "\u5230\u8D26\u72B6\u6001\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option(
107602
107563
  "--json-out <path>",
107603
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107564
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107604
107565
  void 0
107605
107566
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
107606
107567
  await runTransferList({
@@ -107612,7 +107573,6 @@ function register14(program2) {
107612
107573
  endDate: opts.end,
107613
107574
  page: opts.page,
107614
107575
  pageSize: opts.pageSize,
107615
- json: opts.json,
107616
107576
  jsonOut: opts.jsonOut,
107617
107577
  verbose: opts.verbose
107618
107578
  });
@@ -108028,9 +107988,9 @@ async function runInvoiceApply(opts) {
108028
107988
  // src/commands/invoice/_register.ts
108029
107989
  function register15(program2) {
108030
107990
  const invoiceCmd = program2.command("invoice").description("\u5F00\u7968\u8BB0\u5F55\u4E0E\u5F00\u7968\u7533\u8BF7\uFF0C\u4E0D\u652F\u6301\u8D26\u6237\u6FC0\u6D3B\u5145\u503C\u8BA2\u5355\u7684\u5F00\u7968\uFF0C\u5982\u9700\u5F00\u7968\u8BF7\u8054\u7CFB\u7EBF\u4E0B\u8FD0\u8425");
108031
- invoiceCmd.command("list").description("\u67E5\u8BE2\u5F00\u7968\u7533\u8BF7\u8BB0\u5F55").option("-k, --keyword <text>", "\u53D1\u7968\u53F7\u6216\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
107991
+ invoiceCmd.command("list").description("\u67E5\u8BE2\u5F00\u7968\u7533\u8BF7\u8BB0\u5F55").option("-k, --keyword <text>", "\u53D1\u7968\u53F7\u6216\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option(
108032
107992
  "--json-out <path>",
108033
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
107993
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108034
107994
  void 0
108035
107995
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
108036
107996
  await runInvoiceList({
@@ -108040,15 +108000,14 @@ function register15(program2) {
108040
108000
  endDate: opts.end,
108041
108001
  page: opts.page,
108042
108002
  pageSize: opts.pageSize,
108043
- json: opts.json,
108044
108003
  jsonOut: opts.jsonOut,
108045
108004
  verbose: opts.verbose
108046
108005
  });
108047
108006
  console.log("\u5F00\u7968\u8BB0\u5F55\u4E0E\u5F00\u7968\u7533\u8BF7\uFF0C\u4E0D\u652F\u6301\u8D26\u6237\u6FC0\u6D3B\u5145\u503C\u8BA2\u5355\uFF0C\u5982\u9700\u5F00\u7968\u8BF7\u8054\u7CFB\u7EBF\u4E0B\u8FD0\u8425");
108048
108007
  });
108049
- invoiceCmd.command("billable").description("\u67E5\u8BE2\u53EF\u5F00\u7968\u8BA2\u5355\u5217\u8868").option("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B").option("-c, --currency <code>", "\u5E01\u79CD\uFF0C\u5982 USD / CNY").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("--wallet", "\u67E5\u8BE2\u94B1\u5305\u5145\u503C\u53EF\u5F00\u7968\u8BB0\u5F55", false).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
108008
+ invoiceCmd.command("billable").description("\u67E5\u8BE2\u53EF\u5F00\u7968\u8BA2\u5355\u5217\u8868").option("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B").option("-c, --currency <code>", "\u5E01\u79CD\uFF0C\u5982 USD / CNY").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("--wallet", "\u67E5\u8BE2\u94B1\u5305\u5145\u503C\u53EF\u5F00\u7968\u8BB0\u5F55", false).option("-t, --token <token>", "Auth Token").option(
108050
108009
  "--json-out <path>",
108051
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108010
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108052
108011
  void 0
108053
108012
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
108054
108013
  await runInvoiceBillable({
@@ -108060,7 +108019,6 @@ function register15(program2) {
108060
108019
  page: opts.page,
108061
108020
  pageSize: opts.pageSize,
108062
108021
  wallet: opts.wallet,
108063
- json: opts.json,
108064
108022
  jsonOut: opts.jsonOut,
108065
108023
  verbose: opts.verbose
108066
108024
  });
@@ -108078,9 +108036,9 @@ function register15(program2) {
108078
108036
  "--skip-currency-check",
108079
108037
  "\u8DF3\u8FC7\u5E01\u79CD\u4E0E\u53D1\u7968\u7C7B\u578B\u6821\u9A8C\uFF08\u65E0\u6CD5\u4ECE\u53EF\u5F00\u7968\u5217\u8868\u89E3\u6790 entityId \u65F6\u4F7F\u7528\uFF0C\u9700\u81EA\u884C\u4FDD\u8BC1\u4E0E Web \u89C4\u5219\u4E00\u81F4\uFF09",
108080
108038
  false
108081
- ).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
108039
+ ).option("-t, --token <token>", "Auth Token").option(
108082
108040
  "--json-out <path>",
108083
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108041
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108084
108042
  void 0
108085
108043
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
108086
108044
  await runInvoiceApply({
@@ -108099,7 +108057,6 @@ function register15(program2) {
108099
108057
  companyPhone: opts.companyPhone,
108100
108058
  mediaType: opts.media,
108101
108059
  skipCurrencyCheck: opts.skipCurrencyCheck,
108102
- json: opts.json,
108103
108060
  jsonOut: opts.jsonOut,
108104
108061
  verbose: opts.verbose
108105
108062
  });
@@ -108302,9 +108259,9 @@ async function runInvoiceInfoDelete(opts) {
108302
108259
  }
108303
108260
  function register16(program2) {
108304
108261
  const invoiceInfoCmd = program2.command("invoice-info").description("\u53D1\u7968\u62AC\u5934\u7BA1\u7406\uFF08\u5BF9\u5E94\u300C\u8BBE\u7F6E \u2192 \u53D1\u7968\u62AC\u5934\u300D\u9875\u9762\uFF09");
108305
- invoiceInfoCmd.command("list").description("\u67E5\u8BE2\u5DF2\u4FDD\u5B58\u7684\u53D1\u7968\u62AC\u5934\u5217\u8868").option("-k, --keyword <text>", "\u6309\u516C\u53F8\u540D\u79F0\u641C\u7D22").option("--invoice-type <type>", "\u6309\u53D1\u7968\u7C7B\u578B\u7B5B\u9009\uFF1API | VATI | VATSI").option("--page <n>", "\u9875\u7801", (v) => parseInt(v), 1).option("--page-size <n>", "\u6BCF\u9875\u6761\u6570", (v) => parseInt(v), 20).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
108262
+ invoiceInfoCmd.command("list").description("\u67E5\u8BE2\u5DF2\u4FDD\u5B58\u7684\u53D1\u7968\u62AC\u5934\u5217\u8868").option("-k, --keyword <text>", "\u6309\u516C\u53F8\u540D\u79F0\u641C\u7D22").option("--invoice-type <type>", "\u6309\u53D1\u7968\u7C7B\u578B\u7B5B\u9009\uFF1API | VATI | VATSI").option("--page <n>", "\u9875\u7801", (v) => parseInt(v), 1).option("--page-size <n>", "\u6BCF\u9875\u6761\u6570", (v) => parseInt(v), 20).option("-t, --token <token>", "Auth Token").option(
108306
108263
  "--json-out <path>",
108307
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108264
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108308
108265
  void 0
108309
108266
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
108310
108267
  await runInvoiceInfoList({
@@ -108313,7 +108270,6 @@ function register16(program2) {
108313
108270
  invoiceType: opts.invoiceType,
108314
108271
  page: opts.page,
108315
108272
  pageSize: opts.pageSize,
108316
- json: opts.json,
108317
108273
  jsonOut: opts.jsonOut,
108318
108274
  verbose: opts.verbose
108319
108275
  });
@@ -108321,9 +108277,9 @@ function register16(program2) {
108321
108277
  invoiceInfoCmd.command("create").description("\u65B0\u589E\u53D1\u7968\u62AC\u5934").requiredOption(
108322
108278
  "--invoice-type <type>",
108323
108279
  "\u53D1\u7968\u7C7B\u578B\uFF1API\uFF08\u5F62\u5F0F\u53D1\u7968\uFF09| VATI\uFF08\u589E\u503C\u7A0E\u666E\u7968\uFF09| VATSI\uFF08\u589E\u503C\u7A0E\u4E13\u7968\uFF09"
108324
- ).requiredOption("--company-name <name>", "\u516C\u53F8\u540D\u79F0\uFF08PI \u7C7B\u578B\u4E3A\u82F1\u6587\uFF0CVATI/VATSI \u4E3A\u4E2D\u6587\uFF09").requiredOption("--contact <name>", "\u8054\u7CFB\u4EBA\u59D3\u540D").requiredOption("--phone <phone>", "\u8054\u7CFB\u4EBA\u624B\u673A\u53F7").option("--registered-address <addr>", "\u82F1\u6587\u6CE8\u518C\u5730\u5740\uFF08PI \u7C7B\u578B\u5FC5\u586B\uFF09").option("--tax-id <id>", "\u7A0E\u53F7\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--title <title>", "\u53D1\u7968\u62AC\u5934\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--landline <phone>", "\u5EA7\u673A\u53F7\u7801\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--email <email>", "\u63A8\u9001\u90AE\u7BB1").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
108280
+ ).requiredOption("--company-name <name>", "\u516C\u53F8\u540D\u79F0\uFF08PI \u7C7B\u578B\u4E3A\u82F1\u6587\uFF0CVATI/VATSI \u4E3A\u4E2D\u6587\uFF09").requiredOption("--contact <name>", "\u8054\u7CFB\u4EBA\u59D3\u540D").requiredOption("--phone <phone>", "\u8054\u7CFB\u4EBA\u624B\u673A\u53F7").option("--registered-address <addr>", "\u82F1\u6587\u6CE8\u518C\u5730\u5740\uFF08PI \u7C7B\u578B\u5FC5\u586B\uFF09").option("--tax-id <id>", "\u7A0E\u53F7\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--title <title>", "\u53D1\u7968\u62AC\u5934\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--landline <phone>", "\u5EA7\u673A\u53F7\u7801\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--email <email>", "\u63A8\u9001\u90AE\u7BB1").option("-t, --token <token>", "Auth Token").option(
108325
108281
  "--json-out <path>",
108326
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108282
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108327
108283
  void 0
108328
108284
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
108329
108285
  await runInvoiceInfoCreate({
@@ -108337,14 +108293,13 @@ function register16(program2) {
108337
108293
  contact: opts.contact,
108338
108294
  phone: opts.phone,
108339
108295
  email: opts.email,
108340
- json: opts.json,
108341
108296
  jsonOut: opts.jsonOut,
108342
108297
  verbose: opts.verbose
108343
108298
  });
108344
108299
  });
108345
- invoiceInfoCmd.command("update <id>").description("\u66F4\u65B0\u53D1\u7968\u62AC\u5934\uFF08id \u6765\u81EA invoice-info list\uFF09").requiredOption("--invoice-type <type>", "\u53D1\u7968\u7C7B\u578B\uFF1API | VATI | VATSI").requiredOption("--company-name <name>", "\u516C\u53F8\u540D\u79F0").requiredOption("--contact <name>", "\u8054\u7CFB\u4EBA\u59D3\u540D").requiredOption("--phone <phone>", "\u8054\u7CFB\u4EBA\u624B\u673A\u53F7").option("--registered-address <addr>", "\u82F1\u6587\u6CE8\u518C\u5730\u5740\uFF08PI \u7C7B\u578B\u5FC5\u586B\uFF09").option("--tax-id <id>", "\u7A0E\u53F7\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--title <title>", "\u53D1\u7968\u62AC\u5934\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--landline <phone>", "\u5EA7\u673A\u53F7\u7801\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--email <email>", "\u63A8\u9001\u90AE\u7BB1").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
108300
+ invoiceInfoCmd.command("update <id>").description("\u66F4\u65B0\u53D1\u7968\u62AC\u5934\uFF08id \u6765\u81EA invoice-info list\uFF09").requiredOption("--invoice-type <type>", "\u53D1\u7968\u7C7B\u578B\uFF1API | VATI | VATSI").requiredOption("--company-name <name>", "\u516C\u53F8\u540D\u79F0").requiredOption("--contact <name>", "\u8054\u7CFB\u4EBA\u59D3\u540D").requiredOption("--phone <phone>", "\u8054\u7CFB\u4EBA\u624B\u673A\u53F7").option("--registered-address <addr>", "\u82F1\u6587\u6CE8\u518C\u5730\u5740\uFF08PI \u7C7B\u578B\u5FC5\u586B\uFF09").option("--tax-id <id>", "\u7A0E\u53F7\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--title <title>", "\u53D1\u7968\u62AC\u5934\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--landline <phone>", "\u5EA7\u673A\u53F7\u7801\uFF08VATI/VATSI \u5FC5\u586B\uFF09").option("--email <email>", "\u63A8\u9001\u90AE\u7BB1").option("-t, --token <token>", "Auth Token").option(
108346
108301
  "--json-out <path>",
108347
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108302
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108348
108303
  void 0
108349
108304
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (id, opts) => {
108350
108305
  await runInvoiceInfoUpdate({
@@ -108359,7 +108314,6 @@ function register16(program2) {
108359
108314
  contact: opts.contact,
108360
108315
  phone: opts.phone,
108361
108316
  email: opts.email,
108362
- json: opts.json,
108363
108317
  jsonOut: opts.jsonOut,
108364
108318
  verbose: opts.verbose
108365
108319
  });
@@ -108655,10 +108609,10 @@ function register17(program2) {
108655
108609
  const optimizeCmd = program2.command("optimize").description("AI \u5E7F\u544A\u4F18\u5316\uFF08Google\uFF09");
108656
108610
  optimizeCmd.command("list").description("\u67E5\u8BE2\u8D26\u6237\u7EA7\u4F18\u5316\u4E3B\u5217\u8868\uFF08\u5BF9\u5E94\u9875\u9762 /advertising/intelligentOptimization\uFF09").option("-a, --account <id>", "\u8D26\u6237 mediaCustomerId\uFF08\u7559\u7A7A\u67E5\u5168\u90E8\uFF09").option(
108657
108611
  "--match-media-customer-id <id>",
108658
- "\u5728\u5168\u91CF\u5217\u8868\u4E2D\u7B5B\u9009\u8BE5 Google \u5BA2\u6237 ID\uFF08\u81EA\u52A8\u7FFB\u9875\uFF1B\u5DF2\u8131\u7BA1\u52FF\u7528 -a\uFF0C\u89C1 optimize.md\uFF09"
108659
- ).option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
108612
+ "\u5728\u5168\u91CF\u5217\u8868\u4E2D\u7B5B\u9009\u8BE5 Google \u5BA2\u6237 ID\uFF08\u81EA\u52A8\u7FFB\u9875\uFF1B\u5DF2\u8131\u7BA1\u52FF\u7528 -a\uFF0C\u89C1 operations/optimize.md\uFF09"
108613
+ ).option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option(
108660
108614
  "--json-out <path>",
108661
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108615
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108662
108616
  void 0
108663
108617
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
108664
108618
  await runOptimizeList({
@@ -108669,14 +108623,13 @@ function register17(program2) {
108669
108623
  endDate: opts.end,
108670
108624
  page: opts.page,
108671
108625
  pageSize: opts.pageSize,
108672
- json: opts.json,
108673
108626
  jsonOut: opts.jsonOut,
108674
108627
  verbose: opts.verbose
108675
108628
  });
108676
108629
  });
108677
- optimizeCmd.command("records").description("\u67E5\u8BE2\u4F18\u5316\u8BB0\u5F55\u5217\u8868\uFF08\u5BF9\u5E94\u9875\u9762 /advertising/intelligentOptimizationRecords\uFF09").option("-a, --account <id>", "\u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
108630
+ optimizeCmd.command("records").description("\u67E5\u8BE2\u4F18\u5316\u8BB0\u5F55\u5217\u8868\uFF08\u5BF9\u5E94\u9875\u9762 /advertising/intelligentOptimizationRecords\uFF09").option("-a, --account <id>", "\u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option(
108678
108631
  "--json-out <path>",
108679
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108632
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108680
108633
  void 0
108681
108634
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
108682
108635
  await runOptimizeRecords({
@@ -108686,19 +108639,18 @@ function register17(program2) {
108686
108639
  endDate: opts.end,
108687
108640
  page: opts.page,
108688
108641
  pageSize: opts.pageSize,
108689
- json: opts.json,
108690
108642
  jsonOut: opts.jsonOut,
108691
108643
  verbose: opts.verbose
108692
108644
  });
108693
108645
  });
108694
108646
  optimizeCmd.command("get").description(
108695
- "\u83B7\u53D6\u5355\u6761\u4F18\u5316\u8BE6\u60C5\uFF08GET /Smart-Ads-Optimize/v2/{id}\uFF09\u3002--id \u53EF\u53D6 optimize list --json \u7684\u8D26\u6237\u6279\u6B21 items[].id\uFF0C\u6216 optimize records --json \u7684\u7CFB\u5217\u7EA7 items[].id"
108647
+ "\u83B7\u53D6\u5355\u6761\u4F18\u5316\u8BE6\u60C5\uFF08GET /Smart-Ads-Optimize/v2/{id}\uFF09\u3002--id \u53EF\u53D6 optimize list --json-out \u7684\u8D26\u6237\u6279\u6B21 items[].id\uFF0C\u6216 optimize records --json-out \u7684\u7CFB\u5217\u7EA7 items[].id"
108696
108648
  ).requiredOption("--id <id>", "\u4F18\u5316\u8BB0\u5F55 ID\uFF08UUID\uFF0C\u4E0E\u5217\u8868\u9879 id \u4E00\u81F4\uFF09").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
108697
108649
  await runOptimizeGet({ token: opts.token, id: opts.id, verbose: opts.verbose });
108698
108650
  });
108699
- optimizeCmd.command("children").description("\u67E5\u8BE2\u5355\u6B21\u4F18\u5316\u7684\u5E7F\u544A\u7CFB\u5217\u7EA7\u660E\u7EC6").requiredOption("--parent-id <id>", "\u4F18\u5316\u4E3B\u8BB0\u5F55 ID").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
108651
+ optimizeCmd.command("children").description("\u67E5\u8BE2\u5355\u6B21\u4F18\u5316\u7684\u5E7F\u544A\u7CFB\u5217\u7EA7\u660E\u7EC6").requiredOption("--parent-id <id>", "\u4F18\u5316\u4E3B\u8BB0\u5F55 ID").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option(
108700
108652
  "--json-out <path>",
108701
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108653
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
108702
108654
  void 0
108703
108655
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
108704
108656
  await runOptimizeChildren({
@@ -108706,7 +108658,6 @@ function register17(program2) {
108706
108658
  parentId: opts.parentId,
108707
108659
  page: opts.page,
108708
108660
  pageSize: opts.pageSize,
108709
- json: opts.json,
108710
108661
  jsonOut: opts.jsonOut,
108711
108662
  verbose: opts.verbose
108712
108663
  });
@@ -109102,9 +109053,9 @@ async function runForewarningCreate(opts) {
109102
109053
  // src/commands/forewarning/_register.ts
109103
109054
  function register18(program2) {
109104
109055
  const forewarningCmd = program2.command("forewarning").description("\u667A\u80FD\u9884\u8B66\u89C4\u5219\u4E0E\u9884\u8B66\u8BB0\u5F55\u7BA1\u7406");
109105
- forewarningCmd.command("list").description("\u67E5\u8BE2\u9884\u8B66\u89C4\u5219\u5217\u8868").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").option("-a, --account <id>", "\u8D26\u6237 ID \u7B5B\u9009").option("-k, --keyword <text>", "\u89C4\u5219\u540D\u79F0\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
109056
+ forewarningCmd.command("list").description("\u67E5\u8BE2\u9884\u8B66\u89C4\u5219\u5217\u8868").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").option("-a, --account <id>", "\u8D26\u6237 ID \u7B5B\u9009").option("-k, --keyword <text>", "\u89C4\u5219\u540D\u79F0\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option(
109106
109057
  "--json-out <path>",
109107
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
109058
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
109108
109059
  void 0
109109
109060
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
109110
109061
  await runForewarningList({
@@ -109116,14 +109067,13 @@ function register18(program2) {
109116
109067
  endDate: opts.end,
109117
109068
  page: opts.page,
109118
109069
  pageSize: opts.pageSize,
109119
- json: opts.json,
109120
109070
  jsonOut: opts.jsonOut,
109121
109071
  verbose: opts.verbose
109122
109072
  });
109123
109073
  });
109124
- forewarningCmd.command("records").description("\u67E5\u8BE2\u9884\u8B66\u89E6\u53D1\u8BB0\u5F55").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").option("-r, --rule-id <id>", "\u89C4\u5219 ID\uFF08\u7559\u7A7A\u67E5\u5168\u90E8\u89C4\u5219\uFF09").option("-s, --status <result>", "\u6267\u884C\u7ED3\u679C\u7B5B\u9009").option("-a, --account <id>", "\u8D26\u6237 ID \u7B5B\u9009").option("-k, --keyword <text>", "\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
109074
+ forewarningCmd.command("records").description("\u67E5\u8BE2\u9884\u8B66\u89E6\u53D1\u8BB0\u5F55").requiredOption("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1AGoogle | TikTok").option("-r, --rule-id <id>", "\u89C4\u5219 ID\uFF08\u7559\u7A7A\u67E5\u5168\u90E8\u89C4\u5219\uFF09").option("-s, --status <result>", "\u6267\u884C\u7ED3\u679C\u7B5B\u9009").option("-a, --account <id>", "\u8D26\u6237 ID \u7B5B\u9009").option("-k, --keyword <text>", "\u5173\u952E\u5B57").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option(
109125
109075
  "--json-out <path>",
109126
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
109076
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
109127
109077
  void 0
109128
109078
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
109129
109079
  await runForewarningRecords({
@@ -109137,7 +109087,6 @@ function register18(program2) {
109137
109087
  endDate: opts.end,
109138
109088
  page: opts.page,
109139
109089
  pageSize: opts.pageSize,
109140
- json: opts.json,
109141
109090
  jsonOut: opts.jsonOut,
109142
109091
  verbose: opts.verbose
109143
109092
  });
@@ -109174,15 +109123,14 @@ function register18(program2) {
109174
109123
  verbose: opts.verbose
109175
109124
  });
109176
109125
  });
109177
- forewarningCmd.command("notify-accounts").description("\u67E5\u8BE2\u53EF\u63A5\u6536\u9884\u8B66\u901A\u77E5\u7684\u5FAE\u4FE1\u8D26\u6237\u5217\u8868\uFF08\u9700\u5148\u5173\u6CE8\u4E1D\u8DEF\u8D5E\u5E73\u53F0\u670D\u52A1\u53F7\uFF09").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
109126
+ forewarningCmd.command("notify-accounts").description("\u67E5\u8BE2\u53EF\u63A5\u6536\u9884\u8B66\u901A\u77E5\u7684\u5FAE\u4FE1\u8D26\u6237\u5217\u8868\uFF08\u9700\u5148\u5173\u6CE8\u4E1D\u8DEF\u8D5E\u5E73\u53F0\u670D\u52A1\u53F7\uFF09").option(
109178
109127
  "--json-out <path>",
109179
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
109128
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
109180
109129
  void 0
109181
109130
  ).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
109182
109131
  async (opts) => {
109183
109132
  await runForewarningNotifyAccounts({
109184
109133
  token: opts.token,
109185
- json: opts.json,
109186
109134
  jsonOut: opts.jsonOut,
109187
109135
  verbose: opts.verbose
109188
109136
  });
@@ -109396,9 +109344,9 @@ Meta \u7EBF\u7D22\u8868\u5355\uFF08\u8D26\u6237 ${opts.account}\uFF0C\u7B2C 1 \u
109396
109344
  }
109397
109345
  }
109398
109346
  function register19(program2) {
109399
- program2.command("clue").description("\u67E5\u8BE2\u5E7F\u544A\u7EBF\u7D22\u8868\u5355\u6570\u636E\uFF08TikTok / Meta\uFF09").option("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1ATikTok | Meta", "TikTok").requiredOption("-a, --account <id>", "\u5E7F\u544A\u8D26\u6237 mediaCustomerId").option("--region <region>", "TikTok \u533A\u57DF\uFF1Aeu | us | other | ALL\uFF08\u9ED8\u8BA4 ALL\uFF09").option("--start <date>", "Meta \u5F00\u59CB\u65E5\u671F\uFF08YYYY-MM-DD\uFF09").option("--end <date>", "Meta \u7ED3\u675F\u65E5\u671F\uFF08YYYY-MM-DD\uFF09").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
109347
+ program2.command("clue").description("\u67E5\u8BE2\u5E7F\u544A\u7EBF\u7D22\u8868\u5355\u6570\u636E\uFF08TikTok / Meta\uFF09").option("-m, --media <type>", "\u5A92\u4F53\u7C7B\u578B\uFF1ATikTok | Meta", "TikTok").requiredOption("-a, --account <id>", "\u5E7F\u544A\u8D26\u6237 mediaCustomerId").option("--region <region>", "TikTok \u533A\u57DF\uFF1Aeu | us | other | ALL\uFF08\u9ED8\u8BA4 ALL\uFF09").option("--start <date>", "Meta \u5F00\u59CB\u65E5\u671F\uFF08YYYY-MM-DD\uFF09").option("--end <date>", "Meta \u7ED3\u675F\u65E5\u671F\uFF08YYYY-MM-DD\uFF09").option(
109400
109348
  "--json-out <path>",
109401
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
109349
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
109402
109350
  void 0
109403
109351
  ).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
109404
109352
  await runClueList({
@@ -109408,7 +109356,6 @@ function register19(program2) {
109408
109356
  region: opts.region,
109409
109357
  startDate: opts.start,
109410
109358
  endDate: opts.end,
109411
- json: opts.json,
109412
109359
  jsonOut: opts.jsonOut,
109413
109360
  verbose: opts.verbose
109414
109361
  });
@@ -109499,12 +109446,16 @@ init_cli_table();
109499
109446
  function pushLengthViolation(violations, item) {
109500
109447
  violations.push({ ...item, excess: item.actual - item.limit });
109501
109448
  }
109502
- function formatLengthViolationsReport(violations) {
109449
+ function lengthViolationAgentHint(revalidateCommand = "campaign-validate") {
109450
+ return `\u52FF\u81EA\u52A8\u622A\u65AD JSON\u3002\u8BFB\u53D6\u843D\u76D8 JSON \u7684 lengthViolations\uFF0C\u5C06\u5168\u90E8\u6761\u76EE\u4E0E\u4FEE\u6539\u65B9\u6848\u5217\u7ED9\u7528\u6237\uFF0C\u786E\u8BA4\u540E\u5199\u5165\u914D\u7F6E\u5E76\u91CD\u65B0 ${revalidateCommand}\u3002`;
109451
+ }
109452
+ function formatLengthViolationsReport(violations, opts) {
109503
109453
  if (violations.length === 0) return "";
109454
+ const cmd = opts?.revalidateCommand ?? "campaign-validate";
109504
109455
  const lines = [
109505
109456
  "",
109506
109457
  `\u{1F4CF} \u8D85\u957F\u5185\u5BB9\u6E05\u5355\uFF08\u5171 ${violations.length} \u9879\uFF09`,
109507
- " \u8BF7\u52FF\u5728 JSON \u4E2D\u81EA\u52A8\u622A\u65AD\uFF1B\u8BF7\u5C06\u5168\u90E8\u6761\u76EE\u4E0E\u4FEE\u6539\u65B9\u6848\u5217\u7ED9\u7528\u6237\uFF0C\u786E\u8BA4\u540E\u518D\u6539 JSON \u5E76\u91CD\u65B0 campaign-validate\u3002",
109458
+ ` \u8BF7\u52FF\u5728 JSON \u4E2D\u81EA\u52A8\u622A\u65AD\uFF1B\u8BF7\u5C06\u5168\u90E8\u6761\u76EE\u4E0E\u4FEE\u6539\u65B9\u6848\u5217\u7ED9\u7528\u6237\uFF0C\u786E\u8BA4\u540E\u518D\u6539 JSON \u5E76\u91CD\u65B0 ${cmd}\u3002`,
109508
109459
  ""
109509
109460
  ];
109510
109461
  for (let i = 0; i < violations.length; i++) {
@@ -111420,7 +111371,7 @@ async function runAdCampaignCreate(opts) {
111420
111371
  ` 2. \u6210\u529F\u6216\u90E8\u5206\u6210\u529F\u540E\u6BD4\u5BF9\uFF1Asiluzan-tso ad batch diff --batch-id ${String(taskId)} --config-file ${opts.configFile}`
111421
111372
  );
111422
111373
  console.log(
111423
- ` \u53EF\u52A0 --campaign-id <id>\uFF08ad campaigns -a ${cfg.account} --json\uFF09\uFF1B\u5168\u90E8\u5931\u8D25\u5219\u53EA\u770B get \u7684 reason/errors \u540E\u6539 JSON \u91CD\u63D0`
111374
+ ` \u53EF\u52A0 --campaign-id <id>\uFF08ad campaigns -a ${cfg.account} --json-out ./snap\uFF09\uFF1B\u5168\u90E8\u5931\u8D25\u5219\u53EA\u770B get \u7684 reason/errors \u540E\u6539 JSON \u91CD\u63D0`
111424
111375
  );
111425
111376
  }
111426
111377
  console.log();
@@ -111447,10 +111398,6 @@ async function runAdCampaignBiddingStrategies(opts) {
111447
111398
  }
111448
111399
  return row;
111449
111400
  });
111450
- if (opts.json) {
111451
- console.log(JSON.stringify(items, null, 2));
111452
- return;
111453
- }
111454
111401
  console.log("\n\u7F51\u5173\u652F\u6301\u7684\u51FA\u4EF7\u7B56\u7565\uFF08campaignmanagement/biddingStrategyList\uFF09\uFF1A\n");
111455
111402
  for (const item of items) {
111456
111403
  console.log(` ${String(item.strategy ?? "")} (${item.code ?? "?"})`);
@@ -113371,7 +113318,7 @@ async function runCampaignBatchDiff(opts) {
113371
113318
  }
113372
113319
  if (!campaignId) {
113373
113320
  console.error(
113374
- "\n\u274C \u7F3A\u5C11 Google \u5E7F\u544A\u7CFB\u5217 ID\uFF1A\u8BF7\u4F20 --campaign-id\uFF08\u53EF\u4ECE ad campaigns -a <account> --json \u83B7\u53D6\uFF09\n"
113321
+ "\n\u274C \u7F3A\u5C11 Google \u5E7F\u544A\u7CFB\u5217 ID\uFF1A\u8BF7\u4F20 --campaign-id\uFF08\u53EF\u4ECE ad campaigns -a <account> --json-out \u83B7\u53D6\uFF09\n"
113375
113322
  );
113376
113323
  process.exit(1);
113377
113324
  }
@@ -113751,9 +113698,6 @@ var BUSINESS_NAME_MAX = 25;
113751
113698
  function pushErr3(errors, msg) {
113752
113699
  errors.push(msg);
113753
113700
  }
113754
- function pushWarn3(warnings, msg) {
113755
- warnings.push(msg);
113756
- }
113757
113701
  function nonEmptyStrings(list) {
113758
113702
  return (list ?? []).map((s) => s?.trim()).filter((s) => Boolean(s));
113759
113703
  }
@@ -113784,20 +113728,28 @@ function normalizeBidding(raw) {
113784
113728
  };
113785
113729
  return byNum[n] ?? null;
113786
113730
  }
113787
- function warnTextLengths(cfg, warnings, prefix, texts, limit, label) {
113731
+ function validateTextLengths(errors, lengthViolations, texts, arrayField, kind, limit, label) {
113788
113732
  texts.forEach((text, i) => {
113789
113733
  const len = calcGoogleCharLength(text);
113790
113734
  if (len > limit) {
113791
- pushWarn3(
113792
- warnings,
113793
- `${prefix}${label}[${i}] \u6709\u6548\u957F\u5EA6 ${len} \u8D85\u8FC7\u5EFA\u8BAE\u4E0A\u9650 ${limit}\uFF08Google \u53EF\u80FD\u62D2\u767B\uFF09`
113794
- );
113735
+ const field = `${arrayField}[${i}]`;
113736
+ pushLengthViolation(lengthViolations, {
113737
+ path: field,
113738
+ field,
113739
+ kind,
113740
+ limit,
113741
+ actual: len,
113742
+ countMode: "google",
113743
+ text
113744
+ });
113745
+ pushErr3(errors, `${label}[${i}] \u8D85\u8FC7 ${limit} \u5B57\u7B26\uFF08\u5F53\u524D ${len}\uFF0CCJK \u8BA1 2\uFF09\uFF1A"${text}"`);
113795
113746
  }
113796
113747
  });
113797
113748
  }
113798
113749
  function runPmaxCreateValidation(cfg) {
113799
113750
  const errors = [];
113800
113751
  const warnings = [];
113752
+ const lengthViolations = [];
113801
113753
  const account = cfg.account?.toString().trim();
113802
113754
  if (!account) {
113803
113755
  pushErr3(errors, "account\uFF08\u5A92\u4F53\u5BA2\u6237 ID\uFF09\u5FC5\u586B");
@@ -113893,19 +113845,53 @@ function runPmaxCreateValidation(cfg) {
113893
113845
  }
113894
113846
  }
113895
113847
  }
113896
- warnTextLengths(cfg, warnings, "", headlines, HEADLINE_MAX, "headlines");
113897
- warnTextLengths(cfg, warnings, "", longHeadlines, LONG_HEADLINE_MAX, "longHeadlines");
113898
- warnTextLengths(cfg, warnings, "", descriptions, DESCRIPTION_MAX, "descriptions");
113848
+ validateTextLengths(
113849
+ errors,
113850
+ lengthViolations,
113851
+ headlines,
113852
+ "headlines",
113853
+ "pmax_headline",
113854
+ HEADLINE_MAX,
113855
+ "headlines"
113856
+ );
113857
+ validateTextLengths(
113858
+ errors,
113859
+ lengthViolations,
113860
+ longHeadlines,
113861
+ "longHeadlines",
113862
+ "pmax_long_headline",
113863
+ LONG_HEADLINE_MAX,
113864
+ "longHeadlines"
113865
+ );
113866
+ validateTextLengths(
113867
+ errors,
113868
+ lengthViolations,
113869
+ descriptions,
113870
+ "descriptions",
113871
+ "pmax_description",
113872
+ DESCRIPTION_MAX,
113873
+ "descriptions"
113874
+ );
113899
113875
  if (cfg.businessName?.trim()) {
113900
- const bn = calcGoogleCharLength(cfg.businessName.trim());
113876
+ const bnText = cfg.businessName.trim();
113877
+ const bn = calcGoogleCharLength(bnText);
113901
113878
  if (bn > BUSINESS_NAME_MAX) {
113902
- pushWarn3(
113903
- warnings,
113904
- `businessName \u6709\u6548\u957F\u5EA6 ${bn} \u8D85\u8FC7\u5EFA\u8BAE\u4E0A\u9650 ${BUSINESS_NAME_MAX}`
113879
+ pushLengthViolation(lengthViolations, {
113880
+ path: "businessName",
113881
+ field: "businessName",
113882
+ kind: "pmax_business_name",
113883
+ limit: BUSINESS_NAME_MAX,
113884
+ actual: bn,
113885
+ countMode: "google",
113886
+ text: bnText
113887
+ });
113888
+ pushErr3(
113889
+ errors,
113890
+ `businessName \u8D85\u8FC7 ${BUSINESS_NAME_MAX} \u5B57\u7B26\uFF08\u5F53\u524D ${bn}\uFF0CCJK \u8BA1 2\uFF09\uFF1A"${bnText}"`
113905
113891
  );
113906
113892
  }
113907
113893
  }
113908
- return { errors, warnings };
113894
+ return { errors, warnings, lengthViolations };
113909
113895
  }
113910
113896
 
113911
113897
  // src/commands/ad/pmax-image-validate.ts
@@ -114082,6 +114068,7 @@ async function runPmaxImageValidation(configFile, cfg) {
114082
114068
  }
114083
114069
 
114084
114070
  // src/commands/ad/pmax-image-resolve.ts
114071
+ init_auth();
114085
114072
  import { basename as basename4, dirname as dirname8, isAbsolute as isAbsolute3, resolve as resolve7 } from "path";
114086
114073
  import { readFileSync as readFileSync5 } from "fs";
114087
114074
 
@@ -114167,6 +114154,7 @@ var SLOT_META = {
114167
114154
  label: "Logo (LOGO)"
114168
114155
  }
114169
114156
  };
114157
+ var MAX_BASE64_UPLOAD_BYTES = 2e5;
114170
114158
  function guessContentType(fileName) {
114171
114159
  const lower = fileName.toLowerCase();
114172
114160
  if (lower.endsWith(".png")) return "image/png";
@@ -114183,13 +114171,11 @@ function normalizePmaxAssetId(value) {
114183
114171
  const m = s.match(/\/assets\/(\d+)\s*$/);
114184
114172
  return m ? m[1] : s;
114185
114173
  }
114186
- async function uploadPmaxImageFile(config, googleApiUrl, accountId, absImagePath, name2, verbose) {
114174
+ async function uploadPmaxImageFileMultipart(config, googleApiUrl, accountId, absImagePath, assetName, fileBuffer, verbose) {
114187
114175
  const fileName = basename4(absImagePath);
114188
- const assetName = (name2 ?? fileName).trim() || fileName;
114189
- const fileBuffer = readFileSync5(absImagePath);
114190
114176
  const mimeType = guessContentType(fileName);
114191
114177
  const form = new FormData();
114192
- form.append("file", new Blob([fileBuffer], { type: mimeType }), fileName);
114178
+ form.append("file", new Blob([new Uint8Array(fileBuffer)], { type: mimeType }), fileName);
114193
114179
  const url = pmaxImageAssetUrl(googleApiUrl, accountId, assetName);
114194
114180
  const headers = {
114195
114181
  "Accept-Language": "zh-CN",
@@ -114215,6 +114201,54 @@ async function uploadPmaxImageFile(config, googleApiUrl, accountId, absImagePath
114215
114201
  }
114216
114202
  return id;
114217
114203
  }
114204
+ async function uploadPmaxImageFileBase64(config, googleApiUrl, accountId, absImagePath, assetName, fileBuffer, verbose) {
114205
+ const url = pmaxImageAssetUrl(googleApiUrl, accountId);
114206
+ let data;
114207
+ try {
114208
+ data = await apiFetch2(
114209
+ url,
114210
+ config,
114211
+ {
114212
+ method: "POST",
114213
+ body: JSON.stringify({ name: assetName, base64String: fileBuffer.toString("base64") })
114214
+ },
114215
+ verbose
114216
+ );
114217
+ } catch (err) {
114218
+ const msg = err instanceof Error ? err.message : String(err);
114219
+ throw new Error(`\u4E0A\u4F20\u56FE\u7247\u8D44\u4EA7\u5931\u8D25\uFF1A${msg}\uFF08${absImagePath}\uFF09`);
114220
+ }
114221
+ const id = normalizePmaxAssetId(data["id"]);
114222
+ if (!id) {
114223
+ throw new Error(`\u4E0A\u4F20\u56FE\u7247\u8D44\u4EA7\u672A\u8FD4\u56DE id\uFF08${absImagePath}\uFF09`);
114224
+ }
114225
+ return id;
114226
+ }
114227
+ async function uploadPmaxImageFile(config, googleApiUrl, accountId, absImagePath, name2, verbose) {
114228
+ const fileName = basename4(absImagePath);
114229
+ const assetName = (name2 ?? fileName).trim() || fileName;
114230
+ const fileBuffer = readFileSync5(absImagePath);
114231
+ if (fileBuffer.length <= MAX_BASE64_UPLOAD_BYTES) {
114232
+ return uploadPmaxImageFileBase64(
114233
+ config,
114234
+ googleApiUrl,
114235
+ accountId,
114236
+ absImagePath,
114237
+ assetName,
114238
+ fileBuffer,
114239
+ verbose
114240
+ );
114241
+ }
114242
+ return uploadPmaxImageFileMultipart(
114243
+ config,
114244
+ googleApiUrl,
114245
+ accountId,
114246
+ absImagePath,
114247
+ assetName,
114248
+ fileBuffer,
114249
+ verbose
114250
+ );
114251
+ }
114218
114252
  async function resolveOneSlot(configFile, cfg, kind, accountId, config, googleApiUrl, verbose) {
114219
114253
  const meta = SLOT_META[kind];
114220
114254
  const presetId = String(cfg[meta.configAssetIdKey] ?? "").trim();
@@ -114340,28 +114374,14 @@ function buildPmaxCreateUrl(googleApiUrl, accountId) {
114340
114374
  return `${base}/accounts/${accountId}/campaign/pmax`;
114341
114375
  }
114342
114376
 
114343
- // src/commands/ad/pmax-feature-guard.ts
114344
- var ENV_KEY = "SILUZAN_PMAX_SETUP";
114345
- function isPmaxSetupEnabled() {
114346
- const v = process.env[ENV_KEY]?.trim();
114347
- return v === "1" || v?.toLowerCase() === "true";
114348
- }
114349
- function assertPmaxSetupEnabled(feature) {
114350
- if (isPmaxSetupEnabled()) return;
114351
- console.error(
114352
- `
114353
- \u274C PMax\u300C${feature}\u300D\u6682\u672A\u5728\u751F\u4EA7\u73AF\u5883\u5F00\u653E\uFF08\u642D\u5EFA\u80FD\u529B\u4ECD\u5728\u6D4B\u8BD5\uFF09\u3002
114354
- \u8BF7\u5728 Google Ads UI \u64CD\u4F5C\uFF0C\u6216\u672C\u5730\u8054\u8C03\u65F6\u8BBE\u7F6E ${ENV_KEY}=1 \u540E\u91CD\u8BD5\u3002
114355
- `
114356
- );
114357
- process.exit(1);
114358
- }
114359
-
114360
114377
  // src/commands/ad/pmax-create.ts
114361
114378
  async function runAdPmaxCreate(opts) {
114362
- assertPmaxSetupEnabled("pmax-create");
114363
114379
  const cfg = loadPmaxCreateConfig(opts.configFile);
114364
- const { errors: cfgErrors, warnings: cfgWarnings } = runPmaxCreateValidation(cfg);
114380
+ const {
114381
+ errors: cfgErrors,
114382
+ warnings: cfgWarnings,
114383
+ lengthViolations: cfgLengthViolations
114384
+ } = runPmaxCreateValidation(cfg);
114365
114385
  const { errors: imgErrors, warnings: imgWarnings } = await runPmaxImageValidation(
114366
114386
  opts.configFile,
114367
114387
  cfg
@@ -114375,6 +114395,10 @@ async function runAdPmaxCreate(opts) {
114375
114395
  if (errors.length > 0) {
114376
114396
  console.error("\n\u274C PMax \u914D\u7F6E\u6821\u9A8C\u5931\u8D25\uFF1A");
114377
114397
  for (const e of errors) console.error(` \u2022 ${e}`);
114398
+ const lengthReport = formatLengthViolationsReport(cfgLengthViolations, {
114399
+ revalidateCommand: "pmax-validate"
114400
+ });
114401
+ if (lengthReport) console.error(lengthReport);
114378
114402
  console.error();
114379
114403
  process.exit(1);
114380
114404
  }
@@ -114389,7 +114413,7 @@ async function runAdPmaxCreate(opts) {
114389
114413
  accountId,
114390
114414
  config,
114391
114415
  googleApiUrl,
114392
- { verbose: opts.verbose, logUploads: !opts.json }
114416
+ { verbose: opts.verbose, logUploads: !opts.jsonOut }
114393
114417
  );
114394
114418
  } catch (err) {
114395
114419
  console.error(`
@@ -114440,7 +114464,7 @@ async function runAdPmaxCreate(opts) {
114440
114464
  if (budgetId != null) console.log(` budgetId\uFF1A${budgetId}`);
114441
114465
  console.log(
114442
114466
  `
114443
- \u590D\u6838\uFF1Asiluzan-tso ad campaigns -a ${accountId} --json # channelTypeV2 \u5E94\u4E3A PERFORMANCE_MAX`
114467
+ \u590D\u6838\uFF1Asiluzan-tso ad campaigns -a ${accountId} --json-out # channelTypeV2 \u5E94\u4E3A PERFORMANCE_MAX`
114444
114468
  );
114445
114469
  console.log();
114446
114470
  }
@@ -114449,15 +114473,19 @@ async function runAdPmaxCreate(opts) {
114449
114473
  import { writeFileSync as writeFileSync3 } from "fs";
114450
114474
  init_cli_json_snapshot();
114451
114475
  async function runAdPmaxValidate(opts) {
114452
- assertPmaxSetupEnabled("pmax-validate");
114453
114476
  const cfg = loadPmaxCreateConfig(opts.configFile);
114454
- const { errors: cfgErrors, warnings: cfgWarnings } = runPmaxCreateValidation(cfg);
114477
+ const {
114478
+ errors: cfgErrors,
114479
+ warnings: cfgWarnings,
114480
+ lengthViolations: cfgLengthViolations
114481
+ } = runPmaxCreateValidation(cfg);
114455
114482
  const { errors: imgErrors, warnings: imgWarnings } = await runPmaxImageValidation(
114456
114483
  opts.configFile,
114457
114484
  cfg
114458
114485
  );
114459
114486
  const errors = [...cfgErrors, ...imgErrors];
114460
114487
  const warnings = [...cfgWarnings, ...imgWarnings];
114488
+ const lengthViolations = cfgLengthViolations;
114461
114489
  if (opts.writeNormalized) {
114462
114490
  const toWrite = stripMetaKeysForExport(cfg);
114463
114491
  writeFileSync3(opts.writeNormalized, `${JSON.stringify(toWrite, null, 2)}
@@ -114468,7 +114496,9 @@ async function runAdPmaxValidate(opts) {
114468
114496
  configFile: opts.configFile,
114469
114497
  account: cfg.account?.toString().trim() || void 0,
114470
114498
  errors,
114471
- warnings
114499
+ warnings,
114500
+ lengthViolations,
114501
+ agentHint: lengthViolations.length > 0 ? lengthViolationAgentHint("pmax-validate") : void 0
114472
114502
  };
114473
114503
  const accountSuffix = payload.account;
114474
114504
  if (await emitCliJsonOrSnapshot(opts, {
@@ -114488,6 +114518,10 @@ async function runAdPmaxValidate(opts) {
114488
114518
  if (errors.length > 0) {
114489
114519
  console.error("\n\u274C PMax \u914D\u7F6E\u6821\u9A8C\u5931\u8D25\uFF1A");
114490
114520
  for (const e of errors) console.error(` \u2022 ${e}`);
114521
+ const lengthReport = formatLengthViolationsReport(lengthViolations, {
114522
+ revalidateCommand: "pmax-validate"
114523
+ });
114524
+ if (lengthReport) console.error(lengthReport);
114491
114525
  console.error();
114492
114526
  process.exit(1);
114493
114527
  }
@@ -114686,12 +114720,11 @@ async function runAdPmaxGet(opts) {
114686
114720
  const n = Array.isArray(groups) ? groups.length : 0;
114687
114721
  console.log(` \u8D44\u4EA7\u7EC4\uFF1A${n} \u4E2A`);
114688
114722
  console.log(`
114689
- \u5B8C\u6574\u7ED3\u6784\u8BF7\u4F7F\u7528 --json
114723
+ \u5B8C\u6574\u7ED3\u6784\u8BF7\u4F7F\u7528 --json-out
114690
114724
  `);
114691
114725
  });
114692
114726
  }
114693
114727
  async function runAdPmaxEdit(opts) {
114694
- assertPmaxSetupEnabled("pmax-edit");
114695
114728
  const accountId = requireAccountId(opts.account);
114696
114729
  const campaignId = opts.campaignId.trim();
114697
114730
  let body;
@@ -114753,7 +114786,6 @@ async function runAdPmaxEdit(opts) {
114753
114786
  });
114754
114787
  }
114755
114788
  async function runAdPmaxAssetGroupCreate(opts) {
114756
- assertPmaxSetupEnabled("pmax-asset-group-create");
114757
114789
  const cfg = loadPmaxJsonFile(opts.configFile);
114758
114790
  const accountId = requireAccountId(String(cfg["account"] ?? ""));
114759
114791
  const campaignId = String(cfg["campaignId"] ?? "").trim();
@@ -114785,7 +114817,7 @@ async function runAdPmaxAssetGroupCreate(opts) {
114785
114817
  accountId,
114786
114818
  config,
114787
114819
  googleApiUrl,
114788
- { verbose: opts.verbose, logUploads: !opts.json }
114820
+ { verbose: opts.verbose, logUploads: !opts.jsonOut }
114789
114821
  );
114790
114822
  } catch (err) {
114791
114823
  console.error(
@@ -114839,7 +114871,6 @@ async function runAdPmaxAssetGroupCreate(opts) {
114839
114871
  });
114840
114872
  }
114841
114873
  async function runAdPmaxAssetGroupEdit(opts) {
114842
- assertPmaxSetupEnabled("pmax-asset-group-edit");
114843
114874
  const accountId = requireAccountId(opts.account);
114844
114875
  const assetGroupId = opts.assetGroupId.trim();
114845
114876
  let body;
@@ -114891,7 +114922,6 @@ async function runAdPmaxAssetGroupEdit(opts) {
114891
114922
  });
114892
114923
  }
114893
114924
  async function runAdPmaxAssetsUpdate(opts) {
114894
- assertPmaxSetupEnabled("pmax-assets-update");
114895
114925
  const cfg = loadPmaxJsonFile(opts.configFile);
114896
114926
  const accountId = requireAccountId(String(cfg["account"] ?? ""));
114897
114927
  const assetGroupId = String(cfg["assetGroupId"] ?? "").trim();
@@ -114952,7 +114982,6 @@ async function runAdPmaxAssetsUpdate(opts) {
114952
114982
  });
114953
114983
  }
114954
114984
  async function runAdPmaxYoutubeLink(opts) {
114955
- assertPmaxSetupEnabled("pmax-youtube-link");
114956
114985
  const accountId = requireAccountId(opts.account);
114957
114986
  const assetGroupId = opts.assetGroupId.trim();
114958
114987
  let body;
@@ -115042,7 +115071,6 @@ async function runAdPmaxSignalsGet(opts) {
115042
115071
  });
115043
115072
  }
115044
115073
  async function runAdPmaxSignalsSet(opts) {
115045
- assertPmaxSetupEnabled("pmax-signals-set");
115046
115074
  const cfg = loadPmaxJsonFile(opts.configFile);
115047
115075
  const accountId = requireAccountId(String(cfg["account"] ?? ""));
115048
115076
  const assetGroupId = String(cfg["assetGroupId"] ?? "").trim();
@@ -115155,14 +115183,13 @@ PMax \u53D7\u4F17\u6570\u636E\u6E90\uFF08\u8D26\u6237 ${accountId}\uFF09
115155
115183
  console.log(` ${r["name"] ?? ""} ${r["resourceName"] ?? ""}`);
115156
115184
  }
115157
115185
  }
115158
- if (arr.length > 20) console.log(` \u2026 \u5171 ${arr.length} \u6761\uFF0C\u8BF7\u7528 --json`);
115186
+ if (arr.length > 20) console.log(` \u2026 \u5171 ${arr.length} \u6761\uFF0C\u8BF7\u7528 --json-out`);
115159
115187
  }
115160
115188
  }
115161
115189
  console.log();
115162
115190
  });
115163
115191
  }
115164
115192
  async function runAdPmaxImageUpload(opts) {
115165
- assertPmaxSetupEnabled("pmax-image-upload");
115166
115193
  const accountId = requireAccountId(opts.account);
115167
115194
  await withGoogleApi(opts, async (config, googleApiUrl) => {
115168
115195
  let data;
@@ -115268,7 +115295,7 @@ async function runAdPmaxReportAssetGroups(opts) {
115268
115295
  console.log(`
115269
115296
  PMax \u8D44\u4EA7\u7EC4\u6548\u679C\u62A5\u8868\uFF08${query.get("startDate")} ~ ${query.get("endDate")}\uFF0C${n} \u884C\uFF09
115270
115297
  `);
115271
- console.log(" \u5B8C\u6574\u6570\u636E\u8BF7\u4F7F\u7528 --json\n");
115298
+ console.log(" \u5B8C\u6574\u6570\u636E\u8BF7\u4F7F\u7528 --json-out\n");
115272
115299
  });
115273
115300
  }
115274
115301
  async function runAdPmaxReportGeo(opts) {
@@ -115302,14 +115329,13 @@ async function runAdPmaxReportGeo(opts) {
115302
115329
  PMax \u5730\u7406\u62A5\u8868\uFF08\u6D3B\u52A8\xD7\u56FD\u5BB6\uFF0C${query.get("startDate")} ~ ${query.get("endDate")}\uFF09
115303
115330
  `
115304
115331
  );
115305
- console.log(" \u5B8C\u6574\u6570\u636E\u8BF7\u4F7F\u7528 --json\n");
115332
+ console.log(" \u5B8C\u6574\u6570\u636E\u8BF7\u4F7F\u7528 --json-out\n");
115306
115333
  });
115307
115334
  }
115308
115335
 
115309
115336
  // src/commands/ad/campaign-validate.ts
115310
115337
  import { writeFileSync as writeFileSync4 } from "fs";
115311
115338
  init_cli_json_snapshot();
115312
- var LENGTH_VIOLATION_AGENT_HINT = "\u52FF\u81EA\u52A8\u622A\u65AD JSON\u3002\u8BFB\u53D6\u843D\u76D8 JSON \u7684 lengthViolations\uFF0C\u5C06\u5168\u90E8\u6761\u76EE\u4E0E\u4FEE\u6539\u65B9\u6848\u5217\u7ED9\u7528\u6237\uFF0C\u786E\u8BA4\u540E\u5199\u5165 campaign.json \u5E76\u91CD\u65B0 campaign-validate\u3002";
115313
115339
  async function runAdCampaignValidate(opts) {
115314
115340
  const cfg = loadCampaignCreateConfig(opts.configFile);
115315
115341
  const { errors, warnings, lengthViolations } = runCampaignCreateValidation(cfg);
@@ -115325,7 +115351,7 @@ async function runAdCampaignValidate(opts) {
115325
115351
  errors,
115326
115352
  warnings,
115327
115353
  lengthViolations,
115328
- agentHint: lengthViolations.length > 0 ? LENGTH_VIOLATION_AGENT_HINT : void 0
115354
+ agentHint: lengthViolations.length > 0 ? lengthViolationAgentHint("campaign-validate") : void 0
115329
115355
  };
115330
115356
  const accountSuffix = payload.account || void 0;
115331
115357
  if (await emitCliJsonOrSnapshot(opts, {
@@ -115392,7 +115418,6 @@ async function convertOne(sharpFn, inputPath, outputPath, spec, quality) {
115392
115418
  await pipeline.toFile(outputPath);
115393
115419
  }
115394
115420
  async function runAdPmaxImageConvert(opts) {
115395
- assertPmaxSetupEnabled("pmax-image-convert");
115396
115421
  const { input, inputMarketing, inputSquare, inputLogo } = opts;
115397
115422
  if (!input && !inputMarketing && !inputSquare && !inputLogo) {
115398
115423
  console.error("\n\u274C \u8BF7\u81F3\u5C11\u6307\u5B9A --input \u6216 --input-marketing / --input-square / --input-logo\n");
@@ -115479,9 +115504,9 @@ function register20(program2) {
115479
115504
  adBatchCmd.command("list").description("\u67E5\u8BE2\u6279\u91CF\u521B\u5EFA / \u667A\u6295\u8BB0\u5F55\u5217\u8868").option(
115480
115505
  "-s, --state <state>",
115481
115506
  "\u72B6\u6001\uFF1ACreating | Successfully | Failed | HasFailed | Unpublished"
115482
- ).option("--customer-id <id>", "\u5BA2\u6237 ID").option("--customer-name <name>", "\u5BA2\u6237\u540D\u79F0").option("-k, --keyword <text>", "\u5173\u952E\u5B57\u641C\u7D22").option("--start <date>", "\u521B\u5EFA\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u521B\u5EFA\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
115507
+ ).option("--customer-id <id>", "\u5BA2\u6237 ID").option("--customer-name <name>", "\u5BA2\u6237\u540D\u79F0").option("-k, --keyword <text>", "\u5173\u952E\u5B57\u641C\u7D22").option("--start <date>", "\u521B\u5EFA\u5F00\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u521B\u5EFA\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-p, --page <n>", "\u9875\u7801", parseInt).option("--page-size <n>", "\u6BCF\u9875\u6570\u91CF", parseInt).option("-t, --token <token>", "Auth Token").option(
115483
115508
  "--json-out <path>",
115484
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115509
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115485
115510
  void 0
115486
115511
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115487
115512
  async (opts) => {
@@ -115495,17 +115520,16 @@ function register20(program2) {
115495
115520
  endDate: opts.end,
115496
115521
  page: opts.page,
115497
115522
  pageSize: opts.pageSize,
115498
- json: opts.json,
115499
115523
  jsonOut: opts.jsonOut,
115500
115524
  verbose: opts.verbose
115501
115525
  });
115502
115526
  }
115503
115527
  );
115504
115528
  adBatchCmd.command("get").description(
115505
- "\u83B7\u53D6\u5355\u6761\u8BB0\u5F55/\u8349\u7A3F\u8BE6\u60C5\uFF08\u9ED8\u8BA4\uFF1A\u6458\u8981\u8868 + \u540E\u7AEF\u539F\u59CB reason/errors\uFF1B--json \u8F93\u51FA\u5B8C\u6574 JSON\uFF09\n \u6210\u529F\u6216\u90E8\u5206\u6210\u529F\u540E\u987B\u6267\u884C ad batch diff\uFF08\u89C1 --config-file\uFF09\uFF1BFailed \u4EC5\u770B reason/errors \u540E\u91CD\u63D0\n\n \u793A\u4F8B\uFF1A\n siluzan-tso ad batch list\n siluzan-tso ad batch get --id <taskId> --config-file ./campaign.json\n siluzan-tso ad batch get --id <taskId> --json"
115506
- ).requiredOption("--id <id>", "\u8BB0\u5F55 ID\uFF08\u6765\u81EA ad batch list --json \u7684 results[].id\uFF09").option("--config-file <path>", "\u672C\u6B21 campaign-create JSON\uFF08\u7ED3\u675F\u540E\u6253\u5370 batch diff \u547D\u4EE4\uFF09").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
115529
+ "\u83B7\u53D6\u5355\u6761\u8BB0\u5F55/\u8349\u7A3F\u8BE6\u60C5\uFF08\u9ED8\u8BA4\uFF1A\u6458\u8981\u8868 + \u540E\u7AEF\u539F\u59CB reason/errors\uFF1B--json-out \u8F93\u51FA\u5B8C\u6574 JSON\uFF09\n \u6210\u529F\u6216\u90E8\u5206\u6210\u529F\u540E\u987B\u6267\u884C ad batch diff\uFF08\u89C1 --config-file\uFF09\uFF1BFailed \u4EC5\u770B reason/errors \u540E\u91CD\u63D0\n\n \u793A\u4F8B\uFF1A\n siluzan-tso ad batch list\n siluzan-tso ad batch get --id <taskId> --config-file ./campaign.json\n siluzan-tso ad batch get --id <taskId> --json-out"
115530
+ ).requiredOption("--id <id>", "\u8BB0\u5F55 ID\uFF08\u6765\u81EA ad batch list --json-out \u7684 results[].id\uFF09").option("--config-file <path>", "\u672C\u6B21 campaign-create JSON\uFF08\u7ED3\u675F\u540E\u6253\u5370 batch diff \u547D\u4EE4\uFF09").option(
115507
115531
  "--json-out <path>",
115508
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115532
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115509
115533
  void 0
115510
115534
  ).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115511
115535
  async (opts) => {
@@ -115513,7 +115537,6 @@ function register20(program2) {
115513
115537
  token: opts.token,
115514
115538
  id: opts.id,
115515
115539
  configFile: opts.configFile,
115516
- json: opts.json,
115517
115540
  jsonOut: opts.jsonOut,
115518
115541
  verbose: opts.verbose
115519
115542
  });
@@ -115521,7 +115544,7 @@ function register20(program2) {
115521
115544
  );
115522
115545
  adBatchCmd.command("diff").description(
115523
115546
  "\u6210\u529F\u6216\u90E8\u5206\u6210\u529F\uFF1A\u6309 campaign-create JSON \u4E0E\u8D26\u6237\u5B9E\u51B5\u9010\u5C42\u6BD4\u5BF9\n Failed \u4E0D\u9002\u7528\uFF08\u7CFB\u5217\u672A\u521B\u5EFA\uFF09\uFF0C\u8BF7\u7528 ad batch get \u67E5\u770B reason/errors \u540E\u6539 JSON \u91CD\u63D0\n\n \u793A\u4F8B\uFF1A\n siluzan-tso ad batch diff --campaign-id <id> --config-file ./campaign.json\n siluzan-tso ad batch diff --batch-id <taskId> --campaign-id <id> --config-file ./campaign.json"
115524
- ).requiredOption("--config-file <path>", "\u63D0\u4EA4\u65F6\u4F7F\u7528\u7684 campaign-create JSON").option("--campaign-id <id>", "Google \u5E7F\u544A\u7CFB\u5217 ID\uFF08\u53EF\u4ECE ad campaigns --json \u83B7\u53D6\uFF1B\u7701\u7565\u65F6\u6309\u7CFB\u5217\u540D\u5339\u914D\uFF09").option("--batch-id <id>", "\u6279\u91CF\u4EFB\u52A1 ID\uFF08\u6821\u9A8C\u975E Failed\uFF1BHasFailed \u65F6\u53EF\u7701\u7565 campaign-id\uFF09").option("-a, --account <id>", "\u5A92\u4F53\u8D26\u6237 ID\uFF08\u9ED8\u8BA4\u8BFB JSON \u7684 account\uFF09").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA\u6BD4\u5BF9\u7ED3\u679C", false).option("--json-out <path>", "\u6BD4\u5BF9\u7ED3\u679C\u843D\u76D8\u8DEF\u5F84").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115547
+ ).requiredOption("--config-file <path>", "\u63D0\u4EA4\u65F6\u4F7F\u7528\u7684 campaign-create JSON").option("--campaign-id <id>", "Google \u5E7F\u544A\u7CFB\u5217 ID\uFF08\u53EF\u4ECE ad campaigns --json-out \u83B7\u53D6\uFF1B\u7701\u7565\u65F6\u6309\u7CFB\u5217\u540D\u5339\u914D\uFF09").option("--batch-id <id>", "\u6279\u91CF\u4EFB\u52A1 ID\uFF08\u6821\u9A8C\u975E Failed\uFF1BHasFailed \u65F6\u53EF\u7701\u7565 campaign-id\uFF09").option("-a, --account <id>", "\u5A92\u4F53\u8D26\u6237 ID\uFF08\u9ED8\u8BA4\u8BFB JSON \u7684 account\uFF09").option("--json-out <path>", "\u6BD4\u5BF9\u7ED3\u679C\u843D\u76D8\u8DEF\u5F84").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115525
115548
  async (opts) => {
115526
115549
  await runCampaignBatchDiff({
115527
115550
  token: opts.token,
@@ -115529,7 +115552,6 @@ function register20(program2) {
115529
115552
  campaignId: opts.campaignId ?? "",
115530
115553
  batchId: opts.batchId,
115531
115554
  account: opts.account,
115532
- json: opts.json,
115533
115555
  jsonOut: opts.jsonOut,
115534
115556
  verbose: opts.verbose
115535
115557
  });
@@ -115554,9 +115576,9 @@ function register20(program2) {
115554
115576
  });
115555
115577
  }
115556
115578
  );
115557
- adCmd.command("campaigns").description("\u67E5\u8BE2\u5E7F\u544A\u7CFB\u5217\u5217\u8868\uFF08\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
115579
+ adCmd.command("campaigns").description("\u67E5\u8BE2\u5E7F\u544A\u7CFB\u5217\u5217\u8868\uFF08\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("-t, --token <token>", "Auth Token").option(
115558
115580
  "--json-out <path>",
115559
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115581
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115560
115582
  void 0
115561
115583
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115562
115584
  async (opts) => {
@@ -115565,15 +115587,14 @@ function register20(program2) {
115565
115587
  account: opts.account,
115566
115588
  startDate: opts.start,
115567
115589
  endDate: opts.end,
115568
- json: opts.json,
115569
115590
  jsonOut: opts.jsonOut,
115570
115591
  verbose: opts.verbose
115571
115592
  });
115572
115593
  }
115573
115594
  );
115574
- adCmd.command("groups").description("\u67E5\u8BE2\u5E7F\u544A\u7EC4\u5217\u8868\uFF08\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
115595
+ adCmd.command("groups").description("\u67E5\u8BE2\u5E7F\u544A\u7EC4\u5217\u8868\uFF08\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("-t, --token <token>", "Auth Token").option(
115575
115596
  "--json-out <path>",
115576
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115597
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115577
115598
  void 0
115578
115599
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115579
115600
  async (opts) => {
@@ -115582,15 +115603,14 @@ function register20(program2) {
115582
115603
  account: opts.account,
115583
115604
  startDate: opts.start,
115584
115605
  endDate: opts.end,
115585
- json: opts.json,
115586
115606
  jsonOut: opts.jsonOut,
115587
115607
  verbose: opts.verbose
115588
115608
  });
115589
115609
  }
115590
115610
  );
115591
- adCmd.command("list").description("\u67E5\u8BE2\u5E7F\u544A\uFF08\u521B\u610F\uFF09\u5217\u8868\uFF08\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("--include-deleted", "\u5305\u542B\u5DF2\u5220\u9664\u7684\u5E7F\u544A\uFF08\u7F51\u5173 readDeleted=true\uFF09", false).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
115611
+ adCmd.command("list").description("\u67E5\u8BE2\u5E7F\u544A\uFF08\u521B\u610F\uFF09\u5217\u8868\uFF08\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("--include-deleted", "\u5305\u542B\u5DF2\u5220\u9664\u7684\u5E7F\u544A\uFF08\u7F51\u5173 readDeleted=true\uFF09", false).option("-t, --token <token>", "Auth Token").option(
115592
115612
  "--json-out <path>",
115593
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115613
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115594
115614
  void 0
115595
115615
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115596
115616
  async (opts) => {
@@ -115600,15 +115620,14 @@ function register20(program2) {
115600
115620
  startDate: opts.start,
115601
115621
  endDate: opts.end,
115602
115622
  includeDeleted: opts.includeDeleted,
115603
- json: opts.json,
115604
115623
  jsonOut: opts.jsonOut,
115605
115624
  verbose: opts.verbose
115606
115625
  });
115607
115626
  }
115608
115627
  );
115609
- adCmd.command("keywords").description("\u67E5\u8BE2\u5173\u952E\u8BCD\u5217\u8868\uFF08--negative \u67E5\u8BE2\u5426\u5B9A\u5173\u952E\u8BCD\uFF1B\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--negative", "\u67E5\u8BE2\u5426\u5B9A\u5173\u952E\u8BCD", false).option("--start <date>", "\u5F00\u59CB\u65E5\u671F\uFF08YYYY-MM-DD\uFF0C\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F\uFF08YYYY-MM-DD\uFF0C\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
115628
+ adCmd.command("keywords").description("\u67E5\u8BE2\u5173\u952E\u8BCD\u5217\u8868\uFF08--negative \u67E5\u8BE2\u5426\u5B9A\u5173\u952E\u8BCD\uFF1B\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--negative", "\u67E5\u8BE2\u5426\u5B9A\u5173\u952E\u8BCD", false).option("--start <date>", "\u5F00\u59CB\u65E5\u671F\uFF08YYYY-MM-DD\uFF0C\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F\uFF08YYYY-MM-DD\uFF0C\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("-t, --token <token>", "Auth Token").option(
115610
115629
  "--json-out <path>",
115611
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115630
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
115612
115631
  void 0
115613
115632
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115614
115633
  async (opts) => {
@@ -115618,7 +115637,6 @@ function register20(program2) {
115618
115637
  negative: opts.negative,
115619
115638
  startDate: opts.start,
115620
115639
  endDate: opts.end,
115621
- json: opts.json,
115622
115640
  jsonOut: opts.jsonOut,
115623
115641
  verbose: opts.verbose
115624
115642
  });
@@ -115651,9 +115669,9 @@ function register20(program2) {
115651
115669
  "--max-cpc <amount>",
115652
115670
  "\u6700\u9AD8\u5355\u6B21\u70B9\u51FB\u8D39\u7528\uFF0C\u4E3B\u5E01\u79CD\u91D1\u989D\uFF08\u5982 1.5 \u8868\u793A \xA51.50\uFF1BCLI \u5185\u90E8 \xD7100 \u5199\u5165\u300C\u5206\u300D\uFF09",
115653
115671
  parseFloat
115654
- ).option("--status <status>", "\u72B6\u6001\uFF1AENABLED | PAUSED\uFF08\u9ED8\u8BA4 ENABLED\uFF09", "ENABLED").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u7F51\u5173\u8FD4\u56DE\u7684\u5B8C\u6574 adgroup \u5BF9\u8C61\uFF08\u542B id \u7B49\u5B57\u6BB5\uFF0C\u91D1\u989D\u5DF2\u8F6C\u5143\uFF09", false).option(
115672
+ ).option("--status <status>", "\u72B6\u6001\uFF1AENABLED | PAUSED\uFF08\u9ED8\u8BA4 ENABLED\uFF09", "ENABLED").option("-t, --token <token>", "Auth Token").option(
115655
115673
  "--json-out <path>",
115656
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`",
115674
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`",
115657
115675
  void 0
115658
115676
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115659
115677
  async (opts) => {
@@ -115665,7 +115683,6 @@ function register20(program2) {
115665
115683
  name: opts.name,
115666
115684
  maxCpc: opts.maxCpc,
115667
115685
  status: opts.status ?? "ENABLED",
115668
- json: opts.json,
115669
115686
  jsonOut: opts.jsonOut,
115670
115687
  verbose: opts.verbose
115671
115688
  });
@@ -115710,9 +115727,9 @@ function register20(program2) {
115710
115727
  "--descriptions <d1,d2,...>",
115711
115728
  "\u63CF\u8FF0\u5217\u8868\uFF0C\u9017\u53F7\u5206\u9694\uFF0C\u81F3\u5C11 2 \u4E2A\uFF08\u5FC5\u4F20\uFF0C\u6700\u591A 4 \u4E2A\uFF0C\u6BCF\u4E2A \u226490 \u5B57\u7B26\uFF09",
115712
115729
  (v) => v.split(",").map((s) => s.trim())
115713
- ).option("--path1 <path>", "\u663E\u793A\u8DEF\u5F841\uFF08\u53EF\u9009\uFF0C\u226415 \u5B57\u7B26\uFF09").option("--path2 <path>", "\u663E\u793A\u8DEF\u5F842\uFF08\u53EF\u9009\uFF0C\u226415 \u5B57\u7B26\uFF0C\u9700\u4E0E path1 \u540C\u65F6\u4F7F\u7528\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u7F51\u5173\u8FD4\u56DE\u7684\u5B8C\u6574 ad \u5BF9\u8C61\uFF08\u542B id \u7B49\u5B57\u6BB5\uFF09", false).option(
115730
+ ).option("--path1 <path>", "\u663E\u793A\u8DEF\u5F841\uFF08\u53EF\u9009\uFF0C\u226415 \u5B57\u7B26\uFF09").option("--path2 <path>", "\u663E\u793A\u8DEF\u5F842\uFF08\u53EF\u9009\uFF0C\u226415 \u5B57\u7B26\uFF0C\u9700\u4E0E path1 \u540C\u65F6\u4F7F\u7528\uFF09").option("-t, --token <token>", "Auth Token").option(
115714
115731
  "--json-out <path>",
115715
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09",
115732
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json",
115716
115733
  void 0
115717
115734
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115718
115735
  async (opts) => {
@@ -115726,7 +115743,6 @@ function register20(program2) {
115726
115743
  descriptions: opts.descriptions,
115727
115744
  path1: opts.path1,
115728
115745
  path2: opts.path2,
115729
- json: opts.json,
115730
115746
  jsonOut: opts.jsonOut,
115731
115747
  verbose: opts.verbose
115732
115748
  });
@@ -115765,9 +115781,9 @@ function register20(program2) {
115765
115781
  "--keywords <kw1,kw2,...>",
115766
115782
  "\u5173\u952E\u8BCD\u5217\u8868\uFF0C\u9017\u53F7\u5206\u9694",
115767
115783
  (v) => v.split(",").map((s) => s.trim())
115768
- ).option("--final-url <url>", "\u5173\u952E\u8BCD\u6700\u7EC8\u5230\u8FBE\u7F51\u5740\uFF08\u53EF\u9009\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u7F51\u5173\u8FD4\u56DE\u503C\u4E0E\u8BF7\u6C42\u6458\u8981\uFF08\u542B adgroupId / \u5173\u952E\u8BCD\u6570\uFF09", false).option(
115784
+ ).option("--final-url <url>", "\u5173\u952E\u8BCD\u6700\u7EC8\u5230\u8FBE\u7F51\u5740\uFF08\u53EF\u9009\uFF09").option("-t, --token <token>", "Auth Token").option(
115769
115785
  "--json-out <path>",
115770
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09",
115786
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json",
115771
115787
  void 0
115772
115788
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115773
115789
  async (opts) => {
@@ -115780,7 +115796,6 @@ function register20(program2) {
115780
115796
  campaignName: opts.campaignName,
115781
115797
  keywords: opts.keywords,
115782
115798
  finalUrl: opts.finalUrl,
115783
- json: opts.json,
115784
115799
  jsonOut: opts.jsonOut,
115785
115800
  verbose: opts.verbose
115786
115801
  });
@@ -115821,15 +115836,14 @@ function register20(program2) {
115821
115836
  ).requiredOption("--config-file <path>", "campaign-create JSON \u8DEF\u5F84").option(
115822
115837
  "--write-normalized <path>",
115823
115838
  "\u5C06\u89C4\u8303\u5316\u540E\u7684 JSON \u5199\u5165\u8BE5\u8DEF\u5F84\uFF08\u5173\u952E\u8BCD\u8BCD\u9762\u5DF2\u4FEE\u6B63\uFF09"
115824
- ).option("--json", "\u8F93\u51FA { ok, errors, warnings, lengthViolations }\uFF08\u4E0E --json-out \u4E92\u65A5\uFF09", false).option(
115839
+ ).option(
115825
115840
  "--json-out <path>",
115826
- "\u843D\u76D8\u6821\u9A8C\u7ED3\u679C\uFF08\u542B lengthViolations\uFF09\u5E76\u66F4\u65B0 cli-manifest\uFF1B\u4E0E --json \u4E92\u65A5"
115841
+ "\u843D\u76D8\u6821\u9A8C\u7ED3\u679C\uFF08\u542B lengthViolations\uFF09\u5E76\u66F4\u65B0 cli-manifest"
115827
115842
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115828
115843
  async (opts) => {
115829
115844
  await runAdCampaignValidate({
115830
115845
  configFile: opts.configFile,
115831
115846
  writeNormalized: opts.writeNormalized,
115832
- json: opts.json,
115833
115847
  jsonOut: opts.jsonOut,
115834
115848
  verbose: opts.verbose
115835
115849
  });
@@ -115840,16 +115854,15 @@ function register20(program2) {
115840
115854
  ).requiredOption(
115841
115855
  "--config-file <path>",
115842
115856
  "JSON \u914D\u7F6E\u6587\u4EF6\u8DEF\u5F84\uFF08\u6A21\u677F\u4E0E\u9010\u5B57\u6BB5\u8BF4\u660E\u89C1 assets/siluzan-ads/assets/campaign-create-*.json|md\uFF09"
115843
- ).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA\u539F\u59CB\u54CD\u5E94", false).option(
115857
+ ).option("-t, --token <token>", "Auth Token").option(
115844
115858
  "--json-out <path>",
115845
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09",
115859
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json",
115846
115860
  void 0
115847
115861
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115848
115862
  async (opts) => {
115849
115863
  await runAdCampaignCreate({
115850
115864
  configFile: opts.configFile,
115851
115865
  token: opts.token,
115852
- json: opts.json,
115853
115866
  jsonOut: opts.jsonOut,
115854
115867
  verbose: opts.verbose
115855
115868
  });
@@ -115857,41 +115870,39 @@ function register20(program2) {
115857
115870
  );
115858
115871
  adCmd.command("pmax-validate").description(
115859
115872
  "\u6821\u9A8C pmax-create JSON\uFF08PMax \u4E13\u7528\uFF1B\u4E0D\u8C03\u7528 API\uFF09\n\n \u7528\u6CD5\uFF1A\n siluzan-tso ad pmax-validate --config-file ./pmax.json --json-out ./snap-pmax\n siluzan-tso ad pmax-validate --config-file ./pmax.json --write-normalized ./pmax.normalized.json"
115860
- ).requiredOption("--config-file <path>", "pmax-create JSON \u8DEF\u5F84").option("--write-normalized <path>", "\u5C06 JSON \u5199\u5165\u8BE5\u8DEF\u5F84\uFF08\u4FDD\u7559 _ \u6CE8\u89E3\u952E\uFF09").option("--json", "\u8F93\u51FA { ok, errors, warnings }\uFF08\u4E0E --json-out \u4E92\u65A5\uFF09", false).option(
115873
+ ).requiredOption("--config-file <path>", "pmax-create JSON \u8DEF\u5F84").option("--write-normalized <path>", "\u5C06 JSON \u5199\u5165\u8BE5\u8DEF\u5F84\uFF08\u4FDD\u7559 _ \u6CE8\u89E3\u952E\uFF09").option(
115861
115874
  "--json-out <path>",
115862
- "\u843D\u76D8\u6821\u9A8C\u7ED3\u679C\u5E76\u66F4\u65B0 cli-manifest\uFF1B\u4E0E --json \u4E92\u65A5"
115875
+ "\u843D\u76D8\u6821\u9A8C\u7ED3\u679C\u5E76\u66F4\u65B0 cli-manifest"
115863
115876
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115864
115877
  async (opts) => {
115865
115878
  await runAdPmaxValidate({
115866
115879
  configFile: opts.configFile,
115867
115880
  writeNormalized: opts.writeNormalized,
115868
- json: opts.json,
115869
115881
  jsonOut: opts.jsonOut,
115870
115882
  verbose: opts.verbose
115871
115883
  });
115872
115884
  }
115873
115885
  );
115874
115886
  adCmd.command("pmax-create").description(
115875
- '\u65B0\u5EFA Performance Max \u5E7F\u544A\u7CFB\u5217\uFF08\u540C\u6B65 API\uFF1B\u4EC5\u652F\u6301 JSON \u914D\u7F6E\u6587\u4EF6\uFF09\n\n \u7528\u6CD5\uFF1A\n 1. \u590D\u5236 pmax-create-template.json\uFF0C\u5B57\u6BB5\u8BF4\u660E\u89C1 pmax-create-template.md\n 2. siluzan-tso ad geo search -a <accountId> -q "United States"\n 3. siluzan-tso ad pmax-validate --config-file ./pmax.json\n 4. siluzan-tso ad pmax-create --config-file ./pmax.json # imagePaths \u81EA\u52A8\u4E0A\u4F20\n 5. siluzan-tso ad campaigns -a <accountId> --json # \u786E\u8BA4 PERFORMANCE_MAX'
115887
+ '\u65B0\u5EFA Performance Max \u5E7F\u544A\u7CFB\u5217\uFF08\u540C\u6B65 API\uFF1B\u4EC5\u652F\u6301 JSON \u914D\u7F6E\u6587\u4EF6\uFF09\n\n \u7528\u6CD5\uFF1A\n 1. \u590D\u5236 pmax-create-template.json\uFF0C\u5B57\u6BB5\u8BF4\u660E\u89C1 pmax-create-template.md\n 2. siluzan-tso ad geo search -a <accountId> -q "United States"\n 3. siluzan-tso ad pmax-validate --config-file ./pmax.json\n 4. siluzan-tso ad pmax-create --config-file ./pmax.json # imagePaths \u81EA\u52A8\u4E0A\u4F20\n 5. siluzan-tso ad campaigns -a <accountId> --json-out # \u786E\u8BA4 PERFORMANCE_MAX'
115876
115888
  ).requiredOption(
115877
115889
  "--config-file <path>",
115878
115890
  "JSON \u914D\u7F6E\u6587\u4EF6\uFF08\u6A21\u677F\u89C1 assets/siluzan-ads/assets/pmax-create-*.json|md\uFF09"
115879
- ).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA\u7F51\u5173\u54CD\u5E94", false).option(
115891
+ ).option("-t, --token <token>", "Auth Token").option(
115880
115892
  "--json-out <path>",
115881
- "\u843D\u76D8\u54CD\u5E94\u5E76\u66F4\u65B0 cli-manifest\uFF08\u4E0E --json \u4E92\u65A5\uFF09",
115893
+ "\u843D\u76D8\u54CD\u5E94\u5E76\u66F4\u65B0 cli-manifest",
115882
115894
  void 0
115883
115895
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
115884
115896
  async (opts) => {
115885
115897
  await runAdPmaxCreate({
115886
115898
  configFile: opts.configFile,
115887
115899
  token: opts.token,
115888
- json: opts.json,
115889
115900
  jsonOut: opts.jsonOut,
115890
115901
  verbose: opts.verbose
115891
115902
  });
115892
115903
  }
115893
115904
  );
115894
- const addPmaxJsonOptions = (cmd) => cmd.option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option("--json-out <path>", "\u843D\u76D8\u54CD\u5E94\u5E76\u66F4\u65B0 cli-manifest", void 0).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false);
115905
+ const addPmaxJsonOptions = (cmd) => cmd.option("--json-out <path>", "\u843D\u76D8\u54CD\u5E94\u5E76\u66F4\u65B0 cli-manifest", void 0).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false);
115895
115906
  adCmd.command("pmax-image-convert").description(
115896
115907
  "\u5C06\u4EFB\u610F\u56FE\u7247\u8F6C\u4E3A PMax \u4E09\u79CD\u89C4\u683C\u7D20\u6750\uFF08marketing 1200\xD7628 / square 1200\xD71200 / logo 1200\xD71200\uFF09\n\n \u7528\u6CD5\uFF1A\n # \u5355\u56FE\u81EA\u52A8\u6D3E\u751F\u4E09\u79CD\u683C\u5F0F\n siluzan-tso ad pmax-image-convert --input ./banner.jpg --output-dir ./assets --prefix my-camp\n # \u5206\u522B\u6307\u5B9A\u5404\u56FE\uFF0C\u5E76\u5C06\u8DEF\u5F84\u5199\u56DE pmax.json\n siluzan-tso ad pmax-image-convert --input-marketing ./hero.jpg --input-logo ./logo.png \\\n --output-dir ./assets --update-config ./pmax.json"
115897
115908
  ).option("--input <path>", "\u4E3B\u8F93\u5165\u56FE\uFF08\u7528\u4E8E\u6240\u6709\u672A\u5355\u72EC\u6307\u5B9A\u7684\u7C7B\u578B\uFF09").option("--input-marketing <path>", "\u6A2A\u56FE\u8F93\u5165\uFF08\u4F18\u5148\u4E8E --input\uFF09").option("--input-square <path>", "\u65B9\u56FE\u8F93\u5165\uFF08\u4F18\u5148\u4E8E --input\uFF09").option("--input-logo <path>", "Logo \u8F93\u5165\uFF08\u4F18\u5148\u4E8E --input\uFF09").option("--output-dir <dir>", "\u8F93\u51FA\u76EE\u5F55\uFF08\u9ED8\u8BA4\u4E0E\u8F93\u5165\u56FE\u540C\u76EE\u5F55\uFF09").option("--prefix <name>", "\u8F93\u51FA\u6587\u4EF6\u540D\u524D\u7F00\uFF08\u9ED8\u8BA4\u53D6\u8F93\u5165\u56FE\u6587\u4EF6\u540D\uFF09").option("--quality <n>", "JPEG \u8D28\u91CF 1\u2013100\uFF08\u9ED8\u8BA4 85\uFF09", (v) => parseInt(v, 10)).option("--logo-use-cover", "Logo \u4F7F\u7528 cover \u88C1\u5207\uFF08\u9ED8\u8BA4 contain + \u767D\u5E95\uFF09", false).option("--update-config <path>", "\u5C06\u751F\u6210\u7684 imagePaths \u5199\u56DE\u6307\u5B9A pmax.json \u914D\u7F6E\u6587\u4EF6").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
@@ -115972,7 +115983,6 @@ function register20(program2) {
115972
115983
  assetName: opts.assetName,
115973
115984
  bodyFile: opts.bodyFile,
115974
115985
  token: opts.token,
115975
- json: opts.json,
115976
115986
  jsonOut: opts.jsonOut,
115977
115987
  verbose: opts.verbose
115978
115988
  });
@@ -116014,7 +116024,6 @@ function register20(program2) {
116014
116024
  source: src,
116015
116025
  limit: opts.limit,
116016
116026
  token: opts.token,
116017
- json: opts.json,
116018
116027
  jsonOut: opts.jsonOut,
116019
116028
  verbose: opts.verbose
116020
116029
  });
@@ -116034,7 +116043,6 @@ function register20(program2) {
116034
116043
  name: opts.name,
116035
116044
  bodyFile: opts.bodyFile,
116036
116045
  token: opts.token,
116037
- json: opts.json,
116038
116046
  jsonOut: opts.jsonOut,
116039
116047
  verbose: opts.verbose
116040
116048
  });
@@ -116053,7 +116061,6 @@ function register20(program2) {
116053
116061
  endDate: opts.end,
116054
116062
  campaignId: opts.campaignId,
116055
116063
  token: opts.token,
116056
- json: opts.json,
116057
116064
  jsonOut: opts.jsonOut,
116058
116065
  verbose: opts.verbose
116059
116066
  });
@@ -116072,16 +116079,14 @@ function register20(program2) {
116072
116079
  clickGreater: opts.clickGreater,
116073
116080
  conversionsGreater: opts.conversionsGreater,
116074
116081
  token: opts.token,
116075
- json: opts.json,
116076
116082
  jsonOut: opts.jsonOut,
116077
116083
  verbose: opts.verbose
116078
116084
  });
116079
116085
  }
116080
116086
  );
116081
- adCmd.command("campaign-bidding-strategies").description("\u5217\u51FA\u7F51\u5173\u652F\u6301\u7684\u51FA\u4EF7\u7B56\u7565\u7C7B\u578B\uFF08GET campaignmanagement/biddingStrategyList\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
116087
+ adCmd.command("campaign-bidding-strategies").description("\u5217\u51FA\u7F51\u5173\u652F\u6301\u7684\u51FA\u4EF7\u7B56\u7565\u7C7B\u578B\uFF08GET campaignmanagement/biddingStrategyList\uFF09").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(async (opts) => {
116082
116088
  await runAdCampaignBiddingStrategies({
116083
116089
  token: opts.token,
116084
- json: opts.json,
116085
116090
  verbose: opts.verbose
116086
116091
  });
116087
116092
  });
@@ -116195,9 +116200,9 @@ function register20(program2) {
116195
116200
  });
116196
116201
  }
116197
116202
  );
116198
- adCmd.command("keyword-delete").description("\u5220\u9664\u641C\u7D22\u5173\u952E\u8BCD").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--id <keywordId>", "\u5173\u952E\u8BCD ID\uFF08\u6765\u81EA ad keywords --json \u2192 id\uFF09").requiredOption(
116203
+ adCmd.command("keyword-delete").description("\u5220\u9664\u641C\u7D22\u5173\u952E\u8BCD").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--id <keywordId>", "\u5173\u952E\u8BCD ID\uFF08\u6765\u81EA ad keywords --json-out \u2192 id\uFF09").requiredOption(
116199
116204
  "--adgroup-id <id>",
116200
- "\u5173\u952E\u8BCD\u6240\u5C5E\u5E7F\u544A\u7EC4 ID\uFF08\u6765\u81EA ad keywords --json \u2192 adGroupId\uFF09"
116205
+ "\u5173\u952E\u8BCD\u6240\u5C5E\u5E7F\u544A\u7EC4 ID\uFF08\u6765\u81EA ad keywords --json-out \u2192 adGroupId\uFF09"
116201
116206
  ).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116202
116207
  async (opts) => {
116203
116208
  await runAdKeywordDelete({
@@ -116209,7 +116214,7 @@ function register20(program2) {
116209
116214
  });
116210
116215
  }
116211
116216
  );
116212
- adCmd.command("keyword-edit").description("\u7F16\u8F91\u641C\u7D22\u5173\u952E\u8BCD\uFF08\u6570\u7EC4 body\uFF0C\u5148 list \u518D\u5408\u5E76\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--id <keywordId>", "\u5173\u952E\u8BCD ID\uFF08\u6765\u81EA ad keywords --json \u2192 id\uFF09").option("--text <text>", "\u65B0\u5173\u952E\u8BCD\u6587\u672C\uFF08\u5199\u5165 keywordText \u6570\u7EC4\uFF09").option(
116217
+ adCmd.command("keyword-edit").description("\u7F16\u8F91\u641C\u7D22\u5173\u952E\u8BCD\uFF08\u6570\u7EC4 body\uFF0C\u5148 list \u518D\u5408\u5E76\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--id <keywordId>", "\u5173\u952E\u8BCD ID\uFF08\u6765\u81EA ad keywords --json-out \u2192 id\uFF09").option("--text <text>", "\u65B0\u5173\u952E\u8BCD\u6587\u672C\uFF08\u5199\u5165 keywordText \u6570\u7EC4\uFF09").option(
116213
116218
  "--match-type <type>",
116214
116219
  '\u65B0\u5339\u914D\u7C7B\u578B\uFF1ABroad | Phrase | Exact\uFF08\u5199 matchTypeV2\uFF0C\u5E76\u9ED8\u8BA4\u540C\u6B65\u6539\u5199 keywordText \u4E3A\u8BCD\u5E72/"\u8BCD"/[\u8BCD] \u4EE5\u7B26\u5408\u7F51\u5173\u63A8\u65AD\uFF09'
116215
116220
  ).option(
@@ -116248,7 +116253,7 @@ function register20(program2) {
116248
116253
  });
116249
116254
  }
116250
116255
  );
116251
- adCmd.command("keyword-status").description("\u5207\u6362\u641C\u7D22\u5173\u952E\u8BCD\u72B6\u6001\uFF08Enabled / Paused\uFF0C\u5199\u5165 userStatusV2\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--id <keywordId>", "\u5173\u952E\u8BCD ID\uFF08\u6765\u81EA ad keywords --json \u2192 id\uFF09").requiredOption("--status <status>", "\u76EE\u6807\u72B6\u6001\uFF1AEnabled | Paused").option("--start <date>", "\u5217\u8868\u67E5\u8BE2\u8D77\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u5217\u8868\u67E5\u8BE2\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116256
+ adCmd.command("keyword-status").description("\u5207\u6362\u641C\u7D22\u5173\u952E\u8BCD\u72B6\u6001\uFF08Enabled / Paused\uFF0C\u5199\u5165 userStatusV2\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--id <keywordId>", "\u5173\u952E\u8BCD ID\uFF08\u6765\u81EA ad keywords --json-out \u2192 id\uFF09").requiredOption("--status <status>", "\u76EE\u6807\u72B6\u6001\uFF1AEnabled | Paused").option("--start <date>", "\u5217\u8868\u67E5\u8BE2\u8D77\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u5217\u8868\u67E5\u8BE2\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116252
116257
  async (opts) => {
116253
116258
  if (opts.status !== "Enabled" && opts.status !== "Paused") {
116254
116259
  console.error("\n\u274C --status \u53EA\u63A5\u53D7 Enabled \u6216 Paused\n");
@@ -116265,7 +116270,7 @@ function register20(program2) {
116265
116270
  });
116266
116271
  }
116267
116272
  );
116268
- adCmd.command("keyword-negative-edit").description("\u7F16\u8F91\u5426\u5B9A\u5173\u952E\u8BCD\uFF08\u6587\u672C\u6216\u5339\u914D\u7C7B\u578B\uFF0C\u81F3\u5C11\u4F20\u4E00\u4E2A\u4FEE\u6539\u9879\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--id <keywordId>", "\u5426\u5B9A\u5173\u952E\u8BCD ID\uFF08\u6765\u81EA ad keywords --negative --json \u2192 id\uFF09").option("--text <text>", "\u65B0\u5173\u952E\u8BCD\u6587\u672C").option(
116273
+ adCmd.command("keyword-negative-edit").description("\u7F16\u8F91\u5426\u5B9A\u5173\u952E\u8BCD\uFF08\u6587\u672C\u6216\u5339\u914D\u7C7B\u578B\uFF0C\u81F3\u5C11\u4F20\u4E00\u4E2A\u4FEE\u6539\u9879\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--id <keywordId>", "\u5426\u5B9A\u5173\u952E\u8BCD ID\uFF08\u6765\u81EA ad keywords --negative --json-out \u2192 id\uFF09").option("--text <text>", "\u65B0\u5173\u952E\u8BCD\u6587\u672C").option(
116269
116274
  "--match-type <type>",
116270
116275
  '\u65B0\u5339\u914D\u7C7B\u578B\uFF1ABroad | Phrase | Exact\uFF08\u5199 matchTypeV2\uFF0C\u5E76\u9ED8\u8BA4\u540C\u6B65\u6539\u5199 keywordText \u4E3A\u8BCD\u5E72/"\u8BCD"/[\u8BCD]\uFF09'
116271
116276
  ).option("--start <date>", "\u5217\u8868\u67E5\u8BE2\u8D77\u59CB\u65E5\u671F YYYY-MM-DD").option("--end <date>", "\u5217\u8868\u67E5\u8BE2\u7ED3\u675F\u65E5\u671F YYYY-MM-DD").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
@@ -116287,9 +116292,9 @@ function register20(program2) {
116287
116292
  }
116288
116293
  );
116289
116294
  const extensionCmd = adCmd.command("extension").description("\u9644\u52A0\u4FE1\u606F\u7BA1\u7406\uFF08\u9644\u52A0\u94FE\u63A5/\u7535\u8BDD/\u5BA3\u4F20\u4FE1\u606F/\u7ED3\u6784\u5316\u6458\u8981\uFF09");
116290
- extensionCmd.command("list").description("\u67E5\u8BE2\u9644\u52A0\u4FE1\u606F\u5217\u8868").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--type <type>", "\u6309\u7C7B\u578B\u7B5B\u9009\uFF1ASITELINK | CALL | CALLOUT | STRUCTURED_SNIPPET").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
116295
+ extensionCmd.command("list").description("\u67E5\u8BE2\u9644\u52A0\u4FE1\u606F\u5217\u8868").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--type <type>", "\u6309\u7C7B\u578B\u7B5B\u9009\uFF1ASITELINK | CALL | CALLOUT | STRUCTURED_SNIPPET").option("-t, --token <token>", "Auth Token").option(
116291
116296
  "--json-out <path>",
116292
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
116297
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
116293
116298
  void 0
116294
116299
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116295
116300
  async (opts) => {
@@ -116297,15 +116302,14 @@ function register20(program2) {
116297
116302
  token: opts.token,
116298
116303
  account: opts.account,
116299
116304
  type: opts.type,
116300
- json: opts.json,
116301
116305
  jsonOut: opts.jsonOut,
116302
116306
  verbose: opts.verbose
116303
116307
  });
116304
116308
  }
116305
116309
  );
116306
- extensionCmd.command("sitelink").description("\u6DFB\u52A0\u9644\u52A0\u94FE\u63A5\uFF08SITELINK\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--text <text>", "\u94FE\u63A5\u6587\u5B57\uFF08\u663E\u793A\u6587\u672C\uFF09").requiredOption("--url <url>", "\u76EE\u6807\u94FE\u63A5 URL").option("--line2 <text>", "\u94FE\u63A5\u63CF\u8FF0\u884C1").option("--line3 <text>", "\u94FE\u63A5\u63CF\u8FF0\u884C2").option("--level <level>", "\u5C42\u7EA7\uFF1AAccount | Campaign | AdGroup\uFF08\u9ED8\u8BA4 Account\uFF09", "Account").option("--campaign-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7CFB\u5217 ID\uFF08level=Campaign \u65F6\u5FC5\u4F20\uFF09").option("--adgroup-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7EC4 ID\uFF08level=AdGroup \u65F6\u5FC5\u4F20\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u7F51\u5173\u8FD4\u56DE\u7684\u6269\u5C55\u5BF9\u8C61\uFF08\u542B id \u7B49\u5B57\u6BB5\uFF09", false).option(
116310
+ extensionCmd.command("sitelink").description("\u6DFB\u52A0\u9644\u52A0\u94FE\u63A5\uFF08SITELINK\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--text <text>", "\u94FE\u63A5\u6587\u5B57\uFF08\u663E\u793A\u6587\u672C\uFF09").requiredOption("--url <url>", "\u76EE\u6807\u94FE\u63A5 URL").option("--line2 <text>", "\u94FE\u63A5\u63CF\u8FF0\u884C1").option("--line3 <text>", "\u94FE\u63A5\u63CF\u8FF0\u884C2").option("--level <level>", "\u5C42\u7EA7\uFF1AAccount | Campaign | AdGroup\uFF08\u9ED8\u8BA4 Account\uFF09", "Account").option("--campaign-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7CFB\u5217 ID\uFF08level=Campaign \u65F6\u5FC5\u4F20\uFF09").option("--adgroup-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7EC4 ID\uFF08level=AdGroup \u65F6\u5FC5\u4F20\uFF09").option("-t, --token <token>", "Auth Token").option(
116307
116311
  "--json-out <path>",
116308
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09",
116312
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json",
116309
116313
  void 0
116310
116314
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116311
116315
  async (opts) => {
@@ -116320,15 +116324,14 @@ function register20(program2) {
116320
116324
  url: opts.url,
116321
116325
  line2: opts.line2,
116322
116326
  line3: opts.line3,
116323
- json: opts.json,
116324
116327
  jsonOut: opts.jsonOut,
116325
116328
  verbose: opts.verbose
116326
116329
  });
116327
116330
  }
116328
116331
  );
116329
- extensionCmd.command("call").description("\u6DFB\u52A0\u9644\u52A0\u7535\u8BDD\uFF08CALL\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--country-code <code>", "\u56FD\u5BB6\u7801\uFF0C\u5982 +86").requiredOption("--phone <phone>", "\u7535\u8BDD\u53F7\u7801").option("--level <level>", "\u5C42\u7EA7\uFF1AAccount | Campaign | AdGroup\uFF08\u9ED8\u8BA4 Account\uFF09", "Account").option("--campaign-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7CFB\u5217 ID").option("--adgroup-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7EC4 ID").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u7F51\u5173\u8FD4\u56DE\u7684\u6269\u5C55\u5BF9\u8C61\uFF08\u542B id \u7B49\u5B57\u6BB5\uFF09", false).option(
116332
+ extensionCmd.command("call").description("\u6DFB\u52A0\u9644\u52A0\u7535\u8BDD\uFF08CALL\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--country-code <code>", "\u56FD\u5BB6\u7801\uFF0C\u5982 +86").requiredOption("--phone <phone>", "\u7535\u8BDD\u53F7\u7801").option("--level <level>", "\u5C42\u7EA7\uFF1AAccount | Campaign | AdGroup\uFF08\u9ED8\u8BA4 Account\uFF09", "Account").option("--campaign-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7CFB\u5217 ID").option("--adgroup-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7EC4 ID").option("-t, --token <token>", "Auth Token").option(
116330
116333
  "--json-out <path>",
116331
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09",
116334
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json",
116332
116335
  void 0
116333
116336
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116334
116337
  async (opts) => {
@@ -116341,15 +116344,14 @@ function register20(program2) {
116341
116344
  adGroupId: opts.adgroupId,
116342
116345
  countryCode: opts.countryCode,
116343
116346
  phoneNumber: opts.phone,
116344
- json: opts.json,
116345
116347
  jsonOut: opts.jsonOut,
116346
116348
  verbose: opts.verbose
116347
116349
  });
116348
116350
  }
116349
116351
  );
116350
- extensionCmd.command("callout").description("\u6DFB\u52A0\u9644\u52A0\u5BA3\u4F20\u4FE1\u606F\uFF08CALLOUT\uFF0C\u6700\u591A 25 \u5B57\u7B26\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--text <text>", "\u5BA3\u4F20\u6587\u5B57\uFF08\u6700\u591A 25 \u5B57\u7B26\uFF09").option("--level <level>", "\u5C42\u7EA7\uFF1AAccount | Campaign | AdGroup\uFF08\u9ED8\u8BA4 Account\uFF09", "Account").option("--campaign-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7CFB\u5217 ID").option("--adgroup-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7EC4 ID").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u7F51\u5173\u8FD4\u56DE\u7684\u6269\u5C55\u5BF9\u8C61\uFF08\u542B id \u7B49\u5B57\u6BB5\uFF09", false).option(
116352
+ extensionCmd.command("callout").description("\u6DFB\u52A0\u9644\u52A0\u5BA3\u4F20\u4FE1\u606F\uFF08CALLOUT\uFF0C\u6700\u591A 25 \u5B57\u7B26\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--text <text>", "\u5BA3\u4F20\u6587\u5B57\uFF08\u6700\u591A 25 \u5B57\u7B26\uFF09").option("--level <level>", "\u5C42\u7EA7\uFF1AAccount | Campaign | AdGroup\uFF08\u9ED8\u8BA4 Account\uFF09", "Account").option("--campaign-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7CFB\u5217 ID").option("--adgroup-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7EC4 ID").option("-t, --token <token>", "Auth Token").option(
116351
116353
  "--json-out <path>",
116352
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09",
116354
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json",
116353
116355
  void 0
116354
116356
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116355
116357
  async (opts) => {
@@ -116361,7 +116363,6 @@ function register20(program2) {
116361
116363
  campaignId: opts.campaignId,
116362
116364
  adGroupId: opts.adgroupId,
116363
116365
  text: opts.text,
116364
- json: opts.json,
116365
116366
  jsonOut: opts.jsonOut,
116366
116367
  verbose: opts.verbose
116367
116368
  });
@@ -116371,9 +116372,9 @@ function register20(program2) {
116371
116372
  "--values <v1,v2,...>",
116372
116373
  "\u6458\u8981\u503C\u5217\u8868\uFF0C\u9017\u53F7\u5206\u9694\uFF08\u81F3\u5C11 3 \u4E2A\uFF09",
116373
116374
  (v) => v.split(",").map((s) => s.trim())
116374
- ).option("--level <level>", "\u5C42\u7EA7\uFF1AAccount | Campaign | AdGroup\uFF08\u9ED8\u8BA4 Account\uFF09", "Account").option("--campaign-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7CFB\u5217 ID").option("--adgroup-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7EC4 ID").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u7F51\u5173\u8FD4\u56DE\u7684\u6269\u5C55\u5BF9\u8C61\uFF08\u542B id \u7B49\u5B57\u6BB5\uFF09", false).option(
116375
+ ).option("--level <level>", "\u5C42\u7EA7\uFF1AAccount | Campaign | AdGroup\uFF08\u9ED8\u8BA4 Account\uFF09", "Account").option("--campaign-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7CFB\u5217 ID").option("--adgroup-id <id>", "\u6240\u5C5E\u5E7F\u544A\u7EC4 ID").option("-t, --token <token>", "Auth Token").option(
116375
116376
  "--json-out <path>",
116376
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09",
116377
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json",
116377
116378
  void 0
116378
116379
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116379
116380
  async (opts) => {
@@ -116386,7 +116387,6 @@ function register20(program2) {
116386
116387
  adGroupId: opts.adgroupId,
116387
116388
  snippetHeader: opts.header,
116388
116389
  snippetValues: opts.values,
116389
- json: opts.json,
116390
116390
  jsonOut: opts.jsonOut,
116391
116391
  verbose: opts.verbose
116392
116392
  });
@@ -116400,9 +116400,9 @@ function register20(program2) {
116400
116400
  verbose: opts.verbose
116401
116401
  });
116402
116402
  });
116403
- adCmd.command("search-terms").description("\u67E5\u8BE2\u641C\u7D22\u5B57\u8BCD\u62A5\u544A\uFF08\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
116403
+ adCmd.command("search-terms").description("\u67E5\u8BE2\u641C\u7D22\u5B57\u8BCD\u62A5\u544A\uFF08\u65E5\u671F\u9ED8\u8BA4\u8FD1 30 \u5929\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF09").option("-t, --token <token>", "Auth Token").option(
116404
116404
  "--json-out <path>",
116405
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
116405
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
116406
116406
  void 0
116407
116407
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116408
116408
  async (opts) => {
@@ -116411,7 +116411,6 @@ function register20(program2) {
116411
116411
  account: opts.account,
116412
116412
  startDate: opts.start,
116413
116413
  endDate: opts.end,
116414
- json: opts.json,
116415
116414
  jsonOut: opts.jsonOut,
116416
116415
  verbose: opts.verbose
116417
116416
  });
@@ -116428,9 +116427,9 @@ function register20(program2) {
116428
116427
  });
116429
116428
  geoCmd.command("list").description(
116430
116429
  "\u67E5\u8BE2\u5730\u7406\u4F4D\u7F6E\u5B9A\u5411\u5217\u8868\uFF08targeted = \u5DF2\u5B9A\u4F4D\uFF1Bexcluded = \u5DF2\u6392\u9664\uFF1Breport = \u6D88\u8017\u62A5\u544A\uFF0C\u53EF\u9009\u6309\u5E7F\u544A\u7CFB\u5217\u8FC7\u6EE4\uFF09"
116431
- ).requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--mode <mode>", "\u5217\u8868\u7C7B\u578B\uFF1Atargeted | excluded | report\uFF08\u9ED8\u8BA4 targeted\uFF09", "targeted").option("--campaign-id <id>", "\u53EF\u9009\uFF1A\u6309\u5E7F\u544A\u7CFB\u5217 ID \u8FC7\u6EE4\u7ED3\u679C\uFF08\u6765\u81EA ad campaigns\uFF09").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF0C\u6240\u6709\u6A21\u5F0F\u751F\u6548\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF0C\u6240\u6709\u6A21\u5F0F\u751F\u6548\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
116430
+ ).requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--mode <mode>", "\u5217\u8868\u7C7B\u578B\uFF1Atargeted | excluded | report\uFF08\u9ED8\u8BA4 targeted\uFF09", "targeted").option("--campaign-id <id>", "\u53EF\u9009\uFF1A\u6309\u5E7F\u544A\u7CFB\u5217 ID \u8FC7\u6EE4\u7ED3\u679C\uFF08\u6765\u81EA ad campaigns\uFF09").option("--start <date>", "\u5F00\u59CB\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4 30 \u5929\u524D\uFF0C\u6240\u6709\u6A21\u5F0F\u751F\u6548\uFF09").option("--end <date>", "\u7ED3\u675F\u65E5\u671F YYYY-MM-DD\uFF08\u9ED8\u8BA4\u4ECA\u5929\uFF0C\u6240\u6709\u6A21\u5F0F\u751F\u6548\uFF09").option("-t, --token <token>", "Auth Token").option(
116432
116431
  "--json-out <path>",
116433
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
116432
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
116434
116433
  void 0
116435
116434
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116436
116435
  async (opts) => {
@@ -116445,7 +116444,6 @@ function register20(program2) {
116445
116444
  campaignId: opts.campaignId,
116446
116445
  startDate: opts.start,
116447
116446
  endDate: opts.end,
116448
- json: opts.json,
116449
116447
  jsonOut: opts.jsonOut,
116450
116448
  verbose: opts.verbose
116451
116449
  });
@@ -116464,7 +116462,7 @@ function register20(program2) {
116464
116462
  });
116465
116463
  }
116466
116464
  );
116467
- geoCmd.command("remove").description("\u79FB\u9664\u5730\u7406\u4F4D\u7F6E\u5B9A\u5411\uFF08\u666E\u901A\u5B9A\u4F4D\u4E0E\u6392\u9664\u5B9A\u4F4D\u5747\u901A\u8FC7\u6B64\u547D\u4EE4\u5220\u9664\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--campaign-id <id>", "\u5E7F\u544A\u7CFB\u5217 ID").requiredOption("--location-id <id>", "\u5730\u7406\u4F4D\u7F6E ID\uFF08\u6765\u81EA geo list --json \u2192 id\uFF09").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116465
+ geoCmd.command("remove").description("\u79FB\u9664\u5730\u7406\u4F4D\u7F6E\u5B9A\u5411\uFF08\u666E\u901A\u5B9A\u4F4D\u4E0E\u6392\u9664\u5B9A\u4F4D\u5747\u901A\u8FC7\u6B64\u547D\u4EE4\u5220\u9664\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").requiredOption("--campaign-id <id>", "\u5E7F\u544A\u7CFB\u5217 ID").requiredOption("--location-id <id>", "\u5730\u7406\u4F4D\u7F6E ID\uFF08\u6765\u81EA geo list --json-out \u2192 id\uFF09").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116468
116466
  async (opts) => {
116469
116467
  await runAdGeoRemove({
116470
116468
  token: opts.token,
@@ -116481,7 +116479,7 @@ function register20(program2) {
116481
116479
  "--bid-modifier <n>",
116482
116480
  "Google \u51FA\u4EF7\u500D\u7387\uFF1A1.0=\u4E0D\u8C03\u6574\uFF0C1.2=+20%\uFF0C0.8=-20%",
116483
116481
  parseFloat
116484
- ).option("--criterion-id <id>", "campaign_criterion id\uFF08geo list --mode targeted --json \u2192 id\uFF09").option("--location-id <id>", "\u5730\u7406\u4F4D\u7F6E ID\uFF08\u4E0E list/search \u7684 id \u76F8\u540C\uFF1B\u4E0E --criterion-id \u4E8C\u9009\u4E00\uFF09").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116482
+ ).option("--criterion-id <id>", "campaign_criterion id\uFF08geo list --mode targeted --json-out \u2192 id\uFF09").option("--location-id <id>", "\u5730\u7406\u4F4D\u7F6E ID\uFF08\u4E0E list/search \u7684 id \u76F8\u540C\uFF1B\u4E0E --criterion-id \u4E8C\u9009\u4E00\uFF09").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116485
116483
  async (opts) => {
116486
116484
  if (!opts.criterionId && !opts.locationId) {
116487
116485
  console.error("\n\u274C \u987B\u6307\u5B9A --criterion-id \u6216 --location-id\n");
@@ -116503,9 +116501,9 @@ function register20(program2) {
116503
116501
  }
116504
116502
  );
116505
116503
  const deviceBidCmd = adCmd.command("device-bid").description("\u8BBE\u5907\u51FA\u4EF7\u8C03\u6574\uFF08\u7CFB\u5217\u7EA7 / \u5E7F\u544A\u7EC4\u7EA7\uFF1B\u4E0E\u524D\u7AEF updateDeviceAndAddress \u540C\u6E90\uFF09");
116506
- deviceBidCmd.command("list").description("\u67E5\u8BE2\u8BBE\u5907\u51FA\u4EF7\u8C03\u6574\u5217\u8868\uFF08\u7CFB\u5217\u7EA7\u9ED8\u8BA4\uFF1B\u5E7F\u544A\u7EC4\u7EA7\u9700 --level adgroup\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--level <level>", "campaign | adgroup\uFF08\u9ED8\u8BA4 campaign\uFF09", "campaign").option("--campaign-id <id>", "\u53EF\u9009\uFF1A\u6309\u5E7F\u544A\u7CFB\u5217\u8FC7\u6EE4\uFF08\u7CFB\u5217\u7EA7\uFF09\u6216\u5FC5\u586B\u4E0A\u4E0B\u6587\uFF08\u5E7F\u544A\u7EC4\u7EA7\uFF09").option("--ad-group-id <id>", "\u5E7F\u544A\u7EC4 ID\uFF08--level adgroup \u65F6\u5FC5\u586B\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
116504
+ deviceBidCmd.command("list").description("\u67E5\u8BE2\u8BBE\u5907\u51FA\u4EF7\u8C03\u6574\u5217\u8868\uFF08\u7CFB\u5217\u7EA7\u9ED8\u8BA4\uFF1B\u5E7F\u544A\u7EC4\u7EA7\u9700 --level adgroup\uFF09").requiredOption("-a, --account <id>", "Google \u8D26\u6237 mediaCustomerId").option("--level <level>", "campaign | adgroup\uFF08\u9ED8\u8BA4 campaign\uFF09", "campaign").option("--campaign-id <id>", "\u53EF\u9009\uFF1A\u6309\u5E7F\u544A\u7CFB\u5217\u8FC7\u6EE4\uFF08\u7CFB\u5217\u7EA7\uFF09\u6216\u5FC5\u586B\u4E0A\u4E0B\u6587\uFF08\u5E7F\u544A\u7EC4\u7EA7\uFF09").option("--ad-group-id <id>", "\u5E7F\u544A\u7EC4 ID\uFF08--level adgroup \u65F6\u5FC5\u586B\uFF09").option("-t, --token <token>", "Auth Token").option(
116507
116505
  "--json-out <path>",
116508
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09",
116506
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json",
116509
116507
  void 0
116510
116508
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116511
116509
  async (opts) => {
@@ -116519,7 +116517,6 @@ function register20(program2) {
116519
116517
  level: opts.level,
116520
116518
  campaignId: opts.campaignId,
116521
116519
  adGroupId: opts.adGroupId,
116522
- json: opts.json,
116523
116520
  jsonOut: opts.jsonOut,
116524
116521
  verbose: opts.verbose
116525
116522
  });
@@ -116531,7 +116528,7 @@ function register20(program2) {
116531
116528
  "--bid-modifier <n>",
116532
116529
  "\u51FA\u4EF7\u500D\u7387\uFF081.0=\u57FA\u51C6\uFF1B0.8=-20%\uFF1B1.2=+20%\uFF1B0=\u6392\u9664\u8BE5\u8BBE\u5907\uFF09",
116533
116530
  parseFloat
116534
- ).option("--level <level>", "campaign | adgroup\uFF08\u9ED8\u8BA4 campaign\uFF09", "campaign").option("--ad-group-id <id>", "\u5E7F\u544A\u7EC4 ID\uFF08--level adgroup \u65F6\u5FC5\u586B\uFF09").option("--criterion-id <id>", "\u8BBE\u5907\u51FA\u4EF7 criterion id\uFF08\u6765\u81EA list --json \u2192 id\uFF09").option("--device-type <type>", "\u8BBE\u5907\u7C7B\u578B\uFF1AMobile | Desktop | Tablet\uFF08\u4E0E --criterion-id \u4E8C\u9009\u4E00\uFF09").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116531
+ ).option("--level <level>", "campaign | adgroup\uFF08\u9ED8\u8BA4 campaign\uFF09", "campaign").option("--ad-group-id <id>", "\u5E7F\u544A\u7EC4 ID\uFF08--level adgroup \u65F6\u5FC5\u586B\uFF09").option("--criterion-id <id>", "\u8BBE\u5907\u51FA\u4EF7 criterion id\uFF08\u6765\u81EA list --json-out \u2192 id\uFF09").option("--device-type <type>", "\u8BBE\u5907\u7C7B\u578B\uFF1AMobile | Desktop | Tablet\uFF08\u4E0E --criterion-id \u4E8C\u9009\u4E00\uFF09").option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
116535
116532
  async (opts) => {
116536
116533
  if (!["campaign", "adgroup"].includes(opts.level)) {
116537
116534
  console.error("\n\u274C --level \u53EA\u63A5\u53D7 campaign | adgroup\n");
@@ -116556,6 +116553,12 @@ function register20(program2) {
116556
116553
  );
116557
116554
  }
116558
116555
 
116556
+ // src/utils/cli-json-out-option.ts
116557
+ var JSON_OUT_DESC = "\u843D\u76D8 JSON + outline + cli-manifest[-<\u67E5\u8BE2id>].json\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF08\u542B outlineFile\uFF09";
116558
+ function attachJsonOutOption(cmd) {
116559
+ cmd.option("--json-out <path>", JSON_OUT_DESC);
116560
+ }
116561
+
116559
116562
  // src/commands/keyword.ts
116560
116563
  init_auth();
116561
116564
  init_cli_json_snapshot();
@@ -116770,7 +116773,7 @@ async function runKeywordSuggest(opts) {
116770
116773
  console.error(
116771
116774
  `
116772
116775
  \u274C \u8D26\u6237 ${accountId} \u7F3A\u5C11 currencyCode\uFF0C\u65E0\u6CD5\u6807\u6CE8\u51FA\u4EF7\u5E01\u79CD\u3002
116773
- \u8BF7\u7528 list-accounts -m Google -k ` + accountId + " --json \u786E\u8BA4\u8D26\u6237\u6570\u636E\u3002\n"
116776
+ \u8BF7\u7528 list-accounts -m Google -k ` + accountId + " --json-out \u786E\u8BA4\u8D26\u6237\u6570\u636E\u3002\n"
116774
116777
  );
116775
116778
  process.exit(1);
116776
116779
  }
@@ -116931,7 +116934,8 @@ function microsItemToBidAmounts(item) {
116931
116934
  };
116932
116935
  }
116933
116936
  function attachBaseCliOptions(cmd) {
116934
- cmd.option("--json", "\u8F93\u51FA\u539F\u59CB JSON\uFF08stdout\uFF09").option("--json-out <path>", "JSON \u8F93\u51FA\u6587\u4EF6\u8DEF\u5F84\uFF08\u66FF\u4EE3 --json\uFF09").option("--verbose", "\u8F93\u51FA\u8BE6\u7EC6\u9519\u8BEF\u5806\u6808").option("--token <jwt>", "\u4E34\u65F6\u4F7F\u7528\u7684 JWT Token\uFF08\u8986\u76D6 ~/.siluzan/config.json\uFF09");
116937
+ attachJsonOutOption(cmd);
116938
+ cmd.option("--verbose", "\u8F93\u51FA\u8BE6\u7EC6\u9519\u8BEF\u5806\u6808").option("--token <jwt>", "\u4E34\u65F6\u4F7F\u7528\u7684 JWT Token\uFF08\u8986\u76D6 ~/.siluzan/config.json\uFF09");
116935
116939
  }
116936
116940
  function splitKeywordSeeds(raw) {
116937
116941
  return raw.split(",").map((s) => s.trim()).filter(Boolean);
@@ -116957,7 +116961,6 @@ function register21(program2) {
116957
116961
  include: opts.include,
116958
116962
  exclude: opts.exclude,
116959
116963
  googleOnly: opts.googleOnly,
116960
- json: opts.json,
116961
116964
  jsonOut: opts.jsonOut,
116962
116965
  verbose: opts.verbose
116963
116966
  });
@@ -116971,7 +116974,6 @@ function register21(program2) {
116971
116974
  token: opts.token,
116972
116975
  countryCode: opts.countryCode,
116973
116976
  nameContains: opts.nameContains,
116974
- json: opts.json,
116975
116977
  jsonOut: opts.jsonOut,
116976
116978
  verbose: opts.verbose
116977
116979
  });
@@ -116980,6 +116982,7 @@ function register21(program2) {
116980
116982
 
116981
116983
  // src/commands/rag.ts
116982
116984
  init_auth();
116985
+ init_cli_json_snapshot();
116983
116986
  function splitCsv2(s) {
116984
116987
  if (!s) return [];
116985
116988
  return s.split(",").map((x) => x.trim()).filter(Boolean);
@@ -117244,8 +117247,8 @@ async function runRagQuery(options) {
117244
117247
  process.exit(1);
117245
117248
  }
117246
117249
  }
117247
- const payload = unwrapQueryKnowledges(raw);
117248
- const rawOutput = Array.isArray(payload.output) ? payload.output : [];
117250
+ const payload2 = unwrapQueryKnowledges(raw);
117251
+ const rawOutput = Array.isArray(payload2.output) ? payload2.output : [];
117249
117252
  return normalizeRagScores(rawOutput);
117250
117253
  }
117251
117254
  let output;
@@ -117255,28 +117258,24 @@ async function runRagQuery(options) {
117255
117258
  } else {
117256
117259
  output = await fetchKnowledgesOne(subQueries[0]);
117257
117260
  }
117258
- if (options.json) {
117259
- console.log(
117260
- JSON.stringify(
117261
- {
117262
- query: queryTxt,
117263
- ...multiKeyword ? { subQueries, mergedCap } : {},
117264
- belongToId,
117265
- tags: tagList,
117266
- topK: clamped,
117267
- output,
117268
- partition
117269
- },
117270
- null,
117271
- 2
117272
- )
117273
- );
117274
- return;
117275
- }
117276
117261
  if (output.length === 0) {
117277
117262
  console.log("\n\u672A\u68C0\u7D22\u5230\u5339\u914D\u7247\u6BB5\uFF08\u53EF\u5C1D\u8BD5\u653E\u5BBD --top-k \u6216\u8C03\u6574\u5173\u952E\u8BCD/\u8303\u56F4\uFF09\u3002\n");
117278
117263
  return;
117279
117264
  }
117265
+ const payload = {
117266
+ query: queryTxt,
117267
+ belongToId,
117268
+ topK: clamped,
117269
+ multiKeyword,
117270
+ subQueries: multiKeyword ? subQueries : void 0,
117271
+ output
117272
+ };
117273
+ if (await emitCliJsonOrSnapshot(
117274
+ { jsonOut: options.jsonOut },
117275
+ { section: "rag-query", commandLabel: "rag query", payload }
117276
+ )) {
117277
+ return;
117278
+ }
117280
117279
  const modeHint = multiKeyword ? ` \xB7 \u5206\u8BCD\u5408\u5E76\u2264${mergedCap}\u6761` : "";
117281
117280
  const header = `> \u77E5\u8BC6\u5E93\u68C0\u7D22 \xB7 topK=${clamped}${modeHint} \xB7 \u7528\u4E8E\u5E7F\u544A\u6295\u653E/\u8D26\u6237\u5206\u6790\u4E1A\u52A1\u53C2\u8003
117282
117281
  >
@@ -117367,29 +117366,17 @@ async function runRagList(options) {
117367
117366
  if (options.ragOnly) {
117368
117367
  folders = folders.filter((f) => f.ragStatus === true);
117369
117368
  }
117370
- if (options.json) {
117371
- console.log(
117372
- JSON.stringify(
117373
- {
117374
- belongToId,
117375
- total: folders.length,
117376
- folders: folders.map((f) => ({
117377
- id: f.id,
117378
- name: f.name,
117379
- ragStatus: f.ragStatus,
117380
- createTime: f.createTime
117381
- }))
117382
- },
117383
- null,
117384
- 2
117385
- )
117386
- );
117387
- return;
117388
- }
117389
117369
  if (folders.length === 0) {
117390
117370
  console.log(options.ragOnly ? "\n\u6682\u65E0\u5DF2\u5EFA RAG \u7D22\u5F15\u7684\u77E5\u8BC6\u5E93\u3002\n" : "\n\u6682\u65E0\u77E5\u8BC6\u5E93\u6587\u4EF6\u5939\u3002\n");
117391
117371
  return;
117392
117372
  }
117373
+ const listPayload = { belongToId, ragOnly: Boolean(options.ragOnly), folders };
117374
+ if (await emitCliJsonOrSnapshot(
117375
+ { jsonOut: options.jsonOut },
117376
+ { section: "rag-list", commandLabel: "rag list", payload: listPayload }
117377
+ )) {
117378
+ return;
117379
+ }
117393
117380
  const ragTag = (s) => s === true ? "\u2705 \u5DF2\u7D22\u5F15" : "\u2014";
117394
117381
  const rows = folders.map((f) => ({
117395
117382
  id: f.id,
@@ -117426,13 +117413,17 @@ function register22(program2) {
117426
117413
  const ragCmd = program2.command("rag").description(
117427
117414
  "RAG \u77E5\u8BC6\u5E93\u68C0\u7D22\uFF08\u534F\u52A9\u5E7F\u544A\u6295\u653E\u3001\u62D3\u8BCD\u3001\u8D26\u6237\u8BCA\u65AD\u4E0E\u62A5\u544A\uFF1B\u9ED8\u8BA4 belongToId=account/me \u7684 companyId\uFF09"
117428
117415
  );
117429
- ragCmd.command("list").description("\u5217\u51FA\u5F53\u524D\u4F01\u4E1A\u4E0B\u6240\u6709\u77E5\u8BC6\u5E93\u6587\u4EF6\u5939\uFF0C\u4F9B\u9009\u62E9\u5BA2\u6237/\u54C1\u724C\u68C0\u7D22\u8303\u56F4").option("--belong-to-id <id>", "\u4F01\u4E1A ID\uFF1B\u4E0D\u4F20\u5219\u4ECE GET /query/account/me \u53D6 companyId").option("--rag-only", "\u4EC5\u663E\u793A\u5DF2\u5EFA RAG \u5411\u91CF\u7D22\u5F15\uFF08ragStatus=true\uFF09\u7684\u77E5\u8BC6\u5E93", false).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--json", "\u8F93\u51FA\u5B8C\u6574 JSON", false).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
117416
+ ragCmd.command("list").description("\u5217\u51FA\u5F53\u524D\u4F01\u4E1A\u4E0B\u6240\u6709\u77E5\u8BC6\u5E93\u6587\u4EF6\u5939\uFF0C\u4F9B\u9009\u62E9\u5BA2\u6237/\u54C1\u724C\u68C0\u7D22\u8303\u56F4").option("--belong-to-id <id>", "\u4F01\u4E1A ID\uFF1B\u4E0D\u4F20\u5219\u4ECE GET /query/account/me \u53D6 companyId").option("--rag-only", "\u4EC5\u663E\u793A\u5DF2\u5EFA RAG \u5411\u91CF\u7D22\u5F15\uFF08ragStatus=true\uFF09\u7684\u77E5\u8BC6\u5E93", false).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option(
117417
+ "--json-out <path>",
117418
+ "\u843D\u76D8 JSON + outline + cli-manifest\uFF1Bstdout \u4E00\u884C\u6458\u8981",
117419
+ void 0
117420
+ ).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
117430
117421
  async (opts) => {
117431
117422
  await runRagList({
117432
117423
  belongToId: opts.belongToId,
117433
117424
  ragOnly: opts.ragOnly,
117434
117425
  token: opts.token,
117435
- json: opts.json,
117426
+ jsonOut: opts.jsonOut,
117436
117427
  verbose: opts.verbose
117437
117428
  });
117438
117429
  }
@@ -117441,7 +117432,11 @@ function register22(program2) {
117441
117432
  "--partition <wiki|default>",
117442
117433
  "\u68C0\u7D22\u5206\u533A\uFF08queryknowledges \u7684 partition\uFF0C\u9ED8\u8BA4 default\uFF09",
117443
117434
  "default"
117444
- ).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option("--json", "\u8F93\u51FA\u5B8C\u6574 JSON", false).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
117435
+ ).option("-t, --token <token>", "Token\uFF08\u53EF\u9009\uFF1B\u4F18\u5148\u4E8E ~/.siluzan/config.json\uFF09").option(
117436
+ "--json-out <path>",
117437
+ "\u843D\u76D8 JSON + outline + cli-manifest\uFF1Bstdout \u4E00\u884C\u6458\u8981",
117438
+ void 0
117439
+ ).option("--verbose", "\u663E\u793A\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
117445
117440
  async (opts) => {
117446
117441
  await runRagQuery({
117447
117442
  query: opts.query,
@@ -117454,7 +117449,7 @@ function register22(program2) {
117454
117449
  category: opts.category,
117455
117450
  partition: opts.partition,
117456
117451
  token: opts.token,
117457
- json: opts.json,
117452
+ jsonOut: opts.jsonOut,
117458
117453
  verbose: opts.verbose
117459
117454
  });
117460
117455
  }
@@ -118615,20 +118610,19 @@ function register23(program2) {
118615
118610
  });
118616
118611
  });
118617
118612
  accountCmd.command("share-detail").description(
118618
- "\u67E5\u770B\u8D26\u6237\u7684\u5206\u4EAB\u8BE6\u60C5\uFF08\u8BE5\u8D26\u6237\u88AB\u5206\u4EAB\u7ED9\u54EA\u4E9B\u7528\u6237\uFF09\n\n \u7528\u6CD5\u793A\u4F8B\uFF1A\n # \u5148\u7528 list-accounts \u62FF\u5230 mediaCustomerId\uFF0C\u518D\u67E5\u5206\u4EAB\u8BE6\u60C5\n siluzan-tso list-accounts -m Google --json\n siluzan-tso account share-detail -c <\u4ECE\u4E0A\u65B9 ma.mediaCustomerId \u590D\u5236>\n\n \u6CE8\u610F\uFF1A-c \u4F20\u7684\u662F mediaCustomerId\uFF08\u6570\u5B57 ID\uFF09\uFF0C\u4E0D\u662F entityId\uFF08UUID\uFF09"
118613
+ "\u67E5\u770B\u8D26\u6237\u7684\u5206\u4EAB\u8BE6\u60C5\uFF08\u8BE5\u8D26\u6237\u88AB\u5206\u4EAB\u7ED9\u54EA\u4E9B\u7528\u6237\uFF09\n\n \u7528\u6CD5\u793A\u4F8B\uFF1A\n # \u5148\u7528 list-accounts \u62FF\u5230 mediaCustomerId\uFF0C\u518D\u67E5\u5206\u4EAB\u8BE6\u60C5\n siluzan-tso list-accounts -m Google --json-out ./snap\n siluzan-tso account share-detail -c <\u4ECE\u4E0A\u65B9 ma.mediaCustomerId \u590D\u5236>\n\n \u6CE8\u610F\uFF1A-c \u4F20\u7684\u662F mediaCustomerId\uFF08\u6570\u5B57 ID\uFF09\uFF0C\u4E0D\u662F entityId\uFF08UUID\uFF09"
118619
118614
  ).requiredOption(
118620
118615
  "-c, --customer-id <id>",
118621
118616
  "\u8D26\u6237 mediaCustomerId\uFF08\u5FC5\u586B\uFF0C\u6570\u5B57 ID\uFF0C\u6765\u81EA list-accounts \u7684 ma.mediaCustomerId\uFF09"
118622
- ).option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
118617
+ ).option("-t, --token <token>", "Auth Token").option(
118623
118618
  "--json-out <path>",
118624
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118619
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118625
118620
  void 0
118626
118621
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118627
118622
  async (opts) => {
118628
118623
  await runAccountShareDetail({
118629
118624
  token: opts.token,
118630
118625
  mediaCustomerId: opts.customerId,
118631
- json: opts.json,
118632
118626
  jsonOut: opts.jsonOut,
118633
118627
  verbose: opts.verbose
118634
118628
  });
@@ -118643,9 +118637,9 @@ function register23(program2) {
118643
118637
  accountCmd.command("mcc-bind").description("Google\uFF1A\u5C06\u5B50\u8D26\u6237\u7ED1\u5B9A\u5230\u7ECF\u7406\u8D26\u6237\uFF08MCC\uFF09\uFF0C\u9700\u5DF2\u914D\u7F6E googleApiUrl").requiredOption(
118644
118638
  "--customers <ids>",
118645
118639
  "\u5B50\u8D26\u6237 mediaCustomerId\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694\uFF08\u6765\u81EA list-accounts \u7684 ma.mediaCustomerId\uFF09"
118646
- ).requiredOption("--mcc <ids>", "\u7ECF\u7406\u8D26\u6237\uFF08MCC\uFF09\u5BA2\u6237 ID\uFF0C\u591A\u4E2A\u53EF\u7528\u9017\u53F7\u3001\u4E2D\u6587\u9017\u53F7\u6216\u5206\u53F7\u5206\u9694").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u5404\u8D26\u6237\u63A5\u53E3\u539F\u59CB\u8FD4\u56DE", false).option(
118640
+ ).requiredOption("--mcc <ids>", "\u7ECF\u7406\u8D26\u6237\uFF08MCC\uFF09\u5BA2\u6237 ID\uFF0C\u591A\u4E2A\u53EF\u7528\u9017\u53F7\u3001\u4E2D\u6587\u9017\u53F7\u6216\u5206\u53F7\u5206\u9694").option("-t, --token <token>", "Auth Token").option(
118647
118641
  "--json-out <path>",
118648
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118642
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118649
118643
  void 0
118650
118644
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118651
118645
  async (opts) => {
@@ -118653,15 +118647,14 @@ function register23(program2) {
118653
118647
  token: opts.token,
118654
118648
  customers: opts.customers.split(",").map((s) => s.trim()).filter(Boolean),
118655
118649
  mcc: opts.mcc,
118656
- json: opts.json,
118657
118650
  jsonOut: opts.jsonOut,
118658
118651
  verbose: opts.verbose
118659
118652
  });
118660
118653
  }
118661
118654
  );
118662
- accountCmd.command("mcc-unbind").description("Google\uFF1A\u5C06\u5B50\u8D26\u6237\u4ECE\u6307\u5B9A MCC \u4E0B\u89E3\u7ED1\uFF0C\u9700\u5DF2\u914D\u7F6E googleApiUrl").requiredOption("--customers <ids>", "\u5B50\u8D26\u6237 mediaCustomerId\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694").requiredOption("--mcc <ids>", "\u8981\u89E3\u7ED1\u7684 MCC \u5BA2\u6237 ID\uFF0C\u591A\u4E2A\u53EF\u7528\u9017\u53F7\u3001\u4E2D\u6587\u9017\u53F7\u6216\u5206\u53F7\u5206\u9694").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u5404\u8D26\u6237\u63A5\u53E3\u539F\u59CB\u8FD4\u56DE", false).option(
118655
+ accountCmd.command("mcc-unbind").description("Google\uFF1A\u5C06\u5B50\u8D26\u6237\u4ECE\u6307\u5B9A MCC \u4E0B\u89E3\u7ED1\uFF0C\u9700\u5DF2\u914D\u7F6E googleApiUrl").requiredOption("--customers <ids>", "\u5B50\u8D26\u6237 mediaCustomerId\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694").requiredOption("--mcc <ids>", "\u8981\u89E3\u7ED1\u7684 MCC \u5BA2\u6237 ID\uFF0C\u591A\u4E2A\u53EF\u7528\u9017\u53F7\u3001\u4E2D\u6587\u9017\u53F7\u6216\u5206\u53F7\u5206\u9694").option("-t, --token <token>", "Auth Token").option(
118663
118656
  "--json-out <path>",
118664
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118657
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118665
118658
  void 0
118666
118659
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118667
118660
  async (opts) => {
@@ -118669,7 +118662,6 @@ function register23(program2) {
118669
118662
  token: opts.token,
118670
118663
  customers: opts.customers.split(",").map((s) => s.trim()).filter(Boolean),
118671
118664
  mcc: opts.mcc,
118672
- json: opts.json,
118673
118665
  jsonOut: opts.jsonOut,
118674
118666
  verbose: opts.verbose
118675
118667
  });
@@ -118678,24 +118670,23 @@ function register23(program2) {
118678
118670
  accountCmd.command("close").description("TikTok\uFF1A\u5173\u95ED\uFF08\u505C\u7528\uFF09\u5E7F\u544A\u8D26\u6237\uFF08\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\uFF0C\u8C28\u614E\u64CD\u4F5C\uFF09").requiredOption(
118679
118671
  "--accounts <ids>",
118680
118672
  "TikTok \u5E7F\u544A\u4E3B ID\uFF08mediaCustomerId\uFF0C\u4E0E list-accounts -m TikTok \u5217\u300C\u8D26\u6237ID\u300D\u4E00\u81F4\uFF09\uFF0C\u9017\u53F7\u5206\u9694\uFF1BCLI \u4F1A\u89E3\u6790 entityId \u5E76\u5148\u505A\u5173\u6237\u6821\u9A8C"
118681
- ).option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
118673
+ ).option("-t, --token <token>", "Auth Token").option(
118682
118674
  "--json-out <path>",
118683
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118675
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118684
118676
  void 0
118685
118677
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118686
118678
  async (opts) => {
118687
118679
  await runAccountClose({
118688
118680
  token: opts.token,
118689
118681
  accountIds: opts.accounts.split(",").map((s) => s.trim()).filter(Boolean),
118690
- json: opts.json,
118691
118682
  jsonOut: opts.jsonOut,
118692
118683
  verbose: opts.verbose
118693
118684
  });
118694
118685
  }
118695
118686
  );
118696
- accountCmd.command("bm-bind").description("Meta\uFF1A\u5C06\u5E7F\u544A\u8D26\u6237\u7ED1\u5B9A\u5230 Business Manager\uFF08BM\uFF09").requiredOption("--account-id <id>", "Meta \u5E7F\u544A\u8D26\u6237 mediaCustomerId\uFF08\u6765\u81EA list-accounts\uFF09").requiredOption("--bm-id <id>", "Business Manager ID").option("--action-type <type>", "\u64CD\u4F5C\u7C7B\u578B\uFF08\u9ED8\u8BA4 bind\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
118687
+ accountCmd.command("bm-bind").description("Meta\uFF1A\u5C06\u5E7F\u544A\u8D26\u6237\u7ED1\u5B9A\u5230 Business Manager\uFF08BM\uFF09").requiredOption("--account-id <id>", "Meta \u5E7F\u544A\u8D26\u6237 mediaCustomerId\uFF08\u6765\u81EA list-accounts\uFF09").requiredOption("--bm-id <id>", "Business Manager ID").option("--action-type <type>", "\u64CD\u4F5C\u7C7B\u578B\uFF08\u9ED8\u8BA4 bind\uFF09").option("-t, --token <token>", "Auth Token").option(
118697
118688
  "--json-out <path>",
118698
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118689
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118699
118690
  void 0
118700
118691
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118701
118692
  async (opts) => {
@@ -118704,21 +118695,19 @@ function register23(program2) {
118704
118695
  accountId: opts.accountId,
118705
118696
  bmId: opts.bmId,
118706
118697
  actionType: opts.actionType,
118707
- json: opts.json,
118708
118698
  jsonOut: opts.jsonOut,
118709
118699
  verbose: opts.verbose
118710
118700
  });
118711
118701
  }
118712
118702
  );
118713
- accountCmd.command("withdraw-list").description("Google\uFF1A\u67E5\u8BE2\u88AB\u5C01\uFF08Suspended\uFF09\u5E7F\u544A\u8D26\u6237\u5217\u8868\uFF08\u53EF\u63D0\u73B0\u8D26\u6237\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
118703
+ accountCmd.command("withdraw-list").description("Google\uFF1A\u67E5\u8BE2\u88AB\u5C01\uFF08Suspended\uFF09\u5E7F\u544A\u8D26\u6237\u5217\u8868\uFF08\u53EF\u63D0\u73B0\u8D26\u6237\uFF09").option("-t, --token <token>", "Auth Token").option(
118714
118704
  "--json-out <path>",
118715
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118705
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118716
118706
  void 0
118717
118707
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118718
118708
  async (opts) => {
118719
118709
  await runAccountWithdrawList({
118720
118710
  token: opts.token,
118721
- json: opts.json,
118722
118711
  jsonOut: opts.jsonOut,
118723
118712
  verbose: opts.verbose
118724
118713
  });
@@ -118727,16 +118716,15 @@ function register23(program2) {
118727
118716
  accountCmd.command("withdraw-submit").description("Google\uFF1A\u63D0\u4EA4\u88AB\u5C01\u8D26\u6237\u63D0\u73B0\u7533\u8BF7\uFF08\u81EA\u52A8\u67E5\u8BE2\u4F59\u989D\u548C\u7BA1\u7406\u8D39\uFF0C\u8BA1\u7B97\u63D0\u73B0\u91D1\u989D\uFF09").requiredOption(
118728
118717
  "--accounts <entityIds>",
118729
118718
  "\u8981\u63D0\u73B0\u7684\u8D26\u6237 entityId\uFF0C\u9017\u53F7\u5206\u9694\uFF08\u6765\u81EA account withdraw-list\uFF09"
118730
- ).option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
118719
+ ).option("-t, --token <token>", "Auth Token").option(
118731
118720
  "--json-out <path>",
118732
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118721
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118733
118722
  void 0
118734
118723
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118735
118724
  async (opts) => {
118736
118725
  await runAccountWithdrawSubmit({
118737
118726
  token: opts.token,
118738
118727
  accounts: opts.accounts.split(",").map((s) => s.trim()).filter(Boolean),
118739
- json: opts.json,
118740
118728
  jsonOut: opts.jsonOut,
118741
118729
  verbose: opts.verbose
118742
118730
  });
@@ -118745,9 +118733,9 @@ function register23(program2) {
118745
118733
  accountCmd.command("bc-bind").description("TikTok\uFF1A\u5C06\u5E7F\u544A\u8D26\u6237\u7ED1\u5B9A\u5230 Business Center\uFF08BC\uFF09").requiredOption(
118746
118734
  "--customers <ids>",
118747
118735
  "TikTok \u5E7F\u544A\u8D26\u6237 mediaCustomerId\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694\uFF08\u6765\u81EA list-accounts -m TikTok\uFF09"
118748
- ).requiredOption("--bc-ids <ids>", "Business Center ID\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
118736
+ ).requiredOption("--bc-ids <ids>", "Business Center ID\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694").option("-t, --token <token>", "Auth Token").option(
118749
118737
  "--json-out <path>",
118750
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118738
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118751
118739
  void 0
118752
118740
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118753
118741
  async (opts) => {
@@ -118755,15 +118743,14 @@ function register23(program2) {
118755
118743
  token: opts.token,
118756
118744
  customers: opts.customers.split(",").map((s) => s.trim()).filter(Boolean),
118757
118745
  bcIds: opts.bcIds.split(",").map((s) => s.trim()).filter(Boolean),
118758
- json: opts.json,
118759
118746
  jsonOut: opts.jsonOut,
118760
118747
  verbose: opts.verbose
118761
118748
  });
118762
118749
  }
118763
118750
  );
118764
- accountCmd.command("bc-unbind").description("TikTok\uFF1A\u5C06\u5E7F\u544A\u8D26\u6237\u4ECE Business Center\uFF08BC\uFF09\u4E0B\u89E3\u7ED1").requiredOption("--customers <ids>", "TikTok \u5E7F\u544A\u8D26\u6237 mediaCustomerId\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694").requiredOption("--bc-id <id>", "Business Center ID\uFF08\u4E00\u6B21\u53EA\u80FD\u89E3\u7ED1\u4E00\u4E2A BC\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
118751
+ accountCmd.command("bc-unbind").description("TikTok\uFF1A\u5C06\u5E7F\u544A\u8D26\u6237\u4ECE Business Center\uFF08BC\uFF09\u4E0B\u89E3\u7ED1").requiredOption("--customers <ids>", "TikTok \u5E7F\u544A\u8D26\u6237 mediaCustomerId\uFF0C\u591A\u4E2A\u9017\u53F7\u5206\u9694").requiredOption("--bc-id <id>", "Business Center ID\uFF08\u4E00\u6B21\u53EA\u80FD\u89E3\u7ED1\u4E00\u4E2A BC\uFF09").option("-t, --token <token>", "Auth Token").option(
118765
118752
  "--json-out <path>",
118766
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118753
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118767
118754
  void 0
118768
118755
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118769
118756
  async (opts) => {
@@ -118771,7 +118758,6 @@ function register23(program2) {
118771
118758
  token: opts.token,
118772
118759
  customers: opts.customers.split(",").map((s) => s.trim()).filter(Boolean),
118773
118760
  bcId: opts.bcId,
118774
- json: opts.json,
118775
118761
  jsonOut: opts.jsonOut,
118776
118762
  verbose: opts.verbose
118777
118763
  });
@@ -118785,9 +118771,9 @@ function register23(program2) {
118785
118771
  ).option(
118786
118772
  "--agent-type <type>",
118787
118773
  "\u53EF\u9009\uFF0C\u90E8\u5206\u7F51\u5173\u9700\u8981\u65F6\u4F20\u5165\uFF08\u4E0E list-accounts \u4E2D ma.accountType \u4E00\u81F4\uFF09"
118788
- ).option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
118774
+ ).option("-t, --token <token>", "Auth Token").option(
118789
118775
  "--json-out <path>",
118790
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118776
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118791
118777
  void 0
118792
118778
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118793
118779
  async (opts) => {
@@ -118795,7 +118781,6 @@ function register23(program2) {
118795
118781
  token: opts.token,
118796
118782
  customerId: opts.customerId,
118797
118783
  agentType: opts.agentType,
118798
- json: opts.json,
118799
118784
  jsonOut: opts.jsonOut,
118800
118785
  verbose: opts.verbose
118801
118786
  });
@@ -118806,9 +118791,9 @@ function register23(program2) {
118806
118791
  ).requiredOption("-c, --customer-id <id>", "Google \u5E7F\u544A\u8D26\u6237 mediaCustomerId").requiredOption("--email <email>", "\u88AB\u6388\u6743\u7528\u6237\u7684\u90AE\u7BB1\u5730\u5740").requiredOption(
118807
118792
  "--agent-type <type>",
118808
118793
  "\u8D26\u6237\u4EE3\u7406\u7C7B\u578B\uFF08\u6765\u81EA list-accounts JSON \u4E2D ma.accountType \u5B57\u6BB5\uFF09"
118809
- ).option("--access-role <role>", "\u6743\u9650\u7C7B\u578B\uFF1AReadOnly | Standard\uFF08\u9ED8\u8BA4 Standard\uFF09", "Standard").option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
118794
+ ).option("--access-role <role>", "\u6743\u9650\u7C7B\u578B\uFF1AReadOnly | Standard\uFF08\u9ED8\u8BA4 Standard\uFF09", "Standard").option("-t, --token <token>", "Auth Token").option(
118810
118795
  "--json-out <path>",
118811
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118796
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118812
118797
  void 0
118813
118798
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118814
118799
  async (opts) => {
@@ -118818,7 +118803,6 @@ function register23(program2) {
118818
118803
  email: opts.email,
118819
118804
  agentType: opts.agentType,
118820
118805
  accessRole: opts.accessRole,
118821
- json: opts.json,
118822
118806
  jsonOut: opts.jsonOut,
118823
118807
  verbose: opts.verbose
118824
118808
  });
@@ -118826,14 +118810,14 @@ function register23(program2) {
118826
118810
  );
118827
118811
  accountCmd.command("email-deauth").description("Google\uFF1A\u89E3\u9664\u90AE\u7BB1\u6388\u6743\uFF08\u64A4\u9500\u5DF2\u53D1\u51FA\u7684\u6388\u6743\u9080\u8BF7\uFF09").requiredOption("-c, --customer-id <id>", "Google \u5E7F\u544A\u8D26\u6237 mediaCustomerId").requiredOption("--invitation-id <id>", "\u9080\u8BF7 ID\uFF08\u6765\u81EA account email-auth-list\uFF09").requiredOption("--agent-type <type>", "\u8D26\u6237\u4EE3\u7406\u7C7B\u578B").requiredOption(
118828
118812
  "--resource-name <name>",
118829
- "\u8D44\u6E90\u540D\u79F0\uFF08\u6765\u81EA account email-auth-list --json \u7684 resourceName \u5B57\u6BB5\uFF09"
118813
+ "\u8D44\u6E90\u540D\u79F0\uFF08\u6765\u81EA account email-auth-list --json-out \u7684 resourceName \u5B57\u6BB5\uFF09"
118830
118814
  ).option(
118831
118815
  "--pending",
118832
118816
  "\u9080\u8BF7\u4E3A\u5F85\u63A5\u53D7\uFF08Pending\uFF09\u65F6\u5FC5\u52A0\uFF1A\u8D70 RemoveCustomerUserAccessInvitation\uFF1B\u5DF2\u63A5\u53D7\uFF08Invited\uFF09\u65F6\u4E0D\u8981\u52A0",
118833
118817
  false
118834
- ).option("-t, --token <token>", "Auth Token").option("--json", "\u8F93\u51FA\u539F\u59CB JSON", false).option(
118818
+ ).option("-t, --token <token>", "Auth Token").option(
118835
118819
  "--json-out <path>",
118836
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118820
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
118837
118821
  void 0
118838
118822
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
118839
118823
  async (opts) => {
@@ -118844,7 +118828,6 @@ function register23(program2) {
118844
118828
  agentType: opts.agentType,
118845
118829
  resourceName: opts.resourceName,
118846
118830
  accepted: !opts.pending,
118847
- json: opts.json,
118848
118831
  jsonOut: opts.jsonOut,
118849
118832
  verbose: opts.verbose
118850
118833
  });
@@ -119342,21 +119325,43 @@ async function runOpenAccountKwai(opts) {
119342
119325
  `);
119343
119326
  process.exit(1);
119344
119327
  }
119345
- console.log(" \u6B63\u5728\u4E0A\u4F20\u8425\u4E1A\u6267\u7167\u5230 Kwai...");
119328
+ console.log(" [1/3] \u6B63\u5728\u4E0A\u4F20\u8425\u4E1A\u6267\u7167\u5230 Siluzan \u5B58\u6863...");
119329
+ let imageId;
119330
+ let storageProvider;
119331
+ try {
119332
+ const uploaded = await uploadAttachment(
119333
+ opts.licenseFile,
119334
+ config.apiBaseUrl,
119335
+ config,
119336
+ opts.verbose
119337
+ );
119338
+ imageId = uploaded.id;
119339
+ storageProvider = uploaded.storageProvider;
119340
+ console.log(` Siluzan imageId: ${imageId}`);
119341
+ } catch (err) {
119342
+ console.error(
119343
+ `
119344
+ \u274C Siluzan \u5B58\u6863\u4E0A\u4F20\u5931\u8D25\uFF1A${err instanceof Error ? err.message : String(err)}
119345
+ `
119346
+ );
119347
+ process.exit(1);
119348
+ }
119349
+ console.log(" [2/3] \u6B63\u5728\u4E0A\u4F20\u8425\u4E1A\u6267\u7167\u5230 Kwai...");
119346
119350
  let blobstoreKey;
119347
119351
  try {
119348
119352
  blobstoreKey = await uploadToKwai(opts.licenseFile, config.apiBaseUrl, config, opts.verbose);
119349
119353
  } catch (err) {
119350
119354
  console.error(`
119351
- \u274C \u8425\u4E1A\u6267\u7167\u4E0A\u4F20\u5931\u8D25\uFF1A${err instanceof Error ? err.message : String(err)}
119355
+ \u274C Kwai \u8425\u4E1A\u6267\u7167\u4E0A\u4F20\u5931\u8D25\uFF1A${err instanceof Error ? err.message : String(err)}
119352
119356
  `);
119353
119357
  process.exit(1);
119354
119358
  }
119355
- console.log(` \u4E0A\u4F20\u6210\u529F\uFF0CblobstoreKey: ${blobstoreKey}`);
119359
+ console.log(` Kwai blobstoreKey: ${blobstoreKey}`);
119360
+ console.log(" [3/3] \u6B63\u5728\u5173\u8054\u5E7F\u544A\u4E3B\u7EC4...");
119356
119361
  const magKey = await resolveGenericMagKey(
119357
119362
  config,
119358
119363
  opts.companyName,
119359
- { ImageId: blobstoreKey, StorageProvider: "StorageAccount" },
119364
+ { ImageId: imageId, StorageProvider: storageProvider },
119360
119365
  opts.verbose,
119361
119366
  opts.advertiserId
119362
119367
  );
@@ -120024,15 +120029,14 @@ TikTok \u6CE8\u518C\u5730\u5217\u8868\uFF08\u7B2C 1 \u9875\uFF0C\u672C\u9875 ${r
120024
120029
  // src/commands/open-account-register.ts
120025
120030
  function register24(program2) {
120026
120031
  const openAccountCmd = program2.command("open-account").description("\u5F00\u6237\u7533\u8BF7\uFF08Google / TikTok / Yandex / Bing / Kwai\uFF09");
120027
- openAccountCmd.command("list-groups").description("\u67E5\u8BE2\u5E7F\u544A\u4E3B\u7EC4\u5217\u8868\uFF08\u83B7\u53D6\u5F00\u6237\u6240\u9700\u7684 --advertiser-id\uFF09").option("-t, --token <token>", "Auth Token").option("--json", "JSON \u683C\u5F0F\u8F93\u51FA", false).option(
120032
+ openAccountCmd.command("list-groups").description("\u67E5\u8BE2\u5E7F\u544A\u4E3B\u7EC4\u5217\u8868\uFF08\u83B7\u53D6\u5F00\u6237\u6240\u9700\u7684 --advertiser-id\uFF09").option("-t, --token <token>", "Auth Token").option(
120028
120033
  "--json-out <path>",
120029
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120034
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120030
120035
  void 0
120031
120036
  ).option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
120032
120037
  async (opts) => {
120033
120038
  await runListAdvertiserGroups({
120034
120039
  token: opts.token,
120035
- json: opts.json,
120036
120040
  jsonOut: opts.jsonOut,
120037
120041
  verbose: opts.verbose
120038
120042
  });
@@ -120073,76 +120077,71 @@ function register24(program2) {
120073
120077
  });
120074
120078
  }
120075
120079
  );
120076
- openAccountCmd.command("tiktok-timezones").description("\u5217\u51FA TikTok \u5F00\u6237\u53EF\u9009\u65F6\u533A\uFF08\u4E0E\u7F51\u9875 /openAnAccount TikTok \u65F6\u533A\u4E0B\u62C9\u540C\u4E00\u6570\u636E\u6E90\uFF09").option("-k, --keyword <text>", "\u6309 Code / \u540D\u79F0 / UTC \u504F\u79FB\u8FC7\u6EE4").option("--json", "JSON \u8F93\u51FA", false).option(
120080
+ openAccountCmd.command("tiktok-timezones").description("\u5217\u51FA TikTok \u5F00\u6237\u53EF\u9009\u65F6\u533A\uFF08\u4E0E\u7F51\u9875 /openAnAccount TikTok \u65F6\u533A\u4E0B\u62C9\u540C\u4E00\u6570\u636E\u6E90\uFF09").option("-k, --keyword <text>", "\u6309 Code / \u540D\u79F0 / UTC \u504F\u79FB\u8FC7\u6EE4").option(
120077
120081
  "--json-out <path>",
120078
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120082
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120079
120083
  void 0
120080
120084
  ).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
120081
120085
  async (opts) => {
120082
120086
  await runOpenAccountTikTokTimezones({
120083
120087
  token: opts.token,
120084
120088
  keyword: opts.keyword,
120085
- json: opts.json,
120086
120089
  jsonOut: opts.jsonOut,
120087
120090
  verbose: opts.verbose
120088
120091
  });
120089
120092
  }
120090
120093
  );
120091
- openAccountCmd.command("tiktok-industries").description("\u5217\u51FA TikTok \u884C\u4E1A\u5206\u7C7B\uFF08\u4E24\u7EA7\u7ED3\u6784\uFF0C--industry-id \u4F20\u53F6\u5B50\u8282\u70B9 ID\uFF09").option("-k, --keyword <text>", "\u6309\u884C\u4E1A\u540D\u79F0\u8FC7\u6EE4").option("--json", "JSON \u8F93\u51FA", false).option(
120094
+ openAccountCmd.command("tiktok-industries").description("\u5217\u51FA TikTok \u884C\u4E1A\u5206\u7C7B\uFF08\u4E24\u7EA7\u7ED3\u6784\uFF0C--industry-id \u4F20\u53F6\u5B50\u8282\u70B9 ID\uFF09").option("-k, --keyword <text>", "\u6309\u884C\u4E1A\u540D\u79F0\u8FC7\u6EE4").option(
120092
120095
  "--json-out <path>",
120093
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120096
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120094
120097
  void 0
120095
120098
  ).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
120096
120099
  async (opts) => {
120097
120100
  await runOpenAccountTikTokIndustries({
120098
120101
  token: opts.token,
120099
120102
  keyword: opts.keyword,
120100
- json: opts.json,
120101
120103
  jsonOut: opts.jsonOut,
120102
120104
  verbose: opts.verbose
120103
120105
  });
120104
120106
  }
120105
120107
  );
120106
- openAccountCmd.command("tiktok-areas").description("\u5217\u51FA TikTok \u6CE8\u518C\u5730\u4EE3\u7801\uFF08--registered-area \u4F20 Key \u503C\uFF0C\u5982 CN\uFF09").option("-k, --keyword <text>", "\u6309\u4EE3\u7801\u6216\u540D\u79F0\u8FC7\u6EE4").option("--json", "JSON \u8F93\u51FA", false).option(
120108
+ openAccountCmd.command("tiktok-areas").description("\u5217\u51FA TikTok \u6CE8\u518C\u5730\u4EE3\u7801\uFF08--registered-area \u4F20 Key \u503C\uFF0C\u5982 CN\uFF09").option("-k, --keyword <text>", "\u6309\u4EE3\u7801\u6216\u540D\u79F0\u8FC7\u6EE4").option(
120107
120109
  "--json-out <path>",
120108
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120110
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120109
120111
  void 0
120110
120112
  ).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
120111
120113
  async (opts) => {
120112
120114
  await runOpenAccountTikTokAreas({
120113
120115
  token: opts.token,
120114
120116
  keyword: opts.keyword,
120115
- json: opts.json,
120116
120117
  jsonOut: opts.jsonOut,
120117
120118
  verbose: opts.verbose
120118
120119
  });
120119
120120
  }
120120
120121
  );
120121
- openAccountCmd.command("bing-industries").description("\u5217\u51FA BingV2 \u884C\u4E1A\u5206\u7C7B\uFF08\u5C06 name \u503C\u4F20\u7ED9 open-account bing \u7684 --trade-id\uFF09").option("-k, --keyword <text>", "\u6309\u4E2D\u6587\u540D\u6216\u82F1\u6587\u540D\u8FC7\u6EE4").option("--json", "JSON \u8F93\u51FA", false).option(
120122
+ openAccountCmd.command("bing-industries").description("\u5217\u51FA BingV2 \u884C\u4E1A\u5206\u7C7B\uFF08\u5C06 name \u503C\u4F20\u7ED9 open-account bing \u7684 --trade-id\uFF09").option("-k, --keyword <text>", "\u6309\u4E2D\u6587\u540D\u6216\u82F1\u6587\u540D\u8FC7\u6EE4").option(
120122
120123
  "--json-out <path>",
120123
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120124
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120124
120125
  void 0
120125
120126
  ).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
120126
120127
  async (opts) => {
120127
120128
  await runOpenAccountBingIndustries({
120128
120129
  token: opts.token,
120129
120130
  keyword: opts.keyword,
120130
- json: opts.json,
120131
120131
  jsonOut: opts.jsonOut,
120132
120132
  verbose: opts.verbose
120133
120133
  });
120134
120134
  }
120135
120135
  );
120136
- openAccountCmd.command("google-timezones").description("\u5217\u51FA Google \u5F00\u6237\u53EF\u9009\u65F6\u533A\uFF08\u4E0E\u7F51\u9875 /openAnAccount \u7B2C\u4E8C\u6B65\u4E0B\u62C9\u91CC\u6570\u636E\u6E90\u4E00\u81F4\uFF09").option("-k, --keyword <text>", "\u6309 Code / \u540D\u79F0 / UTC \u8BF4\u660E\u8FC7\u6EE4").option("--json", "JSON \u8F93\u51FA", false).option(
120136
+ openAccountCmd.command("google-timezones").description("\u5217\u51FA Google \u5F00\u6237\u53EF\u9009\u65F6\u533A\uFF08\u4E0E\u7F51\u9875 /openAnAccount \u7B2C\u4E8C\u6B65\u4E0B\u62C9\u91CC\u6570\u636E\u6E90\u4E00\u81F4\uFF09").option("-k, --keyword <text>", "\u6309 Code / \u540D\u79F0 / UTC \u8BF4\u660E\u8FC7\u6EE4").option(
120137
120137
  "--json-out <path>",
120138
- "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF08\u4E0E --json \u4E92\u65A5\uFF09\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120138
+ "\u843D\u76D8\uFF08\u76EE\u5F55\u6216 *.json \u6587\u4EF6\u8DEF\u5F84\uFF09\u5E76\u66F4\u65B0 cli-manifest[-<\u67E5\u8BE2id>].json\uFF1B\u76EE\u5F55\u6A21\u5F0F\u6587\u4EF6\u540D\u4E3A `<section>[-<\u67E5\u8BE2id>].json`\uFF1Bstdout \u4E00\u884C\u6458\u8981 JSON\uFF0C\u542B outlineFile\uFF08TS \u5F0F\u7C7B\u578B\u5728 `*.outline.txt`\uFF09",
120139
120139
  void 0
120140
120140
  ).option("-t, --token <token>", "Auth Token").option("--verbose", "\u8BE6\u7EC6\u9519\u8BEF\u4FE1\u606F", false).action(
120141
120141
  async (opts) => {
120142
120142
  await runOpenAccountGoogleTimezones({
120143
120143
  token: opts.token,
120144
120144
  keyword: opts.keyword,
120145
- json: opts.json,
120146
120145
  jsonOut: opts.jsonOut,
120147
120146
  verbose: opts.verbose
120148
120147
  });
@@ -120247,6 +120246,7 @@ function register25(program2) {
120247
120246
  init_google_analysis3();
120248
120247
  init_google_analysis_batch();
120249
120248
  init_version();
120249
+ init_cli_json_snapshot();
120250
120250
  installProcessHandlers();
120251
120251
  function getVersion() {
120252
120252
  try {
@@ -120264,6 +120264,9 @@ program.name("siluzan-tso").description(
120264
120264
  ).version(getVersion());
120265
120265
  program.option("--commit <text>", "\u5199\u64CD\u4F5C\u8BF4\u660E\uFF1B\u8BB0\u5165\u672C\u673A\u5199\u5BA1\u8BA1 JSONL");
120266
120266
  program.hook("preAction", async () => {
120267
+ if (process.argv.includes("--json")) {
120268
+ rejectDeprecatedJsonFlag(true, process.argv[2] ?? "siluzan-tso");
120269
+ }
120267
120270
  setWriteAuditCliCommit(extractCommitFromArgv(process.argv.slice(2)));
120268
120271
  setCliInvocationForAudit(process.argv.slice(2));
120269
120272
  const activeCmd = process.argv[2];
@@ -120302,4 +120305,10 @@ var REGISTRARS = [
120302
120305
  register25
120303
120306
  ];
120304
120307
  for (const reg of REGISTRARS) reg(program);
120308
+ function argvHasDeprecatedJsonFlag(argv) {
120309
+ return argv.some((a) => a === "--json" || a.startsWith("--json="));
120310
+ }
120311
+ if (argvHasDeprecatedJsonFlag(process.argv)) {
120312
+ rejectDeprecatedJsonFlag(true, process.argv[2] ?? "siluzan-tso");
120313
+ }
120305
120314
  program.parseAsync();