bruce-models 0.6.5 → 0.6.8

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 (96) hide show
  1. package/dist/bruce-models.es5.js +292 -57
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +276 -50
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account.js +244 -230
  6. package/dist/lib/account/account.js.map +1 -1
  7. package/dist/lib/ann-document/ann-document.js +116 -116
  8. package/dist/lib/api/abstract-api.js +267 -267
  9. package/dist/lib/api/api.js +85 -85
  10. package/dist/lib/api/bruce-api.js +202 -140
  11. package/dist/lib/api/bruce-api.js.map +1 -1
  12. package/dist/lib/api/cam-api.js +132 -132
  13. package/dist/lib/api/global-api.js +131 -131
  14. package/dist/lib/api/idm-api.js +132 -132
  15. package/dist/lib/bruce-models.js +83 -78
  16. package/dist/lib/bruce-models.js.map +1 -1
  17. package/dist/lib/calculator/calculator.js +158 -158
  18. package/dist/lib/client-file/client-file.js +185 -185
  19. package/dist/lib/common/bounds.js +2 -2
  20. package/dist/lib/common/bruce-event.js +48 -48
  21. package/dist/lib/common/bruce-variable.js +54 -54
  22. package/dist/lib/common/cache.js +86 -86
  23. package/dist/lib/common/camera.js +11 -11
  24. package/dist/lib/common/cartes.js +55 -55
  25. package/dist/lib/common/carto.js +60 -60
  26. package/dist/lib/common/color.js +86 -86
  27. package/dist/lib/common/delay-queue.js +60 -60
  28. package/dist/lib/common/dictionary.js +2 -2
  29. package/dist/lib/common/geometry.js +120 -120
  30. package/dist/lib/common/transform.js +2 -2
  31. package/dist/lib/common/utc.js +39 -39
  32. package/dist/lib/custom-form/custom-form.js +136 -136
  33. package/dist/lib/data-lab/data-lab.js +90 -90
  34. package/dist/lib/entity/entity-attachment-type.js +132 -132
  35. package/dist/lib/entity/entity-attachment.js +208 -208
  36. package/dist/lib/entity/entity-comment.js +132 -132
  37. package/dist/lib/entity/entity-link.js +132 -132
  38. package/dist/lib/entity/entity-lod.js +189 -189
  39. package/dist/lib/entity/entity-relation-type.js +150 -150
  40. package/dist/lib/entity/entity-relation.js +189 -189
  41. package/dist/lib/entity/entity-source.js +176 -176
  42. package/dist/lib/entity/entity-tag.js +229 -229
  43. package/dist/lib/entity/entity-type.js +163 -163
  44. package/dist/lib/entity/entity.js +349 -349
  45. package/dist/lib/entity/getters/batched-data-getter.js +91 -91
  46. package/dist/lib/entity/getters/entity-filter-getter.js +344 -344
  47. package/dist/lib/entity/getters/entity-globe.js +135 -135
  48. package/dist/lib/entity/getters/view-monitor.js +2 -2
  49. package/dist/lib/import/import-cad.js +83 -0
  50. package/dist/lib/import/import-cad.js.map +1 -0
  51. package/dist/lib/import/import-csv.js +52 -0
  52. package/dist/lib/import/import-csv.js.map +1 -0
  53. package/dist/lib/import/import-json.js +52 -0
  54. package/dist/lib/import/import-json.js.map +1 -0
  55. package/dist/lib/import/import-kml.js +52 -0
  56. package/dist/lib/import/import-kml.js.map +1 -0
  57. package/dist/lib/import/imported-file.js +121 -121
  58. package/dist/lib/import/imported-file.js.map +1 -1
  59. package/dist/lib/markup/markup.js +40 -40
  60. package/dist/lib/program-key/program-key.js +152 -152
  61. package/dist/lib/project/menu-item.js +115 -115
  62. package/dist/lib/project/project-view-bookmark.js +172 -172
  63. package/dist/lib/project/project-view-tile-source.js +115 -115
  64. package/dist/lib/project/project-view.js +166 -166
  65. package/dist/lib/project/zoom-control.js +17 -17
  66. package/dist/lib/server/pending-action.js +106 -106
  67. package/dist/lib/server/task.js +113 -113
  68. package/dist/lib/style/style.js +152 -152
  69. package/dist/lib/tileset/tileset-cad.js +2 -2
  70. package/dist/lib/tileset/tileset-entities-map-tiles.js +18 -18
  71. package/dist/lib/tileset/tileset-entities.js +2 -2
  72. package/dist/lib/tileset/tileset-ext-map-tiles.js +17 -17
  73. package/dist/lib/tileset/tileset-ext-terrain-tiles.js +2 -2
  74. package/dist/lib/tileset/tileset-map-tiles.js +2 -2
  75. package/dist/lib/tileset/tileset-pointcloud.js +2 -2
  76. package/dist/lib/tileset/tileset-terrain-tiles.js +2 -2
  77. package/dist/lib/tileset/tileset.js +397 -397
  78. package/dist/lib/ucs/ucs.js +135 -135
  79. package/dist/lib/user/permission.js +20 -20
  80. package/dist/lib/user/session.js +160 -160
  81. package/dist/lib/user/user-group.js +139 -139
  82. package/dist/lib/user/user.js +451 -451
  83. package/dist/lib/util/encrypt-utils.js +20 -20
  84. package/dist/lib/util/math-utils.js +41 -41
  85. package/dist/lib/util/object-utils.js +17 -17
  86. package/dist/lib/util/path-utils.js +61 -61
  87. package/dist/lib/util/url-utils.js +107 -107
  88. package/dist/types/account/account.d.ts +11 -2
  89. package/dist/types/api/bruce-api.d.ts +2 -0
  90. package/dist/types/bruce-models.d.ts +5 -0
  91. package/dist/types/import/import-cad.d.ts +39 -0
  92. package/dist/types/import/import-csv.d.ts +26 -0
  93. package/dist/types/import/import-json.d.ts +21 -0
  94. package/dist/types/import/import-kml.d.ts +14 -0
  95. package/dist/types/import/imported-file.d.ts +2 -1
  96. package/package.json +1 -1
