ibm-cloud-sdk-core 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/.secrets.baseline +20 -30
  2. package/CHANGELOG.md +16 -4
  3. package/MIGRATION-V4.md +54 -0
  4. package/auth/authenticators/authenticator-interface.d.ts +3 -4
  5. package/auth/authenticators/authenticator-interface.js +1 -1
  6. package/auth/authenticators/authenticator.d.ts +5 -9
  7. package/auth/authenticators/authenticator.js +4 -8
  8. package/auth/authenticators/basic-authenticator.d.ts +12 -12
  9. package/auth/authenticators/basic-authenticator.js +12 -12
  10. package/auth/authenticators/bearer-token-authenticator.d.ts +11 -14
  11. package/auth/authenticators/bearer-token-authenticator.js +11 -14
  12. package/auth/authenticators/cloud-pak-for-data-authenticator.d.ts +15 -15
  13. package/auth/authenticators/cloud-pak-for-data-authenticator.js +15 -15
  14. package/auth/authenticators/container-authenticator.d.ts +23 -23
  15. package/auth/authenticators/container-authenticator.js +23 -23
  16. package/auth/authenticators/iam-authenticator.d.ts +20 -20
  17. package/auth/authenticators/iam-authenticator.js +20 -20
  18. package/auth/authenticators/iam-request-based-authenticator.d.ts +23 -25
  19. package/auth/authenticators/iam-request-based-authenticator.js +23 -25
  20. package/auth/authenticators/token-request-based-authenticator.d.ts +19 -24
  21. package/auth/authenticators/token-request-based-authenticator.js +19 -24
  22. package/auth/authenticators/vpc-instance-authenticator.d.ts +17 -16
  23. package/auth/authenticators/vpc-instance-authenticator.js +17 -16
  24. package/auth/token-managers/container-token-manager.d.ts +23 -25
  25. package/auth/token-managers/container-token-manager.js +23 -25
  26. package/auth/token-managers/cp4d-token-manager.d.ts +13 -13
  27. package/auth/token-managers/cp4d-token-manager.js +13 -13
  28. package/auth/token-managers/iam-request-based-token-manager.d.ts +26 -31
  29. package/auth/token-managers/iam-request-based-token-manager.js +26 -31
  30. package/auth/token-managers/iam-token-manager.d.ts +17 -16
  31. package/auth/token-managers/iam-token-manager.js +17 -16
  32. package/auth/token-managers/jwt-token-manager.d.ts +10 -13
  33. package/auth/token-managers/jwt-token-manager.js +13 -16
  34. package/auth/token-managers/token-manager.d.ts +23 -35
  35. package/auth/token-managers/token-manager.js +22 -34
  36. package/auth/token-managers/vpc-instance-token-manager.d.ts +15 -15
  37. package/auth/token-managers/vpc-instance-token-manager.js +15 -15
  38. package/auth/utils/get-authenticator-from-environment.d.ts +2 -2
  39. package/auth/utils/get-authenticator-from-environment.js +2 -2
  40. package/auth/utils/helpers.d.ts +34 -32
  41. package/auth/utils/helpers.js +34 -32
  42. package/auth/utils/read-external-sources.d.ts +2 -1
  43. package/auth/utils/read-external-sources.js +5 -4
  44. package/build/docs/ibm-cloud-sdk-core.atleastone.md +4 -4
  45. package/build/docs/ibm-cloud-sdk-core.atmostone.md +2 -2
  46. package/build/docs/ibm-cloud-sdk-core.authenticator._constructor_.md +1 -1
  47. package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +1 -1
  48. package/build/docs/ibm-cloud-sdk-core.authenticator.authenticationtype.md +1 -1
  49. package/build/docs/ibm-cloud-sdk-core.authenticator.md +1 -1
  50. package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +1 -1
  51. package/build/docs/ibm-cloud-sdk-core.baseservice._constructor_.md +1 -1
  52. package/build/docs/ibm-cloud-sdk-core.baseservice.configureservice.md +1 -1
  53. package/build/docs/ibm-cloud-sdk-core.baseservice.createrequest.md +2 -2
  54. package/build/docs/ibm-cloud-sdk-core.baseservice.enableretries.md +1 -1
  55. package/build/docs/ibm-cloud-sdk-core.baseservice.getauthenticator.md +1 -1
  56. package/build/docs/ibm-cloud-sdk-core.baseservice.md +3 -3
  57. package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +1 -1
  58. package/build/docs/ibm-cloud-sdk-core.baseservice.setserviceurl.md +1 -1
  59. package/build/docs/ibm-cloud-sdk-core.basicauthenticator._constructor_.md +2 -2
  60. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +1 -1
  61. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.md +3 -3
  62. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator._constructor_.md +2 -2
  63. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md +2 -2
  64. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.md +3 -3
  65. package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +2 -2
  66. package/build/docs/ibm-cloud-sdk-core.checkcredentials.md +3 -3
  67. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md +3 -3
  68. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.md +5 -5
  69. package/build/docs/ibm-cloud-sdk-core.computebasicauthheader.md +1 -1
  70. package/build/docs/ibm-cloud-sdk-core.constructserviceurl.md +4 -4
  71. package/build/docs/ibm-cloud-sdk-core.containerauthenticator._constructor_.md +3 -3
  72. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.md +4 -4
  73. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md +1 -1
  74. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md +1 -1
  75. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md +1 -1
  76. package/build/docs/ibm-cloud-sdk-core.containertokenmanager._constructor_.md +6 -2
  77. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.md +5 -5
  78. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.requesttoken.md +0 -2
  79. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md +2 -2
  80. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md +2 -2
  81. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md +2 -2
  82. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md +6 -2
  83. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.md +3 -3
  84. package/build/docs/ibm-cloud-sdk-core.fileobject.md +5 -5
  85. package/build/docs/ibm-cloud-sdk-core.fileoptions.md +4 -4
  86. package/build/docs/ibm-cloud-sdk-core.filestream.md +3 -3
  87. package/build/docs/ibm-cloud-sdk-core.filewithmetadata.md +5 -5
  88. package/build/docs/ibm-cloud-sdk-core.getauthenticatorfromenvironment.md +1 -1
  89. package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +1 -1
  90. package/build/docs/ibm-cloud-sdk-core.getcurrenttime.md +2 -2
  91. package/build/docs/ibm-cloud-sdk-core.getformat.md +0 -2
  92. package/build/docs/ibm-cloud-sdk-core.getmissingparams.md +1 -1
  93. package/build/docs/ibm-cloud-sdk-core.getnewlogger.md +1 -1
  94. package/build/docs/ibm-cloud-sdk-core.getqueryparam.md +1 -5
  95. package/build/docs/ibm-cloud-sdk-core.iamauthenticator._constructor_.md +3 -3
  96. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.md +5 -5
  97. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator._constructor_.md +3 -3
  98. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.getrefreshtoken.md +1 -1
  99. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.md +7 -7
  100. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setclientidandsecret.md +3 -3
  101. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setscope.md +1 -1
  102. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager._constructor_.md +6 -2
  103. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.getrefreshtoken.md +2 -2
  104. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md +8 -8
  105. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.requesttoken.md +2 -2
  106. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.savetokeninfo.md +1 -3
  107. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setclientidandsecret.md +3 -5
  108. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setscope.md +2 -4
  109. package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.md +5 -5
  110. package/build/docs/ibm-cloud-sdk-core.iamtokenmanager._constructor_.md +6 -2
  111. package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.md +3 -3
  112. package/build/docs/ibm-cloud-sdk-core.ishtml.md +1 -1
  113. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager._constructor_.md +2 -2
  114. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.md +5 -5
  115. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.requesttoken.md +1 -1
  116. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md +1 -3
  117. package/build/docs/ibm-cloud-sdk-core.md +24 -24
  118. package/build/docs/ibm-cloud-sdk-core.onlyone.md +2 -2
  119. package/build/docs/ibm-cloud-sdk-core.qs.md +1 -1
  120. package/build/docs/ibm-cloud-sdk-core.readexternalsources.md +1 -1
  121. package/build/docs/ibm-cloud-sdk-core.removesuffix.md +4 -4
  122. package/build/docs/ibm-cloud-sdk-core.sdklogger.md +7 -7
  123. package/build/docs/ibm-cloud-sdk-core.streamtopromise.md +3 -1
  124. package/build/docs/ibm-cloud-sdk-core.striptrailingslash.md +4 -2
  125. package/build/docs/ibm-cloud-sdk-core.tokenmanager._constructor_.md +2 -2
  126. package/build/docs/ibm-cloud-sdk-core.tokenmanager.gettoken.md +1 -1
  127. package/build/docs/ibm-cloud-sdk-core.tokenmanager.md +15 -15
  128. package/build/docs/ibm-cloud-sdk-core.tokenmanager.pacedrequesttoken.md +1 -1
  129. package/build/docs/ibm-cloud-sdk-core.tokenmanager.requesttoken.md +1 -1
  130. package/build/docs/ibm-cloud-sdk-core.tokenmanager.savetokeninfo.md +1 -3
  131. package/build/docs/ibm-cloud-sdk-core.tokenmanager.setdisablesslverification.md +1 -3
  132. package/build/docs/ibm-cloud-sdk-core.tokenmanager.setheaders.md +2 -4
  133. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator._constructor_.md +2 -2
  134. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.authenticate.md +2 -2
  135. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md +9 -9
  136. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md +1 -1
  137. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md +1 -1
  138. package/build/docs/ibm-cloud-sdk-core.tolowerkeys.md +1 -1
  139. package/build/docs/ibm-cloud-sdk-core.unittestutils.checkforsuccessfulexecution.md +0 -2
  140. package/build/docs/ibm-cloud-sdk-core.unittestutils.checkmediaheaders.md +0 -2
  141. package/build/docs/ibm-cloud-sdk-core.unittestutils.checkurlandmethod.md +1 -3
  142. package/build/docs/ibm-cloud-sdk-core.unittestutils.checkuserheader.md +0 -2
  143. package/build/docs/ibm-cloud-sdk-core.unittestutils.expecttobepromise.md +0 -2
  144. package/build/docs/ibm-cloud-sdk-core.unittestutils.getoptions.md +1 -1
  145. package/build/docs/ibm-cloud-sdk-core.useroptions.md +9 -9
  146. package/build/docs/ibm-cloud-sdk-core.validateinput.md +8 -2
  147. package/build/docs/ibm-cloud-sdk-core.validateparams.md +1 -1
  148. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md +6 -2
  149. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.md +6 -6
  150. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md +2 -2
  151. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md +2 -2
  152. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager._constructor_.md +6 -2
  153. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.md +4 -4
  154. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofilecrn.md +2 -2
  155. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofileid.md +2 -2
  156. package/docs/ibm-cloud-sdk-core.api.json +516 -241
  157. package/es/auth/authenticators/authenticator-interface.d.ts +3 -4
  158. package/es/auth/authenticators/authenticator-interface.js +1 -1
  159. package/es/auth/authenticators/authenticator.d.ts +5 -9
  160. package/es/auth/authenticators/authenticator.js +4 -8
  161. package/es/auth/authenticators/basic-authenticator.d.ts +12 -12
  162. package/es/auth/authenticators/basic-authenticator.js +12 -12
  163. package/es/auth/authenticators/bearer-token-authenticator.d.ts +11 -14
  164. package/es/auth/authenticators/bearer-token-authenticator.js +11 -14
  165. package/es/auth/authenticators/cloud-pak-for-data-authenticator.d.ts +15 -15
  166. package/es/auth/authenticators/cloud-pak-for-data-authenticator.js +15 -15
  167. package/es/auth/authenticators/container-authenticator.d.ts +23 -23
  168. package/es/auth/authenticators/container-authenticator.js +23 -23
  169. package/es/auth/authenticators/iam-authenticator.d.ts +20 -20
  170. package/es/auth/authenticators/iam-authenticator.js +20 -20
  171. package/es/auth/authenticators/iam-request-based-authenticator.d.ts +23 -25
  172. package/es/auth/authenticators/iam-request-based-authenticator.js +23 -25
  173. package/es/auth/authenticators/token-request-based-authenticator.d.ts +19 -24
  174. package/es/auth/authenticators/token-request-based-authenticator.js +19 -24
  175. package/es/auth/authenticators/vpc-instance-authenticator.d.ts +17 -16
  176. package/es/auth/authenticators/vpc-instance-authenticator.js +17 -16
  177. package/es/auth/token-managers/container-token-manager.d.ts +23 -25
  178. package/es/auth/token-managers/container-token-manager.js +23 -25
  179. package/es/auth/token-managers/cp4d-token-manager.d.ts +13 -13
  180. package/es/auth/token-managers/cp4d-token-manager.js +13 -13
  181. package/es/auth/token-managers/iam-request-based-token-manager.d.ts +26 -31
  182. package/es/auth/token-managers/iam-request-based-token-manager.js +26 -31
  183. package/es/auth/token-managers/iam-token-manager.d.ts +17 -16
  184. package/es/auth/token-managers/iam-token-manager.js +17 -16
  185. package/es/auth/token-managers/jwt-token-manager.d.ts +10 -13
  186. package/es/auth/token-managers/jwt-token-manager.js +13 -16
  187. package/es/auth/token-managers/token-manager.d.ts +23 -35
  188. package/es/auth/token-managers/token-manager.js +22 -34
  189. package/es/auth/token-managers/vpc-instance-token-manager.d.ts +15 -15
  190. package/es/auth/token-managers/vpc-instance-token-manager.js +15 -15
  191. package/es/auth/utils/get-authenticator-from-environment.d.ts +2 -2
  192. package/es/auth/utils/get-authenticator-from-environment.js +2 -2
  193. package/es/auth/utils/helpers.d.ts +34 -32
  194. package/es/auth/utils/helpers.js +34 -32
  195. package/es/auth/utils/read-external-sources.d.ts +2 -1
  196. package/es/auth/utils/read-external-sources.js +5 -4
  197. package/es/lib/base-service.d.ts +31 -32
  198. package/es/lib/base-service.js +31 -32
  199. package/es/lib/content-type.js +5 -5
  200. package/es/lib/get-new-logger.d.ts +2 -2
  201. package/es/lib/get-new-logger.js +2 -2
  202. package/es/lib/helper.d.ts +24 -31
  203. package/es/lib/helper.js +25 -32
  204. package/es/lib/querystring.d.ts +1 -1
  205. package/es/lib/querystring.js +3 -3
  206. package/es/lib/request-wrapper.d.ts +4 -6
  207. package/es/lib/request-wrapper.js +17 -23
  208. package/es/lib/sdk-test-helpers.d.ts +14 -19
  209. package/es/lib/sdk-test-helpers.js +14 -19
  210. package/es/lib/stream-to-promise.d.ts +3 -3
  211. package/es/lib/stream-to-promise.js +3 -3
  212. package/es/tsdoc-metadata.json +1 -1
  213. package/etc/ibm-cloud-sdk-core.api.md +12 -12
  214. package/ibm-cloud-sdk-core.d.ts +1402 -1449
  215. package/lib/base-service.d.ts +31 -32
  216. package/lib/base-service.js +31 -32
  217. package/lib/content-type.js +5 -5
  218. package/lib/get-new-logger.d.ts +2 -2
  219. package/lib/get-new-logger.js +2 -2
  220. package/lib/helper.d.ts +24 -31
  221. package/lib/helper.js +25 -32
  222. package/lib/querystring.d.ts +1 -1
  223. package/lib/querystring.js +3 -3
  224. package/lib/request-wrapper.d.ts +4 -6
  225. package/lib/request-wrapper.js +17 -23
  226. package/lib/sdk-test-helpers.d.ts +14 -19
  227. package/lib/sdk-test-helpers.js +14 -19
  228. package/lib/stream-to-promise.d.ts +3 -3
  229. package/lib/stream-to-promise.js +3 -3
  230. package/package.json +2 -2
  231. package/temp/ibm-cloud-sdk-core.api.json +516 -241
  232. package/temp/ibm-cloud-sdk-core.api.md +12 -12
  233. package/MIGRATION-V1.md +0 -42
