bruce-models 7.1.23 → 7.1.25

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.
@@ -17748,23 +17748,35 @@ var ChangeSet;
17748
17748
  /**
17749
17749
  * Valid values for the Change Set Status.
17750
17750
  */
17751
- let BruceChangeStatus;
17752
- (function (BruceChangeStatus) {
17753
- BruceChangeStatus["UNCOMMITTED"] = "Uncommitted";
17754
- BruceChangeStatus["COMMITTED"] = "Committed";
17755
- BruceChangeStatus["CANCELLED"] = "Cancelled";
17756
- })(BruceChangeStatus = ChangeSet.BruceChangeStatus || (ChangeSet.BruceChangeStatus = {}));
17751
+ let EStatus;
17752
+ (function (EStatus) {
17753
+ EStatus["UNCOMMITTED"] = "Uncommitted";
17754
+ EStatus["COMMITTED"] = "Committed";
17755
+ EStatus["CANCELLED"] = "Cancelled";
17756
+ EStatus["ERROR"] = "Error";
17757
+ })(EStatus = ChangeSet.EStatus || (ChangeSet.EStatus = {}));
17758
+ /**
17759
+ * Single-character action values stored on Entity Change and Entity Type Change records.
17760
+ */
17761
+ let EAction;
17762
+ (function (EAction) {
17763
+ EAction["CREATE"] = "C";
17764
+ EAction["UPDATE"] = "U";
17765
+ EAction["DELETE"] = "D";
17766
+ })(EAction = ChangeSet.EAction || (ChangeSet.EAction = {}));
17757
17767
  /**
17758
- * Updates existing or crates new Change Set record.
17768
+ * Updates existing or creates new Change Set record.
17769
+ * To create a new record pass a changeSet without an ID (or with ID set to 0/null).
17759
17770
  */
17760
17771
  function Update(params) {
17772
+ var _a;
17761
17773
  return __awaiter(this, void 0, void 0, function* () {
17762
17774
  let { changeSet: data, api, req: reqParams } = params;
17763
17775
  if (!api) {
17764
17776
  api = ENVIRONMENT.Api().GetBruceApi();
17765
17777
  }
17766
- const url = `change` + (data.ID == null ? "" : "/" + data.ID);
17767
- return api.POST(url, data, Api.PrepReqParams(reqParams));
17778
+ const id = (_a = data.ID) !== null && _a !== void 0 ? _a : 0;
17779
+ return api.POST(`change/${id}`, data, Api.PrepReqParams(reqParams));
17768
17780
  });
17769
17781
  }
17770
17782
  ChangeSet.Update = Update;
@@ -17783,6 +17795,7 @@ var ChangeSet;
17783
17795
  ChangeSet.Delete = Delete;
17784
17796
  /**
17785
17797
  * Gets the Change Set record by its ID.
17798
+ * The response includes PendingAction data when a pending action exists for the change set.
17786
17799
  */
17787
17800
  function Get(params) {
17788
17801
  return __awaiter(this, void 0, void 0, function* () {
@@ -17790,43 +17803,197 @@ var ChangeSet;
17790
17803
  if (!api) {
17791
17804
  api = ENVIRONMENT.Api().GetBruceApi();
17792
17805
  }
17793
- reqParams = Api.PrepReqParams(reqParams);
17794
17806
  return yield api.GET(`change/${id}`, Api.PrepReqParams(reqParams));
17795
17807
  });
17796
17808
  }
17797
17809
  ChangeSet.Get = Get;
17798
17810
  /**
17799
17811
  * Gets the list of all the Change Set records.
17812
+ * TotalCount is returned when PageIndex is 0 (the default).
17800
17813
  */
17801
17814
  function GetList(params) {
17802
17815
  return __awaiter(this, void 0, void 0, function* () {
17803
- let { api, req: reqParams } = params;
17816
+ let { api, req: reqParams, pageSize, pageIndex } = params;
17804
17817
  if (!api) {
17805
17818
  api = ENVIRONMENT.Api().GetBruceApi();
17806
17819
  }
17807
- reqParams = Api.PrepReqParams(reqParams);
17808
- return api.GET("changes", Api.PrepReqParams(reqParams));
17820
+ const urlParams = new URLSearchParams();
17821
+ if (pageSize != null) {
17822
+ urlParams.append("PageSize", String(pageSize));
17823
+ }
17824
+ if (pageIndex != null) {
17825
+ urlParams.append("PageIndex", String(pageIndex));
17826
+ }
17827
+ const query = urlParams.toString();
17828
+ return api.GET(query ? `changes?${query}` : "changes", Api.PrepReqParams(reqParams));
17809
17829
  });
17810
17830
  }
