bruce-models 6.1.4 → 6.1.5

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.
@@ -9042,7 +9042,7 @@ var ClientFile;
9042
9042
  });
9043
9043
  // TODO: Check if we can add it to the request like the small file upload.
9044
9044
  if ((clientFile === null || clientFile === void 0 ? void 0 : clientFile.ID) && purpose) {
9045
- yield UpdatePurpose({
9045
+ yield ClientFile.UpdatePurpose({
9046
9046
  api,
9047
9047
  fileId: clientFile.ID,
9048
9048
  purpose,
@@ -9079,23 +9079,30 @@ var ClientFile;
9079
9079
  * Updates the purpose of a client file.
9080
9080
  * @param params
9081
9081
  */
9082
- function UpdatePurpose(params) {
9082
+ function Update(params) {
9083
9083
  return __awaiter(this, void 0, void 0, function* () {
9084
- let { api, fileId, purpose, req: reqParams } = params;
9084
+ let { api, fileId, purpose, layerIds, req: reqParams, dataEntityId } = params;
9085
9085
  if (!api) {
9086
9086
  api = ENVIRONMENT.Api().GetBruceApi();
9087
9087
  }
9088
- if (!purpose) {
9089
- purpose = "";
9088
+ const data = {};
9089
+ if (layerIds != null) {
9090
+ data["Layer.ID"] = layerIds;
9090
9091
  }
9091
- yield api.POST("file/updatepurpose/" + fileId + "/?Purpose=" + purpose, {
9092
- Purpose: purpose
9093
- }, Api.PrepReqParams(reqParams));
9092
+ if (purpose != null) {
9093
+ data.Purpose = purpose ? purpose : "";
9094
+ }
9095
+ if (dataEntityId != null) {
9096
+ data["Data.Entity.ID"] = dataEntityId ? dataEntityId : "";
9097
+ }
9098
+ yield api.POST(`file/${fileId}/details`, data, Api.PrepReqParams(reqParams));
9094
9099
  const cacheKey = GetCacheKey(fileId);
9095
9100
  api.Cache.RemoveByContains(cacheKey);
9096
9101
  });
9097
9102
  }
9098
- ClientFile.UpdatePurpose = UpdatePurpose;
9103
+ ClientFile.Update = Update;
9104
+ // @deprecated. Use Update instead.
9105
+ ClientFile.UpdatePurpose = Update;
9099
9106
  /**
9100
9107
  * Uploads a temp file.
9101
9108
  * This will return a temp file ID.
@@ -15855,7 +15862,7 @@ var Tracking;
15855
15862
  })(Tracking || (Tracking = {}));
15856
15863
 
15857
15864
  // This is updated with the package.json version on build.
15858
- const VERSION = "6.1.4";
15865
+ const VERSION = "6.1.5";
15859
15866
 
15860
15867
  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 };
15861
15868
  //# sourceMappingURL=bruce-models.es5.js.map