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.
Files changed (195) hide show
  1. package/dist/bruce-models.es5.js +2670 -838
  2. package/dist/bruce-models.es5.js.map +1 -1
  3. package/dist/bruce-models.umd.js +2606 -803
  4. package/dist/bruce-models.umd.js.map +1 -1
  5. package/dist/lib/account/account-invite.js +40 -1
  6. package/dist/lib/account/account-invite.js.map +1 -1
  7. package/dist/lib/account/account.js +60 -5
  8. package/dist/lib/account/account.js.map +1 -1
  9. package/dist/lib/ann-document/ann-document.js +36 -3
  10. package/dist/lib/ann-document/ann-document.js.map +1 -1
  11. package/dist/lib/api/abstract-api.js +78 -1
  12. package/dist/lib/api/abstract-api.js.map +1 -1
  13. package/dist/lib/api/api-getters.js +68 -94
  14. package/dist/lib/api/api-getters.js.map +1 -1
  15. package/dist/lib/api/api.js +20 -3
  16. package/dist/lib/api/api.js.map +1 -1
  17. package/dist/lib/api/bruce-api.js +68 -27
  18. package/dist/lib/api/bruce-api.js.map +1 -1
  19. package/dist/lib/api/global-api.js +46 -4
  20. package/dist/lib/api/global-api.js.map +1 -1
  21. package/dist/lib/api/guardian-api.js +42 -1
  22. package/dist/lib/api/guardian-api.js.map +1 -1
  23. package/dist/lib/bruce-models.js +1 -3
  24. package/dist/lib/bruce-models.js.map +1 -1
  25. package/dist/lib/calculator/calculator.js +42 -1
  26. package/dist/lib/calculator/calculator.js.map +1 -1
  27. package/dist/lib/client-file/client-file.js +71 -7
  28. package/dist/lib/client-file/client-file.js.map +1 -1
  29. package/dist/lib/common/bounds.js +1 -1
  30. package/dist/lib/common/bounds.js.map +1 -1
  31. package/dist/lib/common/bruce-event.js +19 -0
  32. package/dist/lib/common/bruce-event.js.map +1 -1
  33. package/dist/lib/common/bruce-variable.js +5 -0
  34. package/dist/lib/common/bruce-variable.js.map +1 -1
  35. package/dist/lib/common/color-css-defaults.js +157 -0
  36. package/dist/lib/common/color-css-defaults.js.map +1 -0
  37. package/dist/lib/common/color.js +18 -4
  38. package/dist/lib/common/color.js.map +1 -1
  39. package/dist/lib/common/delay-queue.js +7 -0
  40. package/dist/lib/common/delay-queue.js.map +1 -1
  41. package/dist/lib/common/geometry.js +5 -0
  42. package/dist/lib/common/geometry.js.map +1 -1
  43. package/dist/lib/common/lru-cache.js +14 -0
  44. package/dist/lib/common/lru-cache.js.map +1 -1
  45. package/dist/lib/custom-form/custom-form.js +49 -7
  46. package/dist/lib/custom-form/custom-form.js.map +1 -1
  47. package/dist/lib/data-lab/data-lab.js +10 -0
  48. package/dist/lib/data-lab/data-lab.js.map +1 -1
  49. package/dist/lib/data-source/data-source.js +41 -0
  50. package/dist/lib/data-source/data-source.js.map +1 -1
  51. package/dist/lib/entity/entity-attachment-type.js +37 -1
  52. package/dist/lib/entity/entity-attachment-type.js.map +1 -1
  53. package/dist/lib/entity/entity-attachment.js +65 -18
  54. package/dist/lib/entity/entity-attachment.js.map +1 -1
  55. package/dist/lib/entity/entity-attribute.js +17 -1
  56. package/dist/lib/entity/entity-attribute.js.map +1 -1
  57. package/dist/lib/entity/entity-comment.js +44 -7
  58. package/dist/lib/entity/entity-comment.js.map +1 -1
  59. package/dist/lib/entity/entity-coords.js +38 -0
  60. package/dist/lib/entity/entity-coords.js.map +1 -1
  61. package/dist/lib/entity/entity-link.js +45 -11
  62. package/dist/lib/entity/entity-link.js.map +1 -1
  63. package/dist/lib/entity/entity-lod-category.js +52 -9
  64. package/dist/lib/entity/entity-lod-category.js.map +1 -1
  65. package/dist/lib/entity/entity-lod.js +78 -16
  66. package/dist/lib/entity/entity-lod.js.map +1 -1
  67. package/dist/lib/entity/entity-relation-type.js +48 -10
  68. package/dist/lib/entity/entity-relation-type.js.map +1 -1
  69. package/dist/lib/entity/entity-relation.js +69 -16
  70. package/dist/lib/entity/entity-relation.js.map +1 -1
  71. package/dist/lib/entity/entity-source.js +56 -15
  72. package/dist/lib/entity/entity-source.js.map +1 -1
  73. package/dist/lib/entity/entity-tag.js +56 -10
  74. package/dist/lib/entity/entity-tag.js.map +1 -1
  75. package/dist/lib/entity/entity-type-visual-settings.js +4 -0
  76. package/dist/lib/entity/entity-type-visual-settings.js.map +1 -1
  77. package/dist/lib/entity/entity-type.js +45 -7
  78. package/dist/lib/entity/entity-type.js.map +1 -1
  79. package/dist/lib/entity/entity.js +122 -18
  80. package/dist/lib/entity/entity.js.map +1 -1
  81. package/dist/lib/environment.js +12 -0
  82. package/dist/lib/environment.js.map +1 -1
  83. package/dist/lib/import/imported-file.js +53 -0
  84. package/dist/lib/import/imported-file.js.map +1 -1
  85. package/dist/lib/internal/uploader.js +8 -0
  86. package/dist/lib/internal/uploader.js.map +1 -1
  87. package/dist/lib/markup/markup.js +1 -1
  88. package/dist/lib/markup/markup.js.map +1 -1
  89. package/dist/lib/plugin/plugin.js +51 -9
  90. package/dist/lib/plugin/plugin.js.map +1 -1
  91. package/dist/lib/program-key/program-key.js +55 -10
  92. package/dist/lib/program-key/program-key.js.map +1 -1
  93. package/dist/lib/project/menu-item.js +22 -0
  94. package/dist/lib/project/menu-item.js.map +1 -1
  95. package/dist/lib/project/project-view-bookmark.js +55 -11
  96. package/dist/lib/project/project-view-bookmark.js.map +1 -1
  97. package/dist/lib/project/project-view-tile.js +9 -0
  98. package/dist/lib/project/project-view-tile.js.map +1 -1
  99. package/dist/lib/project/project-view.js +45 -7
  100. package/dist/lib/project/project-view.js.map +1 -1
  101. package/dist/lib/project/zoom-control.js +7 -0
  102. package/dist/lib/project/zoom-control.js.map +1 -1
  103. package/dist/lib/server/hosting-location.js +30 -9
  104. package/dist/lib/server/hosting-location.js.map +1 -1
  105. package/dist/lib/server/message-broker.js +3 -0
  106. package/dist/lib/server/message-broker.js.map +1 -1
  107. package/dist/lib/server/pending-action.js +25 -4
  108. package/dist/lib/server/pending-action.js.map +1 -1
  109. package/dist/lib/server/task.js +17 -0
  110. package/dist/lib/server/task.js.map +1 -1
  111. package/dist/lib/style/style.js +56 -7
  112. package/dist/lib/style/style.js.map +1 -1
  113. package/dist/lib/tileset/tileset.js +128 -34
  114. package/dist/lib/tileset/tileset.js.map +1 -1
  115. package/dist/lib/user/permission.js +20 -0
  116. package/dist/lib/user/permission.js.map +1 -1
  117. package/dist/lib/user/session.js +46 -1
  118. package/dist/lib/user/session.js.map +1 -1
  119. package/dist/lib/user/user-group.js +49 -19
  120. package/dist/lib/user/user-group.js.map +1 -1
  121. package/dist/lib/user/user.js +134 -37
  122. package/dist/lib/user/user.js.map +1 -1
  123. package/dist/lib/util/path-utils.js +16 -1
  124. package/dist/lib/util/path-utils.js.map +1 -1
  125. package/dist/lib/util/url-utils.js +12 -85
  126. package/dist/lib/util/url-utils.js.map +1 -1
  127. package/dist/types/account/account-invite.d.ts +44 -8
  128. package/dist/types/account/account-settings.d.ts +3 -0
  129. package/dist/types/account/account.d.ts +68 -11
  130. package/dist/types/ann-document/ann-document.d.ts +43 -0
  131. package/dist/types/api/abstract-api.d.ts +76 -1
  132. package/dist/types/api/api-getters.d.ts +62 -24
  133. package/dist/types/api/api.d.ts +19 -4
  134. package/dist/types/api/bruce-api.d.ts +48 -4
  135. package/dist/types/api/global-api.d.ts +46 -8
  136. package/dist/types/api/guardian-api.d.ts +42 -5
  137. package/dist/types/bruce-models.d.ts +1 -3
  138. package/dist/types/calculator/calculator.d.ts +57 -1
  139. package/dist/types/client-file/client-file.d.ts +69 -6
  140. package/dist/types/common/bounds.d.ts +3 -3
  141. package/dist/types/common/bruce-event.d.ts +19 -0
  142. package/dist/types/common/color-css-defaults.d.ts +153 -0
  143. package/dist/types/common/color.d.ts +6 -1
  144. package/dist/types/common/delay-queue.d.ts +7 -0
  145. package/dist/types/common/geometry.d.ts +5 -0
  146. package/dist/types/common/lru-cache.d.ts +14 -0
  147. package/dist/types/custom-form/custom-form-content.d.ts +3 -0
  148. package/dist/types/custom-form/custom-form.d.ts +46 -1
  149. package/dist/types/data-lab/data-lab.d.ts +10 -0
  150. package/dist/types/data-source/data-source.d.ts +41 -0
  151. package/dist/types/entity/entity-attachment-type.d.ts +38 -1
  152. package/dist/types/entity/entity-attachment.d.ts +49 -2
  153. package/dist/types/entity/entity-attribute.d.ts +31 -12
  154. package/dist/types/entity/entity-comment.d.ts +41 -1
  155. package/dist/types/entity/entity-coords.d.ts +54 -1
  156. package/dist/types/entity/entity-link.d.ts +39 -2
  157. package/dist/types/entity/entity-lod-category.d.ts +46 -0
  158. package/dist/types/entity/entity-lod.d.ts +72 -1
  159. package/dist/types/entity/entity-relation-type.d.ts +42 -1
  160. package/dist/types/entity/entity-relation.d.ts +57 -1
  161. package/dist/types/entity/entity-source.d.ts +38 -4
  162. package/dist/types/entity/entity-tag.d.ts +48 -1
  163. package/dist/types/entity/entity-type-visual-settings.d.ts +4 -0
  164. package/dist/types/entity/entity-type.d.ts +45 -4
  165. package/dist/types/entity/entity.d.ts +89 -3
  166. package/dist/types/environment.d.ts +9 -0
  167. package/dist/types/import/imported-file.d.ts +64 -8
  168. package/dist/types/internal/uploader.d.ts +8 -0
  169. package/dist/types/markup/markup.d.ts +7 -1
  170. package/dist/types/plugin/plugin.d.ts +45 -0
  171. package/dist/types/program-key/program-key.d.ts +45 -1
  172. package/dist/types/project/menu-item.d.ts +73 -1
  173. package/dist/types/project/project-view-bookmark.d.ts +64 -2
  174. package/dist/types/project/project-view-tile.d.ts +30 -0
  175. package/dist/types/project/project-view.d.ts +52 -2
  176. package/dist/types/project/zoom-control.d.ts +7 -0
  177. package/dist/types/server/hosting-location.d.ts +24 -0
  178. package/dist/types/server/message-broker.d.ts +3 -0
  179. package/dist/types/server/pending-action.d.ts +28 -1
  180. package/dist/types/server/task.d.ts +20 -0
  181. package/dist/types/style/style.d.ts +69 -2
  182. package/dist/types/tileset/tileset.d.ts +92 -1
  183. package/dist/types/user/permission.d.ts +11 -0
  184. package/dist/types/user/session.d.ts +48 -5
  185. package/dist/types/user/user-group.d.ts +40 -8
  186. package/dist/types/user/user.d.ts +117 -17
  187. package/dist/types/util/path-utils.d.ts +16 -1
  188. package/dist/types/util/url-utils.d.ts +5 -22
  189. package/package.json +1 -1
  190. package/dist/lib/api/cam-api.js +0 -84
  191. package/dist/lib/api/cam-api.js.map +0 -1
  192. package/dist/lib/api/idm-api.js +0 -86
  193. package/dist/lib/api/idm-api.js.map +0 -1
  194. package/dist/types/api/cam-api.d.ts +0 -26
  195. package/dist/types/api/idm-api.d.ts +0 -28
