bruce-models 0.8.4 → 0.8.5

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
@@ -150,10 +150,16 @@ var Api;
150
150
  /**
151
151
  * Prepares default settings for a request to Bruce Api.
152
152
  * Our requests WRONGLY have utf-16 for 95% of them. Please be wary of that.
153
+ * @param base
153
154
  * @returns
154
155
  */
155
- function PrepReqParams() {
156
- return { response: { encoding: Api.EEncoding.UTF16 } };
156
+ function PrepReqParams(base) {
157
+ base = __assign({}, base);
158
+ base.headers = __assign({}, base.headers);
159
+ if (!base.headers.encoding) {
160
+ base.headers.encoding = Api.EEncoding.UTF16;
161
+ }
162
+ return base;
157
163
  }
158
164
  Api.PrepReqParams = PrepReqParams;
159
165
  })(Api || (Api = {}));
@@ -176,7 +182,7 @@ var AnnDocument;
176
182
  (function (EType) {
177
183
  EType["SVG"] = "SVG";
178
184
  })(EType = AnnDocument.EType || (AnnDocument.EType = {}));
179
- function Get(api, docId) {
185
+ function Get(api, docId, reqParams) {
180
186
  return __awaiter(this, void 0, void 0, function () {
181
187
  var key, cacheData, req;
182
188
  return __generator(this, function (_a) {
@@ -184,18 +190,18 @@ var AnnDocument;
184
190
  throw ("Doc ID is required.");
185
191
  }
186
192
  key = GetCacheKey(docId);
187
- cacheData = api.Cache.Get(key);
193
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
188
194
  if (cacheData) {
189
195
  return [2 /*return*/, cacheData];
190
196
  }
191
- req = api.GET("documentView/" + docId, Api.PrepReqParams());
197
+ req = api.GET("documentView/" + docId, Api.PrepReqParams(reqParams));
192
198
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
193
199
  return [2 /*return*/, req];
194
200
  });
195
201
  });
196
202
  }
197
203
  AnnDocument.Get = Get;
