googleapis-common
Advanced tools
Comparing version 7.1.0 to 7.2.0
@@ -29,2 +29,3 @@ import { GaxiosOptions, GaxiosResponse } from 'gaxios'; | ||
export interface MethodOptions extends GaxiosOptions { | ||
apiVersion?: string; | ||
rootUrl?: string; | ||
@@ -31,0 +32,0 @@ http2?: boolean; |
@@ -101,3 +101,3 @@ "use strict"; | ||
const headers = params.headers || {}; | ||
populateAPIHeader(headers); | ||
populateAPIHeader(headers, options.apiVersion); | ||
delete params.headers; | ||
@@ -328,3 +328,3 @@ // Un-alias parameters that were modified due to conflicts with reserved names | ||
} | ||
function populateAPIHeader(headers) { | ||
function populateAPIHeader(headers, apiVersion) { | ||
// TODO: we should eventually think about adding browser support for this | ||
@@ -334,5 +334,9 @@ // populating the gl-web header (web support should also be added to | ||
if (!(0, isbrowser_1.isBrowser)()) { | ||
headers['x-goog-api-client'] = `gdcl/${pkg.version} gl-node/${process.versions.node}`; | ||
headers['x-goog-api-client'] = | ||
`gdcl/${pkg.version} gl-node/${process.versions.node}`; | ||
} | ||
if (apiVersion) { | ||
headers['x-goog-api-version'] = apiVersion; | ||
} | ||
} | ||
//# sourceMappingURL=apirequest.js.map |
@@ -84,2 +84,3 @@ "use strict"; | ||
method: method.httpMethod, | ||
apiVersion: method.apiVersion, | ||
}, | ||
@@ -86,0 +87,0 @@ params, |
@@ -117,2 +117,3 @@ /** | ||
supportsMediaDownload?: boolean; | ||
apiVersion?: string; | ||
} | ||
@@ -119,0 +120,0 @@ export interface FragmentResponse { |
@@ -7,2 +7,9 @@ # Changelog | ||
## [7.2.0](https://github.com/googleapis/nodejs-googleapis-common/compare/v7.1.0...v7.2.0) (2024-04-30) | ||
### Features | ||
* Add Api Version to header for apiary ([#550](https://github.com/googleapis/nodejs-googleapis-common/issues/550)) ([fba0837](https://github.com/googleapis/nodejs-googleapis-common/commit/fba083723842f6d2f2a9e74ebfe3de08fd483262)) | ||
## [7.1.0](https://github.com/googleapis/nodejs-googleapis-common/compare/v7.0.1...v7.1.0) (2024-03-21) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "googleapis-common", | ||
"version": "7.1.0", | ||
"version": "7.2.0", | ||
"description": "A common tooling library used by the googleapis npm module. You probably don't want to use this directly.", | ||
@@ -46,3 +46,3 @@ "repository": "googleapis/nodejs-googleapis-common", | ||
"@babel/plugin-proposal-private-methods": "^7.18.6", | ||
"@compodoc/compodoc": "^1.1.9", | ||
"@compodoc/compodoc": "1.1.23", | ||
"@types/execa": "^0.9.0", | ||
@@ -53,3 +53,3 @@ "@types/extend": "^3.0.1", | ||
"@types/ncp": "^2.0.1", | ||
"@types/nock": "^10.0.3", | ||
"@types/nock": "^11.0.0", | ||
"@types/proxyquire": "^1.3.28", | ||
@@ -56,0 +56,0 @@ "@types/qs": "^6.5.3", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95267
1367