bruce-models 0.6.8 → 0.7.1

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 (85) hide show
  1. package/dist/bruce-models.es5.js +221 -212
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +214 -205
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account.js +244 -244
  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 -202
  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 -83
  16. package/dist/lib/calculator/calculator.js +158 -158
  17. package/dist/lib/client-file/client-file.js +188 -185
  18. package/dist/lib/client-file/client-file.js.map +1 -1
  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 +82 -82
  50. package/dist/lib/import/import-csv.js +51 -51
  51. package/dist/lib/import/import-json.js +51 -51
  52. package/dist/lib/import/import-kml.js +51 -51
  53. package/dist/lib/import/imported-file.js +121 -121
  54. package/dist/lib/markup/markup.js +40 -40
  55. package/dist/lib/program-key/program-key.js +152 -152
  56. package/dist/lib/project/menu-item.js +115 -115
  57. package/dist/lib/project/project-view-bookmark.js +172 -172
  58. package/dist/lib/project/project-view-tile-source.js +115 -115
  59. package/dist/lib/project/project-view.js +166 -166
  60. package/dist/lib/project/zoom-control.js +17 -17
  61. package/dist/lib/server/pending-action.js +106 -106
  62. package/dist/lib/server/task.js +113 -113
  63. package/dist/lib/style/style.js +152 -152
  64. package/dist/lib/tileset/tileset-cad.js +2 -2
  65. package/dist/lib/tileset/tileset-entities-map-tiles.js +18 -18
  66. package/dist/lib/tileset/tileset-entities.js +2 -2
  67. package/dist/lib/tileset/tileset-ext-map-tiles.js +17 -17
  68. package/dist/lib/tileset/tileset-ext-terrain-tiles.js +2 -2
  69. package/dist/lib/tileset/tileset-map-tiles.js +2 -2
  70. package/dist/lib/tileset/tileset-pointcloud.js +2 -2
  71. package/dist/lib/tileset/tileset-terrain-tiles.js +2 -2
  72. package/dist/lib/tileset/tileset.js +403 -397
  73. package/dist/lib/tileset/tileset.js.map +1 -1
  74. package/dist/lib/ucs/ucs.js +135 -135
  75. package/dist/lib/user/permission.js +20 -20
  76. package/dist/lib/user/session.js +160 -160
  77. package/dist/lib/user/user-group.js +139 -139
  78. package/dist/lib/user/user.js +451 -451
  79. package/dist/lib/util/encrypt-utils.js +20 -20
  80. package/dist/lib/util/math-utils.js +41 -41
  81. package/dist/lib/util/object-utils.js +17 -17
  82. package/dist/lib/util/path-utils.js +61 -61
  83. package/dist/lib/util/url-utils.js +107 -107
  84. package/dist/types/account/account.d.ts +1 -0
  85. package/package.json +1 -1
@@ -626,6 +626,206 @@
626
626
  return AbstractApi;
627
627
  }());
628
628
 
