bruce-models 2.4.5 → 2.4.7
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 +975 -402
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +957 -385
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-invite.js +17 -4
- package/dist/lib/account/account-invite.js.map +1 -1
- package/dist/lib/account/account.js +20 -4
- package/dist/lib/account/account.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +8 -1
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/api/api-getters.js +34 -0
- package/dist/lib/api/api-getters.js.map +1 -1
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -0
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/client-file/client-file.js +34 -6
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/custom-form/custom-form.js +17 -4
- package/dist/lib/custom-form/custom-form.js.map +1 -1
- package/dist/lib/data-lab/data-lab.js +4 -0
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/entity/entity-attachment-type.js +13 -3
- package/dist/lib/entity/entity-attachment-type.js.map +1 -1
- package/dist/lib/entity/entity-attachment.js +21 -5
- package/dist/lib/entity/entity-attachment.js.map +1 -1
- package/dist/lib/entity/entity-comment.js +13 -3
- package/dist/lib/entity/entity-comment.js.map +1 -1
- package/dist/lib/entity/entity-coords.js +21 -5
- package/dist/lib/entity/entity-coords.js.map +1 -1
- package/dist/lib/entity/entity-link.js +13 -3
- package/dist/lib/entity/entity-link.js.map +1 -1
- package/dist/lib/entity/entity-lod-category.js +17 -4
- package/dist/lib/entity/entity-lod-category.js.map +1 -1
- package/dist/lib/entity/entity-lod.js +26 -4
- package/dist/lib/entity/entity-lod.js.map +1 -1
- package/dist/lib/entity/entity-relation-type.js +17 -4
- package/dist/lib/entity/entity-relation-type.js.map +1 -1
- package/dist/lib/entity/entity-relation.js +20 -4
- package/dist/lib/entity/entity-relation.js.map +1 -1
- package/dist/lib/entity/entity-source.js +19 -6
- package/dist/lib/entity/entity-source.js.map +1 -1
- package/dist/lib/entity/entity-tag.js +21 -5
- package/dist/lib/entity/entity-tag.js.map +1 -1
- package/dist/lib/entity/entity-type.js +16 -3
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +25 -6
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/environment.js +55 -0
- package/dist/lib/environment.js.map +1 -0
- package/dist/lib/import/import-cad.js +9 -2
- package/dist/lib/import/import-cad.js.map +1 -1
- package/dist/lib/import/import-csv.js +5 -1
- package/dist/lib/import/import-csv.js.map +1 -1
- package/dist/lib/import/import-json.js +5 -1
- package/dist/lib/import/import-json.js.map +1 -1
- package/dist/lib/import/import-kml.js +5 -1
- package/dist/lib/import/import-kml.js.map +1 -1
- package/dist/lib/import/imported-file.js +12 -2
- package/dist/lib/import/imported-file.js.map +1 -1
- package/dist/lib/internal/uploader.js +5 -1
- package/dist/lib/internal/uploader.js.map +1 -1
- package/dist/lib/plugin/plugin.js +12 -2
- package/dist/lib/plugin/plugin.js.map +1 -1
- package/dist/lib/program-key/program-key.js +17 -4
- package/dist/lib/program-key/program-key.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js +21 -5
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/project/project-view-legacy-tile.js +9 -2
- package/dist/lib/project/project-view-legacy-tile.js.map +1 -1
- package/dist/lib/project/project-view.js +16 -3
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/lib/server/hosting-location.js +22 -5
- package/dist/lib/server/hosting-location.js.map +1 -1
- package/dist/lib/server/pending-action.js +12 -2
- package/dist/lib/server/pending-action.js.map +1 -1
- package/dist/lib/server/task.js +9 -2
- package/dist/lib/server/task.js.map +1 -1
- package/dist/lib/style/style.js +17 -4
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/tileset/tileset.js +61 -10
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/lib/user/session.js +13 -3
- package/dist/lib/user/session.js.map +1 -1
- package/dist/lib/user/user-group.js +25 -6
- package/dist/lib/user/user-group.js.map +1 -1
- package/dist/lib/user/user.js +58 -12
- package/dist/lib/user/user.js.map +1 -1
- package/dist/types/account/account-invite.d.ts +5 -4
- package/dist/types/account/account.d.ts +5 -5
- package/dist/types/ann-document/ann-document.d.ts +3 -3
- package/dist/types/api/api-getters.d.ts +6 -5
- package/dist/types/api/bruce-api.d.ts +1 -1
- package/dist/types/bruce-models.d.ts +1 -0
- package/dist/types/client-file/client-file.d.ts +10 -10
- package/dist/types/custom-form/custom-form.d.ts +4 -4
- package/dist/types/data-lab/data-lab.d.ts +1 -1
- package/dist/types/entity/entity-attachment-type.d.ts +3 -3
- package/dist/types/entity/entity-attachment.d.ts +6 -6
- package/dist/types/entity/entity-comment.d.ts +5 -4
- package/dist/types/entity/entity-coords.d.ts +5 -5
- package/dist/types/entity/entity-link.d.ts +4 -4
- package/dist/types/entity/entity-lod-category.d.ts +4 -4
- package/dist/types/entity/entity-lod.d.ts +7 -7
- package/dist/types/entity/entity-relation-type.d.ts +4 -4
- package/dist/types/entity/entity-relation.d.ts +5 -5
- package/dist/types/entity/entity-source.d.ts +6 -5
- package/dist/types/entity/entity-tag.d.ts +5 -5
- package/dist/types/entity/entity-type.d.ts +4 -4
- package/dist/types/entity/entity.d.ts +6 -6
- package/dist/types/environment.d.ts +16 -0
- package/dist/types/import/import-cad.d.ts +2 -2
- package/dist/types/import/import-csv.d.ts +1 -1
- package/dist/types/import/import-json.d.ts +1 -1
- package/dist/types/import/import-kml.d.ts +1 -1
- package/dist/types/import/imported-file.d.ts +3 -3
- package/dist/types/internal/uploader.d.ts +1 -1
- package/dist/types/plugin/plugin.d.ts +3 -3
- package/dist/types/program-key/program-key.d.ts +4 -4
- package/dist/types/project/project-view-bookmark.d.ts +7 -6
- package/dist/types/project/project-view-legacy-tile.d.ts +2 -2
- package/dist/types/project/project-view.d.ts +4 -4
- package/dist/types/server/hosting-location.d.ts +5 -5
- package/dist/types/server/pending-action.d.ts +5 -4
- package/dist/types/server/task.d.ts +4 -3
- package/dist/types/style/style.d.ts +6 -5
- package/dist/types/tileset/tileset.d.ts +18 -17
- package/dist/types/user/session.d.ts +4 -3
- package/dist/types/user/user-group.d.ts +10 -7
- package/dist/types/user/user.d.ts +16 -15
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -113,214 +113,6 @@ var Api;
|
|
|
113
113
|
Api.PrepReqParams = PrepReqParams;
|
|
114
114
|
})(Api || (Api = {}));
|
|
115
115
|
|
|
116
|
-
/**
|
|
117
|
-
* Describes communication with the "Annotated Document" concept in Bruce.
|
|
118
|
-
* Annotated documents are files with hotspots that can link to Entity records.
|
|
119
|
-
*/
|
|
120
|
-
var AnnDocument;
|
|
121
|
-
(function (AnnDocument) {
|
|
122
|
-
function GetCacheKey(id) {
|
|
123
|
-
return `${Api.ECacheKey.AnnDocument}${Api.ECacheKey.Id}${id}`;
|
|
124
|
-
}
|
|
125
|
-
AnnDocument.GetCacheKey = GetCacheKey;
|
|
126
|
-
function GetListCacheKey(type) {
|
|
127
|
-
return Api.ECacheKey.AnnDocument + type;
|
|
128
|
-
}
|
|
129
|
-
AnnDocument.GetListCacheKey = GetListCacheKey;
|
|
130
|
-
let EType;
|
|
131
|
-
(function (EType) {
|
|
132
|
-
EType["SVG"] = "SVG";
|
|
133
|
-
})(EType = AnnDocument.EType || (AnnDocument.EType = {}));
|
|
134
|
-
function Get(params) {
|
|
135
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
-
const { api, docId, req: reqParams } = params;
|
|
137
|
-
if (!docId) {
|
|
138
|
-
throw ("Doc ID is required.");
|
|
139
|
-
}
|
|
140
|
-
const key = GetCacheKey(docId);
|
|
141
|
-
const cache = yield api.GetCacheItem(key, reqParams);
|
|
142
|
-
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
143
|
-
return cache.data;
|
|
144
|
-
}
|
|
145
|
-
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
try {
|
|
147
|
-
const data = yield api.GET(`documentView/${docId}`, Api.PrepReqParams(reqParams));
|
|
148
|
-
res({
|
|
149
|
-
document: data
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
catch (e) {
|
|
153
|
-
rej(e);
|
|
154
|
-
}
|
|
155
|
-
}));
|
|
156
|
-
yield api.SetCacheItem({
|
|
157
|
-
key,
|
|
158
|
-
value: prom,
|
|
159
|
-
req: reqParams
|
|
160
|
-
});
|
|
161
|
-
return prom;
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
AnnDocument.Get = Get;
|
|
165
|
-
function GetList(params) {
|
|
166
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
-
let { api, docType: type, req: reqParams } = params;
|
|
168
|
-
if (!type) {
|
|
169
|
-
type = "";
|
|
170
|
-
}
|
|
171
|
-
const cache = yield api.GetCacheItem(GetListCacheKey(type), reqParams);
|
|
172
|
-
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
173
|
-
return cache.data;
|
|
174
|
-
}
|
|
175
|
-
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
176
|
-
try {
|
|
177
|
-
const url = "documentViews" + (type ? "?type=" + type : "");
|
|
178
|
-
const data = yield api.GET(url, Api.PrepReqParams(reqParams));
|
|
179
|
-
res({
|
|
180
|
-
documents: data.Items
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
catch (e) {
|
|
184
|
-
rej(e);
|
|
185
|
-
}
|
|
186
|
-
}));
|
|
187
|
-
yield api.SetCacheItem({
|
|
188
|
-
key: GetListCacheKey(type),
|
|
189
|
-
value: req,
|
|
190
|
-
req: reqParams
|
|
191
|
-
});
|
|
192
|
-
return req;
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
AnnDocument.GetList = GetList;
|
|
196
|
-
})(AnnDocument || (AnnDocument = {}));
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Describes the "Custom Form" concept within Bruce.
|
|
200
|
-
* Custom forms are dynamic dialogs that get populated with Entity data.
|
|
201
|
-
*/
|
|
202
|
-
var CustomForm;
|
|
203
|
-
(function (CustomForm) {
|
|
204
|
-
function GetCacheKey(id) {
|
|
205
|
-
return Api.ECacheKey.CustomForm + Api.ECacheKey.Id + id;
|
|
206
|
-
}
|
|
207
|
-
CustomForm.GetCacheKey = GetCacheKey;
|
|
208
|
-
function GetListCacheKey(typeId) {
|
|
209
|
-
if (typeId) {
|
|
210
|
-
return Api.ECacheKey.CustomForm + Api.ECacheKey.EntityType + Api.ECacheKey.Id + typeId;
|
|
211
|
-
}
|
|
212
|
-
return Api.ECacheKey.CustomForm;
|
|
213
|
-
}
|
|
214
|
-
CustomForm.GetListCacheKey = GetListCacheKey;
|
|
215
|
-
let EType;
|
|
216
|
-
(function (EType) {
|
|
217
|
-
EType["Form"] = "GENERIC";
|
|
218
|
-
EType["Markup"] = "MARKUP";
|
|
219
|
-
})(EType = CustomForm.EType || (CustomForm.EType = {}));
|
|
220
|
-
function Get(params) {
|
|
221
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
-
const { api, formId: id, req: reqParams } = params;
|
|
223
|
-
if (!id) {
|
|
224
|
-
throw ("Id is required.");
|
|
225
|
-
}
|
|
226
|
-
const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
|
|
227
|
-
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
228
|
-
return cache.data;
|
|
229
|
-
}
|
|
230
|
-
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
231
|
-
try {
|
|
232
|
-
const data = yield api.GET(`customForm/${id}`, Api.PrepReqParams(reqParams));
|
|
233
|
-
res({
|
|
234
|
-
form: data
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
catch (err) {
|
|
238
|
-
rej(err);
|
|
239
|
-
}
|
|
240
|
-
}));
|
|
241
|
-
yield api.SetCacheItem({
|
|
242
|
-
key: GetCacheKey(id),
|
|
243
|
-
value: prom,
|
|
244
|
-
req: reqParams
|
|
245
|
-
});
|
|
246
|
-
return prom;
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
CustomForm.Get = Get;
|
|
250
|
-
function Delete(params) {
|
|
251
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
-
const { api, formId: id, req: reqParams } = params;
|
|
253
|
-
if (!id) {
|
|
254
|
-
throw ("Id is required.");
|
|
255
|
-
}
|
|
256
|
-
yield api.DELETE(`customForm/${id}`, Api.PrepReqParams(reqParams));
|
|
257
|
-
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
CustomForm.Delete = Delete;
|
|
261
|
-
function GetList(params) {
|
|
262
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
-
const { api, entityTypeId: typeId, req: reqParams } = params;
|
|
264
|
-
const url = typeId ? `entityType/${typeId}/customForms` : "customForms";
|
|
265
|
-
const cache = yield api.GetCacheItem(GetListCacheKey(typeId), reqParams);
|
|
266
|
-
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
267
|
-
return cache.data;
|
|
268
|
-
}
|
|
269
|
-
const req = api.GET(url, Api.PrepReqParams(reqParams));
|
|
270
|
-
const prom = req.then((data) => {
|
|
271
|
-
return {
|
|
272
|
-
forms: data.Items
|
|
273
|
-
};
|
|
274
|
-
});
|
|
275
|
-
yield api.SetCacheItem({
|
|
276
|
-
key: GetListCacheKey(typeId),
|
|
277
|
-
value: prom,
|
|
278
|
-
req: reqParams
|
|
279
|
-
});
|
|
280
|
-
return prom;
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
CustomForm.GetList = GetList;
|
|
284
|
-
function Update(params) {
|
|
285
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
const { api, form: data, reqParams } = params;
|
|
287
|
-
if (!data.ID) {
|
|
288
|
-
data.ID = 0;
|
|
289
|
-
}
|
|
290
|
-
const res = yield api.POST(`customForm/${data.ID}`, data, Api.PrepReqParams(reqParams));
|
|
291
|
-
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
|
|
292
|
-
return {
|
|
293
|
-
form: res
|
|
294
|
-
};
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
CustomForm.Update = Update;
|
|
298
|
-
})(CustomForm || (CustomForm = {}));
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Describes content of a GENERIC type custom form.
|
|
302
|
-
* The alternative type is MARKUP (Markup.IMarkup).
|
|
303
|
-
*/
|
|
304
|
-
var CustomFormContent;
|
|
305
|
-
(function (CustomFormContent) {
|
|
306
|
-
let ECellType;
|
|
307
|
-
(function (ECellType) {
|
|
308
|
-
ECellType[ECellType["StaticText"] = 0] = "StaticText";
|
|
309
|
-
ECellType[ECellType["DataValue"] = 1] = "DataValue";
|
|
310
|
-
ECellType[ECellType["StaticPicture"] = 2] = "StaticPicture";
|
|
311
|
-
ECellType[ECellType["SubSection"] = 3] = "SubSection";
|
|
312
|
-
ECellType[ECellType["ButtonMore"] = 4] = "ButtonMore";
|
|
313
|
-
ECellType[ECellType["EntityPhoto"] = 5] = "EntityPhoto";
|
|
314
|
-
ECellType[ECellType["EmbeddedMedia"] = 6] = "EmbeddedMedia";
|
|
315
|
-
ECellType[ECellType["Chart"] = 7] = "Chart";
|
|
316
|
-
})(ECellType = CustomFormContent.ECellType || (CustomFormContent.ECellType = {}));
|
|
317
|
-
let EFlowDirection;
|
|
318
|
-
(function (EFlowDirection) {
|
|
319
|
-
EFlowDirection["Vertically"] = "v";
|
|
320
|
-
EFlowDirection["Horizontally"] = "h";
|
|
321
|
-
})(EFlowDirection = CustomFormContent.EFlowDirection || (CustomFormContent.EFlowDirection = {}));
|
|
322
|
-
})(CustomFormContent || (CustomFormContent = {}));
|
|
323
|
-
|
|
324
116
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
325
117
|
|
|
326
118
|
function commonjsRequire () {
|
|
@@ -3818,7 +3610,10 @@ var Account;
|
|
|
3818
3610
|
})(EStarterContent = Account.EStarterContent || (Account.EStarterContent = {}));
|
|
3819
3611
|
function Get(params) {
|
|
3820
3612
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3821
|
-
|
|
3613
|
+
let { api, accountId: id, req: reqParams } = params;
|
|
3614
|
+
if (!api) {
|
|
3615
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
3616
|
+
}
|
|
3822
3617
|
const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
|
|
3823
3618
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
3824
3619
|
return cache.data;
|
|
@@ -3838,7 +3633,10 @@ var Account;
|
|
|
3838
3633
|
Account.Get = Get;
|
|
3839
3634
|
function GetRelatedList(params) {
|
|
3840
3635
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3841
|
-
|
|
3636
|
+
let { api, req: reqParams } = params;
|
|
3637
|
+
if (!api) {
|
|
3638
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
3639
|
+
}
|
|
3842
3640
|
const cache = yield api.GetCacheItem(GetListCacheKey(api.GetSessionId()), reqParams);
|
|
3843
3641
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
3844
3642
|
return cache.data;
|
|
@@ -3867,7 +3665,10 @@ var Account;
|
|
|
3867
3665
|
Account.GetRelatedList = GetRelatedList;
|
|
3868
3666
|
function GetAppSettings(params) {
|
|
3869
3667
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3870
|
-
|
|
3668
|
+
let { api, accountId: id, appId, req: reqParams } = params;
|
|
3669
|
+
if (!api) {
|
|
3670
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
3671
|
+
}
|
|
3871
3672
|
const cache = yield api.GetCacheItem(GetCacheKey(id, appId), reqParams);
|
|
3872
3673
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
3873
3674
|
return cache.data;
|
|
@@ -3902,7 +3703,10 @@ var Account;
|
|
|
3902
3703
|
*/
|
|
3903
3704
|
function UpdateAppSettings(params) {
|
|
3904
3705
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3905
|
-
|
|
3706
|
+
let { api, accountId: id, appId, settings: data, req: reqParams } = params;
|
|
3707
|
+
if (!api) {
|
|
3708
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
3709
|
+
}
|
|
3906
3710
|
const res = yield api.POST(`account/${id}/applicationSettings/${appId}`, data, reqParams);
|
|
3907
3711
|
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Account + Api.ECacheKey.Id + id);
|
|
3908
3712
|
return {
|
|
@@ -3919,6 +3723,9 @@ var Account;
|
|
|
3919
3723
|
function Create(params) {
|
|
3920
3724
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3921
3725
|
let { api, accountId: id, name, hostingLocationKey, starterContent, req: reqParams } = params;
|
|
3726
|
+
if (!api) {
|
|
3727
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
3728
|
+
}
|
|
3922
3729
|
if (!id || !name || !hostingLocationKey) {
|
|
3923
3730
|
throw new Error("Id, Name and hostingLocationKey are required.");
|
|
3924
3731
|
}
|
|
@@ -3954,7 +3761,11 @@ var HostingLocation;
|
|
|
3954
3761
|
*/
|
|
3955
3762
|
function GetList(params) {
|
|
3956
3763
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3957
|
-
|
|
3764
|
+
let { api, req } = params;
|
|
3765
|
+
if (!api) {
|
|
3766
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
3767
|
+
}
|
|
3768
|
+
const res = yield api.GET("hostinglocations", Api.PrepReqParams(req));
|
|
3958
3769
|
return {
|
|
3959
3770
|
locations: res.Items
|
|
3960
3771
|
};
|
|
@@ -3963,7 +3774,10 @@ var HostingLocation;
|
|
|
3963
3774
|
HostingLocation.GetList = GetList;
|
|
3964
3775
|
function GetById(params) {
|
|
3965
3776
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3966
|
-
|
|
3777
|
+
let { id, api, req } = params;
|
|
3778
|
+
if (!api) {
|
|
3779
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
3780
|
+
}
|
|
3967
3781
|
if (!id) {
|
|
3968
3782
|
throw ("Invalid id");
|
|
3969
3783
|
}
|
|
@@ -3976,7 +3790,10 @@ var HostingLocation;
|
|
|
3976
3790
|
HostingLocation.GetById = GetById;
|
|
3977
3791
|
function GetByKey(params) {
|
|
3978
3792
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3979
|
-
|
|
3793
|
+
let { key, api, req } = params;
|
|
3794
|
+
if (!api) {
|
|
3795
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
3796
|
+
}
|
|
3980
3797
|
if (!key) {
|
|
3981
3798
|
throw ("Invalid key");
|
|
3982
3799
|
}
|
|
@@ -4033,7 +3850,10 @@ var HostingLocation;
|
|
|
4033
3850
|
HostingLocation.GuessKey = GuessKey;
|
|
4034
3851
|
function GetKeyByAccountId(params) {
|
|
4035
3852
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4036
|
-
|
|
3853
|
+
let { accountId, apiSettings, api, req } = params;
|
|
3854
|
+
if (!api) {
|
|
3855
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
3856
|
+
}
|
|
4037
3857
|
if (!accountId && !apiSettings) {
|
|
4038
3858
|
throw ("Invalid accountId or apiSettings");
|
|
4039
3859
|
}
|
|
@@ -4063,7 +3883,10 @@ var HostingLocation;
|
|
|
4063
3883
|
HostingLocation.GetKeyByAccountId = GetKeyByAccountId;
|
|
4064
3884
|
function GetByAccountId(params) {
|
|
4065
3885
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4066
|
-
|
|
3886
|
+
let { accountId, apiSettings, api, req } = params;
|
|
3887
|
+
if (!api) {
|
|
3888
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
3889
|
+
}
|
|
4067
3890
|
const data = yield GetKeyByAccountId({
|
|
4068
3891
|
accountId,
|
|
4069
3892
|
apiSettings,
|
|
@@ -4369,48 +4192,40 @@ var CamApi;
|
|
|
4369
4192
|
CamApi.Api = Api$$1;
|
|
4370
4193
|
})(CamApi || (CamApi = {}));
|
|
4371
4194
|
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
*/
|
|
4375
|
-
var IdmApi;
|
|
4376
|
-
(function (IdmApi) {
|
|
4195
|
+
var GlobalApi;
|
|
4196
|
+
(function (GlobalApi) {
|
|
4377
4197
|
/**
|
|
4378
|
-
* This is the request handler for
|
|
4198
|
+
* This is the request handler for Global Api,
|
|
4379
4199
|
* it should be passed to any method that wants to communicate with this particular api.
|
|
4380
4200
|
*/
|
|
4381
4201
|
class Api$$1 extends AbstractApi {
|
|
4382
4202
|
constructor(params) {
|
|
4383
4203
|
super({
|
|
4384
|
-
ssidHeader: "
|
|
4385
|
-
cacheId: `
|
|
4204
|
+
ssidHeader: "x-sessionid",
|
|
4205
|
+
cacheId: `GLOBAL_API_${params === null || params === void 0 ? void 0 : params.env}_`
|
|
4386
4206
|
});
|
|
4387
4207
|
this.env = (params === null || params === void 0 ? void 0 : params.env) ? params.env : Api.EEnv.PROD;
|
|
4388
4208
|
this.setBaseUrl();
|
|
4389
4209
|
}
|
|
4390
4210
|
setBaseUrl() {
|
|
4391
|
-
let
|
|
4392
|
-
let url = "https://<CODEWORD>.nextspace";
|
|
4211
|
+
let url;
|
|
4393
4212
|
const env = this.env.toUpperCase();
|
|
4394
4213
|
switch (env) {
|
|
4395
4214
|
case Api.EEnv.DEV:
|
|
4396
|
-
|
|
4397
|
-
url += "-dev.net/";
|
|
4215
|
+
url = "https://bruceglobal.nextspace-dev.net/";
|
|
4398
4216
|
break;
|
|
4399
4217
|
case Api.EEnv.STG:
|
|
4400
|
-
|
|
4401
|
-
url += "-stg.net/";
|
|
4218
|
+
url = "https://bruceglobal.nextspace-stg.net/";
|
|
4402
4219
|
break;
|
|
4403
4220
|
case Api.EEnv.UAT:
|
|
4404
|
-
|
|
4405
|
-
url += "-uat.net/";
|
|
4221
|
+
url = "https://bruceglobal.api.nextspace-uat.net/";
|
|
4406
4222
|
break;
|
|
4407
4223
|
case Api.EEnv.PROD:
|
|
4408
|
-
url
|
|
4224
|
+
url = "https://bruceglobal.api.nextspace.host/";
|
|
4409
4225
|
break;
|
|
4410
4226
|
default:
|
|
4411
4227
|
throw ("Specified Environment is not valid. SuppliedEnv=" + env);
|
|
4412
4228
|
}
|
|
4413
|
-
url = url.replace("<CODEWORD>", codeWord);
|
|
4414
4229
|
this.baseUrl = url;
|
|
4415
4230
|
}
|
|
4416
4231
|
GetBaseUrl() {
|
|
@@ -4443,43 +4258,51 @@ var IdmApi;
|
|
|
4443
4258
|
});
|
|
4444
4259
|
}
|
|
4445
4260
|
}
|
|
4446
|
-
|
|
4447
|
-
})(
|
|
4261
|
+
GlobalApi.Api = Api$$1;
|
|
4262
|
+
})(GlobalApi || (GlobalApi = {}));
|
|
4448
4263
|
|
|
4449
|
-
|
|
4450
|
-
|
|
4264
|
+
/**
|
|
4265
|
+
* * @deprecated Please use GuardianApi instead.
|
|
4266
|
+
*/
|
|
4267
|
+
var IdmApi;
|
|
4268
|
+
(function (IdmApi) {
|
|
4451
4269
|
/**
|
|
4452
|
-
* This is the request handler for
|
|
4270
|
+
* This is the request handler for Idm Api,
|
|
4453
4271
|
* it should be passed to any method that wants to communicate with this particular api.
|
|
4454
4272
|
*/
|
|
4455
4273
|
class Api$$1 extends AbstractApi {
|
|
4456
4274
|
constructor(params) {
|
|
4457
4275
|
super({
|
|
4458
|
-
ssidHeader: "
|
|
4459
|
-
cacheId: `
|
|
4276
|
+
ssidHeader: "SSID",
|
|
4277
|
+
cacheId: `IDM_API_${params === null || params === void 0 ? void 0 : params.env}_`
|
|
4460
4278
|
});
|
|
4461
4279
|
this.env = (params === null || params === void 0 ? void 0 : params.env) ? params.env : Api.EEnv.PROD;
|
|
4462
4280
|
this.setBaseUrl();
|
|
4463
4281
|
}
|
|
4464
4282
|
setBaseUrl() {
|
|
4465
|
-
let
|
|
4283
|
+
let codeWord = "idm";
|
|
4284
|
+
let url = "https://<CODEWORD>.nextspace";
|
|
4466
4285
|
const env = this.env.toUpperCase();
|
|
4467
4286
|
switch (env) {
|
|
4468
4287
|
case Api.EEnv.DEV:
|
|
4469
|
-
|
|
4288
|
+
codeWord = "guardian";
|
|
4289
|
+
url += "-dev.net/";
|
|
4470
4290
|
break;
|
|
4471
4291
|
case Api.EEnv.STG:
|
|
4472
|
-
|
|
4292
|
+
codeWord = "guardian";
|
|
4293
|
+
url += "-stg.net/";
|
|
4473
4294
|
break;
|
|
4474
4295
|
case Api.EEnv.UAT:
|
|
4475
|
-
|
|
4296
|
+
codeWord = "guardian";
|
|
4297
|
+
url += "-uat.net/";
|
|
4476
4298
|
break;
|
|
4477
4299
|
case Api.EEnv.PROD:
|
|
4478
|
-
url
|
|
4300
|
+
url += ".host/";
|
|
4479
4301
|
break;
|
|
4480
4302
|
default:
|
|
4481
4303
|
throw ("Specified Environment is not valid. SuppliedEnv=" + env);
|
|
4482
4304
|
}
|
|
4305
|
+
url = url.replace("<CODEWORD>", codeWord);
|
|
4483
4306
|
this.baseUrl = url;
|
|
4484
4307
|
}
|
|
4485
4308
|
GetBaseUrl() {
|
|
@@ -4512,8 +4335,8 @@ var GlobalApi;
|
|
|
4512
4335
|
});
|
|
4513
4336
|
}
|
|
4514
4337
|
}
|
|
4515
|
-
|
|
4516
|
-
})(
|
|
4338
|
+
IdmApi.Api = Api$$1;
|
|
4339
|
+
})(IdmApi || (IdmApi = {}));
|
|
4517
4340
|
|
|
4518
4341
|
class ApiGetters {
|
|
4519
4342
|
constructor(params) {
|
|
@@ -4526,6 +4349,24 @@ class ApiGetters {
|
|
|
4526
4349
|
this.env = (params === null || params === void 0 ? void 0 : params.env) ? params.env : Api.EEnv.PROD;
|
|
4527
4350
|
this.sessionId = params === null || params === void 0 ? void 0 : params.sessionId;
|
|
4528
4351
|
}
|
|
4352
|
+
ClearCache() {
|
|
4353
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
4354
|
+
for (const key in this.bruce) {
|
|
4355
|
+
(_b = (_a = this.bruce[key]) === null || _a === void 0 ? void 0 : _a.Cache) === null || _b === void 0 ? void 0 : _b.Clear();
|
|
4356
|
+
}
|
|
4357
|
+
for (const key in this.idm) {
|
|
4358
|
+
(_d = (_c = this.idm[key]) === null || _c === void 0 ? void 0 : _c.Cache) === null || _d === void 0 ? void 0 : _d.Clear();
|
|
4359
|
+
}
|
|
4360
|
+
for (const key in this.cam) {
|
|
4361
|
+
(_f = (_e = this.cam[key]) === null || _e === void 0 ? void 0 : _e.Cache) === null || _f === void 0 ? void 0 : _f.Clear();
|
|
4362
|
+
}
|
|
4363
|
+
for (const key in this.guardian) {
|
|
4364
|
+
(_h = (_g = this.guardian[key]) === null || _g === void 0 ? void 0 : _g.Cache) === null || _h === void 0 ? void 0 : _h.Clear();
|
|
4365
|
+
}
|
|
4366
|
+
for (const key in this.global) {
|
|
4367
|
+
(_k = (_j = this.global[key]) === null || _j === void 0 ? void 0 : _j.Cache) === null || _k === void 0 ? void 0 : _k.Clear();
|
|
4368
|
+
}
|
|
4369
|
+
}
|
|
4529
4370
|
SetAccountId(accountId) {
|
|
4530
4371
|
this.accountId = accountId;
|
|
4531
4372
|
}
|
|
@@ -4552,11 +4393,15 @@ class ApiGetters {
|
|
|
4552
4393
|
for (const key in this.global) {
|
|
4553
4394
|
this.global[key].SetSessionId(sessionId);
|
|
4554
4395
|
}
|
|
4396
|
+
this.ClearCache();
|
|
4555
4397
|
}
|
|
4556
4398
|
GetSessionId() {
|
|
4557
4399
|
return this.sessionId;
|
|
4558
4400
|
}
|
|
4559
4401
|
GetBruceApi(params) {
|
|
4402
|
+
if (!params) {
|
|
4403
|
+
params = {};
|
|
4404
|
+
}
|
|
4560
4405
|
let { accountId, env } = params;
|
|
4561
4406
|
accountId = accountId ? accountId : this.accountId;
|
|
4562
4407
|
env = env ? env : this.env;
|
|
@@ -4585,6 +4430,9 @@ class ApiGetters {
|
|
|
4585
4430
|
* @returns
|
|
4586
4431
|
*/
|
|
4587
4432
|
GetIdmApi(params) {
|
|
4433
|
+
if (!params) {
|
|
4434
|
+
params = {};
|
|
4435
|
+
}
|
|
4588
4436
|
let { env } = params;
|
|
4589
4437
|
env = env ? env : this.env;
|
|
4590
4438
|
const key = `${env}`;
|
|
@@ -4613,6 +4461,9 @@ class ApiGetters {
|
|
|
4613
4461
|
* @returns
|
|
4614
4462
|
*/
|
|
4615
4463
|
GetCamApi(params) {
|
|
4464
|
+
if (!params) {
|
|
4465
|
+
params = {};
|
|
4466
|
+
}
|
|
4616
4467
|
let { env } = params;
|
|
4617
4468
|
env = env ? env : this.env;
|
|
4618
4469
|
const key = `${env}`;
|
|
@@ -4637,6 +4488,9 @@ class ApiGetters {
|
|
|
4637
4488
|
};
|
|
4638
4489
|
}
|
|
4639
4490
|
GetGlobalApi(params) {
|
|
4491
|
+
if (!params) {
|
|
4492
|
+
params = {};
|
|
4493
|
+
}
|
|
4640
4494
|
let { env } = params;
|
|
4641
4495
|
env = env ? env : this.env;
|
|
4642
4496
|
const key = `${env}`;
|
|
@@ -4644,39 +4498,318 @@ class ApiGetters {
|
|
|
4644
4498
|
this.global[key] = new GlobalApi.Api({
|
|
4645
4499
|
env
|
|
4646
4500
|
});
|
|
4647
|
-
this.global[key].SetSessionId(this.sessionId);
|
|
4648
|
-
}
|
|
4649
|
-
return this.global[key];
|
|
4501
|
+
this.global[key].SetSessionId(this.sessionId);
|
|
4502
|
+
}
|
|
4503
|
+
return this.global[key];
|
|
4504
|
+
}
|
|
4505
|
+
GetGlobalGetter() {
|
|
4506
|
+
return {
|
|
4507
|
+
env: this.env,
|
|
4508
|
+
getApi: (env) => {
|
|
4509
|
+
return this.GetGlobalApi({ env });
|
|
4510
|
+
}
|
|
4511
|
+
};
|
|
4512
|
+
}
|
|
4513
|
+
GetGuardianApi(params) {
|
|
4514
|
+
if (!params) {
|
|
4515
|
+
params = {};
|
|
4516
|
+
}
|
|
4517
|
+
let { env } = params;
|
|
4518
|
+
env = env ? env : this.env;
|
|
4519
|
+
const key = `${env}`;
|
|
4520
|
+
if (!this.guardian[key]) {
|
|
4521
|
+
this.guardian[key] = new GuardianApi.Api({
|
|
4522
|
+
env
|
|
4523
|
+
});
|
|
4524
|
+
this.guardian[key].SetSessionId(this.sessionId);
|
|
4525
|
+
}
|
|
4526
|
+
return this.guardian[key];
|
|
4527
|
+
}
|
|
4528
|
+
GetGuardianGetter() {
|
|
4529
|
+
return {
|
|
4530
|
+
env: this.env,
|
|
4531
|
+
getApi: (env) => {
|
|
4532
|
+
return this.GetGuardianApi({ env });
|
|
4533
|
+
}
|
|
4534
|
+
};
|
|
4535
|
+
}
|
|
4536
|
+
}
|
|
4537
|
+
|
|
4538
|
+
// Global instance for smaller use-cases where you don't want to manage the getters yourself.
|
|
4539
|
+
let _getters;
|
|
4540
|
+
var ENVIRONMENT;
|
|
4541
|
+
(function (ENVIRONMENT) {
|
|
4542
|
+
// If true, then defaults are not touched and it's assumed this is being managed.
|
|
4543
|
+
ENVIRONMENT.IS_SELF_MANAGED = false;
|
|
4544
|
+
// Unused if IS_SELF_MANAGED is false.
|
|
4545
|
+
ENVIRONMENT.PARAMS = {
|
|
4546
|
+
accountId: "",
|
|
4547
|
+
env: Api.EEnv.PROD,
|
|
4548
|
+
sessionId: ""
|
|
4549
|
+
};
|
|
4550
|
+
function GetGetters() {
|
|
4551
|
+
if (ENVIRONMENT.IS_SELF_MANAGED) {
|
|
4552
|
+
throw ("Self managed mode ON. You are getting this error because you didn't pass an Api instance to a function.");
|
|
4553
|
+
}
|
|
4554
|
+
if (!ENVIRONMENT.PARAMS.accountId) {
|
|
4555
|
+
console.warn("No accountId set. This is required for the getters to work properly.");
|
|
4556
|
+
}
|
|
4557
|
+
if (!_getters) {
|
|
4558
|
+
_getters = new ApiGetters({
|
|
4559
|
+
accountId: ENVIRONMENT.PARAMS.accountId,
|
|
4560
|
+
env: ENVIRONMENT.PARAMS.env,
|
|
4561
|
+
sessionId: ENVIRONMENT.PARAMS.sessionId
|
|
4562
|
+
});
|
|
4563
|
+
}
|
|
4564
|
+
return _getters;
|
|
4565
|
+
}
|
|
4566
|
+
ENVIRONMENT.GetGetters = GetGetters;
|
|
4567
|
+
function Reset(params) {
|
|
4568
|
+
if (ENVIRONMENT.IS_SELF_MANAGED) {
|
|
4569
|
+
throw ("Self managed mode ON. You are getting this error because you didn't pass an Api instance to a function.");
|
|
4570
|
+
}
|
|
4571
|
+
if (_getters) {
|
|
4572
|
+
_getters.ClearCache();
|
|
4573
|
+
if (params.accountId) {
|
|
4574
|
+
_getters.SetAccountId(params.accountId);
|
|
4575
|
+
}
|
|
4576
|
+
if (params.sessionId) {
|
|
4577
|
+
_getters.SetSessionId(params.sessionId);
|
|
4578
|
+
}
|
|
4579
|
+
if (params.env) {
|
|
4580
|
+
_getters.SetEnv(params.env);
|
|
4581
|
+
}
|
|
4582
|
+
}
|
|
4583
|
+
ENVIRONMENT.PARAMS = Object.assign(Object.assign({}, ENVIRONMENT.PARAMS), params);
|
|
4584
|
+
}
|
|
4585
|
+
ENVIRONMENT.Reset = Reset;
|
|
4586
|
+
})(ENVIRONMENT || (ENVIRONMENT = {}));
|
|
4587
|
+
|
|
4588
|
+
/**
|
|
4589
|
+
* Describes communication with the "Annotated Document" concept in Bruce.
|
|
4590
|
+
* Annotated documents are files with hotspots that can link to Entity records.
|
|
4591
|
+
*/
|
|
4592
|
+
var AnnDocument;
|
|
4593
|
+
(function (AnnDocument) {
|
|
4594
|
+
function GetCacheKey(id) {
|
|
4595
|
+
return `${Api.ECacheKey.AnnDocument}${Api.ECacheKey.Id}${id}`;
|
|
4596
|
+
}
|
|
4597
|
+
AnnDocument.GetCacheKey = GetCacheKey;
|
|
4598
|
+
function GetListCacheKey(type) {
|
|
4599
|
+
return Api.ECacheKey.AnnDocument + type;
|
|
4600
|
+
}
|
|
4601
|
+
AnnDocument.GetListCacheKey = GetListCacheKey;
|
|
4602
|
+
let EType;
|
|
4603
|
+
(function (EType) {
|
|
4604
|
+
EType["SVG"] = "SVG";
|
|
4605
|
+
})(EType = AnnDocument.EType || (AnnDocument.EType = {}));
|
|
4606
|
+
function Get(params) {
|
|
4607
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4608
|
+
let { api, docId, req: reqParams } = params;
|
|
4609
|
+
if (!api) {
|
|
4610
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
4611
|
+
}
|
|
4612
|
+
if (!docId) {
|
|
4613
|
+
throw ("Doc ID is required.");
|
|
4614
|
+
}
|
|
4615
|
+
const key = GetCacheKey(docId);
|
|
4616
|
+
const cache = yield api.GetCacheItem(key, reqParams);
|
|
4617
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
4618
|
+
return cache.data;
|
|
4619
|
+
}
|
|
4620
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
4621
|
+
try {
|
|
4622
|
+
const data = yield api.GET(`documentView/${docId}`, Api.PrepReqParams(reqParams));
|
|
4623
|
+
res({
|
|
4624
|
+
document: data
|
|
4625
|
+
});
|
|
4626
|
+
}
|
|
4627
|
+
catch (e) {
|
|
4628
|
+
rej(e);
|
|
4629
|
+
}
|
|
4630
|
+
}));
|
|
4631
|
+
yield api.SetCacheItem({
|
|
4632
|
+
key,
|
|
4633
|
+
value: prom,
|
|
4634
|
+
req: reqParams
|
|
4635
|
+
});
|
|
4636
|
+
return prom;
|
|
4637
|
+
});
|
|
4638
|
+
}
|
|
4639
|
+
AnnDocument.Get = Get;
|
|
4640
|
+
function GetList(params) {
|
|
4641
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4642
|
+
let { api, docType: type, req: reqParams } = params;
|
|
4643
|
+
if (!api) {
|
|
4644
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
4645
|
+
}
|
|
4646
|
+
if (!type) {
|
|
4647
|
+
type = "";
|
|
4648
|
+
}
|
|
4649
|
+
const cache = yield api.GetCacheItem(GetListCacheKey(type), reqParams);
|
|
4650
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
4651
|
+
return cache.data;
|
|
4652
|
+
}
|
|
4653
|
+
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
4654
|
+
try {
|
|
4655
|
+
const url = "documentViews" + (type ? "?type=" + type : "");
|
|
4656
|
+
const data = yield api.GET(url, Api.PrepReqParams(reqParams));
|
|
4657
|
+
res({
|
|
4658
|
+
documents: data.Items
|
|
4659
|
+
});
|
|
4660
|
+
}
|
|
4661
|
+
catch (e) {
|
|
4662
|
+
rej(e);
|
|
4663
|
+
}
|
|
4664
|
+
}));
|
|
4665
|
+
yield api.SetCacheItem({
|
|
4666
|
+
key: GetListCacheKey(type),
|
|
4667
|
+
value: req,
|
|
4668
|
+
req: reqParams
|
|
4669
|
+
});
|
|
4670
|
+
return req;
|
|
4671
|
+
});
|
|
4672
|
+
}
|
|
4673
|
+
AnnDocument.GetList = GetList;
|
|
4674
|
+
})(AnnDocument || (AnnDocument = {}));
|
|
4675
|
+
|
|
4676
|
+
/**
|
|
4677
|
+
* Describes the "Custom Form" concept within Bruce.
|
|
4678
|
+
* Custom forms are dynamic dialogs that get populated with Entity data.
|
|
4679
|
+
*/
|
|
4680
|
+
var CustomForm;
|
|
4681
|
+
(function (CustomForm) {
|
|
4682
|
+
function GetCacheKey(id) {
|
|
4683
|
+
return Api.ECacheKey.CustomForm + Api.ECacheKey.Id + id;
|
|
4684
|
+
}
|
|
4685
|
+
CustomForm.GetCacheKey = GetCacheKey;
|
|
4686
|
+
function GetListCacheKey(typeId) {
|
|
4687
|
+
if (typeId) {
|
|
4688
|
+
return Api.ECacheKey.CustomForm + Api.ECacheKey.EntityType + Api.ECacheKey.Id + typeId;
|
|
4689
|
+
}
|
|
4690
|
+
return Api.ECacheKey.CustomForm;
|
|
4691
|
+
}
|
|
4692
|
+
CustomForm.GetListCacheKey = GetListCacheKey;
|
|
4693
|
+
let EType;
|
|
4694
|
+
(function (EType) {
|
|
4695
|
+
EType["Form"] = "GENERIC";
|
|
4696
|
+
EType["Markup"] = "MARKUP";
|
|
4697
|
+
})(EType = CustomForm.EType || (CustomForm.EType = {}));
|
|
4698
|
+
function Get(params) {
|
|
4699
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4700
|
+
let { api, formId: id, req: reqParams } = params;
|
|
4701
|
+
if (!api) {
|
|
4702
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
4703
|
+
}
|
|
4704
|
+
if (!id) {
|
|
4705
|
+
throw ("Id is required.");
|
|
4706
|
+
}
|
|
4707
|
+
const cache = yield api.GetCacheItem(GetCacheKey(id), reqParams);
|
|
4708
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
4709
|
+
return cache.data;
|
|
4710
|
+
}
|
|
4711
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
4712
|
+
try {
|
|
4713
|
+
const data = yield api.GET(`customForm/${id}`, Api.PrepReqParams(reqParams));
|
|
4714
|
+
res({
|
|
4715
|
+
form: data
|
|
4716
|
+
});
|
|
4717
|
+
}
|
|
4718
|
+
catch (err) {
|
|
4719
|
+
rej(err);
|
|
4720
|
+
}
|
|
4721
|
+
}));
|
|
4722
|
+
yield api.SetCacheItem({
|
|
4723
|
+
key: GetCacheKey(id),
|
|
4724
|
+
value: prom,
|
|
4725
|
+
req: reqParams
|
|
4726
|
+
});
|
|
4727
|
+
return prom;
|
|
4728
|
+
});
|
|
4650
4729
|
}
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4730
|
+
CustomForm.Get = Get;
|
|
4731
|
+
function Delete(params) {
|
|
4732
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4733
|
+
let { api, formId: id, req: reqParams } = params;
|
|
4734
|
+
if (!api) {
|
|
4735
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
4656
4736
|
}
|
|
4657
|
-
|
|
4737
|
+
if (!id) {
|
|
4738
|
+
throw ("Id is required.");
|
|
4739
|
+
}
|
|
4740
|
+
yield api.DELETE(`customForm/${id}`, Api.PrepReqParams(reqParams));
|
|
4741
|
+
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
|
|
4742
|
+
});
|
|
4658
4743
|
}
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4744
|
+
CustomForm.Delete = Delete;
|
|
4745
|
+
function GetList(params) {
|
|
4746
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4747
|
+
let { api, entityTypeId: typeId, req: reqParams } = params;
|
|
4748
|
+
if (!api) {
|
|
4749
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
4750
|
+
}
|
|
4751
|
+
const url = typeId ? `entityType/${typeId}/customForms` : "customForms";
|
|
4752
|
+
const cache = yield api.GetCacheItem(GetListCacheKey(typeId), reqParams);
|
|
4753
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
4754
|
+
return cache.data;
|
|
4755
|
+
}
|
|
4756
|
+
const req = api.GET(url, Api.PrepReqParams(reqParams));
|
|
4757
|
+
const prom = req.then((data) => {
|
|
4758
|
+
return {
|
|
4759
|
+
forms: data.Items
|
|
4760
|
+
};
|
|
4666
4761
|
});
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4762
|
+
yield api.SetCacheItem({
|
|
4763
|
+
key: GetListCacheKey(typeId),
|
|
4764
|
+
value: prom,
|
|
4765
|
+
req: reqParams
|
|
4766
|
+
});
|
|
4767
|
+
return prom;
|
|
4768
|
+
});
|
|
4670
4769
|
}
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4770
|
+
CustomForm.GetList = GetList;
|
|
4771
|
+
function Update(params) {
|
|
4772
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4773
|
+
let { api, form: data, reqParams } = params;
|
|
4774
|
+
if (!api) {
|
|
4775
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
4676
4776
|
}
|
|
4677
|
-
|
|
4777
|
+
if (!data.ID) {
|
|
4778
|
+
data.ID = 0;
|
|
4779
|
+
}
|
|
4780
|
+
const res = yield api.POST(`customForm/${data.ID}`, data, Api.PrepReqParams(reqParams));
|
|
4781
|
+
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.CustomForm);
|
|
4782
|
+
return {
|
|
4783
|
+
form: res
|
|
4784
|
+
};
|
|
4785
|
+
});
|
|
4678
4786
|
}
|
|
4679
|
-
|
|
4787
|
+
CustomForm.Update = Update;
|
|
4788
|
+
})(CustomForm || (CustomForm = {}));
|
|
4789
|
+
|
|
4790
|
+
/**
|
|
4791
|
+
* Describes content of a GENERIC type custom form.
|
|
4792
|
+
* The alternative type is MARKUP (Markup.IMarkup).
|
|
4793
|
+
*/
|
|
4794
|
+
var CustomFormContent;
|
|
4795
|
+
(function (CustomFormContent) {
|
|
4796
|
+
let ECellType;
|
|
4797
|
+
(function (ECellType) {
|
|
4798
|
+
ECellType[ECellType["StaticText"] = 0] = "StaticText";
|
|
4799
|
+
ECellType[ECellType["DataValue"] = 1] = "DataValue";
|
|
4800
|
+
ECellType[ECellType["StaticPicture"] = 2] = "StaticPicture";
|
|
4801
|
+
ECellType[ECellType["SubSection"] = 3] = "SubSection";
|
|
4802
|
+
ECellType[ECellType["ButtonMore"] = 4] = "ButtonMore";
|
|
4803
|
+
ECellType[ECellType["EntityPhoto"] = 5] = "EntityPhoto";
|
|
4804
|
+
ECellType[ECellType["EmbeddedMedia"] = 6] = "EmbeddedMedia";
|
|
4805
|
+
ECellType[ECellType["Chart"] = 7] = "Chart";
|
|
4806
|
+
})(ECellType = CustomFormContent.ECellType || (CustomFormContent.ECellType = {}));
|
|
4807
|
+
let EFlowDirection;
|
|
4808
|
+
(function (EFlowDirection) {
|
|
4809
|
+
EFlowDirection["Vertically"] = "v";
|
|
4810
|
+
EFlowDirection["Horizontally"] = "h";
|
|
4811
|
+
})(EFlowDirection = CustomFormContent.EFlowDirection || (CustomFormContent.EFlowDirection = {}));
|
|
4812
|
+
})(CustomFormContent || (CustomFormContent = {}));
|
|
4680
4813
|
|
|
4681
4814
|
var Color;
|
|
4682
4815
|
(function (Color) {
|
|
@@ -4852,7 +4985,10 @@ var Entity;
|
|
|
4852
4985
|
Entity.GetCacheKey = GetCacheKey;
|
|
4853
4986
|
function Get(params) {
|
|
4854
4987
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4855
|
-
|
|
4988
|
+
let { api, entityId, req: reqParams, expandLocation, entityTypeId } = params;
|
|
4989
|
+
if (!api) {
|
|
4990
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
4991
|
+
}
|
|
4856
4992
|
if (!entityId) {
|
|
4857
4993
|
throw ("Entity ID is required.");
|
|
4858
4994
|
}
|
|
@@ -4890,7 +5026,10 @@ var Entity;
|
|
|
4890
5026
|
Entity.Get = Get;
|
|
4891
5027
|
function GetListByIds(params) {
|
|
4892
5028
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4893
|
-
|
|
5029
|
+
let { api, entityIds, req: reqParams } = params;
|
|
5030
|
+
if (!api) {
|
|
5031
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
5032
|
+
}
|
|
4894
5033
|
if (!entityIds.length) {
|
|
4895
5034
|
throw ("Entity IDs are required.");
|
|
4896
5035
|
}
|
|
@@ -4949,7 +5088,10 @@ var Entity;
|
|
|
4949
5088
|
Entity.GetListByIds = GetListByIds;
|
|
4950
5089
|
function Delete(params) {
|
|
4951
5090
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4952
|
-
|
|
5091
|
+
let { api, entityId, req: reqParams } = params;
|
|
5092
|
+
if (!api) {
|
|
5093
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
5094
|
+
}
|
|
4953
5095
|
if (!entityId) {
|
|
4954
5096
|
throw ("Entity ID is required.");
|
|
4955
5097
|
}
|
|
@@ -4960,7 +5102,10 @@ var Entity;
|
|
|
4960
5102
|
Entity.Delete = Delete;
|
|
4961
5103
|
function DeleteList(params) {
|
|
4962
5104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4963
|
-
|
|
5105
|
+
let { api, entityIds, req: reqParams } = params;
|
|
5106
|
+
if (!api) {
|
|
5107
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
5108
|
+
}
|
|
4964
5109
|
if (!(entityIds === null || entityIds === void 0 ? void 0 : entityIds.length)) {
|
|
4965
5110
|
throw ("Entity IDs are required.");
|
|
4966
5111
|
}
|
|
@@ -4977,7 +5122,10 @@ var Entity;
|
|
|
4977
5122
|
function Update(params) {
|
|
4978
5123
|
var _a, _b;
|
|
4979
5124
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4980
|
-
|
|
5125
|
+
let { api, entity: data, override, req: reqParams } = params;
|
|
5126
|
+
if (!api) {
|
|
5127
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
5128
|
+
}
|
|
4981
5129
|
if (!((_a = data === null || data === void 0 ? void 0 : data.Bruce) === null || _a === void 0 ? void 0 : _a["EntityType.ID"])) {
|
|
4982
5130
|
throw ("Entity Type ID is required.");
|
|
4983
5131
|
}
|
|
@@ -5080,7 +5228,10 @@ var Entity;
|
|
|
5080
5228
|
Entity.CalculateName = CalculateName;
|
|
5081
5229
|
function GetList(params) {
|
|
5082
5230
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5083
|
-
|
|
5231
|
+
let { api, filter, req: reqParams, viaCdn, viaCdnCacheToken } = params;
|
|
5232
|
+
if (!api) {
|
|
5233
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
5234
|
+
}
|
|
5084
5235
|
let requestFilter = {};
|
|
5085
5236
|
if (filter.entityTypeConditions) {
|
|
5086
5237
|
requestFilter = Object.assign({}, filter.entityTypeConditions);
|
|
@@ -6094,7 +6245,10 @@ var EntityAttachmentType;
|
|
|
6094
6245
|
})(EType = EntityAttachmentType.EType || (EntityAttachmentType.EType = {}));
|
|
6095
6246
|
function Delete(params) {
|
|
6096
6247
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6097
|
-
|
|
6248
|
+
let { api, attachmentTypeId: id, req: reqParams } = params;
|
|
6249
|
+
if (!api) {
|
|
6250
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6251
|
+
}
|
|
6098
6252
|
if (!id) {
|
|
6099
6253
|
throw ("Type ID is required.");
|
|
6100
6254
|
}
|
|
@@ -6106,7 +6260,10 @@ var EntityAttachmentType;
|
|
|
6106
6260
|
EntityAttachmentType.Delete = Delete;
|
|
6107
6261
|
function Update(params) {
|
|
6108
6262
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6109
|
-
|
|
6263
|
+
let { api, attachmentType: data, req: reqParams } = params;
|
|
6264
|
+
if (!api) {
|
|
6265
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6266
|
+
}
|
|
6110
6267
|
if (!(data === null || data === void 0 ? void 0 : data.ID)) {
|
|
6111
6268
|
throw ("Type ID is required.");
|
|
6112
6269
|
}
|
|
@@ -6121,7 +6278,10 @@ var EntityAttachmentType;
|
|
|
6121
6278
|
EntityAttachmentType.Update = Update;
|
|
6122
6279
|
function GetList(params) {
|
|
6123
6280
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6124
|
-
|
|
6281
|
+
let { api, reqParams } = params;
|
|
6282
|
+
if (!api) {
|
|
6283
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6284
|
+
}
|
|
6125
6285
|
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
6126
6286
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
6127
6287
|
return cache.data;
|
|
@@ -6165,7 +6325,10 @@ var EntityAttachment;
|
|
|
6165
6325
|
EntityAttachment.GetListCacheKey = GetListCacheKey;
|
|
6166
6326
|
function Update(params) {
|
|
6167
6327
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6168
|
-
|
|
6328
|
+
let { api, attachments, req, entityId } = params;
|
|
6329
|
+
if (!api) {
|
|
6330
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6331
|
+
}
|
|
6169
6332
|
if (!(attachments === null || attachments === void 0 ? void 0 : attachments.length)) {
|
|
6170
6333
|
return {
|
|
6171
6334
|
attachments: []
|
|
@@ -6188,7 +6351,10 @@ var EntityAttachment;
|
|
|
6188
6351
|
EntityAttachment.Update = Update;
|
|
6189
6352
|
function UpdateOrder(params) {
|
|
6190
6353
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6191
|
-
|
|
6354
|
+
let { api, entityId, attachmentTypeId: typeId, attachments, req: reqParams } = params;
|
|
6355
|
+
if (!api) {
|
|
6356
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6357
|
+
}
|
|
6192
6358
|
if (!entityId || !typeId || !(attachments === null || attachments === void 0 ? void 0 : attachments.length)) {
|
|
6193
6359
|
throw ("Entity ID, Type ID, and Attachments are required.");
|
|
6194
6360
|
}
|
|
@@ -6206,7 +6372,10 @@ var EntityAttachment;
|
|
|
6206
6372
|
EntityAttachment.UpdateOrder = UpdateOrder;
|
|
6207
6373
|
function Delete(params) {
|
|
6208
6374
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6209
|
-
|
|
6375
|
+
let { api, attachmentId, entityId, req } = params;
|
|
6376
|
+
if (!api) {
|
|
6377
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6378
|
+
}
|
|
6210
6379
|
if (!attachmentId || !entityId) {
|
|
6211
6380
|
throw ("Entity id and attachment id.");
|
|
6212
6381
|
}
|
|
@@ -6217,7 +6386,10 @@ var EntityAttachment;
|
|
|
6217
6386
|
EntityAttachment.Delete = Delete;
|
|
6218
6387
|
function GetListByEntityId(params) {
|
|
6219
6388
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6220
|
-
|
|
6389
|
+
let { api, entityId, req: reqParams } = params;
|
|
6390
|
+
if (!api) {
|
|
6391
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6392
|
+
}
|
|
6221
6393
|
if (!entityId) {
|
|
6222
6394
|
throw ("Entity ID is required.");
|
|
6223
6395
|
}
|
|
@@ -6247,7 +6419,10 @@ var EntityAttachment;
|
|
|
6247
6419
|
EntityAttachment.GetListByEntityId = GetListByEntityId;
|
|
6248
6420
|
function Upload(params) {
|
|
6249
6421
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6250
|
-
|
|
6422
|
+
let { api, file, entityId, attachmentTypeId: typeId, req: reqParams } = params;
|
|
6423
|
+
if (!api) {
|
|
6424
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6425
|
+
}
|
|
6251
6426
|
if (!entityId || !typeId || !file) {
|
|
6252
6427
|
throw ("Entity ID, Type ID, and File are required.");
|
|
6253
6428
|
}
|
|
@@ -6278,7 +6453,10 @@ var EntityComment;
|
|
|
6278
6453
|
EntityComment.GetListCacheKey = GetListCacheKey;
|
|
6279
6454
|
function Update(params) {
|
|
6280
6455
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6281
|
-
|
|
6456
|
+
let { api, comment: data, req: reqParams } = params;
|
|
6457
|
+
if (!api) {
|
|
6458
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6459
|
+
}
|
|
6282
6460
|
if (!(data === null || data === void 0 ? void 0 : data["TargetObject.ID"])) {
|
|
6283
6461
|
throw ("TargetObject.ID (entity id) is required.");
|
|
6284
6462
|
}
|
|
@@ -6294,7 +6472,10 @@ var EntityComment;
|
|
|
6294
6472
|
EntityComment.Update = Update;
|
|
6295
6473
|
function Delete(params) {
|
|
6296
6474
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6297
|
-
|
|
6475
|
+
let { api, entityId, commentId, req: reqParams } = params;
|
|
6476
|
+
if (!api) {
|
|
6477
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6478
|
+
}
|
|
6298
6479
|
if (!commentId) {
|
|
6299
6480
|
throw ("Comment ID is required.");
|
|
6300
6481
|
}
|
|
@@ -6306,7 +6487,10 @@ var EntityComment;
|
|
|
6306
6487
|
EntityComment.Delete = Delete;
|
|
6307
6488
|
function GetListByEntityId(params) {
|
|
6308
6489
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6309
|
-
|
|
6490
|
+
let { api, entityId, req: reqParams } = params;
|
|
6491
|
+
if (!api) {
|
|
6492
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6493
|
+
}
|
|
6310
6494
|
if (!entityId) {
|
|
6311
6495
|
throw ("Entity ID is required.");
|
|
6312
6496
|
}
|
|
@@ -6352,7 +6536,10 @@ var EntityLink;
|
|
|
6352
6536
|
EntityLink.GetListCacheKey = GetListCacheKey;
|
|
6353
6537
|
function Update(params) {
|
|
6354
6538
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6355
|
-
|
|
6539
|
+
let { api, link: data, req: reqParams } = params;
|
|
6540
|
+
if (!api) {
|
|
6541
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6542
|
+
}
|
|
6356
6543
|
if (!(data === null || data === void 0 ? void 0 : data["Entity.ID"])) {
|
|
6357
6544
|
throw ("Entity ID is required.");
|
|
6358
6545
|
}
|
|
@@ -6368,7 +6555,10 @@ var EntityLink;
|
|
|
6368
6555
|
EntityLink.Update = Update;
|
|
6369
6556
|
function Delete(params) {
|
|
6370
6557
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6371
|
-
|
|
6558
|
+
let { api, entityId, linkId, req: reqParams } = params;
|
|
6559
|
+
if (!api) {
|
|
6560
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6561
|
+
}
|
|
6372
6562
|
if (!linkId) {
|
|
6373
6563
|
throw ("Link ID is required.");
|
|
6374
6564
|
}
|
|
@@ -6380,7 +6570,10 @@ var EntityLink;
|
|
|
6380
6570
|
EntityLink.Delete = Delete;
|
|
6381
6571
|
function GetListByEntityId(params) {
|
|
6382
6572
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6383
|
-
|
|
6573
|
+
let { api, entityId, req: reqParams } = params;
|
|
6574
|
+
if (!api) {
|
|
6575
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6576
|
+
}
|
|
6384
6577
|
if (!entityId) {
|
|
6385
6578
|
throw ("Entity ID is required.");
|
|
6386
6579
|
}
|
|
@@ -6432,6 +6625,9 @@ var EntityLod;
|
|
|
6432
6625
|
EntityLod.GetEntityListKey = GetEntityListKey;
|
|
6433
6626
|
function GetUrl(params) {
|
|
6434
6627
|
let { api, entityId, categoryId, level, strict } = params;
|
|
6628
|
+
if (!api) {
|
|
6629
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6630
|
+
}
|
|
6435
6631
|
if (!entityId) {
|
|
6436
6632
|
throw ("Entity ID is required.");
|
|
6437
6633
|
}
|
|
@@ -6452,7 +6648,10 @@ var EntityLod;
|
|
|
6452
6648
|
EntityLod.GetUrl = GetUrl;
|
|
6453
6649
|
function GetUrlFileId(params) {
|
|
6454
6650
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6455
|
-
|
|
6651
|
+
let { api, url, req: reqParams } = params;
|
|
6652
|
+
if (!api) {
|
|
6653
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6654
|
+
}
|
|
6456
6655
|
if (!url) {
|
|
6457
6656
|
throw ("Url is required.");
|
|
6458
6657
|
}
|
|
@@ -6483,7 +6682,10 @@ var EntityLod;
|
|
|
6483
6682
|
function GetLods(params) {
|
|
6484
6683
|
var _a;
|
|
6485
6684
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6486
|
-
|
|
6685
|
+
let { api, filter, req: reqParams } = params;
|
|
6686
|
+
if (!api) {
|
|
6687
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6688
|
+
}
|
|
6487
6689
|
if (!((_a = filter === null || filter === void 0 ? void 0 : filter.Items) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
6488
6690
|
throw ("Items are required.");
|
|
6489
6691
|
}
|
|
@@ -6496,7 +6698,10 @@ var EntityLod;
|
|
|
6496
6698
|
EntityLod.GetLods = GetLods;
|
|
6497
6699
|
function GetEntityLods(params) {
|
|
6498
6700
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6499
|
-
|
|
6701
|
+
let { api, entityId, req: reqParams } = params;
|
|
6702
|
+
if (!api) {
|
|
6703
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6704
|
+
}
|
|
6500
6705
|
if (!entityId) {
|
|
6501
6706
|
throw ("Entity id is required.");
|
|
6502
6707
|
}
|
|
@@ -6532,6 +6737,9 @@ var EntityLod;
|
|
|
6532
6737
|
function GetTypeLods(params) {
|
|
6533
6738
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6534
6739
|
let { api, entityTypeId: typeId, group, req: reqParams } = params;
|
|
6740
|
+
if (!api) {
|
|
6741
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6742
|
+
}
|
|
6535
6743
|
if (!group) {
|
|
6536
6744
|
group = "DEFAULT";
|
|
6537
6745
|
}
|
|
@@ -6563,7 +6771,10 @@ var EntityLod;
|
|
|
6563
6771
|
EntityLod.GetTypeLods = GetTypeLods;
|
|
6564
6772
|
function Update(params) {
|
|
6565
6773
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6566
|
-
|
|
6774
|
+
let { api, entityId, req: reqParams } = params;
|
|
6775
|
+
if (!api) {
|
|
6776
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6777
|
+
}
|
|
6567
6778
|
if (!params["ClientFile.ID"] || !params["LODCategory.Key"] || (!params.Level && params.Level !== 0)) {
|
|
6568
6779
|
throw ("ClientFile.ID, LODCategory.Key and Level are required.");
|
|
6569
6780
|
}
|
|
@@ -6579,6 +6790,9 @@ var EntityLod;
|
|
|
6579
6790
|
function Delete(params) {
|
|
6580
6791
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6581
6792
|
let { api, entityId, lodCategoryId, level, req: reqParams } = params;
|
|
6793
|
+
if (!api) {
|
|
6794
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6795
|
+
}
|
|
6582
6796
|
if (!entityId || !lodCategoryId) {
|
|
6583
6797
|
throw ("Entity ID and LOD Category ID are required.");
|
|
6584
6798
|
}
|
|
@@ -6607,7 +6821,10 @@ var EntityLodCategory;
|
|
|
6607
6821
|
EntityLodCategory.GetListCacheKey = GetListCacheKey;
|
|
6608
6822
|
function GetList(params) {
|
|
6609
6823
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6610
|
-
|
|
6824
|
+
let { api, req: reqParams } = params;
|
|
6825
|
+
if (!api) {
|
|
6826
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6827
|
+
}
|
|
6611
6828
|
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
6612
6829
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
6613
6830
|
return cache.data;
|
|
@@ -6634,7 +6851,10 @@ var EntityLodCategory;
|
|
|
6634
6851
|
EntityLodCategory.GetList = GetList;
|
|
6635
6852
|
function Get(params) {
|
|
6636
6853
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6637
|
-
|
|
6854
|
+
let { api, categoryId: id, req: reqParams } = params;
|
|
6855
|
+
if (!api) {
|
|
6856
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6857
|
+
}
|
|
6638
6858
|
if (!id) {
|
|
6639
6859
|
throw ("Lod category id is required.");
|
|
6640
6860
|
}
|
|
@@ -6664,7 +6884,10 @@ var EntityLodCategory;
|
|
|
6664
6884
|
EntityLodCategory.Get = Get;
|
|
6665
6885
|
function Delete(params) {
|
|
6666
6886
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6667
|
-
|
|
6887
|
+
let { api, categoryId: id, req: reqParams } = params;
|
|
6888
|
+
if (!api) {
|
|
6889
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6890
|
+
}
|
|
6668
6891
|
if (!id) {
|
|
6669
6892
|
throw ("Lod category id is required.");
|
|
6670
6893
|
}
|
|
@@ -6676,7 +6899,10 @@ var EntityLodCategory;
|
|
|
6676
6899
|
EntityLodCategory.Delete = Delete;
|
|
6677
6900
|
function Update(params) {
|
|
6678
6901
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6679
|
-
|
|
6902
|
+
let { api, category: data, req: reqParams } = params;
|
|
6903
|
+
if (!api) {
|
|
6904
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6905
|
+
}
|
|
6680
6906
|
if (!data.Key || !data.Name) {
|
|
6681
6907
|
throw ("Lod category key and name are required.");
|
|
6682
6908
|
}
|
|
@@ -6707,7 +6933,10 @@ var EntityRelationType;
|
|
|
6707
6933
|
EntityRelationType.GetListCacheKey = GetListCacheKey;
|
|
6708
6934
|
function Get(params) {
|
|
6709
6935
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6710
|
-
|
|
6936
|
+
let { api, relationTypeId: typeId, req: reqParams } = params;
|
|
6937
|
+
if (!api) {
|
|
6938
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6939
|
+
}
|
|
6711
6940
|
if (!typeId) {
|
|
6712
6941
|
throw ("Type ID is required.");
|
|
6713
6942
|
}
|
|
@@ -6738,7 +6967,10 @@ var EntityRelationType;
|
|
|
6738
6967
|
EntityRelationType.Get = Get;
|
|
6739
6968
|
function Delete(params) {
|
|
6740
6969
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6741
|
-
|
|
6970
|
+
let { api, relationTypeId: typeId, req: reqParams } = params;
|
|
6971
|
+
if (!api) {
|
|
6972
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6973
|
+
}
|
|
6742
6974
|
if (!typeId) {
|
|
6743
6975
|
throw ("Type ID is required.");
|
|
6744
6976
|
}
|
|
@@ -6750,7 +6982,10 @@ var EntityRelationType;
|
|
|
6750
6982
|
EntityRelationType.Delete = Delete;
|
|
6751
6983
|
function GetList(params) {
|
|
6752
6984
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6753
|
-
|
|
6985
|
+
let { api, req: reqParams } = params;
|
|
6986
|
+
if (!api) {
|
|
6987
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
6988
|
+
}
|
|
6754
6989
|
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
6755
6990
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
6756
6991
|
return cache.data;
|
|
@@ -6777,7 +7012,10 @@ var EntityRelationType;
|
|
|
6777
7012
|
EntityRelationType.GetList = GetList;
|
|
6778
7013
|
function Update(params) {
|
|
6779
7014
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6780
|
-
|
|
7015
|
+
let { api, relationType: data, req: reqParams } = params;
|
|
7016
|
+
if (!api) {
|
|
7017
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7018
|
+
}
|
|
6781
7019
|
if (!(data === null || data === void 0 ? void 0 : data.ForwardName) || !(data === null || data === void 0 ? void 0 : data.ReverseName)) {
|
|
6782
7020
|
throw ("Forward and reverse names are required.");
|
|
6783
7021
|
}
|
|
@@ -6820,7 +7058,10 @@ var EntityRelation;
|
|
|
6820
7058
|
EntityRelation.GetListCacheKey = GetListCacheKey;
|
|
6821
7059
|
function Create(params) {
|
|
6822
7060
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6823
|
-
|
|
7061
|
+
let { api, relation: data, req: reqParams } = params;
|
|
7062
|
+
if (!api) {
|
|
7063
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7064
|
+
}
|
|
6824
7065
|
if (!data["Principal.Entity.ID"] || !data["Related.Entity.ID"] || !data["Relation.Type.ID"]) {
|
|
6825
7066
|
throw ("Principal Entity ID, Related Entity ID, and Relation Type ID are required.");
|
|
6826
7067
|
}
|
|
@@ -6840,7 +7081,10 @@ var EntityRelation;
|
|
|
6840
7081
|
EntityRelation.Create = Create;
|
|
6841
7082
|
function Delete(params) {
|
|
6842
7083
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6843
|
-
|
|
7084
|
+
let { api, principalEntityId, relatedEntityId, relationTypeId, req: reqParams } = params;
|
|
7085
|
+
if (!api) {
|
|
7086
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7087
|
+
}
|
|
6844
7088
|
if (!principalEntityId || !relatedEntityId || !relationTypeId) {
|
|
6845
7089
|
throw new Error("Principal Entity ID, Related Entity ID, and Relation Type ID are required.");
|
|
6846
7090
|
}
|
|
@@ -6857,7 +7101,10 @@ var EntityRelation;
|
|
|
6857
7101
|
EntityRelation.Delete = Delete;
|
|
6858
7102
|
function Update(params) {
|
|
6859
7103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6860
|
-
|
|
7104
|
+
let { api, relation: data, req: reqParams } = params;
|
|
7105
|
+
if (!api) {
|
|
7106
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7107
|
+
}
|
|
6861
7108
|
if (!data["Principal.Entity.ID"] || !data["Related.Entity.ID"] || !data["Relation.Type.ID"]) {
|
|
6862
7109
|
throw ("Principal Entity ID, Related Entity ID, and Relation Type ID are required.");
|
|
6863
7110
|
}
|
|
@@ -6875,6 +7122,9 @@ var EntityRelation;
|
|
|
6875
7122
|
function GetList(params) {
|
|
6876
7123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6877
7124
|
let { api, entityId, filter, req: reqParams } = params;
|
|
7125
|
+
if (!api) {
|
|
7126
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7127
|
+
}
|
|
6878
7128
|
if (!entityId) {
|
|
6879
7129
|
throw ("Entity ID is required.");
|
|
6880
7130
|
}
|
|
@@ -6910,7 +7160,10 @@ var EntityRelation;
|
|
|
6910
7160
|
EntityRelation.GetList = GetList;
|
|
6911
7161
|
function GetByDataEntityId(params) {
|
|
6912
7162
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6913
|
-
|
|
7163
|
+
let { api, entityId, req: reqParams } = params;
|
|
7164
|
+
if (!api) {
|
|
7165
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7166
|
+
}
|
|
6914
7167
|
if (!entityId) {
|
|
6915
7168
|
throw ("Entity ID is required.");
|
|
6916
7169
|
}
|
|
@@ -6954,7 +7207,10 @@ var EntitySource;
|
|
|
6954
7207
|
function Get(params) {
|
|
6955
7208
|
var _a;
|
|
6956
7209
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6957
|
-
|
|
7210
|
+
let { api, sourceId, sourceKey, req: reqParams } = params;
|
|
7211
|
+
if (!api) {
|
|
7212
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7213
|
+
}
|
|
6958
7214
|
if (!sourceId || !sourceKey) {
|
|
6959
7215
|
throw ("Source ID and Source Key are required.");
|
|
6960
7216
|
}
|
|
@@ -6972,7 +7228,10 @@ var EntitySource;
|
|
|
6972
7228
|
EntitySource.Get = Get;
|
|
6973
7229
|
function GetListByKeys(params) {
|
|
6974
7230
|
return __awaiter(this, void 0, void 0, function* () {
|
|
6975
|
-
|
|
7231
|
+
let { api, sourceId, sourceKeys, req: reqParams } = params;
|
|
7232
|
+
if (!api) {
|
|
7233
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7234
|
+
}
|
|
6976
7235
|
if (!sourceId || !sourceKeys.length) {
|
|
6977
7236
|
throw ("Source ID and Source Keys are required.");
|
|
6978
7237
|
}
|
|
@@ -7019,7 +7278,10 @@ var EntitySource;
|
|
|
7019
7278
|
EntitySource.GetListByKeys = GetListByKeys;
|
|
7020
7279
|
function GetEntityIdsBySourceKeys(params) {
|
|
7021
7280
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7022
|
-
|
|
7281
|
+
let { api, sourceId, sourceKeys, req: reqParams } = params;
|
|
7282
|
+
if (!api) {
|
|
7283
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7284
|
+
}
|
|
7023
7285
|
if (!sourceId || !sourceKeys.length) {
|
|
7024
7286
|
throw ("Source ID and Source Keys are required.");
|
|
7025
7287
|
}
|
|
@@ -7049,13 +7311,16 @@ var EntitySource;
|
|
|
7049
7311
|
EntitySource.GetEntityIdsBySourceKeys = GetEntityIdsBySourceKeys;
|
|
7050
7312
|
function CreateLink(params) {
|
|
7051
7313
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7052
|
-
|
|
7314
|
+
let { source, api } = params;
|
|
7315
|
+
if (!api) {
|
|
7316
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7317
|
+
}
|
|
7053
7318
|
if (!source["Entity.ID"] || !source["Source.ID"] || !source["SourceRecord.Key"]) {
|
|
7054
7319
|
throw ("Entity ID, Source ID and Source Key are required.");
|
|
7055
7320
|
}
|
|
7056
|
-
const res = yield
|
|
7321
|
+
const res = yield api.POST("entitysource", source);
|
|
7057
7322
|
const cacheKey = GetCacheKey(source["Source.ID"], source["SourceRecord.Key"]);
|
|
7058
|
-
yield
|
|
7323
|
+
yield api.Cache.Remove(cacheKey);
|
|
7059
7324
|
return {
|
|
7060
7325
|
source: res
|
|
7061
7326
|
};
|
|
@@ -7084,7 +7349,10 @@ var EntityTag;
|
|
|
7084
7349
|
EntityTag.GetListCacheKey = GetListCacheKey;
|
|
7085
7350
|
function Get(params) {
|
|
7086
7351
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7087
|
-
|
|
7352
|
+
let { api, tagId, req: reqParams } = params;
|
|
7353
|
+
if (!api) {
|
|
7354
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7355
|
+
}
|
|
7088
7356
|
if (!tagId) {
|
|
7089
7357
|
throw ("Tag ID is required.");
|
|
7090
7358
|
}
|
|
@@ -7101,7 +7369,10 @@ var EntityTag;
|
|
|
7101
7369
|
EntityTag.Get = Get;
|
|
7102
7370
|
function GetListByIds(params) {
|
|
7103
7371
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7104
|
-
|
|
7372
|
+
let { api, tagIds, req: reqParams } = params;
|
|
7373
|
+
if (!api) {
|
|
7374
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7375
|
+
}
|
|
7105
7376
|
if (!tagIds.length) {
|
|
7106
7377
|
throw ("Tag Ids are empty.");
|
|
7107
7378
|
}
|
|
@@ -7157,7 +7428,10 @@ var EntityTag;
|
|
|
7157
7428
|
EntityTag.GetListByIds = GetListByIds;
|
|
7158
7429
|
function GetList(params) {
|
|
7159
7430
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7160
|
-
|
|
7431
|
+
let { api, entityTypeId, req: reqParams } = params;
|
|
7432
|
+
if (!api) {
|
|
7433
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7434
|
+
}
|
|
7161
7435
|
const cache = yield api.GetCacheItem(GetListCacheKey(entityTypeId), reqParams);
|
|
7162
7436
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
7163
7437
|
return cache.data;
|
|
@@ -7184,7 +7458,10 @@ var EntityTag;
|
|
|
7184
7458
|
EntityTag.GetList = GetList;
|
|
7185
7459
|
function Delete(params) {
|
|
7186
7460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7187
|
-
|
|
7461
|
+
let { api, tagId, req: reqParams } = params;
|
|
7462
|
+
if (!api) {
|
|
7463
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7464
|
+
}
|
|
7188
7465
|
if (!tagId) {
|
|
7189
7466
|
throw ("Tag ID is required.");
|
|
7190
7467
|
}
|
|
@@ -7196,7 +7473,10 @@ var EntityTag;
|
|
|
7196
7473
|
EntityTag.Delete = Delete;
|
|
7197
7474
|
function Update(params) {
|
|
7198
7475
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7199
|
-
|
|
7476
|
+
let { api, tag: data, req: reqParams } = params;
|
|
7477
|
+
if (!api) {
|
|
7478
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7479
|
+
}
|
|
7200
7480
|
const url = data.ID ? `layer/${data.ID}` : "layer";
|
|
7201
7481
|
const res = yield api.POST(url, data, Api.PrepReqParams(reqParams));
|
|
7202
7482
|
api.Cache.Remove(GetCacheKey(data.ID));
|
|
@@ -7226,7 +7506,10 @@ var EntityType;
|
|
|
7226
7506
|
EntityType.GetListCacheKey = GetListCacheKey;
|
|
7227
7507
|
function Get(params) {
|
|
7228
7508
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7229
|
-
|
|
7509
|
+
let { api, entityTypeId: typeId, req: reqParams } = params;
|
|
7510
|
+
if (!api) {
|
|
7511
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7512
|
+
}
|
|
7230
7513
|
if (!typeId) {
|
|
7231
7514
|
throw ("Type ID is required.");
|
|
7232
7515
|
}
|
|
@@ -7257,7 +7540,10 @@ var EntityType;
|
|
|
7257
7540
|
EntityType.Get = Get;
|
|
7258
7541
|
function Delete(params) {
|
|
7259
7542
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7260
|
-
|
|
7543
|
+
let { api, entityTypeId: typeId, req: reqParams } = params;
|
|
7544
|
+
if (!api) {
|
|
7545
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7546
|
+
}
|
|
7261
7547
|
if (!typeId) {
|
|
7262
7548
|
throw ("Type ID is required.");
|
|
7263
7549
|
}
|
|
@@ -7269,7 +7555,10 @@ var EntityType;
|
|
|
7269
7555
|
EntityType.Delete = Delete;
|
|
7270
7556
|
function GetList(params) {
|
|
7271
7557
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7272
|
-
|
|
7558
|
+
let { api, req: reqParams } = params;
|
|
7559
|
+
if (!api) {
|
|
7560
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7561
|
+
}
|
|
7273
7562
|
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
7274
7563
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
7275
7564
|
return cache.data;
|
|
@@ -7298,6 +7587,9 @@ var EntityType;
|
|
|
7298
7587
|
function Update(params) {
|
|
7299
7588
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7300
7589
|
let { api, entityType: data, req: reqParams } = params;
|
|
7590
|
+
if (!api) {
|
|
7591
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
7592
|
+
}
|
|
7301
7593
|
if (!data) {
|
|
7302
7594
|
data = {};
|
|
7303
7595
|
}
|
|
@@ -7890,7 +8182,10 @@ var EntityCoords;
|
|
|
7890
8182
|
EntityCoords.GetCacheKey = GetCacheKey;
|
|
7891
8183
|
function GetEntityCoords(params) {
|
|
7892
8184
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7893
|
-
|
|
8185
|
+
let { api, rootEntityId: entityId, req: reqParams } = params;
|
|
8186
|
+
if (!api) {
|
|
8187
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8188
|
+
}
|
|
7894
8189
|
const cache = yield api.GetCacheItem(GetCacheKey(entityId), reqParams);
|
|
7895
8190
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
7896
8191
|
return cache.data;
|
|
@@ -7917,7 +8212,10 @@ var EntityCoords;
|
|
|
7917
8212
|
EntityCoords.GetEntityCoords = GetEntityCoords;
|
|
7918
8213
|
function EntityRelativeToPoint(params) {
|
|
7919
8214
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7920
|
-
|
|
8215
|
+
let { api, rootEntityId: entityId, req: reqParams } = params;
|
|
8216
|
+
if (!api) {
|
|
8217
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8218
|
+
}
|
|
7921
8219
|
if (!params.test) {
|
|
7922
8220
|
yield UnlinkCoords({
|
|
7923
8221
|
api,
|
|
@@ -7954,7 +8252,10 @@ var EntityCoords;
|
|
|
7954
8252
|
function EntityRelativeToEpsg(params) {
|
|
7955
8253
|
var _a;
|
|
7956
8254
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7957
|
-
|
|
8255
|
+
let { api, rootEntityId: entityId, req: reqParams } = params;
|
|
8256
|
+
if (!api) {
|
|
8257
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8258
|
+
}
|
|
7958
8259
|
if (!params.test) {
|
|
7959
8260
|
yield UnlinkCoords({
|
|
7960
8261
|
api,
|
|
@@ -7988,7 +8289,10 @@ var EntityCoords;
|
|
|
7988
8289
|
EntityCoords.EntityRelativeToEpsg = EntityRelativeToEpsg;
|
|
7989
8290
|
function EntityRelativeToUcs(params) {
|
|
7990
8291
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7991
|
-
|
|
8292
|
+
let { api, rootEntityId: entityId, req: reqParams } = params;
|
|
8293
|
+
if (!api) {
|
|
8294
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8295
|
+
}
|
|
7992
8296
|
if (!params.test) {
|
|
7993
8297
|
yield UnlinkCoords({
|
|
7994
8298
|
api,
|
|
@@ -8014,7 +8318,10 @@ var EntityCoords;
|
|
|
8014
8318
|
EntityCoords.EntityRelativeToUcs = EntityRelativeToUcs;
|
|
8015
8319
|
function UnlinkCoords(params) {
|
|
8016
8320
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8017
|
-
|
|
8321
|
+
let { api, rootEntityId: entityId, req: reqParams } = params;
|
|
8322
|
+
if (!api) {
|
|
8323
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8324
|
+
}
|
|
8018
8325
|
return api.DELETE(`entity/${entityId}/ucs`, reqParams);
|
|
8019
8326
|
});
|
|
8020
8327
|
}
|
|
@@ -8064,7 +8371,10 @@ var Uploader;
|
|
|
8064
8371
|
Uploader.MIN_LARGE_FILE_SIZE = 100000000; // 100MB.
|
|
8065
8372
|
function DoMultiPartUpload(params) {
|
|
8066
8373
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8067
|
-
|
|
8374
|
+
let { file, api, urlSuffix: url, req, onProgress } = params;
|
|
8375
|
+
if (!api) {
|
|
8376
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8377
|
+
}
|
|
8068
8378
|
const FILE_PORTION_SIZE = 100000000; // 100MB.
|
|
8069
8379
|
let fileSize = file.size;
|
|
8070
8380
|
let fileOffset = 0;
|
|
@@ -8133,18 +8443,27 @@ var ClientFile;
|
|
|
8133
8443
|
}
|
|
8134
8444
|
ClientFile.GetCacheKey = GetCacheKey;
|
|
8135
8445
|
function GetUrl(params) {
|
|
8136
|
-
|
|
8446
|
+
let { api, fileId } = params;
|
|
8447
|
+
if (!api) {
|
|
8448
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8449
|
+
}
|
|
8137
8450
|
return `${api.GetBaseUrl()}file/${fileId}`;
|
|
8138
8451
|
}
|
|
8139
8452
|
ClientFile.GetUrl = GetUrl;
|
|
8140
8453
|
function GetUrlWithExt(params) {
|
|
8141
|
-
|
|
8454
|
+
let { api, file } = params;
|
|
8455
|
+
if (!api) {
|
|
8456
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8457
|
+
}
|
|
8142
8458
|
return `${api.GetBaseUrl()}file/${file.ID}${file.FileExt ? file.FileExt : ""}`;
|
|
8143
8459
|
}
|
|
8144
8460
|
ClientFile.GetUrlWithExt = GetUrlWithExt;
|
|
8145
8461
|
function Get(params) {
|
|
8146
8462
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8147
|
-
|
|
8463
|
+
let { api, fileId, req: reqParams } = params;
|
|
8464
|
+
if (!api) {
|
|
8465
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8466
|
+
}
|
|
8148
8467
|
if (!fileId) {
|
|
8149
8468
|
throw ("File ID is required.");
|
|
8150
8469
|
}
|
|
@@ -8175,7 +8494,10 @@ var ClientFile;
|
|
|
8175
8494
|
ClientFile.Get = Get;
|
|
8176
8495
|
function Delete(params) {
|
|
8177
8496
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8178
|
-
|
|
8497
|
+
let { api, fileIds, req: reqParams } = params;
|
|
8498
|
+
if (!api) {
|
|
8499
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8500
|
+
}
|
|
8179
8501
|
if (!fileIds.length) {
|
|
8180
8502
|
throw ("File IDs are required.");
|
|
8181
8503
|
}
|
|
@@ -8193,6 +8515,9 @@ var ClientFile;
|
|
|
8193
8515
|
function Upload(params) {
|
|
8194
8516
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8195
8517
|
let { api, file, purpose, req, onProgress } = params;
|
|
8518
|
+
if (!api) {
|
|
8519
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8520
|
+
}
|
|
8196
8521
|
if (!file) {
|
|
8197
8522
|
throw ("File is required.");
|
|
8198
8523
|
}
|
|
@@ -8248,6 +8573,9 @@ var ClientFile;
|
|
|
8248
8573
|
function UpdatePurpose(params) {
|
|
8249
8574
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8250
8575
|
let { api, fileId, purpose, req: reqParams } = params;
|
|
8576
|
+
if (!api) {
|
|
8577
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8578
|
+
}
|
|
8251
8579
|
if (!purpose) {
|
|
8252
8580
|
purpose = "";
|
|
8253
8581
|
}
|
|
@@ -8268,6 +8596,9 @@ var ClientFile;
|
|
|
8268
8596
|
function UploadTemp(params) {
|
|
8269
8597
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8270
8598
|
let { api, file, req, onProgress } = params;
|
|
8599
|
+
if (!api) {
|
|
8600
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8601
|
+
}
|
|
8271
8602
|
if (!file) {
|
|
8272
8603
|
throw ("File is required.");
|
|
8273
8604
|
}
|
|
@@ -8331,7 +8662,10 @@ var ClientFile;
|
|
|
8331
8662
|
})(Filter = ClientFile.Filter || (ClientFile.Filter = {}));
|
|
8332
8663
|
function GetList(params) {
|
|
8333
8664
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8334
|
-
|
|
8665
|
+
let { api, filter, req: reqParams } = params;
|
|
8666
|
+
if (!api) {
|
|
8667
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8668
|
+
}
|
|
8335
8669
|
const data = yield api.POST("files/filtered", filter, Api.PrepReqParams(reqParams));
|
|
8336
8670
|
return {
|
|
8337
8671
|
clientFiles: data.Items,
|
|
@@ -8349,7 +8683,10 @@ var ClientFile;
|
|
|
8349
8683
|
})(EConvertExt = Processor.EConvertExt || (Processor.EConvertExt = {}));
|
|
8350
8684
|
function ConvertFormat(params) {
|
|
8351
8685
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8352
|
-
|
|
8686
|
+
let { api, fileId: clientFileId, ext, req: reqParams } = params;
|
|
8687
|
+
if (!api) {
|
|
8688
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8689
|
+
}
|
|
8353
8690
|
if (!clientFileId || !ext) {
|
|
8354
8691
|
throw ("Client File ID and extension are required.");
|
|
8355
8692
|
}
|
|
@@ -8387,7 +8724,10 @@ var ProgramKey;
|
|
|
8387
8724
|
})(EProgramId = ProgramKey.EProgramId || (ProgramKey.EProgramId = {}));
|
|
8388
8725
|
function Get(params) {
|
|
8389
8726
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8390
|
-
|
|
8727
|
+
let { api, programId, req: reqParams } = params;
|
|
8728
|
+
if (!api) {
|
|
8729
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8730
|
+
}
|
|
8391
8731
|
if (!programId) {
|
|
8392
8732
|
throw ("Program ID is required.");
|
|
8393
8733
|
}
|
|
@@ -8418,7 +8758,10 @@ var ProgramKey;
|
|
|
8418
8758
|
ProgramKey.Get = Get;
|
|
8419
8759
|
function GetList(params) {
|
|
8420
8760
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8421
|
-
|
|
8761
|
+
let { api, req: reqParams } = params;
|
|
8762
|
+
if (!api) {
|
|
8763
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8764
|
+
}
|
|
8422
8765
|
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
8423
8766
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
8424
8767
|
return cache.data;
|
|
@@ -8445,7 +8788,10 @@ var ProgramKey;
|
|
|
8445
8788
|
ProgramKey.GetList = GetList;
|
|
8446
8789
|
function Delete(params) {
|
|
8447
8790
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8448
|
-
|
|
8791
|
+
let { api, programId, req: reqParams } = params;
|
|
8792
|
+
if (!api) {
|
|
8793
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8794
|
+
}
|
|
8449
8795
|
if (!programId) {
|
|
8450
8796
|
throw ("Program ID is required.");
|
|
8451
8797
|
}
|
|
@@ -8457,7 +8803,10 @@ var ProgramKey;
|
|
|
8457
8803
|
ProgramKey.Delete = Delete;
|
|
8458
8804
|
function Update(params) {
|
|
8459
8805
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8460
|
-
|
|
8806
|
+
let { api, programKey: data, req: reqParams } = params;
|
|
8807
|
+
if (!api) {
|
|
8808
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8809
|
+
}
|
|
8461
8810
|
if (!(data === null || data === void 0 ? void 0 : data.ProgramId)) {
|
|
8462
8811
|
throw ("Program ID is required.");
|
|
8463
8812
|
}
|
|
@@ -8530,7 +8879,10 @@ var Tileset;
|
|
|
8530
8879
|
})(EPivot = Tileset.EPivot || (Tileset.EPivot = {}));
|
|
8531
8880
|
function Get(params) {
|
|
8532
8881
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8533
|
-
|
|
8882
|
+
let { api, tilesetId, loadFiles, req: reqParams } = params;
|
|
8883
|
+
if (!api) {
|
|
8884
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8885
|
+
}
|
|
8534
8886
|
if (!tilesetId) {
|
|
8535
8887
|
throw ("Tileset ID is required.");
|
|
8536
8888
|
}
|
|
@@ -8561,13 +8913,18 @@ var Tileset;
|
|
|
8561
8913
|
/**
|
|
8562
8914
|
* Returns tileset types for given tileset ids.
|
|
8563
8915
|
* @param params
|
|
8916
|
+
* @deprecated Just use GetList and Get to find the type from the tileset record.
|
|
8564
8917
|
* @returns
|
|
8565
8918
|
*/
|
|
8566
8919
|
function GetTypes(params) {
|
|
8567
8920
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8921
|
+
// UPDATE: This was corrected, this will be removed.
|
|
8568
8922
|
// Our api is auto-converting legacy types right now which makes it impossible to know what they are.
|
|
8569
8923
|
// This uses the legacy end-point which doesn't do that...
|
|
8570
|
-
|
|
8924
|
+
let { api, tilesetIds, req: reqParams } = params;
|
|
8925
|
+
if (!api) {
|
|
8926
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8927
|
+
}
|
|
8571
8928
|
const mapping = {};
|
|
8572
8929
|
if (tilesetIds.length == 1) {
|
|
8573
8930
|
const tileset = yield api.GET("ui.tileset/" + tilesetIds[0], Api.PrepReqParams(reqParams));
|
|
@@ -8591,7 +8948,10 @@ var Tileset;
|
|
|
8591
8948
|
Tileset.GetTypes = GetTypes;
|
|
8592
8949
|
function GetList(params) {
|
|
8593
8950
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8594
|
-
|
|
8951
|
+
let { api, req: reqParams } = params;
|
|
8952
|
+
if (!api) {
|
|
8953
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8954
|
+
}
|
|
8595
8955
|
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
8596
8956
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
8597
8957
|
return cache.data;
|
|
@@ -8618,7 +8978,10 @@ var Tileset;
|
|
|
8618
8978
|
Tileset.GetList = GetList;
|
|
8619
8979
|
function Delete(params) {
|
|
8620
8980
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8621
|
-
|
|
8981
|
+
let { api, tilesetId, req: reqParams } = params;
|
|
8982
|
+
if (!api) {
|
|
8983
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8984
|
+
}
|
|
8622
8985
|
if (!tilesetId) {
|
|
8623
8986
|
throw ("Tileset ID is required.");
|
|
8624
8987
|
}
|
|
@@ -8631,6 +8994,9 @@ var Tileset;
|
|
|
8631
8994
|
function Update(params) {
|
|
8632
8995
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8633
8996
|
let { api, tileset: data, req: reqParams } = params;
|
|
8997
|
+
if (!api) {
|
|
8998
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
8999
|
+
}
|
|
8634
9000
|
if (!(data === null || data === void 0 ? void 0 : data.name) || !(data === null || data === void 0 ? void 0 : data.type)) {
|
|
8635
9001
|
throw ("Tileset name and type are required.");
|
|
8636
9002
|
}
|
|
@@ -8651,6 +9017,9 @@ var Tileset;
|
|
|
8651
9017
|
function UploadFile(params) {
|
|
8652
9018
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8653
9019
|
let { api, file, req, tilesetId, onProgress } = params;
|
|
9020
|
+
if (!api) {
|
|
9021
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9022
|
+
}
|
|
8654
9023
|
if (!tilesetId || !file) {
|
|
8655
9024
|
throw ("Tileset ID and file are required.");
|
|
8656
9025
|
}
|
|
@@ -8688,7 +9057,10 @@ var Tileset;
|
|
|
8688
9057
|
Tileset.UploadFile = UploadFile;
|
|
8689
9058
|
function DeleteFile(params) {
|
|
8690
9059
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8691
|
-
|
|
9060
|
+
let { api, tilesetId, file, req: reqParams } = params;
|
|
9061
|
+
if (!api) {
|
|
9062
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9063
|
+
}
|
|
8692
9064
|
if (!tilesetId || !file) {
|
|
8693
9065
|
throw ("Tileset ID and file are required.");
|
|
8694
9066
|
}
|
|
@@ -8700,6 +9072,9 @@ var Tileset;
|
|
|
8700
9072
|
function UploadSrcFile(params) {
|
|
8701
9073
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8702
9074
|
let { api, file, req, tilesetId, onProgress } = params;
|
|
9075
|
+
if (!api) {
|
|
9076
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9077
|
+
}
|
|
8703
9078
|
if (!tilesetId || !file) {
|
|
8704
9079
|
throw ("Tileset ID and file are required.");
|
|
8705
9080
|
}
|
|
@@ -8738,7 +9113,10 @@ var Tileset;
|
|
|
8738
9113
|
Tileset.UploadSrcFile = UploadSrcFile;
|
|
8739
9114
|
function DeleteSrcFile(params) {
|
|
8740
9115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8741
|
-
|
|
9116
|
+
let { api, tilesetId, file, req: reqParams } = params;
|
|
9117
|
+
if (!api) {
|
|
9118
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9119
|
+
}
|
|
8742
9120
|
if (!tilesetId || !file) {
|
|
8743
9121
|
throw ("Tileset ID and file are required.");
|
|
8744
9122
|
}
|
|
@@ -8749,6 +9127,9 @@ var Tileset;
|
|
|
8749
9127
|
Tileset.DeleteSrcFile = DeleteSrcFile;
|
|
8750
9128
|
function GetFileUrl(params) {
|
|
8751
9129
|
let { api, tilesetId, file } = params;
|
|
9130
|
+
if (!api) {
|
|
9131
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9132
|
+
}
|
|
8752
9133
|
if (!tilesetId) {
|
|
8753
9134
|
throw ("Tileset ID is required.");
|
|
8754
9135
|
}
|
|
@@ -8760,6 +9141,9 @@ var Tileset;
|
|
|
8760
9141
|
Tileset.GetFileUrl = GetFileUrl;
|
|
8761
9142
|
function GetSrcFileUrl(params) {
|
|
8762
9143
|
let { api, tilesetId, file } = params;
|
|
9144
|
+
if (!api) {
|
|
9145
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9146
|
+
}
|
|
8763
9147
|
if (!tilesetId) {
|
|
8764
9148
|
throw ("Tileset ID is required.");
|
|
8765
9149
|
}
|
|
@@ -8771,6 +9155,9 @@ var Tileset;
|
|
|
8771
9155
|
Tileset.GetSrcFileUrl = GetSrcFileUrl;
|
|
8772
9156
|
function GetPublicFileUrl(params) {
|
|
8773
9157
|
let { api, tilesetId, file } = params;
|
|
9158
|
+
if (!api) {
|
|
9159
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9160
|
+
}
|
|
8774
9161
|
if (!tilesetId) {
|
|
8775
9162
|
throw ("Tileset ID is required.");
|
|
8776
9163
|
}
|
|
@@ -8782,7 +9169,10 @@ var Tileset;
|
|
|
8782
9169
|
Tileset.GetPublicFileUrl = GetPublicFileUrl;
|
|
8783
9170
|
function Generate(params) {
|
|
8784
9171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8785
|
-
|
|
9172
|
+
let { api, tilesetId, req: reqParams } = params;
|
|
9173
|
+
if (!api) {
|
|
9174
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9175
|
+
}
|
|
8786
9176
|
if (!tilesetId) {
|
|
8787
9177
|
throw ("Tileset ID is required.");
|
|
8788
9178
|
}
|
|
@@ -8804,7 +9194,10 @@ var Tileset;
|
|
|
8804
9194
|
Publish.GetCacheKey = GetCacheKey;
|
|
8805
9195
|
function Update(params) {
|
|
8806
9196
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8807
|
-
|
|
9197
|
+
let { api, published: data, req: reqParams } = params;
|
|
9198
|
+
if (!api) {
|
|
9199
|
+
api = ENVIRONMENT.GetGetters().GetGlobalApi();
|
|
9200
|
+
}
|
|
8808
9201
|
if (!(data === null || data === void 0 ? void 0 : data["Tileset.ID"]) || !(data === null || data === void 0 ? void 0 : data["PublishedBy.ClientAccount.ID"]) || !(data === null || data === void 0 ? void 0 : data["PublishedBy.User.ID"])) {
|
|
8809
9202
|
throw ("Tileset ID, client account ID, and user ID are required.");
|
|
8810
9203
|
}
|
|
@@ -8827,7 +9220,10 @@ var Tileset;
|
|
|
8827
9220
|
Publish.Update = Update;
|
|
8828
9221
|
function Get(params) {
|
|
8829
9222
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8830
|
-
|
|
9223
|
+
let { api, accountId, tilesetId, req: reqParams } = params;
|
|
9224
|
+
if (!api) {
|
|
9225
|
+
api = ENVIRONMENT.GetGetters().GetGlobalApi();
|
|
9226
|
+
}
|
|
8831
9227
|
if (!accountId || !tilesetId) {
|
|
8832
9228
|
throw ("Client account ID and tileset ID are required.");
|
|
8833
9229
|
}
|
|
@@ -8857,7 +9253,10 @@ var Tileset;
|
|
|
8857
9253
|
Publish.Get = Get;
|
|
8858
9254
|
function GetList(params) {
|
|
8859
9255
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8860
|
-
|
|
9256
|
+
let { api, accountId, req: reqParams } = params;
|
|
9257
|
+
if (!api) {
|
|
9258
|
+
api = ENVIRONMENT.GetGetters().GetGlobalApi();
|
|
9259
|
+
}
|
|
8861
9260
|
if (!accountId) {
|
|
8862
9261
|
throw ("Client account ID is required.");
|
|
8863
9262
|
}
|
|
@@ -9050,7 +9449,10 @@ var ProjectViewBookmark;
|
|
|
9050
9449
|
})(Navigator = ProjectViewBookmark.Navigator || (ProjectViewBookmark.Navigator = {}));
|
|
9051
9450
|
function Get(params) {
|
|
9052
9451
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9053
|
-
|
|
9452
|
+
let { api, viewId, bookmarkId, req: reqParams } = params;
|
|
9453
|
+
if (!api) {
|
|
9454
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9455
|
+
}
|
|
9054
9456
|
if (!viewId || !bookmarkId) {
|
|
9055
9457
|
throw ("View ID and Bookmark ID are required.");
|
|
9056
9458
|
}
|
|
@@ -9081,7 +9483,10 @@ var ProjectViewBookmark;
|
|
|
9081
9483
|
ProjectViewBookmark.Get = Get;
|
|
9082
9484
|
function Delete(params) {
|
|
9083
9485
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9084
|
-
|
|
9486
|
+
let { api, viewId, bookmarkId, req: reqParams } = params;
|
|
9487
|
+
if (!api) {
|
|
9488
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9489
|
+
}
|
|
9085
9490
|
if (!viewId || !bookmarkId) {
|
|
9086
9491
|
throw ("View ID and Bookmark ID are required.");
|
|
9087
9492
|
}
|
|
@@ -9093,7 +9498,10 @@ var ProjectViewBookmark;
|
|
|
9093
9498
|
ProjectViewBookmark.Delete = Delete;
|
|
9094
9499
|
function GetList(params) {
|
|
9095
9500
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9096
|
-
|
|
9501
|
+
let { api, viewId, req: reqParams } = params;
|
|
9502
|
+
if (!api) {
|
|
9503
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9504
|
+
}
|
|
9097
9505
|
if (!viewId) {
|
|
9098
9506
|
throw ("View ID is required.");
|
|
9099
9507
|
}
|
|
@@ -9140,7 +9548,10 @@ var ProjectViewBookmark;
|
|
|
9140
9548
|
ProjectViewBookmark.GetList = GetList;
|
|
9141
9549
|
function Update(params) {
|
|
9142
9550
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9143
|
-
|
|
9551
|
+
let { api, viewId, bookmark: data, req: reqParams } = params;
|
|
9552
|
+
if (!api) {
|
|
9553
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9554
|
+
}
|
|
9144
9555
|
if (!(data === null || data === void 0 ? void 0 : data.Title)) {
|
|
9145
9556
|
data.Title = data.ID;
|
|
9146
9557
|
}
|
|
@@ -9155,7 +9566,10 @@ var ProjectViewBookmark;
|
|
|
9155
9566
|
ProjectViewBookmark.Update = Update;
|
|
9156
9567
|
function SetOrder(params) {
|
|
9157
9568
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9158
|
-
|
|
9569
|
+
let { api, viewId, bookmarkIds, req: reqParams } = params;
|
|
9570
|
+
if (!api) {
|
|
9571
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9572
|
+
}
|
|
9159
9573
|
const reqData = {
|
|
9160
9574
|
"UISlide.ID": bookmarkIds,
|
|
9161
9575
|
"DisplayOrder.Start": 0
|
|
@@ -9195,7 +9609,10 @@ var ProjectView;
|
|
|
9195
9609
|
})(Navigator = ProjectView.Navigator || (ProjectView.Navigator = {}));
|
|
9196
9610
|
function Get(params) {
|
|
9197
9611
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9198
|
-
|
|
9612
|
+
let { api, viewId, req: reqParams } = params;
|
|
9613
|
+
if (!api) {
|
|
9614
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9615
|
+
}
|
|
9199
9616
|
if (!viewId) {
|
|
9200
9617
|
throw ("View ID is required.");
|
|
9201
9618
|
}
|
|
@@ -9226,7 +9643,10 @@ var ProjectView;
|
|
|
9226
9643
|
ProjectView.Get = Get;
|
|
9227
9644
|
function GetList(params) {
|
|
9228
9645
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9229
|
-
|
|
9646
|
+
let { api, req: reqParams } = params;
|
|
9647
|
+
if (!api) {
|
|
9648
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9649
|
+
}
|
|
9230
9650
|
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
9231
9651
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
9232
9652
|
return cache.data;
|
|
@@ -9253,7 +9673,10 @@ var ProjectView;
|
|
|
9253
9673
|
ProjectView.GetList = GetList;
|
|
9254
9674
|
function Delete(params) {
|
|
9255
9675
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9256
|
-
|
|
9676
|
+
let { api, viewId, req: reqParams } = params;
|
|
9677
|
+
if (!api) {
|
|
9678
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9679
|
+
}
|
|
9257
9680
|
if (!viewId) {
|
|
9258
9681
|
throw ("View ID is required.");
|
|
9259
9682
|
}
|
|
@@ -9266,6 +9689,9 @@ var ProjectView;
|
|
|
9266
9689
|
function Update(params) {
|
|
9267
9690
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9268
9691
|
let { api, view: data, req: reqParams } = params;
|
|
9692
|
+
if (!api) {
|
|
9693
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9694
|
+
}
|
|
9269
9695
|
if (!data) {
|
|
9270
9696
|
data = {};
|
|
9271
9697
|
}
|
|
@@ -9328,7 +9754,10 @@ var ProjectViewLegacyTile;
|
|
|
9328
9754
|
function MergeMapTemplateData(params) {
|
|
9329
9755
|
var _a;
|
|
9330
9756
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9331
|
-
|
|
9757
|
+
let { getter, sources: items, addIfMissing, req: reqParams } = params;
|
|
9758
|
+
if (!getter) {
|
|
9759
|
+
getter = ENVIRONMENT.GetGetters().GetBruceGetter();
|
|
9760
|
+
}
|
|
9332
9761
|
const settings = yield getTemplateSettings(getter, reqParams);
|
|
9333
9762
|
const maps = (_a = settings.CesiumMapSources) !== null && _a !== void 0 ? _a : [];
|
|
9334
9763
|
for (let i = 0; i < maps.length; i++) {
|
|
@@ -9344,7 +9773,10 @@ var ProjectViewLegacyTile;
|
|
|
9344
9773
|
function MergeTerrainTemplateData(params) {
|
|
9345
9774
|
var _a;
|
|
9346
9775
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9347
|
-
|
|
9776
|
+
let { getter, sources: items, addIfMissing, req: reqParams } = params;
|
|
9777
|
+
if (!getter) {
|
|
9778
|
+
getter = ENVIRONMENT.GetGetters().GetBruceGetter();
|
|
9779
|
+
}
|
|
9348
9780
|
const settings = yield getTemplateSettings(getter, reqParams);
|
|
9349
9781
|
const terrains = (_a = settings.CesiumTerrainSources) !== null && _a !== void 0 ? _a : [];
|
|
9350
9782
|
for (let i = 0; i < terrains.length; i++) {
|
|
@@ -9505,7 +9937,10 @@ var PendingAction;
|
|
|
9505
9937
|
})(EMessageType = PendingAction.EMessageType || (PendingAction.EMessageType = {}));
|
|
9506
9938
|
function Get(params) {
|
|
9507
9939
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9508
|
-
|
|
9940
|
+
let { api, actionId, req: reqParams } = params;
|
|
9941
|
+
if (!api) {
|
|
9942
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9943
|
+
}
|
|
9509
9944
|
if (!actionId) {
|
|
9510
9945
|
throw ("Action ID is required.");
|
|
9511
9946
|
}
|
|
@@ -9518,7 +9953,10 @@ var PendingAction;
|
|
|
9518
9953
|
PendingAction.Get = Get;
|
|
9519
9954
|
function GetRelevantList(params) {
|
|
9520
9955
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9521
|
-
|
|
9956
|
+
let { api, stricter, reqParams } = params;
|
|
9957
|
+
if (!api) {
|
|
9958
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9959
|
+
}
|
|
9522
9960
|
const data = yield api.GET(`pendingActions/important?Update=${Boolean(stricter)}`, Api.PrepReqParams(reqParams));
|
|
9523
9961
|
return {
|
|
9524
9962
|
actions: data.Items
|
|
@@ -9529,6 +9967,9 @@ var PendingAction;
|
|
|
9529
9967
|
function GetMessages(params) {
|
|
9530
9968
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9531
9969
|
let { api, actionId, order, startIndex, amount, req: reqParams, types } = params;
|
|
9970
|
+
if (!api) {
|
|
9971
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
9972
|
+
}
|
|
9532
9973
|
if (amount == null) {
|
|
9533
9974
|
amount = 500;
|
|
9534
9975
|
}
|
|
@@ -9583,7 +10024,10 @@ var Style;
|
|
|
9583
10024
|
})(EPointType = Style.EPointType || (Style.EPointType = {}));
|
|
9584
10025
|
function GetList(params) {
|
|
9585
10026
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9586
|
-
|
|
10027
|
+
let { api, req: reqParams } = params;
|
|
10028
|
+
if (!api) {
|
|
10029
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
10030
|
+
}
|
|
9587
10031
|
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
9588
10032
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
9589
10033
|
return cache.data;
|
|
@@ -9610,7 +10054,10 @@ var Style;
|
|
|
9610
10054
|
Style.GetList = GetList;
|
|
9611
10055
|
function Get(params) {
|
|
9612
10056
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9613
|
-
|
|
10057
|
+
let { api, styleId: id, req: reqParams } = params;
|
|
10058
|
+
if (!api) {
|
|
10059
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
10060
|
+
}
|
|
9614
10061
|
if (!id) {
|
|
9615
10062
|
throw ("Style ID is required.");
|
|
9616
10063
|
}
|
|
@@ -9640,7 +10087,10 @@ var Style;
|
|
|
9640
10087
|
Style.Get = Get;
|
|
9641
10088
|
function Update(params) {
|
|
9642
10089
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9643
|
-
|
|
10090
|
+
let { api, style: data, req: reqParams } = params;
|
|
10091
|
+
if (!api) {
|
|
10092
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
10093
|
+
}
|
|
9644
10094
|
if (!(data === null || data === void 0 ? void 0 : data.Name)) {
|
|
9645
10095
|
throw ("Style name is required.");
|
|
9646
10096
|
}
|
|
@@ -9658,7 +10108,10 @@ var Style;
|
|
|
9658
10108
|
Style.Update = Update;
|
|
9659
10109
|
function Delete(params) {
|
|
9660
10110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9661
|
-
|
|
10111
|
+
let { api, styleId: id, req: reqParams } = params;
|
|
10112
|
+
if (!api) {
|
|
10113
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
10114
|
+
}
|
|
9662
10115
|
if (!id) {
|
|
9663
10116
|
throw ("Style ID is required.");
|
|
9664
10117
|
}
|
|
@@ -9700,7 +10153,10 @@ var Session;
|
|
|
9700
10153
|
}
|
|
9701
10154
|
function Get(params) {
|
|
9702
10155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9703
|
-
|
|
10156
|
+
let { api, sessionId, req: reqParams } = params;
|
|
10157
|
+
if (!api) {
|
|
10158
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10159
|
+
}
|
|
9704
10160
|
if (!sessionId) {
|
|
9705
10161
|
throw ("Session ID is required.");
|
|
9706
10162
|
}
|
|
@@ -9738,7 +10194,10 @@ var Session;
|
|
|
9738
10194
|
*/
|
|
9739
10195
|
function Login(params) {
|
|
9740
10196
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9741
|
-
|
|
10197
|
+
let { api, username, password, accountId, req: reqParams } = params;
|
|
10198
|
+
if (!api) {
|
|
10199
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10200
|
+
}
|
|
9742
10201
|
const data = yield api.POST("login", {
|
|
9743
10202
|
account: accountId ? accountId : "",
|
|
9744
10203
|
login: username,
|
|
@@ -9756,7 +10215,10 @@ var Session;
|
|
|
9756
10215
|
Session.Login = Login;
|
|
9757
10216
|
function Logout(params) {
|
|
9758
10217
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9759
|
-
|
|
10218
|
+
let { api, req: reqParams } = params;
|
|
10219
|
+
if (!api) {
|
|
10220
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10221
|
+
}
|
|
9760
10222
|
const ssid = api.GetSessionId();
|
|
9761
10223
|
if (ssid) {
|
|
9762
10224
|
yield api.POST("logout", null, reqParams);
|
|
@@ -9828,7 +10290,10 @@ var UserGroup;
|
|
|
9828
10290
|
(function (UserGroup) {
|
|
9829
10291
|
function GetByName(params) {
|
|
9830
10292
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9831
|
-
|
|
10293
|
+
let { api, accountId, name, req: reqParams } = params;
|
|
10294
|
+
if (!api) {
|
|
10295
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10296
|
+
}
|
|
9832
10297
|
if (!name || !accountId) {
|
|
9833
10298
|
throw ("Name and AccountID are required.");
|
|
9834
10299
|
}
|
|
@@ -9841,7 +10306,10 @@ var UserGroup;
|
|
|
9841
10306
|
UserGroup.GetByName = GetByName;
|
|
9842
10307
|
function GetUsers(params) {
|
|
9843
10308
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9844
|
-
|
|
10309
|
+
let { api, accountId, groupId: id, req: reqParams } = params;
|
|
10310
|
+
if (!api) {
|
|
10311
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10312
|
+
}
|
|
9845
10313
|
if (!accountId || !id) {
|
|
9846
10314
|
throw ("AccountID and ID are required.");
|
|
9847
10315
|
}
|
|
@@ -9854,7 +10322,10 @@ var UserGroup;
|
|
|
9854
10322
|
UserGroup.GetUsers = GetUsers;
|
|
9855
10323
|
function GetListByPerm(params) {
|
|
9856
10324
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9857
|
-
|
|
10325
|
+
let { api, accountId, perm, req: reqParams } = params;
|
|
10326
|
+
if (!api) {
|
|
10327
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10328
|
+
}
|
|
9858
10329
|
if (!accountId || !perm) {
|
|
9859
10330
|
throw ("AccountID and Perm are required.");
|
|
9860
10331
|
}
|
|
@@ -9867,7 +10338,10 @@ var UserGroup;
|
|
|
9867
10338
|
UserGroup.GetListByPerm = GetListByPerm;
|
|
9868
10339
|
function GetList(params) {
|
|
9869
10340
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9870
|
-
|
|
10341
|
+
let { api, accountId, req: reqParams } = params;
|
|
10342
|
+
if (!api) {
|
|
10343
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10344
|
+
}
|
|
9871
10345
|
if (!accountId) {
|
|
9872
10346
|
throw ("AccountID is required.");
|
|
9873
10347
|
}
|
|
@@ -9880,7 +10354,10 @@ var UserGroup;
|
|
|
9880
10354
|
UserGroup.GetList = GetList;
|
|
9881
10355
|
function Delete(params) {
|
|
9882
10356
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9883
|
-
|
|
10357
|
+
let { api, accountId, groupId: id, req: reqParams } = params;
|
|
10358
|
+
if (!api) {
|
|
10359
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10360
|
+
}
|
|
9884
10361
|
if (!accountId || !id) {
|
|
9885
10362
|
throw ("AccountID and ID are required.");
|
|
9886
10363
|
}
|
|
@@ -9890,7 +10367,10 @@ var UserGroup;
|
|
|
9890
10367
|
UserGroup.Delete = Delete;
|
|
9891
10368
|
function Update(params) {
|
|
9892
10369
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9893
|
-
|
|
10370
|
+
let { api, group: data, reqParams } = params;
|
|
10371
|
+
if (!api) {
|
|
10372
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10373
|
+
}
|
|
9894
10374
|
if (!data.Name || !data["ClientAccount.ID"]) {
|
|
9895
10375
|
throw ("User group name and client account ID are required.");
|
|
9896
10376
|
}
|
|
@@ -9937,7 +10417,10 @@ var User;
|
|
|
9937
10417
|
})(EType = User.EType || (User.EType = {}));
|
|
9938
10418
|
function Get(params) {
|
|
9939
10419
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9940
|
-
|
|
10420
|
+
let { api, userId: id, accountId, req: reqParams } = params;
|
|
10421
|
+
if (!api) {
|
|
10422
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10423
|
+
}
|
|
9941
10424
|
if (!id) {
|
|
9942
10425
|
throw ("ID is required.");
|
|
9943
10426
|
}
|
|
@@ -9968,7 +10451,10 @@ var User;
|
|
|
9968
10451
|
function Update(params) {
|
|
9969
10452
|
var _a;
|
|
9970
10453
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9971
|
-
|
|
10454
|
+
let { api, user: data, req: reqParams } = params;
|
|
10455
|
+
if (!api) {
|
|
10456
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10457
|
+
}
|
|
9972
10458
|
if (!(data === null || data === void 0 ? void 0 : data.ID) || !(data === null || data === void 0 ? void 0 : data.Type)) {
|
|
9973
10459
|
throw ("ID and Type are required.");
|
|
9974
10460
|
}
|
|
@@ -10006,7 +10492,10 @@ var User;
|
|
|
10006
10492
|
*/
|
|
10007
10493
|
function GetSettings(params) {
|
|
10008
10494
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10009
|
-
|
|
10495
|
+
let { api, userId, appId, req } = params;
|
|
10496
|
+
if (!api) {
|
|
10497
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10498
|
+
}
|
|
10010
10499
|
if (!userId || !appId) {
|
|
10011
10500
|
throw ("UserId and appId are required.");
|
|
10012
10501
|
}
|
|
@@ -10053,7 +10542,10 @@ var User;
|
|
|
10053
10542
|
*/
|
|
10054
10543
|
function UpdateSettings(params) {
|
|
10055
10544
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10056
|
-
|
|
10545
|
+
let { api, accId, userId, appId, settings, req } = params;
|
|
10546
|
+
if (!api) {
|
|
10547
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10548
|
+
}
|
|
10057
10549
|
if (!userId || !appId) {
|
|
10058
10550
|
throw ("UserId and appId are required.");
|
|
10059
10551
|
}
|
|
@@ -10071,7 +10563,10 @@ var User;
|
|
|
10071
10563
|
User.UpdateSettings = UpdateSettings;
|
|
10072
10564
|
function GetUsernameAvailable(params) {
|
|
10073
10565
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10074
|
-
|
|
10566
|
+
let { api, username, excludeUserId, req: reqParams } = params;
|
|
10567
|
+
if (!api) {
|
|
10568
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10569
|
+
}
|
|
10075
10570
|
if (!username) {
|
|
10076
10571
|
throw ("Username is required.");
|
|
10077
10572
|
}
|
|
@@ -10099,7 +10594,10 @@ var User;
|
|
|
10099
10594
|
LoginUser.GetListCacheKey = GetListCacheKey;
|
|
10100
10595
|
function GetByEmail(params) {
|
|
10101
10596
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10102
|
-
|
|
10597
|
+
let { api, email, accountId, req: reqParams } = params;
|
|
10598
|
+
if (!api) {
|
|
10599
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10600
|
+
}
|
|
10103
10601
|
if (!email) {
|
|
10104
10602
|
throw ("Email is required.");
|
|
10105
10603
|
}
|
|
@@ -10130,6 +10628,9 @@ var User;
|
|
|
10130
10628
|
function GetList(params) {
|
|
10131
10629
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10132
10630
|
let { api, accountId, exclusive, req: reqParams } = params;
|
|
10631
|
+
if (!api) {
|
|
10632
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10633
|
+
}
|
|
10133
10634
|
if (!accountId) {
|
|
10134
10635
|
throw ("Client account ID is required.");
|
|
10135
10636
|
}
|
|
@@ -10181,7 +10682,10 @@ var User;
|
|
|
10181
10682
|
*/
|
|
10182
10683
|
function Signup(params) {
|
|
10183
10684
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10184
|
-
|
|
10685
|
+
let { api, email, req: reqParams } = params;
|
|
10686
|
+
if (!api) {
|
|
10687
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10688
|
+
}
|
|
10185
10689
|
if (!email) {
|
|
10186
10690
|
throw ("Email is required.");
|
|
10187
10691
|
}
|
|
@@ -10198,7 +10702,10 @@ var User;
|
|
|
10198
10702
|
*/
|
|
10199
10703
|
function SignupResend(params) {
|
|
10200
10704
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10201
|
-
|
|
10705
|
+
let { api, expiredCode, req: reqParams } = params;
|
|
10706
|
+
if (!api) {
|
|
10707
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10708
|
+
}
|
|
10202
10709
|
if (!expiredCode) {
|
|
10203
10710
|
throw ("Expired activation code is required.");
|
|
10204
10711
|
}
|
|
@@ -10214,6 +10721,9 @@ var User;
|
|
|
10214
10721
|
function SignupComplete(params) {
|
|
10215
10722
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10216
10723
|
let { api, code, user: data, accountId, req: reqParams } = params;
|
|
10724
|
+
if (!api) {
|
|
10725
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10726
|
+
}
|
|
10217
10727
|
if (!code || !(data === null || data === void 0 ? void 0 : data.Login) || !(data === null || data === void 0 ? void 0 : data.Password)) {
|
|
10218
10728
|
throw ("Login, password, and activation code are required.");
|
|
10219
10729
|
}
|
|
@@ -10239,7 +10749,10 @@ var User;
|
|
|
10239
10749
|
*/
|
|
10240
10750
|
function ForgotPassword(params) {
|
|
10241
10751
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10242
|
-
|
|
10752
|
+
let { api, accountId, email, req: reqParams } = params;
|
|
10753
|
+
if (!api) {
|
|
10754
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10755
|
+
}
|
|
10243
10756
|
if (!accountId || !email) {
|
|
10244
10757
|
throw ("Account ID and email are required.");
|
|
10245
10758
|
}
|
|
@@ -10268,7 +10781,10 @@ var User;
|
|
|
10268
10781
|
*/
|
|
10269
10782
|
function ForgotPasswordComplete(params) {
|
|
10270
10783
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10271
|
-
|
|
10784
|
+
let { api, code, userId, password, req: reqParams } = params;
|
|
10785
|
+
if (!api) {
|
|
10786
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10787
|
+
}
|
|
10272
10788
|
const { user } = yield Get({
|
|
10273
10789
|
api: api,
|
|
10274
10790
|
userId: userId,
|
|
@@ -10297,7 +10813,10 @@ var User;
|
|
|
10297
10813
|
AccessToken.GetListCacheKey = GetListCacheKey;
|
|
10298
10814
|
function GetList(params) {
|
|
10299
10815
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10300
|
-
|
|
10816
|
+
let { api, accountId, req: reqParams } = params;
|
|
10817
|
+
if (!api) {
|
|
10818
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10819
|
+
}
|
|
10301
10820
|
const cache = yield api.GetCacheItem(GetListCacheKey(accountId), reqParams);
|
|
10302
10821
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
10303
10822
|
return cache.data;
|
|
@@ -10336,7 +10855,10 @@ var User;
|
|
|
10336
10855
|
AccessToken.GetList = GetList;
|
|
10337
10856
|
function Delete(params) {
|
|
10338
10857
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10339
|
-
|
|
10858
|
+
let { api, tokenId: id, req: reqParams } = params;
|
|
10859
|
+
if (!api) {
|
|
10860
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10861
|
+
}
|
|
10340
10862
|
yield api.DELETE(`accessToken/${id}`, reqParams);
|
|
10341
10863
|
api.Cache.RemoveByContains(Api.ECacheKey.User + Api.ECacheKey.Id + id);
|
|
10342
10864
|
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.AccessToken + Api.ECacheKey.Account);
|
|
@@ -10346,6 +10868,9 @@ var User;
|
|
|
10346
10868
|
function Create(params) {
|
|
10347
10869
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10348
10870
|
let { api, token: data, req: reqParams } = params;
|
|
10871
|
+
if (!api) {
|
|
10872
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10873
|
+
}
|
|
10349
10874
|
if (!data) {
|
|
10350
10875
|
data = {};
|
|
10351
10876
|
}
|
|
@@ -10384,7 +10909,10 @@ var AccountInvite;
|
|
|
10384
10909
|
})(EInviteMethod = AccountInvite.EInviteMethod || (AccountInvite.EInviteMethod = {}));
|
|
10385
10910
|
function GetByCode(params) {
|
|
10386
10911
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10387
|
-
|
|
10912
|
+
let { api, code, req } = params;
|
|
10913
|
+
if (!api) {
|
|
10914
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10915
|
+
}
|
|
10388
10916
|
const res = yield api.GET(`invite/code?inviteCode=${code}`, Api.PrepReqParams(req));
|
|
10389
10917
|
return res;
|
|
10390
10918
|
});
|
|
@@ -10392,7 +10920,10 @@ var AccountInvite;
|
|
|
10392
10920
|
AccountInvite.GetByCode = GetByCode;
|
|
10393
10921
|
function GetList(params) {
|
|
10394
10922
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10395
|
-
|
|
10923
|
+
let { api, accountId, userId, req } = params;
|
|
10924
|
+
if (!api) {
|
|
10925
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10926
|
+
}
|
|
10396
10927
|
const urlParams = new URLSearchParams();
|
|
10397
10928
|
if (accountId) {
|
|
10398
10929
|
urlParams.append("accountId", accountId);
|
|
@@ -10407,7 +10938,10 @@ var AccountInvite;
|
|
|
10407
10938
|
AccountInvite.GetList = GetList;
|
|
10408
10939
|
function Update(params) {
|
|
10409
10940
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10410
|
-
|
|
10941
|
+
let { api, code, status, user, req } = params;
|
|
10942
|
+
if (!api) {
|
|
10943
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10944
|
+
}
|
|
10411
10945
|
const res = yield api.POST("invite/update", {
|
|
10412
10946
|
InviteCode: code,
|
|
10413
10947
|
Status: status,
|
|
@@ -10419,7 +10953,10 @@ var AccountInvite;
|
|
|
10419
10953
|
AccountInvite.Update = Update;
|
|
10420
10954
|
function Create(params) {
|
|
10421
10955
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10422
|
-
|
|
10956
|
+
let { api, accountId, login, userId, email, mobile, emailTemplateKey, groupIds, req } = params;
|
|
10957
|
+
if (!api) {
|
|
10958
|
+
api = ENVIRONMENT.GetGetters().GetGuardianApi();
|
|
10959
|
+
}
|
|
10423
10960
|
const res = yield api.POST("invite/new", {
|
|
10424
10961
|
accountId,
|
|
10425
10962
|
login,
|
|
@@ -10554,6 +11091,9 @@ var DataLab;
|
|
|
10554
11091
|
function Run(params) {
|
|
10555
11092
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10556
11093
|
let { api, query, key, skip, load, req: reqParams } = params;
|
|
11094
|
+
if (!api) {
|
|
11095
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11096
|
+
}
|
|
10557
11097
|
if (!key) {
|
|
10558
11098
|
key = EReqKey.Primary;
|
|
10559
11099
|
}
|
|
@@ -10589,14 +11129,20 @@ var ImportCad;
|
|
|
10589
11129
|
(function (ImportCad) {
|
|
10590
11130
|
function Analyze(params) {
|
|
10591
11131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10592
|
-
|
|
11132
|
+
let { api, fileAnalyze, req: reqParams } = params;
|
|
11133
|
+
if (!api) {
|
|
11134
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11135
|
+
}
|
|
10593
11136
|
return api.POST("entities/PrepareIFCForImport", fileAnalyze, Api.PrepReqParams(reqParams));
|
|
10594
11137
|
});
|
|
10595
11138
|
}
|
|
10596
11139
|
ImportCad.Analyze = Analyze;
|
|
10597
11140
|
function ImportEntities(params) {
|
|
10598
11141
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10599
|
-
|
|
11142
|
+
let { api, fileImport, req: reqParams } = params;
|
|
11143
|
+
if (!api) {
|
|
11144
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11145
|
+
}
|
|
10600
11146
|
return api.POST("entities/importIFCWithProgress", fileImport, Api.PrepReqParams(reqParams));
|
|
10601
11147
|
});
|
|
10602
11148
|
}
|
|
@@ -10626,7 +11172,10 @@ var ImportCsv;
|
|
|
10626
11172
|
(function (ImportCsv) {
|
|
10627
11173
|
function ImportEntities(params) {
|
|
10628
11174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10629
|
-
|
|
11175
|
+
let { api, fileImport, req: reqParams } = params;
|
|
11176
|
+
if (!api) {
|
|
11177
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11178
|
+
}
|
|
10630
11179
|
return api.POST("entities/importCSVWithProgress2", fileImport, Api.PrepReqParams(reqParams));
|
|
10631
11180
|
});
|
|
10632
11181
|
}
|
|
@@ -10637,7 +11186,10 @@ var ImportJson;
|
|
|
10637
11186
|
(function (ImportJson) {
|
|
10638
11187
|
function ImportEntities(params) {
|
|
10639
11188
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10640
|
-
|
|
11189
|
+
let { api, fileImport, req: reqParams } = params;
|
|
11190
|
+
if (!api) {
|
|
11191
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11192
|
+
}
|
|
10641
11193
|
return api.POST("entities/importJsonWithProgress", fileImport, Api.PrepReqParams(reqParams));
|
|
10642
11194
|
});
|
|
10643
11195
|
}
|
|
@@ -10648,7 +11200,10 @@ var ImportKml;
|
|
|
10648
11200
|
(function (ImportKml) {
|
|
10649
11201
|
function ImportEntities(params) {
|
|
10650
11202
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10651
|
-
|
|
11203
|
+
let { api, fileImport, req: reqParams } = params;
|
|
11204
|
+
if (!api) {
|
|
11205
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11206
|
+
}
|
|
10652
11207
|
return api.POST("entities/importKMLWithProgress2", fileImport, Api.PrepReqParams(reqParams));
|
|
10653
11208
|
});
|
|
10654
11209
|
}
|
|
@@ -10677,6 +11232,9 @@ var ImportedFile;
|
|
|
10677
11232
|
function GetList(params) {
|
|
10678
11233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10679
11234
|
let { api, fileType: type, pageIndex, req: reqParams } = params;
|
|
11235
|
+
if (!api) {
|
|
11236
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11237
|
+
}
|
|
10680
11238
|
if (!type) {
|
|
10681
11239
|
type = EFileType.All;
|
|
10682
11240
|
}
|
|
@@ -10719,7 +11277,10 @@ var ImportedFile;
|
|
|
10719
11277
|
ImportedFile.GetList = GetList;
|
|
10720
11278
|
function GetListByRootId(params) {
|
|
10721
11279
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10722
|
-
|
|
11280
|
+
let { api, rootId, req: reqParams } = params;
|
|
11281
|
+
if (!api) {
|
|
11282
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11283
|
+
}
|
|
10723
11284
|
const cache = yield api.GetCacheItem(GetCacheKeyByRootId(rootId), reqParams);
|
|
10724
11285
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
10725
11286
|
return cache.data;
|
|
@@ -10746,7 +11307,10 @@ var ImportedFile;
|
|
|
10746
11307
|
ImportedFile.GetListByRootId = GetListByRootId;
|
|
10747
11308
|
function Get(params) {
|
|
10748
11309
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10749
|
-
|
|
11310
|
+
let { api, importedFileId: fileId, req: reqParams } = params;
|
|
11311
|
+
if (!api) {
|
|
11312
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11313
|
+
}
|
|
10750
11314
|
const cache = yield api.GetCacheItem(GetCacheKey(fileId), reqParams);
|
|
10751
11315
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
10752
11316
|
return cache.data;
|
|
@@ -10968,7 +11532,10 @@ var Plugin;
|
|
|
10968
11532
|
Plugin.GetListCacheKey = GetListCacheKey;
|
|
10969
11533
|
function Get(params) {
|
|
10970
11534
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10971
|
-
|
|
11535
|
+
let { api, pluginId, req } = params;
|
|
11536
|
+
if (!api) {
|
|
11537
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11538
|
+
}
|
|
10972
11539
|
if (!pluginId) {
|
|
10973
11540
|
throw ("Plugin ID is required.");
|
|
10974
11541
|
}
|
|
@@ -10998,7 +11565,10 @@ var Plugin;
|
|
|
10998
11565
|
Plugin.Get = Get;
|
|
10999
11566
|
function GetList(params) {
|
|
11000
11567
|
return __awaiter(this, void 0, void 0, function* () {
|
|
11001
|
-
|
|
11568
|
+
let { api, req } = params;
|
|
11569
|
+
if (!api) {
|
|
11570
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11571
|
+
}
|
|
11002
11572
|
const cache = yield api.GetCacheItem(GetListCacheKey(), req);
|
|
11003
11573
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
11004
11574
|
return cache.data;
|
|
@@ -11025,6 +11595,9 @@ var Plugin;
|
|
|
11025
11595
|
Plugin.GetList = GetList;
|
|
11026
11596
|
function GetLoadUrl(params) {
|
|
11027
11597
|
let { api, pluginId, req, cacheKey } = params;
|
|
11598
|
+
if (!api) {
|
|
11599
|
+
api = ENVIRONMENT.GetGetters().GetBruceApi();
|
|
11600
|
+
}
|
|
11028
11601
|
if (!cacheKey) {
|
|
11029
11602
|
cacheKey = 0;
|
|
11030
11603
|
}
|
|
@@ -11035,5 +11608,5 @@ var Plugin;
|
|
|
11035
11608
|
Plugin.GetLoadUrl = GetLoadUrl;
|
|
11036
11609
|
})(Plugin || (Plugin = {}));
|
|
11037
11610
|
|
|
11038
|
-
export { AnnDocument, CustomForm, CustomFormContent, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, EntityTypeVisualSettings, EntityAttribute, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin };
|
|
11611
|
+
export { AnnDocument, CustomForm, CustomFormContent, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, EntityTypeVisualSettings, EntityAttribute, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT };
|
|
11039
11612
|
//# sourceMappingURL=bruce-models.es5.js.map
|