@arrowsphere/api-client 3.180.0-rc.fdi.9 → 3.180.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
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
4
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
5
|
|
|
6
|
+
## [3.180.0] - 2025.03.13
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- [licence] add activation expired to licence events
|
|
10
|
+
|
|
6
11
|
## [3.179.0] - 2025.03.06
|
|
7
12
|
|
|
8
13
|
### Added
|
|
@@ -18,5 +18,12 @@ export declare class AxiosSingleton {
|
|
|
18
18
|
* @param isLogging - Must log
|
|
19
19
|
*/
|
|
20
20
|
private static _handleResponse;
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* @param request - Axios Request
|
|
23
|
+
*/
|
|
24
|
+
private static cleanRequestLog;
|
|
25
|
+
/**
|
|
26
|
+
* @param response - Axios Response
|
|
27
|
+
*/
|
|
28
|
+
private static cleanResponseLog;
|
|
22
29
|
}
|
package/build/axiosSingleton.js
CHANGED
|
@@ -5,11 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AxiosSingleton = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
|
|
9
|
-
(function (DefaultObfuscateFields) {
|
|
10
|
-
DefaultObfuscateFields["API_KEY"] = "apiKey";
|
|
11
|
-
DefaultObfuscateFields["PASSWORD"] = "password";
|
|
12
|
-
})(DefaultObfuscateFields || (DefaultObfuscateFields = {}));
|
|
8
|
+
const lodash_1 = require("lodash");
|
|
13
9
|
class AxiosSingleton {
|
|
14
10
|
static getInstance(configuration = {}) {
|
|
15
11
|
this._isLogging = !!configuration.isLogging;
|
|
@@ -33,7 +29,7 @@ class AxiosSingleton {
|
|
|
33
29
|
*/
|
|
34
30
|
static _handleRequest(request, isLogging = false) {
|
|
35
31
|
if (isLogging) {
|
|
36
|
-
console.info('AXIOS - Request : ', AxiosSingleton.
|
|
32
|
+
console.info('AXIOS - Request : ', AxiosSingleton.cleanRequestLog(request));
|
|
37
33
|
}
|
|
38
34
|
return request;
|
|
39
35
|
}
|
|
@@ -43,47 +39,39 @@ class AxiosSingleton {
|
|
|
43
39
|
*/
|
|
44
40
|
static _handleResponse(response, isLogging = false) {
|
|
45
41
|
if (isLogging) {
|
|
46
|
-
console.info('AXIOS - Response : ', AxiosSingleton.
|
|
42
|
+
console.info('AXIOS - Response : ', AxiosSingleton.cleanResponseLog(response));
|
|
47
43
|
}
|
|
48
44
|
return response;
|
|
49
45
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
sanitizedCopy[key] = '***'; // Masquage des champs sensibles
|
|
78
|
-
}
|
|
79
|
-
else if (typeof value === 'object' && value !== null) {
|
|
80
|
-
sanitizedCopy[key] = AxiosSingleton.sanitizeObject(value, fieldsToObfuscate, seen); // 🔄 Récursion avec WeakMap
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
sanitizedCopy[key] = value;
|
|
84
|
-
}
|
|
46
|
+
/**
|
|
47
|
+
* @param request - Axios Request
|
|
48
|
+
*/
|
|
49
|
+
static cleanRequestLog(request) {
|
|
50
|
+
var _a, _b, _c, _d;
|
|
51
|
+
const tempRequest = (0, lodash_1.cloneDeep)(request);
|
|
52
|
+
if ((_a = tempRequest.headers) === null || _a === void 0 ? void 0 : _a.apiKey) {
|
|
53
|
+
const apiKey = (_b = tempRequest.headers) === null || _b === void 0 ? void 0 : _b.apiKey;
|
|
54
|
+
tempRequest.headers.apiKey =
|
|
55
|
+
'****************************' + apiKey.substring(apiKey.length - 4);
|
|
56
|
+
}
|
|
57
|
+
if ((_d = (_c = tempRequest.data) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.password) {
|
|
58
|
+
tempRequest.data.user.password = '***********';
|
|
59
|
+
}
|
|
60
|
+
return tempRequest;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @param response - Axios Response
|
|
64
|
+
*/
|
|
65
|
+
static cleanResponseLog(response) {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
const tempResponse = (0, lodash_1.cloneDeep)(response);
|
|
68
|
+
if ((_a = tempResponse.config.headers) === null || _a === void 0 ? void 0 : _a.apiKey) {
|
|
69
|
+
const apiKey = (_b = tempResponse.config.headers) === null || _b === void 0 ? void 0 : _b.apiKey;
|
|
70
|
+
tempResponse.config.headers.apiKey =
|
|
71
|
+
'****************************' + apiKey.substring(apiKey.length - 4);
|
|
85
72
|
}
|
|
86
|
-
|
|
73
|
+
delete tempResponse.request;
|
|
74
|
+
return tempResponse;
|
|
87
75
|
}
|
|
88
76
|
}
|
|
89
77
|
exports.AxiosSingleton = AxiosSingleton;
|
|
@@ -45,6 +45,7 @@ var LicenseEventStatusCode;
|
|
|
45
45
|
LicenseEventStatusCode["REJECTED"] = "85";
|
|
46
46
|
LicenseEventStatusCode["COMPLETED"] = "86";
|
|
47
47
|
LicenseEventStatusCode["SUSPENDED"] = "87";
|
|
48
|
+
LicenseEventStatusCode["ACTIVATION_EXPIRED"] = "88";
|
|
48
49
|
LicenseEventStatusCode["CANCELLED"] = "89";
|
|
49
50
|
LicenseEventStatusCode["TRANSFERRED"] = "126";
|
|
50
51
|
})(LicenseEventStatusCode = exports.LicenseEventStatusCode || (exports.LicenseEventStatusCode = {}));
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "https://github.com/ArrowSphere/nodejs-api-client.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "3.180.0
|
|
7
|
+
"version": "3.180.0",
|
|
8
8
|
"description": "Node.js client for ArrowSphere's public API",
|
|
9
9
|
"main": "build/index.js",
|
|
10
10
|
"types": "build/index.d.ts",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"author": "ArrowSphere <support@arrowsphereconnect.com>",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"devDependencies": {
|
|
34
|
+
"@types/validatorjs": "3.15.0",
|
|
34
35
|
"@types/chai": "4.2.15",
|
|
35
36
|
"@types/chai-as-promised": "7.1.3",
|
|
36
37
|
"@types/lodash": "^4.14.191",
|
|
@@ -81,8 +82,7 @@
|
|
|
81
82
|
"test": "tests"
|
|
82
83
|
},
|
|
83
84
|
"dependencies": {
|
|
84
|
-
"
|
|
85
|
-
"axios": "1.8.2",
|
|
85
|
+
"axios": "1.1.3",
|
|
86
86
|
"graphql": "^16.3.0",
|
|
87
87
|
"graphql-request": "4.2.0",
|
|
88
88
|
"json-to-graphql-query": "^2.2.5",
|