ibm-cloud-sdk-core 4.3.3 → 5.0.1

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 (249) hide show
  1. package/.secrets.baseline +4 -4
  2. package/CHANGELOG.md +33 -0
  3. package/MIGRATION-V5.md +15 -0
  4. package/README.md +1 -2
  5. package/docs/ibm-cloud-sdk-core.api.json +0 -378
  6. package/es/index.d.ts +1 -3
  7. package/es/index.js +1 -3
  8. package/etc/ibm-cloud-sdk-core.api.md +0 -30
  9. package/ibm-cloud-sdk-core.d.ts +0 -90
  10. package/index.d.ts +1 -3
  11. package/index.js +2 -16
  12. package/package.json +6 -7
  13. package/sdk-test-utilities/README.md +8 -0
  14. package/{es/lib/sdk-test-helpers.js → sdk-test-utilities/index.js} +41 -20
  15. package/sdk-test-utilities/package-lock.json +516 -0
  16. package/sdk-test-utilities/package.json +17 -0
  17. package/build/docs/ibm-cloud-sdk-core.atleastone.md +0 -71
  18. package/build/docs/ibm-cloud-sdk-core.atmostone.md +0 -71
  19. package/build/docs/ibm-cloud-sdk-core.authenticator._constructor_.md +0 -18
  20. package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +0 -57
  21. package/build/docs/ibm-cloud-sdk-core.authenticator.authenticationtype.md +0 -19
  22. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_basic.md +0 -13
  23. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_bearertoken.md +0 -11
  24. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_container.md +0 -11
  25. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_cp4d.md +0 -11
  26. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_iam.md +0 -11
  27. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_mcsp.md +0 -11
  28. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_noauth.md +0 -11
  29. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_unknown.md +0 -11
  30. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_vpc.md +0 -11
  31. package/build/docs/ibm-cloud-sdk-core.authenticator.md +0 -294
  32. package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +0 -53
  33. package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticationtype.md +0 -17
  34. package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.md +0 -50
  35. package/build/docs/ibm-cloud-sdk-core.baseservice._constructor_.md +0 -49
  36. package/build/docs/ibm-cloud-sdk-core.baseservice.baseoptions.md +0 -11
  37. package/build/docs/ibm-cloud-sdk-core.baseservice.configureservice.md +0 -53
  38. package/build/docs/ibm-cloud-sdk-core.baseservice.convertmodel.md +0 -85
  39. package/build/docs/ibm-cloud-sdk-core.baseservice.createrequest.md +0 -55
  40. package/build/docs/ibm-cloud-sdk-core.baseservice.createrequestanddeserializeresponse.md +0 -87
  41. package/build/docs/ibm-cloud-sdk-core.baseservice.default_service_name.md +0 -11
  42. package/build/docs/ibm-cloud-sdk-core.baseservice.default_service_url.md +0 -11
  43. package/build/docs/ibm-cloud-sdk-core.baseservice.disableretries.md +0 -17
  44. package/build/docs/ibm-cloud-sdk-core.baseservice.enableretries.md +0 -53
  45. package/build/docs/ibm-cloud-sdk-core.baseservice.getauthenticator.md +0 -19
  46. package/build/docs/ibm-cloud-sdk-core.baseservice.gethttpclient.md +0 -17
  47. package/build/docs/ibm-cloud-sdk-core.baseservice.md +0 -313
  48. package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +0 -53
  49. package/build/docs/ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md +0 -53
  50. package/build/docs/ibm-cloud-sdk-core.baseservice.setserviceurl.md +0 -53
  51. package/build/docs/ibm-cloud-sdk-core.basicauthenticator._constructor_.md +0 -54
  52. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +0 -55
  53. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticationtype.md +0 -19
  54. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authheader.md +0 -13
  55. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.md +0 -165
  56. package/build/docs/ibm-cloud-sdk-core.basicauthenticator.requiredoptions.md +0 -11
  57. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator._constructor_.md +0 -54
  58. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md +0 -55
  59. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticationtype.md +0 -19
  60. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.md +0 -160
  61. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.requiredoptions.md +0 -11
  62. package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.setbearertoken.md +0 -53
  63. package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +0 -55
  64. package/build/docs/ibm-cloud-sdk-core.checkcredentials.md +0 -71
  65. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md +0 -54
  66. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.authenticationtype.md +0 -19
  67. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.md +0 -149
  68. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.requiredoptions.md +0 -11
  69. package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.tokenmanager.md +0 -11
  70. package/build/docs/ibm-cloud-sdk-core.computebasicauthheader.md +0 -71
  71. package/build/docs/ibm-cloud-sdk-core.constructfilepath.md +0 -49
  72. package/build/docs/ibm-cloud-sdk-core.constructserviceurl.md +0 -87
  73. package/build/docs/ibm-cloud-sdk-core.containerauthenticator._constructor_.md +0 -54
  74. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.authenticationtype.md +0 -19
  75. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.md +0 -172
  76. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md +0 -53
  77. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md +0 -53
  78. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md +0 -53
  79. package/build/docs/ibm-cloud-sdk-core.containerauthenticator.tokenmanager.md +0 -11
  80. package/build/docs/ibm-cloud-sdk-core.containertokenmanager._constructor_.md +0 -54
  81. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.getcrtoken.md +0 -19
  82. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.md +0 -142
  83. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.requesttoken.md +0 -17
  84. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md +0 -53
  85. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md +0 -53
  86. package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md +0 -53
  87. package/build/docs/ibm-cloud-sdk-core.contenttype.md +0 -14
  88. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md +0 -54
  89. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.md +0 -128
  90. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.requesttoken.md +0 -15
  91. package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.requiredoptions.md +0 -11
  92. package/build/docs/ibm-cloud-sdk-core.fileexistsatpath.md +0 -49
  93. package/build/docs/ibm-cloud-sdk-core.fileobject.md +0 -80
  94. package/build/docs/ibm-cloud-sdk-core.fileobject.options.md +0 -11
  95. package/build/docs/ibm-cloud-sdk-core.fileobject.value.md +0 -11
  96. package/build/docs/ibm-cloud-sdk-core.fileoptions.contenttype.md +0 -11
  97. package/build/docs/ibm-cloud-sdk-core.fileoptions.filename.md +0 -11
  98. package/build/docs/ibm-cloud-sdk-core.fileoptions.md +0 -74
  99. package/build/docs/ibm-cloud-sdk-core.filestream.md +0 -54
  100. package/build/docs/ibm-cloud-sdk-core.filestream.path.md +0 -11
  101. package/build/docs/ibm-cloud-sdk-core.filewithmetadata.contenttype.md +0 -11
  102. package/build/docs/ibm-cloud-sdk-core.filewithmetadata.data.md +0 -11
  103. package/build/docs/ibm-cloud-sdk-core.filewithmetadata.filename.md +0 -11
  104. package/build/docs/ibm-cloud-sdk-core.filewithmetadata.md +0 -87
  105. package/build/docs/ibm-cloud-sdk-core.getauthenticatorfromenvironment.md +0 -55
  106. package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +0 -55
  107. package/build/docs/ibm-cloud-sdk-core.getcurrenttime.md +0 -19
  108. package/build/docs/ibm-cloud-sdk-core.getformat.md +0 -69
  109. package/build/docs/ibm-cloud-sdk-core.getmissingparams.md +0 -73
  110. package/build/docs/ibm-cloud-sdk-core.getnewlogger.md +0 -59
  111. package/build/docs/ibm-cloud-sdk-core.getqueryparam.md +0 -71
  112. package/build/docs/ibm-cloud-sdk-core.iamauthenticator._constructor_.md +0 -54
  113. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.authenticationtype.md +0 -19
  114. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.md +0 -149
  115. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.requiredoptions.md +0 -11
  116. package/build/docs/ibm-cloud-sdk-core.iamauthenticator.tokenmanager.md +0 -11
  117. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator._constructor_.md +0 -54
  118. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.clientid.md +0 -11
  119. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.clientsecret.md +0 -11
  120. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.getrefreshtoken.md +0 -19
  121. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.md +0 -211
  122. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.scope.md +0 -11
  123. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setclientidandsecret.md +0 -69
  124. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setscope.md +0 -53
  125. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.tokenmanager.md +0 -11
  126. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager._constructor_.md +0 -54
  127. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.formdata.md +0 -11
  128. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.getrefreshtoken.md +0 -19
  129. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.istokenexpired.md +0 -19
  130. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md +0 -221
  131. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.refreshtoken.md +0 -11
  132. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.requesttoken.md +0 -19
  133. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.savetokeninfo.md +0 -53
  134. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setclientidandsecret.md +0 -69
  135. package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setscope.md +0 -53
  136. package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.clientid.md +0 -11
  137. package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.clientsecret.md +0 -11
  138. package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.md +0 -96
  139. package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.scope.md +0 -11
  140. package/build/docs/ibm-cloud-sdk-core.iamtokenmanager._constructor_.md +0 -54
  141. package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.md +0 -92
  142. package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.requiredoptions.md +0 -11
  143. package/build/docs/ibm-cloud-sdk-core.isemptyobject.md +0 -49
  144. package/build/docs/ibm-cloud-sdk-core.isfiledata.md +0 -49
  145. package/build/docs/ibm-cloud-sdk-core.isfilewithmetadata.md +0 -49
  146. package/build/docs/ibm-cloud-sdk-core.ishtml.md +0 -55
  147. package/build/docs/ibm-cloud-sdk-core.isjsonmimetype.md +0 -55
  148. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager._constructor_.md +0 -49
  149. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.md +0 -163
  150. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.requesttoken.md +0 -19
  151. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md +0 -53
  152. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.tokeninfo.md +0 -11
  153. package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.tokenname.md +0 -11
  154. package/build/docs/ibm-cloud-sdk-core.jwttokenmanageroptions.md +0 -15
  155. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator._constructor_.md +0 -54
  156. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.authenticationtype.md +0 -19
  157. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.md +0 -145
  158. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.requiredoptions.md +0 -11
  159. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.tokenmanager.md +0 -11
  160. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager._constructor_.md +0 -54
  161. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.md +0 -128
  162. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requesttoken.md +0 -15
  163. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requiredoptions.md +0 -11
  164. package/build/docs/ibm-cloud-sdk-core.md +0 -818
  165. package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticate.md +0 -49
  166. package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticationtype.md +0 -19
  167. package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.md +0 -60
  168. package/build/docs/ibm-cloud-sdk-core.onlyone.md +0 -71
  169. package/build/docs/ibm-cloud-sdk-core.qs.md +0 -21
  170. package/build/docs/ibm-cloud-sdk-core.readcredentialsfile.md +0 -17
  171. package/build/docs/ibm-cloud-sdk-core.readcrtokenfile.md +0 -49
  172. package/build/docs/ibm-cloud-sdk-core.readexternalsources.md +0 -55
  173. package/build/docs/ibm-cloud-sdk-core.removesuffix.md +0 -71
  174. package/build/docs/ibm-cloud-sdk-core.sdklogger.debug.md +0 -11
  175. package/build/docs/ibm-cloud-sdk-core.sdklogger.error.md +0 -11
  176. package/build/docs/ibm-cloud-sdk-core.sdklogger.info.md +0 -11
  177. package/build/docs/ibm-cloud-sdk-core.sdklogger.md +0 -121
  178. package/build/docs/ibm-cloud-sdk-core.sdklogger.verbose.md +0 -11
  179. package/build/docs/ibm-cloud-sdk-core.sdklogger.warn.md +0 -11
  180. package/build/docs/ibm-cloud-sdk-core.streamtopromise.md +0 -55
  181. package/build/docs/ibm-cloud-sdk-core.striptrailingslash.md +0 -55
  182. package/build/docs/ibm-cloud-sdk-core.tokenmanager._constructor_.md +0 -49
  183. package/build/docs/ibm-cloud-sdk-core.tokenmanager.accesstoken.md +0 -11
  184. package/build/docs/ibm-cloud-sdk-core.tokenmanager.disablesslverification.md +0 -11
  185. package/build/docs/ibm-cloud-sdk-core.tokenmanager.expiretime.md +0 -11
  186. package/build/docs/ibm-cloud-sdk-core.tokenmanager.gettoken.md +0 -17
  187. package/build/docs/ibm-cloud-sdk-core.tokenmanager.headers.md +0 -11
  188. package/build/docs/ibm-cloud-sdk-core.tokenmanager.istokenexpired.md +0 -17
  189. package/build/docs/ibm-cloud-sdk-core.tokenmanager.md +0 -352
  190. package/build/docs/ibm-cloud-sdk-core.tokenmanager.pacedrequesttoken.md +0 -19
  191. package/build/docs/ibm-cloud-sdk-core.tokenmanager.refreshtime.md +0 -11
  192. package/build/docs/ibm-cloud-sdk-core.tokenmanager.requesttoken.md +0 -19
  193. package/build/docs/ibm-cloud-sdk-core.tokenmanager.requestwrapperinstance.md +0 -11
  194. package/build/docs/ibm-cloud-sdk-core.tokenmanager.savetokeninfo.md +0 -53
  195. package/build/docs/ibm-cloud-sdk-core.tokenmanager.setdisablesslverification.md +0 -53
  196. package/build/docs/ibm-cloud-sdk-core.tokenmanager.setheaders.md +0 -53
  197. package/build/docs/ibm-cloud-sdk-core.tokenmanager.url.md +0 -11
  198. package/build/docs/ibm-cloud-sdk-core.tokenmanager.useragent.md +0 -11
  199. package/build/docs/ibm-cloud-sdk-core.tokenmanageroptions.md +0 -18
  200. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator._constructor_.md +0 -49
  201. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.authenticate.md +0 -55
  202. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.disablesslverification.md +0 -11
  203. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.headers.md +0 -11
  204. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md +0 -217
  205. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md +0 -53
  206. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md +0 -53
  207. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.tokenmanager.md +0 -11
  208. package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.url.md +0 -11
  209. package/build/docs/ibm-cloud-sdk-core.tolowerkeys.md +0 -55
  210. package/build/docs/ibm-cloud-sdk-core.unittestutils.checkforsuccessfulexecution.md +0 -53
  211. package/build/docs/ibm-cloud-sdk-core.unittestutils.checkmediaheaders.md +0 -85
  212. package/build/docs/ibm-cloud-sdk-core.unittestutils.checkurlandmethod.md +0 -85
  213. package/build/docs/ibm-cloud-sdk-core.unittestutils.checkuserheader.md +0 -85
  214. package/build/docs/ibm-cloud-sdk-core.unittestutils.expecttobepromise.md +0 -53
  215. package/build/docs/ibm-cloud-sdk-core.unittestutils.getoptions.md +0 -55
  216. package/build/docs/ibm-cloud-sdk-core.unittestutils.md +0 -86
  217. package/build/docs/ibm-cloud-sdk-core.useroptions.authenticator.md +0 -13
  218. package/build/docs/ibm-cloud-sdk-core.useroptions.disablesslverification.md +0 -13
  219. package/build/docs/ibm-cloud-sdk-core.useroptions.headers.md +0 -13
  220. package/build/docs/ibm-cloud-sdk-core.useroptions.jar.md +0 -13
  221. package/build/docs/ibm-cloud-sdk-core.useroptions.md +0 -171
  222. package/build/docs/ibm-cloud-sdk-core.useroptions.serviceurl.md +0 -13
  223. package/build/docs/ibm-cloud-sdk-core.useroptions.url.md +0 -13
  224. package/build/docs/ibm-cloud-sdk-core.useroptions.version.md +0 -13
  225. package/build/docs/ibm-cloud-sdk-core.validateinput.md +0 -73
  226. package/build/docs/ibm-cloud-sdk-core.validateparams.md +0 -89
  227. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md +0 -54
  228. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.authenticationtype.md +0 -19
  229. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.md +0 -158
  230. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md +0 -53
  231. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md +0 -53
  232. package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.tokenmanager.md +0 -11
  233. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager._constructor_.md +0 -54
  234. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.istokenexpired.md +0 -19
  235. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.md +0 -126
  236. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.requesttoken.md +0 -15
  237. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofilecrn.md +0 -53
  238. package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofileid.md +0 -53
  239. package/build/docs/index.md +0 -29
  240. package/es/lib/sdk-test-helpers.browser.d.ts +0 -21
  241. package/es/lib/sdk-test-helpers.browser.js +0 -23
  242. package/es/lib/sdk-test-helpers.d.ts +0 -72
  243. package/es/tsdoc-metadata.json +0 -11
  244. package/lib/sdk-test-helpers.browser.d.ts +0 -21
  245. package/lib/sdk-test-helpers.browser.js +0 -32
  246. package/lib/sdk-test-helpers.d.ts +0 -72
  247. package/lib/sdk-test-helpers.js +0 -102
  248. package/temp/ibm-cloud-sdk-core.api.json +0 -8641
  249. package/temp/ibm-cloud-sdk-core.api.md +0 -517
