0.0.20241028 • Published 9 months ago

@maxim_mazurok/gapi.client.iap-v1beta1 v0.0.20241028

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

TypeScript typings for Cloud Identity-Aware Proxy API v1beta1

Controls access to cloud applications running on Google Cloud Platform. For detailed description please check documentation.

Installing

Install typings for Cloud Identity-Aware Proxy API:

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

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 = [
    // 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',
  ],
  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 Cloud Identity-Aware Proxy API resources:

/*
Gets the access control policy for an Identity-Aware Proxy protected resource. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
*/
await gapi.client.iap.getIamPolicy({resource: 'resource'});

/*
Sets the access control policy for an Identity-Aware Proxy protected resource. Replaces any existing policy. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
*/
await gapi.client.iap.setIamPolicy({resource: 'resource'});

/*
Returns permissions that a caller has on the Identity-Aware Proxy protected resource. If the resource does not exist or the caller does not have Identity-Aware Proxy permissions a [google.rpc.Code.PERMISSION_DENIED] will be returned. More information about managing access via IAP can be found at: https://cloud.google.com/iap/docs/managing-access#managing_access_via_the_api
*/
await gapi.client.iap.testIamPermissions({resource: 'resource'});
0.0.20241028

9 months ago

0.0.20241021

9 months ago

0.0.20240930

10 months ago

0.0.20241014

9 months ago

0.0.20241007

9 months ago

0.0.20240923

10 months ago

0.0.20240916

10 months ago

0.0.20240909

10 months ago

0.0.20240823

11 months ago

0.0.20240902

10 months ago

0.0.20240805

11 months ago

0.0.20240729

12 months ago

0.0.20240603

1 year ago

0.0.20240527

1 year ago

0.0.20240819

11 months ago

0.0.20240617

1 year ago

0.0.20240812

11 months ago

0.0.20240610

1 year ago

0.0.20240708

1 year ago

0.0.20240701

1 year ago

0.0.20240623

1 year ago

0.0.20240520

1 year ago

0.0.20240715

12 months ago

0.0.20240513

1 year ago

0.0.20240506

1 year ago

0.0.20240430

1 year ago

0.0.20240419

1 year ago

0.0.20240412

1 year ago

0.0.20240322

1 year ago

0.0.20240315

1 year ago

0.0.20240311

1 year ago

0.0.20240301

1 year ago

0.0.20240224

1 year ago

0.0.20240220

1 year ago

0.0.20240212

1 year ago

0.0.20240126

1 year ago

0.0.20240119

1 year ago

0.0.20240112

1 year ago

0.0.20240105

2 years ago

0.0.20231229

2 years ago

0.0.20231215

2 years ago

0.0.20231208

2 years ago

0.0.20231204

2 years ago

0.0.20231201

2 years ago

0.0.20231107

2 years ago

0.0.20231113

2 years ago

0.0.20231030

2 years ago

0.0.20230929

2 years ago

0.0.20230721

2 years ago

0.0.20230727

2 years ago

0.0.20230922

2 years ago

0.0.20231020

2 years ago

0.0.20230915

2 years ago

0.0.20231006

2 years ago

0.0.20230714

2 years ago

0.0.20231013

2 years ago

0.0.20230707

2 years ago

0.0.20230908

2 years ago

0.0.20230901

2 years ago

0.0.20230627

2 years ago

0.0.20230519

2 years ago

0.0.20230619

2 years ago

0.0.20230612

2 years ago

0.0.20230512

2 years ago

0.0.20230606

2 years ago

0.0.20230526

2 years ago

0.0.20230505

2 years ago

0.0.20230428

2 years ago

0.0.20230414

2 years ago

0.0.20230315

2 years ago

0.0.20230317

2 years ago

0.0.20230421

2 years ago

0.0.20230224

2 years ago

0.0.20230324

2 years ago

0.0.20230303

2 years ago

0.0.20230407

2 years ago

0.0.20230427

2 years ago

0.0.20230331

2 years ago

0.0.20230203

2 years ago

0.0.20230127

2 years ago

0.0.20230220

2 years ago

0.0.20230210

2 years ago

0.0.20230118

2 years ago

0.0.20221104

3 years ago

0.0.20221202

3 years ago

0.0.20221111

3 years ago

0.0.20221209

3 years ago

0.0.20230125

2 years ago

0.0.20221028

3 years ago

0.0.20221014

3 years ago

0.0.20220923

3 years ago

0.0.20221021

3 years ago

0.0.20220916

3 years ago

0.0.20220829

3 years ago

0.0.20220822

3 years ago

0.0.20220912

3 years ago

0.0.20220901

3 years ago

0.0.20220805

3 years ago