bruce-models 0.8.4 → 0.8.6

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 (128) hide show
  1. package/dist/bruce-models.es5.js +776 -435
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +768 -432
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account.js +15 -13
  6. package/dist/lib/account/account.js.map +1 -1
  7. package/dist/lib/ann-document/ann-document.js +6 -6
  8. package/dist/lib/ann-document/ann-document.js.map +1 -1
  9. package/dist/lib/api/api.js +19 -2
  10. package/dist/lib/api/api.js.map +1 -1
  11. package/dist/lib/api/bruce-api.js +10 -6
  12. package/dist/lib/api/bruce-api.js.map +1 -1
  13. package/dist/lib/bruce-models.js +2 -0
  14. package/dist/lib/bruce-models.js.map +1 -1
  15. package/dist/lib/calculator/calculator.js +53 -0
  16. package/dist/lib/calculator/calculator.js.map +1 -1
  17. package/dist/lib/client-file/client-file.js +11 -12
  18. package/dist/lib/client-file/client-file.js.map +1 -1
  19. package/dist/lib/common/cache.js +83 -0
  20. package/dist/lib/common/cache.js.map +1 -1
  21. package/dist/lib/custom-form/custom-form-content.js +27 -0
  22. package/dist/lib/custom-form/custom-form-content.js.map +1 -0
  23. package/dist/lib/custom-form/custom-form.js +10 -10
  24. package/dist/lib/custom-form/custom-form.js.map +1 -1
  25. package/dist/lib/data-lab/data-lab.js +2 -2
  26. package/dist/lib/data-lab/data-lab.js.map +1 -1
  27. package/dist/lib/entity/entity-attachment-type.js +7 -7
  28. package/dist/lib/entity/entity-attachment-type.js.map +1 -1
  29. package/dist/lib/entity/entity-attachment.js +13 -13
  30. package/dist/lib/entity/entity-attachment.js.map +1 -1
  31. package/dist/lib/entity/entity-comment.js +7 -7
  32. package/dist/lib/entity/entity-comment.js.map +1 -1
  33. package/dist/lib/entity/entity-coords.js +11 -11
  34. package/dist/lib/entity/entity-coords.js.map +1 -1
  35. package/dist/lib/entity/entity-link.js +7 -7
  36. package/dist/lib/entity/entity-link.js.map +1 -1
  37. package/dist/lib/entity/entity-lod.js +11 -10
  38. package/dist/lib/entity/entity-lod.js.map +1 -1
  39. package/dist/lib/entity/entity-relation-type.js +10 -10
  40. package/dist/lib/entity/entity-relation-type.js.map +1 -1
  41. package/dist/lib/entity/entity-relation.js +10 -10
  42. package/dist/lib/entity/entity-relation.js.map +1 -1
  43. package/dist/lib/entity/entity-source.js +8 -8
  44. package/dist/lib/entity/entity-source.js.map +1 -1
  45. package/dist/lib/entity/entity-tag.js +12 -12
  46. package/dist/lib/entity/entity-tag.js.map +1 -1
  47. package/dist/lib/entity/entity-type.js +10 -10
  48. package/dist/lib/entity/entity-type.js.map +1 -1
  49. package/dist/lib/entity/entity.js +14 -14
  50. package/dist/lib/entity/entity.js.map +1 -1
  51. package/dist/lib/import/import-cad.js +4 -4
  52. package/dist/lib/import/import-cad.js.map +1 -1
  53. package/dist/lib/import/import-csv.js +2 -2
  54. package/dist/lib/import/import-csv.js.map +1 -1
  55. package/dist/lib/import/import-json.js +2 -2
  56. package/dist/lib/import/import-json.js.map +1 -1
  57. package/dist/lib/import/import-kml.js +2 -2
  58. package/dist/lib/import/import-kml.js.map +1 -1
  59. package/dist/lib/import/imported-file.js +6 -6
  60. package/dist/lib/import/imported-file.js.map +1 -1
  61. package/dist/lib/markup/markup.js +111 -1
  62. package/dist/lib/markup/markup.js.map +1 -1
  63. package/dist/lib/program-key/program-key.js +10 -10
  64. package/dist/lib/program-key/program-key.js.map +1 -1
  65. package/dist/lib/project/project-view-bookmark.js +12 -12
  66. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  67. package/dist/lib/project/project-view-legacy-tile.js +6 -6
  68. package/dist/lib/project/project-view-legacy-tile.js.map +1 -1
  69. package/dist/lib/project/project-view.js +11 -11
  70. package/dist/lib/project/project-view.js.map +1 -1
  71. package/dist/lib/server/message-broker.js +56 -34
  72. package/dist/lib/server/message-broker.js.map +1 -1
  73. package/dist/lib/server/pending-action.js +6 -6
  74. package/dist/lib/server/pending-action.js.map +1 -1
  75. package/dist/lib/server/task.js +4 -4
  76. package/dist/lib/server/task.js.map +1 -1
  77. package/dist/lib/style/style.js +10 -10
  78. package/dist/lib/style/style.js.map +1 -1
  79. package/dist/lib/tileset/tileset.js +30 -32
  80. package/dist/lib/tileset/tileset.js.map +1 -1
  81. package/dist/lib/user/session.js +7 -7
  82. package/dist/lib/user/session.js.map +1 -1
  83. package/dist/lib/user/user-group.js +12 -12
  84. package/dist/lib/user/user-group.js.map +1 -1
  85. package/dist/lib/user/user.js +30 -30
  86. package/dist/lib/user/user.js.map +1 -1
  87. package/dist/types/account/account.d.ts +8 -5
  88. package/dist/types/ann-document/ann-document.d.ts +18 -3
  89. package/dist/types/api/api.d.ts +3 -1
  90. package/dist/types/api/bruce-api.d.ts +1 -1
  91. package/dist/types/bruce-models.d.ts +2 -0
  92. package/dist/types/calculator/calculator.d.ts +8 -0
  93. package/dist/types/client-file/client-file.d.ts +6 -5
  94. package/dist/types/common/cache.d.ts +9 -0
  95. package/dist/types/custom-form/custom-form-content.d.ts +67 -0
  96. package/dist/types/custom-form/custom-form.d.ts +7 -5
  97. package/dist/types/data-lab/data-lab.d.ts +2 -1
  98. package/dist/types/entity/entity-attachment-type.d.ts +4 -3
  99. package/dist/types/entity/entity-attachment.d.ts +7 -6
  100. package/dist/types/entity/entity-comment.d.ts +4 -3
  101. package/dist/types/entity/entity-coords.d.ts +6 -5
  102. package/dist/types/entity/entity-link.d.ts +4 -3
  103. package/dist/types/entity/entity-lod.d.ts +6 -4
  104. package/dist/types/entity/entity-relation-type.d.ts +5 -4
  105. package/dist/types/entity/entity-relation.d.ts +5 -4
  106. package/dist/types/entity/entity-source.d.ts +4 -3
  107. package/dist/types/entity/entity-tag.d.ts +6 -5
  108. package/dist/types/entity/entity-type.d.ts +5 -4
  109. package/dist/types/entity/entity.d.ts +6 -6
  110. package/dist/types/import/import-cad.d.ts +3 -2
  111. package/dist/types/import/import-csv.d.ts +2 -1
  112. package/dist/types/import/import-json.d.ts +2 -1
  113. package/dist/types/import/import-kml.d.ts +2 -1
  114. package/dist/types/import/imported-file.d.ts +3 -2
  115. package/dist/types/markup/markup.d.ts +95 -31
  116. package/dist/types/program-key/program-key.d.ts +5 -4
  117. package/dist/types/project/project-view-bookmark.d.ts +6 -5
  118. package/dist/types/project/project-view-legacy-tile.d.ts +3 -2
  119. package/dist/types/project/project-view.d.ts +5 -4
  120. package/dist/types/server/message-broker.d.ts +54 -35
  121. package/dist/types/server/pending-action.d.ts +3 -3
  122. package/dist/types/server/task.d.ts +3 -3
  123. package/dist/types/style/style.d.ts +5 -4
  124. package/dist/types/tileset/tileset.d.ts +13 -12
  125. package/dist/types/user/session.d.ts +4 -3
  126. package/dist/types/user/user-group.d.ts +7 -7
  127. package/dist/types/user/user.d.ts +14 -13
  128. package/package.json +1 -1
@@ -81,9 +81,6 @@
81
81
  }
82
82
  }
83
83
 
