@maxim_mazurok/gapi.client.dlp-v2 0.0.20231113 → 0.0.20231127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.dlp-v2",
3
- "version": "0.0.20231113",
3
+ "version": "0.0.20231127",
4
4
  "description": "TypeScript typings for Cloud Data Loss Prevention (DLP) v2",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
5
9
  "license": "MIT",
6
10
  "author": {
7
- "email": "maxim@mazurok.com",
8
11
  "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
9
13
  "url": "https://maxim.mazurok.com"
10
14
  },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
- },
15
15
  "types": "index.d.ts",
16
16
  "dependencies": {
17
17
  "@types/gapi.client": "*",
package/readme.md CHANGED
@@ -25,10 +25,13 @@ gapi.load('client', () => {
25
25
  Then load api client wrapper:
26
26
 
27
27
  ```typescript
28
- gapi.client.load('https://dlp.googleapis.com/$discovery/rest?version=v2', () => {
29
- // now we can use:
30
- // gapi.client.dlp
31
- });
28
+ gapi.client.load(
29
+ 'https://dlp.googleapis.com/$discovery/rest?version=v2',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.dlp
33
+ }
34
+ );
32
35
  ```
33
36
 
34
37
  ```typescript
@@ -45,29 +48,29 @@ Don't forget to authenticate your client before sending any request to resources
45
48
  // declare client_id registered in Google Developers Console
46
49
  var client_id = '',
47
50
  scope = [
48
- // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
49
- 'https://www.googleapis.com/auth/cloud-platform',
50
- ],
51
- immediate = true;
51
+ // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
52
+ 'https://www.googleapis.com/auth/cloud-platform',
53
+ ],
54
+ immediate = true;
52
55
  // ...
53
56
 
54
57
  gapi.auth.authorize(
55
- { client_id: client_id, scope: scope, immediate: immediate },
58
+ {client_id: client_id, scope: scope, immediate: immediate},
56
59
  authResult => {
57
60
  if (authResult && !authResult.error) {
58
- /* handle successful authorization */
61
+ /* handle successful authorization */
59
62
  } else {
60
- /* handle authorization error */
63
+ /* handle authorization error */
61
64
  }
62
- });
65
+ }
66
+ );
63
67
  ```
64
68
 
65
69
  After that you can use Cloud Data Loss Prevention (DLP) resources: <!-- TODO: make this work for multiple namespaces -->
66
70
 
67
71
  ```typescript
68
-
69
72
  /*
70
73
  Returns a list of the sensitive information types that DLP API supports. See https://cloud.google.com/dlp/docs/infotypes-reference to learn more.
71
74
  */
72
- await gapi.client.dlp.infoTypes.list({ });
75
+ await gapi.client.dlp.infoTypes.list({});
73
76
  ```