bruce-models 5.3.5 → 5.3.7

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.
@@ -10144,15 +10144,6 @@ var ProjectViewBookmark;
10144
10144
  // This is the expected default version for the DataVersion value.
10145
10145
  // This value should NOT be changed without looking at our API and seeing what the default value is.
10146
10146
  ProjectViewBookmark.DEFAULT_DATA_VERSION = 2;
10147
- /**
10148
- * Describes a bookmark file node.
10149
- */
10150
- let EBookmarkType;
10151
- (function (EBookmarkType) {
10152
- EBookmarkType["BOOKMARK"] = "bookmark";
10153
- EBookmarkType["FOLDER"] = "folder";
10154
- EBookmarkType["EXTRANODE"] = "extranode";
10155
- })(EBookmarkType = ProjectViewBookmark.EBookmarkType || (ProjectViewBookmark.EBookmarkType = {}));
10156
10147
  /**
10157
10148
  * Describes the content of a bookmark.
10158
10149
  * As part of a deal we've been commissioned to create an alternative bookmark type to embed content.
@@ -11824,12 +11815,16 @@ var UserGroup;
11824
11815
  function GetByName(params) {
11825
11816
  return __awaiter(this, void 0, void 0, function* () {
11826
11817
  let { api, accountId, name, req: reqParams } = params;
11827
- if (!name || !accountId) {
11828
- throw ("Name and AccountID are required.");
11818
+ if (!name) {
11819
+ throw ("Name is required.");
11829
11820
  }
11830
11821
  if (!api) {
11831
11822
  api = ENVIRONMENT.Api().GetGuardianApi();
11832
11823
  }
11824
+ // Default groups.
11825
+ if (!accountId) {
11826
+ accountId = "";
11827
+ }
11833
11828
  const data = yield api.GET(`account/${accountId}/userGroupByName/${name}`, reqParams);
11834
11829
  return {
11835
11830
  group: data
@@ -11845,12 +11840,16 @@ var UserGroup;
11845
11840
  function GetUsers(params) {
11846
11841
  return __awaiter(this, void 0, void 0, function* () {
11847
11842
  let { api, accountId, groupId: id, req: reqParams } = params;
11848
- if (!accountId || !id) {
11849
- throw ("AccountID and ID are required.");
11843
+ if (!id) {
11844
+ throw ("ID is required.");
11850
11845
  }
11851
11846
  if (!api) {
11852
11847
  api = ENVIRONMENT.Api().GetGuardianApi();
11853
11848
  }
11849
+ // Default groups.
11850
+ if (!accountId) {
11851
+ accountId = "";
11852
+ }
11854
11853
  const data = yield api.GET(`userGroup/${accountId}/${id}/users`, reqParams);
11855
11854
  return {
11856
11855
  users: data.Items
@@ -11866,12 +11865,16 @@ var UserGroup;
11866
11865
  function GetListByPerm(params) {
11867
11866
  return __awaiter(this, void 0, void 0, function* () {
11868
11867
  let { api, accountId, perm, req: reqParams } = params;
11869
- if (!accountId || !perm) {
11870
- throw ("AccountID and Perm are required.");
11868
+ if (!perm) {
11869
+ throw ("Perm is required.");
11871
11870
  }
11872
11871
  if (!api) {
11873
11872
  api = ENVIRONMENT.Api().GetGuardianApi();
11874
11873
  }
11874
+ // Default groups.
11875
+ if (!accountId) {
11876
+ accountId = "";
11877
+ }
11875
11878
  const data = yield api.GET(`userGroupsByFeature/${accountId}/${perm}`, reqParams);
11876
11879
  return {
11877
11880
  groups: data.Items
@@ -11887,12 +11890,13 @@ var UserGroup;
11887
11890
  function GetList(params) {
11888
11891
  return __awaiter(this, void 0, void 0, function* () {
11889
11892
  let { api, accountId, req: reqParams } = params;
11890
- if (!accountId) {
11891
- throw ("AccountID is required.");
11892
- }
11893
11893
  if (!api) {
11894
11894
  api = ENVIRONMENT.Api().GetGuardianApi();
11895
11895
  }
11896
+ // Default groups.
11897
+ if (!accountId) {
11898
+ accountId = "";
11899
+ }
11896
11900
  const data = yield api.GET(`userGroups/${accountId}`, reqParams);
11897
11901
  return {
11898
11902
  groups: data.Items
@@ -11908,12 +11912,16 @@ var UserGroup;
11908
11912
  function Delete(params) {
11909
11913
  return __awaiter(this, void 0, void 0, function* () {
11910
11914
  let { api, accountId, groupId: id, req: reqParams } = params;
11911
- if (!accountId || !id) {
11912
- throw ("AccountID and ID are required.");
11915
+ if (!id) {
11916
+ throw ("ID is required.");
11913
11917
  }
11914
11918
  if (!api) {
11915
11919
  api = ENVIRONMENT.Api().GetGuardianApi();
11916
11920
  }
11921
+ // Default groups.
11922
+ if (!accountId) {
11923
+ accountId = "";
11924
+ }
11917
11925
  return api.DELETE(`account/${accountId}/userGroupID/${id}`, reqParams);
11918
11926
  });
11919
11927
  }
@@ -11926,8 +11934,12 @@ var UserGroup;
11926
11934
  function Update(params) {
11927
11935
  return __awaiter(this, void 0, void 0, function* () {
11928
11936
  let { api, group: data, reqParams } = params;
11929
- if (!data.Name || !data["ClientAccount.ID"]) {
11930
- throw ("User group name and client account ID are required.");
11937
+ if (!data.Name) {
11938
+ throw ("User group name is required.");
11939
+ }
11940
+ // Default groups.
11941
+ if (!data["ClientAccount.ID"]) {
11942
+ data["ClientAccount.ID"] = "";
11931
11943
  }
11932
11944
  if (!api) {
11933
11945
  api = ENVIRONMENT.Api().GetGuardianApi();
@@ -14718,7 +14730,7 @@ var DataSource;
14718
14730
  })(DataSource || (DataSource = {}));
14719
14731
 
14720
14732
  // This is updated with the package.json version on build.
14721
- const VERSION = "5.3.5";
14733
+ const VERSION = "5.3.7";
14722
14734
 
14723
14735
  export { VERSION, 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, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
14724
14736
  //# sourceMappingURL=bruce-models.es5.js.map