bruce-models 2.3.7 → 2.3.8
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 +8041 -8037
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +7805 -7801
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-invite.js +81 -81
- package/dist/lib/account/account-settings.js +2 -2
- package/dist/lib/account/account.js +169 -169
- package/dist/lib/account/account.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +94 -94
- package/dist/lib/api/abstract-api.js +269 -269
- package/dist/lib/api/api-getters.js +172 -172
- package/dist/lib/api/api.js +93 -93
- package/dist/lib/api/bruce-api.js +224 -224
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/api/cam-api.js +88 -88
- package/dist/lib/api/global-api.js +82 -82
- package/dist/lib/api/guardian-api.js +82 -82
- package/dist/lib/api/idm-api.js +90 -90
- package/dist/lib/bruce-models.js +95 -91
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/calculator/calculator.js +341 -341
- package/dist/lib/client-file/client-file.js +255 -255
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/common/bounds.js +61 -61
- package/dist/lib/common/bruce-event.js +46 -46
- package/dist/lib/common/bruce-variable.js +60 -60
- package/dist/lib/common/cache.js +188 -188
- package/dist/lib/common/cache.js.map +1 -1
- package/dist/lib/common/camera.js +11 -11
- package/dist/lib/common/cartes.js +123 -123
- package/dist/lib/common/carto.js +60 -60
- package/dist/lib/common/color.js +86 -86
- package/dist/lib/common/delay-queue.js +56 -56
- package/dist/lib/common/dictionary.js +2 -2
- package/dist/lib/common/geometry.js +120 -120
- package/dist/lib/common/lru-cache.js +25 -25
- package/dist/lib/common/transform.js +2 -2
- package/dist/lib/common/utc.js +39 -39
- package/dist/lib/custom-form/custom-form-content.js +26 -26
- package/dist/lib/custom-form/custom-form.js +114 -114
- package/dist/lib/data-lab/data-lab.js +49 -49
- package/dist/lib/entity/entity-attachment-type.js +87 -87
- package/dist/lib/entity/entity-attachment-type.js.map +1 -1
- package/dist/lib/entity/entity-attachment.js +126 -126
- package/dist/lib/entity/entity-attachment.js.map +1 -1
- package/dist/lib/entity/entity-attribute.js +29 -29
- package/dist/lib/entity/entity-comment.js +86 -86
- package/dist/lib/entity/entity-comment.js.map +1 -1
- package/dist/lib/entity/entity-coords.js +153 -153
- package/dist/lib/entity/entity-coords.js.map +1 -1
- package/dist/lib/entity/entity-link.js +86 -86
- package/dist/lib/entity/entity-link.js.map +1 -1
- package/dist/lib/entity/entity-lod-category.js +108 -108
- package/dist/lib/entity/entity-lod.js +197 -197
- package/dist/lib/entity/entity-lod.js.map +1 -1
- package/dist/lib/entity/entity-relation-type.js +117 -117
- package/dist/lib/entity/entity-relation-type.js.map +1 -1
- package/dist/lib/entity/entity-relation.js +157 -157
- package/dist/lib/entity/entity-source.js +136 -136
- package/dist/lib/entity/entity-source.js.map +1 -1
- package/dist/lib/entity/entity-tag.js +157 -157
- package/dist/lib/entity/entity-type-visual-settings.js +13 -13
- package/dist/lib/entity/entity-type.js +122 -122
- package/dist/lib/entity/entity.js +341 -341
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/entity/getters/batched-data-getter.js +84 -84
- package/dist/lib/entity/getters/batched-data-getter.js.map +1 -1
- package/dist/lib/entity/getters/entity-filter-getter.js +316 -316
- package/dist/lib/entity/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/entity/getters/entity-globe.js +175 -175
- package/dist/lib/entity/getters/view-monitor.js +2 -2
- package/dist/lib/import/import-cad.js +53 -53
- package/dist/lib/import/import-cad.js.map +1 -1
- package/dist/lib/import/import-csv.js +23 -23
- package/dist/lib/import/import-json.js +23 -23
- package/dist/lib/import/import-kml.js +23 -23
- package/dist/lib/import/imported-file.js +130 -130
- package/dist/lib/internal/uploader.js +76 -76
- package/dist/lib/internal/uploader.js.map +1 -1
- package/dist/lib/markup/markup.js +185 -185
- package/dist/lib/plugin/plugin.js +91 -91
- package/dist/lib/program-key/program-key.js +120 -120
- package/dist/lib/program-key/program-key.js.map +1 -1
- package/dist/lib/project/menu-item.js +122 -122
- package/dist/lib/project/project-view-bookmark.js +159 -159
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/project/project-view-legacy-tile.js +77 -77
- package/dist/lib/project/project-view-legacy-tile.js.map +1 -1
- package/dist/lib/project/project-view-tile.js +125 -125
- package/dist/lib/project/project-view.js +141 -141
- package/dist/lib/project/zoom-control.js +17 -17
- package/dist/lib/server/hosting-location.js +156 -156
- package/dist/lib/server/hosting-location.js.map +1 -1
- package/dist/lib/server/message-broker.js +142 -142
- package/dist/lib/server/message-broker.js.map +1 -1
- package/dist/lib/server/pending-action.js +83 -83
- package/dist/lib/server/task.js +63 -63
- package/dist/lib/style/style.js +129 -129
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/tileset/tileset.js +431 -431
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/lib/user/permission.js +20 -20
- package/dist/lib/user/session.js +145 -142
- package/dist/lib/user/session.js.map +1 -1
- package/dist/lib/user/user-group.js +94 -94
- package/dist/lib/user/user.js +475 -474
- package/dist/lib/user/user.js.map +1 -1
- package/dist/lib/util/encrypt-utils.js +19 -19
- package/dist/lib/util/math-utils.js +40 -40
- package/dist/lib/util/object-utils.js +17 -17
- package/dist/lib/util/path-utils.js +61 -61
- package/dist/lib/util/url-utils.js +94 -94
- package/dist/lib/util/url-utils.js.map +1 -1
- package/dist/types/account/account-invite.d.ts +68 -68
- package/dist/types/account/account-settings.d.ts +24 -24
- package/dist/types/account/account.d.ts +84 -84
- package/dist/types/ann-document/ann-document.d.ts +50 -50
- package/dist/types/api/abstract-api.d.ts +36 -36
- package/dist/types/api/api-getters.d.ts +64 -64
- package/dist/types/api/api.d.ts +93 -93
- package/dist/types/api/bruce-api.d.ts +64 -64
- package/dist/types/api/cam-api.d.ts +26 -26
- package/dist/types/api/global-api.d.ts +25 -25
- package/dist/types/api/guardian-api.d.ts +25 -25
- package/dist/types/api/idm-api.d.ts +28 -28
- package/dist/types/bruce-models.d.ts +79 -79
- package/dist/types/calculator/calculator.d.ts +61 -61
- package/dist/types/client-file/client-file.d.ts +130 -130
- package/dist/types/common/bounds.d.ts +30 -30
- package/dist/types/common/bruce-event.d.ts +12 -12
- package/dist/types/common/bruce-variable.d.ts +21 -21
- package/dist/types/common/cache.d.ts +57 -57
- package/dist/types/common/camera.d.ts +6 -6
- package/dist/types/common/cartes.d.ts +51 -51
- package/dist/types/common/carto.d.ts +15 -15
- package/dist/types/common/color.d.ts +24 -24
- package/dist/types/common/delay-queue.d.ts +14 -14
- package/dist/types/common/dictionary.d.ts +3 -3
- package/dist/types/common/geometry.d.ts +44 -44
- package/dist/types/common/lru-cache.d.ts +7 -7
- package/dist/types/common/transform.d.ts +15 -15
- package/dist/types/common/utc.d.ts +29 -29
- package/dist/types/custom-form/custom-form-content.d.ts +60 -60
- package/dist/types/custom-form/custom-form.d.ts +49 -49
- package/dist/types/data-lab/data-lab.d.ts +28 -28
- package/dist/types/entity/entity-attachment-type.d.ts +39 -39
- package/dist/types/entity/entity-attachment.d.ts +61 -61
- package/dist/types/entity/entity-attribute.d.ts +39 -39
- package/dist/types/entity/entity-comment.d.ts +40 -40
- package/dist/types/entity/entity-coords.d.ts +66 -66
- package/dist/types/entity/entity-link.d.ts +36 -36
- package/dist/types/entity/entity-lod-category.d.ts +36 -36
- package/dist/types/entity/entity-lod.d.ts +99 -99
- package/dist/types/entity/entity-relation-type.d.ts +44 -44
- package/dist/types/entity/entity-relation.d.ts +59 -59
- package/dist/types/entity/entity-source.d.ts +45 -45
- package/dist/types/entity/entity-tag.d.ts +53 -53
- package/dist/types/entity/entity-type-visual-settings.d.ts +16 -16
- package/dist/types/entity/entity-type.d.ts +63 -63
- package/dist/types/entity/entity.d.ts +118 -118
- package/dist/types/entity/getters/batched-data-getter.d.ts +26 -26
- package/dist/types/entity/getters/entity-filter-getter.d.ts +61 -61
- package/dist/types/entity/getters/entity-globe.d.ts +21 -21
- package/dist/types/entity/getters/view-monitor.d.ts +13 -13
- package/dist/types/import/import-cad.d.ts +49 -49
- package/dist/types/import/import-csv.d.ts +31 -31
- package/dist/types/import/import-json.d.ts +26 -26
- package/dist/types/import/import-kml.d.ts +19 -19
- package/dist/types/import/imported-file.d.ts +47 -47
- package/dist/types/internal/uploader.d.ts +16 -16
- package/dist/types/markup/markup.d.ts +227 -227
- package/dist/types/plugin/plugin.d.ts +39 -39
- package/dist/types/program-key/program-key.d.ts +48 -48
- package/dist/types/project/menu-item.d.ts +169 -169
- package/dist/types/project/project-view-bookmark.d.ts +179 -179
- package/dist/types/project/project-view-legacy-tile.d.ts +48 -48
- package/dist/types/project/project-view-tile.d.ts +65 -65
- package/dist/types/project/project-view.d.ts +136 -136
- package/dist/types/project/zoom-control.d.ts +22 -22
- package/dist/types/server/hosting-location.d.ts +74 -74
- package/dist/types/server/message-broker.d.ts +86 -86
- package/dist/types/server/pending-action.d.ts +66 -66
- package/dist/types/server/task.d.ts +36 -36
- package/dist/types/style/style.d.ts +107 -107
- package/dist/types/tileset/tileset.d.ts +264 -264
- package/dist/types/user/permission.d.ts +15 -15
- package/dist/types/user/session.d.ts +72 -66
- package/dist/types/user/user-group.d.ts +58 -58
- package/dist/types/user/user.d.ts +189 -188
- package/dist/types/util/encrypt-utils.d.ts +3 -3
- package/dist/types/util/math-utils.d.ts +16 -16
- package/dist/types/util/object-utils.d.ts +7 -7
- package/dist/types/util/path-utils.d.ts +8 -8
- package/dist/types/util/url-utils.d.ts +26 -26
- package/package.json +79 -78
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.EntityAttachmentType = void 0;
|
|
13
|
-
const api_1 = require("../api/api");
|
|
14
|
-
/**
|
|
15
|
-
* Describes the "Entity Attachment Type" concept within Bruce.
|
|
16
|
-
* It is a record that describes the purpose of an attachment.
|
|
17
|
-
*/
|
|
18
|
-
var EntityAttachmentType;
|
|
19
|
-
(function (EntityAttachmentType) {
|
|
20
|
-
function GetCacheKey(id) {
|
|
21
|
-
return api_1.Api.ECacheKey.AttachmentType + api_1.Api.ECacheKey.Id + id;
|
|
22
|
-
}
|
|
23
|
-
EntityAttachmentType.GetCacheKey = GetCacheKey;
|
|
24
|
-
function GetListCacheKey() {
|
|
25
|
-
return api_1.Api.ECacheKey.AttachmentType;
|
|
26
|
-
}
|
|
27
|
-
EntityAttachmentType.GetListCacheKey = GetListCacheKey;
|
|
28
|
-
let EType;
|
|
29
|
-
(function (EType) {
|
|
30
|
-
EType["Photo"] = "photo";
|
|
31
|
-
EType["Document"] = "document";
|
|
32
|
-
})(EType = EntityAttachmentType.EType || (EntityAttachmentType.EType = {}));
|
|
33
|
-
function Delete(params) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const { api, attachmentTypeId: id, req: reqParams } = params;
|
|
36
|
-
if (!id) {
|
|
37
|
-
throw ("Type ID is required.");
|
|
38
|
-
}
|
|
39
|
-
yield api.DELETE(`entityAttachmentType/${id}`, api_1.Api.PrepReqParams(reqParams));
|
|
40
|
-
api.Cache.Remove(GetCacheKey(id));
|
|
41
|
-
api.Cache.Remove(GetListCacheKey());
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
EntityAttachmentType.Delete = Delete;
|
|
45
|
-
function Update(params) {
|
|
46
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
const { api, attachmentType: data, req: reqParams } = params;
|
|
48
|
-
if (!(data === null || data === void 0 ? void 0 : data.ID)) {
|
|
49
|
-
throw ("Type ID is required.");
|
|
50
|
-
}
|
|
51
|
-
const res = yield api.POST(`entityAttachmentType/${data.ID}`, data, api_1.Api.PrepReqParams(reqParams));
|
|
52
|
-
api.Cache.Remove(GetCacheKey(data.ID));
|
|
53
|
-
api.Cache.Remove(GetListCacheKey());
|
|
54
|
-
return {
|
|
55
|
-
attachmentType: res
|
|
56
|
-
};
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
EntityAttachmentType.Update = Update;
|
|
60
|
-
function GetList(params) {
|
|
61
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
const { api, reqParams } = params;
|
|
63
|
-
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
64
|
-
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
65
|
-
return cache.data;
|
|
66
|
-
}
|
|
67
|
-
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
try {
|
|
69
|
-
const data = yield api.GET(`entityAttachmentTypes`, api_1.Api.PrepReqParams(reqParams));
|
|
70
|
-
res({
|
|
71
|
-
attachmentTypes: data.Items
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
catch (e) {
|
|
75
|
-
rej(e);
|
|
76
|
-
}
|
|
77
|
-
}));
|
|
78
|
-
yield api.SetCacheItem({
|
|
79
|
-
key: GetListCacheKey(),
|
|
80
|
-
value: req,
|
|
81
|
-
req: reqParams
|
|
82
|
-
});
|
|
83
|
-
return req;
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
EntityAttachmentType.GetList = GetList;
|
|
87
|
-
})(EntityAttachmentType = exports.EntityAttachmentType || (exports.EntityAttachmentType = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EntityAttachmentType = void 0;
|
|
13
|
+
const api_1 = require("../api/api");
|
|
14
|
+
/**
|
|
15
|
+
* Describes the "Entity Attachment Type" concept within Bruce.
|
|
16
|
+
* It is a record that describes the purpose of an attachment.
|
|
17
|
+
*/
|
|
18
|
+
var EntityAttachmentType;
|
|
19
|
+
(function (EntityAttachmentType) {
|
|
20
|
+
function GetCacheKey(id) {
|
|
21
|
+
return api_1.Api.ECacheKey.AttachmentType + api_1.Api.ECacheKey.Id + id;
|
|
22
|
+
}
|
|
23
|
+
EntityAttachmentType.GetCacheKey = GetCacheKey;
|
|
24
|
+
function GetListCacheKey() {
|
|
25
|
+
return api_1.Api.ECacheKey.AttachmentType;
|
|
26
|
+
}
|
|
27
|
+
EntityAttachmentType.GetListCacheKey = GetListCacheKey;
|
|
28
|
+
let EType;
|
|
29
|
+
(function (EType) {
|
|
30
|
+
EType["Photo"] = "photo";
|
|
31
|
+
EType["Document"] = "document";
|
|
32
|
+
})(EType = EntityAttachmentType.EType || (EntityAttachmentType.EType = {}));
|
|
33
|
+
function Delete(params) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const { api, attachmentTypeId: id, req: reqParams } = params;
|
|
36
|
+
if (!id) {
|
|
37
|
+
throw ("Type ID is required.");
|
|
38
|
+
}
|
|
39
|
+
yield api.DELETE(`entityAttachmentType/${id}`, api_1.Api.PrepReqParams(reqParams));
|
|
40
|
+
api.Cache.Remove(GetCacheKey(id));
|
|
41
|
+
api.Cache.Remove(GetListCacheKey());
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
EntityAttachmentType.Delete = Delete;
|
|
45
|
+
function Update(params) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const { api, attachmentType: data, req: reqParams } = params;
|
|
48
|
+
if (!(data === null || data === void 0 ? void 0 : data.ID)) {
|
|
49
|
+
throw ("Type ID is required.");
|
|
50
|
+
}
|
|
51
|
+
const res = yield api.POST(`entityAttachmentType/${data.ID}`, data, api_1.Api.PrepReqParams(reqParams));
|
|
52
|
+
api.Cache.Remove(GetCacheKey(data.ID));
|
|
53
|
+
api.Cache.Remove(GetListCacheKey());
|
|
54
|
+
return {
|
|
55
|
+
attachmentType: res
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
EntityAttachmentType.Update = Update;
|
|
60
|
+
function GetList(params) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const { api, reqParams } = params;
|
|
63
|
+
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
64
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
65
|
+
return cache.data;
|
|
66
|
+
}
|
|
67
|
+
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
try {
|
|
69
|
+
const data = yield api.GET(`entityAttachmentTypes`, api_1.Api.PrepReqParams(reqParams));
|
|
70
|
+
res({
|
|
71
|
+
attachmentTypes: data.Items
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
rej(e);
|
|
76
|
+
}
|
|
77
|
+
}));
|
|
78
|
+
yield api.SetCacheItem({
|
|
79
|
+
key: GetListCacheKey(),
|
|
80
|
+
value: req,
|
|
81
|
+
req: reqParams
|
|
82
|
+
});
|
|
83
|
+
return req;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
EntityAttachmentType.GetList = GetList;
|
|
87
|
+
})(EntityAttachmentType = exports.EntityAttachmentType || (exports.EntityAttachmentType = {}));
|
|
88
88
|
//# sourceMappingURL=entity-attachment-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-attachment-type.js","sourceRoot":"","sources":["../../../src/entity/entity-attachment-type.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAiC;AAKjC;;;GAGG;AACH,IAAiB,oBAAoB,CAkFpC;AAlFD,WAAiB,oBAAoB;IACjC,SAAgB,WAAW,CAAC,EAAQ;QAChC,OAAO,SAAG,CAAC,SAAS,CAAC,cAAc,GAAG,SAAG,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAChE,CAAC;IAFe,gCAAW,cAE1B,CAAA;IAED,SAAgB,eAAe;QAC3B,OAAO,SAAG,CAAC,SAAS,CAAC,cAAc,CAAC;IACxC,CAAC;IAFe,oCAAe,kBAE9B,CAAA;IAQD,IAAY,KAGX;IAHD,WAAY,KAAK;QACb,wBAAe,CAAA;QACf,8BAAqB,CAAA;IACzB,CAAC,EAHW,KAAK,GAAL,0BAAK,KAAL,0BAAK,QAGhB;IAED,SAAsB,MAAM,CAAC,MAI5B;;YACG,MAAM,EAAE,GAAG,EAAE,gBAAgB,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;YAC7D,IAAI,CAAC,EAAE,EAAE;gBACL,MAAK,CAAC,sBAAsB,CAAC,CAAC;aACjC;YACD,MAAM,GAAG,CAAC,MAAM,CAAC,wBAAwB,EAAE,EAAE,EAAE,SAAG,CAAC,aAAa,CAAC,SAAS,CA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E,EAAE;gBACrD,IAAI;oBACA,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,uBAAuB,EAAE,SAAG,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;oBAClF,GAAG,CAAC;wBACA,eAAe,EAAE,IAAI,CAAC,KAAK;qBAC9B,CAAC,CAAC;iBACN;gBACD,OAAO,CAAC,EAAE;oBACN,GAAG,CAAC,CAAC,CAAC,CAAC;iBACV;YACL,CAAC,CAAA,CAAC,CAAC;YACH,MAAM,GAAG,CAAC,YAAY,CAAC;gBACnB,GAAG,EAAE,eAAe,EAAE;gBACtB,KAAK,EAAE,GAAG;gBACV,GAAG,EAAE,SAAS;aACjB,CAAC,CAAC;YACH,OAAO,GAAG,CAAC;QACf,CAAC;KAAA;IA5BqB,4BAAO,UA4B5B,CAAA;AACL,CAAC,EAlFgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAkFpC"}
|
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.EntityAttachment = void 0;
|
|
13
|
-
const api_1 = require("../api/api");
|
|
14
|
-
/**
|
|
15
|
-
* Describes the "Entity Attachment" concept within Bruce.
|
|
16
|
-
* An entity attachment is an arbitrary file record that is linked to an entity record.
|
|
17
|
-
* The same file can be attached to multiple entities.
|
|
18
|
-
*/
|
|
19
|
-
var EntityAttachment;
|
|
20
|
-
(function (EntityAttachment) {
|
|
21
|
-
function GetCacheKey(id) {
|
|
22
|
-
return api_1.Api.ECacheKey.Attachment + api_1.Api.ECacheKey.Id + id;
|
|
23
|
-
}
|
|
24
|
-
EntityAttachment.GetCacheKey = GetCacheKey;
|
|
25
|
-
function GetListCacheKey(entityId) {
|
|
26
|
-
return api_1.Api.ECacheKey.Attachment + api_1.Api.ECacheKey.Entity + api_1.Api.ECacheKey.Id + entityId;
|
|
27
|
-
}
|
|
28
|
-
EntityAttachment.GetListCacheKey = GetListCacheKey;
|
|
29
|
-
function Update(params) {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
const { api, attachments, req, entityId } = params;
|
|
32
|
-
if (!(attachments === null || attachments === void 0 ? void 0 : attachments.length)) {
|
|
33
|
-
return {
|
|
34
|
-
attachments: []
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
const res = yield api.POST(`entity/${entityId}/attachments`, {
|
|
38
|
-
attachments
|
|
39
|
-
}, api_1.Api.PrepReqParams(req));
|
|
40
|
-
for (let i = 0; i < attachments.length; i++) {
|
|
41
|
-
if (attachments[i].ID) {
|
|
42
|
-
api.Cache.Remove(GetCacheKey(attachments[i].ID));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
api.Cache.Remove(GetListCacheKey(entityId));
|
|
46
|
-
return {
|
|
47
|
-
attachments: res.attachments
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
EntityAttachment.Update = Update;
|
|
52
|
-
function UpdateOrder(params) {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const { api, entityId, attachmentTypeId: typeId, attachments, req: reqParams } = params;
|
|
55
|
-
if (!entityId || !typeId || !(attachments === null || attachments === void 0 ? void 0 : attachments.length)) {
|
|
56
|
-
throw ("Entity ID, Type ID, and Attachments are required.");
|
|
57
|
-
}
|
|
58
|
-
const reqData = {
|
|
59
|
-
"DisplayOrder.Start": 0,
|
|
60
|
-
"ClientFile.ID": attachments.map(x => x["ClientFile.ID"])
|
|
61
|
-
};
|
|
62
|
-
yield api.POST(`entity/${entityId}/attachments/${typeId}/setOrder`, reqData, api_1.Api.PrepReqParams(reqParams));
|
|
63
|
-
for (let i = 0; i < attachments.length; i++) {
|
|
64
|
-
api.Cache.Remove(GetCacheKey(attachments[i].ID));
|
|
65
|
-
}
|
|
66
|
-
yield api.Cache.RemoveByStartsWith(GetListCacheKey(entityId));
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
EntityAttachment.UpdateOrder = UpdateOrder;
|
|
70
|
-
function Delete(params) {
|
|
71
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
const { api, attachmentId, entityId, req } = params;
|
|
73
|
-
if (!attachmentId || !entityId) {
|
|
74
|
-
throw ("Entity id and attachment id.");
|
|
75
|
-
}
|
|
76
|
-
yield api.DELETE(`entity/${entityId}/attachments/${attachmentId}`, api_1.Api.PrepReqParams(req));
|
|
77
|
-
api.Cache.Remove(GetCacheKey(attachmentId));
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
EntityAttachment.Delete = Delete;
|
|
81
|
-
function GetListByEntityId(params) {
|
|
82
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
const { api, entityId, req: reqParams } = params;
|
|
84
|
-
if (!entityId) {
|
|
85
|
-
throw ("Entity ID is required.");
|
|
86
|
-
}
|
|
87
|
-
const cache = yield api.GetCacheItem(GetListCacheKey(entityId), reqParams);
|
|
88
|
-
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
89
|
-
return cache.data;
|
|
90
|
-
}
|
|
91
|
-
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
try {
|
|
93
|
-
const data = yield api.GET(`entity/${entityId}/attachments`, api_1.Api.PrepReqParams(reqParams));
|
|
94
|
-
res({
|
|
95
|
-
attachments: (data.attachments ? data.attachments : data.Items)
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
catch (e) {
|
|
99
|
-
rej(e);
|
|
100
|
-
}
|
|
101
|
-
}));
|
|
102
|
-
yield api.SetCacheItem({
|
|
103
|
-
key: GetListCacheKey(entityId),
|
|
104
|
-
value: req,
|
|
105
|
-
req: reqParams
|
|
106
|
-
});
|
|
107
|
-
return req;
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
EntityAttachment.GetListByEntityId = GetListByEntityId;
|
|
111
|
-
function Upload(params) {
|
|
112
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
-
const { api, file, entityId, attachmentTypeId: typeId, req: reqParams } = params;
|
|
114
|
-
if (!entityId || !typeId || !file) {
|
|
115
|
-
throw ("Entity ID, Type ID, and File are required.");
|
|
116
|
-
}
|
|
117
|
-
const url = `entity/${entityId}/attachment/${typeId}`;
|
|
118
|
-
const res = yield api.UPLOAD(url, file, api_1.Api.PrepReqParams(reqParams));
|
|
119
|
-
api.Cache.Remove(GetListCacheKey(entityId));
|
|
120
|
-
return {
|
|
121
|
-
attachment: res
|
|
122
|
-
};
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
EntityAttachment.Upload = Upload;
|
|
126
|
-
})(EntityAttachment = exports.EntityAttachment || (exports.EntityAttachment = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EntityAttachment = void 0;
|
|
13
|
+
const api_1 = require("../api/api");
|
|
14
|
+
/**
|
|
15
|
+
* Describes the "Entity Attachment" concept within Bruce.
|
|
16
|
+
* An entity attachment is an arbitrary file record that is linked to an entity record.
|
|
17
|
+
* The same file can be attached to multiple entities.
|
|
18
|
+
*/
|
|
19
|
+
var EntityAttachment;
|
|
20
|
+
(function (EntityAttachment) {
|
|
21
|
+
function GetCacheKey(id) {
|
|
22
|
+
return api_1.Api.ECacheKey.Attachment + api_1.Api.ECacheKey.Id + id;
|
|
23
|
+
}
|
|
24
|
+
EntityAttachment.GetCacheKey = GetCacheKey;
|
|
25
|
+
function GetListCacheKey(entityId) {
|
|
26
|
+
return api_1.Api.ECacheKey.Attachment + api_1.Api.ECacheKey.Entity + api_1.Api.ECacheKey.Id + entityId;
|
|
27
|
+
}
|
|
28
|
+
EntityAttachment.GetListCacheKey = GetListCacheKey;
|
|
29
|
+
function Update(params) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const { api, attachments, req, entityId } = params;
|
|
32
|
+
if (!(attachments === null || attachments === void 0 ? void 0 : attachments.length)) {
|
|
33
|
+
return {
|
|
34
|
+
attachments: []
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const res = yield api.POST(`entity/${entityId}/attachments`, {
|
|
38
|
+
attachments
|
|
39
|
+
}, api_1.Api.PrepReqParams(req));
|
|
40
|
+
for (let i = 0; i < attachments.length; i++) {
|
|
41
|
+
if (attachments[i].ID) {
|
|
42
|
+
api.Cache.Remove(GetCacheKey(attachments[i].ID));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
api.Cache.Remove(GetListCacheKey(entityId));
|
|
46
|
+
return {
|
|
47
|
+
attachments: res.attachments
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
EntityAttachment.Update = Update;
|
|
52
|
+
function UpdateOrder(params) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const { api, entityId, attachmentTypeId: typeId, attachments, req: reqParams } = params;
|
|
55
|
+
if (!entityId || !typeId || !(attachments === null || attachments === void 0 ? void 0 : attachments.length)) {
|
|
56
|
+
throw ("Entity ID, Type ID, and Attachments are required.");
|
|
57
|
+
}
|
|
58
|
+
const reqData = {
|
|
59
|
+
"DisplayOrder.Start": 0,
|
|
60
|
+
"ClientFile.ID": attachments.map(x => x["ClientFile.ID"])
|
|
61
|
+
};
|
|
62
|
+
yield api.POST(`entity/${entityId}/attachments/${typeId}/setOrder`, reqData, api_1.Api.PrepReqParams(reqParams));
|
|
63
|
+
for (let i = 0; i < attachments.length; i++) {
|
|
64
|
+
api.Cache.Remove(GetCacheKey(attachments[i].ID));
|
|
65
|
+
}
|
|
66
|
+
yield api.Cache.RemoveByStartsWith(GetListCacheKey(entityId));
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
EntityAttachment.UpdateOrder = UpdateOrder;
|
|
70
|
+
function Delete(params) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const { api, attachmentId, entityId, req } = params;
|
|
73
|
+
if (!attachmentId || !entityId) {
|
|
74
|
+
throw ("Entity id and attachment id.");
|
|
75
|
+
}
|
|
76
|
+
yield api.DELETE(`entity/${entityId}/attachments/${attachmentId}`, api_1.Api.PrepReqParams(req));
|
|
77
|
+
api.Cache.Remove(GetCacheKey(attachmentId));
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
EntityAttachment.Delete = Delete;
|
|
81
|
+
function GetListByEntityId(params) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const { api, entityId, req: reqParams } = params;
|
|
84
|
+
if (!entityId) {
|
|
85
|
+
throw ("Entity ID is required.");
|
|
86
|
+
}
|
|
87
|
+
const cache = yield api.GetCacheItem(GetListCacheKey(entityId), reqParams);
|
|
88
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
89
|
+
return cache.data;
|
|
90
|
+
}
|
|
91
|
+
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
try {
|
|
93
|
+
const data = yield api.GET(`entity/${entityId}/attachments`, api_1.Api.PrepReqParams(reqParams));
|
|
94
|
+
res({
|
|
95
|
+
attachments: (data.attachments ? data.attachments : data.Items)
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
catch (e) {
|
|
99
|
+
rej(e);
|
|
100
|
+
}
|
|
101
|
+
}));
|
|
102
|
+
yield api.SetCacheItem({
|
|
103
|
+
key: GetListCacheKey(entityId),
|
|
104
|
+
value: req,
|
|
105
|
+
req: reqParams
|
|
106
|
+
});
|
|
107
|
+
return req;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
EntityAttachment.GetListByEntityId = GetListByEntityId;
|
|
111
|
+
function Upload(params) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
const { api, file, entityId, attachmentTypeId: typeId, req: reqParams } = params;
|
|
114
|
+
if (!entityId || !typeId || !file) {
|
|
115
|
+
throw ("Entity ID, Type ID, and File are required.");
|
|
116
|
+
}
|
|
117
|
+
const url = `entity/${entityId}/attachment/${typeId}`;
|
|
118
|
+
const res = yield api.UPLOAD(url, file, api_1.Api.PrepReqParams(reqParams));
|
|
119
|
+
api.Cache.Remove(GetListCacheKey(entityId));
|
|
120
|
+
return {
|
|
121
|
+
attachment: res
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
EntityAttachment.Upload = Upload;
|
|
126
|
+
})(EntityAttachment = exports.EntityAttachment || (exports.EntityAttachment = {}));
|
|
127
127
|
//# sourceMappingURL=entity-attachment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-attachment.js","sourceRoot":"","sources":["../../../src/entity/entity-attachment.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAiC;AAOjC;;;;GAIG;AACH,IAAiB,gBAAgB,CAyIhC;AAzID,WAAiB,gBAAgB;IAC7B,SAAgB,WAAW,CAAC,EAAU;QAClC,OAAO,SAAG,CAAC,SAAS,CAAC,UAAU,GAAG,SAAG,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAC5D,CAAC;IAFe,4BAAW,cAE1B,CAAA;IAED,SAAgB,eAAe,CAAC,QAAgB;QAC5C,OAAO,SAAG,CAAC,SAAS,CAAC,UAAU,GAAG,SAAG,CAAC,SAAS,CAAC,MAAM,GAAG,SAAG,CAAC,SAAS,CAAC,EAAE,GAAG,QAAQ,CAAC;IACzF,CAAC;IAFe,gCAAe,kBAE9B,CAAA;IAYD,SAAsB,MAAM,CAAC,MAK5B;;YAGG,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;YACnD,IAAI,
|
|
1
|
+
{"version":3,"file":"entity-attachment.js","sourceRoot":"","sources":["../../../src/entity/entity-attachment.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAiC;AAOjC;;;;GAIG;AACH,IAAiB,gBAAgB,CAyIhC;AAzID,WAAiB,gBAAgB;IAC7B,SAAgB,WAAW,CAAC,EAAU;QAClC,OAAO,SAAG,CAAC,SAAS,CAAC,UAAU,GAAG,SAAG,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAC5D,CAAC;IAFe,4BAAW,cAE1B,CAAA;IAED,SAAgB,eAAe,CAAC,QAAgB;QAC5C,OAAO,SAAG,CAAC,SAAS,CAAC,UAAU,GAAG,SAAG,CAAC,SAAS,CAAC,MAAM,GAAG,SAAG,CAAC,SAAS,CAAC,EAAE,GAAG,QAAQ,CAAC;IACzF,CAAC;IAFe,gCAAe,kBAE9B,CAAA;IAYD,SAAsB,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,EAAE,CAAC;YACtD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,SAAG,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;YACtE,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5C,OAAO;gBACH,UAAU,EAAE,GAAG;aAClB,CAAC;QACN,CAAC;KAAA;IAnBqB,uBAAM,SAmB3B,CAAA;AACL,CAAC,EAzIgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAyIhC"}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EntityAttribute = void 0;
|
|
4
|
-
var EntityAttribute;
|
|
5
|
-
(function (EntityAttribute) {
|
|
6
|
-
let EType;
|
|
7
|
-
(function (EType) {
|
|
8
|
-
EType["String"] = "String";
|
|
9
|
-
EType["Double"] = "Double";
|
|
10
|
-
EType["Integer"] = "Integer";
|
|
11
|
-
EType["Datetime"] = "Datetime";
|
|
12
|
-
EType["Structure"] = "Structure";
|
|
13
|
-
EType["Geometry"] = "Geometry";
|
|
14
|
-
EType["Dictionary"] = "Dictionary";
|
|
15
|
-
EType["Boolean"] = "Boolean";
|
|
16
|
-
})(EType = EntityAttribute.EType || (EntityAttribute.EType = {}));
|
|
17
|
-
function GetAttribute(items, path) {
|
|
18
|
-
if (!items || !path || !path.length) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
const key = path[0];
|
|
22
|
-
const item = items.find((i) => i.Key === key);
|
|
23
|
-
if (!item || !item.Structure || !path.length) {
|
|
24
|
-
return item;
|
|
25
|
-
}
|
|
26
|
-
return GetAttribute(item.Structure, path.slice(1));
|
|
27
|
-
}
|
|
28
|
-
EntityAttribute.GetAttribute = GetAttribute;
|
|
29
|
-
})(EntityAttribute = exports.EntityAttribute || (exports.EntityAttribute = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityAttribute = void 0;
|
|
4
|
+
var EntityAttribute;
|
|
5
|
+
(function (EntityAttribute) {
|
|
6
|
+
let EType;
|
|
7
|
+
(function (EType) {
|
|
8
|
+
EType["String"] = "String";
|
|
9
|
+
EType["Double"] = "Double";
|
|
10
|
+
EType["Integer"] = "Integer";
|
|
11
|
+
EType["Datetime"] = "Datetime";
|
|
12
|
+
EType["Structure"] = "Structure";
|
|
13
|
+
EType["Geometry"] = "Geometry";
|
|
14
|
+
EType["Dictionary"] = "Dictionary";
|
|
15
|
+
EType["Boolean"] = "Boolean";
|
|
16
|
+
})(EType = EntityAttribute.EType || (EntityAttribute.EType = {}));
|
|
17
|
+
function GetAttribute(items, path) {
|
|
18
|
+
if (!items || !path || !path.length) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
const key = path[0];
|
|
22
|
+
const item = items.find((i) => i.Key === key);
|
|
23
|
+
if (!item || !item.Structure || !path.length) {
|
|
24
|
+
return item;
|
|
25
|
+
}
|
|
26
|
+
return GetAttribute(item.Structure, path.slice(1));
|
|
27
|
+
}
|
|
28
|
+
EntityAttribute.GetAttribute = GetAttribute;
|
|
29
|
+
})(EntityAttribute = exports.EntityAttribute || (exports.EntityAttribute = {}));
|
|
30
30
|
//# sourceMappingURL=entity-attribute.js.map
|