@@ -345,66 +345,6 @@ export declare function buildRequestFileObject(fileParam: FileWithMetadata): Pro
345
345
  */
346
346
  export declare function checkCredentials(obj: any, credsToCheck: string[]): Error | null;
347
347
 
348
- /**
349
- * This method simply ensures that the method executed without any issues by extracting
350
- * the argument from the mock object for the `createRequest` method and verifying that it is an object.
351
- *
352
- * @param createRequestMock - the jest mock object for the `createRequest` method in the `RequestWrapper` class
353
- */
354
- declare function checkForSuccessfulExecution(createRequestMock: any): void;
355
-
356
- /**
357
- * Takes the mock object for the `createRequest` method, extracts the headers that were sent with the call,
358
- * and checks for the expected values for `Accept` and `Content-Type`. This to verify that the SDK sets
359
- * the correct values in the code.
360
- *
361
- * @param createRequestMock - the jest mock object for the `createRequest` method in the `RequestWrapper` class
362
- * @param accept - the expected value for the `Accept` header
363
- * @param contentType - the expected value for the `Content-Type` header
364
- */
365
- declare function checkMediaHeaders(createRequestMock: any, accept: string, contentType: string): void;
366
-
367
- /**
368
- * (C) Copyright IBM Corp. 2019, 2022.
369
- *
370
- * Licensed under the Apache License, Version 2.0 (the "License");
371
- * you may not use this file except in compliance with the License.
372
- * You may obtain a copy of the License at
373
- *
374
- * http://www.apache.org/licenses/LICENSE-2.0
375
- *
376
- * Unless required by applicable law or agreed to in writing, software
377
- * distributed under the License is distributed on an "AS IS" BASIS,
378
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
379
- * See the License for the specific language governing permissions and
380
- * limitations under the License.
381
- */
382
- /**
383
- * This module provides a set of helper methods used to reduce code duplication in the generated unit tests
384
- * for the SDKs that depend on this core package. Note that these methods are not used by the tests for this
385
- * package - they are meant to be exported and made available to dependent libraries.
386
- */
387
- /**
388
- * Takes the request options constructed by the SDK and checks that the `url` and `method` properties
389
- * were set to their correct values.
390
- *
391
- * @param options - the options object put together by the SDK, retrieved from the createRequest mock
392
- * @param url - The URL path of the service endpoint, from the paths section of the API definition
393
- * @param method - The HTTP method for the request, from the API definition
394
- */
395
- declare function checkUrlAndMethod(options: any, url: string, method: any): void;
396
-
397
- /**
398
- * Takes the mock object for the `createRequest` method, extracts the headers that were sent with the call,
399
- * and checks for the expected value for a user-defined header. This is verify that the SDK accepts header
400
- * parameters and sends them as headers in the request.
401
- *
402
- * @param createRequestMock - the jest mock object for the `createRequest` method in the `RequestWrapper` class
403
- * @param userHeaderName - the name of the header passed by the user, e.g. `Contained-Content-Type`
404
- * @param userHeaderValue - the expected value for the header passed by the user
405
- */
406
- declare function checkUserHeader(createRequestMock: any, userHeaderName: string, userHeaderValue: string): void;
407
-
408
348
  /**
409
349
  * The CloudPakForDataAuthenticator will either use a username/password pair or a username/apikey pair to obtain
410
350
  * a bearer token from a token server. When the bearer token expires, a new token is obtained from the token server.
@@ -636,14 +576,6 @@ export declare class Cp4dTokenManager extends JwtTokenManager {
636
576
  protected requestToken(): Promise<any>;
637
577
  }
638
578
 
639
- /**
640
- * This method simply ensures that the SDK methods return Promises by checking for
641
- * the `then` function - common way to assess whether or not an object is a Promise.
642
- *
643
- * @param sdkPromise - the Promise returned by an SDK method
644
- */
645
- declare function expectToBePromise(sdkPromise: any): void;
646
-
647
579
  export declare function fileExistsAtPath(filepath: string): boolean;
