bruce-models 6.0.9 → 6.1.1
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.
- package/dist/bruce-models.es5.js +93 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +87 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/server/pending-action.js +46 -0
- package/dist/lib/server/pending-action.js.map +1 -1
- package/dist/lib/tracking/tracking.js +59 -0
- package/dist/lib/tracking/tracking.js.map +1 -0
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/server/pending-action.d.ts +11 -0
- package/dist/types/tracking/tracking.d.ts +52 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -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
|
|
@@ -15771,8 +15817,53 @@ var Scenario;
|
|
|
15771
15817
|
Scenario.Delete = Delete;
|
|
15772
15818
|
})(Scenario || (Scenario = {}));
|
|
15773
15819
|
|
|
15820
|
+
/**
|
|
15821
|
+
* Represents tracked content cross accounts.
|
|
15822
|
+
* Used so we can determine what old API requests can be removed, and what accounts are causing most server load.
|
|
15823
|
+
*/
|
|
15824
|
+
var Tracking;
|
|
15825
|
+
(function (Tracking) {
|
|
15826
|
+
/**
|
|
15827
|
+
* Returns tracking data based on provided parameters.
|
|
15828
|
+
* @param params
|
|
15829
|
+
* @returns
|
|
15830
|
+
*/
|
|
15831
|
+
function GetData(params) {
|
|
15832
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15833
|
+
let { api, req } = params;
|
|
15834
|
+
if (!api) {
|
|
15835
|
+
api = ENVIRONMENT.Api().GetGuardianApi();
|
|
15836
|
+
}
|
|
15837
|
+
const query = new URLSearchParams();
|
|
15838
|
+
if (params.select) {
|
|
15839
|
+
query.append("Select", params.select);
|
|
15840
|
+
}
|
|
15841
|
+
if (params.cType) {
|
|
15842
|
+
query.append("CType", params.cType);
|
|
15843
|
+
}
|
|
15844
|
+
if (params.tCount) {
|
|
15845
|
+
query.append("TCount", params.tCount);
|
|
15846
|
+
}
|
|
15847
|
+
if (params.accountId) {
|
|
15848
|
+
query.append("Account", params.accountId);
|
|
15849
|
+
}
|
|
15850
|
+
if (params.app) {
|
|
15851
|
+
query.append("App", params.app);
|
|
15852
|
+
}
|
|
15853
|
+
if (params.year) {
|
|
15854
|
+
query.append("Year", String(params.year));
|
|
15855
|
+
}
|
|
15856
|
+
if (params.month) {
|
|
15857
|
+
query.append("Month", String(params.month));
|
|
15858
|
+
}
|
|
15859
|
+
return yield api.GET("tracking?" + query.toString(), Api.PrepReqParams(req));
|
|
15860
|
+
});
|
|
15861
|
+
}
|
|
15862
|
+
Tracking.GetData = GetData;
|
|
15863
|
+
})(Tracking || (Tracking = {}));
|
|
15864
|
+
|
|
15774
15865
|
// This is updated with the package.json version on build.
|
|
15775
|
-
const VERSION = "6.
|
|
15866
|
+
const VERSION = "6.1.1";
|
|
15776
15867
|
|
|
15777
|
-
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 };
|
|
15868
|
+
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, Tracking };
|
|
15778
15869
|
//# sourceMappingURL=bruce-models.es5.js.map
|