629
+ var ACCOUNT_EXCLUSIONS = ["hyperportal", "hypeportal", "bviewer"];
630
+ (function (Account) {
631
+ function GetCacheKey(accountId, appSettingsId) {
632
+ if (appSettingsId) {
633
+ return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId + exports.Api.ECacheKey + appSettingsId;
634
+ }
635
+ return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId;
636
+ }
637
+ Account.GetCacheKey = GetCacheKey;
638
+ function GetListCacheKey(ssid) {
639
+ return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Session + exports.Api.ECacheKey.Id + ssid;
640
+ }
641
+ Account.GetListCacheKey = GetListCacheKey;
642
+ var EDbRegion;
643
+ (function (EDbRegion) {
644
+ EDbRegion["USA"] = "US";
645
+ EDbRegion["Paris"] = "EU";
646
+ EDbRegion["Singapore"] = "SE";
647
+ EDbRegion["Australia"] = "AU";
648
+ })(EDbRegion = Account.EDbRegion || (Account.EDbRegion = {}));
649
+ var EAppId;
650
+ (function (EAppId) {
651
+ EAppId["BruceApi"] = "BruceAPI";
652
+ })(EAppId = Account.EAppId || (Account.EAppId = {}));
653
+ var EStarterContent;
654
+ (function (EStarterContent) {
655
+ EStarterContent["Default"] = "default";
656
+ EStarterContent["None"] = "none";
657
+ })(EStarterContent = Account.EStarterContent || (Account.EStarterContent = {}));
658
+ Account.DbRegions = [
659
+ {
660
+ name: "North California, USA",
661
+ value: EDbRegion.USA
662
+ },
663
+ {
664
+ name: "Paris, France",
665
+ value: EDbRegion.Paris
666
+ },
667
+ {
668
+ name: "Singapore",
669
+ value: EDbRegion.Singapore
670
+ },
671
+ {
672
+ name: "Sydney, Australia",
673
+ value: EDbRegion.Australia
674
+ }
675
+ ];
676
+ function Get(api, id) {
677
+ return __awaiter(this, void 0, void 0, function () {
678
+ var cacheData, req;
679
+ return __generator(this, function (_a) {
680
+ switch (_a.label) {
681
+ case 0:
682
+ cacheData = api.Cache.Get(GetCacheKey(id));
683
+ if (cacheData) {
684
+ return [2 /*return*/, cacheData];
685
+ }
686
+ return [4 /*yield*/, api.GET("account/" + id)];
687
+ case 1:
688
+ req = _a.sent();
689
+ api.Cache.Set(GetCacheKey(id), req, exports.Api.DEFAULT_CACHE_DURATION);
690
+ return [2 /*return*/, req];
691
+ }
692
+ });
693
+ });
694
+ }
695
+ Account.Get = Get;
696
+ function GetRelatedList(api) {
697
+ return __awaiter(this, void 0, void 0, function () {
698
+ var cacheData, req, prom;
699
+ var _this = this;
700
+ return __generator(this, function (_a) {
701
+ cacheData = api.Cache.Get(GetListCacheKey(api.GetSessionId()));
702
+ if (cacheData) {
703
+ return [2 /*return*/, cacheData];
704
+ }
705
+ req = api.GET("user/relatedClientAccounts");
706
+ prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
707
+ var data, items, e_1;
708
+ return __generator(this, function (_a) {
709
+ switch (_a.label) {
710
+ case 0:
711
+ _a.trys.push([0, 2, , 3]);
712
+ return [4 /*yield*/, req];
713
+ case 1:
714
+ data = _a.sent();
715
+ items = data.Items.filter(function (x) { return !ACCOUNT_EXCLUSIONS.includes(x.ID); });
716
+ res(items);
717
+ return [3 /*break*/, 3];
718
+ case 2:
719
+ e_1 = _a.sent();
720
+ rej(e_1);
721
+ return [3 /*break*/, 3];
722
+ case 3: return [2 /*return*/];
723
+ }
724
+ });
725
+ }); });
726
+ api.Cache.Set(GetListCacheKey(api.GetSessionId()), prom, exports.Api.DEFAULT_CACHE_DURATION);
727
+ return [2 /*return*/, prom];
728
+ });
729
+ });
730
+ }
731
+ Account.GetRelatedList = GetRelatedList;
732
+ function GetAppSettings(api, id, appId) {
733
+ return __awaiter(this, void 0, void 0, function () {
734
+ var cacheData, req, prom;
735
+ var _this = this;
736
+ return __generator(this, function (_a) {
737
+ switch (_a.label) {
738
+ case 0:
739
+ cacheData = api.Cache.Get(GetCacheKey(id, appId));
740
+ if (cacheData) {
741
+ return [2 /*return*/, cacheData];
742
+ }
743
+ return [4 /*yield*/, api.GET("account/" + id + "?ApplicationID=" + appId)];
744
+ case 1:
745
+ req = _a.sent();
746
+ prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
747
+ var data, settings, e_2;
748
+ var _a;
749
+ return __generator(this, function (_b) {
750
+ switch (_b.label) {
751
+ case 0:
752
+ _b.trys.push([0, 2, , 3]);
753
+ return [4 /*yield*/, req];
754
+ case 1:
755
+ data = _b.sent();
756
+ settings = (_a = data === null || data === void 0 ? void 0 : data["Application.Settings"]) !== null && _a !== void 0 ? _a : {};
757
+ res(settings);
758
+ return [3 /*break*/, 3];
759
+ case 2:
760
+ e_2 = _b.sent();
761
+ rej(e_2);
762
+ return [3 /*break*/, 3];
763
+ case 3: return [2 /*return*/];
764
+ }
765
+ });
766
+ }); });
767
+ api.Cache.Set(GetCacheKey(id, appId), prom, exports.Api.DEFAULT_CACHE_DURATION);
768
+ return [2 /*return*/, prom];
769
+ }
770
+ });
771
+ });
772
+ }
773
+ Account.GetAppSettings = GetAppSettings;
774
+ /**
775
+ * WARNING: Do not update API settings without knowing what you're doing.
776
+ * @param api
777
+ * @param id
778
+ * @param appId
779
+ * @param data
780
+ * @returns
781
+ */
782
+ function UpdateAppSettings(api, id, appId, data) {
783
+ return __awaiter(this, void 0, void 0, function () {
784
+ return __generator(this, function (_a) {
785
+ switch (_a.label) {
786
+ case 0: return [4 /*yield*/, api.POST("account/" + id + "/applicationSettings/" + appId, data)];
787
+ case 1:
788
+ data = _a.sent();
789
+ api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + id);
790
+ return [2 /*return*/, data];
791
+ }
792
+ });
793
+ });
794
+ }
795
+ Account.UpdateAppSettings = UpdateAppSettings;
796
+ /**
797
+ * Creates a new Bruce account using given details.
798
+ * @param api
799
+ * @param id
800
+ * @param name
801
+ * @param region
802
+ * @param starterContent
803
+ * @returns
804
+ */
805
+ function Create(api, id, name, region, starterContent) {
806
+ return __awaiter(this, void 0, void 0, function () {
807
+ var reqData, res;
808
+ return __generator(this, function (_a) {
809
+ if (!id || !name || !region) {
810
+ throw new Error("Id, Name and Region are required.");
811
+ }
812
+ if (!starterContent) {
813
+ starterContent = EStarterContent.None;
814
+ }
815
+ reqData = {
816
+ "Name": name,
817
+ "DBLocation": region,
818
+ "StarterContent": starterContent
819
+ };
820
+ res = api.POST("clientAccount/" + id, reqData, exports.Api.PrepReqParams());
821
+ api.Cache.Remove(GetListCacheKey(api.GetSessionId()));
822
+ return [2 /*return*/, res];
823
+ });
824
+ });
825
+ }
826
+ Account.Create = Create;
827
+ })(exports.Account || (exports.Account = {}));
828
+
629
829
  (function (CamApi) {
630
830
  var Api$$1 = /** @class */ (function (_super) {
631
831
  __extends(Api$$1, _super);
@@ -3821,7 +4021,7 @@
3821
4021
  ClientFile.Delete = Delete;
3822
4022
  function Upload(api, file, purpose, onProgress) {
3823
4023
  return __awaiter(this, void 0, void 0, function () {
3824
- var formData;
4024
+ var formData, params;
3825
4025
  return __generator(this, function (_a) {
3826
4026
  if (!file) {
3827
4027
  throw ("File is required.");
@@ -3832,7 +4032,10 @@
3832
4032
  "Purpose": purpose
3833
4033
  };
3834
4034
  }
3835
- return [2 /*return*/, api.UPLOAD("file/uploadNew", file, { onProgress: onProgress, formData: formData })];
4035
+ params = exports.Api.PrepReqParams();
4036
+ params.onProgress = onProgress;
4037
+ params.formData = formData;
4038
+ return [2 /*return*/, api.UPLOAD("file/uploadNew", file, params)];
3836
4039
  });
3837
4040
  });
3838
4041
  }
@@ -3895,7 +4098,7 @@
3895
4098
  clientFileId: clientFileId,
3896
4099
  destinationFormat: ext,
3897
4100
  operations: []
3898
- }, exports.Api.PrepReqParams())];
4101
+ })];
3899
4102
  });
