bruce-models 4.1.6 → 4.1.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.
@@ -11157,17 +11157,18 @@
11157
11157
  EFeature["EntityLexicalSearch"] = "Feature_Entity_Lexical_Search";
11158
11158
  })(EFeature = AccountFeatures.EFeature || (AccountFeatures.EFeature = {}));
11159
11159
  /**
11160
- * Gets account features corresponding to an account ID.
11160
+ * Gets account features corresponding to the API instance's account.
11161
11161
  * @param params
11162
11162
  * @returns
11163
11163
  */
11164
11164
  function Get(params) {
11165
11165
  return __awaiter(this, void 0, void 0, function* () {
11166
- let { api, accountId: id, req: reqParams } = params;
11166
+ let { api, req: reqParams } = params;
11167
11167
  if (!api) {
11168
11168
  api = exports.ENVIRONMENT.Api().GetBruceApi();
11169
11169
  }
11170
- const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
11170
+ const accountId = api.AccountId;
11171
+ const cache = yield api.GetCacheItem(GetCacheKey(accountId), reqParams);
11171
11172
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
11172
11173
  return cache.data;
11173
11174
  }
@@ -11184,7 +11185,7 @@
11184
11185
  }
11185
11186
  }));
11186
11187
  api.SetCacheItem({
11187
- key: GetCacheKey(id),
11188
+ key: GetCacheKey(accountId),
11188
11189
  value: prom,
11189
11190
  req: reqParams
11190
11191
  });
@@ -11194,10 +11195,11 @@
11194
11195
  AccountFeatures.Get = Get;
11195
11196
  function Update(params) {
11196
11197
  return __awaiter(this, void 0, void 0, function* () {
11197
- let { api, accountId: id, features, req: reqParams } = params;
11198
+ let { api, features, req: reqParams } = params;
11198
11199
  if (!api) {
11199
11200
  api = exports.ENVIRONMENT.Api().GetBruceApi();
11200
11201
  }
11202
+ const accountId = api.AccountId;
11201
11203
  const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
11202
11204
  try {
11203
11205
  const data = yield api.POST("features", {
@@ -11212,7 +11214,7 @@
11212
11214
  rej(e);
11213
11215
  }
11214
11216
  }));
11215
- api.Cache.Remove(GetCacheKey(id));
11217
+ api.Cache.Remove(GetCacheKey(accountId));
11216
11218
  return prom;
11217
11219
  });
11218
11220
  }
@@ -12848,7 +12850,7 @@
12848
12850
  })(exports.DataSource || (exports.DataSource = {}));
12849
12851
 
12850
12852
  // This is updated with the package.json version on build.
12851
- const VERSION = "4.1.6";
12853
+ const VERSION = "4.1.7";
12852
12854
 
12853
12855
  exports.VERSION = VERSION;
12854
12856
  exports.AbstractApi = AbstractApi;