bruce-models 7.1.14 → 7.1.16

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.
@@ -8439,7 +8439,7 @@ var EntityTypeTrigger;
8439
8439
  }
8440
8440
  const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
8441
8441
  try {
8442
- const data = yield requestWithFallback(getSingleEndpoints(entityTypeTriggerId), (url) => api.GET(url, Api.PrepReqParams(reqParams)));
8442
+ const data = yield api.GET(`entityTypeTrigger/${entityTypeTriggerId}`, Api.PrepReqParams(reqParams));
8443
8443
  res({
8444
8444
  trigger: ParseResponse(data)
8445
8445
  });
@@ -8470,7 +8470,7 @@ var EntityTypeTrigger;
8470
8470
  if (!api) {
8471
8471
  api = ENVIRONMENT.Api().GetBruceApi();
8472
8472
  }
8473
- yield requestWithFallback(getSingleEndpoints(entityTypeTriggerId), (url) => api.DELETE(url, Api.PrepReqParams(reqParams)));
8473
+ yield api.DELETE(`entityTypeTrigger/${entityTypeTriggerId}`, Api.PrepReqParams(reqParams));
8474
8474
  api.Cache.Remove(GetCacheKey(entityTypeTriggerId));
8475
8475
  api.Cache.RemoveByStartsWith(GetListCacheKey());
8476
8476
  });
@@ -8493,7 +8493,7 @@ var EntityTypeTrigger;
8493
8493
  }
8494
8494
  const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
8495
8495
  try {
8496
- const data = yield requestWithFallback(getListEndpoints(entityTypeId), (url) => api.GET(url, Api.PrepReqParams(reqParams)));
8496
+ const data = yield api.GET(entityTypeId ? `entityType/${entityTypeId}/triggers` : "entityTypeTriggers", Api.PrepReqParams(reqParams));
8497
8497
  res({
8498
8498
  triggers: ParseListResponse(data)
8499
8499
  });
@@ -8527,7 +8527,7 @@ var EntityTypeTrigger;
8527
8527
  if (data.ID == null || data.ID === "") {
8528
8528
  data.ID = ObjectUtils.UId();
8529
8529
  }
8530
- const res = yield requestWithFallback(getSingleEndpoints(data.ID), (url) => api.POST(url, data, Api.PrepReqParams(reqParams)));
8530
+ const res = yield api.POST(`entityTypeTrigger/${data.ID}`, data, Api.PrepReqParams(reqParams));
8531
8531
  api.Cache.Remove(GetCacheKey(data.ID));
8532
8532
  api.Cache.RemoveByStartsWith(GetListCacheKey());
8533
8533
  return {
@@ -8598,63 +8598,6 @@ function parseObject$1(data) {
8598
8598
  }
8599
8599
  return data;
8600
8600
  }
8601
- function getSingleEndpoints(id) {
8602
- return dedupe([
8603
- `v1/entityTypeTrigger/${id}`,
8604
- `v1/entityTypeTriggers/${id}`,
8605
- `entityTypeTrigger/${id}`,
8606
- `entityTypeTriggers/${id}`
8607
- ]);
8608
- }
8609
- function getListEndpoints(entityTypeId) {
8610
- if (entityTypeId) {
8611
- return dedupe([
8612
- `v1/entityType/${entityTypeId}/entityTypeTriggers`,
8613
- `v1/entityType/${entityTypeId}/triggers`,
8614
- `entityType/${entityTypeId}/entityTypeTriggers`,
8615
- `entityType/${entityTypeId}/triggers`
8616
- ]);
8617
- }
8618
- return dedupe([
8619
- "v1/entityTypeTriggers",
8620
- "entityTypeTriggers"
8621
- ]);
8622
- }
8623
- function dedupe(values) {
8624
- return [...new Set(values)];
8625
- }
8626
- function requestWithFallback(urls, perform) {
8627
- return __awaiter(this, void 0, void 0, function* () {
8628
- let lastErr;
8629
- for (let i = 0; i < urls.length; i++) {
8630
- const url = urls[i];
8631
- try {
8632
- return yield perform(url);
8633
- }
8634
- catch (e) {
8635
- lastErr = e;
8636
- const hasNext = i < urls.length - 1;
8637
- if (!hasNext || !isUnknownEdgeError(e)) {
8638
- throw e;
8639
- }
8640
- }
8641
- }
8642
- throw lastErr;
8643
- });
8644
- }
8645
- function isUnknownEdgeError(error) {
8646
- var _a, _b, _c, _d, _e;
8647
- const status = (_b = (_a = error === null || error === void 0 ? void 0 : error.StatusCode) !== null && _a !== void 0 ? _a : error === null || error === void 0 ? void 0 : error.status) !== null && _b !== void 0 ? _b : error === null || error === void 0 ? void 0 : error.statusCode;
8648
- if (status === 404) {
8649
- return true;
8650
- }
8651
- const rawMessage = (_e = (_d = (_c = error === null || error === void 0 ? void 0 : error.Message) !== null && _c !== void 0 ? _c : error === null || error === void 0 ? void 0 : error.message) !== null && _d !== void 0 ? _d : error === null || error === void 0 ? void 0 : error.Result) !== null && _e !== void 0 ? _e : error;
8652
- const message = typeof rawMessage === "string" ? rawMessage : JSON.stringify(rawMessage || {});
8653
- return (message.toLowerCase().includes("specified edge is not found")
8654
- || message.toLowerCase().includes("doesn't support requested method")
8655
- || message.toLowerCase().includes("does not support requested method")
8656
- || message.toLowerCase().includes("not found"));
8657
- }
8658
8601
 
8659
8602
  var MathUtils;
8660
8603
  (function (MathUtils) {
@@ -15540,14 +15483,23 @@ var DataLab;
15540
15483
  if (!params) {
15541
15484
  params = {};
15542
15485
  }
15543
- let { api, req, expandGroups } = params;
15486
+ let { api, req, expandGroups, isActionableOnly, IsActionableOnly } = params;
15544
15487
  if (!api) {
15545
15488
  api = ENVIRONMENT.Api().GetBruceApi();
15546
15489
  }
15547
15490
  let url = "entities/datalab/savedQueries";
15491
+ const urlParams = new URLSearchParams();
15492
+ let hasUrlParams = false;
15548
15493
  if (expandGroups) {
15549
- const urlParams = new URLSearchParams();
15550
15494
  urlParams.append("ExpandGroups", "true");
15495
+ hasUrlParams = true;
15496
+ }
15497
+ const actionableOnly = isActionableOnly !== null && isActionableOnly !== void 0 ? isActionableOnly : IsActionableOnly;
15498
+ if (actionableOnly === true) {
15499
+ urlParams.append("IsActionableOnly", "true");
15500
+ hasUrlParams = true;
15501
+ }
15502
+ if (hasUrlParams) {
15551
15503
  url += "?" + urlParams.toString();
15552
15504
  }
15553
15505
  const res = yield api.GET(url, Api.PrepReqParams(req));
@@ -17486,7 +17438,7 @@ var ChangeSet;
17486
17438
  })(ChangeSet || (ChangeSet = {}));
17487
17439
 
17488
17440
  // This is updated with the package.json version on build.
17489
- const VERSION = "7.1.14";
17441
+ const VERSION = "7.1.16";
17490
17442
 
17491
17443
  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, EntityTypeTrigger, 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, UserMfaMethod, 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, NavigatorChatClient, NavigatorMcpWebSocketClient, ChangeSet };
17492
17444
  //# sourceMappingURL=bruce-models.es5.js.map