bruce-models 3.1.9 → 3.2.1
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 +2683 -845
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +2612 -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 +20 -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 +16 -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 +31 -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 +45 -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,17 +2,36 @@ import { Api } from "../api/api";
|
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
3
|
import { IDictionary } from "../common/dictionary";
|
|
4
4
|
/**
|
|
5
|
-
* Describes the "Entity Source" concept within
|
|
6
|
-
* An entity source is a record which links an arbitrary source id to a
|
|
7
|
-
* For example an OSM building id to a
|
|
5
|
+
* Describes the "Entity Source" concept within Nextspace.
|
|
6
|
+
* An entity source is a record which links an arbitrary source id to a Nextspace entity id.
|
|
7
|
+
* For example an OSM building id to a Nextspace entity id.
|
|
8
8
|
*/
|
|
9
9
|
export declare namespace EntitySource {
|
|
10
|
+
/**
|
|
11
|
+
* Returns cache identifier for an entity source record.
|
|
12
|
+
* Example: {
|
|
13
|
+
* const api: BruceApi.Api = ...;
|
|
14
|
+
* const key = GetCacheKey(1, "def");
|
|
15
|
+
* api.Cache.Remove(key);
|
|
16
|
+
* }
|
|
17
|
+
* @param sourceId
|
|
18
|
+
* @param sourceKey
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
10
21
|
function GetCacheKey(sourceId: number, sourceKey: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Describes an entity source record.
|
|
24
|
+
*/
|
|
11
25
|
interface ISource {
|
|
12
|
-
"Entity.ID": string;
|
|
13
26
|
"Source.ID": number;
|
|
27
|
+
"Entity.ID": string;
|
|
14
28
|
"SourceRecord.Key": string;
|
|
15
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns an entity source record for the given source id and source key.
|
|
32
|
+
* @param params
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
16
35
|
function Get(params: {
|
|
17
36
|
api?: BruceApi.Api;
|
|
18
37
|
sourceId: number;
|
|
@@ -21,6 +40,11 @@ export declare namespace EntitySource {
|
|
|
21
40
|
}): Promise<{
|
|
22
41
|
source: ISource;
|
|
23
42
|
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Returns a list of entity source records for the given source id and source keys.
|
|
45
|
+
* @param params
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
24
48
|
function GetListByKeys(params: {
|
|
25
49
|
api?: BruceApi.Api;
|
|
26
50
|
sourceId: number;
|
|
@@ -29,6 +53,11 @@ export declare namespace EntitySource {
|
|
|
29
53
|
}): Promise<{
|
|
30
54
|
sources: ISource[];
|
|
31
55
|
}>;
|
|
56
|
+
/**
|
|
57
|
+
* Returns a mapping of entity source records for the given source id and source keys.
|
|
58
|
+
* @param params
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
32
61
|
function GetEntityIdsBySourceKeys(params: {
|
|
33
62
|
api?: BruceApi.Api;
|
|
34
63
|
sourceId: number;
|
|
@@ -37,6 +66,11 @@ export declare namespace EntitySource {
|
|
|
37
66
|
}): Promise<{
|
|
38
67
|
idMapping: IDictionary<string>;
|
|
39
68
|
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Creates a new entity source record.
|
|
71
|
+
* @param params
|
|
72
|
+
* @returns
|
|
73
|
+
*/
|
|
40
74
|
function CreateLink(params: {
|
|
41
75
|
api?: BruceApi.Api;
|
|
42
76
|
source: ISource;
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
import { Api } from "../api/api";
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
3
|
/**
|
|
4
|
-
* Describes the "Entity Tag" concept within
|
|
4
|
+
* Describes the "Entity Tag" concept within Nextspace.
|
|
5
5
|
* An entity tag is used to categorize an entity record.
|
|
6
6
|
* Entity tags can be used in filters, or to restrict entity access.
|
|
7
7
|
*/
|
|
8
8
|
export declare namespace EntityTag {
|
|
9
|
+
/**
|
|
10
|
+
* Returns cache identifier for an entity tag record.
|
|
11
|
+
* Example: {
|
|
12
|
+
* const api: BruceApi.Api = ...;
|
|
13
|
+
* const key = GetCacheKey(1);
|
|
14
|
+
* api.Cache.Remove(key);
|
|
15
|
+
* }
|
|
16
|
+
* @param tagId
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
9
19
|
function GetCacheKey(tagId: number): string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns cache identifier for a list of entity tags.
|
|
22
|
+
* Example: {
|
|
23
|
+
* const api: BruceApi.Api = ...;
|
|
24
|
+
* const key = GetListCacheKey("abc");
|
|
25
|
+
* api.Cache.Remove(key);
|
|
26
|
+
* }
|
|
27
|
+
* @param entityTypeId
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
10
30
|
function GetListCacheKey(entityTypeId?: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Describes an entity tag record.
|
|
33
|
+
*/
|
|
11
34
|
interface ITag {
|
|
12
35
|
ID: number;
|
|
13
36
|
Name?: string;
|
|
@@ -17,6 +40,11 @@ export declare namespace EntityTag {
|
|
|
17
40
|
Color?: string;
|
|
18
41
|
"Parent.Layer.ID"?: number;
|
|
19
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Returns an entity tag record for the given tag id.
|
|
45
|
+
* @param params
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
20
48
|
function Get(params: {
|
|
21
49
|
api?: BruceApi.Api;
|
|
22
50
|
tagId: number;
|
|
@@ -24,6 +52,11 @@ export declare namespace EntityTag {
|
|
|
24
52
|
}): Promise<{
|
|
25
53
|
tag: ITag;
|
|
26
54
|
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Returns a list of entity tag records for the given tag ids.
|
|
57
|
+
* @param params
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
27
60
|
function GetListByIds(params: {
|
|
28
61
|
api?: BruceApi.Api;
|
|
29
62
|
tagIds: number[];
|
|
@@ -31,6 +64,11 @@ export declare namespace EntityTag {
|
|
|
31
64
|
}): Promise<{
|
|
32
65
|
tags: ITag[];
|
|
33
66
|
}>;
|
|
67
|
+
/**
|
|
68
|
+
* Returns a list of entity tag records.
|
|
69
|
+
* @param params
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
34
72
|
function GetList(params: {
|
|
35
73
|
api?: BruceApi.Api;
|
|
36
74
|
entityTypeId?: string;
|
|
@@ -38,11 +76,20 @@ export declare namespace EntityTag {
|
|
|
38
76
|
}): Promise<{
|
|
39
77
|
tags: ITag[];
|
|
40
78
|
}>;
|
|
79
|
+
/**
|
|
80
|
+
* Deletes an entity tag record.
|
|
81
|
+
* @param params
|
|
82
|
+
*/
|
|
41
83
|
function Delete(params: {
|
|
42
84
|
api?: BruceApi.Api;
|
|
43
85
|
tagId: number;
|
|
44
86
|
req?: Api.IReqParams;
|
|
45
87
|
}): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Creates or updates an entity tag record.
|
|
90
|
+
* @param params
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
46
93
|
function Update(params: {
|
|
47
94
|
api?: BruceApi.Api;
|
|
48
95
|
tag: ITag;
|
|
@@ -5,13 +5,35 @@ import { Entity } from "./entity";
|
|
|
5
5
|
import { EntityAttribute } from "./entity-attribute";
|
|
6
6
|
import { EntityTypeVisualSettings } from "./entity-type-visual-settings";
|
|
7
7
|
/**
|
|
8
|
-
* Describes the "Entity Type" concept within
|
|
8
|
+
* Describes the "Entity Type" concept within Nextspace.
|
|
9
9
|
* An entity type is an "expectation" of what data "should" look like in a particular entity record.
|
|
10
10
|
* The schema is stencils onto entity data to filter out what we should display or search against.
|
|
11
11
|
*/
|
|
12
12
|
export declare namespace EntityType {
|
|
13
|
+
/**
|
|
14
|
+
* Returns cache identifier for an entity type.
|
|
15
|
+
* Example: {
|
|
16
|
+
* const api: BruceApi.Api = ...;
|
|
17
|
+
* const key = GetCacheKey("abc");
|
|
18
|
+
* api.Cache.Remove(key);
|
|
19
|
+
* }
|
|
20
|
+
* @param typeId
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
13
23
|
function GetCacheKey(typeId: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Returns cache identifier for a list of entity types.
|
|
26
|
+
* Example: {
|
|
27
|
+
* const api: BruceApi.Api = ...;
|
|
28
|
+
* const key = GetListCacheKey();
|
|
29
|
+
* api.Cache.Remove(key);
|
|
30
|
+
* }
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
14
33
|
function GetListCacheKey(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Describes an entity type record.
|
|
36
|
+
*/
|
|
15
37
|
interface IType {
|
|
16
38
|
ID?: string;
|
|
17
39
|
IsDeleted?: boolean;
|
|
@@ -28,14 +50,19 @@ export declare namespace EntityType {
|
|
|
28
50
|
DisplayNameAttributePath?: string;
|
|
29
51
|
IsStrictSchema?: boolean;
|
|
30
52
|
"DisplaySetting.ID"?: number;
|
|
53
|
+
"LastUpdate.Time"?: UTC.IUTC;
|
|
54
|
+
"Parent.EntityType.ID"?: string;
|
|
55
|
+
VisualSettings?: EntityTypeVisualSettings.ISettings;
|
|
31
56
|
AuthoringSettings?: {
|
|
32
57
|
enabledTools: string[];
|
|
33
58
|
defaultTool: string;
|
|
34
59
|
};
|
|
35
|
-
"LastUpdate.Time"?: UTC.IUTC;
|
|
36
|
-
"Parent.EntityType.ID"?: string;
|
|
37
|
-
VisualSettings?: EntityTypeVisualSettings.ISettings;
|
|
38
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Gets an entity type record.
|
|
63
|
+
* @param params
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
39
66
|
function Get(params: {
|
|
40
67
|
api?: BruceApi.Api;
|
|
41
68
|
entityTypeId: string;
|
|
@@ -43,17 +70,31 @@ export declare namespace EntityType {
|
|
|
43
70
|
}): Promise<{
|
|
44
71
|
entityType: IType;
|
|
45
72
|
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Deletes an entity type record and all corresponding entities.
|
|
75
|
+
* @param params
|
|
76
|
+
*/
|
|
46
77
|
function Delete(params: {
|
|
47
78
|
api?: BruceApi.Api;
|
|
48
79
|
entityTypeId: string;
|
|
49
80
|
req?: Api.IReqParams;
|
|
50
81
|
}): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Gets a list of entity types.
|
|
84
|
+
* @param params
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
51
87
|
function GetList(params: {
|
|
52
88
|
api?: BruceApi.Api;
|
|
53
89
|
req?: Api.IReqParams;
|
|
54
90
|
}): Promise<{
|
|
55
91
|
entityTypes: IType[];
|
|
56
92
|
}>;
|
|
93
|
+
/**
|
|
94
|
+
* Updates or creates an entity type record.
|
|
95
|
+
* @param params
|
|
96
|
+
* @returns
|
|
97
|
+
*/
|
|
57
98
|
function Update(params: {
|
|
58
99
|
api?: BruceApi.Api;
|
|
59
100
|
entityType: IType;
|
|
@@ -9,18 +9,41 @@ import { IDictionary } from "../common/dictionary";
|
|
|
9
9
|
import { Carto } from "../bruce-models";
|
|
10
10
|
type _any = any;
|
|
11
11
|
/**
|
|
12
|
-
* Describes the "Entity" concept within
|
|
12
|
+
* Describes the "Entity" concept within Nextspace.
|
|
13
13
|
* An entity is a JSON blob containing both internal data and user-defined data.
|
|
14
14
|
* Entity records have many thinks linked to them through their UIDs such as links, files and relationships.
|
|
15
15
|
*/
|
|
16
16
|
export declare namespace Entity {
|
|
17
|
+
/**
|
|
18
|
+
* Returns cache identifier for an entity record.
|
|
19
|
+
* Example: {
|
|
20
|
+
* const api: BruceApi.Api = ...;
|
|
21
|
+
* const key = GetCacheKey({...});
|
|
22
|
+
* api.Cache.Remove(key);
|
|
23
|
+
* }
|
|
24
|
+
* @param params
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
17
27
|
function GetCacheKey(params: {
|
|
18
28
|
entityId: string;
|
|
19
29
|
entityTypeId?: string;
|
|
20
30
|
expandLocation?: boolean;
|
|
21
31
|
expandRelations?: boolean;
|
|
22
32
|
}): string;
|
|
33
|
+
/**
|
|
34
|
+
* Returns cache identifier for an entity record.
|
|
35
|
+
* Example: {
|
|
36
|
+
* const api: BruceApi.Api = ...;
|
|
37
|
+
* const key = GetCacheKey("abc");
|
|
38
|
+
* api.Cache.Remove(key);
|
|
39
|
+
* }
|
|
40
|
+
* @param entityId
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
23
43
|
function GetContainsKey(entityId: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Describes an entity record.
|
|
46
|
+
*/
|
|
24
47
|
interface IEntity extends _any {
|
|
25
48
|
Bruce: {
|
|
26
49
|
"CreatedBy.User.ID"?: string;
|
|
@@ -38,10 +61,19 @@ export declare namespace Entity {
|
|
|
38
61
|
tilesetID?: string[];
|
|
39
62
|
worldPosition?: number[][];
|
|
40
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Available if expandRelations=true.
|
|
66
|
+
* Describes a downstream relationship between the entity and another.
|
|
67
|
+
*/
|
|
41
68
|
interface IRelationData {
|
|
42
69
|
"Other.Entity.ID": string;
|
|
43
70
|
"RelationType.ID": string;
|
|
44
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns an entity record for the given entity id.
|
|
74
|
+
* @param params
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
45
77
|
function Get(params: {
|
|
46
78
|
api?: BruceApi.Api;
|
|
47
79
|
entityId: string;
|
|
@@ -52,6 +84,11 @@ export declare namespace Entity {
|
|
|
52
84
|
}): Promise<{
|
|
53
85
|
entity: IEntity;
|
|
54
86
|
}>;
|
|
87
|
+
/**
|
|
88
|
+
* Returns a list of entity records for the given entity ids.
|
|
89
|
+
* @param params
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
55
92
|
function GetListByIds(params: {
|
|
56
93
|
api?: BruceApi.Api;
|
|
57
94
|
entityIds: string[];
|
|
@@ -60,16 +97,29 @@ export declare namespace Entity {
|
|
|
60
97
|
}): Promise<{
|
|
61
98
|
entities: IEntity[];
|
|
62
99
|
}>;
|
|
100
|
+
/**
|
|
101
|
+
* Deletes an entity record.
|
|
102
|
+
* @param params
|
|
103
|
+
*/
|
|
63
104
|
function Delete(params: {
|
|
64
105
|
api?: BruceApi.Api;
|
|
65
106
|
entityId: string;
|
|
66
107
|
req?: Api.IReqParams;
|
|
67
108
|
}): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Deletes a list of entity records.
|
|
111
|
+
* @param params
|
|
112
|
+
*/
|
|
68
113
|
function DeleteList(params: {
|
|
69
114
|
api?: BruceApi.Api;
|
|
70
115
|
entityIds: string[];
|
|
71
116
|
req?: Api.IReqParams;
|
|
72
117
|
}): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Creates or updates an entity record.
|
|
120
|
+
* @param params
|
|
121
|
+
* @returns
|
|
122
|
+
*/
|
|
73
123
|
function Update(params: {
|
|
74
124
|
api?: BruceApi.Api;
|
|
75
125
|
entity: IEntity;
|
|
@@ -78,19 +128,36 @@ export declare namespace Entity {
|
|
|
78
128
|
}): Promise<{
|
|
79
129
|
entity: IEntity;
|
|
80
130
|
}>;
|
|
131
|
+
/**
|
|
132
|
+
* Util to remove a tag from an entity.
|
|
133
|
+
* @param params
|
|
134
|
+
*/
|
|
81
135
|
function RemoveTag(params: {
|
|
82
136
|
entity: IEntity;
|
|
83
137
|
tagId: number;
|
|
84
138
|
}): void;
|
|
139
|
+
/**
|
|
140
|
+
* Util to add a tag to an entity.
|
|
141
|
+
* @param params
|
|
142
|
+
*/
|
|
85
143
|
function AddTag(params: {
|
|
86
144
|
entity: IEntity;
|
|
87
145
|
tagId: number;
|
|
88
146
|
}): void;
|
|
147
|
+
/**
|
|
148
|
+
* Util to set a value on an entity.
|
|
149
|
+
* @param params
|
|
150
|
+
*/
|
|
89
151
|
function SetValue(params: {
|
|
90
152
|
entity: IEntity;
|
|
91
153
|
path: string[];
|
|
92
154
|
value: any;
|
|
93
155
|
}): void;
|
|
156
|
+
/**
|
|
157
|
+
* Util to get a value from an entity.
|
|
158
|
+
* @param params
|
|
159
|
+
* @returns
|
|
160
|
+
*/
|
|
94
161
|
function GetValue(params: {
|
|
95
162
|
entity: IEntity;
|
|
96
163
|
path: string[];
|
|
@@ -98,8 +165,6 @@ export declare namespace Entity {
|
|
|
98
165
|
/**
|
|
99
166
|
* Calculates an entity's name based on attribute priority set in the type.
|
|
100
167
|
* @param params
|
|
101
|
-
* If true, will return the entity ID if no name can be calculated.
|
|
102
|
-
* Otherwise it returns null.
|
|
103
168
|
* @returns
|
|
104
169
|
*/
|
|
105
170
|
function CalculateName(params: {
|
|
@@ -107,6 +172,22 @@ export declare namespace Entity {
|
|
|
107
172
|
type: EntityType.IType;
|
|
108
173
|
defaultToId?: boolean;
|
|
109
174
|
}): string;
|
|
175
|
+
/**
|
|
176
|
+
* Calculates an entity name.
|
|
177
|
+
* This will request data if entity or type is not provided.
|
|
178
|
+
* @param params
|
|
179
|
+
* @returns
|
|
180
|
+
*/
|
|
181
|
+
function CalculateNameAsync(params: {
|
|
182
|
+
entityId: string;
|
|
183
|
+
entity: IEntity;
|
|
184
|
+
typeId?: string;
|
|
185
|
+
type?: EntityType.IType;
|
|
186
|
+
defaultToId?: boolean;
|
|
187
|
+
}): Promise<string>;
|
|
188
|
+
/**
|
|
189
|
+
* Describes a filter for entity records.
|
|
190
|
+
*/
|
|
110
191
|
interface IFilter {
|
|
111
192
|
orderBy?: any;
|
|
112
193
|
entityTypeId?: string;
|
|
@@ -119,6 +200,11 @@ export declare namespace Entity {
|
|
|
119
200
|
sortOrder?: Api.ESortOrder;
|
|
120
201
|
entityTypeConditions?: IDictionary<any>;
|
|
121
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Returns a list of entity records for the given filter.
|
|
205
|
+
* @param params
|
|
206
|
+
* @returns
|
|
207
|
+
*/
|
|
122
208
|
function GetList(params: {
|
|
123
209
|
api?: BruceApi.Api;
|
|
124
210
|
filter: IFilter;
|
|
@@ -10,7 +10,16 @@ interface IParams {
|
|
|
10
10
|
export declare namespace ENVIRONMENT {
|
|
11
11
|
let IS_SELF_MANAGED: boolean;
|
|
12
12
|
let PARAMS: IParams;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the ApiGetters instance.
|
|
15
|
+
* This is used to communicate with any Nextspace API instance.
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
13
18
|
function Api(): ApiGetters;
|
|
19
|
+
/**
|
|
20
|
+
* Resets the environment to the specified params.
|
|
21
|
+
* @param params
|
|
22
|
+
*/
|
|
14
23
|
function Reset(params?: IParams): void;
|
|
15
24
|
}
|
|
16
25
|
export {};
|
|
@@ -1,27 +1,73 @@
|
|
|
1
1
|
import { Api } from "../api/api";
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
3
|
import { ClientFile } from "../client-file/client-file";
|
|
4
|
+
/**
|
|
5
|
+
* Imported file records are created when a file is imported into Nextspace.
|
|
6
|
+
* The associated file may be attached to the record.
|
|
7
|
+
*/
|
|
4
8
|
export declare namespace ImportedFile {
|
|
9
|
+
/**
|
|
10
|
+
* Returns cache identifier for a imported file record.
|
|
11
|
+
* Example: {
|
|
12
|
+
* const api: BruceApi.Api = ...;
|
|
13
|
+
* const key = GetCacheKey(1);
|
|
14
|
+
* api.Cache.Remove(key);
|
|
15
|
+
* }
|
|
16
|
+
* @param fileId
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
5
19
|
function GetCacheKey(fileId: number): string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns cache identifier for a imported file record.
|
|
22
|
+
* Example: {
|
|
23
|
+
* const api: BruceApi.Api = ...;
|
|
24
|
+
* const key = GetCacheKey("abc");
|
|
25
|
+
* api.Cache.Remove(key);
|
|
26
|
+
* }
|
|
27
|
+
* @param rootId
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
6
30
|
function GetCacheKeyByRootId(rootId: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Returns cache identifier for a list of imported files.
|
|
33
|
+
* Example: {
|
|
34
|
+
* const api: BruceApi.Api = ...;
|
|
35
|
+
* const key = GetListCacheKey("CAD", 0);
|
|
36
|
+
* api.Cache.Remove(key);
|
|
37
|
+
* }
|
|
38
|
+
* @param type
|
|
39
|
+
* @param pageIndex
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
7
42
|
function GetListCacheKey(type: EFileType, pageIndex: number): string;
|
|
43
|
+
/**
|
|
44
|
+
* Describes an imported file record.
|
|
45
|
+
*/
|
|
8
46
|
interface IFile {
|
|
9
47
|
ID: number;
|
|
10
|
-
"ClientFile.ID": string;
|
|
11
48
|
"ImportedBy.User.ID": string;
|
|
12
49
|
"Imported.DateTime": any;
|
|
13
|
-
"EntityType.ID"
|
|
14
|
-
"RootEntity.ID"
|
|
15
|
-
"Source.ID"
|
|
16
|
-
"PendingAction.ID"
|
|
17
|
-
NewEntitiesCount
|
|
18
|
-
UpdatedEntitiesCount
|
|
19
|
-
ClientFile
|
|
50
|
+
"EntityType.ID"?: string;
|
|
51
|
+
"RootEntity.ID"?: string;
|
|
52
|
+
"Source.ID"?: number;
|
|
53
|
+
"PendingAction.ID"?: number;
|
|
54
|
+
NewEntitiesCount?: number;
|
|
55
|
+
UpdatedEntitiesCount?: number;
|
|
56
|
+
"ClientFile.ID"?: string;
|
|
57
|
+
ClientFile?: ClientFile.IFile;
|
|
20
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Known file types we can filter against.
|
|
61
|
+
*/
|
|
21
62
|
enum EFileType {
|
|
22
63
|
CAD = "CAD",
|
|
23
64
|
All = "All"
|
|
24
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Returns a list of imported files.
|
|
68
|
+
* @param params
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
25
71
|
function GetList(params: {
|
|
26
72
|
api?: BruceApi.Api;
|
|
27
73
|
fileType?: EFileType;
|
|
@@ -30,6 +76,11 @@ export declare namespace ImportedFile {
|
|
|
30
76
|
}): Promise<{
|
|
31
77
|
importedFiles: IFile[];
|
|
32
78
|
}>;
|
|
79
|
+
/**
|
|
80
|
+
* Returns a list of imported files for a root entity.
|
|
81
|
+
* @param params
|
|
82
|
+
* @returns
|
|
83
|
+
*/
|
|
33
84
|
function GetListByRootId(params: {
|
|
34
85
|
api?: BruceApi.Api;
|
|
35
86
|
rootId: string;
|
|
@@ -37,6 +88,11 @@ export declare namespace ImportedFile {
|
|
|
37
88
|
}): Promise<{
|
|
38
89
|
importedFiles: IFile[];
|
|
39
90
|
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Returns an imported file record.
|
|
93
|
+
* @param params
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
40
96
|
function Get(params: {
|
|
41
97
|
api?: BruceApi.Api;
|
|
42
98
|
importedFileId: number;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { Api } from "../api/api";
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
|
+
/**
|
|
4
|
+
* Utility for uploading files.
|
|
5
|
+
*/
|
|
3
6
|
export declare namespace Uploader {
|
|
4
7
|
const MIN_LARGE_FILE_SIZE = 100000000;
|
|
5
8
|
interface IProgress {
|
|
6
9
|
percent: number;
|
|
7
10
|
uploaded: boolean;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Uploads a file to the server.
|
|
14
|
+
* @param params
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
9
17
|
function DoMultiPartUpload(params: {
|
|
10
18
|
file: File;
|
|
11
19
|
api?: BruceApi.Api;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Cartes, EntityAttachmentType } from "../bruce-models";
|
|
2
2
|
/**
|
|
3
|
-
* Description of a "Markup" which is stored in
|
|
3
|
+
* Description of a "Markup" which is stored in bookmark records.
|
|
4
4
|
*/
|
|
5
5
|
export declare namespace Markup {
|
|
6
|
+
/**
|
|
7
|
+
* Describes a markup that is embedded in a bookmark.
|
|
8
|
+
*/
|
|
6
9
|
interface IMarkup {
|
|
7
10
|
divs?: Div.IDiv[];
|
|
8
11
|
vectors?: (Line.ILine | FreePaint.IPaint)[];
|
|
@@ -12,6 +15,9 @@ export declare namespace Markup {
|
|
|
12
15
|
defaultCameraPos?: any;
|
|
13
16
|
visible?: boolean;
|
|
14
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Base of all markup elements.
|
|
20
|
+
*/
|
|
15
21
|
interface IElement {
|
|
16
22
|
id: string;
|
|
17
23
|
name?: string;
|
|
@@ -3,8 +3,30 @@ import { BruceApi } from "../api/bruce-api";
|
|
|
3
3
|
import { UTC } from "../common/utc";
|
|
4
4
|
import { Uploader } from "../internal/uploader";
|
|
5
5
|
export declare namespace Plugin {
|
|
6
|
+
/**
|
|
7
|
+
* Returns cache identifier for a plugin.
|
|
8
|
+
* Example: {
|
|
9
|
+
* const api: BruceApi.Api = ...;
|
|
10
|
+
* const key = GetCacheKey("abc");
|
|
11
|
+
* api.Cache.Remove(key);
|
|
12
|
+
* }
|
|
13
|
+
* @param pluginId
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
6
16
|
function GetCacheKey(pluginId: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Returns cache identifier for a list of plugins.
|
|
19
|
+
* Example: {
|
|
20
|
+
* const api: BruceApi.Api = ...;
|
|
21
|
+
* const key = GetListCacheKey();
|
|
22
|
+
* api.Cache.Remove(key);
|
|
23
|
+
* }
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
7
26
|
function GetListCacheKey(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Describes a plugin record.
|
|
29
|
+
*/
|
|
8
30
|
interface IPlugin {
|
|
9
31
|
ID: string;
|
|
10
32
|
Name: string;
|
|
@@ -16,6 +38,11 @@ export declare namespace Plugin {
|
|
|
16
38
|
"LastUpdated.Date": UTC.IUTC;
|
|
17
39
|
"Created.Date": UTC.IUTC;
|
|
18
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Returns a plugin record.
|
|
43
|
+
* @param params
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
19
46
|
function Get(params: {
|
|
20
47
|
api?: BruceApi.Api;
|
|
21
48
|
pluginId: string;
|
|
@@ -23,12 +50,22 @@ export declare namespace Plugin {
|
|
|
23
50
|
}): Promise<{
|
|
24
51
|
plugin: IPlugin;
|
|
25
52
|
}>;
|
|
53
|
+
/**
|
|
54
|
+
* Returns a list of plugins.
|
|
55
|
+
* @param params
|
|
56
|
+
* @returns
|
|
57
|
+
*/
|
|
26
58
|
function GetList(params: {
|
|
27
59
|
api?: BruceApi.Api;
|
|
28
60
|
req?: Api.IReqParams;
|
|
29
61
|
}): Promise<{
|
|
30
62
|
plugins: IPlugin[];
|
|
31
63
|
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Returns a URL to load a plugin.
|
|
66
|
+
* @param params
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
32
69
|
function GetLoadUrl(params: {
|
|
33
70
|
api?: BruceApi.Api;
|
|
34
71
|
pluginId: string;
|
|
@@ -36,11 +73,19 @@ export declare namespace Plugin {
|
|
|
36
73
|
}): {
|
|
37
74
|
indexFileUrl: string;
|
|
38
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Creates or updates a plugin.
|
|
78
|
+
* @param params
|
|
79
|
+
*/
|
|
39
80
|
function Update(params: {
|
|
40
81
|
plugin: IPlugin;
|
|
41
82
|
api?: BruceApi.Api;
|
|
42
83
|
req?: Api.IReqParams;
|
|
43
84
|
}): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Deletes a plugin.
|
|
87
|
+
* @param params
|
|
88
|
+
*/
|
|
44
89
|
function Delete(params: {
|
|
45
90
|
pluginId: string;
|
|
46
91
|
api?: BruceApi.Api;
|