node-cnb 1.19.0 → 1.20.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/dist/index.js +6 -10
- package/dist/index.mjs +6 -10
- package/package.json +2 -3
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
}) : target, mod));
|
|
22
22
|
|
|
23
23
|
//#endregion
|
|
24
|
-
const
|
|
24
|
+
const ky = __toESM(require("ky"));
|
|
25
25
|
|
|
26
26
|
//#region src/paths.json
|
|
27
27
|
var events_repo_get = {
|
|
@@ -8439,16 +8439,12 @@ const callApi = (baseUrl, token, methodPath, params) => {
|
|
|
8439
8439
|
Object.assign(bodyParams, params?.[item.name] || {});
|
|
8440
8440
|
});
|
|
8441
8441
|
const apiPath = `${baseUrl}${path}`;
|
|
8442
|
-
return (0,
|
|
8442
|
+
return (0, ky.default)(apiPath, {
|
|
8443
8443
|
method,
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
},
|
|
8449
|
-
params: queryParams,
|
|
8450
|
-
data: bodyParams
|
|
8451
|
-
}).then((res) => res.data);
|
|
8444
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
8445
|
+
searchParams: queryParams,
|
|
8446
|
+
json: Object.keys(bodyParams).length ? bodyParams : void 0
|
|
8447
|
+
}).json();
|
|
8452
8448
|
};
|
|
8453
8449
|
const getClient = (baseUrl, token) => {
|
|
8454
8450
|
function getProxyForPath(path) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ky from "ky";
|
|
2
2
|
|
|
3
3
|
//#region src/paths.json
|
|
4
4
|
var events_repo_get = {
|
|
@@ -8416,16 +8416,12 @@ const callApi = (baseUrl, token, methodPath, params) => {
|
|
|
8416
8416
|
Object.assign(bodyParams, params?.[item.name] || {});
|
|
8417
8417
|
});
|
|
8418
8418
|
const apiPath = `${baseUrl}${path}`;
|
|
8419
|
-
return
|
|
8419
|
+
return ky(apiPath, {
|
|
8420
8420
|
method,
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
},
|
|
8426
|
-
params: queryParams,
|
|
8427
|
-
data: bodyParams
|
|
8428
|
-
}).then((res) => res.data);
|
|
8421
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
8422
|
+
searchParams: queryParams,
|
|
8423
|
+
json: Object.keys(bodyParams).length ? bodyParams : void 0
|
|
8424
|
+
}).json();
|
|
8429
8425
|
};
|
|
8430
8426
|
const getClient = (baseUrl, token) => {
|
|
8431
8427
|
function getProxyForPath(path) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-cnb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "node sdk for cnb open api",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -27,10 +27,9 @@
|
|
|
27
27
|
"author": "folgerfan",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"
|
|
30
|
+
"ky": "^1.14.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@types/axios": "^0.9.36",
|
|
34
33
|
"@types/lodash": "^4.17.15",
|
|
35
34
|
"@types/node": "^24.0.10",
|
|
36
35
|
"lodash": "^4.17.21",
|