bruce-models 1.3.7 → 1.3.9

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.
Files changed (158) hide show
  1. package/dist/bruce-models.es5.js +1195 -676
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +1194 -673
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account.js +35 -26
  6. package/dist/lib/account/account.js.map +1 -1
  7. package/dist/lib/ann-document/ann-document.js +20 -6
  8. package/dist/lib/ann-document/ann-document.js.map +1 -1
  9. package/dist/lib/api/abstract-api.js +20 -13
  10. package/dist/lib/api/abstract-api.js.map +1 -1
  11. package/dist/lib/api/api.js +0 -4
  12. package/dist/lib/api/api.js.map +1 -1
  13. package/dist/lib/api/bruce-api.js +5 -1
  14. package/dist/lib/api/bruce-api.js.map +1 -1
  15. package/dist/lib/bruce-models.js +0 -8
  16. package/dist/lib/bruce-models.js.map +1 -1
  17. package/dist/lib/calculator/calculator.js +12 -3
  18. package/dist/lib/calculator/calculator.js.map +1 -1
  19. package/dist/lib/client-file/client-file.js +77 -50
  20. package/dist/lib/client-file/client-file.js.map +1 -1
  21. package/dist/lib/common/bruce-variable.js +6 -2
  22. package/dist/lib/common/bruce-variable.js.map +1 -1
  23. package/dist/lib/common/geometry.js +5 -5
  24. package/dist/lib/common/geometry.js.map +1 -1
  25. package/dist/lib/custom-form/custom-form.js +28 -10
  26. package/dist/lib/custom-form/custom-form.js.map +1 -1
  27. package/dist/lib/data-lab/data-lab.js +26 -26
  28. package/dist/lib/data-lab/data-lab.js.map +1 -1
  29. package/dist/lib/entity/entity-attachment-type.js +13 -6
  30. package/dist/lib/entity/entity-attachment-type.js.map +1 -1
  31. package/dist/lib/entity/entity-attachment.js +23 -11
  32. package/dist/lib/entity/entity-attachment.js.map +1 -1
  33. package/dist/lib/entity/entity-comment.js +13 -6
  34. package/dist/lib/entity/entity-comment.js.map +1 -1
  35. package/dist/lib/entity/entity-coords.js +47 -14
  36. package/dist/lib/entity/entity-coords.js.map +1 -1
  37. package/dist/lib/entity/entity-link.js +13 -6
  38. package/dist/lib/entity/entity-link.js.map +1 -1
  39. package/dist/lib/entity/entity-lod-category.js +18 -8
  40. package/dist/lib/entity/entity-lod-category.js.map +1 -1
  41. package/dist/lib/entity/entity-lod.js +32 -18
  42. package/dist/lib/entity/entity-lod.js.map +1 -1
  43. package/dist/lib/entity/entity-relation-type.js +28 -10
  44. package/dist/lib/entity/entity-relation-type.js.map +1 -1
  45. package/dist/lib/entity/entity-relation.js +35 -17
  46. package/dist/lib/entity/entity-relation.js.map +1 -1
  47. package/dist/lib/entity/entity-source.js +31 -9
  48. package/dist/lib/entity/entity-source.js.map +1 -1
  49. package/dist/lib/entity/entity-tag.js +28 -11
  50. package/dist/lib/entity/entity-tag.js.map +1 -1
  51. package/dist/lib/entity/entity-type.js +28 -10
  52. package/dist/lib/entity/entity-type.js.map +1 -1
  53. package/dist/lib/entity/entity.js +93 -68
  54. package/dist/lib/entity/entity.js.map +1 -1
  55. package/dist/lib/entity/getters/entity-filter-getter.js +17 -14
  56. package/dist/lib/entity/getters/entity-filter-getter.js.map +1 -1
  57. package/dist/lib/import/import-cad.js +6 -4
  58. package/dist/lib/import/import-cad.js.map +1 -1
  59. package/dist/lib/import/import-csv.js +3 -2
  60. package/dist/lib/import/import-csv.js.map +1 -1
  61. package/dist/lib/import/import-json.js +3 -2
  62. package/dist/lib/import/import-json.js.map +1 -1
  63. package/dist/lib/import/import-kml.js +3 -2
  64. package/dist/lib/import/import-kml.js.map +1 -1
  65. package/dist/lib/import/imported-file.js +20 -6
  66. package/dist/lib/import/imported-file.js.map +1 -1
  67. package/dist/lib/markup/markup.js +98 -97
  68. package/dist/lib/markup/markup.js.map +1 -1
  69. package/dist/lib/program-key/program-key.js +28 -10
  70. package/dist/lib/program-key/program-key.js.map +1 -1
  71. package/dist/lib/project/menu-item.js.map +1 -1
  72. package/dist/lib/project/project-view-bookmark.js +41 -20
  73. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  74. package/dist/lib/project/project-view-legacy-tile.js +15 -5
  75. package/dist/lib/project/project-view-legacy-tile.js.map +1 -1
  76. package/dist/lib/project/project-view.js +38 -20
  77. package/dist/lib/project/project-view.js.map +1 -1
  78. package/dist/lib/server/pending-action.js +17 -7
  79. package/dist/lib/server/pending-action.js.map +1 -1
  80. package/dist/lib/server/task.js +11 -6
  81. package/dist/lib/server/task.js.map +1 -1
  82. package/dist/lib/style/style.js +31 -13
  83. package/dist/lib/style/style.js.map +1 -1
  84. package/dist/lib/tileset/tileset.js +90 -30
  85. package/dist/lib/tileset/tileset.js.map +1 -1
  86. package/dist/lib/user/session.js +37 -13
  87. package/dist/lib/user/session.js.map +1 -1
  88. package/dist/lib/user/user-group.js +29 -12
  89. package/dist/lib/user/user-group.js.map +1 -1
  90. package/dist/lib/user/user.js +79 -44
  91. package/dist/lib/user/user.js.map +1 -1
  92. package/dist/lib/util/url-utils.js +3 -3
  93. package/dist/lib/util/url-utils.js.map +1 -1
  94. package/dist/types/account/account.d.ts +49 -17
  95. package/dist/types/ann-document/ann-document.d.ts +14 -2
  96. package/dist/types/api/api.d.ts +2 -3
  97. package/dist/types/bruce-models.d.ts +0 -8
  98. package/dist/types/client-file/client-file.d.ts +81 -45
  99. package/dist/types/common/bruce-variable.d.ts +5 -1
  100. package/dist/types/common/geometry.d.ts +1 -1
  101. package/dist/types/custom-form/custom-form.d.ts +26 -4
  102. package/dist/types/data-lab/data-lab.d.ts +10 -3
  103. package/dist/types/entity/entity-attachment-type.d.ts +18 -3
  104. package/dist/types/entity/entity-attachment.d.ts +42 -6
  105. package/dist/types/entity/entity-comment.d.ts +20 -3
  106. package/dist/types/entity/entity-coords.d.ts +33 -5
  107. package/dist/types/entity/entity-link.d.ts +20 -3
  108. package/dist/types/entity/entity-lod-category.d.ts +25 -4
  109. package/dist/types/entity/entity-lod.d.ts +51 -11
  110. package/dist/types/entity/entity-relation-type.d.ts +25 -4
  111. package/dist/types/entity/entity-relation.d.ts +28 -5
  112. package/dist/types/entity/entity-source.d.ts +24 -3
  113. package/dist/types/entity/entity-tag.d.ts +33 -5
  114. package/dist/types/entity/entity-type.d.ts +25 -4
  115. package/dist/types/entity/entity.d.ts +72 -29
  116. package/dist/types/import/import-cad.d.ts +10 -2
  117. package/dist/types/import/import-csv.d.ts +5 -1
  118. package/dist/types/import/import-json.d.ts +5 -1
  119. package/dist/types/import/import-kml.d.ts +5 -1
  120. package/dist/types/import/imported-file.d.ts +15 -2
  121. package/dist/types/markup/markup.d.ts +105 -106
  122. package/dist/types/program-key/program-key.d.ts +25 -4
  123. package/dist/types/project/menu-item.d.ts +2 -1
  124. package/dist/types/project/project-view-bookmark.d.ts +52 -16
  125. package/dist/types/project/project-view-legacy-tile.d.ts +16 -2
  126. package/dist/types/project/project-view.d.ts +46 -18
  127. package/dist/types/server/pending-action.d.ts +24 -3
  128. package/dist/types/server/task.d.ts +15 -2
  129. package/dist/types/style/style.d.ts +25 -4
  130. package/dist/types/tileset/tileset.d.ts +183 -24
  131. package/dist/types/user/session.d.ts +36 -7
  132. package/dist/types/user/user-group.d.ts +44 -6
  133. package/dist/types/user/user.d.ts +102 -29
  134. package/package.json +1 -1
  135. package/dist/lib/tileset/tileset-cad.js +0 -3
  136. package/dist/lib/tileset/tileset-cad.js.map +0 -1
  137. package/dist/lib/tileset/tileset-entities-map-tiles.js +0 -19
  138. package/dist/lib/tileset/tileset-entities-map-tiles.js.map +0 -1
  139. package/dist/lib/tileset/tileset-entities.js +0 -3
  140. package/dist/lib/tileset/tileset-entities.js.map +0 -1
  141. package/dist/lib/tileset/tileset-ext-map-tiles.js +0 -18
  142. package/dist/lib/tileset/tileset-ext-map-tiles.js.map +0 -1
  143. package/dist/lib/tileset/tileset-ext-terrain-tiles.js +0 -3
  144. package/dist/lib/tileset/tileset-ext-terrain-tiles.js.map +0 -1
  145. package/dist/lib/tileset/tileset-map-tiles.js +0 -3
  146. package/dist/lib/tileset/tileset-map-tiles.js.map +0 -1
  147. package/dist/lib/tileset/tileset-pointcloud.js +0 -3
  148. package/dist/lib/tileset/tileset-pointcloud.js.map +0 -1
  149. package/dist/lib/tileset/tileset-terrain-tiles.js +0 -3
  150. package/dist/lib/tileset/tileset-terrain-tiles.js.map +0 -1
  151. package/dist/types/tileset/tileset-cad.d.ts +0 -25
  152. package/dist/types/tileset/tileset-entities-map-tiles.d.ts +0 -23
  153. package/dist/types/tileset/tileset-entities.d.ts +0 -18
  154. package/dist/types/tileset/tileset-ext-map-tiles.d.ts +0 -21
  155. package/dist/types/tileset/tileset-ext-terrain-tiles.d.ts +0 -10
  156. package/dist/types/tileset/tileset-map-tiles.d.ts +0 -14
  157. package/dist/types/tileset/tileset-pointcloud.d.ts +0 -20
  158. package/dist/types/tileset/tileset-terrain-tiles.d.ts +0 -10
