bruce-models 7.1.65 → 7.1.67

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.
@@ -8853,6 +8853,71 @@ var ClientFile;
8853
8853
  });
8854
8854
  }
8855
8855
  ClientFile.GetList = GetList;
8856
+ function GetFindGeneratedTextureCacheKey(entityTypeSourceId, attribute) {
8857
+ return `client-file-find-generated-texture-${entityTypeSourceId}-${attribute}`;
8858
+ }
8859
+ /**
8860
+ * Returns a generated texture file for given source ID + attribute combination.
8861
+ */
8862
+ function FindGeneratedTexture(params) {
8863
+ return __awaiter(this, void 0, void 0, function* () {
8864
+ let { api, entityTypeSourceId, attribute, req: reqParams } = params;
8865
+ if (!api) {
8866
+ api = ENVIRONMENT.Api().GetBruceApi();
8867
+ }
8868
+ const key = GetFindGeneratedTextureCacheKey(entityTypeSourceId, attribute);
8869
+ const cache = api.GetCacheItem(key, reqParams);
8870
+ if (cache === null || cache === void 0 ? void 0 : cache.found) {
8871
+ return cache.data;
8872
+ }
8873
+ // Hack: API isn't returning the right file so we're adding to page size and filtering again on client. Patch ASAP.
8874
+ const prom = (() => __awaiter(this, void 0, void 0, function* () {
8875
+ const res = yield GetList({
8876
+ api,
8877
+ filter: {
8878
+ PageSize: 300,
8879
+ PageIndex: 0,
8880
+ Purpose: "Polygon Texture",
8881
+ FilterRows: [
8882
+ {
8883
+ column: Filter.EColumn.Data,
8884
+ path: "generation/EntityType.Source.ID",
8885
+ rowOperator: Filter.ERowOperator.AND,
8886
+ value: String(entityTypeSourceId),
8887
+ includes: true,
8888
+ valueOperator: "equals",
8889
+ rows: []
8890
+ },
8891
+ {
8892
+ column: Filter.EColumn.Data,
8893
+ path: "generation/Attribute",
8894
+ rowOperator: Filter.ERowOperator.AND,
8895
+ value: attribute,
8896
+ includes: true,
8897
+ valueOperator: "equals",
8898
+ rows: []
8899
+ }
8900
+ ]
8901
+ },
8902
+ req: reqParams
8903
+ });
8904
+ const match = (res.clientFiles || []).find((file) => {
8905
+ var _a;
8906
+ const generation = (_a = file === null || file === void 0 ? void 0 : file.Data) === null || _a === void 0 ? void 0 : _a.generation;
8907
+ return ((generation === null || generation === void 0 ? void 0 : generation["EntityType.Source.ID"]) === entityTypeSourceId &&
8908
+ (generation === null || generation === void 0 ? void 0 : generation.Attribute) === attribute);
8909
+ });
8910
+ return match || null;
8911
+ }))();
8912
+ api.SetCacheItem({
8913
+ key,
8914
+ value: prom,
8915
+ req: reqParams
8916
+ });
8917
+ return prom;
8918
+ });
8919
+ }
8920
+ ClientFile.FindGeneratedTexture = FindGeneratedTexture;
8856
8921
  /**
8857
8922
  * Deletes a list of client files matching the filter.
8858
8923
  * @param params
@@ -19516,7 +19581,7 @@ var UrlUtils;
19516
19581
  })(UrlUtils || (UrlUtils = {}));
19517
19582
 
19518
19583
  // This is updated with the package.json version on build.
19519
- const VERSION = "7.1.65";
19584
+ const VERSION = "7.1.67";
19520
19585
 
19521
19586
  export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeTrigger, Ontology, ENVIRONMENT, ExportBrz, ExportUsd, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportedFile, Uploader, Markup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils };
19522
19587
  //# sourceMappingURL=bruce-models.es5.js.map