# @maxim_mazurok/gapi.client.dlp

> TypeScript typings for Cloud Data Loss Prevention (DLP) API v2

Latest version **2.0.20220806** (published 2022-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @maxim_mazurok/gapi.client.dlp
pnpm add @maxim_mazurok/gapi.client.dlp
yarn add @maxim_mazurok/gapi.client.dlp
bun add @maxim_mazurok/gapi.client.dlp
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.20220806 |
| Published | 2022-08-10 |
| First published | 2020-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 463.1 KB |
| 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.dlp
- 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.dlp

## Dependencies (1)

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

## Recent versions

- 2.0.20220806 (latest) — 2022-08-10
- 2.0.20220803 — 2022-08-04
- 2.0.20220730 — 2022-08-02
- 2.0.20220715 — 2022-07-19
- 2.0.20220708 — 2022-07-13
- 2.0.20220703 — 2022-07-06
- 2.0.20220625 — 2022-06-28
- 2.0.20220619 — 2022-06-21
- 2.0.20220612 — 2022-06-14
- 2.0.20220604 — 2022-06-08
- 2.0.20220527 — 2022-05-31
- 2.0.20220522 — 2022-05-25
- 2.0.20220513 — 2022-05-17
- 2.0.20220506 — 2022-05-11
- 2.0.20220429 — 2022-05-03
- … 69 more at https://npm.io/package/@maxim_mazurok/gapi.client.dlp/versions

## README

# TypeScript typings for Cloud Data Loss Prevention (DLP) API v2

Provides methods for detection, risk analysis, and de-identification of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.
For detailed description please check [documentation](https://cloud.google.com/dlp/docs/).

## Installing

Install typings for Cloud Data Loss Prevention (DLP) API:

```
npm install @types/gapi.client.dlp@v2 --save-dev
```

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

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 Cloud Data Loss Prevention (DLP) API resources:

```typescript

/*
Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
*/
await gapi.client.dlp.infoTypes.list({  });
```

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