648
580
 
649
581
  /**
@@ -746,16 +678,6 @@ export declare function getMissingParams(params: {
746
678
  */
747
679
  export declare function getNewLogger(moduleName: string): SDKLogger;
748
680
 
749
- /**
750
- * This method extracts the `options` property from the object passed into `createRequest`. This property is
751
- * an object containing all of the SDK method-specific information (like `path` and `body`) used to build a request.
752
- * This method is just a convenience method for the unit tests to be able to make assertions on the items in the request.
753
- *
754
- * @param createRequestMock - the jest mock object for the `createRequest` method in the `RequestWrapper` class
755
- * @returns Object
756
- */
757
- declare function getOptions(createRequestMock: any): any;
758
-
759
681
  /**
760
682
  * Return a query parameter value from a URL
761
683
  *
@@ -1532,18 +1454,6 @@ export declare class TokenRequestBasedAuthenticator extends Authenticator {
1532
1454
  */
1533
1455
  export declare function toLowerKeys(obj: Object): Object;
1534
1456
 
1535
- declare namespace unitTestUtils {
1536
- export {
1537
- checkUrlAndMethod,
1538
- checkMediaHeaders,
1539
- checkUserHeader,
1540
- checkForSuccessfulExecution,
1541
- getOptions,
1542
- expectToBePromise
1543
- }
1544
- }
1545
- export { unitTestUtils }
1546
-
1547
1457
  /**
1548
1458
  * Configuration values for a service.
1549
1459
  */
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * (C) Copyright IBM Corp. 2019, 2021.
2
+ * (C) Copyright IBM Corp. 2019, 2024.
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.
@@ -16,12 +16,10 @@
16
16
  /**
17
17
  * @module ibm-cloud-sdk-core
18
18
  */
