ibm-cloud-sdk-core 5.1.3 → 5.2.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/docs/ibm-cloud-sdk-core.api.json +14 -14
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/lib/axios-types.d.ts +16 -0
- package/es/lib/axios-types.js +16 -0
- package/es/lib/content-type.d.ts +2 -0
- package/es/lib/helper.d.ts +2 -0
- package/es/lib/request-wrapper.js +3 -10
- package/ibm-cloud-sdk-core.d.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/lib/axios-types.d.ts +16 -0
- package/lib/axios-types.js +17 -0
- package/lib/content-type.d.ts +2 -0
- package/lib/helper.d.ts +2 -0
- package/lib/request-wrapper.js +3 -12
- package/package.json +2 -2
|
@@ -3059,7 +3059,7 @@
|
|
|
3059
3059
|
{
|
|
3060
3060
|
"kind": "Reference",
|
|
3061
3061
|
"text": "NodeJS.ReadableStream",
|
|
3062
|
-
"canonicalReference": "!NodeJS.ReadableStream:interface"
|
|
3062
|
+
"canonicalReference": "@types/node!__global.NodeJS.ReadableStream:interface"
|
|
3063
3063
|
},
|
|
3064
3064
|
{
|
|
3065
3065
|
"kind": "Content",
|
|
@@ -3068,7 +3068,7 @@
|
|
|
3068
3068
|
{
|
|
3069
3069
|
"kind": "Reference",
|
|
3070
3070
|
"text": "Buffer",
|
|
3071
|
-
"canonicalReference": "
|
|
3071
|
+
"canonicalReference": "!\"\\\"buffer\\\"\".__global.Buffer:interface"
|
|
3072
3072
|
},
|
|
3073
3073
|
{
|
|
3074
3074
|
"kind": "Content",
|
|
@@ -3077,7 +3077,7 @@
|
|
|
3077
3077
|
{
|
|
3078
3078
|
"kind": "Reference",
|
|
3079
3079
|
"text": "Buffer",
|
|
3080
|
-
"canonicalReference": "
|
|
3080
|
+
"canonicalReference": "!\"\\\"buffer\\\"\".__global.Buffer:interface"
|
|
3081
3081
|
},
|
|
3082
3082
|
{
|
|
3083
3083
|
"kind": "Content",
|
|
@@ -3324,7 +3324,7 @@
|
|
|
3324
3324
|
{
|
|
3325
3325
|
"kind": "Reference",
|
|
3326
3326
|
"text": "NodeJS.ReadableStream",
|
|
3327
|
-
"canonicalReference": "!NodeJS.ReadableStream:interface"
|
|
3327
|
+
"canonicalReference": "@types/node!__global.NodeJS.ReadableStream:interface"
|
|
3328
3328
|
},
|
|
3329
3329
|
{
|
|
3330
3330
|
"kind": "Content",
|
|
@@ -3333,7 +3333,7 @@
|
|
|
3333
3333
|
{
|
|
3334
3334
|
"kind": "Reference",
|
|
3335
3335
|
"text": "Buffer",
|
|
3336
|
-
"canonicalReference": "
|
|
3336
|
+
"canonicalReference": "!\"\\\"buffer\\\"\".__global.Buffer:interface"
|
|
3337
3337
|
},
|
|
3338
3338
|
{
|
|
3339
3339
|
"kind": "Content",
|
|
@@ -3440,7 +3440,7 @@
|
|
|
3440
3440
|
{
|
|
3441
3441
|
"kind": "Reference",
|
|
3442
3442
|
"text": "NodeJS.ReadableStream",
|
|
3443
|
-
"canonicalReference": "!NodeJS.ReadableStream:interface"
|
|
3443
|
+
"canonicalReference": "@types/node!__global.NodeJS.ReadableStream:interface"
|
|
3444
3444
|
},
|
|
3445
3445
|
{
|
|
3446
3446
|
"kind": "Content",
|
|
@@ -3468,7 +3468,7 @@
|
|
|
3468
3468
|
{
|
|
3469
3469
|
"kind": "Reference",
|
|
3470
3470
|
"text": "Buffer",
|
|
3471
|
-
"canonicalReference": "
|
|
3471
|
+
"canonicalReference": "!\"\\\"buffer\\\"\".__global.Buffer:interface"
|
|
3472
3472
|
},
|
|
3473
3473
|
{
|
|
3474
3474
|
"kind": "Content",
|
|
@@ -3546,7 +3546,7 @@
|
|
|
3546
3546
|
{
|
|
3547
3547
|
"kind": "Reference",
|
|
3548
3548
|
"text": "NodeJS.ReadableStream",
|
|
3549
|
-
"canonicalReference": "!NodeJS.ReadableStream:interface"
|
|
3549
|
+
"canonicalReference": "@types/node!__global.NodeJS.ReadableStream:interface"
|
|
3550
3550
|
},
|
|
3551
3551
|
{
|
|
3552
3552
|
"kind": "Content",
|
|
@@ -3555,7 +3555,7 @@
|
|
|
3555
3555
|
{
|
|
3556
3556
|
"kind": "Reference",
|
|
3557
3557
|
"text": "Buffer",
|
|
3558
|
-
"canonicalReference": "
|
|
3558
|
+
"canonicalReference": "!\"\\\"buffer\\\"\".__global.Buffer:interface"
|
|
3559
3559
|
},
|
|
3560
3560
|
{
|
|
3561
3561
|
"kind": "Content",
|
|
@@ -3659,7 +3659,7 @@
|
|
|
3659
3659
|
{
|
|
3660
3660
|
"kind": "Reference",
|
|
3661
3661
|
"text": "NodeJS.ReadableStream",
|
|
3662
|
-
"canonicalReference": "!NodeJS.ReadableStream:interface"
|
|
3662
|
+
"canonicalReference": "@types/node!__global.NodeJS.ReadableStream:interface"
|
|
3663
3663
|
},
|
|
3664
3664
|
{
|
|
3665
3665
|
"kind": "Content",
|
|
@@ -3668,7 +3668,7 @@
|
|
|
3668
3668
|
{
|
|
3669
3669
|
"kind": "Reference",
|
|
3670
3670
|
"text": "Buffer",
|
|
3671
|
-
"canonicalReference": "
|
|
3671
|
+
"canonicalReference": "!\"\\\"buffer\\\"\".__global.Buffer:interface"
|
|
3672
3672
|
},
|
|
3673
3673
|
{
|
|
3674
3674
|
"kind": "Content",
|
|
@@ -5668,7 +5668,7 @@
|
|
|
5668
5668
|
{
|
|
5669
5669
|
"kind": "Reference",
|
|
5670
5670
|
"text": "NodeJS.ReadableStream",
|
|
5671
|
-
"canonicalReference": "!NodeJS.ReadableStream:interface"
|
|
5671
|
+
"canonicalReference": "@types/node!__global.NodeJS.ReadableStream:interface"
|
|
5672
5672
|
},
|
|
5673
5673
|
{
|
|
5674
5674
|
"kind": "Content",
|
|
@@ -5677,7 +5677,7 @@
|
|
|
5677
5677
|
{
|
|
5678
5678
|
"kind": "Reference",
|
|
5679
5679
|
"text": "Buffer",
|
|
5680
|
-
"canonicalReference": "
|
|
5680
|
+
"canonicalReference": "!\"\\\"buffer\\\"\".__global.Buffer:interface"
|
|
5681
5681
|
},
|
|
5682
5682
|
{
|
|
5683
5683
|
"kind": "Content",
|
|
@@ -6915,7 +6915,7 @@
|
|
|
6915
6915
|
{
|
|
6916
6916
|
"kind": "Reference",
|
|
6917
6917
|
"text": "Stream",
|
|
6918
|
-
"canonicalReference": "
|
|
6918
|
+
"canonicalReference": "ibm-cloud-sdk-core!~Stream"
|
|
6919
6919
|
},
|
|
6920
6920
|
{
|
|
6921
6921
|
"kind": "Content",
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (C) Copyright IBM Corp. 2025.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export { GenericAbortSignal as AbortSignal } from 'axios';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (C) Copyright IBM Corp. 2025.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
package/es/lib/content-type.d.ts
CHANGED
package/es/lib/helper.d.ts
CHANGED
|
@@ -192,7 +192,7 @@ export class RequestWrapper {
|
|
|
192
192
|
sendRequest(parameters) {
|
|
193
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
194
194
|
const options = extend(true, {}, parameters.defaultOptions, parameters.options);
|
|
195
|
-
const { path, body, form, formData, qs, method, serviceUrl } = options;
|
|
195
|
+
const { path, body, form, formData, qs, method, serviceUrl, axiosOptions } = options;
|
|
196
196
|
let { headers, url } = options;
|
|
197
197
|
const multipartForm = new FormData();
|
|
198
198
|
// Form params
|
|
@@ -252,16 +252,9 @@ export class RequestWrapper {
|
|
|
252
252
|
if (this.compressRequestData) {
|
|
253
253
|
data = yield this.gzipRequestBody(data, headers);
|
|
254
254
|
}
|
|
255
|
-
const requestParams = {
|
|
256
|
-
url,
|
|
255
|
+
const requestParams = Object.assign({ url,
|
|
257
256
|
method,
|
|
258
|
-
headers,
|
|
259
|
-
params: qs,
|
|
260
|
-
data,
|
|
261
|
-
raxConfig: this.raxConfig,
|
|
262
|
-
responseType: options.responseType || 'json',
|
|
263
|
-
paramsSerializer: { serialize: (params) => stringify(params) },
|
|
264
|
-
};
|
|
257
|
+
headers, params: qs, data, raxConfig: this.raxConfig, responseType: options.responseType || 'json', paramsSerializer: { serialize: (params) => stringify(params) } }, axiosOptions);
|
|
265
258
|
return this.axiosInstance(requestParams).then((res) => {
|
|
266
259
|
// sometimes error responses will still trigger the `then` block - escape that behavior here
|
|
267
260
|
if (!res) {
|
package/ibm-cloud-sdk-core.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
|
|
3
|
+
import { GenericAbortSignal as AbortSignal_2 } from 'axios';
|
|
3
4
|
import { AxiosInstance } from 'axios';
|
|
4
5
|
import type { CookieJar } from 'tough-cookie';
|
|
5
6
|
import { Debugger } from 'debug';
|
|
6
7
|
import { OutgoingHttpHeaders } from 'http';
|
|
7
8
|
import { Stream } from 'stream';
|
|
8
9
|
|
|
10
|
+
export { AbortSignal_2 as AbortSignal }
|
|
11
|
+
|
|
9
12
|
/**
|
|
10
13
|
* Checks for at least one of the given elements being defined.
|
|
11
14
|
*
|
|
@@ -604,6 +607,8 @@ export declare function fileExistsAtPath(filepath: string): boolean;
|
|
|
604
607
|
* limitations under the License.
|
|
605
608
|
*/
|
|
606
609
|
/// <reference types="node" />
|
|
610
|
+
/// <reference types="node" />
|
|
611
|
+
/// <reference types="node" />
|
|
607
612
|
export declare interface FileObject {
|
|
608
613
|
value: NodeJS.ReadableStream | Buffer | string;
|
|
609
614
|
options?: FileOptions;
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -36,6 +36,7 @@ exports.getNewLogger = exports.contentType = exports.qs = exports.BaseService =
|
|
|
36
36
|
/**
|
|
37
37
|
* @module ibm-cloud-sdk-core
|
|
38
38
|
*/
|
|
39
|
+
__exportStar(require("./lib/axios-types"), exports);
|
|
39
40
|
var base_service_1 = require("./lib/base-service");
|
|
40
41
|
Object.defineProperty(exports, "BaseService", { enumerable: true, get: function () { return base_service_1.BaseService; } });
|
|
41
42
|
__exportStar(require("./auth"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (C) Copyright IBM Corp. 2025.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export { GenericAbortSignal as AbortSignal } from 'axios';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* (C) Copyright IBM Corp. 2025.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/lib/content-type.d.ts
CHANGED
package/lib/helper.d.ts
CHANGED
package/lib/request-wrapper.js
CHANGED
|
@@ -259,13 +259,13 @@ var RequestWrapper = /** @class */ (function () {
|
|
|
259
259
|
*/
|
|
260
260
|
RequestWrapper.prototype.sendRequest = function (parameters) {
|
|
261
261
|
return __awaiter(this, void 0, void 0, function () {
|
|
262
|
-
var options, path, body, form, formData, qs, method, serviceUrl, headers, url, multipartForm, _i, _a, key, values, _b, values_1, value, fileObj, data, requestParams;
|
|
262
|
+
var options, path, body, form, formData, qs, method, serviceUrl, axiosOptions, headers, url, multipartForm, _i, _a, key, values, _b, values_1, value, fileObj, data, requestParams;
|
|
263
263
|
var _this = this;
|
|
264
264
|
return __generator(this, function (_c) {
|
|
265
265
|
switch (_c.label) {
|
|
266
266
|
case 0:
|
|
267
267
|
options = (0, extend_1.default)(true, {}, parameters.defaultOptions, parameters.options);
|
|
268
|
-
path = options.path, body = options.body, form = options.form, formData = options.formData, qs = options.qs, method = options.method, serviceUrl = options.serviceUrl;
|
|
268
|
+
path = options.path, body = options.body, form = options.form, formData = options.formData, qs = options.qs, method = options.method, serviceUrl = options.serviceUrl, axiosOptions = options.axiosOptions;
|
|
269
269
|
headers = options.headers, url = options.url;
|
|
270
270
|
multipartForm = new form_data_1.default();
|
|
271
271
|
if (!formData) return [3 /*break*/, 7];
|
|
@@ -338,16 +338,7 @@ var RequestWrapper = /** @class */ (function () {
|
|
|
338
338
|
data = _c.sent();
|
|
339
339
|
_c.label = 9;
|
|
340
340
|
case 9:
|
|
341
|
-
requestParams = {
|
|
342
|
-
url: url,
|
|
343
|
-
method: method,
|
|
344
|
-
headers: headers,
|
|
345
|
-
params: qs,
|
|
346
|
-
data: data,
|
|
347
|
-
raxConfig: this.raxConfig,
|
|
348
|
-
responseType: options.responseType || 'json',
|
|
349
|
-
paramsSerializer: { serialize: function (params) { return (0, querystring_1.stringify)(params); } },
|
|
350
|
-
};
|
|
341
|
+
requestParams = __assign({ url: url, method: method, headers: headers, params: qs, data: data, raxConfig: this.raxConfig, responseType: options.responseType || 'json', paramsSerializer: { serialize: function (params) { return (0, querystring_1.stringify)(params); } } }, axiosOptions);
|
|
351
342
|
return [2 /*return*/, this.axiosInstance(requestParams).then(function (res) {
|
|
352
343
|
// sometimes error responses will still trigger the `then` block - escape that behavior here
|
|
353
344
|
if (!res) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ibm-cloud-sdk-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Core functionality to support SDKs generated with IBM's OpenAPI SDK Generator.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"typings": "./es/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@types/debug": "^4.1.12",
|
|
38
|
-
"@types/node": "
|
|
38
|
+
"@types/node": "^22.13.9",
|
|
39
39
|
"@types/tough-cookie": "^4.0.0",
|
|
40
40
|
"axios": "1.7.9",
|
|
41
41
|
"camelcase": "^6.3.0",
|