# @maxim_mazurok/gapi.client.iam-v1

> TypeScript typings for Identity and Access Management (IAM) API v1

Latest version **0.3.20260918** (published 2026-09-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @maxim_mazurok/gapi.client.iam-v1
pnpm add @maxim_mazurok/gapi.client.iam-v1
yarn add @maxim_mazurok/gapi.client.iam-v1
bun add @maxim_mazurok/gapi.client.iam-v1
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.20260918 |
| Published | 2026-09-29 |
| First published | 2022-08-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 59 |
| Author | Maxim Mazurok |
| Maintainers | maxim_mazurok |

## Links

- npm: https://www.npmjs.com/package/@maxim_mazurok/gapi.client.iam-v1
- Repository: https://github.com/Maxim-Mazurok/google-api-typings-generator
- Homepage: https://github.com/Maxim-Mazurok/google-api-typings-generator#readme
- Issues: https://github.com/Maxim-Mazurok/google-api-typings-generator/issues
- npm.io page: https://npm.io/package/@maxim_mazurok/gapi.client.iam-v1

## Recent versions

- 0.3.20260918 (latest) — 2026-09-29
- 0.3.20260911 — 2026-09-14
- 0.3.20260904 — 2026-09-09
- 0.3.20260828 — 2026-09-01
- 0.3.20260821 — 2026-08-25
- 0.3.20260814 — 2026-08-18
- 0.3.20260807 — 2026-08-11
- 0.3.20260731 — 2026-08-05
- 0.3.20260724 — 2026-07-28
- 0.3.20260717 — 2026-07-21
- 0.3.20260710 — 2026-07-14
- 0.3.20260702 — 2026-07-06
- 0.3.20260619 — 2026-06-29
- 0.2.20260619 — 2026-06-23
- 0.2.20260612 — 2026-06-16
- … 141 more at https://npm.io/package/@maxim_mazurok/gapi.client.iam-v1/versions

## README

# TypeScript typings for Identity and Access Management (IAM) API v1

Manages identity and access control for Google Cloud resources, including the creation of service accounts, which you can use to authenticate to Google and make API calls. Enabling this API also enables the IAM Service Account Credentials API (iamcredentials.googleapis.com). However, disabling this API doesn't disable the IAM Service Account Credentials API.
For detailed description please check [documentation](https://cloud.google.com/iam/).

## Installing

Install typings for Identity and Access Management (IAM) API:

```
npm install @types/gapi.client.iam-v1 --save-dev
```

## TypeScript 6.0+

TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:

```json
{
  "compilerOptions": {
    "types": ["gapi", "gapi.auth2", "gapi.client", "gapi.client.iam-v1"]
  }
}
```

## Usage

You need to initialize Google API client in your code:

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

Then load api client wrapper:

```typescript
gapi.client.load(
  'https://iam.googleapis.com/$discovery/rest?version=v1',
  () => {
    // now we can use:
    // gapi.client.iam
  },
);
```

```typescript
// 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('iam', 'v1', () => {
  // now we can use:
  // gapi.client.iam
});
```

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

```typescript
// 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 Identity and Access Management (IAM) API resources: <!-- TODO: make this work for multiple namespaces -->

```typescript
/*
Lints, or validates, an IAM policy. Currently checks the google.iam.v1.Binding.condition field, which contains a condition expression for a role binding. Successful calls to this method always return an HTTP `200 OK` status code, even if the linter detects an issue in the IAM policy.
*/
await gapi.client.iam.iamPolicies.lintPolicy({});

/*
Returns a list of services that allow you to opt into audit logs that are not generated by default. To learn more about audit logs, see the [Logging documentation](https://cloud.google.com/logging/docs/audit).
*/
await gapi.client.iam.iamPolicies.queryAuditableServices({});

/*
Lists every permission that you can test on a resource. A permission is testable if you can check whether a principal has that permission on the resource.
*/
await gapi.client.iam.permissions.queryTestablePermissions({});

/*
Gets the definition of a Role.
*/
await gapi.client.iam.roles.get({name: 'name'});

/*
Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project.
*/
await gapi.client.iam.roles.list({});

/*
Lists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role.
*/
await gapi.client.iam.roles.queryGrantableRoles({});
```

For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.iam-v1#Provenance:~:text=none-,Provenance,-Built%20and%20signed)

---
_Source: https://npm.io/package/@maxim_mazurok/gapi.client.iam-v1 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