@@ -631,24 +631,23 @@ var AbstractApi = /** @class */ (function () {
631
631
  return AbstractApi;
632
632
  }());
633
633
 
634
- var BruceApi;
635
- (function (BruceApi) {
636
- /**
637
- * This is the request handler for Bruce Api,
638
- * it should be passed to any method that wants to communicate with this particular api.
639
- */
634
+ /**
635
+ * This is the request handler for Cam Api,
636
+ * it should be passed to any method that wants to communicate with this particular api.
637
+ */
638
+ var CamApi;
639
+ (function (CamApi) {
640
640
  var Api$$1 = /** @class */ (function (_super) {
641
641
  __extends(Api$$1, _super);
642
- function Api$$1(accountId, env) {
643
- var _this = _super.call(this, "x-sessionid") || this;
642
+ function Api$$1(env) {
643
+ var _this = _super.call(this, "SSID") || this;
644
644
  _this.baseUrl = "";
645
- _this.accountId = accountId;
646
645
  _this.env = env !== null && env !== void 0 ? env : Api.EEnv.PROD;
647
646
  _this.setBaseUrl();
648
647
  return _this;
649
648
  }
650
649
  Api$$1.prototype.setBaseUrl = function () {
651
- var prefix = "https://" + this.accountId + ".api.nextspace";
650
+ var prefix = "https://cam.nextspace";
652
651
  var url;
653
652
  var env = this.env.toUpperCase();
654
653
  switch (env) {
@@ -699,13 +698,6 @@ var BruceApi;
699
698
  });
700
699
  });
701
700
  };
702
- Api$$1.prototype.PUT = function (url, data, params) {
703
- return __awaiter(this, void 0, void 0, function () {
704
- return __generator(this, function (_a) {
705
- return [2 /*return*/, this.put(this.baseUrl + url, data, params)];
706
- });
707
- });
708
- };
709
701
  Api$$1.prototype.UPLOAD = function (url, blob, params) {
710
702
  return __awaiter(this, void 0, void 0, function () {
711
703
  return __generator(this, function (_a) {
@@ -715,45 +707,81 @@ var BruceApi;
715
707
  };
716
708
  return Api$$1;
717
709
  }(AbstractApi));
718
- BruceApi.Api = Api$$1;
719
- })(BruceApi || (BruceApi = {}));
710
+ CamApi.Api = Api$$1;
711
+ })(CamApi || (CamApi = {}));
720
712
 
721
- /**
722
- * This is the request handler for Cam Api,
723
- * it should be passed to any method that wants to communicate with this particular api.
724
- */
725
- var CamApi;
726
- (function (CamApi) {
713
+ var BruceApi;
714
+ (function (BruceApi$$1) {
715
+ /**
716
+ * This is the request handler for Bruce Api,
717
+ * it should be passed to any method that wants to communicate with this particular api.
718
+ */
727
719
  var Api$$1 = /** @class */ (function (_super) {
728
720
  __extends(Api$$1, _super);
729
- function Api$$1(env) {
730
- var _this = _super.call(this, "SSID") || this;
721
+ function Api$$1(accountId, env) {
722
+ var _this = _super.call(this, "x-sessionid") || this;
731
723
  _this.baseUrl = "";
724
+ _this.accountId = accountId;
732
725
  _this.env = env !== null && env !== void 0 ? env : Api.EEnv.PROD;
733
- _this.setBaseUrl();
726
+ _this.loadProm = _this.setBaseUrl();
734
727
  return _this;
735
728
  }
729
+ Object.defineProperty(Api$$1.prototype, "Loading", {
730
+ get: function () {
731
+ return this.loadProm;
732
+ },
733
+ enumerable: false,
734
+ configurable: true
735
+ });
736
736
  Api$$1.prototype.setBaseUrl = function () {
737
- var prefix = "https://cam.nextspace";
738
- var url;
739
- var env = this.env.toUpperCase();
740
- switch (env) {
741
- case Api.EEnv.DEV:
742
- url = prefix + "-dev.net/";
743
- break;
744
- case Api.EEnv.STG:
745
- url = prefix + "-stg.net/";
746
- break;
747
- case Api.EEnv.UAT:
748
- url = prefix + "-uat.net/";
749
- break;
750
- case Api.EEnv.PROD:
751
- url = prefix + ".host/";
752
- break;
753
- default:
754
- throw ("Specified Environment is not valid. SuppliedEnv=" + env);
755
- }
756
- this.baseUrl = url;
737
+ var _a;
738
+ return __awaiter(this, void 0, void 0, function () {
739
+ var prefix, url, env, camApi, settings, endpoint, e_1;
740
+ return __generator(this, function (_b) {
741
+ switch (_b.label) {
742
+ case 0:
743
+ prefix = "https://" + this.accountId + ".api.nextspace";
744
+ env = this.env.toUpperCase();
745
+ switch (env) {
746
+ case Api.EEnv.DEV:
747
+ url = prefix + "-dev.net/";
748
+ break;
749
+ case Api.EEnv.STG:
750
+ url = prefix + "-stg.net/";
751
+ break;
752
+ case Api.EEnv.UAT:
753
+ url = prefix + "-uat.net/";
754
+ break;
755
+ case Api.EEnv.PROD:
756
+ url = prefix + ".host/";
757
+ break;
758
+ default:
759
+ throw ("Specified Environment is not valid. SuppliedEnv=" + env);
760
+ }
761
+ this.baseUrl = url;
762
+ _b.label = 1;
763
+ case 1:
764
+ _b.trys.push([1, 3, , 4]);
765
+ camApi = new CamApi.Api(env);
766
+ return [4 /*yield*/, Account.GetAppSettings(camApi, this.accountId, Account.EAppId.BruceApi)];
767
+ case 2:
768
+ settings = _b.sent();
769
+ endpoint = (_a = settings.BruceAPIURL) === null || _a === void 0 ? void 0 : _a[env];
770
+ if (typeof endpoint == "string") {
771
+ if (!endpoint.endsWith("/")) {
772
+ endpoint += "/";
773
+ }
774
+ this.baseUrl = endpoint;
775
+ }
776
+ return [3 /*break*/, 4];
777
+ case 3:
778
+ e_1 = _b.sent();
779
+ console.error(e_1);
780
+ return [3 /*break*/, 4];
781
+ case 4: return [2 /*return*/];
782
+ }
783
+ });
784
+ });
757
785
  };
758
786
  Api$$1.prototype.GetBaseUrl = function () {
759
787
  return this.baseUrl;
@@ -766,36 +794,68 @@ var CamApi;
766
794
  };
767
795
  Api$$1.prototype.GET = function (url, params) {
768
796
  return __awaiter(this, void 0, void 0, function () {
797
+ var _this = this;
769
798
  return __generator(this, function (_a) {
770
- return [2 /*return*/, this.get(this.baseUrl + url, params)];
799
+ return [2 /*return*/, new Promise(function (res, rej) {
800
+ _this.loadProm.then(function () {
801
+ _this.get(_this.baseUrl + url, params).then(res).catch(rej);
802
+ }).catch(rej);
803
+ })];
771
804
  });
772
805
  });
773
806
  };
774
807
  Api$$1.prototype.DELETE = function (url, params) {
775
808
  return __awaiter(this, void 0, void 0, function () {
809
+ var _this = this;
776
810
  return __generator(this, function (_a) {
777
- return [2 /*return*/, this.delete(this.baseUrl + url, params)];
811
+ return [2 /*return*/, new Promise(function (res, rej) {
812
+ _this.loadProm.then(function () {
813
+ _this.delete(_this.baseUrl + url, params).then(res).catch(rej);
814
+ }).catch(rej);
815
+ })];
778
816
  });
779
817
  });
780
818
  };
781
819
  Api$$1.prototype.POST = function (url, data, params) {
782
820
  return __awaiter(this, void 0, void 0, function () {
821
+ var _this = this;
783
822
  return __generator(this, function (_a) {
784
- return [2 /*return*/, this.post(this.baseUrl + url, data, params)];
823
+ return [2 /*return*/, new Promise(function (res, rej) {
824
+ _this.loadProm.then(function () {
825
+ _this.post(_this.baseUrl + url, data, params).then(res).catch(rej);
826
+ }).catch(rej);
827
+ })];
828
+ });
829
+ });
830
+ };
831
+ Api$$1.prototype.PUT = function (url, data, params) {
832
+ return __awaiter(this, void 0, void 0, function () {
833
+ var _this = this;
834
+ return __generator(this, function (_a) {
835
+ return [2 /*return*/, new Promise(function (res, rej) {
836
+ _this.loadProm.then(function () {
837
+ _this.put(_this.baseUrl + url, data, params).then(res).catch(rej);
838
+ }).catch(rej);
839
+ })];
785
840
  });
786
841
  });
787
842
  };
788
843
  Api$$1.prototype.UPLOAD = function (url, blob, params) {
789
844
  return __awaiter(this, void 0, void 0, function () {
845
+ var _this = this;
790
846
  return __generator(this, function (_a) {
791
- return [2 /*return*/, this.upload(this.baseUrl + url, blob, params)];
847
+ return [2 /*return*/, new Promise(function (res, rej) {
848
+ _this.loadProm.then(function () {
849
+ _this.upload(_this.baseUrl + url, blob, params).then(res).catch(rej);
850
+ }).catch(rej);
851
+ })];
792
852
  });
793
853
  });
794
854
  };
795
855
  return Api$$1;
796
856
  }(AbstractApi));
797
- CamApi.Api = Api$$1;
798
- })(CamApi || (CamApi = {}));
857
+ BruceApi$$1.Api = Api$$1;
858
+ })(BruceApi || (BruceApi = {}));
799
859
 
800
860
  var IdmApi;
801
861
  (function (IdmApi) {
@@ -5855,6 +5915,15 @@ var Account;
5855
5915
  EDbRegion["Singapore"] = "SE";
5856
5916
  EDbRegion["Australia"] = "AU";
5857
5917
  })(EDbRegion = Account.EDbRegion || (Account.EDbRegion = {}));
5918
+ var EAppId;
5919
+ (function (EAppId) {
5920
+ EAppId["BruceApi"] = "BruceAPI";
5921
+ })(EAppId = Account.EAppId || (Account.EAppId = {}));
5922
+ var EStarterContent;
5923
+ (function (EStarterContent) {
5924
+ EStarterContent["Default"] = "default";
5925
+ EStarterContent["None"] = "none";
5926
+ })(EStarterContent = Account.EStarterContent || (Account.EStarterContent = {}));
5858
5927
  Account.DbRegions = [
5859
5928
  {
5860
5929
  name: "North California, USA",
@@ -5999,18 +6068,23 @@ var Account;
5999
6068
  * @param id
6000
6069
  * @param name
6001
6070
  * @param region
6071
+ * @param starterContent
6002
6072
  * @returns
6003
6073
  */
6004
- function Create(api, id, name, region) {
6074
+ function Create(api, id, name, region, starterContent) {
6005
6075
  return __awaiter(this, void 0, void 0, function () {
6006
6076
  var reqData, res;
6007
6077
  return __generator(this, function (_a) {
6008
6078
  if (!id || !name || !region) {
6009
6079
  throw new Error("Id, Name and Region are required.");
6010
6080
  }
6081
+ if (!starterContent) {
6082
+ starterContent = EStarterContent.None;
6083
+ }
6011
6084
  reqData = {
6012
6085
  "Name": name,
6013
- "DBLocation": region
6086
+ "DBLocation": region,
6087
+ "StarterContent": starterContent
6014
6088
  };
6015
6089
  res = api.POST("clientAccount/" + id, reqData, Api.PrepReqParams());
6016
6090
  api.Cache.Remove(GetListCacheKey(api.GetSessionId()));
@@ -6234,5 +6308,166 @@ var DataLab;
6234
6308
  })(Entity = DataLab.Entity || (DataLab.Entity = {}));
6235
6309
  })(DataLab || (DataLab = {}));
6236
6310
 
6237
- export { AnnDocument, CustomForm, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, Calculator, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewTileSource, PendingAction, Style, TilesetEntitiesMapTiles, TilesetExtMapTiles, Tileset, Ucs, Permission, Session, UserGroup, User, Account, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab };
6311
+ /**
6312
+ * TODO: The analysis result is currently a mix of multiple layers of legacy.
6313
+ * We will first decide what we want it to do and then describe just the needed portions of the existing implementation.
6314
+ */
6315
+ var ImportCad;
6316
+ (function (ImportCad) {
6317
+ function Analyze(api, params) {
6318
+ return __awaiter(this, void 0, void 0, function () {
6319
+ return __generator(this, function (_a) {
6320
+ return [2 /*return*/, api.POST("entities/PrepareIFCForImport", params, Api.PrepReqParams())];
6321
+ });
6322
+ });
6323
+ }
6324
+ ImportCad.Analyze = Analyze;
6325
+ function ImportEntities(api, params) {
6326
+ return __awaiter(this, void 0, void 0, function () {
6327
+ return __generator(this, function (_a) {
6328
+ return [2 /*return*/, api.POST("entities/importIFCWithProgress", params, Api.PrepReqParams())];
6329
+ });
6330
+ });
6331
+ }
6332
+ ImportCad.ImportEntities = ImportEntities;
6333
+ /**
6334
+ * Parses the completed pending action result from running "ImportEntities".
6335
+ * This will return the root entity's id if any is present.
6336
+ * @param paResult
6337
+ */
6338
+ function ParseRootId(paResult) {
6339
+ var _a;
6340
+ try {
6341
+ var obj = typeof paResult == "string" ? JSON.parse(paResult) : paResult;
6342
+ if ((_a = obj === null || obj === void 0 ? void 0 : obj.result) === null || _a === void 0 ? void 0 : _a.length) {
6343
+ return obj.result[0];
6344
+ }
6345
+ }
6346
+ catch (_b) {
6347
+ // Failed to parse json.
6348
+ }
6349
+ return null;
6350
+ }
6351
+ ImportCad.ParseRootId = ParseRootId;
6352
+ })(ImportCad || (ImportCad = {}));
6353
+
6354
+ var ImportCsv;
6355
+ (function (ImportCsv) {
6356
+ function ImportEntities(api, params) {
6357
+ return __awaiter(this, void 0, void 0, function () {
6358
+ return __generator(this, function (_a) {
6359
+ return [2 /*return*/, api.POST("entities/importCSVWithProgress2", params, Api.PrepReqParams())];
6360
+ });
6361
+ });
6362
+ }
6363
+ ImportCsv.ImportEntities = ImportEntities;
6364
+ })(ImportCsv || (ImportCsv = {}));
6365
+
6366
+ var ImportJson;
6367
+ (function (ImportJson) {
6368
+ function ImportEntities(api, params) {
6369
+ return __awaiter(this, void 0, void 0, function () {
6370
+ return __generator(this, function (_a) {
6371
+ return [2 /*return*/, api.POST("entities/importJsonWithProgress", params, Api.PrepReqParams())];
6372
+ });
6373
+ });
6374
+ }
6375
+ ImportJson.ImportEntities = ImportEntities;
6376
+ })(ImportJson || (ImportJson = {}));
6377
+
6378
+ var ImportKml;
6379
+ (function (ImportKml) {
6380
+ function ImportEntities(api, params) {
6381
+ return __awaiter(this, void 0, void 0, function () {
6382
+ return __generator(this, function (_a) {
6383
+ return [2 /*return*/, api.POST("entities/importKMLWithProgress2", params, Api.PrepReqParams())];
6384
+ });
6385
+ });
6386
+ }
6387
+ ImportKml.ImportEntities = ImportEntities;
6388
+ })(ImportKml || (ImportKml = {}));
6389
+
6390
+ var ImportedFile;
6391
+ (function (ImportedFile) {
6392
+ function GetCacheKey(fileId) {
6393
+ return Api.ECacheKey.ImportedFile + Api.ECacheKey.Id + fileId;
6394
+ }
6395
+ ImportedFile.GetCacheKey = GetCacheKey;
6396
+ function GetListCacheKey(type, pageIndex) {
6397
+ return Api.ECacheKey.ImportedFile + type + pageIndex;
6398
+ }
6399
+ ImportedFile.GetListCacheKey = GetListCacheKey;
6400
+ var EFileType;
6401
+ (function (EFileType) {
6402
+ EFileType["CAD"] = "CAD";
6403
+ EFileType["All"] = "All";
6404
+ })(EFileType = ImportedFile.EFileType || (ImportedFile.EFileType = {}));
6405
+ function GetList(api, type, pageIndex) {
6406
+ return __awaiter(this, void 0, void 0, function () {
6407
+ var cacheData, first, url, req, prom;
6408
+ var _this = this;
6409
+ return __generator(this, function (_a) {
6410
+ if (!type) {
6411
+ type = EFileType.All;
6412
+ }
6413
+ if (!pageIndex) {
6414
+ pageIndex = 0;
6415
+ }
6416
+ cacheData = api.Cache.Get(GetListCacheKey(type, pageIndex));
6417
+ if (cacheData) {
6418
+ return [2 /*return*/, cacheData];
6419
+ }
6420
+ first = true;
6421
+ url = "entityImportFiles";
6422
+ if (type != EFileType.All) {
6423
+ url += "?FileType=" + type;
6424
+ first = false;
6425
+ }
6426
+ if (pageIndex > 0) {
6427
+ url += (first ? "?" : "&") + "pageIndex=" + pageIndex;
6428
+ }
6429
+ req = api.GET(url);
6430
+ prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
6431
+ var data, e_1;
6432
+ return __generator(this, function (_a) {
6433
+ switch (_a.label) {
6434
+ case 0:
6435
+ _a.trys.push([0, 2, , 3]);
6436
+ return [4 /*yield*/, req];
6437
+ case 1:
6438
+ data = _a.sent();
6439
+ res(data.Items);
6440
+ return [3 /*break*/, 3];
6441
+ case 2:
6442
+ e_1 = _a.sent();
6443
+ rej(e_1);
6444
+ return [3 /*break*/, 3];
6445
+ case 3: return [2 /*return*/];
6446
+ }
6447
+ });
6448
+ }); });
6449
+ api.Cache.Set(GetListCacheKey(type, pageIndex), prom, Api.DEFAULT_CACHE_DURATION);
6450
+ return [2 /*return*/, prom];
6451
+ });
6452
+ });
6453
+ }
6454
+ ImportedFile.GetList = GetList;
6455
+ function Get(api, fileId) {
6456
+ return __awaiter(this, void 0, void 0, function () {
6457
+ var cacheData, req;
6458
+ return __generator(this, function (_a) {
6459
+ cacheData = api.Cache.Get(GetCacheKey(fileId));
6460
+ if (cacheData) {
6461
+ return [2 /*return*/, cacheData];
6462
+ }
6463
+ req = api.GET("entityImportFile/" + fileId);
6464
+ api.Cache.Set(GetCacheKey(fileId), req, Api.DEFAULT_CACHE_DURATION);
6465
+ return [2 /*return*/, req];
6466
+ });
6467
+ });
6468
+ }
6469
+ ImportedFile.Get = Get;
6470
+ })(ImportedFile || (ImportedFile = {}));
6471
+
6472
+ export { AnnDocument, CustomForm, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, Calculator, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewTileSource, PendingAction, Style, TilesetEntitiesMapTiles, TilesetExtMapTiles, Tileset, Ucs, Permission, Session, UserGroup, User, Account, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile };
6238
6473
  //# sourceMappingURL=bruce-models.es5.js.map