bruce-models 2.4.7 → 2.4.9

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.
Files changed (84) hide show
  1. package/dist/bruce-models.es5.js +164 -164
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +164 -164
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account-invite.js +4 -4
  6. package/dist/lib/account/account-invite.js.map +1 -1
  7. package/dist/lib/account/account.js +5 -5
  8. package/dist/lib/account/account.js.map +1 -1
  9. package/dist/lib/ann-document/ann-document.js +2 -2
  10. package/dist/lib/ann-document/ann-document.js.map +1 -1
  11. package/dist/lib/client-file/client-file.js +9 -9
  12. package/dist/lib/client-file/client-file.js.map +1 -1
  13. package/dist/lib/custom-form/custom-form.js +4 -4
  14. package/dist/lib/custom-form/custom-form.js.map +1 -1
  15. package/dist/lib/data-lab/data-lab.js +1 -1
  16. package/dist/lib/data-lab/data-lab.js.map +1 -1
  17. package/dist/lib/entity/entity-attachment-type.js +3 -3
  18. package/dist/lib/entity/entity-attachment-type.js.map +1 -1
  19. package/dist/lib/entity/entity-attachment.js +5 -5
  20. package/dist/lib/entity/entity-attachment.js.map +1 -1
  21. package/dist/lib/entity/entity-comment.js +3 -3
  22. package/dist/lib/entity/entity-comment.js.map +1 -1
  23. package/dist/lib/entity/entity-coords.js +5 -5
  24. package/dist/lib/entity/entity-coords.js.map +1 -1
  25. package/dist/lib/entity/entity-link.js +3 -3
  26. package/dist/lib/entity/entity-link.js.map +1 -1
  27. package/dist/lib/entity/entity-lod-category.js +4 -4
  28. package/dist/lib/entity/entity-lod-category.js.map +1 -1
  29. package/dist/lib/entity/entity-lod.js +7 -7
  30. package/dist/lib/entity/entity-lod.js.map +1 -1
  31. package/dist/lib/entity/entity-relation-type.js +4 -4
  32. package/dist/lib/entity/entity-relation-type.js.map +1 -1
  33. package/dist/lib/entity/entity-relation.js +5 -5
  34. package/dist/lib/entity/entity-relation.js.map +1 -1
  35. package/dist/lib/entity/entity-source.js +4 -4
  36. package/dist/lib/entity/entity-source.js.map +1 -1
  37. package/dist/lib/entity/entity-tag.js +5 -5
  38. package/dist/lib/entity/entity-tag.js.map +1 -1
  39. package/dist/lib/entity/entity-type.js +4 -4
  40. package/dist/lib/entity/entity-type.js.map +1 -1
  41. package/dist/lib/entity/entity.js +6 -6
  42. package/dist/lib/entity/entity.js.map +1 -1
  43. package/dist/lib/environment.js +2 -2
  44. package/dist/lib/environment.js.map +1 -1
  45. package/dist/lib/import/import-cad.js +2 -2
  46. package/dist/lib/import/import-cad.js.map +1 -1
  47. package/dist/lib/import/import-csv.js +1 -1
  48. package/dist/lib/import/import-csv.js.map +1 -1
  49. package/dist/lib/import/import-json.js +1 -1
  50. package/dist/lib/import/import-json.js.map +1 -1
  51. package/dist/lib/import/import-kml.js +1 -1
  52. package/dist/lib/import/import-kml.js.map +1 -1
  53. package/dist/lib/import/imported-file.js +3 -3
  54. package/dist/lib/import/imported-file.js.map +1 -1
  55. package/dist/lib/internal/uploader.js +1 -1
  56. package/dist/lib/internal/uploader.js.map +1 -1
  57. package/dist/lib/plugin/plugin.js +3 -3
  58. package/dist/lib/plugin/plugin.js.map +1 -1
  59. package/dist/lib/program-key/program-key.js +4 -4
  60. package/dist/lib/program-key/program-key.js.map +1 -1
  61. package/dist/lib/project/project-view-bookmark.js +5 -5
  62. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  63. package/dist/lib/project/project-view-legacy-tile.js +2 -2
  64. package/dist/lib/project/project-view-legacy-tile.js.map +1 -1
  65. package/dist/lib/project/project-view.js +4 -4
  66. package/dist/lib/project/project-view.js.map +1 -1
  67. package/dist/lib/server/hosting-location.js +5 -5
  68. package/dist/lib/server/hosting-location.js.map +1 -1
  69. package/dist/lib/server/pending-action.js +3 -3
  70. package/dist/lib/server/pending-action.js.map +1 -1
  71. package/dist/lib/server/task.js +2 -2
  72. package/dist/lib/server/task.js.map +1 -1
  73. package/dist/lib/style/style.js +4 -4
  74. package/dist/lib/style/style.js.map +1 -1
  75. package/dist/lib/tileset/tileset.js +16 -16
  76. package/dist/lib/tileset/tileset.js.map +1 -1
  77. package/dist/lib/user/session.js +3 -3
  78. package/dist/lib/user/session.js.map +1 -1
  79. package/dist/lib/user/user-group.js +6 -6
  80. package/dist/lib/user/user-group.js.map +1 -1
  81. package/dist/lib/user/user.js +15 -15
  82. package/dist/lib/user/user.js.map +1 -1
  83. package/dist/types/environment.d.ts +3 -3
  84. package/package.json +1 -1