@@ -1,5 +1,5 @@
1
1
  /**
2
- * (C) Copyright IBM Corp. 2014, 2021.
2
+ * (C) Copyright IBM Corp. 2014, 2022.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -63,40 +63,39 @@ export declare class BaseService {
63
63
  private requestWrapperInstance;
64
64
  /**
65
65
  * Configuration values for a service.
66
- * @param {Authenticator} userOptions.authenticator Object used to authenticate requests to the service.
67
- * @param {string} [userOptions.serviceUrl] The base url to use when contacting the service.
66
+ *
67
+ * @param userOptions - the configuration options to set on the service instance.
68
+ * This should be an object with the following fields:
69
+ * - authenticator: (required) an Object used to authenticate requests to the service.
70
+ * - serviceUrl: (optional) the base url to use when contacting the service.
68
71
  * The base url may differ between IBM Cloud regions.
69
- * @param {object<string, string>} [userOptions.headers] Default headers that shall be
70
- * included with every request to the service.
71
- * @param {string} [userOptions.version] The API version date to use with the service,
72
- * in "YYYY-MM-DD" format.
73
- * @param {boolean} [userOptions.disableSslVerification] A flag that indicates
74
- * whether verification of the token server's SSL certificate should be
72
+ * - headers: (optional) a set of HTTP headers that should be included with every request sent to the service
73
+ * - disableSslVerification: (optional) a flag that indicates whether verification of the server's SSL certificate should be
75
74
  * disabled or not.
76
75
  */
