totalum-api-sdk 1.0.12 → 1.0.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.
- package/index.js +9 -1
- package/index.ts +8 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -32,7 +32,8 @@ const endpoints = {
|
|
|
32
32
|
},
|
|
33
33
|
filter: {
|
|
34
34
|
lookUpFilter: 'api/v1/filter/:idPage',
|
|
35
|
-
customMongoFilter: 'api/v1/filter/custom-mongo-filter'
|
|
35
|
+
customMongoFilter: 'api/v1/filter/custom-mongo-filter',
|
|
36
|
+
runCustomAggregationQuery: 'api/v1/filter/custom-mongo-aggregation-query'
|
|
36
37
|
},
|
|
37
38
|
pdfTemplate: {
|
|
38
39
|
generatePdfByTemplate: 'api/v1/pdf-template/generatePdfByTemplate/:id'
|
|
@@ -170,5 +171,12 @@ class TotalumApiSdk {
|
|
|
170
171
|
return axios_1.default.get(url, { params: params, headers: this.headers });
|
|
171
172
|
});
|
|
172
173
|
}
|
|
174
|
+
runCustomMongoAggregationQuery(type, customMongoQuery) {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
const url = this.getUrl(endpoints.filter.runCustomAggregationQuery);
|
|
177
|
+
const body = { customMongoQuery, type };
|
|
178
|
+
return axios_1.default.post(url, body, { headers: this.headers });
|
|
179
|
+
});
|
|
180
|
+
}
|
|
173
181
|
}
|
|
174
182
|
exports.TotalumApiSdk = TotalumApiSdk;
|
package/index.ts
CHANGED
|
@@ -194,7 +194,8 @@ const endpoints = {
|
|
|
194
194
|
},
|
|
195
195
|
filter: {
|
|
196
196
|
lookUpFilter: 'api/v1/filter/:idPage',
|
|
197
|
-
customMongoFilter: 'api/v1/filter/custom-mongo-filter'
|
|
197
|
+
customMongoFilter: 'api/v1/filter/custom-mongo-filter',
|
|
198
|
+
runCustomAggregationQuery: 'api/v1/filter/custom-mongo-aggregation-query'
|
|
198
199
|
},
|
|
199
200
|
pdfTemplate: {
|
|
200
201
|
generatePdfByTemplate: 'api/v1/pdf-template/generatePdfByTemplate/:id'
|
|
@@ -333,6 +334,12 @@ export class TotalumApiSdk {
|
|
|
333
334
|
return axios.get(url, { params: params, headers: this.headers });
|
|
334
335
|
}
|
|
335
336
|
|
|
337
|
+
public async runCustomMongoAggregationQuery(type: string, customMongoQuery: string) {
|
|
338
|
+
const url = this.getUrl(endpoints.filter.runCustomAggregationQuery);
|
|
339
|
+
const body = { customMongoQuery, type };
|
|
340
|
+
return axios.post(url, body, { headers: this.headers });
|
|
341
|
+
}
|
|
342
|
+
|
|
336
343
|
|
|
337
344
|
|
|
338
345
|
}
|