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.
@@ -2927,10 +2927,14 @@
2927
2927
  if (!data.Name) {
2928
2928
  data.Name = data.ID;
2929
2929
  }
2930
+ // Will not append if we're not updating schema (not specified).
2930
2931
  appendInternalAttrSchema(data);
2931
2932
  const res = yield api.POST(`entitytype/${data.ID}`, data, exports.Api.PrepReqParams(reqParams));
2932
2933
  api.Cache.RemoveByStartsWith(GetCacheKey(data.ID));
2933
2934
  api.Cache.RemoveByStartsWith(GetListCacheKey());
2935
+ // Useful to append afterwards as newly created Entity Types may have it missing.
2936
+ // This makes our UI apps not have to check for default attribute existence.
2937
+ appendInternalAttrSchema(res);
2934
2938
  return {
2935
2939
  entityType: res
2936
2940
  };
@@ -3075,6 +3079,16 @@
3075
3079
  bruce.Structure = [];
3076
3080
  }
3077
3081
  // Append any missing internal attributes.
3082
+ if (!bruce.Structure.find(x => x.Key == "ID")) {
3083
+ bruce.Structure.push({
3084
+ Key: "ID",
3085
+ Name: "ID",
3086
+ Description: "Unique identifier for the Entity.",
3087
+ Type: exports.EntityAttribute.EType.String,
3088
+ IsIndexed: true,
3089
+ IsImportant: true
3090
+ });
3091
+ }
3078
3092
  if (!bruce.Structure.find(x => x.Key == "Location")) {
3079
3093
  bruce.Structure.push({
3080
3094
  Key: "Location",
@@ -15835,7 +15849,7 @@
15835
15849
  })(exports.Tracking || (exports.Tracking = {}));
15836
15850
 
15837
15851
  // This is updated with the package.json version on build.
15838
- const VERSION = "6.5.1";
15852
+ const VERSION = "6.5.2";
15839
15853
 
15840
15854
  exports.VERSION = VERSION;
15841
15855
  exports.AbstractApi = AbstractApi;