Skip to content

Commit a922875

Browse files
committed
Merge branch 'v4.0.0-branch' into add-promise-support
2 parents 36dc27e + 07c1c7d commit a922875

17 files changed

Lines changed: 26 additions & 59 deletions

File tree

assistant/v1.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { AxiosResponse } from 'axios';
1718
import * as extend from 'extend';
18-
import { RequestResponse } from 'request';
1919
import { BaseService } from '../lib/base_service';
2020
import { getDefaultHeaders } from '../lib/common';
2121
import { getMissingParams } from '../lib/helper';
@@ -3256,7 +3256,7 @@ namespace AssistantV1 {
32563256
}
32573257

32583258
/** The callback for a service request. */
3259-
export type Callback<T> = (error: any, body?: T, response?: RequestResponse) => void;
3259+
export type Callback<T> = (error: any, body?: T, response?: AxiosResponse<T>) => void;
32603260

32613261
/** The body of a service request that returns no response data. */
32623262
export interface Empty { }

assistant/v2.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { AxiosResponse } from 'axios';
1718
import * as extend from 'extend';
18-
import { RequestResponse } from 'request';
1919
import { BaseService } from '../lib/base_service';
2020
import { getDefaultHeaders } from '../lib/common';
2121
import { getMissingParams } from '../lib/helper';
@@ -273,7 +273,7 @@ namespace AssistantV2 {
273273
}
274274

275275
/** The callback for a service request. */
276-
export type Callback<T> = (error: any, body?: T, response?: RequestResponse) => void;
276+
export type Callback<T> = (error: any, body?: T, response?: AxiosResponse<T>) => void;
277277

278278
/** The body of a service request that returns no response data. */
279279
export interface Empty { }

compare-comply/v1.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { AxiosResponse } from 'axios';
1718
import * as extend from 'extend';
18-
import { RequestResponse } from 'request';
1919
import { BaseService } from '../lib/base_service';
2020
import { getDefaultHeaders } from '../lib/common';
2121
import { getMissingParams } from '../lib/helper';
@@ -915,7 +915,7 @@ namespace CompareComplyV1 {
915915
}
916916

917917
/** The callback for a service request. */
918-
export type Callback<T> = (error: any, body?: T, response?: RequestResponse) => void;
918+
export type Callback<T> = (error: any, body?: T, response?: AxiosResponse<T>) => void;
919919

920920
/** The body of a service request that returns no response data. */
921921
export interface Empty { }

discovery/v1-generated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { AxiosResponse } from 'axios';
1718
import * as extend from 'extend';
18-
import { RequestResponse } from 'request';
1919
import { BaseService } from '../lib/base_service';
2020
import { getDefaultHeaders } from '../lib/common';
2121
import { getMissingParams } from '../lib/helper';
@@ -4199,7 +4199,7 @@ namespace DiscoveryV1 {
41994199
}
42004200

42014201
/** The callback for a service request. */
4202-
export type Callback<T> = (error: any, body?: T, response?: RequestResponse) => void;
4202+
export type Callback<T> = (error: any, body?: T, response?: AxiosResponse<T>) => void;
42034203

42044204
/** The body of a service request that returns no response data. */
42054205
export interface Empty { }

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export import NaturalLanguageClassifierV1 = require('./natural-language-classifi
3434

3535
export import NaturalLanguageUnderstandingV1 = require('./natural-language-understanding/v1-generated');
3636

37-
export import PersonalityInsightsV3 = require('./personality-insights/v3');
37+
export import PersonalityInsightsV3 = require('./personality-insights/v3-generated');
3838

3939
export import SpeechToTextV1 = require('./speech-to-text/v1');
4040

language-translator/v3.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { AxiosResponse } from 'axios';
1718
import * as extend from 'extend';
18-
import { RequestResponse } from 'request';
1919
import { BaseService } from '../lib/base_service';
2020
import { getDefaultHeaders } from '../lib/common';
2121
import { getMissingParams } from '../lib/helper';
@@ -494,7 +494,7 @@ namespace LanguageTranslatorV3 {
494494
}
495495

496496
/** The callback for a service request. */
497-
export type Callback<T> = (error: any, body?: T, response?: RequestResponse) => void;
497+
export type Callback<T> = (error: any, body?: T, response?: AxiosResponse<T>) => void;
498498

499499
/** The body of a service request that returns no response data. */
500500
export interface Empty { }

lib/base_service.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
// `buffer-from` uses the new api when possible but falls back to the old one otherwise
1919
import bufferFrom = require('buffer-from');
2020
import extend = require('extend');
21-
import request = require('request');
2221
import semver = require('semver');
2322
import vcapServices = require('vcap_services');
2423
import { IamTokenManagerV1 } from '../iam-token-manager/v1';
@@ -50,7 +49,6 @@ export interface UserOptions {
5049
export interface BaseServiceOptions extends UserOptions {
5150
headers: HeaderOptions;
5251
url: string;
53-
jar?: request.CookieJar;
5452
qs: any;
5553
rejectUnauthorized?: boolean;
5654
}
@@ -289,7 +287,6 @@ export class BaseService {
289287
_options = extend(_options, options);
290288
return _options;
291289
}
292-
_options.jar = request.jar();
293290
// Get credentials from environment properties or Bluemix,
294291
// but prefer credentials provided programatically
295292
_options = extend(

natural-language-classifier/v1-generated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { AxiosResponse } from 'axios';
1718
import * as extend from 'extend';
18-
import { RequestResponse } from 'request';
1919
import { BaseService } from '../lib/base_service';
2020
import { getDefaultHeaders } from '../lib/common';
2121
import { getMissingParams } from '../lib/helper';
@@ -418,7 +418,7 @@ namespace NaturalLanguageClassifierV1 {
418418
}
419419

420420
/** The callback for a service request. */
421-
export type Callback<T> = (error: any, body?: T, response?: RequestResponse) => void;
421+
export type Callback<T> = (error: any, body?: T, response?: AxiosResponse<T>) => void;
422422

423423
/** The body of a service request that returns no response data. */
424424
export interface Empty { }

natural-language-understanding/v1-generated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
import { AxiosResponse } from 'axios';
1718
import * as extend from 'extend';
18-
import { RequestResponse } from 'request';
1919
import { BaseService } from '../lib/base_service';
2020
import { getDefaultHeaders } from '../lib/common';
2121
import { getMissingParams } from '../lib/helper';
@@ -276,7 +276,7 @@ namespace NaturalLanguageUnderstandingV1 {
276276
}
277277

278278
/** The callback for a service request. */
279-
export type Callback<T> = (error: any, body?: T, response?: RequestResponse) => void;
279+
export type Callback<T> = (error: any, body?: T, response?: AxiosResponse<T>) => void;
280280

281281
/** The body of a service request that returns no response data. */
282282
export interface Empty { }

package-lock.json

Lines changed: 0 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)