# @maxim_mazurok/gapi.client.cloudbilling-v1beta

> TypeScript typings for Cloud Billing API v1beta

Latest version **0.3.20260911** (published 2026-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @maxim_mazurok/gapi.client.cloudbilling-v1beta
pnpm add @maxim_mazurok/gapi.client.cloudbilling-v1beta
yarn add @maxim_mazurok/gapi.client.cloudbilling-v1beta
bun add @maxim_mazurok/gapi.client.cloudbilling-v1beta
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 0.3.20260911 |
| Published | 2026-09-14 |
| First published | 2022-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 68.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 59 |
| Author | Maxim Mazurok |
| Maintainers | maxim_mazurok |

## Links

- npm: https://www.npmjs.com/package/@maxim_mazurok/gapi.client.cloudbilling-v1beta
- 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.cloudbilling-v1beta

## Dependencies (2)

- [@types/gapi.client](https://npm.io/package/@types/gapi.client.md) *
- [@types/gapi.client.discovery-v1](https://npm.io/package/@types/gapi.client.discovery-v1.md) *

## Recent versions

- 0.3.20260911 (latest) — 2026-09-14
- 0.3.20260904 — 2026-09-07
- 0.3.20260901 — 2026-09-03
- 0.3.20260821 — 2026-08-24
- 0.3.20260814 — 2026-08-17
- 0.3.20260807 — 2026-08-10
- 0.3.20260731 — 2026-08-03
- 0.3.20260717 — 2026-07-20
- 0.3.20260710 — 2026-07-13
- 0.3.20260703 — 2026-07-07
- 0.3.20260619 — 2026-06-29
- 0.2.20260619 — 2026-06-23
- 0.2.20260612 — 2026-06-15
- 0.2.20260605 — 2026-06-08
- 0.2.20260529 — 2026-06-07
- … 125 more at https://npm.io/package/@maxim_mazurok/gapi.client.cloudbilling-v1beta/versions

## README

# TypeScript typings for Cloud Billing API v1beta

Allows developers to manage billing for their Google Cloud Platform projects programmatically.
For detailed description please check [documentation](https://cloud.google.com/billing/docs/apis).

## Installing

Install typings for Cloud Billing API:

```
npm install @types/gapi.client.cloudbilling-v1beta --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.cloudbilling-v1beta"
    ]
  }
}
```

## 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://cloudbilling.googleapis.com/$discovery/rest?version=v1beta',
  () => {
    // now we can use:
    // gapi.client.cloudbilling
  },
);
```

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

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 = [
    // View and manage your Google Cloud Platform billing accounts
    'https://www.googleapis.com/auth/cloud-billing',

    // View your Google Cloud Platform billing accounts
    'https://www.googleapis.com/auth/cloud-billing.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 Billing API resources: <!-- TODO: make this work for multiple namespaces -->

```typescript
/*
Gets a publicly listed SKU group.
*/
await gapi.client.cloudbilling.skuGroups.get({name: 'name'});

/*
Lists all publicly listed SKU groups.
*/
await gapi.client.cloudbilling.skuGroups.list({});

/*
Analyzes cost data for a billing account and/or specific projects. Returns a natural language summary and supporting datasets.
*/
await gapi.client.cloudbilling.generateInsights({});
```

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

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