--json prints only JSON on stdout (withJsonOutput around every command: logs, tables and prompts to stderr; printJson everywhere; test runs every --json command against the fake stores and parses stdout); prices ppp compares like with like: par = the store's own US-equivalent price (Play convertRegionPrices, Apple equalizations; offline base x fx x (1 + VAT) rounded up) scaled by the PPP price level; defaults only lower, only price levels <= 0.5, World Bank high-income at par, CN at par on Apple and skipped on Play, never above par (--only-decreases, --max-ratio, --min-ratio, --max-level, --include-high-income; --floor / --ceiling kept), top-10 revenue market drops > 20 % warned (sales reports, else a static list), unchanged regions out of the sheet; price changes of existing products only with --allow-price-changes, TTY or not (a terminal yes covered them), then their own question listing each old -> new, held section in dry runs (play products, prices import, play / apple subscriptions); pitfalls 61-63; tests
This commit is contained in:
parent
bab3f63227
commit
357319a775
30 changed files with 865 additions and 209 deletions
|
|
@ -85,11 +85,15 @@ export const TOOLS: ToolDef[] = [
|
|||
props: { csv: { type: 'string', description: 'CSV path (default prices.csv in the config, else store/prices.csv)' }, store: { type: 'string', enum: ['apple', 'play'] }, only, all: { type: 'boolean', default: false, description: 'Also list unchanged rows' } },
|
||||
args: i => [...opt('csv', i.csv), ...opt('store', i.store), ...opt('only', i.only), ...flag('all', i.all), '--dry'] },
|
||||
{ name: 'prices_ppp', title: 'Purchasing power price sheet', command: ['prices', 'ppp'], write: true, network: true, idempotent: true,
|
||||
description: 'Proposes per-region prices adjusted for purchasing power (bundled World Bank ICP PPP factors, CC BY 4.0, or the Big Mac index / a CSV), clamped to floor..ceiling of the US price and snapped to store price points, and writes a price sheet in the prices import format (default store/prices-ppp.csv) with a diff against the current store prices. Writes only that local file; nothing goes to a store (prices import does, after the owner confirms in a terminal).',
|
||||
description: 'Proposes per-region prices adjusted for purchasing power (bundled World Bank ICP PPP factors, CC BY 4.0, or the Big Mac index / a CSV), as a share of the US-equivalent price (VAT included, the current rate). Defaults: only lower prices, only in economies whose price level is at most 50 % of the US, World Bank high-income economies and mainland China keep the US-equivalent price, never above it; a top-10 revenue market that drops more than 20 % is warned about. Snapped to store price points; writes a price sheet in the prices import format (default store/prices-ppp.csv) with a diff against the current store prices. Writes only that local file; nothing goes to a store (prices import does, after the owner confirms in a terminal).',
|
||||
props: { base: { type: 'number', minimum: 0.01, description: 'USD base price for every selected product (default: each product\'s usd)' }, source: { type: 'string', enum: ['worldbank', 'bigmac', 'file'] },
|
||||
store: { type: 'string', enum: ['apple', 'play'] }, only, floor: { type: 'number', minimum: 0.01, maximum: 5 }, ceiling: { type: 'number', minimum: 0.01, maximum: 5 },
|
||||
store: { type: 'string', enum: ['apple', 'play'] }, only,
|
||||
min_ratio: { type: 'number', minimum: 0.01, maximum: 5, description: 'Lowest share of the US-equivalent price (default 0.3)' }, max_ratio: { type: 'number', minimum: 0.01, maximum: 5, description: 'Highest share (default 1)' },
|
||||
max_level: { type: 'number', minimum: 0.01, maximum: 5, description: 'Only economies with a price level at most this share of the US get a PPP price (default 0.5)' },
|
||||
only_decreases: { type: 'boolean', default: true, description: 'Never raise a price above the current store price' }, include_high_income: { type: 'boolean', default: false, description: 'PPP prices for World Bank high-income economies too' },
|
||||
offline: { type: 'boolean', default: false, description: 'No store reads: snap with the local ending rules only' } },
|
||||
args: i => [...opt('base', i.base), ...opt('source', i.source), ...opt('store', i.store), ...opt('only', i.only), ...opt('floor', i.floor), ...opt('ceiling', i.ceiling), ...flag('offline', i.offline)] },
|
||||
args: i => [...opt('base', i.base), ...opt('source', i.source), ...opt('store', i.store), ...opt('only', i.only), ...opt('min-ratio', i.min_ratio), ...opt('max-ratio', i.max_ratio), ...opt('max-level', i.max_level),
|
||||
...(i.only_decreases === false ? ['--no-only-decreases'] : []), ...flag('include-high-income', i.include_high_income), ...flag('offline', i.offline)] },
|
||||
{ name: 'ads_apple_status', title: 'Apple Ads access', command: ['ads', 'apple', 'status'], write: false, network: true,
|
||||
description: 'Read-only: does the Apple Ads API key work, which ad accounts and roles it has, and which one storebound uses.' },
|
||||
{ name: 'ads_apple_campaigns', title: 'Apple Ads campaigns', command: ['ads', 'apple', 'campaigns'], write: false, network: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue