0.0.20240513 • Published 8 days ago

@maxim_mazurok/gapi.client.appengine-v1 v0.0.20240513

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

TypeScript typings for App Engine Admin API v1

Provisions and manages developers' App Engine applications. For detailed description please check documentation.

Installing

Install typings for App Engine Admin API:

npm install @types/gapi.client.appengine-v1 --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://appengine.googleapis.com/$discovery/rest?version=v1',
  () => {
    // now we can use:
    // gapi.client.appengine
  }
);
// 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('appengine', 'v1', () => {
  // now we can use:
  // gapi.client.appengine
});

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 applications deployed on Google App Engine
    'https://www.googleapis.com/auth/appengine.admin',

    // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
    'https://www.googleapis.com/auth/cloud-platform',

    // View your data across Google Cloud services and see the email address of your Google Account
    'https://www.googleapis.com/auth/cloud-platform.read-only',
  ],
  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 App Engine Admin API resources:

/*
Creates an App Engine application for a Google Cloud Platform project. Required fields: id - The ID of the target Cloud Platform project. location - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/standard/python/console/).
*/
await gapi.client.appengine.apps.create({});

/*
Gets information about an application.
*/
await gapi.client.appengine.apps.get({appsId: 'appsId'});

/*
Lists all the available runtimes for the application.
*/
await gapi.client.appengine.apps.listRuntimes({appsId: 'appsId'});

/*
Updates the specified Application resource. You can update the following fields: auth_domain - Google authentication domain for controlling user access to the application. default_cookie_expiration - Cookie expiration policy for the application. iap - Identity-Aware Proxy properties for the application.
*/
await gapi.client.appengine.apps.patch({appsId: 'appsId'});

/*
Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.
*/
await gapi.client.appengine.apps.repair({appsId: 'appsId'});
0.0.20240513

8 days ago

0.0.20240506

14 days ago

0.0.20240429

22 days ago

0.0.20240422

29 days ago

0.0.20240415

1 month ago

0.0.20240401

2 months ago

0.0.20240325

2 months ago

0.0.20240318

2 months ago

0.0.20240311

2 months ago

0.0.20240226

3 months ago

0.0.20240218

3 months ago

0.0.20240212

3 months ago

0.0.20240205

4 months ago

0.0.20240122

4 months ago

0.0.20240114

4 months ago

0.0.20240108

4 months ago

0.0.20231214

5 months ago

0.0.20231204

6 months ago

0.0.20230731

10 months ago

0.0.20231107

7 months ago

0.0.20230814

9 months ago

0.0.20231109

6 months ago

0.0.20231030

7 months ago

0.0.20230807

10 months ago

0.0.20230925

8 months ago

0.0.20230724

10 months ago

0.0.20231024

7 months ago

0.0.20230918

8 months ago

0.0.20230831

9 months ago

0.0.20230710

10 months ago

0.0.20231016

7 months ago

0.0.20230706

11 months ago

0.0.20230909

8 months ago

0.0.20230821

9 months ago

0.0.20231004

7 months ago

0.0.20230518

1 year ago

0.0.20230515

1 year ago

0.0.20230609

11 months ago

0.0.20230601

12 months ago

0.0.20230522

12 months ago

0.0.20230501

1 year ago

0.0.20230529

12 months ago

0.0.20230505

1 year ago

0.0.20230417

1 year ago

0.0.20230320

1 year ago

0.0.20230403

1 year ago

0.0.20230225

1 year ago

0.0.20230424

1 year ago

0.0.20230309

1 year ago

0.0.20230306

1 year ago

0.0.20230410

1 year ago

0.0.20230206

1 year ago

0.0.20230220

1 year ago

0.0.20230130

1 year ago

0.0.20230213

1 year ago

0.0.20221104

2 years ago

0.0.20221212

1 year ago

0.0.20230109

1 year ago

0.0.20221109

2 years ago

0.0.20230114

1 year ago

0.0.20230123

1 year ago

0.0.20221205

1 year ago

0.0.20221017

2 years ago

0.0.20221027

2 years ago

0.0.20221023

2 years ago

0.0.20220922

2 years ago

0.0.20220917

2 years ago

0.0.20220818

2 years ago

0.0.20220912

2 years ago

0.0.20220826

2 years ago

0.0.20220904

2 years ago

0.0.20220813

2 years ago

0.0.20220806

2 years ago