UNPKG

googleapis

Version:
1,284 lines 279 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace androidpublisher_v3 { export interface Options extends GlobalOptions { version: 'v3'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Google Play Android Developer API * * Lets Android application developers access their Google Play accounts. * * @example * ```js * const {google} = require('googleapis'); * const androidpublisher = google.androidpublisher('v3'); * ``` */ export class Androidpublisher { context: APIRequestContext; edits: Resource$Edits; inappproducts: Resource$Inappproducts; internalappsharingartifacts: Resource$Internalappsharingartifacts; orders: Resource$Orders; purchases: Resource$Purchases; reviews: Resource$Reviews; systemapks: Resource$Systemapks; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * Information about an APK. The resource for ApksService. */ export interface Schema$Apk { /** * Information about the binary payload of this APK. */ binary?: Schema$ApkBinary; /** * The version code of the APK, as specified in the manifest file. */ versionCode?: number | null; } /** * Represents the binary payload of an APK. */ export interface Schema$ApkBinary { /** * A sha1 hash of the APK payload, encoded as a hex string and matching the output of the sha1sum command. */ sha1?: string | null; /** * A sha256 hash of the APK payload, encoded as a hex string and matching the output of the sha256sum command. */ sha256?: string | null; } /** * Request to create a new externally hosted APK. */ export interface Schema$ApksAddExternallyHostedRequest { /** * The definition of the externally-hosted APK and where it is located. */ externallyHostedApk?: Schema$ExternallyHostedApk; } /** * Response for creating a new externally hosted APK. */ export interface Schema$ApksAddExternallyHostedResponse { /** * The definition of the externally-hosted APK and where it is located. */ externallyHostedApk?: Schema$ExternallyHostedApk; } /** * Response listing all APKs. */ export interface Schema$ApksListResponse { /** * All APKs. */ apks?: Schema$Apk[]; /** * The kind of this response ("androidpublisher#apksListResponse"). */ kind?: string | null; } /** * The app details. The resource for DetailsService. */ export interface Schema$AppDetails { /** * The user-visible support email for this app. */ contactEmail?: string | null; /** * The user-visible support telephone number for this app. */ contactPhone?: string | null; /** * The user-visible website for this app. */ contactWebsite?: string | null; /** * Default language code, in BCP 47 format (eg "en-US"). */ defaultLanguage?: string | null; } /** * An app edit. The resource for EditsService. */ export interface Schema$AppEdit { /** * Output only. The time (as seconds since Epoch) at which the edit will expire and will be no longer valid for use. */ expiryTimeSeconds?: string | null; /** * Output only. Identifier of the edit. Can be used in subsequent API calls. */ id?: string | null; } /** * Information about a bundle. The resource for BundlesService. */ export interface Schema$Bundle { /** * A sha1 hash of the upload payload, encoded as a hex string and matching the output of the sha1sum command. */ sha1?: string | null; /** * A sha256 hash of the upload payload, encoded as a hex string and matching the output of the sha256sum command. */ sha256?: string | null; /** * The version code of the Android App Bundle, as specified in the Android App Bundle's base module APK manifest file. */ versionCode?: number | null; } /** * Response listing all bundles. */ export interface Schema$BundlesListResponse { /** * All bundles. */ bundles?: Schema$Bundle[]; /** * The kind of this response ("androidpublisher#bundlesListResponse"). */ kind?: string | null; } /** * An entry of conversation between user and developer. */ export interface Schema$Comment { /** * A comment from a developer. */ developerComment?: Schema$DeveloperComment; /** * A comment from a user. */ userComment?: Schema$UserComment; } /** * Country targeting specification. */ export interface Schema$CountryTargeting { /** * Countries to target, specified as two letter [CLDR codes](https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html). */ countries?: string[] | null; /** * Include "rest of world" as well as explicitly targeted countries. */ includeRestOfWorld?: boolean | null; } /** * Represents a deobfuscation file. */ export interface Schema$DeobfuscationFile { /** * The type of the deobfuscation file. */ symbolType?: string | null; } /** * Responses for the upload. */ export interface Schema$DeobfuscationFilesUploadResponse { /** * The uploaded Deobfuscation File configuration. */ deobfuscationFile?: Schema$DeobfuscationFile; } /** * Developer entry from conversation between user and developer. */ export interface Schema$DeveloperComment { /** * The last time at which this comment was updated. */ lastModified?: Schema$Timestamp; /** * The content of the comment, i.e. reply body. */ text?: string | null; } /** * Characteristics of the user's device. */ export interface Schema$DeviceMetadata { /** * Device CPU make, e.g. "Qualcomm" */ cpuMake?: string | null; /** * Device CPU model, e.g. "MSM8974" */ cpuModel?: string | null; /** * Device class (e.g. tablet) */ deviceClass?: string | null; /** * OpenGL version */ glEsVersion?: number | null; /** * Device manufacturer (e.g. Motorola) */ manufacturer?: string | null; /** * Comma separated list of native platforms (e.g. "arm", "arm7") */ nativePlatform?: string | null; /** * Device model name (e.g. Droid) */ productName?: string | null; /** * Device RAM in Megabytes, e.g. "2048" */ ramMb?: number | null; /** * Screen density in DPI */ screenDensityDpi?: number | null; /** * Screen height in pixels */ screenHeightPx?: number | null; /** * Screen width in pixels */ screenWidthPx?: number | null; } /** * The device spec used to generate a system APK. */ export interface Schema$DeviceSpec { /** * Screen dpi. */ screenDensity?: number | null; /** * Supported ABI architectures in the order of preference. The values should be the string as reported by the platform, e.g. "armeabi-v7a", "x86_64". */ supportedAbis?: string[] | null; /** * All installed locales represented as BCP-47 strings, e.g. "en-US". */ supportedLocales?: string[] | null; } /** * An expansion file. The resource for ExpansionFilesService. */ export interface Schema$ExpansionFile { /** * If set, this field indicates that this APK has an expansion file uploaded to it: this APK does not reference another APK's expansion file. The field's value is the size of the uploaded expansion file in bytes. */ fileSize?: string | null; /** * If set, this APK's expansion file references another APK's expansion file. The file_size field will not be set. */ referencesVersion?: number | null; } /** * Response for uploading an expansion file. */ export interface Schema$ExpansionFilesUploadResponse { /** * The uploaded expansion file configuration. */ expansionFile?: Schema$ExpansionFile; } /** * Defines an APK available for this application that is hosted externally and not uploaded to Google Play. This function is only available to organizations using Managed Play whose application is configured to restrict distribution to the organizations. */ export interface Schema$ExternallyHostedApk { /** * The application label. */ applicationLabel?: string | null; /** * A certificate (or array of certificates if a certificate-chain is used) used to sign this APK, represented as a base64 encoded byte array. */ certificateBase64s?: string[] | null; /** * The URL at which the APK is hosted. This must be an https URL. */ externallyHostedUrl?: string | null; /** * The sha1 checksum of this APK, represented as a base64 encoded byte array. */ fileSha1Base64?: string | null; /** * The sha256 checksum of this APK, represented as a base64 encoded byte array. */ fileSha256Base64?: string | null; /** * The file size in bytes of this APK. */ fileSize?: string | null; /** * The icon image from the APK, as a base64 encoded byte array. */ iconBase64?: string | null; /** * The maximum SDK supported by this APK (optional). */ maximumSdk?: number | null; /** * The minimum SDK targeted by this APK. */ minimumSdk?: number | null; /** * The native code environments supported by this APK (optional). */ nativeCodes?: string[] | null; /** * The package name. */ packageName?: string | null; /** * The features required by this APK (optional). */ usesFeatures?: string[] | null; /** * The permissions requested by this APK. */ usesPermissions?: Schema$UsesPermission[]; /** * The version code of this APK. */ versionCode?: number | null; /** * The version name of this APK. */ versionName?: string | null; } /** * An uploaded image. The resource for ImagesService. */ export interface Schema$Image { /** * A unique id representing this image. */ id?: string | null; /** * A sha1 hash of the image. */ sha1?: string | null; /** * A sha256 hash of the image. */ sha256?: string | null; /** * A URL that will serve a preview of the image. */ url?: string | null; } /** * Response for deleting all images. */ export interface Schema$ImagesDeleteAllResponse { /** * The deleted images. */ deleted?: Schema$Image[]; } /** * Response listing all images. */ export interface Schema$ImagesListResponse { /** * All listed Images. */ images?: Schema$Image[]; } /** * Response for uploading an image. */ export interface Schema$ImagesUploadResponse { /** * The uploaded image. */ image?: Schema$Image; } /** * An in-app product. The resource for InappproductsService. */ export interface Schema$InAppProduct { /** * Default language of the localized data, as defined by BCP-47. e.g. "en-US". */ defaultLanguage?: string | null; /** * Default price. Cannot be zero, as in-app products are never free. Always in the developer's Checkout merchant currency. */ defaultPrice?: Schema$Price; /** * Grace period of the subscription, specified in ISO 8601 format. Allows developers to give their subscribers a grace period when the payment for the new recurrence period is declined. Acceptable values are P0D (zero days), P3D (three days), P7D (seven days), P14D (14 days), and P30D (30 days). */ gracePeriod?: string | null; /** * List of localized title and description data. Map key is the language of the localized data, as defined by BCP-47, e.g. "en-US". */ listings?: { [key: string]: Schema$InAppProductListing; } | null; /** * Package name of the parent app. */ packageName?: string | null; /** * Prices per buyer region. None of these can be zero, as in-app products are never free. Map key is region code, as defined by ISO 3166-2. */ prices?: { [key: string]: Schema$Price; } | null; /** * The type of the product, e.g. a recurring subscription. */ purchaseType?: string | null; /** * Stock-keeping-unit (SKU) of the product, unique within an app. */ sku?: string | null; /** * The status of the product, e.g. whether it's active. */ status?: string | null; /** * Subscription period, specified in ISO 8601 format. Acceptable values are P1W (one week), P1M (one month), P3M (three months), P6M (six months), and P1Y (one year). */ subscriptionPeriod?: string | null; /** * Trial period, specified in ISO 8601 format. Acceptable values are anything between P7D (seven days) and P999D (999 days). */ trialPeriod?: string | null; } /** * Store listing of a single in-app product. */ export interface Schema$InAppProductListing { /** * Localized entitlement benefits for a subscription. */ benefits?: string[] | null; /** * Description for the store listing. */ description?: string | null; /** * Title for the store listing. */ title?: string | null; } /** * Response listing all in-app products. */ export interface Schema$InappproductsListResponse { /** * All in-app products. */ inappproduct?: Schema$InAppProduct[]; /** * The kind of this response ("androidpublisher#inappproductsListResponse"). */ kind?: string | null; /** * Information about the current page. */ pageInfo?: Schema$PageInfo; /** * Pagination token, to handle a number of products that is over one page. */ tokenPagination?: Schema$TokenPagination; } /** * An artifact resource which gets created when uploading an APK or Android App Bundle through internal app sharing. */ export interface Schema$InternalAppSharingArtifact { /** * The sha256 fingerprint of the certificate used to sign the generated artifact. */ certificateFingerprint?: string | null; /** * The download URL generated for the uploaded artifact. Users that are authorized to download can follow the link to the Play Store app to install it. */ downloadUrl?: string | null; /** * The sha256 hash of the artifact represented as a lowercase hexadecimal number, matching the output of the sha256sum command. */ sha256?: string | null; } /** * Contains the introductory price information for a subscription. */ export interface Schema$IntroductoryPriceInfo { /** * Introductory price of the subscription, not including tax. The currency is the same as price_currency_code. Price is expressed in micro-units, where 1,000,000 micro-units represents one unit of the currency. For example, if the subscription price is €1.99, price_amount_micros is 1990000. */ introductoryPriceAmountMicros?: string | null; /** * ISO 4217 currency code for the introductory subscription price. For example, if the price is specified in British pounds sterling, price_currency_code is "GBP". */ introductoryPriceCurrencyCode?: string | null; /** * The number of billing period to offer introductory pricing. */ introductoryPriceCycles?: number | null; /** * Introductory price period, specified in ISO 8601 format. Common values are (but not limited to) "P1W" (one week), "P1M" (one month), "P3M" (three months), "P6M" (six months), and "P1Y" (one year). */ introductoryPricePeriod?: string | null; } /** * A localized store listing. The resource for ListingsService. */ export interface Schema$Listing { /** * Full description of the app. */ fullDescription?: string | null; /** * Language localization code (a BCP-47 language tag; for example, "de-AT" for Austrian German). */ language?: string | null; /** * Short description of the app. */ shortDescription?: string | null; /** * Localized title of the app. */ title?: string | null; /** * URL of a promotional YouTube video for the app. */ video?: string | null; } /** * Response listing all localized listings. */ export interface Schema$ListingsListResponse { /** * The kind of this response ("androidpublisher#listingsListResponse"). */ kind?: string | null; /** * All localized listings. */ listings?: Schema$Listing[]; } /** * Release notes specification, i.e. language and text. */ export interface Schema$LocalizedText { /** * Language localization code (a BCP-47 language tag; for example, "de-AT" for Austrian German). */ language?: string | null; /** * The text in the given language. */ text?: string | null; } /** * Information about the current page. List operations that supports paging return only one "page" of results. This protocol buffer message describes the page that has been returned. */ export interface Schema$PageInfo { /** * Maximum number of results returned in one page. ! The number of results included in the API response. */ resultPerPage?: number | null; /** * Index of the first result returned in the current page. */ startIndex?: number | null; /** * Total number of results available on the backend ! The total number of results in the result set. */ totalResults?: number | null; } /** * Definition of a price, i.e. currency and units. */ export interface Schema$Price { /** * 3 letter Currency code, as defined by ISO 4217. See java/com/google/common/money/CurrencyCode.java */ currency?: string | null; /** * Price in 1/million of the currency base unit, represented as a string. */ priceMicros?: string | null; } /** * A ProductPurchase resource indicates the status of a user's inapp product purchase. */ export interface Schema$ProductPurchase { /** * The acknowledgement state of the inapp product. Possible values are: 0. Yet to be acknowledged 1. Acknowledged */ acknowledgementState?: number | null; /** * The consumption state of the inapp product. Possible values are: 0. Yet to be consumed 1. Consumed */ consumptionState?: number | null; /** * A developer-specified string that contains supplemental information about an order. */ developerPayload?: string | null; /** * This kind represents an inappPurchase object in the androidpublisher service. */ kind?: string | null; /** * An obfuscated version of the id that is uniquely associated with the user's account in your app. Only present if specified using https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid when the purchase was made. */ obfuscatedExternalAccountId?: string | null; /** * An obfuscated version of the id that is uniquely associated with the user's profile in your app. Only present if specified using https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid when the purchase was made. */ obfuscatedExternalProfileId?: string | null; /** * The order id associated with the purchase of the inapp product. */ orderId?: string | null; /** * The inapp product SKU. */ productId?: string | null; /** * The purchase state of the order. Possible values are: 0. Purchased 1. Canceled 2. Pending */ purchaseState?: number | null; /** * The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). */ purchaseTimeMillis?: string | null; /** * The purchase token generated to identify this purchase. */ purchaseToken?: string | null; /** * The type of purchase of the inapp product. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are: 0. Test (i.e. purchased from a license testing account) 1. Promo (i.e. purchased using a promo code) 2. Rewarded (i.e. from watching a video ad instead of paying) */ purchaseType?: number | null; /** * The quantity associated with the purchase of the inapp product. */ quantity?: number | null; /** * ISO 3166-1 alpha-2 billing region code of the user at the time the product was granted. */ regionCode?: string | null; } /** * Request for the product.purchases.acknowledge API. */ export interface Schema$ProductPurchasesAcknowledgeRequest { /** * Payload to attach to the purchase. */ developerPayload?: string | null; } /** * An Android app review. */ export interface Schema$Review { /** * The name of the user who wrote the review. */ authorName?: string | null; /** * A repeated field containing comments for the review. */ comments?: Schema$Comment[]; /** * Unique identifier for this review. */ reviewId?: string | null; } /** * The result of replying/updating a reply to review. */ export interface Schema$ReviewReplyResult { /** * The time at which the reply took effect. */ lastEdited?: Schema$Timestamp; /** * The reply text that was applied. */ replyText?: string | null; } /** * Response listing reviews. */ export interface Schema$ReviewsListResponse { /** * Information about the current page. */ pageInfo?: Schema$PageInfo; /** * List of reviews. */ reviews?: Schema$Review[]; /** * Pagination token, to handle a number of products that is over one page. */ tokenPagination?: Schema$TokenPagination; } /** * Request to reply to review or update existing reply. */ export interface Schema$ReviewsReplyRequest { /** * The text to set as the reply. Replies of more than approximately 350 characters will be rejected. HTML tags will be stripped. */ replyText?: string | null; } /** * Response on status of replying to a review. */ export interface Schema$ReviewsReplyResponse { /** * The result of replying/updating a reply to review. */ result?: Schema$ReviewReplyResult; } /** * Information provided by the user when they complete the subscription cancellation flow (cancellation reason survey). */ export interface Schema$SubscriptionCancelSurveyResult { /** * The cancellation reason the user chose in the survey. Possible values are: 0. Other 1. I don't use this service enough 2. Technical issues 3. Cost-related reasons 4. I found a better app */ cancelSurveyReason?: number | null; /** * The customized input cancel reason from the user. Only present when cancelReason is 0. */ userInputCancelReason?: string | null; } /** * A SubscriptionDeferralInfo contains the data needed to defer a subscription purchase to a future expiry time. */ export interface Schema$SubscriptionDeferralInfo { /** * The desired next expiry time to assign to the subscription, in milliseconds since the Epoch. The given time must be later/greater than the current expiry time for the subscription. */ desiredExpiryTimeMillis?: string | null; /** * The expected expiry time for the subscription. If the current expiry time for the subscription is not the value specified here, the deferral will not occur. */ expectedExpiryTimeMillis?: string | null; } /** * Contains the price change information for a subscription that can be used to control the user journey for the price change in the app. This can be in the form of seeking confirmation from the user or tailoring the experience for a successful conversion. */ export interface Schema$SubscriptionPriceChange { /** * The new price the subscription will renew with if the price change is accepted by the user. */ newPrice?: Schema$Price; /** * The current state of the price change. Possible values are: 0. Outstanding: State for a pending price change waiting for the user to agree. In this state, you can optionally seek confirmation from the user using the In-App API. 1. Accepted: State for an accepted price change that the subscription will renew with unless it's canceled. The price change takes effect on a future date when the subscription renews. Note that the change might not occur when the subscription is renewed next. */ state?: number | null; } /** * A SubscriptionPurchase resource indicates the status of a user's subscription purchase. */ export interface Schema$SubscriptionPurchase { /** * The acknowledgement state of the subscription product. Possible values are: 0. Yet to be acknowledged 1. Acknowledged */ acknowledgementState?: number | null; /** * Whether the subscription will automatically be renewed when it reaches its current expiry time. */ autoRenewing?: boolean | null; /** * Time at which the subscription will be automatically resumed, in milliseconds since the Epoch. Only present if the user has requested to pause the subscription. */ autoResumeTimeMillis?: string | null; /** * The reason why a subscription was canceled or is not auto-renewing. Possible values are: 0. User canceled the subscription 1. Subscription was canceled by the system, for example because of a billing problem 2. Subscription was replaced with a new subscription 3. Subscription was canceled by the developer */ cancelReason?: number | null; /** * Information provided by the user when they complete the subscription cancellation flow (cancellation reason survey). */ cancelSurveyResult?: Schema$SubscriptionCancelSurveyResult; /** * ISO 3166-1 alpha-2 billing country/region code of the user at the time the subscription was granted. */ countryCode?: string | null; /** * A developer-specified string that contains supplemental information about an order. */ developerPayload?: string | null; /** * The email address of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'. */ emailAddress?: string | null; /** * Time at which the subscription will expire, in milliseconds since the Epoch. */ expiryTimeMillis?: string | null; /** * User account identifier in the third-party service. Only present if account linking happened as part of the subscription purchase flow. */ externalAccountId?: string | null; /** * The family name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'. */ familyName?: string | null; /** * The given name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'. */ givenName?: string | null; /** * Introductory price information of the subscription. This is only present when the subscription was purchased with an introductory price. This field does not indicate the subscription is currently in introductory price period. */ introductoryPriceInfo?: Schema$IntroductoryPriceInfo; /** * This kind represents a subscriptionPurchase object in the androidpublisher service. */ kind?: string | null; /** * The purchase token of the originating purchase if this subscription is one of the following: 0. Re-signup of a canceled but non-lapsed subscription 1. Upgrade/downgrade from a previous subscription For example, suppose a user originally signs up and you receive purchase token X, then the user cancels and goes through the resignup flow (before their subscription lapses) and you receive purchase token Y, and finally the user upgrades their subscription and you receive purchase token Z. If you call this API with purchase token Z, this field will be set to Y. If you call this API with purchase token Y, this field will be set to X. If you call this API with purchase token X, this field will not be set. */ linkedPurchaseToken?: string | null; /** * An obfuscated version of the id that is uniquely associated with the user's account in your app. Present for the following purchases: * If account linking happened as part of the subscription purchase flow. * It was specified using https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedaccountid when the purchase was made. */ obfuscatedExternalAccountId?: string | null; /** * An obfuscated version of the id that is uniquely associated with the user's profile in your app. Only present if specified using https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setobfuscatedprofileid when the purchase was made. */ obfuscatedExternalProfileId?: string | null; /** * The order id of the latest recurring order associated with the purchase of the subscription. */ orderId?: string | null; /** * The payment state of the subscription. Possible values are: 0. Payment pending 1. Payment received 2. Free trial 3. Pending deferred upgrade/downgrade Not present for canceled, expired subscriptions. */ paymentState?: number | null; /** * Price of the subscription, not including tax. Price is expressed in micro-units, where 1,000,000 micro-units represents one unit of the currency. For example, if the subscription price is €1.99, price_amount_micros is 1990000. */ priceAmountMicros?: string | null; /** * The latest price change information available. This is present only when there is an upcoming price change for the subscription yet to be applied. Once the subscription renews with the new price or the subscription is canceled, no price change information will be returned. */ priceChange?: Schema$SubscriptionPriceChange; /** * ISO 4217 currency code for the subscription price. For example, if the price is specified in British pounds sterling, price_currency_code is "GBP". */ priceCurrencyCode?: string | null; /** * The Google profile id of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'. */ profileId?: string | null; /** * The profile name of the user when the subscription was purchased. Only present for purchases made with 'Subscribe with Google'. */ profileName?: string | null; /** * The promotion code applied on this purchase. This field is only set if a vanity code promotion is applied when the subscription was purchased. */ promotionCode?: string | null; /** * The type of promotion applied on this purchase. This field is only set if a promotion is applied when the subscription was purchased. Possible values are: 0. One time code 1. Vanity code */ promotionType?: number | null; /** * The type of purchase of the subscription. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are: 0. Test (i.e. purchased from a license testing account) 1. Promo (i.e. purchased using a promo code) */ purchaseType?: number | null; /** * Time at which the subscription was granted, in milliseconds since the Epoch. */ startTimeMillis?: string | null; /** * The time at which the subscription was canceled by the user, in milliseconds since the epoch. Only present if cancelReason is 0. */ userCancellationTimeMillis?: string | null; } /** * Request for the purchases.subscriptions.acknowledge API. */ export interface Schema$SubscriptionPurchasesAcknowledgeRequest { /** * Payload to attach to the purchase. */ developerPayload?: string | null; } /** * Request for the purchases.subscriptions.defer API. */ export interface Schema$SubscriptionPurchasesDeferRequest { /** * The information about the new desired expiry time for the subscription. */ deferralInfo?: Schema$SubscriptionDeferralInfo; } /** * Response for the purchases.subscriptions.defer API. */ export interface Schema$SubscriptionPurchasesDeferResponse { /** * The new expiry time for the subscription in milliseconds since the Epoch. */ newExpiryTimeMillis?: string | null; } /** * Response to list previously created system APK variants. */ export interface Schema$SystemApksListResponse { /** * All system APK variants created. */ variants?: Schema$Variant[]; } /** * The testers of an app. The resource for TestersService. */ export interface Schema$Testers { /** * All testing Google Groups, as email addresses. */ googleGroups?: string[] | null; } /** * A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970. */ export interface Schema$Timestamp { /** * Non-negative fractions of a second at nanosecond resolution. Must be from 0 to 999,999,999 inclusive. */ nanos?: number | null; /** * Represents seconds of UTC time since Unix epoch. */ seconds?: string | null; } /** * Pagination information returned by a List operation when token pagination is enabled. List operations that supports paging return only one "page" of results. This protocol buffer message describes the page that has been returned. When using token pagination, clients should use the next/previous token to get another page of the result. The presence or absence of next/previous token indicates whether a next/previous page is available and provides a mean of accessing this page. ListRequest.page_token should be set to either next_page_token or previous_page_token to access another page. */ export interface Schema$TokenPagination { /** * Tokens to pass to the standard list field 'page_token'. Whenever available, tokens are preferred over manipulating start_index. */ nextPageToken?: string | null; previousPageToken?: string | null; } /** * A track configuration. The resource for TracksService. */ export interface Schema$Track { /** * In a read request, represents all active releases in the track. In an update request, represents desired changes. */ releases?: Schema$TrackRelease[]; /** * Identifier of the track. */ track?: string | null; } /** * A release within a track. */ export interface Schema$TrackRelease { /** * Restricts a release to a specific set of countries. */ countryTargeting?: Schema$CountryTargeting; /** * In-app update priority of the release. All newly added APKs in the release will be considered at this priority. Can take values in the range [0, 5], with 5 the highest priority. Defaults to 0. in_app_update_priority can not be updated once the release is rolled out. See https://developer.android.com/guide/playcore/in-app-updates. */ inAppUpdatePriority?: number | null; /** * The release name. Not required to be unique. If not set, the name is generated from the APK's version_name. If the release contains multiple APKs, the name is generated from the date. */ name?: string | null; /** * A description of what is new in this release. */ releaseNotes?: Schema$LocalizedText[]; /** * The status of the release. */ status?: string | null; /** * Fraction of users who are eligible for a staged release. 0 < fraction < 1. Can only be set when status is "inProgress" or "halted". */ userFraction?: number | null; /** * Version codes of all APKs in the release. Must include version codes to retain from previous releases. */ versionCodes?: string[] | null; } /** * Response listing all tracks. */ export interface Schema$TracksListResponse { /** * The kind of this response ("androidpublisher#tracksListResponse"). */ kind?: string | null; /** * All tracks. */ tracks?: Schema$Track[]; } /** * User entry from conversation between user and developer. */ export interface Schema$UserComment { /** * Integer Android SDK version of the user's device at the time the review was written, e.g. 23 is Marshmallow. May be absent. */ androidOsVersion?: number | null; /** * Integer version code of the app as installed at the time the review was written. May be absent. */ appVersionCode?: number | null; /** * String version name of the app as installed at the time the review was written. May be absent. */ appVersionName?: string | null; /** * Codename for the reviewer's device, e.g. klte, flounder. May be absent. */ device?: string | null; /** * Information about the characteristics of the user's device. */ deviceMetadata?: Schema$DeviceMetadata; /** * The last time at which this comment was updated. */ lastModified?: Schema$Timestamp; /** * Untranslated text of the review, where the review was translated. If the review was not translated this is left blank. */ originalText?: string | null; /** * Language code for the reviewer. This is taken from the device settings so is not guaranteed to match the language the review is written in. May be absent. */ reviewerLanguage?: string | null; /** * The star rating associated with the review, from 1 to 5. */ starRating?: number | null; /** * The content of the comment, i.e. review body. In some cases users have been able to write a review with separate title and body; in those cases the title and body are concatenated and separated by a tab character. */ text?: string | null; /** * Number of users who have given this review a thumbs down. */ thumbsDownCount?: number | null; /** * Number of users who have given this review a thumbs up. */ thumbsUpCount?: number | null; } /** * A permission used by this APK. */ export interface Schema$UsesPermission { /** * Optionally, the maximum SDK version for which the permission is required. */ maxSdkVersion?: number | null; /** * The name of the permission requested. */ name?: string | null; } /** * APK that is suitable for inclusion in a system image. The resource of SystemApksService. */ export interface Schema$Variant { /** * The device spec used to generate the APK. */ deviceSpec?: Schema$DeviceSpec; /** * Output only. The ID of a previously created system APK variant. */ variantId?: number | null; } /** * A VoidedPurchase resource indicates a purchase that was either canceled/refunded/charged-back. */ export interface Schema$VoidedPurchase { /** * This kind represents a voided purchase object in the androidpublisher service. */ kind?: string | null; /** * The order id which uniquely identifies a one-time purchase, subscription purchase, or subscription renewal. */ orderId?: string | null; /** * The time at which the purchase was made, in milliseconds since the epoch (Jan 1, 1970). */ purchaseTimeMillis?: string | null; /** * The token which uniquely identifies a one-time purchase or subscription. To uniquely identify subscription renewals use order_id (available starting from version 3 of the API). */ purchaseToken?: string | null; /** * The reason why the purchase was voided, possible values are: 0. Other 1. Remorse 2. Not_received 3. Defective 4. Accidental_purchase 5. Fraud 6. Friendly_fraud 7. Chargeback */ voidedReason?: number | null; /** * The initiator of voided purchase, possible values are: 0. User 1. Developer 2. Google */ voidedSource?: number | null; /** * The time at which the purchase was canceled/refunded/charged-back, in milliseconds since the epoch (Jan 1, 1970). */ voidedTimeMillis?: string | null; } /** * Response for the voidedpurchases.list API. */ export interface Schema$VoidedPurchasesListResponse { /** * General pagination information. */ pageInfo?: Schema$PageInfo; /** * Pagination information for token pagination. */ tokenPagination?: Schema$TokenPagination; voidedPurchases?: Schema$VoidedPurchase[]; } export class Resource$Edits { context: APIRequestContext; apks: Resource$Edits$Apks; bundles: Resource$Edits$Bundles; deobfuscationfiles: Resource$Edits$Deobfuscationfiles; details: Resource$Edits$Details; expansionfiles: Resource$Edits$Expansionfiles; images: Resource$Edits$Images; listings: Resource$Edits$Listings; testers: Resource$Edits$Testers; tracks: Resource$Edits$Tracks; constructor(context: APIRequestContext); /** * Commits an app edit. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/androidpublisher.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: * // `$ npm install googleapis` * * const {google} = require('googleapis'); * const androidpublisher = google.androidpublisher('v3'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: ['https://www.googleapis.com/auth/androidpublisher'], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await androidpublisher.edits.commit({ * // Identifier of the edit. * editId: 'placeholder-value', * // Package name of the app. * packageName: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { * // "expiryTimeSeconds": "my_expiryTimeSeconds", * // "id": "my_id" * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ commit(params: Params$Resource$Edits$Commit, options: StreamMethodOptions): GaxiosPromise<Readable>; commit(params?: Params$Resource$Edits$Commit, options?: MethodOptions): GaxiosPromise<Schema$AppEdit>; commit(params: Params$Resource$Edits$Commit, options: Stre