@arrowsphere/api-client 3.77.1-bdj.2 → 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.
|
@@ -38,6 +38,6 @@ export declare type LicenseRequestResultType = {
|
|
|
38
38
|
export declare class LicenseRequestResult extends AbstractEntity<LicenseRequestResultType> {
|
|
39
39
|
#private;
|
|
40
40
|
constructor(input: LicenseRequestResultType);
|
|
41
|
-
get
|
|
41
|
+
get licenseRequests(): LicenseRequest[] | undefined;
|
|
42
42
|
toJSON(): LicenseRequestResultType;
|
|
43
43
|
}
|
|
@@ -88,13 +88,13 @@ class LicenseRequestResult extends abstractEntity_1.AbstractEntity {
|
|
|
88
88
|
_LicenseRequestResult_licenseRequests.set(this, void 0);
|
|
89
89
|
__classPrivateFieldSet(this, _LicenseRequestResult_licenseRequests, (_a = input[LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]) === null || _a === void 0 ? void 0 : _a.map((result) => new LicenseRequest(result)), "f");
|
|
90
90
|
}
|
|
91
|
-
get
|
|
91
|
+
get licenseRequests() {
|
|
92
92
|
return __classPrivateFieldGet(this, _LicenseRequestResult_licenseRequests, "f");
|
|
93
93
|
}
|
|
94
94
|
toJSON() {
|
|
95
95
|
var _a;
|
|
96
96
|
return {
|
|
97
|
-
[LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]: (_a = this.
|
|
97
|
+
[LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]: (_a = this.licenseRequests) === null || _a === void 0 ? void 0 : _a.map((result) => result.toJSON()),
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* Class LicenseRequestClient
|
|
3
3
|
*/
|
|
4
4
|
import { AbstractRestfulClient } from '../abstractRestfulClient';
|
|
5
|
-
import {
|
|
6
|
-
import { LicenseRequestResult } from './entities/request/licenseRequest';
|
|
5
|
+
import { LicenseRequestType } from './entities/request/licenseRequest';
|
|
7
6
|
export declare class LicenseRequestClient extends AbstractRestfulClient {
|
|
8
7
|
protected basePath: string;
|
|
9
|
-
getLastRequests(licenseReference: string): Promise<
|
|
8
|
+
getLastRequests(licenseReference: string): Promise<LicenseRequestType[]>;
|
|
10
9
|
}
|
|
@@ -17,11 +17,12 @@ class LicenseRequestClient extends abstractRestfulClient_1.AbstractRestfulClient
|
|
|
17
17
|
const response = await this.get();
|
|
18
18
|
//A workaround, the public api endpoint is not returning "data" in the payload
|
|
19
19
|
response[getResult_1.GetResultFields.COLUMN_DATA] = {
|
|
20
|
-
[licenseRequest_1.LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]:
|
|
21
|
-
? response[
|
|
20
|
+
[licenseRequest_1.LicenseRequestResultFields.COLUMN_LICENSE_REQUEST]: getResult_1.GetResultFields.COLUMN_DATA in response
|
|
21
|
+
? response[getResult_1.GetResultFields.COLUMN_DATA]
|
|
22
22
|
: [],
|
|
23
23
|
};
|
|
24
|
-
|
|
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];
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
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",
|