Skip to content

Commit dcfc7b4

Browse files
fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6186)
* feat: await/catch promises, and update listOperationsAsync return type PiperOrigin-RevId: 738212310 Source-Link: googleapis/googleapis@803b234 Source-Link: googleapis/googleapis-gen@4f44bd2 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdzdWl0ZWFkZG9ucy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWlhcC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWlkcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWlvdC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWttcy1pbnZlbnRvcnkvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWttcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWxhbmd1YWdlLy5Pd2xCb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GY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1pZ3JhdGlvbmNlbnRlci8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1vZGVsYXJtb3IvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldGFwcC8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmtjb25uZWN0aXZpdHkvLk93bEJvdC55YW1sIiwiaCI6IjRmNDRiZDJiYWE4ZGQ1YTcxY2EwY2ViZGIxNjRjM2MzNDM0MWVkODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmttYW5hZ2VtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmtzZWN1cml0eS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update gax * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Sofia Leon <[email protected]>
1 parent f91c71f commit dcfc7b4

169 files changed

Lines changed: 5794 additions & 4260 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-gsuiteaddons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"test": "c8 mocha build/test"
4747
},
4848
"dependencies": {
49-
"google-gax": "^5.0.0-rc.0"
49+
"google-gax": "^5.0.1-rc.0"
5050
},
5151
"devDependencies": {
5252
"@types/mocha": "^10.0.10",

packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata.google.cloud.gsuiteaddons.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clientLibrary": {
33
"name": "nodejs-gsuiteaddons",
4-
"version": "1.3.0",
4+
"version": "2.0.0",
55
"language": "TYPESCRIPT",
66
"apis": [
77
{

packages/google-cloud-gsuiteaddons/samples/generated/v1/snippet_metadata_google.cloud.gsuiteaddons.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clientLibrary": {
33
"name": "nodejs-gsuiteaddons",
4-
"version": "1.3.0",
4+
"version": "2.0.0",
55
"language": "TYPESCRIPT",
66
"apis": [
77
{

packages/google-cloud-gsuiteaddons/src/v1/g_suite_add_ons_client.ts

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,9 @@ export class GSuiteAddOnsClient {
517517
this._gaxModule.routingHeader.fromParams({
518518
name: request.name ?? '',
519519
});
520-
this.initialize();
520+
this.initialize().catch(err => {
521+
throw err;
522+
});
521523
this._log.info('getAuthorization request %j', request);
522524
const wrappedCallback:
523525
| Callback<
@@ -643,7 +645,9 @@ export class GSuiteAddOnsClient {
643645
this._gaxModule.routingHeader.fromParams({
644646
parent: request.parent ?? '',
645647
});
646-
this.initialize();
648+
this.initialize().catch(err => {
649+
throw err;
650+
});
647651
this._log.info('createDeployment request %j', request);
648652
const wrappedCallback:
649653
| Callback<
@@ -762,7 +766,9 @@ export class GSuiteAddOnsClient {
762766
this._gaxModule.routingHeader.fromParams({
763767
'deployment.name': request.deployment!.name ?? '',
764768
});
765-
this.initialize();
769+
this.initialize().catch(err => {
770+
throw err;
771+
});
766772
this._log.info('replaceDeployment request %j', request);
767773
const wrappedCallback:
768774
| Callback<
@@ -883,7 +889,9 @@ export class GSuiteAddOnsClient {
883889
this._gaxModule.routingHeader.fromParams({
884890
name: request.name ?? '',
885891
});
886-
this.initialize();
892+
this.initialize().catch(err => {
893+
throw err;
894+
});
887895
this._log.info('getDeployment request %j', request);
888896
const wrappedCallback:
889897
| Callback<
@@ -1004,7 +1012,9 @@ export class GSuiteAddOnsClient {
10041012
this._gaxModule.routingHeader.fromParams({
10051013
name: request.name ?? '',
10061014
});
1007-
this.initialize();
1015+
this.initialize().catch(err => {
1016+
throw err;
1017+
});
10081018
this._log.info('deleteDeployment request %j', request);
10091019
const wrappedCallback:
10101020
| Callback<
@@ -1127,7 +1137,9 @@ export class GSuiteAddOnsClient {
11271137
this._gaxModule.routingHeader.fromParams({
11281138
name: request.name ?? '',
11291139
});
1130-
this.initialize();
1140+
this.initialize().catch(err => {
1141+
throw err;
1142+
});
11311143
this._log.info('installDeployment request %j', request);
11321144
const wrappedCallback:
11331145
| Callback<
@@ -1256,7 +1268,9 @@ export class GSuiteAddOnsClient {
12561268
this._gaxModule.routingHeader.fromParams({
12571269
name: request.name ?? '',
12581270
});
1259-
this.initialize();
1271+
this.initialize().catch(err => {
1272+
throw err;
1273+
});
12601274
this._log.info('uninstallDeployment request %j', request);
12611275
const wrappedCallback:
12621276
| Callback<
@@ -1377,7 +1391,9 @@ export class GSuiteAddOnsClient {
13771391
this._gaxModule.routingHeader.fromParams({
13781392
name: request.name ?? '',
13791393
});
1380-
this.initialize();
1394+
this.initialize().catch(err => {
1395+
throw err;
1396+
});
13811397
this._log.info('getInstallStatus request %j', request);
13821398
const wrappedCallback:
13831399
| Callback<
@@ -1513,7 +1529,9 @@ export class GSuiteAddOnsClient {
15131529
this._gaxModule.routingHeader.fromParams({
15141530
parent: request.parent ?? '',
15151531
});
1516-
this.initialize();
1532+
this.initialize().catch(err => {
1533+
throw err;
1534+
});
15171535
const wrappedCallback:
15181536
| PaginationCallback<
15191537
protos.google.cloud.gsuiteaddons.v1.IListDeploymentsRequest,
@@ -1587,7 +1605,9 @@ export class GSuiteAddOnsClient {
15871605
});
15881606
const defaultCallSettings = this._defaults['listDeployments'];
15891607
const callSettings = defaultCallSettings.merge(options);
1590-
this.initialize();
1608+
this.initialize().catch(err => {
1609+
throw err;
1610+
});
15911611
this._log.info('listDeployments stream %j', request);
15921612
return this.descriptors.page.listDeployments.createStream(
15931613
this.innerApiCalls.listDeployments as GaxCall,
@@ -1643,7 +1663,9 @@ export class GSuiteAddOnsClient {
16431663
});
16441664
const defaultCallSettings = this._defaults['listDeployments'];
16451665
const callSettings = defaultCallSettings.merge(options);
1646-
this.initialize();
1666+
this.initialize().catch(err => {
1667+
throw err;
1668+
});
16471669
this._log.info('listDeployments iterate %j', request);
16481670
return this.descriptors.page.listDeployments.asyncIterate(
16491671
this.innerApiCalls['listDeployments'] as GaxCall,

0 commit comments

Comments
 (0)