@maxim_mazurok/gapi.client.cloudsupport-v2 0.2.20260617 → 0.2.20260622

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 +301 -1
  2. package/package.json +1 -1
  3. package/readme.md +36 -0
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: 20260617
12
+ // Revision: 20260622
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -244,6 +244,12 @@ declare namespace gapi.client {
244
244
  /** A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.comments.list` requests. If unspecified, there are no more results to retrieve. */
245
245
  nextPageToken?: string;
246
246
  }
247
+ interface ListSupportEventSubscriptionsResponse {
248
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
249
+ nextPageToken?: string;
250
+ /** The support event subscriptions. */
251
+ supportEventSubscriptions?: SupportEventSubscription[];
252
+ }
247
253
  interface Media {
248
254
  /** # gdata.* are outside protos with mising documentation */
249
255
  algorithm?: string;
@@ -341,6 +347,29 @@ declare namespace gapi.client {
341
347
  /** A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.search` requests. If unspecified, there are no more results to retrieve. */
342
348
  nextPageToken?: string;
343
349
  }
350
+ interface SupportEventSubscription {
351
+ /** Output only. The time at which the subscription was created. */
352
+ createTime?: string;
353
+ /** Output only. The time at which the subscription was deleted. */
354
+ deleteTime?: string;
355
+ /** Output only. Reason why subscription is failing. State of subscription must be FAILING in order for this to have a value. */
356
+ failureReason?:
357
+ | 'FAILURE_REASON_UNSPECIFIED'
358
+ | 'PERMISSION_DENIED'
359
+ | 'TOPIC_NOT_FOUND'
360
+ | 'OTHER';
361
+ /** Identifier. The resource name of the support event subscription. */
362
+ name?: string;
363
+ /** Required. The name of the Pub/Sub topic to publish notifications to. Format: projects/{project}/topics/{topic} */
364
+ pubSubTopic?: string;
365
+ /** Output only. The time at which the subscription will be purged. */
366
+ purgeTime?: string;
367
+ /** Output only. The state of the subscription. */
368
+ state?: 'STATE_UNSPECIFIED' | 'WORKING' | 'FAILING' | 'DELETED';
369
+ /** Output only. The time at which the subscription was last updated. */
370
+ updateTime?: string;
371
+ }
372
+ interface UndeleteSupportEventSubscriptionRequest {}
344
373
  interface CaseClassificationsResource {
345
374
  /** 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()) ``` */
346
375
  search(request?: {
@@ -972,11 +1001,282 @@ declare namespace gapi.client {
972
1001
  body: CreateAttachmentRequest,
973
1002
  ): Request<Attachment>;
974
1003
  }
1004
+ interface SupportEventSubscriptionsResource {
1005
+ /** Creates a support event subscription for an organization. */
1006
+ create(request: {
1007
+ /** V1 error format. */
1008
+ '$.xgafv'?: '1' | '2';
1009
+ /** OAuth access token. */
1010
+ access_token?: string;
1011
+ /** Data format for response. */
1012
+ alt?: 'json' | 'media' | 'proto';
1013
+ /** JSONP */
1014
+ callback?: string;
1015
+ /** Selector specifying which fields to include in a partial response. */
1016
+ fields?: string;
1017
+ /** 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. */
1018
+ key?: string;
1019
+ /** OAuth 2.0 token for the current user. */
1020
+ oauth_token?: string;
1021
+ /** Required. The parent resource name where the support event subscription will be created. Format: organizations/{organization_id} */
1022
+ parent: string;
1023
+ /** Returns response with indentations and line breaks. */
1024
+ prettyPrint?: boolean;
1025
+ /** 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. */
1026
+ quotaUser?: string;
1027
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1028
+ upload_protocol?: string;
1029
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1030
+ uploadType?: string;
1031
+ /** Request body */
1032
+ resource: SupportEventSubscription;
1033
+ }): Request<SupportEventSubscription>;
1034
+ create(
1035
+ request: {
1036
+ /** V1 error format. */
1037
+ '$.xgafv'?: '1' | '2';
1038
+ /** OAuth access token. */
1039
+ access_token?: string;
1040
+ /** Data format for response. */
1041
+ alt?: 'json' | 'media' | 'proto';
1042
+ /** JSONP */
1043
+ callback?: string;
1044
+ /** Selector specifying which fields to include in a partial response. */
1045
+ fields?: string;
1046
+ /** 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. */
1047
+ key?: string;
1048
+ /** OAuth 2.0 token for the current user. */
1049
+ oauth_token?: string;
1050
+ /** Required. The parent resource name where the support event subscription will be created. Format: organizations/{organization_id} */
1051
+ parent: string;
1052
+ /** Returns response with indentations and line breaks. */
1053
+ prettyPrint?: boolean;
1054
+ /** 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. */
1055
+ quotaUser?: string;
1056
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1057
+ upload_protocol?: string;
1058
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1059
+ uploadType?: string;
1060
+ },
1061
+ body: SupportEventSubscription,
1062
+ ): Request<SupportEventSubscription>;
1063
+ /** Soft deletes a support event subscription. */
1064
+ delete(request?: {
1065
+ /** V1 error format. */
1066
+ '$.xgafv'?: '1' | '2';
1067
+ /** OAuth access token. */
1068
+ access_token?: string;
1069
+ /** Data format for response. */
1070
+ alt?: 'json' | 'media' | 'proto';
1071
+ /** JSONP */
1072
+ callback?: string;
1073
+ /** Selector specifying which fields to include in a partial response. */
1074
+ fields?: string;
1075
+ /** 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. */
1076
+ key?: string;
1077
+ /** Required. The name of the support event subscription to delete. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} */
1078
+ name: string;
1079
+ /** OAuth 2.0 token for the current user. */
1080
+ oauth_token?: string;
1081
+ /** Returns response with indentations and line breaks. */
1082
+ prettyPrint?: boolean;
1083
+ /** 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. */
1084
+ quotaUser?: string;
1085
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1086
+ upload_protocol?: string;
1087
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1088
+ uploadType?: string;
1089
+ }): Request<SupportEventSubscription>;
1090
+ /** Gets a support event subscription. */
1091
+ get(request?: {
1092
+ /** V1 error format. */
1093
+ '$.xgafv'?: '1' | '2';
1094
+ /** OAuth access token. */
1095
+ access_token?: string;
1096
+ /** Data format for response. */
1097
+ alt?: 'json' | 'media' | 'proto';
1098
+ /** JSONP */
1099
+ callback?: string;
1100
+ /** Selector specifying which fields to include in a partial response. */
1101
+ fields?: string;
1102
+ /** 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. */
1103
+ key?: string;
1104
+ /** Required. The name of the support event subscription to retrieve. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} */
1105
+ name: string;
1106
+ /** OAuth 2.0 token for the current user. */
1107
+ oauth_token?: string;
1108
+ /** Returns response with indentations and line breaks. */
1109
+ prettyPrint?: boolean;
1110
+ /** 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. */
1111
+ quotaUser?: string;
1112
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1113
+ upload_protocol?: string;
1114
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1115
+ uploadType?: string;
1116
+ }): Request<SupportEventSubscription>;
1117
+ /** Lists support event subscriptions. */
1118
+ list(request?: {
1119
+ /** V1 error format. */
1120
+ '$.xgafv'?: '1' | '2';
1121
+ /** OAuth access token. */
1122
+ access_token?: string;
1123
+ /** Data format for response. */
1124
+ alt?: 'json' | 'media' | 'proto';
1125
+ /** JSONP */
1126
+ callback?: string;
1127
+ /** Selector specifying which fields to include in a partial response. */
1128
+ fields?: string;
1129
+ /** Optional. Filter expression based on AIP-160. Supported fields: - pub_sub_topic - state Examples: - `pub_sub_topic="projects/example-project/topics/example-topic"` - `state=WORKING` - `pub_sub_topic="projects/example-project/topics/example-topic" AND state=WORKING` */
1130
+ filter?: string;
1131
+ /** 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. */
1132
+ key?: string;
1133
+ /** OAuth 2.0 token for the current user. */
1134
+ oauth_token?: string;
1135
+ /** Optional. The maximum number of support event subscriptions to return. */
1136
+ pageSize?: number;
1137
+ /** Optional. A token identifying the page of results to return. If unspecified, the first page is retrieved. When paginating, all other parameters provided to `ListSupportEventSubscriptions` must match the call that provided the page token. */
1138
+ pageToken?: string;
1139
+ /** Required. The fully qualified name of the Cloud resource to list support event subscriptions under. Format: organizations/{organization_id} */
1140
+ parent: string;
1141
+ /** Returns response with indentations and line breaks. */
1142
+ prettyPrint?: boolean;
1143
+ /** 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. */
1144
+ quotaUser?: string;
1145
+ /** Optional. Whether to show deleted subscriptions. By default, deleted subscriptions are not returned. */
1146
+ showDeleted?: boolean;
1147
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1148
+ upload_protocol?: string;
1149
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1150
+ uploadType?: string;
1151
+ }): Request<ListSupportEventSubscriptionsResponse>;
1152
+ /** Updates a support event subscription. */
1153
+ patch(request: {
1154
+ /** V1 error format. */
1155
+ '$.xgafv'?: '1' | '2';
1156
+ /** OAuth access token. */
1157
+ access_token?: string;
1158
+ /** Data format for response. */
1159
+ alt?: 'json' | 'media' | 'proto';
1160
+ /** JSONP */
1161
+ callback?: string;
1162
+ /** Selector specifying which fields to include in a partial response. */
1163
+ fields?: string;
1164
+ /** 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. */
1165
+ key?: string;
1166
+ /** Identifier. The resource name of the support event subscription. */
1167
+ name: string;
1168
+ /** OAuth 2.0 token for the current user. */
1169
+ oauth_token?: string;
1170
+ /** Returns response with indentations and line breaks. */
1171
+ prettyPrint?: boolean;
1172
+ /** 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. */
1173
+ quotaUser?: string;
1174
+ /** Optional. The list of fields to update. The only supported value is pub_sub_topic. */
1175
+ updateMask?: string;
1176
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1177
+ upload_protocol?: string;
1178
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1179
+ uploadType?: string;
1180
+ /** Request body */
1181
+ resource: SupportEventSubscription;
1182
+ }): Request<SupportEventSubscription>;
1183
+ patch(
1184
+ request: {
1185
+ /** V1 error format. */
1186
+ '$.xgafv'?: '1' | '2';
1187
+ /** OAuth access token. */
1188
+ access_token?: string;
1189
+ /** Data format for response. */
1190
+ alt?: 'json' | 'media' | 'proto';
1191
+ /** JSONP */
1192
+ callback?: string;
1193
+ /** Selector specifying which fields to include in a partial response. */
1194
+ fields?: string;
1195
+ /** 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. */
1196
+ key?: string;
1197
+ /** Identifier. The resource name of the support event subscription. */
1198
+ name: string;
1199
+ /** OAuth 2.0 token for the current user. */
1200
+ oauth_token?: string;
1201
+ /** Returns response with indentations and line breaks. */
1202
+ prettyPrint?: boolean;
1203
+ /** 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. */
1204
+ quotaUser?: string;
1205
+ /** Optional. The list of fields to update. The only supported value is pub_sub_topic. */
1206
+ updateMask?: string;
1207
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1208
+ upload_protocol?: string;
1209
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1210
+ uploadType?: string;
1211
+ },
1212
+ body: SupportEventSubscription,
1213
+ ): Request<SupportEventSubscription>;
1214
+ /** Undeletes a support event subscription. */
1215
+ undelete(request: {
1216
+ /** V1 error format. */
1217
+ '$.xgafv'?: '1' | '2';
1218
+ /** OAuth access token. */
1219
+ access_token?: string;
1220
+ /** Data format for response. */
1221
+ alt?: 'json' | 'media' | 'proto';
1222
+ /** JSONP */
1223
+ callback?: string;
1224
+ /** Selector specifying which fields to include in a partial response. */
1225
+ fields?: string;
1226
+ /** 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. */
1227
+ key?: string;
1228
+ /** Required. The name of the support event subscription to undelete. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} */
1229
+ name: string;
1230
+ /** OAuth 2.0 token for the current user. */
1231
+ oauth_token?: string;
1232
+ /** Returns response with indentations and line breaks. */
1233
+ prettyPrint?: boolean;
1234
+ /** 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. */
1235
+ quotaUser?: string;
1236
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1237
+ upload_protocol?: string;
1238
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1239
+ uploadType?: string;
1240
+ /** Request body */
1241
+ resource: UndeleteSupportEventSubscriptionRequest;
1242
+ }): Request<SupportEventSubscription>;
1243
+ undelete(
1244
+ request: {
1245
+ /** V1 error format. */
1246
+ '$.xgafv'?: '1' | '2';
1247
+ /** OAuth access token. */
1248
+ access_token?: string;
1249
+ /** Data format for response. */
1250
+ alt?: 'json' | 'media' | 'proto';
1251
+ /** JSONP */
1252
+ callback?: string;
1253
+ /** Selector specifying which fields to include in a partial response. */
1254
+ fields?: string;
1255
+ /** 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. */
1256
+ key?: string;
1257
+ /** Required. The name of the support event subscription to undelete. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} */
1258
+ name: string;
1259
+ /** OAuth 2.0 token for the current user. */
1260
+ oauth_token?: string;
1261
+ /** Returns response with indentations and line breaks. */
1262
+ prettyPrint?: boolean;
1263
+ /** 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. */
1264
+ quotaUser?: string;
1265
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1266
+ upload_protocol?: string;
1267
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1268
+ uploadType?: string;
1269
+ },
1270
+ body: UndeleteSupportEventSubscriptionRequest,
1271
+ ): Request<SupportEventSubscription>;
1272
+ }
975
1273
 
976
1274
  const caseClassifications: CaseClassificationsResource;
977
1275
 
978
1276
  const cases: CasesResource;
979
1277
 
980
1278
  const media: MediaResource;
1279
+
1280
+ const supportEventSubscriptions: SupportEventSubscriptionsResource;
981
1281
  }
982
1282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudsupport-v2",
3
- "version": "0.2.20260617",
3
+ "version": "0.2.20260622",
4
4
  "description": "TypeScript typings for Google Cloud Support API v2",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -135,6 +135,42 @@ await gapi.client.cloudsupport.media.download({name: 'name'});
135
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()) ```
136
136
  */
137
137
  await gapi.client.cloudsupport.media.upload({parent: 'parent'});
138
+
139
+ /*
140
+ Creates a support event subscription for an organization.
141
+ */
142
+ await gapi.client.cloudsupport.supportEventSubscriptions.create({
143
+ parent: 'parent',
144
+ });
145
+
146
+ /*
147
+ Soft deletes a support event subscription.
148
+ */
149
+ await gapi.client.cloudsupport.supportEventSubscriptions.delete({name: 'name'});
150
+
151
+ /*
152
+ Gets a support event subscription.
153
+ */
154
+ await gapi.client.cloudsupport.supportEventSubscriptions.get({name: 'name'});
155
+
156
+ /*
157
+ Lists support event subscriptions.
158
+ */
159
+ await gapi.client.cloudsupport.supportEventSubscriptions.list({
160
+ parent: 'parent',
161
+ });
162
+
163
+ /*
164
+ Updates a support event subscription.
165
+ */
166
+ await gapi.client.cloudsupport.supportEventSubscriptions.patch({name: 'name'});
167
+
168
+ /*
169
+ Undeletes a support event subscription.
170
+ */
171
+ await gapi.client.cloudsupport.supportEventSubscriptions.undelete({
172
+ name: 'name',
173
+ });
138
174
  ````
139
175
 
140
176
  For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.cloudsupport-v2#Provenance:~:text=none-,Provenance,-Built%20and%20signed)