77
76
  constructor(userOptions: UserOptions);
78
77
  /**
79
78
  * Get the instance of the authenticator set on the service.
80
79
  *
81
- * @returns {Authenticator}
80
+ * @returns the Authenticator instance
82
81
  */
83
82
  getAuthenticator(): any;
84
83
  /**
85
84
  * Set the service URL to send requests to.
86
85
  *
87
- * @param {string} url The base URL for the service.
86
+ * @param url - the base URL for the service.
88
87
  */
89
88
  setServiceUrl(url: string): void;
90
89
  /**
91
90
  * Set the HTTP headers to be sent in every request.
92
91
  *
93
- * @param {OutgoingHttpHeaders} headers The map of headers to include in requests.
92
+ * @param headers - the map of headers to include in requests.
94
93
  */
95
94
  setDefaultHeaders(headers: OutgoingHttpHeaders): void;
96
95
  /**
97
96
  * Turn request body compression on or off.
98
97
  *
99
- * @param {boolean} setting Will turn it on if 'true', off if 'false'.
98
+ * @param setting - Will turn it on if 'true', off if 'false'.
100
99
  */
101
100
  setEnableGzipCompression(setting: boolean): void;
102
101
  /**
@@ -107,7 +106,7 @@ export declare class BaseService {
107
106
  /**
108
107
  * Enable retries for unfulfilled requests.
109
108
  *
110
- * @param {RetryOptions} retryOptions configuration for retries
109
+ * @param retryOptions - the configuration for retries
111
110
  */
