@integraciones_doc24/sdk 0.31.1 → 0.31.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/lib/request/index.js +3 -0
- package/package.json +3 -2
package/lib/request/index.js
CHANGED
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.getRequestFactory = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const token_1 = require("./token");
|
|
9
|
+
const debug_1 = __importDefault(require("debug"));
|
|
10
|
+
const debugRequest = debug_1.default('doc24Sdk:request');
|
|
9
11
|
const getRequestFactory = async (url, credentials, userId) => {
|
|
10
12
|
const makeRequest = async (method, path, body) => {
|
|
11
13
|
const token = await token_1.getToken(credentials, body ? JSON.stringify(body) : undefined, userId);
|
|
@@ -16,6 +18,7 @@ const getRequestFactory = async (url, credentials, userId) => {
|
|
|
16
18
|
headers: { Authentication: token },
|
|
17
19
|
data: body,
|
|
18
20
|
});
|
|
21
|
+
debugRequest({ url: fullUrl, response: result.data, body });
|
|
19
22
|
return result.data;
|
|
20
23
|
};
|
|
21
24
|
return makeRequest;
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@integraciones_doc24/sdk",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "tsc"
|
|
7
|
+
"build": "tsc",
|
|
8
|
+
"prepublish": "npm run build"
|
|
8
9
|
},
|
|
9
10
|
"keywords": [],
|
|
10
11
|
"author": "",
|