@maxim_mazurok/gapi.client.osconfig-v2beta 0.0.20241021

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.
Files changed (3) hide show
  1. package/index.d.ts +561 -0
  2. package/package.json +20 -0
  3. package/readme.md +73 -0
package/index.d.ts ADDED
@@ -0,0 +1,561 @@
1
+ /* Type definitions for non-npm package OS Config API v2beta 0.0 */
2
+ // Project: https://cloud.google.com/compute/docs/osconfig/rest
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+
8
+ // IMPORTANT
9
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
+ // Generated from: https://osconfig.googleapis.com/$discovery/rest?version=v2beta
12
+ // Revision: 20241021
13
+
14
+ /// <reference types="gapi.client" />
15
+
16
+ declare namespace gapi.client {
17
+ /** Load OS Config API v2beta */
18
+ function load(
19
+ urlOrObject: 'https://osconfig.googleapis.com/$discovery/rest?version=v2beta'
20
+ ): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: 'osconfig', version: 'v2beta'): Promise<void>;
23
+ /** @deprecated Please load APIs with discovery documents. */
24
+ function load(name: 'osconfig', version: 'v2beta', callback: () => any): void;
25
+
26
+ namespace osconfig {
27
+ interface CancelOperationRequest {}
28
+ interface Empty {}
29
+ interface GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata {
30
+ /** The OS policy assignment API method. */
31
+ apiMethod?: string;
32
+ /** Reference to the `OSPolicyAssignment` API resource. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` */
33
+ osPolicyAssignment?: string;
34
+ /** Rollout start time */
35
+ rolloutStartTime?: string;
36
+ /** State of the rollout */
37
+ rolloutState?: string;
38
+ /** Rollout update time */
39
+ rolloutUpdateTime?: string;
40
+ }
41
+ interface GoogleCloudOsconfigV2beta__OperationMetadata {
42
+ /** Output only. API version used to start the operation. */
43
+ apiVersion?: string;
44
+ /** Output only. The time the operation was created. */
45
+ createTime?: string;
46
+ /** Output only. The time the operation finished running. */
47
+ endTime?: string;
48
+ /** Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. */
49
+ requestedCancellation?: boolean;
50
+ /** Output only. Human-readable status of the operation, if any. */
51
+ statusMessage?: string;
52
+ /** Output only. Server-defined resource path for the target of the operation. */
53
+ target?: string;
54
+ /** Output only. Name of the verb executed by the operation. */
55
+ verb?: string;
56
+ }
57
+ interface ListOperationsResponse {
58
+ /** The standard List next-page token. */
59
+ nextPageToken?: string;
60
+ /** A list of operations that matches the specified filter in the request. */
61
+ operations?: Operation[];
62
+ }
63
+ interface Operation {
64
+ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
65
+ done?: boolean;
66
+ /** The error result of the operation in case of failure or cancellation. */
67
+ error?: Status;
68
+ /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */
69
+ metadata?: {[P in string]: any};
70
+ /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
71
+ name?: string;
72
+ /** The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */
73
+ response?: {[P in string]: any};
74
+ }
75
+ interface OSPolicyAssignmentOperationMetadata {
76
+ /** The OS policy assignment API method. */
77
+ apiMethod?: string;
78
+ /** Reference to the `OSPolicyAssignment` API resource. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` */
79
+ osPolicyAssignment?: string;
80
+ /** Rollout start time */
81
+ rolloutStartTime?: string;
82
+ /** State of the rollout */
83
+ rolloutState?: string;
84
+ /** Rollout update time */
85
+ rolloutUpdateTime?: string;
86
+ }
87
+ interface Status {
88
+ /** The status code, which should be an enum value of google.rpc.Code. */
89
+ code?: number;
90
+ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
91
+ details?: Array<{[P in string]: any}>;
92
+ /** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */
93
+ message?: string;
94
+ }
95
+ interface OperationsResource {
96
+ /** 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`. */
97
+ cancel(request: {
98
+ /** V1 error format. */
99
+ '$.xgafv'?: string;
100
+ /** OAuth access token. */
101
+ access_token?: string;
102
+ /** Data format for response. */
103
+ alt?: string;
104
+ /** JSONP */
105
+ callback?: string;
106
+ /** Selector specifying which fields to include in a partial response. */
107
+ fields?: string;
108
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
109
+ key?: string;
110
+ /** The name of the operation resource to be cancelled. */
111
+ name: string;
112
+ /** OAuth 2.0 token for the current user. */
113
+ oauth_token?: string;
114
+ /** Returns response with indentations and line breaks. */
115
+ prettyPrint?: boolean;
116
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
117
+ quotaUser?: string;
118
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
119
+ upload_protocol?: string;
120
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
121
+ uploadType?: string;
122
+ /** Request body */
123
+ resource: CancelOperationRequest;
124
+ }): Request<{}>;
125
+ cancel(
126
+ request: {
127
+ /** V1 error format. */
128
+ '$.xgafv'?: string;
129
+ /** OAuth access token. */
130
+ access_token?: string;
131
+ /** Data format for response. */
132
+ alt?: string;
133
+ /** JSONP */
134
+ callback?: string;
135
+ /** Selector specifying which fields to include in a partial response. */
136
+ fields?: string;
137
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
138
+ key?: string;
139
+ /** The name of the operation resource to be cancelled. */
140
+ name: string;
141
+ /** OAuth 2.0 token for the current user. */
142
+ oauth_token?: string;
143
+ /** Returns response with indentations and line breaks. */
144
+ prettyPrint?: boolean;
145
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
146
+ quotaUser?: string;
147
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
148
+ upload_protocol?: string;
149
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
150
+ uploadType?: string;
151
+ },
152
+ body: CancelOperationRequest
153
+ ): Request<{}>;
154
+ /** 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`. */
155
+ delete(request?: {
156
+ /** V1 error format. */
157
+ '$.xgafv'?: string;
158
+ /** OAuth access token. */
159
+ access_token?: string;
160
+ /** Data format for response. */
161
+ alt?: string;
162
+ /** JSONP */
163
+ callback?: string;
164
+ /** Selector specifying which fields to include in a partial response. */
165
+ fields?: string;
166
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
167
+ key?: string;
168
+ /** The name of the operation resource to be deleted. */
169
+ name: string;
170
+ /** OAuth 2.0 token for the current user. */
171
+ oauth_token?: string;
172
+ /** Returns response with indentations and line breaks. */
173
+ prettyPrint?: boolean;
174
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
175
+ quotaUser?: string;
176
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
177
+ upload_protocol?: string;
178
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
179
+ uploadType?: string;
180
+ }): Request<{}>;
181
+ /** 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. */
182
+ get(request?: {
183
+ /** V1 error format. */
184
+ '$.xgafv'?: string;
185
+ /** OAuth access token. */
186
+ access_token?: string;
187
+ /** Data format for response. */
188
+ alt?: string;
189
+ /** JSONP */
190
+ callback?: string;
191
+ /** Selector specifying which fields to include in a partial response. */
192
+ fields?: string;
193
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
194
+ key?: string;
195
+ /** The name of the operation resource. */
196
+ name: string;
197
+ /** OAuth 2.0 token for the current user. */
198
+ oauth_token?: string;
199
+ /** Returns response with indentations and line breaks. */
200
+ prettyPrint?: boolean;
201
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
202
+ quotaUser?: string;
203
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
204
+ upload_protocol?: string;
205
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
206
+ uploadType?: string;
207
+ }): Request<Operation>;
208
+ /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
209
+ list(request?: {
210
+ /** V1 error format. */
211
+ '$.xgafv'?: string;
212
+ /** OAuth access token. */
213
+ access_token?: string;
214
+ /** Data format for response. */
215
+ alt?: string;
216
+ /** JSONP */
217
+ callback?: string;
218
+ /** Selector specifying which fields to include in a partial response. */
219
+ fields?: string;
220
+ /** The standard list filter. */
221
+ filter?: string;
222
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
223
+ key?: string;
224
+ /** The name of the operation's parent resource. */
225
+ name: string;
226
+ /** OAuth 2.0 token for the current user. */
227
+ oauth_token?: string;
228
+ /** The standard list page size. */
229
+ pageSize?: number;
230
+ /** The standard list page token. */
231
+ pageToken?: string;
232
+ /** Returns response with indentations and line breaks. */
233
+ prettyPrint?: boolean;
234
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
235
+ quotaUser?: string;
236
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
237
+ upload_protocol?: string;
238
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
239
+ uploadType?: string;
240
+ }): Request<ListOperationsResponse>;
241
+ }
242
+ interface LocationsResource {
243
+ operations: OperationsResource;
244
+ }
245
+ interface FoldersResource {
246
+ locations: LocationsResource;
247
+ }
248
+ interface OperationsResource {
249
+ /** 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`. */
250
+ cancel(request: {
251
+ /** V1 error format. */
252
+ '$.xgafv'?: string;
253
+ /** OAuth access token. */
254
+ access_token?: string;
255
+ /** Data format for response. */
256
+ alt?: string;
257
+ /** JSONP */
258
+ callback?: string;
259
+ /** Selector specifying which fields to include in a partial response. */
260
+ fields?: string;
261
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
262
+ key?: string;
263
+ /** The name of the operation resource to be cancelled. */
264
+ name: string;
265
+ /** OAuth 2.0 token for the current user. */
266
+ oauth_token?: string;
267
+ /** Returns response with indentations and line breaks. */
268
+ prettyPrint?: boolean;
269
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
270
+ quotaUser?: string;
271
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
272
+ upload_protocol?: string;
273
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
274
+ uploadType?: string;
275
+ /** Request body */
276
+ resource: CancelOperationRequest;
277
+ }): Request<{}>;
278
+ cancel(
279
+ request: {
280
+ /** V1 error format. */
281
+ '$.xgafv'?: string;
282
+ /** OAuth access token. */
283
+ access_token?: string;
284
+ /** Data format for response. */
285
+ alt?: string;
286
+ /** JSONP */
287
+ callback?: string;
288
+ /** Selector specifying which fields to include in a partial response. */
289
+ fields?: string;
290
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
291
+ key?: string;
292
+ /** The name of the operation resource to be cancelled. */
293
+ name: string;
294
+ /** OAuth 2.0 token for the current user. */
295
+ oauth_token?: string;
296
+ /** Returns response with indentations and line breaks. */
297
+ prettyPrint?: boolean;
298
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
299
+ quotaUser?: string;
300
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
301
+ upload_protocol?: string;
302
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
303
+ uploadType?: string;
304
+ },
305
+ body: CancelOperationRequest
306
+ ): Request<{}>;
307
+ /** 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`. */
308
+ delete(request?: {
309
+ /** V1 error format. */
310
+ '$.xgafv'?: string;
311
+ /** OAuth access token. */
312
+ access_token?: string;
313
+ /** Data format for response. */
314
+ alt?: string;
315
+ /** JSONP */
316
+ callback?: string;
317
+ /** Selector specifying which fields to include in a partial response. */
318
+ fields?: string;
319
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
320
+ key?: string;
321
+ /** The name of the operation resource to be deleted. */
322
+ name: string;
323
+ /** OAuth 2.0 token for the current user. */
324
+ oauth_token?: string;
325
+ /** Returns response with indentations and line breaks. */
326
+ prettyPrint?: boolean;
327
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
328
+ quotaUser?: string;
329
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
330
+ upload_protocol?: string;
331
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
332
+ uploadType?: string;
333
+ }): Request<{}>;
334
+ /** 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. */
335
+ get(request?: {
336
+ /** V1 error format. */
337
+ '$.xgafv'?: string;
338
+ /** OAuth access token. */
339
+ access_token?: string;
340
+ /** Data format for response. */
341
+ alt?: string;
342
+ /** JSONP */
343
+ callback?: string;
344
+ /** Selector specifying which fields to include in a partial response. */
345
+ fields?: string;
346
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
347
+ key?: string;
348
+ /** The name of the operation resource. */
349
+ name: string;
350
+ /** OAuth 2.0 token for the current user. */
351
+ oauth_token?: string;
352
+ /** Returns response with indentations and line breaks. */
353
+ prettyPrint?: boolean;
354
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
355
+ quotaUser?: string;
356
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
357
+ upload_protocol?: string;
358
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
359
+ uploadType?: string;
360
+ }): Request<Operation>;
361
+ /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
362
+ list(request?: {
363
+ /** V1 error format. */
364
+ '$.xgafv'?: string;
365
+ /** OAuth access token. */
366
+ access_token?: string;
367
+ /** Data format for response. */
368
+ alt?: string;
369
+ /** JSONP */
370
+ callback?: string;
371
+ /** Selector specifying which fields to include in a partial response. */
372
+ fields?: string;
373
+ /** The standard list filter. */
374
+ filter?: string;
375
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
376
+ key?: string;
377
+ /** The name of the operation's parent resource. */
378
+ name: string;
379
+ /** OAuth 2.0 token for the current user. */
380
+ oauth_token?: string;
381
+ /** The standard list page size. */
382
+ pageSize?: number;
383
+ /** The standard list page token. */
384
+ pageToken?: string;
385
+ /** Returns response with indentations and line breaks. */
386
+ prettyPrint?: boolean;
387
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
388
+ quotaUser?: string;
389
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
390
+ upload_protocol?: string;
391
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
392
+ uploadType?: string;
393
+ }): Request<ListOperationsResponse>;
394
+ }
395
+ interface LocationsResource {
396
+ operations: OperationsResource;
397
+ }
398
+ interface OrganizationsResource {
399
+ locations: LocationsResource;
400
+ }
401
+ interface OperationsResource {
402
+ /** 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`. */
403
+ cancel(request: {
404
+ /** V1 error format. */
405
+ '$.xgafv'?: string;
406
+ /** OAuth access token. */
407
+ access_token?: string;
408
+ /** Data format for response. */
409
+ alt?: string;
410
+ /** JSONP */
411
+ callback?: string;
412
+ /** Selector specifying which fields to include in a partial response. */
413
+ fields?: string;
414
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
415
+ key?: string;
416
+ /** The name of the operation resource to be cancelled. */
417
+ name: string;
418
+ /** OAuth 2.0 token for the current user. */
419
+ oauth_token?: string;
420
+ /** Returns response with indentations and line breaks. */
421
+ prettyPrint?: boolean;
422
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
423
+ quotaUser?: string;
424
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
425
+ upload_protocol?: string;
426
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
427
+ uploadType?: string;
428
+ /** Request body */
429
+ resource: CancelOperationRequest;
430
+ }): Request<{}>;
431
+ cancel(
432
+ request: {
433
+ /** V1 error format. */
434
+ '$.xgafv'?: string;
435
+ /** OAuth access token. */
436
+ access_token?: string;
437
+ /** Data format for response. */
438
+ alt?: string;
439
+ /** JSONP */
440
+ callback?: string;
441
+ /** Selector specifying which fields to include in a partial response. */
442
+ fields?: string;
443
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
444
+ key?: string;
445
+ /** The name of the operation resource to be cancelled. */
446
+ name: string;
447
+ /** OAuth 2.0 token for the current user. */
448
+ oauth_token?: string;
449
+ /** Returns response with indentations and line breaks. */
450
+ prettyPrint?: boolean;
451
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
452
+ quotaUser?: string;
453
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
454
+ upload_protocol?: string;
455
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
456
+ uploadType?: string;
457
+ },
458
+ body: CancelOperationRequest
459
+ ): Request<{}>;
460
+ /** 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`. */
461
+ delete(request?: {
462
+ /** V1 error format. */
463
+ '$.xgafv'?: string;
464
+ /** OAuth access token. */
465
+ access_token?: string;
466
+ /** Data format for response. */
467
+ alt?: string;
468
+ /** JSONP */
469
+ callback?: string;
470
+ /** Selector specifying which fields to include in a partial response. */
471
+ fields?: string;
472
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
473
+ key?: string;
474
+ /** The name of the operation resource to be deleted. */
475
+ name: string;
476
+ /** OAuth 2.0 token for the current user. */
477
+ oauth_token?: string;
478
+ /** Returns response with indentations and line breaks. */
479
+ prettyPrint?: boolean;
480
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
481
+ quotaUser?: string;
482
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
483
+ upload_protocol?: string;
484
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
485
+ uploadType?: string;
486
+ }): Request<{}>;
487
+ /** 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. */
488
+ get(request?: {
489
+ /** V1 error format. */
490
+ '$.xgafv'?: string;
491
+ /** OAuth access token. */
492
+ access_token?: string;
493
+ /** Data format for response. */
494
+ alt?: string;
495
+ /** JSONP */
496
+ callback?: string;
497
+ /** Selector specifying which fields to include in a partial response. */
498
+ fields?: string;
499
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
500
+ key?: string;
501
+ /** The name of the operation resource. */
502
+ name: string;
503
+ /** OAuth 2.0 token for the current user. */
504
+ oauth_token?: string;
505
+ /** Returns response with indentations and line breaks. */
506
+ prettyPrint?: boolean;
507
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
508
+ quotaUser?: string;
509
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
510
+ upload_protocol?: string;
511
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
512
+ uploadType?: string;
513
+ }): Request<Operation>;
514
+ /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
515
+ list(request?: {
516
+ /** V1 error format. */
517
+ '$.xgafv'?: string;
518
+ /** OAuth access token. */
519
+ access_token?: string;
520
+ /** Data format for response. */
521
+ alt?: string;
522
+ /** JSONP */
523
+ callback?: string;
524
+ /** Selector specifying which fields to include in a partial response. */
525
+ fields?: string;
526
+ /** The standard list filter. */
527
+ filter?: string;
528
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
529
+ key?: string;
530
+ /** The name of the operation's parent resource. */
531
+ name: string;
532
+ /** OAuth 2.0 token for the current user. */
533
+ oauth_token?: string;
534
+ /** The standard list page size. */
535
+ pageSize?: number;
536
+ /** The standard list page token. */
537
+ pageToken?: string;
538
+ /** Returns response with indentations and line breaks. */
539
+ prettyPrint?: boolean;
540
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
541
+ quotaUser?: string;
542
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
543
+ upload_protocol?: string;
544
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
545
+ uploadType?: string;
546
+ }): Request<ListOperationsResponse>;
547
+ }
548
+ interface LocationsResource {
549
+ operations: OperationsResource;
550
+ }
551
+ interface ProjectsResource {
552
+ locations: LocationsResource;
553
+ }
554
+
555
+ const folders: FoldersResource;
556
+
557
+ const organizations: OrganizationsResource;
558
+
559
+ const projects: ProjectsResource;
560
+ }
561
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.osconfig-v2beta",
3
+ "version": "0.0.20241021",
4
+ "description": "TypeScript typings for OS Config API v2beta",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
9
+ "license": "MIT",
10
+ "author": {
11
+ "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
13
+ "url": "https://maxim.mazurok.com"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery-v1": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,73 @@
1
+ # TypeScript typings for OS Config API v2beta
2
+
3
+ OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.
4
+ For detailed description please check [documentation](https://cloud.google.com/compute/docs/osconfig/rest).
5
+
6
+ ## Installing
7
+
8
+ Install typings for OS Config API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.osconfig-v2beta --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(
29
+ 'https://osconfig.googleapis.com/$discovery/rest?version=v2beta',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.osconfig
33
+ }
34
+ );
35
+ ```
36
+
37
+ ```typescript
38
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
39
+ gapi.client.load('osconfig', 'v2beta', () => {
40
+ // now we can use:
41
+ // gapi.client.osconfig
42
+ });
43
+ ```
44
+
45
+ Don't forget to authenticate your client before sending any request to resources:
46
+
47
+ ```typescript
48
+ // declare client_id registered in Google Developers Console
49
+ var client_id = '',
50
+ scope = [
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;
55
+ // ...
56
+
57
+ gapi.auth.authorize(
58
+ {client_id: client_id, scope: scope, immediate: immediate},
59
+ authResult => {
60
+ if (authResult && !authResult.error) {
61
+ /* handle successful authorization */
62
+ } else {
63
+ /* handle authorization error */
64
+ }
65
+ }
66
+ );
67
+ ```
68
+
69
+ After that you can use OS Config API resources: <!-- TODO: make this work for multiple namespaces -->
70
+
71
+ ```typescript
72
+
73
+ ```