112
111
  enableRetries(retryOptions?: RetryOptions): void;
113
112
  /**
@@ -117,30 +116,30 @@ export declare class BaseService {
117
116
  /**
118
117
  * Configure the service using external configuration
119
118
  *
120
- * @param {string} serviceName The name of the service. Will be used to read from external
119
+ * @param serviceName - the name of the service. This will be used to read from external
121
120
  * configuration.
122
121
  */
123
122
  protected configureService(serviceName: string): void;
124
123
  /**
125
124
  * Wrapper around `sendRequest` that enforces the request will be authenticated.
126
125
  *
127
- * @param {object} parameters Service request options passed in by user.
128
- * @param {string} parameters.options.method The http method.
129
- * @param {string} parameters.options.url The path portion of the URL to be appended to the serviceUrl.
130
- * @param {object} [parameters.options.path] The path parameters to be inserted into the URL.
131
- * @param {object} [parameters.options.qs] The querystring to be included in the URL.
132
- * @param {object} [parameters.options.body] The data to be sent as the request body.
133
- * @param {object} [parameters.options.form] An object containing the key/value pairs for a www-form-urlencoded request.
134
- * @param {object} [parameters.options.formData] An object containing the contents for a multipart/form-data request
135
- * The following processing is performed on formData values:
136
- * - string: no special processing -- the value is sent as is
137
- * - object: the value is converted to a JSON string before insertion into the form body
138
- * - NodeJS.ReadableStream|Buffer|FileWithMetadata: sent as a file, with any associated metadata
139
- * - array: each element of the array is sent as a separate form part using any special processing as described above
140
- * @param {object} parameters.defaultOptions
141
- * @param {string} parameters.defaultOptions.serviceUrl The base URL of the service.
142
- * @param {OutgoingHttpHeaders} parameters.defaultOptions.headers Additional headers to be passed on the request.
143
- * @returns {Promise<any>}
126
+ * @param parameters - Service request options passed in by user.
127
+ * This should be an object with the following fields:
128
+ * - options.method: the http method
129
+ * - options.url: the path portion of the URL to be appended to the serviceUrl
130
+ * - options.path: the path parameters to be inserted into the URL
131
+ * - options.qs: the querystring to be included in the URL
132
+ * - options.body: the data to be sent as the request body
133
+ * - options.form: an object containing the key/value pairs for a www-form-urlencoded request.
134
+ * - options.formData: an object containing the contents for a multipart/form-data request
135
+ * The following processing is performed on formData values:
136
+ * - string: no special processing -- the value is sent as is
137
+ * - object: the value is converted to a JSON string before insertion into the form body
138
+ * - NodeJS.ReadableStream|Buffer|FileWithMetadata: sent as a file, with any associated metadata
139
+ * - array: each element of the array is sent as a separate form part using any special processing as described above
140
+ * - defaultOptions.serviceUrl: the base URL of the service
141
+ * - defaultOptions.headers: additional HTTP headers to be sent with the request
142
+ * @returns a Promise
144
143
  */
145
144
  protected createRequest(parameters: any): Promise<any>;
146
145
  private readOptionsFromExternalConfig;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * (C) Copyright IBM Corp. 2014, 2021.
