bruce-models 0.8.3 → 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.
- package/dist/bruce-models.es5.js +778 -441
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +770 -438
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account.js +15 -13
- package/dist/lib/account/account.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +6 -6
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/api/api.js +19 -2
- package/dist/lib/api/api.js.map +1 -1
- package/dist/lib/api/bruce-api.js +10 -6
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -0
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/calculator/calculator.js +53 -0
- package/dist/lib/calculator/calculator.js.map +1 -1
- package/dist/lib/client-file/client-file.js +11 -12
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/common/cache.js +83 -0
- package/dist/lib/common/cache.js.map +1 -1
- package/dist/lib/custom-form/custom-form-content.js +27 -0
- package/dist/lib/custom-form/custom-form-content.js.map +1 -0
- package/dist/lib/custom-form/custom-form.js +10 -10
- package/dist/lib/custom-form/custom-form.js.map +1 -1
- package/dist/lib/data-lab/data-lab.js +2 -2
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/entity/entity-attachment-type.js +7 -7
- package/dist/lib/entity/entity-attachment-type.js.map +1 -1
- package/dist/lib/entity/entity-attachment.js +13 -13
- package/dist/lib/entity/entity-attachment.js.map +1 -1
- package/dist/lib/entity/entity-comment.js +7 -7
- package/dist/lib/entity/entity-comment.js.map +1 -1
- package/dist/lib/entity/entity-coords.js +11 -11
- package/dist/lib/entity/entity-coords.js.map +1 -1
- package/dist/lib/entity/entity-link.js +7 -7
- package/dist/lib/entity/entity-link.js.map +1 -1
- package/dist/lib/entity/entity-lod.js +11 -10
- package/dist/lib/entity/entity-lod.js.map +1 -1
- package/dist/lib/entity/entity-relation-type.js +10 -10
- package/dist/lib/entity/entity-relation-type.js.map +1 -1
- package/dist/lib/entity/entity-relation.js +10 -10
- package/dist/lib/entity/entity-relation.js.map +1 -1
- package/dist/lib/entity/entity-source.js +8 -8
- package/dist/lib/entity/entity-source.js.map +1 -1
- package/dist/lib/entity/entity-tag.js +12 -12
- package/dist/lib/entity/entity-tag.js.map +1 -1
- package/dist/lib/entity/entity-type.js +10 -10
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +14 -14
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/entity/getters/entity-globe.js +2 -6
- package/dist/lib/entity/getters/entity-globe.js.map +1 -1
- package/dist/lib/import/import-cad.js +4 -4
- package/dist/lib/import/import-cad.js.map +1 -1
- package/dist/lib/import/import-csv.js +2 -2
- package/dist/lib/import/import-csv.js.map +1 -1
- package/dist/lib/import/import-json.js +2 -2
- package/dist/lib/import/import-json.js.map +1 -1
- package/dist/lib/import/import-kml.js +2 -2
- package/dist/lib/import/import-kml.js.map +1 -1
- package/dist/lib/import/imported-file.js +6 -6
- package/dist/lib/import/imported-file.js.map +1 -1
- package/dist/lib/markup/markup.js +111 -1
- package/dist/lib/markup/markup.js.map +1 -1
- package/dist/lib/program-key/program-key.js +10 -10
- package/dist/lib/program-key/program-key.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js +12 -12
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/project/project-view-legacy-tile.js +6 -6
- package/dist/lib/project/project-view-legacy-tile.js.map +1 -1
- package/dist/lib/project/project-view.js +11 -11
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/lib/server/message-broker.js +56 -34
- package/dist/lib/server/message-broker.js.map +1 -1
- package/dist/lib/server/pending-action.js +6 -6
- package/dist/lib/server/pending-action.js.map +1 -1
- package/dist/lib/server/task.js +4 -4
- package/dist/lib/server/task.js.map +1 -1
- package/dist/lib/style/style.js +10 -10
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/tileset/tileset.js +30 -32
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/lib/user/session.js +7 -7
- package/dist/lib/user/session.js.map +1 -1
- package/dist/lib/user/user-group.js +12 -12
- package/dist/lib/user/user-group.js.map +1 -1
- package/dist/lib/user/user.js +30 -30
- package/dist/lib/user/user.js.map +1 -1
- package/dist/types/account/account.d.ts +8 -5
- package/dist/types/ann-document/ann-document.d.ts +18 -3
- package/dist/types/api/api.d.ts +3 -1
- package/dist/types/api/bruce-api.d.ts +1 -1
- package/dist/types/bruce-models.d.ts +2 -0
- package/dist/types/calculator/calculator.d.ts +8 -0
- package/dist/types/client-file/client-file.d.ts +6 -5
- package/dist/types/common/cache.d.ts +9 -0
- package/dist/types/custom-form/custom-form-content.d.ts +67 -0
- package/dist/types/custom-form/custom-form.d.ts +7 -5
- package/dist/types/data-lab/data-lab.d.ts +2 -1
- package/dist/types/entity/entity-attachment-type.d.ts +4 -3
- package/dist/types/entity/entity-attachment.d.ts +7 -6
- package/dist/types/entity/entity-comment.d.ts +4 -3
- package/dist/types/entity/entity-coords.d.ts +6 -5
- package/dist/types/entity/entity-link.d.ts +4 -3
- package/dist/types/entity/entity-lod.d.ts +6 -4
- package/dist/types/entity/entity-relation-type.d.ts +5 -4
- package/dist/types/entity/entity-relation.d.ts +5 -4
- package/dist/types/entity/entity-source.d.ts +4 -3
- package/dist/types/entity/entity-tag.d.ts +6 -5
- package/dist/types/entity/entity-type.d.ts +5 -4
- package/dist/types/entity/entity.d.ts +6 -6
- package/dist/types/import/import-cad.d.ts +3 -2
- package/dist/types/import/import-csv.d.ts +2 -1
- package/dist/types/import/import-json.d.ts +2 -1
- package/dist/types/import/import-kml.d.ts +2 -1
- package/dist/types/import/imported-file.d.ts +3 -2
- package/dist/types/markup/markup.d.ts +95 -31
- package/dist/types/program-key/program-key.d.ts +5 -4
- package/dist/types/project/project-view-bookmark.d.ts +6 -5
- package/dist/types/project/project-view-legacy-tile.d.ts +3 -2
- package/dist/types/project/project-view.d.ts +5 -4
- package/dist/types/server/message-broker.d.ts +54 -35
- package/dist/types/server/pending-action.d.ts +3 -3
- package/dist/types/server/task.d.ts +3 -3
- package/dist/types/style/style.d.ts +5 -4
- package/dist/types/tileset/tileset.d.ts +13 -12
- package/dist/types/user/session.d.ts +4 -3
- package/dist/types/user/user-group.d.ts +7 -7
- package/dist/types/user/user.d.ts +14 -13
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
923
|
-
(function (
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
})(
|
|
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
|
|
932
|
-
(function (
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
})(
|
|
940
|
-
/**
|
|
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.
|
|
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
|
-
/**
|
|
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, "
|
|
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
|
-
/**
|
|
1029
|
-
|
|
1030
|
-
|
|
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
|
-
/**
|
|
1038
|
-
|
|
1039
|
-
|
|
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
|
-
/**
|
|
1042
|
-
|
|
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:
|
|
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.
|
|
1053
|
-
this.sendMessage(__assign(__assign({}, msg), { action:
|
|
1110
|
+
WebSocketBroker.prototype.SendBroadcastMessage = function (msg) {
|
|
1111
|
+
this.sendMessage(__assign(__assign({}, msg), { action: EAction.BROADCAST }));
|
|
1054
1112
|
};
|
|
1055
|
-
WebSocketBroker.prototype.
|
|
1113
|
+
WebSocketBroker.prototype.RequestTopicUsers = function (topic, callback) {
|
|
1056
1114
|
this.addSubscriber(topic, callback);
|
|
1057
|
-
this.sendMessage({ topic: topic, action:
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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));
|
|
@@ -3811,10 +4007,6 @@ function getCellSizeFromHeight(height) {
|
|
|
3811
4007
|
}
|
|
3812
4008
|
return 1.5;
|
|
3813
4009
|
}
|
|
3814
|
-
function getCell(cells, cellSize, lon, maxLon, lat, maxLat) {
|
|
3815
|
-
var id = cellSize + "_" + lon + "_" + maxLon + "_" + lat + "_" + maxLat;
|
|
3816
|
-
return cells[id];
|
|
3817
|
-
}
|
|
3818
4010
|
function isCellFetched(cell) {
|
|
3819
4011
|
if (cell.Fetched) {
|
|
3820
4012
|
return true;
|
|
@@ -3823,9 +4015,9 @@ function isCellFetched(cell) {
|
|
|
3823
4015
|
}
|
|
3824
4016
|
function getOrCreateCell(cells, cellSize, lon, maxLon, lat, maxLat) {
|
|
3825
4017
|
var id = cellSize + "_" + lon + "_" + maxLon + "_" + lat + "_" + maxLat;
|
|
3826
|
-
var cell =
|
|
4018
|
+
var cell = cells[id];
|
|
3827
4019
|
if (!cell) {
|
|
3828
|
-
cell = new Cell();
|
|
4020
|
+
cell = cells[id] = new Cell();
|
|
3829
4021
|
cell.Boundaries = {
|
|
3830
4022
|
minLatitude: lat,
|
|
3831
4023
|
maxLatitude: maxLat,
|
|
@@ -4402,22 +4594,22 @@ var EntityCoords;
|
|
|
4402
4594
|
return Api.ECacheKey.EntityCoords + Api.ECacheKey.Entity + Api.ECacheKey.Id + entityId;
|
|
4403
4595
|
}
|
|
4404
4596
|
EntityCoords.GetCacheKey = GetCacheKey;
|
|
4405
|
-
function GetEntityCoords(api, entityId) {
|
|
4597
|
+
function GetEntityCoords(api, entityId, reqParams) {
|
|
4406
4598
|
return __awaiter(this, void 0, void 0, function () {
|
|
4407
4599
|
var cacheData, req;
|
|
4408
4600
|
return __generator(this, function (_a) {
|
|
4409
|
-
cacheData = api.Cache.Get(GetCacheKey(entityId));
|
|
4601
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(entityId));
|
|
4410
4602
|
if (cacheData) {
|
|
4411
4603
|
return [2 /*return*/, cacheData];
|
|
4412
4604
|
}
|
|
4413
|
-
req = api.GET("entity/" + entityId + "/ucs");
|
|
4605
|
+
req = api.GET("entity/" + entityId + "/ucs", reqParams);
|
|
4414
4606
|
api.Cache.Set(GetCacheKey(entityId), req, Api.DEFAULT_CACHE_DURATION);
|
|
4415
4607
|
return [2 /*return*/, req];
|
|
4416
4608
|
});
|
|
4417
4609
|
});
|
|
4418
4610
|
}
|
|
4419
4611
|
EntityCoords.GetEntityCoords = GetEntityCoords;
|
|
4420
|
-
function EntityRelativeToPoint(api, entityId, params) {
|
|
4612
|
+
function EntityRelativeToPoint(api, entityId, params, reqParams) {
|
|
4421
4613
|
return __awaiter(this, void 0, void 0, function () {
|
|
4422
4614
|
var point, name, res;
|
|
4423
4615
|
return __generator(this, function (_a) {
|
|
@@ -4445,7 +4637,7 @@ var EntityCoords;
|
|
|
4445
4637
|
}
|
|
4446
4638
|
},
|
|
4447
4639
|
"test": params.test
|
|
4448
|
-
})];
|
|
4640
|
+
}, reqParams)];
|
|
4449
4641
|
case 3:
|
|
4450
4642
|
res = _a.sent();
|
|
4451
4643
|
if (!params.test) {
|
|
@@ -4457,7 +4649,7 @@ var EntityCoords;
|
|
|
4457
4649
|
});
|
|
4458
4650
|
}
|
|
4459
4651
|
EntityCoords.EntityRelativeToPoint = EntityRelativeToPoint;
|
|
4460
|
-
function EntityRelativeToEpsg(api, entityId, params) {
|
|
4652
|
+
function EntityRelativeToEpsg(api, entityId, params, reqParams) {
|
|
4461
4653
|
var _a;
|
|
4462
4654
|
return __awaiter(this, void 0, void 0, function () {
|
|
4463
4655
|
var epsg, name, res;
|
|
@@ -4484,7 +4676,7 @@ var EntityCoords;
|
|
|
4484
4676
|
}
|
|
4485
4677
|
},
|
|
4486
4678
|
"test": params.test
|
|
4487
|
-
})];
|
|
4679
|
+
}, reqParams)];
|
|
4488
4680
|
case 3:
|
|
4489
4681
|
res = _b.sent();
|
|
4490
4682
|
if (!params.test) {
|
|
@@ -4496,7 +4688,7 @@ var EntityCoords;
|
|
|
4496
4688
|
});
|
|
4497
4689
|
}
|
|
4498
4690
|
EntityCoords.EntityRelativeToEpsg = EntityRelativeToEpsg;
|
|
4499
|
-
function EntityRelativeToUcs(api, entityId, params) {
|
|
4691
|
+
function EntityRelativeToUcs(api, entityId, params, reqParams) {
|
|
4500
4692
|
return __awaiter(this, void 0, void 0, function () {
|
|
4501
4693
|
var ucsId, res;
|
|
4502
4694
|
return __generator(this, function (_a) {
|
|
@@ -4514,7 +4706,7 @@ var EntityCoords;
|
|
|
4514
4706
|
"Entity.ID": ucsId
|
|
4515
4707
|
},
|
|
4516
4708
|
"test": params.test
|
|
4517
|
-
})];
|
|
4709
|
+
}, reqParams)];
|
|
4518
4710
|
case 3:
|
|
4519
4711
|
res = _a.sent();
|
|
4520
4712
|
if (!params.test) {
|
|
@@ -4526,10 +4718,10 @@ var EntityCoords;
|
|
|
4526
4718
|
});
|
|
4527
4719
|
}
|
|
4528
4720
|
EntityCoords.EntityRelativeToUcs = EntityRelativeToUcs;
|
|
4529
|
-
function UnlinkCoords(api, entityId) {
|
|
4721
|
+
function UnlinkCoords(api, entityId, reqParams) {
|
|
4530
4722
|
return __awaiter(this, void 0, void 0, function () {
|
|
4531
4723
|
return __generator(this, function (_a) {
|
|
4532
|
-
return [2 /*return*/, api.DELETE("entity/" + entityId + "/ucs")];
|
|
4724
|
+
return [2 /*return*/, api.DELETE("entity/" + entityId + "/ucs", reqParams)];
|
|
4533
4725
|
});
|
|
4534
4726
|
});
|
|
4535
4727
|
}
|
|
@@ -4554,7 +4746,7 @@ var ClientFile;
|
|
|
4554
4746
|
return api.GetBaseUrl() + "/file/" + file.ID + (file.FileExt ? file.FileExt : "");
|
|
4555
4747
|
}
|
|
4556
4748
|
ClientFile.GetUrlWithExt = GetUrlWithExt;
|
|
4557
|
-
function Get(api, fileId) {
|
|
4749
|
+
function Get(api, fileId, reqParams) {
|
|
4558
4750
|
return __awaiter(this, void 0, void 0, function () {
|
|
4559
4751
|
var key, cacheData, req;
|
|
4560
4752
|
return __generator(this, function (_a) {
|
|
@@ -4562,18 +4754,18 @@ var ClientFile;
|
|
|
4562
4754
|
throw ("File ID is required.");
|
|
4563
4755
|
}
|
|
4564
4756
|
key = GetCacheKey(fileId);
|
|
4565
|
-
cacheData = api.Cache.Get(key);
|
|
4757
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
|
|
4566
4758
|
if (cacheData) {
|
|
4567
4759
|
return [2 /*return*/, cacheData];
|
|
4568
4760
|
}
|
|
4569
|
-
req = api.GET("file/" + fileId + "/details", Api.PrepReqParams());
|
|
4761
|
+
req = api.GET("file/" + fileId + "/details", Api.PrepReqParams(reqParams));
|
|
4570
4762
|
api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
|
|
4571
4763
|
return [2 /*return*/, req];
|
|
4572
4764
|
});
|
|
4573
4765
|
});
|
|
4574
4766
|
}
|
|
4575
4767
|
ClientFile.Get = Get;
|
|
4576
|
-
function Delete(api, fileIds) {
|
|
4768
|
+
function Delete(api, fileIds, reqParams) {
|
|
4577
4769
|
return __awaiter(this, void 0, void 0, function () {
|
|
4578
4770
|
var data, i, key;
|
|
4579
4771
|
return __generator(this, function (_a) {
|
|
@@ -4585,7 +4777,7 @@ var ClientFile;
|
|
|
4585
4777
|
data = {
|
|
4586
4778
|
Items: fileIds
|
|
4587
4779
|
};
|
|
4588
|
-
return [4 /*yield*/, api.POST("deleteFiles", data, Api.PrepReqParams())];
|
|
4780
|
+
return [4 /*yield*/, api.POST("deleteFiles", data, Api.PrepReqParams(reqParams))];
|
|
4589
4781
|
case 1:
|
|
4590
4782
|
_a.sent();
|
|
4591
4783
|
for (i = 0; i < fileIds.length; i++) {
|
|
@@ -4598,7 +4790,7 @@ var ClientFile;
|
|
|
4598
4790
|
});
|
|
4599
4791
|
}
|
|
4600
4792
|
ClientFile.Delete = Delete;
|
|
4601
|
-
function Upload(api, file, purpose,
|
|
4793
|
+
function Upload(api, file, purpose, reqParams) {
|
|
4602
4794
|
return __awaiter(this, void 0, void 0, function () {
|
|
4603
4795
|
var formData, params;
|
|
4604
4796
|
return __generator(this, function (_a) {
|
|
@@ -4611,8 +4803,7 @@ var ClientFile;
|
|
|
4611
4803
|
"Purpose": purpose
|
|
4612
4804
|
};
|
|
4613
4805
|
}
|
|
4614
|
-
params = Api.PrepReqParams();
|
|
4615
|
-
params.onProgress = onProgress;
|
|
4806
|
+
params = Api.PrepReqParams(reqParams);
|
|
4616
4807
|
params.formData = formData;
|
|
4617
4808
|
return [2 /*return*/, api.UPLOAD("file/uploadNew", file, params)];
|
|
4618
4809
|
});
|
|
@@ -4643,12 +4834,12 @@ var ClientFile;
|
|
|
4643
4834
|
ERowOperator["AND"] = "AND";
|
|
4644
4835
|
ERowOperator["OR"] = "OR";
|
|
4645
4836
|
})(ERowOperator = V1.ERowOperator || (V1.ERowOperator = {}));
|
|
4646
|
-
function GetList(api, filter) {
|
|
4837
|
+
function GetList(api, filter, reqParams) {
|
|
4647
4838
|
return __awaiter(this, void 0, void 0, function () {
|
|
4648
4839
|
var data;
|
|
4649
4840
|
return __generator(this, function (_a) {
|
|
4650
4841
|
switch (_a.label) {
|
|
4651
|
-
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))];
|
|
4652
4843
|
case 1:
|
|
4653
4844
|
data = _a.sent();
|
|
4654
4845
|
return [2 /*return*/, data.Items];
|
|
@@ -4667,7 +4858,7 @@ var ClientFile;
|
|
|
4667
4858
|
EConvertExt["GLB"] = ".glb";
|
|
4668
4859
|
EConvertExt["SKP"] = ".skp";
|
|
4669
4860
|
})(EConvertExt = Processor.EConvertExt || (Processor.EConvertExt = {}));
|
|
4670
|
-
function ConvertFormat(api, clientFileId, ext) {
|
|
4861
|
+
function ConvertFormat(api, clientFileId, ext, reqParams) {
|
|
4671
4862
|
return __awaiter(this, void 0, void 0, function () {
|
|
4672
4863
|
return __generator(this, function (_a) {
|
|
4673
4864
|
if (!clientFileId || !ext) {
|
|
@@ -4677,7 +4868,7 @@ var ClientFile;
|
|
|
4677
4868
|
clientFileId: clientFileId,
|
|
4678
4869
|
destinationFormat: ext,
|
|
4679
4870
|
operations: []
|
|
4680
|
-
})];
|
|
4871
|
+
}, reqParams)];
|
|
4681
4872
|
});
|
|
4682
4873
|
});
|
|
4683
4874
|
}
|
|
@@ -4705,7 +4896,7 @@ var ProgramKey;
|
|
|
4705
4896
|
EProgramId["BingMaps"] = "BingMaps";
|
|
4706
4897
|
EProgramId["Mapbox"] = "Mapbox";
|
|
4707
4898
|
})(EProgramId = ProgramKey.EProgramId || (ProgramKey.EProgramId = {}));
|
|
4708
|
-
function Get(api, programId) {
|
|
4899
|
+
function Get(api, programId, reqParams) {
|
|
4709
4900
|
return __awaiter(this, void 0, void 0, function () {
|
|
4710
4901
|
var key, cacheData, req;
|
|
4711
4902
|
return __generator(this, function (_a) {
|
|
@@ -4713,23 +4904,23 @@ var ProgramKey;
|
|
|
4713
4904
|
throw ("Program ID is required.");
|
|
4714
4905
|
}
|
|
4715
4906
|
key = GetCacheKey(programId);
|
|
4716
|
-
cacheData = api.Cache.Get(key);
|
|
4907
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
|
|
4717
4908
|
if (cacheData) {
|
|
4718
4909
|
return [2 /*return*/, cacheData];
|
|
4719
4910
|
}
|
|
4720
|
-
req = api.GET("programkey/" + programId, Api.PrepReqParams());
|
|
4911
|
+
req = api.GET("programkey/" + programId, Api.PrepReqParams(reqParams));
|
|
4721
4912
|
api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
|
|
4722
4913
|
return [2 /*return*/, req];
|
|
4723
4914
|
});
|
|
4724
4915
|
});
|
|
4725
4916
|
}
|
|
4726
4917
|
ProgramKey.Get = Get;
|
|
4727
|
-
function GetList(api) {
|
|
4918
|
+
function GetList(api, reqParams) {
|
|
4728
4919
|
return __awaiter(this, void 0, void 0, function () {
|
|
4729
4920
|
var cacheData, req;
|
|
4730
4921
|
var _this = this;
|
|
4731
4922
|
return __generator(this, function (_a) {
|
|
4732
|
-
cacheData = api.Cache.Get(GetListCacheKey());
|
|
4923
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
|
|
4733
4924
|
if (cacheData) {
|
|
4734
4925
|
return [2 /*return*/, cacheData];
|
|
4735
4926
|
}
|
|
@@ -4739,7 +4930,7 @@ var ProgramKey;
|
|
|
4739
4930
|
switch (_a.label) {
|
|
4740
4931
|
case 0:
|
|
4741
4932
|
_a.trys.push([0, 2, , 3]);
|
|
4742
|
-
return [4 /*yield*/, api.GET("programkeys", Api.PrepReqParams())];
|
|
4933
|
+
return [4 /*yield*/, api.GET("programkeys", Api.PrepReqParams(reqParams))];
|
|
4743
4934
|
case 1:
|
|
4744
4935
|
data = _a.sent();
|
|
4745
4936
|
res(data.Items);
|
|
@@ -4758,7 +4949,7 @@ var ProgramKey;
|
|
|
4758
4949
|
});
|
|
4759
4950
|
}
|
|
4760
4951
|
ProgramKey.GetList = GetList;
|
|
4761
|
-
function Delete(api, programId) {
|
|
4952
|
+
function Delete(api, programId, reqParams) {
|
|
4762
4953
|
return __awaiter(this, void 0, void 0, function () {
|
|
4763
4954
|
return __generator(this, function (_a) {
|
|
4764
4955
|
switch (_a.label) {
|
|
@@ -4766,7 +4957,7 @@ var ProgramKey;
|
|
|
4766
4957
|
if (!programId) {
|
|
4767
4958
|
throw ("Program ID is required.");
|
|
4768
4959
|
}
|
|
4769
|
-
return [4 /*yield*/, api.DELETE("programkey/" + programId, Api.PrepReqParams())];
|
|
4960
|
+
return [4 /*yield*/, api.DELETE("programkey/" + programId, Api.PrepReqParams(reqParams))];
|
|
4770
4961
|
case 1:
|
|
4771
4962
|
_a.sent();
|
|
4772
4963
|
api.Cache.Remove(GetCacheKey(programId));
|
|
@@ -4777,7 +4968,7 @@ var ProgramKey;
|
|
|
4777
4968
|
});
|
|
4778
4969
|
}
|
|
4779
4970
|
ProgramKey.Delete = Delete;
|
|
4780
|
-
function Update(api, data) {
|
|
4971
|
+
function Update(api, data, reqParams) {
|
|
4781
4972
|
return __awaiter(this, void 0, void 0, function () {
|
|
4782
4973
|
return __generator(this, function (_a) {
|
|
4783
4974
|
switch (_a.label) {
|
|
@@ -4785,7 +4976,7 @@ var ProgramKey;
|
|
|
4785
4976
|
if (!(data === null || data === void 0 ? void 0 : data.ProgramId)) {
|
|
4786
4977
|
throw ("Program ID is required.");
|
|
4787
4978
|
}
|
|
4788
|
-
return [4 /*yield*/, api.POST("programkey", data, Api.PrepReqParams())];
|
|
4979
|
+
return [4 /*yield*/, api.POST("programkey", data, Api.PrepReqParams(reqParams))];
|
|
4789
4980
|
case 1:
|
|
4790
4981
|
data = _a.sent();
|
|
4791
4982
|
api.Cache.Remove(GetCacheKey(data.ProgramId));
|
|
@@ -4851,7 +5042,7 @@ var Tileset;
|
|
|
4851
5042
|
EPivot["Weight"] = "weight";
|
|
4852
5043
|
EPivot["UCS"] = "ucs";
|
|
4853
5044
|
})(EPivot = Tileset.EPivot || (Tileset.EPivot = {}));
|
|
4854
|
-
function Get(api, tilesetId, loadFiles) {
|
|
5045
|
+
function Get(api, tilesetId, loadFiles, reqParams) {
|
|
4855
5046
|
if (loadFiles === void 0) { loadFiles = false; }
|
|
4856
5047
|
return __awaiter(this, void 0, void 0, function () {
|
|
4857
5048
|
var cacheData, req;
|
|
@@ -4859,23 +5050,23 @@ var Tileset;
|
|
|
4859
5050
|
if (!tilesetId) {
|
|
4860
5051
|
throw ("Tileset ID is required.");
|
|
4861
5052
|
}
|
|
4862
|
-
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));
|
|
4863
5054
|
if (cacheData) {
|
|
4864
5055
|
return [2 /*return*/, cacheData];
|
|
4865
5056
|
}
|
|
4866
|
-
req = api.GET("tileset/get/" + tilesetId + "?noFiles=" + (loadFiles ? 0 : 1));
|
|
5057
|
+
req = api.GET("tileset/get/" + tilesetId + "?noFiles=" + (loadFiles ? 0 : 1), reqParams);
|
|
4867
5058
|
api.Cache.Set(GetCacheKey(tilesetId, loadFiles), req, Api.DEFAULT_CACHE_DURATION);
|
|
4868
5059
|
return [2 /*return*/, req];
|
|
4869
5060
|
});
|
|
4870
5061
|
});
|
|
4871
5062
|
}
|
|
4872
5063
|
Tileset.Get = Get;
|
|
4873
|
-
function GetList(api) {
|
|
5064
|
+
function GetList(api, reqParams) {
|
|
4874
5065
|
return __awaiter(this, void 0, void 0, function () {
|
|
4875
5066
|
var cacheData, req;
|
|
4876
5067
|
var _this = this;
|
|
4877
5068
|
return __generator(this, function (_a) {
|
|
4878
|
-
cacheData = api.Cache.Get(GetListCacheKey());
|
|
5069
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
|
|
4879
5070
|
if (cacheData) {
|
|
4880
5071
|
return [2 /*return*/, cacheData];
|
|
4881
5072
|
}
|
|
@@ -4885,7 +5076,7 @@ var Tileset;
|
|
|
4885
5076
|
switch (_a.label) {
|
|
4886
5077
|
case 0:
|
|
4887
5078
|
_a.trys.push([0, 2, , 3]);
|
|
4888
|
-
return [4 /*yield*/, api.GET("tileset/getList")];
|
|
5079
|
+
return [4 /*yield*/, api.GET("tileset/getList", reqParams)];
|
|
4889
5080
|
case 1:
|
|
4890
5081
|
data = _a.sent();
|
|
4891
5082
|
res(data);
|
|
@@ -4904,7 +5095,7 @@ var Tileset;
|
|
|
4904
5095
|
});
|
|
4905
5096
|
}
|
|
4906
5097
|
Tileset.GetList = GetList;
|
|
4907
|
-
function Delete(api, tilesetId) {
|
|
5098
|
+
function Delete(api, tilesetId, reqParams) {
|
|
4908
5099
|
return __awaiter(this, void 0, void 0, function () {
|
|
4909
5100
|
return __generator(this, function (_a) {
|
|
4910
5101
|
switch (_a.label) {
|
|
@@ -4912,7 +5103,7 @@ var Tileset;
|
|
|
4912
5103
|
if (!tilesetId) {
|
|
4913
5104
|
throw ("Tileset ID is required.");
|
|
4914
5105
|
}
|
|
4915
|
-
return [4 /*yield*/, api.DELETE("tileset/delete/" + tilesetId)];
|
|
5106
|
+
return [4 /*yield*/, api.DELETE("tileset/delete/" + tilesetId, reqParams)];
|
|
4916
5107
|
case 1:
|
|
4917
5108
|
_a.sent();
|
|
4918
5109
|
api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + tilesetId);
|
|
@@ -4923,7 +5114,7 @@ var Tileset;
|
|
|
4923
5114
|
});
|
|
4924
5115
|
}
|
|
4925
5116
|
Tileset.Delete = Delete;
|
|
4926
|
-
function Update(api, data) {
|
|
5117
|
+
function Update(api, data, reqParams) {
|
|
4927
5118
|
return __awaiter(this, void 0, void 0, function () {
|
|
4928
5119
|
var isNew, res;
|
|
4929
5120
|
return __generator(this, function (_a) {
|
|
@@ -4934,12 +5125,12 @@ var Tileset;
|
|
|
4934
5125
|
}
|
|
4935
5126
|
isNew = !data.id;
|
|
4936
5127
|
if (!isNew) return [3 /*break*/, 2];
|
|
4937
|
-
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)];
|
|
4938
5129
|
case 1:
|
|
4939
5130
|
res = _a.sent();
|
|
4940
5131
|
data = __assign(__assign(__assign({}, res), data), { settings: __assign(__assign({}, res.settings), data.settings), id: res.id });
|
|
4941
5132
|
_a.label = 2;
|
|
4942
|
-
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))];
|
|
4943
5134
|
case 3:
|
|
4944
5135
|
_a.sent();
|
|
4945
5136
|
api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + data.id);
|
|
@@ -4950,21 +5141,20 @@ var Tileset;
|
|
|
4950
5141
|
});
|
|
4951
5142
|
}
|
|
4952
5143
|
Tileset.Update = Update;
|
|
4953
|
-
function UploadFile(api, tilesetId, file,
|
|
5144
|
+
function UploadFile(api, tilesetId, file, reqParams) {
|
|
4954
5145
|
return __awaiter(this, void 0, void 0, function () {
|
|
4955
5146
|
var params;
|
|
4956
5147
|
return __generator(this, function (_a) {
|
|
4957
5148
|
if (!tilesetId || !file) {
|
|
4958
5149
|
throw ("Tileset ID and file are required.");
|
|
4959
5150
|
}
|
|
4960
|
-
params = Api.PrepReqParams();
|
|
4961
|
-
params.onProgress = onProgress;
|
|
5151
|
+
params = Api.PrepReqParams(reqParams);
|
|
4962
5152
|
return [2 /*return*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/files", file, params)];
|
|
4963
5153
|
});
|
|
4964
5154
|
});
|
|
4965
5155
|
}
|
|
4966
5156
|
Tileset.UploadFile = UploadFile;
|
|
4967
|
-
function DeleteFile(api, tilesetId, file) {
|
|
5157
|
+
function DeleteFile(api, tilesetId, file, reqParams) {
|
|
4968
5158
|
return __awaiter(this, void 0, void 0, function () {
|
|
4969
5159
|
return __generator(this, function (_a) {
|
|
4970
5160
|
switch (_a.label) {
|
|
@@ -4972,7 +5162,7 @@ var Tileset;
|
|
|
4972
5162
|
if (!tilesetId || !file) {
|
|
4973
5163
|
throw ("Tileset ID and file are required.");
|
|
4974
5164
|
}
|
|
4975
|
-
return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/files/" + file)];
|
|
5165
|
+
return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/files/" + file, reqParams)];
|
|
4976
5166
|
case 1:
|
|
4977
5167
|
_a.sent();
|
|
4978
5168
|
api.Cache.Remove(GetCacheKey(tilesetId, true));
|
|
@@ -4982,7 +5172,7 @@ var Tileset;
|
|
|
4982
5172
|
});
|
|
4983
5173
|
}
|
|
4984
5174
|
Tileset.DeleteFile = DeleteFile;
|
|
4985
|
-
function UploadSrcFile(api, tilesetId, file,
|
|
5175
|
+
function UploadSrcFile(api, tilesetId, file, reqParams) {
|
|
4986
5176
|
return __awaiter(this, void 0, void 0, function () {
|
|
4987
5177
|
var params;
|
|
4988
5178
|
return __generator(this, function (_a) {
|
|
@@ -4991,8 +5181,7 @@ var Tileset;
|
|
|
4991
5181
|
if (!tilesetId || !file) {
|
|
4992
5182
|
throw ("Tileset ID and file are required.");
|
|
4993
5183
|
}
|
|
4994
|
-
params = Api.PrepReqParams();
|
|
4995
|
-
params.onProgress = onProgress;
|
|
5184
|
+
params = Api.PrepReqParams(reqParams);
|
|
4996
5185
|
return [4 /*yield*/, api.UPLOAD("tileset/uploadFile/" + tilesetId + "/src", file, params)];
|
|
4997
5186
|
case 1:
|
|
4998
5187
|
_a.sent();
|
|
@@ -5003,7 +5192,7 @@ var Tileset;
|
|
|
5003
5192
|
});
|
|
5004
5193
|
}
|
|
5005
5194
|
Tileset.UploadSrcFile = UploadSrcFile;
|
|
5006
|
-
function DeleteSrcFile(api, tilesetId, file) {
|
|
5195
|
+
function DeleteSrcFile(api, tilesetId, file, reqParams) {
|
|
5007
5196
|
return __awaiter(this, void 0, void 0, function () {
|
|
5008
5197
|
return __generator(this, function (_a) {
|
|
5009
5198
|
switch (_a.label) {
|
|
@@ -5011,7 +5200,7 @@ var Tileset;
|
|
|
5011
5200
|
if (!tilesetId || !file) {
|
|
5012
5201
|
throw ("Tileset ID and file are required.");
|
|
5013
5202
|
}
|
|
5014
|
-
return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/src/" + file)];
|
|
5203
|
+
return [4 /*yield*/, api.DELETE("tileset/deleteFile/" + tilesetId + "/src/" + file, reqParams)];
|
|
5015
5204
|
case 1:
|
|
5016
5205
|
_a.sent();
|
|
5017
5206
|
api.Cache.Remove(GetCacheKey(tilesetId, true));
|
|
@@ -5051,7 +5240,7 @@ var Tileset;
|
|
|
5051
5240
|
return api.GetBaseUrl() + ("tileset/file/" + tilesetId + "/" + file);
|
|
5052
5241
|
}
|
|
5053
5242
|
Tileset.GetPublicFileUrl = GetPublicFileUrl;
|
|
5054
|
-
function Generate(api, tilesetId) {
|
|
5243
|
+
function Generate(api, tilesetId, reqParams) {
|
|
5055
5244
|
return __awaiter(this, void 0, void 0, function () {
|
|
5056
5245
|
var res;
|
|
5057
5246
|
return __generator(this, function (_a) {
|
|
@@ -5060,7 +5249,7 @@ var Tileset;
|
|
|
5060
5249
|
if (!tilesetId) {
|
|
5061
5250
|
throw ("Tileset ID is required.");
|
|
5062
5251
|
}
|
|
5063
|
-
return [4 /*yield*/, api.GET("tileset/generate/" + tilesetId, Api.PrepReqParams())];
|
|
5252
|
+
return [4 /*yield*/, api.GET("tileset/generate/" + tilesetId, Api.PrepReqParams(reqParams))];
|
|
5064
5253
|
case 1:
|
|
5065
5254
|
res = _a.sent();
|
|
5066
5255
|
return [2 /*return*/, res.ID];
|
|
@@ -5078,7 +5267,7 @@ var Tileset;
|
|
|
5078
5267
|
return Api.ECacheKey.PublishTileset + Api.ECacheKey.Id + accountId + Api.ECacheKey.Id + tilesetId;
|
|
5079
5268
|
}
|
|
5080
5269
|
Publish.GetCacheKey = GetCacheKey;
|
|
5081
|
-
function Update(api, data) {
|
|
5270
|
+
function Update(api, data, reqParams) {
|
|
5082
5271
|
return __awaiter(this, void 0, void 0, function () {
|
|
5083
5272
|
var res, req;
|
|
5084
5273
|
return __generator(this, function (_a) {
|
|
@@ -5090,14 +5279,14 @@ var Tileset;
|
|
|
5090
5279
|
if (!data.ID) {
|
|
5091
5280
|
data.ID = 0;
|
|
5092
5281
|
}
|
|
5093
|
-
return [4 /*yield*/, api.POST("tileset/" + data.ID, data)];
|
|
5282
|
+
return [4 /*yield*/, api.POST("tileset/" + data.ID, data, reqParams)];
|
|
5094
5283
|
case 1:
|
|
5095
5284
|
res = _a.sent();
|
|
5096
5285
|
req = {
|
|
5097
5286
|
"ClientAccount.ID": data["EnabledFor.ClientAccount.ID"]
|
|
5098
5287
|
};
|
|
5099
5288
|
data.ID = res.ID;
|
|
5100
|
-
return [4 /*yield*/, api.POST("tileset/" + data.ID + "/enableForAccounts", req)];
|
|
5289
|
+
return [4 /*yield*/, api.POST("tileset/" + data.ID + "/enableForAccounts", req, reqParams)];
|
|
5101
5290
|
case 2:
|
|
5102
5291
|
_a.sent();
|
|
5103
5292
|
api.Cache.Remove(GetCacheKey(data["PublishedBy.ClientAccount.ID"], data["Tileset.ID"]));
|
|
@@ -5108,25 +5297,25 @@ var Tileset;
|
|
|
5108
5297
|
});
|
|
5109
5298
|
}
|
|
5110
5299
|
Publish.Update = Update;
|
|
5111
|
-
function Get(api, accountId, tilesetId) {
|
|
5300
|
+
function Get(api, accountId, tilesetId, reqParams) {
|
|
5112
5301
|
return __awaiter(this, void 0, void 0, function () {
|
|
5113
5302
|
var cacheData, req;
|
|
5114
5303
|
return __generator(this, function (_a) {
|
|
5115
5304
|
if (!accountId || !tilesetId) {
|
|
5116
5305
|
throw ("Client account ID and tileset ID are required.");
|
|
5117
5306
|
}
|
|
5118
|
-
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));
|
|
5119
5308
|
if (cacheData) {
|
|
5120
5309
|
return [2 /*return*/, cacheData];
|
|
5121
5310
|
}
|
|
5122
|
-
req = api.GET("tilesetByPublisher/" + accountId + "/" + tilesetId);
|
|
5311
|
+
req = api.GET("tilesetByPublisher/" + accountId + "/" + tilesetId, reqParams);
|
|
5123
5312
|
api.Cache.Set(GetCacheKey(accountId, tilesetId), req);
|
|
5124
5313
|
return [2 /*return*/, req];
|
|
5125
5314
|
});
|
|
5126
5315
|
});
|
|
5127
5316
|
}
|
|
5128
5317
|
Publish.Get = Get;
|
|
5129
|
-
function GetList(api, accountId) {
|
|
5318
|
+
function GetList(api, accountId, reqParams) {
|
|
5130
5319
|
return __awaiter(this, void 0, void 0, function () {
|
|
5131
5320
|
var cacheData, req;
|
|
5132
5321
|
var _this = this;
|
|
@@ -5134,7 +5323,7 @@ var Tileset;
|
|
|
5134
5323
|
if (!accountId) {
|
|
5135
5324
|
throw ("Client account ID is required.");
|
|
5136
5325
|
}
|
|
5137
|
-
cacheData = api.Cache.Get(GetCacheKey(accountId));
|
|
5326
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(accountId));
|
|
5138
5327
|
if (cacheData) {
|
|
5139
5328
|
return [2 /*return*/, cacheData];
|
|
5140
5329
|
}
|
|
@@ -5144,7 +5333,7 @@ var Tileset;
|
|
|
5144
5333
|
switch (_a.label) {
|
|
5145
5334
|
case 0:
|
|
5146
5335
|
_a.trys.push([0, 2, , 3]);
|
|
5147
|
-
return [4 /*yield*/, api.GET("tilesets/enabledForAccount/" + accountId)];
|
|
5336
|
+
return [4 /*yield*/, api.GET("tilesets/enabledForAccount/" + accountId, reqParams)];
|
|
5148
5337
|
case 1:
|
|
5149
5338
|
data = _a.sent();
|
|
5150
5339
|
res(data.Items);
|
|
@@ -5303,7 +5492,7 @@ var ProjectViewBookmark;
|
|
|
5303
5492
|
(function (V2) {
|
|
5304
5493
|
V2.DATA_VERSION = 2;
|
|
5305
5494
|
})(V2 = ProjectViewBookmark.V2 || (ProjectViewBookmark.V2 = {}));
|
|
5306
|
-
function Get(api, viewId, bookmarkId) {
|
|
5495
|
+
function Get(api, viewId, bookmarkId, reqParams) {
|
|
5307
5496
|
return __awaiter(this, void 0, void 0, function () {
|
|
5308
5497
|
var key, cacheData, req;
|
|
5309
5498
|
return __generator(this, function (_a) {
|
|
@@ -5311,18 +5500,18 @@ var ProjectViewBookmark;
|
|
|
5311
5500
|
throw ("View ID and Bookmark ID are required.");
|
|
5312
5501
|
}
|
|
5313
5502
|
key = GetCacheKey(viewId, bookmarkId);
|
|
5314
|
-
cacheData = api.Cache.Get(key);
|
|
5503
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
|
|
5315
5504
|
if (cacheData) {
|
|
5316
5505
|
return [2 /*return*/, cacheData];
|
|
5317
5506
|
}
|
|
5318
|
-
req = api.GET("ui.view/" + viewId + "/slide/" + bookmarkId, Api.PrepReqParams());
|
|
5507
|
+
req = api.GET("ui.view/" + viewId + "/slide/" + bookmarkId, Api.PrepReqParams(reqParams));
|
|
5319
5508
|
api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
|
|
5320
5509
|
return [2 /*return*/, req];
|
|
5321
5510
|
});
|
|
5322
5511
|
});
|
|
5323
5512
|
}
|
|
5324
5513
|
ProjectViewBookmark.Get = Get;
|
|
5325
|
-
function Delete(api, viewId, bookmarkId) {
|
|
5514
|
+
function Delete(api, viewId, bookmarkId, reqParams) {
|
|
5326
5515
|
return __awaiter(this, void 0, void 0, function () {
|
|
5327
5516
|
return __generator(this, function (_a) {
|
|
5328
5517
|
switch (_a.label) {
|
|
@@ -5330,7 +5519,7 @@ var ProjectViewBookmark;
|
|
|
5330
5519
|
if (!viewId || !bookmarkId) {
|
|
5331
5520
|
throw ("View ID and Bookmark ID are required.");
|
|
5332
5521
|
}
|
|
5333
|
-
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))];
|
|
5334
5523
|
case 1:
|
|
5335
5524
|
_a.sent();
|
|
5336
5525
|
api.Cache.Remove(GetCacheKey(viewId, bookmarkId));
|
|
@@ -5341,7 +5530,7 @@ var ProjectViewBookmark;
|
|
|
5341
5530
|
});
|
|
5342
5531
|
}
|
|
5343
5532
|
ProjectViewBookmark.Delete = Delete;
|
|
5344
|
-
function GetList(api, viewId) {
|
|
5533
|
+
function GetList(api, viewId, reqParams) {
|
|
5345
5534
|
return __awaiter(this, void 0, void 0, function () {
|
|
5346
5535
|
var cacheData, req;
|
|
5347
5536
|
var _this = this;
|
|
@@ -5349,7 +5538,7 @@ var ProjectViewBookmark;
|
|
|
5349
5538
|
if (!viewId) {
|
|
5350
5539
|
throw ("View ID is required.");
|
|
5351
5540
|
}
|
|
5352
|
-
cacheData = api.Cache.Get(GetListCacheKey(viewId));
|
|
5541
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(viewId));
|
|
5353
5542
|
if (cacheData) {
|
|
5354
5543
|
return [2 /*return*/, cacheData];
|
|
5355
5544
|
}
|
|
@@ -5359,7 +5548,7 @@ var ProjectViewBookmark;
|
|
|
5359
5548
|
switch (_a.label) {
|
|
5360
5549
|
case 0:
|
|
5361
5550
|
_a.trys.push([0, 2, , 3]);
|
|
5362
|
-
return [4 /*yield*/, api.GET("ui.view/" + viewId + "/slides", Api.PrepReqParams())];
|
|
5551
|
+
return [4 /*yield*/, api.GET("ui.view/" + viewId + "/slides", Api.PrepReqParams(reqParams))];
|
|
5363
5552
|
case 1:
|
|
5364
5553
|
data = _a.sent();
|
|
5365
5554
|
res(data.Items);
|
|
@@ -5378,7 +5567,7 @@ var ProjectViewBookmark;
|
|
|
5378
5567
|
});
|
|
5379
5568
|
}
|
|
5380
5569
|
ProjectViewBookmark.GetList = GetList;
|
|
5381
|
-
function Update(api, viewId, data) {
|
|
5570
|
+
function Update(api, viewId, data, reqParams) {
|
|
5382
5571
|
return __awaiter(this, void 0, void 0, function () {
|
|
5383
5572
|
return __generator(this, function (_a) {
|
|
5384
5573
|
switch (_a.label) {
|
|
@@ -5386,7 +5575,7 @@ var ProjectViewBookmark;
|
|
|
5386
5575
|
if (!(data === null || data === void 0 ? void 0 : data.Title)) {
|
|
5387
5576
|
data.Title = data.ID;
|
|
5388
5577
|
}
|
|
5389
|
-
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))];
|
|
5390
5579
|
case 1:
|
|
5391
5580
|
data = _a.sent();
|
|
5392
5581
|
api.Cache.Remove(GetCacheKey(viewId, data.ID));
|
|
@@ -5397,7 +5586,7 @@ var ProjectViewBookmark;
|
|
|
5397
5586
|
});
|
|
5398
5587
|
}
|
|
5399
5588
|
ProjectViewBookmark.Update = Update;
|
|
5400
|
-
function SetOrder(api, viewId, bookmarkIds) {
|
|
5589
|
+
function SetOrder(api, viewId, bookmarkIds, reqParams) {
|
|
5401
5590
|
return __awaiter(this, void 0, void 0, function () {
|
|
5402
5591
|
var reqData;
|
|
5403
5592
|
return __generator(this, function (_a) {
|
|
@@ -5407,7 +5596,7 @@ var ProjectViewBookmark;
|
|
|
5407
5596
|
"UISlide.ID": bookmarkIds,
|
|
5408
5597
|
"DisplayOrder.Start": 0
|
|
5409
5598
|
};
|
|
5410
|
-
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))];
|
|
5411
5600
|
case 1:
|
|
5412
5601
|
_a.sent();
|
|
5413
5602
|
api.Cache.RemoveByStartsWith(GetListCacheKey(viewId));
|
|
@@ -5445,7 +5634,7 @@ var ProjectView;
|
|
|
5445
5634
|
(function (V2) {
|
|
5446
5635
|
V2.DATA_VERSION = 2;
|
|
5447
5636
|
})(V2 = ProjectView.V2 || (ProjectView.V2 = {}));
|
|
5448
|
-
function Get(api, viewId) {
|
|
5637
|
+
function Get(api, viewId, reqParams) {
|
|
5449
5638
|
return __awaiter(this, void 0, void 0, function () {
|
|
5450
5639
|
var key, cacheData, req;
|
|
5451
5640
|
return __generator(this, function (_a) {
|
|
@@ -5453,23 +5642,23 @@ var ProjectView;
|
|
|
5453
5642
|
throw ("View ID is required.");
|
|
5454
5643
|
}
|
|
5455
5644
|
key = GetCacheKey(viewId);
|
|
5456
|
-
cacheData = api.Cache.Get(key);
|
|
5645
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
|
|
5457
5646
|
if (cacheData) {
|
|
5458
5647
|
return [2 /*return*/, cacheData];
|
|
5459
5648
|
}
|
|
5460
|
-
req = api.GET("ui.view/" + viewId, Api.PrepReqParams());
|
|
5649
|
+
req = api.GET("ui.view/" + viewId, Api.PrepReqParams(reqParams));
|
|
5461
5650
|
api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
|
|
5462
5651
|
return [2 /*return*/, req];
|
|
5463
5652
|
});
|
|
5464
5653
|
});
|
|
5465
5654
|
}
|
|
5466
5655
|
ProjectView.Get = Get;
|
|
5467
|
-
function GetList(api) {
|
|
5656
|
+
function GetList(api, reqParams) {
|
|
5468
5657
|
return __awaiter(this, void 0, void 0, function () {
|
|
5469
5658
|
var cacheData, req;
|
|
5470
5659
|
var _this = this;
|
|
5471
5660
|
return __generator(this, function (_a) {
|
|
5472
|
-
cacheData = api.Cache.Get(GetListCacheKey());
|
|
5661
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
|
|
5473
5662
|
if (cacheData) {
|
|
5474
5663
|
return [2 /*return*/, cacheData];
|
|
5475
5664
|
}
|
|
@@ -5479,7 +5668,7 @@ var ProjectView;
|
|
|
5479
5668
|
switch (_a.label) {
|
|
5480
5669
|
case 0:
|
|
5481
5670
|
_a.trys.push([0, 2, , 3]);
|
|
5482
|
-
return [4 /*yield*/, api.GET("ui.view/list", Api.PrepReqParams())];
|
|
5671
|
+
return [4 /*yield*/, api.GET("ui.view/list", Api.PrepReqParams(reqParams))];
|
|
5483
5672
|
case 1:
|
|
5484
5673
|
data = _a.sent();
|
|
5485
5674
|
res(data.Items);
|
|
@@ -5498,7 +5687,7 @@ var ProjectView;
|
|
|
5498
5687
|
});
|
|
5499
5688
|
}
|
|
5500
5689
|
ProjectView.GetList = GetList;
|
|
5501
|
-
function Delete(api, viewId) {
|
|
5690
|
+
function Delete(api, viewId, reqParams) {
|
|
5502
5691
|
return __awaiter(this, void 0, void 0, function () {
|
|
5503
5692
|
return __generator(this, function (_a) {
|
|
5504
5693
|
switch (_a.label) {
|
|
@@ -5506,7 +5695,7 @@ var ProjectView;
|
|
|
5506
5695
|
if (!viewId) {
|
|
5507
5696
|
throw ("View ID is required.");
|
|
5508
5697
|
}
|
|
5509
|
-
return [4 /*yield*/, api.DELETE("ui.view/" + viewId, Api.PrepReqParams())];
|
|
5698
|
+
return [4 /*yield*/, api.DELETE("ui.view/" + viewId, Api.PrepReqParams(reqParams))];
|
|
5510
5699
|
case 1:
|
|
5511
5700
|
_a.sent();
|
|
5512
5701
|
api.Cache.Remove(GetCacheKey(viewId));
|
|
@@ -5517,7 +5706,7 @@ var ProjectView;
|
|
|
5517
5706
|
});
|
|
5518
5707
|
}
|
|
5519
5708
|
ProjectView.Delete = Delete;
|
|
5520
|
-
function Update(api, data) {
|
|
5709
|
+
function Update(api, data, reqParams) {
|
|
5521
5710
|
return __awaiter(this, void 0, void 0, function () {
|
|
5522
5711
|
var isNew;
|
|
5523
5712
|
return __generator(this, function (_a) {
|
|
@@ -5537,11 +5726,11 @@ var ProjectView;
|
|
|
5537
5726
|
data.CreatedByUIVersion = "-1";
|
|
5538
5727
|
}
|
|
5539
5728
|
if (!isNew) return [3 /*break*/, 2];
|
|
5540
|
-
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))];
|
|
5541
5730
|
case 1:
|
|
5542
5731
|
data = _a.sent();
|
|
5543
5732
|
return [3 /*break*/, 4];
|
|
5544
|
-
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))];
|
|
5545
5734
|
case 3:
|
|
5546
5735
|
data = _a.sent();
|
|
5547
5736
|
_a.label = 4;
|
|
@@ -5556,13 +5745,13 @@ var ProjectView;
|
|
|
5556
5745
|
ProjectView.Update = Update;
|
|
5557
5746
|
})(ProjectView || (ProjectView = {}));
|
|
5558
5747
|
|
|
5559
|
-
function getTemplateSettings(apiGetter) {
|
|
5748
|
+
function getTemplateSettings(apiGetter, reqParams) {
|
|
5560
5749
|
var _a;
|
|
5561
5750
|
return __awaiter(this, void 0, void 0, function () {
|
|
5562
5751
|
var view;
|
|
5563
5752
|
return __generator(this, function (_b) {
|
|
5564
5753
|
switch (_b.label) {
|
|
5565
|
-
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)];
|
|
5566
5755
|
case 1:
|
|
5567
5756
|
view = _b.sent();
|
|
5568
5757
|
return [2 /*return*/, (_a = view.Settings) !== null && _a !== void 0 ? _a : {}];
|
|
@@ -5589,13 +5778,13 @@ function checkSourceToTemplate(items, templateItem, addIfMissing) {
|
|
|
5589
5778
|
*/
|
|
5590
5779
|
var ProjectViewLegacyTile;
|
|
5591
5780
|
(function (ProjectViewLegacyTile) {
|
|
5592
|
-
function MergeMapTemplateData(getter, items, addIfMissing) {
|
|
5781
|
+
function MergeMapTemplateData(getter, items, addIfMissing, reqParams) {
|
|
5593
5782
|
var _a;
|
|
5594
5783
|
return __awaiter(this, void 0, void 0, function () {
|
|
5595
5784
|
var settings, maps, i, mapSource;
|
|
5596
5785
|
return __generator(this, function (_b) {
|
|
5597
5786
|
switch (_b.label) {
|
|
5598
|
-
case 0: return [4 /*yield*/, getTemplateSettings(getter)];
|
|
5787
|
+
case 0: return [4 /*yield*/, getTemplateSettings(getter, reqParams)];
|
|
5599
5788
|
case 1:
|
|
5600
5789
|
settings = _b.sent();
|
|
5601
5790
|
maps = (_a = settings.CesiumMapSources) !== null && _a !== void 0 ? _a : [];
|
|
@@ -5609,13 +5798,13 @@ var ProjectViewLegacyTile;
|
|
|
5609
5798
|
});
|
|
5610
5799
|
}
|
|
5611
5800
|
ProjectViewLegacyTile.MergeMapTemplateData = MergeMapTemplateData;
|
|
5612
|
-
function MergeTerrainTemplateData(getter, items, addIfMissing) {
|
|
5801
|
+
function MergeTerrainTemplateData(getter, items, addIfMissing, reqParams) {
|
|
5613
5802
|
var _a;
|
|
5614
5803
|
return __awaiter(this, void 0, void 0, function () {
|
|
5615
5804
|
var settings, terrains, i, terrainSource;
|
|
5616
5805
|
return __generator(this, function (_b) {
|
|
5617
5806
|
switch (_b.label) {
|
|
5618
|
-
case 0: return [4 /*yield*/, getTemplateSettings(getter)];
|
|
5807
|
+
case 0: return [4 /*yield*/, getTemplateSettings(getter, reqParams)];
|
|
5619
5808
|
case 1:
|
|
5620
5809
|
settings = _b.sent();
|
|
5621
5810
|
terrains = (_a = settings.CesiumTerrainSources) !== null && _a !== void 0 ? _a : [];
|
|
@@ -5762,24 +5951,24 @@ var PendingAction;
|
|
|
5762
5951
|
EStatus["Complete"] = "COMPLETE";
|
|
5763
5952
|
EStatus["Failed"] = "FAILED";
|
|
5764
5953
|
})(EStatus = PendingAction.EStatus || (PendingAction.EStatus = {}));
|
|
5765
|
-
function Get(api, actionId) {
|
|
5954
|
+
function Get(api, actionId, reqParams) {
|
|
5766
5955
|
return __awaiter(this, void 0, void 0, function () {
|
|
5767
5956
|
return __generator(this, function (_a) {
|
|
5768
5957
|
if (!actionId) {
|
|
5769
5958
|
throw ("Action ID is required.");
|
|
5770
5959
|
}
|
|
5771
|
-
return [2 /*return*/, api.GET("pendingAction/" + actionId, Api.PrepReqParams())];
|
|
5960
|
+
return [2 /*return*/, api.GET("pendingAction/" + actionId, Api.PrepReqParams(reqParams))];
|
|
5772
5961
|
});
|
|
5773
5962
|
});
|
|
5774
5963
|
}
|
|
5775
5964
|
PendingAction.Get = Get;
|
|
5776
|
-
function GetRelevantList(api, stricter) {
|
|
5965
|
+
function GetRelevantList(api, stricter, reqParams) {
|
|
5777
5966
|
if (stricter === void 0) { stricter = false; }
|
|
5778
5967
|
return __awaiter(this, void 0, void 0, function () {
|
|
5779
5968
|
var data;
|
|
5780
5969
|
return __generator(this, function (_a) {
|
|
5781
5970
|
switch (_a.label) {
|
|
5782
|
-
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))];
|
|
5783
5972
|
case 1:
|
|
5784
5973
|
data = _a.sent();
|
|
5785
5974
|
return [2 /*return*/, data.Items];
|
|
@@ -5788,7 +5977,7 @@ var PendingAction;
|
|
|
5788
5977
|
});
|
|
5789
5978
|
}
|
|
5790
5979
|
PendingAction.GetRelevantList = GetRelevantList;
|
|
5791
|
-
function GetMessages(api, actionId, order, startIndex, amount) {
|
|
5980
|
+
function GetMessages(api, actionId, order, startIndex, amount, reqParams) {
|
|
5792
5981
|
return __awaiter(this, void 0, void 0, function () {
|
|
5793
5982
|
var args, data;
|
|
5794
5983
|
return __generator(this, function (_a) {
|
|
@@ -5804,7 +5993,7 @@ var PendingAction;
|
|
|
5804
5993
|
order = Api.ESortOrder.Asc;
|
|
5805
5994
|
}
|
|
5806
5995
|
args = "?SortOrder=" + (order == Api.ESortOrder.Desc ? "DESC" : "ASC") + "&PageSize=" + amount + "&PageIndex=" + startIndex;
|
|
5807
|
-
return [4 /*yield*/, api.GET("pendingAction/" + actionId + "/progressMessages" + args, Api.PrepReqParams())];
|
|
5996
|
+
return [4 /*yield*/, api.GET("pendingAction/" + actionId + "/progressMessages" + args, Api.PrepReqParams(reqParams))];
|
|
5808
5997
|
case 1:
|
|
5809
5998
|
data = _a.sent();
|
|
5810
5999
|
return [2 /*return*/, data.Items];
|
|
@@ -5843,9 +6032,9 @@ var Style;
|
|
|
5843
6032
|
EPointType["Icon"] = "ICON";
|
|
5844
6033
|
EPointType["Cylinder"] = "CYLINDER";
|
|
5845
6034
|
})(EPointType = Style.EPointType || (Style.EPointType = {}));
|
|
5846
|
-
function GetList(api) {
|
|
6035
|
+
function GetList(api, reqParams) {
|
|
5847
6036
|
var _this = this;
|
|
5848
|
-
var cacheData = api.Cache.Get(GetListCacheKey());
|
|
6037
|
+
var cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey());
|
|
5849
6038
|
if (cacheData) {
|
|
5850
6039
|
return cacheData;
|
|
5851
6040
|
}
|
|
@@ -5855,7 +6044,7 @@ var Style;
|
|
|
5855
6044
|
switch (_a.label) {
|
|
5856
6045
|
case 0:
|
|
5857
6046
|
_a.trys.push([0, 2, , 3]);
|
|
5858
|
-
return [4 /*yield*/, api.GET("ui.entityDisplaySettings", Api.PrepReqParams())];
|
|
6047
|
+
return [4 /*yield*/, api.GET("ui.entityDisplaySettings", Api.PrepReqParams(reqParams))];
|
|
5859
6048
|
case 1:
|
|
5860
6049
|
data = _a.sent();
|
|
5861
6050
|
res(data.Items);
|
|
@@ -5872,20 +6061,20 @@ var Style;
|
|
|
5872
6061
|
return req;
|
|
5873
6062
|
}
|
|
5874
6063
|
Style.GetList = GetList;
|
|
5875
|
-
function Get(api, id) {
|
|
6064
|
+
function Get(api, id, reqParams) {
|
|
5876
6065
|
if (!id) {
|
|
5877
6066
|
throw ("Style ID is required.");
|
|
5878
6067
|
}
|
|
5879
|
-
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));
|
|
5880
6069
|
if (cacheData) {
|
|
5881
6070
|
return cacheData;
|
|
5882
6071
|
}
|
|
5883
|
-
var req = api.GET("ui.entityDisplaySetting/" + id, Api.PrepReqParams());
|
|
6072
|
+
var req = api.GET("ui.entityDisplaySetting/" + id, Api.PrepReqParams(reqParams));
|
|
5884
6073
|
api.Cache.Set(GetCacheKey(id), req, Api.DEFAULT_CACHE_DURATION);
|
|
5885
6074
|
return req;
|
|
5886
6075
|
}
|
|
5887
6076
|
Style.Get = Get;
|
|
5888
|
-
function Update(api, data) {
|
|
6077
|
+
function Update(api, data, reqParams) {
|
|
5889
6078
|
return __awaiter(this, void 0, void 0, function () {
|
|
5890
6079
|
return __generator(this, function (_a) {
|
|
5891
6080
|
switch (_a.label) {
|
|
@@ -5896,7 +6085,7 @@ var Style;
|
|
|
5896
6085
|
if (!data.ID) {
|
|
5897
6086
|
data.ID = 0;
|
|
5898
6087
|
}
|
|
5899
|
-
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))];
|
|
5900
6089
|
case 1:
|
|
5901
6090
|
data = _a.sent();
|
|
5902
6091
|
api.Cache.Remove(GetCacheKey(data.ID));
|
|
@@ -5907,7 +6096,7 @@ var Style;
|
|
|
5907
6096
|
});
|
|
5908
6097
|
}
|
|
5909
6098
|
Style.Update = Update;
|
|
5910
|
-
function Delete(api, id) {
|
|
6099
|
+
function Delete(api, id, reqParams) {
|
|
5911
6100
|
return __awaiter(this, void 0, void 0, function () {
|
|
5912
6101
|
return __generator(this, function (_a) {
|
|
5913
6102
|
switch (_a.label) {
|
|
@@ -5915,7 +6104,7 @@ var Style;
|
|
|
5915
6104
|
if (!id) {
|
|
5916
6105
|
throw ("Style ID is required.");
|
|
5917
6106
|
}
|
|
5918
|
-
return [4 /*yield*/, api.DELETE("ui.entityDisplaySetting/" + id, Api.PrepReqParams())];
|
|
6107
|
+
return [4 /*yield*/, api.DELETE("ui.entityDisplaySetting/" + id, Api.PrepReqParams(reqParams))];
|
|
5919
6108
|
case 1:
|
|
5920
6109
|
_a.sent();
|
|
5921
6110
|
api.Cache.Remove(GetCacheKey(id));
|
|
@@ -5987,7 +6176,7 @@ var Session;
|
|
|
5987
6176
|
function GetCacheKey(sessionId) {
|
|
5988
6177
|
return "" + Api.ECacheKey.Session + Api.ECacheKey.Id + sessionId;
|
|
5989
6178
|
}
|
|
5990
|
-
function Get(api, sessionId) {
|
|
6179
|
+
function Get(api, sessionId, reqParams) {
|
|
5991
6180
|
return __awaiter(this, void 0, void 0, function () {
|
|
5992
6181
|
var key, cacheData, req;
|
|
5993
6182
|
return __generator(this, function (_a) {
|
|
@@ -5995,18 +6184,18 @@ var Session;
|
|
|
5995
6184
|
throw ("Session ID is required.");
|
|
5996
6185
|
}
|
|
5997
6186
|
key = GetCacheKey(sessionId);
|
|
5998
|
-
cacheData = api.Cache.Get(key);
|
|
6187
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(key);
|
|
5999
6188
|
if (cacheData) {
|
|
6000
6189
|
return [2 /*return*/, cacheData];
|
|
6001
6190
|
}
|
|
6002
|
-
req = api.GET("session/" + sessionId);
|
|
6191
|
+
req = api.GET("session/" + sessionId, reqParams);
|
|
6003
6192
|
api.Cache.Set(key, req, Api.DEFAULT_CACHE_DURATION);
|
|
6004
6193
|
return [2 /*return*/, req];
|
|
6005
6194
|
});
|
|
6006
6195
|
});
|
|
6007
6196
|
}
|
|
6008
6197
|
Session.Get = Get;
|
|
6009
|
-
function Login(api, username, password, accountId) {
|
|
6198
|
+
function Login(api, username, password, accountId, reqParams) {
|
|
6010
6199
|
return __awaiter(this, void 0, void 0, function () {
|
|
6011
6200
|
var data, session, ssid;
|
|
6012
6201
|
return __generator(this, function (_a) {
|
|
@@ -6019,7 +6208,7 @@ var Session;
|
|
|
6019
6208
|
account: accountId ? accountId : "",
|
|
6020
6209
|
login: username,
|
|
6021
6210
|
password: password
|
|
6022
|
-
})];
|
|
6211
|
+
}, reqParams)];
|
|
6023
6212
|
case 1:
|
|
6024
6213
|
data = _a.sent();
|
|
6025
6214
|
session = data === null || data === void 0 ? void 0 : data.Session;
|
|
@@ -6032,7 +6221,7 @@ var Session;
|
|
|
6032
6221
|
});
|
|
6033
6222
|
}
|
|
6034
6223
|
Session.Login = Login;
|
|
6035
|
-
function Logout(api) {
|
|
6224
|
+
function Logout(api, reqParams) {
|
|
6036
6225
|
return __awaiter(this, void 0, void 0, function () {
|
|
6037
6226
|
var ssid;
|
|
6038
6227
|
return __generator(this, function (_a) {
|
|
@@ -6040,7 +6229,7 @@ var Session;
|
|
|
6040
6229
|
case 0:
|
|
6041
6230
|
ssid = api.GetSessionId();
|
|
6042
6231
|
if (!ssid) return [3 /*break*/, 2];
|
|
6043
|
-
return [4 /*yield*/, api.POST("logout", null)];
|
|
6232
|
+
return [4 /*yield*/, api.POST("logout", null, reqParams)];
|
|
6044
6233
|
case 1:
|
|
6045
6234
|
_a.sent();
|
|
6046
6235
|
api.SetSessionId(null);
|
|
@@ -6103,18 +6292,18 @@ var Session;
|
|
|
6103
6292
|
*/
|
|
6104
6293
|
var UserGroup;
|
|
6105
6294
|
(function (UserGroup) {
|
|
6106
|
-
function GetByName(api, accountId, name) {
|
|
6295
|
+
function GetByName(api, accountId, name, reqParams) {
|
|
6107
6296
|
return __awaiter(this, void 0, void 0, function () {
|
|
6108
6297
|
return __generator(this, function (_a) {
|
|
6109
6298
|
if (!name || !accountId) {
|
|
6110
6299
|
throw ("Name and AccountID are required.");
|
|
6111
6300
|
}
|
|
6112
|
-
return [2 /*return*/, api.GET("account/" + accountId + "/userGroupByName/" + name)];
|
|
6301
|
+
return [2 /*return*/, api.GET("account/" + accountId + "/userGroupByName/" + name, reqParams)];
|
|
6113
6302
|
});
|
|
6114
6303
|
});
|
|
6115
6304
|
}
|
|
6116
6305
|
UserGroup.GetByName = GetByName;
|
|
6117
|
-
function GetUsers(api, accountId, id) {
|
|
6306
|
+
function GetUsers(api, accountId, id, reqParams) {
|
|
6118
6307
|
return __awaiter(this, void 0, void 0, function () {
|
|
6119
6308
|
var data;
|
|
6120
6309
|
return __generator(this, function (_a) {
|
|
@@ -6123,7 +6312,7 @@ var UserGroup;
|
|
|
6123
6312
|
if (!accountId || !id) {
|
|
6124
6313
|
throw ("AccountID and ID are required.");
|
|
6125
6314
|
}
|
|
6126
|
-
return [4 /*yield*/, api.GET("userGroup/" + accountId + "/" + id + "/users")];
|
|
6315
|
+
return [4 /*yield*/, api.GET("userGroup/" + accountId + "/" + id + "/users", reqParams)];
|
|
6127
6316
|
case 1:
|
|
6128
6317
|
data = _a.sent();
|
|
6129
6318
|
return [2 /*return*/, data.Items];
|
|
@@ -6132,7 +6321,7 @@ var UserGroup;
|
|
|
6132
6321
|
});
|
|
6133
6322
|
}
|
|
6134
6323
|
UserGroup.GetUsers = GetUsers;
|
|
6135
|
-
function GetListByPerm(api, accountId, perm) {
|
|
6324
|
+
function GetListByPerm(api, accountId, perm, reqParams) {
|
|
6136
6325
|
return __awaiter(this, void 0, void 0, function () {
|
|
6137
6326
|
var data;
|
|
6138
6327
|
return __generator(this, function (_a) {
|
|
@@ -6141,7 +6330,7 @@ var UserGroup;
|
|
|
6141
6330
|
if (!accountId || !perm) {
|
|
6142
6331
|
throw ("AccountID and Perm are required.");
|
|
6143
6332
|
}
|
|
6144
|
-
return [4 /*yield*/, api.GET("userGroupsByFeature/" + accountId + "/" + perm)];
|
|
6333
|
+
return [4 /*yield*/, api.GET("userGroupsByFeature/" + accountId + "/" + perm, reqParams)];
|
|
6145
6334
|
case 1:
|
|
6146
6335
|
data = _a.sent();
|
|
6147
6336
|
return [2 /*return*/, data.Items];
|
|
@@ -6150,7 +6339,7 @@ var UserGroup;
|
|
|
6150
6339
|
});
|
|
6151
6340
|
}
|
|
6152
6341
|
UserGroup.GetListByPerm = GetListByPerm;
|
|
6153
|
-
function GetList(api, accountId) {
|
|
6342
|
+
function GetList(api, accountId, reqParams) {
|
|
6154
6343
|
return __awaiter(this, void 0, void 0, function () {
|
|
6155
6344
|
var data;
|
|
6156
6345
|
return __generator(this, function (_a) {
|
|
@@ -6159,7 +6348,7 @@ var UserGroup;
|
|
|
6159
6348
|
if (!accountId) {
|
|
6160
6349
|
throw ("AccountID is required.");
|
|
6161
6350
|
}
|
|
6162
|
-
return [4 /*yield*/, api.GET("userGroups/" + accountId)];
|
|
6351
|
+
return [4 /*yield*/, api.GET("userGroups/" + accountId, reqParams)];
|
|
6163
6352
|
case 1:
|
|
6164
6353
|
data = _a.sent();
|
|
6165
6354
|
return [2 /*return*/, data.Items];
|
|
@@ -6168,18 +6357,18 @@ var UserGroup;
|
|
|
6168
6357
|
});
|
|
6169
6358
|
}
|
|
6170
6359
|
UserGroup.GetList = GetList;
|
|
6171
|
-
function Delete(api, accountId, id) {
|
|
6360
|
+
function Delete(api, accountId, id, reqParams) {
|
|
6172
6361
|
return __awaiter(this, void 0, void 0, function () {
|
|
6173
6362
|
return __generator(this, function (_a) {
|
|
6174
6363
|
if (!accountId || !id) {
|
|
6175
6364
|
throw ("AccountID and ID are required.");
|
|
6176
6365
|
}
|
|
6177
|
-
return [2 /*return*/, api.DELETE("account/" + accountId + "/userGroupID/" + id)];
|
|
6366
|
+
return [2 /*return*/, api.DELETE("account/" + accountId + "/userGroupID/" + id, reqParams)];
|
|
6178
6367
|
});
|
|
6179
6368
|
});
|
|
6180
6369
|
}
|
|
6181
6370
|
UserGroup.Delete = Delete;
|
|
6182
|
-
function Update(api, data) {
|
|
6371
|
+
function Update(api, data, reqParams) {
|
|
6183
6372
|
return __awaiter(this, void 0, void 0, function () {
|
|
6184
6373
|
return __generator(this, function (_a) {
|
|
6185
6374
|
switch (_a.label) {
|
|
@@ -6187,7 +6376,7 @@ var UserGroup;
|
|
|
6187
6376
|
if (!data.Name || !data["ClientAccount.ID"]) {
|
|
6188
6377
|
throw ("User group name and client account ID are required.");
|
|
6189
6378
|
}
|
|
6190
|
-
return [4 /*yield*/, api.POST("userGroup" + (data.ID ? ("/" + data.ID) : ""), data)];
|
|
6379
|
+
return [4 /*yield*/, api.POST("userGroup" + (data.ID ? ("/" + data.ID) : ""), data, reqParams)];
|
|
6191
6380
|
case 1:
|
|
6192
6381
|
data = _a.sent();
|
|
6193
6382
|
return [2 /*return*/, data];
|
|
@@ -6226,7 +6415,7 @@ var User;
|
|
|
6226
6415
|
EType["User"] = "LOGIN_USER";
|
|
6227
6416
|
EType["AccessToken"] = "ACCESS_TOKEN";
|
|
6228
6417
|
})(EType = User.EType || (User.EType = {}));
|
|
6229
|
-
function Get(api, id, accountId) {
|
|
6418
|
+
function Get(api, id, accountId, reqParams) {
|
|
6230
6419
|
return __awaiter(this, void 0, void 0, function () {
|
|
6231
6420
|
var cacheData, req;
|
|
6232
6421
|
return __generator(this, function (_a) {
|
|
@@ -6235,11 +6424,11 @@ var User;
|
|
|
6235
6424
|
if (!id) {
|
|
6236
6425
|
throw ("ID is required.");
|
|
6237
6426
|
}
|
|
6238
|
-
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));
|
|
6239
6428
|
if (cacheData) {
|
|
6240
6429
|
return [2 /*return*/, cacheData];
|
|
6241
6430
|
}
|
|
6242
|
-
return [4 /*yield*/, api.GET("user/" + id + (accountId ? "?clientAccountID=" + accountId : ""))];
|
|
6431
|
+
return [4 /*yield*/, api.GET("user/" + id + (accountId ? "?clientAccountID=" + accountId : ""), reqParams)];
|
|
6243
6432
|
case 1:
|
|
6244
6433
|
req = _a.sent();
|
|
6245
6434
|
api.Cache.Set(GetCacheKey(id, accountId), req, Api.DEFAULT_CACHE_DURATION);
|
|
@@ -6249,7 +6438,7 @@ var User;
|
|
|
6249
6438
|
});
|
|
6250
6439
|
}
|
|
6251
6440
|
User.Get = Get;
|
|
6252
|
-
function Update(api, data) {
|
|
6441
|
+
function Update(api, data, reqParams) {
|
|
6253
6442
|
return __awaiter(this, void 0, void 0, function () {
|
|
6254
6443
|
return __generator(this, function (_a) {
|
|
6255
6444
|
switch (_a.label) {
|
|
@@ -6257,7 +6446,7 @@ var User;
|
|
|
6257
6446
|
if (!(data === null || data === void 0 ? void 0 : data.ID) || !(data === null || data === void 0 ? void 0 : data.Type)) {
|
|
6258
6447
|
throw ("ID and Type are required.");
|
|
6259
6448
|
}
|
|
6260
|
-
return [4 /*yield*/, api.POST("user/" + data.ID, data)];
|
|
6449
|
+
return [4 /*yield*/, api.POST("user/" + data.ID, data, reqParams)];
|
|
6261
6450
|
case 1:
|
|
6262
6451
|
data = _a.sent();
|
|
6263
6452
|
api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + data.ID);
|
|
@@ -6273,7 +6462,7 @@ var User;
|
|
|
6273
6462
|
});
|
|
6274
6463
|
}
|
|
6275
6464
|
User.Update = Update;
|
|
6276
|
-
function GetUsernameAvailable(api, username) {
|
|
6465
|
+
function GetUsernameAvailable(api, username, reqParams) {
|
|
6277
6466
|
return __awaiter(this, void 0, void 0, function () {
|
|
6278
6467
|
var req, prom;
|
|
6279
6468
|
var _this = this;
|
|
@@ -6281,7 +6470,7 @@ var User;
|
|
|
6281
6470
|
if (!username) {
|
|
6282
6471
|
throw ("Username is required.");
|
|
6283
6472
|
}
|
|
6284
|
-
req = api.GET("user/loginavailable/" + username);
|
|
6473
|
+
req = api.GET("user/loginavailable/" + username, reqParams);
|
|
6285
6474
|
prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
|
|
6286
6475
|
var data, e_1;
|
|
6287
6476
|
return __generator(this, function (_a) {
|
|
@@ -6312,7 +6501,7 @@ var User;
|
|
|
6312
6501
|
return Api.ECacheKey.User + Api.ECacheKey.Account + Api.ECacheKey.Id + accountId;
|
|
6313
6502
|
}
|
|
6314
6503
|
LoginUser.GetListCacheKey = GetListCacheKey;
|
|
6315
|
-
function GetByEmail(api, email, accountId) {
|
|
6504
|
+
function GetByEmail(api, email, accountId, reqParams) {
|
|
6316
6505
|
return __awaiter(this, void 0, void 0, function () {
|
|
6317
6506
|
var cacheData, req;
|
|
6318
6507
|
return __generator(this, function (_a) {
|
|
@@ -6321,11 +6510,11 @@ var User;
|
|
|
6321
6510
|
if (!email) {
|
|
6322
6511
|
throw ("Email is required.");
|
|
6323
6512
|
}
|
|
6324
|
-
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));
|
|
6325
6514
|
if (cacheData) {
|
|
6326
6515
|
return [2 /*return*/, cacheData];
|
|
6327
6516
|
}
|
|
6328
|
-
return [4 /*yield*/, api.GET("userByEmail/" + email + (accountId ? "?clientAccountID=" + accountId : ""))];
|
|
6517
|
+
return [4 /*yield*/, api.GET("userByEmail/" + email + (accountId ? "?clientAccountID=" + accountId : ""), reqParams)];
|
|
6329
6518
|
case 1:
|
|
6330
6519
|
req = _a.sent();
|
|
6331
6520
|
api.Cache.Set(GetEmailCacheKey(email, accountId), req, Api.DEFAULT_CACHE_DURATION);
|
|
@@ -6335,7 +6524,7 @@ var User;
|
|
|
6335
6524
|
});
|
|
6336
6525
|
}
|
|
6337
6526
|
LoginUser.GetByEmail = GetByEmail;
|
|
6338
|
-
function GetList(api, accountId, exclusive) {
|
|
6527
|
+
function GetList(api, accountId, exclusive, reqParams) {
|
|
6339
6528
|
return __awaiter(this, void 0, void 0, function () {
|
|
6340
6529
|
var cacheData, req;
|
|
6341
6530
|
var _this = this;
|
|
@@ -6346,7 +6535,7 @@ var User;
|
|
|
6346
6535
|
if (!exclusive) {
|
|
6347
6536
|
exclusive = false;
|
|
6348
6537
|
}
|
|
6349
|
-
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));
|
|
6350
6539
|
if (cacheData) {
|
|
6351
6540
|
return [2 /*return*/, cacheData];
|
|
6352
6541
|
}
|
|
@@ -6356,7 +6545,7 @@ var User;
|
|
|
6356
6545
|
switch (_a.label) {
|
|
6357
6546
|
case 0:
|
|
6358
6547
|
_a.trys.push([0, 2, , 3]);
|
|
6359
|
-
return [4 /*yield*/, api.GET("users?clientAccountID=" + accountId + (exclusive ? "&allExcludingClientAccount=true" : ""))];
|
|
6548
|
+
return [4 /*yield*/, api.GET("users?clientAccountID=" + accountId + (exclusive ? "&allExcludingClientAccount=true" : ""), reqParams)];
|
|
6360
6549
|
case 1:
|
|
6361
6550
|
data = _a.sent();
|
|
6362
6551
|
res(data.Items);
|
|
@@ -6388,7 +6577,7 @@ var User;
|
|
|
6388
6577
|
* @param email
|
|
6389
6578
|
* @returns
|
|
6390
6579
|
*/
|
|
6391
|
-
function Signup(api, email) {
|
|
6580
|
+
function Signup(api, email, reqParams) {
|
|
6392
6581
|
return __awaiter(this, void 0, void 0, function () {
|
|
6393
6582
|
return __generator(this, function (_a) {
|
|
6394
6583
|
if (!email) {
|
|
@@ -6396,7 +6585,7 @@ var User;
|
|
|
6396
6585
|
}
|
|
6397
6586
|
return [2 /*return*/, api.POST("clientaccount/signup", {
|
|
6398
6587
|
Email: email
|
|
6399
|
-
})];
|
|
6588
|
+
}, reqParams)];
|
|
6400
6589
|
});
|
|
6401
6590
|
});
|
|
6402
6591
|
}
|
|
@@ -6407,13 +6596,13 @@ var User;
|
|
|
6407
6596
|
* @param expiredCode
|
|
6408
6597
|
* @returns
|
|
6409
6598
|
*/
|
|
6410
|
-
function SignupResend(api, expiredCode) {
|
|
6599
|
+
function SignupResend(api, expiredCode, reqParams) {
|
|
6411
6600
|
return __awaiter(this, void 0, void 0, function () {
|
|
6412
6601
|
return __generator(this, function (_a) {
|
|
6413
6602
|
if (!expiredCode) {
|
|
6414
6603
|
throw ("Expired activation code is required.");
|
|
6415
6604
|
}
|
|
6416
|
-
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)];
|
|
6417
6606
|
});
|
|
6418
6607
|
});
|
|
6419
6608
|
}
|
|
@@ -6426,7 +6615,7 @@ var User;
|
|
|
6426
6615
|
* @param accountId
|
|
6427
6616
|
* @returns
|
|
6428
6617
|
*/
|
|
6429
|
-
function SignupComplete(api, code, data, accountId) {
|
|
6618
|
+
function SignupComplete(api, code, data, accountId, reqParams) {
|
|
6430
6619
|
return __awaiter(this, void 0, void 0, function () {
|
|
6431
6620
|
var res;
|
|
6432
6621
|
return __generator(this, function (_a) {
|
|
@@ -6439,7 +6628,7 @@ var User;
|
|
|
6439
6628
|
data.IsActivated = true;
|
|
6440
6629
|
data.IsDisabled = false;
|
|
6441
6630
|
data.key = code;
|
|
6442
|
-
return [4 /*yield*/, api.POST("UserActivate/" + (accountId ? accountId : ""), data)];
|
|
6631
|
+
return [4 /*yield*/, api.POST("UserActivate/" + (accountId ? accountId : ""), data, reqParams)];
|
|
6443
6632
|
case 1:
|
|
6444
6633
|
res = _a.sent();
|
|
6445
6634
|
api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + res.ID);
|
|
@@ -6459,7 +6648,7 @@ var User;
|
|
|
6459
6648
|
* @param email
|
|
6460
6649
|
* @returns user id associated with provided email.
|
|
6461
6650
|
*/
|
|
6462
|
-
function ForgotPassword(api, accountId, email) {
|
|
6651
|
+
function ForgotPassword(api, accountId, email, reqParams) {
|
|
6463
6652
|
return __awaiter(this, void 0, void 0, function () {
|
|
6464
6653
|
var req, prom;
|
|
6465
6654
|
var _this = this;
|
|
@@ -6469,7 +6658,7 @@ var User;
|
|
|
6469
6658
|
}
|
|
6470
6659
|
req = api.POST("UserForgotPassword/" + accountId, {
|
|
6471
6660
|
Email: email
|
|
6472
|
-
});
|
|
6661
|
+
}, reqParams);
|
|
6473
6662
|
prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
|
|
6474
6663
|
var data, e_3;
|
|
6475
6664
|
return __generator(this, function (_a) {
|
|
@@ -6502,7 +6691,7 @@ var User;
|
|
|
6502
6691
|
* @param password
|
|
6503
6692
|
* @returns
|
|
6504
6693
|
*/
|
|
6505
|
-
function ForgotPasswordComplete(api, code, userId, password) {
|
|
6694
|
+
function ForgotPasswordComplete(api, code, userId, password, reqParams) {
|
|
6506
6695
|
return __awaiter(this, void 0, void 0, function () {
|
|
6507
6696
|
var user;
|
|
6508
6697
|
return __generator(this, function (_a) {
|
|
@@ -6516,7 +6705,7 @@ var User;
|
|
|
6516
6705
|
ActivationCode: code,
|
|
6517
6706
|
Password: password,
|
|
6518
6707
|
FullName: user.FullName
|
|
6519
|
-
})];
|
|
6708
|
+
}, reqParams)];
|
|
6520
6709
|
}
|
|
6521
6710
|
});
|
|
6522
6711
|
});
|
|
@@ -6529,12 +6718,12 @@ var User;
|
|
|
6529
6718
|
return Api.ECacheKey.AccessToken + Api.ECacheKey.Account + Api.ECacheKey.Id + accountId;
|
|
6530
6719
|
}
|
|
6531
6720
|
AccessToken.GetListCacheKey = GetListCacheKey;
|
|
6532
|
-
function GetList(api, accountId) {
|
|
6721
|
+
function GetList(api, accountId, reqParams) {
|
|
6533
6722
|
return __awaiter(this, void 0, void 0, function () {
|
|
6534
6723
|
var cacheData, req;
|
|
6535
6724
|
var _this = this;
|
|
6536
6725
|
return __generator(this, function (_a) {
|
|
6537
|
-
cacheData = api.Cache.Get(GetListCacheKey(accountId));
|
|
6726
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetListCacheKey(accountId));
|
|
6538
6727
|
if (cacheData) {
|
|
6539
6728
|
return [2 /*return*/, cacheData];
|
|
6540
6729
|
}
|
|
@@ -6544,7 +6733,7 @@ var User;
|
|
|
6544
6733
|
switch (_a.label) {
|
|
6545
6734
|
case 0:
|
|
6546
6735
|
_a.trys.push([0, 2, , 3]);
|
|
6547
|
-
return [4 /*yield*/, api.GET("usersByClientAccount/accessTokens")];
|
|
6736
|
+
return [4 /*yield*/, api.GET("usersByClientAccount/accessTokens", reqParams)];
|
|
6548
6737
|
case 1:
|
|
6549
6738
|
data = _a.sent();
|
|
6550
6739
|
res(data.Items);
|
|
@@ -6568,11 +6757,11 @@ var User;
|
|
|
6568
6757
|
});
|
|
6569
6758
|
}
|
|
6570
6759
|
AccessToken.GetList = GetList;
|
|
6571
|
-
function Delete(api, id) {
|
|
6760
|
+
function Delete(api, id, reqParams) {
|
|
6572
6761
|
return __awaiter(this, void 0, void 0, function () {
|
|
6573
6762
|
return __generator(this, function (_a) {
|
|
6574
6763
|
switch (_a.label) {
|
|
6575
|
-
case 0: return [4 /*yield*/, api.DELETE("accessToken/" + id)];
|
|
6764
|
+
case 0: return [4 /*yield*/, api.DELETE("accessToken/" + id, reqParams)];
|
|
6576
6765
|
case 1:
|
|
6577
6766
|
_a.sent();
|
|
6578
6767
|
api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + id);
|
|
@@ -6583,7 +6772,7 @@ var User;
|
|
|
6583
6772
|
});
|
|
6584
6773
|
}
|
|
6585
6774
|
AccessToken.Delete = Delete;
|
|
6586
|
-
function Create(api, data) {
|
|
6775
|
+
function Create(api, data, reqParams) {
|
|
6587
6776
|
return __awaiter(this, void 0, void 0, function () {
|
|
6588
6777
|
return __generator(this, function (_a) {
|
|
6589
6778
|
switch (_a.label) {
|
|
@@ -6597,7 +6786,7 @@ var User;
|
|
|
6597
6786
|
if (!data.Type) {
|
|
6598
6787
|
data.Type = EType.AccessToken;
|
|
6599
6788
|
}
|
|
6600
|
-
return [4 /*yield*/, api.POST("accessToken", data)];
|
|
6789
|
+
return [4 /*yield*/, api.POST("accessToken", data, reqParams)];
|
|
6601
6790
|
case 1:
|
|
6602
6791
|
data = _a.sent();
|
|
6603
6792
|
api.Cache.RemoveByStartsWith(Api.ECacheKey.AccessToken + Api.ECacheKey.Account);
|
|
@@ -6742,7 +6931,7 @@ var DataLab;
|
|
|
6742
6931
|
})(EReqKey = DataLab.EReqKey || (DataLab.EReqKey = {}));
|
|
6743
6932
|
var Entity;
|
|
6744
6933
|
(function (Entity) {
|
|
6745
|
-
function GetList(api, query, key, skip, load) {
|
|
6934
|
+
function GetList(api, query, key, skip, load, reqParams) {
|
|
6746
6935
|
return __awaiter(this, void 0, void 0, function () {
|
|
6747
6936
|
var req, prom;
|
|
6748
6937
|
var _this = this;
|
|
@@ -6756,7 +6945,7 @@ var DataLab;
|
|
|
6756
6945
|
if (!load) {
|
|
6757
6946
|
load = 50;
|
|
6758
6947
|
}
|
|
6759
|
-
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));
|
|
6760
6949
|
prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
|
|
6761
6950
|
var data, e_1;
|
|
6762
6951
|
return __generator(this, function (_a) {
|
|
@@ -6790,18 +6979,18 @@ var DataLab;
|
|
|
6790
6979
|
*/
|
|
6791
6980
|
var ImportCad;
|
|
6792
6981
|
(function (ImportCad) {
|
|
6793
|
-
function Analyze(api, params) {
|
|
6982
|
+
function Analyze(api, params, reqParams) {
|
|
6794
6983
|
return __awaiter(this, void 0, void 0, function () {
|
|
6795
6984
|
return __generator(this, function (_a) {
|
|
6796
|
-
return [2 /*return*/, api.POST("entities/PrepareIFCForImport", params, Api.PrepReqParams())];
|
|
6985
|
+
return [2 /*return*/, api.POST("entities/PrepareIFCForImport", params, Api.PrepReqParams(reqParams))];
|
|
6797
6986
|
});
|
|
6798
6987
|
});
|
|
6799
6988
|
}
|
|
6800
6989
|
ImportCad.Analyze = Analyze;
|
|
6801
|
-
function ImportEntities(api, params) {
|
|
6990
|
+
function ImportEntities(api, params, reqParams) {
|
|
6802
6991
|
return __awaiter(this, void 0, void 0, function () {
|
|
6803
6992
|
return __generator(this, function (_a) {
|
|
6804
|
-
return [2 /*return*/, api.POST("entities/importIFCWithProgress", params, Api.PrepReqParams())];
|
|
6993
|
+
return [2 /*return*/, api.POST("entities/importIFCWithProgress", params, Api.PrepReqParams(reqParams))];
|
|
6805
6994
|
});
|
|
6806
6995
|
});
|
|
6807
6996
|
}
|
|
@@ -6829,10 +7018,10 @@ var ImportCad;
|
|
|
6829
7018
|
|
|
6830
7019
|
var ImportCsv;
|
|
6831
7020
|
(function (ImportCsv) {
|
|
6832
|
-
function ImportEntities(api, params) {
|
|
7021
|
+
function ImportEntities(api, params, reqParams) {
|
|
6833
7022
|
return __awaiter(this, void 0, void 0, function () {
|
|
6834
7023
|
return __generator(this, function (_a) {
|
|
6835
|
-
return [2 /*return*/, api.POST("entities/importCSVWithProgress2", params, Api.PrepReqParams())];
|
|
7024
|
+
return [2 /*return*/, api.POST("entities/importCSVWithProgress2", params, Api.PrepReqParams(reqParams))];
|
|
6836
7025
|
});
|
|
6837
7026
|
});
|
|
6838
7027
|
}
|
|
@@ -6841,10 +7030,10 @@ var ImportCsv;
|
|
|
6841
7030
|
|
|
6842
7031
|
var ImportJson;
|
|
6843
7032
|
(function (ImportJson) {
|
|
6844
|
-
function ImportEntities(api, params) {
|
|
7033
|
+
function ImportEntities(api, params, reqParams) {
|
|
6845
7034
|
return __awaiter(this, void 0, void 0, function () {
|
|
6846
7035
|
return __generator(this, function (_a) {
|
|
6847
|
-
return [2 /*return*/, api.POST("entities/importJsonWithProgress", params, Api.PrepReqParams())];
|
|
7036
|
+
return [2 /*return*/, api.POST("entities/importJsonWithProgress", params, Api.PrepReqParams(reqParams))];
|
|
6848
7037
|
});
|
|
6849
7038
|
});
|
|
6850
7039
|
}
|
|
@@ -6853,10 +7042,10 @@ var ImportJson;
|
|
|
6853
7042
|
|
|
6854
7043
|
var ImportKml;
|
|
6855
7044
|
(function (ImportKml) {
|
|
6856
|
-
function ImportEntities(api, params) {
|
|
7045
|
+
function ImportEntities(api, params, reqParams) {
|
|
6857
7046
|
return __awaiter(this, void 0, void 0, function () {
|
|
6858
7047
|
return __generator(this, function (_a) {
|
|
6859
|
-
return [2 /*return*/, api.POST("entities/importKMLWithProgress2", params, Api.PrepReqParams())];
|
|
7048
|
+
return [2 /*return*/, api.POST("entities/importKMLWithProgress2", params, Api.PrepReqParams(reqParams))];
|
|
6860
7049
|
});
|
|
6861
7050
|
});
|
|
6862
7051
|
}
|
|
@@ -6878,7 +7067,7 @@ var ImportedFile;
|
|
|
6878
7067
|
EFileType["CAD"] = "CAD";
|
|
6879
7068
|
EFileType["All"] = "All";
|
|
6880
7069
|
})(EFileType = ImportedFile.EFileType || (ImportedFile.EFileType = {}));
|
|
6881
|
-
function GetList(api, type, pageIndex) {
|
|
7070
|
+
function GetList(api, type, pageIndex, reqParams) {
|
|
6882
7071
|
return __awaiter(this, void 0, void 0, function () {
|
|
6883
7072
|
var cacheData, first, url, req, prom;
|
|
6884
7073
|
var _this = this;
|
|
@@ -6889,7 +7078,7 @@ var ImportedFile;
|
|
|
6889
7078
|
if (!pageIndex) {
|
|
6890
7079
|
pageIndex = 0;
|
|
6891
7080
|
}
|
|
6892
|
-
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));
|
|
6893
7082
|
if (cacheData) {
|
|
6894
7083
|
return [2 /*return*/, cacheData];
|
|
6895
7084
|
}
|
|
@@ -6902,7 +7091,7 @@ var ImportedFile;
|
|
|
6902
7091
|
if (pageIndex > 0) {
|
|
6903
7092
|
url += (first ? "?" : "&") + "pageIndex=" + pageIndex;
|
|
6904
7093
|
}
|
|
6905
|
-
req = api.GET(url, Api.PrepReqParams());
|
|
7094
|
+
req = api.GET(url, Api.PrepReqParams(reqParams));
|
|
6906
7095
|
prom = new Promise(function (res, rej) { return __awaiter(_this, void 0, void 0, function () {
|
|
6907
7096
|
var data, e_1;
|
|
6908
7097
|
return __generator(this, function (_a) {
|
|
@@ -6928,15 +7117,15 @@ var ImportedFile;
|
|
|
6928
7117
|
});
|
|
6929
7118
|
}
|
|
6930
7119
|
ImportedFile.GetList = GetList;
|
|
6931
|
-
function Get(api, fileId) {
|
|
7120
|
+
function Get(api, fileId, reqParams) {
|
|
6932
7121
|
return __awaiter(this, void 0, void 0, function () {
|
|
6933
7122
|
var cacheData, req;
|
|
6934
7123
|
return __generator(this, function (_a) {
|
|
6935
|
-
cacheData = api.Cache.Get(GetCacheKey(fileId));
|
|
7124
|
+
cacheData = (reqParams === null || reqParams === void 0 ? void 0 : reqParams.noCache) ? null : api.Cache.Get(GetCacheKey(fileId));
|
|
6936
7125
|
if (cacheData) {
|
|
6937
7126
|
return [2 /*return*/, cacheData];
|
|
6938
7127
|
}
|
|
6939
|
-
req = api.GET("entityImportFile/" + fileId, Api.PrepReqParams());
|
|
7128
|
+
req = api.GET("entityImportFile/" + fileId, Api.PrepReqParams(reqParams));
|
|
6940
7129
|
api.Cache.Set(GetCacheKey(fileId), req, Api.DEFAULT_CACHE_DURATION);
|
|
6941
7130
|
return [2 /*return*/, req];
|
|
6942
7131
|
});
|
|
@@ -6945,5 +7134,153 @@ var ImportedFile;
|
|
|
6945
7134
|
ImportedFile.Get = Get;
|
|
6946
7135
|
})(ImportedFile || (ImportedFile = {}));
|
|
6947
7136
|
|
|
6948
|
-
|
|
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 };
|
|
6949
7286
|
//# sourceMappingURL=bruce-models.es5.js.map
|