ibm-cloud-sdk-core 3.2.2-beta-4 → 4.0.0
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 +542 -0
- package/Authentication.md +525 -0
- package/CHANGELOG.md +713 -0
- package/LICENSE.md +201 -0
- package/MIGRATION-V1.md +42 -0
- package/README.md +116 -0
- package/api-extractor.json +39 -0
- package/appscan-config.xml +7 -0
- package/auth/authenticators/basic-authenticator.d.ts +1 -1
- package/auth/authenticators/bearer-token-authenticator.d.ts +1 -1
- package/auth/authenticators/token-request-based-authenticator.d.ts +1 -1
- package/auth/token-managers/container-token-manager.js +1 -1
- package/auth/token-managers/jwt-token-manager.d.ts +1 -1
- package/auth/token-managers/token-manager.d.ts +1 -1
- package/auth/token-managers/vpc-instance-token-manager.js +1 -1
- package/build/docs/ibm-cloud-sdk-core.atleastone.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.atmostone.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator._constructor_.md +18 -0
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +28 -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_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 +41 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticationtype.md +17 -0
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.md +21 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.baseoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.configureservice.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.createrequest.md +26 -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 +24 -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 +44 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setenablegzipcompression.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setserviceurl.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +26 -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 +39 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticate.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.md +39 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.bearertokenauthenticator.setbearertoken.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.checkcredentials.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.cloudpakfordataauthenticator.md +38 -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 +27 -0
- package/build/docs/ibm-cloud-sdk-core.constructfilepath.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.constructserviceurl.md +28 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.md +40 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setcrtokenfilename.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofileid.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.setiamprofilename.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containerauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.md +30 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setcrtokenfilename.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofileid.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.containertokenmanager.setiamprofilename.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.contenttype.md +14 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.cp4dtokenmanager.md +35 -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 +22 -0
- package/build/docs/ibm-cloud-sdk-core.fileobject.md +27 -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 +19 -0
- package/build/docs/ibm-cloud-sdk-core.filestream.md +19 -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 +20 -0
- package/build/docs/ibm-cloud-sdk-core.getauthenticatorfromenvironment.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.getcurrenttime.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.getformat.md +29 -0
- package/build/docs/ibm-cloud-sdk-core.getmissingparams.md +29 -0
- package/build/docs/ibm-cloud-sdk-core.getnewlogger.md +30 -0
- package/build/docs/ibm-cloud-sdk-core.getqueryparam.md +31 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator._constructor_.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.iamauthenticator.md +38 -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 +24 -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 +38 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.scope.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setclientidandsecret.md +25 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.setscope.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager._constructor_.md +20 -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.md +38 -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 +26 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setclientidandsecret.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestbasedtokenmanager.setscope.md +26 -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 +23 -0
- package/build/docs/ibm-cloud-sdk-core.iamrequestoptions.scope.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.md +27 -0
- package/build/docs/ibm-cloud-sdk-core.iamtokenmanager.requiredoptions.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.isemptyobject.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.isfiledata.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.isfilewithmetadata.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.ishtml.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.md +35 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.requesttoken.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.jwttokenmanager.savetokeninfo.md +26 -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.md +96 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticate.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.noauthauthenticator.md +22 -0
- package/build/docs/ibm-cloud-sdk-core.onlyone.md +27 -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 +22 -0
- package/build/docs/ibm-cloud-sdk-core.readexternalsources.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.removesuffix.md +27 -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 +22 -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 +24 -0
- package/build/docs/ibm-cloud-sdk-core.striptrailingslash.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager._constructor_.md +20 -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.md +43 -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 +26 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setdisablesslverification.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.setheaders.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanager.url.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.tokenmanageroptions.md +18 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.authenticate.md +26 -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 +42 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setdisablesslverification.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.setheaders.md +24 -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 +26 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkforsuccessfulexecution.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkmediaheaders.md +28 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkurlandmethod.md +28 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.checkuserheader.md +28 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.expecttobepromise.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.getoptions.md +26 -0
- package/build/docs/ibm-cloud-sdk-core.unittestutils.md +17 -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 +26 -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 +23 -0
- package/build/docs/ibm-cloud-sdk-core.validateparams.md +30 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.authenticationtype.md +19 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.md +39 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofilecrn.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.setiamprofileid.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstanceauthenticator.tokenmanager.md +11 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager._constructor_.md +20 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.md +29 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.requesttoken.md +15 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofilecrn.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.vpcinstancetokenmanager.setiamprofileid.md +24 -0
- package/build/docs/index.md +12 -0
- package/docs/ibm-cloud-sdk-core.api.json +2 -2
- package/es/auth/authenticators/basic-authenticator.d.ts +1 -1
- package/es/auth/authenticators/bearer-token-authenticator.d.ts +1 -1
- package/es/auth/authenticators/token-request-based-authenticator.d.ts +1 -1
- package/es/auth/token-managers/jwt-token-manager.d.ts +1 -1
- package/es/auth/token-managers/token-manager.d.ts +1 -1
- package/es/lib/cookie-support.js +3 -4
- package/es/lib/request-wrapper.js +4 -2
- package/es/tsdoc-metadata.json +11 -0
- package/etc/ibm-cloud-sdk-core.api.md +483 -0
- package/lib/cookie-support.js +24 -24
- package/lib/helper.js +1 -1
- package/lib/request-wrapper.js +6 -6
- package/package.json +3 -37
- package/temp/ibm-cloud-sdk-core.api.json +7571 -0
- package/temp/ibm-cloud-sdk-core.api.md +483 -0
- package/tsconfig-es6.json +9 -0
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
## API Report File for "ibm-cloud-sdk-core"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
/// <reference types="node" />
|
|
8
|
+
|
|
9
|
+
import { AxiosInstance } from 'axios';
|
|
10
|
+
import type { CookieJar } from 'tough-cookie';
|
|
11
|
+
import { Debugger } from 'debug';
|
|
12
|
+
import { OutgoingHttpHeaders } from 'http';
|
|
13
|
+
import { Stream } from 'stream';
|
|
14
|
+
|
|
15
|
+
// @public
|
|
16
|
+
export function atLeastOne(a: any, b: any): boolean;
|
|
17
|
+
|
|
18
|
+
// @public
|
|
19
|
+
export function atMostOne(a: any, b: any): boolean;
|
|
20
|
+
|
|
21
|
+
// @public
|
|
22
|
+
export class Authenticator implements AuthenticatorInterface {
|
|
23
|
+
constructor();
|
|
24
|
+
// Warning: (ae-forgotten-export) The symbol "AuthenticateOptions" needs to be exported by the entry point index.d.ts
|
|
25
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
26
|
+
authenticationType(): string;
|
|
27
|
+
static AUTHTYPE_BASIC: string;
|
|
28
|
+
// (undocumented)
|
|
29
|
+
static AUTHTYPE_BEARERTOKEN: string;
|
|
30
|
+
// (undocumented)
|
|
31
|
+
static AUTHTYPE_CONTAINER: string;
|
|
32
|
+
// (undocumented)
|
|
33
|
+
static AUTHTYPE_CP4D: string;
|
|
34
|
+
// (undocumented)
|
|
35
|
+
static AUTHTYPE_IAM: string;
|
|
36
|
+
// (undocumented)
|
|
37
|
+
static AUTHTYPE_NOAUTH: string;
|
|
38
|
+
// (undocumented)
|
|
39
|
+
static AUTHTYPE_UNKNOWN: string;
|
|
40
|
+
// (undocumented)
|
|
41
|
+
static AUTHTYPE_VPC: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// @public
|
|
45
|
+
export interface AuthenticatorInterface {
|
|
46
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
47
|
+
authenticationType(): string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// @public
|
|
51
|
+
export class BaseService {
|
|
52
|
+
constructor(userOptions: UserOptions);
|
|
53
|
+
// Warning: (ae-forgotten-export) The symbol "BaseServiceOptions" needs to be exported by the entry point index.d.ts
|
|
54
|
+
//
|
|
55
|
+
// (undocumented)
|
|
56
|
+
protected baseOptions: BaseServiceOptions;
|
|
57
|
+
protected configureService(serviceName: string): void;
|
|
58
|
+
protected createRequest(parameters: any): Promise<any>;
|
|
59
|
+
// (undocumented)
|
|
60
|
+
static DEFAULT_SERVICE_NAME: string;
|
|
61
|
+
// (undocumented)
|
|
62
|
+
static DEFAULT_SERVICE_URL: string;
|
|
63
|
+
disableRetries(): void;
|
|
64
|
+
// Warning: (ae-forgotten-export) The symbol "RetryOptions" needs to be exported by the entry point index.d.ts
|
|
65
|
+
enableRetries(retryOptions?: RetryOptions): void;
|
|
66
|
+
getAuthenticator(): any;
|
|
67
|
+
getHttpClient(): AxiosInstance;
|
|
68
|
+
setDefaultHeaders(headers: OutgoingHttpHeaders): void;
|
|
69
|
+
setEnableGzipCompression(setting: boolean): void;
|
|
70
|
+
setServiceUrl(url: string): void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// @public
|
|
74
|
+
export class BasicAuthenticator extends Authenticator {
|
|
75
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
76
|
+
constructor(options: Options);
|
|
77
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
78
|
+
authenticationType(): string;
|
|
79
|
+
// (undocumented)
|
|
80
|
+
protected authHeader: {
|
|
81
|
+
Authorization: string;
|
|
82
|
+
};
|
|
83
|
+
// (undocumented)
|
|
84
|
+
protected requiredOptions: string[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// @public
|
|
88
|
+
export class BearerTokenAuthenticator extends Authenticator {
|
|
89
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
90
|
+
constructor(options: Options_2);
|
|
91
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
92
|
+
authenticationType(): string;
|
|
93
|
+
// (undocumented)
|
|
94
|
+
protected requiredOptions: string[];
|
|
95
|
+
setBearerToken(bearerToken: string): void;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// @public
|
|
99
|
+
export function buildRequestFileObject(fileParam: FileWithMetadata): Promise<FileObject>;
|
|
100
|
+
|
|
101
|
+
// @public
|
|
102
|
+
export function checkCredentials(obj: any, credsToCheck: string[]): Error | null;
|
|
103
|
+
|
|
104
|
+
// @public
|
|
105
|
+
function checkForSuccessfulExecution(createRequestMock: any): void;
|
|
106
|
+
|
|
107
|
+
// @public
|
|
108
|
+
function checkMediaHeaders(createRequestMock: any, accept: string, contentType: string): void;
|
|
109
|
+
|
|
110
|
+
// @public
|
|
111
|
+
function checkUrlAndMethod(options: any, url: string, method: any): void;
|
|
112
|
+
|
|
113
|
+
// @public
|
|
114
|
+
function checkUserHeader(createRequestMock: any, userHeaderName: string, userHeaderValue: string): void;
|
|
115
|
+
|
|
116
|
+
// @public
|
|
117
|
+
export class CloudPakForDataAuthenticator extends TokenRequestBasedAuthenticator {
|
|
118
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
119
|
+
constructor(options: Options_4);
|
|
120
|
+
authenticationType(): string;
|
|
121
|
+
// (undocumented)
|
|
122
|
+
protected requiredOptions: string[];
|
|
123
|
+
// (undocumented)
|
|
124
|
+
protected tokenManager: Cp4dTokenManager;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// @public
|
|
128
|
+
export function computeBasicAuthHeader(username: string, password: string): string;
|
|
129
|
+
|
|
130
|
+
// @public (undocumented)
|
|
131
|
+
export function constructFilepath(filepath: string): string;
|
|
132
|
+
|
|
133
|
+
// @public
|
|
134
|
+
export function constructServiceUrl(parameterizedUrl: string, defaultUrlVariables: Map<string, string>, providedUrlVariables: Map<string, string> | null): string;
|
|
135
|
+
|
|
136
|
+
// @public
|
|
137
|
+
export class ContainerAuthenticator extends IamRequestBasedAuthenticator {
|
|
138
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
139
|
+
constructor(options: Options_8);
|
|
140
|
+
authenticationType(): string;
|
|
141
|
+
setCrTokenFilename(crTokenFilename: string): void;
|
|
142
|
+
setIamProfileId(iamProfileId: string): void;
|
|
143
|
+
setIamProfileName(iamProfileName: string): void;
|
|
144
|
+
// (undocumented)
|
|
145
|
+
protected tokenManager: ContainerTokenManager;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// @public
|
|
149
|
+
export class ContainerTokenManager extends IamRequestBasedTokenManager {
|
|
150
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
151
|
+
constructor(options: Options_7);
|
|
152
|
+
protected requestToken(): Promise<any>;
|
|
153
|
+
setCrTokenFilename(crTokenFilename: string): void;
|
|
154
|
+
setIamProfileId(iamProfileId: string): void;
|
|
155
|
+
setIamProfileName(iamProfileName: string): void;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// @public (undocumented)
|
|
159
|
+
export const contentType: {
|
|
160
|
+
fromFilename: (file: String | File | FileObject | NodeJS.ReadableStream | Buffer) => string;
|
|
161
|
+
fromHeader: (buffer: Buffer) => string;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// @public
|
|
165
|
+
export class Cp4dTokenManager extends JwtTokenManager {
|
|
166
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
167
|
+
constructor(options: Options_3);
|
|
168
|
+
// (undocumented)
|
|
169
|
+
protected requestToken(): Promise<any>;
|
|
170
|
+
// (undocumented)
|
|
171
|
+
protected requiredOptions: string[];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// @public
|
|
175
|
+
function expectToBePromise(sdkPromise: any): void;
|
|
176
|
+
|
|
177
|
+
// @public (undocumented)
|
|
178
|
+
export function fileExistsAtPath(filepath: string): boolean;
|
|
179
|
+
|
|
180
|
+
// @public
|
|
181
|
+
export interface FileObject {
|
|
182
|
+
// (undocumented)
|
|
183
|
+
options?: FileOptions;
|
|
184
|
+
// (undocumented)
|
|
185
|
+
value: NodeJS.ReadableStream | Buffer | string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// @public (undocumented)
|
|
189
|
+
export interface FileOptions {
|
|
190
|
+
// (undocumented)
|
|
191
|
+
contentType?: string;
|
|
192
|
+
// (undocumented)
|
|
193
|
+
filename?: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// @public (undocumented)
|
|
197
|
+
export interface FileStream extends NodeJS.ReadableStream {
|
|
198
|
+
// (undocumented)
|
|
199
|
+
path: string | Buffer;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// @public (undocumented)
|
|
203
|
+
export interface FileWithMetadata {
|
|
204
|
+
// (undocumented)
|
|
205
|
+
contentType: string;
|
|
206
|
+
// (undocumented)
|
|
207
|
+
data: NodeJS.ReadableStream | Buffer;
|
|
208
|
+
// (undocumented)
|
|
209
|
+
filename: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// @public
|
|
213
|
+
export function getAuthenticatorFromEnvironment(serviceName: string): Authenticator;
|
|
214
|
+
|
|
215
|
+
// @public
|
|
216
|
+
export function getContentType(inputData: NodeJS.ReadableStream | Buffer): Promise<string>;
|
|
217
|
+
|
|
218
|
+
// @public
|
|
219
|
+
export function getCurrentTime(): number;
|
|
220
|
+
|
|
221
|
+
// @public
|
|
222
|
+
export function getFormat(params: {
|
|
223
|
+
[key: string]: any;
|
|
224
|
+
}, formats: string[]): string;
|
|
225
|
+
|
|
226
|
+
// @public
|
|
227
|
+
export function getMissingParams(params: {
|
|
228
|
+
[key: string]: any;
|
|
229
|
+
}, requires: string[]): null | Error;
|
|
230
|
+
|
|
231
|
+
// @public
|
|
232
|
+
export function getNewLogger(moduleName: string): SDKLogger;
|
|
233
|
+
|
|
234
|
+
// @public
|
|
235
|
+
function getOptions(createRequestMock: any): any;
|
|
236
|
+
|
|
237
|
+
// @public
|
|
238
|
+
export function getQueryParam(urlStr: string, param: string): string;
|
|
239
|
+
|
|
240
|
+
// @public
|
|
241
|
+
export class IamAuthenticator extends IamRequestBasedAuthenticator {
|
|
242
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
243
|
+
constructor(options: Options_6);
|
|
244
|
+
authenticationType(): string;
|
|
245
|
+
// (undocumented)
|
|
246
|
+
protected requiredOptions: string[];
|
|
247
|
+
// (undocumented)
|
|
248
|
+
protected tokenManager: IamTokenManager;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// @public
|
|
252
|
+
export class IamRequestBasedAuthenticator extends TokenRequestBasedAuthenticator {
|
|
253
|
+
// Warning: (ae-forgotten-export) The symbol "IamRequestOptions" needs to be exported by the entry point index.d.ts
|
|
254
|
+
constructor(options: IamRequestOptions_2);
|
|
255
|
+
// (undocumented)
|
|
256
|
+
protected clientId: string;
|
|
257
|
+
// (undocumented)
|
|
258
|
+
protected clientSecret: string;
|
|
259
|
+
getRefreshToken(): string;
|
|
260
|
+
// (undocumented)
|
|
261
|
+
protected scope: string;
|
|
262
|
+
setClientIdAndSecret(clientId: string, clientSecret: string): void;
|
|
263
|
+
setScope(scope: string): void;
|
|
264
|
+
// (undocumented)
|
|
265
|
+
protected tokenManager: IamRequestBasedTokenManager;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// @public
|
|
269
|
+
export class IamRequestBasedTokenManager extends JwtTokenManager {
|
|
270
|
+
constructor(options: IamRequestOptions);
|
|
271
|
+
// (undocumented)
|
|
272
|
+
protected formData: any;
|
|
273
|
+
getRefreshToken(): string;
|
|
274
|
+
// (undocumented)
|
|
275
|
+
protected refreshToken: string;
|
|
276
|
+
protected requestToken(): Promise<any>;
|
|
277
|
+
protected saveTokenInfo(tokenResponse: any): void;
|
|
278
|
+
setClientIdAndSecret(clientId: string, clientSecret: string): void;
|
|
279
|
+
setScope(scope: string): void;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// @public
|
|
283
|
+
export interface IamRequestOptions extends JwtTokenManagerOptions {
|
|
284
|
+
// (undocumented)
|
|
285
|
+
clientId?: string;
|
|
286
|
+
// (undocumented)
|
|
287
|
+
clientSecret?: string;
|
|
288
|
+
// (undocumented)
|
|
289
|
+
scope?: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// @public
|
|
293
|
+
export class IamTokenManager extends IamRequestBasedTokenManager {
|
|
294
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
295
|
+
constructor(options: Options_5);
|
|
296
|
+
// (undocumented)
|
|
297
|
+
protected requiredOptions: string[];
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// @public (undocumented)
|
|
301
|
+
export function isEmptyObject(obj: any): boolean;
|
|
302
|
+
|
|
303
|
+
// @public (undocumented)
|
|
304
|
+
export function isFileData(obj: any): obj is NodeJS.ReadableStream | Buffer;
|
|
305
|
+
|
|
306
|
+
// @public (undocumented)
|
|
307
|
+
export function isFileWithMetadata(obj: any): obj is FileWithMetadata;
|
|
308
|
+
|
|
309
|
+
// @public
|
|
310
|
+
export function isHTML(text: string): boolean;
|
|
311
|
+
|
|
312
|
+
// @public
|
|
313
|
+
export class JwtTokenManager extends TokenManager {
|
|
314
|
+
constructor(options: JwtTokenManagerOptions);
|
|
315
|
+
protected requestToken(): Promise<any>;
|
|
316
|
+
protected saveTokenInfo(tokenResponse: any): void;
|
|
317
|
+
// (undocumented)
|
|
318
|
+
protected tokenInfo: any;
|
|
319
|
+
// (undocumented)
|
|
320
|
+
protected tokenName: string;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// @public
|
|
324
|
+
export type JwtTokenManagerOptions = TokenManagerOptions;
|
|
325
|
+
|
|
326
|
+
// @public
|
|
327
|
+
export class NoAuthAuthenticator extends Authenticator {
|
|
328
|
+
// (undocumented)
|
|
329
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
330
|
+
authenticationType(): string;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
// @public
|
|
334
|
+
export function onlyOne(a: any, b: any): boolean;
|
|
335
|
+
|
|
336
|
+
// @public
|
|
337
|
+
export const qs: {
|
|
338
|
+
stringify: (queryParams: Object) => string;
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
// @public
|
|
342
|
+
export function readCredentialsFile(): any;
|
|
343
|
+
|
|
344
|
+
// @public (undocumented)
|
|
345
|
+
export function readCrTokenFile(filepath: string): string;
|
|
346
|
+
|
|
347
|
+
// @public
|
|
348
|
+
export function readExternalSources(serviceName: string): any;
|
|
349
|
+
|
|
350
|
+
// @public
|
|
351
|
+
export function removeSuffix(str: string, suffix: string): string;
|
|
352
|
+
|
|
353
|
+
// @public (undocumented)
|
|
354
|
+
export interface SDKLogger {
|
|
355
|
+
// (undocumented)
|
|
356
|
+
debug: Debugger;
|
|
357
|
+
// (undocumented)
|
|
358
|
+
error: Debugger;
|
|
359
|
+
// (undocumented)
|
|
360
|
+
info: Debugger;
|
|
361
|
+
// (undocumented)
|
|
362
|
+
verbose: Debugger;
|
|
363
|
+
// (undocumented)
|
|
364
|
+
warn: Debugger;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// @public
|
|
368
|
+
export function streamToPromise(stream: Stream): Promise<any>;
|
|
369
|
+
|
|
370
|
+
// @public (undocumented)
|
|
371
|
+
export function stripTrailingSlash(url: string): string;
|
|
372
|
+
|
|
373
|
+
// @public
|
|
374
|
+
export class TokenManager {
|
|
375
|
+
constructor(options: TokenManagerOptions);
|
|
376
|
+
// (undocumented)
|
|
377
|
+
protected accessToken: string;
|
|
378
|
+
// (undocumented)
|
|
379
|
+
protected disableSslVerification: boolean;
|
|
380
|
+
// (undocumented)
|
|
381
|
+
protected expireTime: number;
|
|
382
|
+
getToken(): Promise<any>;
|
|
383
|
+
// (undocumented)
|
|
384
|
+
protected headers: OutgoingHttpHeaders;
|
|
385
|
+
protected pacedRequestToken(): Promise<any>;
|
|
386
|
+
// (undocumented)
|
|
387
|
+
protected refreshTime: number;
|
|
388
|
+
protected requestToken(): Promise<any>;
|
|
389
|
+
// Warning: (ae-forgotten-export) The symbol "RequestWrapper" needs to be exported by the entry point index.d.ts
|
|
390
|
+
//
|
|
391
|
+
// (undocumented)
|
|
392
|
+
protected requestWrapperInstance: RequestWrapper;
|
|
393
|
+
protected saveTokenInfo(tokenResponse: any): void;
|
|
394
|
+
setDisableSslVerification(value: boolean): void;
|
|
395
|
+
setHeaders(headers: OutgoingHttpHeaders): void;
|
|
396
|
+
// (undocumented)
|
|
397
|
+
protected url: string;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// @public
|
|
401
|
+
export type TokenManagerOptions = {
|
|
402
|
+
url?: string;
|
|
403
|
+
headers?: OutgoingHttpHeaders;
|
|
404
|
+
disableSslVerification?: boolean;
|
|
405
|
+
[propName: string]: any;
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
// @public
|
|
409
|
+
export class TokenRequestBasedAuthenticator extends Authenticator {
|
|
410
|
+
// Warning: (ae-forgotten-export) The symbol "BaseOptions" needs to be exported by the entry point index.d.ts
|
|
411
|
+
constructor(options: BaseOptions);
|
|
412
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
413
|
+
// (undocumented)
|
|
414
|
+
protected disableSslVerification: boolean;
|
|
415
|
+
// (undocumented)
|
|
416
|
+
protected headers: OutgoingHttpHeaders;
|
|
417
|
+
setDisableSslVerification(value: boolean): void;
|
|
418
|
+
setHeaders(headers: OutgoingHttpHeaders): void;
|
|
419
|
+
// (undocumented)
|
|
420
|
+
protected tokenManager: JwtTokenManager;
|
|
421
|
+
// (undocumented)
|
|
422
|
+
protected url: string;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// @public
|
|
426
|
+
export function toLowerKeys(obj: Object): Object;
|
|
427
|
+
|
|
428
|
+
declare namespace unitTestUtils {
|
|
429
|
+
export {
|
|
430
|
+
checkUrlAndMethod,
|
|
431
|
+
checkMediaHeaders,
|
|
432
|
+
checkUserHeader,
|
|
433
|
+
checkForSuccessfulExecution,
|
|
434
|
+
getOptions,
|
|
435
|
+
expectToBePromise
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
export { unitTestUtils }
|
|
439
|
+
|
|
440
|
+
// @public
|
|
441
|
+
export interface UserOptions {
|
|
442
|
+
[propName: string]: any;
|
|
443
|
+
authenticator?: AuthenticatorInterface;
|
|
444
|
+
disableSslVerification?: boolean;
|
|
445
|
+
headers?: OutgoingHttpHeaders;
|
|
446
|
+
jar?: CookieJar | boolean;
|
|
447
|
+
serviceUrl?: string;
|
|
448
|
+
url?: string;
|
|
449
|
+
version?: string;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// @public (undocumented)
|
|
453
|
+
export function validateInput(options: any, requiredOptions: string[]): void;
|
|
454
|
+
|
|
455
|
+
// @public
|
|
456
|
+
export function validateParams(params: {
|
|
457
|
+
[key: string]: any;
|
|
458
|
+
}, requiredParams: string[], allParams: string[]): null | Error;
|
|
459
|
+
|
|
460
|
+
// @public
|
|
461
|
+
export class VpcInstanceAuthenticator extends TokenRequestBasedAuthenticator {
|
|
462
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
463
|
+
constructor(options: Options_10);
|
|
464
|
+
authenticationType(): string;
|
|
465
|
+
setIamProfileCrn(iamProfileCrn: string): void;
|
|
466
|
+
setIamProfileId(iamProfileId: string): void;
|
|
467
|
+
// (undocumented)
|
|
468
|
+
protected tokenManager: VpcInstanceTokenManager;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// @public
|
|
472
|
+
export class VpcInstanceTokenManager extends JwtTokenManager {
|
|
473
|
+
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
474
|
+
constructor(options: Options_9);
|
|
475
|
+
// (undocumented)
|
|
476
|
+
protected requestToken(): Promise<any>;
|
|
477
|
+
setIamProfileCrn(iamProfileCrn: string): void;
|
|
478
|
+
setIamProfileId(iamProfileId: string): void;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
// (No @packageDocumentation comment for this package)
|
|
482
|
+
|
|
483
|
+
```
|
package/lib/cookie-support.js
CHANGED
|
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
|
@@ -108,31 +108,31 @@ var CookieInterceptor = /** @class */ (function () {
|
|
|
108
108
|
var cookies;
|
|
109
109
|
var _this = this;
|
|
110
110
|
return __generator(this, function (_a) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
else {
|
|
111
|
+
switch (_a.label) {
|
|
112
|
+
case 0:
|
|
113
|
+
logger_1.default.debug('CookieInterceptor: intercepting response.');
|
|
114
|
+
if (!(response && response.headers)) return [3 /*break*/, 4];
|
|
115
|
+
logger_1.default.debug('CookieInterceptor: checking for set-cookie headers.');
|
|
116
|
+
cookies = response.headers['set-cookie'];
|
|
117
|
+
if (!cookies) return [3 /*break*/, 2];
|
|
118
|
+
logger_1.default.debug("CookieInterceptor: setting cookies in jar for URL ".concat(response.config.url, "."));
|
|
119
|
+
// Write cookies sequentially by chaining the promises in a reduce
|
|
120
|
+
return [4 /*yield*/, cookies.reduce(function (cookiePromise, cookie) {
|
|
121
|
+
return cookiePromise.then(function () { return _this.cookieJar.setCookie(cookie, response.config.url); });
|
|
122
|
+
}, Promise.resolve(null))];
|
|
123
|
+
case 1:
|
|
124
|
+
// Write cookies sequentially by chaining the promises in a reduce
|
|
125
|
+
_a.sent();
|
|
126
|
+
return [3 /*break*/, 3];
|
|
127
|
+
case 2:
|
|
129
128
|
logger_1.default.debug('CookieInterceptor: no set-cookie headers.');
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
_a.label = 3;
|
|
130
|
+
case 3: return [3 /*break*/, 5];
|
|
131
|
+
case 4:
|
|
132
|
+
logger_1.default.debug('CookieInterceptor: no response headers.');
|
|
133
|
+
_a.label = 5;
|
|
134
|
+
case 5: return [2 /*return*/, response];
|
|
134
135
|
}
|
|
135
|
-
return [2 /*return*/, response];
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
};
|
package/lib/helper.js
CHANGED
|
@@ -29,7 +29,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
29
29
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
30
|
function step(op) {
|
|
31
31
|
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
33
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
34
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
35
|
switch (op[0]) {
|
package/lib/request-wrapper.js
CHANGED
|
@@ -49,7 +49,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
49
49
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
50
50
|
function step(op) {
|
|
51
51
|
if (f) throw new TypeError("Generator is already executing.");
|
|
52
|
-
while (_) try {
|
|
52
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
53
53
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
54
54
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
55
55
|
switch (op[0]) {
|
|
@@ -141,12 +141,12 @@ var RequestWrapper = /** @class */ (function () {
|
|
|
141
141
|
// if a cookie jar is provided, wrap the axios instance and update defaults
|
|
142
142
|
if (axiosOptions.jar) {
|
|
143
143
|
var cookieInterceptor_1 = new cookie_support_1.CookieInterceptor(axiosOptions.jar);
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
this.axiosInstance.interceptors.response.use(function (response) {
|
|
144
|
+
var requestCookieInterceptor = function (config) { return cookieInterceptor_1.requestInterceptor(config); };
|
|
145
|
+
var responseCookieInterceptor = function (response) {
|
|
148
146
|
return cookieInterceptor_1.responseInterceptor(response);
|
|
149
|
-
}
|
|
147
|
+
};
|
|
148
|
+
this.axiosInstance.interceptors.request.use(requestCookieInterceptor);
|
|
149
|
+
this.axiosInstance.interceptors.response.use(responseCookieInterceptor);
|
|
150
150
|
}
|
|
151
151
|
// get retry config properties and conditionally enable retries
|
|
152
152
|
if (axiosOptions.enableRetries) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ibm-cloud-sdk-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "index.js",
|
|
6
6
|
"typings": "./es/index.d.ts",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"repository": {
|
|
@@ -37,40 +37,6 @@
|
|
|
37
37
|
"bugs": {
|
|
38
38
|
"url": "https://github.com/IBM/node-sdk-core/issues"
|
|
39
39
|
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@commitlint/cli": "^12.0.1",
|
|
42
|
-
"@commitlint/config-conventional": "^7.0.1",
|
|
43
|
-
"@masterodin/publisher": "^0.10.0",
|
|
44
|
-
"@microsoft/api-documenter": "^7.17.0",
|
|
45
|
-
"@microsoft/api-extractor": "^7.20.0",
|
|
46
|
-
"@semantic-release/changelog": "6.0.1",
|
|
47
|
-
"@semantic-release/git": "10.0.1",
|
|
48
|
-
"@types/debug": "^4.1.7",
|
|
49
|
-
"@types/extend": "^3.0.1",
|
|
50
|
-
"@types/lodash.isempty": "^4.4.6",
|
|
51
|
-
"@types/mime-types": "^2.1.1",
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "^4.24.0",
|
|
53
|
-
"@typescript-eslint/parser": "^4.24.0",
|
|
54
|
-
"dependency-lint": "~5.0.1",
|
|
55
|
-
"eslint": "^7.26.0",
|
|
56
|
-
"eslint-config-airbnb-base": "^14.2.1",
|
|
57
|
-
"eslint-config-airbnb-typescript": "^12.3.1",
|
|
58
|
-
"eslint-config-prettier": "^8.3.0",
|
|
59
|
-
"eslint-plugin-import": "^2.23.2",
|
|
60
|
-
"eslint-plugin-jest": "^24.3.6",
|
|
61
|
-
"eslint-plugin-jsdoc": "^34.6.3",
|
|
62
|
-
"eslint-plugin-node": "^9.0.0",
|
|
63
|
-
"eslint-plugin-prettier": "^3.0.1",
|
|
64
|
-
"jest": "^29.3.1",
|
|
65
|
-
"nock": "^13.1.2",
|
|
66
|
-
"npm-run-all": "^4.1.5",
|
|
67
|
-
"object.assign": "~4.1.0",
|
|
68
|
-
"package-json-reducer": "^1.0.18",
|
|
69
|
-
"prettier": "~2.3.0",
|
|
70
|
-
"rimraf": "^3.0.2",
|
|
71
|
-
"semantic-release": "19.0.3",
|
|
72
|
-
"typescript": "4.8.4"
|
|
73
|
-
},
|
|
74
40
|
"dependencies": {
|
|
75
41
|
"@types/file-type": "~5.2.1",
|
|
76
42
|
"@types/isstream": "^0.1.0",
|
|
@@ -130,4 +96,4 @@
|
|
|
130
96
|
"coverageDirectory": "./coverage/",
|
|
131
97
|
"testEnvironment": "node"
|
|
132
98
|
}
|
|
133
|
-
}
|
|
99
|
+
}
|