84
- /**
85
- * Contains generic descriptions used for Bruce requests.
86
- */
87
84
  (function (Api) {
88
85
  var ECacheKey;
89
86
  (function (ECacheKey) {
@@ -155,10 +152,16 @@
155
152
  /**
156
153
  * Prepares default settings for a request to Bruce Api.
157
154
  * Our requests WRONGLY have utf-16 for 95% of them. Please be wary of that.
155
+ * @param base
158
156
  * @returns
159
157
  */
160
- function PrepReqParams() {
161
- return { response: { encoding: Api.EEncoding.UTF16 } };
158
+ function PrepReqParams(base) {
159
+ base = __assign({}, base);
160
+ base.response = __assign({}, base.response);
161
+ if (!base.response.encoding) {
162
+ base.response.encoding = Api.EEncoding.UTF16;
163
+ }
164
+ return base;
162
165
  }
163
166
  Api.PrepReqParams = PrepReqParams;
164
167
  })(exports.Api || (exports.Api = {}));
@@ -176,7 +179,7 @@
176
179
  (function (EType) {
177
180
  EType["SVG"] = "SVG";
178
181
  })(EType = AnnDocument.EType || (AnnDocument.EType = {}));
179
- function Get(api, docId) {
182
+ function Get(api, docId, reqParams) {
180
183
  return __awaiter(this, void 0, void 0, function () {
181
184
  var key, cacheData, req;
182
185
  return __generator(this, function (_a) {
@@ -184,18 +187,18 @@
184
187
  throw ("Doc ID is required.");
185
188
  }
186
189
  key = GetCacheKey(docId);
187
- cacheData = api.Cache.Get(key);
190
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
188
191
  if (cacheData) {
189
192
  return [2 /*return*/, cacheData];
190
193
  }
191
- req = api.GET("documentView/" + docId, exports.Api.PrepReqParams());
194
+ req = api.GET("documentView/" + docId, exports.Api.PrepReqParams(reqParams));
192
195
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
193
196
  return [2 /*return*/, req];
194
197
  });
195
198
  });
196
199
  }
197
200
  AnnDocument.Get = Get;
198
- function GetList(api, type) {
201
+ function GetList(api, type, reqParams) {
199
202
  return __awaiter(this, void 0, void 0, function () {
200
203
  var cacheData, req;
201
204
  var _this = this;
@@ -203,7 +206,7 @@
203
206
  if (!type) {
204
207
  type = "";
205
208
  }
206
- cacheData = api.Cache.Get(GetListCacheKey(type));
209
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(type));
207
210
  if (cacheData) {
208
211
  return [2 /*return*/, cacheData];
209
212
  }
@@ -214,7 +217,7 @@
214
217
  case 0:
215
218
  _a.trys.push([0, 2, , 3]);
216
219
  url = "documentViews" + (type ? "?type=" + type : "");
217
- return [4 /*yield*/, api.GET(url, exports.Api.PrepReqParams())];
220
+ return [4 /*yield*/, api.GET(url, exports.Api.PrepReqParams(reqParams))];
218
221
  case 1:
219
222
  data = _a.sent();
220
223
  res(data.Items);
@@ -252,25 +255,25 @@
252
255
  EType["Form"] = "GENERIC";
253
256
  EType["Markup"] = "MARKUP";
254
257
  })(EType = CustomForm.EType || (CustomForm.EType = {}));
255
- function Get(api, id) {
258
+ function Get(api, id, reqParams) {
256
259
  return __awaiter(this, void 0, void 0, function () {
257
260
  var cacheData, req;
258
261
  return __generator(this, function (_a) {
259
262
  if (!id) {
260
263
  throw ("Id is required.");
261
264
  }
262
- cacheData = api.Cache.Get(GetCacheKey(id));
265
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
263
266
  if (cacheData) {
264
267
  return [2 /*return*/, cacheData];
265
268
  }
266
- req = api.GET("customForm/" + id, exports.Api.PrepReqParams());
269
+ req = api.GET("customForm/" + id, exports.Api.PrepReqParams(reqParams));
267
270
  api.Cache.Set(GetCacheKey(id), req, exports.Api.DEFAULT_CACHE_DURATION);
268
271
  return [2 /*return*/, req];
269
272
  });
270
273
  });
271
274
  }
272
275
  CustomForm.Get = Get;
273
- function Delete(api, id) {
276
+ function Delete(api, id, reqParams) {
274
277
  return __awaiter(this, void 0, void 0, function () {
275
278
  return __generator(this, function (_a) {
276
279
  switch (_a.label) {
@@ -278,7 +281,7 @@
278
281
  if (!id) {
279
282
  throw ("Id is required.");
280
283
  }
281
- return [4 /*yield*/, api.DELETE("customForm/" + id, exports.Api.PrepReqParams())];
284
+ return [4 /*yield*/, api.DELETE("customForm/" + id, exports.Api.PrepReqParams(reqParams))];
282
285
  case 1:
283
286
  _a.sent();
284
287
  api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.CustomForm);
@@ -288,16 +291,16 @@
288
291
  });
289
292
  }
290
293
  CustomForm.Delete = Delete;
291
- function GetList(api, typeId) {
294
+ function GetList(api, typeId, reqParams) {
292
295
  return __awaiter(this, void 0, void 0, function () {
293
296
  var url, cacheData, req, prom;
294
297
  return __generator(this, function (_a) {
295
298
  url = typeId ? "entityType/" + typeId + "/customForms" : "customForms";
296
- cacheData = api.Cache.Get(GetListCacheKey(typeId));
299
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(typeId));
297
300
  if (cacheData) {
298
301
  return [2 /*return*/, cacheData];
299
302
  }
300
- req = api.GET(url, exports.Api.PrepReqParams());
303
+ req = api.GET(url, exports.Api.PrepReqParams(reqParams));
301
304
  prom = req.then(function (data) {
302
305
  return data.Items;
303
306
  });
@@ -307,7 +310,7 @@
307
310
  });
308
311
  }
309
312
  CustomForm.GetList = GetList;
310
- function Update(api, data) {
313
+ function Update(api, data, reqParams) {
311
314
  return __awaiter(this, void 0, void 0, function () {
312
315
  return __generator(this, function (_a) {
313
316
  switch (_a.label) {
@@ -315,7 +318,7 @@
315
318
  if (!data.ID) {
316
319
  data.ID = 0;
317
320
  }
318
- return [4 /*yield*/, api.POST("customForm/" + data.ID, data, exports.Api.PrepReqParams())];
321
+ return [4 /*yield*/, api.POST("customForm/" + data.ID, data, exports.Api.PrepReqParams(reqParams))];
319
322
  case 1:
320
323
  data = _a.sent();
321
324
  api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.CustomForm);
@@ -327,7 +330,35 @@
327
330
  CustomForm.Update = Update;
328
331
  })(exports.CustomForm || (exports.CustomForm = {}));
329
332
 
333
+ /**
334
+ * Describes content of a GENERIC type custom form.
335
+ * The alternative type is MARKUP (Markup.IMarkup).
336
+ */
337
+ (function (CustomFormContent) {
338
+ var ECellType;
339
+ (function (ECellType) {
340
+ ECellType[ECellType["StaticText"] = 0] = "StaticText";
341
+ ECellType[ECellType["DataValue"] = 1] = "DataValue";
342
+ ECellType[ECellType["StaticPicture"] = 2] = "StaticPicture";
343
+ ECellType[ECellType["SubSection"] = 3] = "SubSection";
344
+ ECellType[ECellType["ButtonMore"] = 4] = "ButtonMore";
345
+ ECellType[ECellType["EntityPhoto"] = 5] = "EntityPhoto";
346
+ ECellType[ECellType["EmbeddedMedia"] = 6] = "EmbeddedMedia";
347
+ ECellType[ECellType["Chart"] = 7] = "Chart";
348
+ })(ECellType = CustomFormContent.ECellType || (CustomFormContent.ECellType = {}));
349
+ var EFlowDirection;
350
+ (function (EFlowDirection) {
351
+ EFlowDirection["Vertically"] = "v";
352
+ EFlowDirection["Horizontally"] = "h";
353
+ })(EFlowDirection = CustomFormContent.EFlowDirection || (CustomFormContent.EFlowDirection = {}));
354
+ })(exports.CustomFormContent || (exports.CustomFormContent = {}));
355
+
330
356
  var CacheItem = /** @class */ (function () {
357
+ /**
358
+ * @param id
359
+ * @param data
360
+ * @param duration in seconds until considered expired.
361
+ */
331
362
  function CacheItem(id, data, duration) {
332
363
  this.Id = id;
333
364
  this.Data = data;
@@ -342,6 +373,13 @@
342
373
  };
343
374
  return CacheItem;
344
375
  }());
376
+ // Milliseconds between each data cleaning.
377
+ var CLEANER_INTERVAL = 5000;
378
+ // Max number of items to clean in each cleaning.
379
+ var MAX_CLEAN_BATCH = 100;
380
+ // (Default) Max idle time to keep the cleaner alive.
381
+ // Set to default API cache duration by default.
382
+ var DEFAULT_MAX_CLEAN_IDLE = 60 * 5;
345
383
  /**
346
384
  * Simple local cache controller.
347
385
  */
@@ -349,10 +387,26 @@
349
387
  function CacheControl() {
350
388
  this.data = {};
351
389
  this.Disabled = false;
390
+ this.cleanerInterval = null;
391
+ // Max idle time to keep the cleaner alive.
392
+ // This value is increased when a new item is added with a larger cache duration.
393
+ this.maxCleanIdle = DEFAULT_MAX_CLEAN_IDLE;
352
394
  }
395
+ /**
396
+ * @param id
397
+ * @param data
398
+ * @param duration seconds to keep the data in cache. -1 for infinite.
399
+ */
353
400
  CacheControl.prototype.Set = function (id, data, duration) {
354
401
  if (duration === void 0) { duration = -1; }
355
402
  this.data[id + ""] = new CacheItem(id + "", data, duration);
403
+ if (duration > -1) {
404
+ this.startCleaning();
405
+ if (this.maxCleanIdle < duration) {
406
+ // Add 5 seconds to be sure cleaner stays alive to get it.
407
+ this.maxCleanIdle = duration + 5;
408
+ }
409
+ }
356
410
  };
357
411
  CacheControl.prototype.Get = function (id) {
358
412
  if (this.Disabled) {
@@ -370,9 +424,13 @@
370
424
  };
371
425
  CacheControl.prototype.Clear = function () {
372
426
  this.data = {};
427
+ this.stopCleaning();
373
428
  };
374
429
  CacheControl.prototype.Remove = function (id) {
375
430
  delete this.data[id + ""];
431
+ if (Object.keys(this.data).length <= 0) {
432
+ this.stopCleaning();
433
+ }
376
434
  };
377
435
  CacheControl.prototype.RemoveByStartsWith = function (text) {
378
436
  for (var key in this.data) {
@@ -380,6 +438,9 @@
380
438
  delete this.data[key];
381
439
  }
382
440
  }
441
+ if (Object.keys(this.data).length <= 0) {
442
+ this.stopCleaning();
443
+ }
383
444
  };
384
445
  CacheControl.prototype.RemoveByContains = function (text) {
385
446
  for (var key in this.data) {
@@ -387,6 +448,9 @@
387
448
  delete this.data[key];
388
449
  }
389
450
  }
451
+ if (Object.keys(this.data).length <= 0) {
452
+ this.stopCleaning();
453
+ }
390
454
  };
391
455
  CacheControl.prototype.GetKeys = function () {
392
456
  if (this.Disabled) {
@@ -407,6 +471,51 @@
407
471
  }
408
472
  return values;
409
473
  };
474
+ CacheControl.prototype.startCleaning = function () {
475
+ var _this = this;
476
+ if (this.cleanerInterval == null) {
477
+ var cleanIdleStart_1 = null;
478
+ this.cleanerInterval = setInterval(function () {
479
+ var cleaned = 0;
480
+ for (var key in _this.data) {
481
+ var item = _this.data[key];
482
+ if (item.IsExpired()) {
483
+ delete _this.data[key];
484
+ cleaned += 1;
485
+ }
486
+ if (cleaned >= MAX_CLEAN_BATCH) {
487
+ break;
488
+ }
489
+ }
490
+ if (cleaned <= 0) {
491
+ // Stop cleaner if nothing in cache.
492
+ if (Object.keys(_this.data).length <= 0) {
493
+ _this.stopCleaning();
494
+ }
495
+ // Stop cleaner if idle time is reached.
496
+ else {
497
+ if (cleanIdleStart_1 == null) {
498
+ cleanIdleStart_1 = new Date().getTime();
499
+ }
500
+ var now = new Date().getTime();
501
+ if (now - cleanIdleStart_1 > _this.maxCleanIdle * 1000) {
502
+ _this.stopCleaning();
503
+ }
504
+ }
505
+ }
506
+ else {
507
+ cleanIdleStart_1 = null;
508
+ }
509
+ }, CLEANER_INTERVAL);
510
+ }
511
+ };
512
+ CacheControl.prototype.stopCleaning = function () {
513
+ if (this.cleanerInterval != null) {
514
+ clearInterval(this.cleanerInterval);
515
+ this.cleanerInterval = null;
516
+ this.maxCleanIdle = DEFAULT_MAX_CLEAN_IDLE;
517
+ }
518
+ };
410
519
  return CacheControl;
411
520
  }());
412
521
 
@@ -675,17 +784,17 @@
675
784
  value: EDbRegion.Australia
676
785
  }
677
786
  ];
678
- function Get(api, id) {
787
+ function Get(api, id, reqParams) {
679
788
  return __awaiter(this, void 0, void 0, function () {
680
789
  var cacheData, req;
681
790
  return __generator(this, function (_a) {
682
791
  switch (_a.label) {
683
792
  case 0:
684
- cacheData = api.Cache.Get(GetCacheKey(id));
793
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
685
794
  if (cacheData) {
686
795
  return [2 /*return*/, cacheData];
687
796
  }
688
- return [4 /*yield*/, api.GET("account/" + id)];
797
+ return [4 /*yield*/, api.GET("account/" + id, reqParams)];
689
798
  case 1:
690
799
  req = _a.sent();
691
800
  api.Cache.Set(GetCacheKey(id), req, exports.Api.DEFAULT_CACHE_DURATION);
@@ -695,16 +804,16 @@
695
804
  });
696
805
  }
697
806
  Account.Get = Get;
698
- function GetRelatedList(api) {
807
+ function GetRelatedList(api, reqParams) {
699
808
  return __awaiter(this, void 0, void 0, function () {
700
809
  var cacheData, req, prom;
701
810
  var _this = this;
702
811
  return __generator(this, function (_a) {
703
- cacheData = api.Cache.Get(GetListCacheKey(api.GetSessionId()));
812
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(api.GetSessionId()));
704
813
  if (cacheData) {
705
814
  return [2 /*return*/, cacheData];
706
815
  }
707
- req = api.GET("user/relatedClientAccounts");
816
+ req = api.GET("user/relatedClientAccounts", reqParams);
708
817
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
709
818
  var data, items, e_1;
710
819
  return __generator(this, function (_a) {
@@ -731,18 +840,18 @@
731
840
  });
732
841
  }
733
842
  Account.GetRelatedList = GetRelatedList;
734
- function GetAppSettings(api, id, appId) {
843
+ function GetAppSettings(api, id, appId, reqParams) {
735
844
  return __awaiter(this, void 0, void 0, function () {
736
845
  var cacheData, req, prom;
737
846
  var _this = this;
738
847
  return __generator(this, function (_a) {
739
848
  switch (_a.label) {
740
849
  case 0:
741
- cacheData = api.Cache.Get(GetCacheKey(id, appId));
850
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id, appId));
742
851
  if (cacheData) {
743
852
  return [2 /*return*/, cacheData];
744
853
  }
745
- return [4 /*yield*/, api.GET("account/" + id + "?ApplicationID=" + appId)];
854
+ return [4 /*yield*/, api.GET("account/" + id + "?ApplicationID=" + appId, reqParams)];
746
855
  case 1:
747
856
  req = _a.sent();
748
857
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
@@ -779,13 +888,14 @@
779
888
  * @param id
780
889
  * @param appId
781
890
  * @param data
891
+ * @param reqParams
782
892
  * @returns
783
893
  */
784
- function UpdateAppSettings(api, id, appId, data) {
894
+ function UpdateAppSettings(api, id, appId, data, reqParams) {
785
895
  return __awaiter(this, void 0, void 0, function () {
786
896
  return __generator(this, function (_a) {
787
897
  switch (_a.label) {
788
- case 0: return [4 /*yield*/, api.POST("account/" + id + "/applicationSettings/" + appId, data)];
898
+ case 0: return [4 /*yield*/, api.POST("account/" + id + "/applicationSettings/" + appId, data, reqParams)];
789
899
  case 1:
790
900
  data = _a.sent();
791
901
  api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + id);
@@ -802,9 +912,10 @@
802
912
  * @param name
803
913
  * @param region
804
914
  * @param starterContent
915
+ * @param reqParams
805
916
  * @returns
806
917
  */
807
- function Create(api, id, name, region, starterContent) {
918
+ function Create(api, id, name, region, starterContent, reqParams) {
808
919
  return __awaiter(this, void 0, void 0, function () {
809
920
  var reqData, res;
810
921
  return __generator(this, function (_a) {
@@ -819,7 +930,7 @@
819
930
  "DBLocation": region,
820
931
  "StarterContent": starterContent
821
932
  };
822
- res = api.POST("clientAccount/" + id, reqData, exports.Api.PrepReqParams());
933
+ res = api.POST("clientAccount/" + id, reqData, exports.Api.PrepReqParams(reqParams));
823
934
  api.Cache.Remove(GetListCacheKey(api.GetSessionId()));
824
935
  return [2 /*return*/, res];
825
936
  });
@@ -828,100 +939,28 @@
828
939
  Account.Create = Create;
829
940
  })(exports.Account || (exports.Account = {}));
830
941
 
831
- (function (CamApi) {
832
- var Api$$1 = /** @class */ (function (_super) {
833
- __extends(Api$$1, _super);
834
- function Api$$1(env) {
835
- var _this = _super.call(this, "SSID") || this;
836
- _this.baseUrl = "";
837
- _this.env = env !== null && env !== void 0 ? env : exports.Api.EEnv.PROD;
838
- _this.setBaseUrl();
839
- return _this;
840
- }
841
- Api$$1.prototype.setBaseUrl = function () {
842
- var prefix = "https://cam.nextspace";
843
- var url;
844
- var env = this.env.toUpperCase();
845
- switch (env) {
846
- case exports.Api.EEnv.DEV:
847
- url = prefix + "-dev.net/";
848
- break;
849
- case exports.Api.EEnv.STG:
850
- url = prefix + "-stg.net/";
851
- break;
852
- case exports.Api.EEnv.UAT:
853
- url = prefix + "-uat.net/";
854
- break;
855
- case exports.Api.EEnv.PROD:
856
- url = prefix + ".host/";
857
- break;
858
- default:
859
- throw ("Specified Environment is not valid. SuppliedEnv=" + env);
860
- }
861
- this.baseUrl = url;
862
- };
863
- Api$$1.prototype.GetBaseUrl = function () {
864
- return this.baseUrl;
865
- };
866
- Api$$1.prototype.SetBaseUrl = function (url) {
867
- this.baseUrl = url;
868
- if (!this.baseUrl.endsWith("/")) {
869
- this.baseUrl += "/";
870
- }
871
- };
872
- Api$$1.prototype.GET = function (url, params) {
873
- return __awaiter(this, void 0, void 0, function () {
874
- return __generator(this, function (_a) {
875
- return [2 /*return*/, this.get(this.baseUrl + url, params)];
876
- });
877
- });
878
- };
879
- Api$$1.prototype.DELETE = function (url, params) {
880
- return __awaiter(this, void 0, void 0, function () {
881
- return __generator(this, function (_a) {
882
- return [2 /*return*/, this.delete(this.baseUrl + url, params)];
883
- });
884
- });
885
- };
886
- Api$$1.prototype.POST = function (url, data, params) {
887
- return __awaiter(this, void 0, void 0, function () {
888
- return __generator(this, function (_a) {
889
- return [2 /*return*/, this.post(this.baseUrl + url, data, params)];
890
- });
891
- });
892
- };
893
- Api$$1.prototype.UPLOAD = function (url, blob, params) {
894
- return __awaiter(this, void 0, void 0, function () {
895
- return __generator(this, function (_a) {
896
- return [2 /*return*/, this.upload(this.baseUrl + url, blob, params)];
897
- });
898
- });
899
- };
900
- return Api$$1;
901
- }(AbstractApi));
902
- CamApi.Api = Api$$1;
903
- })(exports.CamApi || (exports.CamApi = {}));
904
-
905
942
  (function (MessageBroker) {
906
- var Action;
907
- (function (Action) {
908
- Action["SUBSCRIBE"] = "subscribe";
909
- Action["SUBSCRIBE_SHADOW"] = "subscribeShadow";
910
- Action["UNSUBSCRIBE"] = "unsubscribe";
911
- Action["BROADCAST"] = "broadcast";
912
- Action["GET_TOPIC_SUBSCRIBERS"] = "getTopicSubscribers"; // requests topic subscribers without subscribing
913
- })(Action = MessageBroker.Action || (MessageBroker.Action = {}));
943
+ var EAction;
944
+ (function (EAction) {
945
+ EAction["SUBSCRIBE"] = "subscribe";
946
+ EAction["SUBSCRIBE_SHADOW"] = "subscribeShadow";
947
+ EAction["UNSUBSCRIBE"] = "unsubscribe";
948
+ EAction["BROADCAST"] = "broadcast";
949
+ EAction["GET_TOPIC_SUBSCRIBERS"] = "getTopicSubscribers"; // requests topic subscribers without subscribing
950
+ })(EAction = MessageBroker.EAction || (MessageBroker.EAction = {}));
914
951
  /** Events types any component may get from server */
915
- var Event;
916
- (function (Event) {
917
- Event["SAVED"] = "saved";
918
- Event["UPDATED"] = "updated";
919
- Event["DELETED"] = "deleted";
920
- Event["EDIT_STARTED"] = "editStarted";
921
- Event["EDIT_FINISHED"] = "editFinished";
922
- Event["USERS_UPDATE"] = "usersUpdate";
923
- })(Event = MessageBroker.Event || (MessageBroker.Event = {}));
924
- /** Communicates with a server message broker */
952
+ var EEvent;
953
+ (function (EEvent) {
954
+ EEvent["SAVED"] = "saved";
955
+ EEvent["UPDATED"] = "updated";
956
+ EEvent["DELETED"] = "deleted";
957
+ EEvent["EDIT_STARTED"] = "editStarted";
958
+ EEvent["EDIT_FINISHED"] = "editFinished";
959
+ EEvent["USERS_UPDATE"] = "usersUpdate";
960
+ })(EEvent = MessageBroker.EEvent || (MessageBroker.EEvent = {}));
961
+ /**
962
+ * Communicates with a server message broker.
963
+ */
925
964
  var WebSocketBroker = /** @class */ (function () {
926
965
  function WebSocketBroker(uri, env) {
927
966
  this.uri = uri;
@@ -933,6 +972,9 @@
933
972
  }
934
973
  WebSocketBroker.prototype.connect = function () {
935
974
  try {
975
+ if (!WebSocket) {
976
+ throw new Error("WebSocket is not supported by this browser");
977
+ }
936
978
  this.ws = new WebSocket(this.formatApiUri(this.uri));
937
979
  this.ws.onopen = this.onOpen.bind(this);
938
980
  this.ws.onmessage = this.onMessage.bind(this);
@@ -947,7 +989,7 @@
947
989
  var ws = document.location.protocol === "https:" ? "wss" : "ws";
948
990
  return uri.replace(/^(https|http)/, ws) + "websocket";
949
991
  };
950
- WebSocketBroker.prototype.setUser = function (user) {
992
+ WebSocketBroker.prototype.SetUser = function (user) {
951
993
  this.user = this.user ? this.user : user;
952
994
  };
953
995
  WebSocketBroker.prototype.onOpen = function (ev) {
@@ -986,7 +1028,11 @@
986
1028
  console.groupEnd();
987
1029
  }
988
1030
  };
989
- /** Send message to server */
1031
+ /**
1032
+ * Send message to server.
1033
+ * @param msg
1034
+ * @returns
1035
+ */
990
1036
  WebSocketBroker.prototype.sendMessage = function (msg) {
991
1037
  if (this.ws.readyState !== WebSocket.OPEN) {
992
1038
  return;
@@ -1002,43 +1048,56 @@
1002
1048
  console.warn(e);
1003
1049
  }
1004
1050
  };
1005
- Object.defineProperty(WebSocketBroker.prototype, "connected", {
1051
+ Object.defineProperty(WebSocketBroker.prototype, "IsConnected", {
1006
1052
  get: function () {
1007
1053
  return this.ws.readyState === WebSocket.OPEN;
1008
1054
  },
1009
1055
  enumerable: false,
1010
1056
  configurable: true
1011
1057
  });
1012
- /** Add a subscriber to a topic */
1013
- WebSocketBroker.prototype.subscribe = function (topic, callback, action) {
1014
- if (action === void 0) { action = Action.SUBSCRIBE; }
1058
+ /**
1059
+ * Add a subscriber to a topic.
1060
+ * @param topic
1061
+ * @param callback
1062
+ * @param action
1063
+ */
1064
+ WebSocketBroker.prototype.Subscribe = function (topic, callback, action) {
1065
+ if (action === void 0) { action = EAction.SUBSCRIBE; }
1015
1066
  this.addSubscriber(topic, callback);
1016
1067
  this.sendMessage({ topic: topic, action: action });
1017
1068
  if (this.env === exports.Api.EEnv.DEV) {
1018
1069
  console.log("Subscribe [" + action + "] called for topic", topic);
1019
1070
  }
1020
1071
  };
1021
- /** Add a shadow subscriber to a topic */
1022
- WebSocketBroker.prototype.subscribeShadow = function (topic, callback) {
1023
- this.subscribe(topic, callback, Action.SUBSCRIBE_SHADOW);
1072
+ /**
1073
+ * Add a shadow subscriber to a topic.
1074
+ * @param topic
1075
+ * @param callback
1076
+ */
1077
+ WebSocketBroker.prototype.SubscribeShadow = function (topic, callback) {
1078
+ this.Subscribe(topic, callback, EAction.SUBSCRIBE_SHADOW);
1024
1079
  };
1025
- /** Remove a subscriber from a topic */
1026
- WebSocketBroker.prototype.unsubscribe = function (topic, callback) {
1080
+ /**
1081
+ * Remove a subscriber from a topic.
1082
+ * @param topic
1083
+ * @param callback
1084
+ */
1085
+ WebSocketBroker.prototype.Unsubscribe = function (topic, callback) {
1027
1086
  var subscribers = this.subscriptions.get(topic) || [];
1028
1087
  this.subscriptions.set(topic, subscribers.filter(function (fn) { return fn != callback; }));
1029
- this.sendMessage({ topic: topic, action: Action.UNSUBSCRIBE });
1088
+ this.sendMessage({ topic: topic, action: EAction.UNSUBSCRIBE });
1030
1089
  if (this.env === exports.Api.EEnv.DEV) {
1031
1090
  console.groupCollapsed("MessageBroker subscription removed: ", topic);
1032
1091
  console.table(Array.from(this.subscriptions.entries()));
1033
1092
  console.groupEnd();
1034
1093
  }
1035
1094
  };
1036
- WebSocketBroker.prototype.sendBroadcastMessage = function (msg) {
1037
- this.sendMessage(__assign(__assign({}, msg), { action: Action.BROADCAST }));
1095
+ WebSocketBroker.prototype.SendBroadcastMessage = function (msg) {
1096
+ this.sendMessage(__assign(__assign({}, msg), { action: EAction.BROADCAST }));
1038
1097
  };
1039
- WebSocketBroker.prototype.requestTopicUsers = function (topic, callback) {
1098
+ WebSocketBroker.prototype.RequestTopicUsers = function (topic, callback) {
1040
1099
  this.addSubscriber(topic, callback);
1041
- this.sendMessage({ topic: topic, action: Action.GET_TOPIC_SUBSCRIBERS });
1100
+ this.sendMessage({ topic: topic, action: EAction.GET_TOPIC_SUBSCRIBERS });
1042
1101
  };
1043
1102
  return WebSocketBroker;
1044
1103
  }());
@@ -1084,13 +1143,13 @@
1084
1143
  });
1085
1144
  /**
1086
1145
  * Loads regional base url and sets up message broker.
1087
- * @param cam
1146
+ * @param cam Required for loading regional base url.
1088
1147
  * @returns
1089
1148
  */
1090
1149
  Api$$1.prototype.init = function (cam) {
1091
1150
  var _a;
1092
1151
  return __awaiter(this, void 0, void 0, function () {
1093
- var prefix, url, env, camApi, settings, endpoint, e_1;
1152
+ var prefix, url, env, settings, endpoint, e_1;
1094
1153
  return __generator(this, function (_b) {
1095
1154
  switch (_b.label) {
1096
1155
  case 0:
@@ -1113,11 +1172,11 @@
1113
1172
  throw ("Specified Environment is not valid. SuppliedEnv=" + env);
1114
1173
  }
1115
1174
  this.baseUrl = url;
1175
+ if (!cam) return [3 /*break*/, 4];
1116
1176
  _b.label = 1;
1117
1177
  case 1:
1118
1178
  _b.trys.push([1, 3, , 4]);
1119
- camApi = cam ? cam : new exports.CamApi.Api(env);
1120
- return [4 /*yield*/, exports.Account.GetAppSettings(camApi, this.accountId, exports.Account.EAppId.BruceApi)];
1179
+ return [4 /*yield*/, exports.Account.GetAppSettings(cam, this.accountId, exports.Account.EAppId.BruceApi)];
1121
1180
  case 2:
1122
1181
  settings = _b.sent();
1123
1182
  if (this.loadCancelled) {
@@ -1137,7 +1196,12 @@
1137
1196
  console.error(e_1);
1138
1197
  return [3 /*break*/, 4];
1139
1198
  case 4:
1140
- this.messageBroker = new exports.MessageBroker.WebSocketBroker(this.baseUrl, this.env);
1199
+ try {
1200
+ this.messageBroker = new exports.MessageBroker.WebSocketBroker(this.baseUrl, this.env);
1201
+ }
1202
+ catch (e) {
1203
+ console.warn("BruceApi: Failed to create message broker.", e);
1204
+ }
1141
1205
  return [2 /*return*/];
1142
1206
  }
1143
1207
  });
@@ -1231,6 +1295,80 @@
1231
1295
  BruceApi.Api = Api$$1;
1232
1296
  })(exports.BruceApi || (exports.BruceApi = {}));
1233
1297
 
1298
+ (function (CamApi) {
1299
+ var Api$$1 = /** @class */ (function (_super) {
1300
+ __extends(Api$$1, _super);
1301
+ function Api$$1(env) {
1302
+ var _this = _super.call(this, "SSID") || this;
1303
+ _this.baseUrl = "";
1304
+ _this.env = env !== null && env !== void 0 ? env : exports.Api.EEnv.PROD;
1305
+ _this.setBaseUrl();
1306
+ return _this;
1307
+ }
1308
+ Api$$1.prototype.setBaseUrl = function () {
1309
+ var prefix = "https://cam.nextspace";
1310
+ var url;
1311
+ var env = this.env.toUpperCase();
1312
+ switch (env) {
1313
+ case exports.Api.EEnv.DEV:
1314
+ url = prefix + "-dev.net/";
1315
+ break;
1316
+ case exports.Api.EEnv.STG:
1317
+ url = prefix + "-stg.net/";
1318
+ break;
1319
+ case exports.Api.EEnv.UAT:
1320
+ url = prefix + "-uat.net/";
1321
+ break;
1322
+ case exports.Api.EEnv.PROD:
1323
+ url = prefix + ".host/";
1324
+ break;
1325
+ default:
1326
+ throw ("Specified Environment is not valid. SuppliedEnv=" + env);
1327
+ }
1328
+ this.baseUrl = url;
1329
+ };
1330
+ Api$$1.prototype.GetBaseUrl = function () {
1331
+ return this.baseUrl;
1332
+ };
1333
+ Api$$1.prototype.SetBaseUrl = function (url) {
1334
+ this.baseUrl = url;
1335
+ if (!this.baseUrl.endsWith("/")) {
1336
+ this.baseUrl += "/";
1337
+ }
1338
+ };
1339
+ Api$$1.prototype.GET = function (url, params) {
1340
+ return __awaiter(this, void 0, void 0, function () {
1341
+ return __generator(this, function (_a) {
1342
+ return [2 /*return*/, this.get(this.baseUrl + url, params)];
1343
+ });
1344
+ });
1345
+ };
1346
+ Api$$1.prototype.DELETE = function (url, params) {
1347
+ return __awaiter(this, void 0, void 0, function () {
1348
+ return __generator(this, function (_a) {
1349
+ return [2 /*return*/, this.delete(this.baseUrl + url, params)];
1350
+ });
1351
+ });
1352
+ };
1353
+ Api$$1.prototype.POST = function (url, data, params) {
1354
+ return __awaiter(this, void 0, void 0, function () {
1355
+ return __generator(this, function (_a) {
1356
+ return [2 /*return*/, this.post(this.baseUrl + url, data, params)];
1357
+ });
1358
+ });
1359
+ };
1360
+ Api$$1.prototype.UPLOAD = function (url, blob, params) {
1361
+ return __awaiter(this, void 0, void 0, function () {
1362
+ return __generator(this, function (_a) {
1363
+ return [2 /*return*/, this.upload(this.baseUrl + url, blob, params)];
1364
+ });
1365
+ });
1366
+ };
1367
+ return Api$$1;
1368
+ }(AbstractApi));
1369
+ CamApi.Api = Api$$1;
1370
+ })(exports.CamApi || (exports.CamApi = {}));
1371
+
1234
1372
  (function (IdmApi) {
1235
1373
  /**
1236
1374
  * This is the request handler for Idm Api,
@@ -1546,7 +1684,7 @@
1546
1684
  return "" + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + entityId;
1547
1685
  }
1548
1686
  Entity.GetCacheKey = GetCacheKey;
1549
- function Get(api, entityId) {
1687
+ function Get(api, entityId, reqParams) {
1550
1688
  return __awaiter(this, void 0, void 0, function () {
1551
1689
  var key, cacheData, req;
1552
1690
  return __generator(this, function (_a) {
@@ -1554,18 +1692,18 @@
1554
1692
  throw ("Entity ID is required.");
1555
1693
  }
1556
1694
  key = GetCacheKey(entityId);
1557
- cacheData = api.Cache.Get(key);
1695
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
1558
1696
  if (cacheData) {
1559
1697
  return [2 /*return*/, cacheData];
1560
1698
  }
1561
- req = api.GET("entity/" + entityId, exports.Api.PrepReqParams());
1699
+ req = api.GET("entity/" + entityId, exports.Api.PrepReqParams(reqParams));
1562
1700
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
1563
1701
  return [2 /*return*/, req];
1564
1702
  });
1565
1703
  });
1566
1704
  }
1567
1705
  Entity.Get = Get;
1568
- function GetListByIds(api, entityIds) {
1706
+ function GetListByIds(api, entityIds, reqParams) {
1569
1707
  return __awaiter(this, void 0, void 0, function () {
1570
1708
  var reqs, reqIds, i, entityId, key, cacheData, reqData, req_1, _loop_1, i;
1571
1709
  var _this = this;
@@ -1580,7 +1718,7 @@
1580
1718
  for (i = 0; i < entityIds.length; i++) {
1581
1719
  entityId = entityIds[i];
1582
1720
  key = GetCacheKey(entityId);
1583
- cacheData = api.Cache.Get(key);
1721
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
1584
1722
  if (cacheData) {
1585
1723
  reqs.push(cacheData);
1586
1724
  }
@@ -1597,7 +1735,7 @@
1597
1735
  PageSize: reqIds.length
1598
1736
  };
1599
1737
  if (reqIds.length > 0) {
1600
- req_1 = api.POST("entities", reqData, exports.Api.PrepReqParams());
1738
+ req_1 = api.POST("entities", reqData, exports.Api.PrepReqParams(reqParams));
1601
1739
  _loop_1 = function (i) {
1602
1740
  var entityId = reqIds[i];
1603
1741
  var key = GetCacheKey(entityId);
@@ -1636,7 +1774,7 @@
1636
1774
  });
1637
1775
  }
1638
1776
  Entity.GetListByIds = GetListByIds;
1639
- function Delete(api, entityId) {
1777
+ function Delete(api, entityId, reqParams) {
1640
1778
  return __awaiter(this, void 0, void 0, function () {
1641
1779
  return __generator(this, function (_a) {
1642
1780
  switch (_a.label) {
@@ -1644,7 +1782,7 @@
1644
1782
  if (!entityId) {
1645
1783
  throw ("Entity ID is required.");
1646
1784
  }
1647
- return [4 /*yield*/, api.DELETE("entity/" + entityId, exports.Api.PrepReqParams())];
1785
+ return [4 /*yield*/, api.DELETE("entity/" + entityId, exports.Api.PrepReqParams(reqParams))];
1648
1786
  case 1:
1649
1787
  _a.sent();
1650
1788
  api.Cache.Remove(GetCacheKey(entityId));
@@ -1654,7 +1792,7 @@
1654
1792
  });
1655
1793
  }
1656
1794
  Entity.Delete = Delete;
1657
- function DeleteList(api, entityIds) {
1795
+ function DeleteList(api, entityIds, reqParams) {
1658
1796
  return __awaiter(this, void 0, void 0, function () {
1659
1797
  var i, entityId;
1660
1798
  return __generator(this, function (_a) {
@@ -1665,7 +1803,7 @@
1665
1803
  }
1666
1804
  return [4 /*yield*/, api.POST("deleteEntities", {
1667
1805
  Items: entityIds
1668
- }, exports.Api.PrepReqParams())];
1806
+ }, exports.Api.PrepReqParams(reqParams))];
1669
1807
  case 1:
1670
1808
  _a.sent();
1671
1809
  for (i = 0; i < entityIds.length; i++) {
@@ -1678,7 +1816,7 @@
1678
1816
  });
1679
1817
  }
1680
1818
  Entity.DeleteList = DeleteList;
1681
- function Update(api, data, override) {
1819
+ function Update(api, data, override, reqParams) {
1682
1820
  var _a, _b;
1683
1821
  return __awaiter(this, void 0, void 0, function () {
1684
1822
  var reqUrl;
@@ -1692,7 +1830,7 @@
1692
1830
  data.Bruce = __assign(__assign({}, data.Bruce), { ID: exports.ObjectUtils.UId() });
1693
1831
  }
1694
1832
  reqUrl = "entity/" + data.Bruce.ID + "/?dataoverride=" + override + "&BruceEntityType=" + data.Bruce["EntityType.ID"];
1695
- return [4 /*yield*/, api.POST(reqUrl, data, exports.Api.PrepReqParams())];
1833
+ return [4 /*yield*/, api.POST(reqUrl, data, exports.Api.PrepReqParams(reqParams))];
1696
1834
  case 1:
1697
1835
  data = _c.sent();
1698
1836
  api.Cache.Remove(GetCacheKey(data.Bruce.ID));
@@ -1780,7 +1918,7 @@
1780
1918
  (function (Filter) {
1781
1919
  var V1;
1782
1920
  (function (V1) {
1783
- function GetList(api, filter) {
1921
+ function GetList(api, filter, reqParams) {
1784
1922
  return __awaiter(this, void 0, void 0, function () {
1785
1923
  var requestFilter, url, data, entities, i, entity, id;
1786
1924
  return __generator(this, function (_a) {
@@ -1821,7 +1959,7 @@
1821
1959
  // Order by attribute + sort order.
1822
1960
  (!filter.orderBy ? "" : "&OrderBy=" + filter.orderBy) +
1823
1961
  (filter.sortOrder ? "&SortOrder=" + (filter.sortOrder == exports.Api.ESortOrder.Asc ? "ASC" : "DESC") : "");
1824
- return [4 /*yield*/, api.GET(url, exports.Api.PrepReqParams())];
1962
+ return [4 /*yield*/, api.GET(url, exports.Api.PrepReqParams(reqParams))];
1825
1963
  case 1:
1826
1964
  data = _a.sent();
1827
1965
  entities = data.Items;
@@ -1955,6 +2093,59 @@
1955
2093
  return null;
1956
2094
  }
1957
2095
  Calculator.GetValue = GetValue;
2096
+ /**
2097
+ * Calculates the value of arbitrary field options with assumption that desired result is a color.
2098
+ * Will return null if a color is not found.
2099
+ * @param fields
2100
+ * @param entity
2101
+ * @param tags
2102
+ */
2103
+ function GetColor(fields, entity, tags) {
2104
+ if (!tags) {
2105
+ tags = [];
2106
+ }
2107
+ if (!entity) {
2108
+ entity = {};
2109
+ }
2110
+ for (var i = 0; i < fields.length; i++) {
2111
+ var field = fields[i];
2112
+ var value = void 0;
2113
+ switch (field.type) {
2114
+ case EValueType.Color:
2115
+ value = field.value;
2116
+ break;
2117
+ case EValueType.Gradient:
2118
+ value = GetGradientValue(field.value, entity);
2119
+ break;
2120
+ case EValueType.Input:
2121
+ value = GetInputValue(field.value, entity);
2122
+ break;
2123
+ case EValueType.Mapping:
2124
+ value = GetMappingValue(field.value, entity);
2125
+ break;
2126
+ case EValueType.RandomColor:
2127
+ value = exports.Color.RandomColor();
2128
+ break;
2129
+ case EValueType.TagColor:
2130
+ for (var i_2 = 0; i_2 < tags.length; i_2++) {
2131
+ var tag = tags[i_2];
2132
+ if (tag.Color) {
2133
+ value = exports.Color.ColorFromStr(tag.Color);
2134
+ break;
2135
+ }
2136
+ }
2137
+ break;
2138
+ }
2139
+ if (typeof value === "string") {
2140
+ value = exports.Color.ColorFromStr(value);
2141
+ }
2142
+ if (value && typeof value === "object" && (value.red || value.red == 0)) {
2143
+ return value;
2144
+ }
2145
+ }
2146
+ return null;
2147
+ }
2148
+ Calculator.GetColor = GetColor;
1958
2149
  function GetMappingValue(value, entity) {
1959
2150
  var attrPath = exports.PathUtils.Parse(value.field);
1960
2151
  var eValue = +exports.Entity.GetValue(entity, attrPath);
@@ -2425,7 +2616,7 @@
2425
2616
  EType["Photo"] = "photo";
2426
2617
  EType["Document"] = "document";
2427
2618
  })(EType = EntityAttachmentType.EType || (EntityAttachmentType.EType = {}));
2428
- function Delete(api, id) {
2619
+ function Delete(api, id, reqParams) {
2429
2620
  return __awaiter(this, void 0, void 0, function () {
2430
2621
  return __generator(this, function (_a) {
2431
2622
  switch (_a.label) {
@@ -2433,7 +2624,7 @@
2433
2624
  if (!id) {
2434
2625
  throw ("Type ID is required.");
2435
2626
  }
2436
- return [4 /*yield*/, api.DELETE("entityAttachmentType/" + id, exports.Api.PrepReqParams())];
2627
+ return [4 /*yield*/, api.DELETE("entityAttachmentType/" + id, exports.Api.PrepReqParams(reqParams))];
2437
2628
  case 1:
2438
2629
  _a.sent();
2439
2630
  api.Cache.Remove(GetCacheKey(id));
@@ -2444,7 +2635,7 @@
2444
2635
  });
2445
2636
  }
2446
2637
  EntityAttachmentType.Delete = Delete;
2447
- function Update(api, data) {
2638
+ function Update(api, data, reqParams) {
2448
2639
  return __awaiter(this, void 0, void 0, function () {
2449
2640
  return __generator(this, function (_a) {
2450
2641
  switch (_a.label) {
@@ -2452,7 +2643,7 @@
2452
2643
  if (!(data === null || data === void 0 ? void 0 : data.ID)) {
2453
2644
  throw ("Type ID is required.");
2454
2645
  }
2455
- return [4 /*yield*/, api.POST("entityAttachmentType/" + data.ID, data, exports.Api.PrepReqParams())];
2646
+ return [4 /*yield*/, api.POST("entityAttachmentType/" + data.ID, data, exports.Api.PrepReqParams(reqParams))];
2456
2647
  case 1:
2457
2648
  data = _a.sent();
2458
2649
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -2463,12 +2654,12 @@
2463
2654
  });
2464
2655
  }
2465
2656
  EntityAttachmentType.Update = Update;
2466
- function GetList(api) {
2657
+ function GetList(api, reqParams) {
2467
2658
  return __awaiter(this, void 0, void 0, function () {
2468
2659
  var cacheData, req;
2469
2660
  var _this = this;
2470
2661
  return __generator(this, function (_a) {
2471
- cacheData = api.Cache.Get(GetListCacheKey());
2662
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
2472
2663
  if (cacheData) {
2473
2664
  return [2 /*return*/, cacheData];
2474
2665
  }
@@ -2478,7 +2669,7 @@
2478
2669
  switch (_a.label) {
2479
2670
  case 0:
2480
2671
  _a.trys.push([0, 2, , 3]);
2481
- return [4 /*yield*/, api.GET("entityAttachmentTypes", exports.Api.PrepReqParams())];
2672
+ return [4 /*yield*/, api.GET("entityAttachmentTypes", exports.Api.PrepReqParams(reqParams))];
2482
2673
  case 1:
2483
2674
  data = _a.sent();
2484
2675
  res(data.Items);
@@ -2508,7 +2699,7 @@
2508
2699
  return exports.Api.ECacheKey.Attachment + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + entityId;
2509
2700
  }
2510
2701
  EntityAttachment.GetListCacheKey = GetListCacheKey;
2511
- function Update(api, data) {
2702
+ function Update(api, data, reqParams) {
2512
2703
  return __awaiter(this, void 0, void 0, function () {
2513
2704
  var url;
2514
2705
  return __generator(this, function (_a) {
@@ -2518,7 +2709,7 @@
2518
2709
  throw ("Entity ID, Type ID, and File ID are required.");
2519
2710
  }
2520
2711
  url = "entity/" + data["Entity.ID"] + "/attachment/" + data["EntityAttachmentType.ID"] + "/" + data["ClientFile.ID"];
2521
- return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams())];
2712
+ return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams(reqParams))];
2522
2713
  case 1:
2523
2714
  data = _a.sent();
2524
2715
  api.Cache.Remove(GetCacheKey(data["Entity.ID"], data["EntityAttachmentType.ID"], data["ClientFile.ID"]));
@@ -2529,7 +2720,7 @@
2529
2720
  });
2530
2721
  }
2531
2722
  EntityAttachment.Update = Update;
2532
- function UpdateOrder(api, entityId, typeId, fileIds) {
2723
+ function UpdateOrder(api, entityId, typeId, fileIds, reqParams) {
2533
2724
  return __awaiter(this, void 0, void 0, function () {
2534
2725
  var reqData, i;
2535
2726
  return __generator(this, function (_a) {
@@ -2542,7 +2733,7 @@
2542
2733
  "DisplayOrder.Start": 0,
2543
2734
  "ClientFile.ID": fileIds
2544
2735
  };
2545
- return [4 /*yield*/, api.POST("entity/" + entityId + "/attachments/" + typeId + "/setOrder", reqData, exports.Api.PrepReqParams())];
2736
+ return [4 /*yield*/, api.POST("entity/" + entityId + "/attachments/" + typeId + "/setOrder", reqData, exports.Api.PrepReqParams(reqParams))];
2546
2737
  case 1:
2547
2738
  _a.sent();
2548
2739
  for (i = 0; i < fileIds.length; i++) {
@@ -2555,7 +2746,7 @@
2555
2746
  });
2556
2747
  }
2557
2748
  EntityAttachment.UpdateOrder = UpdateOrder;
2558
- function Delete(api, data) {
2749
+ function Delete(api, data, reqParams) {
2559
2750
  return __awaiter(this, void 0, void 0, function () {
2560
2751
  var reqData;
2561
2752
  return __generator(this, function (_a) {
@@ -2567,7 +2758,7 @@
2567
2758
  reqData = {
2568
2759
  "ClientFile.ID": [data["ClientFile.ID"]]
2569
2760
  };
2570
- return [4 /*yield*/, api.POST("entity/" + data["Entity.ID"] + "/attachments/" + data["EntityAttachmentType.ID"] + "/delete", reqData, exports.Api.PrepReqParams())];
2761
+ return [4 /*yield*/, api.POST("entity/" + data["Entity.ID"] + "/attachments/" + data["EntityAttachmentType.ID"] + "/delete", reqData, exports.Api.PrepReqParams(reqParams))];
2571
2762
  case 1:
2572
2763
  _a.sent();
2573
2764
  api.Cache.Remove(GetCacheKey(data["Entity.ID"], data["EntityAttachmentType.ID"], data["ClientFile.ID"]));
@@ -2578,7 +2769,7 @@
2578
2769
  });
2579
2770
  }
2580
2771
  EntityAttachment.Delete = Delete;
2581
- function DeleteByFileIds(api, entityId, typeId, fileIds) {
2772
+ function DeleteByFileIds(api, entityId, typeId, fileIds, reqParams) {
2582
2773
  return __awaiter(this, void 0, void 0, function () {
2583
2774
  var reqData, i;
2584
2775
  return __generator(this, function (_a) {
@@ -2590,7 +2781,7 @@
2590
2781
  reqData = {
2591
2782
  "ClientFile.ID": fileIds
2592
2783
  };
2593
- return [4 /*yield*/, api.POST("entity/" + entityId + "/attachments/" + typeId + "/delete", reqData, exports.Api.PrepReqParams())];
2784
+ return [4 /*yield*/, api.POST("entity/" + entityId + "/attachments/" + typeId + "/delete", reqData, exports.Api.PrepReqParams(reqParams))];
2594
2785
  case 1:
2595
2786
  _a.sent();
2596
2787
  for (i = 0; i < fileIds.length; i++) {
@@ -2603,7 +2794,7 @@
2603
2794
  });
2604
2795
  }
2605
2796
  EntityAttachment.DeleteByFileIds = DeleteByFileIds;
2606
- function GetListByEntityId(api, entityId) {
2797
+ function GetListByEntityId(api, entityId, reqParams) {
2607
2798
  return __awaiter(this, void 0, void 0, function () {
2608
2799
  var cacheData, req;
2609
2800
  var _this = this;
@@ -2611,7 +2802,7 @@
2611
2802
  if (!entityId) {
2612
2803
  throw ("Entity ID is required.");
2613
2804
  }
2614
- cacheData = api.Cache.Get(GetListCacheKey(entityId));
2805
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2615
2806
  if (cacheData) {
2616
2807
  return [2 /*return*/, cacheData];
2617
2808
  }
@@ -2621,7 +2812,7 @@
2621
2812
  switch (_a.label) {
2622
2813
  case 0:
2623
2814
  _a.trys.push([0, 2, , 3]);
2624
- return [4 /*yield*/, api.GET("entity/" + entityId + "/attachments", exports.Api.PrepReqParams())];
2815
+ return [4 /*yield*/, api.GET("entity/" + entityId + "/attachments", exports.Api.PrepReqParams(reqParams))];
2625
2816
  case 1:
2626
2817
  data = _a.sent();
2627
2818
  res(data.Items);
@@ -2640,7 +2831,7 @@
2640
2831
  });
2641
2832
  }
2642
2833
  EntityAttachment.GetListByEntityId = GetListByEntityId;
2643
- function Upload(api, file, entityId, typeId, onProgress) {
2834
+ function Upload(api, file, entityId, typeId, reqParams) {
2644
2835
  return __awaiter(this, void 0, void 0, function () {
2645
2836
  var url, req;
2646
2837
  return __generator(this, function (_a) {
@@ -2650,7 +2841,7 @@
2650
2841
  throw ("Entity ID, Type ID, and File are required.");
2651
2842
  }
2652
2843
  url = "entity/" + entityId + "/attachment/" + typeId;
2653
- return [4 /*yield*/, api.UPLOAD(url, file, { onProgress: onProgress })];
2844
+ return [4 /*yield*/, api.UPLOAD(url, file, reqParams)];
2654
2845
  case 1:
2655
2846
  req = _a.sent();
2656
2847
  api.Cache.RemoveByStartsWith(GetListCacheKey(entityId));
@@ -2671,7 +2862,7 @@
2671
2862
  return exports.Api.ECacheKey.Comment + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + entityId;
2672
2863
  }
2673
2864
  EntityComment.GetListCacheKey = GetListCacheKey;
2674
- function Update(api, data) {
2865
+ function Update(api, data, reqParams) {
2675
2866
  return __awaiter(this, void 0, void 0, function () {
2676
2867
  var url;
2677
2868
  return __generator(this, function (_a) {
@@ -2681,7 +2872,7 @@
2681
2872
  throw ("TargetObject.ID (entity id) is required.");
2682
2873
  }
2683
2874
  url = "entity/" + data["TargetObject.ID"] + "/comment" + (data.ID == null ? "" : "/" + data.ID);
2684
- return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams())];
2875
+ return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams(reqParams))];
2685
2876
  case 1:
2686
2877
  data = _a.sent();
2687
2878
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -2692,7 +2883,7 @@
2692
2883
  });
2693
2884
  }
2694
2885
  EntityComment.Update = Update;
2695
- function Delete(api, entityId, commentId) {
2886
+ function Delete(api, entityId, commentId, reqParams) {
2696
2887
  return __awaiter(this, void 0, void 0, function () {
2697
2888
  return __generator(this, function (_a) {
2698
2889
  switch (_a.label) {
@@ -2700,7 +2891,7 @@
2700
2891
  if (!commentId) {
2701
2892
  throw ("Comment ID is required.");
2702
2893
  }
2703
- return [4 /*yield*/, api.DELETE("entity/" + entityId + "/comment/" + commentId, exports.Api.PrepReqParams())];
2894
+ return [4 /*yield*/, api.DELETE("entity/" + entityId + "/comment/" + commentId, exports.Api.PrepReqParams(reqParams))];
2704
2895
  case 1:
2705
2896
  _a.sent();
2706
2897
  api.Cache.Remove(GetCacheKey(commentId));
@@ -2711,7 +2902,7 @@
2711
2902
  });
2712
2903
  }
2713
2904
  EntityComment.Delete = Delete;
2714
- function GetListByEntityId(api, entityId) {
2905
+ function GetListByEntityId(api, entityId, reqParams) {
2715
2906
  return __awaiter(this, void 0, void 0, function () {
2716
2907
  var cacheData, req;
2717
2908
  var _this = this;
@@ -2719,7 +2910,7 @@
2719
2910
  if (!entityId) {
2720
2911
  throw ("Entity ID is required.");
2721
2912
  }
2722
- cacheData = api.Cache.Get(GetListCacheKey(entityId));
2913
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2723
2914
  if (cacheData) {
2724
2915
  return [2 /*return*/, cacheData];
2725
2916
  }
@@ -2729,7 +2920,7 @@
2729
2920
  switch (_a.label) {
2730
2921
  case 0:
2731
2922
  _a.trys.push([0, 2, , 3]);
2732
- return [4 /*yield*/, api.GET("entity/" + entityId + "/comments", exports.Api.PrepReqParams())];
2923
+ return [4 /*yield*/, api.GET("entity/" + entityId + "/comments", exports.Api.PrepReqParams(reqParams))];
2733
2924
  case 1:
2734
2925
  data = _a.sent();
2735
2926
  res(data.Items);
@@ -2759,7 +2950,7 @@
2759
2950
  return exports.Api.ECacheKey.Link + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + entityId;
2760
2951
  }
2761
2952
  EntityLink.GetListCacheKey = GetListCacheKey;
2762
- function Update(api, data) {
2953
+ function Update(api, data, reqParams) {
2763
2954
  return __awaiter(this, void 0, void 0, function () {
2764
2955
  var url;
2765
2956
  return __generator(this, function (_a) {
@@ -2769,7 +2960,7 @@
2769
2960
  throw ("Entity ID is required.");
2770
2961
  }
2771
2962
  url = "entity/" + data["Entity.ID"] + "/link" + (data.ID == null ? "" : "/" + data.ID);
2772
- return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams())];
2963
+ return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams(reqParams))];
2773
2964
  case 1:
2774
2965
  data = _a.sent();
2775
2966
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -2780,7 +2971,7 @@
2780
2971
  });
2781
2972
  }
2782
2973
  EntityLink.Update = Update;
2783
- function Delete(api, entityId, linkId) {
2974
+ function Delete(api, entityId, linkId, reqParams) {
2784
2975
  return __awaiter(this, void 0, void 0, function () {
2785
2976
  return __generator(this, function (_a) {
2786
2977
  switch (_a.label) {
@@ -2788,7 +2979,7 @@
2788
2979
  if (!linkId) {
2789
2980
  throw ("Link ID is required.");
2790
2981
  }
2791
- return [4 /*yield*/, api.DELETE("entity/" + entityId + "/link/" + linkId, exports.Api.PrepReqParams())];
2982
+ return [4 /*yield*/, api.DELETE("entity/" + entityId + "/link/" + linkId, exports.Api.PrepReqParams(reqParams))];
2792
2983
  case 1:
2793
2984
  _a.sent();
2794
2985
  api.Cache.Remove(GetCacheKey(linkId));
@@ -2799,7 +2990,7 @@
2799
2990
  });
2800
2991
  }
2801
2992
  EntityLink.Delete = Delete;
2802
- function GetListByEntityId(api, entityId) {
2993
+ function GetListByEntityId(api, entityId, reqParams) {
2803
2994
  return __awaiter(this, void 0, void 0, function () {
2804
2995
  var cacheData, req;
2805
2996
  var _this = this;
@@ -2807,7 +2998,7 @@
2807
2998
  if (!entityId) {
2808
2999
  throw ("Entity ID is required.");
2809
3000
  }
2810
- cacheData = api.Cache.Get(GetListCacheKey(entityId));
3001
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2811
3002
  if (cacheData) {
2812
3003
  return [2 /*return*/, cacheData];
2813
3004
  }
@@ -2817,7 +3008,7 @@
2817
3008
  switch (_a.label) {
2818
3009
  case 0:
2819
3010
  _a.trys.push([0, 2, , 3]);
2820
- return [4 /*yield*/, api.GET("entity/" + entityId + "/links", exports.Api.PrepReqParams())];
3011
+ return [4 /*yield*/, api.GET("entity/" + entityId + "/links", exports.Api.PrepReqParams(reqParams))];
2821
3012
  case 1:
2822
3013
  data = _a.sent();
2823
3014
  res(data.Items);
@@ -2864,7 +3055,7 @@
2864
3055
  return url;
2865
3056
  }
2866
3057
  EntityLod.GetUrl = GetUrl;
2867
- function GetUrlFileId(api, url) {
3058
+ function GetUrlFileId(api, url, reqParams) {
2868
3059
  return __awaiter(this, void 0, void 0, function () {
2869
3060
  var cacheData, req;
2870
3061
  var _this = this;
@@ -2872,7 +3063,7 @@
2872
3063
  if (!url) {
2873
3064
  throw ("Url is required.");
2874
3065
  }
2875
- cacheData = api.Cache.Get(GetCacheKey(url));
3066
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(url));
2876
3067
  if (cacheData) {
2877
3068
  return [2 /*return*/, cacheData];
2878
3069
  }
@@ -2882,7 +3073,7 @@
2882
3073
  switch (_a.label) {
2883
3074
  case 0:
2884
3075
  _a.trys.push([0, 2, , 3]);
2885
- return [4 /*yield*/, api.get(url, exports.Api.PrepReqParams())];
3076
+ return [4 /*yield*/, api.get(url, exports.Api.PrepReqParams(reqParams))];
2886
3077
  case 1:
2887
3078
  record = _a.sent();
2888
3079
  res(record["ClientFile.ID"]);
@@ -2901,7 +3092,7 @@
2901
3092
  });
2902
3093
  }
2903
3094
  EntityLod.GetUrlFileId = GetUrlFileId;
2904
- function GetLods(api, params) {
3095
+ function GetLods(api, params, reqParams) {
2905
3096
  var _a;
2906
3097
  return __awaiter(this, void 0, void 0, function () {
2907
3098
  var data;
@@ -2911,7 +3102,7 @@
2911
3102
  if (!((_a = params === null || params === void 0 ? void 0 : params.Items) === null || _a === void 0 ? void 0 : _a.length)) {
2912
3103
  throw ("Items are required.");
2913
3104
  }
2914
- return [4 /*yield*/, api.POST("entity/getlods", params)];
3105
+ return [4 /*yield*/, api.POST("entity/getlods", params, reqParams)];
2915
3106
  case 1:
2916
3107
  data = _b.sent();
2917
3108
  return [2 /*return*/, data.Items];
@@ -2925,8 +3116,9 @@
2925
3116
  * @param api
2926
3117
  * @param typeId
2927
3118
  * @param group default is "DEFAULT".
3119
+ * @param reqParams
2928
3120
  */
2929
- function GetTypeLods(api, typeId, group) {
3121
+ function GetTypeLods(api, typeId, group, reqParams) {
2930
3122
  return __awaiter(this, void 0, void 0, function () {
2931
3123
  var cacheData, url, req, prom;
2932
3124
  var _this = this;
@@ -2934,12 +3126,12 @@
2934
3126
  if (!group) {
2935
3127
  group = "DEFAULT";
2936
3128
  }
2937
- cacheData = api.Cache.Get(GetTypeListKey(typeId, group));
3129
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetTypeListKey(typeId, group));
2938
3130
  if (cacheData) {
2939
3131
  return [2 /*return*/, cacheData];
2940
3132
  }
2941
3133
  url = "entityType/" + typeId + "/lods?includeClientFiles=yes" + (group ? "&group=" + group : "");
2942
- req = api.GET(url, exports.Api.PrepReqParams());
3134
+ req = api.GET(url, exports.Api.PrepReqParams(reqParams));
2943
3135
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
2944
3136
  var data, e_2;
2945
3137
  return __generator(this, function (_a) {
@@ -2965,7 +3157,7 @@
2965
3157
  });
2966
3158
  }
2967
3159
  EntityLod.GetTypeLods = GetTypeLods;
2968
- function Update(api, entityId, params) {
3160
+ function Update(api, entityId, params, reqParams) {
2969
3161
  return __awaiter(this, void 0, void 0, function () {
2970
3162
  return __generator(this, function (_a) {
2971
3163
  if (!params["ClientFile.ID"] || !params["LODCategory.Key"] || (!params.Level && params.Level !== 0)) {
@@ -2974,7 +3166,7 @@
2974
3166
  return [2 /*return*/, api.POST("entity/" + entityId + "/lod/" + params["LODCategory.Key"] + "/" + params.Level, {
2975
3167
  "Level": 0,
2976
3168
  "ClientFile.ID": params["ClientFile.ID"]
2977
- }, exports.Api.PrepReqParams())];
3169
+ }, exports.Api.PrepReqParams(reqParams))];
2978
3170
  });
2979
3171
  });
2980
3172
  }
@@ -2990,7 +3182,7 @@
2990
3182
  return exports.Api.ECacheKey.RelationType;
2991
3183
  }
2992
3184
  EntityRelationType.GetListCacheKey = GetListCacheKey;
2993
- function Get(api, typeId) {
3185
+ function Get(api, typeId, reqParams) {
2994
3186
  return __awaiter(this, void 0, void 0, function () {
2995
3187
  var key, cacheData, req;
2996
3188
  return __generator(this, function (_a) {
@@ -2998,18 +3190,18 @@
2998
3190
  throw ("Type ID is required.");
2999
3191
  }
3000
3192
  key = GetCacheKey(typeId);
3001
- cacheData = api.Cache.Get(key);
3193
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3002
3194
  if (cacheData) {
3003
3195
  return [2 /*return*/, cacheData];
3004
3196
  }
3005
- req = api.GET("entityRelationType/" + typeId, exports.Api.PrepReqParams());
3197
+ req = api.GET("entityRelationType/" + typeId, exports.Api.PrepReqParams(reqParams));
3006
3198
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
3007
3199
  return [2 /*return*/, req];
3008
3200
  });
3009
3201
  });
3010
3202
  }
3011
3203
  EntityRelationType.Get = Get;
3012
- function Delete(api, typeId) {
3204
+ function Delete(api, typeId, reqParams) {
3013
3205
  return __awaiter(this, void 0, void 0, function () {
3014
3206
  return __generator(this, function (_a) {
3015
3207
  switch (_a.label) {
@@ -3017,7 +3209,7 @@
3017
3209
  if (!typeId) {
3018
3210
  throw ("Type ID is required.");
3019
3211
  }
3020
- return [4 /*yield*/, api.DELETE("entityRelationType/" + typeId, exports.Api.PrepReqParams())];
3212
+ return [4 /*yield*/, api.DELETE("entityRelationType/" + typeId, exports.Api.PrepReqParams(reqParams))];
3021
3213
  case 1:
3022
3214
  _a.sent();
3023
3215
  api.Cache.Remove(GetCacheKey(typeId));
@@ -3028,12 +3220,12 @@
3028
3220
  });
3029
3221
  }
3030
3222
  EntityRelationType.Delete = Delete;
3031
- function GetList(api) {
3223
+ function GetList(api, reqParams) {
3032
3224
  return __awaiter(this, void 0, void 0, function () {
3033
3225
  var cacheData, req;
3034
3226
  var _this = this;
3035
3227
  return __generator(this, function (_a) {
3036
- cacheData = api.Cache.Get(GetListCacheKey());
3228
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
3037
3229
  if (cacheData) {
3038
3230
  return [2 /*return*/, cacheData];
3039
3231
  }
@@ -3043,7 +3235,7 @@
3043
3235
  switch (_a.label) {
3044
3236
  case 0:
3045
3237
  _a.trys.push([0, 2, , 3]);
3046
- return [4 /*yield*/, api.GET("entityRelationTypes", exports.Api.PrepReqParams())];
3238
+ return [4 /*yield*/, api.GET("entityRelationTypes", exports.Api.PrepReqParams(reqParams))];
3047
3239
  case 1:
3048
3240
  data = _a.sent();
3049
3241
  res(data.Items);
@@ -3062,7 +3254,7 @@
3062
3254
  });
3063
3255
  }
3064
3256
  EntityRelationType.GetList = GetList;
3065
- function Update(api, data) {
3257
+ function Update(api, data, reqParams) {
3066
3258
  return __awaiter(this, void 0, void 0, function () {
3067
3259
  return __generator(this, function (_a) {
3068
3260
  switch (_a.label) {
@@ -3073,7 +3265,7 @@
3073
3265
  if (!data.ID) {
3074
3266
  data.ID = exports.ObjectUtils.UId();
3075
3267
  }
3076
- return [4 /*yield*/, api.POST("entityRelationType/" + data.ID, data, exports.Api.PrepReqParams())];
3268
+ return [4 /*yield*/, api.POST("entityRelationType/" + data.ID, data, exports.Api.PrepReqParams(reqParams))];
3077
3269
  case 1:
3078
3270
  data = _a.sent();
3079
3271
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -3103,7 +3295,7 @@
3103
3295
  exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + entityId;
3104
3296
  }
3105
3297
  EntityRelation.GetListCacheKey = GetListCacheKey;
3106
- function Create(api, data) {
3298
+ function Create(api, data, reqParams) {
3107
3299
  return __awaiter(this, void 0, void 0, function () {
3108
3300
  var reqData, url;
3109
3301
  return __generator(this, function (_a) {
@@ -3116,7 +3308,7 @@
3116
3308
  "Related.Entity.ID": [data["Related.Entity.ID"]]
3117
3309
  };
3118
3310
  url = "entity/" + data["Principal.Entity.ID"] + "/relation/" + data["Relation.Type.ID"] + "/add";
3119
- return [4 /*yield*/, api.POST(url, reqData, exports.Api.PrepReqParams())];
3311
+ return [4 /*yield*/, api.POST(url, reqData, exports.Api.PrepReqParams(reqParams))];
3120
3312
  case 1:
3121
3313
  _a.sent();
3122
3314
  api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Principal.Entity.ID"]);
@@ -3131,7 +3323,7 @@
3131
3323
  });
3132
3324
  }
3133
3325
  EntityRelation.Create = Create;
3134
- function Update(api, data) {
3326
+ function Update(api, data, reqParams) {
3135
3327
  return __awaiter(this, void 0, void 0, function () {
3136
3328
  var url;
3137
3329
  return __generator(this, function (_a) {
@@ -3141,7 +3333,7 @@
3141
3333
  throw ("Principal Entity ID, Related Entity ID, and Relation Type ID are required.");
3142
3334
  }
3143
3335
  url = "entity/" + data["Principal.Entity.ID"] + "/otherEntityID/" + data["Related.Entity.ID"] + "/relation/" + data["Relation.Type.ID"] + "/update";
3144
- return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams())];
3336
+ return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams(reqParams))];
3145
3337
  case 1:
3146
3338
  data = _a.sent();
3147
3339
  api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Relation + exports.Api.ECacheKey.Id + data["Principal.Entity.ID"]);
@@ -3156,7 +3348,7 @@
3156
3348
  });
3157
3349
  }
3158
3350
  EntityRelation.Update = Update;
3159
- function GetList(api, entityId, params) {
3351
+ function GetList(api, entityId, params, reqParams) {
3160
3352
  return __awaiter(this, void 0, void 0, function () {
3161
3353
  var cacheData, req;
3162
3354
  var _this = this;
@@ -3165,7 +3357,7 @@
3165
3357
  throw ("Entity ID is required.");
3166
3358
  }
3167
3359
  params = __assign({ typeId: "", oneWayOnly: false, loadEntityData: false }, params);
3168
- cacheData = api.Cache.Get(GetListCacheKey(entityId, params));
3360
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId, params));
3169
3361
  if (cacheData) {
3170
3362
  return [2 /*return*/, cacheData];
3171
3363
  }
@@ -3180,7 +3372,7 @@
3180
3372
  url += "/" + params.typeId;
3181
3373
  }
3182
3374
  url += "?Oneway=" + params.oneWayOnly + "&LoadInfo=" + params.loadEntityData;
3183
- return [4 /*yield*/, api.GET(url, exports.Api.PrepReqParams())];
3375
+ return [4 /*yield*/, api.GET(url, exports.Api.PrepReqParams(reqParams))];
3184
3376
  case 1:
3185
3377
  data = _a.sent();
3186
3378
  res(data.Items);
@@ -3199,18 +3391,18 @@
3199
3391
  });
3200
3392
  }
3201
3393
  EntityRelation.GetList = GetList;
3202
- function GetByDataEntityId(api, entityId) {
3394
+ function GetByDataEntityId(api, entityId, reqParams) {
3203
3395
  return __awaiter(this, void 0, void 0, function () {
3204
3396
  var cacheData, req;
3205
3397
  return __generator(this, function (_a) {
3206
3398
  if (!entityId) {
3207
3399
  throw ("Entity ID is required.");
3208
3400
  }
3209
- cacheData = api.Cache.Get(GetEntityCacheKey(entityId));
3401
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetEntityCacheKey(entityId));
3210
3402
  if (cacheData) {
3211
3403
  return [2 /*return*/, cacheData];
3212
3404
  }
3213
- req = api.GET("entity/relation/" + entityId + "/dataentity", exports.Api.PrepReqParams());
3405
+ req = api.GET("entity/relation/" + entityId + "/dataentity", exports.Api.PrepReqParams(reqParams));
3214
3406
  api.Cache.Set(GetEntityCacheKey(entityId), req);
3215
3407
  return [2 /*return*/, req];
3216
3408
  });
@@ -3224,7 +3416,7 @@
3224
3416
  return "" + exports.Api.ECacheKey.EntitySource + exports.Api.ECacheKey.Id + sourceId + exports.Api.ECacheKey.Id + sourceKey;
3225
3417
  }
3226
3418
  EntitySource.GetCacheKey = GetCacheKey;
3227
- function Get(api, sourceId, sourceKey) {
3419
+ function Get(api, sourceId, sourceKey, reqParams) {
3228
3420
  return __awaiter(this, void 0, void 0, function () {
3229
3421
  var key, cacheData, req;
3230
3422
  return __generator(this, function (_a) {
@@ -3232,18 +3424,18 @@
3232
3424
  throw ("Source ID and Source Key are required.");
3233
3425
  }
3234
3426
  key = GetCacheKey(sourceId, sourceKey);
3235
- cacheData = api.Cache.Get(key);
3427
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3236
3428
  if (cacheData) {
3237
3429
  return [2 /*return*/, cacheData];
3238
3430
  }
3239
- req = api.GET("entitysource/" + sourceId + "/" + sourceKey, exports.Api.PrepReqParams());
3431
+ req = api.GET("entitysource/" + sourceId + "/" + sourceKey, exports.Api.PrepReqParams(reqParams));
3240
3432
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
3241
3433
  return [2 /*return*/, req];
3242
3434
  });
3243
3435
  });
3244
3436
  }
3245
3437
  EntitySource.Get = Get;
3246
- function GetListByKeys(api, sourceId, sourceKeys) {
3438
+ function GetListByKeys(api, sourceId, sourceKeys, reqParams) {
3247
3439
  return __awaiter(this, void 0, void 0, function () {
3248
3440
  var reqKeys, reqs, i, sourceKey, cacheData, prom_1, _loop_1, i;
3249
3441
  var _this = this;
@@ -3257,7 +3449,7 @@
3257
3449
  reqs = [];
3258
3450
  for (i = 0; i < sourceKeys.length; i++) {
3259
3451
  sourceKey = sourceKeys[i];
3260
- cacheData = api.Cache.Get(GetCacheKey(sourceId, sourceKey));
3452
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(sourceId, sourceKey));
3261
3453
  if (cacheData) {
3262
3454
  reqs.push(cacheData);
3263
3455
  }
@@ -3272,7 +3464,7 @@
3272
3464
  switch (_a.label) {
3273
3465
  case 0:
3274
3466
  _a.trys.push([0, 2, , 3]);
3275
- return [4 /*yield*/, api.POST("entitysource/" + sourceId, { SourceRecordKeys: reqKeys }, exports.Api.PrepReqParams())];
3467
+ return [4 /*yield*/, api.POST("entitysource/" + sourceId, { SourceRecordKeys: reqKeys }, exports.Api.PrepReqParams(reqParams))];
3276
3468
  case 1:
3277
3469
  data = _a.sent();
3278
3470
  res(data.Items);
@@ -3318,7 +3510,7 @@
3318
3510
  });
3319
3511
  }
3320
3512
  EntitySource.GetListByKeys = GetListByKeys;
3321
- function GetEntityIdsBySourceKeys(api, sourceId, sourceKeys) {
3513
+ function GetEntityIdsBySourceKeys(api, sourceId, sourceKeys, reqParams) {
3322
3514
  return __awaiter(this, void 0, void 0, function () {
3323
3515
  var result, sources, i, source, i_1, key;
3324
3516
  return __generator(this, function (_a) {
@@ -3329,7 +3521,7 @@
3329
3521
  }
3330
3522
  result = {};
3331
3523
  if (!(sourceKeys.length > 0)) return [3 /*break*/, 2];
3332
- return [4 /*yield*/, GetListByKeys(api, sourceId, sourceKeys)];
3524
+ return [4 /*yield*/, GetListByKeys(api, sourceId, sourceKeys, reqParams)];
3333
3525
  case 1:
3334
3526
  sources = _a.sent();
3335
3527
  for (i = 0; i < sources.length; i++) {
@@ -3362,7 +3554,7 @@
3362
3554
  return exports.Api.ECacheKey.Tag;
3363
3555
  }
3364
3556
  EntityTag.GetListCacheKey = GetListCacheKey;
3365
- function Get(api, tagId) {
3557
+ function Get(api, tagId, reqParams) {
3366
3558
  return __awaiter(this, void 0, void 0, function () {
3367
3559
  var data;
3368
3560
  return __generator(this, function (_a) {
@@ -3371,7 +3563,7 @@
3371
3563
  if (!tagId) {
3372
3564
  throw ("Tag ID is required.");
3373
3565
  }
3374
- return [4 /*yield*/, GetListByIds(api, [tagId])];
3566
+ return [4 /*yield*/, GetListByIds(api, [tagId], reqParams)];
3375
3567
  case 1:
3376
3568
  data = _a.sent();
3377
3569
  return [2 /*return*/, data.length ? data[0] : null];
@@ -3380,7 +3572,7 @@
3380
3572
  });
3381
3573
  }
3382
3574
  EntityTag.Get = Get;
3383
- function GetListByIds(api, tagIds) {
3575
+ function GetListByIds(api, tagIds, reqParams) {
3384
3576
  return __awaiter(this, void 0, void 0, function () {
3385
3577
  var reqIds, reqs, i, tagId, cacheData, prom_1, _loop_1, i;
3386
3578
  var _this = this;
@@ -3394,7 +3586,7 @@
3394
3586
  reqs = [];
3395
3587
  for (i = 0; i < tagIds.length; i++) {
3396
3588
  tagId = tagIds[i];
3397
- cacheData = api.Cache.Get(GetCacheKey(tagId));
3589
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(tagId));
3398
3590
  if (cacheData) {
3399
3591
  reqs.push(cacheData);
3400
3592
  }
@@ -3409,7 +3601,7 @@
3409
3601
  switch (_a.label) {
3410
3602
  case 0:
3411
3603
  _a.trys.push([0, 2, , 3]);
3412
- return [4 /*yield*/, api.POST("layers/get", { layerIds: reqIds }, exports.Api.PrepReqParams())];
3604
+ return [4 /*yield*/, api.POST("layers/get", { layerIds: reqIds }, exports.Api.PrepReqParams(reqParams))];
3413
3605
  case 1:
3414
3606
  data = _a.sent();
3415
3607
  res(data.Items);
@@ -3458,12 +3650,12 @@
3458
3650
  });
3459
3651
  }
3460
3652
  EntityTag.GetListByIds = GetListByIds;
3461
- function GetList(api, entityTypeId) {
3653
+ function GetList(api, entityTypeId, reqParams) {
3462
3654
  return __awaiter(this, void 0, void 0, function () {
3463
3655
  var cacheData, req;
3464
3656
  var _this = this;
3465
3657
  return __generator(this, function (_a) {
3466
- cacheData = api.Cache.Get(GetListCacheKey(entityTypeId));
3658
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityTypeId));
3467
3659
  if (cacheData) {
3468
3660
  return [2 /*return*/, cacheData];
3469
3661
  }
@@ -3473,7 +3665,7 @@
3473
3665
  switch (_a.label) {
3474
3666
  case 0:
3475
3667
  _a.trys.push([0, 2, , 3]);
3476
- return [4 /*yield*/, api.GET(entityTypeId ? "entityType/" + entityTypeId + "/layers" : "layers", exports.Api.PrepReqParams())];
3668
+ return [4 /*yield*/, api.GET(entityTypeId ? "entityType/" + entityTypeId + "/layers" : "layers", exports.Api.PrepReqParams(reqParams))];
3477
3669
  case 1:
3478
3670
  data = _a.sent();
3479
3671
  res(data.Items);
@@ -3492,7 +3684,7 @@
3492
3684
  });
3493
3685
  }
3494
3686
  EntityTag.GetList = GetList;
3495
- function Delete(api, tagId) {
3687
+ function Delete(api, tagId, reqParams) {
3496
3688
  return __awaiter(this, void 0, void 0, function () {
3497
3689
  return __generator(this, function (_a) {
3498
3690
  switch (_a.label) {
@@ -3500,7 +3692,7 @@
3500
3692
  if (!tagId) {
3501
3693
  throw ("Tag ID is required.");
3502
3694
  }
3503
- return [4 /*yield*/, api.DELETE("layer/" + tagId, exports.Api.PrepReqParams())];
3695
+ return [4 /*yield*/, api.DELETE("layer/" + tagId, exports.Api.PrepReqParams(reqParams))];
3504
3696
  case 1:
3505
3697
  _a.sent();
3506
3698
  api.Cache.Remove(GetCacheKey(tagId));
@@ -3511,7 +3703,7 @@
3511
3703
  });
3512
3704
  }
3513
3705
  EntityTag.Delete = Delete;
3514
- function Update(api, data) {
3706
+ function Update(api, data, reqParams) {
3515
3707
  return __awaiter(this, void 0, void 0, function () {
3516
3708
  var url;
3517
3709
  return __generator(this, function (_a) {
@@ -3521,7 +3713,7 @@
3521
3713
  throw ("Tag ID is required.");
3522
3714
  }
3523
3715
  url = data.ID ? "layer/" + data.ID : "layer";
3524
- return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams())];
3716
+ return [4 /*yield*/, api.POST(url, data, exports.Api.PrepReqParams(reqParams))];
3525
3717
  case 1:
3526
3718
  data = _a.sent();
3527
3719
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -3552,7 +3744,7 @@
3552
3744
  EAttributeType["Structure"] = "Structure";
3553
3745
  EAttributeType["Geometry"] = "Geometry";
3554
3746
  })(EAttributeType = EntityType.EAttributeType || (EntityType.EAttributeType = {}));
3555
- function Get(api, typeId) {
3747
+ function Get(api, typeId, reqParams) {
3556
3748
  return __awaiter(this, void 0, void 0, function () {
3557
3749
  var key, cacheData, req;
3558
3750
  return __generator(this, function (_a) {
@@ -3560,18 +3752,18 @@
3560
3752
  throw ("Type ID is required.");
3561
3753
  }
3562
3754
  key = GetCacheKey(typeId);
3563
- cacheData = api.Cache.Get(key);
3755
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3564
3756
  if (cacheData) {
3565
3757
  return [2 /*return*/, cacheData];
3566
3758
  }
3567
- req = api.GET("entitytype/" + typeId, exports.Api.PrepReqParams());
3759
+ req = api.GET("entitytype/" + typeId, exports.Api.PrepReqParams(reqParams));
3568
3760
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
3569
3761
  return [2 /*return*/, req];
3570
3762
  });
3571
3763
  });
3572
3764
  }
3573
3765
  EntityType.Get = Get;
3574
- function Delete(api, typeId) {
3766
+ function Delete(api, typeId, reqParams) {
3575
3767
  return __awaiter(this, void 0, void 0, function () {
3576
3768
  return __generator(this, function (_a) {
3577
3769
  switch (_a.label) {
@@ -3579,7 +3771,7 @@
3579
3771
  if (!typeId) {
3580
3772
  throw ("Type ID is required.");
3581
3773
  }
3582
- return [4 /*yield*/, api.DELETE("entitytype/" + typeId, exports.Api.PrepReqParams())];
3774
+ return [4 /*yield*/, api.DELETE("entitytype/" + typeId, exports.Api.PrepReqParams(reqParams))];
3583
3775
  case 1:
3584
3776
  _a.sent();
3585
3777
  api.Cache.Remove(GetCacheKey(typeId));
@@ -3590,12 +3782,12 @@
3590
3782
  });
3591
3783
  }
3592
3784
  EntityType.Delete = Delete;
3593
- function GetList(api) {
3785
+ function GetList(api, reqParams) {
3594
3786
  return __awaiter(this, void 0, void 0, function () {
3595
3787
  var cacheData, req;
3596
3788
  var _this = this;
3597
3789
  return __generator(this, function (_a) {
3598
- cacheData = api.Cache.Get(GetListCacheKey());
3790
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
3599
3791
  if (cacheData) {
3600
3792
  return [2 /*return*/, cacheData];
3601
3793
  }
@@ -3605,7 +3797,7 @@
3605
3797
  switch (_a.label) {
3606
3798
  case 0:
3607
3799
  _a.trys.push([0, 2, , 3]);
3608
- return [4 /*yield*/, api.GET("entitytypes", exports.Api.PrepReqParams())];
3800
+ return [4 /*yield*/, api.GET("entitytypes", exports.Api.PrepReqParams(reqParams))];
3609
3801
  case 1:
3610
3802
  data = _a.sent();
3611
3803
  res(data.Items);
@@ -3624,7 +3816,7 @@
3624
3816
  });
3625
3817
  }
3626
3818
  EntityType.GetList = GetList;
3627
- function Update(api, data) {
3819
+ function Update(api, data, reqParams) {
3628
3820
  return __awaiter(this, void 0, void 0, function () {
3629
3821
  return __generator(this, function (_a) {
3630
3822
  switch (_a.label) {
@@ -3638,7 +3830,7 @@
3638
3830
  if (!data.Name) {
3639
3831
  data.Name = data.ID;
3640
3832
  }
3641
- return [4 /*yield*/, api.POST("entitytype/" + data.ID, data, exports.Api.PrepReqParams())];
3833
+ return [4 /*yield*/, api.POST("entitytype/" + data.ID, data, exports.Api.PrepReqParams(reqParams))];
3642
3834
  case 1:
3643
3835
  data = _a.sent();
3644
3836
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -4284,22 +4476,22 @@
4284
4476
  return exports.Api.ECacheKey.EntityCoords + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + entityId;
4285
4477
  }
4286
4478
  EntityCoords.GetCacheKey = GetCacheKey;
4287
- function GetEntityCoords(api, entityId) {
4479
+ function GetEntityCoords(api, entityId, reqParams) {
4288
4480
  return __awaiter(this, void 0, void 0, function () {
4289
4481
  var cacheData, req;
4290
4482
  return __generator(this, function (_a) {
4291
- cacheData = api.Cache.Get(GetCacheKey(entityId));
4483
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(entityId));
4292
4484
  if (cacheData) {
4293
4485
  return [2 /*return*/, cacheData];
4294
4486
  }
4295
- req = api.GET("entity/" + entityId + "/ucs");
4487
+ req = api.GET("entity/" + entityId + "/ucs", reqParams);
4296
4488
  api.Cache.Set(GetCacheKey(entityId), req, exports.Api.DEFAULT_CACHE_DURATION);
4297
4489
  return [2 /*return*/, req];
4298
4490
  });
4299
4491
  });
4300
4492
  }
4301
4493
  EntityCoords.GetEntityCoords = GetEntityCoords;
4302
- function EntityRelativeToPoint(api, entityId, params) {
4494
+ function EntityRelativeToPoint(api, entityId, params, reqParams) {
4303
4495
  return __awaiter(this, void 0, void 0, function () {
4304
4496
  var point, name, res;
4305
4497
  return __generator(this, function (_a) {
@@ -4327,7 +4519,7 @@
4327
4519
  }
4328
4520
  },
4329
4521
  "test": params.test
4330
- })];
4522
+ }, reqParams)];
4331
4523
  case 3:
4332
4524
  res = _a.sent();
4333
4525
  if (!params.test) {
@@ -4339,7 +4531,7 @@
4339
4531
  });
4340
4532
  }
4341
4533
  EntityCoords.EntityRelativeToPoint = EntityRelativeToPoint;
4342
- function EntityRelativeToEpsg(api, entityId, params) {
4534
+ function EntityRelativeToEpsg(api, entityId, params, reqParams) {
4343
4535
  var _a;
4344
4536
  return __awaiter(this, void 0, void 0, function () {
4345
4537
  var epsg, name, res;
@@ -4366,7 +4558,7 @@
4366
4558
  }
4367
4559
  },
4368
4560
  "test": params.test
4369
- })];
4561
+ }, reqParams)];
4370
4562
  case 3:
4371
4563
  res = _b.sent();
4372
4564
  if (!params.test) {
@@ -4378,7 +4570,7 @@
4378
4570
  });
4379
4571
  }
4380
4572
  EntityCoords.EntityRelativeToEpsg = EntityRelativeToEpsg;
4381
- function EntityRelativeToUcs(api, entityId, params) {
4573
+ function EntityRelativeToUcs(api, entityId, params, reqParams) {
4382
4574
  return __awaiter(this, void 0, void 0, function () {
4383
4575
  var ucsId, res;
4384
4576
  return __generator(this, function (_a) {
@@ -4396,7 +4588,7 @@
4396
4588
  "Entity.ID": ucsId
4397
4589
  },
4398
4590
  "test": params.test
4399
- })];
4591
+ }, reqParams)];
4400
4592
  case 3:
4401
4593
  res = _a.sent();
4402
4594
  if (!params.test) {
@@ -4408,10 +4600,10 @@
4408
4600
  });
4409
4601
  }
4410
4602
  EntityCoords.EntityRelativeToUcs = EntityRelativeToUcs;
4411
- function UnlinkCoords(api, entityId) {
4603
+ function UnlinkCoords(api, entityId, reqParams) {
4412
4604
  return __awaiter(this, void 0, void 0, function () {
4413
4605
  return __generator(this, function (_a) {
4414
- return [2 /*return*/, api.DELETE("entity/" + entityId + "/ucs")];
4606
+ return [2 /*return*/, api.DELETE("entity/" + entityId + "/ucs", reqParams)];
4415
4607
  });
4416
4608
  });
4417
4609
  }
@@ -4431,7 +4623,7 @@
4431
4623
  return api.GetBaseUrl() + "/file/" + file.ID + (file.FileExt ? file.FileExt : "");
4432
4624
  }
4433
4625
  ClientFile.GetUrlWithExt = GetUrlWithExt;
4434
- function Get(api, fileId) {
4626
+ function Get(api, fileId, reqParams) {
4435
4627
  return __awaiter(this, void 0, void 0, function () {
4436
4628
  var key, cacheData, req;
4437
4629
  return __generator(this, function (_a) {
@@ -4439,18 +4631,18 @@
4439
4631
  throw ("File ID is required.");
4440
4632
  }
4441
4633
  key = GetCacheKey(fileId);
4442
- cacheData = api.Cache.Get(key);
4634
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4443
4635
  if (cacheData) {
4444
4636
  return [2 /*return*/, cacheData];
4445
4637
  }
4446
- req = api.GET("file/" + fileId + "/details", exports.Api.PrepReqParams());
4638
+ req = api.GET("file/" + fileId + "/details", exports.Api.PrepReqParams(reqParams));
4447
4639
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
4448
4640
  return [2 /*return*/, req];
4449
4641
  });
4450
4642
  });
4451
4643
  }
4452
4644
  ClientFile.Get = Get;
4453
- function Delete(api, fileIds) {
4645
+ function Delete(api, fileIds, reqParams) {
4454
4646
  return __awaiter(this, void 0, void 0, function () {
4455
4647
  var data, i, key;
4456
4648
  return __generator(this, function (_a) {
@@ -4462,7 +4654,7 @@
4462
4654
  data = {
4463
4655
  Items: fileIds
4464
4656
  };
4465
- return [4 /*yield*/, api.POST("deleteFiles", data, exports.Api.PrepReqParams())];
4657
+ return [4 /*yield*/, api.POST("deleteFiles", data, exports.Api.PrepReqParams(reqParams))];
4466
4658
  case 1:
4467
4659
  _a.sent();
4468
4660
  for (i = 0; i < fileIds.length; i++) {
@@ -4475,7 +4667,7 @@
4475
4667
  });
4476
4668
  }
4477
4669
  ClientFile.Delete = Delete;
4478
- function Upload(api, file, purpose, onProgress) {
4670
+ function Upload(api, file, purpose, reqParams) {
4479
4671
  return __awaiter(this, void 0, void 0, function () {
4480
4672
  var formData, params;
4481
4673
  return __generator(this, function (_a) {
@@ -4488,8 +4680,7 @@
4488
4680
  "Purpose": purpose
4489
4681
  };
4490
4682
  }
4491
- params = exports.Api.PrepReqParams();
4492
- params.onProgress = onProgress;
4683
+ params = exports.Api.PrepReqParams(reqParams);
4493
4684
  params.formData = formData;
4494
4685
  return [2 /*return*/, api.UPLOAD("file/uploadNew", file, params)];
4495
4686
  });
@@ -4520,12 +4711,12 @@
4520
4711
  ERowOperator["AND"] = "AND";
4521
4712
  ERowOperator["OR"] = "OR";
4522
4713
  })(ERowOperator = V1.ERowOperator || (V1.ERowOperator = {}));
4523
- function GetList(api, filter) {
4714
+ function GetList(api, filter, reqParams) {
4524
4715
  return __awaiter(this, void 0, void 0, function () {
4525
4716
  var data;
4526
4717
  return __generator(this, function (_a) {
4527
4718
  switch (_a.label) {
4528
- case 0: return [4 /*yield*/, api.POST("files/filtered", filter, exports.Api.PrepReqParams())];
4719
+ case 0: return [4 /*yield*/, api.POST("files/filtered", filter, exports.Api.PrepReqParams(reqParams))];
4529
4720
  case 1:
4530
4721
  data = _a.sent();
4531
4722
  return [2 /*return*/, data.Items];
@@ -4544,7 +4735,7 @@
4544
4735
  EConvertExt["GLB"] = ".glb";
4545
4736
  EConvertExt["SKP"] = ".skp";
4546
4737
  })(EConvertExt = Processor.EConvertExt || (Processor.EConvertExt = {}));
4547
- function ConvertFormat(api, clientFileId, ext) {
4738
+ function ConvertFormat(api, clientFileId, ext, reqParams) {
4548
4739
  return __awaiter(this, void 0, void 0, function () {
4549
4740
  return __generator(this, function (_a) {
4550
4741
  if (!clientFileId || !ext) {
@@ -4554,7 +4745,7 @@
4554
4745
  clientFileId: clientFileId,
4555
4746
  destinationFormat: ext,
4556
4747
  operations: []
4557
- })];
4748
+ }, reqParams)];
4558
4749
  });
4559
4750
  });
4560
4751
  }
@@ -4577,7 +4768,7 @@
4577
4768
  EProgramId["BingMaps"] = "BingMaps";
4578
4769
  EProgramId["Mapbox"] = "Mapbox";
4579
4770
  })(EProgramId = ProgramKey.EProgramId || (ProgramKey.EProgramId = {}));
4580
- function Get(api, programId) {
4771
+ function Get(api, programId, reqParams) {
4581
4772
  return __awaiter(this, void 0, void 0, function () {
4582
4773
  var key, cacheData, req;
4583
4774
  return __generator(this, function (_a) {
@@ -4585,23 +4776,23 @@
4585
4776
  throw ("Program ID is required.");
4586
4777
  }
4587
4778
  key = GetCacheKey(programId);
4588
- cacheData = api.Cache.Get(key);
4779
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4589
4780
  if (cacheData) {
4590
4781
  return [2 /*return*/, cacheData];
4591
4782
  }
4592
- req = api.GET("programkey/" + programId, exports.Api.PrepReqParams());
4783
+ req = api.GET("programkey/" + programId, exports.Api.PrepReqParams(reqParams));
4593
4784
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
4594
4785
  return [2 /*return*/, req];
4595
4786
  });
4596
4787
  });
4597
4788
  }
4598
4789
  ProgramKey.Get = Get;
4599
- function GetList(api) {
4790
+ function GetList(api, reqParams) {
4600
4791
  return __awaiter(this, void 0, void 0, function () {
4601
4792
  var cacheData, req;
4602
4793
  var _this = this;
4603
4794
  return __generator(this, function (_a) {
4604
- cacheData = api.Cache.Get(GetListCacheKey());
4795
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
4605
4796
  if (cacheData) {
4606
4797
  return [2 /*return*/, cacheData];
4607
4798
  }
@@ -4611,7 +4802,7 @@
4611
4802
  switch (_a.label) {
4612
4803
  case 0:
4613
4804
  _a.trys.push([0, 2, , 3]);
4614
- return [4 /*yield*/, api.GET("programkeys", exports.Api.PrepReqParams())];
4805
+ return [4 /*yield*/, api.GET("programkeys", exports.Api.PrepReqParams(reqParams))];
4615
4806
  case 1:
4616
4807
  data = _a.sent();
4617
4808
  res(data.Items);
@@ -4630,7 +4821,7 @@
4630
4821
  });
4631
4822
  }
4632
4823
  ProgramKey.GetList = GetList;
4633
- function Delete(api, programId) {
4824
+ function Delete(api, programId, reqParams) {
4634
4825
  return __awaiter(this, void 0, void 0, function () {
4635
4826
  return __generator(this, function (_a) {
4636
4827
  switch (_a.label) {
@@ -4638,7 +4829,7 @@
4638
4829
  if (!programId) {
4639
4830
  throw ("Program ID is required.");
4640
4831
  }
4641
- return [4 /*yield*/, api.DELETE("programkey/" + programId, exports.Api.PrepReqParams())];
4832
+ return [4 /*yield*/, api.DELETE("programkey/" + programId, exports.Api.PrepReqParams(reqParams))];
4642
4833
  case 1:
4643
4834
  _a.sent();
4644
4835
  api.Cache.Remove(GetCacheKey(programId));
@@ -4649,7 +4840,7 @@
4649
4840
  });
4650
4841
  }
4651
4842
  ProgramKey.Delete = Delete;
4652
- function Update(api, data) {
4843
+ function Update(api, data, reqParams) {
4653
4844
  return __awaiter(this, void 0, void 0, function () {
4654
4845
  return __generator(this, function (_a) {
4655
4846
  switch (_a.label) {
@@ -4657,7 +4848,7 @@
4657
4848
  if (!(data === null || data === void 0 ? void 0 : data.ProgramId)) {
4658
4849
  throw ("Program ID is required.");
4659
4850
  }
4660
- return [4 /*yield*/, api.POST("programkey", data, exports.Api.PrepReqParams())];
4851
+ return [4 /*yield*/, api.POST("programkey", data, exports.Api.PrepReqParams(reqParams))];
4661
4852
  case 1:
4662
4853
  data = _a.sent();
4663
4854
  api.Cache.Remove(GetCacheKey(data.ProgramId));
@@ -4711,7 +4902,7 @@
4711
4902
  EPivot["Weight"] = "weight";
4712
4903
  EPivot["UCS"] = "ucs";
4713
4904
  })(EPivot = Tileset.EPivot || (Tileset.EPivot = {}));
4714
- function Get(api, tilesetId, loadFiles) {
4905
+ function Get(api, tilesetId, loadFiles, reqParams) {
4715
4906
  if (loadFiles === void 0) { loadFiles = false; }
4716
4907
  return __awaiter(this, void 0, void 0, function () {
4717
4908
  var cacheData, req;
@@ -4719,23 +4910,23 @@
4719
4910
  if (!tilesetId) {
4720
4911
  throw ("Tileset ID is required.");
4721
4912
  }
4722
- cacheData = api.Cache.Get(GetCacheKey(tilesetId, loadFiles));
4913
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(tilesetId, loadFiles));
4723
4914
  if (cacheData) {
4724
4915
  return [2 /*return*/, cacheData];
4725
4916
  }
4726
- req = api.GET("tileset/get/" + tilesetId + "?noFiles=" + (loadFiles ? 0 : 1));
4917
+ req = api.GET("tileset/get/" + tilesetId + "?noFiles=" + (loadFiles ? 0 : 1), reqParams);
4727
4918
  api.Cache.Set(GetCacheKey(tilesetId, loadFiles), req, exports.Api.DEFAULT_CACHE_DURATION);
4728
4919
  return [2 /*return*/, req];
4729
4920
  });
4730
4921
  });
4731
4922
  }
4732
4923
  Tileset.Get = Get;
4733
- function GetList(api) {
4924
+ function GetList(api, reqParams) {
4734
4925
  return __awaiter(this, void 0, void 0, function () {
4735
4926
  var cacheData, req;
4736
4927
  var _this = this;
4737
4928
  return __generator(this, function (_a) {
4738
- cacheData = api.Cache.Get(GetListCacheKey());
4929
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
4739
4930
  if (cacheData) {
4740
4931
  return [2 /*return*/, cacheData];
4741
4932
  }
@@ -4745,7 +4936,7 @@
4745
4936
  switch (_a.label) {
4746
4937
  case 0:
4747
4938
  _a.trys.push([0, 2, , 3]);
4748
- return [4 /*yield*/, api.GET("tileset/getList")];
4939
+ return [4 /*yield*/, api.GET("tileset/getList", reqParams)];
4749
4940
  case 1:
4750
4941
  data = _a.sent();
4751
4942
  res(data);
@@ -4764,7 +4955,7 @@
4764
4955
  });
4765
4956
  }
4766
4957
  Tileset.GetList = GetList;
4767
- function Delete(api, tilesetId) {
4958
+ function Delete(api, tilesetId, reqParams) {
4768
4959
  return __awaiter(this, void 0, void 0, function () {
4769
4960
  return __generator(this, function (_a) {
4770
4961
  switch (_a.label) {
@@ -4772,7 +4963,7 @@
4772
4963
  if (!tilesetId) {
4773
4964
  throw ("Tileset ID is required.");
4774
4965
  }
4775
- return [4 /*yield*/, api.DELETE("tileset/delete/" + tilesetId)];
4966
+ return [4 /*yield*/, api.DELETE("tileset/delete/" + tilesetId, reqParams)];
4776
4967
  case 1:
4777
4968
  _a.sent();
4778
4969
  api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset + exports.Api.ECacheKey.Id + tilesetId);
@@ -4783,7 +4974,7 @@
4783
4974
  });
4784
4975
  }
4785
4976
  Tileset.Delete = Delete;
4786
- function Update(api, data) {
4977
+ function Update(api, data, reqParams) {
4787
4978
  return __awaiter(this, void 0, void 0, function () {
4788
4979
  var isNew, res;
4789
4980
  return __generator(this, function (_a) {
@@ -4794,12 +4985,12 @@
4794
4985
  }
4795
4986
  isNew = !data.id;
4796
4987
  if (!isNew) return [3 /*break*/, 2];
4797
- return [4 /*yield*/, api.GET("tileset/new?type=" + data.type + "&name=" + exports.Api.Encode(data.name))];
4988
+ return [4 /*yield*/, api.GET("tileset/new?type=" + data.type + "&name=" + exports.Api.Encode(data.name), reqParams)];
4798
4989
  case 1:
4799
4990
  res = _a.sent();
4800
4991
  data = __assign(__assign(__assign({}, res), data), { settings: __assign(__assign({}, res.settings), data.settings), id: res.id });
4801
4992
  _a.label = 2;
4802
- case 2: return [4 /*yield*/, api.POST("tileset/update/" + data.id, data, exports.Api.PrepReqParams())];
4993
+ case 2: return [4 /*yield*/, api.POST("tileset/update/" + data.id, data, exports.Api.PrepReqParams(reqParams))];
4803
4994
  case 3:
4804
4995
  _a.sent();
4805
4996
  api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.Tileset + exports.Api.ECacheKey.Id + data.id);
@@ -4810,21 +5001,20 @@
4810
5001
  });
4811
5002
  }
4812
5003
  Tileset.Update = Update;
4813
- function UploadFile(api, tilesetId, file, onProgress) {
5004
+ function UploadFile(api, tilesetId, file, reqParams) {
4814
5005
  return __awaiter(this, void 0, void 0, function () {
4815
5006
  var params;
4816
5007
  return __generator(this, function (_a) {
4817
5008
  if (!tilesetId || !file) {
4818
5009
  throw ("Tileset ID and file are required.");
4819
5010
  }
4820
- params = exports.Api.PrepReqParams();
4821
- params.onProgress = onProgress;
5011
+ params = exports.Api.PrepReqParams(reqParams);
4822
5012
  return [2 /*return*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/files", file, params)];
4823
5013
  });
4824
5014
  });
4825
5015
  }
4826
5016
  Tileset.UploadFile = UploadFile;
4827
- function DeleteFile(api, tilesetId, file) {
5017
+ function DeleteFile(api, tilesetId, file, reqParams) {
4828
5018
  return __awaiter(this, void 0, void 0, function () {
4829
5019
  return __generator(this, function (_a) {
4830
5020
  switch (_a.label) {
@@ -4832,7 +5022,7 @@
4832
5022
  if (!tilesetId || !file) {
4833
5023
  throw ("Tileset ID and file are required.");
4834
5024
  }
4835
- return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/files/" + file)];
5025
+ return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/files/" + file, reqParams)];
4836
5026
  case 1:
4837
5027
  _a.sent();
4838
5028
  api.Cache.Remove(GetCacheKey(tilesetId, true));
@@ -4842,7 +5032,7 @@
4842
5032
  });
4843
5033
  }
4844
5034
  Tileset.DeleteFile = DeleteFile;
4845
- function UploadSrcFile(api, tilesetId, file, onProgress) {
5035
+ function UploadSrcFile(api, tilesetId, file, reqParams) {
4846
5036
  return __awaiter(this, void 0, void 0, function () {
4847
5037
  var params;
4848
5038
  return __generator(this, function (_a) {
@@ -4851,8 +5041,7 @@
4851
5041
  if (!tilesetId || !file) {
4852
5042
  throw ("Tileset ID and file are required.");
4853
5043
  }
4854
- params = exports.Api.PrepReqParams();
4855
- params.onProgress = onProgress;
5044
+ params = exports.Api.PrepReqParams(reqParams);
4856
5045
  return [4 /*yield*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/src", file, params)];
4857
5046
  case 1:
4858
5047
  _a.sent();
@@ -4863,7 +5052,7 @@
4863
5052
  });
4864
5053
  }
4865
5054
  Tileset.UploadSrcFile = UploadSrcFile;
4866
- function DeleteSrcFile(api, tilesetId, file) {
5055
+ function DeleteSrcFile(api, tilesetId, file, reqParams) {
4867
5056
  return __awaiter(this, void 0, void 0, function () {
4868
5057
  return __generator(this, function (_a) {
4869
5058
  switch (_a.label) {
@@ -4871,7 +5060,7 @@
4871
5060
  if (!tilesetId || !file) {
4872
5061
  throw ("Tileset ID and file are required.");
4873
5062
  }
4874
- return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/src/" + file)];
5063
+ return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/src/" + file, reqParams)];
4875
5064
  case 1:
4876
5065
  _a.sent();
4877
5066
  api.Cache.Remove(GetCacheKey(tilesetId, true));
@@ -4911,7 +5100,7 @@
4911
5100
  return api.GetBaseUrl() + ("tileset/file/" + tilesetId + "/" + file);
4912
5101
  }
4913
5102
  Tileset.GetPublicFileUrl = GetPublicFileUrl;
4914
- function Generate(api, tilesetId) {
5103
+ function Generate(api, tilesetId, reqParams) {
4915
5104
  return __awaiter(this, void 0, void 0, function () {
4916
5105
  var res;
4917
5106
  return __generator(this, function (_a) {
@@ -4920,7 +5109,7 @@
4920
5109
  if (!tilesetId) {
4921
5110
  throw ("Tileset ID is required.");
4922
5111
  }
4923
- return [4 /*yield*/, api.GET("tileset/generate/" + tilesetId, exports.Api.PrepReqParams())];
5112
+ return [4 /*yield*/, api.GET("tileset/generate/" + tilesetId, exports.Api.PrepReqParams(reqParams))];
4924
5113
  case 1:
4925
5114
  res = _a.sent();
4926
5115
  return [2 /*return*/, res.ID];
@@ -4938,7 +5127,7 @@
4938
5127
  return exports.Api.ECacheKey.PublishTileset + exports.Api.ECacheKey.Id + accountId + exports.Api.ECacheKey.Id + tilesetId;
4939
5128
  }
4940
5129
  Publish.GetCacheKey = GetCacheKey;
4941
- function Update(api, data) {
5130
+ function Update(api, data, reqParams) {
4942
5131
  return __awaiter(this, void 0, void 0, function () {
4943
5132
  var res, req;
4944
5133
  return __generator(this, function (_a) {
@@ -4950,14 +5139,14 @@
4950
5139
  if (!data.ID) {
4951
5140
  data.ID = 0;
4952
5141
  }
4953
- return [4 /*yield*/, api.POST("tileset/" + data.ID, data)];
5142
+ return [4 /*yield*/, api.POST("tileset/" + data.ID, data, reqParams)];
4954
5143
  case 1:
4955
5144
  res = _a.sent();
4956
5145
  req = {
4957
5146
  "ClientAccount.ID": data["EnabledFor.ClientAccount.ID"]
4958
5147
  };
4959
5148
  data.ID = res.ID;
4960
- return [4 /*yield*/, api.POST("tileset/" + data.ID + "/enableForAccounts", req)];
5149
+ return [4 /*yield*/, api.POST("tileset/" + data.ID + "/enableForAccounts", req, reqParams)];
4961
5150
  case 2:
4962
5151
  _a.sent();
4963
5152
  api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"], data["Tileset.ID"]));
@@ -4968,25 +5157,25 @@
4968
5157
  });
4969
5158
  }
4970
5159
  Publish.Update = Update;
4971
- function Get(api, accountId, tilesetId) {
5160
+ function Get(api, accountId, tilesetId, reqParams) {
4972
5161
  return __awaiter(this, void 0, void 0, function () {
4973
5162
  var cacheData, req;
4974
5163
  return __generator(this, function (_a) {
4975
5164
  if (!accountId || !tilesetId) {
4976
5165
  throw ("Client account ID and tileset ID are required.");
4977
5166
  }
4978
- cacheData = api.Cache.Get(GetCacheKey(accountId, tilesetId));
5167
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(accountId, tilesetId));
4979
5168
  if (cacheData) {
4980
5169
  return [2 /*return*/, cacheData];
4981
5170
  }
4982
- req = api.GET("tilesetByPublisher/" + accountId + "/" + tilesetId);
5171
+ req = api.GET("tilesetByPublisher/" + accountId + "/" + tilesetId, reqParams);
4983
5172
  api.Cache.Set(GetCacheKey(accountId, tilesetId), req);
4984
5173
  return [2 /*return*/, req];
4985
5174
  });
4986
5175
  });
4987
5176
  }
4988
5177
  Publish.Get = Get;
4989
- function GetList(api, accountId) {
5178
+ function GetList(api, accountId, reqParams) {
4990
5179
  return __awaiter(this, void 0, void 0, function () {
4991
5180
  var cacheData, req;
4992
5181
  var _this = this;
@@ -4994,7 +5183,7 @@
4994
5183
  if (!accountId) {
4995
5184
  throw ("Client account ID is required.");
4996
5185
  }
4997
- cacheData = api.Cache.Get(GetCacheKey(accountId));
5186
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(accountId));
4998
5187
  if (cacheData) {
4999
5188
  return [2 /*return*/, cacheData];
5000
5189
  }
@@ -5004,7 +5193,7 @@
5004
5193
  switch (_a.label) {
5005
5194
  case 0:
5006
5195
  _a.trys.push([0, 2, , 3]);
5007
- return [4 /*yield*/, api.GET("tilesets/enabledForAccount/" + accountId)];
5196
+ return [4 /*yield*/, api.GET("tilesets/enabledForAccount/" + accountId, reqParams)];
5008
5197
  case 1:
5009
5198
  data = _a.sent();
5010
5199
  res(data.Items);
@@ -5150,7 +5339,7 @@
5150
5339
  (function (V2) {
5151
5340
  V2.DATA_VERSION = 2;
5152
5341
  })(V2 = ProjectViewBookmark.V2 || (ProjectViewBookmark.V2 = {}));
5153
- function Get(api, viewId, bookmarkId) {
5342
+ function Get(api, viewId, bookmarkId, reqParams) {
5154
5343
  return __awaiter(this, void 0, void 0, function () {
5155
5344
  var key, cacheData, req;
5156
5345
  return __generator(this, function (_a) {
@@ -5158,18 +5347,18 @@
5158
5347
  throw ("View ID and Bookmark ID are required.");
5159
5348
  }
5160
5349
  key = GetCacheKey(viewId, bookmarkId);
5161
- cacheData = api.Cache.Get(key);
5350
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
5162
5351
  if (cacheData) {
5163
5352
  return [2 /*return*/, cacheData];
5164
5353
  }
5165
- req = api.GET("ui.view/" + viewId + "/slide/" + bookmarkId, exports.Api.PrepReqParams());
5354
+ req = api.GET("ui.view/" + viewId + "/slide/" + bookmarkId, exports.Api.PrepReqParams(reqParams));
5166
5355
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
5167
5356
  return [2 /*return*/, req];
5168
5357
  });
5169
5358
  });
5170
5359
  }
5171
5360
  ProjectViewBookmark.Get = Get;
5172
- function Delete(api, viewId, bookmarkId) {
5361
+ function Delete(api, viewId, bookmarkId, reqParams) {
5173
5362
  return __awaiter(this, void 0, void 0, function () {
5174
5363
  return __generator(this, function (_a) {
5175
5364
  switch (_a.label) {
@@ -5177,7 +5366,7 @@
5177
5366
  if (!viewId || !bookmarkId) {
5178
5367
  throw ("View ID and Bookmark ID are required.");
5179
5368
  }
5180
- return [4 /*yield*/, api.DELETE("ui.view/" + viewId + "/slide/" + bookmarkId, exports.Api.PrepReqParams())];
5369
+ return [4 /*yield*/, api.DELETE("ui.view/" + viewId + "/slide/" + bookmarkId, exports.Api.PrepReqParams(reqParams))];
5181
5370
  case 1:
5182
5371
  _a.sent();
5183
5372
  api.Cache.Remove(GetCacheKey(viewId, bookmarkId));
@@ -5188,7 +5377,7 @@
5188
5377
  });
5189
5378
  }
5190
5379
  ProjectViewBookmark.Delete = Delete;
5191
- function GetList(api, viewId) {
5380
+ function GetList(api, viewId, reqParams) {
5192
5381
  return __awaiter(this, void 0, void 0, function () {
5193
5382
  var cacheData, req;
5194
5383
  var _this = this;
@@ -5196,7 +5385,7 @@
5196
5385
  if (!viewId) {
5197
5386
  throw ("View ID is required.");
5198
5387
  }
5199
- cacheData = api.Cache.Get(GetListCacheKey(viewId));
5388
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(viewId));
5200
5389
  if (cacheData) {
5201
5390
  return [2 /*return*/, cacheData];
5202
5391
  }
@@ -5206,7 +5395,7 @@
5206
5395
  switch (_a.label) {
5207
5396
  case 0:
5208
5397
  _a.trys.push([0, 2, , 3]);
5209
- return [4 /*yield*/, api.GET("ui.view/" + viewId + "/slides", exports.Api.PrepReqParams())];
5398
+ return [4 /*yield*/, api.GET("ui.view/" + viewId + "/slides", exports.Api.PrepReqParams(reqParams))];
5210
5399
  case 1:
5211
5400
  data = _a.sent();
5212
5401
  res(data.Items);
@@ -5225,7 +5414,7 @@
5225
5414
  });
5226
5415
  }
5227
5416
  ProjectViewBookmark.GetList = GetList;
5228
- function Update(api, viewId, data) {
5417
+ function Update(api, viewId, data, reqParams) {
5229
5418
  return __awaiter(this, void 0, void 0, function () {
5230
5419
  return __generator(this, function (_a) {
5231
5420
  switch (_a.label) {
@@ -5233,7 +5422,7 @@
5233
5422
  if (!(data === null || data === void 0 ? void 0 : data.Title)) {
5234
5423
  data.Title = data.ID;
5235
5424
  }
5236
- return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slide/" + (data.ID ? data.ID : ""), data, exports.Api.PrepReqParams())];
5425
+ return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slide/" + (data.ID ? data.ID : ""), data, exports.Api.PrepReqParams(reqParams))];
5237
5426
  case 1:
5238
5427
  data = _a.sent();
5239
5428
  api.Cache.Remove(GetCacheKey(viewId, data.ID));
@@ -5244,7 +5433,7 @@
5244
5433
  });
5245
5434
  }
5246
5435
  ProjectViewBookmark.Update = Update;
5247
- function SetOrder(api, viewId, bookmarkIds) {
5436
+ function SetOrder(api, viewId, bookmarkIds, reqParams) {
5248
5437
  return __awaiter(this, void 0, void 0, function () {
5249
5438
  var reqData;
5250
5439
  return __generator(this, function (_a) {
@@ -5254,7 +5443,7 @@
5254
5443
  "UISlide.ID": bookmarkIds,
5255
5444
  "DisplayOrder.Start": 0
5256
5445
  };
5257
- return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slides/setOrder", reqData, exports.Api.PrepReqParams())];
5446
+ return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slides/setOrder", reqData, exports.Api.PrepReqParams(reqParams))];
5258
5447
  case 1:
5259
5448
  _a.sent();
5260
5449
  api.Cache.RemoveByStartsWith(GetListCacheKey(viewId));
@@ -5286,7 +5475,7 @@
5286
5475
  (function (V2) {
5287
5476
  V2.DATA_VERSION = 2;
5288
5477
  })(V2 = ProjectView.V2 || (ProjectView.V2 = {}));
5289
- function Get(api, viewId) {
5478
+ function Get(api, viewId, reqParams) {
5290
5479
  return __awaiter(this, void 0, void 0, function () {
5291
5480
  var key, cacheData, req;
5292
5481
  return __generator(this, function (_a) {
@@ -5294,23 +5483,23 @@
5294
5483
  throw ("View ID is required.");
5295
5484
  }
5296
5485
  key = GetCacheKey(viewId);
5297
- cacheData = api.Cache.Get(key);
5486
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
5298
5487
  if (cacheData) {
5299
5488
  return [2 /*return*/, cacheData];
5300
5489
  }
5301
- req = api.GET("ui.view/" + viewId, exports.Api.PrepReqParams());
5490
+ req = api.GET("ui.view/" + viewId, exports.Api.PrepReqParams(reqParams));
5302
5491
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
5303
5492
  return [2 /*return*/, req];
5304
5493
  });
5305
5494
  });
5306
5495
  }
5307
5496
  ProjectView.Get = Get;
5308
- function GetList(api) {
5497
+ function GetList(api, reqParams) {
5309
5498
  return __awaiter(this, void 0, void 0, function () {
5310
5499
  var cacheData, req;
5311
5500
  var _this = this;
5312
5501
  return __generator(this, function (_a) {
5313
- cacheData = api.Cache.Get(GetListCacheKey());
5502
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
5314
5503
  if (cacheData) {
5315
5504
  return [2 /*return*/, cacheData];
5316
5505
  }
@@ -5320,7 +5509,7 @@
5320
5509
  switch (_a.label) {
5321
5510
  case 0:
5322
5511
  _a.trys.push([0, 2, , 3]);
5323
- return [4 /*yield*/, api.GET("ui.view/list", exports.Api.PrepReqParams())];
5512
+ return [4 /*yield*/, api.GET("ui.view/list", exports.Api.PrepReqParams(reqParams))];
5324
5513
  case 1:
5325
5514
  data = _a.sent();
5326
5515
  res(data.Items);
@@ -5339,7 +5528,7 @@
5339
5528
  });
5340
5529
  }
5341
5530
  ProjectView.GetList = GetList;
5342
- function Delete(api, viewId) {
5531
+ function Delete(api, viewId, reqParams) {
5343
5532
  return __awaiter(this, void 0, void 0, function () {
5344
5533
  return __generator(this, function (_a) {
5345
5534
  switch (_a.label) {
@@ -5347,7 +5536,7 @@
5347
5536
  if (!viewId) {
5348
5537
  throw ("View ID is required.");
5349
5538
  }
5350
- return [4 /*yield*/, api.DELETE("ui.view/" + viewId, exports.Api.PrepReqParams())];
5539
+ return [4 /*yield*/, api.DELETE("ui.view/" + viewId, exports.Api.PrepReqParams(reqParams))];
5351
5540
  case 1:
5352
5541
  _a.sent();
5353
5542
  api.Cache.Remove(GetCacheKey(viewId));
@@ -5358,7 +5547,7 @@
5358
5547
  });
5359
5548
  }
5360
5549
  ProjectView.Delete = Delete;
5361
- function Update(api, data) {
5550
+ function Update(api, data, reqParams) {
5362
5551
  return __awaiter(this, void 0, void 0, function () {
5363
5552
  var isNew;
5364
5553
  return __generator(this, function (_a) {
@@ -5378,11 +5567,11 @@
5378
5567
  data.CreatedByUIVersion = "-1";
5379
5568
  }
5380
5569
  if (!isNew) return [3 /*break*/, 2];
5381
- return [4 /*yield*/, api.POST("ui.view/" + data.ID, data, exports.Api.PrepReqParams())];
5570
+ return [4 /*yield*/, api.POST("ui.view/" + data.ID, data, exports.Api.PrepReqParams(reqParams))];
5382
5571
  case 1:
5383
5572
  data = _a.sent();
5384
5573
  return [3 /*break*/, 4];
5385
- case 2: return [4 /*yield*/, api.PUT("ui.view/" + data.ID, data, exports.Api.PrepReqParams())];
5574
+ case 2: return [4 /*yield*/, api.PUT("ui.view/" + data.ID, data, exports.Api.PrepReqParams(reqParams))];
5386
5575
  case 3:
5387
5576
  data = _a.sent();
5388
5577
  _a.label = 4;
@@ -5397,13 +5586,13 @@
5397
5586
  ProjectView.Update = Update;
5398
5587
  })(exports.ProjectView || (exports.ProjectView = {}));
5399
5588
 
5400
- function getTemplateSettings(apiGetter) {
5589
+ function getTemplateSettings(apiGetter, reqParams) {
5401
5590
  var _a;
5402
5591
  return __awaiter(this, void 0, void 0, function () {
5403
5592
  var view;
5404
5593
  return __generator(this, function (_b) {
5405
5594
  switch (_b.label) {
5406
- case 0: return [4 /*yield*/, exports.ProjectView.Get(apiGetter.getApi(exports.Api.TEMPLATE_ACCOUNT_ID), "default")];
5595
+ case 0: return [4 /*yield*/, exports.ProjectView.Get(apiGetter.getApi(exports.Api.TEMPLATE_ACCOUNT_ID), "default", reqParams)];
5407
5596
  case 1:
5408
5597
  view = _b.sent();
5409
5598
  return [2 /*return*/, (_a = view.Settings) !== null && _a !== void 0 ? _a : {}];
@@ -5424,13 +5613,13 @@
5424
5613
  }
5425
5614
  }
5426
5615
  (function (ProjectViewLegacyTile) {
5427
- function MergeMapTemplateData(getter, items, addIfMissing) {
5616
+ function MergeMapTemplateData(getter, items, addIfMissing, reqParams) {
5428
5617
  var _a;
5429
5618
  return __awaiter(this, void 0, void 0, function () {
5430
5619
  var settings, maps, i, mapSource;
5431
5620
  return __generator(this, function (_b) {
5432
5621
  switch (_b.label) {
5433
- case 0: return [4 /*yield*/, getTemplateSettings(getter)];
5622
+ case 0: return [4 /*yield*/, getTemplateSettings(getter, reqParams)];
5434
5623
  case 1:
5435
5624
  settings = _b.sent();
5436
5625
  maps = (_a = settings.CesiumMapSources) !== null && _a !== void 0 ? _a : [];
@@ -5444,13 +5633,13 @@
5444
5633
  });
5445
5634
  }
5446
5635
  ProjectViewLegacyTile.MergeMapTemplateData = MergeMapTemplateData;
5447
- function MergeTerrainTemplateData(getter, items, addIfMissing) {
5636
+ function MergeTerrainTemplateData(getter, items, addIfMissing, reqParams) {
5448
5637
  var _a;
5449
5638
  return __awaiter(this, void 0, void 0, function () {
5450
5639
  var settings, terrains, i, terrainSource;
5451
5640
  return __generator(this, function (_b) {
5452
5641
  switch (_b.label) {
5453
- case 0: return [4 /*yield*/, getTemplateSettings(getter)];
5642
+ case 0: return [4 /*yield*/, getTemplateSettings(getter, reqParams)];
5454
5643
  case 1:
5455
5644
  settings = _b.sent();
5456
5645
  terrains = (_a = settings.CesiumTerrainSources) !== null && _a !== void 0 ? _a : [];
@@ -5590,24 +5779,24 @@
5590
5779
  EStatus["Complete"] = "COMPLETE";
5591
5780
  EStatus["Failed"] = "FAILED";
5592
5781
  })(EStatus = PendingAction.EStatus || (PendingAction.EStatus = {}));
5593
- function Get(api, actionId) {
5782
+ function Get(api, actionId, reqParams) {
5594
5783
  return __awaiter(this, void 0, void 0, function () {
5595
5784
  return __generator(this, function (_a) {
5596
5785
  if (!actionId) {
5597
5786
  throw ("Action ID is required.");
5598
5787
  }
5599
- return [2 /*return*/, api.GET("pendingAction/" + actionId, exports.Api.PrepReqParams())];
5788
+ return [2 /*return*/, api.GET("pendingAction/" + actionId, exports.Api.PrepReqParams(reqParams))];
5600
5789
  });
5601
5790
  });
5602
5791
  }
5603
5792
  PendingAction.Get = Get;
5604
- function GetRelevantList(api, stricter) {
5793
+ function GetRelevantList(api, stricter, reqParams) {
5605
5794
  if (stricter === void 0) { stricter = false; }
5606
5795
  return __awaiter(this, void 0, void 0, function () {
5607
5796
  var data;
5608
5797
  return __generator(this, function (_a) {
5609
5798
  switch (_a.label) {
5610
- case 0: return [4 /*yield*/, api.GET("pendingActions/important?Update=" + stricter, exports.Api.PrepReqParams())];
5799
+ case 0: return [4 /*yield*/, api.GET("pendingActions/important?Update=" + stricter, exports.Api.PrepReqParams(reqParams))];
5611
5800
  case 1:
5612
5801
  data = _a.sent();
5613
5802
  return [2 /*return*/, data.Items];
@@ -5616,7 +5805,7 @@
5616
5805
  });
5617
5806
  }
5618
5807
  PendingAction.GetRelevantList = GetRelevantList;
5619
- function GetMessages(api, actionId, order, startIndex, amount) {
5808
+ function GetMessages(api, actionId, order, startIndex, amount, reqParams) {
5620
5809
  return __awaiter(this, void 0, void 0, function () {
5621
5810
  var args, data;
5622
5811
  return __generator(this, function (_a) {
@@ -5632,7 +5821,7 @@
5632
5821
  order = exports.Api.ESortOrder.Asc;
5633
5822
  }
5634
5823
  args = "?SortOrder=" + (order == exports.Api.ESortOrder.Desc ? "DESC" : "ASC") + "&PageSize=" + amount + "&PageIndex=" + startIndex;
5635
- return [4 /*yield*/, api.GET("pendingAction/" + actionId + "/progressMessages" + args, exports.Api.PrepReqParams())];
5824
+ return [4 /*yield*/, api.GET("pendingAction/" + actionId + "/progressMessages" + args, exports.Api.PrepReqParams(reqParams))];
5636
5825
  case 1:
5637
5826
  data = _a.sent();
5638
5827
  return [2 /*return*/, data.Items];
@@ -5663,9 +5852,9 @@
5663
5852
  EPointType["Icon"] = "ICON";
5664
5853
  EPointType["Cylinder"] = "CYLINDER";
5665
5854
  })(EPointType = Style.EPointType || (Style.EPointType = {}));
5666
- function GetList(api) {
5855
+ function GetList(api, reqParams) {
5667
5856
  var _this = this;
5668
- var cacheData = api.Cache.Get(GetListCacheKey());
5857
+ var cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
5669
5858
  if (cacheData) {
5670
5859
  return cacheData;
5671
5860
  }
@@ -5675,7 +5864,7 @@
5675
5864
  switch (_a.label) {
5676
5865
  case 0:
5677
5866
  _a.trys.push([0, 2, , 3]);
5678
- return [4 /*yield*/, api.GET("ui.entityDisplaySettings", exports.Api.PrepReqParams())];
5867
+ return [4 /*yield*/, api.GET("ui.entityDisplaySettings", exports.Api.PrepReqParams(reqParams))];
5679
5868
  case 1:
5680
5869
  data = _a.sent();
5681
5870
  res(data.Items);
@@ -5692,20 +5881,20 @@
5692
5881
  return req;
5693
5882
  }
5694
5883
  Style.GetList = GetList;
5695
- function Get(api, id) {
5884
+ function Get(api, id, reqParams) {
5696
5885
  if (!id) {
5697
5886
  throw ("Style ID is required.");
5698
5887
  }
5699
- var cacheData = api.Cache.Get(GetCacheKey(id));
5888
+ var cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
5700
5889
  if (cacheData) {
5701
5890
  return cacheData;
5702
5891
  }
5703
- var req = api.GET("ui.entityDisplaySetting/" + id, exports.Api.PrepReqParams());
5892
+ var req = api.GET("ui.entityDisplaySetting/" + id, exports.Api.PrepReqParams(reqParams));
5704
5893
  api.Cache.Set(GetCacheKey(id), req, exports.Api.DEFAULT_CACHE_DURATION);
5705
5894
  return req;
5706
5895
  }
5707
5896
  Style.Get = Get;
5708
- function Update(api, data) {
5897
+ function Update(api, data, reqParams) {
5709
5898
  return __awaiter(this, void 0, void 0, function () {
5710
5899
  return __generator(this, function (_a) {
5711
5900
  switch (_a.label) {
@@ -5716,7 +5905,7 @@
5716
5905
  if (!data.ID) {
5717
5906
  data.ID = 0;
5718
5907
  }
5719
- return [4 /*yield*/, api.POST("ui.entityDisplaySetting/" + data.ID, data, exports.Api.PrepReqParams())];
5908
+ return [4 /*yield*/, api.POST("ui.entityDisplaySetting/" + data.ID, data, exports.Api.PrepReqParams(reqParams))];
5720
5909
  case 1:
5721
5910
  data = _a.sent();
5722
5911
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -5727,7 +5916,7 @@
5727
5916
  });
5728
5917
  }
5729
5918
  Style.Update = Update;
5730
- function Delete(api, id) {
5919
+ function Delete(api, id, reqParams) {
5731
5920
  return __awaiter(this, void 0, void 0, function () {
5732
5921
  return __generator(this, function (_a) {
5733
5922
  switch (_a.label) {
@@ -5735,7 +5924,7 @@
5735
5924
  if (!id) {
5736
5925
  throw ("Style ID is required.");
5737
5926
  }
5738
- return [4 /*yield*/, api.DELETE("ui.entityDisplaySetting/" + id, exports.Api.PrepReqParams())];
5927
+ return [4 /*yield*/, api.DELETE("ui.entityDisplaySetting/" + id, exports.Api.PrepReqParams(reqParams))];
5739
5928
  case 1:
5740
5929
  _a.sent();
5741
5930
  api.Cache.Remove(GetCacheKey(id));
@@ -5798,7 +5987,7 @@
5798
5987
  function GetCacheKey(sessionId) {
5799
5988
  return "" + exports.Api.ECacheKey.Session + exports.Api.ECacheKey.Id + sessionId;
5800
5989
  }
5801
- function Get(api, sessionId) {
5990
+ function Get(api, sessionId, reqParams) {
5802
5991
  return __awaiter(this, void 0, void 0, function () {
5803
5992
  var key, cacheData, req;
5804
5993
  return __generator(this, function (_a) {
@@ -5806,18 +5995,18 @@
5806
5995
  throw ("Session ID is required.");
5807
5996
  }
5808
5997
  key = GetCacheKey(sessionId);
5809
- cacheData = api.Cache.Get(key);
5998
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
5810
5999
  if (cacheData) {
5811
6000
  return [2 /*return*/, cacheData];
5812
6001
  }
5813
- req = api.GET("session/" + sessionId);
6002
+ req = api.GET("session/" + sessionId, reqParams);
5814
6003
  api.Cache.Set(key, req, exports.Api.DEFAULT_CACHE_DURATION);
5815
6004
  return [2 /*return*/, req];
5816
6005
  });
5817
6006
  });
5818
6007
  }
5819
6008
  Session.Get = Get;
5820
- function Login(api, username, password, accountId) {
6009
+ function Login(api, username, password, accountId, reqParams) {
5821
6010
  return __awaiter(this, void 0, void 0, function () {
5822
6011
  var data, session, ssid;
5823
6012
  return __generator(this, function (_a) {
@@ -5830,7 +6019,7 @@
5830
6019
  account: accountId ? accountId : "",
5831
6020
  login: username,
5832
6021
  password: password
5833
- })];
6022
+ }, reqParams)];
5834
6023
  case 1:
5835
6024
  data = _a.sent();
5836
6025
  session = data === null || data === void 0 ? void 0 : data.Session;
@@ -5843,7 +6032,7 @@
5843
6032
  });
5844
6033
  }
5845
6034
  Session.Login = Login;
5846
- function Logout(api) {
6035
+ function Logout(api, reqParams) {
5847
6036
  return __awaiter(this, void 0, void 0, function () {
5848
6037
  var ssid;
5849
6038
  return __generator(this, function (_a) {
@@ -5851,7 +6040,7 @@
5851
6040
  case 0:
5852
6041
  ssid = api.GetSessionId();
5853
6042
  if (!ssid) return [3 /*break*/, 2];
5854
- return [4 /*yield*/, api.POST("logout", null)];
6043
+ return [4 /*yield*/, api.POST("logout", null, reqParams)];
5855
6044
  case 1:
5856
6045
  _a.sent();
5857
6046
  api.SetSessionId(null);
@@ -5909,18 +6098,18 @@
5909
6098
  })(exports.Session || (exports.Session = {}));
5910
6099
 
5911
6100
  (function (UserGroup) {
5912
- function GetByName(api, accountId, name) {
6101
+ function GetByName(api, accountId, name, reqParams) {
5913
6102
  return __awaiter(this, void 0, void 0, function () {
5914
6103
  return __generator(this, function (_a) {
5915
6104
  if (!name || !accountId) {
5916
6105
  throw ("Name and AccountID are required.");
5917
6106
  }
5918
- return [2 /*return*/, api.GET("account/" + accountId + "/userGroupByName/" + name)];
6107
+ return [2 /*return*/, api.GET("account/" + accountId + "/userGroupByName/" + name, reqParams)];
5919
6108
  });
5920
6109
  });
5921
6110
  }
5922
6111
  UserGroup.GetByName = GetByName;
5923
- function GetUsers(api, accountId, id) {
6112
+ function GetUsers(api, accountId, id, reqParams) {
5924
6113
  return __awaiter(this, void 0, void 0, function () {
5925
6114
  var data;
5926
6115
  return __generator(this, function (_a) {
@@ -5929,7 +6118,7 @@
5929
6118
  if (!accountId || !id) {
5930
6119
  throw ("AccountID and ID are required.");
5931
6120
  }
5932
- return [4 /*yield*/, api.GET("userGroup/" + accountId + "/" + id + "/users")];
6121
+ return [4 /*yield*/, api.GET("userGroup/" + accountId + "/" + id + "/users", reqParams)];
5933
6122
  case 1:
5934
6123
  data = _a.sent();
5935
6124
  return [2 /*return*/, data.Items];
@@ -5938,7 +6127,7 @@
5938
6127
  });
5939
6128
  }
5940
6129
  UserGroup.GetUsers = GetUsers;
5941
- function GetListByPerm(api, accountId, perm) {
6130
+ function GetListByPerm(api, accountId, perm, reqParams) {
5942
6131
  return __awaiter(this, void 0, void 0, function () {
5943
6132
  var data;
5944
6133
  return __generator(this, function (_a) {
@@ -5947,7 +6136,7 @@
5947
6136
  if (!accountId || !perm) {
5948
6137
  throw ("AccountID and Perm are required.");
5949
6138
  }
5950
- return [4 /*yield*/, api.GET("userGroupsByFeature/" + accountId + "/" + perm)];
6139
+ return [4 /*yield*/, api.GET("userGroupsByFeature/" + accountId + "/" + perm, reqParams)];
5951
6140
  case 1:
5952
6141
  data = _a.sent();
5953
6142
  return [2 /*return*/, data.Items];
@@ -5956,7 +6145,7 @@
5956
6145
  });
5957
6146
  }
5958
6147
  UserGroup.GetListByPerm = GetListByPerm;
5959
- function GetList(api, accountId) {
6148
+ function GetList(api, accountId, reqParams) {
5960
6149
  return __awaiter(this, void 0, void 0, function () {
5961
6150
  var data;
5962
6151
  return __generator(this, function (_a) {
@@ -5965,7 +6154,7 @@
5965
6154
  if (!accountId) {
5966
6155
  throw ("AccountID is required.");
5967
6156
  }
5968
- return [4 /*yield*/, api.GET("userGroups/" + accountId)];
6157
+ return [4 /*yield*/, api.GET("userGroups/" + accountId, reqParams)];
5969
6158
  case 1:
5970
6159
  data = _a.sent();
5971
6160
  return [2 /*return*/, data.Items];
@@ -5974,18 +6163,18 @@
5974
6163
  });
5975
6164
  }
5976
6165
  UserGroup.GetList = GetList;
5977
- function Delete(api, accountId, id) {
6166
+ function Delete(api, accountId, id, reqParams) {
5978
6167
  return __awaiter(this, void 0, void 0, function () {
5979
6168
  return __generator(this, function (_a) {
5980
6169
  if (!accountId || !id) {
5981
6170
  throw ("AccountID and ID are required.");
5982
6171
  }
5983
- return [2 /*return*/, api.DELETE("account/" + accountId + "/userGroupID/" + id)];
6172
+ return [2 /*return*/, api.DELETE("account/" + accountId + "/userGroupID/" + id, reqParams)];
5984
6173
  });
5985
6174
  });
5986
6175
  }
5987
6176
  UserGroup.Delete = Delete;
5988
- function Update(api, data) {
6177
+ function Update(api, data, reqParams) {
5989
6178
  return __awaiter(this, void 0, void 0, function () {
5990
6179
  return __generator(this, function (_a) {
5991
6180
  switch (_a.label) {
@@ -5993,7 +6182,7 @@
5993
6182
  if (!data.Name || !data["ClientAccount.ID"]) {
5994
6183
  throw ("User group name and client account ID are required.");
5995
6184
  }
5996
- return [4 /*yield*/, api.POST("userGroup" + (data.ID ? ("/" + data.ID) : ""), data)];
6185
+ return [4 /*yield*/, api.POST("userGroup" + (data.ID ? ("/" + data.ID) : ""), data, reqParams)];
5997
6186
  case 1:
5998
6187
  data = _a.sent();
5999
6188
  return [2 /*return*/, data];
@@ -6024,7 +6213,7 @@
6024
6213
  EType["User"] = "LOGIN_USER";
6025
6214
  EType["AccessToken"] = "ACCESS_TOKEN";
6026
6215
  })(EType = User.EType || (User.EType = {}));
6027
- function Get(api, id, accountId) {
6216
+ function Get(api, id, accountId, reqParams) {
6028
6217
  return __awaiter(this, void 0, void 0, function () {
6029
6218
  var cacheData, req;
6030
6219
  return __generator(this, function (_a) {
@@ -6033,11 +6222,11 @@
6033
6222
  if (!id) {
6034
6223
  throw ("ID is required.");
6035
6224
  }
6036
- cacheData = api.Cache.Get(GetCacheKey(id, accountId));
6225
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id, accountId));
6037
6226
  if (cacheData) {
6038
6227
  return [2 /*return*/, cacheData];
6039
6228
  }
6040
- return [4 /*yield*/, api.GET("user/" + id + (accountId ? "?clientAccountID=" + accountId : ""))];
6229
+ return [4 /*yield*/, api.GET("user/" + id + (accountId ? "?clientAccountID=" + accountId : ""), reqParams)];
6041
6230
  case 1:
6042
6231
  req = _a.sent();
6043
6232
  api.Cache.Set(GetCacheKey(id, accountId), req, exports.Api.DEFAULT_CACHE_DURATION);
@@ -6047,7 +6236,7 @@
6047
6236
  });
6048
6237
  }
6049
6238
  User.Get = Get;
6050
- function Update(api, data) {
6239
+ function Update(api, data, reqParams) {
6051
6240
  return __awaiter(this, void 0, void 0, function () {
6052
6241
  return __generator(this, function (_a) {
6053
6242
  switch (_a.label) {
@@ -6055,7 +6244,7 @@
6055
6244
  if (!(data === null || data === void 0 ? void 0 : data.ID) || !(data === null || data === void 0 ? void 0 : data.Type)) {
6056
6245
  throw ("ID and Type are required.");
6057
6246
  }
6058
- return [4 /*yield*/, api.POST("user/" + data.ID, data)];
6247
+ return [4 /*yield*/, api.POST("user/" + data.ID, data, reqParams)];
6059
6248
  case 1:
6060
6249
  data = _a.sent();
6061
6250
  api.Cache.RemoveByContains(exports.Api.ECacheKey.User + exports.Api.ECacheKey.Id + data.ID);
@@ -6071,7 +6260,7 @@
6071
6260
  });
6072
6261
  }
6073
6262
  User.Update = Update;
6074
- function GetUsernameAvailable(api, username) {
6263
+ function GetUsernameAvailable(api, username, reqParams) {
6075
6264
  return __awaiter(this, void 0, void 0, function () {
6076
6265
  var req, prom;
6077
6266
  var _this = this;
@@ -6079,7 +6268,7 @@
6079
6268
  if (!username) {
6080
6269
  throw ("Username is required.");
6081
6270
  }
6082
- req = api.GET("user/loginavailable/" + username);
6271
+ req = api.GET("user/loginavailable/" + username, reqParams);
6083
6272
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
6084
6273
  var data, e_1;
6085
6274
  return __generator(this, function (_a) {
@@ -6110,7 +6299,7 @@
6110
6299
  return exports.Api.ECacheKey.User + exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId;
6111
6300
  }
6112
6301
  LoginUser.GetListCacheKey = GetListCacheKey;
6113
- function GetByEmail(api, email, accountId) {
6302
+ function GetByEmail(api, email, accountId, reqParams) {
6114
6303
  return __awaiter(this, void 0, void 0, function () {
6115
6304
  var cacheData, req;
6116
6305
  return __generator(this, function (_a) {
@@ -6119,11 +6308,11 @@
6119
6308
  if (!email) {
6120
6309
  throw ("Email is required.");
6121
6310
  }
6122
- cacheData = api.Cache.Get(GetEmailCacheKey(email, accountId));
6311
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetEmailCacheKey(email, accountId));
6123
6312
  if (cacheData) {
6124
6313
  return [2 /*return*/, cacheData];
6125
6314
  }
6126
- return [4 /*yield*/, api.GET("userByEmail/" + email + (accountId ? "?clientAccountID=" + accountId : ""))];
6315
+ return [4 /*yield*/, api.GET("userByEmail/" + email + (accountId ? "?clientAccountID=" + accountId : ""), reqParams)];
6127
6316
  case 1:
6128
6317
  req = _a.sent();
6129
6318
  api.Cache.Set(GetEmailCacheKey(email, accountId), req, exports.Api.DEFAULT_CACHE_DURATION);
@@ -6133,7 +6322,7 @@
6133
6322
  });
6134
6323
  }
6135
6324
  LoginUser.GetByEmail = GetByEmail;
6136
- function GetList(api, accountId, exclusive) {
6325
+ function GetList(api, accountId, exclusive, reqParams) {
6137
6326
  return __awaiter(this, void 0, void 0, function () {
6138
6327
  var cacheData, req;
6139
6328
  var _this = this;
@@ -6144,7 +6333,7 @@
6144
6333
  if (!exclusive) {
6145
6334
  exclusive = false;
6146
6335
  }
6147
- cacheData = exclusive ? null : api.Cache.Get(GetListCacheKey(accountId));
6336
+ cacheData = exclusive || (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(accountId));
6148
6337
  if (cacheData) {
6149
6338
  return [2 /*return*/, cacheData];
6150
6339
  }
@@ -6154,7 +6343,7 @@
6154
6343
  switch (_a.label) {
6155
6344
  case 0:
6156
6345
  _a.trys.push([0, 2, , 3]);
6157
- return [4 /*yield*/, api.GET("users?clientAccountID=" + accountId + (exclusive ? "&allExcludingClientAccount=true" : ""))];
6346
+ return [4 /*yield*/, api.GET("users?clientAccountID=" + accountId + (exclusive ? "&allExcludingClientAccount=true" : ""), reqParams)];
6158
6347
  case 1:
6159
6348
  data = _a.sent();
6160
6349
  res(data.Items);
@@ -6186,7 +6375,7 @@
6186
6375
  * @param email
6187
6376
  * @returns
6188
6377
  */
6189
- function Signup(api, email) {
6378
+ function Signup(api, email, reqParams) {
6190
6379
  return __awaiter(this, void 0, void 0, function () {
6191
6380
  return __generator(this, function (_a) {
6192
6381
  if (!email) {
@@ -6194,7 +6383,7 @@
6194
6383
  }
6195
6384
  return [2 /*return*/, api.POST("clientaccount/signup", {
6196
6385
  Email: email
6197
- })];
6386
+ }, reqParams)];
6198
6387
  });
6199
6388
  });
6200
6389
  }
@@ -6205,13 +6394,13 @@
6205
6394
  * @param expiredCode
6206
6395
  * @returns
6207
6396
  */
6208
- function SignupResend(api, expiredCode) {
6397
+ function SignupResend(api, expiredCode, reqParams) {
6209
6398
  return __awaiter(this, void 0, void 0, function () {
6210
6399
  return __generator(this, function (_a) {
6211
6400
  if (!expiredCode) {
6212
6401
  throw ("Expired activation code is required.");
6213
6402
  }
6214
- return [2 /*return*/, api.POST("clientaccount/signup/resend?activationKey=" + exports.Api.Encode(expiredCode), null)];
6403
+ return [2 /*return*/, api.POST("clientaccount/signup/resend?activationKey=" + exports.Api.Encode(expiredCode), null, reqParams)];
6215
6404
  });
6216
6405
  });
6217
6406
  }
@@ -6224,7 +6413,7 @@
6224
6413
  * @param accountId
6225
6414
  * @returns
6226
6415
  */
6227
- function SignupComplete(api, code, data, accountId) {
6416
+ function SignupComplete(api, code, data, accountId, reqParams) {
6228
6417
  return __awaiter(this, void 0, void 0, function () {
6229
6418
  var res;
6230
6419
  return __generator(this, function (_a) {
@@ -6237,7 +6426,7 @@
6237
6426
  data.IsActivated = true;
6238
6427
  data.IsDisabled = false;
6239
6428
  data.key = code;
6240
- return [4 /*yield*/, api.POST("UserActivate/" + (accountId ? accountId : ""), data)];
6429
+ return [4 /*yield*/, api.POST("UserActivate/" + (accountId ? accountId : ""), data, reqParams)];
6241
6430
  case 1:
6242
6431
  res = _a.sent();
6243
6432
  api.Cache.RemoveByContains(exports.Api.ECacheKey.User + exports.Api.ECacheKey.Id + res.ID);
@@ -6257,7 +6446,7 @@
6257
6446
  * @param email
6258
6447
  * @returns user id associated with provided email.
6259
6448
  */
6260
- function ForgotPassword(api, accountId, email) {
6449
+ function ForgotPassword(api, accountId, email, reqParams) {
6261
6450
  return __awaiter(this, void 0, void 0, function () {
6262
6451
  var req, prom;
6263
6452
  var _this = this;
@@ -6267,7 +6456,7 @@
6267
6456
  }
6268
6457
  req = api.POST("UserForgotPassword/" + accountId, {
6269
6458
  Email: email
6270
- });
6459
+ }, reqParams);
6271
6460
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
6272
6461
  var data, e_3;
6273
6462
  return __generator(this, function (_a) {
@@ -6300,7 +6489,7 @@
6300
6489
  * @param password
6301
6490
  * @returns
6302
6491
  */
6303
- function ForgotPasswordComplete(api, code, userId, password) {
6492
+ function ForgotPasswordComplete(api, code, userId, password, reqParams) {
6304
6493
  return __awaiter(this, void 0, void 0, function () {
6305
6494
  var user;
6306
6495
  return __generator(this, function (_a) {
@@ -6314,7 +6503,7 @@
6314
6503
  ActivationCode: code,
6315
6504
  Password: password,
6316
6505
  FullName: user.FullName
6317
- })];
6506
+ }, reqParams)];
6318
6507
  }
6319
6508
  });
6320
6509
  });
@@ -6327,12 +6516,12 @@
6327
6516
  return exports.Api.ECacheKey.AccessToken + exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId;
6328
6517
  }
6329
6518
  AccessToken.GetListCacheKey = GetListCacheKey;
6330
- function GetList(api, accountId) {
6519
+ function GetList(api, accountId, reqParams) {
6331
6520
  return __awaiter(this, void 0, void 0, function () {
6332
6521
  var cacheData, req;
6333
6522
  var _this = this;
6334
6523
  return __generator(this, function (_a) {
6335
- cacheData = api.Cache.Get(GetListCacheKey(accountId));
6524
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(accountId));
6336
6525
  if (cacheData) {
6337
6526
  return [2 /*return*/, cacheData];
6338
6527
  }
@@ -6342,7 +6531,7 @@
6342
6531
  switch (_a.label) {
6343
6532
  case 0:
6344
6533
  _a.trys.push([0, 2, , 3]);
6345
- return [4 /*yield*/, api.GET("usersByClientAccount/accessTokens")];
6534
+ return [4 /*yield*/, api.GET("usersByClientAccount/accessTokens", reqParams)];
6346
6535
  case 1:
6347
6536
  data = _a.sent();
6348
6537
  res(data.Items);
@@ -6366,11 +6555,11 @@
6366
6555
  });
6367
6556
  }
6368
6557
  AccessToken.GetList = GetList;
6369
- function Delete(api, id) {
6558
+ function Delete(api, id, reqParams) {
6370
6559
  return __awaiter(this, void 0, void 0, function () {
6371
6560
  return __generator(this, function (_a) {
6372
6561
  switch (_a.label) {
6373
- case 0: return [4 /*yield*/, api.DELETE("accessToken/" + id)];
6562
+ case 0: return [4 /*yield*/, api.DELETE("accessToken/" + id, reqParams)];
6374
6563
  case 1:
6375
6564
  _a.sent();
6376
6565
  api.Cache.RemoveByContains(exports.Api.ECacheKey.User + exports.Api.ECacheKey.Id + id);
@@ -6381,7 +6570,7 @@
6381
6570
  });
6382
6571
  }
6383
6572
  AccessToken.Delete = Delete;
6384
- function Create(api, data) {
6573
+ function Create(api, data, reqParams) {
6385
6574
  return __awaiter(this, void 0, void 0, function () {
6386
6575
  return __generator(this, function (_a) {
6387
6576
  switch (_a.label) {
@@ -6395,7 +6584,7 @@
6395
6584
  if (!data.Type) {
6396
6585
  data.Type = EType.AccessToken;
6397
6586
  }
6398
- return [4 /*yield*/, api.POST("accessToken", data)];
6587
+ return [4 /*yield*/, api.POST("accessToken", data, reqParams)];
6399
6588
  case 1:
6400
6589
  data = _a.sent();
6401
6590
  api.Cache.RemoveByStartsWith(exports.Api.ECacheKey.AccessToken + exports.Api.ECacheKey.Account);
@@ -6537,7 +6726,7 @@
6537
6726
  })(EReqKey = DataLab.EReqKey || (DataLab.EReqKey = {}));
6538
6727
  var Entity;
6539
6728
  (function (Entity) {
6540
- function GetList(api, query, key, skip, load) {
6729
+ function GetList(api, query, key, skip, load, reqParams) {
6541
6730
  return __awaiter(this, void 0, void 0, function () {
6542
6731
  var req, prom;
6543
6732
  var _this = this;
@@ -6551,7 +6740,7 @@
6551
6740
  if (!load) {
6552
6741
  load = 50;
6553
6742
  }
6554
- req = api.POST("entities/datalab/getMatchingEntities/" + key + "?skip=" + skip + "&load=" + load, query, exports.Api.PrepReqParams());
6743
+ req = api.POST("entities/datalab/getMatchingEntities/" + key + "?skip=" + skip + "&load=" + load, query, exports.Api.PrepReqParams(reqParams));
6555
6744
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
6556
6745
  var data, e_1;
6557
6746
  return __generator(this, function (_a) {
@@ -6580,18 +6769,18 @@
6580
6769
  })(exports.DataLab || (exports.DataLab = {}));
6581
6770
 
6582
6771
  (function (ImportCad) {
6583
- function Analyze(api, params) {
6772
+ function Analyze(api, params, reqParams) {
6584
6773
  return __awaiter(this, void 0, void 0, function () {
6585
6774
  return __generator(this, function (_a) {
6586
- return [2 /*return*/, api.POST("entities/PrepareIFCForImport", params, exports.Api.PrepReqParams())];
6775
+ return [2 /*return*/, api.POST("entities/PrepareIFCForImport", params, exports.Api.PrepReqParams(reqParams))];
6587
6776
  });
6588
6777
  });
6589
6778
  }
6590
6779
  ImportCad.Analyze = Analyze;
6591
- function ImportEntities(api, params) {
6780
+ function ImportEntities(api, params, reqParams) {
6592
6781
  return __awaiter(this, void 0, void 0, function () {
6593
6782
  return __generator(this, function (_a) {
6594
- return [2 /*return*/, api.POST("entities/importIFCWithProgress", params, exports.Api.PrepReqParams())];
6783
+ return [2 /*return*/, api.POST("entities/importIFCWithProgress", params, exports.Api.PrepReqParams(reqParams))];
6595
6784
  });
6596
6785
  });
6597
6786
  }
@@ -6618,10 +6807,10 @@
6618
6807
  })(exports.ImportCad || (exports.ImportCad = {}));
6619
6808
 
6620
6809
  (function (ImportCsv) {
6621
- function ImportEntities(api, params) {
6810
+ function ImportEntities(api, params, reqParams) {
6622
6811
  return __awaiter(this, void 0, void 0, function () {
6623
6812
  return __generator(this, function (_a) {
6624
- return [2 /*return*/, api.POST("entities/importCSVWithProgress2", params, exports.Api.PrepReqParams())];
6813
+ return [2 /*return*/, api.POST("entities/importCSVWithProgress2", params, exports.Api.PrepReqParams(reqParams))];
6625
6814
  });
6626
6815
  });
6627
6816
  }
@@ -6629,10 +6818,10 @@
6629
6818
  })(exports.ImportCsv || (exports.ImportCsv = {}));
6630
6819
 
6631
6820
  (function (ImportJson) {
6632
- function ImportEntities(api, params) {
6821
+ function ImportEntities(api, params, reqParams) {
6633
6822
  return __awaiter(this, void 0, void 0, function () {
6634
6823
  return __generator(this, function (_a) {
6635
- return [2 /*return*/, api.POST("entities/importJsonWithProgress", params, exports.Api.PrepReqParams())];
6824
+ return [2 /*return*/, api.POST("entities/importJsonWithProgress", params, exports.Api.PrepReqParams(reqParams))];
6636
6825
  });
6637
6826
  });
6638
6827
  }
@@ -6640,10 +6829,10 @@
6640
6829
  })(exports.ImportJson || (exports.ImportJson = {}));
6641
6830
 
6642
6831
  (function (ImportKml) {
6643
- function ImportEntities(api, params) {
6832
+ function ImportEntities(api, params, reqParams) {
6644
6833
  return __awaiter(this, void 0, void 0, function () {
6645
6834
  return __generator(this, function (_a) {
6646
- return [2 /*return*/, api.POST("entities/importKMLWithProgress2", params, exports.Api.PrepReqParams())];
6835
+ return [2 /*return*/, api.POST("entities/importKMLWithProgress2", params, exports.Api.PrepReqParams(reqParams))];
6647
6836
  });
6648
6837
  });
6649
6838
  }
@@ -6664,7 +6853,7 @@
6664
6853
  EFileType["CAD"] = "CAD";
6665
6854
  EFileType["All"] = "All";
6666
6855
  })(EFileType = ImportedFile.EFileType || (ImportedFile.EFileType = {}));
6667
- function GetList(api, type, pageIndex) {
6856
+ function GetList(api, type, pageIndex, reqParams) {
6668
6857
  return __awaiter(this, void 0, void 0, function () {
6669
6858
  var cacheData, first, url, req, prom;
6670
6859
  var _this = this;
@@ -6675,7 +6864,7 @@
6675
6864
  if (!pageIndex) {
6676
6865
  pageIndex = 0;
6677
6866
  }
6678
- cacheData = api.Cache.Get(GetListCacheKey(type, pageIndex));
6867
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(type, pageIndex));
6679
6868
  if (cacheData) {
6680
6869
  return [2 /*return*/, cacheData];
6681
6870
  }
@@ -6688,7 +6877,7 @@
6688
6877
  if (pageIndex > 0) {
6689
6878
  url += (first ? "?" : "&") + "pageIndex=" + pageIndex;
6690
6879
  }
6691
- req = api.GET(url, exports.Api.PrepReqParams());
6880
+ req = api.GET(url, exports.Api.PrepReqParams(reqParams));
6692
6881
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
6693
6882
  var data, e_1;
6694
6883
  return __generator(this, function (_a) {
@@ -6714,15 +6903,15 @@
6714
6903
  });
6715
6904
  }
6716
6905
  ImportedFile.GetList = GetList;
6717
- function Get(api, fileId) {
6906
+ function Get(api, fileId, reqParams) {
6718
6907
  return __awaiter(this, void 0, void 0, function () {
6719
6908
  var cacheData, req;
6720
6909
  return __generator(this, function (_a) {
6721
- cacheData = api.Cache.Get(GetCacheKey(fileId));
6910
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(fileId));
6722
6911
  if (cacheData) {
6723
6912
  return [2 /*return*/, cacheData];
6724
6913
  }
6725
- req = api.GET("entityImportFile/" + fileId, exports.Api.PrepReqParams());
6914
+ req = api.GET("entityImportFile/" + fileId, exports.Api.PrepReqParams(reqParams));
6726
6915
  api.Cache.Set(GetCacheKey(fileId), req, exports.Api.DEFAULT_CACHE_DURATION);
6727
6916
  return [2 /*return*/, req];
6728
6917
  });
@@ -6731,6 +6920,153 @@
6731
6920
  ImportedFile.Get = Get;
6732
6921
  })(exports.ImportedFile || (exports.ImportedFile = {}));
6733
6922
 
6923
+ /**
6924
+ * Description of a "Markup" which is stored in custom-form or bookmark records.
6925
+ */
6926
+ (function (Markup) {
6927
+ var Element;
6928
+ (function (Element) {
6929
+ var Div;
6930
+ (function (Div) {
6931
+ // Types of div that can be created.
6932
+ var EType;
6933
+ (function (EType) {
6934
+ // Default, no special handling.
6935
+ EType["Default"] = "default";
6936
+ // Callout, assumes it will be positioned in 3d space.
6937
+ // Assumes existence of line that is used to anchor it.
6938
+ EType["Callout"] = "callout";
6939
+ })(EType = Div.EType || (Div.EType = {}));
6940
+ // Describes expected content of a row cell.
6941
+ var EItemType;
6942
+ (function (EItemType) {
6943
+ // Default, no special handling.
6944
+ EItemType["Default"] = "DEFAULT";
6945
+ // Embed, assume content is html.
6946
+ // Make it take over the whole cell instead of padding it and such.
6947
+ EItemType["Embed"] = "EMBED";
6948
+ })(EItemType = Div.EItemType || (Div.EItemType = {}));
6949
+ var ItemAction;
6950
+ (function (ItemAction) {
6951
+ // Types of actions that can be performed when a cell is clicked.
6952
+ // Null = "NONE".
6953
+ var EType;
6954
+ (function (EType) {
6955
+ EType["None"] = "NONE";
6956
+ // Open a link specified in params.
6957
+ EType["OpenLink"] = "LINK";
6958
+ // Open the markup's entity's details panel.
6959
+ EType["OpenInfoView"] = "INFOVIEW";
6960
+ // Open the markup's entity's gallery popup.
6961
+ EType["OpenEntityGallery"] = "GALLERY";
6962
+ // Toggle visibility of the markup's entity's relationships.
6963
+ EType["ToggleRelationships"] = "RELATIONSHIPS";
6964
+ // Dictates this cell can be used to drag the div around.
6965
+ EType["Draggable"] = "DRAGABBLE";
6966
+ // Closes the markup.
6967
+ EType["Close"] = "CLOSE";
6968
+ // Opens a bookmark specified in params.
6969
+ EType["OpenBookmark"] = "BOOKMARK";
6970
+ })(EType = ItemAction.EType || (ItemAction.EType = {}));
6971
+ })(ItemAction = Div.ItemAction || (Div.ItemAction = {}));
6972
+ })(Div = Element.Div || (Element.Div = {}));
6973
+ var Drawing;
6974
+ (function (Drawing) {
6975
+ var Line;
6976
+ (function (Line) {
6977
+ // Dictates where on a DIV an anchor should snap to.
6978
+ var EAnchorDivSide;
6979
+ (function (EAnchorDivSide) {
6980
+ EAnchorDivSide[EAnchorDivSide["TopLeft"] = 0] = "TopLeft";
6981
+ EAnchorDivSide[EAnchorDivSide["TopRight"] = 1] = "TopRight";
6982
+ EAnchorDivSide[EAnchorDivSide["BottomLeft"] = 2] = "BottomLeft";
6983
+ EAnchorDivSide[EAnchorDivSide["BottomRight"] = 3] = "BottomRight";
6984
+ EAnchorDivSide[EAnchorDivSide["Center"] = 4] = "Center";
6985
+ EAnchorDivSide[EAnchorDivSide["CenterLeft"] = 5] = "CenterLeft";
6986
+ EAnchorDivSide[EAnchorDivSide["CenterRight"] = 6] = "CenterRight";
6987
+ EAnchorDivSide[EAnchorDivSide["CenterTop"] = 7] = "CenterTop";
6988
+ EAnchorDivSide[EAnchorDivSide["CenterBottom"] = 8] = "CenterBottom";
6989
+ })(EAnchorDivSide = Line.EAnchorDivSide || (Line.EAnchorDivSide = {}));
6990
+ // Dictates what end of the line an anchor should render on.
6991
+ var EAnchorLineSide;
6992
+ (function (EAnchorLineSide) {
6993
+ EAnchorLineSide[EAnchorLineSide["Start"] = 0] = "Start";
6994
+ EAnchorLineSide[EAnchorLineSide["End"] = 1] = "End";
6995
+ })(EAnchorLineSide = Line.EAnchorLineSide || (Line.EAnchorLineSide = {}));
6996
+ // Types of anchor heads when anchor is used in context of a line.
6997
+ // None means the anchor is transparent.
6998
+ var EAnchorHeadStyle;
6999
+ (function (EAnchorHeadStyle) {
7000
+ EAnchorHeadStyle["None"] = "NONE";
7001
+ EAnchorHeadStyle["Circle"] = "CIRCLE";
7002
+ EAnchorHeadStyle["Arrow"] = "ARROW";
7003
+ })(EAnchorHeadStyle = Line.EAnchorHeadStyle || (Line.EAnchorHeadStyle = {}));
7004
+ Line.DEFAULT = {
7005
+ brushColor: "rgba(255, 255, 255, 1)",
7006
+ brushSize: 4,
7007
+ path: null,
7008
+ pathType: "LINE",
7009
+ transform: null,
7010
+ snaps: null
7011
+ };
7012
+ })(Line = Drawing.Line || (Drawing.Line = {}));
7013
+ var FreePaint;
7014
+ (function (FreePaint) {
7015
+ FreePaint.DEFAULT = {
7016
+ brushColor: "rgba(255, 255, 255, 1)",
7017
+ brushSize: 4,
7018
+ path: null,
7019
+ pathType: "PLAIN",
7020
+ transform: null
7021
+ };
7022
+ })(FreePaint = Drawing.FreePaint || (Drawing.FreePaint = {}));
7023
+ })(Drawing = Element.Drawing || (Element.Drawing = {}));
7024
+ var Entity3d;
7025
+ (function (Entity3d) {
7026
+ var Polygon;
7027
+ (function (Polygon) {
7028
+ // Determines if terrain and 3d models should be overlapped or not.
7029
+ var EClassificationType;
7030
+ (function (EClassificationType) {
7031
+ // 3d models and terrain are overlapped.
7032
+ EClassificationType["Both"] = "BOTH";
7033
+ // Only terrain is overlapped.
7034
+ EClassificationType["Terrain"] = "TERRAIN";
7035
+ })(EClassificationType = Polygon.EClassificationType || (Polygon.EClassificationType = {}));
7036
+ Polygon.DEFAULT = {
7037
+ id: null,
7038
+ positions: null,
7039
+ color: "rgba(254, 234, 57, 0.54)",
7040
+ outlineColor: "rgba(215, 215, 215, 0)",
7041
+ outlineWidth: 2,
7042
+ extrudedHeight: 0,
7043
+ classificationType: EClassificationType.Both,
7044
+ smoothen: 0
7045
+ };
7046
+ })(Polygon = Entity3d.Polygon || (Entity3d.Polygon = {}));
7047
+ var Polyline;
7048
+ (function (Polyline) {
7049
+ Polyline.DEFAULT = {
7050
+ id: null,
7051
+ positions: null,
7052
+ color: "rgba(254, 234, 57, 0.54)",
7053
+ outlineWidth: 4,
7054
+ smoothen: 0
7055
+ };
7056
+ })(Polyline = Entity3d.Polyline || (Entity3d.Polyline = {}));
7057
+ var Circle;
7058
+ (function (Circle) {
7059
+ Circle.DEFAULT = {
7060
+ id: null,
7061
+ position: null,
7062
+ radius: 50,
7063
+ color: "rgba(254, 234, 57, 0.54)"
7064
+ };
7065
+ })(Circle = Entity3d.Circle || (Entity3d.Circle = {}));
7066
+ })(Entity3d = Element.Entity3d || (Element.Entity3d = {}));
7067
+ })(Element = Markup.Element || (Markup.Element = {}));
7068
+ })(exports.Markup || (exports.Markup = {}));
7069
+
6734
7070
  exports.AbstractApi = AbstractApi;
6735
7071
  exports.BruceEvent = BruceEvent;
6736
7072
  exports.CacheControl = CacheControl;