@maxim_mazurok/gapi.client.cloudsupport-v2 0.2.20260318 → 0.2.20260609

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 +63 -3
  2. package/package.json +1 -1
  3. 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: 20260318
12
+ // Revision: 20260609
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -158,9 +158,13 @@ declare namespace gapi.client {
158
158
  /** # gdata.* are outside protos with mising documentation */
159
159
  fromFileName?: string;
160
160
  /** # gdata.* are outside protos with mising documentation */
161
+ fromFusionId?: string;
162
+ /** # gdata.* are outside protos with mising documentation */
161
163
  fromHeader?: string;
162
164
  /** # gdata.* are outside protos with mising documentation */
163
165
  fromUrlPath?: string;
166
+ /** # gdata.* are outside protos with mising documentation */
167
+ fusionIdDetectionMetadata?: string;
164
168
  }
165
169
  interface CreateAttachmentRequest {
166
170
  /** Required. The attachment to be created. */
@@ -311,6 +315,8 @@ declare namespace gapi.client {
311
315
  /** # gdata.* are outside protos with mising documentation */
312
316
  sha256Hash?: string;
313
317
  /** # gdata.* are outside protos with mising documentation */
318
+ sha512Hash?: string;
319
+ /** # gdata.* are outside protos with mising documentation */
314
320
  timestamp?: string;
315
321
  /** # gdata.* are outside protos with mising documentation */
316
322
  token?: string;
@@ -369,6 +375,33 @@ declare namespace gapi.client {
369
375
  }): Request<SearchCaseClassificationsResponse>;
370
376
  }
371
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>;
372
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()) ``` */
373
406
  list(request?: {
374
407
  /** V1 error format. */
@@ -460,6 +493,33 @@ declare namespace gapi.client {
460
493
  },
461
494
  body: Comment,
462
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>;
463
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()) ``` */
464
524
  list(request?: {
465
525
  /** V1 error format. */
@@ -813,7 +873,7 @@ declare namespace gapi.client {
813
873
  parent: string;
814
874
  /** Returns response with indentations and line breaks. */
815
875
  prettyPrint?: boolean;
816
- /** An expression used to filter cases. Expressions use the following fields separated by `AND` and specified with `=`: - `organization`: An organization name in the form `organizations/`. - `project`: A project name in the form `projects/`. - `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. You must specify either `organization` or `project`. 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 (`>`). Examples: - `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)` */
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)` */
817
877
  query?: string;
818
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. */
819
879
  quotaUser?: string;
@@ -853,7 +913,7 @@ declare namespace gapi.client {
853
913
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
854
914
  uploadType?: string;
855
915
  }): Request<Media>;
856
- /** 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/v2beta/$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()) ``` */
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()) ``` */
857
917
  upload(request: {
858
918
  /** V1 error format. */
859
919
  '$.xgafv'?: '1' | '2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudsupport-v2",
3
- "version": "0.2.20260318",
3
+ "version": "0.2.20260609",
4
4
  "description": "TypeScript typings for Google Cloud Support API v2",
5
5
  "repository": {
6
6
  "type": "git",
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/v2beta/$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()) ```
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
  ````