bruce-models 4.4.7 → 4.4.8

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.
@@ -2923,21 +2923,42 @@
2923
2923
  }
2924
2924
  const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
2925
2925
  try {
2926
- const urlParams = new URLSearchParams();
2927
- if (parentTypeId) {
2928
- urlParams.append("parentEntityTypeID", parentTypeId);
2929
- }
2926
+ // If we have an array of typeIds then we'll request in batches to avoid overflowing the URL.
2927
+ const BATCH_SIZE = 20;
2928
+ const reqs = [];
2930
2929
  if (entityTypeIds) {
2931
- for (const id of entityTypeIds) {
2932
- urlParams.append("typeId", id);
2930
+ for (let i = 0; i < entityTypeIds.length; i += BATCH_SIZE) {
2931
+ const batch = entityTypeIds.slice(i, i + BATCH_SIZE);
2932
+ const urlParams = new URLSearchParams();
2933
+ for (const id of batch) {
2934
+ urlParams.append("typeId", id);
2935
+ }
2936
+ if (parentTypeId) {
2937
+ urlParams.append("parentEntityTypeID", parentTypeId);
2938
+ }
2939
+ reqs.push(api.GET("entitytypes?" + urlParams.toString(), exports.Api.PrepReqParams(reqParams)));
2933
2940
  }
2934
2941
  }
2935
- const data = yield api.GET("entitytypes?" + urlParams.toString(), exports.Api.PrepReqParams(reqParams));
2936
- for (const item of data.Items) {
2937
- appendInternalAttrSchema(item);
2942
+ else {
2943
+ const urlParams = new URLSearchParams();
2944
+ if (parentTypeId) {
2945
+ urlParams.append("parentEntityTypeID", parentTypeId);
2946
+ }
2947
+ reqs.push(api.GET("entitytypes?" + urlParams.toString(), exports.Api.PrepReqParams(reqParams)));
2948
+ }
2949
+ const data = yield Promise.all(reqs);
2950
+ // Populate array, while checking for already added types.
2951
+ const types = [];
2952
+ for (const item of data) {
2953
+ for (const type of item.Items) {
2954
+ appendInternalAttrSchema(type);
2955
+ if (!types.find(x => x.ID == type.ID)) {
2956
+ types.push(type);
2957
+ }
2958
+ }
2938
2959
  }
2939
2960
  res({
2940
- entityTypes: data.Items
2961
+ entityTypes: types
2941
2962
  });
2942
2963
  }
2943
2964
  catch (e) {
@@ -9881,6 +9902,15 @@
9881
9902
  // This is the expected default version for the DataVersion value.
9882
9903
  // This value should NOT be changed without looking at our API and seeing what the default value is.
9883
9904
  ProjectViewBookmark.DEFAULT_DATA_VERSION = 2;
9905
+ /**
9906
+ * Describes the content of a bookmark.
9907
+ * As part of a deal we've been commissioned to create an alternative bookmark type to embed content.
9908
+ */
9909
+ let EContentType;
9910
+ (function (EContentType) {
9911
+ EContentType["WEB_3D"] = "WEB_3D";
9912
+ EContentType["IFRAME"] = "IFRAME";
9913
+ })(EContentType = ProjectViewBookmark.EContentType || (ProjectViewBookmark.EContentType = {}));
9884
9914
  /**
9885
9915
  * Gets a bookmark record.
9886
9916
  * @param params
@@ -13357,7 +13387,7 @@
13357
13387
  })(exports.DataSource || (exports.DataSource = {}));
13358
13388
 
13359
13389
  // This is updated with the package.json version on build.
13360
- const VERSION = "4.4.7";
13390
+ const VERSION = "4.4.8";
13361
13391
 
13362
13392
  exports.VERSION = VERSION;
13363
13393
  exports.AbstractApi = AbstractApi;