bruce-models 6.5.1 → 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.
@@ -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",
@@ -16149,7 +16163,7 @@ var Tracking;
16149
16163
  })(Tracking || (Tracking = {}));
16150
16164
 
16151
16165
  // This is updated with the package.json version on build.
16152
- const VERSION = "6.5.1";
16166
+ const VERSION = "6.5.2";
16153
16167
 
16154
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 };
16155
16169
  //# sourceMappingURL=bruce-models.es5.js.map