bruce-models 0.1.8 → 0.2.0

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.
@@ -4114,8 +4114,8 @@
4114
4114
  return "" + exports.Api.ECacheKey.ProjectViewBookmark + exports.Api.ECacheKey.Id + viewId + exports.Api.ECacheKey.Id + bookmarkId;
4115
4115
  }
4116
4116
  ProjectViewBookmark.GetCacheKey = GetCacheKey;
4117
- function GetListCacheKey() {
4118
- return exports.Api.ECacheKey.ProjectViewBookmark;
4117
+ function GetListCacheKey(viewId) {
4118
+ return "" + exports.Api.ECacheKey.ProjectViewBookmark + exports.Api.ECacheKey.Id + viewId;
4119
4119
  }
4120
4120
  ProjectViewBookmark.GetListCacheKey = GetListCacheKey;
4121
4121
  function Get(api, viewId, bookmarkId) {
@@ -4149,7 +4149,7 @@
4149
4149
  case 1:
4150
4150
  _a.sent();
4151
4151
  api.Cache.Remove(GetCacheKey(viewId, bookmarkId));
4152
- api.Cache.Remove(GetListCacheKey());
4152
+ api.Cache.Remove(GetListCacheKey(viewId));
4153
4153
  return [2 /*return*/];
4154
4154
  }
4155
4155
  });
@@ -4164,7 +4164,7 @@
4164
4164
  if (!viewId) {
4165
4165
  throw ("View ID is required.");
4166
4166
  }
4167
- cacheData = api.Cache.Get(GetListCacheKey());
4167
+ cacheData = api.Cache.Get(GetListCacheKey(viewId));
4168
4168
  if (cacheData) {
4169
4169
  return [2 /*return*/, cacheData];
4170
4170
  }
@@ -4187,7 +4187,7 @@
4187
4187
  }
4188
4188
  });
4189
4189
  }); });
4190
- api.Cache.Set(GetListCacheKey(), req, exports.Api.DEFAULT_CACHE_DURATION);
4190
+ api.Cache.Set(GetListCacheKey(viewId), req, exports.Api.DEFAULT_CACHE_DURATION);
4191
4191
  return [2 /*return*/, req];
4192
4192
  });
4193
4193
  });
@@ -4208,7 +4208,7 @@
4208
4208
  case 1:
4209
4209
  data = _a.sent();
4210
4210
  api.Cache.Remove(GetCacheKey(viewId, data.ID));
4211
- api.Cache.Remove(GetListCacheKey());
4211
+ api.Cache.Remove(GetListCacheKey(viewId));
4212
4212
  return [2 /*return*/, data];
4213
4213
  }
4214
4214
  });
@@ -4649,7 +4649,7 @@
4649
4649
  Session.Get = Get;
4650
4650
  function Login(api, username, password, accountId) {
4651
4651
  return __awaiter(this, void 0, void 0, function () {
4652
- var data, ssid;
4652
+ var data, session, ssid;
4653
4653
  return __generator(this, function (_a) {
4654
4654
  switch (_a.label) {
4655
4655
  case 0:
@@ -4663,10 +4663,11 @@
4663
4663
  })];
4664
4664
  case 1:
4665
4665
  data = _a.sent();
4666
- ssid = data === null || data === void 0 ? void 0 : data.ID;
4666
+ session = data === null || data === void 0 ? void 0 : data.Session;
4667
+ ssid = session === null || session === void 0 ? void 0 : session.ID;
4667
4668
  api.SetSessionId(ssid);
4668
4669
  api.Cache.Remove(GetCacheKey(ssid));
4669
- return [2 /*return*/, data];
4670
+ return [2 /*return*/, session];
4670
4671
  }
4671
4672
  });
4672
4673
  });