ibm-cloud-sdk-core 2.17.15 → 3.1.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/CHANGELOG.md +31 -0
- package/auth/authenticators/authenticator-interface.d.ts +1 -1
- package/auth/authenticators/authenticator.d.ts +1 -1
- package/auth/authenticators/basic-authenticator.d.ts +1 -1
- package/auth/authenticators/token-request-based-authenticator.d.ts +1 -1
- package/build/docs/ibm-cloud-sdk-core.authenticator.authenticate.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.authenticatorinterface.authenticate.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.baseservice.md +1 -0
- package/build/docs/ibm-cloud-sdk-core.baseservice.setdefaultheaders.md +24 -0
- package/build/docs/ibm-cloud-sdk-core.basicauthenticator.authenticate.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.buildrequestfileobject.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.contenttype.md +1 -1
- package/build/docs/ibm-cloud-sdk-core.getcontenttype.md +2 -2
- package/build/docs/ibm-cloud-sdk-core.tokenrequestbasedauthenticator.authenticate.md +2 -2
- package/docs/ibm-cloud-sdk-core.api.json +80 -51
- package/es/auth/authenticators/authenticator-interface.d.ts +1 -1
- package/es/auth/authenticators/authenticator.d.ts +1 -1
- package/es/auth/authenticators/basic-authenticator.d.ts +1 -1
- package/es/auth/authenticators/token-request-based-authenticator.d.ts +1 -1
- package/es/lib/base-service.d.ts +6 -0
- package/es/lib/base-service.js +12 -0
- package/es/lib/content-type.d.ts +1 -1
- package/es/lib/helper.d.ts +2 -2
- package/es/lib/helper.js +62 -48
- package/es/lib/request-wrapper.js +3 -3
- package/etc/ibm-cloud-sdk-core.api.md +8 -7
- package/ibm-cloud-sdk-core.d.ts +13 -7
- package/lib/base-service.d.ts +6 -0
- package/lib/base-service.js +12 -0
- package/lib/content-type.d.ts +1 -1
- package/lib/helper.d.ts +2 -2
- package/lib/helper.js +104 -50
- package/lib/request-wrapper.js +25 -16
- package/package.json +2 -2
- package/temp/ibm-cloud-sdk-core.api.json +80 -51
- package/temp/ibm-cloud-sdk-core.api.md +8 -7
|
@@ -350,16 +350,7 @@
|
|
|
350
350
|
},
|
|
351
351
|
{
|
|
352
352
|
"kind": "Content",
|
|
353
|
-
"text": "<void
|
|
354
|
-
},
|
|
355
|
-
{
|
|
356
|
-
"kind": "Reference",
|
|
357
|
-
"text": "Error",
|
|
358
|
-
"canonicalReference": "!Error:interface"
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"kind": "Content",
|
|
362
|
-
"text": ">"
|
|
353
|
+
"text": "<void>"
|
|
363
354
|
},
|
|
364
355
|
{
|
|
365
356
|
"kind": "Content",
|
|
@@ -370,7 +361,7 @@
|
|
|
370
361
|
"isStatic": false,
|
|
371
362
|
"returnTypeTokenRange": {
|
|
372
363
|
"startIndex": 3,
|
|
373
|
-
"endIndex":
|
|
364
|
+
"endIndex": 5
|
|
374
365
|
},
|
|
375
366
|
"releaseTag": "Public",
|
|
376
367
|
"overloadIndex": 1,
|
|
@@ -677,16 +668,7 @@
|
|
|
677
668
|
},
|
|
678
669
|
{
|
|
679
670
|
"kind": "Content",
|
|
680
|
-
"text": "<void
|
|
681
|
-
},
|
|
682
|
-
{
|
|
683
|
-
"kind": "Reference",
|
|
684
|
-
"text": "Error",
|
|
685
|
-
"canonicalReference": "!Error:interface"
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
"kind": "Content",
|
|
689
|
-
"text": ">"
|
|
671
|
+
"text": "<void>"
|
|
690
672
|
},
|
|
691
673
|
{
|
|
692
674
|
"kind": "Content",
|
|
@@ -696,7 +678,7 @@
|
|
|
696
678
|
"isOptional": false,
|
|
697
679
|
"returnTypeTokenRange": {
|
|
698
680
|
"startIndex": 3,
|
|
699
|
-
"endIndex":
|
|
681
|
+
"endIndex": 5
|
|
700
682
|
},
|
|
701
683
|
"releaseTag": "Public",
|
|
702
684
|
"overloadIndex": 1,
|
|
@@ -1106,6 +1088,53 @@
|
|
|
1106
1088
|
"parameters": [],
|
|
1107
1089
|
"name": "getHttpClient"
|
|
1108
1090
|
},
|
|
1091
|
+
{
|
|
1092
|
+
"kind": "Method",
|
|
1093
|
+
"canonicalReference": "ibm-cloud-sdk-core!BaseService#setDefaultHeaders:member(1)",
|
|
1094
|
+
"docComment": "/**\n * Set the HTTP headers to be sent in every request.\n *\n * @param headers - The map of headers to include in requests.\n */\n",
|
|
1095
|
+
"excerptTokens": [
|
|
1096
|
+
{
|
|
1097
|
+
"kind": "Content",
|
|
1098
|
+
"text": "setDefaultHeaders(headers: "
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"kind": "Reference",
|
|
1102
|
+
"text": "OutgoingHttpHeaders",
|
|
1103
|
+
"canonicalReference": "!\"\\\"http\\\"\".OutgoingHttpHeaders:interface"
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"kind": "Content",
|
|
1107
|
+
"text": "): "
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
"kind": "Content",
|
|
1111
|
+
"text": "void"
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"kind": "Content",
|
|
1115
|
+
"text": ";"
|
|
1116
|
+
}
|
|
1117
|
+
],
|
|
1118
|
+
"isOptional": false,
|
|
1119
|
+
"isStatic": false,
|
|
1120
|
+
"returnTypeTokenRange": {
|
|
1121
|
+
"startIndex": 3,
|
|
1122
|
+
"endIndex": 4
|
|
1123
|
+
},
|
|
1124
|
+
"releaseTag": "Public",
|
|
1125
|
+
"overloadIndex": 1,
|
|
1126
|
+
"parameters": [
|
|
1127
|
+
{
|
|
1128
|
+
"parameterName": "headers",
|
|
1129
|
+
"parameterTypeTokenRange": {
|
|
1130
|
+
"startIndex": 1,
|
|
1131
|
+
"endIndex": 2
|
|
1132
|
+
},
|
|
1133
|
+
"isOptional": false
|
|
1134
|
+
}
|
|
1135
|
+
],
|
|
1136
|
+
"name": "setDefaultHeaders"
|
|
1137
|
+
},
|
|
1109
1138
|
{
|
|
1110
1139
|
"kind": "Method",
|
|
1111
1140
|
"canonicalReference": "ibm-cloud-sdk-core!BaseService#setEnableGzipCompression:member(1)",
|
|
@@ -1280,16 +1309,7 @@
|
|
|
1280
1309
|
},
|
|
1281
1310
|
{
|
|
1282
1311
|
"kind": "Content",
|
|
1283
|
-
"text": "<void
|
|
1284
|
-
},
|
|
1285
|
-
{
|
|
1286
|
-
"kind": "Reference",
|
|
1287
|
-
"text": "Error",
|
|
1288
|
-
"canonicalReference": "!Error:interface"
|
|
1289
|
-
},
|
|
1290
|
-
{
|
|
1291
|
-
"kind": "Content",
|
|
1292
|
-
"text": ">"
|
|
1312
|
+
"text": "<void>"
|
|
1293
1313
|
},
|
|
1294
1314
|
{
|
|
1295
1315
|
"kind": "Content",
|
|
@@ -1300,7 +1320,7 @@
|
|
|
1300
1320
|
"isStatic": false,
|
|
1301
1321
|
"returnTypeTokenRange": {
|
|
1302
1322
|
"startIndex": 3,
|
|
1303
|
-
"endIndex":
|
|
1323
|
+
"endIndex": 5
|
|
1304
1324
|
},
|
|
1305
1325
|
"releaseTag": "Public",
|
|
1306
1326
|
"overloadIndex": 1,
|
|
@@ -1639,11 +1659,24 @@
|
|
|
1639
1659
|
"kind": "Content",
|
|
1640
1660
|
"text": "): "
|
|
1641
1661
|
},
|
|
1662
|
+
{
|
|
1663
|
+
"kind": "Reference",
|
|
1664
|
+
"text": "Promise",
|
|
1665
|
+
"canonicalReference": "!Promise:interface"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"kind": "Content",
|
|
1669
|
+
"text": "<"
|
|
1670
|
+
},
|
|
1642
1671
|
{
|
|
1643
1672
|
"kind": "Reference",
|
|
1644
1673
|
"text": "FileObject",
|
|
1645
1674
|
"canonicalReference": "ibm-cloud-sdk-core!FileObject:interface"
|
|
1646
1675
|
},
|
|
1676
|
+
{
|
|
1677
|
+
"kind": "Content",
|
|
1678
|
+
"text": ">"
|
|
1679
|
+
},
|
|
1647
1680
|
{
|
|
1648
1681
|
"kind": "Content",
|
|
1649
1682
|
"text": ";"
|
|
@@ -1651,7 +1684,7 @@
|
|
|
1651
1684
|
],
|
|
1652
1685
|
"returnTypeTokenRange": {
|
|
1653
1686
|
"startIndex": 3,
|
|
1654
|
-
"endIndex":
|
|
1687
|
+
"endIndex": 7
|
|
1655
1688
|
},
|
|
1656
1689
|
"releaseTag": "Public",
|
|
1657
1690
|
"overloadIndex": 1,
|
|
@@ -2589,8 +2622,8 @@
|
|
|
2589
2622
|
},
|
|
2590
2623
|
{
|
|
2591
2624
|
"kind": "Reference",
|
|
2592
|
-
"text": "
|
|
2593
|
-
"canonicalReference": "!
|
|
2625
|
+
"text": "FileObject",
|
|
2626
|
+
"canonicalReference": "ibm-cloud-sdk-core!FileObject:interface"
|
|
2594
2627
|
},
|
|
2595
2628
|
{
|
|
2596
2629
|
"kind": "Content",
|
|
@@ -2607,8 +2640,8 @@
|
|
|
2607
2640
|
},
|
|
2608
2641
|
{
|
|
2609
2642
|
"kind": "Reference",
|
|
2610
|
-
"text": "
|
|
2611
|
-
"canonicalReference": "
|
|
2643
|
+
"text": "Buffer",
|
|
2644
|
+
"canonicalReference": "!Buffer:interface"
|
|
2612
2645
|
},
|
|
2613
2646
|
{
|
|
2614
2647
|
"kind": "Content",
|
|
@@ -3185,9 +3218,14 @@
|
|
|
3185
3218
|
"kind": "Content",
|
|
3186
3219
|
"text": "): "
|
|
3187
3220
|
},
|
|
3221
|
+
{
|
|
3222
|
+
"kind": "Reference",
|
|
3223
|
+
"text": "Promise",
|
|
3224
|
+
"canonicalReference": "!Promise:interface"
|
|
3225
|
+
},
|
|
3188
3226
|
{
|
|
3189
3227
|
"kind": "Content",
|
|
3190
|
-
"text": "string"
|
|
3228
|
+
"text": "<string>"
|
|
3191
3229
|
},
|
|
3192
3230
|
{
|
|
3193
3231
|
"kind": "Content",
|
|
@@ -3196,7 +3234,7 @@
|
|
|
3196
3234
|
],
|
|
3197
3235
|
"returnTypeTokenRange": {
|
|
3198
3236
|
"startIndex": 5,
|
|
3199
|
-
"endIndex":
|
|
3237
|
+
"endIndex": 7
|
|
3200
3238
|
},
|
|
3201
3239
|
"releaseTag": "Public",
|
|
3202
3240
|
"overloadIndex": 1,
|
|
@@ -5892,16 +5930,7 @@
|
|
|
5892
5930
|
},
|
|
5893
5931
|
{
|
|
5894
5932
|
"kind": "Content",
|
|
5895
|
-
"text": "<void
|
|
5896
|
-
},
|
|
5897
|
-
{
|
|
5898
|
-
"kind": "Reference",
|
|
5899
|
-
"text": "Error",
|
|
5900
|
-
"canonicalReference": "!Error:interface"
|
|
5901
|
-
},
|
|
5902
|
-
{
|
|
5903
|
-
"kind": "Content",
|
|
5904
|
-
"text": ">"
|
|
5933
|
+
"text": "<void>"
|
|
5905
5934
|
},
|
|
5906
5935
|
{
|
|
5907
5936
|
"kind": "Content",
|
|
@@ -5912,7 +5941,7 @@
|
|
|
5912
5941
|
"isStatic": false,
|
|
5913
5942
|
"returnTypeTokenRange": {
|
|
5914
5943
|
"startIndex": 3,
|
|
5915
|
-
"endIndex":
|
|
5944
|
+
"endIndex": 5
|
|
5916
5945
|
},
|
|
5917
5946
|
"releaseTag": "Public",
|
|
5918
5947
|
"overloadIndex": 1,
|
|
@@ -21,7 +21,7 @@ export function atMostOne(a: any, b: any): boolean;
|
|
|
21
21
|
export class Authenticator implements AuthenticatorInterface {
|
|
22
22
|
constructor();
|
|
23
23
|
// Warning: (ae-forgotten-export) The symbol "AuthenticateOptions" needs to be exported by the entry point index.d.ts
|
|
24
|
-
authenticate(requestOptions: AuthenticateOptions): Promise<void
|
|
24
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
25
25
|
authenticationType(): string;
|
|
26
26
|
static AUTHTYPE_BASIC: string;
|
|
27
27
|
// (undocumented)
|
|
@@ -42,7 +42,7 @@ export class Authenticator implements AuthenticatorInterface {
|
|
|
42
42
|
|
|
43
43
|
// @public
|
|
44
44
|
export interface AuthenticatorInterface {
|
|
45
|
-
authenticate(requestOptions: AuthenticateOptions): Promise<void
|
|
45
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
46
46
|
authenticationType(): string;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -64,6 +64,7 @@ export class BaseService {
|
|
|
64
64
|
enableRetries(retryOptions?: RetryOptions): void;
|
|
65
65
|
getAuthenticator(): any;
|
|
66
66
|
getHttpClient(): AxiosInstance;
|
|
67
|
+
setDefaultHeaders(headers: OutgoingHttpHeaders): void;
|
|
67
68
|
setEnableGzipCompression(setting: boolean): void;
|
|
68
69
|
setServiceUrl(url: string): void;
|
|
69
70
|
}
|
|
@@ -72,7 +73,7 @@ export class BaseService {
|
|
|
72
73
|
export class BasicAuthenticator extends Authenticator {
|
|
73
74
|
// Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts
|
|
74
75
|
constructor(options: Options);
|
|
75
|
-
authenticate(requestOptions: AuthenticateOptions): Promise<void
|
|
76
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
76
77
|
authenticationType(): string;
|
|
77
78
|
// (undocumented)
|
|
78
79
|
protected authHeader: {
|
|
@@ -94,7 +95,7 @@ export class BearerTokenAuthenticator extends Authenticator {
|
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
// @public
|
|
97
|
-
export function buildRequestFileObject(fileParam: FileWithMetadata): FileObject
|
|
98
|
+
export function buildRequestFileObject(fileParam: FileWithMetadata): Promise<FileObject>;
|
|
98
99
|
|
|
99
100
|
// @public
|
|
100
101
|
export function checkCredentials(obj: any, credsToCheck: string[]): Error | null;
|
|
@@ -155,7 +156,7 @@ export class ContainerTokenManager extends IamRequestBasedTokenManager {
|
|
|
155
156
|
|
|
156
157
|
// @public (undocumented)
|
|
157
158
|
export const contentType: {
|
|
158
|
-
fromFilename: (file: String | File |
|
|
159
|
+
fromFilename: (file: String | File | FileObject | NodeJS.ReadableStream | Buffer) => string;
|
|
159
160
|
fromHeader: (buffer: Buffer) => string;
|
|
160
161
|
};
|
|
161
162
|
|
|
@@ -211,7 +212,7 @@ export interface FileWithMetadata {
|
|
|
211
212
|
export function getAuthenticatorFromEnvironment(serviceName: string): Authenticator;
|
|
212
213
|
|
|
213
214
|
// @public
|
|
214
|
-
export function getContentType(inputData: NodeJS.ReadableStream | Buffer): string
|
|
215
|
+
export function getContentType(inputData: NodeJS.ReadableStream | Buffer): Promise<string>;
|
|
215
216
|
|
|
216
217
|
// @public
|
|
217
218
|
export function getCurrentTime(): number;
|
|
@@ -390,7 +391,7 @@ export type TokenManagerOptions = {
|
|
|
390
391
|
export class TokenRequestBasedAuthenticator extends Authenticator {
|
|
391
392
|
// Warning: (ae-forgotten-export) The symbol "BaseOptions" needs to be exported by the entry point index.d.ts
|
|
392
393
|
constructor(options: BaseOptions);
|
|
393
|
-
authenticate(requestOptions: AuthenticateOptions): Promise<void
|
|
394
|
+
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
|
|
394
395
|
// (undocumented)
|
|
395
396
|
protected disableSslVerification: boolean;
|
|
396
397
|
// (undocumented)
|