bruce-models 6.5.3 → 6.5.5

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.
@@ -13462,7 +13462,7 @@ var User;
13462
13462
  if (!expand) {
13463
13463
  expand = "";
13464
13464
  }
13465
- return Api.ECacheKey.User + Api.ECacheKey.Id + userId + Api.ECacheKey.Id + accountId + Api.ECacheKey.Session + Api.ECacheKey.Id + sessionId;
13465
+ return Api.ECacheKey.User + Api.ECacheKey.Id + userId + Api.ECacheKey.Id + accountId + Api.ECacheKey.Session + Api.ECacheKey.Id + sessionId + Api.ECacheKey.Id + expand;
13466
13466
  }
13467
13467
  User$$1.GetCacheKey = GetCacheKey;
13468
13468
  /**
@@ -13969,6 +13969,20 @@ var AccountLimits;
13969
13969
  ELimit["EnableSSOLogin"] = "EnableSSOLogin";
13970
13970
  ELimit["EnableSSOLoginAutoRedirect"] = "EnableSSOLoginAutoRedirect";
13971
13971
  })(ELimit = AccountLimits$$1.ELimit || (AccountLimits$$1.ELimit = {}));
13972
+ /**
13973
+ * Types used to identify what 'path' is taken for an extension.
13974
+ * This is so clients know what import requests to perform, and what UI to present.
13975
+ */
13976
+ let EFileImportType;
13977
+ (function (EFileImportType) {
13978
+ EFileImportType["Assembly"] = "ASSEMBLY";
13979
+ EFileImportType["GeoJSON"] = "GEOJSON";
13980
+ EFileImportType["JSON"] = "JSON";
13981
+ EFileImportType["CSV"] = "CSV";
13982
+ EFileImportType["KML"] = "KML";
13983
+ EFileImportType["TIF"] = "TIF";
13984
+ EFileImportType["LAS"] = "LAS";
13985
+ })(EFileImportType = AccountLimits$$1.EFileImportType || (AccountLimits$$1.EFileImportType = {}));
13972
13986
  /**
13973
13987
  * Returns a dictionary of limits for the given account.
13974
13988
  * @param params
@@ -14086,6 +14100,48 @@ var AccountLimits;
14086
14100
  */
14087
14101
  let Assert;
14088
14102
  (function (Assert) {
14103
+ function GetFileImportSettings(params) {
14104
+ return __awaiter(this, void 0, void 0, function* () {
14105
+ if (!params.extension) {
14106
+ return {
14107
+ fileImport: [],
14108
+ errorText: "No extension provided for file import settings."
14109
+ };
14110
+ }
14111
+ if (!params.getters) {
14112
+ params.getters = ENVIRONMENT.Api();
14113
+ }
14114
+ if (!params.accountId) {
14115
+ params.accountId = params.getters.GetAccountId();
14116
+ }
14117
+ const { limits } = yield GetLimits({
14118
+ accountId: params.accountId,
14119
+ api: params.getters.GetGuardianApi()
14120
+ });
14121
+ const fileImport = limits.FileImport;
14122
+ if (!fileImport) {
14123
+ return {
14124
+ fileImport: [],
14125
+ errorText: null
14126
+ };
14127
+ }
14128
+ const extension = params.extension.replace(".", "").toLowerCase();
14129
+ const related = fileImport.filter((fImport) => {
14130
+ const iExtensions = fImport.Extension;
14131
+ if (!(iExtensions === null || iExtensions === void 0 ? void 0 : iExtensions.length)) {
14132
+ return false;
14133
+ }
14134
+ return iExtensions.some((ext) => {
14135
+ ext = ext.replace(".", "").toLowerCase();
14136
+ return ext === extension;
14137
+ });
14138
+ });
14139
+ return {
14140
+ fileImport: related
14141
+ };
14142
+ });
14143
+ }
14144
+ Assert.GetFileImportSettings = GetFileImportSettings;
14089
14145
  /**
14090
14146
  * Returns if project view creation is allowed for the account.
14091
14147
  */
@@ -16178,7 +16234,7 @@ var Tracking;
16178
16234
  })(Tracking || (Tracking = {}));
16179
16235
 
16180
16236
  // This is updated with the package.json version on build.
16181
- const VERSION = "6.5.3";
16237
+ const VERSION = "6.5.5";
16182
16238
 
16183
16239
  export { VERSION, Assembly, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking };
16184
16240
  //# sourceMappingURL=bruce-models.es5.js.map