bruce-models 7.1.29 → 7.1.31

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.
@@ -17833,7 +17833,7 @@ var ChangeSet;
17833
17833
  EStatus["ERROR"] = "Error";
17834
17834
  })(EStatus = ChangeSet.EStatus || (ChangeSet.EStatus = {}));
17835
17835
  /**
17836
- * Single-character action values stored on Entity Change and Entity Type Change records.
17836
+ * Single-character action values stored on Change Item records.
17837
17837
  */
17838
17838
  let EAction;
17839
17839
  (function (EAction) {
@@ -17841,6 +17841,16 @@ var ChangeSet;
17841
17841
  EAction["UPDATE"] = "U";
17842
17842
  EAction["DELETE"] = "D";
17843
17843
  })(EAction = ChangeSet.EAction || (ChangeSet.EAction = {}));
17844
+ /**
17845
+ * Concept codes that identify what kind of record a Change Item targets.
17846
+ */
17847
+ let EConcept;
17848
+ (function (EConcept) {
17849
+ EConcept["ENTITY"] = "E";
17850
+ EConcept["ENTITY_TYPE"] = "ET";
17851
+ EConcept["ENTITY_LOD"] = "EL";
17852
+ EConcept["ENTITY_RELATION"] = "ER";
17853
+ })(EConcept = ChangeSet.EConcept || (ChangeSet.EConcept = {}));
17844
17854
  /**
17845
17855
  * Updates existing or creates new Change Set record.
17846
17856
  * To create a new record pass a changeSet without an ID (or with ID set to 0/null).
@@ -17853,12 +17863,12 @@ var ChangeSet;
17853
17863
  api = ENVIRONMENT.Api().GetBruceApi();
17854
17864
  }
17855
17865
  const id = (_a = data.ID) !== null && _a !== void 0 ? _a : 0;
17856
- return api.POST(`change/${id}`, data, Api.PrepReqParams(reqParams));
17866
+ return api.POST(`v3/change/${id}`, data, Api.PrepReqParams(reqParams));
17857
17867
  });
17858
17868
  }
17859
17869
  ChangeSet.Update = Update;
17860
17870
  /**
17861
- * Deletes the specified Change Set record.
17871
+ * Deletes the specified Change Set record and all its associated Change Items.
17862
17872
  */
17863
17873
  function Delete(params) {
17864
17874
  return __awaiter(this, void 0, void 0, function* () {
@@ -17866,7 +17876,7 @@ var ChangeSet;
17866
17876
  if (!api) {
17867
17877
  api = ENVIRONMENT.Api().GetBruceApi();
17868
17878
  }
17869
- yield api.DELETE(`change/${id}`, Api.PrepReqParams(reqParams));
17879
+ yield api.DELETE(`v3/change/${id}`, Api.PrepReqParams(reqParams));
17870
17880
  });
17871
17881
  }
17872
17882
  ChangeSet.Delete = Delete;
@@ -17880,7 +17890,7 @@ var ChangeSet;
17880
17890
  if (!api) {
17881
17891
  api = ENVIRONMENT.Api().GetBruceApi();
17882
17892
  }
17883
- return yield api.GET(`change/${id}`, Api.PrepReqParams(reqParams));
17893
+ return yield api.GET(`v3/change/${id}`, Api.PrepReqParams(reqParams));
17884
17894
  });
17885
17895
  }
17886
17896
  ChangeSet.Get = Get;
@@ -17902,47 +17912,10 @@ var ChangeSet;
17902
17912
  urlParams.append("PageIndex", String(pageIndex));
17903
17913
  }
17904
17914
  const query = urlParams.toString();
17905
- return api.GET(query ? `changes?${query}` : "changes", Api.PrepReqParams(reqParams));
17915
+ return api.GET(query ? `v3/changes?${query}` : "v3/changes", Api.PrepReqParams(reqParams));
17906
17916
  });
17907
17917
  }
17908
17918
  ChangeSet.GetList = GetList;