@@ -3612,7 +3612,7 @@ var Account;
3612
3612
  return __awaiter(this, void 0, void 0, function* () {
3613
3613
  let { api, accountId: id, req: reqParams } = params;
3614
3614
  if (!api) {
3615
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
3615
+ api = ENVIRONMENT.Api().GetGuardianApi();
3616
3616
  }
3617
3617
  const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
3618
3618
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -3635,7 +3635,7 @@ var Account;
3635
3635
  return __awaiter(this, void 0, void 0, function* () {
3636
3636
  let { api, req: reqParams } = params;
3637
3637
  if (!api) {
3638
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
3638
+ api = ENVIRONMENT.Api().GetGuardianApi();
3639
3639
  }
3640
3640
  const cache = yield api.GetCacheItem(GetListCacheKey(api.GetSessionId()), reqParams);
3641
3641
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -3667,7 +3667,7 @@ var Account;
3667
3667
  return __awaiter(this, void 0, void 0, function* () {
3668
3668
  let { api, accountId: id, appId, req: reqParams } = params;
3669
3669
  if (!api) {
3670
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
3670
+ api = ENVIRONMENT.Api().GetGuardianApi();
3671
3671
  }
3672
3672
  const cache = yield api.GetCacheItem(GetCacheKey(id, appId), reqParams);
3673
3673
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -3705,7 +3705,7 @@ var Account;
3705
3705
  return __awaiter(this, void 0, void 0, function* () {
3706
3706
  let { api, accountId: id, appId, settings: data, req: reqParams } = params;
3707
3707
  if (!api) {
3708
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
3708
+ api = ENVIRONMENT.Api().GetGuardianApi();
3709
3709
  }
3710
3710
  const res = yield api.POST(`account/${id}/applicationSettings/${appId}`, data, reqParams);
3711
3711
  yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Account + Api.ECacheKey.Id + id);
@@ -3724,7 +3724,7 @@ var Account;
3724
3724
  return __awaiter(this, void 0, void 0, function* () {
3725
3725
  let { api, accountId: id, name, hostingLocationKey, starterContent, req: reqParams } = params;
3726
3726
  if (!api) {
3727
- api = ENVIRONMENT.GetGetters().GetBruceApi();
3727
+ api = ENVIRONMENT.Api().GetBruceApi();
3728
3728
  }
3729
3729
  if (!id || !name || !hostingLocationKey) {
3730
3730
  throw new Error("Id, Name and hostingLocationKey are required.");
@@ -3763,7 +3763,7 @@ var HostingLocation;
3763
3763
  return __awaiter(this, void 0, void 0, function* () {
3764
3764
  let { api, req } = params;
3765
3765
  if (!api) {
3766
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
3766
+ api = ENVIRONMENT.Api().GetGuardianApi();
3767
3767
  }
3768
3768
  const res = yield api.GET("hostinglocations", Api.PrepReqParams(req));
3769
3769
  return {
@@ -3776,7 +3776,7 @@ var HostingLocation;
3776
3776
  return __awaiter(this, void 0, void 0, function* () {
3777
3777
  let { id, api, req } = params;
3778
3778
  if (!api) {
3779
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
3779
+ api = ENVIRONMENT.Api().GetGuardianApi();
3780
3780
  }
3781
3781
  if (!id) {
3782
3782
  throw ("Invalid id");
@@ -3792,7 +3792,7 @@ var HostingLocation;
3792
3792
  return __awaiter(this, void 0, void 0, function* () {
3793
3793
  let { key, api, req } = params;
3794
3794
  if (!api) {
3795
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
3795
+ api = ENVIRONMENT.Api().GetGuardianApi();
3796
3796
  }
3797
3797
  if (!key) {
3798
3798
  throw ("Invalid key");
@@ -3852,7 +3852,7 @@ var HostingLocation;
3852
3852
  return __awaiter(this, void 0, void 0, function* () {
3853
3853
  let { accountId, apiSettings, api, req } = params;
3854
3854
  if (!api) {
3855
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
3855
+ api = ENVIRONMENT.Api().GetGuardianApi();
3856
3856
  }
3857
3857
  if (!accountId && !apiSettings) {
3858
3858
  throw ("Invalid accountId or apiSettings");
@@ -3885,7 +3885,7 @@ var HostingLocation;
3885
3885
  return __awaiter(this, void 0, void 0, function* () {
3886
3886
  let { accountId, apiSettings, api, req } = params;
3887
3887
  if (!api) {
3888
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
3888
+ api = ENVIRONMENT.Api().GetGuardianApi();
3889
3889
  }
3890
3890
  const data = yield GetKeyByAccountId({
3891
3891
  accountId,
@@ -4547,7 +4547,7 @@ var ENVIRONMENT;
4547
4547
  env: Api.EEnv.PROD,
4548
4548
  sessionId: ""
4549
4549
  };
4550
- function GetGetters() {
4550
+ function Api$$1() {
4551
4551
  if (ENVIRONMENT.IS_SELF_MANAGED) {
4552
4552
  throw ("Self managed mode ON. You are getting this error because you didn't pass an Api instance to a function.");
4553
4553
  }
@@ -4563,7 +4563,7 @@ var ENVIRONMENT;
4563
4563
  }
4564
4564
  return _getters;
4565
4565
  }
4566
- ENVIRONMENT.GetGetters = GetGetters;
4566
+ ENVIRONMENT.Api = Api$$1;
4567
4567
  function Reset(params) {
4568
4568
  if (ENVIRONMENT.IS_SELF_MANAGED) {
4569
4569
  throw ("Self managed mode ON. You are getting this error because you didn't pass an Api instance to a function.");
@@ -4607,7 +4607,7 @@ var AnnDocument;
4607
4607
  return __awaiter(this, void 0, void 0, function* () {
4608
4608
  let { api, docId, req: reqParams } = params;
4609
4609
  if (!api) {
4610
- api = ENVIRONMENT.GetGetters().GetBruceApi();
4610
+ api = ENVIRONMENT.Api().GetBruceApi();
4611
4611
  }
4612
4612
  if (!docId) {
4613
4613
  throw ("Doc ID is required.");
@@ -4641,7 +4641,7 @@ var AnnDocument;
4641
4641
  return __awaiter(this, void 0, void 0, function* () {
4642
4642
  let { api, docType: type, req: reqParams } = params;
4643
4643
  if (!api) {
4644
- api = ENVIRONMENT.GetGetters().GetBruceApi();
4644
+ api = ENVIRONMENT.Api().GetBruceApi();
4645
4645
  }
4646
4646
  if (!type) {
4647
4647
  type = "";
@@ -4699,7 +4699,7 @@ var CustomForm;
4699
4699
  return __awaiter(this, void 0, void 0, function* () {
4700
4700
  let { api, formId: id, req: reqParams } = params;
4701
4701
  if (!api) {
4702
- api = ENVIRONMENT.GetGetters().GetBruceApi();
4702
+ api = ENVIRONMENT.Api().GetBruceApi();
4703
4703
  }
4704
4704
  if (!id) {
4705
4705
  throw ("Id is required.");
@@ -4732,7 +4732,7 @@ var CustomForm;
4732
4732
  return __awaiter(this, void 0, void 0, function* () {
4733
4733
  let { api, formId: id, req: reqParams } = params;
4734
4734
  if (!api) {
4735
- api = ENVIRONMENT.GetGetters().GetBruceApi();
4735
+ api = ENVIRONMENT.Api().GetBruceApi();
4736
4736
  }
4737
4737
  if (!id) {
4738
4738
  throw ("Id is required.");
@@ -4746,7 +4746,7 @@ var CustomForm;
4746
4746
  return __awaiter(this, void 0, void 0, function* () {
4747
4747
  let { api, entityTypeId: typeId, req: reqParams } = params;
4748
4748
  if (!api) {
4749
- api = ENVIRONMENT.GetGetters().GetBruceApi();
4749
+ api = ENVIRONMENT.Api().GetBruceApi();
4750
4750
  }
4751
4751
  const url = typeId ? `entityType/${typeId}/customForms` : "customForms";
4752
4752
  const cache = yield api.GetCacheItem(GetListCacheKey(typeId), reqParams);
@@ -4772,7 +4772,7 @@ var CustomForm;
4772
4772
  return __awaiter(this, void 0, void 0, function* () {
4773
4773
  let { api, form: data, reqParams } = params;
4774
4774
  if (!api) {
4775
- api = ENVIRONMENT.GetGetters().GetBruceApi();
4775
+ api = ENVIRONMENT.Api().GetBruceApi();
4776
4776
  }
4777
4777
  if (!data.ID) {
4778
4778
  data.ID = 0;
@@ -4987,7 +4987,7 @@ var Entity;
4987
4987
  return __awaiter(this, void 0, void 0, function* () {
4988
4988
  let { api, entityId, req: reqParams, expandLocation, entityTypeId } = params;
4989
4989
  if (!api) {
4990
- api = ENVIRONMENT.GetGetters().GetBruceApi();
4990
+ api = ENVIRONMENT.Api().GetBruceApi();
4991
4991
  }
4992
4992
  if (!entityId) {
4993
4993
  throw ("Entity ID is required.");
@@ -5028,7 +5028,7 @@ var Entity;
5028
5028
  return __awaiter(this, void 0, void 0, function* () {
5029
5029
  let { api, entityIds, req: reqParams } = params;
5030
5030
  if (!api) {
5031
- api = ENVIRONMENT.GetGetters().GetBruceApi();
5031
+ api = ENVIRONMENT.Api().GetBruceApi();
5032
5032
  }
5033
5033
  if (!entityIds.length) {
5034
5034
  throw ("Entity IDs are required.");
@@ -5090,7 +5090,7 @@ var Entity;
5090
5090
  return __awaiter(this, void 0, void 0, function* () {
5091
5091
  let { api, entityId, req: reqParams } = params;
5092
5092
  if (!api) {
5093
- api = ENVIRONMENT.GetGetters().GetBruceApi();
5093
+ api = ENVIRONMENT.Api().GetBruceApi();
5094
5094
  }
5095
5095
  if (!entityId) {
5096
5096
  throw ("Entity ID is required.");
@@ -5104,7 +5104,7 @@ var Entity;
5104
5104
  return __awaiter(this, void 0, void 0, function* () {
5105
5105
  let { api, entityIds, req: reqParams } = params;
5106
5106
  if (!api) {
5107
- api = ENVIRONMENT.GetGetters().GetBruceApi();
5107
+ api = ENVIRONMENT.Api().GetBruceApi();
5108
5108
  }
5109
5109
  if (!(entityIds === null || entityIds === void 0 ? void 0 : entityIds.length)) {
5110
5110
  throw ("Entity IDs are required.");
@@ -5124,7 +5124,7 @@ var Entity;
5124
5124
  return __awaiter(this, void 0, void 0, function* () {
5125
5125
  let { api, entity: data, override, req: reqParams } = params;
5126
5126
  if (!api) {
5127
- api = ENVIRONMENT.GetGetters().GetBruceApi();
5127
+ api = ENVIRONMENT.Api().GetBruceApi();
5128
5128
  }
5129
5129
  if (!((_a = data === null || data === void 0 ? void 0 : data.Bruce) === null || _a === void 0 ? void 0 : _a["EntityType.ID"])) {
5130
5130
  throw ("Entity Type ID is required.");
@@ -5230,7 +5230,7 @@ var Entity;
5230
5230
  return __awaiter(this, void 0, void 0, function* () {
5231
5231
  let { api, filter, req: reqParams, viaCdn, viaCdnCacheToken } = params;
5232
5232
  if (!api) {
5233
- api = ENVIRONMENT.GetGetters().GetBruceApi();
5233
+ api = ENVIRONMENT.Api().GetBruceApi();
5234
5234
  }
5235
5235
  let requestFilter = {};
5236
5236
  if (filter.entityTypeConditions) {
@@ -6247,7 +6247,7 @@ var EntityAttachmentType;
6247
6247
  return __awaiter(this, void 0, void 0, function* () {
6248
6248
  let { api, attachmentTypeId: id, req: reqParams } = params;
6249
6249
  if (!api) {
6250
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6250
+ api = ENVIRONMENT.Api().GetBruceApi();
6251
6251
  }
6252
6252
  if (!id) {
6253
6253
  throw ("Type ID is required.");
@@ -6262,7 +6262,7 @@ var EntityAttachmentType;
6262
6262
  return __awaiter(this, void 0, void 0, function* () {
6263
6263
  let { api, attachmentType: data, req: reqParams } = params;
6264
6264
  if (!api) {
6265
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6265
+ api = ENVIRONMENT.Api().GetBruceApi();
6266
6266
  }
6267
6267
  if (!(data === null || data === void 0 ? void 0 : data.ID)) {
6268
6268
  throw ("Type ID is required.");
@@ -6280,7 +6280,7 @@ var EntityAttachmentType;
6280
6280
  return __awaiter(this, void 0, void 0, function* () {
6281
6281
  let { api, reqParams } = params;
6282
6282
  if (!api) {
6283
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6283
+ api = ENVIRONMENT.Api().GetBruceApi();
6284
6284
  }
6285
6285
  const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
6286
6286
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -6327,7 +6327,7 @@ var EntityAttachment;
6327
6327
  return __awaiter(this, void 0, void 0, function* () {
6328
6328
  let { api, attachments, req, entityId } = params;
6329
6329
  if (!api) {
6330
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6330
+ api = ENVIRONMENT.Api().GetBruceApi();
6331
6331
  }
6332
6332
  if (!(attachments === null || attachments === void 0 ? void 0 : attachments.length)) {
6333
6333
  return {
@@ -6353,7 +6353,7 @@ var EntityAttachment;
6353
6353
  return __awaiter(this, void 0, void 0, function* () {
6354
6354
  let { api, entityId, attachmentTypeId: typeId, attachments, req: reqParams } = params;
6355
6355
  if (!api) {
6356
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6356
+ api = ENVIRONMENT.Api().GetBruceApi();
6357
6357
  }
6358
6358
  if (!entityId || !typeId || !(attachments === null || attachments === void 0 ? void 0 : attachments.length)) {
6359
6359
  throw ("Entity ID, Type ID, and Attachments are required.");
@@ -6374,7 +6374,7 @@ var EntityAttachment;
6374
6374
  return __awaiter(this, void 0, void 0, function* () {
6375
6375
  let { api, attachmentId, entityId, req } = params;
6376
6376
  if (!api) {
6377
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6377
+ api = ENVIRONMENT.Api().GetBruceApi();
6378
6378
  }
6379
6379
  if (!attachmentId || !entityId) {
6380
6380
  throw ("Entity id and attachment id.");
@@ -6388,7 +6388,7 @@ var EntityAttachment;
6388
6388
  return __awaiter(this, void 0, void 0, function* () {
6389
6389
  let { api, entityId, req: reqParams } = params;
6390
6390
  if (!api) {
6391
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6391
+ api = ENVIRONMENT.Api().GetBruceApi();
6392
6392
  }
6393
6393
  if (!entityId) {
6394
6394
  throw ("Entity ID is required.");
@@ -6421,7 +6421,7 @@ var EntityAttachment;
6421
6421
  return __awaiter(this, void 0, void 0, function* () {
6422
6422
  let { api, file, entityId, attachmentTypeId: typeId, req: reqParams } = params;
6423
6423
  if (!api) {
6424
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6424
+ api = ENVIRONMENT.Api().GetBruceApi();
6425
6425
  }
6426
6426
  if (!entityId || !typeId || !file) {
6427
6427
  throw ("Entity ID, Type ID, and File are required.");
@@ -6455,7 +6455,7 @@ var EntityComment;
6455
6455
  return __awaiter(this, void 0, void 0, function* () {
6456
6456
  let { api, comment: data, req: reqParams } = params;
6457
6457
  if (!api) {
6458
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6458
+ api = ENVIRONMENT.Api().GetBruceApi();
6459
6459
  }
6460
6460
  if (!(data === null || data === void 0 ? void 0 : data["TargetObject.ID"])) {
6461
6461
  throw ("TargetObject.ID (entity id) is required.");
@@ -6474,7 +6474,7 @@ var EntityComment;
6474
6474
  return __awaiter(this, void 0, void 0, function* () {
6475
6475
  let { api, entityId, commentId, req: reqParams } = params;
6476
6476
  if (!api) {
6477
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6477
+ api = ENVIRONMENT.Api().GetBruceApi();
6478
6478
  }
6479
6479
  if (!commentId) {
6480
6480
  throw ("Comment ID is required.");
@@ -6489,7 +6489,7 @@ var EntityComment;
6489
6489
  return __awaiter(this, void 0, void 0, function* () {
6490
6490
  let { api, entityId, req: reqParams } = params;
6491
6491
  if (!api) {
6492
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6492
+ api = ENVIRONMENT.Api().GetBruceApi();
6493
6493
  }
6494
6494
  if (!entityId) {
6495
6495
  throw ("Entity ID is required.");
@@ -6538,7 +6538,7 @@ var EntityLink;
6538
6538
  return __awaiter(this, void 0, void 0, function* () {
6539
6539
  let { api, link: data, req: reqParams } = params;
6540
6540
  if (!api) {
6541
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6541
+ api = ENVIRONMENT.Api().GetBruceApi();
6542
6542
  }
6543
6543
  if (!(data === null || data === void 0 ? void 0 : data["Entity.ID"])) {
6544
6544
  throw ("Entity ID is required.");
@@ -6557,7 +6557,7 @@ var EntityLink;
6557
6557
  return __awaiter(this, void 0, void 0, function* () {
6558
6558
  let { api, entityId, linkId, req: reqParams } = params;
6559
6559
  if (!api) {
6560
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6560
+ api = ENVIRONMENT.Api().GetBruceApi();
6561
6561
  }
6562
6562
  if (!linkId) {
6563
6563
  throw ("Link ID is required.");
@@ -6572,7 +6572,7 @@ var EntityLink;
6572
6572
  return __awaiter(this, void 0, void 0, function* () {
6573
6573
  let { api, entityId, req: reqParams } = params;
6574
6574
  if (!api) {
6575
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6575
+ api = ENVIRONMENT.Api().GetBruceApi();
6576
6576
  }
6577
6577
  if (!entityId) {
6578
6578
  throw ("Entity ID is required.");
@@ -6626,7 +6626,7 @@ var EntityLod;
6626
6626
  function GetUrl(params) {
6627
6627
  let { api, entityId, categoryId, level, strict } = params;
6628
6628
  if (!api) {
6629
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6629
+ api = ENVIRONMENT.Api().GetBruceApi();
6630
6630
  }
6631
6631
  if (!entityId) {
6632
6632
  throw ("Entity ID is required.");
@@ -6650,7 +6650,7 @@ var EntityLod;
6650
6650
  return __awaiter(this, void 0, void 0, function* () {
6651
6651
  let { api, url, req: reqParams } = params;
6652
6652
  if (!api) {
6653
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6653
+ api = ENVIRONMENT.Api().GetBruceApi();
6654
6654
  }
6655
6655
  if (!url) {
6656
6656
  throw ("Url is required.");
@@ -6684,7 +6684,7 @@ var EntityLod;
6684
6684
  return __awaiter(this, void 0, void 0, function* () {
6685
6685
  let { api, filter, req: reqParams } = params;
6686
6686
  if (!api) {
6687
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6687
+ api = ENVIRONMENT.Api().GetBruceApi();
6688
6688
  }
6689
6689
  if (!((_a = filter === null || filter === void 0 ? void 0 : filter.Items) === null || _a === void 0 ? void 0 : _a.length)) {
6690
6690
  throw ("Items are required.");
@@ -6700,7 +6700,7 @@ var EntityLod;
6700
6700
  return __awaiter(this, void 0, void 0, function* () {
6701
6701
  let { api, entityId, req: reqParams } = params;
6702
6702
  if (!api) {
6703
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6703
+ api = ENVIRONMENT.Api().GetBruceApi();
6704
6704
  }
6705
6705
  if (!entityId) {
6706
6706
  throw ("Entity id is required.");
@@ -6738,7 +6738,7 @@ var EntityLod;
6738
6738
  return __awaiter(this, void 0, void 0, function* () {
6739
6739
  let { api, entityTypeId: typeId, group, req: reqParams } = params;
6740
6740
  if (!api) {
6741
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6741
+ api = ENVIRONMENT.Api().GetBruceApi();
6742
6742
  }
6743
6743
  if (!group) {
6744
6744
  group = "DEFAULT";
@@ -6773,7 +6773,7 @@ var EntityLod;
6773
6773
  return __awaiter(this, void 0, void 0, function* () {
6774
6774
  let { api, entityId, req: reqParams } = params;
6775
6775
  if (!api) {
6776
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6776
+ api = ENVIRONMENT.Api().GetBruceApi();
6777
6777
  }
6778
6778
  if (!params["ClientFile.ID"] || !params["LODCategory.Key"] || (!params.Level && params.Level !== 0)) {
6779
6779
  throw ("ClientFile.ID, LODCategory.Key and Level are required.");
@@ -6791,7 +6791,7 @@ var EntityLod;
6791
6791
  return __awaiter(this, void 0, void 0, function* () {
6792
6792
  let { api, entityId, lodCategoryId, level, req: reqParams } = params;
6793
6793
  if (!api) {
6794
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6794
+ api = ENVIRONMENT.Api().GetBruceApi();
6795
6795
  }
6796
6796
  if (!entityId || !lodCategoryId) {
6797
6797
  throw ("Entity ID and LOD Category ID are required.");
@@ -6823,7 +6823,7 @@ var EntityLodCategory;
6823
6823
  return __awaiter(this, void 0, void 0, function* () {
6824
6824
  let { api, req: reqParams } = params;
6825
6825
  if (!api) {
6826
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6826
+ api = ENVIRONMENT.Api().GetBruceApi();
6827
6827
  }
6828
6828
  const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
6829
6829
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -6853,7 +6853,7 @@ var EntityLodCategory;
6853
6853
  return __awaiter(this, void 0, void 0, function* () {
6854
6854
  let { api, categoryId: id, req: reqParams } = params;
6855
6855
  if (!api) {
6856
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6856
+ api = ENVIRONMENT.Api().GetBruceApi();
6857
6857
  }
6858
6858
  if (!id) {
6859
6859
  throw ("Lod category id is required.");
@@ -6886,7 +6886,7 @@ var EntityLodCategory;
6886
6886
  return __awaiter(this, void 0, void 0, function* () {
6887
6887
  let { api, categoryId: id, req: reqParams } = params;
6888
6888
  if (!api) {
6889
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6889
+ api = ENVIRONMENT.Api().GetBruceApi();
6890
6890
  }
6891
6891
  if (!id) {
6892
6892
  throw ("Lod category id is required.");
@@ -6901,7 +6901,7 @@ var EntityLodCategory;
6901
6901
  return __awaiter(this, void 0, void 0, function* () {
6902
6902
  let { api, category: data, req: reqParams } = params;
6903
6903
  if (!api) {
6904
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6904
+ api = ENVIRONMENT.Api().GetBruceApi();
6905
6905
  }
6906
6906
  if (!data.Key || !data.Name) {
6907
6907
  throw ("Lod category key and name are required.");
@@ -6935,7 +6935,7 @@ var EntityRelationType;
6935
6935
  return __awaiter(this, void 0, void 0, function* () {
6936
6936
  let { api, relationTypeId: typeId, req: reqParams } = params;
6937
6937
  if (!api) {
6938
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6938
+ api = ENVIRONMENT.Api().GetBruceApi();
6939
6939
  }
6940
6940
  if (!typeId) {
6941
6941
  throw ("Type ID is required.");
@@ -6969,7 +6969,7 @@ var EntityRelationType;
6969
6969
  return __awaiter(this, void 0, void 0, function* () {
6970
6970
  let { api, relationTypeId: typeId, req: reqParams } = params;
6971
6971
  if (!api) {
6972
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6972
+ api = ENVIRONMENT.Api().GetBruceApi();
6973
6973
  }
6974
6974
  if (!typeId) {
6975
6975
  throw ("Type ID is required.");
@@ -6984,7 +6984,7 @@ var EntityRelationType;
6984
6984
  return __awaiter(this, void 0, void 0, function* () {
6985
6985
  let { api, req: reqParams } = params;
6986
6986
  if (!api) {
6987
- api = ENVIRONMENT.GetGetters().GetBruceApi();
6987
+ api = ENVIRONMENT.Api().GetBruceApi();
6988
6988
  }
6989
6989
  const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
6990
6990
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -7014,7 +7014,7 @@ var EntityRelationType;
7014
7014
  return __awaiter(this, void 0, void 0, function* () {
7015
7015
  let { api, relationType: data, req: reqParams } = params;
7016
7016
  if (!api) {
7017
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7017
+ api = ENVIRONMENT.Api().GetBruceApi();
7018
7018
  }
7019
7019
  if (!(data === null || data === void 0 ? void 0 : data.ForwardName) || !(data === null || data === void 0 ? void 0 : data.ReverseName)) {
7020
7020
  throw ("Forward and reverse names are required.");
@@ -7060,7 +7060,7 @@ var EntityRelation;
7060
7060
  return __awaiter(this, void 0, void 0, function* () {
7061
7061
  let { api, relation: data, req: reqParams } = params;
7062
7062
  if (!api) {
7063
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7063
+ api = ENVIRONMENT.Api().GetBruceApi();
7064
7064
  }
7065
7065
  if (!data["Principal.Entity.ID"] || !data["Related.Entity.ID"] || !data["Relation.Type.ID"]) {
7066
7066
  throw ("Principal Entity ID, Related Entity ID, and Relation Type ID are required.");
@@ -7083,7 +7083,7 @@ var EntityRelation;
7083
7083
  return __awaiter(this, void 0, void 0, function* () {
7084
7084
  let { api, principalEntityId, relatedEntityId, relationTypeId, req: reqParams } = params;
7085
7085
  if (!api) {
7086
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7086
+ api = ENVIRONMENT.Api().GetBruceApi();
7087
7087
  }
7088
7088
  if (!principalEntityId || !relatedEntityId || !relationTypeId) {
7089
7089
  throw new Error("Principal Entity ID, Related Entity ID, and Relation Type ID are required.");
@@ -7103,7 +7103,7 @@ var EntityRelation;
7103
7103
  return __awaiter(this, void 0, void 0, function* () {
7104
7104
  let { api, relation: data, req: reqParams } = params;
7105
7105
  if (!api) {
7106
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7106
+ api = ENVIRONMENT.Api().GetBruceApi();
7107
7107
  }
7108
7108
  if (!data["Principal.Entity.ID"] || !data["Related.Entity.ID"] || !data["Relation.Type.ID"]) {
7109
7109
  throw ("Principal Entity ID, Related Entity ID, and Relation Type ID are required.");
@@ -7123,7 +7123,7 @@ var EntityRelation;
7123
7123
  return __awaiter(this, void 0, void 0, function* () {
7124
7124
  let { api, entityId, filter, req: reqParams } = params;
7125
7125
  if (!api) {
7126
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7126
+ api = ENVIRONMENT.Api().GetBruceApi();
7127
7127
  }
7128
7128
  if (!entityId) {
7129
7129
  throw ("Entity ID is required.");
@@ -7162,7 +7162,7 @@ var EntityRelation;
7162
7162
  return __awaiter(this, void 0, void 0, function* () {
7163
7163
  let { api, entityId, req: reqParams } = params;
7164
7164
  if (!api) {
7165
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7165
+ api = ENVIRONMENT.Api().GetBruceApi();
7166
7166
  }
7167
7167
  if (!entityId) {
7168
7168
  throw ("Entity ID is required.");
@@ -7209,7 +7209,7 @@ var EntitySource;
7209
7209
  return __awaiter(this, void 0, void 0, function* () {
7210
7210
  let { api, sourceId, sourceKey, req: reqParams } = params;
7211
7211
  if (!api) {
7212
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7212
+ api = ENVIRONMENT.Api().GetBruceApi();
7213
7213
  }
7214
7214
  if (!sourceId || !sourceKey) {
7215
7215
  throw ("Source ID and Source Key are required.");
@@ -7230,7 +7230,7 @@ var EntitySource;
7230
7230
  return __awaiter(this, void 0, void 0, function* () {
7231
7231
  let { api, sourceId, sourceKeys, req: reqParams } = params;
7232
7232
  if (!api) {
7233
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7233
+ api = ENVIRONMENT.Api().GetBruceApi();
7234
7234
  }
7235
7235
  if (!sourceId || !sourceKeys.length) {
7236
7236
  throw ("Source ID and Source Keys are required.");
@@ -7280,7 +7280,7 @@ var EntitySource;
7280
7280
  return __awaiter(this, void 0, void 0, function* () {
7281
7281
  let { api, sourceId, sourceKeys, req: reqParams } = params;
7282
7282
  if (!api) {
7283
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7283
+ api = ENVIRONMENT.Api().GetBruceApi();
7284
7284
  }
7285
7285
  if (!sourceId || !sourceKeys.length) {
7286
7286
  throw ("Source ID and Source Keys are required.");
@@ -7313,7 +7313,7 @@ var EntitySource;
7313
7313
  return __awaiter(this, void 0, void 0, function* () {
7314
7314
  let { source, api } = params;
7315
7315
  if (!api) {
7316
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7316
+ api = ENVIRONMENT.Api().GetBruceApi();
7317
7317
  }
7318
7318
  if (!source["Entity.ID"] || !source["Source.ID"] || !source["SourceRecord.Key"]) {
7319
7319
  throw ("Entity ID, Source ID and Source Key are required.");
@@ -7351,7 +7351,7 @@ var EntityTag;
7351
7351
  return __awaiter(this, void 0, void 0, function* () {
7352
7352
  let { api, tagId, req: reqParams } = params;
7353
7353
  if (!api) {
7354
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7354
+ api = ENVIRONMENT.Api().GetBruceApi();
7355
7355
  }
7356
7356
  if (!tagId) {
7357
7357
  throw ("Tag ID is required.");
@@ -7371,7 +7371,7 @@ var EntityTag;
7371
7371
  return __awaiter(this, void 0, void 0, function* () {
7372
7372
  let { api, tagIds, req: reqParams } = params;
7373
7373
  if (!api) {
7374
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7374
+ api = ENVIRONMENT.Api().GetBruceApi();
7375
7375
  }
7376
7376
  if (!tagIds.length) {
7377
7377
  throw ("Tag Ids are empty.");
@@ -7430,7 +7430,7 @@ var EntityTag;
7430
7430
  return __awaiter(this, void 0, void 0, function* () {
7431
7431
  let { api, entityTypeId, req: reqParams } = params;
7432
7432
  if (!api) {
7433
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7433
+ api = ENVIRONMENT.Api().GetBruceApi();
7434
7434
  }
7435
7435
  const cache = yield api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
7436
7436
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -7460,7 +7460,7 @@ var EntityTag;
7460
7460
  return __awaiter(this, void 0, void 0, function* () {
7461
7461
  let { api, tagId, req: reqParams } = params;
7462
7462
  if (!api) {
7463
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7463
+ api = ENVIRONMENT.Api().GetBruceApi();
7464
7464
  }
7465
7465
  if (!tagId) {
7466
7466
  throw ("Tag ID is required.");
@@ -7475,7 +7475,7 @@ var EntityTag;
7475
7475
  return __awaiter(this, void 0, void 0, function* () {
7476
7476
  let { api, tag: data, req: reqParams } = params;
7477
7477
  if (!api) {
7478
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7478
+ api = ENVIRONMENT.Api().GetBruceApi();
7479
7479
  }
7480
7480
  const url = data.ID ? `layer/${data.ID}` : "layer";
7481
7481
  const res = yield api.POST(url, data, Api.PrepReqParams(reqParams));
@@ -7508,7 +7508,7 @@ var EntityType;
7508
7508
  return __awaiter(this, void 0, void 0, function* () {
7509
7509
  let { api, entityTypeId: typeId, req: reqParams } = params;
7510
7510
  if (!api) {
7511
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7511
+ api = ENVIRONMENT.Api().GetBruceApi();
7512
7512
  }
7513
7513
  if (!typeId) {
7514
7514
  throw ("Type ID is required.");
@@ -7542,7 +7542,7 @@ var EntityType;
7542
7542
  return __awaiter(this, void 0, void 0, function* () {
7543
7543
  let { api, entityTypeId: typeId, req: reqParams } = params;
7544
7544
  if (!api) {
7545
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7545
+ api = ENVIRONMENT.Api().GetBruceApi();
7546
7546
  }
7547
7547
  if (!typeId) {
7548
7548
  throw ("Type ID is required.");
@@ -7557,7 +7557,7 @@ var EntityType;
7557
7557
  return __awaiter(this, void 0, void 0, function* () {
7558
7558
  let { api, req: reqParams } = params;
7559
7559
  if (!api) {
7560
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7560
+ api = ENVIRONMENT.Api().GetBruceApi();
7561
7561
  }
7562
7562
  const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
7563
7563
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -7588,7 +7588,7 @@ var EntityType;
7588
7588
  return __awaiter(this, void 0, void 0, function* () {
7589
7589
  let { api, entityType: data, req: reqParams } = params;
7590
7590
  if (!api) {
7591
- api = ENVIRONMENT.GetGetters().GetBruceApi();
7591
+ api = ENVIRONMENT.Api().GetBruceApi();
7592
7592
  }
7593
7593
  if (!data) {
7594
7594
  data = {};
@@ -8184,7 +8184,7 @@ var EntityCoords;
8184
8184
  return __awaiter(this, void 0, void 0, function* () {
8185
8185
  let { api, rootEntityId: entityId, req: reqParams } = params;
8186
8186
  if (!api) {
8187
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8187
+ api = ENVIRONMENT.Api().GetBruceApi();
8188
8188
  }
8189
8189
  const cache = yield api.GetCacheItem(GetCacheKey(entityId), reqParams);
8190
8190
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -8214,7 +8214,7 @@ var EntityCoords;
8214
8214
  return __awaiter(this, void 0, void 0, function* () {
8215
8215
  let { api, rootEntityId: entityId, req: reqParams } = params;
8216
8216
  if (!api) {
8217
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8217
+ api = ENVIRONMENT.Api().GetBruceApi();
8218
8218
  }
8219
8219
  if (!params.test) {
8220
8220
  yield UnlinkCoords({
@@ -8254,7 +8254,7 @@ var EntityCoords;
8254
8254
  return __awaiter(this, void 0, void 0, function* () {
8255
8255
  let { api, rootEntityId: entityId, req: reqParams } = params;
8256
8256
  if (!api) {
8257
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8257
+ api = ENVIRONMENT.Api().GetBruceApi();
8258
8258
  }
8259
8259
  if (!params.test) {
8260
8260
  yield UnlinkCoords({
@@ -8291,7 +8291,7 @@ var EntityCoords;
8291
8291
  return __awaiter(this, void 0, void 0, function* () {
8292
8292
  let { api, rootEntityId: entityId, req: reqParams } = params;
8293
8293
  if (!api) {
8294
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8294
+ api = ENVIRONMENT.Api().GetBruceApi();
8295
8295
  }
8296
8296
  if (!params.test) {
8297
8297
  yield UnlinkCoords({
@@ -8320,7 +8320,7 @@ var EntityCoords;
8320
8320
  return __awaiter(this, void 0, void 0, function* () {
8321
8321
  let { api, rootEntityId: entityId, req: reqParams } = params;
8322
8322
  if (!api) {
8323
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8323
+ api = ENVIRONMENT.Api().GetBruceApi();
8324
8324
  }
8325
8325
  return api.DELETE(`entity/${entityId}/ucs`, reqParams);
8326
8326
  });
@@ -8373,7 +8373,7 @@ var Uploader;
8373
8373
  return __awaiter(this, void 0, void 0, function* () {
8374
8374
  let { file, api, urlSuffix: url, req, onProgress } = params;
8375
8375
  if (!api) {
8376
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8376
+ api = ENVIRONMENT.Api().GetBruceApi();
8377
8377
  }
8378
8378
  const FILE_PORTION_SIZE = 100000000; // 100MB.
8379
8379
  let fileSize = file.size;
@@ -8445,7 +8445,7 @@ var ClientFile;
8445
8445
  function GetUrl(params) {
8446
8446
  let { api, fileId } = params;
8447
8447
  if (!api) {
8448
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8448
+ api = ENVIRONMENT.Api().GetBruceApi();
8449
8449
  }
8450
8450
  return `${api.GetBaseUrl()}file/${fileId}`;
8451
8451
  }
@@ -8453,7 +8453,7 @@ var ClientFile;
8453
8453
  function GetUrlWithExt(params) {
8454
8454
  let { api, file } = params;
8455
8455
  if (!api) {
8456
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8456
+ api = ENVIRONMENT.Api().GetBruceApi();
8457
8457
  }
8458
8458
  return `${api.GetBaseUrl()}file/${file.ID}${file.FileExt ? file.FileExt : ""}`;
8459
8459
  }
@@ -8462,7 +8462,7 @@ var ClientFile;
8462
8462
  return __awaiter(this, void 0, void 0, function* () {
8463
8463
  let { api, fileId, req: reqParams } = params;
8464
8464
  if (!api) {
8465
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8465
+ api = ENVIRONMENT.Api().GetBruceApi();
8466
8466
  }
8467
8467
  if (!fileId) {
8468
8468
  throw ("File ID is required.");
@@ -8496,7 +8496,7 @@ var ClientFile;
8496
8496
  return __awaiter(this, void 0, void 0, function* () {
8497
8497
  let { api, fileIds, req: reqParams } = params;
8498
8498
  if (!api) {
8499
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8499
+ api = ENVIRONMENT.Api().GetBruceApi();
8500
8500
  }
8501
8501
  if (!fileIds.length) {
8502
8502
  throw ("File IDs are required.");
@@ -8516,7 +8516,7 @@ var ClientFile;
8516
8516
  return __awaiter(this, void 0, void 0, function* () {
8517
8517
  let { api, file, purpose, req, onProgress } = params;
8518
8518
  if (!api) {
8519
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8519
+ api = ENVIRONMENT.Api().GetBruceApi();
8520
8520
  }
8521
8521
  if (!file) {
8522
8522
  throw ("File is required.");
@@ -8574,7 +8574,7 @@ var ClientFile;
8574
8574
  return __awaiter(this, void 0, void 0, function* () {
8575
8575
  let { api, fileId, purpose, req: reqParams } = params;
8576
8576
  if (!api) {
8577
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8577
+ api = ENVIRONMENT.Api().GetBruceApi();
8578
8578
  }
8579
8579
  if (!purpose) {
8580
8580
  purpose = "";
@@ -8597,7 +8597,7 @@ var ClientFile;
8597
8597
  return __awaiter(this, void 0, void 0, function* () {
8598
8598
  let { api, file, req, onProgress } = params;
8599
8599
  if (!api) {
8600
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8600
+ api = ENVIRONMENT.Api().GetBruceApi();
8601
8601
  }
8602
8602
  if (!file) {
8603
8603
  throw ("File is required.");
@@ -8664,7 +8664,7 @@ var ClientFile;
8664
8664
  return __awaiter(this, void 0, void 0, function* () {
8665
8665
  let { api, filter, req: reqParams } = params;
8666
8666
  if (!api) {
8667
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8667
+ api = ENVIRONMENT.Api().GetBruceApi();
8668
8668
  }
8669
8669
  const data = yield api.POST("files/filtered", filter, Api.PrepReqParams(reqParams));
8670
8670
  return {
@@ -8685,7 +8685,7 @@ var ClientFile;
8685
8685
  return __awaiter(this, void 0, void 0, function* () {
8686
8686
  let { api, fileId: clientFileId, ext, req: reqParams } = params;
8687
8687
  if (!api) {
8688
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8688
+ api = ENVIRONMENT.Api().GetBruceApi();
8689
8689
  }
8690
8690
  if (!clientFileId || !ext) {
8691
8691
  throw ("Client File ID and extension are required.");
@@ -8726,7 +8726,7 @@ var ProgramKey;
8726
8726
  return __awaiter(this, void 0, void 0, function* () {
8727
8727
  let { api, programId, req: reqParams } = params;
8728
8728
  if (!api) {
8729
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8729
+ api = ENVIRONMENT.Api().GetBruceApi();
8730
8730
  }
8731
8731
  if (!programId) {
8732
8732
  throw ("Program ID is required.");
@@ -8760,7 +8760,7 @@ var ProgramKey;
8760
8760
  return __awaiter(this, void 0, void 0, function* () {
8761
8761
  let { api, req: reqParams } = params;
8762
8762
  if (!api) {
8763
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8763
+ api = ENVIRONMENT.Api().GetBruceApi();
8764
8764
  }
8765
8765
  const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
8766
8766
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -8790,7 +8790,7 @@ var ProgramKey;
8790
8790
  return __awaiter(this, void 0, void 0, function* () {
8791
8791
  let { api, programId, req: reqParams } = params;
8792
8792
  if (!api) {
8793
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8793
+ api = ENVIRONMENT.Api().GetBruceApi();
8794
8794
  }
8795
8795
  if (!programId) {
8796
8796
  throw ("Program ID is required.");
@@ -8805,7 +8805,7 @@ var ProgramKey;
8805
8805
  return __awaiter(this, void 0, void 0, function* () {
8806
8806
  let { api, programKey: data, req: reqParams } = params;
8807
8807
  if (!api) {
8808
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8808
+ api = ENVIRONMENT.Api().GetBruceApi();
8809
8809
  }
8810
8810
  if (!(data === null || data === void 0 ? void 0 : data.ProgramId)) {
8811
8811
  throw ("Program ID is required.");
@@ -8881,7 +8881,7 @@ var Tileset;
8881
8881
  return __awaiter(this, void 0, void 0, function* () {
8882
8882
  let { api, tilesetId, loadFiles, req: reqParams } = params;
8883
8883
  if (!api) {
8884
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8884
+ api = ENVIRONMENT.Api().GetBruceApi();
8885
8885
  }
8886
8886
  if (!tilesetId) {
8887
8887
  throw ("Tileset ID is required.");
@@ -8923,7 +8923,7 @@ var Tileset;
8923
8923
  // This uses the legacy end-point which doesn't do that...
8924
8924
  let { api, tilesetIds, req: reqParams } = params;
8925
8925
  if (!api) {
8926
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8926
+ api = ENVIRONMENT.Api().GetBruceApi();
8927
8927
  }
8928
8928
  const mapping = {};
8929
8929
  if (tilesetIds.length == 1) {
@@ -8950,7 +8950,7 @@ var Tileset;
8950
8950
  return __awaiter(this, void 0, void 0, function* () {
8951
8951
  let { api, req: reqParams } = params;
8952
8952
  if (!api) {
8953
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8953
+ api = ENVIRONMENT.Api().GetBruceApi();
8954
8954
  }
8955
8955
  const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
8956
8956
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -8980,7 +8980,7 @@ var Tileset;
8980
8980
  return __awaiter(this, void 0, void 0, function* () {
8981
8981
  let { api, tilesetId, req: reqParams } = params;
8982
8982
  if (!api) {
8983
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8983
+ api = ENVIRONMENT.Api().GetBruceApi();
8984
8984
  }
8985
8985
  if (!tilesetId) {
8986
8986
  throw ("Tileset ID is required.");
@@ -8995,7 +8995,7 @@ var Tileset;
8995
8995
  return __awaiter(this, void 0, void 0, function* () {
8996
8996
  let { api, tileset: data, req: reqParams } = params;
8997
8997
  if (!api) {
8998
- api = ENVIRONMENT.GetGetters().GetBruceApi();
8998
+ api = ENVIRONMENT.Api().GetBruceApi();
8999
8999
  }
9000
9000
  if (!(data === null || data === void 0 ? void 0 : data.name) || !(data === null || data === void 0 ? void 0 : data.type)) {
9001
9001
  throw ("Tileset name and type are required.");
@@ -9018,7 +9018,7 @@ var Tileset;
9018
9018
  return __awaiter(this, void 0, void 0, function* () {
9019
9019
  let { api, file, req, tilesetId, onProgress } = params;
9020
9020
  if (!api) {
9021
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9021
+ api = ENVIRONMENT.Api().GetBruceApi();
9022
9022
  }
9023
9023
  if (!tilesetId || !file) {
9024
9024
  throw ("Tileset ID and file are required.");
@@ -9059,7 +9059,7 @@ var Tileset;
9059
9059
  return __awaiter(this, void 0, void 0, function* () {
9060
9060
  let { api, tilesetId, file, req: reqParams } = params;
9061
9061
  if (!api) {
9062
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9062
+ api = ENVIRONMENT.Api().GetBruceApi();
9063
9063
  }
9064
9064
  if (!tilesetId || !file) {
9065
9065
  throw ("Tileset ID and file are required.");
@@ -9073,7 +9073,7 @@ var Tileset;
9073
9073
  return __awaiter(this, void 0, void 0, function* () {
9074
9074
  let { api, file, req, tilesetId, onProgress } = params;
9075
9075
  if (!api) {
9076
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9076
+ api = ENVIRONMENT.Api().GetBruceApi();
9077
9077
  }
9078
9078
  if (!tilesetId || !file) {
9079
9079
  throw ("Tileset ID and file are required.");
@@ -9115,7 +9115,7 @@ var Tileset;
9115
9115
  return __awaiter(this, void 0, void 0, function* () {
9116
9116
  let { api, tilesetId, file, req: reqParams } = params;
9117
9117
  if (!api) {
9118
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9118
+ api = ENVIRONMENT.Api().GetBruceApi();
9119
9119
  }
9120
9120
  if (!tilesetId || !file) {
9121
9121
  throw ("Tileset ID and file are required.");
@@ -9128,7 +9128,7 @@ var Tileset;
9128
9128
  function GetFileUrl(params) {
9129
9129
  let { api, tilesetId, file } = params;
9130
9130
  if (!api) {
9131
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9131
+ api = ENVIRONMENT.Api().GetBruceApi();
9132
9132
  }
9133
9133
  if (!tilesetId) {
9134
9134
  throw ("Tileset ID is required.");
@@ -9142,7 +9142,7 @@ var Tileset;
9142
9142
  function GetSrcFileUrl(params) {
9143
9143
  let { api, tilesetId, file } = params;
9144
9144
  if (!api) {
9145
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9145
+ api = ENVIRONMENT.Api().GetBruceApi();
9146
9146
  }
9147
9147
  if (!tilesetId) {
9148
9148
  throw ("Tileset ID is required.");
@@ -9156,7 +9156,7 @@ var Tileset;
9156
9156
  function GetPublicFileUrl(params) {
9157
9157
  let { api, tilesetId, file } = params;
9158
9158
  if (!api) {
9159
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9159
+ api = ENVIRONMENT.Api().GetBruceApi();
9160
9160
  }
9161
9161
  if (!tilesetId) {
9162
9162
  throw ("Tileset ID is required.");
@@ -9171,7 +9171,7 @@ var Tileset;
9171
9171
  return __awaiter(this, void 0, void 0, function* () {
9172
9172
  let { api, tilesetId, req: reqParams } = params;
9173
9173
  if (!api) {
9174
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9174
+ api = ENVIRONMENT.Api().GetBruceApi();
9175
9175
  }
9176
9176
  if (!tilesetId) {
9177
9177
  throw ("Tileset ID is required.");
@@ -9196,7 +9196,7 @@ var Tileset;
9196
9196
  return __awaiter(this, void 0, void 0, function* () {
9197
9197
  let { api, published: data, req: reqParams } = params;
9198
9198
  if (!api) {
9199
- api = ENVIRONMENT.GetGetters().GetGlobalApi();
9199
+ api = ENVIRONMENT.Api().GetGlobalApi();
9200
9200
  }
9201
9201
  if (!(data === null || data === void 0 ? void 0 : data["Tileset.ID"]) || !(data === null || data === void 0 ? void 0 : data["PublishedBy.ClientAccount.ID"]) || !(data === null || data === void 0 ? void 0 : data["PublishedBy.User.ID"])) {
9202
9202
  throw ("Tileset ID, client account ID, and user ID are required.");
@@ -9222,7 +9222,7 @@ var Tileset;
9222
9222
  return __awaiter(this, void 0, void 0, function* () {
9223
9223
  let { api, accountId, tilesetId, req: reqParams } = params;
9224
9224
  if (!api) {
9225
- api = ENVIRONMENT.GetGetters().GetGlobalApi();
9225
+ api = ENVIRONMENT.Api().GetGlobalApi();
9226
9226
  }
9227
9227
  if (!accountId || !tilesetId) {
9228
9228
  throw ("Client account ID and tileset ID are required.");
@@ -9255,7 +9255,7 @@ var Tileset;
9255
9255
  return __awaiter(this, void 0, void 0, function* () {
9256
9256
  let { api, accountId, req: reqParams } = params;
9257
9257
  if (!api) {
9258
- api = ENVIRONMENT.GetGetters().GetGlobalApi();
9258
+ api = ENVIRONMENT.Api().GetGlobalApi();
9259
9259
  }
9260
9260
  if (!accountId) {
9261
9261
  throw ("Client account ID is required.");
@@ -9451,7 +9451,7 @@ var ProjectViewBookmark;
9451
9451
  return __awaiter(this, void 0, void 0, function* () {
9452
9452
  let { api, viewId, bookmarkId, req: reqParams } = params;
9453
9453
  if (!api) {
9454
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9454
+ api = ENVIRONMENT.Api().GetBruceApi();
9455
9455
  }
9456
9456
  if (!viewId || !bookmarkId) {
9457
9457
  throw ("View ID and Bookmark ID are required.");
@@ -9485,7 +9485,7 @@ var ProjectViewBookmark;
9485
9485
  return __awaiter(this, void 0, void 0, function* () {
9486
9486
  let { api, viewId, bookmarkId, req: reqParams } = params;
9487
9487
  if (!api) {
9488
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9488
+ api = ENVIRONMENT.Api().GetBruceApi();
9489
9489
  }
9490
9490
  if (!viewId || !bookmarkId) {
9491
9491
  throw ("View ID and Bookmark ID are required.");
@@ -9500,7 +9500,7 @@ var ProjectViewBookmark;
9500
9500
  return __awaiter(this, void 0, void 0, function* () {
9501
9501
  let { api, viewId, req: reqParams } = params;
9502
9502
  if (!api) {
9503
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9503
+ api = ENVIRONMENT.Api().GetBruceApi();
9504
9504
  }
9505
9505
  if (!viewId) {
9506
9506
  throw ("View ID is required.");
@@ -9550,7 +9550,7 @@ var ProjectViewBookmark;
9550
9550
  return __awaiter(this, void 0, void 0, function* () {
9551
9551
  let { api, viewId, bookmark: data, req: reqParams } = params;
9552
9552
  if (!api) {
9553
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9553
+ api = ENVIRONMENT.Api().GetBruceApi();
9554
9554
  }
9555
9555
  if (!(data === null || data === void 0 ? void 0 : data.Title)) {
9556
9556
  data.Title = data.ID;
@@ -9568,7 +9568,7 @@ var ProjectViewBookmark;
9568
9568
  return __awaiter(this, void 0, void 0, function* () {
9569
9569
  let { api, viewId, bookmarkIds, req: reqParams } = params;
9570
9570
  if (!api) {
9571
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9571
+ api = ENVIRONMENT.Api().GetBruceApi();
9572
9572
  }
9573
9573
  const reqData = {
9574
9574
  "UISlide.ID": bookmarkIds,
@@ -9611,7 +9611,7 @@ var ProjectView;
9611
9611
  return __awaiter(this, void 0, void 0, function* () {
9612
9612
  let { api, viewId, req: reqParams } = params;
9613
9613
  if (!api) {
9614
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9614
+ api = ENVIRONMENT.Api().GetBruceApi();
9615
9615
  }
9616
9616
  if (!viewId) {
9617
9617
  throw ("View ID is required.");
@@ -9645,7 +9645,7 @@ var ProjectView;
9645
9645
  return __awaiter(this, void 0, void 0, function* () {
9646
9646
  let { api, req: reqParams } = params;
9647
9647
  if (!api) {
9648
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9648
+ api = ENVIRONMENT.Api().GetBruceApi();
9649
9649
  }
9650
9650
  const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
9651
9651
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -9675,7 +9675,7 @@ var ProjectView;
9675
9675
  return __awaiter(this, void 0, void 0, function* () {
9676
9676
  let { api, viewId, req: reqParams } = params;
9677
9677
  if (!api) {
9678
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9678
+ api = ENVIRONMENT.Api().GetBruceApi();
9679
9679
  }
9680
9680
  if (!viewId) {
9681
9681
  throw ("View ID is required.");
@@ -9690,7 +9690,7 @@ var ProjectView;
9690
9690
  return __awaiter(this, void 0, void 0, function* () {
9691
9691
  let { api, view: data, req: reqParams } = params;
9692
9692
  if (!api) {
9693
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9693
+ api = ENVIRONMENT.Api().GetBruceApi();
9694
9694
  }
9695
9695
  if (!data) {
9696
9696
  data = {};
@@ -9756,7 +9756,7 @@ var ProjectViewLegacyTile;
9756
9756
  return __awaiter(this, void 0, void 0, function* () {
9757
9757
  let { getter, sources: items, addIfMissing, req: reqParams } = params;
9758
9758
  if (!getter) {
9759
- getter = ENVIRONMENT.GetGetters().GetBruceGetter();
9759
+ getter = ENVIRONMENT.Api().GetBruceGetter();
9760
9760
  }
9761
9761
  const settings = yield getTemplateSettings(getter, reqParams);
9762
9762
  const maps = (_a = settings.CesiumMapSources) !== null && _a !== void 0 ? _a : [];
@@ -9775,7 +9775,7 @@ var ProjectViewLegacyTile;
9775
9775
  return __awaiter(this, void 0, void 0, function* () {
9776
9776
  let { getter, sources: items, addIfMissing, req: reqParams } = params;
9777
9777
  if (!getter) {
9778
- getter = ENVIRONMENT.GetGetters().GetBruceGetter();
9778
+ getter = ENVIRONMENT.Api().GetBruceGetter();
9779
9779
  }
9780
9780
  const settings = yield getTemplateSettings(getter, reqParams);
9781
9781
  const terrains = (_a = settings.CesiumTerrainSources) !== null && _a !== void 0 ? _a : [];
@@ -9939,7 +9939,7 @@ var PendingAction;
9939
9939
  return __awaiter(this, void 0, void 0, function* () {
9940
9940
  let { api, actionId, req: reqParams } = params;
9941
9941
  if (!api) {
9942
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9942
+ api = ENVIRONMENT.Api().GetBruceApi();
9943
9943
  }
9944
9944
  if (!actionId) {
9945
9945
  throw ("Action ID is required.");
@@ -9955,7 +9955,7 @@ var PendingAction;
9955
9955
  return __awaiter(this, void 0, void 0, function* () {
9956
9956
  let { api, stricter, reqParams } = params;
9957
9957
  if (!api) {
9958
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9958
+ api = ENVIRONMENT.Api().GetBruceApi();
9959
9959
  }
9960
9960
  const data = yield api.GET(`pendingActions/important?Update=${Boolean(stricter)}`, Api.PrepReqParams(reqParams));
9961
9961
  return {
@@ -9968,7 +9968,7 @@ var PendingAction;
9968
9968
  return __awaiter(this, void 0, void 0, function* () {
9969
9969
  let { api, actionId, order, startIndex, amount, req: reqParams, types } = params;
9970
9970
  if (!api) {
9971
- api = ENVIRONMENT.GetGetters().GetBruceApi();
9971
+ api = ENVIRONMENT.Api().GetBruceApi();
9972
9972
  }
9973
9973
  if (amount == null) {
9974
9974
  amount = 500;
@@ -10026,7 +10026,7 @@ var Style;
10026
10026
  return __awaiter(this, void 0, void 0, function* () {
10027
10027
  let { api, req: reqParams } = params;
10028
10028
  if (!api) {
10029
- api = ENVIRONMENT.GetGetters().GetBruceApi();
10029
+ api = ENVIRONMENT.Api().GetBruceApi();
10030
10030
  }
10031
10031
  const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
10032
10032
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -10056,7 +10056,7 @@ var Style;
10056
10056
  return __awaiter(this, void 0, void 0, function* () {
10057
10057
  let { api, styleId: id, req: reqParams } = params;
10058
10058
  if (!api) {
10059
- api = ENVIRONMENT.GetGetters().GetBruceApi();
10059
+ api = ENVIRONMENT.Api().GetBruceApi();
10060
10060
  }
10061
10061
  if (!id) {
10062
10062
  throw ("Style ID is required.");
@@ -10089,7 +10089,7 @@ var Style;
10089
10089
  return __awaiter(this, void 0, void 0, function* () {
10090
10090
  let { api, style: data, req: reqParams } = params;
10091
10091
  if (!api) {
10092
- api = ENVIRONMENT.GetGetters().GetBruceApi();
10092
+ api = ENVIRONMENT.Api().GetBruceApi();
10093
10093
  }
10094
10094
  if (!(data === null || data === void 0 ? void 0 : data.Name)) {
10095
10095
  throw ("Style name is required.");
@@ -10110,7 +10110,7 @@ var Style;
10110
10110
  return __awaiter(this, void 0, void 0, function* () {
10111
10111
  let { api, styleId: id, req: reqParams } = params;
10112
10112
  if (!api) {
10113
- api = ENVIRONMENT.GetGetters().GetBruceApi();
10113
+ api = ENVIRONMENT.Api().GetBruceApi();
10114
10114
  }
10115
10115
  if (!id) {
10116
10116
  throw ("Style ID is required.");
@@ -10155,7 +10155,7 @@ var Session;
10155
10155
  return __awaiter(this, void 0, void 0, function* () {
10156
10156
  let { api, sessionId, req: reqParams } = params;
10157
10157
  if (!api) {
10158
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10158
+ api = ENVIRONMENT.Api().GetGuardianApi();
10159
10159
  }
10160
10160
  if (!sessionId) {
10161
10161
  throw ("Session ID is required.");
@@ -10196,7 +10196,7 @@ var Session;
10196
10196
  return __awaiter(this, void 0, void 0, function* () {
10197
10197
  let { api, username, password, accountId, req: reqParams } = params;
10198
10198
  if (!api) {
10199
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10199
+ api = ENVIRONMENT.Api().GetGuardianApi();
10200
10200
  }
10201
10201
  const data = yield api.POST("login", {
10202
10202
  account: accountId ? accountId : "",
@@ -10217,7 +10217,7 @@ var Session;
10217
10217
  return __awaiter(this, void 0, void 0, function* () {
10218
10218
  let { api, req: reqParams } = params;
10219
10219
  if (!api) {
10220
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10220
+ api = ENVIRONMENT.Api().GetGuardianApi();
10221
10221
  }
10222
10222
  const ssid = api.GetSessionId();
10223
10223
  if (ssid) {
@@ -10292,7 +10292,7 @@ var UserGroup;
10292
10292
  return __awaiter(this, void 0, void 0, function* () {
10293
10293
  let { api, accountId, name, req: reqParams } = params;
10294
10294
  if (!api) {
10295
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10295
+ api = ENVIRONMENT.Api().GetGuardianApi();
10296
10296
  }
10297
10297
  if (!name || !accountId) {
10298
10298
  throw ("Name and AccountID are required.");
@@ -10308,7 +10308,7 @@ var UserGroup;
10308
10308
  return __awaiter(this, void 0, void 0, function* () {
10309
10309
  let { api, accountId, groupId: id, req: reqParams } = params;
10310
10310
  if (!api) {
10311
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10311
+ api = ENVIRONMENT.Api().GetGuardianApi();
10312
10312
  }
10313
10313
  if (!accountId || !id) {
10314
10314
  throw ("AccountID and ID are required.");
@@ -10324,7 +10324,7 @@ var UserGroup;
10324
10324
  return __awaiter(this, void 0, void 0, function* () {
10325
10325
  let { api, accountId, perm, req: reqParams } = params;
10326
10326
  if (!api) {
10327
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10327
+ api = ENVIRONMENT.Api().GetGuardianApi();
10328
10328
  }
10329
10329
  if (!accountId || !perm) {
10330
10330
  throw ("AccountID and Perm are required.");
@@ -10340,7 +10340,7 @@ var UserGroup;
10340
10340
  return __awaiter(this, void 0, void 0, function* () {
10341
10341
  let { api, accountId, req: reqParams } = params;
10342
10342
  if (!api) {
10343
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10343
+ api = ENVIRONMENT.Api().GetGuardianApi();
10344
10344
  }
10345
10345
  if (!accountId) {
10346
10346
  throw ("AccountID is required.");
@@ -10356,7 +10356,7 @@ var UserGroup;
10356
10356
  return __awaiter(this, void 0, void 0, function* () {
10357
10357
  let { api, accountId, groupId: id, req: reqParams } = params;
10358
10358
  if (!api) {
10359
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10359
+ api = ENVIRONMENT.Api().GetGuardianApi();
10360
10360
  }
10361
10361
  if (!accountId || !id) {
10362
10362
  throw ("AccountID and ID are required.");
@@ -10369,7 +10369,7 @@ var UserGroup;
10369
10369
  return __awaiter(this, void 0, void 0, function* () {
10370
10370
  let { api, group: data, reqParams } = params;
10371
10371
  if (!api) {
10372
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10372
+ api = ENVIRONMENT.Api().GetGuardianApi();
10373
10373
  }
10374
10374
  if (!data.Name || !data["ClientAccount.ID"]) {
10375
10375
  throw ("User group name and client account ID are required.");
@@ -10419,7 +10419,7 @@ var User;
10419
10419
  return __awaiter(this, void 0, void 0, function* () {
10420
10420
  let { api, userId: id, accountId, req: reqParams } = params;
10421
10421
  if (!api) {
10422
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10422
+ api = ENVIRONMENT.Api().GetGuardianApi();
10423
10423
  }
10424
10424
  if (!id) {
10425
10425
  throw ("ID is required.");
@@ -10453,7 +10453,7 @@ var User;
10453
10453
  return __awaiter(this, void 0, void 0, function* () {
10454
10454
  let { api, user: data, req: reqParams } = params;
10455
10455
  if (!api) {
10456
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10456
+ api = ENVIRONMENT.Api().GetGuardianApi();
10457
10457
  }
10458
10458
  if (!(data === null || data === void 0 ? void 0 : data.ID) || !(data === null || data === void 0 ? void 0 : data.Type)) {
10459
10459
  throw ("ID and Type are required.");
@@ -10494,7 +10494,7 @@ var User;
10494
10494
  return __awaiter(this, void 0, void 0, function* () {
10495
10495
  let { api, userId, appId, req } = params;
10496
10496
  if (!api) {
10497
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10497
+ api = ENVIRONMENT.Api().GetGuardianApi();
10498
10498
  }
10499
10499
  if (!userId || !appId) {
10500
10500
  throw ("UserId and appId are required.");
@@ -10544,7 +10544,7 @@ var User;
10544
10544
  return __awaiter(this, void 0, void 0, function* () {
10545
10545
  let { api, accId, userId, appId, settings, req } = params;
10546
10546
  if (!api) {
10547
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10547
+ api = ENVIRONMENT.Api().GetGuardianApi();
10548
10548
  }
10549
10549
  if (!userId || !appId) {
10550
10550
  throw ("UserId and appId are required.");
@@ -10565,7 +10565,7 @@ var User;
10565
10565
  return __awaiter(this, void 0, void 0, function* () {
10566
10566
  let { api, username, excludeUserId, req: reqParams } = params;
10567
10567
  if (!api) {
10568
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10568
+ api = ENVIRONMENT.Api().GetGuardianApi();
10569
10569
  }
10570
10570
  if (!username) {
10571
10571
  throw ("Username is required.");
@@ -10596,7 +10596,7 @@ var User;
10596
10596
  return __awaiter(this, void 0, void 0, function* () {
10597
10597
  let { api, email, accountId, req: reqParams } = params;
10598
10598
  if (!api) {
10599
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10599
+ api = ENVIRONMENT.Api().GetGuardianApi();
10600
10600
  }
10601
10601
  if (!email) {
10602
10602
  throw ("Email is required.");
@@ -10629,7 +10629,7 @@ var User;
10629
10629
  return __awaiter(this, void 0, void 0, function* () {
10630
10630
  let { api, accountId, exclusive, req: reqParams } = params;
10631
10631
  if (!api) {
10632
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10632
+ api = ENVIRONMENT.Api().GetGuardianApi();
10633
10633
  }
10634
10634
  if (!accountId) {
10635
10635
  throw ("Client account ID is required.");
@@ -10684,7 +10684,7 @@ var User;
10684
10684
  return __awaiter(this, void 0, void 0, function* () {
10685
10685
  let { api, email, req: reqParams } = params;
10686
10686
  if (!api) {
10687
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10687
+ api = ENVIRONMENT.Api().GetGuardianApi();
10688
10688
  }
10689
10689
  if (!email) {
10690
10690
  throw ("Email is required.");
@@ -10704,7 +10704,7 @@ var User;
10704
10704
  return __awaiter(this, void 0, void 0, function* () {
10705
10705
  let { api, expiredCode, req: reqParams } = params;
10706
10706
  if (!api) {
10707
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10707
+ api = ENVIRONMENT.Api().GetGuardianApi();
10708
10708
  }
10709
10709
  if (!expiredCode) {
10710
10710
  throw ("Expired activation code is required.");
@@ -10722,7 +10722,7 @@ var User;
10722
10722
  return __awaiter(this, void 0, void 0, function* () {
10723
10723
  let { api, code, user: data, accountId, req: reqParams } = params;
10724
10724
  if (!api) {
10725
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10725
+ api = ENVIRONMENT.Api().GetGuardianApi();
10726
10726
  }
10727
10727
  if (!code || !(data === null || data === void 0 ? void 0 : data.Login) || !(data === null || data === void 0 ? void 0 : data.Password)) {
10728
10728
  throw ("Login, password, and activation code are required.");
@@ -10751,7 +10751,7 @@ var User;
10751
10751
  return __awaiter(this, void 0, void 0, function* () {
10752
10752
  let { api, accountId, email, req: reqParams } = params;
10753
10753
  if (!api) {
10754
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10754
+ api = ENVIRONMENT.Api().GetGuardianApi();
10755
10755
  }
10756
10756
  if (!accountId || !email) {
10757
10757
  throw ("Account ID and email are required.");
@@ -10783,7 +10783,7 @@ var User;
10783
10783
  return __awaiter(this, void 0, void 0, function* () {
10784
10784
  let { api, code, userId, password, req: reqParams } = params;
10785
10785
  if (!api) {
10786
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10786
+ api = ENVIRONMENT.Api().GetGuardianApi();
10787
10787
  }
10788
10788
  const { user } = yield Get({
10789
10789
  api: api,
@@ -10815,7 +10815,7 @@ var User;
10815
10815
  return __awaiter(this, void 0, void 0, function* () {
10816
10816
  let { api, accountId, req: reqParams } = params;
10817
10817
  if (!api) {
10818
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10818
+ api = ENVIRONMENT.Api().GetGuardianApi();
10819
10819
  }
10820
10820
  const cache = yield api.GetCacheItem(GetListCacheKey(accountId), reqParams);
10821
10821
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -10857,7 +10857,7 @@ var User;
10857
10857
  return __awaiter(this, void 0, void 0, function* () {
10858
10858
  let { api, tokenId: id, req: reqParams } = params;
10859
10859
  if (!api) {
10860
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10860
+ api = ENVIRONMENT.Api().GetGuardianApi();
10861
10861
  }
10862
10862
  yield api.DELETE(`accessToken/${id}`, reqParams);
10863
10863
  api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + id);
@@ -10869,7 +10869,7 @@ var User;
10869
10869
  return __awaiter(this, void 0, void 0, function* () {
10870
10870
  let { api, token: data, req: reqParams } = params;
10871
10871
  if (!api) {
10872
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10872
+ api = ENVIRONMENT.Api().GetGuardianApi();
10873
10873
  }
10874
10874
  if (!data) {
10875
10875
  data = {};
@@ -10911,7 +10911,7 @@ var AccountInvite;
10911
10911
  return __awaiter(this, void 0, void 0, function* () {
10912
10912
  let { api, code, req } = params;
10913
10913
  if (!api) {
10914
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10914
+ api = ENVIRONMENT.Api().GetGuardianApi();
10915
10915
  }
10916
10916
  const res = yield api.GET(`invite/code?inviteCode=${code}`, Api.PrepReqParams(req));
10917
10917
  return res;
@@ -10922,7 +10922,7 @@ var AccountInvite;
10922
10922
  return __awaiter(this, void 0, void 0, function* () {
10923
10923
  let { api, accountId, userId, req } = params;
10924
10924
  if (!api) {
10925
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10925
+ api = ENVIRONMENT.Api().GetGuardianApi();
10926
10926
  }
10927
10927
  const urlParams = new URLSearchParams();
10928
10928
  if (accountId) {
@@ -10940,7 +10940,7 @@ var AccountInvite;
10940
10940
  return __awaiter(this, void 0, void 0, function* () {
10941
10941
  let { api, code, status, user, req } = params;
10942
10942
  if (!api) {
10943
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10943
+ api = ENVIRONMENT.Api().GetGuardianApi();
10944
10944
  }
10945
10945
  const res = yield api.POST("invite/update", {
10946
10946
  InviteCode: code,
@@ -10955,7 +10955,7 @@ var AccountInvite;
10955
10955
  return __awaiter(this, void 0, void 0, function* () {
10956
10956
  let { api, accountId, login, userId, email, mobile, emailTemplateKey, groupIds, req } = params;
10957
10957
  if (!api) {
10958
- api = ENVIRONMENT.GetGetters().GetGuardianApi();
10958
+ api = ENVIRONMENT.Api().GetGuardianApi();
10959
10959
  }
10960
10960
  const res = yield api.POST("invite/new", {
10961
10961
  accountId,
@@ -11092,7 +11092,7 @@ var DataLab;
11092
11092
  return __awaiter(this, void 0, void 0, function* () {
11093
11093
  let { api, query, key, skip, load, req: reqParams } = params;
11094
11094
  if (!api) {
11095
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11095
+ api = ENVIRONMENT.Api().GetBruceApi();
11096
11096
  }
11097
11097
  if (!key) {
11098
11098
  key = EReqKey.Primary;
@@ -11131,7 +11131,7 @@ var ImportCad;
11131
11131
  return __awaiter(this, void 0, void 0, function* () {
11132
11132
  let { api, fileAnalyze, req: reqParams } = params;
11133
11133
  if (!api) {
11134
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11134
+ api = ENVIRONMENT.Api().GetBruceApi();
11135
11135
  }
11136
11136
  return api.POST("entities/PrepareIFCForImport", fileAnalyze, Api.PrepReqParams(reqParams));
11137
11137
  });
@@ -11141,7 +11141,7 @@ var ImportCad;
11141
11141
  return __awaiter(this, void 0, void 0, function* () {
11142
11142
  let { api, fileImport, req: reqParams } = params;
11143
11143
  if (!api) {
11144
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11144
+ api = ENVIRONMENT.Api().GetBruceApi();
11145
11145
  }
11146
11146
  return api.POST("entities/importIFCWithProgress", fileImport, Api.PrepReqParams(reqParams));
11147
11147
  });
@@ -11174,7 +11174,7 @@ var ImportCsv;
11174
11174
  return __awaiter(this, void 0, void 0, function* () {
11175
11175
  let { api, fileImport, req: reqParams } = params;
11176
11176
  if (!api) {
11177
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11177
+ api = ENVIRONMENT.Api().GetBruceApi();
11178
11178
  }
11179
11179
  return api.POST("entities/importCSVWithProgress2", fileImport, Api.PrepReqParams(reqParams));
11180
11180
  });
@@ -11188,7 +11188,7 @@ var ImportJson;
11188
11188
  return __awaiter(this, void 0, void 0, function* () {
11189
11189
  let { api, fileImport, req: reqParams } = params;
11190
11190
  if (!api) {
11191
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11191
+ api = ENVIRONMENT.Api().GetBruceApi();
11192
11192
  }
11193
11193
  return api.POST("entities/importJsonWithProgress", fileImport, Api.PrepReqParams(reqParams));
11194
11194
  });
@@ -11202,7 +11202,7 @@ var ImportKml;
11202
11202
  return __awaiter(this, void 0, void 0, function* () {
11203
11203
  let { api, fileImport, req: reqParams } = params;
11204
11204
  if (!api) {
11205
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11205
+ api = ENVIRONMENT.Api().GetBruceApi();
11206
11206
  }
11207
11207
  return api.POST("entities/importKMLWithProgress2", fileImport, Api.PrepReqParams(reqParams));
11208
11208
  });
@@ -11233,7 +11233,7 @@ var ImportedFile;
11233
11233
  return __awaiter(this, void 0, void 0, function* () {
11234
11234
  let { api, fileType: type, pageIndex, req: reqParams } = params;
11235
11235
  if (!api) {
11236
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11236
+ api = ENVIRONMENT.Api().GetBruceApi();
11237
11237
  }
11238
11238
  if (!type) {
11239
11239
  type = EFileType.All;
@@ -11279,7 +11279,7 @@ var ImportedFile;
11279
11279
  return __awaiter(this, void 0, void 0, function* () {
11280
11280
  let { api, rootId, req: reqParams } = params;
11281
11281
  if (!api) {
11282
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11282
+ api = ENVIRONMENT.Api().GetBruceApi();
11283
11283
  }
11284
11284
  const cache = yield api.GetCacheItem(GetCacheKeyByRootId(rootId), reqParams);
11285
11285
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -11309,7 +11309,7 @@ var ImportedFile;
11309
11309
  return __awaiter(this, void 0, void 0, function* () {
11310
11310
  let { api, importedFileId: fileId, req: reqParams } = params;
11311
11311
  if (!api) {
11312
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11312
+ api = ENVIRONMENT.Api().GetBruceApi();
11313
11313
  }
11314
11314
  const cache = yield api.GetCacheItem(GetCacheKey(fileId), reqParams);
11315
11315
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -11534,7 +11534,7 @@ var Plugin;
11534
11534
  return __awaiter(this, void 0, void 0, function* () {
11535
11535
  let { api, pluginId, req } = params;
11536
11536
  if (!api) {
11537
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11537
+ api = ENVIRONMENT.Api().GetBruceApi();
11538
11538
  }
11539
11539
  if (!pluginId) {
11540
11540
  throw ("Plugin ID is required.");
@@ -11567,7 +11567,7 @@ var Plugin;
11567
11567
  return __awaiter(this, void 0, void 0, function* () {
11568
11568
  let { api, req } = params;
11569
11569
  if (!api) {
11570
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11570
+ api = ENVIRONMENT.Api().GetBruceApi();
11571
11571
  }
11572
11572
  const cache = yield api.GetCacheItem(GetListCacheKey(), req);
11573
11573
  if (cache === null || cache === void 0 ? void 0 : cache.found) {
@@ -11596,7 +11596,7 @@ var Plugin;
11596
11596
  function GetLoadUrl(params) {
11597
11597
  let { api, pluginId, req, cacheKey } = params;
11598
11598
  if (!api) {
11599
- api = ENVIRONMENT.GetGetters().GetBruceApi();
11599
+ api = ENVIRONMENT.Api().GetBruceApi();
11600
11600
  }
11601
11601
  if (!cacheKey) {
11602
11602
  cacheKey = 0;