totalum-api-sdk 1.0.11 → 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 +9 -4
- 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
|
@@ -172,9 +172,7 @@ export interface DataValues {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
export interface DataProperties {
|
|
175
|
-
[key: string]: {
|
|
176
|
-
value: fieldValuesEnabled,
|
|
177
|
-
},
|
|
175
|
+
[key: string]: fieldValuesEnabled | {name: string, previousFilename: string},
|
|
178
176
|
}
|
|
179
177
|
|
|
180
178
|
|
|
@@ -196,7 +194,8 @@ const endpoints = {
|
|
|
196
194
|
},
|
|
197
195
|
filter: {
|
|
198
196
|
lookUpFilter: 'api/v1/filter/:idPage',
|
|
199
|
-
customMongoFilter: 'api/v1/filter/custom-mongo-filter'
|
|
197
|
+
customMongoFilter: 'api/v1/filter/custom-mongo-filter',
|
|
198
|
+
runCustomAggregationQuery: 'api/v1/filter/custom-mongo-aggregation-query'
|
|
200
199
|
},
|
|
201
200
|
pdfTemplate: {
|
|
202
201
|
generatePdfByTemplate: 'api/v1/pdf-template/generatePdfByTemplate/:id'
|
|
@@ -335,6 +334,12 @@ export class TotalumApiSdk {
|
|
|
335
334
|
return axios.get(url, { params: params, headers: this.headers });
|
|
336
335
|
}
|
|
337
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
|
+
|
|
338
343
|
|
|
339
344
|
|
|
340
345
|
}
|