17909
- /**
17910
- * Gets the content of the specified Change Set including Entity Type and Entity change records.
17911
- * Supports pagination, mapping mode, and filtering by entity action and Entity IDs.
17912
- */
17913
- function GetContent(params) {
17914
- return __awaiter(this, void 0, void 0, function* () {
17915
- let { id, api, req: reqParams, pageSize, pageIndex, select, entityStatus, entityId } = params;
17916
- if (!api) {
17917
- api = ENVIRONMENT.Api().GetBruceApi();
17918
- }
17919
- const urlParams = new URLSearchParams();
17920
- if (pageSize != null) {
17921
- urlParams.append("PageSize", String(pageSize));
17922
- }
17923
- if (pageIndex != null) {
17924
- urlParams.append("PageIndex", String(pageIndex));
17925
- }
17926
- if (select != null) {
17927
- urlParams.append("Select", select);
17928
- }
17929
- if (entityStatus != null) {
17930
- const statuses = Array.isArray(entityStatus) ? entityStatus : [entityStatus];
17931
- for (const s of statuses) {
17932
- urlParams.append("EntityStatus", s);
17933
- }
17934
- }
17935
- if (entityId != null) {
17936
- const ids = Array.isArray(entityId) ? entityId : [entityId];
17937
- for (const eid of ids) {
17938
- urlParams.append("EntityID", eid);
17939
- }
17940
- }
17941
- const query = urlParams.toString();
17942
- return api.GET(query ? `change/${id}/content?${query}` : `change/${id}/content`, Api.PrepReqParams(reqParams));
17943
- });
17944
- }
17945
- ChangeSet.GetContent = GetContent;
17946
17919
  /**
17947
17920
  * Starts job to commit changes proposed in the change set.
17948
17921
  * Returns the PA ID to monitor.
@@ -17953,30 +17926,32 @@ var ChangeSet;
17953
17926
  if (!api) {
17954
17927
  api = ENVIRONMENT.Api().GetBruceApi();
17955
17928
  }
17956
- return api.POST(`change/${id}/commit`, null, Api.PrepReqParams(reqParams));
17929
+ return api.POST(`v3/change/${id}/commit`, null, Api.PrepReqParams(reqParams));
17957
17930
  });
17958
17931
  }
17959
17932
  ChangeSet.Commit = Commit;
17960
17933
  /**
17961
- * Gets the details of one Entity Change record by its ID.
17934
+ * Rejects (cancels) the specified Change Set by setting its Status to Cancelled.
17962
17935
  */
