1.0.20220808 • Published 2 years ago

@maxim_mazurok/gapi.client.cloudidentity v1.0.20220808

Weekly downloads
84
License
MIT
Repository
github
Last release
2 years ago

TypeScript typings for Cloud Identity API v1

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@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('cloudidentity', 'v1', () => {
  // 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
      'https://www.googleapis.com/auth/cloud-identity',

      // 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, send, or cancel any Cloud Identity UserInvitations to join your organization to users
      'https://www.googleapis.com/auth/cloud-identity.userinvitations',

      // See, send, or cancel any Cloud Identity UserInvitations to join your organization to users
      'https://www.googleapis.com/auth/cloud-identity.userinvitations.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. This operation is possible when the device is in a "pending wipe" state. The device enters the "pending wipe" state when a wipe device command is issued, but has not yet been sent to the device. The cancel wipe will fail if the wipe command has already been issued to the device.
*/
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",  });
1.0.20220620

2 years ago

1.0.20220627

2 years ago

1.0.20220703

2 years ago

1.0.20220718

2 years ago

1.0.20220711

2 years ago

1.0.20220729

2 years ago

1.0.20220725

2 years ago

1.0.20220808

2 years ago

1.0.20220503

2 years ago

1.0.20220510

2 years ago

1.0.20220518

2 years ago

1.0.20220513

2 years ago

1.0.20220418

2 years ago

1.0.20220426

2 years ago

1.0.20220408

2 years ago

1.0.20220404

2 years ago

1.0.20220301

2 years ago

1.0.20220307

2 years ago

1.0.20220315

2 years ago

1.0.20220104

2 years ago

1.0.20220221

2 years ago

1.0.20220111

2 years ago

1.0.20220118

2 years ago

1.0.20220201

2 years ago

1.0.20220125

2 years ago

1.0.20220208

2 years ago

1.0.20220215

2 years ago

1.0.20211215

2 years ago

1.0.20211116

3 years ago

1.0.20211207

2 years ago

1.0.20211108

3 years ago

1.0.20211220

2 years ago

1.0.20211102

3 years ago

1.0.20211025

3 years ago

1.0.20211011

3 years ago

1.0.20211018

3 years ago

1.0.20211005

3 years ago

1.0.20210928

3 years ago

1.0.20210920

3 years ago

1.0.20210913

3 years ago

1.0.20210906

3 years ago

1.0.20210831

3 years ago

1.0.20210824

3 years ago

1.0.20210803

3 years ago

1.0.20210727

3 years ago

1.0.20210720

3 years ago

1.0.20210713

3 years ago

1.0.20210706

3 years ago

1.0.20210629

3 years ago

1.0.20210623

3 years ago

1.0.20210622

3 years ago

1.0.20210618

3 years ago

1.0.20210614

3 years ago

1.0.20210510

3 years ago

1.0.20210428

3 years ago

1.0.20210302

3 years ago

1.0.20210310

3 years ago

1.0.20210204

3 years ago

1.0.20210131

3 years ago

1.0.20210124

3 years ago

1.0.20210115

3 years ago

1.0.20210107

3 years ago

1.0.20210106

3 years ago

1.0.20201213

3 years ago

1.0.20201208

3 years ago

1.0.20201203

3 years ago

1.0.20201121

3 years ago

1.0.20201117

4 years ago

1.0.20201110

4 years ago