bruce-models 6.5.6 → 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;
@@ -16236,7 +16244,7 @@ var Tracking;
16236
16244
  })(Tracking || (Tracking = {}));
16237
16245
 
16238
16246
  // This is updated with the package.json version on build.
16239
- const VERSION = "6.5.6";
16247
+ const VERSION = "6.5.7";
16240
16248
 
16241
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 };
16242
16250
  //# sourceMappingURL=bruce-models.es5.js.map