bruce-models 3.2.0 → 3.2.2
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 +2670 -838
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +2606 -803
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-invite.js +40 -1
- package/dist/lib/account/account-invite.js.map +1 -1
- package/dist/lib/account/account.js +60 -5
- package/dist/lib/account/account.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +36 -3
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/api/abstract-api.js +78 -1
- package/dist/lib/api/abstract-api.js.map +1 -1
- package/dist/lib/api/api-getters.js +68 -94
- package/dist/lib/api/api-getters.js.map +1 -1
- package/dist/lib/api/api.js +20 -3
- package/dist/lib/api/api.js.map +1 -1
- package/dist/lib/api/bruce-api.js +68 -27
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/api/global-api.js +46 -4
- package/dist/lib/api/global-api.js.map +1 -1
- package/dist/lib/api/guardian-api.js +42 -1
- package/dist/lib/api/guardian-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -3
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/calculator/calculator.js +42 -1
- package/dist/lib/calculator/calculator.js.map +1 -1
- package/dist/lib/client-file/client-file.js +71 -7
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/common/bounds.js +1 -1
- package/dist/lib/common/bounds.js.map +1 -1
- package/dist/lib/common/bruce-event.js +19 -0
- package/dist/lib/common/bruce-event.js.map +1 -1
- package/dist/lib/common/bruce-variable.js +5 -0
- package/dist/lib/common/bruce-variable.js.map +1 -1
- package/dist/lib/common/color-css-defaults.js +157 -0
- package/dist/lib/common/color-css-defaults.js.map +1 -0
- package/dist/lib/common/color.js +18 -4
- package/dist/lib/common/color.js.map +1 -1
- package/dist/lib/common/delay-queue.js +7 -0
- package/dist/lib/common/delay-queue.js.map +1 -1
- package/dist/lib/common/geometry.js +5 -0
- package/dist/lib/common/geometry.js.map +1 -1
- package/dist/lib/common/lru-cache.js +14 -0
- package/dist/lib/common/lru-cache.js.map +1 -1
- package/dist/lib/custom-form/custom-form.js +49 -7
- package/dist/lib/custom-form/custom-form.js.map +1 -1
- package/dist/lib/data-lab/data-lab.js +10 -0
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/data-source/data-source.js +41 -0
- package/dist/lib/data-source/data-source.js.map +1 -1
- package/dist/lib/entity/entity-attachment-type.js +37 -1
- package/dist/lib/entity/entity-attachment-type.js.map +1 -1
- package/dist/lib/entity/entity-attachment.js +65 -18
- package/dist/lib/entity/entity-attachment.js.map +1 -1
- package/dist/lib/entity/entity-attribute.js +17 -1
- package/dist/lib/entity/entity-attribute.js.map +1 -1
- package/dist/lib/entity/entity-comment.js +44 -7
- package/dist/lib/entity/entity-comment.js.map +1 -1
- package/dist/lib/entity/entity-coords.js +38 -0
- package/dist/lib/entity/entity-coords.js.map +1 -1
- package/dist/lib/entity/entity-link.js +45 -11
- package/dist/lib/entity/entity-link.js.map +1 -1
- package/dist/lib/entity/entity-lod-category.js +52 -9
- package/dist/lib/entity/entity-lod-category.js.map +1 -1
- package/dist/lib/entity/entity-lod.js +78 -16
- package/dist/lib/entity/entity-lod.js.map +1 -1
- package/dist/lib/entity/entity-relation-type.js +48 -10
- package/dist/lib/entity/entity-relation-type.js.map +1 -1
- package/dist/lib/entity/entity-relation.js +69 -16
- package/dist/lib/entity/entity-relation.js.map +1 -1
- package/dist/lib/entity/entity-source.js +56 -15
- package/dist/lib/entity/entity-source.js.map +1 -1
- package/dist/lib/entity/entity-tag.js +56 -10
- package/dist/lib/entity/entity-tag.js.map +1 -1
- package/dist/lib/entity/entity-type-visual-settings.js +4 -0
- package/dist/lib/entity/entity-type-visual-settings.js.map +1 -1
- package/dist/lib/entity/entity-type.js +45 -7
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +122 -18
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/environment.js +12 -0
- package/dist/lib/environment.js.map +1 -1
- package/dist/lib/import/imported-file.js +53 -0
- package/dist/lib/import/imported-file.js.map +1 -1
- package/dist/lib/internal/uploader.js +8 -0
- package/dist/lib/internal/uploader.js.map +1 -1
- package/dist/lib/markup/markup.js +1 -1
- package/dist/lib/markup/markup.js.map +1 -1
- package/dist/lib/plugin/plugin.js +51 -9
- package/dist/lib/plugin/plugin.js.map +1 -1
- package/dist/lib/program-key/program-key.js +55 -10
- package/dist/lib/program-key/program-key.js.map +1 -1
- package/dist/lib/project/menu-item.js +22 -0
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js +55 -11
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/project/project-view-tile.js +9 -0
- package/dist/lib/project/project-view-tile.js.map +1 -1
- package/dist/lib/project/project-view.js +45 -7
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/lib/project/zoom-control.js +7 -0
- package/dist/lib/project/zoom-control.js.map +1 -1
- package/dist/lib/server/hosting-location.js +30 -9
- package/dist/lib/server/hosting-location.js.map +1 -1
- package/dist/lib/server/message-broker.js +3 -0
- package/dist/lib/server/message-broker.js.map +1 -1
- package/dist/lib/server/pending-action.js +25 -4
- package/dist/lib/server/pending-action.js.map +1 -1
- package/dist/lib/server/task.js +17 -0
- package/dist/lib/server/task.js.map +1 -1
- package/dist/lib/style/style.js +56 -7
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/tileset/tileset.js +128 -34
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/lib/user/permission.js +20 -0
- package/dist/lib/user/permission.js.map +1 -1
- package/dist/lib/user/session.js +46 -1
- package/dist/lib/user/session.js.map +1 -1
- package/dist/lib/user/user-group.js +49 -19
- package/dist/lib/user/user-group.js.map +1 -1
- package/dist/lib/user/user.js +134 -37
- package/dist/lib/user/user.js.map +1 -1
- package/dist/lib/util/path-utils.js +16 -1
- package/dist/lib/util/path-utils.js.map +1 -1
- package/dist/lib/util/url-utils.js +12 -85
- package/dist/lib/util/url-utils.js.map +1 -1
- package/dist/types/account/account-invite.d.ts +44 -8
- package/dist/types/account/account-settings.d.ts +3 -0
- package/dist/types/account/account.d.ts +68 -11
- package/dist/types/ann-document/ann-document.d.ts +43 -0
- package/dist/types/api/abstract-api.d.ts +76 -1
- package/dist/types/api/api-getters.d.ts +62 -24
- package/dist/types/api/api.d.ts +19 -4
- package/dist/types/api/bruce-api.d.ts +48 -4
- package/dist/types/api/global-api.d.ts +46 -8
- package/dist/types/api/guardian-api.d.ts +42 -5
- package/dist/types/bruce-models.d.ts +1 -3
- package/dist/types/calculator/calculator.d.ts +57 -1
- package/dist/types/client-file/client-file.d.ts +69 -6
- package/dist/types/common/bounds.d.ts +3 -3
- package/dist/types/common/bruce-event.d.ts +19 -0
- package/dist/types/common/color-css-defaults.d.ts +153 -0
- package/dist/types/common/color.d.ts +6 -1
- package/dist/types/common/delay-queue.d.ts +7 -0
- package/dist/types/common/geometry.d.ts +5 -0
- package/dist/types/common/lru-cache.d.ts +14 -0
- package/dist/types/custom-form/custom-form-content.d.ts +3 -0
- package/dist/types/custom-form/custom-form.d.ts +46 -1
- package/dist/types/data-lab/data-lab.d.ts +10 -0
- package/dist/types/data-source/data-source.d.ts +41 -0
- package/dist/types/entity/entity-attachment-type.d.ts +38 -1
- package/dist/types/entity/entity-attachment.d.ts +49 -2
- package/dist/types/entity/entity-attribute.d.ts +32 -12
- package/dist/types/entity/entity-comment.d.ts +41 -1
- package/dist/types/entity/entity-coords.d.ts +54 -1
- package/dist/types/entity/entity-link.d.ts +39 -2
- package/dist/types/entity/entity-lod-category.d.ts +46 -0
- package/dist/types/entity/entity-lod.d.ts +72 -1
- package/dist/types/entity/entity-relation-type.d.ts +42 -1
- package/dist/types/entity/entity-relation.d.ts +57 -1
- package/dist/types/entity/entity-source.d.ts +38 -4
- package/dist/types/entity/entity-tag.d.ts +48 -1
- package/dist/types/entity/entity-type-visual-settings.d.ts +4 -0
- package/dist/types/entity/entity-type.d.ts +46 -4
- package/dist/types/entity/entity.d.ts +89 -3
- package/dist/types/environment.d.ts +9 -0
- package/dist/types/import/imported-file.d.ts +64 -8
- package/dist/types/internal/uploader.d.ts +8 -0
- package/dist/types/markup/markup.d.ts +7 -1
- package/dist/types/plugin/plugin.d.ts +45 -0
- package/dist/types/program-key/program-key.d.ts +45 -1
- package/dist/types/project/menu-item.d.ts +73 -1
- package/dist/types/project/project-view-bookmark.d.ts +64 -2
- package/dist/types/project/project-view-tile.d.ts +30 -0
- package/dist/types/project/project-view.d.ts +52 -2
- package/dist/types/project/zoom-control.d.ts +7 -0
- package/dist/types/server/hosting-location.d.ts +24 -0
- package/dist/types/server/message-broker.d.ts +3 -0
- package/dist/types/server/pending-action.d.ts +28 -1
- package/dist/types/server/task.d.ts +20 -0
- package/dist/types/style/style.d.ts +69 -2
- package/dist/types/tileset/tileset.d.ts +92 -1
- package/dist/types/user/permission.d.ts +11 -0
- package/dist/types/user/session.d.ts +48 -5
- package/dist/types/user/user-group.d.ts +40 -8
- package/dist/types/user/user.d.ts +117 -17
- package/dist/types/util/path-utils.d.ts +16 -1
- package/dist/types/util/url-utils.d.ts +5 -22
- package/package.json +1 -1
- package/dist/lib/api/cam-api.js +0 -84
- package/dist/lib/api/cam-api.js.map +0 -1
- package/dist/lib/api/idm-api.js +0 -86
- package/dist/lib/api/idm-api.js.map +0 -1
- package/dist/types/api/cam-api.d.ts +0 -26
- package/dist/types/api/idm-api.d.ts +0 -28
|
@@ -2,12 +2,38 @@ import { Api } from "../api/api";
|
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
3
|
import { UTC } from "../common/utc";
|
|
4
4
|
/**
|
|
5
|
-
* Describes the "Entity Comment" concept within
|
|
5
|
+
* Describes the "Entity Comment" concept within Nextspace.
|
|
6
6
|
* An entity comment is a user written message that is linked to an entity record.
|
|
7
|
+
*
|
|
8
|
+
* @deprecated: The Navigator now uses Entity records directly.
|
|
9
|
+
* a utility is being made to manage those records.
|
|
7
10
|
*/
|
|
8
11
|
export declare namespace EntityComment {
|
|
12
|
+
/**
|
|
13
|
+
* Returns cache identifier for a comment by ID.
|
|
14
|
+
* Example: {
|
|
15
|
+
* const api: BruceApi.Api = ...;
|
|
16
|
+
* const key = GetCacheKey("123");
|
|
17
|
+
* api.Cache.Remove(key);
|
|
18
|
+
* }
|
|
19
|
+
* @param id
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
9
22
|
function GetCacheKey(id: number): string;
|
|
23
|
+
/**
|
|
24
|
+
* Returns cache identifier for a list of comments for an entity.
|
|
25
|
+
* Example: {
|
|
26
|
+
* const api: BruceApi.Api = ...;
|
|
27
|
+
* const key = GetListCacheKey("abc");
|
|
28
|
+
* api.Cache.Remove(key);
|
|
29
|
+
* }
|
|
30
|
+
* @param entityId
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
10
33
|
function GetListCacheKey(entityId: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Describes a comment record.
|
|
36
|
+
*/
|
|
11
37
|
interface IComment {
|
|
12
38
|
Comment: string;
|
|
13
39
|
"Created.ByUser.ID": string;
|
|
@@ -18,6 +44,11 @@ export declare namespace EntityComment {
|
|
|
18
44
|
"TargetObject.ID": string;
|
|
19
45
|
"TargetObject.Type": string;
|
|
20
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Creates or updates a comment.
|
|
49
|
+
* @param params
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
21
52
|
function Update(params: {
|
|
22
53
|
api?: BruceApi.Api;
|
|
23
54
|
comment: IComment;
|
|
@@ -25,12 +56,21 @@ export declare namespace EntityComment {
|
|
|
25
56
|
}): Promise<{
|
|
26
57
|
comment: IComment;
|
|
27
58
|
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Deletes a comment.
|
|
61
|
+
* @param params
|
|
62
|
+
*/
|
|
28
63
|
function Delete(params: {
|
|
29
64
|
api?: BruceApi.Api;
|
|
30
65
|
entityId: string;
|
|
31
66
|
commentId: number;
|
|
32
67
|
req?: Api.IReqParams;
|
|
33
68
|
}): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Gets a list of comments for an entity.
|
|
71
|
+
* @param params
|
|
72
|
+
* @returns
|
|
73
|
+
*/
|
|
34
74
|
function GetListByEntityId(params: {
|
|
35
75
|
api?: BruceApi.Api;
|
|
36
76
|
entityId: string;
|
|
@@ -3,33 +3,66 @@ import { BruceApi } from "../api/bruce-api";
|
|
|
3
3
|
import { Carto } from "../common/carto";
|
|
4
4
|
import { Transform } from "../common/transform";
|
|
5
5
|
import { Entity } from "./entity";
|
|
6
|
+
/**
|
|
7
|
+
* This is a utility to help calculate and manage UCS coordinates for entities.
|
|
8
|
+
*/
|
|
6
9
|
export declare namespace EntityCoords {
|
|
7
10
|
const UCS_ENTITY_TYPE_ID = "Bruce_UCS_Type";
|
|
11
|
+
/**
|
|
12
|
+
* Returns cache identifier for a UCS by entity id.
|
|
13
|
+
* Example: {
|
|
14
|
+
* const api: BruceApi.Api = ...;
|
|
15
|
+
* const key = GetCacheKey("123");
|
|
16
|
+
* api.Cache.Remove(key);
|
|
17
|
+
* }
|
|
18
|
+
* @param entityId
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
8
21
|
function GetCacheKey(entityId: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Describes a UCS record.
|
|
24
|
+
*/
|
|
9
25
|
interface IUcs {
|
|
10
26
|
name: string;
|
|
11
|
-
location: Carto.ICarto;
|
|
12
27
|
"Entity.ID": string;
|
|
28
|
+
location: Carto.ICarto;
|
|
13
29
|
transform: Transform.ITransform;
|
|
14
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Describes an expanded entity record with UCS information.
|
|
33
|
+
*/
|
|
15
34
|
interface IEntityCoords extends Entity.IEntity {
|
|
16
35
|
ucs?: IUcs;
|
|
17
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Params for shifting an entity to be relative to a point.
|
|
39
|
+
*/
|
|
18
40
|
interface IRelToPointParams {
|
|
19
41
|
point: Carto.ICarto;
|
|
20
42
|
test: boolean;
|
|
21
43
|
name?: string;
|
|
22
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Params for shifting an entity to be relative to an EPSG.
|
|
47
|
+
*/
|
|
23
48
|
interface IRelToEpsgParams {
|
|
24
49
|
epsg: number;
|
|
25
50
|
test: boolean;
|
|
26
51
|
name?: string;
|
|
27
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Params for shifting an entity to be relative to a UCS.
|
|
55
|
+
*/
|
|
28
56
|
interface IRelToUcsParams {
|
|
29
57
|
ucsId: string;
|
|
30
58
|
test: boolean;
|
|
31
59
|
name?: boolean;
|
|
32
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Returns an entity's location with expanded UCS information.
|
|
63
|
+
* @param params
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
33
66
|
function GetEntityCoords(params: {
|
|
34
67
|
api?: BruceApi.Api;
|
|
35
68
|
rootEntityId: string;
|
|
@@ -37,6 +70,11 @@ export declare namespace EntityCoords {
|
|
|
37
70
|
}): Promise<{
|
|
38
71
|
coords: IEntityCoords;
|
|
39
72
|
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Returns coordinates for an entity when relative to a point.
|
|
75
|
+
* @param params
|
|
76
|
+
* @returns
|
|
77
|
+
*/
|
|
40
78
|
function EntityRelativeToPoint(params: {
|
|
41
79
|
api?: BruceApi.Api;
|
|
42
80
|
rootEntityId: string;
|
|
@@ -44,6 +82,11 @@ export declare namespace EntityCoords {
|
|
|
44
82
|
} & IRelToPointParams): Promise<{
|
|
45
83
|
coords: IEntityCoords;
|
|
46
84
|
}>;
|
|
85
|
+
/**
|
|
86
|
+
* Returns coordinates for an entity when relative to an EPSG.
|
|
87
|
+
* @param params
|
|
88
|
+
* @returns
|
|
89
|
+
*/
|
|
47
90
|
function EntityRelativeToEpsg(params: {
|
|
48
91
|
api?: BruceApi.Api;
|
|
49
92
|
rootEntityId: string;
|
|
@@ -51,6 +94,11 @@ export declare namespace EntityCoords {
|
|
|
51
94
|
} & IRelToEpsgParams): Promise<{
|
|
52
95
|
coords: IEntityCoords;
|
|
53
96
|
}>;
|
|
97
|
+
/**
|
|
98
|
+
* Returns coordinates for an entity when relative to a UCS.
|
|
99
|
+
* @param params
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
54
102
|
function EntityRelativeToUcs(params: {
|
|
55
103
|
api?: BruceApi.Api;
|
|
56
104
|
rootEntityId: string;
|
|
@@ -58,6 +106,11 @@ export declare namespace EntityCoords {
|
|
|
58
106
|
} & IRelToUcsParams): Promise<{
|
|
59
107
|
coords: IEntityCoords;
|
|
60
108
|
}>;
|
|
109
|
+
/**
|
|
110
|
+
* Unlinks UCS coordinates from an entity.
|
|
111
|
+
* @param params
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
61
114
|
function UnlinkCoords(params: {
|
|
62
115
|
api?: BruceApi.Api;
|
|
63
116
|
rootEntityId: string;
|
|
@@ -1,18 +1,46 @@
|
|
|
1
1
|
import { Api } from "../api/api";
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
3
|
/**
|
|
4
|
-
* Describes the "Entity Link" concept within
|
|
5
|
-
* An entity link is
|
|
4
|
+
* Describes the "Entity Link" concept within Nextspace.
|
|
5
|
+
* An entity link is an external URL linked to an entity record.
|
|
6
6
|
*/
|
|
7
7
|
export declare namespace EntityLink {
|
|
8
|
+
/**
|
|
9
|
+
* Returns cache identifier for a link record.
|
|
10
|
+
* Example: {
|
|
11
|
+
* const api: BruceApi.Api = ...;
|
|
12
|
+
* const key = GetCacheKey(1);
|
|
13
|
+
* api.Cache.Remove(key);
|
|
14
|
+
* }
|
|
15
|
+
* @param id
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
8
18
|
function GetCacheKey(id: number): string;
|
|
19
|
+
/**
|
|
20
|
+
* Returns cache identifier for a list of links for an entity.
|
|
21
|
+
* Example: {
|
|
22
|
+
* const api: BruceApi.Api = ...;
|
|
23
|
+
* const key = GetListCacheKey("abc");
|
|
24
|
+
* api.Cache.Remove(key);
|
|
25
|
+
* }
|
|
26
|
+
* @param entityId
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
9
29
|
function GetListCacheKey(entityId: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Describes a link record.
|
|
32
|
+
*/
|
|
10
33
|
interface ILink {
|
|
11
34
|
DisplayName: string;
|
|
12
35
|
ID?: number;
|
|
13
36
|
"Entity.ID": string;
|
|
14
37
|
URL: string;
|
|
15
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Creates or updates a link record.
|
|
41
|
+
* @param params
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
16
44
|
function Update(params: {
|
|
17
45
|
api?: BruceApi.Api;
|
|
18
46
|
link: ILink;
|
|
@@ -20,12 +48,21 @@ export declare namespace EntityLink {
|
|
|
20
48
|
}): Promise<{
|
|
21
49
|
link: ILink;
|
|
22
50
|
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Deletes a link record.
|
|
53
|
+
* @param params
|
|
54
|
+
*/
|
|
23
55
|
function Delete(params: {
|
|
24
56
|
api?: BruceApi.Api;
|
|
25
57
|
entityId: string;
|
|
26
58
|
linkId: number;
|
|
27
59
|
req?: Api.IReqParams;
|
|
28
60
|
}): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Returns a list of links for an entity.
|
|
63
|
+
* @param params
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
29
66
|
function GetListByEntityId(params: {
|
|
30
67
|
api?: BruceApi.Api;
|
|
31
68
|
entityId: string;
|
|
@@ -1,19 +1,56 @@
|
|
|
1
1
|
import { Api } from "../api/api";
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the "Entity LOD Category" concept within Nextspace.
|
|
5
|
+
* An LOD category is a level of categorization for LODs.
|
|
6
|
+
* This is typically used to group LODs by their extension.
|
|
7
|
+
*/
|
|
3
8
|
export declare namespace EntityLodCategory {
|
|
9
|
+
/**
|
|
10
|
+
* Returns cache identifier for an entity lod category record.
|
|
11
|
+
* Example: {
|
|
12
|
+
* const api: BruceApi.Api = ...;
|
|
13
|
+
* const key = GetCacheKey("abc");
|
|
14
|
+
* api.Cache.Remove(key);
|
|
15
|
+
* }
|
|
16
|
+
* @param id
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
4
19
|
function GetCacheKey(id: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns cache identifier for a list of entity lod categories.
|
|
22
|
+
* Example: {
|
|
23
|
+
* const api: BruceApi.Api = ...;
|
|
24
|
+
* const key = GetListCacheKey();
|
|
25
|
+
* api.Cache.Remove(key);
|
|
26
|
+
* }
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
5
29
|
function GetListCacheKey(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Describes an entity lod category record.
|
|
32
|
+
*/
|
|
6
33
|
interface ICategory {
|
|
7
34
|
Description?: string;
|
|
8
35
|
Key: string;
|
|
9
36
|
Name: string;
|
|
10
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns a list of entity lod categories.
|
|
40
|
+
* @param params
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
11
43
|
function GetList(params: {
|
|
12
44
|
api?: BruceApi.Api;
|
|
13
45
|
req?: Api.IReqParams;
|
|
14
46
|
}): Promise<{
|
|
15
47
|
categories: ICategory[];
|
|
16
48
|
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Returns an entity lod category record matching the specified id.
|
|
51
|
+
* @param params
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
17
54
|
function Get(params: {
|
|
18
55
|
api?: BruceApi.Api;
|
|
19
56
|
categoryId: string;
|
|
@@ -21,11 +58,20 @@ export declare namespace EntityLodCategory {
|
|
|
21
58
|
}): Promise<{
|
|
22
59
|
category: ICategory;
|
|
23
60
|
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Deletes an entity lod category record matching the specified id.
|
|
63
|
+
* @param params
|
|
64
|
+
*/
|
|
24
65
|
function Delete(params: {
|
|
25
66
|
api?: BruceApi.Api;
|
|
26
67
|
categoryId: string;
|
|
27
68
|
req?: Api.IReqParams;
|
|
28
69
|
}): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Creates or updates an entity lod category record.
|
|
72
|
+
* @param params
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
29
75
|
function Update(params: {
|
|
30
76
|
api?: BruceApi.Api;
|
|
31
77
|
category: ICategory;
|
|
@@ -2,15 +2,51 @@ import { Api } from "../api/api";
|
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
3
|
import { ClientFile } from "../client-file/client-file";
|
|
4
4
|
/**
|
|
5
|
-
* Describes the "Entity LOD" concept within
|
|
5
|
+
* Describes the "Entity LOD" concept within Nextspace.
|
|
6
6
|
* LOD stands for Level of Detail.
|
|
7
7
|
* An lod record is a possible 2d/3d visualization of the entity record.
|
|
8
8
|
* The most common kind is a GLB.
|
|
9
9
|
*/
|
|
10
10
|
export declare namespace EntityLod {
|
|
11
|
+
/**
|
|
12
|
+
* Returns cache identifier for an entity lod record.
|
|
13
|
+
* Example: {
|
|
14
|
+
* const api: BruceApi.Api = ...;
|
|
15
|
+
* const key = GetCacheKey("abc");
|
|
16
|
+
* api.Cache.Remove(key);
|
|
17
|
+
* }
|
|
18
|
+
* @param url
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
11
21
|
function GetCacheKey(url: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Returns cache identifier for a list of entity lods.
|
|
24
|
+
* Example: {
|
|
25
|
+
* const api: BruceApi.Api = ...;
|
|
26
|
+
* const key = GetListCacheKey("abc", "def");
|
|
27
|
+
* api.Cache.Remove(key);
|
|
28
|
+
* }
|
|
29
|
+
* @param typeId
|
|
30
|
+
* @param group
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
12
33
|
function GetTypeListKey(typeId: string, group: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Returns cache identifier for a list of entity lods.
|
|
36
|
+
* Example: {
|
|
37
|
+
* const api: BruceApi.Api = ...;
|
|
38
|
+
* const key = GetListCacheKey("abc");
|
|
39
|
+
* api.Cache.Remove(key);
|
|
40
|
+
* }
|
|
41
|
+
* @param entityId
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
13
44
|
function GetEntityListKey(entityId: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* Describes an entity lod record.
|
|
47
|
+
* This is a 2d/3d visualization of the entity record.
|
|
48
|
+
* The most common kind is a GLB.
|
|
49
|
+
*/
|
|
14
50
|
interface ILod {
|
|
15
51
|
ClientFile?: ClientFile.IFile;
|
|
16
52
|
"ClientFile.ID": string;
|
|
@@ -19,11 +55,19 @@ export declare namespace EntityLod {
|
|
|
19
55
|
Level: number;
|
|
20
56
|
Group?: string;
|
|
21
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Describes an entity lod record update.
|
|
60
|
+
*/
|
|
22
61
|
interface IEntityLodUpdate {
|
|
23
62
|
"ClientFile.ID": string;
|
|
24
63
|
"LODCategory.Key": string;
|
|
25
64
|
Level: number;
|
|
26
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Returns a url for an entity lod record file.
|
|
68
|
+
* @param params
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
27
71
|
function GetUrl(params: {
|
|
28
72
|
api?: BruceApi.Api;
|
|
29
73
|
entityId: string;
|
|
@@ -33,6 +77,11 @@ export declare namespace EntityLod {
|
|
|
33
77
|
}): {
|
|
34
78
|
url: string;
|
|
35
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* Returns the client file id for an entity lod record file.
|
|
82
|
+
* @param params
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
36
85
|
function GetUrlFileId(params: {
|
|
37
86
|
api?: BruceApi.Api;
|
|
38
87
|
url: string;
|
|
@@ -40,6 +89,11 @@ export declare namespace EntityLod {
|
|
|
40
89
|
}): Promise<{
|
|
41
90
|
clientFileId: string;
|
|
42
91
|
}>;
|
|
92
|
+
/**
|
|
93
|
+
* Returns lods for a specified filter.
|
|
94
|
+
* @param params
|
|
95
|
+
* @returns
|
|
96
|
+
*/
|
|
43
97
|
function GetLods(params: {
|
|
44
98
|
api?: BruceApi.Api;
|
|
45
99
|
filter: Filter.IListParams;
|
|
@@ -47,6 +101,11 @@ export declare namespace EntityLod {
|
|
|
47
101
|
}): Promise<{
|
|
48
102
|
lods: Filter.IListResItem[];
|
|
49
103
|
}>;
|
|
104
|
+
/**
|
|
105
|
+
* Returns all lods for a specified entity.
|
|
106
|
+
* @param params
|
|
107
|
+
* @returns
|
|
108
|
+
*/
|
|
50
109
|
function GetEntityLods(params: {
|
|
51
110
|
api?: BruceApi.Api;
|
|
52
111
|
entityId: string;
|
|
@@ -66,11 +125,20 @@ export declare namespace EntityLod {
|
|
|
66
125
|
}): Promise<{
|
|
67
126
|
lods: ILod[];
|
|
68
127
|
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Updates an entity lod record.
|
|
130
|
+
* @param params
|
|
131
|
+
* @returns
|
|
132
|
+
*/
|
|
69
133
|
function Update(params: {
|
|
70
134
|
api?: BruceApi.Api;
|
|
71
135
|
entityId: string;
|
|
72
136
|
req?: Api.IReqParams;
|
|
73
137
|
} & IEntityLodUpdate): Promise<void>;
|
|
138
|
+
/**
|
|
139
|
+
* Deletes an entity lod record.
|
|
140
|
+
* @param params
|
|
141
|
+
*/
|
|
74
142
|
function Delete(params: {
|
|
75
143
|
api?: BruceApi.Api;
|
|
76
144
|
entityId: string;
|
|
@@ -78,6 +146,9 @@ export declare namespace EntityLod {
|
|
|
78
146
|
level: number;
|
|
79
147
|
req?: Api.IReqParams;
|
|
80
148
|
}): Promise<void>;
|
|
149
|
+
/**
|
|
150
|
+
* Describes a filter for getting entity lods.
|
|
151
|
+
*/
|
|
81
152
|
namespace Filter {
|
|
82
153
|
interface IListParamsItem {
|
|
83
154
|
"entityId": string;
|
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import { Api } from "../api/api";
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
3
|
/**
|
|
4
|
-
* Describes the "Entity Relationship Type" concept within
|
|
4
|
+
* Describes the "Entity Relationship Type" concept within Nextspace.
|
|
5
5
|
* A relationship type record describes the purpose of a relationship.
|
|
6
6
|
*/
|
|
7
7
|
export declare namespace EntityRelationType {
|
|
8
|
+
/**
|
|
9
|
+
* Returns cache identifier for an entity relation type record.
|
|
10
|
+
* Example: {
|
|
11
|
+
* const api: BruceApi.Api = ...;
|
|
12
|
+
* const key = GetCacheKey("abc");
|
|
13
|
+
* api.Cache.Remove(key);
|
|
14
|
+
* }
|
|
15
|
+
* @param id
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
8
18
|
function GetCacheKey(id: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Returns cache identifier for a list of entity relation types.
|
|
21
|
+
* Example: {
|
|
22
|
+
* const api: BruceApi.Api = ...;
|
|
23
|
+
* const key = GetListCacheKey();
|
|
24
|
+
* api.Cache.Remove(key);
|
|
25
|
+
* }
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
9
28
|
function GetListCacheKey(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Describes an entity relation type record.
|
|
31
|
+
*/
|
|
10
32
|
interface IType {
|
|
11
33
|
ID: string;
|
|
12
34
|
ForwardName: string;
|
|
@@ -16,6 +38,11 @@ export declare namespace EntityRelationType {
|
|
|
16
38
|
EntityDisplaySettingID?: string;
|
|
17
39
|
"Relation.EntityType.ID"?: string;
|
|
18
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Gets a single entity relation type record.
|
|
43
|
+
* @param params
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
19
46
|
function Get(params: {
|
|
20
47
|
api?: BruceApi.Api;
|
|
21
48
|
relationTypeId: string;
|
|
@@ -23,17 +50,31 @@ export declare namespace EntityRelationType {
|
|
|
23
50
|
}): Promise<{
|
|
24
51
|
relationType: IType;
|
|
25
52
|
}>;
|
|
53
|
+
/**
|
|
54
|
+
* Deletes an entity relation type record.
|
|
55
|
+
* @param params
|
|
56
|
+
*/
|
|
26
57
|
function Delete(params: {
|
|
27
58
|
api?: BruceApi.Api;
|
|
28
59
|
relationTypeId: string;
|
|
29
60
|
req?: Api.IReqParams;
|
|
30
61
|
}): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Gets a list of entity relation type records.
|
|
64
|
+
* @param params
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
31
67
|
function GetList(params: {
|
|
32
68
|
api?: BruceApi.Api;
|
|
33
69
|
req?: Api.IReqParams;
|
|
34
70
|
}): Promise<{
|
|
35
71
|
relationTypes: IType[];
|
|
36
72
|
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Creates or updates an entity relation type record.
|
|
75
|
+
* @param params
|
|
76
|
+
* @returns
|
|
77
|
+
*/
|
|
37
78
|
function Update(params: {
|
|
38
79
|
api?: BruceApi.Api;
|
|
39
80
|
relationType: IType;
|
|
@@ -2,14 +2,47 @@ import { Api } from "../api/api";
|
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
3
|
import { Entity } from "./entity";
|
|
4
4
|
/**
|
|
5
|
-
* Describes the "Entity Relationship" concept within
|
|
5
|
+
* Describes the "Entity Relationship" concept within Nextspace.
|
|
6
6
|
* An entity relationship is an arbitrary link between two entity records.
|
|
7
7
|
* The relationship can have a "data entity" linked to it as well for the relationship to store arbitrary data about itself.
|
|
8
8
|
*/
|
|
9
9
|
export declare namespace EntityRelation {
|
|
10
|
+
/**
|
|
11
|
+
* Returns cache identifier for an entity relation record.
|
|
12
|
+
* Example: {
|
|
13
|
+
* const api: BruceApi.Api = ...;
|
|
14
|
+
* const key = GetCacheKey("abc", "def", "ghi");
|
|
15
|
+
* api.Cache.Remove(key);
|
|
16
|
+
* }
|
|
17
|
+
* @param id
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
10
20
|
function GetCacheKey(entityA: string, entityB: string, typeId: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Returns cache identifier for a list of entity relations.
|
|
23
|
+
* Example: {
|
|
24
|
+
* const api: BruceApi.Api = ...;
|
|
25
|
+
* const key = GetCacheKey("abc");
|
|
26
|
+
* api.Cache.Remove(key);
|
|
27
|
+
* }
|
|
28
|
+
* @param id
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
11
31
|
function GetEntityCacheKey(entityId: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Returns cache identifier for a list of entity relations.
|
|
34
|
+
* Example: {
|
|
35
|
+
* const api: BruceApi.Api = ...;
|
|
36
|
+
* const key = GetCacheKey("abc", {...});
|
|
37
|
+
* api.Cache.Remove(key);
|
|
38
|
+
* }
|
|
39
|
+
* @param id
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
12
42
|
function GetListCacheKey(entityId: string, params: IListParams): string;
|
|
43
|
+
/**
|
|
44
|
+
* Describes an entity relation record.
|
|
45
|
+
*/
|
|
13
46
|
interface IRelation {
|
|
14
47
|
"Principal.Entity.ID": string;
|
|
15
48
|
"Related.Entity.ID": string;
|
|
@@ -24,11 +57,19 @@ export declare namespace EntityRelation {
|
|
|
24
57
|
oneWayOnly?: boolean;
|
|
25
58
|
loadEntityData?: boolean;
|
|
26
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Creates a new entity relation.
|
|
62
|
+
* @param params
|
|
63
|
+
*/
|
|
27
64
|
function Create(params: {
|
|
28
65
|
api?: BruceApi.Api;
|
|
29
66
|
relation: IRelation;
|
|
30
67
|
req?: Api.IReqParams;
|
|
31
68
|
}): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Deletes an entity relation.
|
|
71
|
+
* @param params
|
|
72
|
+
*/
|
|
32
73
|
function Delete(params: {
|
|
33
74
|
api?: BruceApi.Api;
|
|
34
75
|
principalEntityId: string;
|
|
@@ -36,11 +77,21 @@ export declare namespace EntityRelation {
|
|
|
36
77
|
relationTypeId: string;
|
|
37
78
|
req?: Api.IReqParams;
|
|
38
79
|
}): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Updates an entity relation.
|
|
82
|
+
* Eg: data entity ID was changed.
|
|
83
|
+
* @param params
|
|
84
|
+
*/
|
|
39
85
|
function Update(params: {
|
|
40
86
|
api?: BruceApi.Api;
|
|
41
87
|
relation: IRelation;
|
|
42
88
|
req?: Api.IReqParams;
|
|
43
89
|
}): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Returns a list of relationships for an entity.
|
|
92
|
+
* @param params
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
44
95
|
function GetList(params: {
|
|
45
96
|
api?: BruceApi.Api;
|
|
46
97
|
entityId: string;
|
|
@@ -49,6 +100,11 @@ export declare namespace EntityRelation {
|
|
|
49
100
|
}): Promise<{
|
|
50
101
|
relations: IRelation[];
|
|
51
102
|
}>;
|
|
103
|
+
/**
|
|
104
|
+
* Returns an entity relationship by the data entity ID.
|
|
105
|
+
* @param params
|
|
106
|
+
* @returns
|
|
107
|
+
*/
|
|
52
108
|
function GetByDataEntityId(params: {
|
|
53
109
|
api?: BruceApi.Api;
|
|
54
110
|
entityId: string;
|