19
- import * as unitTestUtils from './lib/sdk-test-helpers';
20
19
  export { BaseService, UserOptions } from './lib/base-service';
21
20
  export * from './auth';
22
21
  export * from './lib/helper';
23
22
  export { default as qs } from './lib/querystring';
24
23
  export { default as contentType } from './lib/content-type';
25
24
  export * from './lib/stream-to-promise';
26
- export { unitTestUtils };
27
25
  export { getNewLogger, SDKLogger } from './lib/get-new-logger';
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * (C) Copyright IBM Corp. 2019, 2021.
3
+ * (C) Copyright IBM Corp. 2019, 2024.
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.
@@ -25,18 +25,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
25
25
  if (k2 === undefined) k2 = k;
26
26
  o[k2] = m[k];
27
27
  }));
28
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
- Object.defineProperty(o, "default", { enumerable: true, value: v });
30
- }) : function(o, v) {
31
- o["default"] = v;
32
- });
33
- var __importStar = (this && this.__importStar) || function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
28
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
41
29
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
42
30
  };
@@ -44,12 +32,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
44
32
  return (mod && mod.__esModule) ? mod : { "default": mod };
45
33
  };
46
34
  Object.defineProperty(exports, "__esModule", { value: true });
47
- exports.getNewLogger = exports.unitTestUtils = exports.contentType = exports.qs = exports.BaseService = void 0;
35
+ exports.getNewLogger = exports.contentType = exports.qs = exports.BaseService = void 0;
48
36
  /**
49
37
  * @module ibm-cloud-sdk-core
50
38
  */
