bruce-models 7.1.65 → 7.1.66

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.
@@ -8753,6 +8753,65 @@
8753
8753
  });
8754
8754
  }
8755
8755
  ClientFile.GetList = GetList;
8756
+ function GetFindGeneratedTextureCacheKey(entityTypeSourceId, attribute) {
8757
+ return `client-file-find-generated-texture-${entityTypeSourceId}-${attribute}`;
8758
+ }
8759
+ /**
8760
+ * Returns a generated texture file for given source ID + attribute combination.
8761
+ */
8762
+ function FindGeneratedTexture(params) {
8763
+ return __awaiter(this, void 0, void 0, function* () {
8764
+ let { api, entityTypeSourceId, attribute, req: reqParams } = params;
8765
+ if (!api) {
8766
+ api = exports.ENVIRONMENT.Api().GetBruceApi();
8767
+ }
8768
+ const key = GetFindGeneratedTextureCacheKey(entityTypeSourceId, attribute);
8769
+ const cache = api.GetCacheItem(key, reqParams);
8770
+ if (cache === null || cache === void 0 ? void 0 : cache.found) {
8771
+ return cache.data;
8772
+ }
8773
+ const prom = (() => __awaiter(this, void 0, void 0, function* () {
8774
+ var _a;
8775
+ const res = yield GetList({
8776
+ api,
8777
+ filter: {
8778
+ PageSize: 1,
8779
+ PageIndex: 0,
8780
+ Purpose: "Polygon Texture",
8781
+ FilterRows: [
8782
+ {
8783
+ column: Filter.EColumn.Data,
8784
+ path: "generation/EntityType.Source.ID",
8785
+ rowOperator: Filter.ERowOperator.AND,
8786
+ value: String(entityTypeSourceId),
8787
+ includes: true,
8788
+ valueOperator: "equals",
8789
+ rows: []
8790
+ },
8791
+ {
8792
+ column: Filter.EColumn.Data,
8793
+ path: "generation/Attribute",
8794
+ rowOperator: Filter.ERowOperator.AND,
8795
+ value: attribute,
8796
+ includes: true,
8797
+ valueOperator: "equals",
8798
+ rows: []
8799
+ }
8800
+ ]
8801
+ },
8802
+ req: reqParams
8803
+ });
8804
+ return ((_a = res.clientFiles) === null || _a === void 0 ? void 0 : _a[0]) || null;
8805
+ }))();
8806
+ api.SetCacheItem({
8807
+ key,
8808
+ value: prom,
8809
+ req: reqParams
8810
+ });
8811
+ return prom;
8812
+ });
8813
+ }
8814
+ ClientFile.FindGeneratedTexture = FindGeneratedTexture;
8756
8815
  /**
8757
8816
  * Deletes a list of client files matching the filter.
8758
8817
  * @param params
@@ -19169,7 +19228,7 @@
19169
19228
  })(exports.UrlUtils || (exports.UrlUtils = {}));
19170
19229
 
19171
19230
  // This is updated with the package.json version on build.
19172
- const VERSION = "7.1.65";
19231
+ const VERSION = "7.1.66";
19173
19232
 
19174
19233
  exports.VERSION = VERSION;
19175
19234
  exports.AbstractApi = AbstractApi;