bruce-models 6.5.5 → 6.5.7

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.
@@ -12551,21 +12551,28 @@ var Session;
12551
12551
  */
12552
12552
  function Login(params) {
12553
12553
  return __awaiter(this, void 0, void 0, function* () {
12554
- let { api, username, password, accountId, req: reqParams } = params;
12554
+ let { api, username, password, accountId, req: reqParams, code } = params;
12555
12555
  if (!api) {
12556
12556
  api = ENVIRONMENT.Api().GetGuardianApi();
12557
12557
  }
12558
12558
  const data = yield api.POST("login", {
12559
12559
  account: accountId ? accountId : "",
12560
12560
  login: username,
12561
- password: password
12561
+ password: password,
12562
+ code: code
12562
12563
  }, reqParams);
12563
- const session = data === null || data === void 0 ? void 0 : data.Session;
12564
- const ssid = session === null || session === void 0 ? void 0 : session.ID;
12564
+ const session = data.Session;
12565
+ let ssid = session === null || session === void 0 ? void 0 : session.ID;
12566
+ if (!ssid) {
12567
+ ssid = "anonymous";
12568
+ }
12565
12569
  api.SetSessionId(ssid);
12566
12570
  api.Cache.Remove(GetCacheKey(ssid));
12567
12571
  return {
12568
- session: session
12572
+ loggedIn: ssid && ssid != "anonymous",
12573
+ session: session,
12574
+ mfaMessage: data.Message,
12575
+ mfaContact: (data.Email ? data.Email : data.Contact)
12569
12576
  };
12570
12577
  });
12571
12578
  }
@@ -13731,6 +13738,7 @@ var UserGroup;
13731
13738
  UserGroups: groupIds
13732
13739
  }, reqParams);
13733
13740
  api.Cache.RemoveByContains(User.GetCacheKey(userId, accountId));
13741
+ api.Cache.RemoveByContains(Api.ECacheKey.User);
13734
13742
  });
13735
13743
  }
13736
13744
  UserGroup.RemoveUser = RemoveUser;
@@ -13982,6 +13990,8 @@ var AccountLimits;
13982
13990
  EFileImportType["KML"] = "KML";
13983
13991
  EFileImportType["TIF"] = "TIF";
13984
13992
  EFileImportType["LAS"] = "LAS";
13993
+ EFileImportType["DJI"] = "DJI";
13994
+ EFileImportType["NSX"] = "NSX";
13985
13995
  })(EFileImportType = AccountLimits$$1.EFileImportType || (AccountLimits$$1.EFileImportType = {}));
13986
13996
  /**
13987
13997
  * Returns a dictionary of limits for the given account.
@@ -16234,7 +16244,7 @@ var Tracking;
16234
16244
  })(Tracking || (Tracking = {}));
16235
16245
 
16236
16246
  // This is updated with the package.json version on build.
16237
- const VERSION = "6.5.5";
16247
+ const VERSION = "6.5.7";
16238
16248
 
16239
16249
  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 };
16240
16250
  //# sourceMappingURL=bruce-models.es5.js.map