51
- var unitTestUtils = __importStar(require("./lib/sdk-test-helpers"));
52
- exports.unitTestUtils = unitTestUtils;
53
39
  var base_service_1 = require("./lib/base-service");
54
40
  Object.defineProperty(exports, "BaseService", { enumerable: true, get: function () { return base_service_1.BaseService; } });
55
41
  __exportStar(require("./auth"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ibm-cloud-sdk-core",
3
- "version": "4.3.3",
3
+ "version": "5.0.1",
4
4
  "description": "Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.",
5
5
  "main": "index.js",
6
6
  "typings": "./es/index.d.ts",
@@ -37,11 +37,10 @@
37
37
  "@types/debug": "^4.1.12",
38
38
  "@types/node": "~10.14.19",
39
39
  "@types/tough-cookie": "^4.0.0",
40
- "axios": "1.6.8",
40
+ "axios": "1.7.4",
41
41
  "camelcase": "^6.3.0",
42
42
  "debug": "^4.3.4",
43
43
  "dotenv": "^16.4.5",
44
- "expect": "^27.5.1",
45
44
  "extend": "3.0.2",
46
45
  "file-type": "16.5.4",
47
46
  "form-data": "4.0.0",
@@ -55,11 +54,10 @@
55
54
  "semver": "^7.5.3"
56
55
  },
57
56
  "browser": {
58
- "./auth/utils/read-credentials-file": "./auth/utils/read-credentials-file.browser",
59
- "./lib/sdk-test-helpers": "./lib/sdk-test-helpers.browser"
57
+ "./auth/utils/read-credentials-file": "./auth/utils/read-credentials-file.browser"
60
58
  },
61
59
  "engines": {
62
- "node": ">=14"
60
+ "node": ">=18"
63
61
  },
64
62
  "scripts": {
65
63
  "clean": "rm -fr node_modules",
@@ -83,7 +81,8 @@
83
81
  "copy:doc": "mkdir -p dist/docs && cp \"temp/ibm-cloud-sdk-core.api.json\" dist/docs",
84
82
  "copy:pkg": "package-json-reducer -s \"config devDependencies directories scripts jestSonar jest\" -o ./dist/package.json package.json",
85
83
  "postversion": "publisher --no-checks --dry-run",
86
- "all": "npm-run-all build test lint"
84
+ "all": "npm-run-all build test lint",
85
+ "semantic-release": "semantic-release"
87
86
  },
88
87
  "jest": {
89
88
  "collectCoverage": true,
@@ -0,0 +1,8 @@
1
+ # SDK Test Utilities
2
+
3
+ A set of utility methods for unit tests in IBM Cloud SDKs.
4
+
5
+ This package is published separately from `ibm-cloud-sdk-core`. It includes `expect`
6
+ as a dependency, which is not intended for inclusion in production packages. This
7
+ utility package should only be installed as a _development_ dependency and the logic
8
+ it contains will only ever be needed for tests.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * (C) Copyright IBM Corp. 2019, 2022.
2
+ * (C) Copyright IBM Corp. 2019, 2024.
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.
@@ -13,12 +13,15 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import expect from 'expect';
16
+
17
+ const { expect } = require('expect');
18
+
17
19
  /**
18
- * This module provides a set of helper methods used to reduce code duplication in the generated unit tests
20
+ * This module provides a set of utility methods used to reduce code duplication in the generated unit tests
19
21
  * for the SDKs that depend on this core package. Note that these methods are not used by the tests for this
20
22
  * package - they are meant to be exported and made available to dependent libraries.
21
23
  */
24
+
22
25
  /**
23
26
  * Takes the request options constructed by the SDK and checks that the `url` and `method` properties
24
27
  * were set to their correct values.
@@ -27,10 +30,11 @@ import expect from 'expect';
27
30
  * @param url - The URL path of the service endpoint, from the paths section of the API definition
28
31
  * @param method - The HTTP method for the request, from the API definition
29
32
  */
30
- export function checkUrlAndMethod(options, url, method) {
31
- expect(options.url).toEqual(url);
32
- expect(options.method).toEqual(method);
33
+ function checkUrlAndMethod(options, url, method) {
34
+ expect(options.url).toEqual(url);
35
+ expect(options.method).toEqual(method);
33
36
  }
37
+
34
38
  /**
35
39
  * Takes the mock object for the `createRequest` method, extracts the headers that were sent with the call,
36
40
  * and checks for the expected values for `Accept` and `Content-Type`. This to verify that the SDK sets
@@ -40,11 +44,12 @@ export function checkUrlAndMethod(options, url, method) {
40
44
  * @param accept - the expected value for the `Accept` header
41
45
  * @param contentType - the expected value for the `Content-Type` header
42
46
  */
43
- export function checkMediaHeaders(createRequestMock, accept, contentType) {
44
- const { headers } = createRequestMock.mock.calls[0][0].defaultOptions;
45
- expect(headers.Accept).toEqual(accept);
46
- expect(headers['Content-Type']).toEqual(contentType);
47
+ function checkMediaHeaders(createRequestMock, accept, contentType) {
48
+ const { headers } = createRequestMock.mock.calls[0][0].defaultOptions;
49
+ expect(headers.Accept).toEqual(accept);
50
+ expect(headers['Content-Type']).toEqual(contentType);
47
51
  }
52
+
48
53
  /**
49
54
  * Takes the mock object for the `createRequest` method, extracts the headers that were sent with the call,
50
55
  * and checks for the expected value for a user-defined header. This is verify that the SDK accepts header
@@ -54,20 +59,26 @@ export function checkMediaHeaders(createRequestMock, accept, contentType) {
54
59
  * @param userHeaderName - the name of the header passed by the user, e.g. `Contained-Content-Type`
55
60
  * @param userHeaderValue - the expected value for the header passed by the user
56
61
  */
57
- export function checkUserHeader(createRequestMock, userHeaderName, userHeaderValue) {
58
- const { headers } = createRequestMock.mock.calls[0][0].defaultOptions;
59
- expect(headers[userHeaderName]).toEqual(userHeaderValue);
62
+ function checkUserHeader(
63
+ createRequestMock,
64
+ userHeaderName,
65
+ userHeaderValue
66
+ ) {
67
+ const { headers } = createRequestMock.mock.calls[0][0].defaultOptions;
68
+ expect(headers[userHeaderName]).toEqual(userHeaderValue);
60
69
  }
70
+
61
71
  /**
62
72
  * This method simply ensures that the method executed without any issues by extracting
63
73
  * the argument from the mock object for the `createRequest` method and verifying that it is an object.
64
74
  *
65
75
  * @param createRequestMock - the jest mock object for the `createRequest` method in the `RequestWrapper` class
66
76
  */
67
- export function checkForSuccessfulExecution(createRequestMock) {
68
- const sdkParams = createRequestMock.mock.calls[0][0];
69
- expect(typeof sdkParams).toEqual('object');
77
+ function checkForSuccessfulExecution(createRequestMock) {
78
+ const sdkParams = createRequestMock.mock.calls[0][0];
79
+ expect(typeof sdkParams).toEqual('object');
70
80
  }
81
+
71
82
  /**
72
83
  * This method extracts the `options` property from the object passed into `createRequest`. This property is
73
84
  * an object containing all of the SDK method-specific information (like `path` and `body`) used to build a request.
@@ -76,15 +87,25 @@ export function checkForSuccessfulExecution(createRequestMock) {
76
87
  * @param createRequestMock - the jest mock object for the `createRequest` method in the `RequestWrapper` class
77
88
  * @returns Object
78
89
  */
79
- export function getOptions(createRequestMock) {
80
- return createRequestMock.mock.calls[0][0].options;
90
+ function getOptions(createRequestMock) {
91
+ return createRequestMock.mock.calls[0][0].options;
81
92
  }
93
+
82
94
  /**
83
95
  * This method simply ensures that the SDK methods return Promises by checking for
84
96
  * the `then` function - common way to assess whether or not an object is a Promise.
85
97
  *
86
98
  * @param sdkPromise - the Promise returned by an SDK method
87
99
  */
88
- export function expectToBePromise(sdkPromise) {
89
- expect(typeof sdkPromise.then).toBe('function');
100
+ function expectToBePromise(sdkPromise) {
101
+ expect(typeof sdkPromise.then).toBe('function');
90
102
  }
103
+
104
+ module.exports = {
105
+ checkUrlAndMethod,
106
+ checkMediaHeaders,
107
+ checkUserHeader,
108
+ checkForSuccessfulExecution,
109
+ getOptions,
110
+ expectToBePromise,
111
+ };