@maxim_mazurok/gapi.client.certificatemanager-v1 0.0.20220804

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 ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.certificatemanager-v1",
3
+ "version": "0.0.20220804",
4
+ "description": "TypeScript typings for Certificate Manager API v1",
5
+ "license": "MIT",
6
+ "author": {
7
+ "email": "maxim@mazurok.com",
8
+ "name": "Maxim Mazurok",
9
+ "url": "https://maxim.mazurok.com"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,68 @@
1
+ # TypeScript typings for Certificate Manager API v1
2
+
3
+
4
+ For detailed description please check [documentation](https://cloud.google.com/certificate-manager).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Certificate Manager API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.certificatemanager-v1 --save-dev
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ You need to initialize Google API client in your code:
17
+
18
+ ```typescript
19
+ gapi.load('client', () => {
20
+ // now we can use gapi.client
21
+ // ...
22
+ });
23
+ ```
24
+
25
+ Then load api client wrapper:
26
+
27
+ ```typescript
28
+ gapi.client.load('https://certificatemanager.googleapis.com/$discovery/rest?version=v1', () => {
29
+ // now we can use:
30
+ // gapi.client.certificatemanager
31
+ });
32
+ ```
33
+
34
+ ```typescript
35
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
36
+ gapi.client.load('certificatemanager', 'v1', () => {
37
+ // now we can use:
38
+ // gapi.client.certificatemanager
39
+ });
40
+ ```
41
+
42
+ Don't forget to authenticate your client before sending any request to resources:
43
+
44
+ ```typescript
45
+ // declare client_id registered in Google Developers Console
46
+ var client_id = '',
47
+ 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;
52
+ // ...
53
+
54
+ gapi.auth.authorize(
55
+ { client_id: client_id, scope: scope, immediate: immediate },
56
+ authResult => {
57
+ if (authResult && !authResult.error) {
58
+ /* handle successful authorization */
59
+ } else {
60
+ /* handle authorization error */
61
+ }
62
+ });
63
+ ```
64
+
65
+ After that you can use Certificate Manager API resources: <!-- TODO: make this work for multiple namespaces -->
66
+
67
+ ```typescript
68
+ ```
package/tests.ts ADDED
@@ -0,0 +1,359 @@
1
+ /* This is stub file for gapi.client.certificatemanager-v1 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: 20220804
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://certificatemanager.googleapis.com/$discovery/rest?version=v1');
12
+ /** now we can use gapi.client.certificatemanager */
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
+ /** Gets information about a location. */
33
+ await gapi.client.certificatemanager.projects.locations.get({
34
+ name: "Test string",
35
+ });
36
+ /** Lists information about the supported locations for this service. */
37
+ await gapi.client.certificatemanager.projects.locations.list({
38
+ filter: "Test string",
39
+ name: "Test string",
40
+ pageSize: 42,
41
+ pageToken: "Test string",
42
+ });
43
+ /** Creates a new CertificateMap in a given project and location. */
44
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.create({
45
+ certificateMapId: "Test string",
46
+ parent: "Test string",
47
+ }, {
48
+ createTime: "Test string",
49
+ description: "Test string",
50
+ gclbTargets: [
51
+ {
52
+ ipConfigs: [
53
+ {
54
+ ipAddress: "Test string",
55
+ ports: [
56
+ 42
57
+ ],
58
+ }
59
+ ],
60
+ targetHttpsProxy: "Test string",
61
+ targetSslProxy: "Test string",
62
+ }
63
+ ],
64
+ labels: {
65
+ A: "Test string"
66
+ },
67
+ name: "Test string",
68
+ updateTime: "Test string",
69
+ });
70
+ /** Deletes a single CertificateMap. A Certificate Map can't be deleted if it contains Certificate Map Entries. Remove all the entries from the map before calling this method. */
71
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.delete({
72
+ name: "Test string",
73
+ });
74
+ /** Gets details of a single CertificateMap. */
75
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.get({
76
+ name: "Test string",
77
+ });
78
+ /** Lists CertificateMaps in a given project and location. */
79
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.list({
80
+ filter: "Test string",
81
+ orderBy: "Test string",
82
+ pageSize: 42,
83
+ pageToken: "Test string",
84
+ parent: "Test string",
85
+ });
86
+ /** Updates a CertificateMap. */
87
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.patch({
88
+ name: "Test string",
89
+ updateMask: "Test string",
90
+ }, {
91
+ createTime: "Test string",
92
+ description: "Test string",
93
+ gclbTargets: [
94
+ {
95
+ ipConfigs: [
96
+ {
97
+ ipAddress: "Test string",
98
+ ports: [
99
+ 42
100
+ ],
101
+ }
102
+ ],
103
+ targetHttpsProxy: "Test string",
104
+ targetSslProxy: "Test string",
105
+ }
106
+ ],
107
+ labels: {
108
+ A: "Test string"
109
+ },
110
+ name: "Test string",
111
+ updateTime: "Test string",
112
+ });
113
+ /** Creates a new CertificateMapEntry in a given project and location. */
114
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.certificateMapEntries.create({
115
+ certificateMapEntryId: "Test string",
116
+ parent: "Test string",
117
+ }, {
118
+ certificates: [
119
+ "Test string"
120
+ ],
121
+ createTime: "Test string",
122
+ description: "Test string",
123
+ hostname: "Test string",
124
+ labels: {
125
+ A: "Test string"
126
+ },
127
+ matcher: "Test string",
128
+ name: "Test string",
129
+ state: "Test string",
130
+ updateTime: "Test string",
131
+ });
132
+ /** Deletes a single CertificateMapEntry. */
133
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.certificateMapEntries.delete({
134
+ name: "Test string",
135
+ });
136
+ /** Gets details of a single CertificateMapEntry. */
137
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.certificateMapEntries.get({
138
+ name: "Test string",
139
+ });
140
+ /** Lists CertificateMapEntries in a given project and location. */
141
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.certificateMapEntries.list({
142
+ filter: "Test string",
143
+ orderBy: "Test string",
144
+ pageSize: 42,
145
+ pageToken: "Test string",
146
+ parent: "Test string",
147
+ });
148
+ /** Updates a CertificateMapEntry. */
149
+ await gapi.client.certificatemanager.projects.locations.certificateMaps.certificateMapEntries.patch({
150
+ name: "Test string",
151
+ updateMask: "Test string",
152
+ }, {
153
+ certificates: [
154
+ "Test string"
155
+ ],
156
+ createTime: "Test string",
157
+ description: "Test string",
158
+ hostname: "Test string",
159
+ labels: {
160
+ A: "Test string"
161
+ },
162
+ matcher: "Test string",
163
+ name: "Test string",
164
+ state: "Test string",
165
+ updateTime: "Test string",
166
+ });
167
+ /** Creates a new Certificate in a given project and location. */
168
+ await gapi.client.certificatemanager.projects.locations.certificates.create({
169
+ certificateId: "Test string",
170
+ parent: "Test string",
171
+ }, {
172
+ createTime: "Test string",
173
+ description: "Test string",
174
+ expireTime: "Test string",
175
+ labels: {
176
+ A: "Test string"
177
+ },
178
+ managed: {
179
+ authorizationAttemptInfo: [
180
+ {
181
+ details: "Test string",
182
+ domain: "Test string",
183
+ failureReason: "Test string",
184
+ state: "Test string",
185
+ }
186
+ ],
187
+ dnsAuthorizations: [
188
+ "Test string"
189
+ ],
190
+ domains: [
191
+ "Test string"
192
+ ],
193
+ provisioningIssue: {
194
+ details: "Test string",
195
+ reason: "Test string",
196
+ },
197
+ state: "Test string",
198
+ },
199
+ name: "Test string",
200
+ pemCertificate: "Test string",
201
+ sanDnsnames: [
202
+ "Test string"
203
+ ],
204
+ scope: "Test string",
205
+ selfManaged: {
206
+ pemCertificate: "Test string",
207
+ pemPrivateKey: "Test string",
208
+ },
209
+ updateTime: "Test string",
210
+ });
211
+ /** Deletes a single Certificate. */
212
+ await gapi.client.certificatemanager.projects.locations.certificates.delete({
213
+ name: "Test string",
214
+ });
215
+ /** Gets details of a single Certificate. */
216
+ await gapi.client.certificatemanager.projects.locations.certificates.get({
217
+ name: "Test string",
218
+ });
219
+ /** Lists Certificates in a given project and location. */
220
+ await gapi.client.certificatemanager.projects.locations.certificates.list({
221
+ filter: "Test string",
222
+ orderBy: "Test string",
223
+ pageSize: 42,
224
+ pageToken: "Test string",
225
+ parent: "Test string",
226
+ });
227
+ /** Updates a Certificate. */
228
+ await gapi.client.certificatemanager.projects.locations.certificates.patch({
229
+ name: "Test string",
230
+ updateMask: "Test string",
231
+ }, {
232
+ createTime: "Test string",
233
+ description: "Test string",
234
+ expireTime: "Test string",
235
+ labels: {
236
+ A: "Test string"
237
+ },
238
+ managed: {
239
+ authorizationAttemptInfo: [
240
+ {
241
+ details: "Test string",
242
+ domain: "Test string",
243
+ failureReason: "Test string",
244
+ state: "Test string",
245
+ }
246
+ ],
247
+ dnsAuthorizations: [
248
+ "Test string"
249
+ ],
250
+ domains: [
251
+ "Test string"
252
+ ],
253
+ provisioningIssue: {
254
+ details: "Test string",
255
+ reason: "Test string",
256
+ },
257
+ state: "Test string",
258
+ },
259
+ name: "Test string",
260
+ pemCertificate: "Test string",
261
+ sanDnsnames: [
262
+ "Test string"
263
+ ],
264
+ scope: "Test string",
265
+ selfManaged: {
266
+ pemCertificate: "Test string",
267
+ pemPrivateKey: "Test string",
268
+ },
269
+ updateTime: "Test string",
270
+ });
271
+ /** Creates a new DnsAuthorization in a given project and location. */
272
+ await gapi.client.certificatemanager.projects.locations.dnsAuthorizations.create({
273
+ dnsAuthorizationId: "Test string",
274
+ parent: "Test string",
275
+ }, {
276
+ createTime: "Test string",
277
+ description: "Test string",
278
+ dnsResourceRecord: {
279
+ data: "Test string",
280
+ name: "Test string",
281
+ type: "Test string",
282
+ },
283
+ domain: "Test string",
284
+ labels: {
285
+ A: "Test string"
286
+ },
287
+ name: "Test string",
288
+ updateTime: "Test string",
289
+ });
290
+ /** Deletes a single DnsAuthorization. */
291
+ await gapi.client.certificatemanager.projects.locations.dnsAuthorizations.delete({
292
+ name: "Test string",
293
+ });
294
+ /** Gets details of a single DnsAuthorization. */
295
+ await gapi.client.certificatemanager.projects.locations.dnsAuthorizations.get({
296
+ name: "Test string",
297
+ });
298
+ /** Lists DnsAuthorizations in a given project and location. */
299
+ await gapi.client.certificatemanager.projects.locations.dnsAuthorizations.list({
300
+ filter: "Test string",
301
+ orderBy: "Test string",
302
+ pageSize: 42,
303
+ pageToken: "Test string",
304
+ parent: "Test string",
305
+ });
306
+ /** Updates a DnsAuthorization. */
307
+ await gapi.client.certificatemanager.projects.locations.dnsAuthorizations.patch({
308
+ name: "Test string",
309
+ updateMask: "Test string",
310
+ }, {
311
+ createTime: "Test string",
312
+ description: "Test string",
313
+ dnsResourceRecord: {
314
+ data: "Test string",
315
+ name: "Test string",
316
+ type: "Test string",
317
+ },
318
+ domain: "Test string",
319
+ labels: {
320
+ A: "Test string"
321
+ },
322
+ name: "Test string",
323
+ updateTime: "Test string",
324
+ });
325
+ /**
326
+ * 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
327
+ * 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
328
+ * 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
329
+ * 1, corresponding to `Code.CANCELLED`.
330
+ */
331
+ await gapi.client.certificatemanager.projects.locations.operations.cancel({
332
+ name: "Test string",
333
+ }, {
334
+ });
335
+ /**
336
+ * 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
337
+ * this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
338
+ */
339
+ await gapi.client.certificatemanager.projects.locations.operations.delete({
340
+ name: "Test string",
341
+ });
342
+ /** 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. */
343
+ await gapi.client.certificatemanager.projects.locations.operations.get({
344
+ name: "Test string",
345
+ });
346
+ /**
347
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
348
+ * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
349
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
350
+ * ensure the name binding is the parent resource, without the operations collection id.
351
+ */
352
+ await gapi.client.certificatemanager.projects.locations.operations.list({
353
+ filter: "Test string",
354
+ name: "Test string",
355
+ pageSize: 42,
356
+ pageToken: "Test string",
357
+ });
358
+ }
359
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
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 ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "dtslint/dtslint.json",
3
+ "rules": {
4
+ "no-redundant-jsdoc": false
5
+ }
6
+ }