3
+ * (C) Copyright IBM Corp. 2014, 2022.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -43,15 +43,14 @@ var request_wrapper_1 = require("./request-wrapper");
43
43
  var BaseService = /** @class */ (function () {
44
44
  /**
45
45
  * Configuration values for a service.
46
- * @param {Authenticator} userOptions.authenticator Object used to authenticate requests to the service.
47
- * @param {string} [userOptions.serviceUrl] The base url to use when contacting the service.
46
+ *
47
+ * @param userOptions - the configuration options to set on the service instance.
48
+ * This should be an object with the following fields:
49
+ * - authenticator: (required) an Object used to authenticate requests to the service.
50
+ * - serviceUrl: (optional) the base url to use when contacting the service.
48
51
  * The base url may differ between IBM Cloud regions.
49
- * @param {object<string, string>} [userOptions.headers] Default headers that shall be
50
- * included with every request to the service.
51
- * @param {string} [userOptions.version] The API version date to use with the service,
52
- * in "YYYY-MM-DD" format.
53
- * @param {boolean} [userOptions.disableSslVerification] A flag that indicates
54
- * whether verification of the token server's SSL certificate should be
52
+ * - headers: (optional) a set of HTTP headers that should be included with every request sent to the service
53
+ * - disableSslVerification: (optional) a flag that indicates whether verification of the server's SSL certificate should be
55
54
  * disabled or not.
56
55
  */
57
56
  function BaseService(userOptions) {
@@ -92,7 +91,7 @@ var BaseService = /** @class */ (function () {
92
91
  /**
93
92
  * Get the instance of the authenticator set on the service.
94
93
  *
95
- * @returns {Authenticator}
94
+ * @returns the Authenticator instance
96
95
  */
97
96
  BaseService.prototype.getAuthenticator = function () {
98
97
  return this.authenticator;
@@ -100,7 +99,7 @@ var BaseService = /** @class */ (function () {
100
99
  /**
101
100
  * Set the service URL to send requests to.
102
101
  *
103
- * @param {string} url The base URL for the service.
102
+ * @param url - the base URL for the service.
104
103
  */
105
104
  BaseService.prototype.setServiceUrl = function (url) {
106
105
  if (url) {
@@ -110,7 +109,7 @@ var BaseService = /** @class */ (function () {
110
109
  /**
111
110
  * Set the HTTP headers to be sent in every request.
112
111
  *
113
- * @param {OutgoingHttpHeaders} headers The map of headers to include in requests.
112
+ * @param headers - the map of headers to include in requests.
114
113
  */
115
114
  BaseService.prototype.setDefaultHeaders = function (headers) {
116
115
  if (typeof headers !== 'object') {
@@ -122,7 +121,7 @@ var BaseService = /** @class */ (function () {
122
121
  /**
123
122
  * Turn request body compression on or off.
124
123
  *
125
- * @param {boolean} setting Will turn it on if 'true', off if 'false'.
124
+ * @param setting - Will turn it on if 'true', off if 'false'.
126
125
  */
127
126
  BaseService.prototype.setEnableGzipCompression = function (setting) {
128
127
  this.requestWrapperInstance.setCompressRequestData(setting);
@@ -139,7 +138,7 @@ var BaseService = /** @class */ (function () {
139
138
  /**
140
139
  * Enable retries for unfulfilled requests.
141
140
  *
142
- * @param {RetryOptions} retryOptions configuration for retries
141
+ * @param retryOptions - the configuration for retries
143
142
  */
144
143
  BaseService.prototype.enableRetries = function (retryOptions) {
145
144
  this.requestWrapperInstance.enableRetries(retryOptions);
@@ -153,7 +152,7 @@ var BaseService = /** @class */ (function () {
153
152
  /**
154
153
  * Configure the service using external configuration
155
154
  *
156
- * @param {string} serviceName The name of the service. Will be used to read from external
155
+ * @param serviceName - the name of the service. This will be used to read from external
157
156
  * configuration.
158
157
  */
159
158
  BaseService.prototype.configureService = function (serviceName) {
@@ -169,23 +168,23 @@ var BaseService = /** @class */ (function () {
169
168
  /**
170
169
  * Wrapper around `sendRequest` that enforces the request will be authenticated.
171
170
  *
172
- * @param {object} parameters Service request options passed in by user.
173
- * @param {string} parameters.options.method The http method.
174
- * @param {string} parameters.options.url The path portion of the URL to be appended to the serviceUrl.
175
- * @param {object} [parameters.options.path] The path parameters to be inserted into the URL.
176
- * @param {object} [parameters.options.qs] The querystring to be included in the URL.
177
- * @param {object} [parameters.options.body] The data to be sent as the request body.
178
- * @param {object} [parameters.options.form] An object containing the key/value pairs for a www-form-urlencoded request.
179
- * @param {object} [parameters.options.formData] An object containing the contents for a multipart/form-data request
180
- * The following processing is performed on formData values:
181
- * - string: no special processing -- the value is sent as is
182
- * - object: the value is converted to a JSON string before insertion into the form body
183
- * - NodeJS.ReadableStream|Buffer|FileWithMetadata: sent as a file, with any associated metadata
184
- * - array: each element of the array is sent as a separate form part using any special processing as described above
185
- * @param {object} parameters.defaultOptions
186
- * @param {string} parameters.defaultOptions.serviceUrl The base URL of the service.
187
- * @param {OutgoingHttpHeaders} parameters.defaultOptions.headers Additional headers to be passed on the request.
188
- * @returns {Promise<any>}
171
+ * @param parameters - Service request options passed in by user.
172
+ * This should be an object with the following fields:
173
+ * - options.method: the http method
174
+ * - options.url: the path portion of the URL to be appended to the serviceUrl
175
+ * - options.path: the path parameters to be inserted into the URL
176
+ * - options.qs: the querystring to be included in the URL
177
+ * - options.body: the data to be sent as the request body
178
+ * - options.form: an object containing the key/value pairs for a www-form-urlencoded request.
179
+ * - options.formData: an object containing the contents for a multipart/form-data request
180
+ * The following processing is performed on formData values:
181
+ * - string: no special processing -- the value is sent as is
182
+ * - object: the value is converted to a JSON string before insertion into the form body
183
+ * - NodeJS.ReadableStream|Buffer|FileWithMetadata: sent as a file, with any associated metadata
184
+ * - array: each element of the array is sent as a separate form part using any special processing as described above
185
+ * - defaultOptions.serviceUrl: the base URL of the service
186
+ * - defaultOptions.headers: additional HTTP headers to be sent with the request
187
+ * @returns a Promise
189
188
  */
190
189
  BaseService.prototype.createRequest = function (parameters) {
191
190
  var _this = this;
@@ -2,7 +2,7 @@
2
2
  /* eslint-disable prettier/prettier */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  /**
5
- * (C) Copyright IBM Corp. 2019, 2021.
5
+ * (C) Copyright IBM Corp. 2019, 2022.
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
8
8
  * you may not use this file except in compliance with the License.
@@ -41,8 +41,8 @@ var filenameContentTypes = {
41
41
  /**
42
42
  * Takes the beginning of an audio file and returns the associated content-type / mime type
43
43
  *
44
- * @param {Buffer} buffer With at least the first 4 bytes of the file
45
- * @return {String|undefined} The contentType or undefined
44
+ * @param buffer - a Buffer containing at least the first 4 bytes of the file
45
+ * @return sthe contentType or undefined
46
46
  */
47
47
  var fromHeader = function (buffer) {
48
48
  var headerStr = buffer
@@ -58,8 +58,8 @@ var fromHeader = function (buffer) {
58
58
  * Note: Blob and File objects include a .type property, but we're ignoring it because it's frequently either
59
59
  * incorrect (e.g. video/ogg instead of audio/ogg) or else a different format than what's expected (e.g. audio/x-wav)
60
60
  *
61
- * @param {String|ReadableStream|FileObject|Buffer|File} file String filename or url, or binary File/Blob object.
62
- * @return {String|undefined}
61
+ * @param file - a String filename or url, or binary File/Blob object.
62
+ * @returns the content type
63
63
  */
64
64
  var fromFilename = function (file) {
65
65
  var ext = (0, path_1.extname)(
@@ -31,9 +31,9 @@ export interface SDKLogger {
31
31
  * Additionally, the logger will be turned on automatically if the "NODE_DEBUG"
32
32
  * environment variable is set to "axios".
33
33
  *
34
- * @param {string} moduleName - the namespace for the logger. The name will appear in
34
+ * @param moduleName - the namespace for the logger. The name will appear in
35
35
  * the logs and it will be the name used for configuring the log level.
36
36
  *
37
- * @returns {SDKLogger} the new logger
37
+ * @returns the new logger
38
38
  */
39
39
  export declare function getNewLogger(moduleName: string): SDKLogger;
@@ -30,10 +30,10 @@ var debug_1 = __importDefault(require("debug"));
30
30
  * Additionally, the logger will be turned on automatically if the "NODE_DEBUG"
31
31
  * environment variable is set to "axios".
32
32
  *
33
- * @param {string} moduleName - the namespace for the logger. The name will appear in
33
+ * @param moduleName - the namespace for the logger. The name will appear in
34
34
  * the logs and it will be the name used for configuring the log level.
35
35
  *
36
- * @returns {SDKLogger} the new logger
36
+ * @returns the new logger
37
37
  */
38
38
  function getNewLogger(moduleName) {
39
39
  var debug = (0, debug_1.default)("".concat(moduleName, ":debug"));
package/lib/helper.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * (C) Copyright IBM Corp. 2014, 2021.
2
+ * (C) Copyright IBM Corp. 2014, 2022.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -35,31 +35,29 @@ export declare function isFileData(obj: any): obj is NodeJS.ReadableStream | Buf
35
35
  export declare function isEmptyObject(obj: any): boolean;
36
36
  /**
37
37
  * This function retrieves the content type of the input.
38
- * @param {NodeJS.ReadableStream|Buffer} inputData - The data to retrieve content type for.
39
- * @returns {string} the content type of the input.
38
+ * @param inputData - The data to retrieve content type for.
39
+ * @returns the content type of the input.
40
40
  */
41
41
  export declare function getContentType(inputData: NodeJS.ReadableStream | Buffer): Promise<string>;
42
42
  /**
43
- *
44
- * @param {string} url - the url string.
45
- * @returns {string}
43
+ * Strips trailing slashes from "url", if present.
44
+ * @param url - the url string
45
+ * @returns the url with any trailing slashes removed
46
46
  */
47
47
  export declare function stripTrailingSlash(url: string): string;
48
48
  /**
49
49
  * Return a query parameter value from a URL
50
50
  *
51
- * @param {string} urlStr - the url string.
52
- * @param {string} param - the name of the query parameter
53
- * whose value should be returned
54
- * @returns {string} the value of the `param` query parameter
55
- * @throws if urlStr is an invalid URL
51
+ * @param urlStr - the url string.
52
+ * @param param - the name of the query parameter whose value should be returned
53
+ * @returns the value of the "param" query parameter
56
54
  */
57
55
  export declare function getQueryParam(urlStr: string, param: string): string;
58
56
  /**
59
57
  * Validates that all required params are provided
60
58
  * @param params - the method parameters.
61
59
  * @param requires - the required parameter names.
62
- * @returns {Error|null}
60
+ * @returns null if no errors found, otherwise an Error instance
63
61
  */
64
62
  export declare function getMissingParams(params: {
65
63
  [key: string]: any;
@@ -75,52 +73,47 @@ export declare function getMissingParams(params: {
75
73
  * If null, then the "required params" check is bypassed.
76
74
  * @param allParams - the names of all valid parameters.
77
75
  * If null, then the "valid params" check is bypassed.
78
- * @returns {Error|null}
76
+ * @returns null if no errors found, otherwise an Error instance
79
77
  */
80
78
  export declare function validateParams(params: {
81
79
  [key: string]: any;
82
80
  }, requiredParams: string[], allParams: string[]): null | Error;
83
81
  /**
84
82
  * Return true if 'text' is html
85
- * @param {string} text - The 'text' to analyze
86
- * @returns {boolean} true if 'text' has html tags
83
+ * @param text - The 'text' to analyze
84
+ * @returns true if 'text' has html tags
87
85
  */
88
86
  export declare function isHTML(text: string): boolean;
89
87
  /**
90
88
  * Returns the first match from formats that is key the params map
91
89
  * otherwise null
92
- * @param {Object} params - The parameters.
93
- * @param {string[]} requires - The keys we want to check
94
- * @returns {string|null}
90
+ * @param params - The parameters.
91
+ * @param requires - The keys we want to check
95
92
  */
96
93
  export declare function getFormat(params: {
97
94
  [key: string]: any;
98
95
  }, formats: string[]): string;
99
96
  /**
100
97
  * This function builds a `form-data` object for each file parameter.
101
- * @param {FileWithMetadata} fileParam The file parameter.
102
- * @param {NodeJS.ReadableStream|Buffer} fileParam.data The data content of the file.
103
- * @param {string} fileParam.filename The filename of the file.
104
- * @param {string} fileParam.contentType The content type of the file.
105
- * @returns {FileObject}
98
+ * @param fileParam - The FileWithMetadata instance that contains the file information
99
+ * @returns the FileObject instance
106
100
  */
107
101
  export declare function buildRequestFileObject(fileParam: FileWithMetadata): Promise<FileObject>;
108
102
  /**
109
103
  * This function converts an object's keys to lower case.
110
104
  * note: does not convert nested keys
111
- * @param {Object} obj The object to convert the keys of.
112
- * @returns {Object}
105
+ * @param obj - The object to convert the keys of.
106
+ * @returns the object with keys folded to lowercase
113
107
  */
114
108
  export declare function toLowerKeys(obj: Object): Object;
115
109
  /**
116
110
  * Constructs a service URL by formatting a parameterized URL.
117
111
  *
118
- * @param {string} parameterizedUrl URL that contains variable placeholders, e.g. '{scheme}://ibm.com'.
119
- * @param {Map<string, string>} defaultUrlVariables Map from variable names to default values.
112
+ * @param parameterizedUrl - a URL that contains variable placeholders, e.g. '\{scheme\}://ibm.com'.
113
+ * @param defaultUrlVariables - a Map of variable names to default values.
120
114
  * Each variable in the parameterized URL must have a default value specified in this map.
121
- * @param {Map<string, string>} providedUrlVariables Map from variable names to desired values.
122
- * If a variable is not provided in this map,
123
- * the default variable value will be used instead.
124
- * @returns {string} The formatted URL with all variable placeholders replaced by values.
115
+ * @param providedUrlVariables - a Map of variable names to desired values.
116
+ * If a variable is not provided in this map, the default variable value will be used instead.
117
+ * @returns the formatted URL with all variable placeholders replaced by values.
125
118
  */
126
119
  export declare function constructServiceUrl(parameterizedUrl: string, defaultUrlVariables: Map<string, string>, providedUrlVariables: Map<string, string> | null): string;
package/lib/helper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * (C) Copyright IBM Corp. 2014, 2021.
3
+ * (C) Copyright IBM Corp. 2014, 2022.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -90,8 +90,8 @@ function isEmptyObject(obj) {
90
90
  exports.isEmptyObject = isEmptyObject;
91
91
  /**
92
92
  * This function retrieves the content type of the input.
93
- * @param {NodeJS.ReadableStream|Buffer} inputData - The data to retrieve content type for.
94
- * @returns {string} the content type of the input.
93
+ * @param inputData - The data to retrieve content type for.
94
+ * @returns the content type of the input.
95
95
  */
96
96
  function getContentType(inputData) {
97
97
  return __awaiter(this, void 0, void 0, function () {
@@ -118,9 +118,9 @@ function getContentType(inputData) {
118
118
  }
119
119
  exports.getContentType = getContentType;
120
120
  /**
121
- *
122
- * @param {string} url - the url string.
123
- * @returns {string}
121
+ * Strips trailing slashes from "url", if present.
122
+ * @param url - the url string
123
+ * @returns the url with any trailing slashes removed
124
124
  */
125
125
  function stripTrailingSlash(url) {
126
126
  // Match a forward slash / at the end of the string ($)
@@ -130,11 +130,9 @@ exports.stripTrailingSlash = stripTrailingSlash;
130
130
  /**
131
131
  * Return a query parameter value from a URL
132
132
  *
133
- * @param {string} urlStr - the url string.
134
- * @param {string} param - the name of the query parameter
135
- * whose value should be returned
136
- * @returns {string} the value of the `param` query parameter
137
- * @throws if urlStr is an invalid URL
133
+ * @param urlStr - the url string.
134
+ * @param param - the name of the query parameter whose value should be returned
135
+ * @returns the value of the "param" query parameter
138
136
  */
139
137
  function getQueryParam(urlStr, param) {
140
138
  // The base URL is a dummy value just so we can process relative URLs
@@ -146,7 +144,7 @@ exports.getQueryParam = getQueryParam;
146
144
  * Validates that all required params are provided
147
145
  * @param params - the method parameters.
148
146
  * @param requires - the required parameter names.
149
- * @returns {Error|null}
147
+ * @returns null if no errors found, otherwise an Error instance
150
148
  */
151
149
  function getMissingParams(params, requires) {
152
150
  var missing;
@@ -180,7 +178,7 @@ exports.getMissingParams = getMissingParams;
180
178
  * If null, then the "required params" check is bypassed.
181
179
  * @param allParams - the names of all valid parameters.
182
180
  * If null, then the "valid params" check is bypassed.
183
- * @returns {Error|null}
181
+ * @returns null if no errors found, otherwise an Error instance
184
182
  */
185
183
  function validateParams(params, requiredParams, allParams) {
186
184
  var missing = [];
@@ -226,15 +224,15 @@ exports.validateParams = validateParams;
226
224
  * as `undefined`, `null`, or the empty string.
227
225
  *
228
226
  * @param value - the parameter value
229
- * @returns boolean
227
+ * @returns true if "value" is either undefined, null or "" (empty string)
230
228
  */
231
229
  function isMissing(value) {
232
230
  return value === undefined || value === null || value === '';
233
231
  }
234
232
  /**
235
233
  * Return true if 'text' is html
236
- * @param {string} text - The 'text' to analyze
237
- * @returns {boolean} true if 'text' has html tags
234
+ * @param text - The 'text' to analyze
235
+ * @returns true if 'text' has html tags
238
236
  */
239
237
  function isHTML(text) {
240
238
  logger_1.default.debug("Determining if the text ".concat(text, " is HTML."));
@@ -244,9 +242,8 @@ exports.isHTML = isHTML;
244
242
  /**
245
243
  * Returns the first match from formats that is key the params map
246
244
  * otherwise null
247
- * @param {Object} params - The parameters.
248
- * @param {string[]} requires - The keys we want to check
249
- * @returns {string|null}
245
+ * @param params - The parameters.
246
+ * @param requires - The keys we want to check
250
247
  */
251
248
  function getFormat(params, formats) {
252
249
  if (!formats || !params) {
@@ -262,11 +259,8 @@ function getFormat(params, formats) {
262
259
  exports.getFormat = getFormat;
263
260
  /**
264
261
  * This function builds a `form-data` object for each file parameter.
265
- * @param {FileWithMetadata} fileParam The file parameter.
266
- * @param {NodeJS.ReadableStream|Buffer} fileParam.data The data content of the file.
267
- * @param {string} fileParam.filename The filename of the file.
268
- * @param {string} fileParam.contentType The content type of the file.
269
- * @returns {FileObject}
262
+ * @param fileParam - The FileWithMetadata instance that contains the file information
263
+ * @returns the FileObject instance
270
264
  */
271
265
  function buildRequestFileObject(fileParam) {
272
266
  return __awaiter(this, void 0, void 0, function () {
@@ -320,8 +314,8 @@ exports.buildRequestFileObject = buildRequestFileObject;
320
314
  /**
321
315
  * This function converts an object's keys to lower case.
322
316
  * note: does not convert nested keys
323
- * @param {Object} obj The object to convert the keys of.
324
- * @returns {Object}
317
+ * @param obj - The object to convert the keys of.
318
+ * @returns the object with keys folded to lowercase
325
319
  */
326
320
  function toLowerKeys(obj) {
327
321
  var lowerCaseObj = {};
@@ -339,13 +333,12 @@ exports.toLowerKeys = toLowerKeys;
339
333
  /**
340
334
  * Constructs a service URL by formatting a parameterized URL.
341
335
  *
342
- * @param {string} parameterizedUrl URL that contains variable placeholders, e.g. '{scheme}://ibm.com'.
343
- * @param {Map<string, string>} defaultUrlVariables Map from variable names to default values.
336
+ * @param parameterizedUrl - a URL that contains variable placeholders, e.g. '\{scheme\}://ibm.com'.
337
+ * @param defaultUrlVariables - a Map of variable names to default values.
344
338
  * Each variable in the parameterized URL must have a default value specified in this map.
345
- * @param {Map<string, string>} providedUrlVariables Map from variable names to desired values.
346
- * If a variable is not provided in this map,
347
- * the default variable value will be used instead.
348
- * @returns {string} The formatted URL with all variable placeholders replaced by values.
339
+ * @param providedUrlVariables - a Map of variable names to desired values.
340
+ * If a variable is not provided in this map, the default variable value will be used instead.
341
+ * @returns the formatted URL with all variable placeholders replaced by values.
349
342
  */
350
343
  function constructServiceUrl(parameterizedUrl, defaultUrlVariables, providedUrlVariables) {
351
344
  // If null was passed, we set the variables to an empty map.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * (C) Copyright IBM Corp. 2019, 2021.
2
+ * (C) Copyright IBM Corp. 2019, 2022.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * (C) Copyright IBM Corp. 2019, 2021.
3
+ * (C) Copyright IBM Corp. 2019, 2022.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  /**
19
19
  * Lightweight implementation for stringify-ing query params
20
20
  *
21
- * @param {object<string, object>} queryParams
22
- * @return {String}
21
+ * @param queryParams - the query params
22
+ * @returns the query string
23
23
  */
24
24
  var stringify = function (queryParams) {
25
25
  return Object.keys(queryParams)
@@ -40,16 +40,14 @@ export declare class RequestWrapper {
40
40
  * 2. Checks for missing parameters
41
41
  * 3. Encode path and query parameters
42
42
  * 4. Call the api
43
- * @private
44
- * @returns {ReadableStream|undefined}
45
- * @throws {Error}
43
+ * @returns ReadableStream|undefined
44
+ * @throws Error
46
45
  */
47
46
  sendRequest(parameters: any): Promise<any>;
48
47
  /**
49
48
  * Format error returned by axios
50
- * @param {object} the object returned by axios via rejection
51
- * @private
52
- * @returns {Error}
49
+ * @param axiosError - the object returned by axios via rejection
50
+ * @returns the Error object
53
51
  */
54
52
  formatError(axiosError: any): Error;
55
53
  getHttpClient(): AxiosInstance;