@maxim_mazurok/gapi.client.cloudasset-v1p1beta1 0.0.20231111 → 0.0.20231201

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.cloudasset-v1p1beta1",
3
- "version": "0.0.20231111",
3
+ "version": "0.0.20231201",
4
4
  "description": "TypeScript typings for Cloud Asset API v1p1beta1",
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://cloudasset.googleapis.com/$discovery/rest?version=v1p1beta1', () => {
29
- // now we can use:
30
- // gapi.client.cloudasset
31
- });
28
+ gapi.client.load(
29
+ 'https://cloudasset.googleapis.com/$discovery/rest?version=v1p1beta1',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.cloudasset
33
+ }
34
+ );
32
35
  ```
33
36
 
34
37
  ```typescript
@@ -45,34 +48,34 @@ 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 Asset API resources: <!-- TODO: make this work for multiple namespaces -->
66
70
 
67
71
  ```typescript
68
-
69
72
  /*
70
73
  Searches all the IAM policies within a given accessible Resource Manager scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the IAM policies within a scope, even if they don't have `.getIamPolicy` permission of all the IAM policies. Callers should have `cloud.assets.SearchAllIamPolicies` permission on the requested scope, otherwise the request will be rejected.
71
74
  */
72
- await gapi.client.cloudasset.iamPolicies.searchAll({ scope: "scope", });
75
+ await gapi.client.cloudasset.iamPolicies.searchAll({scope: 'scope'});
73
76
 
74
77
  /*
75
78
  Searches all the resources within a given accessible Resource Manager scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the resources within a scope, even if they don't have `.get` permission of all the resources. Callers should have `cloud.assets.SearchAllResources` permission on the requested scope, otherwise the request will be rejected.
76
79
  */
77
- await gapi.client.cloudasset.resources.searchAll({ scope: "scope", });
80
+ await gapi.client.cloudasset.resources.searchAll({scope: 'scope'});
78
81
  ```
package/tests.ts DELETED
@@ -1,57 +0,0 @@
1
- /* This is stub file for gapi.client.cloudasset-v1p1beta1 definition tests */
2
- // IMPORTANT
3
- // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
- // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
-
6
- // Revision: 20231111
7
-
8
- gapi.load('client', async () => {
9
- /** now we can use gapi.client */
10
-
11
- await gapi.client.load('https://cloudasset.googleapis.com/$discovery/rest?version=v1p1beta1');
12
- /** now we can use gapi.client.cloudasset */
13
-
14
- /** don't forget to authenticate your client before sending any request to resources: */
15
- /** declare client_id registered in Google Developers Console */
16
- const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
- const scope = [
18
- /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
- 'https://www.googleapis.com/auth/cloud-platform',
20
- ];
21
- const immediate = false;
22
- gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
- if (authResult && !authResult.error) {
24
- /** handle successful authorization */
25
- run();
26
- } else {
27
- /** handle authorization error */
28
- }
29
- });
30
-
31
- async function run() {
32
- /**
33
- * Searches all the IAM policies within a given accessible Resource Manager scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all
34
- * the IAM policies within a scope, even if they don't have `.getIamPolicy` permission of all the IAM policies. Callers should have `cloud.assets.SearchAllIamPolicies` permission on the
35
- * requested scope, otherwise the request will be rejected.
36
- */
37
- await gapi.client.cloudasset.iamPolicies.searchAll({
38
- pageSize: 42,
39
- pageToken: "Test string",
40
- query: "Test string",
41
- scope: "Test string",
42
- });
43
- /**
44
- * Searches all the resources within a given accessible Resource Manager scope (project/folder/organization). This RPC gives callers especially administrators the ability to search all the
45
- * resources within a scope, even if they don't have `.get` permission of all the resources. Callers should have `cloud.assets.SearchAllResources` permission on the requested scope,
46
- * otherwise the request will be rejected.
47
- */
48
- await gapi.client.cloudasset.resources.searchAll({
49
- assetTypes: "Test string",
50
- orderBy: "Test string",
51
- pageSize: 42,
52
- pageToken: "Test string",
53
- query: "Test string",
54
- scope: "Test string",
55
- });
56
- }
57
- });
package/tsconfig.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "module": "commonjs",
4
- "lib": ["es6", "dom"],
5
- "noImplicitAny": true,
6
- "noImplicitThis": true,
7
- "strictNullChecks": true,
8
- "baseUrl": "../",
9
- "typeRoots": [
10
- "../"
11
- ],
12
- "types": [],
13
- "noEmit": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "strictFunctionTypes": true
16
- },
17
- "files": ["index.d.ts", "tests.ts"]
18
- }
package/tslint.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "dtslint/dtslint.json",
3
- "rules": {
4
- "no-redundant-jsdoc": false
5
- }
6
- }