17811
17831
  ChangeSet.GetList = GetList;
17812
17832
  /**
17813
- * Gets the Change Set record by its ID.
17833
+ * Gets the content of the specified Change Set including Entity Type and Entity change records.
17834
+ * Supports pagination, mapping mode, and filtering by entity action and Entity IDs.
17835
+ */
17836
+ function GetContent(params) {
17837
+ return __awaiter(this, void 0, void 0, function* () {
17838
+ let { id, api, req: reqParams, pageSize, pageIndex, select, entityStatus, entityId } = params;
17839
+ if (!api) {
17840
+ api = ENVIRONMENT.Api().GetBruceApi();
17841
+ }
17842
+ const urlParams = new URLSearchParams();
17843
+ if (pageSize != null) {
17844
+ urlParams.append("PageSize", String(pageSize));
17845
+ }
17846
+ if (pageIndex != null) {
17847
+ urlParams.append("PageIndex", String(pageIndex));
17848
+ }
17849
+ if (select != null) {
17850
+ urlParams.append("Select", select);
17851
+ }
17852
+ if (entityStatus != null) {
17853
+ const statuses = Array.isArray(entityStatus) ? entityStatus : [entityStatus];
17854
+ for (const s of statuses) {
17855
+ urlParams.append("EntityStatus", s);
17856
+ }
17857
+ }
17858
+ if (entityId != null) {
17859
+ const ids = Array.isArray(entityId) ? entityId : [entityId];
17860
+ for (const eid of ids) {
17861
+ urlParams.append("EntityID", eid);
17862
+ }
17863
+ }
17864
+ const query = urlParams.toString();
17865
+ return api.GET(query ? `change/${id}/content?${query}` : `change/${id}/content`, Api.PrepReqParams(reqParams));
17866
+ });
17867
+ }
17868
+ ChangeSet.GetContent = GetContent;
17869
+ /**
17870
+ * Starts job to commit changes proposed in the change set.
17871
+ * Returns the PA ID to monitor.
17814
17872
  */
