bruce-models 6.5.0 → 6.5.2
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 +18 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +18 -2
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-type.js +14 -0
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/user/session.js +3 -1
- package/dist/lib/user/session.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -2968,10 +2968,14 @@ var EntityType;
|
|
|
2968
2968
|
if (!data.Name) {
|
|
2969
2969
|
data.Name = data.ID;
|
|
2970
2970
|
}
|
|
2971
|
+
// Will not append if we're not updating schema (not specified).
|
|
2971
2972
|
appendInternalAttrSchema(data);
|
|
2972
2973
|
const res = yield api.POST(`entitytype/${data.ID}`, data, Api.PrepReqParams(reqParams));
|
|
2973
2974
|
api.Cache.RemoveByStartsWith(GetCacheKey(data.ID));
|
|
2974
2975
|
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
2976
|
+
// Useful to append afterwards as newly created Entity Types may have it missing.
|
|
2977
|
+
// This makes our UI apps not have to check for default attribute existence.
|
|
2978
|
+
appendInternalAttrSchema(res);
|
|
2975
2979
|
return {
|
|
2976
2980
|
entityType: res
|
|
2977
2981
|
};
|
|
@@ -3116,6 +3120,16 @@ function appendInternalAttrSchema(type) {
|
|
|
3116
3120
|
bruce.Structure = [];
|
|
3117
3121
|
}
|
|
3118
3122
|
// Append any missing internal attributes.
|
|
3123
|
+
if (!bruce.Structure.find(x => x.Key == "ID")) {
|
|
3124
|
+
bruce.Structure.push({
|
|
3125
|
+
Key: "ID",
|
|
3126
|
+
Name: "ID",
|
|
3127
|
+
Description: "Unique identifier for the Entity.",
|
|
3128
|
+
Type: EntityAttribute.EType.String,
|
|
3129
|
+
IsIndexed: true,
|
|
3130
|
+
IsImportant: true
|
|
3131
|
+
});
|
|
3132
|
+
}
|
|
3119
3133
|
if (!bruce.Structure.find(x => x.Key == "Location")) {
|
|
3120
3134
|
bruce.Structure.push({
|
|
3121
3135
|
Key: "Location",
|
|
@@ -12661,6 +12675,7 @@ var Session;
|
|
|
12661
12675
|
if ((_c = (_b = session === null || session === void 0 ? void 0 : session.User) === null || _b === void 0 ? void 0 : _b.AccessPermissions) === null || _c === void 0 ? void 0 : _c.length) {
|
|
12662
12676
|
for (let i = 0; i < session.User.AccessPermissions.length; i++) {
|
|
12663
12677
|
const perms = session.User.AccessPermissions[i];
|
|
12678
|
+
let accIdChecked = false;
|
|
12664
12679
|
// Newer API versions always specify accountId in the collections.
|
|
12665
12680
|
// If it's set we can do a super account check early.
|
|
12666
12681
|
if (perms["ClientAccount.ID"] != null) {
|
|
@@ -12668,13 +12683,14 @@ var Session;
|
|
|
12668
12683
|
if (pAccountId != Api.SUPER_ACCOUNT_ID) {
|
|
12669
12684
|
continue;
|
|
12670
12685
|
}
|
|
12686
|
+
accIdChecked = true;
|
|
12671
12687
|
}
|
|
12672
12688
|
if ((_d = perms === null || perms === void 0 ? void 0 : perms.UserGroups) === null || _d === void 0 ? void 0 : _d.length) {
|
|
12673
12689
|
for (let j = 0; j < perms.UserGroups.length; j++) {
|
|
12674
12690
|
const group = perms.UserGroups[j];
|
|
12675
12691
|
if (typeof group != "string") {
|
|
12676
12692
|
const gAccountId = String(group["ClientAccount.ID"]).toLowerCase();
|
|
12677
|
-
if (gAccountId != Api.SUPER_ACCOUNT_ID) {
|
|
12693
|
+
if (gAccountId != Api.SUPER_ACCOUNT_ID && !accIdChecked) {
|
|
12678
12694
|
continue;
|
|
12679
12695
|
}
|
|
12680
12696
|
const features = group.Features;
|
|
@@ -16147,7 +16163,7 @@ var Tracking;
|
|
|
16147
16163
|
})(Tracking || (Tracking = {}));
|
|
16148
16164
|
|
|
16149
16165
|
// This is updated with the package.json version on build.
|
|
16150
|
-
const VERSION = "6.5.
|
|
16166
|
+
const VERSION = "6.5.2";
|
|
16151
16167
|
|
|
16152
16168
|
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 };
|
|
16153
16169
|
//# sourceMappingURL=bruce-models.es5.js.map
|