bruce-models 7.1.81 → 7.1.82
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/dist/bruce-models.es5.js +87 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +85 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +3 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/data-lab/data-lab.js +20 -0
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/export/entity-export.js +3 -0
- package/dist/lib/export/entity-export.js.map +1 -0
- package/dist/lib/export/export-csv.js +79 -0
- package/dist/lib/export/export-csv.js.map +1 -0
- package/dist/types/bruce-models.d.ts +3 -1
- package/dist/types/data-lab/data-lab.d.ts +37 -1
- package/dist/types/export/entity-export.d.ts +17 -0
- package/dist/types/export/export-csv.d.ts +39 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -10874,6 +10874,26 @@
|
|
|
10874
10874
|
});
|
|
10875
10875
|
}
|
|
10876
10876
|
DataLab.Run = Run;
|
|
10877
|
+
/**
|
|
10878
|
+
* Runs one or more DataLab actions.
|
|
10879
|
+
* This calls: POST v3/datalab/runAction
|
|
10880
|
+
*/
|
|
10881
|
+
function RunAction(params) {
|
|
10882
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10883
|
+
let { api, body, req } = params;
|
|
10884
|
+
if (!body) {
|
|
10885
|
+
throw new Error("body is required.");
|
|
10886
|
+
}
|
|
10887
|
+
if (!api) {
|
|
10888
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
10889
|
+
}
|
|
10890
|
+
const res = yield api.POST("v3/datalab/runAction", body, exports.Api.PrepReqParams(req));
|
|
10891
|
+
return {
|
|
10892
|
+
action: res
|
|
10893
|
+
};
|
|
10894
|
+
});
|
|
10895
|
+
}
|
|
10896
|
+
DataLab.RunAction = RunAction;
|
|
10877
10897
|
})(exports.DataLab || (exports.DataLab = {}));
|
|
10878
10898
|
|
|
10879
10899
|
(function (DataLabGroup) {
|
|
@@ -14717,6 +14737,70 @@
|
|
|
14717
14737
|
ExportBrz.Export = Export;
|
|
14718
14738
|
})(exports.ExportBrz || (exports.ExportBrz = {}));
|
|
14719
14739
|
|
|
14740
|
+
(function (ExportCsv) {
|
|
14741
|
+
/**
|
|
14742
|
+
* Exports CSV for Entities selected by Filter.
|
|
14743
|
+
* This calls: GET entities/ExportCSV
|
|
14744
|
+
*/
|
|
14745
|
+
function Export(params) {
|
|
14746
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14747
|
+
let { api, fileExport, req } = params;
|
|
14748
|
+
if (!api) {
|
|
14749
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
14750
|
+
}
|
|
14751
|
+
if (!(fileExport === null || fileExport === void 0 ? void 0 : fileExport.BruceEntityType)) {
|
|
14752
|
+
throw ("fileExport.BruceEntityType is required.");
|
|
14753
|
+
}
|
|
14754
|
+
const urlParams = new URLSearchParams();
|
|
14755
|
+
urlParams.append("BruceEntityType", fileExport.BruceEntityType);
|
|
14756
|
+
appendStringParam(urlParams, "OrderBy", fileExport.OrderBy);
|
|
14757
|
+
appendStringParam(urlParams, "SortOrder", fileExport.SortOrder);
|
|
14758
|
+
appendStringParam(urlParams, "Filter", fileExport.Filter);
|
|
14759
|
+
appendStringParam(urlParams, "LODType", fileExport.LODType);
|
|
14760
|
+
if (fileExport.ZIP != null) {
|
|
14761
|
+
urlParams.append("ZIP", String(fileExport.ZIP));
|
|
14762
|
+
}
|
|
14763
|
+
if (fileExport.ColumnSettings) {
|
|
14764
|
+
urlParams.append("ColumnSettings", JSON.stringify(fileExport.ColumnSettings));
|
|
14765
|
+
}
|
|
14766
|
+
return api.GET(`entities/ExportCSV?${urlParams.toString()}`, exports.Api.PrepReqParams(req));
|
|
14767
|
+
});
|
|
14768
|
+
}
|
|
14769
|
+
ExportCsv.Export = Export;
|
|
14770
|
+
/**
|
|
14771
|
+
* Exports CSV for a provided list of Entity IDs.
|
|
14772
|
+
* This calls: POST entities/ExportCSV/{entityType_ID}
|
|
14773
|
+
*/
|
|
14774
|
+
function ExportEntities(params) {
|
|
14775
|
+
var _a;
|
|
14776
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14777
|
+
let { api, entityTypeId, fileExport, zip, req } = params;
|
|
14778
|
+
if (!api) {
|
|
14779
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
14780
|
+
}
|
|
14781
|
+
if (!entityTypeId) {
|
|
14782
|
+
throw ("entityTypeId is required.");
|
|
14783
|
+
}
|
|
14784
|
+
if (!((_a = fileExport === null || fileExport === void 0 ? void 0 : fileExport.EntityIDs) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
14785
|
+
throw ("fileExport.EntityIDs is required and must be a non-empty list.");
|
|
14786
|
+
}
|
|
14787
|
+
let url = `entities/ExportCSV/${exports.Api.Encode(entityTypeId)}`;
|
|
14788
|
+
if (zip != null) {
|
|
14789
|
+
const urlParams = new URLSearchParams();
|
|
14790
|
+
urlParams.append("ZIP", String(zip));
|
|
14791
|
+
url += `?${urlParams.toString()}`;
|
|
14792
|
+
}
|
|
14793
|
+
return api.POST(url, fileExport, exports.Api.PrepReqParams(req));
|
|
14794
|
+
});
|
|
14795
|
+
}
|
|
14796
|
+
ExportCsv.ExportEntities = ExportEntities;
|
|
14797
|
+
function appendStringParam(urlParams, key, value) {
|
|
14798
|
+
if (value != null && value !== "") {
|
|
14799
|
+
urlParams.append(key, String(value));
|
|
14800
|
+
}
|
|
14801
|
+
}
|
|
14802
|
+
})(exports.ExportCsv || (exports.ExportCsv = {}));
|
|
14803
|
+
|
|
14720
14804
|
(function (ExportUsd) {
|
|
14721
14805
|
function Export(params) {
|
|
14722
14806
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -20255,7 +20339,7 @@
|
|
|
20255
20339
|
})(exports.UrlUtils || (exports.UrlUtils = {}));
|
|
20256
20340
|
|
|
20257
20341
|
// This is updated with the package.json version on build.
|
|
20258
|
-
const VERSION = "7.1.
|
|
20342
|
+
const VERSION = "7.1.82";
|
|
20259
20343
|
|
|
20260
20344
|
exports.VERSION = VERSION;
|
|
20261
20345
|
exports.AbstractApi = AbstractApi;
|