2.0.20220806 • Published 3 years ago

@maxim_mazurok/gapi.client.dlp v2.0.20220806

Weekly downloads
53
License
MIT
Repository
github
Last release
3 years ago

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.

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:

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

Then load api client wrapper:

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:

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

/*
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({  });
2.0.20220730

3 years ago

2.0.20220612

3 years ago

2.0.20220806

3 years ago

2.0.20220803

3 years ago

2.0.20220619

3 years ago

2.0.20220708

3 years ago

2.0.20220625

3 years ago

2.0.20220703

3 years ago

2.0.20220715

3 years ago

2.0.20220604

3 years ago

2.0.20220527

3 years ago

2.0.20220513

3 years ago

2.0.20220506

3 years ago

2.0.20220429

3 years ago

2.0.20220522

3 years ago

2.0.20220408

3 years ago

2.0.20220329

3 years ago

2.0.20220422

3 years ago

2.0.20220415

3 years ago

2.0.20220402

3 years ago

2.0.20220319

3 years ago

2.0.20220227

3 years ago

2.0.20220310

3 years ago

2.0.20220305

3 years ago

2.0.20220212

3 years ago

2.0.20220129

3 years ago

2.0.20211230

4 years ago

2.0.20220218

3 years ago

2.0.20220116

3 years ago

2.0.20220108

4 years ago

2.0.20220205

3 years ago

2.0.20220122

3 years ago

2.0.20211112

4 years ago

2.0.20211105

4 years ago

2.0.20211202

4 years ago

2.0.20211204

4 years ago

2.0.20211029

4 years ago

2.0.20211022

4 years ago

2.0.20211015

4 years ago

2.0.20210929

4 years ago

2.0.20210924

4 years ago

2.0.20210918

4 years ago

2.0.20210910

4 years ago

2.0.20210908

4 years ago

2.0.20210903

4 years ago

2.0.20210827

4 years ago

2.0.20210822

4 years ago

2.0.20210806

4 years ago

2.0.20210731

4 years ago

2.0.20210723

4 years ago

2.0.20210717

4 years ago

2.0.20210709

4 years ago

2.0.20210703

4 years ago

2.0.20210625

4 years ago

2.0.20210618

4 years ago

2.0.20210613

4 years ago

2.0.20210604

4 years ago

2.0.20210528

4 years ago

2.0.20210522

4 years ago

2.0.20210508

4 years ago

2.0.20210501

4 years ago

2.0.20210423

4 years ago

2.0.20210417

4 years ago

2.0.20210410

4 years ago

2.0.20210403

4 years ago

2.0.20210326

4 years ago

2.0.20210319

4 years ago

2.0.20210314

4 years ago

2.0.20210307

4 years ago

2.0.20210227

4 years ago

2.0.20210220

4 years ago

2.0.20210213

4 years ago

2.0.20210206

4 years ago

2.0.20210131

4 years ago

2.0.20210124

4 years ago

2.0.20210109

5 years ago

2.0.20201231

5 years ago

2.0.20201213

5 years ago

2.0.20201207

5 years ago

2.0.20201127

5 years ago

2.0.20201121

5 years ago

2.0.20201113

5 years ago

2.0.20201107

5 years ago

2.0.20201031

5 years ago