@maxim_mazurok/gapi.client.cloudsupport-v2 0.0.20230724 → 0.0.20230725

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 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: 20230724
12
+ // Revision: 20230725
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -512,7 +512,10 @@ declare namespace gapi.client {
512
512
  }): Request<SearchCaseClassificationsResponse>;
513
513
  }
514
514
  interface AttachmentsResource {
515
- /** Retrieve all attachments associated with a support case. */
515
+ /**
516
+ * Retrieve all attachments associated with a support case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/23598314" curl \ --header
517
+ * "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments" ```
518
+ */
516
519
  list(request?: {
517
520
  /** V1 error format. */
518
521
  "$.xgafv"?:
@@ -559,7 +562,11 @@ declare namespace gapi.client {
559
562
  }): Request<ListAttachmentsResponse>;
560
563
  }
561
564
  interface CommentsResource {
562
- /** Add a new comment to the specified Case. The comment object must have the following fields set: body. */
565
+ /**
566
+ * Add a new comment to the specified Case. The comment object must have the following fields set: body. Here is an example of calling this endpoint using cURL: ```shell
567
+ * case="projects/some-project/cases/43591344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \
568
+ * --data '{ "body": "This is a test comment." }' \ "https://cloudsupport.googleapis.com/v2/$case/comments" ```
569
+ */
563
570
  create(request: {
564
571
  /** V1 error format. */
565
572
  "$.xgafv"?:
@@ -640,7 +647,10 @@ declare namespace gapi.client {
640
647
  string;
641
648
  },
642
649
  body: Comment): Request<Comment>;
643
- /** Retrieve all Comments associated with the Case object. */
650
+ /**
651
+ * Retrieve all comments associated with the Case object. Here is an example of calling this endpoint using cURL: ```shell case="projects/cloud-support-qa-premium/cases/43595344" curl
652
+ * \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments" ```
653
+ */
644
654
  list(request?: {
645
655
  /** V1 error format. */
646
656
  "$.xgafv"?:
@@ -688,7 +698,7 @@ declare namespace gapi.client {
688
698
  }
689
699
  interface CasesResource {
690
700
  /**
691
- * Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/cloud-support-qa-premium/cases/43595344" curl \ --request POST \ --header
701
+ * Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header
692
702
  * "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ```
693
703
  */
694
704
  close(request: {
@@ -1210,7 +1220,11 @@ declare namespace gapi.client {
1210
1220
  CommentsResource;
1211
1221
  }
1212
1222
  interface MediaResource {
1213
- /** Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. */
1223
+ /**
1224
+ * Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. Here is an example of calling this endpoint using cURL: ```shell
1225
+ * name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
1226
+ * "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ```
1227
+ */
1214
1228
  download(request?: {
1215
1229
  /** V1 error format. */
1216
1230
  "$.xgafv"?:
@@ -1249,7 +1263,12 @@ declare namespace gapi.client {
1249
1263
  uploadType?:
1250
1264
  string;
1251
1265
  }): Request<Media>;
1252
- /** Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. */
1266
+ /**
1267
+ * Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using cURL:
1268
+ * ```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
1269
+ * $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \
1270
+ * "https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt" ```
1271
+ */
1253
1272
  upload(request: {
1254
1273
  /** V1 error format. */
1255
1274
  "$.xgafv"?:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudsupport-v2",
3
- "version": "0.0.20230724",
3
+ "version": "0.0.20230725",
4
4
  "description": "TypeScript typings for Google Cloud Support API v2",
5
5
  "license": "MIT",
6
6
  "author": {
package/readme.md CHANGED
@@ -72,7 +72,7 @@ Retrieve valid classifications to be used when creating a support case. The clas
72
72
  await gapi.client.cloudsupport.caseClassifications.search({ });
73
73
 
74
74
  /*
75
- Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/cloud-support-qa-premium/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ```
75
+ Close the specified case. Here is an example of calling this endpoint using 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" ```
76
76
  */
77
77
  await gapi.client.cloudsupport.cases.close({ name: "name", });
78
78
 
@@ -107,12 +107,12 @@ Search cases using the specified query. Here is an example of calling this endpo
107
107
  await gapi.client.cloudsupport.cases.search({ parent: "parent", });
108
108
 
109
109
  /*
110
- Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL.
110
+ Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. Here is an example of calling this endpoint using 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" ```
111
111
  */
112
112
  await gapi.client.cloudsupport.media.download({ name: "name", });
113
113
 
114
114
  /*
115
- Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename.
115
+ Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using 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" ```
116
116
  */
117
117
  await gapi.client.cloudsupport.media.upload({ parent: "parent", });
118
118
  ```
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230724
6
+ // Revision: 20230725
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -42,8 +42,8 @@ gapi.load('client', async () => {
42
42
  query: "Test string",
43
43
  });
44
44
  /**
45
- * Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/cloud-support-qa-premium/cases/43595344" curl \ --request POST \ --header
46
- * "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ```
45
+ * Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization:
46
+ * Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ```
47
47
  */
48
48
  await gapi.client.cloudsupport.cases.close({
49
49
  name: "Test string",
@@ -161,13 +161,20 @@ gapi.load('client', async () => {
161
161
  parent: "Test string",
162
162
  query: "Test string",
163
163
  });
164
- /** Retrieve all attachments associated with a support case. */
164
+ /**
165
+ * Retrieve all attachments associated with a support case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/23598314" curl \ --header
166
+ * "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments" ```
167
+ */
165
168
  await gapi.client.cloudsupport.cases.attachments.list({
166
169
  pageSize: 42,
167
170
  pageToken: "Test string",
168
171
  parent: "Test string",
169
172
  });
170
- /** Add a new comment to the specified Case. The comment object must have the following fields set: body. */
173
+ /**
174
+ * Add a new comment to the specified Case. The comment object must have the following fields set: body. Here is an example of calling this endpoint using cURL: ```shell
175
+ * case="projects/some-project/cases/43591344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \
176
+ * --data '{ "body": "This is a test comment." }' \ "https://cloudsupport.googleapis.com/v2/$case/comments" ```
177
+ */
171
178
  await gapi.client.cloudsupport.cases.comments.create({
172
179
  parent: "Test string",
173
180
  }, {
@@ -181,17 +188,28 @@ gapi.load('client', async () => {
181
188
  name: "Test string",
182
189
  plainTextBody: "Test string",
183
190
  });
184
- /** Retrieve all Comments associated with the Case object. */
191
+ /**
192
+ * Retrieve all comments associated with the Case object. Here is an example of calling this endpoint using cURL: ```shell case="projects/cloud-support-qa-premium/cases/43595344" curl \
193
+ * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments" ```
194
+ */
185
195
  await gapi.client.cloudsupport.cases.comments.list({
186
196
  pageSize: 42,
187
197
  pageToken: "Test string",
188
198
  parent: "Test string",
189
199
  });
190
- /** Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. */
200
+ /**
201
+ * Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. Here is an example of calling this endpoint using cURL: ```shell
202
+ * name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
203
+ * "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ```
204
+ */
191
205
  await gapi.client.cloudsupport.media.download({
192
206
  name: "Test string",
193
207
  });
194
- /** Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. */
208
+ /**
209
+ * Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using cURL:
210
+ * ```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
211
+ * auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt" ```
212
+ */
195
213
  await gapi.client.cloudsupport.media.upload({
196
214
  parent: "Test string",
197
215
  }, {