@maxim_mazurok/gapi.client.accesscontextmanager-v1 0.0.20231113 → 0.0.20231213

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.accesscontextmanager-v1",
3
- "version": "0.0.20231113",
3
+ "version": "0.0.20231213",
4
4
  "description": "TypeScript typings for Access Context Manager API v1",
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://accesscontextmanager.googleapis.com/$discovery/rest?version=v1', () => {
29
- // now we can use:
30
- // gapi.client.accesscontextmanager
31
- });
28
+ gapi.client.load(
29
+ 'https://accesscontextmanager.googleapis.com/$discovery/rest?version=v1',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.accesscontextmanager
33
+ }
34
+ );
32
35
  ```
33
36
 
34
37
  ```typescript
@@ -45,84 +48,100 @@ 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 Access Context Manager API resources: <!-- TODO: make this work for multiple namespaces -->
66
70
 
67
71
  ```typescript
68
-
69
72
  /*
70
73
  Creates an access policy. This method fails if the organization already has an access policy. The long-running operation has a successful status after the access policy propagates to long-lasting storage. Syntactic and basic semantic errors are returned in `metadata` as a BadRequest proto.
71
74
  */
72
- await gapi.client.accesscontextmanager.accessPolicies.create({ });
75
+ await gapi.client.accesscontextmanager.accessPolicies.create({});
73
76
 
74
77
  /*
75
78
  Deletes an access policy based on the resource name. The long-running operation has a successful status after the access policy is removed from long-lasting storage.
76
79
  */
77
- await gapi.client.accesscontextmanager.accessPolicies.delete({ name: "name", });
80
+ await gapi.client.accesscontextmanager.accessPolicies.delete({name: 'name'});
78
81
 
79
82
  /*
80
83
  Returns an access policy based on the name.
81
84
  */
82
- await gapi.client.accesscontextmanager.accessPolicies.get({ name: "name", });
85
+ await gapi.client.accesscontextmanager.accessPolicies.get({name: 'name'});
83
86
 
84
87
  /*
85
88
  Gets the IAM policy for the specified Access Context Manager access policy.
86
89
  */
87
- await gapi.client.accesscontextmanager.accessPolicies.getIamPolicy({ resource: "resource", });
90
+ await gapi.client.accesscontextmanager.accessPolicies.getIamPolicy({
91
+ resource: 'resource',
92
+ });
88
93
 
89
94
  /*
90
95
  Lists all access policies in an organization.
91
96
  */
92
- await gapi.client.accesscontextmanager.accessPolicies.list({ });
97
+ await gapi.client.accesscontextmanager.accessPolicies.list({});
93
98
 
94
99
  /*
95
100
  Updates an access policy. The long-running operation from this RPC has a successful status after the changes to the access policy propagate to long-lasting storage.
96
101
  */
97
- await gapi.client.accesscontextmanager.accessPolicies.patch({ name: "name", });
102
+ await gapi.client.accesscontextmanager.accessPolicies.patch({name: 'name'});
98
103
 
99
104
  /*
100
105
  Sets the IAM policy for the specified Access Context Manager access policy. This method replaces the existing IAM policy on the access policy. The IAM policy controls the set of users who can perform specific operations on the Access Context Manager access policy.
101
106
  */
102
- await gapi.client.accesscontextmanager.accessPolicies.setIamPolicy({ resource: "resource", });
107
+ await gapi.client.accesscontextmanager.accessPolicies.setIamPolicy({
108
+ resource: 'resource',
109
+ });
103
110
 
104
111
  /*
105
112
  Returns the IAM permissions that the caller has on the specified Access Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or ServicePerimeter. This method does not support other resources.
106
113
  */
107
- await gapi.client.accesscontextmanager.accessPolicies.testIamPermissions({ resource: "resource", });
114
+ await gapi.client.accesscontextmanager.accessPolicies.testIamPermissions({
115
+ resource: 'resource',
116
+ });
108
117
 
109
118
  /*
110
119
  Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
111
120
  */
112
- await gapi.client.accesscontextmanager.operations.cancel({ name: "name", });
121
+ await gapi.client.accesscontextmanager.operations.cancel({name: 'name'});
113
122
 
114
123
  /*
115
124
  Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
116
125
  */
117
- await gapi.client.accesscontextmanager.operations.delete({ name: "name", });
126
+ await gapi.client.accesscontextmanager.operations.delete({name: 'name'});
118
127
 
119
128
  /*
120
129
  Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
121
130
  */
122
- await gapi.client.accesscontextmanager.operations.get({ name: "name", });
131
+ await gapi.client.accesscontextmanager.operations.get({name: 'name'});
123
132
 
124
133
  /*
125
134
  Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
126
135
  */
127
- await gapi.client.accesscontextmanager.operations.list({ name: "name", });
136
+ await gapi.client.accesscontextmanager.operations.list({name: 'name'});
137
+
138
+ /*
139
+ Returns a VPC-SC supported service based on the service name.
140
+ */
141
+ await gapi.client.accesscontextmanager.services.get({name: 'name'});
142
+
143
+ /*
144
+ Lists all VPC-SC supported services.
145
+ */
146
+ await gapi.client.accesscontextmanager.services.list({});
128
147
  ```