0.0.20241029 • Published 8 months ago

@maxim_mazurok/gapi.client.cloudidentity-v1beta1 v0.0.20241029

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

TypeScript typings for Cloud Identity API v1beta1

API for provisioning and managing identity resources. For detailed description please check documentation.

Installing

Install typings for Cloud Identity API:

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

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 = [
    // Private Service: https://www.googleapis.com/auth/cloud-identity.devices
    'https://www.googleapis.com/auth/cloud-identity.devices',

    // See your device details
    'https://www.googleapis.com/auth/cloud-identity.devices.lookup',

    // Private Service: https://www.googleapis.com/auth/cloud-identity.devices.readonly
    'https://www.googleapis.com/auth/cloud-identity.devices.readonly',

    // See, change, create, and delete any of the Cloud Identity Groups that you can access, including the members of each group
    'https://www.googleapis.com/auth/cloud-identity.groups',

    // See any Cloud Identity Groups that you can access, including group members and their emails
    'https://www.googleapis.com/auth/cloud-identity.groups.readonly',

    // 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 API resources:

/*
Cancels an unfinished device wipe. This operation can be used to cancel device wipe in the gap between the wipe operation returning success and the device being wiped.
*/
await gapi.client.cloudidentity.devices.cancelWipe({name: 'name'});

/*
Creates a device. Only company-owned device may be created. **Note**: This method is available only to customers who have one of the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium
*/
await gapi.client.cloudidentity.devices.create({});

/*
Deletes the specified device.
*/
await gapi.client.cloudidentity.devices.delete({name: 'name'});

/*
Retrieves the specified device.
*/
await gapi.client.cloudidentity.devices.get({name: 'name'});

/*
Lists/Searches devices.
*/
await gapi.client.cloudidentity.devices.list({});

/*
Wipes all data on the specified device.
*/
await gapi.client.cloudidentity.devices.wipe({name: 'name'});

/*
Creates a `Group`.
*/
await gapi.client.cloudidentity.groups.create({});

/*
Deletes a `Group`.
*/
await gapi.client.cloudidentity.groups.delete({name: 'name'});

/*
Retrieves a `Group`.
*/
await gapi.client.cloudidentity.groups.get({name: 'name'});

/*
Get Security Settings
*/
await gapi.client.cloudidentity.groups.getSecuritySettings({name: 'name'});

/*
Lists the `Group` resources under a customer or namespace.
*/
await gapi.client.cloudidentity.groups.list({});

/*
Looks up the [resource name](https://cloud.google.com/apis/design/resource_names) of a `Group` by its `EntityKey`.
*/
await gapi.client.cloudidentity.groups.lookup({});

/*
Updates a `Group`.
*/
await gapi.client.cloudidentity.groups.patch({name: 'name'});

/*
Searches for `Group` resources matching a specified query.
*/
await gapi.client.cloudidentity.groups.search({});

/*
Update Security Settings
*/
await gapi.client.cloudidentity.groups.updateSecuritySettings({name: 'name'});

/*
Creates an InboundSamlSsoProfile for a customer. When the target customer has enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448), the `Operation` in the response will have `"done": false`, it will not have a response, and the metadata will have `"state": "awaiting-multi-party-approval"`.
*/
await gapi.client.cloudidentity.inboundSamlSsoProfiles.create({});

/*
Deletes an InboundSamlSsoProfile.
*/
await gapi.client.cloudidentity.inboundSamlSsoProfiles.delete({name: 'name'});

/*
Gets an InboundSamlSsoProfile.
*/
await gapi.client.cloudidentity.inboundSamlSsoProfiles.get({name: 'name'});

/*
Lists InboundSamlSsoProfiles for a customer.
*/
await gapi.client.cloudidentity.inboundSamlSsoProfiles.list({});

/*
Updates an InboundSamlSsoProfile. When the target customer has enabled [Multi-party approval for sensitive actions](https://support.google.com/a/answer/13790448), the `Operation` in the response will have `"done": false`, it will not have a response, and the metadata will have `"state": "awaiting-multi-party-approval"`.
*/
await gapi.client.cloudidentity.inboundSamlSsoProfiles.patch({name: 'name'});

/*
Creates an InboundSsoAssignment for users and devices in a `Customer` under a given `Group` or `OrgUnit`.
*/
await gapi.client.cloudidentity.inboundSsoAssignments.create({});

/*
Deletes an InboundSsoAssignment. To disable SSO, Create (or Update) an assignment that has `sso_mode` == `SSO_OFF`.
*/
await gapi.client.cloudidentity.inboundSsoAssignments.delete({name: 'name'});

/*
Gets an InboundSsoAssignment.
*/
await gapi.client.cloudidentity.inboundSsoAssignments.get({name: 'name'});

/*
Lists the InboundSsoAssignments for a `Customer`.
*/
await gapi.client.cloudidentity.inboundSsoAssignments.list({});

/*
Updates an InboundSsoAssignment. The body of this request is the `inbound_sso_assignment` field and the `update_mask` is relative to that. For example: a PATCH to `/v1beta1/inboundSsoAssignments/0abcdefg1234567&update_mask=rank` with a body of `{ "rank": 1 }` moves that (presumably group-targeted) SSO assignment to the highest priority and shifts any other group-targeted assignments down in priority.
*/
await gapi.client.cloudidentity.inboundSsoAssignments.patch({name: 'name'});

/*
Get a Policy
*/
await gapi.client.cloudidentity.policies.get({name: 'name'});

/*
List Policies
*/
await gapi.client.cloudidentity.policies.list({});
0.0.20241029

8 months ago

0.0.20241022

9 months ago

0.0.20241021

9 months ago

0.0.20241015

9 months ago

0.0.20241001

9 months ago

0.0.20241010

9 months ago

0.0.20241008

9 months ago

0.0.20240924

9 months ago

0.0.20240917

10 months ago

0.0.20240904

10 months ago

0.0.20240827

10 months ago

0.0.20240902

10 months ago

0.0.20240806

11 months ago

0.0.20240723

12 months ago

0.0.20240603

1 year ago

0.0.20240527

1 year ago

0.0.20240521

1 year ago

0.0.20240618

1 year ago

0.0.20240813

11 months ago

0.0.20240730

11 months ago

0.0.20240611

1 year ago

0.0.20240709

12 months ago

0.0.20240702

1 year ago

0.0.20240625

1 year ago

0.0.20240820

11 months ago

0.0.20240716

12 months ago

0.0.20240507

1 year ago

0.0.20240430

1 year ago

0.0.20240423

1 year ago

0.0.20240416

1 year ago

0.0.20240402

1 year ago

0.0.20240326

1 year ago

0.0.20240319

1 year ago

0.0.20240312

1 year ago

0.0.20240305

1 year ago

0.0.20240227

1 year ago

0.0.20240220

1 year ago

0.0.20240214

1 year ago

0.0.20240206

1 year ago

0.0.20240201

1 year ago

0.0.20240123

1 year ago

0.0.20240116

1 year ago

0.0.20240109

1 year ago

0.0.20240101

2 years ago

0.0.20231211

2 years ago

0.0.20231130

2 years ago

0.0.20231107

2 years ago

0.0.20231031

2 years ago

0.0.20231114

2 years ago

0.0.20230808

2 years ago

0.0.20230926

2 years ago

0.0.20230801

2 years ago

0.0.20230724

2 years ago

0.0.20231024

2 years ago

0.0.20230718

2 years ago

0.0.20230919

2 years ago

0.0.20231128

2 years ago

0.0.20230711

2 years ago

0.0.20230912

2 years ago

0.0.20231010

2 years ago

0.0.20230829

2 years ago

0.0.20230904

2 years ago

0.0.20230822

2 years ago

0.0.20230703

2 years ago

0.0.20231121

2 years ago

0.0.20231003

2 years ago

0.0.20230627

2 years ago

0.0.20230619

2 years ago

0.0.20230613

2 years ago

0.0.20230516

2 years ago

0.0.20230502

2 years ago

0.0.20230523

2 years ago

0.0.20230606

2 years ago

0.0.20230530

2 years ago

0.0.20230314

2 years ago

0.0.20230418

2 years ago

0.0.20230321

2 years ago

0.0.20230425

2 years ago

0.0.20230404

2 years ago

0.0.20230328

2 years ago

0.0.20230307

2 years ago

0.0.20230411

2 years ago

0.0.20230207

2 years ago

0.0.20230131

2 years ago

0.0.20230117

2 years ago

0.0.20221221

3 years ago

0.0.20230124

2 years ago

0.0.20230102

3 years ago

0.0.20221004

3 years ago

0.0.20221025

3 years ago

0.0.20221101

3 years ago

0.0.20221011

3 years ago

0.0.20220927

3 years ago

0.0.20220929

3 years ago

0.0.20221018

3 years ago

0.0.20220830

3 years ago

0.0.20220831

3 years ago

0.0.20220920

3 years ago

0.0.20220822

3 years ago

0.0.20220913

3 years ago

0.0.20220904

3 years ago

0.0.20220815

3 years ago

0.0.20220808

3 years ago