@maxim_mazurok/gapi.client.cloudsupport-v2 0.1.20260318 → 0.2.20260602
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/index.d.ts +134 -46
- package/package.json +1 -1
- package/readme.md +18 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://cloudsupport.googleapis.com/$discovery/rest?version=v2
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20260602
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -84,9 +84,15 @@ declare namespace gapi.client {
|
|
|
84
84
|
/** Identifier. The resource name for the case. */
|
|
85
85
|
name?: string;
|
|
86
86
|
/** The priority of this case. */
|
|
87
|
-
priority?:
|
|
87
|
+
priority?: 'PRIORITY_UNSPECIFIED' | 'P0' | 'P1' | 'P2' | 'P3' | 'P4';
|
|
88
88
|
/** Output only. The current status of the support case. */
|
|
89
|
-
state?:
|
|
89
|
+
state?:
|
|
90
|
+
| 'STATE_UNSPECIFIED'
|
|
91
|
+
| 'NEW'
|
|
92
|
+
| 'IN_PROGRESS_GOOGLE_SUPPORT'
|
|
93
|
+
| 'ACTION_REQUIRED'
|
|
94
|
+
| 'SOLUTION_PROVIDED'
|
|
95
|
+
| 'CLOSED';
|
|
90
96
|
/** The email addresses to receive updates on this case. */
|
|
91
97
|
subscriberEmailAddresses?: string[];
|
|
92
98
|
/** Whether this case was created for internal API testing and should not be acted on by the support team. */
|
|
@@ -135,7 +141,12 @@ declare namespace gapi.client {
|
|
|
135
141
|
/** # gdata.* are outside protos with mising documentation */
|
|
136
142
|
path?: string;
|
|
137
143
|
/** # gdata.* are outside protos with mising documentation */
|
|
138
|
-
referenceType?:
|
|
144
|
+
referenceType?:
|
|
145
|
+
| 'PATH'
|
|
146
|
+
| 'BLOB_REF'
|
|
147
|
+
| 'INLINE'
|
|
148
|
+
| 'BIGSTORE_REF'
|
|
149
|
+
| 'COSMO_BINARY_REFERENCE';
|
|
139
150
|
/** # gdata.* are outside protos with mising documentation */
|
|
140
151
|
sha1Hash?: string;
|
|
141
152
|
}
|
|
@@ -147,9 +158,13 @@ declare namespace gapi.client {
|
|
|
147
158
|
/** # gdata.* are outside protos with mising documentation */
|
|
148
159
|
fromFileName?: string;
|
|
149
160
|
/** # gdata.* are outside protos with mising documentation */
|
|
161
|
+
fromFusionId?: string;
|
|
162
|
+
/** # gdata.* are outside protos with mising documentation */
|
|
150
163
|
fromHeader?: string;
|
|
151
164
|
/** # gdata.* are outside protos with mising documentation */
|
|
152
165
|
fromUrlPath?: string;
|
|
166
|
+
/** # gdata.* are outside protos with mising documentation */
|
|
167
|
+
fusionIdDetectionMetadata?: string;
|
|
153
168
|
}
|
|
154
169
|
interface CreateAttachmentRequest {
|
|
155
170
|
/** Required. The attachment to be created. */
|
|
@@ -205,7 +220,11 @@ declare namespace gapi.client {
|
|
|
205
220
|
/** Required. A free text description to accompany the `reason` field above. Provides additional context on why the case is being escalated. */
|
|
206
221
|
justification?: string;
|
|
207
222
|
/** Required. The reason why the Case is being escalated. */
|
|
208
|
-
reason?:
|
|
223
|
+
reason?:
|
|
224
|
+
| 'REASON_UNSPECIFIED'
|
|
225
|
+
| 'RESOLUTION_TIME'
|
|
226
|
+
| 'TECHNICAL_EXPERTISE'
|
|
227
|
+
| 'BUSINESS_IMPACT';
|
|
209
228
|
}
|
|
210
229
|
interface ListAttachmentsResponse {
|
|
211
230
|
/** The list of attachments associated with a case. */
|
|
@@ -277,12 +296,27 @@ declare namespace gapi.client {
|
|
|
277
296
|
/** # gdata.* are outside protos with mising documentation */
|
|
278
297
|
path?: string;
|
|
279
298
|
/** # gdata.* are outside protos with mising documentation */
|
|
280
|
-
referenceType?:
|
|
299
|
+
referenceType?:
|
|
300
|
+
| 'PATH'
|
|
301
|
+
| 'BLOB_REF'
|
|
302
|
+
| 'INLINE'
|
|
303
|
+
| 'GET_MEDIA'
|
|
304
|
+
| 'COMPOSITE_MEDIA'
|
|
305
|
+
| 'BIGSTORE_REF'
|
|
306
|
+
| 'DIFF_VERSION_RESPONSE'
|
|
307
|
+
| 'DIFF_CHECKSUMS_RESPONSE'
|
|
308
|
+
| 'DIFF_DOWNLOAD_RESPONSE'
|
|
309
|
+
| 'DIFF_UPLOAD_REQUEST'
|
|
310
|
+
| 'DIFF_UPLOAD_RESPONSE'
|
|
311
|
+
| 'COSMO_BINARY_REFERENCE'
|
|
312
|
+
| 'ARBITRARY_BYTES';
|
|
281
313
|
/** # gdata.* are outside protos with mising documentation */
|
|
282
314
|
sha1Hash?: string;
|
|
283
315
|
/** # gdata.* are outside protos with mising documentation */
|
|
284
316
|
sha256Hash?: string;
|
|
285
317
|
/** # gdata.* are outside protos with mising documentation */
|
|
318
|
+
sha512Hash?: string;
|
|
319
|
+
/** # gdata.* are outside protos with mising documentation */
|
|
286
320
|
timestamp?: string;
|
|
287
321
|
/** # gdata.* are outside protos with mising documentation */
|
|
288
322
|
token?: string;
|
|
@@ -311,11 +345,11 @@ declare namespace gapi.client {
|
|
|
311
345
|
/** Retrieve valid classifications to use when creating a support case. Classifications are hierarchical. Each classification is a string containing all levels of the hierarchy separated by `" > "`. For example, `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by this endpoint are valid for at least six months. When a classification is deactivated, this endpoint immediately stops returning it. After six months, `case.create` requests using the classification will fail. EXAMPLES: cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ``` Python: ```python import googleapiclient.discovery supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version="v2", discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", ) request = supportApiService.caseClassifications().search( query='display_name:"*Compute Engine*"' ) print(request.execute()) ``` */
|
|
312
346
|
search(request?: {
|
|
313
347
|
/** V1 error format. */
|
|
314
|
-
'$.xgafv'?:
|
|
348
|
+
'$.xgafv'?: '1' | '2';
|
|
315
349
|
/** OAuth access token. */
|
|
316
350
|
access_token?: string;
|
|
317
351
|
/** Data format for response. */
|
|
318
|
-
alt?:
|
|
352
|
+
alt?: 'json' | 'media' | 'proto';
|
|
319
353
|
/** JSONP */
|
|
320
354
|
callback?: string;
|
|
321
355
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -341,14 +375,41 @@ declare namespace gapi.client {
|
|
|
341
375
|
}): Request<SearchCaseClassificationsResponse>;
|
|
342
376
|
}
|
|
343
377
|
interface AttachmentsResource {
|
|
378
|
+
/** Retrieve an attachment associated with a support case. EXAMPLES: cURL: ```shell attachment="projects/some-project/cases/23598314/attachments/0684M00000P3h1fQAB" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$attachment" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = ( supportApiService.cases() .attachments() .get(name="projects/some-project/cases/43595344/attachments/0684M00000P3h1fQAB") ) print(request.execute()) ``` */
|
|
379
|
+
get(request?: {
|
|
380
|
+
/** V1 error format. */
|
|
381
|
+
'$.xgafv'?: '1' | '2';
|
|
382
|
+
/** OAuth access token. */
|
|
383
|
+
access_token?: string;
|
|
384
|
+
/** Data format for response. */
|
|
385
|
+
alt?: 'json' | 'media' | 'proto';
|
|
386
|
+
/** JSONP */
|
|
387
|
+
callback?: string;
|
|
388
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
389
|
+
fields?: string;
|
|
390
|
+
/** 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. */
|
|
391
|
+
key?: string;
|
|
392
|
+
/** Required. The name of the attachment to get. */
|
|
393
|
+
name: string;
|
|
394
|
+
/** OAuth 2.0 token for the current user. */
|
|
395
|
+
oauth_token?: string;
|
|
396
|
+
/** Returns response with indentations and line breaks. */
|
|
397
|
+
prettyPrint?: boolean;
|
|
398
|
+
/** 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. */
|
|
399
|
+
quotaUser?: string;
|
|
400
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
401
|
+
upload_protocol?: string;
|
|
402
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
403
|
+
uploadType?: string;
|
|
404
|
+
}): Request<Attachment>;
|
|
344
405
|
/** List all the attachments associated with a support case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/23598314" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = ( supportApiService.cases() .attachments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ``` */
|
|
345
406
|
list(request?: {
|
|
346
407
|
/** V1 error format. */
|
|
347
|
-
'$.xgafv'?:
|
|
408
|
+
'$.xgafv'?: '1' | '2';
|
|
348
409
|
/** OAuth access token. */
|
|
349
410
|
access_token?: string;
|
|
350
411
|
/** Data format for response. */
|
|
351
|
-
alt?:
|
|
412
|
+
alt?: 'json' | 'media' | 'proto';
|
|
352
413
|
/** JSONP */
|
|
353
414
|
callback?: string;
|
|
354
415
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -377,11 +438,11 @@ declare namespace gapi.client {
|
|
|
377
438
|
/** Add a new comment to a case. The comment must have the following fields set: `body`. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43591344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "body": "This is a test comment." }' \ "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = ( supportApiService.cases() .comments() .create( parent="projects/some-project/cases/43595344", body={"body": "This is a test comment."}, ) ) print(request.execute()) ``` */
|
|
378
439
|
create(request: {
|
|
379
440
|
/** V1 error format. */
|
|
380
|
-
'$.xgafv'?:
|
|
441
|
+
'$.xgafv'?: '1' | '2';
|
|
381
442
|
/** OAuth access token. */
|
|
382
443
|
access_token?: string;
|
|
383
444
|
/** Data format for response. */
|
|
384
|
-
alt?:
|
|
445
|
+
alt?: 'json' | 'media' | 'proto';
|
|
385
446
|
/** JSONP */
|
|
386
447
|
callback?: string;
|
|
387
448
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -406,11 +467,11 @@ declare namespace gapi.client {
|
|
|
406
467
|
create(
|
|
407
468
|
request: {
|
|
408
469
|
/** V1 error format. */
|
|
409
|
-
'$.xgafv'?:
|
|
470
|
+
'$.xgafv'?: '1' | '2';
|
|
410
471
|
/** OAuth access token. */
|
|
411
472
|
access_token?: string;
|
|
412
473
|
/** Data format for response. */
|
|
413
|
-
alt?:
|
|
474
|
+
alt?: 'json' | 'media' | 'proto';
|
|
414
475
|
/** JSONP */
|
|
415
476
|
callback?: string;
|
|
416
477
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -432,14 +493,41 @@ declare namespace gapi.client {
|
|
|
432
493
|
},
|
|
433
494
|
body: Comment,
|
|
434
495
|
): Request<Comment>;
|
|
496
|
+
/** Retrieve a comment. EXAMPLES: cURL: ```shell comment="projects/some-project/cases/43595344/comments/234567890" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$comment" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().comments().get( name="projects/some-project/cases/43595344/comments/234567890", ) print(request.execute()) ``` */
|
|
497
|
+
get(request?: {
|
|
498
|
+
/** V1 error format. */
|
|
499
|
+
'$.xgafv'?: '1' | '2';
|
|
500
|
+
/** OAuth access token. */
|
|
501
|
+
access_token?: string;
|
|
502
|
+
/** Data format for response. */
|
|
503
|
+
alt?: 'json' | 'media' | 'proto';
|
|
504
|
+
/** JSONP */
|
|
505
|
+
callback?: string;
|
|
506
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
507
|
+
fields?: string;
|
|
508
|
+
/** 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. */
|
|
509
|
+
key?: string;
|
|
510
|
+
/** Required. The name of the comment to retrieve. */
|
|
511
|
+
name: string;
|
|
512
|
+
/** OAuth 2.0 token for the current user. */
|
|
513
|
+
oauth_token?: string;
|
|
514
|
+
/** Returns response with indentations and line breaks. */
|
|
515
|
+
prettyPrint?: boolean;
|
|
516
|
+
/** 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. */
|
|
517
|
+
quotaUser?: string;
|
|
518
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
519
|
+
upload_protocol?: string;
|
|
520
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
521
|
+
uploadType?: string;
|
|
522
|
+
}): Request<Comment>;
|
|
435
523
|
/** List all the comments associated with a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = ( supportApiService.cases() .comments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ``` */
|
|
436
524
|
list(request?: {
|
|
437
525
|
/** V1 error format. */
|
|
438
|
-
'$.xgafv'?:
|
|
526
|
+
'$.xgafv'?: '1' | '2';
|
|
439
527
|
/** OAuth access token. */
|
|
440
528
|
access_token?: string;
|
|
441
529
|
/** Data format for response. */
|
|
442
|
-
alt?:
|
|
530
|
+
alt?: 'json' | 'media' | 'proto';
|
|
443
531
|
/** JSONP */
|
|
444
532
|
callback?: string;
|
|
445
533
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -468,11 +556,11 @@ declare namespace gapi.client {
|
|
|
468
556
|
/** Close a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().close( name="projects/some-project/cases/43595344" ) print(request.execute()) ``` */
|
|
469
557
|
close(request: {
|
|
470
558
|
/** V1 error format. */
|
|
471
|
-
'$.xgafv'?:
|
|
559
|
+
'$.xgafv'?: '1' | '2';
|
|
472
560
|
/** OAuth access token. */
|
|
473
561
|
access_token?: string;
|
|
474
562
|
/** Data format for response. */
|
|
475
|
-
alt?:
|
|
563
|
+
alt?: 'json' | 'media' | 'proto';
|
|
476
564
|
/** JSONP */
|
|
477
565
|
callback?: string;
|
|
478
566
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -497,11 +585,11 @@ declare namespace gapi.client {
|
|
|
497
585
|
close(
|
|
498
586
|
request: {
|
|
499
587
|
/** V1 error format. */
|
|
500
|
-
'$.xgafv'?:
|
|
588
|
+
'$.xgafv'?: '1' | '2';
|
|
501
589
|
/** OAuth access token. */
|
|
502
590
|
access_token?: string;
|
|
503
591
|
/** Data format for response. */
|
|
504
|
-
alt?:
|
|
592
|
+
alt?: 'json' | 'media' | 'proto';
|
|
505
593
|
/** JSONP */
|
|
506
594
|
callback?: string;
|
|
507
595
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -526,11 +614,11 @@ declare namespace gapi.client {
|
|
|
526
614
|
/** Create a new case and associate it with a parent. It must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "display_name": "Test case created by me.", "description": "a random test case, feel free to close", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": "-07:00", "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().create( parent="projects/some-project", body={ "displayName": "A Test Case", "description": "This is a test case.", "testCase": True, "priority": "P2", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, }, ) print(request.execute()) ``` */
|
|
527
615
|
create(request: {
|
|
528
616
|
/** V1 error format. */
|
|
529
|
-
'$.xgafv'?:
|
|
617
|
+
'$.xgafv'?: '1' | '2';
|
|
530
618
|
/** OAuth access token. */
|
|
531
619
|
access_token?: string;
|
|
532
620
|
/** Data format for response. */
|
|
533
|
-
alt?:
|
|
621
|
+
alt?: 'json' | 'media' | 'proto';
|
|
534
622
|
/** JSONP */
|
|
535
623
|
callback?: string;
|
|
536
624
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -555,11 +643,11 @@ declare namespace gapi.client {
|
|
|
555
643
|
create(
|
|
556
644
|
request: {
|
|
557
645
|
/** V1 error format. */
|
|
558
|
-
'$.xgafv'?:
|
|
646
|
+
'$.xgafv'?: '1' | '2';
|
|
559
647
|
/** OAuth access token. */
|
|
560
648
|
access_token?: string;
|
|
561
649
|
/** Data format for response. */
|
|
562
|
-
alt?:
|
|
650
|
+
alt?: 'json' | 'media' | 'proto';
|
|
563
651
|
/** JSONP */
|
|
564
652
|
callback?: string;
|
|
565
653
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -584,11 +672,11 @@ declare namespace gapi.client {
|
|
|
584
672
|
/** Escalate a case, starting the Google Cloud Support escalation management process. This operation is only available for some support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which ones let you do that. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \ "https://cloudsupport.googleapis.com/v2/$case:escalate" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().escalate( name="projects/some-project/cases/43595344", body={ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation.", }, }, ) print(request.execute()) ``` */
|
|
585
673
|
escalate(request: {
|
|
586
674
|
/** V1 error format. */
|
|
587
|
-
'$.xgafv'?:
|
|
675
|
+
'$.xgafv'?: '1' | '2';
|
|
588
676
|
/** OAuth access token. */
|
|
589
677
|
access_token?: string;
|
|
590
678
|
/** Data format for response. */
|
|
591
|
-
alt?:
|
|
679
|
+
alt?: 'json' | 'media' | 'proto';
|
|
592
680
|
/** JSONP */
|
|
593
681
|
callback?: string;
|
|
594
682
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -613,11 +701,11 @@ declare namespace gapi.client {
|
|
|
613
701
|
escalate(
|
|
614
702
|
request: {
|
|
615
703
|
/** V1 error format. */
|
|
616
|
-
'$.xgafv'?:
|
|
704
|
+
'$.xgafv'?: '1' | '2';
|
|
617
705
|
/** OAuth access token. */
|
|
618
706
|
access_token?: string;
|
|
619
707
|
/** Data format for response. */
|
|
620
|
-
alt?:
|
|
708
|
+
alt?: 'json' | 'media' | 'proto';
|
|
621
709
|
/** JSONP */
|
|
622
710
|
callback?: string;
|
|
623
711
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -642,11 +730,11 @@ declare namespace gapi.client {
|
|
|
642
730
|
/** Retrieve a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().get( name="projects/some-project/cases/43595344", ) print(request.execute()) ``` */
|
|
643
731
|
get(request?: {
|
|
644
732
|
/** V1 error format. */
|
|
645
|
-
'$.xgafv'?:
|
|
733
|
+
'$.xgafv'?: '1' | '2';
|
|
646
734
|
/** OAuth access token. */
|
|
647
735
|
access_token?: string;
|
|
648
736
|
/** Data format for response. */
|
|
649
|
-
alt?:
|
|
737
|
+
alt?: 'json' | 'media' | 'proto';
|
|
650
738
|
/** JSONP */
|
|
651
739
|
callback?: string;
|
|
652
740
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -669,11 +757,11 @@ declare namespace gapi.client {
|
|
|
669
757
|
/** Retrieve all cases under a parent, but not its children. For example, listing cases under an organization only returns the cases that are directly parented by that organization. To retrieve cases under an organization and its projects, use `cases.search`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().list(parent="projects/some-project") print(request.execute()) ``` */
|
|
670
758
|
list(request?: {
|
|
671
759
|
/** V1 error format. */
|
|
672
|
-
'$.xgafv'?:
|
|
760
|
+
'$.xgafv'?: '1' | '2';
|
|
673
761
|
/** OAuth access token. */
|
|
674
762
|
access_token?: string;
|
|
675
763
|
/** Data format for response. */
|
|
676
|
-
alt?:
|
|
764
|
+
alt?: 'json' | 'media' | 'proto';
|
|
677
765
|
/** JSONP */
|
|
678
766
|
callback?: string;
|
|
679
767
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -702,11 +790,11 @@ declare namespace gapi.client {
|
|
|
702
790
|
/** Update a case. Only some fields can be updated. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \ "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().patch( name="projects/some-project/cases/43112854", body={ "displayName": "This is Now a New Title", "priority": "P2", }, ) print(request.execute()) ``` */
|
|
703
791
|
patch(request: {
|
|
704
792
|
/** V1 error format. */
|
|
705
|
-
'$.xgafv'?:
|
|
793
|
+
'$.xgafv'?: '1' | '2';
|
|
706
794
|
/** OAuth access token. */
|
|
707
795
|
access_token?: string;
|
|
708
796
|
/** Data format for response. */
|
|
709
|
-
alt?:
|
|
797
|
+
alt?: 'json' | 'media' | 'proto';
|
|
710
798
|
/** JSONP */
|
|
711
799
|
callback?: string;
|
|
712
800
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -733,11 +821,11 @@ declare namespace gapi.client {
|
|
|
733
821
|
patch(
|
|
734
822
|
request: {
|
|
735
823
|
/** V1 error format. */
|
|
736
|
-
'$.xgafv'?:
|
|
824
|
+
'$.xgafv'?: '1' | '2';
|
|
737
825
|
/** OAuth access token. */
|
|
738
826
|
access_token?: string;
|
|
739
827
|
/** Data format for response. */
|
|
740
|
-
alt?:
|
|
828
|
+
alt?: 'json' | 'media' | 'proto';
|
|
741
829
|
/** JSONP */
|
|
742
830
|
callback?: string;
|
|
743
831
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -764,11 +852,11 @@ declare namespace gapi.client {
|
|
|
764
852
|
/** Search for cases using a query. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().search( parent="projects/some-project", query="state=OPEN" ) print(request.execute()) ``` */
|
|
765
853
|
search(request?: {
|
|
766
854
|
/** V1 error format. */
|
|
767
|
-
'$.xgafv'?:
|
|
855
|
+
'$.xgafv'?: '1' | '2';
|
|
768
856
|
/** OAuth access token. */
|
|
769
857
|
access_token?: string;
|
|
770
858
|
/** Data format for response. */
|
|
771
|
-
alt?:
|
|
859
|
+
alt?: 'json' | 'media' | 'proto';
|
|
772
860
|
/** JSONP */
|
|
773
861
|
callback?: string;
|
|
774
862
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -785,7 +873,7 @@ declare namespace gapi.client {
|
|
|
785
873
|
parent: string;
|
|
786
874
|
/** Returns response with indentations and line breaks. */
|
|
787
875
|
prettyPrint?: boolean;
|
|
788
|
-
/** An expression used to filter cases. Expressions use the following fields separated by `AND` and specified with `=`: - `
|
|
876
|
+
/** An expression used to filter cases. Expressions use the following fields separated by `AND` and specified with `=`: - `state`: Can be `OPEN` or `CLOSED`. - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You can specify multiple values for priority using the `OR` operator. For example, `priority=P1 OR priority=P2`. - `creator.email`: The email address of the case creator. To search across `displayName`, `description`, and comments, use a global restriction with no keyword or operator. For example, `"my search"`. To search only cases updated after a certain date, use `update_time` restricted with that particular date, time, and timezone in ISO datetime format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. `update_time` only supports the greater than operator (`>`). If you are using the `v2` version of the API, you must specify the case parent in the `parent` field. If you provide an empty `query`, all cases under the parent resource will be returned. If you are using the `v2beta` version of the API, you must specify the case parent in the `query` field using one of the two fields below, which are only available for `v2beta`. The `parent` field will be ignored. - `organization`: An organization name in the form `organizations/`. - `project`: A project name in the form `projects/`. Examples: For `v2`: - `state=CLOSED` - `state=OPEN AND creator.email="tester@example.com"` - `state=OPEN AND (priority=P0 OR priority=P1)` - `update_time>"2020-01-01T00:00:00-05:00"` For `v2beta`: - `organization="organizations/123456789"` - `project="projects/my-project-id"` - `project="projects/123456789"` - `organization="organizations/123456789" AND state=CLOSED` - `project="projects/my-project-id" AND creator.email="tester@example.com"` - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` */
|
|
789
877
|
query?: string;
|
|
790
878
|
/** 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. */
|
|
791
879
|
quotaUser?: string;
|
|
@@ -801,11 +889,11 @@ declare namespace gapi.client {
|
|
|
801
889
|
/** Download a file attached to a case. When this endpoint is called, no "response body" will be returned. Instead, the attachment's blob will be returned. Note: HTTP requests must append "?alt=media" to the URL. EXAMPLES: cURL: ```shell name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.media().download( name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR" ) request.uri = request.uri.split("?")[0] + "?alt=media" print(request.execute()) ``` */
|
|
802
890
|
download(request?: {
|
|
803
891
|
/** V1 error format. */
|
|
804
|
-
'$.xgafv'?:
|
|
892
|
+
'$.xgafv'?: '1' | '2';
|
|
805
893
|
/** OAuth access token. */
|
|
806
894
|
access_token?: string;
|
|
807
895
|
/** Data format for response. */
|
|
808
|
-
alt?:
|
|
896
|
+
alt?: 'json' | 'media' | 'proto';
|
|
809
897
|
/** JSONP */
|
|
810
898
|
callback?: string;
|
|
811
899
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -825,14 +913,14 @@ declare namespace gapi.client {
|
|
|
825
913
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
826
914
|
uploadType?: string;
|
|
827
915
|
}): Request<Media>;
|
|
828
|
-
/** Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo "This text is in a file I'm uploading using CSAPI." \ > "./example_file.txt" case="projects/some-project/cases/43594844" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/
|
|
916
|
+
/** Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo "This text is in a file I'm uploading using CSAPI." \ > "./example_file.txt" case="projects/some-project/cases/43594844" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/v2/$case/attachments?attachment.filename=uploaded_via_curl.txt" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) file_path = "./example_file.txt" with open(file_path, "w") as file: file.write( "This text is inside a file I'm going to upload using the Cloud Support API.", ) request = supportApiService.media().upload( parent="projects/some-project/cases/43595344", media_body=file_path ) request.uri = request.uri.split("?")[0] + "?attachment.filename=uploaded_via_python.txt" print(request.execute()) ``` */
|
|
829
917
|
upload(request: {
|
|
830
918
|
/** V1 error format. */
|
|
831
|
-
'$.xgafv'?:
|
|
919
|
+
'$.xgafv'?: '1' | '2';
|
|
832
920
|
/** OAuth access token. */
|
|
833
921
|
access_token?: string;
|
|
834
922
|
/** Data format for response. */
|
|
835
|
-
alt?:
|
|
923
|
+
alt?: 'json' | 'media' | 'proto';
|
|
836
924
|
/** JSONP */
|
|
837
925
|
callback?: string;
|
|
838
926
|
/** Selector specifying which fields to include in a partial response. */
|
|
@@ -857,11 +945,11 @@ declare namespace gapi.client {
|
|
|
857
945
|
upload(
|
|
858
946
|
request: {
|
|
859
947
|
/** V1 error format. */
|
|
860
|
-
'$.xgafv'?:
|
|
948
|
+
'$.xgafv'?: '1' | '2';
|
|
861
949
|
/** OAuth access token. */
|
|
862
950
|
access_token?: string;
|
|
863
951
|
/** Data format for response. */
|
|
864
|
-
alt?:
|
|
952
|
+
alt?: 'json' | 'media' | 'proto';
|
|
865
953
|
/** JSONP */
|
|
866
954
|
callback?: string;
|
|
867
955
|
/** Selector specifying which fields to include in a partial response. */
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -11,6 +11,23 @@ Install typings for Google Cloud Support API:
|
|
|
11
11
|
npm install @types/gapi.client.cloudsupport-v2 --save-dev
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
## TypeScript 6.0+
|
|
15
|
+
|
|
16
|
+
TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"compilerOptions": {
|
|
21
|
+
"types": [
|
|
22
|
+
"gapi",
|
|
23
|
+
"gapi.auth2",
|
|
24
|
+
"gapi.client",
|
|
25
|
+
"gapi.client.cloudsupport-v2"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
14
31
|
## Usage
|
|
15
32
|
|
|
16
33
|
You need to initialize Google API client in your code:
|
|
@@ -115,7 +132,7 @@ Download a file attached to a case. When this endpoint is called, no "response b
|
|
|
115
132
|
await gapi.client.cloudsupport.media.download({name: 'name'});
|
|
116
133
|
|
|
117
134
|
/*
|
|
118
|
-
Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo "This text is in a file I'm uploading using CSAPI." \ > "./example_file.txt" case="projects/some-project/cases/43594844" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/
|
|
135
|
+
Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo "This text is in a file I'm uploading using CSAPI." \ > "./example_file.txt" case="projects/some-project/cases/43594844" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/v2/$case/attachments?attachment.filename=uploaded_via_curl.txt" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) file_path = "./example_file.txt" with open(file_path, "w") as file: file.write( "This text is inside a file I'm going to upload using the Cloud Support API.", ) request = supportApiService.media().upload( parent="projects/some-project/cases/43595344", media_body=file_path ) request.uri = request.uri.split("?")[0] + "?attachment.filename=uploaded_via_python.txt" print(request.execute()) ```
|
|
119
136
|
*/
|
|
120
137
|
await gapi.client.cloudsupport.media.upload({parent: 'parent'});
|
|
121
138
|
````
|