bruce-models 3.2.0 → 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 +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 +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
package/dist/types/api/api.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { IDictionary } from "../common/dictionary";
|
|
2
2
|
/**
|
|
3
|
-
* Contains generic descriptions used for
|
|
3
|
+
* Contains generic descriptions used for Nextspace requests.
|
|
4
4
|
*/
|
|
5
5
|
export declare namespace Api {
|
|
6
|
+
/**
|
|
7
|
+
* Cache keys utilized by methods within this library.
|
|
8
|
+
* These help construct keys to store and retrieve data from the local cache.
|
|
9
|
+
*/
|
|
6
10
|
enum ECacheKey {
|
|
7
11
|
Id = ":",
|
|
8
12
|
Entity = "entity",
|
|
@@ -62,6 +66,10 @@ export declare namespace Api {
|
|
|
62
66
|
* @returns
|
|
63
67
|
*/
|
|
64
68
|
function Encode(str: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Standard list response from Nextspace APIs.
|
|
71
|
+
* Newer APIs will typically use a different format. Eg: "entities" for an entity list.
|
|
72
|
+
*/
|
|
65
73
|
interface IList<T> {
|
|
66
74
|
Items: T[];
|
|
67
75
|
TotalCount?: number;
|
|
@@ -71,23 +79,30 @@ export declare namespace Api {
|
|
|
71
79
|
Asc = 1,
|
|
72
80
|
Desc = -1
|
|
73
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Known response encodings from Nextspace APIs.
|
|
84
|
+
*/
|
|
74
85
|
enum EEncoding {
|
|
75
86
|
UTF8 = "UTF-8",
|
|
76
87
|
UTF16 = "UTF-16BE"
|
|
77
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Describes request params for any HTTP request performed through this library.
|
|
91
|
+
*/
|
|
78
92
|
interface IReqParams {
|
|
79
93
|
noCache?: boolean;
|
|
80
94
|
headers?: IDictionary<string>;
|
|
81
95
|
}
|
|
82
|
-
interface IRes {
|
|
83
|
-
}
|
|
84
96
|
/**
|
|
85
97
|
* Prepares default settings for a request to Bruce Api.
|
|
86
|
-
*
|
|
98
|
+
* (Currently none).
|
|
87
99
|
* @param base
|
|
88
100
|
* @returns
|
|
89
101
|
*/
|
|
90
102
|
function PrepReqParams(base?: Api.IReqParams | IUploadReqParams): IReqParams | IUploadReqParams;
|
|
103
|
+
/**
|
|
104
|
+
* Describes upload request params.
|
|
105
|
+
*/
|
|
91
106
|
interface IUploadReqParams extends IReqParams {
|
|
92
107
|
onProgress?: (e: ProgressEvent) => void;
|
|
93
108
|
formData?: IDictionary<string> | FormData;
|
|
@@ -2,7 +2,16 @@ import { AbstractApi } from "./abstract-api";
|
|
|
2
2
|
import { Api as A } from "./api";
|
|
3
3
|
import { MessageBroker } from "../server/message-broker";
|
|
4
4
|
import { GuardianApi } from "./guardian-api";
|
|
5
|
+
/**
|
|
6
|
+
* The primary API for communication with Nextspace.
|
|
7
|
+
* This API is used to manage your data.
|
|
8
|
+
*/
|
|
5
9
|
export declare namespace BruceApi {
|
|
10
|
+
/**
|
|
11
|
+
* This is the interface for the Bruce Api getter.
|
|
12
|
+
* A getter helps manage requests to multiple client accounts.
|
|
13
|
+
* @deprecated, please pass an instance ApiGetters.ts instead.
|
|
14
|
+
*/
|
|
6
15
|
interface IGetter {
|
|
7
16
|
accountId: string;
|
|
8
17
|
env?: A.EEnv;
|
|
@@ -16,7 +25,6 @@ export declare namespace BruceApi {
|
|
|
16
25
|
private accountId;
|
|
17
26
|
get AccountId(): string;
|
|
18
27
|
private env;
|
|
19
|
-
private loadProm;
|
|
20
28
|
private loadCancelled;
|
|
21
29
|
private messageBroker;
|
|
22
30
|
get MessageBroker(): MessageBroker.IBroker;
|
|
@@ -24,10 +32,8 @@ export declare namespace BruceApi {
|
|
|
24
32
|
EntityCdnUrl: string;
|
|
25
33
|
LegacyTilesetCdnUrl: string;
|
|
26
34
|
TilesetCdnUrl: string;
|
|
35
|
+
private loadProm;
|
|
27
36
|
get Loading(): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* @param params
|
|
30
|
-
*/
|
|
31
37
|
constructor(params: {
|
|
32
38
|
accountId: string;
|
|
33
39
|
env?: A.Env;
|
|
@@ -63,10 +69,48 @@ export declare namespace BruceApi {
|
|
|
63
69
|
* @param url
|
|
64
70
|
*/
|
|
65
71
|
SetBaseUrl(url: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* Performs an HTTP GET request.
|
|
74
|
+
* This will prepend the base url to the url.
|
|
75
|
+
* @param url
|
|
76
|
+
* @param params
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
66
79
|
GET(url: string, params?: A.IReqParams): Promise<any>;
|
|
80
|
+
/**
|
|
81
|
+
* Performs an HTTP DELETE request.
|
|
82
|
+
* This will prepend the base url to the url.
|
|
83
|
+
* @param url
|
|
84
|
+
* @param params
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
67
87
|
DELETE(url: string, params?: A.IReqParams): Promise<any>;
|
|
88
|
+
/**
|
|
89
|
+
* Performs an HTTP POST request.
|
|
90
|
+
* This will prepend the base url to the url.
|
|
91
|
+
* @param url
|
|
92
|
+
* @param data
|
|
93
|
+
* @param params
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
68
96
|
POST(url: string, data: any, params?: A.IReqParams): Promise<any>;
|
|
97
|
+
/**
|
|
98
|
+
* Performs an HTTP PUT request.
|
|
99
|
+
* This will prepend the base url to the url.
|
|
100
|
+
* @param url
|
|
101
|
+
* @param data
|
|
102
|
+
* @param params
|
|
103
|
+
* @returns
|
|
104
|
+
*/
|
|
69
105
|
PUT(url: string, data: any, params?: A.IReqParams): Promise<any>;
|
|
106
|
+
/**
|
|
107
|
+
* Performs a file upload request (HTTP POST).
|
|
108
|
+
* This will prepend the base url to the url.
|
|
109
|
+
* @param url
|
|
110
|
+
* @param blob
|
|
111
|
+
* @param params
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
70
114
|
UPLOAD(url: string, blob: Blob, params?: A.IUploadReqParams): Promise<any>;
|
|
71
115
|
}
|
|
72
116
|
}
|
|
@@ -1,25 +1,63 @@
|
|
|
1
1
|
import { AbstractApi } from "./abstract-api";
|
|
2
2
|
import { Api as A } from "./api";
|
|
3
|
+
/**
|
|
4
|
+
* This is the request handler for Global Api,
|
|
5
|
+
* The global api is used to store information that is higher level than client accounts.
|
|
6
|
+
* For example it will store usage records, client account group settings, data sharing settings, etc.
|
|
7
|
+
*/
|
|
3
8
|
export declare namespace GlobalApi {
|
|
4
|
-
interface IGetter {
|
|
5
|
-
env: A.EEnv;
|
|
6
|
-
getApi: (env?: A.EEnv) => GlobalApi.Api;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* This is the request handler for Global Api,
|
|
10
|
-
* it should be passed to any method that wants to communicate with this particular api.
|
|
11
|
-
*/
|
|
12
9
|
class Api extends AbstractApi {
|
|
13
10
|
private env;
|
|
14
11
|
constructor(params: {
|
|
15
12
|
env?: A.Env;
|
|
16
13
|
});
|
|
14
|
+
/**
|
|
15
|
+
* Sets the base url for this api.
|
|
16
|
+
*/
|
|
17
17
|
private setBaseUrl;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the base url for this api.
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
18
22
|
GetBaseUrl(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Sets the base url for this api.
|
|
25
|
+
* @param url
|
|
26
|
+
*/
|
|
19
27
|
SetBaseUrl(url: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Performs an HTTP GET request.
|
|
30
|
+
* This will prepend the base url to the url.
|
|
31
|
+
* @param url
|
|
32
|
+
* @param params
|
|
33
|
+
* @returns
|
|
34
|
+
*/
|
|
20
35
|
GET(url: string, params?: A.IReqParams): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* Performs an HTTP DELETE request.
|
|
38
|
+
* This will prepend the base url to the url.
|
|
39
|
+
* @param url
|
|
40
|
+
* @param params
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
21
43
|
DELETE(url: string, params?: A.IReqParams): Promise<any>;
|
|
44
|
+
/**
|
|
45
|
+
* Performs an HTTP POST request.
|
|
46
|
+
* This will prepend the base url to the url.
|
|
47
|
+
* @param url
|
|
48
|
+
* @param data
|
|
49
|
+
* @param params
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
22
52
|
POST(url: string, data: any, params?: A.IReqParams): Promise<any>;
|
|
53
|
+
/**
|
|
54
|
+
* Performs a file upload request (HTTP POST).
|
|
55
|
+
* This will prepend the base url to the url.
|
|
56
|
+
* @param url
|
|
57
|
+
* @param blob
|
|
58
|
+
* @param params
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
23
61
|
UPLOAD(url: string, blob: Blob, params?: A.IUploadReqParams): Promise<any>;
|
|
24
62
|
}
|
|
25
63
|
}
|
|
@@ -2,24 +2,61 @@ import { AbstractApi } from "./abstract-api";
|
|
|
2
2
|
import { Api as A } from "./api";
|
|
3
3
|
/**
|
|
4
4
|
* This is the request handler for Cam/Idm Api,
|
|
5
|
-
*
|
|
5
|
+
* This API is in charge of user session management.
|
|
6
6
|
*/
|
|
7
7
|
export declare namespace GuardianApi {
|
|
8
|
-
interface IGetter {
|
|
9
|
-
env: A.EEnv;
|
|
10
|
-
getApi: (env?: A.EEnv) => GuardianApi.Api;
|
|
11
|
-
}
|
|
12
8
|
class Api extends AbstractApi {
|
|
13
9
|
private env;
|
|
14
10
|
constructor(params: {
|
|
15
11
|
env?: A.Env;
|
|
16
12
|
});
|
|
13
|
+
/**
|
|
14
|
+
* Sets the base url for this api.
|
|
15
|
+
*/
|
|
17
16
|
private setBaseUrl;
|
|
17
|
+
/**
|
|
18
|
+
* Gets the base url for this api.
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
18
21
|
GetBaseUrl(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Sets the base url for this api.
|
|
24
|
+
* @param url
|
|
25
|
+
*/
|
|
19
26
|
SetBaseUrl(url: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Performs an HTTP GET request.
|
|
29
|
+
* This will prepend the base url to the url.
|
|
30
|
+
* @param url
|
|
31
|
+
* @param params
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
20
34
|
GET(url: string, params?: A.IReqParams): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Performs an HTTP DELETE request.
|
|
37
|
+
* This will prepend the base url to the url.
|
|
38
|
+
* @param url
|
|
39
|
+
* @param params
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
21
42
|
DELETE(url: string, params?: A.IReqParams): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Performs an HTTP POST request.
|
|
45
|
+
* This will prepend the base url to the url.
|
|
46
|
+
* @param url
|
|
47
|
+
* @param data
|
|
48
|
+
* @param params
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
22
51
|
POST(url: string, data: any, params?: A.IReqParams): Promise<any>;
|
|
52
|
+
/**
|
|
53
|
+
* Performs a file upload request (HTTP POST).
|
|
54
|
+
* This will prepend the base url to the url.
|
|
55
|
+
* @param url
|
|
56
|
+
* @param blob
|
|
57
|
+
* @param params
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
23
60
|
UPLOAD(url: string, blob: Blob, params?: A.IUploadReqParams): Promise<any>;
|
|
24
61
|
}
|
|
25
62
|
}
|
|
@@ -4,8 +4,6 @@ export * from "./custom-form/custom-form-content";
|
|
|
4
4
|
export * from "./api/abstract-api";
|
|
5
5
|
export * from "./api/api";
|
|
6
6
|
export * from "./api/bruce-api";
|
|
7
|
-
export * from "./api/cam-api";
|
|
8
|
-
export * from "./api/idm-api";
|
|
9
7
|
export * from "./api/global-api";
|
|
10
8
|
export * from "./api/guardian-api";
|
|
11
9
|
export * from "./api/api-getters";
|
|
@@ -79,4 +77,4 @@ export * from "./internal/uploader";
|
|
|
79
77
|
export * from "./plugin/plugin";
|
|
80
78
|
export * from "./environment";
|
|
81
79
|
export * from "./data-source/data-source";
|
|
82
|
-
export declare const VERSION = "3.2.
|
|
80
|
+
export declare const VERSION = "3.2.1";
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Color } from "../common/color";
|
|
2
2
|
import { Entity } from "../entity/entity";
|
|
3
3
|
/**
|
|
4
|
-
* Utility for calculating values from
|
|
4
|
+
* Utility for calculating values from Nextspace fields.
|
|
5
5
|
* These fields are typically found in entity styles.
|
|
6
6
|
*/
|
|
7
7
|
export declare namespace Calculator {
|
|
8
|
+
/**
|
|
9
|
+
* Possible types of values that can be calculated.
|
|
10
|
+
* This will determine how to calculate the values, and if extra levels of validation for specific value types are done.
|
|
11
|
+
*/
|
|
8
12
|
enum EValueType {
|
|
9
13
|
Color = 0,
|
|
10
14
|
Input = 1,
|
|
@@ -13,14 +17,25 @@ export declare namespace Calculator {
|
|
|
13
17
|
TagColor = 4,
|
|
14
18
|
RandomColor = 5
|
|
15
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* A mapping option for a mapping value.
|
|
22
|
+
*/
|
|
16
23
|
interface IMappingOption {
|
|
17
24
|
fieldValue: string;
|
|
18
25
|
appliedValue: string;
|
|
19
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* A mapping value.
|
|
29
|
+
* This is a comparison between an attribute value to a set of available values.
|
|
30
|
+
* If the attribute value matches a field value, then the applied value is returned.
|
|
31
|
+
*/
|
|
20
32
|
interface IMappingValue {
|
|
21
33
|
field: string;
|
|
22
34
|
values: IMappingOption[];
|
|
23
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* A gradient point.
|
|
38
|
+
*/
|
|
24
39
|
interface IGradientPoint {
|
|
25
40
|
position: number;
|
|
26
41
|
color: string;
|
|
@@ -31,6 +46,10 @@ export declare namespace Calculator {
|
|
|
31
46
|
min?: number;
|
|
32
47
|
max?: number;
|
|
33
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* A field option.
|
|
51
|
+
* This is a value that can be calculated based on outlined settings.
|
|
52
|
+
*/
|
|
34
53
|
interface IField {
|
|
35
54
|
value: IGradientValue | IMappingValue | string | number;
|
|
36
55
|
type: EValueType;
|
|
@@ -53,9 +72,46 @@ export declare namespace Calculator {
|
|
|
53
72
|
* @param tags
|
|
54
73
|
*/
|
|
55
74
|
function GetColor(fields: IField[], entity: Entity.IEntity, tags: any[]): Color.IColor;
|
|
75
|
+
/**
|
|
76
|
+
* Calculates the value of arbitrary field options with assumption that desired result is a number.
|
|
77
|
+
* Will return null if a number is not found.
|
|
78
|
+
* @param fields
|
|
79
|
+
* @param entity
|
|
80
|
+
* @param tags
|
|
81
|
+
* @returns
|
|
82
|
+
*/
|
|
56
83
|
function GetNumber(fields: IField[], entity: Entity.IEntity, tags: any[]): number;
|
|
84
|
+
/**
|
|
85
|
+
* Calculates the value of arbitrary field options with assumption that desired result is a string.
|
|
86
|
+
* Will return null if a string is not found.
|
|
87
|
+
* @param fields
|
|
88
|
+
* @param entity
|
|
89
|
+
* @param tags
|
|
90
|
+
* @returns
|
|
91
|
+
*/
|
|
57
92
|
function GetString(fields: IField[], entity: Entity.IEntity, tags: any[]): string;
|
|
93
|
+
/**
|
|
94
|
+
* Calculates a mapping value. This can return any value type.
|
|
95
|
+
* It is intended to be parsed and validated within a value-type context. Eg: GetColor, GetNumber, GetString.
|
|
96
|
+
* @param value
|
|
97
|
+
* @param entity
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
58
100
|
function GetMappingValue(value: IMappingValue, entity: Entity.IEntity): string | number;
|
|
101
|
+
/**
|
|
102
|
+
* Calculates a gradient value. This can return any value type.
|
|
103
|
+
* It is intended to be parsed and validated within a value-type context. Eg: GetColor, GetNumber, GetString.
|
|
104
|
+
* @param value
|
|
105
|
+
* @param entity
|
|
106
|
+
* @returns
|
|
107
|
+
*/
|
|
59
108
|
function GetGradientValue(value: IGradientValue, entity: Entity.IEntity): Color.IColor;
|
|
109
|
+
/**
|
|
110
|
+
* Calculates an input value. This can return any value type.
|
|
111
|
+
* It is intended to be parsed and validated within a value-type context. Eg: GetColor, GetNumber, GetString.
|
|
112
|
+
* @param value
|
|
113
|
+
* @param entity
|
|
114
|
+
* @returns
|
|
115
|
+
*/
|
|
60
116
|
function GetInputValue(value: string, entity: Entity.IEntity): string | number;
|
|
61
117
|
}
|
|
@@ -3,29 +3,61 @@ import { BruceApi } from "../api/bruce-api";
|
|
|
3
3
|
import { UTC } from "../common/utc";
|
|
4
4
|
import { Uploader } from "../internal/uploader";
|
|
5
5
|
/**
|
|
6
|
-
* Describes the "Client File" concept within
|
|
6
|
+
* Describes the "Client File" concept within Nextspace.
|
|
7
7
|
* A client file is a record of a file uploaded to Bruce.
|
|
8
8
|
*/
|
|
9
9
|
export declare namespace ClientFile {
|
|
10
|
+
/**
|
|
11
|
+
* Returns cache identifier for a client file by ID.
|
|
12
|
+
* Example: {
|
|
13
|
+
* const api: BruceApi.Api = ...;
|
|
14
|
+
* const key = GetCacheKey("123");
|
|
15
|
+
* api.Cache.Remove(key);
|
|
16
|
+
* }
|
|
17
|
+
* @param fileId
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
10
20
|
function GetCacheKey(fileId: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Describes a client file record.
|
|
23
|
+
*/
|
|
11
24
|
interface IFile {
|
|
12
|
-
UploadedTimeUTC: UTC.IUTC;
|
|
13
|
-
FileExt: string;
|
|
14
25
|
ID: string;
|
|
26
|
+
FileExt: string;
|
|
15
27
|
MIMEType: string;
|
|
16
28
|
OriginalFileName: string;
|
|
17
29
|
OriginalLength: number;
|
|
18
30
|
"UploadedByUser.ID": string;
|
|
19
|
-
Purpose:
|
|
31
|
+
Purpose: Purpose;
|
|
32
|
+
UploadedTimeUTC: UTC.IUTC;
|
|
33
|
+
}
|
|
34
|
+
type Purpose = string | EPurpose;
|
|
35
|
+
enum EPurpose {
|
|
36
|
+
BookmarkThumbnail = "Bookmark Thumbnail"
|
|
20
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns the URL for a client file.
|
|
40
|
+
* @param params
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
21
43
|
function GetUrl(params: {
|
|
22
44
|
api?: BruceApi.Api;
|
|
23
45
|
fileId: string;
|
|
24
46
|
}): string;
|
|
47
|
+
/**
|
|
48
|
+
* Returns the URL for a client file with the extension.
|
|
49
|
+
* @param params
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
25
52
|
function GetUrlWithExt(params: {
|
|
26
53
|
api?: BruceApi.Api;
|
|
27
54
|
file: IFile;
|
|
28
55
|
}): string;
|
|
56
|
+
/**
|
|
57
|
+
* Returns a client file record by ID.
|
|
58
|
+
* @param params
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
29
61
|
function Get(params: {
|
|
30
62
|
api?: BruceApi.Api;
|
|
31
63
|
fileId: string;
|
|
@@ -33,11 +65,20 @@ export declare namespace ClientFile {
|
|
|
33
65
|
}): Promise<{
|
|
34
66
|
clientFile: IFile;
|
|
35
67
|
}>;
|
|
68
|
+
/**
|
|
69
|
+
* Deletes one or many client file records by IDs.
|
|
70
|
+
* @param params
|
|
71
|
+
*/
|
|
36
72
|
function Delete(params: {
|
|
37
73
|
api?: BruceApi.Api;
|
|
38
74
|
fileIds: string[];
|
|
39
75
|
req?: Api.IReqParams;
|
|
40
76
|
}): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Uploads a file and creates a new client file record.
|
|
79
|
+
* @param params
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
41
82
|
function Upload(params: {
|
|
42
83
|
api?: BruceApi.Api;
|
|
43
84
|
file: File;
|
|
@@ -47,6 +88,10 @@ export declare namespace ClientFile {
|
|
|
47
88
|
}): Promise<{
|
|
48
89
|
clientFile: IFile;
|
|
49
90
|
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Updates the purpose of a client file.
|
|
93
|
+
* @param params
|
|
94
|
+
*/
|
|
50
95
|
function UpdatePurpose(params: {
|
|
51
96
|
api?: BruceApi.Api;
|
|
52
97
|
fileId: string;
|
|
@@ -55,7 +100,7 @@ export declare namespace ClientFile {
|
|
|
55
100
|
}): Promise<void>;
|
|
56
101
|
/**
|
|
57
102
|
* Uploads a temp file.
|
|
58
|
-
* This will return a temp file
|
|
103
|
+
* This will return a temp file ID.
|
|
59
104
|
* @param params
|
|
60
105
|
* @returns
|
|
61
106
|
*/
|
|
@@ -67,6 +112,9 @@ export declare namespace ClientFile {
|
|
|
67
112
|
}): Promise<{
|
|
68
113
|
tempFileId: string;
|
|
69
114
|
}>;
|
|
115
|
+
/**
|
|
116
|
+
* Filter definitions for requesting a list of client files.
|
|
117
|
+
*/
|
|
70
118
|
namespace Filter {
|
|
71
119
|
enum EColumn {
|
|
72
120
|
ID = "id",
|
|
@@ -102,6 +150,11 @@ export declare namespace ClientFile {
|
|
|
102
150
|
Purpose?: string;
|
|
103
151
|
FilterRows?: Filter.IRow[];
|
|
104
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Returns a list of client files matching the filter.
|
|
155
|
+
* @param params
|
|
156
|
+
* @returns
|
|
157
|
+
*/
|
|
105
158
|
function GetList(params: {
|
|
106
159
|
api?: BruceApi.Api;
|
|
107
160
|
filter: IFilter;
|
|
@@ -110,12 +163,22 @@ export declare namespace ClientFile {
|
|
|
110
163
|
clientFiles: IFile[];
|
|
111
164
|
totalCount: number;
|
|
112
165
|
}>;
|
|
166
|
+
/**
|
|
167
|
+
* Utility for processing client files.
|
|
168
|
+
* Commonly used to convert a file to a different format. Eg: FBX to GLB.
|
|
169
|
+
*/
|
|
113
170
|
namespace Processor {
|
|
171
|
+
/**
|
|
172
|
+
* Describes the result of a file processing operation.
|
|
173
|
+
*/
|
|
114
174
|
interface IResult {
|
|
115
175
|
success: boolean;
|
|
116
176
|
clientFileId: string;
|
|
117
177
|
clientFileName: string;
|
|
118
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* The desired file format to convert to.
|
|
181
|
+
*/
|
|
119
182
|
enum EConvertExt {
|
|
120
183
|
GLB = ".glb",
|
|
121
184
|
SKP = ".skp"
|
|
@@ -123,7 +186,7 @@ export declare namespace ClientFile {
|
|
|
123
186
|
function ConvertFormat(params: {
|
|
124
187
|
api?: BruceApi.Api;
|
|
125
188
|
fileId: string;
|
|
126
|
-
ext
|
|
189
|
+
ext?: EConvertExt | string;
|
|
127
190
|
req?: Api.IReqParams;
|
|
128
191
|
}): Promise<IResult>;
|
|
129
192
|
}
|
|
@@ -8,8 +8,8 @@ export declare namespace Bounds {
|
|
|
8
8
|
maxLongitude: number;
|
|
9
9
|
minLatitude: number;
|
|
10
10
|
minLongitude: number;
|
|
11
|
-
maxAltitude
|
|
12
|
-
minAltitude
|
|
11
|
+
maxAltitude?: number;
|
|
12
|
+
minAltitude?: number;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Describes the boundaries used in entity requests.
|
|
@@ -23,7 +23,7 @@ export declare namespace Bounds {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Calculates boundaries from entity.
|
|
26
|
-
* This will not use the
|
|
26
|
+
* This will not use the entity's boundaries and instead calculate from geometry and location.
|
|
27
27
|
* @param entity
|
|
28
28
|
*/
|
|
29
29
|
function FromEntity(entity: Entity.IEntity): IBounds;
|
|
@@ -5,8 +5,27 @@
|
|
|
5
5
|
export declare class BruceEvent<TArgs> {
|
|
6
6
|
private _counter;
|
|
7
7
|
private callbacks;
|
|
8
|
+
/**
|
|
9
|
+
* Subscribes to this event.
|
|
10
|
+
* The provided callback will be called when the event is triggered.
|
|
11
|
+
* @param callback
|
|
12
|
+
* @returns A function that can be called to unsubscribe from this event.
|
|
13
|
+
*/
|
|
8
14
|
Subscribe(callback: (data: TArgs) => void): (() => void);
|
|
15
|
+
/**
|
|
16
|
+
* Unsubscribes from this event.
|
|
17
|
+
* @param id specific subscription entry to remove.
|
|
18
|
+
* @warning please use the returned function from Subscribe() instead of this function.
|
|
19
|
+
*/
|
|
9
20
|
Unsubscribe(id: number): void;
|
|
21
|
+
/**
|
|
22
|
+
* Triggers this event with optional data.
|
|
23
|
+
* This will call all subscribed callbacks.
|
|
24
|
+
* @param data
|
|
25
|
+
*/
|
|
10
26
|
Trigger(data?: TArgs): void;
|
|
27
|
+
/**
|
|
28
|
+
* Clears all subscriptions.
|
|
29
|
+
*/
|
|
11
30
|
Clear(): void;
|
|
12
31
|
}
|