@maxim_mazurok/gapi.client.cloudsupport-v2 0.0.20230723 → 0.0.20230724
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 +33 -11
- package/package.json +1 -1
- package/readme.md +8 -8
- package/tests.ts +34 -12
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: 20230724
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -462,7 +462,9 @@ declare namespace gapi.client {
|
|
|
462
462
|
/**
|
|
463
463
|
* Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy,
|
|
464
464
|
* separated by `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least
|
|
465
|
-
*
|
|
465
|
+
* six months. If a given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an
|
|
466
|
+
* example of calling this endpoint using cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
467
|
+
* 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ```
|
|
466
468
|
*/
|
|
467
469
|
search(request?: {
|
|
468
470
|
/** V1 error format. */
|
|
@@ -685,7 +687,10 @@ declare namespace gapi.client {
|
|
|
685
687
|
}): Request<ListCommentsResponse>;
|
|
686
688
|
}
|
|
687
689
|
interface CasesResource {
|
|
688
|
-
/**
|
|
690
|
+
/**
|
|
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
|
|
692
|
+
* "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ```
|
|
693
|
+
*/
|
|
689
694
|
close(request: {
|
|
690
695
|
/** V1 error format. */
|
|
691
696
|
"$.xgafv"?:
|
|
@@ -768,7 +773,10 @@ declare namespace gapi.client {
|
|
|
768
773
|
body: CloseCaseRequest): Request<Case>;
|
|
769
774
|
/**
|
|
770
775
|
* Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and
|
|
771
|
-
* `priority`.
|
|
776
|
+
* `priority`. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth
|
|
777
|
+
* 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",
|
|
778
|
+
* "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": "-07:00",
|
|
779
|
+
* "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
|
|
772
780
|
*/
|
|
773
781
|
create(request: {
|
|
774
782
|
/** V1 error format. */
|
|
@@ -851,8 +859,11 @@ declare namespace gapi.client {
|
|
|
851
859
|
},
|
|
852
860
|
body: Case): Request<Case>;
|
|
853
861
|
/**
|
|
854
|
-
* Escalate a case. Escalating a case
|
|
855
|
-
* https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which
|
|
862
|
+
* Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go
|
|
863
|
+
* to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. Here is an
|
|
864
|
+
* example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth
|
|
865
|
+
* print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \
|
|
866
|
+
* "https://cloudsupport.googleapis.com/v2/$case:escalate" ```
|
|
856
867
|
*/
|
|
857
868
|
escalate(request: {
|
|
858
869
|
/** V1 error format. */
|
|
@@ -934,7 +945,10 @@ declare namespace gapi.client {
|
|
|
934
945
|
string;
|
|
935
946
|
},
|
|
936
947
|
body: EscalateCaseRequest): Request<Case>;
|
|
937
|
-
/**
|
|
948
|
+
/**
|
|
949
|
+
* Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer
|
|
950
|
+
* $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ```
|
|
951
|
+
*/
|
|
938
952
|
get(request?: {
|
|
939
953
|
/** V1 error format. */
|
|
940
954
|
"$.xgafv"?:
|
|
@@ -974,8 +988,9 @@ declare namespace gapi.client {
|
|
|
974
988
|
string;
|
|
975
989
|
}): Request<Case>;
|
|
976
990
|
/**
|
|
977
|
-
* Retrieve all cases under the specified parent. Note: Listing cases under an
|
|
978
|
-
* an organization, including cases parented by projects under that organization, use `cases.search`.
|
|
991
|
+
* Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under
|
|
992
|
+
* an organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell
|
|
993
|
+
* parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
|
|
979
994
|
*/
|
|
980
995
|
list(request?: {
|
|
981
996
|
/** V1 error format. */
|
|
@@ -1029,7 +1044,11 @@ declare namespace gapi.client {
|
|
|
1029
1044
|
uploadType?:
|
|
1030
1045
|
string;
|
|
1031
1046
|
}): Request<ListCasesResponse>;
|
|
1032
|
-
/**
|
|
1047
|
+
/**
|
|
1048
|
+
* Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl
|
|
1049
|
+
* \ --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \
|
|
1050
|
+
* "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ```
|
|
1051
|
+
*/
|
|
1033
1052
|
patch(request: {
|
|
1034
1053
|
/** V1 error format. */
|
|
1035
1054
|
"$.xgafv"?:
|
|
@@ -1124,7 +1143,10 @@ declare namespace gapi.client {
|
|
|
1124
1143
|
string;
|
|
1125
1144
|
},
|
|
1126
1145
|
body: Case): Request<Case>;
|
|
1127
|
-
/**
|
|
1146
|
+
/**
|
|
1147
|
+
* Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer
|
|
1148
|
+
* $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ```
|
|
1149
|
+
*/
|
|
1128
1150
|
search(request?: {
|
|
1129
1151
|
/** V1 error format. */
|
|
1130
1152
|
"$.xgafv"?:
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -67,42 +67,42 @@ After that you can use Google Cloud Support API resources: <!-- TODO: make this
|
|
|
67
67
|
```typescript
|
|
68
68
|
|
|
69
69
|
/*
|
|
70
|
-
Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least
|
|
70
|
+
Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least six months. If a given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an example of calling this endpoint using cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ```
|
|
71
71
|
*/
|
|
72
72
|
await gapi.client.cloudsupport.caseClassifications.search({ });
|
|
73
73
|
|
|
74
74
|
/*
|
|
75
|
-
Close the specified case.
|
|
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" ```
|
|
76
76
|
*/
|
|
77
77
|
await gapi.client.cloudsupport.cases.close({ name: "name", });
|
|
78
78
|
|
|
79
79
|
/*
|
|
80
|
-
Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`.
|
|
80
|
+
Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using 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" ```
|
|
81
81
|
*/
|
|
82
82
|
await gapi.client.cloudsupport.cases.create({ parent: "parent", });
|
|
83
83
|
|
|
84
84
|
/*
|
|
85
|
-
Escalate a case. Escalating a case
|
|
85
|
+
Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. 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)" \ --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \ "https://cloudsupport.googleapis.com/v2/$case:escalate" ```
|
|
86
86
|
*/
|
|
87
87
|
await gapi.client.cloudsupport.cases.escalate({ name: "name", });
|
|
88
88
|
|
|
89
89
|
/*
|
|
90
|
-
Retrieve the specified case.
|
|
90
|
+
Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ```
|
|
91
91
|
*/
|
|
92
92
|
await gapi.client.cloudsupport.cases.get({ name: "name", });
|
|
93
93
|
|
|
94
94
|
/*
|
|
95
|
-
Retrieve all cases under the specified parent. Note: Listing cases under an
|
|
95
|
+
Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
|
|
96
96
|
*/
|
|
97
97
|
await gapi.client.cloudsupport.cases.list({ parent: "parent", });
|
|
98
98
|
|
|
99
99
|
/*
|
|
100
|
-
Update the specified case. Only a subset of fields can be updated.
|
|
100
|
+
Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using 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" ```
|
|
101
101
|
*/
|
|
102
102
|
await gapi.client.cloudsupport.cases.patch({ name: "name", });
|
|
103
103
|
|
|
104
104
|
/*
|
|
105
|
-
Search cases using the specified query.
|
|
105
|
+
Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ```
|
|
106
106
|
*/
|
|
107
107
|
await gapi.client.cloudsupport.cases.search({ parent: "parent", });
|
|
108
108
|
|
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:
|
|
6
|
+
// Revision: 20230724
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -31,22 +31,30 @@ gapi.load('client', async () => {
|
|
|
31
31
|
async function run() {
|
|
32
32
|
/**
|
|
33
33
|
* Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by
|
|
34
|
-
* `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least
|
|
35
|
-
* given classification is
|
|
34
|
+
* `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least six months. If a
|
|
35
|
+
* given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an example of calling
|
|
36
|
+
* this endpoint using cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
37
|
+
* 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ```
|
|
36
38
|
*/
|
|
37
39
|
await gapi.client.cloudsupport.caseClassifications.search({
|
|
38
40
|
pageSize: 42,
|
|
39
41
|
pageToken: "Test string",
|
|
40
42
|
query: "Test string",
|
|
41
43
|
});
|
|
42
|
-
/**
|
|
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" ```
|
|
47
|
+
*/
|
|
43
48
|
await gapi.client.cloudsupport.cases.close({
|
|
44
49
|
name: "Test string",
|
|
45
50
|
}, {
|
|
46
51
|
});
|
|
47
52
|
/**
|
|
48
53
|
* Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and
|
|
49
|
-
* `priority`.
|
|
54
|
+
* `priority`. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth
|
|
55
|
+
* 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",
|
|
56
|
+
* "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": "-07:00",
|
|
57
|
+
* "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
|
|
50
58
|
*/
|
|
51
59
|
await gapi.client.cloudsupport.cases.create({
|
|
52
60
|
parent: "Test string",
|
|
@@ -77,8 +85,11 @@ gapi.load('client', async () => {
|
|
|
77
85
|
updateTime: "Test string",
|
|
78
86
|
});
|
|
79
87
|
/**
|
|
80
|
-
* Escalate a case. Escalating a case
|
|
81
|
-
* https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which
|
|
88
|
+
* Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go to
|
|
89
|
+
* https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. Here is an example of
|
|
90
|
+
* calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
91
|
+
* --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \
|
|
92
|
+
* "https://cloudsupport.googleapis.com/v2/$case:escalate" ```
|
|
82
93
|
*/
|
|
83
94
|
await gapi.client.cloudsupport.cases.escalate({
|
|
84
95
|
name: "Test string",
|
|
@@ -88,13 +99,17 @@ gapi.load('client', async () => {
|
|
|
88
99
|
reason: "Test string",
|
|
89
100
|
},
|
|
90
101
|
});
|
|
91
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud
|
|
104
|
+
* auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ```
|
|
105
|
+
*/
|
|
92
106
|
await gapi.client.cloudsupport.cases.get({
|
|
93
107
|
name: "Test string",
|
|
94
108
|
});
|
|
95
109
|
/**
|
|
96
|
-
* Retrieve all cases under the specified parent. Note: Listing cases under an
|
|
97
|
-
* organization, including cases parented by projects under that organization, use `cases.search`.
|
|
110
|
+
* Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under an
|
|
111
|
+
* organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell
|
|
112
|
+
* parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
|
|
98
113
|
*/
|
|
99
114
|
await gapi.client.cloudsupport.cases.list({
|
|
100
115
|
filter: "Test string",
|
|
@@ -102,7 +117,11 @@ gapi.load('client', async () => {
|
|
|
102
117
|
pageToken: "Test string",
|
|
103
118
|
parent: "Test string",
|
|
104
119
|
});
|
|
105
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \
|
|
122
|
+
* --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \
|
|
123
|
+
* "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ```
|
|
124
|
+
*/
|
|
106
125
|
await gapi.client.cloudsupport.cases.patch({
|
|
107
126
|
name: "Test string",
|
|
108
127
|
updateMask: "Test string",
|
|
@@ -132,7 +151,10 @@ gapi.load('client', async () => {
|
|
|
132
151
|
timeZone: "Test string",
|
|
133
152
|
updateTime: "Test string",
|
|
134
153
|
});
|
|
135
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud
|
|
156
|
+
* auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ```
|
|
157
|
+
*/
|
|
136
158
|
await gapi.client.cloudsupport.cases.search({
|
|
137
159
|
pageSize: 42,
|
|
138
160
|
pageToken: "Test string",
|