198
- function GetList(api, type) {
204
+ function GetList(api, type, reqParams) {
199
205
  return __awaiter(this, void 0, void 0, function () {
200
206
  var cacheData, req;
201
207
  var _this = this;
@@ -203,7 +209,7 @@ var AnnDocument;
203
209
  if (!type) {
204
210
  type = "";
205
211
  }
206
- cacheData = api.Cache.Get(GetListCacheKey(type));
212
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(type));
207
213
  if (cacheData) {
208
214
  return [2 /*return*/, cacheData];
209
215
  }
@@ -214,7 +220,7 @@ var AnnDocument;
214
220
  case 0:
215
221
  _a.trys.push([0, 2, , 3]);
216
222
  url = "documentViews" + (type ? "?type=" + type : "");
217
- return [4 /*yield*/, api.GET(url, Api.PrepReqParams())];
223
+ return [4 /*yield*/, api.GET(url, Api.PrepReqParams(reqParams))];
218
224
  case 1:
219
225
  data = _a.sent();
220
226
  res(data.Items);
@@ -257,25 +263,25 @@ var CustomForm;
257
263
  EType["Form"] = "GENERIC";
258
264
  EType["Markup"] = "MARKUP";
259
265
  })(EType = CustomForm.EType || (CustomForm.EType = {}));
260
- function Get(api, id) {
266
+ function Get(api, id, reqParams) {
261
267
  return __awaiter(this, void 0, void 0, function () {
262
268
  var cacheData, req;
263
269
  return __generator(this, function (_a) {
264
270
  if (!id) {
265
271
  throw ("Id is required.");
266
272
  }
267
- cacheData = api.Cache.Get(GetCacheKey(id));
273
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
268
274
  if (cacheData) {
269
275
  return [2 /*return*/, cacheData];
270
276
  }
271
- req = api.GET("customForm/" + id, Api.PrepReqParams());
277
+ req = api.GET("customForm/" + id, Api.PrepReqParams(reqParams));
272
278
  api.Cache.Set(GetCacheKey(id), req, Api.DEFAULT_CACHE_DURATION);
273
279
  return [2 /*return*/, req];
274
280
  });
275
281
  });
276
282
  }
277
283
  CustomForm.Get = Get;
278
- function Delete(api, id) {
284
+ function Delete(api, id, reqParams) {
279
285
  return __awaiter(this, void 0, void 0, function () {
280
286
  return __generator(this, function (_a) {
281
287
  switch (_a.label) {
@@ -283,7 +289,7 @@ var CustomForm;
283
289
  if (!id) {
284
290
  throw ("Id is required.");
285
291
  }
286
- return [4 /*yield*/, api.DELETE("customForm/" + id, Api.PrepReqParams())];
292
+ return [4 /*yield*/, api.DELETE("customForm/" + id, Api.PrepReqParams(reqParams))];
287
293
  case 1:
288
294
  _a.sent();
289
295
  api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
@@ -293,16 +299,16 @@ var CustomForm;
293
299
  });
294
300
  }
295
301
  CustomForm.Delete = Delete;
296
- function GetList(api, typeId) {
302
+ function GetList(api, typeId, reqParams) {
297
303
  return __awaiter(this, void 0, void 0, function () {
298
304
  var url, cacheData, req, prom;
299
305
  return __generator(this, function (_a) {
300
306
  url = typeId ? "entityType/" + typeId + "/customForms" : "customForms";
301
- cacheData = api.Cache.Get(GetListCacheKey(typeId));
307
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(typeId));
302
308
  if (cacheData) {
303
309
  return [2 /*return*/, cacheData];
304
310
  }
305
- req = api.GET(url, Api.PrepReqParams());
311
+ req = api.GET(url, Api.PrepReqParams(reqParams));
306
312
  prom = req.then(function (data) {
307
313
  return data.Items;
308
314
  });
@@ -312,7 +318,7 @@ var CustomForm;
312
318
  });
313
319
  }
314
320
  CustomForm.GetList = GetList;
315
- function Update(api, data) {
321
+ function Update(api, data, reqParams) {
316
322
  return __awaiter(this, void 0, void 0, function () {
317
323
  return __generator(this, function (_a) {
318
324
  switch (_a.label) {
@@ -320,7 +326,7 @@ var CustomForm;
320
326
  if (!data.ID) {
321
327
  data.ID = 0;
322
328
  }
323
- return [4 /*yield*/, api.POST("customForm/" + data.ID, data, Api.PrepReqParams())];
329
+ return [4 /*yield*/, api.POST("customForm/" + data.ID, data, Api.PrepReqParams(reqParams))];
324
330
  case 1:
325
331
  data = _a.sent();
326
332
  api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
@@ -332,7 +338,36 @@ var CustomForm;
332
338
  CustomForm.Update = Update;
333
339
  })(CustomForm || (CustomForm = {}));
334
340
 
341
+ /**
342
+ * Describes content of a GENERIC type custom form.
343
+ * The alternative type is MARKUP (Markup.IMarkup).
344
+ */
345
+ var CustomFormContent;
346
+ (function (CustomFormContent) {
347
+ var ECellType;
348
+ (function (ECellType) {
349
+ ECellType[ECellType["StaticText"] = 0] = "StaticText";
350
+ ECellType[ECellType["DataValue"] = 1] = "DataValue";
351
+ ECellType[ECellType["StaticPicture"] = 2] = "StaticPicture";
352
+ ECellType[ECellType["SubSection"] = 3] = "SubSection";
353
+ ECellType[ECellType["ButtonMore"] = 4] = "ButtonMore";
354
+ ECellType[ECellType["EntityPhoto"] = 5] = "EntityPhoto";
355
+ ECellType[ECellType["EmbeddedMedia"] = 6] = "EmbeddedMedia";
356
+ ECellType[ECellType["Chart"] = 7] = "Chart";
357
+ })(ECellType = CustomFormContent.ECellType || (CustomFormContent.ECellType = {}));
358
+ var EFlowDirection;
359
+ (function (EFlowDirection) {
360
+ EFlowDirection["Vertically"] = "v";
361
+ EFlowDirection["Horizontally"] = "h";
362
+ })(EFlowDirection = CustomFormContent.EFlowDirection || (CustomFormContent.EFlowDirection = {}));
363
+ })(CustomFormContent || (CustomFormContent = {}));
364
+
335
365
  var CacheItem = /** @class */ (function () {
366
+ /**
367
+ * @param id
368
+ * @param data
369
+ * @param duration in seconds until considered expired.
370
+ */
336
371
  function CacheItem(id, data, duration) {
337
372
  this.Id = id;
338
373
  this.Data = data;
@@ -347,6 +382,13 @@ var CacheItem = /** @class */ (function () {
347
382
  };
348
383
  return CacheItem;
349
384
  }());
385
+ // Milliseconds between each data cleaning.
386
+ var CLEANER_INTERVAL = 5000;
387
+ // Max number of items to clean in each cleaning.
388
+ var MAX_CLEAN_BATCH = 100;
389
+ // (Default) Max idle time to keep the cleaner alive.
390
+ // Set to default API cache duration by default.
391
+ var DEFAULT_MAX_CLEAN_IDLE = 60 * 5;
350
392
  /**
351
393
  * Simple local cache controller.
352
394
  */
@@ -354,10 +396,26 @@ var CacheControl = /** @class */ (function () {
354
396
  function CacheControl() {
355
397
  this.data = {};
356
398
  this.Disabled = false;
399
+ this.cleanerInterval = null;
400
+ // Max idle time to keep the cleaner alive.
401
+ // This value is increased when a new item is added with a larger cache duration.
402
+ this.maxCleanIdle = DEFAULT_MAX_CLEAN_IDLE;
357
403
  }
404
+ /**
405
+ * @param id
406
+ * @param data
407
+ * @param duration seconds to keep the data in cache. -1 for infinite.
408
+ */
358
409
  CacheControl.prototype.Set = function (id, data, duration) {
359
410
  if (duration === void 0) { duration = -1; }
360
411
  this.data[id + ""] = new CacheItem(id + "", data, duration);
412
+ if (duration > -1) {
413
+ this.startCleaning();
414
+ if (this.maxCleanIdle < duration) {
415
+ // Add 5 seconds to be sure cleaner stays alive to get it.
416
+ this.maxCleanIdle = duration + 5;
417
+ }
418
+ }
361
419
  };
362
420
  CacheControl.prototype.Get = function (id) {
363
421
  if (this.Disabled) {
@@ -375,9 +433,13 @@ var CacheControl = /** @class */ (function () {
375
433
  };
376
434
  CacheControl.prototype.Clear = function () {
377
435
  this.data = {};
436
+ this.stopCleaning();
378
437
  };
379
438
  CacheControl.prototype.Remove = function (id) {
380
439
  delete this.data[id + ""];
440
+ if (Object.keys(this.data).length <= 0) {
441
+ this.stopCleaning();
442
+ }
381
443
  };
382
444
  CacheControl.prototype.RemoveByStartsWith = function (text) {
383
445
  for (var key in this.data) {
@@ -385,6 +447,9 @@ var CacheControl = /** @class */ (function () {
385
447
  delete this.data[key];
386
448
  }
387
449
  }
450
+ if (Object.keys(this.data).length <= 0) {
451
+ this.stopCleaning();
452
+ }
388
453
  };
389
454
  CacheControl.prototype.RemoveByContains = function (text) {
390
455
  for (var key in this.data) {
@@ -392,6 +457,9 @@ var CacheControl = /** @class */ (function () {
392
457
  delete this.data[key];
393
458
  }
394
459
  }
460
+ if (Object.keys(this.data).length <= 0) {
461
+ this.stopCleaning();
462
+ }
395
463
  };
396
464
  CacheControl.prototype.GetKeys = function () {
397
465
  if (this.Disabled) {
@@ -412,6 +480,51 @@ var CacheControl = /** @class */ (function () {
412
480
  }
413
481
  return values;
414
482
  };
483
+ CacheControl.prototype.startCleaning = function () {
484
+ var _this = this;
485
+ if (this.cleanerInterval == null) {
486
+ var cleanIdleStart_1 = null;
487
+ this.cleanerInterval = setInterval(function () {
488
+ var cleaned = 0;
489
+ for (var key in _this.data) {
490
+ var item = _this.data[key];
491
+ if (item.IsExpired()) {
492
+ delete _this.data[key];
493
+ cleaned += 1;
494
+ }
495
+ if (cleaned >= MAX_CLEAN_BATCH) {
496
+ break;
497
+ }
498
+ }
499
+ if (cleaned <= 0) {
500
+ // Stop cleaner if nothing in cache.
501
+ if (Object.keys(_this.data).length <= 0) {
502
+ _this.stopCleaning();
503
+ }
504
+ // Stop cleaner if idle time is reached.
505
+ else {
506
+ if (cleanIdleStart_1 == null) {
507
+ cleanIdleStart_1 = new Date().getTime();
508
+ }
509
+ var now = new Date().getTime();
510
+ if (now - cleanIdleStart_1 > _this.maxCleanIdle * 1000) {
511
+ _this.stopCleaning();
512
+ }
513
+ }
514
+ }
515
+ else {
516
+ cleanIdleStart_1 = null;
517
+ }
518
+ }, CLEANER_INTERVAL);
519
+ }
520
+ };
521
+ CacheControl.prototype.stopCleaning = function () {
522
+ if (this.cleanerInterval != null) {
523
+ clearInterval(this.cleanerInterval);
524
+ this.cleanerInterval = null;
525
+ this.maxCleanIdle = DEFAULT_MAX_CLEAN_IDLE;
526
+ }
527
+ };
415
528
  return CacheControl;
416
529
  }());
417
530
 
@@ -685,17 +798,17 @@ var Account;
685
798
  value: EDbRegion.Australia
686
799
  }
687
800
  ];
688
- function Get(api, id) {
801
+ function Get(api, id, reqParams) {
689
802
  return __awaiter(this, void 0, void 0, function () {
690
803
  var cacheData, req;
691
804
  return __generator(this, function (_a) {
692
805
  switch (_a.label) {
693
806
  case 0:
694
- cacheData = api.Cache.Get(GetCacheKey(id));
807
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
695
808
  if (cacheData) {
696
809
  return [2 /*return*/, cacheData];
697
810
  }
698
- return [4 /*yield*/, api.GET("account/" + id)];
811
+ return [4 /*yield*/, api.GET("account/" + id, reqParams)];
699
812
  case 1:
700
813
  req = _a.sent();
701
814
  api.Cache.Set(GetCacheKey(id), req, Api.DEFAULT_CACHE_DURATION);
@@ -705,16 +818,16 @@ var Account;
705
818
  });
706
819
  }
707
820
  Account.Get = Get;
708
- function GetRelatedList(api) {
821
+ function GetRelatedList(api, reqParams) {
709
822
  return __awaiter(this, void 0, void 0, function () {
710
823
  var cacheData, req, prom;
711
824
  var _this = this;
712
825
  return __generator(this, function (_a) {
713
- cacheData = api.Cache.Get(GetListCacheKey(api.GetSessionId()));
826
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(api.GetSessionId()));
714
827
  if (cacheData) {
715
828
  return [2 /*return*/, cacheData];
716
829
  }
717
- req = api.GET("user/relatedClientAccounts");
830
+ req = api.GET("user/relatedClientAccounts", reqParams);
718
831
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
719
832
  var data, items, e_1;
720
833
  return __generator(this, function (_a) {
@@ -741,18 +854,18 @@ var Account;
741
854
  });
742
855
  }
743
856
  Account.GetRelatedList = GetRelatedList;
744
- function GetAppSettings(api, id, appId) {
857
+ function GetAppSettings(api, id, appId, reqParams) {
745
858
  return __awaiter(this, void 0, void 0, function () {
746
859
  var cacheData, req, prom;
747
860
  var _this = this;
748
861
  return __generator(this, function (_a) {
749
862
  switch (_a.label) {
750
863
  case 0:
751
- cacheData = api.Cache.Get(GetCacheKey(id, appId));
864
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id, appId));
752
865
  if (cacheData) {
753
866
  return [2 /*return*/, cacheData];
754
867
  }
755
- return [4 /*yield*/, api.GET("account/" + id + "?ApplicationID=" + appId)];
868
+ return [4 /*yield*/, api.GET("account/" + id + "?ApplicationID=" + appId, reqParams)];
756
869
  case 1:
757
870
  req = _a.sent();
758
871
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
@@ -789,13 +902,14 @@ var Account;
789
902
  * @param id
790
903
  * @param appId
791
904
  * @param data
905
+ * @param reqParams
792
906
  * @returns
793
907
  */
794
- function UpdateAppSettings(api, id, appId, data) {
908
+ function UpdateAppSettings(api, id, appId, data, reqParams) {
795
909
  return __awaiter(this, void 0, void 0, function () {
796
910
  return __generator(this, function (_a) {
797
911
  switch (_a.label) {
798
- case 0: return [4 /*yield*/, api.POST("account/" + id + "/applicationSettings/" + appId, data)];
912
+ case 0: return [4 /*yield*/, api.POST("account/" + id + "/applicationSettings/" + appId, data, reqParams)];
799
913
  case 1:
800
914
  data = _a.sent();
801
915
  api.Cache.RemoveByStartsWith(Api.ECacheKey.Account + Api.ECacheKey.Id + id);
@@ -812,9 +926,10 @@ var Account;
812
926
  * @param name
813
927
  * @param region
814
928
  * @param starterContent
929
+ * @param reqParams
815
930
  * @returns
816
931
  */
817
- function Create(api, id, name, region, starterContent) {
932
+ function Create(api, id, name, region, starterContent, reqParams) {
818
933
  return __awaiter(this, void 0, void 0, function () {
819
934
  var reqData, res;
820
935
  return __generator(this, function (_a) {
@@ -829,7 +944,7 @@ var Account;
829
944
  "DBLocation": region,
830
945
  "StarterContent": starterContent
831
946
  };
832
- res = api.POST("clientAccount/" + id, reqData, Api.PrepReqParams());
947
+ res = api.POST("clientAccount/" + id, reqData, Api.PrepReqParams(reqParams));
833
948
  api.Cache.Remove(GetListCacheKey(api.GetSessionId()));
834
949
  return [2 /*return*/, res];
835
950
  });
@@ -838,106 +953,29 @@ var Account;
838
953
  Account.Create = Create;
839
954
  })(Account || (Account = {}));
840
955
 
841
- /**
842
- * This is the request handler for Cam Api,
843
- * it should be passed to any method that wants to communicate with this particular api.
844
- */
845
- var CamApi;
846
- (function (CamApi) {
847
- var Api$$1 = /** @class */ (function (_super) {
848
- __extends(Api$$1, _super);
849
- function Api$$1(env) {
850
- var _this = _super.call(this, "SSID") || this;
851
- _this.baseUrl = "";
852
- _this.env = env !== null && env !== void 0 ? env : Api.EEnv.PROD;
853
- _this.setBaseUrl();
854
- return _this;
855
- }
856
- Api$$1.prototype.setBaseUrl = function () {
857
- var prefix = "https://cam.nextspace";
858
- var url;
859
- var env = this.env.toUpperCase();
860
- switch (env) {
861
- case Api.EEnv.DEV:
862
- url = prefix + "-dev.net/";
863
- break;
864
- case Api.EEnv.STG:
865
- url = prefix + "-stg.net/";
866
- break;
867
- case Api.EEnv.UAT:
868
- url = prefix + "-uat.net/";
869
- break;
870
- case Api.EEnv.PROD:
871
- url = prefix + ".host/";
872
- break;
873
- default:
874
- throw ("Specified Environment is not valid. SuppliedEnv=" + env);
875
- }
876
- this.baseUrl = url;
877
- };
878
- Api$$1.prototype.GetBaseUrl = function () {
879
- return this.baseUrl;
880
- };
881
- Api$$1.prototype.SetBaseUrl = function (url) {
882
- this.baseUrl = url;
883
- if (!this.baseUrl.endsWith("/")) {
884
- this.baseUrl += "/";
885
- }
886
- };
887
- Api$$1.prototype.GET = function (url, params) {
888
- return __awaiter(this, void 0, void 0, function () {
889
- return __generator(this, function (_a) {
890
- return [2 /*return*/, this.get(this.baseUrl + url, params)];
891
- });
892
- });
893
- };
894
- Api$$1.prototype.DELETE = function (url, params) {
895
- return __awaiter(this, void 0, void 0, function () {
896
- return __generator(this, function (_a) {
897
- return [2 /*return*/, this.delete(this.baseUrl + url, params)];
898
- });
899
- });
900
- };
901
- Api$$1.prototype.POST = function (url, data, params) {
902
- return __awaiter(this, void 0, void 0, function () {
903
- return __generator(this, function (_a) {
904
- return [2 /*return*/, this.post(this.baseUrl + url, data, params)];
905
- });
906
- });
907
- };
908
- Api$$1.prototype.UPLOAD = function (url, blob, params) {
909
- return __awaiter(this, void 0, void 0, function () {
910
- return __generator(this, function (_a) {
911
- return [2 /*return*/, this.upload(this.baseUrl + url, blob, params)];
912
- });
913
- });
914
- };
915
- return Api$$1;
916
- }(AbstractApi));
917
- CamApi.Api = Api$$1;
918
- })(CamApi || (CamApi = {}));
919
-
920
956
  var MessageBroker;
921
957
  (function (MessageBroker) {
922
- var Action;
923
- (function (Action) {
924
- Action["SUBSCRIBE"] = "subscribe";
925
- Action["SUBSCRIBE_SHADOW"] = "subscribeShadow";
926
- Action["UNSUBSCRIBE"] = "unsubscribe";
927
- Action["BROADCAST"] = "broadcast";
928
- Action["GET_TOPIC_SUBSCRIBERS"] = "getTopicSubscribers"; // requests topic subscribers without subscribing
929
- })(Action = MessageBroker.Action || (MessageBroker.Action = {}));
958
+ var EAction;
959
+ (function (EAction) {
960
+ EAction["SUBSCRIBE"] = "subscribe";
961
+ EAction["SUBSCRIBE_SHADOW"] = "subscribeShadow";
962
+ EAction["UNSUBSCRIBE"] = "unsubscribe";
963
+ EAction["BROADCAST"] = "broadcast";
964
+ EAction["GET_TOPIC_SUBSCRIBERS"] = "getTopicSubscribers"; // requests topic subscribers without subscribing
965
+ })(EAction = MessageBroker.EAction || (MessageBroker.EAction = {}));
930
966
  /** Events types any component may get from server */
931
- var Event;
932
- (function (Event) {
933
- Event["SAVED"] = "saved";
934
- Event["UPDATED"] = "updated";
935
- Event["DELETED"] = "deleted";
936
- Event["EDIT_STARTED"] = "editStarted";
937
- Event["EDIT_FINISHED"] = "editFinished";
938
- Event["USERS_UPDATE"] = "usersUpdate";
939
- })(Event = MessageBroker.Event || (MessageBroker.Event = {}));
940
- /** Communicates with a server message broker */
967
+ var EEvent;
968
+ (function (EEvent) {
969
+ EEvent["SAVED"] = "saved";
970
+ EEvent["UPDATED"] = "updated";
971
+ EEvent["DELETED"] = "deleted";
972
+ EEvent["EDIT_STARTED"] = "editStarted";
973
+ EEvent["EDIT_FINISHED"] = "editFinished";
974
+ EEvent["USERS_UPDATE"] = "usersUpdate";
975
+ })(EEvent = MessageBroker.EEvent || (MessageBroker.EEvent = {}));
976
+ /**
977
+ * Communicates with a server message broker.
978
+ */
941
979
  var WebSocketBroker = /** @class */ (function () {
942
980
  function WebSocketBroker(uri, env) {
943
981
  this.uri = uri;
@@ -949,6 +987,9 @@ var MessageBroker;
949
987
  }
950
988
  WebSocketBroker.prototype.connect = function () {
951
989
  try {
990
+ if (!WebSocket) {
991
+ throw new Error("WebSocket is not supported by this browser");
992
+ }
952
993
  this.ws = new WebSocket(this.formatApiUri(this.uri));
953
994
  this.ws.onopen = this.onOpen.bind(this);
954
995
  this.ws.onmessage = this.onMessage.bind(this);
@@ -963,7 +1004,7 @@ var MessageBroker;
963
1004
  var ws = document.location.protocol === "https:" ? "wss" : "ws";
964
1005
  return uri.replace(/^(https|http)/, ws) + "websocket";
965
1006
  };
966
- WebSocketBroker.prototype.setUser = function (user) {
1007
+ WebSocketBroker.prototype.SetUser = function (user) {
967
1008
  this.user = this.user ? this.user : user;
968
1009
  };
969
1010
  WebSocketBroker.prototype.onOpen = function (ev) {
@@ -1002,7 +1043,11 @@ var MessageBroker;
1002
1043
  console.groupEnd();
1003
1044
  }
1004
1045
  };
1005
- /** Send message to server */
1046
+ /**
1047
+ * Send message to server.
1048
+ * @param msg
1049
+ * @returns
1050
+ */
1006
1051
  WebSocketBroker.prototype.sendMessage = function (msg) {
1007
1052
  if (this.ws.readyState !== WebSocket.OPEN) {
1008
1053
  return;
@@ -1018,43 +1063,56 @@ var MessageBroker;
1018
1063
  console.warn(e);
1019
1064
  }
1020
1065
  };
1021
- Object.defineProperty(WebSocketBroker.prototype, "connected", {
1066
+ Object.defineProperty(WebSocketBroker.prototype, "IsConnected", {
1022
1067
  get: function () {
1023
1068
  return this.ws.readyState === WebSocket.OPEN;
1024
1069
  },
1025
1070
  enumerable: false,
1026
1071
  configurable: true
1027
1072
  });
1028
- /** Add a subscriber to a topic */
1029
- WebSocketBroker.prototype.subscribe = function (topic, callback, action) {
1030
- if (action === void 0) { action = Action.SUBSCRIBE; }
1073
+ /**
1074
+ * Add a subscriber to a topic.
1075
+ * @param topic
1076
+ * @param callback
1077
+ * @param action
1078
+ */
1079
+ WebSocketBroker.prototype.Subscribe = function (topic, callback, action) {
1080
+ if (action === void 0) { action = EAction.SUBSCRIBE; }
1031
1081
  this.addSubscriber(topic, callback);
1032
1082
  this.sendMessage({ topic: topic, action: action });
1033
1083
  if (this.env === Api.EEnv.DEV) {
1034
1084
  console.log("Subscribe [" + action + "] called for topic", topic);
1035
1085
  }
1036
1086
  };
1037
- /** Add a shadow subscriber to a topic */
1038
- WebSocketBroker.prototype.subscribeShadow = function (topic, callback) {
1039
- this.subscribe(topic, callback, Action.SUBSCRIBE_SHADOW);
1087
+ /**
1088
+ * Add a shadow subscriber to a topic.
1089
+ * @param topic
1090
+ * @param callback
1091
+ */
1092
+ WebSocketBroker.prototype.SubscribeShadow = function (topic, callback) {
1093
+ this.Subscribe(topic, callback, EAction.SUBSCRIBE_SHADOW);
1040
1094
  };
1041
- /** Remove a subscriber from a topic */
1042
- WebSocketBroker.prototype.unsubscribe = function (topic, callback) {
1095
+ /**
1096
+ * Remove a subscriber from a topic.
1097
+ * @param topic
1098
+ * @param callback
1099
+ */
1100
+ WebSocketBroker.prototype.Unsubscribe = function (topic, callback) {
1043
1101
  var subscribers = this.subscriptions.get(topic) || [];
1044
1102
  this.subscriptions.set(topic, subscribers.filter(function (fn) { return fn != callback; }));
1045
- this.sendMessage({ topic: topic, action: Action.UNSUBSCRIBE });
1103
+ this.sendMessage({ topic: topic, action: EAction.UNSUBSCRIBE });
1046
1104
  if (this.env === Api.EEnv.DEV) {
1047
1105
  console.groupCollapsed("MessageBroker subscription removed: ", topic);
1048
1106
  console.table(Array.from(this.subscriptions.entries()));
1049
1107
  console.groupEnd();
1050
1108
  }
1051
1109
  };
1052
- WebSocketBroker.prototype.sendBroadcastMessage = function (msg) {
1053
- this.sendMessage(__assign(__assign({}, msg), { action: Action.BROADCAST }));
1110
+ WebSocketBroker.prototype.SendBroadcastMessage = function (msg) {
1111
+ this.sendMessage(__assign(__assign({}, msg), { action: EAction.BROADCAST }));
1054
1112
  };
1055
- WebSocketBroker.prototype.requestTopicUsers = function (topic, callback) {
1113
+ WebSocketBroker.prototype.RequestTopicUsers = function (topic, callback) {
1056
1114
  this.addSubscriber(topic, callback);
1057
- this.sendMessage({ topic: topic, action: Action.GET_TOPIC_SUBSCRIBERS });
1115
+ this.sendMessage({ topic: topic, action: EAction.GET_TOPIC_SUBSCRIBERS });
1058
1116
  };
1059
1117
  return WebSocketBroker;
1060
1118
  }());
@@ -1101,13 +1159,13 @@ var BruceApi;
1101
1159
  });
1102
1160
  /**
1103
1161
  * Loads regional base url and sets up message broker.
1104
- * @param cam
1162
+ * @param cam Required for loading regional base url.
1105
1163
  * @returns
1106
1164
  */
1107
1165
  Api$$1.prototype.init = function (cam) {
1108
1166
  var _a;
1109
1167
  return __awaiter(this, void 0, void 0, function () {
1110
- var prefix, url, env, camApi, settings, endpoint, e_1;
1168
+ var prefix, url, env, settings, endpoint, e_1;
1111
1169
  return __generator(this, function (_b) {
1112
1170
  switch (_b.label) {
1113
1171
  case 0:
@@ -1130,11 +1188,11 @@ var BruceApi;
1130
1188
  throw ("Specified Environment is not valid. SuppliedEnv=" + env);
1131
1189
  }
1132
1190
  this.baseUrl = url;
1191
+ if (!cam) return [3 /*break*/, 4];
1133
1192
  _b.label = 1;
1134
1193
  case 1:
1135
1194
  _b.trys.push([1, 3, , 4]);
1136
- camApi = cam ? cam : new CamApi.Api(env);
1137
- return [4 /*yield*/, Account.GetAppSettings(camApi, this.accountId, Account.EAppId.BruceApi)];
1195
+ return [4 /*yield*/, Account.GetAppSettings(cam, this.accountId, Account.EAppId.BruceApi)];
1138
1196
  case 2:
1139
1197
  settings = _b.sent();
1140
1198
  if (this.loadCancelled) {
@@ -1154,7 +1212,12 @@ var BruceApi;
1154
1212
  console.error(e_1);
1155
1213
  return [3 /*break*/, 4];
1156
1214
  case 4:
1157
- this.messageBroker = new MessageBroker.WebSocketBroker(this.baseUrl, this.env);
1215
+ try {
1216
+ this.messageBroker = new MessageBroker.WebSocketBroker(this.baseUrl, this.env);
1217
+ }
1218
+ catch (e) {
1219
+ console.warn("BruceApi: Failed to create message broker.", e);
1220
+ }
1158
1221
  return [2 /*return*/];
1159
1222
  }
1160
1223
  });
@@ -1248,6 +1311,85 @@ var BruceApi;
1248
1311
  BruceApi.Api = Api$$1;
1249
1312
  })(BruceApi || (BruceApi = {}));
1250
1313
 
1314
+ /**
1315
+ * This is the request handler for Cam Api,
1316
+ * it should be passed to any method that wants to communicate with this particular api.
1317
+ */
1318
+ var CamApi;
1319
+ (function (CamApi) {
1320
+ var Api$$1 = /** @class */ (function (_super) {
1321
+ __extends(Api$$1, _super);
1322
+ function Api$$1(env) {
1323
+ var _this = _super.call(this, "SSID") || this;
1324
+ _this.baseUrl = "";
1325
+ _this.env = env !== null && env !== void 0 ? env : Api.EEnv.PROD;
1326
+ _this.setBaseUrl();
1327
+ return _this;
1328
+ }
1329
+ Api$$1.prototype.setBaseUrl = function () {
1330
+ var prefix = "https://cam.nextspace";
1331
+ var url;
1332
+ var env = this.env.toUpperCase();
1333
+ switch (env) {
1334
+ case Api.EEnv.DEV:
1335
+ url = prefix + "-dev.net/";
1336
+ break;
1337
+ case Api.EEnv.STG:
1338
+ url = prefix + "-stg.net/";
1339
+ break;
1340
+ case Api.EEnv.UAT:
1341
+ url = prefix + "-uat.net/";
1342
+ break;
1343
+ case Api.EEnv.PROD:
1344
+ url = prefix + ".host/";
1345
+ break;
1346
+ default:
1347
+ throw ("Specified Environment is not valid. SuppliedEnv=" + env);
1348
+ }
1349
+ this.baseUrl = url;
1350
+ };
1351
+ Api$$1.prototype.GetBaseUrl = function () {
1352
+ return this.baseUrl;
1353
+ };
1354
+ Api$$1.prototype.SetBaseUrl = function (url) {
1355
+ this.baseUrl = url;
1356
+ if (!this.baseUrl.endsWith("/")) {
1357
+ this.baseUrl += "/";
1358
+ }
1359
+ };
1360
+ Api$$1.prototype.GET = function (url, params) {
1361
+ return __awaiter(this, void 0, void 0, function () {
1362
+ return __generator(this, function (_a) {
1363
+ return [2 /*return*/, this.get(this.baseUrl + url, params)];
1364
+ });
1365
+ });
1366
+ };
1367
+ Api$$1.prototype.DELETE = function (url, params) {
1368
+ return __awaiter(this, void 0, void 0, function () {
1369
+ return __generator(this, function (_a) {
1370
+ return [2 /*return*/, this.delete(this.baseUrl + url, params)];
1371
+ });
1372
+ });
1373
+ };
1374
+ Api$$1.prototype.POST = function (url, data, params) {
1375
+ return __awaiter(this, void 0, void 0, function () {
1376
+ return __generator(this, function (_a) {
1377
+ return [2 /*return*/, this.post(this.baseUrl + url, data, params)];
1378
+ });
1379
+ });
1380
+ };
1381
+ Api$$1.prototype.UPLOAD = function (url, blob, params) {
1382
+ return __awaiter(this, void 0, void 0, function () {
1383
+ return __generator(this, function (_a) {
1384
+ return [2 /*return*/, this.upload(this.baseUrl + url, blob, params)];
1385
+ });
1386
+ });
1387
+ };
1388
+ return Api$$1;
1389
+ }(AbstractApi));
1390
+ CamApi.Api = Api$$1;
1391
+ })(CamApi || (CamApi = {}));
1392
+
1251
1393
  var IdmApi;
1252
1394
  (function (IdmApi) {
1253
1395
  /**
@@ -1574,7 +1716,7 @@ var Entity;
1574
1716
  return "" + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
1575
1717
  }
1576
1718
  Entity.GetCacheKey = GetCacheKey;
1577
- function Get(api, entityId) {
1719
+ function Get(api, entityId, reqParams) {
1578
1720
  return __awaiter(this, void 0, void 0, function () {
1579
1721
  var key, cacheData, req;
1580
1722
  return __generator(this, function (_a) {
@@ -1582,18 +1724,18 @@ var Entity;
1582
1724
  throw ("Entity ID is required.");
1583
1725
  }
1584
1726
  key = GetCacheKey(entityId);
1585
- cacheData = api.Cache.Get(key);
1727
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
1586
1728
  if (cacheData) {
1587
1729
  return [2 /*return*/, cacheData];
1588
1730
  }
1589
- req = api.GET("entity/" + entityId, Api.PrepReqParams());
1731
+ req = api.GET("entity/" + entityId, Api.PrepReqParams(reqParams));
1590
1732
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
1591
1733
  return [2 /*return*/, req];
1592
1734
  });
1593
1735
  });
1594
1736
  }
1595
1737
  Entity.Get = Get;
1596
- function GetListByIds(api, entityIds) {
1738
+ function GetListByIds(api, entityIds, reqParams) {
1597
1739
  return __awaiter(this, void 0, void 0, function () {
1598
1740
  var reqs, reqIds, i, entityId, key, cacheData, reqData, req_1, _loop_1, i;
1599
1741
  var _this = this;
@@ -1608,7 +1750,7 @@ var Entity;
1608
1750
  for (i = 0; i < entityIds.length; i++) {
1609
1751
  entityId = entityIds[i];
1610
1752
  key = GetCacheKey(entityId);
1611
- cacheData = api.Cache.Get(key);
1753
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
1612
1754
  if (cacheData) {
1613
1755
  reqs.push(cacheData);
1614
1756
  }
@@ -1625,7 +1767,7 @@ var Entity;
1625
1767
  PageSize: reqIds.length
1626
1768
  };
1627
1769
  if (reqIds.length > 0) {
1628
- req_1 = api.POST("entities", reqData, Api.PrepReqParams());
1770
+ req_1 = api.POST("entities", reqData, Api.PrepReqParams(reqParams));
1629
1771
  _loop_1 = function (i) {
1630
1772
  var entityId = reqIds[i];
1631
1773
  var key = GetCacheKey(entityId);
@@ -1664,7 +1806,7 @@ var Entity;
1664
1806
  });
1665
1807
  }
1666
1808
  Entity.GetListByIds = GetListByIds;
1667
- function Delete(api, entityId) {
1809
+ function Delete(api, entityId, reqParams) {
1668
1810
  return __awaiter(this, void 0, void 0, function () {
1669
1811
  return __generator(this, function (_a) {
1670
1812
  switch (_a.label) {
@@ -1672,7 +1814,7 @@ var Entity;
1672
1814
  if (!entityId) {
1673
1815
  throw ("Entity ID is required.");
1674
1816
  }
1675
- return [4 /*yield*/, api.DELETE("entity/" + entityId, Api.PrepReqParams())];
1817
+ return [4 /*yield*/, api.DELETE("entity/" + entityId, Api.PrepReqParams(reqParams))];
1676
1818
  case 1:
1677
1819
  _a.sent();
1678
1820
  api.Cache.Remove(GetCacheKey(entityId));
@@ -1682,7 +1824,7 @@ var Entity;
1682
1824
  });
1683
1825
  }
1684
1826
  Entity.Delete = Delete;
1685
- function DeleteList(api, entityIds) {
1827
+ function DeleteList(api, entityIds, reqParams) {
1686
1828
  return __awaiter(this, void 0, void 0, function () {
1687
1829
  var i, entityId;
1688
1830
  return __generator(this, function (_a) {
@@ -1693,7 +1835,7 @@ var Entity;
1693
1835
  }
1694
1836
  return [4 /*yield*/, api.POST("deleteEntities", {
1695
1837
  Items: entityIds
1696
- }, Api.PrepReqParams())];
1838
+ }, Api.PrepReqParams(reqParams))];
1697
1839
  case 1:
1698
1840
  _a.sent();
1699
1841
  for (i = 0; i < entityIds.length; i++) {
@@ -1706,7 +1848,7 @@ var Entity;
1706
1848
  });
1707
1849
  }
1708
1850
  Entity.DeleteList = DeleteList;
1709
- function Update(api, data, override) {
1851
+ function Update(api, data, override, reqParams) {
1710
1852
  var _a, _b;
1711
1853
  return __awaiter(this, void 0, void 0, function () {
1712
1854
  var reqUrl;
@@ -1720,7 +1862,7 @@ var Entity;
1720
1862
  data.Bruce = __assign(__assign({}, data.Bruce), { ID: ObjectUtils.UId() });
1721
1863
  }
1722
1864
  reqUrl = "entity/" + data.Bruce.ID + "/?dataoverride=" + override + "&BruceEntityType=" + data.Bruce["EntityType.ID"];
1723
- return [4 /*yield*/, api.POST(reqUrl, data, Api.PrepReqParams())];
1865
+ return [4 /*yield*/, api.POST(reqUrl, data, Api.PrepReqParams(reqParams))];
1724
1866
  case 1:
1725
1867
  data = _c.sent();
1726
1868
  api.Cache.Remove(GetCacheKey(data.Bruce.ID));
@@ -1808,7 +1950,7 @@ var Entity;
1808
1950
  (function (Filter) {
1809
1951
  var V1;
1810
1952
  (function (V1) {
1811
- function GetList(api, filter) {
1953
+ function GetList(api, filter, reqParams) {
1812
1954
  return __awaiter(this, void 0, void 0, function () {
1813
1955
  var requestFilter, url, data, entities, i, entity, id;
1814
1956
  return __generator(this, function (_a) {
@@ -1849,7 +1991,7 @@ var Entity;
1849
1991
  // Order by attribute + sort order.
1850
1992
  (!filter.orderBy ? "" : "&OrderBy=" + filter.orderBy) +
1851
1993
  (filter.sortOrder ? "&SortOrder=" + (filter.sortOrder == Api.ESortOrder.Asc ? "ASC" : "DESC") : "");
1852
- return [4 /*yield*/, api.GET(url, Api.PrepReqParams())];
1994
+ return [4 /*yield*/, api.GET(url, Api.PrepReqParams(reqParams))];
1853
1995
  case 1:
1854
1996
  data = _a.sent();
1855
1997
  entities = data.Items;
@@ -1988,6 +2130,59 @@ var Calculator;
1988
2130
  return null;
1989
2131
  }
1990
2132
  Calculator.GetValue = GetValue;
2133
+ /**
2134
+ * Calculates the value of arbitrary field options with assumption that desired result is a color.
2135
+ * Will return null if a color is not found.
2136
+ * @param fields
2137
+ * @param entity
2138
+ * @param tags
2139
+ */
2140
+ function GetColor(fields, entity, tags) {
2141
+ if (!tags) {
2142
+ tags = [];
2143
+ }
2144
+ if (!entity) {
2145
+ entity = {};
2146
+ }
2147
+ for (var i = 0; i < fields.length; i++) {
2148
+ var field = fields[i];
2149
+ var value = void 0;
2150
+ switch (field.type) {
2151
+ case EValueType.Color:
2152
+ value = field.value;
2153
+ break;
2154
+ case EValueType.Gradient:
2155
+ value = GetGradientValue(field.value, entity);
2156
+ break;
2157
+ case EValueType.Input:
2158
+ value = GetInputValue(field.value, entity);
2159
+ break;
2160
+ case EValueType.Mapping:
2161
+ value = GetMappingValue(field.value, entity);
2162
+ break;
2163
+ case EValueType.RandomColor:
2164
+ value = Color.RandomColor();
2165
+ break;
2166
+ case EValueType.TagColor:
2167
+ for (var i_2 = 0; i_2 < tags.length; i_2++) {
2168
+ var tag = tags[i_2];
2169
+ if (tag.Color) {
2170
+ value = Color.ColorFromStr(tag.Color);
2171
+ break;
2172
+ }
2173
+ }
2174
+ break;
2175
+ }
2176
+ if (typeof value === "string") {
2177
+ value = Color.ColorFromStr(value);
2178
+ }
2179
+ if (value && typeof value === "object" && (value.red || value.red == 0)) {
2180
+ return value;
2181
+ }
2182
+ }
2183
+ return null;
2184
+ }
2185
+ Calculator.GetColor = GetColor;
1991
2186
  function GetMappingValue(value, entity) {
1992
2187
  var attrPath = PathUtils.Parse(value.field);
1993
2188
  var eValue = +Entity.GetValue(entity, attrPath);
@@ -2468,7 +2663,7 @@ var EntityAttachmentType;
2468
2663
  EType["Photo"] = "photo";
2469
2664
  EType["Document"] = "document";
2470
2665
  })(EType = EntityAttachmentType.EType || (EntityAttachmentType.EType = {}));
2471
- function Delete(api, id) {
2666
+ function Delete(api, id, reqParams) {
2472
2667
  return __awaiter(this, void 0, void 0, function () {
2473
2668
  return __generator(this, function (_a) {
2474
2669
  switch (_a.label) {
@@ -2476,7 +2671,7 @@ var EntityAttachmentType;
2476
2671
  if (!id) {
2477
2672
  throw ("Type ID is required.");
2478
2673
  }
2479
- return [4 /*yield*/, api.DELETE("entityAttachmentType/" + id, Api.PrepReqParams())];
2674
+ return [4 /*yield*/, api.DELETE("entityAttachmentType/" + id, Api.PrepReqParams(reqParams))];
2480
2675
  case 1:
2481
2676
  _a.sent();
2482
2677
  api.Cache.Remove(GetCacheKey(id));
@@ -2487,7 +2682,7 @@ var EntityAttachmentType;
2487
2682
  });
2488
2683
  }
2489
2684
  EntityAttachmentType.Delete = Delete;
2490
- function Update(api, data) {
2685
+ function Update(api, data, reqParams) {
2491
2686
  return __awaiter(this, void 0, void 0, function () {
2492
2687
  return __generator(this, function (_a) {
2493
2688
  switch (_a.label) {
@@ -2495,7 +2690,7 @@ var EntityAttachmentType;
2495
2690
  if (!(data === null || data === void 0 ? void 0 : data.ID)) {
2496
2691
  throw ("Type ID is required.");
2497
2692
  }
2498
- return [4 /*yield*/, api.POST("entityAttachmentType/" + data.ID, data, Api.PrepReqParams())];
2693
+ return [4 /*yield*/, api.POST("entityAttachmentType/" + data.ID, data, Api.PrepReqParams(reqParams))];
2499
2694
  case 1:
2500
2695
  data = _a.sent();
2501
2696
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -2506,12 +2701,12 @@ var EntityAttachmentType;
2506
2701
  });
2507
2702
  }
2508
2703
  EntityAttachmentType.Update = Update;
2509
- function GetList(api) {
2704
+ function GetList(api, reqParams) {
2510
2705
  return __awaiter(this, void 0, void 0, function () {
2511
2706
  var cacheData, req;
2512
2707
  var _this = this;
2513
2708
  return __generator(this, function (_a) {
2514
- cacheData = api.Cache.Get(GetListCacheKey());
2709
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
2515
2710
  if (cacheData) {
2516
2711
  return [2 /*return*/, cacheData];
2517
2712
  }
@@ -2521,7 +2716,7 @@ var EntityAttachmentType;
2521
2716
  switch (_a.label) {
2522
2717
  case 0:
2523
2718
  _a.trys.push([0, 2, , 3]);
2524
- return [4 /*yield*/, api.GET("entityAttachmentTypes", Api.PrepReqParams())];
2719
+ return [4 /*yield*/, api.GET("entityAttachmentTypes", Api.PrepReqParams(reqParams))];
2525
2720
  case 1:
2526
2721
  data = _a.sent();
2527
2722
  res(data.Items);
@@ -2557,7 +2752,7 @@ var EntityAttachment;
2557
2752
  return Api.ECacheKey.Attachment + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
2558
2753
  }
2559
2754
  EntityAttachment.GetListCacheKey = GetListCacheKey;
2560
- function Update(api, data) {
2755
+ function Update(api, data, reqParams) {
2561
2756
  return __awaiter(this, void 0, void 0, function () {
2562
2757
  var url;
2563
2758
  return __generator(this, function (_a) {
@@ -2567,7 +2762,7 @@ var EntityAttachment;
2567
2762
  throw ("Entity ID, Type ID, and File ID are required.");
2568
2763
  }
2569
2764
  url = "entity/" + data["Entity.ID"] + "/attachment/" + data["EntityAttachmentType.ID"] + "/" + data["ClientFile.ID"];
2570
- return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams())];
2765
+ return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams(reqParams))];
2571
2766
  case 1:
2572
2767
  data = _a.sent();
2573
2768
  api.Cache.Remove(GetCacheKey(data["Entity.ID"], data["EntityAttachmentType.ID"], data["ClientFile.ID"]));
@@ -2578,7 +2773,7 @@ var EntityAttachment;
2578
2773
  });
2579
2774
  }
2580
2775
  EntityAttachment.Update = Update;
2581
- function UpdateOrder(api, entityId, typeId, fileIds) {
2776
+ function UpdateOrder(api, entityId, typeId, fileIds, reqParams) {
2582
2777
  return __awaiter(this, void 0, void 0, function () {
2583
2778
  var reqData, i;
2584
2779
  return __generator(this, function (_a) {
@@ -2591,7 +2786,7 @@ var EntityAttachment;
2591
2786
  "DisplayOrder.Start": 0,
2592
2787
  "ClientFile.ID": fileIds
2593
2788
  };
2594
- return [4 /*yield*/, api.POST("entity/" + entityId + "/attachments/" + typeId + "/setOrder", reqData, Api.PrepReqParams())];
2789
+ return [4 /*yield*/, api.POST("entity/" + entityId + "/attachments/" + typeId + "/setOrder", reqData, Api.PrepReqParams(reqParams))];
2595
2790
  case 1:
2596
2791
  _a.sent();
2597
2792
  for (i = 0; i < fileIds.length; i++) {
@@ -2604,7 +2799,7 @@ var EntityAttachment;
2604
2799
  });
2605
2800
  }
2606
2801
  EntityAttachment.UpdateOrder = UpdateOrder;
2607
- function Delete(api, data) {
2802
+ function Delete(api, data, reqParams) {
2608
2803
  return __awaiter(this, void 0, void 0, function () {
2609
2804
  var reqData;
2610
2805
  return __generator(this, function (_a) {
@@ -2616,7 +2811,7 @@ var EntityAttachment;
2616
2811
  reqData = {
2617
2812
  "ClientFile.ID": [data["ClientFile.ID"]]
2618
2813
  };
2619
- return [4 /*yield*/, api.POST("entity/" + data["Entity.ID"] + "/attachments/" + data["EntityAttachmentType.ID"] + "/delete", reqData, Api.PrepReqParams())];
2814
+ return [4 /*yield*/, api.POST("entity/" + data["Entity.ID"] + "/attachments/" + data["EntityAttachmentType.ID"] + "/delete", reqData, Api.PrepReqParams(reqParams))];
2620
2815
  case 1:
2621
2816
  _a.sent();
2622
2817
  api.Cache.Remove(GetCacheKey(data["Entity.ID"], data["EntityAttachmentType.ID"], data["ClientFile.ID"]));
@@ -2627,7 +2822,7 @@ var EntityAttachment;
2627
2822
  });
2628
2823
  }
2629
2824
  EntityAttachment.Delete = Delete;
2630
- function DeleteByFileIds(api, entityId, typeId, fileIds) {
2825
+ function DeleteByFileIds(api, entityId, typeId, fileIds, reqParams) {
2631
2826
  return __awaiter(this, void 0, void 0, function () {
2632
2827
  var reqData, i;
2633
2828
  return __generator(this, function (_a) {
@@ -2639,7 +2834,7 @@ var EntityAttachment;
2639
2834
  reqData = {
2640
2835
  "ClientFile.ID": fileIds
2641
2836
  };
2642
- return [4 /*yield*/, api.POST("entity/" + entityId + "/attachments/" + typeId + "/delete", reqData, Api.PrepReqParams())];
2837
+ return [4 /*yield*/, api.POST("entity/" + entityId + "/attachments/" + typeId + "/delete", reqData, Api.PrepReqParams(reqParams))];
2643
2838
  case 1:
2644
2839
  _a.sent();
2645
2840
  for (i = 0; i < fileIds.length; i++) {
@@ -2652,7 +2847,7 @@ var EntityAttachment;
2652
2847
  });
2653
2848
  }
2654
2849
  EntityAttachment.DeleteByFileIds = DeleteByFileIds;
2655
- function GetListByEntityId(api, entityId) {
2850
+ function GetListByEntityId(api, entityId, reqParams) {
2656
2851
  return __awaiter(this, void 0, void 0, function () {
2657
2852
  var cacheData, req;
2658
2853
  var _this = this;
@@ -2660,7 +2855,7 @@ var EntityAttachment;
2660
2855
  if (!entityId) {
2661
2856
  throw ("Entity ID is required.");
2662
2857
  }
2663
- cacheData = api.Cache.Get(GetListCacheKey(entityId));
2858
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2664
2859
  if (cacheData) {
2665
2860
  return [2 /*return*/, cacheData];
2666
2861
  }
@@ -2670,7 +2865,7 @@ var EntityAttachment;
2670
2865
  switch (_a.label) {
2671
2866
  case 0:
2672
2867
  _a.trys.push([0, 2, , 3]);
2673
- return [4 /*yield*/, api.GET("entity/" + entityId + "/attachments", Api.PrepReqParams())];
2868
+ return [4 /*yield*/, api.GET("entity/" + entityId + "/attachments", Api.PrepReqParams(reqParams))];
2674
2869
  case 1:
2675
2870
  data = _a.sent();
2676
2871
  res(data.Items);
@@ -2689,7 +2884,7 @@ var EntityAttachment;
2689
2884
  });
2690
2885
  }
2691
2886
  EntityAttachment.GetListByEntityId = GetListByEntityId;
2692
- function Upload(api, file, entityId, typeId, onProgress) {
2887
+ function Upload(api, file, entityId, typeId, reqParams) {
2693
2888
  return __awaiter(this, void 0, void 0, function () {
2694
2889
  var url, req;
2695
2890
  return __generator(this, function (_a) {
@@ -2699,7 +2894,7 @@ var EntityAttachment;
2699
2894
  throw ("Entity ID, Type ID, and File are required.");
2700
2895
  }
2701
2896
  url = "entity/" + entityId + "/attachment/" + typeId;
2702
- return [4 /*yield*/, api.UPLOAD(url, file, { onProgress: onProgress })];
2897
+ return [4 /*yield*/, api.UPLOAD(url, file, reqParams)];
2703
2898
  case 1:
2704
2899
  req = _a.sent();
2705
2900
  api.Cache.RemoveByStartsWith(GetListCacheKey(entityId));
@@ -2725,7 +2920,7 @@ var EntityComment;
2725
2920
  return Api.ECacheKey.Comment + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
2726
2921
  }
2727
2922
  EntityComment.GetListCacheKey = GetListCacheKey;
2728
- function Update(api, data) {
2923
+ function Update(api, data, reqParams) {
2729
2924
  return __awaiter(this, void 0, void 0, function () {
2730
2925
  var url;
2731
2926
  return __generator(this, function (_a) {
@@ -2735,7 +2930,7 @@ var EntityComment;
2735
2930
  throw ("TargetObject.ID (entity id) is required.");
2736
2931
  }
2737
2932
  url = "entity/" + data["TargetObject.ID"] + "/comment" + (data.ID == null ? "" : "/" + data.ID);
2738
- return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams())];
2933
+ return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams(reqParams))];
2739
2934
  case 1:
2740
2935
  data = _a.sent();
2741
2936
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -2746,7 +2941,7 @@ var EntityComment;
2746
2941
  });
2747
2942
  }
2748
2943
  EntityComment.Update = Update;
2749
- function Delete(api, entityId, commentId) {
2944
+ function Delete(api, entityId, commentId, reqParams) {
2750
2945
  return __awaiter(this, void 0, void 0, function () {
2751
2946
  return __generator(this, function (_a) {
2752
2947
  switch (_a.label) {
@@ -2754,7 +2949,7 @@ var EntityComment;
2754
2949
  if (!commentId) {
2755
2950
  throw ("Comment ID is required.");
2756
2951
  }
2757
- return [4 /*yield*/, api.DELETE("entity/" + entityId + "/comment/" + commentId, Api.PrepReqParams())];
2952
+ return [4 /*yield*/, api.DELETE("entity/" + entityId + "/comment/" + commentId, Api.PrepReqParams(reqParams))];
2758
2953
  case 1:
2759
2954
  _a.sent();
2760
2955
  api.Cache.Remove(GetCacheKey(commentId));
@@ -2765,7 +2960,7 @@ var EntityComment;
2765
2960
  });
2766
2961
  }
2767
2962
  EntityComment.Delete = Delete;
2768
- function GetListByEntityId(api, entityId) {
2963
+ function GetListByEntityId(api, entityId, reqParams) {
2769
2964
  return __awaiter(this, void 0, void 0, function () {
2770
2965
  var cacheData, req;
2771
2966
  var _this = this;
@@ -2773,7 +2968,7 @@ var EntityComment;
2773
2968
  if (!entityId) {
2774
2969
  throw ("Entity ID is required.");
2775
2970
  }
2776
- cacheData = api.Cache.Get(GetListCacheKey(entityId));
2971
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2777
2972
  if (cacheData) {
2778
2973
  return [2 /*return*/, cacheData];
2779
2974
  }
@@ -2783,7 +2978,7 @@ var EntityComment;
2783
2978
  switch (_a.label) {
2784
2979
  case 0:
2785
2980
  _a.trys.push([0, 2, , 3]);
2786
- return [4 /*yield*/, api.GET("entity/" + entityId + "/comments", Api.PrepReqParams())];
2981
+ return [4 /*yield*/, api.GET("entity/" + entityId + "/comments", Api.PrepReqParams(reqParams))];
2787
2982
  case 1:
2788
2983
  data = _a.sent();
2789
2984
  res(data.Items);
@@ -2818,7 +3013,7 @@ var EntityLink;
2818
3013
  return Api.ECacheKey.Link + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
2819
3014
  }
2820
3015
  EntityLink.GetListCacheKey = GetListCacheKey;
2821
- function Update(api, data) {
3016
+ function Update(api, data, reqParams) {
2822
3017
  return __awaiter(this, void 0, void 0, function () {
2823
3018
  var url;
2824
3019
  return __generator(this, function (_a) {
@@ -2828,7 +3023,7 @@ var EntityLink;
2828
3023
  throw ("Entity ID is required.");
2829
3024
  }
2830
3025
  url = "entity/" + data["Entity.ID"] + "/link" + (data.ID == null ? "" : "/" + data.ID);
2831
- return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams())];
3026
+ return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams(reqParams))];
2832
3027
  case 1:
2833
3028
  data = _a.sent();
2834
3029
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -2839,7 +3034,7 @@ var EntityLink;
2839
3034
  });
2840
3035
  }
2841
3036
  EntityLink.Update = Update;
2842
- function Delete(api, entityId, linkId) {
3037
+ function Delete(api, entityId, linkId, reqParams) {
2843
3038
  return __awaiter(this, void 0, void 0, function () {
2844
3039
  return __generator(this, function (_a) {
2845
3040
  switch (_a.label) {
@@ -2847,7 +3042,7 @@ var EntityLink;
2847
3042
  if (!linkId) {
2848
3043
  throw ("Link ID is required.");
2849
3044
  }
2850
- return [4 /*yield*/, api.DELETE("entity/" + entityId + "/link/" + linkId, Api.PrepReqParams())];
3045
+ return [4 /*yield*/, api.DELETE("entity/" + entityId + "/link/" + linkId, Api.PrepReqParams(reqParams))];
2851
3046
  case 1:
2852
3047
  _a.sent();
2853
3048
  api.Cache.Remove(GetCacheKey(linkId));
@@ -2858,7 +3053,7 @@ var EntityLink;
2858
3053
  });
2859
3054
  }
2860
3055
  EntityLink.Delete = Delete;
2861
- function GetListByEntityId(api, entityId) {
3056
+ function GetListByEntityId(api, entityId, reqParams) {
2862
3057
  return __awaiter(this, void 0, void 0, function () {
2863
3058
  var cacheData, req;
2864
3059
  var _this = this;
@@ -2866,7 +3061,7 @@ var EntityLink;
2866
3061
  if (!entityId) {
2867
3062
  throw ("Entity ID is required.");
2868
3063
  }
2869
- cacheData = api.Cache.Get(GetListCacheKey(entityId));
3064
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId));
2870
3065
  if (cacheData) {
2871
3066
  return [2 /*return*/, cacheData];
2872
3067
  }
@@ -2876,7 +3071,7 @@ var EntityLink;
2876
3071
  switch (_a.label) {
2877
3072
  case 0:
2878
3073
  _a.trys.push([0, 2, , 3]);
2879
- return [4 /*yield*/, api.GET("entity/" + entityId + "/links", Api.PrepReqParams())];
3074
+ return [4 /*yield*/, api.GET("entity/" + entityId + "/links", Api.PrepReqParams(reqParams))];
2880
3075
  case 1:
2881
3076
  data = _a.sent();
2882
3077
  res(data.Items);
@@ -2930,7 +3125,7 @@ var EntityLod;
2930
3125
  return url;
2931
3126
  }
2932
3127
  EntityLod.GetUrl = GetUrl;
2933
- function GetUrlFileId(api, url) {
3128
+ function GetUrlFileId(api, url, reqParams) {
2934
3129
  return __awaiter(this, void 0, void 0, function () {
2935
3130
  var cacheData, req;
2936
3131
  var _this = this;
@@ -2938,7 +3133,7 @@ var EntityLod;
2938
3133
  if (!url) {
2939
3134
  throw ("Url is required.");
2940
3135
  }
2941
- cacheData = api.Cache.Get(GetCacheKey(url));
3136
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(url));
2942
3137
  if (cacheData) {
2943
3138
  return [2 /*return*/, cacheData];
2944
3139
  }
@@ -2948,7 +3143,7 @@ var EntityLod;
2948
3143
  switch (_a.label) {
2949
3144
  case 0:
2950
3145
  _a.trys.push([0, 2, , 3]);
2951
- return [4 /*yield*/, api.get(url, Api.PrepReqParams())];
3146
+ return [4 /*yield*/, api.get(url, Api.PrepReqParams(reqParams))];
2952
3147
  case 1:
2953
3148
  record = _a.sent();
2954
3149
  res(record["ClientFile.ID"]);
@@ -2967,7 +3162,7 @@ var EntityLod;
2967
3162
  });
2968
3163
  }
2969
3164
  EntityLod.GetUrlFileId = GetUrlFileId;
2970
- function GetLods(api, params) {
3165
+ function GetLods(api, params, reqParams) {
2971
3166
  var _a;
2972
3167
  return __awaiter(this, void 0, void 0, function () {
2973
3168
  var data;
@@ -2977,7 +3172,7 @@ var EntityLod;
2977
3172
  if (!((_a = params === null || params === void 0 ? void 0 : params.Items) === null || _a === void 0 ? void 0 : _a.length)) {
2978
3173
  throw ("Items are required.");
2979
3174
  }
2980
- return [4 /*yield*/, api.POST("entity/getlods", params)];
3175
+ return [4 /*yield*/, api.POST("entity/getlods", params, reqParams)];
2981
3176
  case 1:
2982
3177
  data = _b.sent();
2983
3178
  return [2 /*return*/, data.Items];
@@ -2991,8 +3186,9 @@ var EntityLod;
2991
3186
  * @param api
2992
3187
  * @param typeId
2993
3188
  * @param group default is "DEFAULT".
3189
+ * @param reqParams
2994
3190
  */
2995
- function GetTypeLods(api, typeId, group) {
3191
+ function GetTypeLods(api, typeId, group, reqParams) {
2996
3192
  return __awaiter(this, void 0, void 0, function () {
2997
3193
  var cacheData, url, req, prom;
2998
3194
  var _this = this;
@@ -3000,12 +3196,12 @@ var EntityLod;
3000
3196
  if (!group) {
3001
3197
  group = "DEFAULT";
3002
3198
  }
3003
- cacheData = api.Cache.Get(GetTypeListKey(typeId, group));
3199
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetTypeListKey(typeId, group));
3004
3200
  if (cacheData) {
3005
3201
  return [2 /*return*/, cacheData];
3006
3202
  }
3007
3203
  url = "entityType/" + typeId + "/lods?includeClientFiles=yes" + (group ? "&group=" + group : "");
3008
- req = api.GET(url, Api.PrepReqParams());
3204
+ req = api.GET(url, Api.PrepReqParams(reqParams));
3009
3205
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
3010
3206
  var data, e_2;
3011
3207
  return __generator(this, function (_a) {
@@ -3031,7 +3227,7 @@ var EntityLod;
3031
3227
  });
3032
3228
  }
3033
3229
  EntityLod.GetTypeLods = GetTypeLods;
3034
- function Update(api, entityId, params) {
3230
+ function Update(api, entityId, params, reqParams) {
3035
3231
  return __awaiter(this, void 0, void 0, function () {
3036
3232
  return __generator(this, function (_a) {
3037
3233
  if (!params["ClientFile.ID"] || !params["LODCategory.Key"] || (!params.Level && params.Level !== 0)) {
@@ -3040,7 +3236,7 @@ var EntityLod;
3040
3236
  return [2 /*return*/, api.POST("entity/" + entityId + "/lod/" + params["LODCategory.Key"] + "/" + params.Level, {
3041
3237
  "Level": 0,
3042
3238
  "ClientFile.ID": params["ClientFile.ID"]
3043
- }, Api.PrepReqParams())];
3239
+ }, Api.PrepReqParams(reqParams))];
3044
3240
  });
3045
3241
  });
3046
3242
  }
@@ -3061,7 +3257,7 @@ var EntityRelationType;
3061
3257
  return Api.ECacheKey.RelationType;
3062
3258
  }
3063
3259
  EntityRelationType.GetListCacheKey = GetListCacheKey;
3064
- function Get(api, typeId) {
3260
+ function Get(api, typeId, reqParams) {
3065
3261
  return __awaiter(this, void 0, void 0, function () {
3066
3262
  var key, cacheData, req;
3067
3263
  return __generator(this, function (_a) {
@@ -3069,18 +3265,18 @@ var EntityRelationType;
3069
3265
  throw ("Type ID is required.");
3070
3266
  }
3071
3267
  key = GetCacheKey(typeId);
3072
- cacheData = api.Cache.Get(key);
3268
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3073
3269
  if (cacheData) {
3074
3270
  return [2 /*return*/, cacheData];
3075
3271
  }
3076
- req = api.GET("entityRelationType/" + typeId, Api.PrepReqParams());
3272
+ req = api.GET("entityRelationType/" + typeId, Api.PrepReqParams(reqParams));
3077
3273
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
3078
3274
  return [2 /*return*/, req];
3079
3275
  });
3080
3276
  });
3081
3277
  }
3082
3278
  EntityRelationType.Get = Get;
3083
- function Delete(api, typeId) {
3279
+ function Delete(api, typeId, reqParams) {
3084
3280
  return __awaiter(this, void 0, void 0, function () {
3085
3281
  return __generator(this, function (_a) {
3086
3282
  switch (_a.label) {
@@ -3088,7 +3284,7 @@ var EntityRelationType;
3088
3284
  if (!typeId) {
3089
3285
  throw ("Type ID is required.");
3090
3286
  }
3091
- return [4 /*yield*/, api.DELETE("entityRelationType/" + typeId, Api.PrepReqParams())];
3287
+ return [4 /*yield*/, api.DELETE("entityRelationType/" + typeId, Api.PrepReqParams(reqParams))];
3092
3288
  case 1:
3093
3289
  _a.sent();
3094
3290
  api.Cache.Remove(GetCacheKey(typeId));
@@ -3099,12 +3295,12 @@ var EntityRelationType;
3099
3295
  });
3100
3296
  }
3101
3297
  EntityRelationType.Delete = Delete;
3102
- function GetList(api) {
3298
+ function GetList(api, reqParams) {
3103
3299
  return __awaiter(this, void 0, void 0, function () {
3104
3300
  var cacheData, req;
3105
3301
  var _this = this;
3106
3302
  return __generator(this, function (_a) {
3107
- cacheData = api.Cache.Get(GetListCacheKey());
3303
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
3108
3304
  if (cacheData) {
3109
3305
  return [2 /*return*/, cacheData];
3110
3306
  }
@@ -3114,7 +3310,7 @@ var EntityRelationType;
3114
3310
  switch (_a.label) {
3115
3311
  case 0:
3116
3312
  _a.trys.push([0, 2, , 3]);
3117
- return [4 /*yield*/, api.GET("entityRelationTypes", Api.PrepReqParams())];
3313
+ return [4 /*yield*/, api.GET("entityRelationTypes", Api.PrepReqParams(reqParams))];
3118
3314
  case 1:
3119
3315
  data = _a.sent();
3120
3316
  res(data.Items);
@@ -3133,7 +3329,7 @@ var EntityRelationType;
3133
3329
  });
3134
3330
  }
3135
3331
  EntityRelationType.GetList = GetList;
3136
- function Update(api, data) {
3332
+ function Update(api, data, reqParams) {
3137
3333
  return __awaiter(this, void 0, void 0, function () {
3138
3334
  return __generator(this, function (_a) {
3139
3335
  switch (_a.label) {
@@ -3144,7 +3340,7 @@ var EntityRelationType;
3144
3340
  if (!data.ID) {
3145
3341
  data.ID = ObjectUtils.UId();
3146
3342
  }
3147
- return [4 /*yield*/, api.POST("entityRelationType/" + data.ID, data, Api.PrepReqParams())];
3343
+ return [4 /*yield*/, api.POST("entityRelationType/" + data.ID, data, Api.PrepReqParams(reqParams))];
3148
3344
  case 1:
3149
3345
  data = _a.sent();
3150
3346
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -3180,7 +3376,7 @@ var EntityRelation;
3180
3376
  Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
3181
3377
  }
3182
3378
  EntityRelation.GetListCacheKey = GetListCacheKey;
3183
- function Create(api, data) {
3379
+ function Create(api, data, reqParams) {
3184
3380
  return __awaiter(this, void 0, void 0, function () {
3185
3381
  var reqData, url;
3186
3382
  return __generator(this, function (_a) {
@@ -3193,7 +3389,7 @@ var EntityRelation;
3193
3389
  "Related.Entity.ID": [data["Related.Entity.ID"]]
3194
3390
  };
3195
3391
  url = "entity/" + data["Principal.Entity.ID"] + "/relation/" + data["Relation.Type.ID"] + "/add";
3196
- return [4 /*yield*/, api.POST(url, reqData, Api.PrepReqParams())];
3392
+ return [4 /*yield*/, api.POST(url, reqData, Api.PrepReqParams(reqParams))];
3197
3393
  case 1:
3198
3394
  _a.sent();
3199
3395
  api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Principal.Entity.ID"]);
@@ -3208,7 +3404,7 @@ var EntityRelation;
3208
3404
  });
3209
3405
  }
3210
3406
  EntityRelation.Create = Create;
3211
- function Update(api, data) {
3407
+ function Update(api, data, reqParams) {
3212
3408
  return __awaiter(this, void 0, void 0, function () {
3213
3409
  var url;
3214
3410
  return __generator(this, function (_a) {
@@ -3218,7 +3414,7 @@ var EntityRelation;
3218
3414
  throw ("Principal Entity ID, Related Entity ID, and Relation Type ID are required.");
3219
3415
  }
3220
3416
  url = "entity/" + data["Principal.Entity.ID"] + "/otherEntityID/" + data["Related.Entity.ID"] + "/relation/" + data["Relation.Type.ID"] + "/update";
3221
- return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams())];
3417
+ return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams(reqParams))];
3222
3418
  case 1:
3223
3419
  data = _a.sent();
3224
3420
  api.Cache.RemoveByStartsWith(Api.ECacheKey.Relation + Api.ECacheKey.Id + data["Principal.Entity.ID"]);
@@ -3233,7 +3429,7 @@ var EntityRelation;
3233
3429
  });
3234
3430
  }
3235
3431
  EntityRelation.Update = Update;
3236
- function GetList(api, entityId, params) {
3432
+ function GetList(api, entityId, params, reqParams) {
3237
3433
  return __awaiter(this, void 0, void 0, function () {
3238
3434
  var cacheData, req;
3239
3435
  var _this = this;
@@ -3242,7 +3438,7 @@ var EntityRelation;
3242
3438
  throw ("Entity ID is required.");
3243
3439
  }
3244
3440
  params = __assign({ typeId: "", oneWayOnly: false, loadEntityData: false }, params);
3245
- cacheData = api.Cache.Get(GetListCacheKey(entityId, params));
3441
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityId, params));
3246
3442
  if (cacheData) {
3247
3443
  return [2 /*return*/, cacheData];
3248
3444
  }
@@ -3257,7 +3453,7 @@ var EntityRelation;
3257
3453
  url += "/" + params.typeId;
3258
3454
  }
3259
3455
  url += "?Oneway=" + params.oneWayOnly + "&LoadInfo=" + params.loadEntityData;
3260
- return [4 /*yield*/, api.GET(url, Api.PrepReqParams())];
3456
+ return [4 /*yield*/, api.GET(url, Api.PrepReqParams(reqParams))];
3261
3457
  case 1:
3262
3458
  data = _a.sent();
3263
3459
  res(data.Items);
@@ -3276,18 +3472,18 @@ var EntityRelation;
3276
3472
  });
3277
3473
  }
3278
3474
  EntityRelation.GetList = GetList;
3279
- function GetByDataEntityId(api, entityId) {
3475
+ function GetByDataEntityId(api, entityId, reqParams) {
3280
3476
  return __awaiter(this, void 0, void 0, function () {
3281
3477
  var cacheData, req;
3282
3478
  return __generator(this, function (_a) {
3283
3479
  if (!entityId) {
3284
3480
  throw ("Entity ID is required.");
3285
3481
  }
3286
- cacheData = api.Cache.Get(GetEntityCacheKey(entityId));
3482
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetEntityCacheKey(entityId));
3287
3483
  if (cacheData) {
3288
3484
  return [2 /*return*/, cacheData];
3289
3485
  }
3290
- req = api.GET("entity/relation/" + entityId + "/dataentity", Api.PrepReqParams());
3486
+ req = api.GET("entity/relation/" + entityId + "/dataentity", Api.PrepReqParams(reqParams));
3291
3487
  api.Cache.Set(GetEntityCacheKey(entityId), req);
3292
3488
  return [2 /*return*/, req];
3293
3489
  });
@@ -3307,7 +3503,7 @@ var EntitySource;
3307
3503
  return "" + Api.ECacheKey.EntitySource + Api.ECacheKey.Id + sourceId + Api.ECacheKey.Id + sourceKey;
3308
3504
  }
3309
3505
  EntitySource.GetCacheKey = GetCacheKey;
3310
- function Get(api, sourceId, sourceKey) {
3506
+ function Get(api, sourceId, sourceKey, reqParams) {
3311
3507
  return __awaiter(this, void 0, void 0, function () {
3312
3508
  var key, cacheData, req;
3313
3509
  return __generator(this, function (_a) {
@@ -3315,18 +3511,18 @@ var EntitySource;
3315
3511
  throw ("Source ID and Source Key are required.");
3316
3512
  }
3317
3513
  key = GetCacheKey(sourceId, sourceKey);
3318
- cacheData = api.Cache.Get(key);
3514
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3319
3515
  if (cacheData) {
3320
3516
  return [2 /*return*/, cacheData];
3321
3517
  }
3322
- req = api.GET("entitysource/" + sourceId + "/" + sourceKey, Api.PrepReqParams());
3518
+ req = api.GET("entitysource/" + sourceId + "/" + sourceKey, Api.PrepReqParams(reqParams));
3323
3519
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
3324
3520
  return [2 /*return*/, req];
3325
3521
  });
3326
3522
  });
3327
3523
  }
3328
3524
  EntitySource.Get = Get;
3329
- function GetListByKeys(api, sourceId, sourceKeys) {
3525
+ function GetListByKeys(api, sourceId, sourceKeys, reqParams) {
3330
3526
  return __awaiter(this, void 0, void 0, function () {
3331
3527
  var reqKeys, reqs, i, sourceKey, cacheData, prom_1, _loop_1, i;
3332
3528
  var _this = this;
@@ -3340,7 +3536,7 @@ var EntitySource;
3340
3536
  reqs = [];
3341
3537
  for (i = 0; i < sourceKeys.length; i++) {
3342
3538
  sourceKey = sourceKeys[i];
3343
- cacheData = api.Cache.Get(GetCacheKey(sourceId, sourceKey));
3539
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(sourceId, sourceKey));
3344
3540
  if (cacheData) {
3345
3541
  reqs.push(cacheData);
3346
3542
  }
@@ -3355,7 +3551,7 @@ var EntitySource;
3355
3551
  switch (_a.label) {
3356
3552
  case 0:
3357
3553
  _a.trys.push([0, 2, , 3]);
3358
- return [4 /*yield*/, api.POST("entitysource/" + sourceId, { SourceRecordKeys: reqKeys }, Api.PrepReqParams())];
3554
+ return [4 /*yield*/, api.POST("entitysource/" + sourceId, { SourceRecordKeys: reqKeys }, Api.PrepReqParams(reqParams))];
3359
3555
  case 1:
3360
3556
  data = _a.sent();
3361
3557
  res(data.Items);
@@ -3401,7 +3597,7 @@ var EntitySource;
3401
3597
  });
3402
3598
  }
3403
3599
  EntitySource.GetListByKeys = GetListByKeys;
3404
- function GetEntityIdsBySourceKeys(api, sourceId, sourceKeys) {
3600
+ function GetEntityIdsBySourceKeys(api, sourceId, sourceKeys, reqParams) {
3405
3601
  return __awaiter(this, void 0, void 0, function () {
3406
3602
  var result, sources, i, source, i_1, key;
3407
3603
  return __generator(this, function (_a) {
@@ -3412,7 +3608,7 @@ var EntitySource;
3412
3608
  }
3413
3609
  result = {};
3414
3610
  if (!(sourceKeys.length > 0)) return [3 /*break*/, 2];
3415
- return [4 /*yield*/, GetListByKeys(api, sourceId, sourceKeys)];
3611
+ return [4 /*yield*/, GetListByKeys(api, sourceId, sourceKeys, reqParams)];
3416
3612
  case 1:
3417
3613
  sources = _a.sent();
3418
3614
  for (i = 0; i < sources.length; i++) {
@@ -3451,7 +3647,7 @@ var EntityTag;
3451
3647
  return Api.ECacheKey.Tag;
3452
3648
  }
3453
3649
  EntityTag.GetListCacheKey = GetListCacheKey;
3454
- function Get(api, tagId) {
3650
+ function Get(api, tagId, reqParams) {
3455
3651
  return __awaiter(this, void 0, void 0, function () {
3456
3652
  var data;
3457
3653
  return __generator(this, function (_a) {
@@ -3460,7 +3656,7 @@ var EntityTag;
3460
3656
  if (!tagId) {
3461
3657
  throw ("Tag ID is required.");
3462
3658
  }
3463
- return [4 /*yield*/, GetListByIds(api, [tagId])];
3659
+ return [4 /*yield*/, GetListByIds(api, [tagId], reqParams)];
3464
3660
  case 1:
3465
3661
  data = _a.sent();
3466
3662
  return [2 /*return*/, data.length ? data[0] : null];
@@ -3469,7 +3665,7 @@ var EntityTag;
3469
3665
  });
3470
3666
  }
3471
3667
  EntityTag.Get = Get;
3472
- function GetListByIds(api, tagIds) {
3668
+ function GetListByIds(api, tagIds, reqParams) {
3473
3669
  return __awaiter(this, void 0, void 0, function () {
3474
3670
  var reqIds, reqs, i, tagId, cacheData, prom_1, _loop_1, i;
3475
3671
  var _this = this;
@@ -3483,7 +3679,7 @@ var EntityTag;
3483
3679
  reqs = [];
3484
3680
  for (i = 0; i < tagIds.length; i++) {
3485
3681
  tagId = tagIds[i];
3486
- cacheData = api.Cache.Get(GetCacheKey(tagId));
3682
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(tagId));
3487
3683
  if (cacheData) {
3488
3684
  reqs.push(cacheData);
3489
3685
  }
@@ -3498,7 +3694,7 @@ var EntityTag;
3498
3694
  switch (_a.label) {
3499
3695
  case 0:
3500
3696
  _a.trys.push([0, 2, , 3]);
3501
- return [4 /*yield*/, api.POST("layers/get", { layerIds: reqIds }, Api.PrepReqParams())];
3697
+ return [4 /*yield*/, api.POST("layers/get", { layerIds: reqIds }, Api.PrepReqParams(reqParams))];
3502
3698
  case 1:
3503
3699
  data = _a.sent();
3504
3700
  res(data.Items);
@@ -3547,12 +3743,12 @@ var EntityTag;
3547
3743
  });
3548
3744
  }
3549
3745
  EntityTag.GetListByIds = GetListByIds;
3550
- function GetList(api, entityTypeId) {
3746
+ function GetList(api, entityTypeId, reqParams) {
3551
3747
  return __awaiter(this, void 0, void 0, function () {
3552
3748
  var cacheData, req;
3553
3749
  var _this = this;
3554
3750
  return __generator(this, function (_a) {
3555
- cacheData = api.Cache.Get(GetListCacheKey(entityTypeId));
3751
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(entityTypeId));
3556
3752
  if (cacheData) {
3557
3753
  return [2 /*return*/, cacheData];
3558
3754
  }
@@ -3562,7 +3758,7 @@ var EntityTag;
3562
3758
  switch (_a.label) {
3563
3759
  case 0:
3564
3760
  _a.trys.push([0, 2, , 3]);
3565
- return [4 /*yield*/, api.GET(entityTypeId ? "entityType/" + entityTypeId + "/layers" : "layers", Api.PrepReqParams())];
3761
+ return [4 /*yield*/, api.GET(entityTypeId ? "entityType/" + entityTypeId + "/layers" : "layers", Api.PrepReqParams(reqParams))];
3566
3762
  case 1:
3567
3763
  data = _a.sent();
3568
3764
  res(data.Items);
@@ -3581,7 +3777,7 @@ var EntityTag;
3581
3777
  });
3582
3778
  }
3583
3779
  EntityTag.GetList = GetList;
3584
- function Delete(api, tagId) {
3780
+ function Delete(api, tagId, reqParams) {
3585
3781
  return __awaiter(this, void 0, void 0, function () {
3586
3782
  return __generator(this, function (_a) {
3587
3783
  switch (_a.label) {
@@ -3589,7 +3785,7 @@ var EntityTag;
3589
3785
  if (!tagId) {
3590
3786
  throw ("Tag ID is required.");
3591
3787
  }
3592
- return [4 /*yield*/, api.DELETE("layer/" + tagId, Api.PrepReqParams())];
3788
+ return [4 /*yield*/, api.DELETE("layer/" + tagId, Api.PrepReqParams(reqParams))];
3593
3789
  case 1:
3594
3790
  _a.sent();
3595
3791
  api.Cache.Remove(GetCacheKey(tagId));
@@ -3600,7 +3796,7 @@ var EntityTag;
3600
3796
  });
3601
3797
  }
3602
3798
  EntityTag.Delete = Delete;
3603
- function Update(api, data) {
3799
+ function Update(api, data, reqParams) {
3604
3800
  return __awaiter(this, void 0, void 0, function () {
3605
3801
  var url;
3606
3802
  return __generator(this, function (_a) {
@@ -3610,7 +3806,7 @@ var EntityTag;
3610
3806
  throw ("Tag ID is required.");
3611
3807
  }
3612
3808
  url = data.ID ? "layer/" + data.ID : "layer";
3613
- return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams())];
3809
+ return [4 /*yield*/, api.POST(url, data, Api.PrepReqParams(reqParams))];
3614
3810
  case 1:
3615
3811
  data = _a.sent();
3616
3812
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -3647,7 +3843,7 @@ var EntityType;
3647
3843
  EAttributeType["Structure"] = "Structure";
3648
3844
  EAttributeType["Geometry"] = "Geometry";
3649
3845
  })(EAttributeType = EntityType.EAttributeType || (EntityType.EAttributeType = {}));
3650
- function Get(api, typeId) {
3846
+ function Get(api, typeId, reqParams) {
3651
3847
  return __awaiter(this, void 0, void 0, function () {
3652
3848
  var key, cacheData, req;
3653
3849
  return __generator(this, function (_a) {
@@ -3655,18 +3851,18 @@ var EntityType;
3655
3851
  throw ("Type ID is required.");
3656
3852
  }
3657
3853
  key = GetCacheKey(typeId);
3658
- cacheData = api.Cache.Get(key);
3854
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
3659
3855
  if (cacheData) {
3660
3856
  return [2 /*return*/, cacheData];
3661
3857
  }
3662
- req = api.GET("entitytype/" + typeId, Api.PrepReqParams());
3858
+ req = api.GET("entitytype/" + typeId, Api.PrepReqParams(reqParams));
3663
3859
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
3664
3860
  return [2 /*return*/, req];
3665
3861
  });
3666
3862
  });
3667
3863
  }
3668
3864
  EntityType.Get = Get;
3669
- function Delete(api, typeId) {
3865
+ function Delete(api, typeId, reqParams) {
3670
3866
  return __awaiter(this, void 0, void 0, function () {
3671
3867
  return __generator(this, function (_a) {
3672
3868
  switch (_a.label) {
@@ -3674,7 +3870,7 @@ var EntityType;
3674
3870
  if (!typeId) {
3675
3871
  throw ("Type ID is required.");
3676
3872
  }
3677
- return [4 /*yield*/, api.DELETE("entitytype/" + typeId, Api.PrepReqParams())];
3873
+ return [4 /*yield*/, api.DELETE("entitytype/" + typeId, Api.PrepReqParams(reqParams))];
3678
3874
  case 1:
3679
3875
  _a.sent();
3680
3876
  api.Cache.Remove(GetCacheKey(typeId));
@@ -3685,12 +3881,12 @@ var EntityType;
3685
3881
  });
3686
3882
  }
3687
3883
  EntityType.Delete = Delete;
3688
- function GetList(api) {
3884
+ function GetList(api, reqParams) {
3689
3885
  return __awaiter(this, void 0, void 0, function () {
3690
3886
  var cacheData, req;
3691
3887
  var _this = this;
3692
3888
  return __generator(this, function (_a) {
3693
- cacheData = api.Cache.Get(GetListCacheKey());
3889
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
3694
3890
  if (cacheData) {
3695
3891
  return [2 /*return*/, cacheData];
3696
3892
  }
@@ -3700,7 +3896,7 @@ var EntityType;
3700
3896
  switch (_a.label) {
3701
3897
  case 0:
3702
3898
  _a.trys.push([0, 2, , 3]);
3703
- return [4 /*yield*/, api.GET("entitytypes", Api.PrepReqParams())];
3899
+ return [4 /*yield*/, api.GET("entitytypes", Api.PrepReqParams(reqParams))];
3704
3900
  case 1:
3705
3901
  data = _a.sent();
3706
3902
  res(data.Items);
@@ -3719,7 +3915,7 @@ var EntityType;
3719
3915
  });
3720
3916
  }
3721
3917
  EntityType.GetList = GetList;
3722
- function Update(api, data) {
3918
+ function Update(api, data, reqParams) {
3723
3919
  return __awaiter(this, void 0, void 0, function () {
3724
3920
  return __generator(this, function (_a) {
3725
3921
  switch (_a.label) {
@@ -3733,7 +3929,7 @@ var EntityType;
3733
3929
  if (!data.Name) {
3734
3930
  data.Name = data.ID;
3735
3931
  }
3736
- return [4 /*yield*/, api.POST("entitytype/" + data.ID, data, Api.PrepReqParams())];
3932
+ return [4 /*yield*/, api.POST("entitytype/" + data.ID, data, Api.PrepReqParams(reqParams))];
3737
3933
  case 1:
3738
3934
  data = _a.sent();
3739
3935
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -4398,22 +4594,22 @@ var EntityCoords;
4398
4594
  return Api.ECacheKey.EntityCoords + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
4399
4595
  }
4400
4596
  EntityCoords.GetCacheKey = GetCacheKey;
4401
- function GetEntityCoords(api, entityId) {
4597
+ function GetEntityCoords(api, entityId, reqParams) {
4402
4598
  return __awaiter(this, void 0, void 0, function () {
4403
4599
  var cacheData, req;
4404
4600
  return __generator(this, function (_a) {
4405
- cacheData = api.Cache.Get(GetCacheKey(entityId));
4601
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(entityId));
4406
4602
  if (cacheData) {
4407
4603
  return [2 /*return*/, cacheData];
4408
4604
  }
4409
- req = api.GET("entity/" + entityId + "/ucs");
4605
+ req = api.GET("entity/" + entityId + "/ucs", reqParams);
4410
4606
  api.Cache.Set(GetCacheKey(entityId), req, Api.DEFAULT_CACHE_DURATION);
4411
4607
  return [2 /*return*/, req];
4412
4608
  });
4413
4609
  });
4414
4610
  }
4415
4611
  EntityCoords.GetEntityCoords = GetEntityCoords;
4416
- function EntityRelativeToPoint(api, entityId, params) {
4612
+ function EntityRelativeToPoint(api, entityId, params, reqParams) {
4417
4613
  return __awaiter(this, void 0, void 0, function () {
4418
4614
  var point, name, res;
4419
4615
  return __generator(this, function (_a) {
@@ -4441,7 +4637,7 @@ var EntityCoords;
4441
4637
  }
4442
4638
  },
4443
4639
  "test": params.test
4444
- })];
4640
+ }, reqParams)];
4445
4641
  case 3:
4446
4642
  res = _a.sent();
4447
4643
  if (!params.test) {
@@ -4453,7 +4649,7 @@ var EntityCoords;
4453
4649
  });
4454
4650
  }
4455
4651
  EntityCoords.EntityRelativeToPoint = EntityRelativeToPoint;
4456
- function EntityRelativeToEpsg(api, entityId, params) {
4652
+ function EntityRelativeToEpsg(api, entityId, params, reqParams) {
4457
4653
  var _a;
4458
4654
  return __awaiter(this, void 0, void 0, function () {
4459
4655
  var epsg, name, res;
@@ -4480,7 +4676,7 @@ var EntityCoords;
4480
4676
  }
4481
4677
  },
4482
4678
  "test": params.test
4483
- })];
4679
+ }, reqParams)];
4484
4680
  case 3:
4485
4681
  res = _b.sent();
4486
4682
  if (!params.test) {
@@ -4492,7 +4688,7 @@ var EntityCoords;
4492
4688
  });
4493
4689
  }
4494
4690
  EntityCoords.EntityRelativeToEpsg = EntityRelativeToEpsg;
4495
- function EntityRelativeToUcs(api, entityId, params) {
4691
+ function EntityRelativeToUcs(api, entityId, params, reqParams) {
4496
4692
  return __awaiter(this, void 0, void 0, function () {
4497
4693
  var ucsId, res;
4498
4694
  return __generator(this, function (_a) {
@@ -4510,7 +4706,7 @@ var EntityCoords;
4510
4706
  "Entity.ID": ucsId
4511
4707
  },
4512
4708
  "test": params.test
4513
- })];
4709
+ }, reqParams)];
4514
4710
  case 3:
4515
4711
  res = _a.sent();
4516
4712
  if (!params.test) {
@@ -4522,10 +4718,10 @@ var EntityCoords;
4522
4718
  });
4523
4719
  }
4524
4720
  EntityCoords.EntityRelativeToUcs = EntityRelativeToUcs;
4525
- function UnlinkCoords(api, entityId) {
4721
+ function UnlinkCoords(api, entityId, reqParams) {
4526
4722
  return __awaiter(this, void 0, void 0, function () {
4527
4723
  return __generator(this, function (_a) {
4528
- return [2 /*return*/, api.DELETE("entity/" + entityId + "/ucs")];
4724
+ return [2 /*return*/, api.DELETE("entity/" + entityId + "/ucs", reqParams)];
4529
4725
  });
4530
4726
  });
4531
4727
  }
@@ -4550,7 +4746,7 @@ var ClientFile;
4550
4746
  return api.GetBaseUrl() + "/file/" + file.ID + (file.FileExt ? file.FileExt : "");
4551
4747
  }
4552
4748
  ClientFile.GetUrlWithExt = GetUrlWithExt;
4553
- function Get(api, fileId) {
4749
+ function Get(api, fileId, reqParams) {
4554
4750
  return __awaiter(this, void 0, void 0, function () {
4555
4751
  var key, cacheData, req;
4556
4752
  return __generator(this, function (_a) {
@@ -4558,18 +4754,18 @@ var ClientFile;
4558
4754
  throw ("File ID is required.");
4559
4755
  }
4560
4756
  key = GetCacheKey(fileId);
4561
- cacheData = api.Cache.Get(key);
4757
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4562
4758
  if (cacheData) {
4563
4759
  return [2 /*return*/, cacheData];
4564
4760
  }
4565
- req = api.GET("file/" + fileId + "/details", Api.PrepReqParams());
4761
+ req = api.GET("file/" + fileId + "/details", Api.PrepReqParams(reqParams));
4566
4762
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
4567
4763
  return [2 /*return*/, req];
4568
4764
  });
4569
4765
  });
4570
4766
  }
4571
4767
  ClientFile.Get = Get;
4572
- function Delete(api, fileIds) {
4768
+ function Delete(api, fileIds, reqParams) {
4573
4769
  return __awaiter(this, void 0, void 0, function () {
4574
4770
  var data, i, key;
4575
4771
  return __generator(this, function (_a) {
@@ -4581,7 +4777,7 @@ var ClientFile;
4581
4777
  data = {
4582
4778
  Items: fileIds
4583
4779
  };
4584
- return [4 /*yield*/, api.POST("deleteFiles", data, Api.PrepReqParams())];
4780
+ return [4 /*yield*/, api.POST("deleteFiles", data, Api.PrepReqParams(reqParams))];
4585
4781
  case 1:
4586
4782
  _a.sent();
4587
4783
  for (i = 0; i < fileIds.length; i++) {
@@ -4594,7 +4790,7 @@ var ClientFile;
4594
4790
  });
4595
4791
  }
4596
4792
  ClientFile.Delete = Delete;
4597
- function Upload(api, file, purpose, onProgress) {
4793
+ function Upload(api, file, purpose, reqParams) {
4598
4794
  return __awaiter(this, void 0, void 0, function () {
4599
4795
  var formData, params;
4600
4796
  return __generator(this, function (_a) {
@@ -4607,8 +4803,7 @@ var ClientFile;
4607
4803
  "Purpose": purpose
4608
4804
  };
4609
4805
  }
4610
- params = Api.PrepReqParams();
4611
- params.onProgress = onProgress;
4806
+ params = Api.PrepReqParams(reqParams);
4612
4807
  params.formData = formData;
4613
4808
  return [2 /*return*/, api.UPLOAD("file/uploadNew", file, params)];
4614
4809
  });
@@ -4639,12 +4834,12 @@ var ClientFile;
4639
4834
  ERowOperator["AND"] = "AND";
4640
4835
  ERowOperator["OR"] = "OR";
4641
4836
  })(ERowOperator = V1.ERowOperator || (V1.ERowOperator = {}));
4642
- function GetList(api, filter) {
4837
+ function GetList(api, filter, reqParams) {
4643
4838
  return __awaiter(this, void 0, void 0, function () {
4644
4839
  var data;
4645
4840
  return __generator(this, function (_a) {
4646
4841
  switch (_a.label) {
4647
- case 0: return [4 /*yield*/, api.POST("files/filtered", filter, Api.PrepReqParams())];
4842
+ case 0: return [4 /*yield*/, api.POST("files/filtered", filter, Api.PrepReqParams(reqParams))];
4648
4843
  case 1:
4649
4844
  data = _a.sent();
4650
4845
  return [2 /*return*/, data.Items];
@@ -4663,7 +4858,7 @@ var ClientFile;
4663
4858
  EConvertExt["GLB"] = ".glb";
4664
4859
  EConvertExt["SKP"] = ".skp";
4665
4860
  })(EConvertExt = Processor.EConvertExt || (Processor.EConvertExt = {}));
4666
- function ConvertFormat(api, clientFileId, ext) {
4861
+ function ConvertFormat(api, clientFileId, ext, reqParams) {
4667
4862
  return __awaiter(this, void 0, void 0, function () {
4668
4863
  return __generator(this, function (_a) {
4669
4864
  if (!clientFileId || !ext) {
@@ -4673,7 +4868,7 @@ var ClientFile;
4673
4868
  clientFileId: clientFileId,
4674
4869
  destinationFormat: ext,
4675
4870
  operations: []
4676
- })];
4871
+ }, reqParams)];
4677
4872
  });
4678
4873
  });
4679
4874
  }
@@ -4701,7 +4896,7 @@ var ProgramKey;
4701
4896
  EProgramId["BingMaps"] = "BingMaps";
4702
4897
  EProgramId["Mapbox"] = "Mapbox";
4703
4898
  })(EProgramId = ProgramKey.EProgramId || (ProgramKey.EProgramId = {}));
4704
- function Get(api, programId) {
4899
+ function Get(api, programId, reqParams) {
4705
4900
  return __awaiter(this, void 0, void 0, function () {
4706
4901
  var key, cacheData, req;
4707
4902
  return __generator(this, function (_a) {
@@ -4709,23 +4904,23 @@ var ProgramKey;
4709
4904
  throw ("Program ID is required.");
4710
4905
  }
4711
4906
  key = GetCacheKey(programId);
4712
- cacheData = api.Cache.Get(key);
4907
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
4713
4908
  if (cacheData) {
4714
4909
  return [2 /*return*/, cacheData];
4715
4910
  }
4716
- req = api.GET("programkey/" + programId, Api.PrepReqParams());
4911
+ req = api.GET("programkey/" + programId, Api.PrepReqParams(reqParams));
4717
4912
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
4718
4913
  return [2 /*return*/, req];
4719
4914
  });
4720
4915
  });
4721
4916
  }
4722
4917
  ProgramKey.Get = Get;
4723
- function GetList(api) {
4918
+ function GetList(api, reqParams) {
4724
4919
  return __awaiter(this, void 0, void 0, function () {
4725
4920
  var cacheData, req;
4726
4921
  var _this = this;
4727
4922
  return __generator(this, function (_a) {
4728
- cacheData = api.Cache.Get(GetListCacheKey());
4923
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
4729
4924
  if (cacheData) {
4730
4925
  return [2 /*return*/, cacheData];
4731
4926
  }
@@ -4735,7 +4930,7 @@ var ProgramKey;
4735
4930
  switch (_a.label) {
4736
4931
  case 0:
4737
4932
  _a.trys.push([0, 2, , 3]);
4738
- return [4 /*yield*/, api.GET("programkeys", Api.PrepReqParams())];
4933
+ return [4 /*yield*/, api.GET("programkeys", Api.PrepReqParams(reqParams))];
4739
4934
  case 1:
4740
4935
  data = _a.sent();
4741
4936
  res(data.Items);
@@ -4754,7 +4949,7 @@ var ProgramKey;
4754
4949
  });
4755
4950
  }
4756
4951
  ProgramKey.GetList = GetList;
4757
- function Delete(api, programId) {
4952
+ function Delete(api, programId, reqParams) {
4758
4953
  return __awaiter(this, void 0, void 0, function () {
4759
4954
  return __generator(this, function (_a) {
4760
4955
  switch (_a.label) {
@@ -4762,7 +4957,7 @@ var ProgramKey;
4762
4957
  if (!programId) {
4763
4958
  throw ("Program ID is required.");
4764
4959
  }
4765
- return [4 /*yield*/, api.DELETE("programkey/" + programId, Api.PrepReqParams())];
4960
+ return [4 /*yield*/, api.DELETE("programkey/" + programId, Api.PrepReqParams(reqParams))];
4766
4961
  case 1:
4767
4962
  _a.sent();
4768
4963
  api.Cache.Remove(GetCacheKey(programId));
@@ -4773,7 +4968,7 @@ var ProgramKey;
4773
4968
  });
4774
4969
  }
4775
4970
  ProgramKey.Delete = Delete;
4776
- function Update(api, data) {
4971
+ function Update(api, data, reqParams) {
4777
4972
  return __awaiter(this, void 0, void 0, function () {
4778
4973
  return __generator(this, function (_a) {
4779
4974
  switch (_a.label) {
@@ -4781,7 +4976,7 @@ var ProgramKey;
4781
4976
  if (!(data === null || data === void 0 ? void 0 : data.ProgramId)) {
4782
4977
  throw ("Program ID is required.");
4783
4978
  }
4784
- return [4 /*yield*/, api.POST("programkey", data, Api.PrepReqParams())];
4979
+ return [4 /*yield*/, api.POST("programkey", data, Api.PrepReqParams(reqParams))];
4785
4980
  case 1:
4786
4981
  data = _a.sent();
4787
4982
  api.Cache.Remove(GetCacheKey(data.ProgramId));
@@ -4847,7 +5042,7 @@ var Tileset;
4847
5042
  EPivot["Weight"] = "weight";
4848
5043
  EPivot["UCS"] = "ucs";
4849
5044
  })(EPivot = Tileset.EPivot || (Tileset.EPivot = {}));
4850
- function Get(api, tilesetId, loadFiles) {
5045
+ function Get(api, tilesetId, loadFiles, reqParams) {
4851
5046
  if (loadFiles === void 0) { loadFiles = false; }
4852
5047
  return __awaiter(this, void 0, void 0, function () {
4853
5048
  var cacheData, req;
@@ -4855,23 +5050,23 @@ var Tileset;
4855
5050
  if (!tilesetId) {
4856
5051
  throw ("Tileset ID is required.");
4857
5052
  }
4858
- cacheData = api.Cache.Get(GetCacheKey(tilesetId, loadFiles));
5053
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(tilesetId, loadFiles));
4859
5054
  if (cacheData) {
4860
5055
  return [2 /*return*/, cacheData];
4861
5056
  }
4862
- req = api.GET("tileset/get/" + tilesetId + "?noFiles=" + (loadFiles ? 0 : 1));
5057
+ req = api.GET("tileset/get/" + tilesetId + "?noFiles=" + (loadFiles ? 0 : 1), reqParams);
4863
5058
  api.Cache.Set(GetCacheKey(tilesetId, loadFiles), req, Api.DEFAULT_CACHE_DURATION);
4864
5059
  return [2 /*return*/, req];
4865
5060
  });
4866
5061
  });
4867
5062
  }
4868
5063
  Tileset.Get = Get;
4869
- function GetList(api) {
5064
+ function GetList(api, reqParams) {
4870
5065
  return __awaiter(this, void 0, void 0, function () {
4871
5066
  var cacheData, req;
4872
5067
  var _this = this;
4873
5068
  return __generator(this, function (_a) {
4874
- cacheData = api.Cache.Get(GetListCacheKey());
5069
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
4875
5070
  if (cacheData) {
4876
5071
  return [2 /*return*/, cacheData];
4877
5072
  }
@@ -4881,7 +5076,7 @@ var Tileset;
4881
5076
  switch (_a.label) {
4882
5077
  case 0:
4883
5078
  _a.trys.push([0, 2, , 3]);
4884
- return [4 /*yield*/, api.GET("tileset/getList")];
5079
+ return [4 /*yield*/, api.GET("tileset/getList", reqParams)];
4885
5080
  case 1:
4886
5081
  data = _a.sent();
4887
5082
  res(data);
@@ -4900,7 +5095,7 @@ var Tileset;
4900
5095
  });
4901
5096
  }
4902
5097
  Tileset.GetList = GetList;
4903
- function Delete(api, tilesetId) {
5098
+ function Delete(api, tilesetId, reqParams) {
4904
5099
  return __awaiter(this, void 0, void 0, function () {
4905
5100
  return __generator(this, function (_a) {
4906
5101
  switch (_a.label) {
@@ -4908,7 +5103,7 @@ var Tileset;
4908
5103
  if (!tilesetId) {
4909
5104
  throw ("Tileset ID is required.");
4910
5105
  }
4911
- return [4 /*yield*/, api.DELETE("tileset/delete/" + tilesetId)];
5106
+ return [4 /*yield*/, api.DELETE("tileset/delete/" + tilesetId, reqParams)];
4912
5107
  case 1:
4913
5108
  _a.sent();
4914
5109
  api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + tilesetId);
@@ -4919,7 +5114,7 @@ var Tileset;
4919
5114
  });
4920
5115
  }
4921
5116
  Tileset.Delete = Delete;
4922
- function Update(api, data) {
5117
+ function Update(api, data, reqParams) {
4923
5118
  return __awaiter(this, void 0, void 0, function () {
4924
5119
  var isNew, res;
4925
5120
  return __generator(this, function (_a) {
@@ -4930,12 +5125,12 @@ var Tileset;
4930
5125
  }
4931
5126
  isNew = !data.id;
4932
5127
  if (!isNew) return [3 /*break*/, 2];
4933
- return [4 /*yield*/, api.GET("tileset/new?type=" + data.type + "&name=" + Api.Encode(data.name))];
5128
+ return [4 /*yield*/, api.GET("tileset/new?type=" + data.type + "&name=" + Api.Encode(data.name), reqParams)];
4934
5129
  case 1:
4935
5130
  res = _a.sent();
4936
5131
  data = __assign(__assign(__assign({}, res), data), { settings: __assign(__assign({}, res.settings), data.settings), id: res.id });
4937
5132
  _a.label = 2;
4938
- case 2: return [4 /*yield*/, api.POST("tileset/update/" + data.id, data, Api.PrepReqParams())];
5133
+ case 2: return [4 /*yield*/, api.POST("tileset/update/" + data.id, data, Api.PrepReqParams(reqParams))];
4939
5134
  case 3:
4940
5135
  _a.sent();
4941
5136
  api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + data.id);
@@ -4946,21 +5141,20 @@ var Tileset;
4946
5141
  });
4947
5142
  }
4948
5143
  Tileset.Update = Update;
4949
- function UploadFile(api, tilesetId, file, onProgress) {
5144
+ function UploadFile(api, tilesetId, file, reqParams) {
4950
5145
  return __awaiter(this, void 0, void 0, function () {
4951
5146
  var params;
4952
5147
  return __generator(this, function (_a) {
4953
5148
  if (!tilesetId || !file) {
4954
5149
  throw ("Tileset ID and file are required.");
4955
5150
  }
4956
- params = Api.PrepReqParams();
4957
- params.onProgress = onProgress;
5151
+ params = Api.PrepReqParams(reqParams);
4958
5152
  return [2 /*return*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/files", file, params)];
4959
5153
  });
4960
5154
  });
4961
5155
  }
4962
5156
  Tileset.UploadFile = UploadFile;
4963
- function DeleteFile(api, tilesetId, file) {
5157
+ function DeleteFile(api, tilesetId, file, reqParams) {
4964
5158
  return __awaiter(this, void 0, void 0, function () {
4965
5159
  return __generator(this, function (_a) {
4966
5160
  switch (_a.label) {
@@ -4968,7 +5162,7 @@ var Tileset;
4968
5162
  if (!tilesetId || !file) {
4969
5163
  throw ("Tileset ID and file are required.");
4970
5164
  }
4971
- return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/files/" + file)];
5165
+ return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/files/" + file, reqParams)];
4972
5166
  case 1:
4973
5167
  _a.sent();
4974
5168
  api.Cache.Remove(GetCacheKey(tilesetId, true));
@@ -4978,7 +5172,7 @@ var Tileset;
4978
5172
  });
4979
5173
  }
4980
5174
  Tileset.DeleteFile = DeleteFile;
4981
- function UploadSrcFile(api, tilesetId, file, onProgress) {
5175
+ function UploadSrcFile(api, tilesetId, file, reqParams) {
4982
5176
  return __awaiter(this, void 0, void 0, function () {
4983
5177
  var params;
4984
5178
  return __generator(this, function (_a) {
@@ -4987,8 +5181,7 @@ var Tileset;
4987
5181
  if (!tilesetId || !file) {
4988
5182
  throw ("Tileset ID and file are required.");
4989
5183
  }
4990
- params = Api.PrepReqParams();
4991
- params.onProgress = onProgress;
5184
+ params = Api.PrepReqParams(reqParams);
4992
5185
  return [4 /*yield*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/src", file, params)];
4993
5186
  case 1:
4994
5187
  _a.sent();
@@ -4999,7 +5192,7 @@ var Tileset;
4999
5192
  });
5000
5193
  }
5001
5194
  Tileset.UploadSrcFile = UploadSrcFile;
5002
- function DeleteSrcFile(api, tilesetId, file) {
5195
+ function DeleteSrcFile(api, tilesetId, file, reqParams) {
5003
5196
  return __awaiter(this, void 0, void 0, function () {
5004
5197
  return __generator(this, function (_a) {
5005
5198
  switch (_a.label) {
@@ -5007,7 +5200,7 @@ var Tileset;
5007
5200
  if (!tilesetId || !file) {
5008
5201
  throw ("Tileset ID and file are required.");
5009
5202
  }
5010
- return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/src/" + file)];
5203
+ return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/src/" + file, reqParams)];
5011
5204
  case 1:
5012
5205
  _a.sent();
5013
5206
  api.Cache.Remove(GetCacheKey(tilesetId, true));
@@ -5047,7 +5240,7 @@ var Tileset;
5047
5240
  return api.GetBaseUrl() + ("tileset/file/" + tilesetId + "/" + file);
5048
5241
  }
5049
5242
  Tileset.GetPublicFileUrl = GetPublicFileUrl;
5050
- function Generate(api, tilesetId) {
5243
+ function Generate(api, tilesetId, reqParams) {
5051
5244
  return __awaiter(this, void 0, void 0, function () {
5052
5245
  var res;
5053
5246
  return __generator(this, function (_a) {
@@ -5056,7 +5249,7 @@ var Tileset;
5056
5249
  if (!tilesetId) {
5057
5250
  throw ("Tileset ID is required.");
5058
5251
  }
5059
- return [4 /*yield*/, api.GET("tileset/generate/" + tilesetId, Api.PrepReqParams())];
5252
+ return [4 /*yield*/, api.GET("tileset/generate/" + tilesetId, Api.PrepReqParams(reqParams))];
5060
5253
  case 1:
5061
5254
  res = _a.sent();
5062
5255
  return [2 /*return*/, res.ID];
@@ -5074,7 +5267,7 @@ var Tileset;
5074
5267
  return Api.ECacheKey.PublishTileset + Api.ECacheKey.Id + accountId + Api.ECacheKey.Id + tilesetId;
5075
5268
  }
5076
5269
  Publish.GetCacheKey = GetCacheKey;
5077
- function Update(api, data) {
5270
+ function Update(api, data, reqParams) {
5078
5271
  return __awaiter(this, void 0, void 0, function () {
5079
5272
  var res, req;
5080
5273
  return __generator(this, function (_a) {
@@ -5086,14 +5279,14 @@ var Tileset;
5086
5279
  if (!data.ID) {
5087
5280
  data.ID = 0;
5088
5281
  }
5089
- return [4 /*yield*/, api.POST("tileset/" + data.ID, data)];
5282
+ return [4 /*yield*/, api.POST("tileset/" + data.ID, data, reqParams)];
5090
5283
  case 1:
5091
5284
  res = _a.sent();
5092
5285
  req = {
5093
5286
  "ClientAccount.ID": data["EnabledFor.ClientAccount.ID"]
5094
5287
  };
5095
5288
  data.ID = res.ID;
5096
- return [4 /*yield*/, api.POST("tileset/" + data.ID + "/enableForAccounts", req)];
5289
+ return [4 /*yield*/, api.POST("tileset/" + data.ID + "/enableForAccounts", req, reqParams)];
5097
5290
  case 2:
5098
5291
  _a.sent();
5099
5292
  api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"], data["Tileset.ID"]));
@@ -5104,25 +5297,25 @@ var Tileset;
5104
5297
  });
5105
5298
  }
5106
5299
  Publish.Update = Update;
5107
- function Get(api, accountId, tilesetId) {
5300
+ function Get(api, accountId, tilesetId, reqParams) {
5108
5301
  return __awaiter(this, void 0, void 0, function () {
5109
5302
  var cacheData, req;
5110
5303
  return __generator(this, function (_a) {
5111
5304
  if (!accountId || !tilesetId) {
5112
5305
  throw ("Client account ID and tileset ID are required.");
5113
5306
  }
5114
- cacheData = api.Cache.Get(GetCacheKey(accountId, tilesetId));
5307
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(accountId, tilesetId));
5115
5308
  if (cacheData) {
5116
5309
  return [2 /*return*/, cacheData];
5117
5310
  }
5118
- req = api.GET("tilesetByPublisher/" + accountId + "/" + tilesetId);
5311
+ req = api.GET("tilesetByPublisher/" + accountId + "/" + tilesetId, reqParams);
5119
5312
  api.Cache.Set(GetCacheKey(accountId, tilesetId), req);
5120
5313
  return [2 /*return*/, req];
5121
5314
  });
5122
5315
  });
5123
5316
  }
5124
5317
  Publish.Get = Get;
5125
- function GetList(api, accountId) {
5318
+ function GetList(api, accountId, reqParams) {
5126
5319
  return __awaiter(this, void 0, void 0, function () {
5127
5320
  var cacheData, req;
5128
5321
  var _this = this;
@@ -5130,7 +5323,7 @@ var Tileset;
5130
5323
  if (!accountId) {
5131
5324
  throw ("Client account ID is required.");
5132
5325
  }
5133
- cacheData = api.Cache.Get(GetCacheKey(accountId));
5326
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(accountId));
5134
5327
  if (cacheData) {
5135
5328
  return [2 /*return*/, cacheData];
5136
5329
  }
@@ -5140,7 +5333,7 @@ var Tileset;
5140
5333
  switch (_a.label) {
5141
5334
  case 0:
5142
5335
  _a.trys.push([0, 2, , 3]);
5143
- return [4 /*yield*/, api.GET("tilesets/enabledForAccount/" + accountId)];
5336
+ return [4 /*yield*/, api.GET("tilesets/enabledForAccount/" + accountId, reqParams)];
5144
5337
  case 1:
5145
5338
  data = _a.sent();
5146
5339
  res(data.Items);
@@ -5299,7 +5492,7 @@ var ProjectViewBookmark;
5299
5492
  (function (V2) {
5300
5493
  V2.DATA_VERSION = 2;
5301
5494
  })(V2 = ProjectViewBookmark.V2 || (ProjectViewBookmark.V2 = {}));
5302
- function Get(api, viewId, bookmarkId) {
5495
+ function Get(api, viewId, bookmarkId, reqParams) {
5303
5496
  return __awaiter(this, void 0, void 0, function () {
5304
5497
  var key, cacheData, req;
5305
5498
  return __generator(this, function (_a) {
@@ -5307,18 +5500,18 @@ var ProjectViewBookmark;
5307
5500
  throw ("View ID and Bookmark ID are required.");
5308
5501
  }
5309
5502
  key = GetCacheKey(viewId, bookmarkId);
5310
- cacheData = api.Cache.Get(key);
5503
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
5311
5504
  if (cacheData) {
5312
5505
  return [2 /*return*/, cacheData];
5313
5506
  }
5314
- req = api.GET("ui.view/" + viewId + "/slide/" + bookmarkId, Api.PrepReqParams());
5507
+ req = api.GET("ui.view/" + viewId + "/slide/" + bookmarkId, Api.PrepReqParams(reqParams));
5315
5508
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
5316
5509
  return [2 /*return*/, req];
5317
5510
  });
5318
5511
  });
5319
5512
  }
5320
5513
  ProjectViewBookmark.Get = Get;
5321
- function Delete(api, viewId, bookmarkId) {
5514
+ function Delete(api, viewId, bookmarkId, reqParams) {
5322
5515
  return __awaiter(this, void 0, void 0, function () {
5323
5516
  return __generator(this, function (_a) {
5324
5517
  switch (_a.label) {
@@ -5326,7 +5519,7 @@ var ProjectViewBookmark;
5326
5519
  if (!viewId || !bookmarkId) {
5327
5520
  throw ("View ID and Bookmark ID are required.");
5328
5521
  }
5329
- return [4 /*yield*/, api.DELETE("ui.view/" + viewId + "/slide/" + bookmarkId, Api.PrepReqParams())];
5522
+ return [4 /*yield*/, api.DELETE("ui.view/" + viewId + "/slide/" + bookmarkId, Api.PrepReqParams(reqParams))];
5330
5523
  case 1:
5331
5524
  _a.sent();
5332
5525
  api.Cache.Remove(GetCacheKey(viewId, bookmarkId));
@@ -5337,7 +5530,7 @@ var ProjectViewBookmark;
5337
5530
  });
5338
5531
  }
5339
5532
  ProjectViewBookmark.Delete = Delete;
5340
- function GetList(api, viewId) {
5533
+ function GetList(api, viewId, reqParams) {
5341
5534
  return __awaiter(this, void 0, void 0, function () {
5342
5535
  var cacheData, req;
5343
5536
  var _this = this;
@@ -5345,7 +5538,7 @@ var ProjectViewBookmark;
5345
5538
  if (!viewId) {
5346
5539
  throw ("View ID is required.");
5347
5540
  }
5348
- cacheData = api.Cache.Get(GetListCacheKey(viewId));
5541
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(viewId));
5349
5542
  if (cacheData) {
5350
5543
  return [2 /*return*/, cacheData];
5351
5544
  }
@@ -5355,7 +5548,7 @@ var ProjectViewBookmark;
5355
5548
  switch (_a.label) {
5356
5549
  case 0:
5357
5550
  _a.trys.push([0, 2, , 3]);
5358
- return [4 /*yield*/, api.GET("ui.view/" + viewId + "/slides", Api.PrepReqParams())];
5551
+ return [4 /*yield*/, api.GET("ui.view/" + viewId + "/slides", Api.PrepReqParams(reqParams))];
5359
5552
  case 1:
5360
5553
  data = _a.sent();
5361
5554
  res(data.Items);
@@ -5374,7 +5567,7 @@ var ProjectViewBookmark;
5374
5567
  });
5375
5568
  }
5376
5569
  ProjectViewBookmark.GetList = GetList;
5377
- function Update(api, viewId, data) {
5570
+ function Update(api, viewId, data, reqParams) {
5378
5571
  return __awaiter(this, void 0, void 0, function () {
5379
5572
  return __generator(this, function (_a) {
5380
5573
  switch (_a.label) {
@@ -5382,7 +5575,7 @@ var ProjectViewBookmark;
5382
5575
  if (!(data === null || data === void 0 ? void 0 : data.Title)) {
5383
5576
  data.Title = data.ID;
5384
5577
  }
5385
- return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slide/" + (data.ID ? data.ID : ""), data, Api.PrepReqParams())];
5578
+ return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slide/" + (data.ID ? data.ID : ""), data, Api.PrepReqParams(reqParams))];
5386
5579
  case 1:
5387
5580
  data = _a.sent();
5388
5581
  api.Cache.Remove(GetCacheKey(viewId, data.ID));
@@ -5393,7 +5586,7 @@ var ProjectViewBookmark;
5393
5586
  });
5394
5587
  }
5395
5588
  ProjectViewBookmark.Update = Update;
5396
- function SetOrder(api, viewId, bookmarkIds) {
5589
+ function SetOrder(api, viewId, bookmarkIds, reqParams) {
5397
5590
  return __awaiter(this, void 0, void 0, function () {
5398
5591
  var reqData;
5399
5592
  return __generator(this, function (_a) {
@@ -5403,7 +5596,7 @@ var ProjectViewBookmark;
5403
5596
  "UISlide.ID": bookmarkIds,
5404
5597
  "DisplayOrder.Start": 0
5405
5598
  };
5406
- return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slides/setOrder", reqData, Api.PrepReqParams())];
5599
+ return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slides/setOrder", reqData, Api.PrepReqParams(reqParams))];
5407
5600
  case 1:
5408
5601
  _a.sent();
5409
5602
  api.Cache.RemoveByStartsWith(GetListCacheKey(viewId));
@@ -5441,7 +5634,7 @@ var ProjectView;
5441
5634
  (function (V2) {
5442
5635
  V2.DATA_VERSION = 2;
5443
5636
  })(V2 = ProjectView.V2 || (ProjectView.V2 = {}));
5444
- function Get(api, viewId) {
5637
+ function Get(api, viewId, reqParams) {
5445
5638
  return __awaiter(this, void 0, void 0, function () {
5446
5639
  var key, cacheData, req;
5447
5640
  return __generator(this, function (_a) {
@@ -5449,23 +5642,23 @@ var ProjectView;
5449
5642
  throw ("View ID is required.");
5450
5643
  }
5451
5644
  key = GetCacheKey(viewId);
5452
- cacheData = api.Cache.Get(key);
5645
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
5453
5646
  if (cacheData) {
5454
5647
  return [2 /*return*/, cacheData];
5455
5648
  }
5456
- req = api.GET("ui.view/" + viewId, Api.PrepReqParams());
5649
+ req = api.GET("ui.view/" + viewId, Api.PrepReqParams(reqParams));
5457
5650
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
5458
5651
  return [2 /*return*/, req];
5459
5652
  });
5460
5653
  });
5461
5654
  }
5462
5655
  ProjectView.Get = Get;
5463
- function GetList(api) {
5656
+ function GetList(api, reqParams) {
5464
5657
  return __awaiter(this, void 0, void 0, function () {
5465
5658
  var cacheData, req;
5466
5659
  var _this = this;
5467
5660
  return __generator(this, function (_a) {
5468
- cacheData = api.Cache.Get(GetListCacheKey());
5661
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
5469
5662
  if (cacheData) {
5470
5663
  return [2 /*return*/, cacheData];
5471
5664
  }
@@ -5475,7 +5668,7 @@ var ProjectView;
5475
5668
  switch (_a.label) {
5476
5669
  case 0:
5477
5670
  _a.trys.push([0, 2, , 3]);
5478
- return [4 /*yield*/, api.GET("ui.view/list", Api.PrepReqParams())];
5671
+ return [4 /*yield*/, api.GET("ui.view/list", Api.PrepReqParams(reqParams))];
5479
5672
  case 1:
5480
5673
  data = _a.sent();
5481
5674
  res(data.Items);
@@ -5494,7 +5687,7 @@ var ProjectView;
5494
5687
  });
5495
5688
  }
5496
5689
  ProjectView.GetList = GetList;
5497
- function Delete(api, viewId) {
5690
+ function Delete(api, viewId, reqParams) {
5498
5691
  return __awaiter(this, void 0, void 0, function () {
5499
5692
  return __generator(this, function (_a) {
5500
5693
  switch (_a.label) {
@@ -5502,7 +5695,7 @@ var ProjectView;
5502
5695
  if (!viewId) {
5503
5696
  throw ("View ID is required.");
5504
5697
  }
5505
- return [4 /*yield*/, api.DELETE("ui.view/" + viewId, Api.PrepReqParams())];
5698
+ return [4 /*yield*/, api.DELETE("ui.view/" + viewId, Api.PrepReqParams(reqParams))];
5506
5699
  case 1:
5507
5700
  _a.sent();
5508
5701
  api.Cache.Remove(GetCacheKey(viewId));
@@ -5513,7 +5706,7 @@ var ProjectView;
5513
5706
  });
5514
5707
  }
5515
5708
  ProjectView.Delete = Delete;
5516
- function Update(api, data) {
5709
+ function Update(api, data, reqParams) {
5517
5710
  return __awaiter(this, void 0, void 0, function () {
5518
5711
  var isNew;
5519
5712
  return __generator(this, function (_a) {
@@ -5533,11 +5726,11 @@ var ProjectView;
5533
5726
  data.CreatedByUIVersion = "-1";
5534
5727
  }
5535
5728
  if (!isNew) return [3 /*break*/, 2];
5536
- return [4 /*yield*/, api.POST("ui.view/" + data.ID, data, Api.PrepReqParams())];
5729
+ return [4 /*yield*/, api.POST("ui.view/" + data.ID, data, Api.PrepReqParams(reqParams))];
5537
5730
  case 1:
5538
5731
  data = _a.sent();
5539
5732
  return [3 /*break*/, 4];
5540
- case 2: return [4 /*yield*/, api.PUT("ui.view/" + data.ID, data, Api.PrepReqParams())];
5733
+ case 2: return [4 /*yield*/, api.PUT("ui.view/" + data.ID, data, Api.PrepReqParams(reqParams))];
5541
5734
  case 3:
5542
5735
  data = _a.sent();
5543
5736
  _a.label = 4;
@@ -5552,13 +5745,13 @@ var ProjectView;
5552
5745
  ProjectView.Update = Update;
5553
5746
  })(ProjectView || (ProjectView = {}));
5554
5747
 
5555
- function getTemplateSettings(apiGetter) {
5748
+ function getTemplateSettings(apiGetter, reqParams) {
5556
5749
  var _a;
5557
5750
  return __awaiter(this, void 0, void 0, function () {
5558
5751
  var view;
5559
5752
  return __generator(this, function (_b) {
5560
5753
  switch (_b.label) {
5561
- case 0: return [4 /*yield*/, ProjectView.Get(apiGetter.getApi(Api.TEMPLATE_ACCOUNT_ID), "default")];
5754
+ case 0: return [4 /*yield*/, ProjectView.Get(apiGetter.getApi(Api.TEMPLATE_ACCOUNT_ID), "default", reqParams)];
5562
5755
  case 1:
5563
5756
  view = _b.sent();
5564
5757
  return [2 /*return*/, (_a = view.Settings) !== null && _a !== void 0 ? _a : {}];
@@ -5585,13 +5778,13 @@ function checkSourceToTemplate(items, templateItem, addIfMissing) {
5585
5778
  */
5586
5779
  var ProjectViewLegacyTile;
5587
5780
  (function (ProjectViewLegacyTile) {
5588
- function MergeMapTemplateData(getter, items, addIfMissing) {
5781
+ function MergeMapTemplateData(getter, items, addIfMissing, reqParams) {
5589
5782
  var _a;
5590
5783
  return __awaiter(this, void 0, void 0, function () {
5591
5784
  var settings, maps, i, mapSource;
5592
5785
  return __generator(this, function (_b) {
5593
5786
  switch (_b.label) {
5594
- case 0: return [4 /*yield*/, getTemplateSettings(getter)];
5787
+ case 0: return [4 /*yield*/, getTemplateSettings(getter, reqParams)];
5595
5788
  case 1:
5596
5789
  settings = _b.sent();
5597
5790
  maps = (_a = settings.CesiumMapSources) !== null && _a !== void 0 ? _a : [];
@@ -5605,13 +5798,13 @@ var ProjectViewLegacyTile;
5605
5798
  });
5606
5799
  }
5607
5800
  ProjectViewLegacyTile.MergeMapTemplateData = MergeMapTemplateData;
5608
- function MergeTerrainTemplateData(getter, items, addIfMissing) {
5801
+ function MergeTerrainTemplateData(getter, items, addIfMissing, reqParams) {
5609
5802
  var _a;
5610
5803
  return __awaiter(this, void 0, void 0, function () {
5611
5804
  var settings, terrains, i, terrainSource;
5612
5805
  return __generator(this, function (_b) {
5613
5806
  switch (_b.label) {
5614
- case 0: return [4 /*yield*/, getTemplateSettings(getter)];
5807
+ case 0: return [4 /*yield*/, getTemplateSettings(getter, reqParams)];
5615
5808
  case 1:
5616
5809
  settings = _b.sent();
5617
5810
  terrains = (_a = settings.CesiumTerrainSources) !== null && _a !== void 0 ? _a : [];
@@ -5758,24 +5951,24 @@ var PendingAction;
5758
5951
  EStatus["Complete"] = "COMPLETE";
5759
5952
  EStatus["Failed"] = "FAILED";
5760
5953
  })(EStatus = PendingAction.EStatus || (PendingAction.EStatus = {}));
5761
- function Get(api, actionId) {
5954
+ function Get(api, actionId, reqParams) {
5762
5955
  return __awaiter(this, void 0, void 0, function () {
5763
5956
  return __generator(this, function (_a) {
5764
5957
  if (!actionId) {
5765
5958
  throw ("Action ID is required.");
5766
5959
  }
5767
- return [2 /*return*/, api.GET("pendingAction/" + actionId, Api.PrepReqParams())];
5960
+ return [2 /*return*/, api.GET("pendingAction/" + actionId, Api.PrepReqParams(reqParams))];
5768
5961
  });
5769
5962
  });
5770
5963
  }
5771
5964
  PendingAction.Get = Get;
5772
- function GetRelevantList(api, stricter) {
5965
+ function GetRelevantList(api, stricter, reqParams) {
5773
5966
  if (stricter === void 0) { stricter = false; }
5774
5967
  return __awaiter(this, void 0, void 0, function () {
5775
5968
  var data;
5776
5969
  return __generator(this, function (_a) {
5777
5970
  switch (_a.label) {
5778
- case 0: return [4 /*yield*/, api.GET("pendingActions/important?Update=" + stricter, Api.PrepReqParams())];
5971
+ case 0: return [4 /*yield*/, api.GET("pendingActions/important?Update=" + stricter, Api.PrepReqParams(reqParams))];
5779
5972
  case 1:
5780
5973
  data = _a.sent();
5781
5974
  return [2 /*return*/, data.Items];
@@ -5784,7 +5977,7 @@ var PendingAction;
5784
5977
  });
5785
5978
  }
5786
5979
  PendingAction.GetRelevantList = GetRelevantList;
5787
- function GetMessages(api, actionId, order, startIndex, amount) {
5980
+ function GetMessages(api, actionId, order, startIndex, amount, reqParams) {
5788
5981
  return __awaiter(this, void 0, void 0, function () {
5789
5982
  var args, data;
5790
5983
  return __generator(this, function (_a) {
@@ -5800,7 +5993,7 @@ var PendingAction;
5800
5993
  order = Api.ESortOrder.Asc;
5801
5994
  }
5802
5995
  args = "?SortOrder=" + (order == Api.ESortOrder.Desc ? "DESC" : "ASC") + "&PageSize=" + amount + "&PageIndex=" + startIndex;
5803
- return [4 /*yield*/, api.GET("pendingAction/" + actionId + "/progressMessages" + args, Api.PrepReqParams())];
5996
+ return [4 /*yield*/, api.GET("pendingAction/" + actionId + "/progressMessages" + args, Api.PrepReqParams(reqParams))];
5804
5997
  case 1:
5805
5998
  data = _a.sent();
5806
5999
  return [2 /*return*/, data.Items];
@@ -5839,9 +6032,9 @@ var Style;
5839
6032
  EPointType["Icon"] = "ICON";
5840
6033
  EPointType["Cylinder"] = "CYLINDER";
5841
6034
  })(EPointType = Style.EPointType || (Style.EPointType = {}));
5842
- function GetList(api) {
6035
+ function GetList(api, reqParams) {
5843
6036
  var _this = this;
5844
- var cacheData = api.Cache.Get(GetListCacheKey());
6037
+ var cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
5845
6038
  if (cacheData) {
5846
6039
  return cacheData;
5847
6040
  }
@@ -5851,7 +6044,7 @@ var Style;
5851
6044
  switch (_a.label) {
5852
6045
  case 0:
5853
6046
  _a.trys.push([0, 2, , 3]);
5854
- return [4 /*yield*/, api.GET("ui.entityDisplaySettings", Api.PrepReqParams())];
6047
+ return [4 /*yield*/, api.GET("ui.entityDisplaySettings", Api.PrepReqParams(reqParams))];
5855
6048
  case 1:
5856
6049
  data = _a.sent();
5857
6050
  res(data.Items);
@@ -5868,20 +6061,20 @@ var Style;
5868
6061
  return req;
5869
6062
  }
5870
6063
  Style.GetList = GetList;
5871
- function Get(api, id) {
6064
+ function Get(api, id, reqParams) {
5872
6065
  if (!id) {
5873
6066
  throw ("Style ID is required.");
5874
6067
  }
5875
- var cacheData = api.Cache.Get(GetCacheKey(id));
6068
+ var cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id));
5876
6069
  if (cacheData) {
5877
6070
  return cacheData;
5878
6071
  }
5879
- var req = api.GET("ui.entityDisplaySetting/" + id, Api.PrepReqParams());
6072
+ var req = api.GET("ui.entityDisplaySetting/" + id, Api.PrepReqParams(reqParams));
5880
6073
  api.Cache.Set(GetCacheKey(id), req, Api.DEFAULT_CACHE_DURATION);
5881
6074
  return req;
5882
6075
  }
5883
6076
  Style.Get = Get;
5884
- function Update(api, data) {
6077
+ function Update(api, data, reqParams) {
5885
6078
  return __awaiter(this, void 0, void 0, function () {
5886
6079
  return __generator(this, function (_a) {
5887
6080
  switch (_a.label) {
@@ -5892,7 +6085,7 @@ var Style;
5892
6085
  if (!data.ID) {
5893
6086
  data.ID = 0;
5894
6087
  }
5895
- return [4 /*yield*/, api.POST("ui.entityDisplaySetting/" + data.ID, data, Api.PrepReqParams())];
6088
+ return [4 /*yield*/, api.POST("ui.entityDisplaySetting/" + data.ID, data, Api.PrepReqParams(reqParams))];
5896
6089
  case 1:
5897
6090
  data = _a.sent();
5898
6091
  api.Cache.Remove(GetCacheKey(data.ID));
@@ -5903,7 +6096,7 @@ var Style;
5903
6096
  });
5904
6097
  }
5905
6098
  Style.Update = Update;
5906
- function Delete(api, id) {
6099
+ function Delete(api, id, reqParams) {
5907
6100
  return __awaiter(this, void 0, void 0, function () {
5908
6101
  return __generator(this, function (_a) {
5909
6102
  switch (_a.label) {
@@ -5911,7 +6104,7 @@ var Style;
5911
6104
  if (!id) {
5912
6105
  throw ("Style ID is required.");
5913
6106
  }
5914
- return [4 /*yield*/, api.DELETE("ui.entityDisplaySetting/" + id, Api.PrepReqParams())];
6107
+ return [4 /*yield*/, api.DELETE("ui.entityDisplaySetting/" + id, Api.PrepReqParams(reqParams))];
5915
6108
  case 1:
5916
6109
  _a.sent();
5917
6110
  api.Cache.Remove(GetCacheKey(id));
@@ -5983,7 +6176,7 @@ var Session;
5983
6176
  function GetCacheKey(sessionId) {
5984
6177
  return "" + Api.ECacheKey.Session + Api.ECacheKey.Id + sessionId;
5985
6178
  }
5986
- function Get(api, sessionId) {
6179
+ function Get(api, sessionId, reqParams) {
5987
6180
  return __awaiter(this, void 0, void 0, function () {
5988
6181
  var key, cacheData, req;
5989
6182
  return __generator(this, function (_a) {
@@ -5991,18 +6184,18 @@ var Session;
5991
6184
  throw ("Session ID is required.");
5992
6185
  }
5993
6186
  key = GetCacheKey(sessionId);
5994
- cacheData = api.Cache.Get(key);
6187
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
5995
6188
  if (cacheData) {
5996
6189
  return [2 /*return*/, cacheData];
5997
6190
  }
5998
- req = api.GET("session/" + sessionId);
6191
+ req = api.GET("session/" + sessionId, reqParams);
5999
6192
  api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
6000
6193
  return [2 /*return*/, req];
6001
6194
  });
6002
6195
  });
6003
6196
  }
6004
6197
  Session.Get = Get;
6005
- function Login(api, username, password, accountId) {
6198
+ function Login(api, username, password, accountId, reqParams) {
6006
6199
  return __awaiter(this, void 0, void 0, function () {
6007
6200
  var data, session, ssid;
6008
6201
  return __generator(this, function (_a) {
@@ -6015,7 +6208,7 @@ var Session;
6015
6208
  account: accountId ? accountId : "",
6016
6209
  login: username,
6017
6210
  password: password
6018
- })];
6211
+ }, reqParams)];
6019
6212
  case 1:
6020
6213
  data = _a.sent();
6021
6214
  session = data === null || data === void 0 ? void 0 : data.Session;
@@ -6028,7 +6221,7 @@ var Session;
6028
6221
  });
6029
6222
  }
6030
6223
  Session.Login = Login;
6031
- function Logout(api) {
6224
+ function Logout(api, reqParams) {
6032
6225
  return __awaiter(this, void 0, void 0, function () {
6033
6226
  var ssid;
6034
6227
  return __generator(this, function (_a) {
@@ -6036,7 +6229,7 @@ var Session;
6036
6229
  case 0:
6037
6230
  ssid = api.GetSessionId();
6038
6231
  if (!ssid) return [3 /*break*/, 2];
6039
- return [4 /*yield*/, api.POST("logout", null)];
6232
+ return [4 /*yield*/, api.POST("logout", null, reqParams)];
6040
6233
  case 1:
6041
6234
  _a.sent();
6042
6235
  api.SetSessionId(null);
@@ -6099,18 +6292,18 @@ var Session;
6099
6292
  */
6100
6293
  var UserGroup;
6101
6294
  (function (UserGroup) {
6102
- function GetByName(api, accountId, name) {
6295
+ function GetByName(api, accountId, name, reqParams) {
6103
6296
  return __awaiter(this, void 0, void 0, function () {
6104
6297
  return __generator(this, function (_a) {
6105
6298
  if (!name || !accountId) {
6106
6299
  throw ("Name and AccountID are required.");
6107
6300
  }
6108
- return [2 /*return*/, api.GET("account/" + accountId + "/userGroupByName/" + name)];
6301
+ return [2 /*return*/, api.GET("account/" + accountId + "/userGroupByName/" + name, reqParams)];
6109
6302
  });
6110
6303
  });
6111
6304
  }
6112
6305
  UserGroup.GetByName = GetByName;
6113
- function GetUsers(api, accountId, id) {
6306
+ function GetUsers(api, accountId, id, reqParams) {
6114
6307
  return __awaiter(this, void 0, void 0, function () {
6115
6308
  var data;
6116
6309
  return __generator(this, function (_a) {
@@ -6119,7 +6312,7 @@ var UserGroup;
6119
6312
  if (!accountId || !id) {
6120
6313
  throw ("AccountID and ID are required.");
6121
6314
  }
6122
- return [4 /*yield*/, api.GET("userGroup/" + accountId + "/" + id + "/users")];
6315
+ return [4 /*yield*/, api.GET("userGroup/" + accountId + "/" + id + "/users", reqParams)];
6123
6316
  case 1:
6124
6317
  data = _a.sent();
6125
6318
  return [2 /*return*/, data.Items];
@@ -6128,7 +6321,7 @@ var UserGroup;
6128
6321
  });
6129
6322
  }
6130
6323
  UserGroup.GetUsers = GetUsers;
6131
- function GetListByPerm(api, accountId, perm) {
6324
+ function GetListByPerm(api, accountId, perm, reqParams) {
6132
6325
  return __awaiter(this, void 0, void 0, function () {
6133
6326
  var data;
6134
6327
  return __generator(this, function (_a) {
@@ -6137,7 +6330,7 @@ var UserGroup;
6137
6330
  if (!accountId || !perm) {
6138
6331
  throw ("AccountID and Perm are required.");
6139
6332
  }
6140
- return [4 /*yield*/, api.GET("userGroupsByFeature/" + accountId + "/" + perm)];
6333
+ return [4 /*yield*/, api.GET("userGroupsByFeature/" + accountId + "/" + perm, reqParams)];
6141
6334
  case 1:
6142
6335
  data = _a.sent();
6143
6336
  return [2 /*return*/, data.Items];
@@ -6146,7 +6339,7 @@ var UserGroup;
6146
6339
  });
6147
6340
  }
6148
6341
  UserGroup.GetListByPerm = GetListByPerm;
6149
- function GetList(api, accountId) {
6342
+ function GetList(api, accountId, reqParams) {
6150
6343
  return __awaiter(this, void 0, void 0, function () {
6151
6344
  var data;
6152
6345
  return __generator(this, function (_a) {
@@ -6155,7 +6348,7 @@ var UserGroup;
6155
6348
  if (!accountId) {
6156
6349
  throw ("AccountID is required.");
6157
6350
  }
6158
- return [4 /*yield*/, api.GET("userGroups/" + accountId)];
6351
+ return [4 /*yield*/, api.GET("userGroups/" + accountId, reqParams)];
6159
6352
  case 1:
6160
6353
  data = _a.sent();
6161
6354
  return [2 /*return*/, data.Items];
@@ -6164,18 +6357,18 @@ var UserGroup;
6164
6357
  });
6165
6358
  }
6166
6359
  UserGroup.GetList = GetList;
6167
- function Delete(api, accountId, id) {
6360
+ function Delete(api, accountId, id, reqParams) {
6168
6361
  return __awaiter(this, void 0, void 0, function () {
6169
6362
  return __generator(this, function (_a) {
6170
6363
  if (!accountId || !id) {
6171
6364
  throw ("AccountID and ID are required.");
6172
6365
  }
6173
- return [2 /*return*/, api.DELETE("account/" + accountId + "/userGroupID/" + id)];
6366
+ return [2 /*return*/, api.DELETE("account/" + accountId + "/userGroupID/" + id, reqParams)];
6174
6367
  });
6175
6368
  });
6176
6369
  }
6177
6370
  UserGroup.Delete = Delete;
6178
- function Update(api, data) {
6371
+ function Update(api, data, reqParams) {
6179
6372
  return __awaiter(this, void 0, void 0, function () {
6180
6373
  return __generator(this, function (_a) {
6181
6374
  switch (_a.label) {
@@ -6183,7 +6376,7 @@ var UserGroup;
6183
6376
  if (!data.Name || !data["ClientAccount.ID"]) {
6184
6377
  throw ("User group name and client account ID are required.");
6185
6378
  }
6186
- return [4 /*yield*/, api.POST("userGroup" + (data.ID ? ("/" + data.ID) : ""), data)];
6379
+ return [4 /*yield*/, api.POST("userGroup" + (data.ID ? ("/" + data.ID) : ""), data, reqParams)];
6187
6380
  case 1:
6188
6381
  data = _a.sent();
6189
6382
  return [2 /*return*/, data];
@@ -6222,7 +6415,7 @@ var User;
6222
6415
  EType["User"] = "LOGIN_USER";
6223
6416
  EType["AccessToken"] = "ACCESS_TOKEN";
6224
6417
  })(EType = User.EType || (User.EType = {}));
6225
- function Get(api, id, accountId) {
6418
+ function Get(api, id, accountId, reqParams) {
6226
6419
  return __awaiter(this, void 0, void 0, function () {
6227
6420
  var cacheData, req;
6228
6421
  return __generator(this, function (_a) {
@@ -6231,11 +6424,11 @@ var User;
6231
6424
  if (!id) {
6232
6425
  throw ("ID is required.");
6233
6426
  }
6234
- cacheData = api.Cache.Get(GetCacheKey(id, accountId));
6427
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(id, accountId));
6235
6428
  if (cacheData) {
6236
6429
  return [2 /*return*/, cacheData];
6237
6430
  }
6238
- return [4 /*yield*/, api.GET("user/" + id + (accountId ? "?clientAccountID=" + accountId : ""))];
6431
+ return [4 /*yield*/, api.GET("user/" + id + (accountId ? "?clientAccountID=" + accountId : ""), reqParams)];
6239
6432
  case 1:
6240
6433
  req = _a.sent();
6241
6434
  api.Cache.Set(GetCacheKey(id, accountId), req, Api.DEFAULT_CACHE_DURATION);
@@ -6245,7 +6438,7 @@ var User;
6245
6438
  });
6246
6439
  }
6247
6440
  User.Get = Get;
6248
- function Update(api, data) {
6441
+ function Update(api, data, reqParams) {
6249
6442
  return __awaiter(this, void 0, void 0, function () {
6250
6443
  return __generator(this, function (_a) {
6251
6444
  switch (_a.label) {
@@ -6253,7 +6446,7 @@ var User;
6253
6446
  if (!(data === null || data === void 0 ? void 0 : data.ID) || !(data === null || data === void 0 ? void 0 : data.Type)) {
6254
6447
  throw ("ID and Type are required.");
6255
6448
  }
6256
- return [4 /*yield*/, api.POST("user/" + data.ID, data)];
6449
+ return [4 /*yield*/, api.POST("user/" + data.ID, data, reqParams)];
6257
6450
  case 1:
6258
6451
  data = _a.sent();
6259
6452
  api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + data.ID);
@@ -6269,7 +6462,7 @@ var User;
6269
6462
  });
6270
6463
  }
6271
6464
  User.Update = Update;
6272
- function GetUsernameAvailable(api, username) {
6465
+ function GetUsernameAvailable(api, username, reqParams) {
6273
6466
  return __awaiter(this, void 0, void 0, function () {
6274
6467
  var req, prom;
6275
6468
  var _this = this;
@@ -6277,7 +6470,7 @@ var User;
6277
6470
  if (!username) {
6278
6471
  throw ("Username is required.");
6279
6472
  }
6280
- req = api.GET("user/loginavailable/" + username);
6473
+ req = api.GET("user/loginavailable/" + username, reqParams);
6281
6474
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
6282
6475
  var data, e_1;
6283
6476
  return __generator(this, function (_a) {
@@ -6308,7 +6501,7 @@ var User;
6308
6501
  return Api.ECacheKey.User + Api.ECacheKey.Account + Api.ECacheKey.Id + accountId;
6309
6502
  }
6310
6503
  LoginUser.GetListCacheKey = GetListCacheKey;
6311
- function GetByEmail(api, email, accountId) {
6504
+ function GetByEmail(api, email, accountId, reqParams) {
6312
6505
  return __awaiter(this, void 0, void 0, function () {
6313
6506
  var cacheData, req;
6314
6507
  return __generator(this, function (_a) {
@@ -6317,11 +6510,11 @@ var User;
6317
6510
  if (!email) {
6318
6511
  throw ("Email is required.");
6319
6512
  }
6320
- cacheData = api.Cache.Get(GetEmailCacheKey(email, accountId));
6513
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetEmailCacheKey(email, accountId));
6321
6514
  if (cacheData) {
6322
6515
  return [2 /*return*/, cacheData];
6323
6516
  }
6324
- return [4 /*yield*/, api.GET("userByEmail/" + email + (accountId ? "?clientAccountID=" + accountId : ""))];
6517
+ return [4 /*yield*/, api.GET("userByEmail/" + email + (accountId ? "?clientAccountID=" + accountId : ""), reqParams)];
6325
6518
  case 1:
6326
6519
  req = _a.sent();
6327
6520
  api.Cache.Set(GetEmailCacheKey(email, accountId), req, Api.DEFAULT_CACHE_DURATION);
@@ -6331,7 +6524,7 @@ var User;
6331
6524
  });
6332
6525
  }
6333
6526
  LoginUser.GetByEmail = GetByEmail;
6334
- function GetList(api, accountId, exclusive) {
6527
+ function GetList(api, accountId, exclusive, reqParams) {
6335
6528
  return __awaiter(this, void 0, void 0, function () {
6336
6529
  var cacheData, req;
6337
6530
  var _this = this;
@@ -6342,7 +6535,7 @@ var User;
6342
6535
  if (!exclusive) {
6343
6536
  exclusive = false;
6344
6537
  }
6345
- cacheData = exclusive ? null : api.Cache.Get(GetListCacheKey(accountId));
6538
+ cacheData = exclusive || (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(accountId));
6346
6539
  if (cacheData) {
6347
6540
  return [2 /*return*/, cacheData];
6348
6541
  }
@@ -6352,7 +6545,7 @@ var User;
6352
6545
  switch (_a.label) {
6353
6546
  case 0:
6354
6547
  _a.trys.push([0, 2, , 3]);
6355
- return [4 /*yield*/, api.GET("users?clientAccountID=" + accountId + (exclusive ? "&allExcludingClientAccount=true" : ""))];
6548
+ return [4 /*yield*/, api.GET("users?clientAccountID=" + accountId + (exclusive ? "&allExcludingClientAccount=true" : ""), reqParams)];
6356
6549
  case 1:
6357
6550
  data = _a.sent();
6358
6551
  res(data.Items);
@@ -6384,7 +6577,7 @@ var User;
6384
6577
  * @param email
6385
6578
  * @returns
6386
6579
  */
6387
- function Signup(api, email) {
6580
+ function Signup(api, email, reqParams) {
6388
6581
  return __awaiter(this, void 0, void 0, function () {
6389
6582
  return __generator(this, function (_a) {
6390
6583
  if (!email) {
@@ -6392,7 +6585,7 @@ var User;
6392
6585
  }
6393
6586
  return [2 /*return*/, api.POST("clientaccount/signup", {
6394
6587
  Email: email
6395
- })];
6588
+ }, reqParams)];
6396
6589
  });
6397
6590
  });
6398
6591
  }
@@ -6403,13 +6596,13 @@ var User;
6403
6596
  * @param expiredCode
6404
6597
  * @returns
6405
6598
  */
6406
- function SignupResend(api, expiredCode) {
6599
+ function SignupResend(api, expiredCode, reqParams) {
6407
6600
  return __awaiter(this, void 0, void 0, function () {
6408
6601
  return __generator(this, function (_a) {
6409
6602
  if (!expiredCode) {
6410
6603
  throw ("Expired activation code is required.");
6411
6604
  }
6412
- return [2 /*return*/, api.POST("clientaccount/signup/resend?activationKey=" + Api.Encode(expiredCode), null)];
6605
+ return [2 /*return*/, api.POST("clientaccount/signup/resend?activationKey=" + Api.Encode(expiredCode), null, reqParams)];
6413
6606
  });
6414
6607
  });
6415
6608
  }
@@ -6422,7 +6615,7 @@ var User;
6422
6615
  * @param accountId
6423
6616
  * @returns
6424
6617
  */
6425
- function SignupComplete(api, code, data, accountId) {
6618
+ function SignupComplete(api, code, data, accountId, reqParams) {
6426
6619
  return __awaiter(this, void 0, void 0, function () {
6427
6620
  var res;
6428
6621
  return __generator(this, function (_a) {
@@ -6435,7 +6628,7 @@ var User;
6435
6628
  data.IsActivated = true;
6436
6629
  data.IsDisabled = false;
6437
6630
  data.key = code;
6438
- return [4 /*yield*/, api.POST("UserActivate/" + (accountId ? accountId : ""), data)];
6631
+ return [4 /*yield*/, api.POST("UserActivate/" + (accountId ? accountId : ""), data, reqParams)];
6439
6632
  case 1:
6440
6633
  res = _a.sent();
6441
6634
  api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + res.ID);
@@ -6455,7 +6648,7 @@ var User;
6455
6648
  * @param email
6456
6649
  * @returns user id associated with provided email.
6457
6650
  */
6458
- function ForgotPassword(api, accountId, email) {
6651
+ function ForgotPassword(api, accountId, email, reqParams) {
6459
6652
  return __awaiter(this, void 0, void 0, function () {
6460
6653
  var req, prom;
6461
6654
  var _this = this;
@@ -6465,7 +6658,7 @@ var User;
6465
6658
  }
6466
6659
  req = api.POST("UserForgotPassword/" + accountId, {
6467
6660
  Email: email
6468
- });
6661
+ }, reqParams);
6469
6662
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
6470
6663
  var data, e_3;
6471
6664
  return __generator(this, function (_a) {
@@ -6498,7 +6691,7 @@ var User;
6498
6691
  * @param password
6499
6692
  * @returns
6500
6693
  */
6501
- function ForgotPasswordComplete(api, code, userId, password) {
6694
+ function ForgotPasswordComplete(api, code, userId, password, reqParams) {
6502
6695
  return __awaiter(this, void 0, void 0, function () {
6503
6696
  var user;
6504
6697
  return __generator(this, function (_a) {
@@ -6512,7 +6705,7 @@ var User;
6512
6705
  ActivationCode: code,
6513
6706
  Password: password,
6514
6707
  FullName: user.FullName
6515
- })];
6708
+ }, reqParams)];
6516
6709
  }
6517
6710
  });
6518
6711
  });
@@ -6525,12 +6718,12 @@ var User;
6525
6718
  return Api.ECacheKey.AccessToken + Api.ECacheKey.Account + Api.ECacheKey.Id + accountId;
6526
6719
  }
6527
6720
  AccessToken.GetListCacheKey = GetListCacheKey;
6528
- function GetList(api, accountId) {
6721
+ function GetList(api, accountId, reqParams) {
6529
6722
  return __awaiter(this, void 0, void 0, function () {
6530
6723
  var cacheData, req;
6531
6724
  var _this = this;
6532
6725
  return __generator(this, function (_a) {
6533
- cacheData = api.Cache.Get(GetListCacheKey(accountId));
6726
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(accountId));
6534
6727
  if (cacheData) {
6535
6728
  return [2 /*return*/, cacheData];
6536
6729
  }
@@ -6540,7 +6733,7 @@ var User;
6540
6733
  switch (_a.label) {
6541
6734
  case 0:
6542
6735
  _a.trys.push([0, 2, , 3]);
6543
- return [4 /*yield*/, api.GET("usersByClientAccount/accessTokens")];
6736
+ return [4 /*yield*/, api.GET("usersByClientAccount/accessTokens", reqParams)];
6544
6737
  case 1:
6545
6738
  data = _a.sent();
6546
6739
  res(data.Items);
@@ -6564,11 +6757,11 @@ var User;
6564
6757
  });
6565
6758
  }
6566
6759
  AccessToken.GetList = GetList;
6567
- function Delete(api, id) {
6760
+ function Delete(api, id, reqParams) {
6568
6761
  return __awaiter(this, void 0, void 0, function () {
6569
6762
  return __generator(this, function (_a) {
6570
6763
  switch (_a.label) {
6571
- case 0: return [4 /*yield*/, api.DELETE("accessToken/" + id)];
6764
+ case 0: return [4 /*yield*/, api.DELETE("accessToken/" + id, reqParams)];
6572
6765
  case 1:
6573
6766
  _a.sent();
6574
6767
  api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + id);
@@ -6579,7 +6772,7 @@ var User;
6579
6772
  });
6580
6773
  }
6581
6774
  AccessToken.Delete = Delete;
6582
- function Create(api, data) {
6775
+ function Create(api, data, reqParams) {
6583
6776
  return __awaiter(this, void 0, void 0, function () {
6584
6777
  return __generator(this, function (_a) {
6585
6778
  switch (_a.label) {
@@ -6593,7 +6786,7 @@ var User;
6593
6786
  if (!data.Type) {
6594
6787
  data.Type = EType.AccessToken;
6595
6788
  }
6596
- return [4 /*yield*/, api.POST("accessToken", data)];
6789
+ return [4 /*yield*/, api.POST("accessToken", data, reqParams)];
6597
6790
  case 1:
6598
6791
  data = _a.sent();
6599
6792
  api.Cache.RemoveByStartsWith(Api.ECacheKey.AccessToken + Api.ECacheKey.Account);
@@ -6738,7 +6931,7 @@ var DataLab;
6738
6931
  })(EReqKey = DataLab.EReqKey || (DataLab.EReqKey = {}));
6739
6932
  var Entity;
6740
6933
  (function (Entity) {
6741
- function GetList(api, query, key, skip, load) {
6934
+ function GetList(api, query, key, skip, load, reqParams) {
6742
6935
  return __awaiter(this, void 0, void 0, function () {
6743
6936
  var req, prom;
6744
6937
  var _this = this;
@@ -6752,7 +6945,7 @@ var DataLab;
6752
6945
  if (!load) {
6753
6946
  load = 50;
6754
6947
  }
6755
- req = api.POST("entities/datalab/getMatchingEntities/" + key + "?skip=" + skip + "&load=" + load, query, Api.PrepReqParams());
6948
+ req = api.POST("entities/datalab/getMatchingEntities/" + key + "?skip=" + skip + "&load=" + load, query, Api.PrepReqParams(reqParams));
6756
6949
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
6757
6950
  var data, e_1;
6758
6951
  return __generator(this, function (_a) {
@@ -6786,18 +6979,18 @@ var DataLab;
6786
6979
  */
6787
6980
  var ImportCad;
6788
6981
  (function (ImportCad) {
6789
- function Analyze(api, params) {
6982
+ function Analyze(api, params, reqParams) {
6790
6983
  return __awaiter(this, void 0, void 0, function () {
6791
6984
  return __generator(this, function (_a) {
6792
- return [2 /*return*/, api.POST("entities/PrepareIFCForImport", params, Api.PrepReqParams())];
6985
+ return [2 /*return*/, api.POST("entities/PrepareIFCForImport", params, Api.PrepReqParams(reqParams))];
6793
6986
  });
6794
6987
  });
6795
6988
  }
6796
6989
  ImportCad.Analyze = Analyze;
6797
- function ImportEntities(api, params) {
6990
+ function ImportEntities(api, params, reqParams) {
6798
6991
  return __awaiter(this, void 0, void 0, function () {
6799
6992
  return __generator(this, function (_a) {
6800
- return [2 /*return*/, api.POST("entities/importIFCWithProgress", params, Api.PrepReqParams())];
6993
+ return [2 /*return*/, api.POST("entities/importIFCWithProgress", params, Api.PrepReqParams(reqParams))];
6801
6994
  });
6802
6995
  });
6803
6996
  }
@@ -6825,10 +7018,10 @@ var ImportCad;
6825
7018
 
6826
7019
  var ImportCsv;
6827
7020
  (function (ImportCsv) {
6828
- function ImportEntities(api, params) {
7021
+ function ImportEntities(api, params, reqParams) {
6829
7022
  return __awaiter(this, void 0, void 0, function () {
6830
7023
  return __generator(this, function (_a) {
6831
- return [2 /*return*/, api.POST("entities/importCSVWithProgress2", params, Api.PrepReqParams())];
7024
+ return [2 /*return*/, api.POST("entities/importCSVWithProgress2", params, Api.PrepReqParams(reqParams))];
6832
7025
  });
6833
7026
  });
6834
7027
  }
@@ -6837,10 +7030,10 @@ var ImportCsv;
6837
7030
 
6838
7031
  var ImportJson;
6839
7032
  (function (ImportJson) {
6840
- function ImportEntities(api, params) {
7033
+ function ImportEntities(api, params, reqParams) {
6841
7034
  return __awaiter(this, void 0, void 0, function () {
6842
7035
  return __generator(this, function (_a) {
6843
- return [2 /*return*/, api.POST("entities/importJsonWithProgress", params, Api.PrepReqParams())];
7036
+ return [2 /*return*/, api.POST("entities/importJsonWithProgress", params, Api.PrepReqParams(reqParams))];
6844
7037
  });
6845
7038
  });
6846
7039
  }
@@ -6849,10 +7042,10 @@ var ImportJson;
6849
7042
 
6850
7043
  var ImportKml;
6851
7044
  (function (ImportKml) {
6852
- function ImportEntities(api, params) {
7045
+ function ImportEntities(api, params, reqParams) {
6853
7046
  return __awaiter(this, void 0, void 0, function () {
6854
7047
  return __generator(this, function (_a) {
6855
- return [2 /*return*/, api.POST("entities/importKMLWithProgress2", params, Api.PrepReqParams())];
7048
+ return [2 /*return*/, api.POST("entities/importKMLWithProgress2", params, Api.PrepReqParams(reqParams))];
6856
7049
  });
6857
7050
  });
6858
7051
  }
@@ -6874,7 +7067,7 @@ var ImportedFile;
6874
7067
  EFileType["CAD"] = "CAD";
6875
7068
  EFileType["All"] = "All";
6876
7069
  })(EFileType = ImportedFile.EFileType || (ImportedFile.EFileType = {}));
6877
- function GetList(api, type, pageIndex) {
7070
+ function GetList(api, type, pageIndex, reqParams) {
6878
7071
  return __awaiter(this, void 0, void 0, function () {
6879
7072
  var cacheData, first, url, req, prom;
6880
7073
  var _this = this;
@@ -6885,7 +7078,7 @@ var ImportedFile;
6885
7078
  if (!pageIndex) {
6886
7079
  pageIndex = 0;
6887
7080
  }
6888
- cacheData = api.Cache.Get(GetListCacheKey(type, pageIndex));
7081
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(type, pageIndex));
6889
7082
  if (cacheData) {
6890
7083
  return [2 /*return*/, cacheData];
6891
7084
  }
@@ -6898,7 +7091,7 @@ var ImportedFile;
6898
7091
  if (pageIndex > 0) {
6899
7092
  url += (first ? "?" : "&") + "pageIndex=" + pageIndex;
6900
7093
  }
6901
- req = api.GET(url, Api.PrepReqParams());
7094
+ req = api.GET(url, Api.PrepReqParams(reqParams));
6902
7095
  prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
6903
7096
  var data, e_1;
6904
7097
  return __generator(this, function (_a) {
@@ -6924,15 +7117,15 @@ var ImportedFile;
6924
7117
  });
6925
7118
  }
6926
7119
  ImportedFile.GetList = GetList;
6927
- function Get(api, fileId) {
7120
+ function Get(api, fileId, reqParams) {
6928
7121
  return __awaiter(this, void 0, void 0, function () {
6929
7122
  var cacheData, req;
6930
7123
  return __generator(this, function (_a) {
6931
- cacheData = api.Cache.Get(GetCacheKey(fileId));
7124
+ cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(fileId));
6932
7125
  if (cacheData) {
6933
7126
  return [2 /*return*/, cacheData];
6934
7127
  }
6935
- req = api.GET("entityImportFile/" + fileId, Api.PrepReqParams());
7128
+ req = api.GET("entityImportFile/" + fileId, Api.PrepReqParams(reqParams));
6936
7129
  api.Cache.Set(GetCacheKey(fileId), req, Api.DEFAULT_CACHE_DURATION);
6937
7130
  return [2 /*return*/, req];
6938
7131
  });
@@ -6941,5 +7134,153 @@ var ImportedFile;
6941
7134
  ImportedFile.Get = Get;
6942
7135
  })(ImportedFile || (ImportedFile = {}));
6943
7136
 
6944
- export { AnnDocument, CustomForm, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, Calculator, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, Style, TilesetEntitiesMapTiles, TilesetExtMapTiles, Tileset, Permission, Session, UserGroup, User, Account, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile };
7137
+ /**
7138
+ * Description of a "Markup" which is stored in custom-form or bookmark records.
7139
+ */
7140
+ var Markup;
7141
+ (function (Markup) {
7142
+ var Element;
7143
+ (function (Element) {
7144
+ var Div;
7145
+ (function (Div) {
7146
+ // Types of div that can be created.
7147
+ var EType;
7148
+ (function (EType) {
7149
+ // Default, no special handling.
7150
+ EType["Default"] = "default";
7151
+ // Callout, assumes it will be positioned in 3d space.
7152
+ // Assumes existence of line that is used to anchor it.
7153
+ EType["Callout"] = "callout";
7154
+ })(EType = Div.EType || (Div.EType = {}));
7155
+ // Describes expected content of a row cell.
7156
+ var EItemType;
7157
+ (function (EItemType) {
7158
+ // Default, no special handling.
7159
+ EItemType["Default"] = "DEFAULT";
7160
+ // Embed, assume content is html.
7161
+ // Make it take over the whole cell instead of padding it and such.
7162
+ EItemType["Embed"] = "EMBED";
7163
+ })(EItemType = Div.EItemType || (Div.EItemType = {}));
7164
+ var ItemAction;
7165
+ (function (ItemAction) {
7166
+ // Types of actions that can be performed when a cell is clicked.
7167
+ // Null = "NONE".
7168
+ var EType;
7169
+ (function (EType) {
7170
+ EType["None"] = "NONE";
7171
+ // Open a link specified in params.
7172
+ EType["OpenLink"] = "LINK";
7173
+ // Open the markup's entity's details panel.
7174
+ EType["OpenInfoView"] = "INFOVIEW";
7175
+ // Open the markup's entity's gallery popup.
7176
+ EType["OpenEntityGallery"] = "GALLERY";
7177
+ // Toggle visibility of the markup's entity's relationships.
7178
+ EType["ToggleRelationships"] = "RELATIONSHIPS";
7179
+ // Dictates this cell can be used to drag the div around.
7180
+ EType["Draggable"] = "DRAGABBLE";
7181
+ // Closes the markup.
7182
+ EType["Close"] = "CLOSE";
7183
+ // Opens a bookmark specified in params.
7184
+ EType["OpenBookmark"] = "BOOKMARK";
7185
+ })(EType = ItemAction.EType || (ItemAction.EType = {}));
7186
+ })(ItemAction = Div.ItemAction || (Div.ItemAction = {}));
7187
+ })(Div = Element.Div || (Element.Div = {}));
7188
+ var Drawing;
7189
+ (function (Drawing) {
7190
+ var Line;
7191
+ (function (Line) {
7192
+ // Dictates where on a DIV an anchor should snap to.
7193
+ var EAnchorDivSide;
7194
+ (function (EAnchorDivSide) {
7195
+ EAnchorDivSide[EAnchorDivSide["TopLeft"] = 0] = "TopLeft";
7196
+ EAnchorDivSide[EAnchorDivSide["TopRight"] = 1] = "TopRight";
7197
+ EAnchorDivSide[EAnchorDivSide["BottomLeft"] = 2] = "BottomLeft";
7198
+ EAnchorDivSide[EAnchorDivSide["BottomRight"] = 3] = "BottomRight";
7199
+ EAnchorDivSide[EAnchorDivSide["Center"] = 4] = "Center";
7200
+ EAnchorDivSide[EAnchorDivSide["CenterLeft"] = 5] = "CenterLeft";
7201
+ EAnchorDivSide[EAnchorDivSide["CenterRight"] = 6] = "CenterRight";
7202
+ EAnchorDivSide[EAnchorDivSide["CenterTop"] = 7] = "CenterTop";
7203
+ EAnchorDivSide[EAnchorDivSide["CenterBottom"] = 8] = "CenterBottom";
7204
+ })(EAnchorDivSide = Line.EAnchorDivSide || (Line.EAnchorDivSide = {}));
7205
+ // Dictates what end of the line an anchor should render on.
7206
+ var EAnchorLineSide;
7207
+ (function (EAnchorLineSide) {
7208
+ EAnchorLineSide[EAnchorLineSide["Start"] = 0] = "Start";
7209
+ EAnchorLineSide[EAnchorLineSide["End"] = 1] = "End";
7210
+ })(EAnchorLineSide = Line.EAnchorLineSide || (Line.EAnchorLineSide = {}));
7211
+ // Types of anchor heads when anchor is used in context of a line.
7212
+ // None means the anchor is transparent.
7213
+ var EAnchorHeadStyle;
7214
+ (function (EAnchorHeadStyle) {
7215
+ EAnchorHeadStyle["None"] = "NONE";
7216
+ EAnchorHeadStyle["Circle"] = "CIRCLE";
7217
+ EAnchorHeadStyle["Arrow"] = "ARROW";
7218
+ })(EAnchorHeadStyle = Line.EAnchorHeadStyle || (Line.EAnchorHeadStyle = {}));
7219
+ Line.DEFAULT = {
7220
+ brushColor: "rgba(255, 255, 255, 1)",
7221
+ brushSize: 4,
7222
+ path: null,
7223
+ pathType: "LINE",
7224
+ transform: null,
7225
+ snaps: null
7226
+ };
7227
+ })(Line = Drawing.Line || (Drawing.Line = {}));
7228
+ var FreePaint;
7229
+ (function (FreePaint) {
7230
+ FreePaint.DEFAULT = {
7231
+ brushColor: "rgba(255, 255, 255, 1)",
7232
+ brushSize: 4,
7233
+ path: null,
7234
+ pathType: "PLAIN",
7235
+ transform: null
7236
+ };
7237
+ })(FreePaint = Drawing.FreePaint || (Drawing.FreePaint = {}));
7238
+ })(Drawing = Element.Drawing || (Element.Drawing = {}));
7239
+ var Entity3d;
7240
+ (function (Entity3d) {
7241
+ var Polygon;
7242
+ (function (Polygon) {
7243
+ // Determines if terrain and 3d models should be overlapped or not.
7244
+ var EClassificationType;
7245
+ (function (EClassificationType) {
7246
+ // 3d models and terrain are overlapped.
7247
+ EClassificationType["Both"] = "BOTH";
7248
+ // Only terrain is overlapped.
7249
+ EClassificationType["Terrain"] = "TERRAIN";
7250
+ })(EClassificationType = Polygon.EClassificationType || (Polygon.EClassificationType = {}));
7251
+ Polygon.DEFAULT = {
7252
+ id: null,
7253
+ positions: null,
7254
+ color: "rgba(254, 234, 57, 0.54)",
7255
+ outlineColor: "rgba(215, 215, 215, 0)",
7256
+ outlineWidth: 2,
7257
+ extrudedHeight: 0,
7258
+ classificationType: EClassificationType.Both,
7259
+ smoothen: 0
7260
+ };
7261
+ })(Polygon = Entity3d.Polygon || (Entity3d.Polygon = {}));
7262
+ var Polyline;
7263
+ (function (Polyline) {
7264
+ Polyline.DEFAULT = {
7265
+ id: null,
7266
+ positions: null,
7267
+ color: "rgba(254, 234, 57, 0.54)",
7268
+ outlineWidth: 4,
7269
+ smoothen: 0
7270
+ };
7271
+ })(Polyline = Entity3d.Polyline || (Entity3d.Polyline = {}));
7272
+ var Circle;
7273
+ (function (Circle) {
7274
+ Circle.DEFAULT = {
7275
+ id: null,
7276
+ position: null,
7277
+ radius: 50,
7278
+ color: "rgba(254, 234, 57, 0.54)"
7279
+ };
7280
+ })(Circle = Entity3d.Circle || (Entity3d.Circle = {}));
7281
+ })(Entity3d = Element.Entity3d || (Element.Entity3d = {}));
7282
+ })(Element = Markup.Element || (Markup.Element = {}));
7283
+ })(Markup || (Markup = {}));
7284
+
7285
+ export { AnnDocument, CustomForm, CustomFormContent, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, Calculator, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, Style, TilesetEntitiesMapTiles, TilesetExtMapTiles, Tileset, Permission, Session, UserGroup, User, Account, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup };
6945
7286
  //# sourceMappingURL=bruce-models.es5.js.map