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.
@@ -12313,21 +12313,28 @@
12313
12313
  */
12314
12314
  function Login(params) {
12315
12315
  return __awaiter(this, void 0, void 0, function* () {
12316
- let { api, username, password, accountId, req: reqParams } = params;
12316
+ let { api, username, password, accountId, req: reqParams, code } = params;
12317
12317
  if (!api) {
12318
12318
  api = exports.ENVIRONMENT.Api().GetGuardianApi();
12319
12319
  }
12320
12320
  const data = yield api.POST("login", {
12321
12321
  account: accountId ? accountId : "",
12322
12322
  login: username,
12323
- password: password
12323
+ password: password,
12324
+ code: code
12324
12325
  }, reqParams);
12325
- const session = data === null || data === void 0 ? void 0 : data.Session;
12326
- const ssid = session === null || session === void 0 ? void 0 : session.ID;
12326
+ const session = data.Session;
12327
+ let ssid = session === null || session === void 0 ? void 0 : session.ID;
12328
+ if (!ssid) {
12329
+ ssid = "anonymous";
12330
+ }
12327
12331
  api.SetSessionId(ssid);
12328
12332
  api.Cache.Remove(GetCacheKey(ssid));
12329
12333
  return {
12330
- session: session
12334
+ loggedIn: ssid && ssid != "anonymous",
12335
+ session: session,
12336
+ mfaMessage: data.Message,
12337
+ mfaContact: (data.Email ? data.Email : data.Contact)
12331
12338
  };
12332
12339
  });
12333
12340
  }
@@ -13480,6 +13487,7 @@
13480
13487
  UserGroups: groupIds
13481
13488
  }, reqParams);
13482
13489
  api.Cache.RemoveByContains(exports.User.GetCacheKey(userId, accountId));
13490
+ api.Cache.RemoveByContains(exports.Api.ECacheKey.User);
13483
13491
  });
13484
13492
  }
13485
13493
  UserGroup.RemoveUser = RemoveUser;
@@ -13720,6 +13728,8 @@
13720
13728
  EFileImportType["KML"] = "KML";
13721
13729
  EFileImportType["TIF"] = "TIF";
13722
13730
  EFileImportType["LAS"] = "LAS";
13731
+ EFileImportType["DJI"] = "DJI";
13732
+ EFileImportType["NSX"] = "NSX";
13723
13733
  })(EFileImportType = AccountLimits.EFileImportType || (AccountLimits.EFileImportType = {}));
13724
13734
  /**
13725
13735
  * Returns a dictionary of limits for the given account.
@@ -15920,7 +15930,7 @@
15920
15930
  })(exports.Tracking || (exports.Tracking = {}));
15921
15931
 
15922
15932
  // This is updated with the package.json version on build.
15923
- const VERSION = "6.5.5";
15933
+ const VERSION = "6.5.7";
15924
15934
 
15925
15935
  exports.VERSION = VERSION;
15926
15936
  exports.AbstractApi = AbstractApi;