3900
4103
  });
3901
4104
  }
@@ -4153,11 +4356,14 @@
4153
4356
  Tileset.Update = Update;
4154
4357
  function UploadFile(api, tilesetId, file, onProgress) {
4155
4358
  return __awaiter(this, void 0, void 0, function () {
4359
+ var params;
4156
4360
  return __generator(this, function (_a) {
4157
4361
  if (!tilesetId || !file) {
4158
4362
  throw ("Tileset ID and file are required.");
4159
4363
  }
4160
- return [2 /*return*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/files", file, { onProgress: onProgress })];
4364
+ params = exports.Api.PrepReqParams();
4365
+ params.onProgress = onProgress;
4366
+ return [2 /*return*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/files", file, params)];
4161
4367
  });
4162
4368
  });
4163
4369
  }
@@ -4182,13 +4388,16 @@
4182
4388
  Tileset.DeleteFile = DeleteFile;
4183
4389
  function UploadSrcFile(api, tilesetId, file, onProgress) {
4184
4390
  return __awaiter(this, void 0, void 0, function () {
4391
+ var params;
4185
4392
  return __generator(this, function (_a) {
4186
4393
  switch (_a.label) {
4187
4394
  case 0:
4188
4395
  if (!tilesetId || !file) {
4189
4396
  throw ("Tileset ID and file are required.");
4190
4397
  }
4191
- return [4 /*yield*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/src", file, { onProgress: onProgress })];
4398
+ params = exports.Api.PrepReqParams();
4399
+ params.onProgress = onProgress;
4400
+ return [4 /*yield*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/src", file, params)];
4192
4401
  case 1:
4193
4402
  _a.sent();
4194
4403
  api.Cache.Remove(GetCacheKey(tilesetId, true));
@@ -5695,206 +5904,6 @@
5695
5904
  })(AccessToken = User.AccessToken || (User.AccessToken = {}));
5696
5905
  })(exports.User || (exports.User = {}));
5697
5906
 
5698
- var ACCOUNT_EXCLUSIONS = ["hyperportal", "hypeportal", "bviewer"];
5699
- (function (Account) {
5700
- function GetCacheKey(accountId, appSettingsId) {
5701
- if (appSettingsId) {
5702
- return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId + exports.Api.ECacheKey + appSettingsId;
5703
- }
5704
- return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId;
5705
- }
5706
- Account.GetCacheKey = GetCacheKey;
5707
- function GetListCacheKey(ssid) {
5708
- return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Session + exports.Api.ECacheKey.Id + ssid;
5709
- }
5710
- Account.GetListCacheKey = GetListCacheKey;
5711
- var EDbRegion;
5712
- (function (EDbRegion) {
5713
- EDbRegion["USA"] = "US";
5714
- EDbRegion["Paris"] = "EU";
5715
- EDbRegion["Singapore"] = "SE";
5716
- EDbRegion["Australia"] = "AU";
5717
- })(EDbRegion = Account.EDbRegion || (Account.EDbRegion = {}));
5718
- var EAppId;
5719
- (function (EAppId) {
5720
- EAppId["BruceApi"] = "BruceAPI";
5721
- })(EAppId = Account.EAppId || (Account.EAppId = {}));
5722
- var EStarterContent;
5723
- (function (EStarterContent) {
5724
- EStarterContent["Default"] = "default";
5725
- EStarterContent["None"] = "none";
5726
- })(EStarterContent = Account.EStarterContent || (Account.EStarterContent = {}));
5727
- Account.DbRegions = [
5728
- {
5729
- name: "North California, USA",
5730
- value: EDbRegion.USA
5731
- },
5732
- {
5733
- name: "Paris, France",
5734
- value: EDbRegion.Paris
5735
- },
5736
- {
5737
- name: "Singapore",
5738
- value: EDbRegion.Singapore
5739
- },
5740
- {
5741
- name: "Sydney, Australia",
5742
- value: EDbRegion.Australia
5743
- }
5744
- ];
5745
- function Get(api, id) {
5746
- return __awaiter(this, void 0, void 0, function () {
5747
- var cacheData, req;
5748
- return __generator(this, function (_a) {
5749
- switch (_a.label) {
5750
- case 0:
5751
- cacheData = api.Cache.Get(GetCacheKey(id));
5752
- if (cacheData) {
5753
- return [2 /*return*/, cacheData];
5754
- }
5755
- return [4 /*yield*/, api.GET("account/" + id)];
5756
- case 1:
5757
- req = _a.sent();
5758
- api.Cache.Set(GetCacheKey(id), req, exports.Api.DEFAULT_CACHE_DURATION);
5759
- return [2 /*return*/, req];
5760
- }
5761
- });
5762
- });
5763
- }
5764
- Account.Get = Get;
5765
- function GetRelatedList(api) {
5766
- return __awaiter(this, void 0, void 0, function () {
5767
- var cacheData, req, prom;
5768
- var _this = this;
5769
- return __generator(this, function (_a) {
5770
- cacheData = api.Cache.Get(GetListCacheKey(api.GetSessionId()));
5771
- if (cacheData) {
5772
- return [2 /*return*/, cacheData];
5773
- }
5774
- req = api.GET("user/relatedClientAccounts");
5775
- prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
5776
- var data, items, e_1;
5777
- return __generator(this, function (_a) {
5778
- switch (_a.label) {
5779
- case 0:
5780
- _a.trys.push([0, 2, , 3]);
5781
- return [4 /*yield*/, req];
5782
- case 1:
5783
- data = _a.sent();
5784
- items = data.Items.filter(function (x) { return !ACCOUNT_EXCLUSIONS.includes(x.ID); });
5785
- res(items);
5786
- return [3 /*break*/, 3];
5787
- case 2:
5788
- e_1 = _a.sent();
5789
- rej(e_1);
5790
- return [3 /*break*/, 3];
5791
- case 3: return [2 /*return*/];
5792
- }
5793
- });
5794
- }); });
5795
- api.Cache.Set(GetListCacheKey(api.GetSessionId()), prom, exports.Api.DEFAULT_CACHE_DURATION);
5796
- return [2 /*return*/, prom];
5797
- });
5798
- });
5799
- }
5800
- Account.GetRelatedList = GetRelatedList;
5801
- function GetAppSettings(api, id, appId) {
5802
- return __awaiter(this, void 0, void 0, function () {
5803
- var cacheData, req, prom;
5804
- var _this = this;
5805
- return __generator(this, function (_a) {
5806
- switch (_a.label) {
5807
- case 0:
5808
- cacheData = api.Cache.Get(GetCacheKey(id, appId));
5809
- if (cacheData) {
5810
- return [2 /*return*/, cacheData];
5811
- }
5812
- return [4 /*yield*/, api.GET("account/" + id + "?ApplicationID=" + appId)];
5813
- case 1:
5814
- req = _a.sent();
5815
- prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
5816
- var data, settings, e_2;
5817
- var _a;
5818
- return __generator(this, function (_b) {
5819
- switch (_b.label) {
5820
- case 0:
5821
- _b.trys.push([0, 2, , 3]);
5822
- return [4 /*yield*/, req];
5823
- case 1:
5824
- data = _b.sent();
5825
- settings = (_a = data === null || data === void 0 ? void 0 : data["Application.Settings"]) !== null && _a !== void 0 ? _a : {};
5826
- res(settings);
5827
- return [3 /*break*/, 3];
5828
- case 2:
5829
- e_2 = _b.sent();
5830
- rej(e_2);
5831
- return [3 /*break*/, 3];
5832
- case 3: return [2 /*return*/];
5833
- }
5834
- });
5835
- }); });
5836
- api.Cache.Set(GetCacheKey(id, appId), prom, exports.Api.DEFAULT_CACHE_DURATION);
5837
- return [2 /*return*/, prom];
5838
- }
5839
- });
5840
- });
5841
- }
5842
- Account.GetAppSettings = GetAppSettings;
5843
- /**
5844
- * WARNING: Do not update API settings without knowing what you're doing.
5845
- * @param api
5846
- * @param id
5847
- * @param appId
5848
- * @param data
5849
- * @returns
5850
- */
5851
- function UpdateAppSettings(api, id, appId, data) {
5852
- return __awaiter(this, void 0, void 0, function () {
5853
- return __generator(this, function (_a) {
5854
- switch (_a.label) {
5855
- case 0: return [4 /*yield*/, api.POST("account/" + id + "/applicationSettings/" + appId, data)];
5856
- case 1:
5857
- data = _a.sent();
5858
- api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + id);
5859
- return [2 /*return*/, data];
5860
- }
5861
- });
5862
- });
5863
- }
5864
- Account.UpdateAppSettings = UpdateAppSettings;
5865
- /**
5866
- * Creates a new Bruce account using given details.
5867
- * @param api
5868
- * @param id
5869
- * @param name
5870
- * @param region
5871
- * @param starterContent
5872
- * @returns
5873
- */
5874
- function Create(api, id, name, region, starterContent) {
5875
- return __awaiter(this, void 0, void 0, function () {
5876
- var reqData, res;
5877
- return __generator(this, function (_a) {
5878
- if (!id || !name || !region) {
5879
- throw new Error("Id, Name and Region are required.");
5880
- }
5881
- if (!starterContent) {
5882
- starterContent = EStarterContent.None;
5883
- }
5884
- reqData = {
5885
- "Name": name,
5886
- "DBLocation": region,
5887
- "StarterContent": starterContent
5888
- };
5889
- res = api.POST("clientAccount/" + id, reqData, exports.Api.PrepReqParams());
5890
- api.Cache.Remove(GetListCacheKey(api.GetSessionId()));
5891
- return [2 /*return*/, res];
5892
- });
5893
- });
5894
- }
5895
- Account.Create = Create;
5896
- })(exports.Account || (exports.Account = {}));
5897
-
5898
5907
  (function (EncryptUtils) {
5899
5908
  // https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript
5900
5909
  function Cyrb53Hash(str, seed) {