@google-cloud/common
Advanced tools
Comparing version 0.18.5 to 0.18.6
@@ -21,3 +21,3 @@ /// <reference types="request" /> | ||
import { Service } from '.'; | ||
import { ApiError, DecorateRequestOptions } from './util'; | ||
import { ApiError, BodyResponseCallback, DecorateRequestOptions } from './util'; | ||
export interface Interceptor { | ||
@@ -183,3 +183,3 @@ [index: string]: any; | ||
request(reqOpts: DecorateRequestOptions): Promise<r.Response>; | ||
request(reqOpts: DecorateRequestOptions, callback: r.RequestCallback): void; | ||
request(reqOpts: DecorateRequestOptions, callback: BodyResponseCallback): void; | ||
/** | ||
@@ -186,0 +186,0 @@ * Make an authenticated API request. |
@@ -278,3 +278,3 @@ "use strict"; | ||
} | ||
this.request_(reqOpts).then(function (res) { return callback(null, res, res.body); }, function (err) { return callback(err, null, null); }); | ||
this.request_(reqOpts).then(function (res) { return callback(null, res.body, res); }, function (err) { return callback(err, null, null); }); | ||
}; | ||
@@ -281,0 +281,0 @@ /** |
@@ -19,3 +19,3 @@ /// <reference types="request" /> | ||
import { StreamRequestOptions } from './service-object'; | ||
import { DecorateRequestOptions, MakeAuthenticatedRequest, PackageJson } from './util'; | ||
import { BodyResponseCallback, DecorateRequestOptions, MakeAuthenticatedRequest, PackageJson } from './util'; | ||
export interface ServiceConfig { | ||
@@ -98,3 +98,3 @@ /** | ||
request(reqOpts: DecorateRequestOptions): Promise<r.Response>; | ||
request(reqOpts: DecorateRequestOptions, callback: r.RequestCallback): void; | ||
request(reqOpts: DecorateRequestOptions, callback: BodyResponseCallback): void; | ||
/** | ||
@@ -101,0 +101,0 @@ * Make an authenticated API request. |
@@ -191,3 +191,3 @@ "use strict"; | ||
} | ||
this.request_(reqOpts).then(function (res) { return callback(null, res, res.body); }, function (err) { return callback(err, null, null); }); | ||
this.request_(reqOpts).then(function (res) { return callback(null, res.body, res); }, function (err) { return callback(err, null, null); }); | ||
}; | ||
@@ -194,0 +194,0 @@ /** |
{ | ||
"name": "@google-cloud/common", | ||
"description": "Common components for Cloud APIs Node.js Client Libraries", | ||
"version": "0.18.5", | ||
"version": "0.18.6", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
169489