elemento-alpha-tools 1.2.12 → 1.2.13
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.
|
@@ -18,18 +18,18 @@ class PortfolioBenchmarkManager extends itrm_tools_1.CrudServiceManager {
|
|
|
18
18
|
}
|
|
19
19
|
find(details) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
return this.sendFinding(`${this.url}/portfolio-
|
|
21
|
+
return this.sendFinding(`${this.url}/portfolio-benchmark?businessId=${details.businessId}${details.date ? `&date=${details.date}` : ''}`, details.config);
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
findById(id) {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
return this.sendFinding(`${this.url}/portfolio-
|
|
26
|
+
return this.sendFinding(`${this.url}/portfolio-benchmark?id=${id.id}`, id.config);
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
count(details) {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
var _a;
|
|
32
|
-
let url = this.buildRequestUrl(`${this.url}/portfolio-
|
|
32
|
+
let url = this.buildRequestUrl(`${this.url}/portfolio-benchmark`, details);
|
|
33
33
|
return (_a = (yield this.sendCounting(url, details.config))) !== null && _a !== void 0 ? _a : { result: 0 };
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -41,7 +41,7 @@ class PortfolioBenchmarkManager extends itrm_tools_1.CrudServiceManager {
|
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
42
|
var _a;
|
|
43
43
|
let portfolioBenchmarks = [];
|
|
44
|
-
let url = this.buildRequestUrl(`${this.url}/portfolio-
|
|
44
|
+
let url = this.buildRequestUrl(`${this.url}/portfolio-benchmark`, details);
|
|
45
45
|
if (details.limit) {
|
|
46
46
|
portfolioBenchmarks = (_a = (yield this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config))) !== null && _a !== void 0 ? _a : [];
|
|
47
47
|
}
|
|
@@ -59,7 +59,7 @@ class PortfolioBenchmarkManager extends itrm_tools_1.CrudServiceManager {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
create(details) {
|
|
62
|
-
return this.sendCreation(`${this.url}/portfolio-
|
|
62
|
+
return this.sendCreation(`${this.url}/portfolio-benchmark`, {
|
|
63
63
|
businessId: details.businessId,
|
|
64
64
|
date: details.date,
|
|
65
65
|
details: details.details
|
|
@@ -67,17 +67,17 @@ class PortfolioBenchmarkManager extends itrm_tools_1.CrudServiceManager {
|
|
|
67
67
|
}
|
|
68
68
|
createMany(details) {
|
|
69
69
|
var _a;
|
|
70
|
-
return this.sendCreationMany(`${this.url}/portfolio-
|
|
70
|
+
return this.sendCreationMany(`${this.url}/portfolio-benchmark`, (_a = details.values) !== null && _a !== void 0 ? _a : [], details.config);
|
|
71
71
|
}
|
|
72
72
|
modify(portfolioBenchmark) {
|
|
73
|
-
return this.sendModification(`${this.url}/portfolio-
|
|
73
|
+
return this.sendModification(`${this.url}/portfolio-benchmark/${portfolioBenchmark.portfolioBenchmarkId}`, {
|
|
74
74
|
businessId: portfolioBenchmark.businessId,
|
|
75
75
|
date: portfolioBenchmark.date,
|
|
76
76
|
details: portfolioBenchmark.details
|
|
77
77
|
}, portfolioBenchmark.config);
|
|
78
78
|
}
|
|
79
79
|
destroy(portfolioBenchmark) {
|
|
80
|
-
return this.sendDestruction(`${this.url}/portfolio-
|
|
80
|
+
return this.sendDestruction(`${this.url}/portfolio-benchmark/${portfolioBenchmark.portfolioBenchmarkId}`, portfolioBenchmark.config);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
exports.PortfolioBenchmarkManager = PortfolioBenchmarkManager;
|