GCP.AndroidPublisher reference
Source:
src/GCP/AndroidPublisher/Edit.ts
A Google Play app edit (edits).
An edit is a short-lived staging session for APK, listing, and track
changes. The API has no list method and no labels field, so list
returns an empty set — nuke cannot discover orphaned edits, and they
expire on their own. packageName and editId are identity. There is
nothing mutable to sync: reconcile observes the edit and inserts one
when it is missing or expired.
Edit: Creating an Edit
Section titled “Edit: Creating an Edit”const edit = yield* GCP.AndroidPublisher.Edit("Release", { packageName: "com.example.app",});Edit: Reusing an Edit
Section titled “Edit: Reusing an Edit”const edit = yield* GCP.AndroidPublisher.Edit("Release", { packageName: "com.example.app", editId: "03487915625743125468", // an edit opened elsewhere});Inappproduct
Section titled “Inappproduct”Source:
src/GCP/AndroidPublisher/Inappproduct.ts
A Google Play in-app product (inappproducts).
In-app products have no labels field, so ownership rests on the
deterministic SKU: read reports a product it finds without prior state
as unowned (adopt it with --adopt). packageName and sku are identity — changing either replaces the
product. Listings, prices, and status update in place. Prefer
MonetizationSubscription for subscriptions; this resource is for
managed one-time products.
Inappproduct: Creating an In-app Product
Section titled “Inappproduct: Creating an In-app Product”Generated SKU
const gem = yield* GCP.AndroidPublisher.Inappproduct("GemPack", { packageName: "com.example.app", listings: { "en-US": { title: "Gem pack" } },});Explicit SKU and price
const gem = yield* GCP.AndroidPublisher.Inappproduct("GemPack", { packageName: "com.example.app", sku: "gem_pack_small", defaultPrice: { currency: "USD", priceMicros: "1990000" }, listings: { "en-US": { title: "Small gem pack" } },});Inappproduct: Updating an In-app Product
Section titled “Inappproduct: Updating an In-app Product”// Same logical id as before; only the listing changes.const gem = yield* GCP.AndroidPublisher.Inappproduct("GemPack", { packageName: "com.example.app", listings: { "en-US": { title: "Starter gem pack" } },});MonetizationSubscription
Section titled “MonetizationSubscription”Source:
src/GCP/AndroidPublisher/MonetizationSubscription.ts
A Google Play subscription product (monetization.subscriptions).
Subscriptions have no labels field, so ownership rests on the
deterministic product id: read reports a subscription it finds without
prior state as unowned (adopt it with --adopt). packageName and
productId are identity — changing either replaces the subscription.
Listings, base plans, tax settings, and payment-country restrictions
update in place. A subscription can only be deleted while every base
plan is still a draft.
MonetizationSubscription: Creating a Subscription
Section titled “MonetizationSubscription: Creating a Subscription”Generated product id
const subscription = yield* GCP.AndroidPublisher.MonetizationSubscription( "Premium", { packageName: "com.example.app", listings: [{ languageCode: "en-US", title: "Premium" }], },);Explicit id and monthly base plan
const subscription = yield* GCP.AndroidPublisher.MonetizationSubscription( "Premium", { packageName: "com.example.app", productId: "premium", listings: [{ languageCode: "en-US", title: "Premium" }], basePlans: [ { basePlanId: "monthly", autoRenewingBasePlanType: { billingPeriodDuration: "P1M" }, regionalConfigs: [ { regionCode: "US", newSubscriberAvailability: true, price: { currencyCode: "USD", units: "5" }, }, ], }, ], },);MonetizationSubscription: Updating a Subscription
Section titled “MonetizationSubscription: Updating a Subscription”// Same logical id as before; only the listing changes.const subscription = yield* GCP.AndroidPublisher.MonetizationSubscription( "Premium", { packageName: "com.example.app", listings: [{ languageCode: "en-US", title: "Premium Plus" }], },);MonetizationSubscriptionsBasePlansOffer
Section titled “MonetizationSubscriptionsBasePlansOffer”Source:
src/GCP/AndroidPublisher/MonetizationSubscriptionsBasePlansOffer.ts
A Google Play subscription offer
(monetization.subscriptions.basePlans.offers).
Offers have no labels field, so ownership rests on the deterministic
offer id: read reports an offer it finds without prior state as
unowned (adopt it with --adopt). packageName, productId,
basePlanId, and offerId are identity — changing any of them
replaces the offer. Phases, regional configs, tags, and targeting
update in place. Only draft offers can be deleted. The parent base
plan must be auto-renewing.
MonetizationSubscriptionsBasePlansOffer: Creating an Offer
Section titled “MonetizationSubscriptionsBasePlansOffer: Creating an Offer”Generated offer id (one-week free trial)
const offer = yield* GCP.AndroidPublisher.MonetizationSubscriptionsBasePlansOffer( "Intro", { packageName: "com.example.app", productId: subscription.productId, basePlanId: "monthly", },);Explicit id and discounted first month
const offer = yield* GCP.AndroidPublisher.MonetizationSubscriptionsBasePlansOffer( "Intro", { packageName: "com.example.app", productId: "premium", basePlanId: "monthly", offerId: "intro", phases: [ { duration: "P1M", recurrenceCount: 1, regionalConfigs: [ { regionCode: "US", relativeDiscount: 0.5 }, ], }, ], },);MonetizationSubscriptionsBasePlansOffer: Updating an Offer
Section titled “MonetizationSubscriptionsBasePlansOffer: Updating an Offer”// Same logical id as before; only the regional config changes.const offer = yield* GCP.AndroidPublisher.MonetizationSubscriptionsBasePlansOffer( "Intro", { packageName: "com.example.app", productId: subscription.productId, basePlanId: "monthly", regionalConfigs: [ { regionCode: "US", newSubscriberAvailability: false }, ], },);