@@ -5,8 +5,8 @@ import { Cartes, EntityAttachmentType } from "../bruce-models";
5
5
  export declare namespace Markup {
6
6
  interface IMarkup {
7
7
  divs?: Div.IDiv[];
8
- vectors?: Drawing.Drawing[];
9
- cesiumObjects?: Entity3d.Entity3d[];
8
+ vectors?: (Line.ILine | FreePaint.IPaint)[];
9
+ cesiumObjects?: (Polygon.IPolygon | Polyline.IPolyline | Circle.ICircle | Walkscore.IWalkscore)[];
10
10
  width?: number;
11
11
  height?: number;
12
12
  defaultCameraPos?: any;
@@ -109,116 +109,115 @@ export declare namespace Markup {
109
109
  }
110
110
  const DEFAULT: IDiv;
111
111
  }
112
- namespace Drawing {
113
- type Drawing = Line.ILine | Line.IAnchor | FreePaint.IPaint;
114
- enum EHeadStyle {
112
+ namespace Line {
113
+ enum ELineHead {
115
114
  None = "NONE",
116
115
  Circle = "CIRCLE",
117
116
  Arrow = "ARROW"
118
117
  }
119
- namespace Line {
120
- interface ILine extends IElement {
121
- pathType: "LINE";
122
- path: string;
123
- transform: string;
124
- snaps: IAnchor[];
125
- brushColor?: string;
126
- brushSize?: number;
127
- angled?: boolean;
128
- brushHead?: EHeadStyle;
129
- outlineColor?: string;
130
- }
131
- enum EAnchorDivSide {
132
- TopLeft = 0,
133
- TopRight = 1,
134
- BottomLeft = 2,
135
- BottomRight = 3,
136
- Center = 4,
137
- CenterLeft = 5,
138
- CenterRight = 6,
139
- CenterTop = 7,
140
- CenterBottom = 8
141
- }
142
- enum EAnchorLineSide {
143
- Start = 0,
144
- End = 1
145
- }
146
- interface IAnchor {
147
- id?: string;
148
- snapPosition?: EAnchorDivSide;
149
- side?: EAnchorLineSide;
150
- brushHead?: EHeadStyle;
151
- fill?: string;
152
- size?: number;
153
- outlineFactor?: number;
154
- stroke?: string;
155
- cartesian?: Cartes.ICartes3;
156
- screenPos?: Cartes.ICartes2;
157
- positionFromEntity?: boolean;
158
- }
159
- const DEFAULT: ILine;
160
- }
161
- namespace FreePaint {
162
- interface IPaint extends IElement {
163
- pathType: "PLAIN";
164
- path: string;
165
- transform: string;
166
- brushColor?: string;
167
- brushSize?: number;
168
- brushHead?: EHeadStyle;
169
- outlineColor?: string;
170
- }
171
- const DEFAULT: IPaint;
172
- }
118
+ interface ILine extends IElement {
119
+ pathType: "LINE";
120
+ path: string;
121
+ transform: string;
122
+ snaps: IAnchor[];
123
+ brushColor?: string;
124
+ brushSize?: number;
125
+ angled?: boolean;
126
+ brushHead?: ELineHead;
127
+ outlineColor?: string;
128
+ }
129
+ enum EAnchorDivSide {
130
+ TopLeft = 0,
131
+ TopRight = 1,
132
+ BottomLeft = 2,
133
+ BottomRight = 3,
134
+ Center = 4,
135
+ CenterLeft = 5,
136
+ CenterRight = 6,
137
+ CenterTop = 7,
138
+ CenterBottom = 8
139
+ }
140
+ enum EAnchorLineSide {
141
+ Start = 0,
142
+ End = 1
143
+ }
144
+ interface IAnchor {
145
+ id?: string;
146
+ snapPosition?: EAnchorDivSide;
147
+ side?: EAnchorLineSide;
148
+ brushHead?: ELineHead;
149
+ fill?: string;
150
+ size?: number;
151
+ outlineFactor?: number;
152
+ stroke?: string;
153
+ cartesian?: Cartes.ICartes3;
154
+ screenPos?: Cartes.ICartes2;
155
+ positionFromEntity?: boolean;
156
+ }
157
+ const DEFAULT: ILine;
173
158
  }
174
- namespace Entity3d {
175
- type Entity3d = Polygon.IPolygon | Polyline.IPolyline | Circle.ICircle | Walkscore.IWalkscore;
176
- namespace Polygon {
177
- enum EClassificationType {
178
- Both = "BOTH",
179
- Terrain = "TERRAIN"
180
- }
181
- interface IPolygon extends IElement {
182
- type: "POLYGON";
183
- positions: Cartes.ICartes3[];
184
- color?: string;
185
- outlineColor?: string;
186
- outlineWidth?: number;
187
- extrudedHeight?: number;
188
- classificationType?: EClassificationType;
189
- smoothen?: number;
190
- }
191
- const DEFAULT: IPolygon;
192
- }
193
- namespace Polyline {
194
- interface IPolyline extends IElement {
195
- type: "POLYLINE";
196
- positions: Cartes.ICartes3[];
197
- color?: string;
198
- outlineWidth?: number;
199
- smoothen?: number;
200
- }
201
- const DEFAULT: IPolyline;
202
- }
203
- namespace Circle {
204
- interface ICircle extends IElement {
205
- type: "CIRCLE";
206
- position: Cartes.ICartes3;
207
- radius: number;
208
- color?: string;
209
- outlineWidth?: number;
210
- extrudedHeight?: number;
211
- outlineExtrusion?: number;
212
- outlineColor?: string;
213
- }
214
- const DEFAULT: ICircle;
159
+ namespace FreePaint {
160
+ enum EPaintHead {
161
+ None = "NONE",
162
+ Circle = "CIRCLE",
163
+ Arrow = "ARROW"
215
164
  }
216
- namespace Walkscore {
217
- interface IWalkscore extends IElement {
218
- type: "WALKSCORE";
219
- cartesian: Cartes.ICartes3;
220
- details: number;
221
- }
165
+ interface IPaint extends IElement {
166
+ pathType: "PLAIN";
167
+ path: string;
168
+ transform: string;
169
+ brushColor?: string;
170
+ brushSize?: number;
171
+ brushHead?: EPaintHead;
172
+ outlineColor?: string;
173
+ }
174
+ const DEFAULT: IPaint;
175
+ }
176
+ namespace Polygon {
177
+ enum EClassificationType {
178
+ Both = "BOTH",
179
+ Terrain = "TERRAIN"
180
+ }
181
+ interface IPolygon extends IElement {
182
+ type: "POLYGON";
183
+ positions: Cartes.ICartes3[];
184
+ color?: string;
185
+ outlineColor?: string;
186
+ outlineWidth?: number;
187
+ extrudedHeight?: number;
188
+ classificationType?: EClassificationType;
189
+ smoothen?: number;
190
+ }
191
+ const DEFAULT: IPolygon;
192
+ }
193
+ namespace Polyline {
194
+ interface IPolyline extends IElement {
195
+ type: "POLYLINE";
196
+ positions: Cartes.ICartes3[];
197
+ color?: string;
198
+ outlineWidth?: number;
199
+ smoothen?: number;
200
+ }
201
+ const DEFAULT: IPolyline;
202
+ }
203
+ namespace Circle {
204
+ interface ICircle extends IElement {
205
+ type: "CIRCLE";
206
+ position: Cartes.ICartes3;
207
+ radius: number;
208
+ color?: string;
209
+ outlineWidth?: number;
210
+ extrudedHeight?: number;
211
+ outlineExtrusion?: number;
212
+ outlineColor?: string;
213
+ }
214
+ const DEFAULT: ICircle;
215
+ }
216
+ namespace Walkscore {
217
+ interface IWalkscore extends IElement {
218
+ type: "WALKSCORE";
219
+ cartesian: Cartes.ICartes3;
220
+ details: number;
222
221
  }
223
222
  }
224
223
  }
@@ -18,9 +18,30 @@ export declare namespace ProgramKey {
18
18
  Key: string;
19
19
  IsAccessRestricted?: boolean;
20
20
  }
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>;
21
+ function Get(params: {
22
+ api: BruceApi.Api;
23
+ programId: Id;
24
+ req?: Api.IReqParams;
25
+ }): Promise<{
26
+ programKey: IKey;
27
+ }>;
28
+ function GetList(params: {
29
+ api: BruceApi.Api;
30
+ req?: Api.IReqParams;
31
+ }): Promise<{
32
+ programKeys: IKey[];
33
+ }>;
34
+ function Delete(params: {
35
+ api: BruceApi.Api;
36
+ programId: Id;
37
+ req?: Api.IReqParams;
38
+ }): Promise<void>;
39
+ function Update(params: {
40
+ api: BruceApi.Api;
41
+ programKey: IKey;
42
+ req?: Api.IReqParams;
43
+ }): Promise<{
44
+ programKey: IKey;
45
+ }>;
25
46
  }
26
47
  export {};
@@ -1,3 +1,4 @@
1
+ import { IDictionary } from "../bruce-models";
1
2
  import { Entity } from "../entity/entity";
2
3
  import { Tileset } from "../tileset/tileset";
3
4
  import { ZoomControl } from "./zoom-control";
@@ -51,7 +52,7 @@ export declare namespace MenuItem {
51
52
  interface IBruceEntities extends IItem {
52
53
  BruceEntity: {
53
54
  "EntityType.ID": string;
54
- Filter?: Entity.Filter.V1.AttrFilter;
55
+ Filter?: IDictionary<string>;
55
56
  };
56
57
  CameraZoomSettings: ZoomControl.IItem[];
57
58
  showAllLayers: boolean;
@@ -14,7 +14,7 @@ export declare namespace ProjectViewBookmark {
14
14
  function GetCacheKey(viewId: string, bookmarkId: string): string;
15
15
  function GetListCacheKey(viewId: string): string;
16
16
  const DEFAULT_DATA_VERSION = 1;
17
- interface IBookmarkMeta {
17
+ interface IBaseBookmark {
18
18
  ID?: string;
19
19
  Title?: string;
20
20
  Note?: string;
@@ -24,13 +24,21 @@ export declare namespace ProjectViewBookmark {
24
24
  "Created.Date"?: UTC.IUTC;
25
25
  "UI.SlideGroup.ID"?: number;
26
26
  DataVersion: number;
27
+ DisplayOrder?: number;
28
+ Settings?: IBaseSettings;
27
29
  }
28
- type Bookmark = V1.IBookmark | V2.IBookmark;
29
- namespace V1 {
30
+ /**
31
+ * These are the base settings expected in any bookmark data-version.
32
+ * The only exception is data-version = 1 which is our deprecated legacy format.
33
+ */
34
+ interface IBaseSettings {
35
+ menuItemIds?: string[];
36
+ }
37
+ type Bookmark = LegacyNavigator.IBookmark | Navigator.IBookmark | IBaseBookmark;
38
+ namespace LegacyNavigator {
30
39
  const DATA_VERSION = 1;
31
- interface IBookmark extends IBookmarkMeta {
40
+ interface IBookmark extends IBaseBookmark {
32
41
  Camera?: ICamera;
33
- DisplayOrder?: number;
34
42
  Settings?: ISettings;
35
43
  }
36
44
  interface IBookmarkImagery {
@@ -42,7 +50,7 @@ export declare namespace ProjectViewBookmark {
42
50
  brightness: number;
43
51
  alpha: number;
44
52
  }
45
- interface ISettings {
53
+ interface ISettings extends IBaseSettings {
46
54
  selectedItemIds?: string[];
47
55
  order?: number;
48
56
  hiddenEntityIds?: string[];
@@ -74,15 +82,13 @@ export declare namespace ProjectViewBookmark {
74
82
  roll: number;
75
83
  }
76
84
  }
77
- namespace V2 {
85
+ namespace Navigator {
78
86
  const DATA_VERSION = 2;
79
- interface IBookmark extends IBookmarkMeta {
87
+ interface IBookmark extends IBaseBookmark {
80
88
  Camera?: ICamera;
81
- DisplayOrder?: number;
82
89
  Settings?: ISettings;
83
90
  }
84
- interface ISettings {
85
- menuItemIds?: string[];
91
+ interface ISettings extends IBaseSettings {
86
92
  groundOcclusion?: boolean;
87
93
  imagery?: ProjectViewTile.IBookmarkImagery[];
88
94
  terrain?: ProjectViewTile.IBookmarkTerrain;
@@ -128,9 +134,39 @@ export declare namespace ProjectViewBookmark {
128
134
  cameraFrustum?: Camera.EFrustum;
129
135
  }
130
136
  }
131
- function Get(api: BruceApi.Api, viewId: string, bookmarkId: string, reqParams?: Api.IReqParams): Promise<Bookmark>;
132
- function Delete(api: BruceApi.Api, viewId: string, bookmarkId: string, reqParams?: Api.IReqParams): Promise<void>;
133
- function GetList(api: BruceApi.Api, viewId: string, reqParams?: Api.IReqParams): Promise<Bookmark[]>;
134
- function Update(api: BruceApi.Api, viewId: string, data: Bookmark, reqParams?: Api.IReqParams): Promise<Bookmark>;
135
- function SetOrder(api: BruceApi.Api, viewId: string, bookmarkIds: string[], reqParams?: Api.IReqParams): Promise<void>;
137
+ function Get(params: {
138
+ api: BruceApi.Api;
139
+ viewId: string;
140
+ bookmarkId: string;
141
+ req?: Api.IReqParams;
142
+ }): Promise<{
143
+ bookmark: Bookmark;
144
+ }>;
145
+ function Delete(params: {
146
+ api: BruceApi.Api;
147
+ viewId: string;
148
+ bookmarkId: string;
149
+ req?: Api.IReqParams;
150
+ }): Promise<void>;
151
+ function GetList(params: {
152
+ api: BruceApi.Api;
153
+ viewId: string;
154
+ req?: Api.IReqParams;
155
+ }): Promise<{
156
+ bookmarks: Bookmark[];
157
+ }>;
158
+ function Update(params: {
159
+ api: BruceApi.Api;
160
+ viewId: string;
161
+ bookmark: Bookmark;
162
+ req?: Api.IReqParams;
163
+ }): Promise<{
164
+ bookmark: Bookmark;
165
+ }>;
166
+ function SetOrder(params: {
167
+ api: BruceApi.Api;
168
+ viewId: string;
169
+ bookmarkIds: string[];
170
+ req?: Api.IReqParams;
171
+ }): Promise<void>;
136
172
  }
@@ -29,6 +29,20 @@ export declare namespace ProjectViewLegacyTile {
29
29
  RequestWaterMask?: boolean;
30
30
  RequestVertexNormals?: boolean;
31
31
  }
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[]>;
32
+ function MergeMapTemplateData(params: {
33
+ getter: BruceApi.IGetter;
34
+ sources: IMapSource[];
35
+ addIfMissing: boolean;
36
+ req?: Api.IReqParams;
37
+ }): Promise<{
38
+ sources: IMapSource[];
39
+ }>;
40
+ function MergeTerrainTemplateData(params: {
41
+ getter: BruceApi.IGetter;
42
+ sources: ITerrainSource[];
43
+ addIfMissing: boolean;
44
+ req?: Api.IReqParams;
45
+ }): Promise<{
46
+ sources: ITerrainSource[];
47
+ }>;
34
48
  }
@@ -14,7 +14,7 @@ export declare namespace ProjectView {
14
14
  function GetCacheKey(viewId: string): string;
15
15
  function GetListCacheKey(): string;
16
16
  const DEFAULT_DATA_VERSION = 1;
17
- interface IViewMeta {
17
+ interface IBaseView {
18
18
  ID?: string;
19
19
  Name: string;
20
20
  Description?: string;
@@ -25,16 +25,26 @@ export declare namespace ProjectView {
25
25
  CreatedByUIVersion?: string;
26
26
  DataVersion: number;
27
27
  SupportEmail?: string;
28
+ Settings?: IBaseSettings;
28
29
  }
29
- type View = V1.IView | V2.IView;
30
- namespace V1 {
30
+ /**
31
+ * These are the base settings expected in any project view data-version.
32
+ * The only exception is data-version = 1 which is our deprecated legacy format.
33
+ */
34
+ interface IBaseSettings {
35
+ menuItems?: MenuItem.IItem[];
36
+ IsLoginRequired?: boolean;
37
+ IsRestricted?: boolean;
38
+ }
39
+ type View = LegacyNavigator.IView | Navigator.IView | IBaseView;
40
+ namespace LegacyNavigator {
31
41
  const DATA_VERSION = 1;
32
42
  interface IShadowSettings {
33
43
  IsShadowEnabled: boolean;
34
44
  IsShadowSoft: boolean;
35
45
  ShadowSampleSize: number;
36
46
  }
37
- interface ISettings {
47
+ interface ISettings extends IBaseSettings {
38
48
  BookmarkTransitionSpeed: number;
39
49
  Camera: any;
40
50
  CameraFrustum: number;
@@ -52,8 +62,6 @@ export declare namespace ProjectView {
52
62
  OASettings?: any;
53
63
  LogoImage: any;
54
64
  LegendImage: any;
55
- IsRestricted: boolean;
56
- IsLoginRequired: boolean;
57
65
  TilesetBackfaceCulling: boolean;
58
66
  TopPanelComponents?: string[];
59
67
  LeftPanelComponents?: string[];
@@ -64,21 +72,20 @@ export declare namespace ProjectView {
64
72
  MovingCamera: IShadowSettings;
65
73
  };
66
74
  }
67
- interface IView extends IViewMeta {
75
+ interface IView extends IBaseView {
68
76
  Settings: ISettings;
69
77
  }
70
78
  }
71
- namespace V2 {
79
+ namespace Navigator {
72
80
  const DATA_VERSION = 2;
73
- interface ISettings {
74
- contact?: IContact;
75
- menuItems?: MenuItem.IItem[];
81
+ interface ISettings extends IBaseSettings {
76
82
  imageries?: ProjectViewTile.IViewImagery[];
77
83
  terrains?: ProjectViewTile.IViewTerrain[];
78
84
  defaults?: {
79
- camera?: ProjectViewBookmark.V2.ICamera;
80
- settings?: ProjectViewBookmark.V2.ISettings;
85
+ camera?: ProjectViewBookmark.Navigator.ICamera;
86
+ settings?: ProjectViewBookmark.Navigator.ISettings;
81
87
  };
88
+ contact?: IContact;
82
89
  }
83
90
  /**
84
91
  * Describes how to present contact information to the users.
@@ -88,12 +95,33 @@ export declare namespace ProjectView {
88
95
  description?: string;
89
96
  icon?: string;
90
97
  }
91
- interface IView extends IViewMeta {
98
+ interface IView extends IBaseView {
92
99
  Settings: ISettings;
93
100
  }
94
101
  }
95
- function Get(api: BruceApi.Api, viewId: string, reqParams?: Api.IReqParams): Promise<View>;
96
- function GetList(api: BruceApi.Api, reqParams?: Api.IReqParams): Promise<View[]>;
97
- function Delete(api: BruceApi.Api, viewId: string, reqParams?: Api.IReqParams): Promise<void>;
98
- function Update(api: BruceApi.Api, data: View, reqParams?: Api.IReqParams): Promise<View>;
102
+ function Get(params: {
103
+ api: BruceApi.Api;
104
+ viewId: string;
105
+ req?: Api.IReqParams;
106
+ }): Promise<{
107
+ view: View;
108
+ }>;
109
+ function GetList(params: {
110
+ api: BruceApi.Api;
111
+ req?: Api.IReqParams;
112
+ }): Promise<{
113
+ views: View[];
114
+ }>;
115
+ function Delete(params: {
116
+ api: BruceApi.Api;
117
+ viewId: string;
118
+ req?: Api.IReqParams;
119
+ }): Promise<void>;
120
+ function Update(params: {
121
+ api: BruceApi.Api;
122
+ view: View;
123
+ req?: Api.IReqParams;
124
+ }): Promise<{
125
+ view: View;
126
+ }>;
99
127
  }
@@ -32,7 +32,28 @@ export declare namespace PendingAction {
32
32
  "Message.Type": string;
33
33
  Message: string;
34
34
  }
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[]>;
35
+ function Get(params: {
36
+ api: BruceApi.Api;
37
+ actionId: number;
38
+ req?: Api.IReqParams;
39
+ }): Promise<{
40
+ action: IAction;
41
+ }>;
42
+ function GetRelevantList(params: {
43
+ api: BruceApi.Api;
44
+ stricter?: boolean;
45
+ reqParams?: Api.IReqParams;
46
+ }): Promise<{
47
+ actions: IAction[];
48
+ }>;
49
+ function GetMessages(params: {
50
+ api: BruceApi.Api;
51
+ actionId: number;
52
+ order?: Api.ESortOrder;
53
+ startIndex?: number;
54
+ amount?: number;
55
+ req?: Api.IReqParams;
56
+ }): Promise<{
57
+ messages: IMessage[];
58
+ }>;
38
59
  }
@@ -18,6 +18,19 @@ export declare namespace Task {
18
18
  enum ETaskPurpose {
19
19
  BackupRestore = "BackupRestore"
20
20
  }
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[]>;
21
+ function Get(params: {
22
+ api: GlobalApi.Api;
23
+ taskId: number;
24
+ req?: Api.IReqParams;
25
+ }): Promise<{
26
+ task: ITask;
27
+ }>;
28
+ function GetList(params: {
29
+ api: GlobalApi.Api;
30
+ accountId?: string;
31
+ type?: ETaskPurpose;
32
+ req?: Api.IReqParams;
33
+ }): Promise<{
34
+ tasks: ITask[];
35
+ }>;
23
36
  }
@@ -79,8 +79,29 @@ export declare namespace Style {
79
79
  Settings: Settings;
80
80
  Type: EType;
81
81
  }
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>;
82
+ function GetList(params: {
83
+ api: BruceApi.Api;
84
+ req?: Api.IReqParams;
85
+ }): Promise<{
86
+ styles: IStyle[];
87
+ }>;
88
+ function Get(params: {
89
+ api: BruceApi.Api;
90
+ styleId: number;
91
+ req?: Api.IReqParams;
92
+ }): Promise<{
93
+ style: IStyle;
94
+ }>;
95
+ function Update(params: {
96
+ api: BruceApi.Api;
97
+ style: IStyle;
98
+ req?: Api.IReqParams;
99
+ }): Promise<{
100
+ style: IStyle;
101
+ }>;
102
+ function Delete(params: {
103
+ api: BruceApi.Api;
104
+ styleId: number;
105
+ req?: Api.IReqParams;
106
+ }): Promise<void>;
86
107
  }