0.0.20241031 • Published 8 months ago

@maxim_mazurok/gapi.client.androidpublisher-v3 v0.0.20241031

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

TypeScript typings for Google Play Android Developer API v3

Lets Android application developers access their Google Play accounts. At a high level, the expected workflow is to "insert" an Edit, make changes as necessary, and then "commit" it. For detailed description please check documentation.

Installing

Install typings for Google Play Android Developer API:

npm install @types/gapi.client.androidpublisher-v3 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load(
  'https://androidpublisher.googleapis.com/$discovery/rest?version=v3',
  () => {
    // now we can use:
    // gapi.client.androidpublisher
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('androidpublisher', 'v3', () => {
  // now we can use:
  // gapi.client.androidpublisher
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // View and manage your Google Play Developer account
    'https://www.googleapis.com/auth/androidpublisher',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use Google Play Android Developer API resources:

/*
Writes the Safety Labels declaration of an app.
*/
await gapi.client.androidpublisher.applications.dataSafety({
  packageName: 'packageName',
});

/*
Incrementally update targeting for a recovery action. Note that only the criteria selected during the creation of recovery action can be expanded.
*/
await gapi.client.androidpublisher.apprecovery.addTargeting({
  appRecoveryId: 'appRecoveryId',
  packageName: 'packageName',
});

/*
Cancel an already executing app recovery action. Note that this action changes status of the recovery action to CANCELED.
*/
await gapi.client.androidpublisher.apprecovery.cancel({
  appRecoveryId: 'appRecoveryId',
  packageName: 'packageName',
});

/*
Create an app recovery action with recovery status as DRAFT. Note that this action does not execute the recovery action.
*/
await gapi.client.androidpublisher.apprecovery.create({
  packageName: 'packageName',
});

/*
Deploy an already created app recovery action with recovery status DRAFT. Note that this action activates the recovery action for all targeted users and changes its status to ACTIVE.
*/
await gapi.client.androidpublisher.apprecovery.deploy({
  appRecoveryId: 'appRecoveryId',
  packageName: 'packageName',
});

/*
List all app recovery action resources associated with a particular package name and app version.
*/
await gapi.client.androidpublisher.apprecovery.list({
  packageName: 'packageName',
});

/*
Commits an app edit.
*/
await gapi.client.androidpublisher.edits.commit({
  editId: 'editId',
  packageName: 'packageName',
});

/*
Deletes an app edit.
*/
await gapi.client.androidpublisher.edits.delete({
  editId: 'editId',
  packageName: 'packageName',
});

/*
Gets an app edit.
*/
await gapi.client.androidpublisher.edits.get({
  editId: 'editId',
  packageName: 'packageName',
});

/*
Creates a new edit for an app.
*/
await gapi.client.androidpublisher.edits.insert({packageName: 'packageName'});

/*
Validates an app edit.
*/
await gapi.client.androidpublisher.edits.validate({
  editId: 'editId',
  packageName: 'packageName',
});

/*
Creates a new external transaction.
*/
await gapi.client.androidpublisher.externaltransactions.createexternaltransaction(
  {parent: 'parent'}
);

/*
Gets an existing external transaction.
*/
await gapi.client.androidpublisher.externaltransactions.getexternaltransaction({
  name: 'name',
});

/*
Refunds or partially refunds an existing external transaction.
*/
await gapi.client.androidpublisher.externaltransactions.refundexternaltransaction(
  {name: 'name'}
);

/*
Downloads a single signed APK generated from an app bundle.
*/
await gapi.client.androidpublisher.generatedapks.download({
  downloadId: 'downloadId',
  packageName: 'packageName',
  versionCode: 1,
});

/*
Returns download metadata for all APKs that were generated from a given app bundle.
*/
await gapi.client.androidpublisher.generatedapks.list({
  packageName: 'packageName',
  versionCode: 1,
});

/*
Grant access for a user to the given package.
*/
await gapi.client.androidpublisher.grants.create({parent: 'parent'});

/*
Removes all access for the user to the given package or developer account.
*/
await gapi.client.androidpublisher.grants.delete({name: 'name'});

/*
Updates access for the user to the given package.
*/
await gapi.client.androidpublisher.grants.patch({name: 'name'});

/*
Deletes in-app products (managed products or subscriptions). Set the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput. This method should not be used to delete subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.
*/
await gapi.client.androidpublisher.inappproducts.batchDelete({
  packageName: 'packageName',
});

/*
Reads multiple in-app products, which can be managed products or subscriptions. This method should not be used to retrieve subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.
*/
await gapi.client.androidpublisher.inappproducts.batchGet({
  packageName: 'packageName',
});

/*
Updates or inserts one or more in-app products (managed products or subscriptions). Set the latencyTolerance field on nested requests to PRODUCT_UPDATE_LATENCY_TOLERANCE_LATENCY_TOLERANT to achieve maximum update throughput. This method should no longer be used to update subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.
*/
await gapi.client.androidpublisher.inappproducts.batchUpdate({
  packageName: 'packageName',
});

/*
Deletes an in-app product (a managed product or a subscription). This method should no longer be used to delete subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.
*/
await gapi.client.androidpublisher.inappproducts.delete({
  packageName: 'packageName',
  sku: 'sku',
});

/*
Gets an in-app product, which can be a managed product or a subscription. This method should no longer be used to retrieve subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.
*/
await gapi.client.androidpublisher.inappproducts.get({
  packageName: 'packageName',
  sku: 'sku',
});

/*
Creates an in-app product (a managed product or a subscription). This method should no longer be used to create subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.
*/
await gapi.client.androidpublisher.inappproducts.insert({
  packageName: 'packageName',
});

/*
Lists all in-app products - both managed products and subscriptions. If an app has a large number of in-app products, the response may be paginated. In this case the response field `tokenPagination.nextPageToken` will be set and the caller should provide its value as a `token` request parameter to retrieve the next page. This method should no longer be used to retrieve subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.
*/
await gapi.client.androidpublisher.inappproducts.list({
  packageName: 'packageName',
});

/*
Patches an in-app product (a managed product or a subscription). This method should no longer be used to update subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.
*/
await gapi.client.androidpublisher.inappproducts.patch({
  packageName: 'packageName',
  sku: 'sku',
});

/*
Updates an in-app product (a managed product or a subscription). This method should no longer be used to update subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.
*/
await gapi.client.androidpublisher.inappproducts.update({
  packageName: 'packageName',
  sku: 'sku',
});

/*
Uploads an APK to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See [Timeouts and Errors](https://developers.google.com/api-client-library/java/google-api-java-client/errors) for an example in java.
*/
await gapi.client.androidpublisher.internalappsharingartifacts.uploadapk({
  packageName: 'packageName',
});

/*
Uploads an app bundle to internal app sharing. If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See [Timeouts and Errors](https://developers.google.com/api-client-library/java/google-api-java-client/errors) for an example in java.
*/
await gapi.client.androidpublisher.internalappsharingartifacts.uploadbundle({
  packageName: 'packageName',
});

/*
Calculates the region prices, using today's exchange rate and country-specific pricing patterns, based on the price in the request for a set of regions.
*/
await gapi.client.androidpublisher.monetization.convertRegionPrices({
  packageName: 'packageName',
});

/*
Refunds a user's subscription or in-app purchase order. Orders older than 3 years cannot be refunded.
*/
await gapi.client.androidpublisher.orders.refund({
  orderId: 'orderId',
  packageName: 'packageName',
});

/*
Gets a single review.
*/
await gapi.client.androidpublisher.reviews.get({
  packageName: 'packageName',
  reviewId: 'reviewId',
});

/*
Lists all reviews.
*/
await gapi.client.androidpublisher.reviews.list({packageName: 'packageName'});

/*
Replies to a single review, or updates an existing reply.
*/
await gapi.client.androidpublisher.reviews.reply({
  packageName: 'packageName',
  reviewId: 'reviewId',
});

/*
Grant access for a user to the given developer account.
*/
await gapi.client.androidpublisher.users.create({parent: 'parent'});

/*
Removes all access for the user to the given developer account.
*/
await gapi.client.androidpublisher.users.delete({name: 'name'});

/*
Lists all users with access to a developer account.
*/
await gapi.client.androidpublisher.users.list({parent: 'parent'});

/*
Updates access for the user to the developer account.
*/
await gapi.client.androidpublisher.users.patch({name: 'name'});
0.0.20241031

8 months ago

0.0.20241030

9 months ago

0.0.20241029

9 months ago

0.0.20241028

9 months ago

0.0.20241024

9 months ago

0.0.20241023

9 months ago

0.0.20241022

9 months ago

0.0.20241021

9 months ago

0.0.20241017

9 months ago

0.0.20241016

9 months ago

0.0.20241015

9 months ago

0.0.20240926

10 months ago

0.0.20240928

10 months ago

0.0.20241010

9 months ago

0.0.20241014

9 months ago

0.0.20241008

9 months ago

0.0.20241007

9 months ago

0.0.20240925

10 months ago

0.0.20240918

10 months ago

0.0.20240919

10 months ago

0.0.20240916

10 months ago

0.0.20240917

10 months ago

0.0.20240923

10 months ago

0.0.20240924

10 months ago

0.0.20240909

10 months ago

0.0.20240910

10 months ago

0.0.20240911

10 months ago

0.0.20240912

10 months ago

0.0.20240904

10 months ago

0.0.20240905

10 months ago

0.0.20240828

11 months ago

0.0.20240823

11 months ago

0.0.20240606

1 year ago

0.0.20240729

12 months ago

0.0.20240723

12 months ago

0.0.20240724

12 months ago

0.0.20240725

12 months ago

0.0.20240604

1 year ago

0.0.20240605

1 year ago

0.0.20240722

12 months ago

0.0.20240617

1 year ago

0.0.20240618

1 year ago

0.0.20240613

1 year ago

0.0.20240730

12 months ago

0.0.20240731

12 months ago

0.0.20240610

1 year ago

0.0.20240611

1 year ago

0.0.20240624

1 year ago

0.0.20240625

1 year ago

0.0.20240626

1 year ago

0.0.20240627

1 year ago

0.0.20240530

1 year ago

0.0.20240529

1 year ago

0.0.20240528

1 year ago

0.0.20240522

1 year ago

0.0.20240808

11 months ago

0.0.20240805

11 months ago

0.0.20240806

11 months ago

0.0.20240807

11 months ago

0.0.20240801

12 months ago

0.0.20240819

11 months ago

0.0.20240815

11 months ago

0.0.20240812

11 months ago

0.0.20240813

11 months ago

0.0.20240814

11 months ago

0.0.20240709

1 year ago

0.0.20240822

11 months ago

0.0.20240820

11 months ago

0.0.20240821

11 months ago

0.0.20240716

12 months ago

0.0.20240717

12 months ago

0.0.20240718

12 months ago

0.0.20240715

12 months ago

0.0.20240710

1 year ago

0.0.20240711

1 year ago

0.0.20240521

1 year ago

0.0.20240520

1 year ago

0.0.20240516

1 year ago

0.0.20240515

1 year ago

0.0.20240514

1 year ago

0.0.20240513

1 year ago

0.0.20240509

1 year ago

0.0.20240507

1 year ago

0.0.20240502

1 year ago

0.0.20240501

1 year ago

0.0.20240430

1 year ago

0.0.20240429

1 year ago

0.0.20240425

1 year ago

0.0.20240424

1 year ago

0.0.20240423

1 year ago

0.0.20240422

1 year ago

0.0.20240418

1 year ago

0.0.20240417

1 year ago

0.0.20240416

1 year ago

0.0.20240415

1 year ago

0.0.20240411

1 year ago

0.0.20240410

1 year ago

0.0.20240409

1 year ago

0.0.20240408

1 year ago

0.0.20240404

1 year ago

0.0.20240402

1 year ago

0.0.20240403

1 year ago

0.0.20240328

1 year ago

0.0.20240327

1 year ago

0.0.20240326

1 year ago

0.0.20240325

1 year ago

0.0.20240321

1 year ago

0.0.20240320

1 year ago

0.0.20240319

1 year ago

0.0.20240318

1 year ago

0.0.20240314

1 year ago

0.0.20240312

1 year ago

0.0.20240313

1 year ago

0.0.20240308

1 year ago

0.0.20240306

1 year ago

0.0.20240229

1 year ago

0.0.20240228

1 year ago

0.0.20240226

1 year ago

0.0.20240227

1 year ago

0.0.20240222

1 year ago

0.0.20240221

1 year ago

0.0.20240220

1 year ago

0.0.20240219

1 year ago

0.0.20240215

1 year ago

0.0.20240214

1 year ago

0.0.20240212

1 year ago

0.0.20240213

1 year ago

0.0.20240208

1 year ago

0.0.20240207

1 year ago

0.0.20240206

1 year ago

0.0.20240204

1 year ago

0.0.20240131

1 year ago

0.0.20240129

1 year ago

0.0.20240122

1 year ago

0.0.20240123

1 year ago

0.0.20240118

1 year ago

0.0.20240117

1 year ago

0.0.20240114

1 year ago

0.0.20240116

1 year ago

0.0.20240111

2 years ago

0.0.20240110

2 years ago

0.0.20240109

2 years ago

0.0.20231213

2 years ago

0.0.20231210

2 years ago

0.0.20231212

2 years ago

0.0.20231207

2 years ago

0.0.20231206

2 years ago

0.0.20231205

2 years ago

0.0.20231204

2 years ago

0.0.20231130

2 years ago

0.0.20230816

2 years ago

0.0.20230817

2 years ago

0.0.20231106

2 years ago

0.0.20230810

2 years ago

0.0.20231108

2 years ago

0.0.20231107

2 years ago

0.0.20230814

2 years ago

0.0.20230815

2 years ago

0.0.20231111

2 years ago

0.0.20231115

2 years ago

0.0.20230808

2 years ago

0.0.20230926

2 years ago

0.0.20230927

2 years ago

0.0.20230806

2 years ago

0.0.20230809

2 years ago

0.0.20230920

2 years ago

0.0.20230921

2 years ago

0.0.20230803

2 years ago

0.0.20230925

2 years ago

0.0.20230801

2 years ago

0.0.20230802

2 years ago

0.0.20230719

2 years ago

0.0.20230717

2 years ago

0.0.20230718

2 years ago

0.0.20231128

2 years ago

0.0.20230711

2 years ago

0.0.20231127

2 years ago

0.0.20230712

2 years ago

0.0.20230830

2 years ago

0.0.20231129

2 years ago

0.0.20230831

2 years ago

0.0.20230713

2 years ago

0.0.20231010

2 years ago

0.0.20231012

2 years ago

0.0.20231016

2 years ago

0.0.20230829

2 years ago

0.0.20230708

2 years ago

0.0.20230706

2 years ago

0.0.20230821

2 years ago

0.0.20231116

2 years ago

0.0.20230822

2 years ago

0.0.20230704

2 years ago

0.0.20230823

2 years ago

0.0.20230824

2 years ago

0.0.20231120

2 years ago

0.0.20231122

2 years ago

0.0.20231001

2 years ago

0.0.20231121

2 years ago

0.0.20231003

2 years ago

0.0.20231123

2 years ago

0.0.20230731

2 years ago

0.0.20231031

2 years ago

0.0.20231030

2 years ago

0.0.20231018

2 years ago

0.0.20231017

2 years ago

0.0.20230720

2 years ago

0.0.20231019

2 years ago

0.0.20230726

2 years ago

0.0.20230727

2 years ago

0.0.20230724

2 years ago

0.0.20231023

2 years ago

0.0.20231025

2 years ago

0.0.20231024

2 years ago

0.0.20230629

2 years ago

0.0.20230628

2 years ago

0.0.20230917

2 years ago

0.0.20230919

2 years ago

0.0.20230910

2 years ago

0.0.20230913

2 years ago

0.0.20230914

2 years ago

0.0.20230912

2 years ago

0.0.20230906

2 years ago

0.0.20230907

2 years ago

0.0.20230905

2 years ago

0.0.20230627

2 years ago

0.0.20230626

2 years ago

0.0.20230524

2 years ago

0.0.20230525

2 years ago

0.0.20230522

2 years ago

0.0.20230523

2 years ago

0.0.20230531

2 years ago

0.0.20230530

2 years ago

0.0.20230612

2 years ago

0.0.20230613

2 years ago

0.0.20230614

2 years ago

0.0.20230615

2 years ago

0.0.20230620

2 years ago

0.0.20230607

2 years ago

0.0.20230608

2 years ago

0.0.20230601

2 years ago

0.0.20230605

2 years ago

0.0.20230606

2 years ago

0.0.20230511

2 years ago

0.0.20230512

2 years ago

0.0.20230517

2 years ago

0.0.20230518

2 years ago

0.0.20230516

2 years ago

0.0.20230509

2 years ago

0.0.20230502

2 years ago

0.0.20230622

2 years ago

0.0.20230504

2 years ago

0.0.20230510

2 years ago

0.0.20230418

2 years ago

0.0.20230301

2 years ago

0.0.20230420

2 years ago

0.0.20230405

2 years ago

0.0.20230406

2 years ago

0.0.20230315

2 years ago

0.0.20230316

2 years ago

0.0.20230313

2 years ago

0.0.20230314

2 years ago

0.0.20230319

2 years ago

0.0.20230322

2 years ago

0.0.20230323

2 years ago

0.0.20230321

2 years ago

0.0.20230425

2 years ago

0.0.20230304

2 years ago

0.0.20230302

2 years ago

0.0.20230424

2 years ago

0.0.20230308

2 years ago

0.0.20230309

2 years ago

0.0.20230427

2 years ago

0.0.20230307

2 years ago

0.0.20230326

2 years ago

0.0.20230327

2 years ago

0.0.20230329

2 years ago

0.0.20230330

2 years ago

0.0.20230228

2 years ago

0.0.20230226

2 years ago

0.0.20230216

2 years ago

0.0.20230214

2 years ago

0.0.20230215

2 years ago

0.0.20230223

2 years ago

0.0.20230221

2 years ago

0.0.20230222

2 years ago

0.0.20230206

2 years ago

0.0.20230129

2 years ago

0.0.20230209

2 years ago

0.0.20230207

2 years ago

0.0.20230208

2 years ago

0.0.20230131

2 years ago

0.0.20230212

2 years ago

0.0.20230201

2 years ago

0.0.20230202

2 years ago

0.0.20221116

3 years ago

0.0.20221115

3 years ago

0.0.20221114

3 years ago

0.0.20221110

3 years ago

0.0.20230102

3 years ago

0.0.20221109

3 years ago

0.0.20221229

3 years ago

0.0.20221108

3 years ago

0.0.20221228

3 years ago

0.0.20221104

3 years ago

0.0.20230126

2 years ago

0.0.20221222

3 years ago

0.0.20230117

2 years ago

0.0.20221215

3 years ago

0.0.20230118

2 years ago

0.0.20221213

3 years ago

0.0.20221212

3 years ago

0.0.20230119

2 years ago

0.0.20230124

2 years ago

0.0.20221208

3 years ago

0.0.20230125

2 years ago

0.0.20221207

3 years ago

0.0.20221206

3 years ago

0.0.20221129

3 years ago

0.0.20230123

2 years ago

0.0.20221205

3 years ago

0.0.20221128

3 years ago

0.0.20230104

3 years ago

0.0.20230105

3 years ago

0.0.20221201

3 years ago

0.0.20221123

3 years ago

0.0.20221122

3 years ago

0.0.20221121

3 years ago

0.0.20230109

3 years ago

0.0.20230110

3 years ago

0.0.20230111

3 years ago

0.0.20230112

3 years ago

0.0.20221117

3 years ago

0.0.20221031

3 years ago

0.0.20221016

3 years ago

0.0.20221013

3 years ago

0.0.20221012

3 years ago

0.0.20221011

3 years ago

0.0.20221009

3 years ago

0.0.20221020

3 years ago

0.0.20221006

3 years ago

0.0.20221027

3 years ago

0.0.20221005

3 years ago

0.0.20221103

3 years ago

0.0.20221026

3 years ago

0.0.20221004

3 years ago

0.0.20221102

3 years ago

0.0.20221025

3 years ago

0.0.20221101

3 years ago

0.0.20221024

3 years ago

0.0.20221001

3 years ago

0.0.20220927

3 years ago

0.0.20220928

3 years ago

0.0.20220929

3 years ago

0.0.20221019

3 years ago

0.0.20221018

3 years ago

0.0.20220830

3 years ago

0.0.20220906

3 years ago

0.0.20220907

3 years ago

0.0.20220919

3 years ago

0.0.20220831

3 years ago

0.0.20220820

3 years ago

0.0.20220920

3 years ago

0.0.20220921

3 years ago

0.0.20220823

3 years ago

0.0.20220824

3 years ago

0.0.20220913

3 years ago

0.0.20220825

3 years ago

0.0.20220926

3 years ago

0.0.20220915

3 years ago

0.0.20220817

3 years ago

0.0.20220816

3 years ago

0.0.20220813

3 years ago

0.0.20220811

3 years ago