17815
- function GetChangeSetContent(params) {
17873
+ function Commit(params) {
17816
17874
  return __awaiter(this, void 0, void 0, function* () {
17817
17875
  let { id, api, req: reqParams } = params;
17818
17876
  if (!api) {
17819
17877
  api = ENVIRONMENT.Api().GetBruceApi();
17820
17878
  }
17821
- reqParams = Api.PrepReqParams(reqParams);
17822
- return api.GET(`change/${id}/content`, Api.PrepReqParams(reqParams));
17879
+ return api.POST(`change/${id}/commit`, null, Api.PrepReqParams(reqParams));
17880
+ });
17881
+ }
17882
+ ChangeSet.Commit = Commit;
17883
+ /**
17884
+ * Gets the details of one Entity Change record by its ID.
17885
+ */
17886
+ function GetEntityChange(params) {
17887
+ return __awaiter(this, void 0, void 0, function* () {
17888
+ let { id, api, req: reqParams } = params;
17889
+ if (!api) {
17890
+ api = ENVIRONMENT.Api().GetBruceApi();
17891
+ }
17892
+ return api.GET(`entity/change/${id}`, Api.PrepReqParams(reqParams));
17893
+ });
17894
+ }
17895
+ ChangeSet.GetEntityChange = GetEntityChange;
17896
+ /**
17897
+ * Gets the list of Entity Change records for the specified Change Set.
17898
+ * Supports pagination and filtering by action and Entity ID.
17899
+ */
17900
+ function GetEntityChangeList(params) {
17901
+ return __awaiter(this, void 0, void 0, function* () {
17902
+ let { changeId, api, req: reqParams, pageSize, pageIndex, status, entityId } = params;
17903
+ if (!api) {
17904
+ api = ENVIRONMENT.Api().GetBruceApi();
17905
+ }
17906
+ const urlParams = new URLSearchParams();
17907
+ if (pageSize != null) {
17908
+ urlParams.append("PageSize", String(pageSize));
17909
+ }
17910
+ if (pageIndex != null) {
17911
+ urlParams.append("PageIndex", String(pageIndex));
17912
+ }
17913
+ if (status != null) {
17914
+ const statuses = Array.isArray(status) ? status : [status];
17915
+ for (const s of statuses) {
17916
+ urlParams.append("Status", s);
17917
+ }
17918
+ }
17919
+ if (entityId != null) {
17920
+ const ids = Array.isArray(entityId) ? entityId : [entityId];
17921
+ for (const eid of ids) {
17922
+ urlParams.append("EntityID", eid);
17923
+ }
17924
+ }
17925
+ const query = urlParams.toString();
17926
+ return api.GET(query
17927
+ ? `entity/changes/by_change_id/${changeId}?${query}`
17928
+ : `entity/changes/by_change_id/${changeId}`, Api.PrepReqParams(reqParams));
17929
+ });
17930
+ }
17931
+ ChangeSet.GetEntityChangeList = GetEntityChangeList;
17932
+ /**
17933
+ * Gets a mapping of Entity.ID to Action ("C", "U", "D") for all Entity Change records.
17934
+ * Equivalent to GetEntityChangeList with Select=MAPPING.
17935
+ */
17936
+ function GetEntityChangeListMapping(params) {
17937
+ return __awaiter(this, void 0, void 0, function* () {
17938
+ let { changeId, api, req: reqParams, pageSize, pageIndex, status, entityId } = params;
17939
+ if (!api) {
17940
+ api = ENVIRONMENT.Api().GetBruceApi();
17941
+ }
17942
+ const urlParams = new URLSearchParams();
17943
+ urlParams.append("Select", "MAPPING");
17944
+ if (pageSize != null) {
17945
+ urlParams.append("PageSize", String(pageSize));
17946
+ }
17947
+ if (pageIndex != null) {
17948
+ urlParams.append("PageIndex", String(pageIndex));
17949
+ }
17950
+ if (status != null) {
17951
+ const statuses = Array.isArray(status) ? status : [status];
17952
+ for (const s of statuses) {
17953
+ urlParams.append("Status", s);
17954
+ }
17955
+ }
17956
+ if (entityId != null) {
17957
+ const ids = Array.isArray(entityId) ? entityId : [entityId];
17958
+ for (const eid of ids) {
17959
+ urlParams.append("EntityID", eid);
17960
+ }
17961
+ }
17962
+ return api.GET(`entity/changes/by_change_id/${changeId}?${urlParams.toString()}`, Api.PrepReqParams(reqParams));
17963
+ });
17964
+ }
17965
+ ChangeSet.GetEntityChangeListMapping = GetEntityChangeListMapping;
17966
+ /**
17967
+ * Updates existing or creates new Entity Change record within the specified Change Set.
17968
+ * To create a new record, omit entityChange.ID or set it to 0.
17969
+ */
17970
+ function UpdateEntityChange(params) {
17971
+ return __awaiter(this, void 0, void 0, function* () {
17972
+ let { changeId, entityChange: data, api, req: reqParams } = params;
17973
+ if (!api) {
17974
+ api = ENVIRONMENT.Api().GetBruceApi();
17975
+ }
17976
+ return yield api.POST(`entity/change/by_change_id/${changeId || 0}/${data.ID || 0}`, data, Api.PrepReqParams(reqParams));
17977
+ });
17978
+ }
17979
+ ChangeSet.UpdateEntityChange = UpdateEntityChange;
17980
+ /**
17981
+ * Deletes the specified Entity Change record.
17982
+ */
17983
+ function DeleteEntityChange(params) {
17984
+ return __awaiter(this, void 0, void 0, function* () {
17985
+ let { id, api, req: reqParams } = params;
17986
+ if (!api) {
17987
+ api = ENVIRONMENT.Api().GetBruceApi();
17988
+ }
17989
+ yield api.DELETE(`entity/change/${id}`, Api.PrepReqParams(reqParams));
17823
17990
  });
17824
17991
  }
17825
- ChangeSet.GetChangeSetContent = GetChangeSetContent;
17992
+ ChangeSet.DeleteEntityChange = DeleteEntityChange;
17826
17993
  })(ChangeSet || (ChangeSet = {}));
17827
17994
 
17828
17995
  // This is updated with the package.json version on build.
17829
- const VERSION = "7.1.23";
17996
+ const VERSION = "7.1.25";
17830
17997
 
17831
17998
  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, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NavigatorChatClient, NavigatorMcpWebSocketClient, ChangeSet };
17832
17999
  //# sourceMappingURL=bruce-models.es5.js.map