import request = require("request"); import http = require("http"); import errors = require("./errors"); import Promise = require("bluebird"); declare namespace requestPromise { interface RequestPromise extends request.Request { then: Promise["then"]; catch: Promise["catch"]; finally: Promise["finally"]; cancel: Promise["cancel"]; promise(): Promise; } interface RequestPromiseOptions extends request.CoreOptions { simple?: boolean | undefined; transform?(body: any, response: request.Response, resolveWithFullResponse?: boolean): any; transform2xxOnly?: boolean | undefined; resolveWithFullResponse?: boolean | undefined; } type RequestPromiseAPI = request.RequestAPI< RequestPromise, RequestPromiseOptions, request.RequiredUriUrl >; type OptionsWithUri = request.UriOptions & RequestPromiseOptions; type OptionsWithUrl = request.UrlOptions & RequestPromiseOptions; type Options = OptionsWithUri | OptionsWithUrl; } declare const requestPromise: requestPromise.RequestPromiseAPI; export = requestPromise;