@@ -2,11 +2,14 @@ import { Api } from "../api/api";
2
2
  import { BruceApi } from "../api/bruce-api";
3
3
  import { UTC } from "../common/utc";
4
4
  /**
5
- * Describes the "Pending Action" concept within Bruce.
5
+ * Describes the "Pending Action" concept within Nextspace.
6
6
  * A pending action is a record of a server-side background process.
7
7
  * This record is used to monitor its progress and completion state.
8
8
  */
9
9
  export declare namespace PendingAction {
10
+ /**
11
+ * Describes a pending action record.
12
+ */
10
13
  interface IAction {
11
14
  ID: number;
12
15
  "CreatedBy.Application": string;
@@ -19,12 +22,18 @@ export declare namespace PendingAction {
19
22
  Status: EStatus;
20
23
  lastUpdated: UTC.IUTC;
21
24
  }
25
+ /**
26
+ * Available pending action statuses.
27
+ */
22
28
  enum EStatus {
23
29
  InProgress = "IN_PROGRESS",
24
30
  Cancelled = "CANCELLED",
25
31
  Complete = "COMPLETE",
26
32
  Failed = "FAILED"
27
33
  }
34
+ /**
35
+ * Describes a pending action message record.
36
+ */
28
37
  interface IMessage {
29
38
  "PendingAction.ID": number;
30
39
  ID: number;
@@ -33,12 +42,20 @@ export declare namespace PendingAction {
33
42
  "Message.Type": EMessageType | string;
34
43
  Message: string;
35
44
  }
45
+ /**
46
+ * Available message types.
47
+ */
36
48
  enum EMessageType {
37
49
  Warn = "WARNING",
38
50
  Error = "ERROR",
39
51
  Status = "STATUS",
40
52
  Info = "INFO"
41
53
  }
54
+ /**
55
+ * Returns a pending action record.
56
+ * @param params
57
+ * @returns
58
+ */
42
59
  function Get(params: {
43
60
  api?: BruceApi.Api;
44
61
  actionId: number;
@@ -46,6 +63,11 @@ export declare namespace PendingAction {
46
63
  }): Promise<{
47
64
  action: IAction;
48
65
  }>;
66
+ /**
67
+ * Returns a list of pending action records.
68
+ * @param params
69
+ * @returns
70
+ */
49
71
  function GetRelevantList(params: {
50
72
  api?: BruceApi.Api;
51
73
  stricter?: boolean;
@@ -53,6 +75,11 @@ export declare namespace PendingAction {
53
75
  }): Promise<{
54
76
  actions: IAction[];
55
77
  }>;
78
+ /**
79
+ * Returns a list of pending action record messages.
80
+ * @param params
81
+ * @returns
82
+ */
56
83
  function GetMessages(params: {
57
84
  api?: BruceApi.Api;
58
85
  actionId: number;
@@ -1,6 +1,13 @@
1
1
  import { Api } from "../api/api";
2
2
  import { GlobalApi } from "../api/global-api";
3
+ /**
4
+ * Tasks are similar to pending actions except they run at a higher level.
5
+ * For example a task may be running a process on multiple client accounts.
6
+ */
3
7
  export declare namespace Task {
8
+ /**
9
+ * Describes a task record.
10
+ */
4
11
  interface ITask {
5
12
  account: string;
6
13
  context: string;
@@ -16,9 +23,17 @@ export declare namespace Task {
16
23
  type: string;
17
24
  updated: Date;
18
25
  }
26
+ /**
27
+ * Known task purposes.
28
+ */
19
29
  enum ETaskPurpose {
20
30
  BackupRestore = "BackupRestore"
21
31
  }
32
+ /**
33
+ * Returns a task record by ID.
34
+ * @param params
35
+ * @returns
36
+ */
22
37
  function Get(params: {
23
38
  api?: GlobalApi.Api;
24
39
  taskId: number;
@@ -26,6 +41,11 @@ export declare namespace Task {
26
41
  }): Promise<{
27
42
  task: ITask;
28
43
  }>;
44
+ /**
45
+ * Returns a list of task records.
46
+ * @param params
47
+ * @returns
48
+ */
29
49
  function GetList(params: {
30
50
  api?: GlobalApi.Api;
31
51
  accountId?: string;
@@ -2,32 +2,62 @@ import { Api } from "../api/api";
2
2
  import { BruceApi } from "../api/bruce-api";
3
3
  import { Calculator } from "../calculator/calculator";
4
4
  /**
5
- * Describes the "Style" concept within Bruce.
5
+ * Describes the "Style" concept within Nextspace.
6
6
  * A legacy way of referring to styles is "entity display settings".
7
7
  *
8
8
  * A style is a collection of settings (which can be calculations to perform on entity data) that
9
9
  * describe how an entity should be displayed.
10
10
  */
11
11
  export declare namespace Style {
12
+ /**
13
+ * Returns cache identifier for a style.
14
+ * Example: {
15
+ * const api: BruceApi.Api = ...;
16
+ * const key = GetCacheKey(1);
17
+ * api.Cache.Remove(key);
18
+ * }
19
+ * @param id
20
+ * @returns
21
+ */
12
22
  function GetCacheKey(id: number): string;
23
+ /**
24
+ * Returns cache identifier for a list of styles.
25
+ * Example: {
26
+ * const api: BruceApi.Api = ...;
27
+ * const key = GetListCacheKey();
28
+ * api.Cache.Remove(key);
29
+ * }
30
+ * @returns
31
+ */
13
32
  function GetListCacheKey(): string;
33
+ /**
34
+ * Types of styles available.
35
+ * The type will dictate what settings are available.
36
+ */
14
37
  enum EType {
15
38
  Entity = "ENTITY",
16
39
  EntityRelationship = "ENTITY_RELATIONSHIP"
17
40
  }
41
+ /**
42
+ * Available types of points.
43
+ * Default is POINT.
44
+ */
18
45
  enum EPointType {
19
46
  Point = "POINT",
20
47
  Icon = "ICON",
21
48
  Cylinder = "CYLINDER"
22
49
  }
50
+ /**
51
+ * Settings for rendering points
52
+ */
23
53
  interface IPointSettings {
54
+ Type: EPointType;
24
55
  color: Calculator.IField[];
25
56
  size: Calculator.IField[];
26
57
  iconId: string;
27
58
  iconUrl: Calculator.IField[];
28
59
  iconScale: Calculator.IField[];
29
60
  altitudeOption?: any;
30
- Type: EPointType;
31
61
  renderOnTop?: boolean;
32
62
  CylinderFillColor?: Calculator.IField[];
33
63
  CylinderFillExtrusion?: Calculator.IField[];
@@ -39,6 +69,9 @@ export declare namespace Style {
39
69
  ClusterNearbyEntities?: boolean;
40
70
  MinimumEntitiesCountForClustering?: Calculator.IField[];
41
71
  }
72
+ /**
73
+ * Settings for rendering polygons.
74
+ */
42
75
  interface IPolygonSettings {
43
76
  useExtrusion: boolean;
44
77
  extrusionPath: Calculator.IField[];
@@ -50,6 +83,9 @@ export declare namespace Style {
50
83
  zIndex?: Calculator.IField[];
51
84
  drapeOver?: "TERRAIN" | "ALL";
52
85
  }
86
+ /**
87
+ * Settings for rendering polylines.
88
+ */
53
89
  interface IPolylineSettings {
54
90
  lineColor: Calculator.IField[];
55
91
  lineWidth: Calculator.IField[];
@@ -58,6 +94,9 @@ export declare namespace Style {
58
94
  zIndex?: Calculator.IField[];
59
95
  drapeOver?: "TERRAIN" | "ALL";
60
96
  }
97
+ /**
98
+ * Settings for rendering 3d models.
99
+ */
61
100
  interface IModelSettings {
62
101
  customize: boolean;
63
102
  fillColor: Calculator.IField[];
@@ -66,12 +105,18 @@ export declare namespace Style {
66
105
  fillColorBlendAmount?: number;
67
106
  altitudeOption?: any;
68
107
  }
108
+ /**
109
+ * Settings for rendering entities.
110
+ */
69
111
  interface IEntitySettings {
70
112
  pointStyle?: IPointSettings;
71
113
  polygonStyle?: IPolygonSettings;
72
114
  polylineStyle?: IPolylineSettings;
73
115
  modelStyle?: IModelSettings;
74
116
  }
117
+ /**
118
+ * Settings for rendering entity relationships.
119
+ */
75
120
  interface IRelationSettings {
76
121
  lineColor?: Calculator.IField[];
77
122
  lineWidth?: Calculator.IField[];
@@ -79,18 +124,31 @@ export declare namespace Style {
79
124
  duration?: Calculator.IField[];
80
125
  }
81
126
  type Settings = IEntitySettings | IRelationSettings;
127
+ /**
128
+ * Describes a style record.
129
+ */
82
130
  interface IStyle {
83
131
  ID: number;
84
132
  Name: string;
85
133
  Settings: Settings;
86
134
  Type: EType;
87
135
  }
136
+ /**
137
+ * Returns a list of styles.
138
+ * @param params
139
+ * @returns
140
+ */
88
141
  function GetList(params: {
89
142
  api?: BruceApi.Api;
90
143
  req?: Api.IReqParams;
91
144
  }): Promise<{
92
145
  styles: IStyle[];
93
146
  }>;
147
+ /**
148
+ * Returns a style.
149
+ * @param params
150
+ * @returns
151
+ */
94
152
  function Get(params: {
95
153
  api?: BruceApi.Api;
96
154
  styleId: number;
@@ -98,6 +156,11 @@ export declare namespace Style {
98
156
  }): Promise<{
99
157
  style: IStyle;
100
158
  }>;
159
+ /**
160
+ * Creates or updates a style.
161
+ * @param params
162
+ * @returns
163
+ */
101
164
  function Update(params: {
102
165
  api?: BruceApi.Api;
103
166
  style: IStyle;
@@ -105,6 +168,10 @@ export declare namespace Style {
105
168
  }): Promise<{
106
169
  style: IStyle;
107
170
  }>;
171
+ /**
172
+ * Deletes a style.
173
+ * @param params
174
+ */
108
175
  function Delete(params: {
109
176
  api?: BruceApi.Api;
110
177
  styleId: number;
@@ -9,7 +9,7 @@ import { Uploader } from "../internal/uploader";
9
9
  import { IDictionary } from "../common/dictionary";
10
10
  type Settings = Tileset.Settings.IPointcloud | Tileset.Settings.ICad | Tileset.Settings.IEntitiesMap | Tileset.Settings.IEntities | Tileset.Settings.IExternalMap | Tileset.Settings.IExternalTerrain | Tileset.Settings.IMap | Tileset.Settings.ITerrain;
11
11
  /**
12
- * Describes the "Tileset" concept in Bruce.
12
+ * Describes the "Tileset" concept in Nextspace.
13
13
  *
14
14
  * Tilesets come in three possible variants,
15
15
  * 1- A set of instructions to generate a tileset.
@@ -19,8 +19,31 @@ type Settings = Tileset.Settings.IPointcloud | Tileset.Settings.ICad | Tileset.S
19
19
  * Read the individual tileset-type settings for each variant.
20
20
  */
21
21
  export declare namespace Tileset {
22
+ /**
23
+ * Returns cache identifier for a tileset.
24
+ * Example: {
25
+ * const api: BruceApi.Api = ...;
26
+ * const key = GetCacheKey("abc", false);
27
+ * api.Cache.Remove(key);
28
+ * }
29
+ * @param tilesetId
30
+ * @param loadFiles
31
+ * @returns
32
+ */
22
33
  function GetCacheKey(tilesetId: string, loadFiles: boolean): string;
34
+ /**
35
+ * Returns cache identifier for a list of tilesets.
36
+ * Example: {
37
+ * const api: BruceApi.Api = ...;
38
+ * const key = GetListCacheKey();
39
+ * api.Cache.Remove(key);
40
+ * }
41
+ * @returns
42
+ */
23
43
  function GetListCacheKey(): string;
44
+ /**
45
+ * Describes a tileset record.
46
+ */
24
47
  interface ITileset {
25
48
  id: string;
26
49
  name: string;
@@ -35,6 +58,9 @@ export declare namespace Tileset {
35
58
  loadUrl?: string;
36
59
  isRestricted?: boolean;
37
60
  }
61
+ /**
62
+ * Available tileset types.
63
+ */
38
64
  enum EType {
39
65
  PointCloud = "POINT_CLOUD",
40
66
  GeoMap = "GEO_MAP",
@@ -48,12 +74,20 @@ export declare namespace Tileset {
48
74
  LegacyStatic = "S",
49
75
  LegacyExternal = "X"
50
76
  }
77
+ /**
78
+ * Available tileset pivot types.
79
+ */
51
80
  enum EPivot {
52
81
  None = "none",
53
82
  Box = "box",
54
83
  Weight = "weight",
55
84
  UCS = "ucs"
56
85
  }
86
+ /**
87
+ * Returns a tileset record.
88
+ * @param params
89
+ * @returns
90
+ */
57
91
  function Get(params: {
58
92
  api?: BruceApi.Api;
59
93
  tilesetId: string;
@@ -75,17 +109,31 @@ export declare namespace Tileset {
75
109
  }): Promise<{
76
110
  typeMapping: IDictionary<EType>;
77
111
  }>;
112
+ /**
113
+ * Returns a list of tileset records.
114
+ * @param params
115
+ * @returns
116
+ */
78
117
  function GetList(params: {
79
118
  api?: BruceApi.Api;
80
119
  req?: Api.IReqParams;
81
120
  }): Promise<{
82
121
  tilesets: ITileset[];
83
122
  }>;
123
+ /**
124
+ * Deletes a tileset record.
125
+ * @param params
126
+ */
84
127
  function Delete(params: {
85
128
  api?: BruceApi.Api;
86
129
  tilesetId: string;
87
130
  req?: Api.IReqParams;
88
131
  }): Promise<void>;
132
+ /**
133
+ * Creates or updates a tileset record.
134
+ * @param params
135
+ * @returns
136
+ */
89
137
  function Update(params: {
90
138
  api?: BruceApi.Api;
91
139
  tileset: ITileset;
@@ -93,6 +141,10 @@ export declare namespace Tileset {
93
141
  }): Promise<{
94
142
  tileset: ITileset;
95
143
  }>;
144
+ /**
145
+ * Uploads a file to a tileset.
146
+ * @param params
147
+ */
96
148
  function UploadFile(params: {
97
149
  api?: BruceApi.Api;
98
150
  tilesetId: string;
@@ -100,12 +152,22 @@ export declare namespace Tileset {
100
152
  onProgress?: (progress: Uploader.IProgress) => void;
101
153
  req?: Api.IUploadReqParams;
102
154
  }): Promise<void>;
155
+ /**
156
+ * Deletes a file from a tileset.
157
+ * @param params
158
+ */
103
159
  function DeleteFile(params: {
104
160
  api?: BruceApi.Api;
105
161
  tilesetId: string;
106
162
  file: string;
107
163
  req?: Api.IReqParams;
108
164
  }): Promise<void>;
165
+ /**
166
+ * Uploads a file to a tileset.
167
+ * Src files are used to generate tilesets.
168
+ * @param params
169
+ * @returns
170
+ */
109
171
  function UploadSrcFile(params: {
110
172
  api?: BruceApi.Api;
111
173
  tilesetId: string;
@@ -113,22 +175,42 @@ export declare namespace Tileset {
113
175
  onProgress?: (progress: Uploader.IProgress) => void;
114
176
  req?: Api.IUploadReqParams;
115
177
  }): Promise<void>;
178
+ /**
179
+ * Deletes a file from a tileset.
180
+ * Src files are used to generate tilesets.
181
+ * @param params
182
+ */
116
183
  function DeleteSrcFile(params: {
117
184
  api?: BruceApi.Api;
118
185
  tilesetId: string;
119
186
  file: string;
120
187
  req?: Api.IReqParams;
121
188
  }): Promise<void>;
189
+ /**
190
+ * Returns file url for a file + tileset.
191
+ * @param params
192
+ * @returns
193
+ */
122
194
  function GetFileUrl(params: {
123
195
  api?: BruceApi.Api;
124
196
  tilesetId: string;
125
197
  file: string;
126
198
  }): string;
199
+ /**
200
+ * Returns file url for a src file + tileset.
201
+ * @param params
202
+ * @returns
203
+ */
127
204
  function GetSrcFileUrl(params: {
128
205
  api?: BruceApi.Api;
129
206
  tilesetId: string;
130
207
  file: string;
131
208
  }): string;
209
+ /**
210
+ * Returns file url for a file + tileset.
211
+ * @param params
212
+ * @returns
213
+ */
132
214
  function GetPublicFileUrl(params: {
133
215
  api?: BruceApi.Api;
134
216
  tilesetId: string;
@@ -136,6 +218,12 @@ export declare namespace Tileset {
136
218
  viaCdnCacheToken?: number | string;
137
219
  file: string;
138
220
  }): string;
221
+ /**
222
+ * Calls the generate end-point for a tileset.
223
+ * The requirements for successful generation are based on the type of tileset.
224
+ * @param params
225
+ * @returns
226
+ */
139
227
  function Generate(params: {
140
228
  api?: BruceApi.Api;
141
229
  tilesetId: string;
@@ -143,6 +231,9 @@ export declare namespace Tileset {
143
231
  }): Promise<{
144
232
  pendingActionId: number;
145
233
  }>;
234
+ /**
235
+ * Utils for publishing the tileset to other Nextspace accounts.
236
+ */
146
237
  namespace Publish {
147
238
  function GetCacheKey(accountId: string, tilesetId?: string): string;
148
239
  function GetAccessAllowedCacheKey(tilesetId: string, sourceAccountId: string, forAccountId: string): string;
@@ -1,5 +1,12 @@
1
+ /**
2
+ * Permissions in Nextspace are arbitrary strings with meaning in specific contexts.
3
+ * This is a list of known permissions.
4
+ */
1
5
  export declare namespace Permission {
2
6
  type Perm = EPerm | string;
7
+ /**
8
+ * Standalone permissions.
9
+ */
3
10
  enum EPerm {
4
11
  ADMIN = "ADMIN",
5
12
  ADMIN_VIEW = "ADMIN_VIEW",
@@ -8,6 +15,10 @@ export declare namespace Permission {
8
15
  CREATE_ENTITY_TYPE = "CREATE_ENTITY_TYPE",
9
16
  UPDATE_ENTITY_TYPE = "UPDATE_ENTITY_TYPE"
10
17
  }
18
+ /**
19
+ * Permissions that are suffixed with another value.
20
+ * Eg: "UIVIEW_" will get the view's ID appended to it and be used as a permission to access the view.
21
+ */
11
22
  enum EPermPrefix {
12
23
  ACCESS_PROJECT_VIEW = "UIVIEW_",
13
24
  MANAGE_PROJECT_VIEW_BOOKMARKS = "UIVIEW_MANAGE_BOOKMARKS_",
@@ -1,15 +1,17 @@
1
1
  import { Api } from "../api/api";
2
2
  import { GuardianApi } from "../api/guardian-api";
3
- import { IdmApi } from "../api/idm-api";
4
3
  import { UTC } from "../common/utc";
5
4
  import { Permission } from "./permission";
6
5
  import { User } from "./user";
7
6
  /**
8
- * Describes the "Session" concept within Bruce.
7
+ * Describes the "Session" concept within Nextspace.
9
8
  * A session is a set of settings produced from a user or access token login.
10
9
  * The session describes what the access should be allowed to do.
11
10
  */
12
11
  export declare namespace Session {
12
+ /**
13
+ * Describes a session record.
14
+ */
13
15
  interface ISession {
14
16
  AccessPermissions: IAccountPermissions;
15
17
  HypeportalAccessPermisssions?: ISuperPermissions;
@@ -19,17 +21,28 @@ export declare namespace Session {
19
21
  LastAccessTime: UTC.IUTC;
20
22
  User: User.IUser;
21
23
  }
24
+ /**
25
+ * Describes a set of permissions for an account.
26
+ */
22
27
  interface IAccountPermissions {
23
28
  "ClientAccount.ID"?: string;
24
29
  EnabledFeatures?: Permission.Perm[];
25
30
  UserGroups?: string[];
26
31
  }
32
+ /**
33
+ * Describes a set of permissions for a super user.
34
+ */
27
35
  interface ISuperPermissions {
28
36
  EnabledFeatures?: Permission.Perm[];
29
37
  UserGroups?: string[];
30
38
  }
39
+ /**
40
+ * Gets a session record.
41
+ * @param params
42
+ * @returns
43
+ */
31
44
  function Get(params: {
32
- api?: IdmApi.Api | GuardianApi.Api;
45
+ api?: GuardianApi.Api;
33
46
  sessionId?: string;
34
47
  accountId?: string;
35
48
  req?: Api.IReqParams;
@@ -43,7 +56,7 @@ export declare namespace Session {
43
56
  * @returns
44
57
  */
45
58
  function Login(params: {
46
- api?: IdmApi.Api | GuardianApi.Api;
59
+ api?: GuardianApi.Api;
47
60
  username?: string;
48
61
  password?: string;
49
62
  accountId?: string;
@@ -51,23 +64,53 @@ export declare namespace Session {
51
64
  }): Promise<{
52
65
  session: ISession;
53
66
  }>;
67
+ /**
68
+ * Request to logout and void a session.
69
+ * This will use the sessionId set within the provided api instance.
70
+ * @param params
71
+ */
54
72
  function Logout(params: {
55
- api?: IdmApi.Api | GuardianApi.Api;
73
+ api?: GuardianApi.Api;
56
74
  req?: Api.IReqParams;
57
75
  }): Promise<void>;
76
+ /**
77
+ * Returns if a permission is enabled for a session.
78
+ * This check is case-insensitive.
79
+ * Please use 'IsAccountAdmin' and 'IsSuperAdmin' when needed as they cover all account-level perms.
80
+ * @param params
81
+ * @returns
82
+ */
58
83
  function IsPermEnabled(params: {
59
84
  session: ISession;
60
85
  accountId: string;
61
86
  perm: string;
62
87
  }): boolean;
88
+ /**
89
+ * Returns if a super permission is enabled for a session.
90
+ * This check is case-insensitive.
91
+ * Please use 'IsSuperAdmin' when needed as it covers all perms.
92
+ * @param params
93
+ * @returns
94
+ */
63
95
  function IsSuperPermEnabled(params: {
64
96
  session: ISession;
65
97
  perm: string;
66
98
  }): boolean;
99
+ /**
100
+ * Returns if a session is an account admin.
101
+ * Please use 'IsSuperAdmin' when needed as it covers all perms.
102
+ * @param params
103
+ * @returns
104
+ */
67
105
  function IsAccountAdmin(params: {
68
106
  session: ISession;
69
107
  accountId: string;
70
108
  }): boolean;
109
+ /**
110
+ * Returns if a session is a super admin.
111
+ * @param params
112
+ * @returns
113
+ */
71
114
  function IsSuperAdmin(params: {
72
115
  session: ISession;
73
116
  }): boolean;