bruce-models 6.5.4 → 6.5.6
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 +59 -1
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +59 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-limits.js +58 -0
- package/dist/lib/account/account-limits.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/types/account/account-limits.d.ts +35 -2
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -13707,6 +13707,22 @@
|
|
|
13707
13707
|
ELimit["EnableSSOLogin"] = "EnableSSOLogin";
|
|
13708
13708
|
ELimit["EnableSSOLoginAutoRedirect"] = "EnableSSOLoginAutoRedirect";
|
|
13709
13709
|
})(ELimit = AccountLimits.ELimit || (AccountLimits.ELimit = {}));
|
|
13710
|
+
/**
|
|
13711
|
+
* Types used to identify what 'path' is taken for an extension.
|
|
13712
|
+
* This is so clients know what import requests to perform, and what UI to present.
|
|
13713
|
+
*/
|
|
13714
|
+
let EFileImportType;
|
|
13715
|
+
(function (EFileImportType) {
|
|
13716
|
+
EFileImportType["Assembly"] = "ASSEMBLY";
|
|
13717
|
+
EFileImportType["GeoJSON"] = "GEOJSON";
|
|
13718
|
+
EFileImportType["JSON"] = "JSON";
|
|
13719
|
+
EFileImportType["CSV"] = "CSV";
|
|
13720
|
+
EFileImportType["KML"] = "KML";
|
|
13721
|
+
EFileImportType["TIF"] = "TIF";
|
|
13722
|
+
EFileImportType["LAS"] = "LAS";
|
|
13723
|
+
EFileImportType["DJI"] = "DJI";
|
|
13724
|
+
EFileImportType["NSX"] = "NSX";
|
|
13725
|
+
})(EFileImportType = AccountLimits.EFileImportType || (AccountLimits.EFileImportType = {}));
|
|
13710
13726
|
/**
|
|
13711
13727
|
* Returns a dictionary of limits for the given account.
|
|
13712
13728
|
* @param params
|
|
@@ -13824,6 +13840,48 @@
|
|
|
13824
13840
|
*/
|
|
13825
13841
|
let Assert;
|
|
13826
13842
|
(function (Assert) {
|
|
13843
|
+
function GetFileImportSettings(params) {
|
|
13844
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13845
|
+
if (!params.extension) {
|
|
13846
|
+
return {
|
|
13847
|
+
fileImport: [],
|
|
13848
|
+
errorText: "No extension provided for file import settings."
|
|
13849
|
+
};
|
|
13850
|
+
}
|
|
13851
|
+
if (!params.getters) {
|
|
13852
|
+
params.getters = exports.ENVIRONMENT.Api();
|
|
13853
|
+
}
|
|
13854
|
+
if (!params.accountId) {
|
|
13855
|
+
params.accountId = params.getters.GetAccountId();
|
|
13856
|
+
}
|
|
13857
|
+
const { limits } = yield GetLimits({
|
|
13858
|
+
accountId: params.accountId,
|
|
13859
|
+
api: params.getters.GetGuardianApi()
|
|
13860
|
+
});
|
|
13861
|
+
const fileImport = limits.FileImport;
|
|
13862
|
+
if (!fileImport) {
|
|
13863
|
+
return {
|
|
13864
|
+
fileImport: [],
|
|
13865
|
+
errorText: null
|
|
13866
|
+
};
|
|
13867
|
+
}
|
|
13868
|
+
const extension = params.extension.replace(".", "").toLowerCase();
|
|
13869
|
+
const related = fileImport.filter((fImport) => {
|
|
13870
|
+
const iExtensions = fImport.Extension;
|
|
13871
|
+
if (!(iExtensions === null || iExtensions === void 0 ? void 0 : iExtensions.length)) {
|
|
13872
|
+
return false;
|
|
13873
|
+
}
|
|
13874
|
+
return iExtensions.some((ext) => {
|
|
13875
|
+
ext = ext.replace(".", "").toLowerCase();
|
|
13876
|
+
return ext === extension;
|
|
13877
|
+
});
|
|
13878
|
+
});
|
|
13879
|
+
return {
|
|
13880
|
+
fileImport: related
|
|
13881
|
+
};
|
|
13882
|
+
});
|
|
13883
|
+
}
|
|
13884
|
+
Assert.GetFileImportSettings = GetFileImportSettings;
|
|
13827
13885
|
/**
|
|
13828
13886
|
* Returns if project view creation is allowed for the account.
|
|
13829
13887
|
*/
|
|
@@ -15864,7 +15922,7 @@
|
|
|
15864
15922
|
})(exports.Tracking || (exports.Tracking = {}));
|
|
15865
15923
|
|
|
15866
15924
|
// This is updated with the package.json version on build.
|
|
15867
|
-
const VERSION = "6.5.
|
|
15925
|
+
const VERSION = "6.5.6";
|
|
15868
15926
|
|
|
15869
15927
|
exports.VERSION = VERSION;
|
|
15870
15928
|
exports.AbstractApi = AbstractApi;
|