@arrowsphere/api-client 3.77.1-bdj.3 → 3.77.1-bdj.4
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.
|
@@ -5,6 +5,8 @@ exports.LicenseRequestClient = void 0;
|
|
|
5
5
|
* Class LicenseRequestClient
|
|
6
6
|
*/
|
|
7
7
|
const abstractRestfulClient_1 = require("../abstractRestfulClient");
|
|
8
|
+
const getResult_1 = require("../getResult");
|
|
9
|
+
const licenseRequest_1 = require("./entities/request/licenseRequest");
|
|
8
10
|
class LicenseRequestClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
9
11
|
constructor() {
|
|
10
12
|
super(...arguments);
|
|
@@ -12,7 +14,15 @@ class LicenseRequestClient extends abstractRestfulClient_1.AbstractRestfulClient
|
|
|
12
14
|
}
|
|
13
15
|
async getLastRequests(licenseReference) {
|
|
14
16
|
this.path = `/${licenseReference}/request`;
|
|
15
|
-
|
|
17
|
+
const response = await this.get();
|
|
18
|
+
//A workaround, the public api endpoint is not returning "data" in the payload
|
|
19
|
+
response[getResult_1.GetResultFields.COLUMN_DATA] = {
|
|
20
|
+
[licenseRequest_1.LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]: getResult_1.GetResultFields.COLUMN_DATA in response
|
|
21
|
+
? response[getResult_1.GetResultFields.COLUMN_DATA]
|
|
22
|
+
: [],
|
|
23
|
+
};
|
|
24
|
+
const result = new getResult_1.GetResult(licenseRequest_1.LicenseRequestResult, response);
|
|
25
|
+
return result.toJSON()[getResult_1.GetResultFields.COLUMN_DATA][licenseRequest_1.LicenseRequestResultFields.COLUMN_LICENSE_REQUEST];
|
|
16
26
|
}
|
|
17
27
|
}
|
|
18
28
|
exports.LicenseRequestClient = LicenseRequestClient;
|
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.77.1-bdj.
|
|
7
|
+
"version": "3.77.1-bdj.4",
|
|
8
8
|
"description": "Node.js client for ArrowSphere's public API",
|
|
9
9
|
"main": "build/index.js",
|
|
10
10
|
"types": "build/index.d.ts",
|