bruce-models 0.8.4 → 0.8.6
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 +776 -435
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +768 -432
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account.js +15 -13
- package/dist/lib/account/account.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +6 -6
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/api/api.js +19 -2
- package/dist/lib/api/api.js.map +1 -1
- package/dist/lib/api/bruce-api.js +10 -6
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -0
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/calculator/calculator.js +53 -0
- package/dist/lib/calculator/calculator.js.map +1 -1
- package/dist/lib/client-file/client-file.js +11 -12
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/common/cache.js +83 -0
- package/dist/lib/common/cache.js.map +1 -1
- package/dist/lib/custom-form/custom-form-content.js +27 -0
- package/dist/lib/custom-form/custom-form-content.js.map +1 -0
- package/dist/lib/custom-form/custom-form.js +10 -10
- package/dist/lib/custom-form/custom-form.js.map +1 -1
- package/dist/lib/data-lab/data-lab.js +2 -2
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/entity/entity-attachment-type.js +7 -7
- package/dist/lib/entity/entity-attachment-type.js.map +1 -1
- package/dist/lib/entity/entity-attachment.js +13 -13
- package/dist/lib/entity/entity-attachment.js.map +1 -1
- package/dist/lib/entity/entity-comment.js +7 -7
- package/dist/lib/entity/entity-comment.js.map +1 -1
- package/dist/lib/entity/entity-coords.js +11 -11
- package/dist/lib/entity/entity-coords.js.map +1 -1
- package/dist/lib/entity/entity-link.js +7 -7
- package/dist/lib/entity/entity-link.js.map +1 -1
- package/dist/lib/entity/entity-lod.js +11 -10
- package/dist/lib/entity/entity-lod.js.map +1 -1
- package/dist/lib/entity/entity-relation-type.js +10 -10
- package/dist/lib/entity/entity-relation-type.js.map +1 -1
- package/dist/lib/entity/entity-relation.js +10 -10
- package/dist/lib/entity/entity-relation.js.map +1 -1
- package/dist/lib/entity/entity-source.js +8 -8
- package/dist/lib/entity/entity-source.js.map +1 -1
- package/dist/lib/entity/entity-tag.js +12 -12
- package/dist/lib/entity/entity-tag.js.map +1 -1
- package/dist/lib/entity/entity-type.js +10 -10
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +14 -14
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/import/import-cad.js +4 -4
- package/dist/lib/import/import-cad.js.map +1 -1
- package/dist/lib/import/import-csv.js +2 -2
- package/dist/lib/import/import-csv.js.map +1 -1
- package/dist/lib/import/import-json.js +2 -2
- package/dist/lib/import/import-json.js.map +1 -1
- package/dist/lib/import/import-kml.js +2 -2
- package/dist/lib/import/import-kml.js.map +1 -1
- package/dist/lib/import/imported-file.js +6 -6
- package/dist/lib/import/imported-file.js.map +1 -1
- package/dist/lib/markup/markup.js +111 -1
- package/dist/lib/markup/markup.js.map +1 -1
- package/dist/lib/program-key/program-key.js +10 -10
- package/dist/lib/program-key/program-key.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js +12 -12
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/project/project-view-legacy-tile.js +6 -6
- package/dist/lib/project/project-view-legacy-tile.js.map +1 -1
- package/dist/lib/project/project-view.js +11 -11
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/lib/server/message-broker.js +56 -34
- package/dist/lib/server/message-broker.js.map +1 -1
- package/dist/lib/server/pending-action.js +6 -6
- package/dist/lib/server/pending-action.js.map +1 -1
- package/dist/lib/server/task.js +4 -4
- package/dist/lib/server/task.js.map +1 -1
- package/dist/lib/style/style.js +10 -10
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/tileset/tileset.js +30 -32
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/lib/user/session.js +7 -7
- package/dist/lib/user/session.js.map +1 -1
- package/dist/lib/user/user-group.js +12 -12
- package/dist/lib/user/user-group.js.map +1 -1
- package/dist/lib/user/user.js +30 -30
- package/dist/lib/user/user.js.map +1 -1
- package/dist/types/account/account.d.ts +8 -5
- package/dist/types/ann-document/ann-document.d.ts +18 -3
- package/dist/types/api/api.d.ts +3 -1
- package/dist/types/api/bruce-api.d.ts +1 -1
- package/dist/types/bruce-models.d.ts +2 -0
- package/dist/types/calculator/calculator.d.ts +8 -0
- package/dist/types/client-file/client-file.d.ts +6 -5
- package/dist/types/common/cache.d.ts +9 -0
- package/dist/types/custom-form/custom-form-content.d.ts +67 -0
- package/dist/types/custom-form/custom-form.d.ts +7 -5
- package/dist/types/data-lab/data-lab.d.ts +2 -1
- package/dist/types/entity/entity-attachment-type.d.ts +4 -3
- package/dist/types/entity/entity-attachment.d.ts +7 -6
- package/dist/types/entity/entity-comment.d.ts +4 -3
- package/dist/types/entity/entity-coords.d.ts +6 -5
- package/dist/types/entity/entity-link.d.ts +4 -3
- package/dist/types/entity/entity-lod.d.ts +6 -4
- package/dist/types/entity/entity-relation-type.d.ts +5 -4
- package/dist/types/entity/entity-relation.d.ts +5 -4
- package/dist/types/entity/entity-source.d.ts +4 -3
- package/dist/types/entity/entity-tag.d.ts +6 -5
- package/dist/types/entity/entity-type.d.ts +5 -4
- package/dist/types/entity/entity.d.ts +6 -6
- package/dist/types/import/import-cad.d.ts +3 -2
- package/dist/types/import/import-csv.d.ts +2 -1
- package/dist/types/import/import-json.d.ts +2 -1
- package/dist/types/import/import-kml.d.ts +2 -1
- package/dist/types/import/imported-file.d.ts +3 -2
- package/dist/types/markup/markup.d.ts +95 -31
- package/dist/types/program-key/program-key.d.ts +5 -4
- package/dist/types/project/project-view-bookmark.d.ts +6 -5
- package/dist/types/project/project-view-legacy-tile.d.ts +3 -2
- package/dist/types/project/project-view.d.ts +5 -4
- package/dist/types/server/message-broker.d.ts +54 -35
- package/dist/types/server/pending-action.d.ts +3 -3
- package/dist/types/server/task.d.ts +3 -3
- package/dist/types/style/style.d.ts +5 -4
- package/dist/types/tileset/tileset.d.ts +13 -12
- package/dist/types/user/session.d.ts +4 -3
- package/dist/types/user/user-group.d.ts +7 -7
- package/dist/types/user/user.d.ts +14 -13
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export declare namespace Markup {
|
|
|
6
6
|
interface IMarkup {
|
|
7
7
|
divs?: Element.Div.IDiv[];
|
|
8
8
|
vectors?: Element.Drawing.Drawing[];
|
|
9
|
-
cesiumObjects?: Element.
|
|
9
|
+
cesiumObjects?: Element.Entity3d.Entity3d[];
|
|
10
10
|
width?: number;
|
|
11
11
|
height?: number;
|
|
12
12
|
defaultCameraPos?: any;
|
|
@@ -19,7 +19,7 @@ export declare namespace Markup {
|
|
|
19
19
|
}
|
|
20
20
|
interface IDiv {
|
|
21
21
|
id: string;
|
|
22
|
-
type
|
|
22
|
+
type?: EType;
|
|
23
23
|
contentRows: IRow[];
|
|
24
24
|
boxShadow?: IBoxShadow;
|
|
25
25
|
borderRadius?: number;
|
|
@@ -30,8 +30,8 @@ export declare namespace Markup {
|
|
|
30
30
|
y: number;
|
|
31
31
|
width: number;
|
|
32
32
|
height: number;
|
|
33
|
-
screenWidth
|
|
34
|
-
screenHeight
|
|
33
|
+
screenWidth?: number;
|
|
34
|
+
screenHeight?: number;
|
|
35
35
|
}
|
|
36
36
|
interface IBoxShadow {
|
|
37
37
|
horizontal: number;
|
|
@@ -77,10 +77,12 @@ export declare namespace Markup {
|
|
|
77
77
|
namespace ItemAction {
|
|
78
78
|
interface IActionLinkParams {
|
|
79
79
|
URL?: string;
|
|
80
|
-
bookmarkID?: string;
|
|
81
80
|
openInNewTab?: boolean;
|
|
82
81
|
closeMarkupOnOpen?: boolean;
|
|
83
82
|
}
|
|
83
|
+
interface IActionBookmarkParams {
|
|
84
|
+
bookmarkID?: string;
|
|
85
|
+
}
|
|
84
86
|
interface IActionInfoViewParams {
|
|
85
87
|
}
|
|
86
88
|
interface IActionRelationParams {
|
|
@@ -100,59 +102,121 @@ export declare namespace Markup {
|
|
|
100
102
|
ToggleRelationships = "RELATIONSHIPS",
|
|
101
103
|
Draggable = "DRAGABBLE",
|
|
102
104
|
Close = "CLOSE",
|
|
103
|
-
OpenBookmark = "BOOKMARK"
|
|
104
|
-
OpenMarkup = "MARKUP"
|
|
105
|
+
OpenBookmark = "BOOKMARK"
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
namespace Drawing {
|
|
109
|
-
type Drawing = Line.ILine |
|
|
110
|
+
type Drawing = Line.ILine | Line.IAnchor | FreePaint.IPaint;
|
|
110
111
|
namespace Line {
|
|
111
112
|
interface ILine {
|
|
112
|
-
|
|
113
|
+
pathType: "LINE";
|
|
114
|
+
path: string;
|
|
115
|
+
transform: string;
|
|
116
|
+
snaps: IAnchor[];
|
|
113
117
|
brushColor?: string;
|
|
114
|
-
brushHead?: string;
|
|
115
118
|
brushSize?: number;
|
|
116
|
-
|
|
117
|
-
pathType?: string;
|
|
119
|
+
angled?: boolean;
|
|
118
120
|
screenHeight?: number;
|
|
119
121
|
screenWidth?: number;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
brushHead?: EAnchorHeadStyle;
|
|
123
|
+
}
|
|
124
|
+
enum EAnchorDivSide {
|
|
125
|
+
TopLeft = 0,
|
|
126
|
+
TopRight = 1,
|
|
127
|
+
BottomLeft = 2,
|
|
128
|
+
BottomRight = 3,
|
|
129
|
+
Center = 4,
|
|
130
|
+
CenterLeft = 5,
|
|
131
|
+
CenterRight = 6,
|
|
132
|
+
CenterTop = 7,
|
|
133
|
+
CenterBottom = 8
|
|
134
|
+
}
|
|
135
|
+
enum EAnchorLineSide {
|
|
136
|
+
Start = 0,
|
|
137
|
+
End = 1
|
|
138
|
+
}
|
|
139
|
+
enum EAnchorHeadStyle {
|
|
140
|
+
None = "NONE",
|
|
141
|
+
Circle = "CIRCLE",
|
|
142
|
+
Arrow = "ARROW"
|
|
123
143
|
}
|
|
124
|
-
}
|
|
125
|
-
namespace Anchor {
|
|
126
144
|
interface IAnchor {
|
|
127
145
|
id?: string;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
brushHead?:
|
|
146
|
+
snapPosition?: EAnchorDivSide;
|
|
147
|
+
side?: EAnchorLineSide;
|
|
148
|
+
brushHead?: EAnchorHeadStyle;
|
|
131
149
|
fill?: string;
|
|
150
|
+
size?: number;
|
|
132
151
|
outlineFactor?: number;
|
|
152
|
+
stroke?: string;
|
|
133
153
|
cartesian?: Cartes.ICartes3;
|
|
134
154
|
screenPos?: Cartes.ICartes3;
|
|
135
155
|
positionFromEntity?: boolean;
|
|
136
|
-
stroke?: string;
|
|
137
|
-
size?: number;
|
|
138
|
-
head?: string;
|
|
139
156
|
}
|
|
157
|
+
const DEFAULT: ILine;
|
|
140
158
|
}
|
|
141
159
|
namespace FreePaint {
|
|
142
160
|
interface IPaint {
|
|
143
|
-
|
|
144
|
-
brushHead: string;
|
|
145
|
-
brushSize: string;
|
|
161
|
+
pathType: "PLAIN";
|
|
146
162
|
path: string;
|
|
147
|
-
pathType: string;
|
|
148
|
-
screenHeight: number;
|
|
149
|
-
screenWidth: number;
|
|
150
163
|
transform: string;
|
|
164
|
+
brushColor?: string;
|
|
165
|
+
brushSize?: number;
|
|
166
|
+
screenHeight?: number;
|
|
167
|
+
screenWidth?: number;
|
|
151
168
|
}
|
|
169
|
+
const DEFAULT: IPaint;
|
|
152
170
|
}
|
|
153
171
|
}
|
|
154
|
-
namespace
|
|
155
|
-
type
|
|
172
|
+
namespace Entity3d {
|
|
173
|
+
type Entity3d = Polygon.IPolygon | Polyline.IPolyline | Circle.ICircle | Walkscore.Walkscore;
|
|
174
|
+
namespace Polygon {
|
|
175
|
+
enum EClassificationType {
|
|
176
|
+
Both = "BOTH",
|
|
177
|
+
Terrain = "TERRAIN"
|
|
178
|
+
}
|
|
179
|
+
interface IPolygon {
|
|
180
|
+
id: any;
|
|
181
|
+
positions: Cartes.ICartes3[];
|
|
182
|
+
color?: string;
|
|
183
|
+
outlineColor?: string;
|
|
184
|
+
outlineWidth?: number;
|
|
185
|
+
extrudedHeight?: number;
|
|
186
|
+
classificationType?: EClassificationType;
|
|
187
|
+
smoothen?: number;
|
|
188
|
+
}
|
|
189
|
+
const DEFAULT: IPolygon;
|
|
190
|
+
}
|
|
191
|
+
namespace Polyline {
|
|
192
|
+
interface IPolyline {
|
|
193
|
+
id: string;
|
|
194
|
+
positions: Cartes.ICartes3[];
|
|
195
|
+
color?: string;
|
|
196
|
+
outlineWidth?: number;
|
|
197
|
+
smoothen?: number;
|
|
198
|
+
}
|
|
199
|
+
const DEFAULT: IPolyline;
|
|
200
|
+
}
|
|
201
|
+
namespace Circle {
|
|
202
|
+
interface ICircle {
|
|
203
|
+
id: string;
|
|
204
|
+
position: Cartes.ICartes3;
|
|
205
|
+
radius: number;
|
|
206
|
+
color?: string;
|
|
207
|
+
outlineWidth?: number;
|
|
208
|
+
extrudedHeight?: number;
|
|
209
|
+
outlineExtrusion?: number;
|
|
210
|
+
}
|
|
211
|
+
const DEFAULT: ICircle;
|
|
212
|
+
}
|
|
213
|
+
namespace Walkscore {
|
|
214
|
+
interface Walkscore {
|
|
215
|
+
id: string;
|
|
216
|
+
cartesian: Cartes.ICartes3;
|
|
217
|
+
details: number;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
156
220
|
}
|
|
157
221
|
}
|
|
158
222
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Api } from "../api/api";
|
|
1
2
|
import { BruceApi } from "../api/bruce-api";
|
|
2
3
|
declare type Id = ProgramKey.EProgramId | string;
|
|
3
4
|
/**
|
|
@@ -17,9 +18,9 @@ export declare namespace ProgramKey {
|
|
|
17
18
|
Key: string;
|
|
18
19
|
IsAccessRestricted?: boolean;
|
|
19
20
|
}
|
|
20
|
-
function Get(api: BruceApi.Api, programId: Id): Promise<IKey>;
|
|
21
|
-
function GetList(api: BruceApi.Api): Promise<IKey[]>;
|
|
22
|
-
function Delete(api: BruceApi.Api, programId: Id): Promise<void>;
|
|
23
|
-
function Update(api: BruceApi.Api, data: IKey): Promise<IKey>;
|
|
21
|
+
function Get(api: BruceApi.Api, programId: Id, reqParams?: Api.IReqParams): Promise<IKey>;
|
|
22
|
+
function GetList(api: BruceApi.Api, reqParams?: Api.IReqParams): Promise<IKey[]>;
|
|
23
|
+
function Delete(api: BruceApi.Api, programId: Id, reqParams?: Api.IReqParams): Promise<void>;
|
|
24
|
+
function Update(api: BruceApi.Api, data: IKey, reqParams?: Api.IReqParams): Promise<IKey>;
|
|
24
25
|
}
|
|
25
26
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Api } from "../api/api";
|
|
1
2
|
import { BruceApi } from "../api/bruce-api";
|
|
2
3
|
import { Camera } from "../common/camera";
|
|
3
4
|
import { UTC } from "../common/utc";
|
|
@@ -98,9 +99,9 @@ export declare namespace ProjectViewBookmark {
|
|
|
98
99
|
cameraFrustum?: Camera.EFrustum;
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
function Get(api: BruceApi.Api, viewId: string, bookmarkId: string): Promise<Bookmark>;
|
|
102
|
-
function Delete(api: BruceApi.Api, viewId: string, bookmarkId: string): Promise<void>;
|
|
103
|
-
function GetList(api: BruceApi.Api, viewId: string): Promise<Bookmark[]>;
|
|
104
|
-
function Update(api: BruceApi.Api, viewId: string, data: Bookmark): Promise<Bookmark>;
|
|
105
|
-
function SetOrder(api: BruceApi.Api, viewId: string, bookmarkIds: string[]): Promise<void>;
|
|
102
|
+
function Get(api: BruceApi.Api, viewId: string, bookmarkId: string, reqParams?: Api.IReqParams): Promise<Bookmark>;
|
|
103
|
+
function Delete(api: BruceApi.Api, viewId: string, bookmarkId: string, reqParams?: Api.IReqParams): Promise<void>;
|
|
104
|
+
function GetList(api: BruceApi.Api, viewId: string, reqParams?: Api.IReqParams): Promise<Bookmark[]>;
|
|
105
|
+
function Update(api: BruceApi.Api, viewId: string, data: Bookmark, reqParams?: Api.IReqParams): Promise<Bookmark>;
|
|
106
|
+
function SetOrder(api: BruceApi.Api, viewId: string, bookmarkIds: string[], reqParams?: Api.IReqParams): Promise<void>;
|
|
106
107
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BruceApi } from "../api/bruce-api";
|
|
2
|
+
import { Api } from "../api/api";
|
|
2
3
|
/**
|
|
3
4
|
* Describes a terrain or map source that are found in project view records.
|
|
4
5
|
* This is a concept we want to trash as we're moving towards storing tileset ids instead.
|
|
@@ -28,6 +29,6 @@ export declare namespace ProjectViewLegacyTile {
|
|
|
28
29
|
RequestWaterMask?: boolean;
|
|
29
30
|
RequestVertexNormals?: boolean;
|
|
30
31
|
}
|
|
31
|
-
function MergeMapTemplateData(getter: BruceApi.IGetter, items: IMapSource[], addIfMissing: boolean): Promise<IMapSource[]>;
|
|
32
|
-
function MergeTerrainTemplateData(getter: BruceApi.IGetter, items: ITerrainSource[], addIfMissing: boolean): Promise<IMapSource[]>;
|
|
32
|
+
function MergeMapTemplateData(getter: BruceApi.IGetter, items: IMapSource[], addIfMissing: boolean, reqParams?: Api.IReqParams): Promise<IMapSource[]>;
|
|
33
|
+
function MergeTerrainTemplateData(getter: BruceApi.IGetter, items: ITerrainSource[], addIfMissing: boolean, reqParams?: Api.IReqParams): Promise<IMapSource[]>;
|
|
33
34
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Api } from "../api/api";
|
|
1
2
|
import { BruceApi } from "../api/bruce-api";
|
|
2
3
|
import { UTC } from "../common/utc";
|
|
3
4
|
import { MenuItem } from "./menu-item";
|
|
@@ -81,8 +82,8 @@ export declare namespace ProjectView {
|
|
|
81
82
|
Settings: ISettings;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
function Get(api: BruceApi.Api, viewId: string): Promise<View>;
|
|
85
|
-
function GetList(api: BruceApi.Api): Promise<View[]>;
|
|
86
|
-
function Delete(api: BruceApi.Api, viewId: string): Promise<void>;
|
|
87
|
-
function Update(api: BruceApi.Api, data: View): Promise<View>;
|
|
85
|
+
function Get(api: BruceApi.Api, viewId: string, reqParams?: Api.IReqParams): Promise<View>;
|
|
86
|
+
function GetList(api: BruceApi.Api, reqParams?: Api.IReqParams): Promise<View[]>;
|
|
87
|
+
function Delete(api: BruceApi.Api, viewId: string, reqParams?: Api.IReqParams): Promise<void>;
|
|
88
|
+
function Update(api: BruceApi.Api, data: View, reqParams?: Api.IReqParams): Promise<View>;
|
|
88
89
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Api } from "../api/api";
|
|
2
2
|
export declare namespace MessageBroker {
|
|
3
|
-
export enum
|
|
3
|
+
export enum EAction {
|
|
4
4
|
SUBSCRIBE = "subscribe",
|
|
5
5
|
SUBSCRIBE_SHADOW = "subscribeShadow",
|
|
6
6
|
UNSUBSCRIBE = "unsubscribe",
|
|
@@ -8,7 +8,7 @@ export declare namespace MessageBroker {
|
|
|
8
8
|
GET_TOPIC_SUBSCRIBERS = "getTopicSubscribers"
|
|
9
9
|
}
|
|
10
10
|
/** Events types any component may get from server */
|
|
11
|
-
export enum
|
|
11
|
+
export enum EEvent {
|
|
12
12
|
SAVED = "saved",
|
|
13
13
|
UPDATED = "updated",
|
|
14
14
|
DELETED = "deleted",
|
|
@@ -17,49 +17,49 @@ export declare namespace MessageBroker {
|
|
|
17
17
|
USERS_UPDATE = "usersUpdate"
|
|
18
18
|
}
|
|
19
19
|
interface IMessageBase {
|
|
20
|
-
action:
|
|
20
|
+
action: EAction;
|
|
21
21
|
topic: string;
|
|
22
22
|
}
|
|
23
23
|
interface IBroadcastMessage extends IMessageBase {
|
|
24
|
-
action:
|
|
25
|
-
event:
|
|
24
|
+
action: EAction.BROADCAST;
|
|
25
|
+
event: EEvent;
|
|
26
26
|
user: string;
|
|
27
27
|
}
|
|
28
28
|
export type SubscribeMessage = IMessageBase & {
|
|
29
|
-
action:
|
|
29
|
+
action: EAction.SUBSCRIBE | EAction.SUBSCRIBE_SHADOW;
|
|
30
30
|
user: string;
|
|
31
31
|
};
|
|
32
32
|
export type UnsubscribeMessage = IMessageBase & {
|
|
33
|
-
action:
|
|
33
|
+
action: EAction.UNSUBSCRIBE;
|
|
34
34
|
};
|
|
35
35
|
export type GetTopicSubscribersMessage = IMessageBase & {
|
|
36
|
-
action:
|
|
36
|
+
action: EAction.GET_TOPIC_SUBSCRIBERS;
|
|
37
37
|
};
|
|
38
38
|
export type BroadcastMessageSaved = IBroadcastMessage & {
|
|
39
|
-
event:
|
|
39
|
+
event: EEvent.SAVED;
|
|
40
40
|
};
|
|
41
41
|
export type BroadcastMessageUpdated = IBroadcastMessage & {
|
|
42
|
-
event:
|
|
42
|
+
event: EEvent.UPDATED;
|
|
43
43
|
};
|
|
44
44
|
export type BroadcastMessageDeleted = IBroadcastMessage & {
|
|
45
|
-
event:
|
|
45
|
+
event: EEvent.DELETED;
|
|
46
46
|
};
|
|
47
47
|
export type BroadcastMessageEditionStarted = IBroadcastMessage & {
|
|
48
|
-
event:
|
|
48
|
+
event: EEvent.EDIT_STARTED;
|
|
49
49
|
};
|
|
50
50
|
export type BroadcastMessageEditionFinished = IBroadcastMessage & {
|
|
51
|
-
event:
|
|
51
|
+
event: EEvent.EDIT_FINISHED;
|
|
52
52
|
};
|
|
53
53
|
export type BroadcastMessageUsersUpdate = IBroadcastMessage & {
|
|
54
|
-
event:
|
|
54
|
+
event: EEvent.USERS_UPDATE;
|
|
55
55
|
data: string[];
|
|
56
56
|
};
|
|
57
57
|
export interface OutgoingMessageBase {
|
|
58
58
|
topic: string;
|
|
59
|
-
event?:
|
|
59
|
+
event?: EEvent;
|
|
60
60
|
}
|
|
61
61
|
export type OutgoingBroadcastMessage = IMessageBase & {
|
|
62
|
-
action:
|
|
62
|
+
action: EAction.BROADCAST;
|
|
63
63
|
time: number;
|
|
64
64
|
};
|
|
65
65
|
export type IncomingMessage = BroadcastMessageSaved | BroadcastMessageUpdated | BroadcastMessageDeleted | BroadcastMessageEditionStarted | BroadcastMessageEditionFinished | BroadcastMessageUsersUpdate;
|
|
@@ -68,41 +68,60 @@ export declare namespace MessageBroker {
|
|
|
68
68
|
time: number;
|
|
69
69
|
};
|
|
70
70
|
export interface IBroker {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
Subscribe: (topic: string, callback: (msg: IncomingMessage) => void) => void;
|
|
72
|
+
SubscribeShadow: (topic: string, callback: (msg: IncomingMessage) => void) => void;
|
|
73
|
+
Unsubscribe: (topic: string, callback: (msg: IncomingMessage) => void) => void;
|
|
74
|
+
SendBroadcastMessage: (msg: OutgoingMessageBase) => void;
|
|
75
|
+
IsConnected: boolean;
|
|
76
76
|
}
|
|
77
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Communicates with a server message broker.
|
|
79
|
+
*/
|
|
78
80
|
export class WebSocketBroker implements IBroker {
|
|
79
81
|
private uri;
|
|
80
|
-
private env
|
|
82
|
+
private env?;
|
|
81
83
|
private subscriptions;
|
|
82
84
|
private ws;
|
|
83
85
|
private reconnects;
|
|
84
86
|
private maxReconnects;
|
|
85
87
|
private user;
|
|
86
|
-
constructor(uri: string, env
|
|
88
|
+
constructor(uri: string, env?: Api.Env);
|
|
87
89
|
private connect;
|
|
88
90
|
private formatApiUri;
|
|
89
|
-
|
|
91
|
+
SetUser(user: string): void;
|
|
90
92
|
private onOpen;
|
|
91
93
|
private onClose;
|
|
92
94
|
private onMessage;
|
|
93
95
|
private onError;
|
|
94
96
|
private addSubscriber;
|
|
95
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* Send message to server.
|
|
99
|
+
* @param msg
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
96
102
|
private sendMessage;
|
|
97
|
-
get
|
|
98
|
-
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
get IsConnected(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Add a subscriber to a topic.
|
|
106
|
+
* @param topic
|
|
107
|
+
* @param callback
|
|
108
|
+
* @param action
|
|
109
|
+
*/
|
|
110
|
+
Subscribe(topic: string, callback: (msg: IncomingMessage) => void, action?: EAction): void;
|
|
111
|
+
/**
|
|
112
|
+
* Add a shadow subscriber to a topic.
|
|
113
|
+
* @param topic
|
|
114
|
+
* @param callback
|
|
115
|
+
*/
|
|
116
|
+
SubscribeShadow(topic: string, callback: (msg: IncomingMessage) => void): void;
|
|
117
|
+
/**
|
|
118
|
+
* Remove a subscriber from a topic.
|
|
119
|
+
* @param topic
|
|
120
|
+
* @param callback
|
|
121
|
+
*/
|
|
122
|
+
Unsubscribe(topic: string, callback: (msg: IncomingMessage) => void): void;
|
|
123
|
+
SendBroadcastMessage(msg: OutgoingMessageBase): void;
|
|
124
|
+
RequestTopicUsers(topic: string, callback: (msg: IncomingMessage) => void): void;
|
|
106
125
|
}
|
|
107
126
|
export {};
|
|
108
127
|
}
|
|
@@ -32,7 +32,7 @@ export declare namespace PendingAction {
|
|
|
32
32
|
"Message.Type": string;
|
|
33
33
|
Message: string;
|
|
34
34
|
}
|
|
35
|
-
function Get(api: BruceApi.Api, actionId: number): Promise<IAction>;
|
|
36
|
-
function GetRelevantList(api: BruceApi.Api, stricter?: boolean): Promise<IAction[]>;
|
|
37
|
-
function GetMessages(api: BruceApi.Api, actionId: number, order?: Api.ESortOrder, startIndex?: number, amount?: number): Promise<IMessage[]>;
|
|
35
|
+
function Get(api: BruceApi.Api, actionId: number, reqParams?: Api.IReqParams): Promise<IAction>;
|
|
36
|
+
function GetRelevantList(api: BruceApi.Api, stricter?: boolean, reqParams?: Api.IReqParams): Promise<IAction[]>;
|
|
37
|
+
function GetMessages(api: BruceApi.Api, actionId: number, order?: Api.ESortOrder, startIndex?: number, amount?: number, reqParams?: Api.IReqParams): Promise<IMessage[]>;
|
|
38
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobalApi } from "../bruce-models";
|
|
1
|
+
import { Api, GlobalApi } from "../bruce-models";
|
|
2
2
|
export declare namespace Task {
|
|
3
3
|
interface ITask {
|
|
4
4
|
account: string;
|
|
@@ -18,6 +18,6 @@ export declare namespace Task {
|
|
|
18
18
|
enum ETaskPurpose {
|
|
19
19
|
BackupRestore = "BackupRestore"
|
|
20
20
|
}
|
|
21
|
-
function Get(api: GlobalApi.Api, id: number): Promise<ITask>;
|
|
22
|
-
function GetList(api: GlobalApi.Api, accountId?: string, type?: ETaskPurpose): Promise<ITask[]>;
|
|
21
|
+
function Get(api: GlobalApi.Api, id: number, reqParams?: Api.IReqParams): Promise<ITask>;
|
|
22
|
+
function GetList(api: GlobalApi.Api, accountId?: string, type?: ETaskPurpose, reqParams?: Api.IReqParams): Promise<ITask[]>;
|
|
23
23
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Api } from "../api/api";
|
|
1
2
|
import { BruceApi, Calculator } from "../bruce-models";
|
|
2
3
|
/**
|
|
3
4
|
* Describes the "Style" concept within Bruce.
|
|
@@ -78,8 +79,8 @@ export declare namespace Style {
|
|
|
78
79
|
Settings: Settings;
|
|
79
80
|
Type: EType;
|
|
80
81
|
}
|
|
81
|
-
function GetList(api: BruceApi.Api): Promise<IStyle[]>;
|
|
82
|
-
function Get(api: BruceApi.Api, id: number): Promise<IStyle>;
|
|
83
|
-
function Update(api: BruceApi.Api, data: IStyle): Promise<IStyle>;
|
|
84
|
-
function Delete(api: BruceApi.Api, id: number): Promise<void>;
|
|
82
|
+
function GetList(api: BruceApi.Api, reqParams?: Api.IReqParams): Promise<IStyle[]>;
|
|
83
|
+
function Get(api: BruceApi.Api, id: number, reqParams?: Api.IReqParams): Promise<IStyle>;
|
|
84
|
+
function Update(api: BruceApi.Api, data: IStyle, reqParams?: Api.IReqParams): Promise<IStyle>;
|
|
85
|
+
function Delete(api: BruceApi.Api, id: number, reqParams?: Api.IReqParams): Promise<void>;
|
|
85
86
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Api } from "../api/api";
|
|
1
2
|
import { BruceApi } from "../api/bruce-api";
|
|
2
3
|
import { UTC } from "../common/utc";
|
|
3
4
|
import { TilesetPointcloud } from "./tileset-pointcloud";
|
|
@@ -51,18 +52,18 @@ export declare namespace Tileset {
|
|
|
51
52
|
Weight = "weight",
|
|
52
53
|
UCS = "ucs"
|
|
53
54
|
}
|
|
54
|
-
function Get(api: BruceApi.Api, tilesetId: string, loadFiles?: boolean): Promise<ITileset>;
|
|
55
|
-
function GetList(api: BruceApi.Api): Promise<ITileset[]>;
|
|
56
|
-
function Delete(api: BruceApi.Api, tilesetId: string): Promise<void>;
|
|
57
|
-
function Update(api: BruceApi.Api, data: ITileset): Promise<ITileset>;
|
|
58
|
-
function UploadFile(api: BruceApi.Api, tilesetId: string, file: Blob,
|
|
59
|
-
function DeleteFile(api: BruceApi.Api, tilesetId: string, file: string): Promise<void>;
|
|
60
|
-
function UploadSrcFile(api: BruceApi.Api, tilesetId: string, file: Blob,
|
|
61
|
-
function DeleteSrcFile(api: BruceApi.Api, tilesetId: string, file: string): Promise<void>;
|
|
55
|
+
function Get(api: BruceApi.Api, tilesetId: string, loadFiles?: boolean, reqParams?: Api.IReqParams): Promise<ITileset>;
|
|
56
|
+
function GetList(api: BruceApi.Api, reqParams?: Api.IReqParams): Promise<ITileset[]>;
|
|
57
|
+
function Delete(api: BruceApi.Api, tilesetId: string, reqParams?: Api.IReqParams): Promise<void>;
|
|
58
|
+
function Update(api: BruceApi.Api, data: ITileset, reqParams?: Api.IReqParams): Promise<ITileset>;
|
|
59
|
+
function UploadFile(api: BruceApi.Api, tilesetId: string, file: Blob, reqParams?: Api.IUploadReqParams): Promise<void>;
|
|
60
|
+
function DeleteFile(api: BruceApi.Api, tilesetId: string, file: string, reqParams?: Api.IReqParams): Promise<void>;
|
|
61
|
+
function UploadSrcFile(api: BruceApi.Api, tilesetId: string, file: Blob, reqParams?: Api.IUploadReqParams): Promise<void>;
|
|
62
|
+
function DeleteSrcFile(api: BruceApi.Api, tilesetId: string, file: string, reqParams?: Api.IReqParams): Promise<void>;
|
|
62
63
|
function GetFileUrl(api: BruceApi.Api, tilesetId: string, file: string): string;
|
|
63
64
|
function GetSrcFileUrl(api: BruceApi.Api, tilesetId: string, file: string): string;
|
|
64
65
|
function GetPublicFileUrl(api: BruceApi.Api, tilesetId: string, file: string): string;
|
|
65
|
-
function Generate(api: BruceApi.Api, tilesetId: string): Promise<number>;
|
|
66
|
+
function Generate(api: BruceApi.Api, tilesetId: string, reqParams?: Api.IReqParams): Promise<number>;
|
|
66
67
|
namespace Publish {
|
|
67
68
|
function GetCacheKey(accountId: string, tilesetId?: string): string;
|
|
68
69
|
interface IPublish {
|
|
@@ -74,9 +75,9 @@ export declare namespace Tileset {
|
|
|
74
75
|
IsPublic: boolean;
|
|
75
76
|
"EnabledFor.ClientAccount.ID"?: string[];
|
|
76
77
|
}
|
|
77
|
-
function Update(api: GlobalApi.Api, data: IPublish): Promise<IPublish>;
|
|
78
|
-
function Get(api: GlobalApi.Api, accountId: string, tilesetId: string): Promise<IPublish>;
|
|
79
|
-
function GetList(api: GlobalApi.Api, accountId: string): Promise<IPublish[]>;
|
|
78
|
+
function Update(api: GlobalApi.Api, data: IPublish, reqParams?: Api.IReqParams): Promise<IPublish>;
|
|
79
|
+
function Get(api: GlobalApi.Api, accountId: string, tilesetId: string, reqParams?: Api.IReqParams): Promise<IPublish>;
|
|
80
|
+
function GetList(api: GlobalApi.Api, accountId: string, reqParams?: Api.IReqParams): Promise<IPublish[]>;
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Api } from "../api/api";
|
|
1
2
|
import { IdmApi } from "../api/idm-api";
|
|
2
3
|
import { UTC } from "../common/utc";
|
|
3
4
|
import { Permission } from "./permission";
|
|
@@ -26,9 +27,9 @@ export declare namespace Session {
|
|
|
26
27
|
EnabledFeatures?: Permission.Perm[];
|
|
27
28
|
UserGroups?: string[];
|
|
28
29
|
}
|
|
29
|
-
function Get(api: IdmApi.Api, sessionId: string): Promise<ISession>;
|
|
30
|
-
function Login(api: IdmApi.Api, username: string, password: string, accountId?: string): Promise<ISession>;
|
|
31
|
-
function Logout(api: IdmApi.Api): Promise<void>;
|
|
30
|
+
function Get(api: IdmApi.Api, sessionId: string, reqParams?: Api.IReqParams): Promise<ISession>;
|
|
31
|
+
function Login(api: IdmApi.Api, username: string, password: string, accountId?: string, reqParams?: Api.IReqParams): Promise<ISession>;
|
|
32
|
+
function Logout(api: IdmApi.Api, reqParams?: Api.IReqParams): Promise<void>;
|
|
32
33
|
function IsPermEnabled(session: ISession, accountId: string, perm: string): boolean;
|
|
33
34
|
function IsSuperPermEnabled(session: ISession, perm: string): boolean;
|
|
34
35
|
function IsAccountAdmin(session: ISession, accountId: string): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdmApi, Permission } from "../bruce-models";
|
|
1
|
+
import { Api, IdmApi, Permission } from "../bruce-models";
|
|
2
2
|
import { User } from "./user";
|
|
3
3
|
/**
|
|
4
4
|
* Describes the "User Group" concept within Bruce.
|
|
@@ -11,10 +11,10 @@ export declare namespace UserGroup {
|
|
|
11
11
|
"ID": string;
|
|
12
12
|
"Name"?: string;
|
|
13
13
|
}
|
|
14
|
-
function GetByName(api: IdmApi.Api, accountId: string, name: string): Promise<IGroup>;
|
|
15
|
-
function GetUsers(api: IdmApi.Api, accountId: string, id: string): Promise<User.IUser[]>;
|
|
16
|
-
function GetListByPerm(api: IdmApi.Api, accountId: string, perm: Permission.Perm): Promise<IGroup[]>;
|
|
17
|
-
function GetList(api: IdmApi.Api, accountId: string): Promise<IGroup[]>;
|
|
18
|
-
function Delete(api: IdmApi.Api, accountId: string, id: string): Promise<void>;
|
|
19
|
-
function Update(api: IdmApi.Api, data: IGroup): Promise<IGroup>;
|
|
14
|
+
function GetByName(api: IdmApi.Api, accountId: string, name: string, reqParams?: Api.IReqParams): Promise<IGroup>;
|
|
15
|
+
function GetUsers(api: IdmApi.Api, accountId: string, id: string, reqParams?: Api.IReqParams): Promise<User.IUser[]>;
|
|
16
|
+
function GetListByPerm(api: IdmApi.Api, accountId: string, perm: Permission.Perm, reqParams?: Api.IReqParams): Promise<IGroup[]>;
|
|
17
|
+
function GetList(api: IdmApi.Api, accountId: string, reqParams?: Api.IReqParams): Promise<IGroup[]>;
|
|
18
|
+
function Delete(api: IdmApi.Api, accountId: string, id: string, reqParams?: Api.IReqParams): Promise<void>;
|
|
19
|
+
function Update(api: IdmApi.Api, data: IGroup, reqParams?: Api.IReqParams): Promise<IGroup>;
|
|
20
20
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Api } from "../api/api";
|
|
1
2
|
import { IdmApi } from "../api/idm-api";
|
|
2
3
|
import { UserGroup } from "./user-group";
|
|
3
4
|
/**
|
|
@@ -33,27 +34,27 @@ export declare namespace User {
|
|
|
33
34
|
"UserGroup.ID"?: string[];
|
|
34
35
|
"UserGroups"?: UserGroup.IGroup[];
|
|
35
36
|
}
|
|
36
|
-
function Get(api: IdmApi.Api, id: string, accountId?: string): Promise<IUser>;
|
|
37
|
-
function Update(api: IdmApi.Api, data: IUser): Promise<IUser>;
|
|
38
|
-
function GetUsernameAvailable(api: IdmApi.Api, username: string): Promise<boolean>;
|
|
37
|
+
function Get(api: IdmApi.Api, id: string, accountId?: string, reqParams?: Api.IReqParams): Promise<IUser>;
|
|
38
|
+
function Update(api: IdmApi.Api, data: IUser, reqParams?: Api.IReqParams): Promise<IUser>;
|
|
39
|
+
function GetUsernameAvailable(api: IdmApi.Api, username: string, reqParams?: Api.IReqParams): Promise<boolean>;
|
|
39
40
|
namespace LoginUser {
|
|
40
41
|
function GetListCacheKey(accountId: string): string;
|
|
41
|
-
function GetByEmail(api: IdmApi.Api, email: string, accountId?: string): Promise<IUser>;
|
|
42
|
-
function GetList(api: IdmApi.Api, accountId: string, exclusive?: boolean): Promise<IUser[]>;
|
|
42
|
+
function GetByEmail(api: IdmApi.Api, email: string, accountId?: string, reqParams?: Api.IReqParams): Promise<IUser>;
|
|
43
|
+
function GetList(api: IdmApi.Api, accountId: string, exclusive?: boolean, reqParams?: Api.IReqParams): Promise<IUser[]>;
|
|
43
44
|
/**
|
|
44
45
|
* Sends a signup email to the specified email address.
|
|
45
46
|
* @param api
|
|
46
47
|
* @param email
|
|
47
48
|
* @returns
|
|
48
49
|
*/
|
|
49
|
-
function Signup(api: IdmApi.Api, email: string): Promise<void>;
|
|
50
|
+
function Signup(api: IdmApi.Api, email: string, reqParams?: Api.IReqParams): Promise<void>;
|
|
50
51
|
/**
|
|
51
52
|
* Sends a new signup email using a previous one's expired code.
|
|
52
53
|
* @param api
|
|
53
54
|
* @param expiredCode
|
|
54
55
|
* @returns
|
|
55
56
|
*/
|
|
56
|
-
function SignupResend(api: IdmApi.Api, expiredCode: string): Promise<void>;
|
|
57
|
+
function SignupResend(api: IdmApi.Api, expiredCode: string, reqParams?: Api.IReqParams): Promise<void>;
|
|
57
58
|
/**
|
|
58
59
|
* Completes signup using user data and a signup code.
|
|
59
60
|
* @param api
|
|
@@ -62,7 +63,7 @@ export declare namespace User {
|
|
|
62
63
|
* @param accountId
|
|
63
64
|
* @returns
|
|
64
65
|
*/
|
|
65
|
-
function SignupComplete(api: IdmApi.Api, code: string, data: IUser, accountId?: string): Promise<IUser>;
|
|
66
|
+
function SignupComplete(api: IdmApi.Api, code: string, data: IUser, accountId?: string, reqParams?: Api.IReqParams): Promise<IUser>;
|
|
66
67
|
/**
|
|
67
68
|
* Sends a password reset email to the specified email address.
|
|
68
69
|
* @param api
|
|
@@ -70,7 +71,7 @@ export declare namespace User {
|
|
|
70
71
|
* @param email
|
|
71
72
|
* @returns user id associated with provided email.
|
|
72
73
|
*/
|
|
73
|
-
function ForgotPassword(api: IdmApi.Api, accountId: string, email: string): Promise<string>;
|
|
74
|
+
function ForgotPassword(api: IdmApi.Api, accountId: string, email: string, reqParams?: Api.IReqParams): Promise<string>;
|
|
74
75
|
/**
|
|
75
76
|
* Completes password reset using a password reset code and new password.
|
|
76
77
|
* @param api
|
|
@@ -79,12 +80,12 @@ export declare namespace User {
|
|
|
79
80
|
* @param password
|
|
80
81
|
* @returns
|
|
81
82
|
*/
|
|
82
|
-
function ForgotPasswordComplete(api: IdmApi.Api, code: string, userId: string, password: string): Promise<IUser>;
|
|
83
|
+
function ForgotPasswordComplete(api: IdmApi.Api, code: string, userId: string, password: string, reqParams?: Api.IReqParams): Promise<IUser>;
|
|
83
84
|
}
|
|
84
85
|
namespace AccessToken {
|
|
85
86
|
function GetListCacheKey(accountId: string): string;
|
|
86
|
-
function GetList(api: IdmApi.Api, accountId: string): Promise<IUser[]>;
|
|
87
|
-
function Delete(api: IdmApi.Api, id: string): Promise<void>;
|
|
88
|
-
function Create(api: IdmApi.Api, data: IUser): Promise<IUser>;
|
|
87
|
+
function GetList(api: IdmApi.Api, accountId: string, reqParams?: Api.IReqParams): Promise<IUser[]>;
|
|
88
|
+
function Delete(api: IdmApi.Api, id: string, reqParams?: Api.IReqParams): Promise<void>;
|
|
89
|
+
function Create(api: IdmApi.Api, data: IUser, reqParams?: Api.IReqParams): Promise<IUser>;
|
|
89
90
|
}
|
|
90
91
|
}
|