1414 * limitations under the License.
1515 */
1616
17+
1718import extend = require( 'extend' ) ;
1819import { OutgoingHttpHeaders } from 'http' ;
1920import semver = require( 'semver' ) ;
@@ -23,12 +24,18 @@ import { stripTrailingSlash } from './helper';
2324import { RequestWrapper } from './requestwrapper' ;
2425
2526export interface UserOptions {
26- url ?: string ; // deprecated
27+ /** The Authenticator object used to authenticate requests to the service */
28+ authenticator ?: AuthenticatorInterface ;
29+ /** The base url to use when contacting the service. The base url may differ between IBM Cloud regions. */
2730 serviceUrl ?: string ;
28- version ?: string ;
31+ /** Default headers that shall be included with every request to the service. */
2932 headers ?: OutgoingHttpHeaders ;
33+ /** The API version date to use with the service, in "YYYY-MM-DD" format. */
34+ version ?: string ;
35+ /** Set to `true` to allow unauthorized requests - not recommended for production use. */
3036 disableSslVerification ?: boolean ;
31- authenticator ?: AuthenticatorInterface ;
37+ /** Deprecated. Use `serviceUrl` instead. */
38+ url ?: string ;
3239 /** Allow additional request config parameters */
3340 [ propName : string ] : any ;
3441}
@@ -48,8 +55,7 @@ export class BaseService {
4855 /**
4956 * Internal base class that other services inherit from
5057 * @param {UserOptions } options
51- * @param {HeaderOptions } [options.headers]
52- * @param {boolean } [options.headers.X-Watson-Learning-Opt-Out=false] - opt-out of data collection
58+ * @param {OutgoingHttpHeaders } [options.headers]
5359 * @param {string } [options.url] - override default service base url
5460 * @private
5561 * @abstract
@@ -142,7 +148,7 @@ export class BaseService {
142148 * - array: each element of the array is sent as a separate form part using any special processing as described above
143149 * @param {Object } parameters.defaultOptions
144150 * @param {string } parameters.defaultOptions.serviceUrl - the base URL of the service
145- * @param {HeaderOptions } parameters.defaultOptions.headers - additional headers to be passed on the request.
151+ * @param {OutgoingHttpHeaders } parameters.defaultOptions.headers - additional headers to be passed on the request.
146152 * @param {Function } callback - callback function to pass the response back to
147153 * @returns {ReadableStream|undefined }
148154 */
0 commit comments