ibm-cloud-sdk-core 4.3.2-beta-1 → 4.3.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.
- package/.cra/.cveignore +2 -0
- package/.secrets.baseline +590 -0
- package/Authentication.md +600 -0
- package/CHANGELOG.md +879 -0
- package/LICENSE.md +201 -0
- package/MIGRATION-V4.md +54 -0
- package/README.md +118 -0
- package/api-extractor.json +39 -0
- package/appscan-config.xml +8 -0
- package/build/docs/ibm-cloud-sdk-core.atleastone.md +71 -0
- package/build/docs/ibm-cloud-sdk-core.atmostone.md +71 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator._constructor_.md +18 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +57 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_basic.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_bearertoken.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_container.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_cp4d.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_iam.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_mcsp.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_noauth.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_unknown.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_vpc.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.md +294 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticationtype.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.md +50 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice._constructor_.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.baseoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.configureservice.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.convertmodel.md +85 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.createrequest.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.createrequestanddeserializeresponse.md +87 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.default_service_name.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.default_service_url.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.disableretries.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.enableretries.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.getauthenticator.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.gethttpclient.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.md +313 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setserviceurl.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authheader.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.md +165 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.md +160 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.setbearertoken.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.checkcredentials.md +71 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.md +149 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.computebasicauthheader.md +71 -0
- package/build/docs/ibm-cloud-sdk-core.constructfilepath.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.constructserviceurl.md +87 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.md +172 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.getcrtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.md +142 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.requesttoken.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.contenttype.md +14 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.md +128 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.requesttoken.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileexistsatpath.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.fileobject.md +80 -0
- package/build/docs/ibm-cloud-sdk-core.fileobject.options.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileobject.value.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileoptions.contenttype.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileoptions.filename.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.fileoptions.md +74 -0
- package/build/docs/ibm-cloud-sdk-core.filestream.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.filestream.path.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.contenttype.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.data.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.filename.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.filewithmetadata.md +87 -0
- package/build/docs/ibm-cloud-sdk-core.getauthenticatorfromenvironment.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.getcurrenttime.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.getformat.md +69 -0
- package/build/docs/ibm-cloud-sdk-core.getmissingparams.md +73 -0
- package/build/docs/ibm-cloud-sdk-core.getnewlogger.md +59 -0
- package/build/docs/ibm-cloud-sdk-core.getqueryparam.md +71 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.md +149 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.clientid.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.clientsecret.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.getrefreshtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.md +211 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.scope.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setclientidandsecret.md +69 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setscope.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.formdata.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.getrefreshtoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.istokenexpired.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.md +221 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.refreshtoken.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.savetokeninfo.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setclientidandsecret.md +69 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setscope.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.clientid.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.clientsecret.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.md +96 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.scope.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.md +92 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.isemptyobject.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.isfiledata.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.isfilewithmetadata.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.ishtml.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.isjsonmimetype.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager._constructor_.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.md +163 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.tokeninfo.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.tokenname.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanageroptions.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.md +145 -0
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.md +128 -0
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requesttoken.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.md +818 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticate.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.md +60 -0
- package/build/docs/ibm-cloud-sdk-core.onlyone.md +71 -0
- package/build/docs/ibm-cloud-sdk-core.qs.md +21 -0
- package/build/docs/ibm-cloud-sdk-core.readcredentialsfile.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.readcrtokenfile.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.readexternalsources.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.removesuffix.md +71 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.debug.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.error.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.info.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.md +121 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.verbose.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.sdklogger.warn.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.streamtopromise.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.striptrailingslash.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager._constructor_.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.accesstoken.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.disablesslverification.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.expiretime.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.gettoken.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.headers.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.istokenexpired.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.md +352 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.pacedrequesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.refreshtime.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.requestwrapperinstance.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.savetokeninfo.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setdisablesslverification.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setheaders.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.url.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.useragent.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanageroptions.md +18 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator._constructor_.md +49 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.authenticate.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.disablesslverification.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.headers.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.md +217 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.url.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tolowerkeys.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkforsuccessfulexecution.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkmediaheaders.md +85 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkurlandmethod.md +85 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkuserheader.md +85 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.expecttobepromise.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.getoptions.md +55 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.md +86 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.authenticator.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.disablesslverification.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.headers.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.jar.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.md +171 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.serviceurl.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.url.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.useroptions.version.md +13 -0
- package/build/docs/ibm-cloud-sdk-core.validateinput.md +73 -0
- package/build/docs/ibm-cloud-sdk-core.validateparams.md +89 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.md +158 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager._constructor_.md +54 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.istokenexpired.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.md +126 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.requesttoken.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofilecrn.md +53 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofileid.md +53 -0
- package/build/docs/index.md +29 -0
- package/es/lib/sdk-test-helpers.js +1 -0
- package/es/tsdoc-metadata.json +11 -0
- package/etc/ibm-cloud-sdk-core.api.md +517 -0
- package/lib/sdk-test-helpers.js +1 -0
- package/package.json +88 -61
- package/temp/ibm-cloud-sdk-core.api.json +8641 -0
- package/temp/ibm-cloud-sdk-core.api.md +517 -0
- package/tsconfig-es6.json +9 -0
- package/auth/user-temp/get-authenticator-from-environment.d.ts +0 -28
- package/auth/user-temp/get-authenticator-from-environment.js +0 -95
- package/auth/user-temp/index.d.ts +0 -25
- package/auth/user-temp/index.js +0 -30
- package/auth/user-temp/read-external-sources.d.ts +0 -11
- package/auth/user-temp/read-external-sources.js +0 -154
- package/es/auth/user-temp/get-authenticator-from-environment.d.ts +0 -28
- package/es/auth/user-temp/get-authenticator-from-environment.js +0 -91
- package/es/auth/user-temp/index.d.ts +0 -25
- package/es/auth/user-temp/index.js +0 -25
- package/es/auth/user-temp/read-external-sources.d.ts +0 -11
- package/es/auth/user-temp/read-external-sources.js +0 -144
package/LICENSE.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/MIGRATION-V4.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Migration Guide for v4
|
|
2
|
+
|
|
3
|
+
## Breaking Changes
|
|
4
|
+
|
|
5
|
+
### Node Version
|
|
6
|
+
Node version 12 is no longer supported - 14 is the minimum version supported.
|
|
7
|
+
|
|
8
|
+
### TypeScript Version
|
|
9
|
+
The `typescript` development dependnecy is now required to be at least version 4.
|
|
10
|
+
|
|
11
|
+
Run `npm install -D typescript@4` to upgrade to version 4.
|
|
12
|
+
|
|
13
|
+
Code produced by the IBM OpenAPI SDK Generator should already be compliant with TypeScript v4.
|
|
14
|
+
|
|
15
|
+
Additionally, you may need to upgrade `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` to
|
|
16
|
+
v5 to be compatible with the new version of TypeScript. This upgrade should be safe and compatible.
|
|
17
|
+
|
|
18
|
+
Run `npm i -D '@typescript-eslint/eslint-plugin@latest' '@typescript-eslint/parser@latest'` to upgrade.
|
|
19
|
+
|
|
20
|
+
### Jest Version
|
|
21
|
+
The `jest` development dependency is now required to be at least version 29.
|
|
22
|
+
|
|
23
|
+
Run `npm install -D jest@29` to upgrade to version 29.
|
|
24
|
+
|
|
25
|
+
Code produced by the IBM OpenAPI Generator should already be compliant with Jest v29.
|
|
26
|
+
|
|
27
|
+
Note: Ensure your test code does not contain the anti-pattern of using a `done` callback with an `async` function.
|
|
28
|
+
This is no longer permitted in Jest 29, whereas it was discouraged but permitted in previous versions. An old version of the IBM OpenAPI SDK Generator included a bug that generated this pattern. If your generated test code has not been updated since then, you may run into this issue.
|
|
29
|
+
|
|
30
|
+
Example diff showing proper resolution:
|
|
31
|
+
```
|
|
32
|
+
diff --git a/test/integration/example.v1.test.js b/test/integration/example.v1.test.js
|
|
33
|
+
index be0bec3..62f03f8 100644
|
|
34
|
+
--- a/test/integration/example.v1.test.js
|
|
35
|
+
+++ b/test/integration/example.v1.test.js
|
|
36
|
+
@@ -38,7 +38,7 @@ describe('ExampleV1_integration', () => {
|
|
37
|
+
jest.setTimeout(timeout);
|
|
38
|
+
let example;
|
|
39
|
+
|
|
40
|
+
- beforeAll(async (done) => {
|
|
41
|
+
+ beforeAll(async () => {
|
|
42
|
+
example = ExampleV1.newInstance({});
|
|
43
|
+
|
|
44
|
+
const config = readExternalSources(ExampleV1.DEFAULT_SERVICE_NAME);
|
|
45
|
+
@@ -58,8 +58,6 @@ describe('ExampleV1_integration', () => {
|
|
46
|
+
|
|
47
|
+
log(`Service URL: ${example.baseOptions.serviceUrl}`);
|
|
48
|
+
log('Finished setup.');
|
|
49
|
+
-
|
|
50
|
+
- done();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test('getSomething()', async () => {
|
|
54
|
+
```
|
package/README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
[](https://app.travis-ci.com/IBM/node-sdk-core)
|
|
2
|
+
[](https://www.npmjs.com/package/ibm-cloud-sdk-core)
|
|
3
|
+
[](https://github.com/semantic-release/semantic-release)
|
|
4
|
+
[](https://cla-assistant.io/ibm/node-sdk-core)
|
|
5
|
+
|
|
6
|
+
# IBM Node.js SDK Core
|
|
7
|
+
This project contains core functionality required by Node.js code generated by the IBM Cloud OpenAPI SDK Generator
|
|
8
|
+
(openapi-sdkgen).
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
```bash
|
|
12
|
+
`npm install ibm-cloud-sdk-core`
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
- Node.js version 14 or newer
|
|
17
|
+
- Note that v14 is technically *supported* but not officially *guaranteed* as we only test on v16 and higher
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
This package exports a single object containing a number of modules as top level properties.
|
|
21
|
+
|
|
22
|
+
Example:
|
|
23
|
+
```js
|
|
24
|
+
// this is TypeScript, since the `openapi-sdkgen` project generates TypeScript
|
|
25
|
+
import { BaseService } from 'ibm-cloud-sdk-core';
|
|
26
|
+
|
|
27
|
+
class YourSDK extends BaseService { ... }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Authentication
|
|
31
|
+
The node-sdk-core project supports the following types of authentication:
|
|
32
|
+
- Basic Authentication
|
|
33
|
+
- Bearer Token Authentication
|
|
34
|
+
- Identity and Access Management (IAM) Authentication
|
|
35
|
+
- Container Authentication
|
|
36
|
+
- VPC Instance Authentication
|
|
37
|
+
- Cloud Pak for Data Authentication
|
|
38
|
+
- No Authentication (for testing)
|
|
39
|
+
|
|
40
|
+
There are two ways to create an authenticator:
|
|
41
|
+
1. Creating an instance and providing credentials programmatically
|
|
42
|
+
2. Using the `getAuthenticatorFromEnvironment` function to create an authenticator from externally-provided configuration
|
|
43
|
+
|
|
44
|
+
For more information about the various authentication types and how to use them with your services, click [here](Authentication.md).
|
|
45
|
+
|
|
46
|
+
### Examples
|
|
47
|
+
|
|
48
|
+
#### Programmatic
|
|
49
|
+
```js
|
|
50
|
+
import { IamAuthenticator } from 'ibm-cloud-sdk-core';
|
|
51
|
+
|
|
52
|
+
const authenticator = new IamAuthenticator({
|
|
53
|
+
apikey: '{apikey}',
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### External configuration
|
|
58
|
+
```js
|
|
59
|
+
import { getAuthenticatorFromEnvironment } from 'ibm-cloud-sdk-core';
|
|
60
|
+
|
|
61
|
+
// env vars
|
|
62
|
+
// MY_SERVICE_AUTH_TYPE=iam
|
|
63
|
+
// MY_SERVICE_APIKEY=<apikey>
|
|
64
|
+
const iamAuthenticator = getAuthenticatorFromEnvironment('my-service');
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Logging
|
|
68
|
+
This package uses [debug](https://www.npmjs.com/package/debug) for logging.
|
|
69
|
+
|
|
70
|
+
- Logging is disabled by default.
|
|
71
|
+
- Logging has been configured to use log levels which are assumed to be numerically ascending from most important to least important.
|
|
72
|
+
- In order to see the log output, set the environment variable ``DEBUG`` including the desired log level.
|
|
73
|
+
- ```DEBUG=ibm-cloud-sdk-core:error``` enables error logs
|
|
74
|
+
- ```DEBUG=ibm-cloud-sdk-core:warning``` enables warning logs and below
|
|
75
|
+
- ```DEBUG=ibm-cloud-sdk-core:info``` enables info logs and below
|
|
76
|
+
- ```DEBUG=ibm-cloud-sdk-core:verbose``` enables verbose logs and below
|
|
77
|
+
- ```DEBUG=ibm-cloud-sdk-core:debug``` enables debug logs and below
|
|
78
|
+
|
|
79
|
+
To see the output from all of the debugging levels you can use:
|
|
80
|
+
|
|
81
|
+
``DEBUG=ibm-cloud-sdk-core*``
|
|
82
|
+
|
|
83
|
+
The debug logger can be configured to be used for more than one library. In example, you can set a comma-separated string:
|
|
84
|
+
|
|
85
|
+
``DEBUG=ibm-cloud-sdk-core:debug,other-lib:debug``
|
|
86
|
+
|
|
87
|
+
## Cookie Jar Support
|
|
88
|
+
By default, cookies are not supported in the SDK requests. If your SDK would benefit from this functionality, simply edit your code to instantiate a cookie jar (or instruct your users to do so) and pass it in the object containing configuration options to the `BaseService` class, as shown below. If the Boolean value `true` is given for the `jar` field, the SDK core will create a default instance of a [Tough Cookie](https://www.npmjs.com/package/tough-cookie).
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import tough = require('tough-cookie');
|
|
92
|
+
|
|
93
|
+
class MyClass extends BaseService {
|
|
94
|
+
constructor(options: MyOptions) {
|
|
95
|
+
// pass the cookie jar object or simply pass the value `true`
|
|
96
|
+
// and a tough-cookie instance will be created by default
|
|
97
|
+
options.jar = new tough.CookieJar();
|
|
98
|
+
super(options);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Issues
|
|
104
|
+
If you encounter an issue with this project, you are welcome to submit a [bug report](https://github.com/IBM/node-sdk-core/issues).
|
|
105
|
+
Before opening a new issue, please search for similar issues. It's possible that someone has already reported it.
|
|
106
|
+
|
|
107
|
+
## Tests
|
|
108
|
+
Run all test suites:
|
|
109
|
+
```bash
|
|
110
|
+
npm test
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Contributing
|
|
114
|
+
See [CONTRIBUTING](CONTRIBUTING.md).
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
This library is licensed under Apache 2.0. Full license text is
|
|
118
|
+
available in [LICENSE](LICENSE.md).
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"mainEntryPointFilePath": "<projectFolder>/dist/es/index.d.ts",
|
|
4
|
+
"bundledPackages": [],
|
|
5
|
+
"apiReport": {
|
|
6
|
+
"enabled": true
|
|
7
|
+
},
|
|
8
|
+
"docModel": {
|
|
9
|
+
"enabled": true
|
|
10
|
+
},
|
|
11
|
+
"dtsRollup": {
|
|
12
|
+
"enabled": true
|
|
13
|
+
},
|
|
14
|
+
"tsdocMetadata": {
|
|
15
|
+
"enabled": true
|
|
16
|
+
},
|
|
17
|
+
"messages": {
|
|
18
|
+
"compilerMessageReporting": {
|
|
19
|
+
"default": {
|
|
20
|
+
"logLevel": "warning"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
"extractorMessageReporting": {
|
|
25
|
+
"default": {
|
|
26
|
+
"logLevel": "warning"
|
|
27
|
+
},
|
|
28
|
+
"ae-missing-release-tag": {
|
|
29
|
+
"logLevel": "none"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
"tsdocMessageReporting": {
|
|
34
|
+
"default": {
|
|
35
|
+
"logLevel": "warning"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [atLeastOne](./ibm-cloud-sdk-core.atleastone.md)
|
|
4
|
+
|
|
5
|
+
## atLeastOne() function
|
|
6
|
+
|
|
7
|
+
Checks for at least one of two elements being defined.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function atLeastOne(a: any, b: any): boolean;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
a
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
any
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
the first object
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
b
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
any
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
the second object
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
</tbody></table>
|
|
66
|
+
**Returns:**
|
|
67
|
+
|
|
68
|
+
boolean
|
|
69
|
+
|
|
70
|
+
true if a or b is defined; false if both are undefined
|
|
71
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [atMostOne](./ibm-cloud-sdk-core.atmostone.md)
|
|
4
|
+
|
|
5
|
+
## atMostOne() function
|
|
6
|
+
|
|
7
|
+
Verifies that both properties are not specified.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function atMostOne(a: any, b: any): boolean;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
a
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
any
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The first object
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
b
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
any
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
The second object
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
</tbody></table>
|
|
66
|
+
**Returns:**
|
|
67
|
+
|
|
68
|
+
boolean
|
|
69
|
+
|
|
70
|
+
false if a and b are both defined, true otherwise
|
|
71
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [(constructor)](./ibm-cloud-sdk-core.authenticator._constructor_.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.(constructor)
|
|
6
|
+
|
|
7
|
+
Create a new Authenticator instance.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
constructor();
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Exceptions
|
|
16
|
+
|
|
17
|
+
Error: the "new" keyword was not used to construct the authenticator.
|
|
18
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [authenticate](./ibm-cloud-sdk-core.authenticator.authenticate.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.authenticate() method
|
|
6
|
+
|
|
7
|
+
Augment the request with authentication information.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
requestOptions
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
AuthenticateOptions
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The request to augment with authentication information.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
**Returns:**
|
|
51
|
+
|
|
52
|
+
Promise<void>
|
|
53
|
+
|
|
54
|
+
## Exceptions
|
|
55
|
+
|
|
56
|
+
Error: The authenticate method was not implemented by a subclass.
|
|
57
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [authenticationType](./ibm-cloud-sdk-core.authenticator.authenticationtype.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.authenticationType() method
|
|
6
|
+
|
|
7
|
+
Retrieves the authenticator's type. The returned value will be the same string that is used when configuring an instance of the authenticator with the <<!-- -->service\_name<!-- -->><!-- -->\_AUTH\_TYPE configuration property (e.g. "basic", "iam", etc.). This function should be overridden in each authenticator implementation class that extends this class.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
authenticationType(): string;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
string
|
|
17
|
+
|
|
18
|
+
a string that indicates the authenticator's type
|
|
19
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) > [Authenticator](./ibm-cloud-sdk-core.authenticator.md) > [AUTHTYPE\_BASIC](./ibm-cloud-sdk-core.authenticator.authtype_basic.md)
|
|
4
|
+
|
|
5
|
+
## Authenticator.AUTHTYPE\_BASIC property
|
|
6
|
+
|
|
7
|
+
Constants that define the various authenticator types.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static AUTHTYPE_BASIC: string;
|
|
13
|
+
```
|