Drift on existing items: offer-code and win-back campaigns that differ are named (Apple cannot edit them), in-app event attributes patched on drafts, a removed custom page deep link cleared, config languages without a version localization named, data safety dry run says Play has no read API; appinfo reads /v1/appPriceSchedules/{id}/manualPrices; a new Play language without an icon warns instead of stopping; fake store lists for the new reads

This commit is contained in:
CRTkafa 2026-10-22 20:38:54 +08:00
parent f2b841d735
commit e381bc2256
11 changed files with 206 additions and 10 deletions

View file

@ -23,6 +23,12 @@ const LISTS: Record<string, { type: string; one?: boolean }> = {
'inAppPurchases/offerCodes': { type: 'inAppPurchaseOfferCodes' },
'inAppPurchaseOfferCodes/customCodes': { type: 'inAppPurchaseOfferCodeCustomCodes' },
'inAppPurchaseOfferCodes/oneTimeUseCodes': { type: 'inAppPurchaseOfferCodeOneTimeUseCodes' },
'inAppPurchaseOfferCodes/prices': { type: 'inAppPurchaseOfferPrices' },
'inAppPurchasePriceSchedules/manualPrices': { type: 'inAppPurchasePrices' },
'inAppPurchasePriceSchedules/baseTerritory': { type: 'territories', one: true },
'appPriceSchedules/manualPrices': { type: 'appPrices' },
'inAppPurchaseAvailabilities/availableTerritories': { type: 'territories' },
'winBackOffers/prices': { type: 'winBackOfferPrices' },
'apps/appStoreVersions': { type: 'appStoreVersions' },
'appStoreVersions/appStoreVersionLocalizations': { type: 'appStoreVersionLocalizations' },
'appStoreVersions/appStoreReviewDetail': { type: 'appStoreReviewDetails', one: true },
@ -259,6 +265,11 @@ export class FakeAsc {
const self = this.res.get(id);
if (!rel) return self && self.type === type ? json({ data: this.view(self) }) : json({ errors: [{ status: '404' }] }, 404);
if (rel === 'relationships') return json({ data: this.children(id, rel2!).map(r => ({ type: r.type, id: r.id })) });
// an availability's territories are the ids its create named (a to-many relationship, not child resources)
if (rel === 'availableTerritories' && self) {
const ids = self.rels.availableTerritories;
return json({ data: (Array.isArray(ids) ? ids : ids ? [ids] : []).map(t => ({ type: 'territories', id: t })), links: {} });
}
const l = LISTS[`${type}/${rel}`];
if (!l) return json({ errors: [{ status: '599', detail: `fake: no list ${type}/${rel}` }] }, 599);
const kids = this.filtered(this.children(id, l.type), u.searchParams);