flows, listing translate, scan 2.2 + --originality, prices export with subscriptions, site sections
- storebound flow list|validate|run: repo-local workflows (store/workflows/*.yml, storebound.workflows.*), writes dry unless --apply, owner steps never run, --from / --resume; init templates for app and game; MCP flow_list + dry flow_run; release-flows skill - storebound listing translate|check|reviewed: per-language listing drafts with store limits and keyword rules, agent or --translate hook, marked until reviewed; MCP listing_translate / listing_check; listing-localization skill - scan: Apple 2.2 beta/demo/test wording rule; scan --originality [--against] - prices export includes subscriptions; prices import skips their rows - site: rejection scan section, Desktop app section with fixture-mode screenshots, Everything else grid, FAQ 4.3 answer - README, CHANGELOG, adapters, API tables
This commit is contained in:
parent
e44897ca4e
commit
526dfd3b09
45 changed files with 2176 additions and 53 deletions
|
|
@ -19,7 +19,7 @@
|
|||
import type { IntroOffer, Language, OfferCodeDef, PriceOverride, Subscription, SubscriptionGroup, SubscriptionOfferDef, SubscriptionPeriod } from './config';
|
||||
import { playCodes } from './config';
|
||||
import { ALPHA3, fromMoney, type Money, toMoney } from './money';
|
||||
import type { PriceRow } from './prices';
|
||||
import { alpha2, type PriceRow } from './prices';
|
||||
|
||||
// ---- mappings ----
|
||||
|
||||
|
|
@ -505,3 +505,16 @@ export function pickPoint(points: ApplePoint[], territory: string, price: number
|
|||
const near = [...inT].sort((a, b) => Math.abs(a.price - price) - Math.abs(b.price - price)).slice(0, 3).map(p => p.price);
|
||||
throw new Error(`${territory} has no subscription price point ${price}${near.length ? ` (nearest ${near.join(', ')})` : ''}`);
|
||||
}
|
||||
|
||||
// ---- the prices sheet (storebound prices export) ----
|
||||
|
||||
/** App Store prices of one subscription (in effect today + scheduled) as price sheet rows. Pure. */
|
||||
export function appleSubPriceRows(product: string, resp: JsonApi, today?: string): PriceRow[] {
|
||||
return appleSubPrices(resp, today).map(p => ({ product, store: 'apple' as const, region: alpha2(p.territory), territory: p.territory, currency: p.currency ?? '', price: p.price, ...(p.startDate ? { startDate: p.startDate } : {}) }));
|
||||
}
|
||||
|
||||
/** Google Play regional prices of one subscription's base plan as price sheet rows. Pure. */
|
||||
export function playSubPriceRows(sub: PlaySubscription, basePlan: string): PriceRow[] {
|
||||
const bp = sub.basePlans?.find(b => b.basePlanId === basePlan) ?? sub.basePlans?.[0];
|
||||
return (bp?.regionalConfigs ?? []).filter(r => r.price).map(r => ({ product: sub.productId, store: 'play' as const, region: r.regionCode, currency: r.price!.currencyCode, price: fromMoney(r.price!) }));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue