Skip to content

Commit

Permalink
feat: support GoogleAuth parameter (#2210)
Browse files Browse the repository at this point in the history
This change requires googleapis/nodejs-googleapis-common#287 to land before going out.  It does a few things:
- This lets folks pass a `GoogleAuth` parameter.  Anything that has a `request` method with the right signature.  
- Moves `auth` into the `StandardParameters` interface instead of stamping it out every time in each individual generated interface.
  • Loading branch information
JustinBeckwith committed Jun 3, 2020
1 parent 78ff014 commit b08ef52
Show file tree
Hide file tree
Showing 447 changed files with 3,512 additions and 38,758 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -47,7 +47,7 @@
],
"dependencies": {
"google-auth-library": "^6.0.0",
"googleapis-common": "^4.2.1"
"googleapis-common": "^4.3.0"
},
"devDependencies": {
"@compodoc/compodoc": "^1.1.10",
Expand Down
2 changes: 1 addition & 1 deletion src/apis/abusiveexperiencereport/package.json
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.2.1"
"googleapis-common": "^4.3.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
24 changes: 13 additions & 11 deletions src/apis/abusiveexperiencereport/v1.ts
Expand Up @@ -29,6 +29,7 @@ import {
MethodOptions,
StreamMethodOptions,
GlobalOptions,
GoogleAuth,
BodyResponseCallback,
APIRequestContext,
} from 'googleapis-common';
Expand All @@ -40,6 +41,17 @@ export namespace abusiveexperiencereport_v1 {
}

interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?:
| string
| OAuth2Client
| JWT
| Compute
| UserRefreshClient
| GoogleAuth;

/**
* V1 error format.
*/
Expand Down Expand Up @@ -308,11 +320,6 @@ export namespace abusiveexperiencereport_v1 {
}

export interface Params$Resource$Sites$Get extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;

/**
* Required. The name of the site whose summary to get, e.g. `sites/http%3A%2F%2Fwww.google.com%2F`. Format: `sites/{site}`
*/
Expand Down Expand Up @@ -457,10 +464,5 @@ export namespace abusiveexperiencereport_v1 {
}

export interface Params$Resource$Violatingsites$List
extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
}
extends StandardParameters {}
}
2 changes: 1 addition & 1 deletion src/apis/acceleratedmobilepageurl/package.json
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.2.1"
"googleapis-common": "^4.3.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down
17 changes: 12 additions & 5 deletions src/apis/acceleratedmobilepageurl/v1.ts
Expand Up @@ -29,6 +29,7 @@ import {
MethodOptions,
StreamMethodOptions,
GlobalOptions,
GoogleAuth,
BodyResponseCallback,
APIRequestContext,
} from 'googleapis-common';
Expand All @@ -40,6 +41,17 @@ export namespace acceleratedmobilepageurl_v1 {
}

interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?:
| string
| OAuth2Client
| JWT
| Compute
| UserRefreshClient
| GoogleAuth;

/**
* V1 error format.
*/
Expand Down Expand Up @@ -329,11 +341,6 @@ export namespace acceleratedmobilepageurl_v1 {
}

export interface Params$Resource$Ampurls$Batchget extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;

/**
* Request body metadata
*/
Expand Down
2 changes: 1 addition & 1 deletion src/apis/accessapproval/package.json
Expand Up @@ -29,7 +29,7 @@
"webpack": "webpack"
},
"dependencies": {
"googleapis-common": "^4.2.1"
"googleapis-common": "^4.3.0"
},
"devDependencies": {
"gts": "^2.0.0",
Expand Down

0 comments on commit b08ef52

Please sign in to comment.