bruce-models 6.0.9 → 6.1.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.
@@ -11477,6 +11477,52 @@ var PendingAction;
11477
11477
  });
11478
11478
  }
11479
11479
  PendingAction.Get = Get;
11480
+ /**
11481
+ * Returns a list of pending action records by their IDs.
11482
+ * @param params
11483
+ */
11484
+ function GetList(params) {
11485
+ var _a;
11486
+ return __awaiter(this, void 0, void 0, function* () {
11487
+ let { api, ids, reqParams } = params;
11488
+ if (!ids || ids.length === 0) {
11489
+ throw ("IDs are required.");
11490
+ }
11491
+ if (!api) {
11492
+ api = ENVIRONMENT.Api().GetBruceApi();
11493
+ }
11494
+ // Separate code for IDs to avoid overloading URL.
11495
+ // If we're searching for IDs, we'll batch in 50 at a time then return the total.
11496
+ if (((_a = params.ids) === null || _a === void 0 ? void 0 : _a.length) && params.ids.length > 50) {
11497
+ const actions = [];
11498
+ let ids = [...params.ids];
11499
+ while (ids.length > 0) {
11500
+ const batch = ids.splice(0, 50);
11501
+ const result = yield GetList({
11502
+ ids: batch,
11503
+ api,
11504
+ reqParams
11505
+ });
11506
+ actions.push(...result.actions);
11507
+ }
11508
+ const result = {};
11509
+ result.actions = actions;
11510
+ return result;
11511
+ }
11512
+ else {
11513
+ const urlParams = new URLSearchParams();
11514
+ urlParams.append("IDs", ids.join(","));
11515
+ urlParams.append("PageSize", ids.length.toString());
11516
+ urlParams.append("PageIndex", "0");
11517
+ const url = `pendingActions?${urlParams.toString()}`;
11518
+ const data = yield api.GET(url, Api.PrepReqParams(reqParams));
11519
+ return {
11520
+ actions: data.Items
11521
+ };
11522
+ }
11523
+ });
11524
+ }
11525
+ PendingAction.GetList = GetList;
11480
11526
  /**
11481
11527
  * Returns a list of pending action records.
11482
11528
  * @param params
@@ -15772,7 +15818,7 @@ var Scenario;
15772
15818
  })(Scenario || (Scenario = {}));
15773
15819
 
15774
15820
  // This is updated with the package.json version on build.
15775
- const VERSION = "6.0.9";
15821
+ const VERSION = "6.1.0";
15776
15822
 
15777
15823
  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 };
15778
15824
  //# sourceMappingURL=bruce-models.es5.js.map