17963
- function GetEntityChange(params) {
17936
+ function Reject(params) {
17964
17937
  return __awaiter(this, void 0, void 0, function* () {
17965
17938
  let { id, api, req: reqParams } = params;
17966
17939
  if (!api) {
17967
17940
  api = ENVIRONMENT.Api().GetBruceApi();
17968
17941
  }
17969
- return api.GET(`entity/change/${id}`, Api.PrepReqParams(reqParams));
17942
+ return api.POST(`v3/change/${id}/reject`, null, Api.PrepReqParams(reqParams));
17970
17943
  });
17971
17944
  }
17972
- ChangeSet.GetEntityChange = GetEntityChange;
17945
+ ChangeSet.Reject = Reject;
17973
17946
  /**
17974
- * Gets the list of Entity Change records for the specified Change Set.
17975
- * Supports pagination and filtering by action and Entity ID.
17947
+ * Gets the paged list of Change Items for the specified Change Set.
17948
+ * Optionally filter by Concept (E, ET, EL, ER) and/or EntityID.
17949
+ * TotalCount is returned when PageIndex is 0 (the default).
17950
+ * Pass -1 for both pageSize and pageIndex to get only TotalCount.
17976
17951
  */
17977
- function GetEntityChangeList(params) {
17952
+ function GetItems(params) {
17978
17953
  return __awaiter(this, void 0, void 0, function* () {
17979
- let { changeId, api, req: reqParams, pageSize, pageIndex, status, entityId } = params;
17954
+ let { id, api, req: reqParams, pageSize, pageIndex, concept, entityId } = params;
17980
17955
  if (!api) {
17981
17956
  api = ENVIRONMENT.Api().GetBruceApi();
17982
17957
  }
@@ -17987,90 +17962,61 @@ var ChangeSet;
17987
17962
  if (pageIndex != null) {
17988
17963
  urlParams.append("PageIndex", String(pageIndex));
17989
17964
  }
17990
- if (status != null) {
17991
- const statuses = Array.isArray(status) ? status : [status];
17992
- for (const s of statuses) {
17993
- urlParams.append("Status", s);
17994
- }
17965
+ if (concept != null) {
17966
+ urlParams.append("Concept", concept);
17995
17967
  }
17996
17968
  if (entityId != null) {
17997
- const ids = Array.isArray(entityId) ? entityId : [entityId];
17998
- for (const eid of ids) {
17999
- urlParams.append("EntityID", eid);
18000
- }
17969
+ urlParams.append("EntityID", entityId);
18001
17970
  }
18002
17971
  const query = urlParams.toString();
18003
- return api.GET(query
18004
- ? `entity/changes/by_change_id/${changeId}?${query}`
18005
- : `entity/changes/by_change_id/${changeId}`, Api.PrepReqParams(reqParams));
17972
+ return api.GET(query ? `v3/change/${id}/items?${query}` : `v3/change/${id}/items`, Api.PrepReqParams(reqParams));
18006
17973
  });
18007
17974
  }
18008
- ChangeSet.GetEntityChangeList = GetEntityChangeList;
17975
+ ChangeSet.GetItems = GetItems;
18009
17976
  /**
18010
- * Gets a mapping of Entity.ID to Action ("C", "U", "D") for all Entity Change records.
18011
- * Equivalent to GetEntityChangeList with Select=MAPPING.
17977
+ * Updates existing or creates new Change Item within the specified Change Set.
17978
+ * To create a new item omit changeItem.ID or set it to 0.
18012
17979
  */
18013
- function GetEntityChangeListMapping(params) {
17980
+ function UpdateItem(params) {
18014
17981
  return __awaiter(this, void 0, void 0, function* () {
18015
- let { changeId, api, req: reqParams, pageSize, pageIndex, status, entityId } = params;
17982
+ let { changeId, changeItem: data, api, req: reqParams } = params;
18016
17983
  if (!api) {
18017
17984
  api = ENVIRONMENT.Api().GetBruceApi();
18018
17985
  }
18019
- const urlParams = new URLSearchParams();
18020
- urlParams.append("Select", "MAPPING");
18021
- if (pageSize != null) {
18022
- urlParams.append("PageSize", String(pageSize));
18023
- }
18024
- if (pageIndex != null) {
18025
- urlParams.append("PageIndex", String(pageIndex));
18026
- }
18027
- if (status != null) {
18028
- const statuses = Array.isArray(status) ? status : [status];
18029
- for (const s of statuses) {
18030
- urlParams.append("Status", s);
18031
- }
18032
- }
18033
- if (entityId != null) {
18034
- const ids = Array.isArray(entityId) ? entityId : [entityId];
18035
- for (const eid of ids) {
18036
- urlParams.append("EntityID", eid);
18037
- }
18038
- }
18039
- return api.GET(`entity/changes/by_change_id/${changeId}?${urlParams.toString()}`, Api.PrepReqParams(reqParams));
17986
+ return yield api.POST(`v3/change/${changeId}/item/${data.ID || 0}`, data, Api.PrepReqParams(reqParams));
18040
17987
  });
18041
17988
  }
18042
- ChangeSet.GetEntityChangeListMapping = GetEntityChangeListMapping;
17989
+ ChangeSet.UpdateItem = UpdateItem;
18043
17990
  /**
18044
- * Updates existing or creates new Entity Change record within the specified Change Set.
18045
- * To create a new record, omit entityChange.ID or set it to 0.
17991
+ * Deletes a single Change Item from the specified Change Set.
18046
17992
  */
18047
- function UpdateEntityChange(params) {
17993
+ function DeleteItem(params) {
18048
17994
  return __awaiter(this, void 0, void 0, function* () {
18049
- let { changeId, entityChange: data, api, req: reqParams } = params;
17995
+ let { changeId, itemId, api, req: reqParams } = params;
18050
17996
  if (!api) {
18051
17997
  api = ENVIRONMENT.Api().GetBruceApi();
18052
17998
  }
18053
- return yield api.POST(`entity/change/by_change_id/${changeId || 0}/${data.ID || 0}`, data, Api.PrepReqParams(reqParams));
17999
+ yield api.DELETE(`v3/change/${changeId}/item/${itemId}`, Api.PrepReqParams(reqParams));
18054
18000
  });
18055
18001
  }
18056
- ChangeSet.UpdateEntityChange = UpdateEntityChange;
18002
+ ChangeSet.DeleteItem = DeleteItem;
18057
18003
  /**
18058
- * Deletes the specified Entity Change record.
18004
+ * Batch-creates or updates Change Items within the specified Change Set.
18059
18005
  */
18060
- function DeleteEntityChange(params) {
18006
+ function UpdateItems(params) {
18061
18007
  return __awaiter(this, void 0, void 0, function* () {
18062
- let { id, api, req: reqParams } = params;
18008
+ let { changeId, items, api, req: reqParams } = params;
18063
18009
  if (!api) {
18064
18010
  api = ENVIRONMENT.Api().GetBruceApi();
18065
18011
  }
18066
- yield api.DELETE(`entity/change/${id}`, Api.PrepReqParams(reqParams));
18012
+ return yield api.POST(`v3/change/${changeId}/items`, { Items: items }, Api.PrepReqParams(reqParams));
18067
18013
  });
18068
18014
  }
18069
- ChangeSet.DeleteEntityChange = DeleteEntityChange;
18015
+ ChangeSet.UpdateItems = UpdateItems;
18070
18016
  })(ChangeSet || (ChangeSet = {}));
18071
18017
 
18072
18018
  // This is updated with the package.json version on build.
18073
- const VERSION = "7.1.29";
18019
+ const VERSION = "7.1.31";
18074
18020
 
18075
18021
  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, EntityTypeTrigger, 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, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, DataFeed, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportLcc, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NavigatorChatClient, NavigatorMcpWebSocketClient, ChangeSet };
18076
18022
  //# sourceMappingURL=bruce-models.es5.js.map