@inweb/client 25.2.2

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 (218) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +70 -0
  3. package/dist/client.js +21126 -0
  4. package/dist/client.js.map +1 -0
  5. package/dist/client.min.js +1 -0
  6. package/dist/client.module.js +7151 -0
  7. package/dist/client.module.js.map +1 -0
  8. package/lib/Api/Assembly.d.ts +339 -0
  9. package/lib/Api/ClashTest.d.ts +176 -0
  10. package/lib/Api/Client.d.ts +452 -0
  11. package/lib/Api/ClientEvents.d.ts +29 -0
  12. package/lib/Api/File.d.ts +568 -0
  13. package/lib/Api/HttpClient.d.ts +13 -0
  14. package/lib/Api/IAssembly.d.ts +14 -0
  15. package/lib/Api/IFile.d.ts +46 -0
  16. package/lib/Api/IHttpClient.d.ts +11 -0
  17. package/lib/Api/IUser.d.ts +11 -0
  18. package/lib/Api/Job.d.ts +142 -0
  19. package/lib/Api/Member.d.ts +85 -0
  20. package/lib/Api/Model.d.ts +147 -0
  21. package/lib/Api/Permission.d.ts +93 -0
  22. package/lib/Api/Project.d.ts +247 -0
  23. package/lib/Api/Role.d.ts +82 -0
  24. package/lib/Api/User.d.ts +197 -0
  25. package/lib/Api/impl/FetchError.d.ts +18 -0
  26. package/lib/Api/impl/Utils.d.ts +33 -0
  27. package/lib/Api/impl/http.d.ts +67 -0
  28. package/lib/ConvetMath.d.ts +29 -0
  29. package/lib/Viewer/CanvasEvents.d.ts +2 -0
  30. package/lib/Viewer/Commands/ApplyModelTransform.d.ts +2 -0
  31. package/lib/Viewer/Commands/ClearMarkup.d.ts +2 -0
  32. package/lib/Viewer/Commands/ClearSlices.d.ts +2 -0
  33. package/lib/Viewer/Commands/CreatePreview.d.ts +2 -0
  34. package/lib/Viewer/Commands/Explode.d.ts +2 -0
  35. package/lib/Viewer/Commands/GetDefaultViewPositions.d.ts +2 -0
  36. package/lib/Viewer/Commands/GetModels.d.ts +2 -0
  37. package/lib/Viewer/Commands/GetSelected.d.ts +2 -0
  38. package/lib/Viewer/Commands/HideSelected.d.ts +2 -0
  39. package/lib/Viewer/Commands/IsolateSelected.d.ts +2 -0
  40. package/lib/Viewer/Commands/RegenerateAll.d.ts +2 -0
  41. package/lib/Viewer/Commands/ResetView.d.ts +2 -0
  42. package/lib/Viewer/Commands/SelectModel.d.ts +2 -0
  43. package/lib/Viewer/Commands/SetActiveDragger.d.ts +2 -0
  44. package/lib/Viewer/Commands/SetDefaultViewPosition.d.ts +2 -0
  45. package/lib/Viewer/Commands/SetMarkupColor.d.ts +2 -0
  46. package/lib/Viewer/Commands/SetSelected.d.ts +2 -0
  47. package/lib/Viewer/Commands/ShowAll.d.ts +2 -0
  48. package/lib/Viewer/Commands/Unselect.d.ts +2 -0
  49. package/lib/Viewer/Commands/ZoomToExtents.d.ts +2 -0
  50. package/lib/Viewer/Commands/ZoomToObjects.d.ts +2 -0
  51. package/lib/Viewer/Commands/ZoomToSelected.d.ts +2 -0
  52. package/lib/Viewer/Commands.d.ts +3 -0
  53. package/lib/Viewer/Draggers/Actions/OrbitAction.d.ts +22 -0
  54. package/lib/Viewer/Draggers/Actions/PanAction.d.ts +18 -0
  55. package/lib/Viewer/Draggers/Actions/ZoomAction.d.ts +8 -0
  56. package/lib/Viewer/Draggers/Common/Geometry.d.ts +115 -0
  57. package/lib/Viewer/Draggers/Common/GestureManager.d.ts +41 -0
  58. package/lib/Viewer/Draggers/Common/OdBaseDragger.d.ts +54 -0
  59. package/lib/Viewer/Draggers/Common/OdaGeAction.d.ts +30 -0
  60. package/lib/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.d.ts +31 -0
  61. package/lib/Viewer/Draggers/MeasureLineDragger/MeasureUtils.d.ts +20 -0
  62. package/lib/Viewer/Draggers/MeasureLineDragger/index.d.ts +24 -0
  63. package/lib/Viewer/Draggers/OdBaseCuttingPlaneDragger.d.ts +27 -0
  64. package/lib/Viewer/Draggers/OdCuttingPlaneXAxisDragger.d.ts +8 -0
  65. package/lib/Viewer/Draggers/OdCuttingPlaneYAxisDragger.d.ts +8 -0
  66. package/lib/Viewer/Draggers/OdCuttingPlaneZAxisDragger.d.ts +8 -0
  67. package/lib/Viewer/Draggers/OdOrbitDragger.d.ts +15 -0
  68. package/lib/Viewer/Draggers/OdPanDragger.d.ts +12 -0
  69. package/lib/Viewer/Draggers/OdZoomDragger.d.ts +12 -0
  70. package/lib/Viewer/Draggers/OdZoomWheelDragger.d.ts +11 -0
  71. package/lib/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.d.ts +19 -0
  72. package/lib/Viewer/Draggers/OdZoomWindowDragger/index.d.ts +14 -0
  73. package/lib/Viewer/Draggers/OdaLineDragger.d.ts +15 -0
  74. package/lib/Viewer/Draggers/OdaTextDragger.d.ts +16 -0
  75. package/lib/Viewer/Draggers/OdaWalkDragger.d.ts +30 -0
  76. package/lib/Viewer/Draggers/OrbitAroundBuildingDragger.d.ts +19 -0
  77. package/lib/Viewer/EventEmitter2.d.ts +54 -0
  78. package/lib/Viewer/ICommands.d.ts +25 -0
  79. package/lib/Viewer/IEventEmitter2.d.ts +13 -0
  80. package/lib/Viewer/IViewer.d.ts +27 -0
  81. package/lib/Viewer/Loaders/BaseLoader.d.ts +11 -0
  82. package/lib/Viewer/Loaders/LoaderFactory.d.ts +10 -0
  83. package/lib/Viewer/Loaders/TCSLoader.d.ts +5 -0
  84. package/lib/Viewer/Loaders/UpdaterController.d.ts +15 -0
  85. package/lib/Viewer/Loaders/VsfXLoader.d.ts +5 -0
  86. package/lib/Viewer/Loaders/VsfXPartialLoader.d.ts +5 -0
  87. package/lib/Viewer/Markup/Api/IMarkupArrow.d.ts +12 -0
  88. package/lib/Viewer/Markup/Api/IMarkupColorable.d.ts +5 -0
  89. package/lib/Viewer/Markup/Api/IMarkupEllipse.d.ts +15 -0
  90. package/lib/Viewer/Markup/Api/IMarkupImage.d.ts +15 -0
  91. package/lib/Viewer/Markup/Api/IMarkupLine.d.ts +11 -0
  92. package/lib/Viewer/Markup/Api/IMarkupObject.d.ts +12 -0
  93. package/lib/Viewer/Markup/Api/IMarkupRectangle.d.ts +15 -0
  94. package/lib/Viewer/Markup/Api/IMarkupText.d.ts +13 -0
  95. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaArrow.d.ts +32 -0
  96. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.d.ts +40 -0
  97. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaImage.d.ts +36 -0
  98. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaLine.d.ts +32 -0
  99. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.d.ts +38 -0
  100. package/lib/Viewer/Markup/Api/Impl/Konva/KonvaText.d.ts +37 -0
  101. package/lib/Viewer/Markup/IMarkup.d.ts +38 -0
  102. package/lib/Viewer/Markup/Impl/Konva/KonvaMarkup.d.ts +63 -0
  103. package/lib/Viewer/Markup/Impl/Konva/MarkupColor.d.ts +19 -0
  104. package/lib/Viewer/Markup/Impl/Visualize/VisualizeMarkup.d.ts +33 -0
  105. package/lib/Viewer/Markup/MarkupFactory.d.ts +7 -0
  106. package/lib/Viewer/Options.d.ts +228 -0
  107. package/lib/Viewer/OptionsEvents.d.ts +26 -0
  108. package/lib/Viewer/Viewer.d.ts +353 -0
  109. package/lib/Viewer/ViewerCommands.d.ts +23 -0
  110. package/lib/Viewer/ViewerEvents.d.ts +601 -0
  111. package/lib/Viewer/utils.d.ts +4 -0
  112. package/lib/index.d.ts +24 -0
  113. package/package.json +32 -0
  114. package/src/Api/Assembly.ts +678 -0
  115. package/src/Api/ClashTest.ts +290 -0
  116. package/src/Api/Client.ts +816 -0
  117. package/src/Api/ClientEvents.ts +31 -0
  118. package/src/Api/File.ts +962 -0
  119. package/src/Api/HttpClient.ts +73 -0
  120. package/src/Api/IAssembly.ts +37 -0
  121. package/src/Api/IFile.ts +74 -0
  122. package/src/Api/IHttpClient.ts +50 -0
  123. package/src/Api/IUser.ts +33 -0
  124. package/src/Api/Job.ts +253 -0
  125. package/src/Api/Member.ts +161 -0
  126. package/src/Api/Model.ts +259 -0
  127. package/src/Api/Permission.ts +173 -0
  128. package/src/Api/Project.ts +479 -0
  129. package/src/Api/Role.ts +158 -0
  130. package/src/Api/User.ts +357 -0
  131. package/src/Api/impl/FetchError.ts +48 -0
  132. package/src/Api/impl/Utils.ts +367 -0
  133. package/src/Api/impl/http.ts +92 -0
  134. package/src/ConvetMath.ts +372 -0
  135. package/src/Viewer/CanvasEvents.ts +41 -0
  136. package/src/Viewer/Commands/ApplyModelTransform.ts +70 -0
  137. package/src/Viewer/Commands/ClearMarkup.ts +28 -0
  138. package/src/Viewer/Commands/ClearSlices.ts +27 -0
  139. package/src/Viewer/Commands/CreatePreview.ts +33 -0
  140. package/src/Viewer/Commands/Explode.ts +38 -0
  141. package/src/Viewer/Commands/GetDefaultViewPositions.ts +36 -0
  142. package/src/Viewer/Commands/GetModels.ts +43 -0
  143. package/src/Viewer/Commands/GetSelected.ts +58 -0
  144. package/src/Viewer/Commands/HideSelected.ts +37 -0
  145. package/src/Viewer/Commands/IsolateSelected.ts +37 -0
  146. package/src/Viewer/Commands/RegenerateAll.ts +37 -0
  147. package/src/Viewer/Commands/ResetView.ts +43 -0
  148. package/src/Viewer/Commands/SelectModel.ts +52 -0
  149. package/src/Viewer/Commands/SetActiveDragger.ts +29 -0
  150. package/src/Viewer/Commands/SetDefaultViewPosition.ts +50 -0
  151. package/src/Viewer/Commands/SetMarkupColor.ts +29 -0
  152. package/src/Viewer/Commands/SetSelected.ts +47 -0
  153. package/src/Viewer/Commands/ShowAll.ts +37 -0
  154. package/src/Viewer/Commands/Unselect.ts +37 -0
  155. package/src/Viewer/Commands/ZoomToExtents.ts +43 -0
  156. package/src/Viewer/Commands/ZoomToObjects.ts +47 -0
  157. package/src/Viewer/Commands/ZoomToSelected.ts +39 -0
  158. package/src/Viewer/Commands.ts +81 -0
  159. package/src/Viewer/Draggers/Actions/OrbitAction.ts +250 -0
  160. package/src/Viewer/Draggers/Actions/PanAction.ts +102 -0
  161. package/src/Viewer/Draggers/Actions/ZoomAction.ts +45 -0
  162. package/src/Viewer/Draggers/Common/Geometry.ts +152 -0
  163. package/src/Viewer/Draggers/Common/GestureManager.ts +263 -0
  164. package/src/Viewer/Draggers/Common/OdBaseDragger.ts +270 -0
  165. package/src/Viewer/Draggers/Common/OdaGeAction.ts +146 -0
  166. package/src/Viewer/Draggers/MeasureLineDragger/MeasureLineItem.ts +248 -0
  167. package/src/Viewer/Draggers/MeasureLineDragger/MeasureUtils.ts +182 -0
  168. package/src/Viewer/Draggers/MeasureLineDragger/index.ts +166 -0
  169. package/src/Viewer/Draggers/OdBaseCuttingPlaneDragger.ts +182 -0
  170. package/src/Viewer/Draggers/OdCuttingPlaneXAxisDragger.ts +53 -0
  171. package/src/Viewer/Draggers/OdCuttingPlaneYAxisDragger.ts +53 -0
  172. package/src/Viewer/Draggers/OdCuttingPlaneZAxisDragger.ts +53 -0
  173. package/src/Viewer/Draggers/OdOrbitDragger.ts +70 -0
  174. package/src/Viewer/Draggers/OdPanDragger.ts +62 -0
  175. package/src/Viewer/Draggers/OdZoomDragger.ts +59 -0
  176. package/src/Viewer/Draggers/OdZoomWheelDragger.ts +103 -0
  177. package/src/Viewer/Draggers/OdZoomWindowDragger/OdSelectionFrame.ts +123 -0
  178. package/src/Viewer/Draggers/OdZoomWindowDragger/index.ts +75 -0
  179. package/src/Viewer/Draggers/OdaLineDragger.ts +80 -0
  180. package/src/Viewer/Draggers/OdaTextDragger.ts +118 -0
  181. package/src/Viewer/Draggers/OdaWalkDragger.ts +278 -0
  182. package/src/Viewer/Draggers/OrbitAroundBuildingDragger.ts +184 -0
  183. package/src/Viewer/EventEmitter2.ts +116 -0
  184. package/src/Viewer/ICommands.ts +53 -0
  185. package/src/Viewer/IEventEmitter2.ts +36 -0
  186. package/src/Viewer/IViewer.ts +55 -0
  187. package/src/Viewer/Loaders/BaseLoader.ts +40 -0
  188. package/src/Viewer/Loaders/LoaderFactory.ts +44 -0
  189. package/src/Viewer/Loaders/TCSLoader.ts +82 -0
  190. package/src/Viewer/Loaders/UpdaterController.ts +36 -0
  191. package/src/Viewer/Loaders/VsfXLoader.ts +87 -0
  192. package/src/Viewer/Loaders/VsfXPartialLoader.ts +208 -0
  193. package/src/Viewer/Markup/Api/IMarkupArrow.ts +15 -0
  194. package/src/Viewer/Markup/Api/IMarkupColorable.ts +4 -0
  195. package/src/Viewer/Markup/Api/IMarkupEllipse.ts +15 -0
  196. package/src/Viewer/Markup/Api/IMarkupImage.ts +15 -0
  197. package/src/Viewer/Markup/Api/IMarkupLine.ts +10 -0
  198. package/src/Viewer/Markup/Api/IMarkupObject.ts +15 -0
  199. package/src/Viewer/Markup/Api/IMarkupRectangle.ts +15 -0
  200. package/src/Viewer/Markup/Api/IMarkupText.ts +12 -0
  201. package/src/Viewer/Markup/Api/Impl/Konva/KonvaArrow.ts +119 -0
  202. package/src/Viewer/Markup/Api/Impl/Konva/KonvaEllipse.ts +113 -0
  203. package/src/Viewer/Markup/Api/Impl/Konva/KonvaImage.ts +121 -0
  204. package/src/Viewer/Markup/Api/Impl/Konva/KonvaLine.ts +99 -0
  205. package/src/Viewer/Markup/Api/Impl/Konva/KonvaRectangle.ts +113 -0
  206. package/src/Viewer/Markup/Api/Impl/Konva/KonvaText.ts +104 -0
  207. package/src/Viewer/Markup/IMarkup.ts +39 -0
  208. package/src/Viewer/Markup/Impl/Konva/KonvaMarkup.ts +872 -0
  209. package/src/Viewer/Markup/Impl/Konva/MarkupColor.ts +39 -0
  210. package/src/Viewer/Markup/Impl/Visualize/VisualizeMarkup.ts +273 -0
  211. package/src/Viewer/Markup/MarkupFactory.ts +32 -0
  212. package/src/Viewer/Options.ts +502 -0
  213. package/src/Viewer/OptionsEvents.ts +28 -0
  214. package/src/Viewer/Viewer.ts +1109 -0
  215. package/src/Viewer/ViewerCommands.ts +45 -0
  216. package/src/Viewer/ViewerEvents.ts +700 -0
  217. package/src/Viewer/utils.ts +74 -0
  218. package/src/index.ts +48 -0
@@ -0,0 +1,247 @@
1
+ import { IHttpClient } from "./IHttpClient";
2
+ import { IShortUserDescription } from "./IUser";
3
+ import { Role } from "./Role";
4
+ import { Member } from "./Member";
5
+ /**
6
+ * Projects are used to collaborate on models and track issues.
7
+ */
8
+ export declare class Project {
9
+ private _data;
10
+ protected httpClient: IHttpClient;
11
+ /**
12
+ * @param data - An object that implements project data storage.
13
+ * @param httpClient - Http client.
14
+ */
15
+ constructor(data: any, httpClient: IHttpClient);
16
+ protected internalGet(relativePath: string): Promise<Response>;
17
+ protected internalPost(relativePath: string, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise<Response>;
18
+ protected internalPut(relativePath: string, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise<Response>;
19
+ protected internalDelete(relativePath: string): Promise<Response>;
20
+ /**
21
+ * Project features the user has access to.
22
+ *
23
+ * @property {string[]} project_actions - Actions are allowed to be performed: `update`,
24
+ * `createTopic`, `createDocument`.
25
+ * @readonly
26
+ */
27
+ get authorization(): any;
28
+ /**
29
+ * Project creation time (UTC) in the format specified in <a
30
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
31
+ *
32
+ * @readonly
33
+ */
34
+ get createdAt(): string;
35
+ /**
36
+ * Project custom fields object, to store custom data.
37
+ */
38
+ get customFields(): any;
39
+ set customFields(value: any);
40
+ /**
41
+ * Raw project data received from the server.
42
+ *
43
+ * @readonly
44
+ */
45
+ get data(): any;
46
+ private set data(value);
47
+ /**
48
+ * Project description.
49
+ */
50
+ get description(): string;
51
+ set description(value: string);
52
+ /**
53
+ * Project end date in the format specified in <a
54
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
55
+ */
56
+ get endDate(): string;
57
+ set endDate(value: string | Date);
58
+ /**
59
+ * Unique project ID.
60
+ *
61
+ * @readonly
62
+ */
63
+ get id(): string;
64
+ /**
65
+ * The number of members in the project.
66
+ *
67
+ * @readonly
68
+ */
69
+ get memberCount(): number;
70
+ /**
71
+ * The number of models in the project.
72
+ *
73
+ * @readonly
74
+ */
75
+ get modelCount(): number;
76
+ /**
77
+ * Project name.
78
+ */
79
+ get name(): string;
80
+ set name(value: string);
81
+ /**
82
+ * Project owner information.
83
+ *
84
+ * @property {string} userId - User ID.
85
+ * @property {string} userName - User name.
86
+ * @property {string} name - First name.
87
+ * @property {string} lastName - Last name.
88
+ * @property {string} fullName - Full name.
89
+ * @property {string} initials - Initials.
90
+ * @property {string} email - User email.
91
+ * @property {string} avatarUrl - User avatar image URL.
92
+ * @readonly
93
+ */
94
+ get owner(): IShortUserDescription;
95
+ /**
96
+ * Project preview image URL. Use [setPreview()]{@link Project#setPreview} to change preview image.
97
+ *
98
+ * @readonly
99
+ */
100
+ get previewUrl(): string;
101
+ /**
102
+ * `true` if project is public (shared) project.
103
+ */
104
+ get public(): boolean;
105
+ set public(value: boolean);
106
+ /**
107
+ * Project start date in the format specified in <a
108
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
109
+ */
110
+ get startDate(): string;
111
+ set startDate(value: string | Date);
112
+ /**
113
+ * The number of topics in the project.
114
+ *
115
+ * @readonly
116
+ */
117
+ get topicCount(): number;
118
+ /**
119
+ * Project last update time (UTC) in the format specified in <a
120
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
121
+ *
122
+ * @readonly
123
+ */
124
+ get updatedAt(): string;
125
+ /**
126
+ * Refresh project data.
127
+ *
128
+ * @async
129
+ */
130
+ checkout(): Promise<Project>;
131
+ /**
132
+ * Update project data on the server.
133
+ *
134
+ * @async
135
+ * @param data - Raw project data.
136
+ */
137
+ update(data: any): Promise<Project>;
138
+ /**
139
+ * Delete the project from the server.
140
+ *
141
+ * @async
142
+ * @returns Returns the raw data of a deleted project.
143
+ */
144
+ delete(): Promise<any>;
145
+ /**
146
+ * Save project data changes to the server. Call this method to update project data on the
147
+ * server after any changes.
148
+ *
149
+ * @async
150
+ */
151
+ save(): Promise<Project>;
152
+ /**
153
+ * Set or remove the project preview.
154
+ *
155
+ * @async
156
+ * @param image - Preview image. Can be a <a
157
+ * href="https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"
158
+ * target="_blank">Data URL</a> string, <a
159
+ * href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer"
160
+ * target="_blank">ArrayBuffer</a>, <a
161
+ * href="https://developer.mozilla.org/docs/Web/API/Blob/Blob" target="_blank">Blob</a> or
162
+ * Web API <a href="https://developer.mozilla.org/docs/Web/API/File"
163
+ * target="_blank">File</a> object. Setting the `image` to `null` will remove the preview.
164
+ */
165
+ setPreview(image?: ArrayBuffer | Blob | globalThis.File | FormData | string | null): Promise<this>;
166
+ /**
167
+ * Returns a list of project roles. Project {@link Member | members} have different abilities
168
+ * depending on the role they have in a project.
169
+ *
170
+ * @async
171
+ */
172
+ getRoles(): Promise<Role[]>;
173
+ /**
174
+ * Returns the role information.
175
+ *
176
+ * @async
177
+ * @param name - Role name.
178
+ */
179
+ getRole(name: string): Promise<Role>;
180
+ /**
181
+ * Create a new project role.
182
+ *
183
+ * @async
184
+ * @param name - Role name.
185
+ * @param description - Role description.
186
+ * @param permissions - Actions are allowed to be performed. See
187
+ * {@link Role#permissions | Role.permissions} for more details.
188
+ */
189
+ createRole(name: string, description: string, permissions: any): Promise<Role>;
190
+ /**
191
+ * Delete project role.
192
+ *
193
+ * @async
194
+ * @param name - Role name.
195
+ * @returns Returns the raw data of a deleted role.
196
+ */
197
+ deleteRole(name: string): Promise<any>;
198
+ /**
199
+ * Returns a list of project members.
200
+ *
201
+ * @async
202
+ */
203
+ getMembers(): Promise<Member[]>;
204
+ /**
205
+ * Returns the member information.
206
+ *
207
+ * @async
208
+ * @param memberId - Member ID.
209
+ */
210
+ getMember(memberId: string): Promise<Member>;
211
+ /**
212
+ * Add a user to the project to become a member and have permission to perform actions.
213
+ *
214
+ * @async
215
+ * @param userId - User ID.
216
+ * @param role - User role from the list of project roles.
217
+ */
218
+ addMember(userId: string, role: string): Promise<Member>;
219
+ /**
220
+ * Remove a member from a project.
221
+ *
222
+ * @async
223
+ * @param memberId - Member ID.
224
+ * @returns Returns the raw data of a deleted member.
225
+ */
226
+ removeMember(memberId: string): Promise<any>;
227
+ /**
228
+ * Information about the file (model) that can be reference in the project topics.
229
+ *
230
+ * @typedef {any} FileInformation
231
+ * @property {any[]} display_information - The list of fields to allow users to associate the
232
+ * file with a server model.
233
+ * @property {string} display_information.field_display_name - Field display name.
234
+ * @property {string} display_information.field_value - Field value.
235
+ * @property {any} file - The file reference object.
236
+ * @property {string} file.file_name - File name.
237
+ * @property {string} file.reference - File ID.
238
+ */
239
+ /**
240
+ * Returns a list of project files. To add a file to this list, create a `project` permission
241
+ * on the file using {@link File#createPermission | File.createPermission()}.
242
+ *
243
+ * @async
244
+ */
245
+ getFilesInformation(): Promise<any[]>;
246
+ }
247
+ //# sourceMappingURL=Project.d.ts.map
@@ -0,0 +1,82 @@
1
+ import { IHttpClient } from "./IHttpClient";
2
+ /**
3
+ * A roles determines what permissions {@link User | users} have on a {@link Project | project}.
4
+ */
5
+ export declare class Role {
6
+ private _data;
7
+ protected projectId: string;
8
+ protected httpClient: IHttpClient;
9
+ /**
10
+ * @param data - An object that implements role data storage.
11
+ * @param projectId - Owner project ID.
12
+ * @param httpClient - Http client.
13
+ */
14
+ constructor(data: any, projectId: string, httpClient: IHttpClient);
15
+ private internalGet;
16
+ private internalPut;
17
+ private internalDelete;
18
+ /**
19
+ * Role description.
20
+ */
21
+ get description(): string;
22
+ set description(value: string);
23
+ /**
24
+ * Raw role data received from the server.
25
+ *
26
+ * @readonly
27
+ */
28
+ get data(): any;
29
+ set data(value: any);
30
+ /**
31
+ * Role name.
32
+ */
33
+ get name(): string;
34
+ set name(value: string);
35
+ /**
36
+ * Role actions are allowed to be performed.
37
+ *
38
+ * @property {string[]} projectActions - Actions are allowed to be performed at the project
39
+ * level: `update`, `createTopic`, `createDocument`.
40
+ * @property {string[]} topicActions - Actions are allowed to be performed at the topic
41
+ * level: `update`, `updateBimSnippet`, `updateRelatedTopics`, `updateDocumentReferences`,
42
+ * `updateFiles`, `createComment`, `createViewpoint`, `delete`.
43
+ * @property {string[]} commentActions - Actions are allowed to be performed at the comment
44
+ * level: `update`, `delete`.
45
+ * @property {string[]} viewpointActions - Actions are allowed to be performed at the
46
+ * viewpoint level: `delete`.
47
+ * @property {string[]} odaGroupActions - Actions are allowed to be performed at the members
48
+ * level: `update`, `delete`.
49
+ * @property {string[]} odaRoleActions - Actions are allowed to be performed at the roles
50
+ * level: `update`, `delete`.
51
+ */
52
+ get permissions(): any;
53
+ set permissions(value: any);
54
+ /**
55
+ * Refresh role data.
56
+ *
57
+ * @async
58
+ */
59
+ checkout(): Promise<Role>;
60
+ /**
61
+ * Update role data on the server.
62
+ *
63
+ * @async
64
+ * @param data - Raw role data.
65
+ */
66
+ update(data: any): Promise<Role>;
67
+ /**
68
+ * Delete a role from the project.
69
+ *
70
+ * @async
71
+ * @returns Returns the raw data of a deleted role.
72
+ */
73
+ delete(): Promise<any>;
74
+ /**
75
+ * Save role data changes to the server. Call this method to update role data on the server
76
+ * after any changes.
77
+ *
78
+ * @async
79
+ */
80
+ save(): Promise<Role>;
81
+ }
82
+ //# sourceMappingURL=Role.d.ts.map
@@ -0,0 +1,197 @@
1
+ import { IHttpClient } from "./IHttpClient";
2
+ export interface UserParams {
3
+ /**
4
+ * `true` if user is an administrator
5
+ */
6
+ isAdmin?: boolean;
7
+ /**
8
+ * User name
9
+ */
10
+ userName?: string;
11
+ /**
12
+ * First name
13
+ */
14
+ firstName?: string;
15
+ /**
16
+ * Last name
17
+ */
18
+ lastName?: string;
19
+ /**
20
+ * `true` if user is allowed to create a project
21
+ */
22
+ canCreateProject?: boolean;
23
+ /**
24
+ * The maximum number of projects that the user can create
25
+ */
26
+ projectsLimit?: number;
27
+ /**
28
+ * The size of the file storage available to the user
29
+ */
30
+ storageLimit?: number;
31
+ }
32
+ /**
33
+ * The class representing a `user` entity.
34
+ */
35
+ export declare class User {
36
+ private _data;
37
+ protected httpClient: IHttpClient;
38
+ /**
39
+ * @param data - An object that implements user data storage.
40
+ * @param httpClient - Http client.
41
+ */
42
+ constructor(data: any, httpClient: IHttpClient);
43
+ /**
44
+ * User avatar image URL. Use {@link User#setAvatar | setAvatar()} to change avatar image.
45
+ *
46
+ * @readonly
47
+ */
48
+ get avatarUrl(): string;
49
+ /**
50
+ * `true` if user is allowed to create a project.
51
+ *
52
+ * @readonly
53
+ */
54
+ get canCreateProject(): boolean;
55
+ /**
56
+ * User account registration time (UTC) in the format specified in <a
57
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
58
+ *
59
+ * @readonly
60
+ */
61
+ get createAt(): string;
62
+ /**
63
+ * User custom fields object, to store custom data.
64
+ */
65
+ get customFields(): any;
66
+ set customFields(value: any);
67
+ /**
68
+ * Raw user data received from the server.
69
+ *
70
+ * @readonly
71
+ */
72
+ get data(): any;
73
+ private set data(value);
74
+ /**
75
+ * User email.
76
+ *
77
+ * @readonly
78
+ */
79
+ get email(): string;
80
+ /**
81
+ * The user's email confirmation code, or an empty string if the email has already been confirmed.
82
+ *
83
+ * @readonly
84
+ */
85
+ get emailConfirmationId(): string;
86
+ /**
87
+ * First name.
88
+ */
89
+ get firstName(): string;
90
+ set firstName(value: string);
91
+ /**
92
+ * Full name. Returns the user's first and last name. If first name and last names are empty,
93
+ * returns the user name.
94
+ */
95
+ get fullName(): string;
96
+ /**
97
+ * Unique user ID.
98
+ *
99
+ * @readonly
100
+ */
101
+ get id(): string;
102
+ /**
103
+ * User initials. Returns a first letters of the user's first and last names. If first name
104
+ * and last names are empty, returns the first letter of the user name.
105
+ */
106
+ get initials(): string;
107
+ /**
108
+ * `false` if the user has not yet confirmed his email address.
109
+ *
110
+ * @readonly
111
+ */
112
+ get isEmailConfirmed(): boolean;
113
+ /**
114
+ * User last update time (UTC) in the format specified in <a
115
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
116
+ */
117
+ get lastModified(): string;
118
+ /**
119
+ * Last name.
120
+ */
121
+ get lastName(): string;
122
+ set lastName(value: string);
123
+ /**
124
+ * User last sign in time (UTC) in the format specified in <a
125
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
126
+ */
127
+ get lastSignIn(): string;
128
+ /**
129
+ * The maximum number of projects that a user can create.
130
+ *
131
+ * @readonly
132
+ */
133
+ get projectsLimit(): number;
134
+ /**
135
+ * The user's API key.
136
+ *
137
+ * @readonly
138
+ */
139
+ get token(): string;
140
+ /**
141
+ * User name.
142
+ */
143
+ get userName(): string;
144
+ set userName(value: string);
145
+ /**
146
+ * Refresh user data. Only admins can checkout other users, if the current logged in user
147
+ * does not have administrator rights, hi can only checkout himself, otherwise an exception
148
+ * will be thrown.
149
+ */
150
+ checkout(): Promise<User>;
151
+ /**
152
+ * Update user data on the server. Only admins can update other users, if the current logged
153
+ * in user does not have administrator rights, hi can only update himself, otherwise an
154
+ * exception will be thrown.
155
+ *
156
+ * @async
157
+ * @param data - Raw user data.
158
+ */
159
+ update(data: any): Promise<this>;
160
+ /**
161
+ * Delete a user from the server. Only admins can delete users, if the current logged in user
162
+ * does not have administrator rights, an exception will be thrown.
163
+ *
164
+ * Admins can delete themselves or other admins. An admin can only delete himself if he is
165
+ * not the last administrator.
166
+ *
167
+ * You need to re-login to continue working after deleting the current logged in user.
168
+ *
169
+ * @async
170
+ * @returns Returns the raw data of a deleted user.
171
+ */
172
+ delete(): Promise<any>;
173
+ /**
174
+ * Save user data changes to the server. Call this method to update user data on the server
175
+ * after any changes.
176
+ *
177
+ * @async
178
+ */
179
+ save(): Promise<User>;
180
+ /**
181
+ * Set or remove the user avatar. Only admins can set the avatar of other users, if the
182
+ * current logged in user does not have administrator rights, he can only set his own avatar,
183
+ * otherwise an exception will be thrown.
184
+ *
185
+ * @async
186
+ * @param image - Avatar image. Can be a <a
187
+ * href="https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"
188
+ * target="_blank">Data URL</a> string, <a
189
+ * href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer"
190
+ * target="_blank">ArrayBuffer</a>, <a
191
+ * href="https://developer.mozilla.org/docs/Web/API/Blob/Blob" target="_blank">Blob</a> or
192
+ * Web API <a href="https://developer.mozilla.org/docs/Web/API/File"
193
+ * target="_blank">File</a> object. Setting the `image` to `null` will remove the avatar.
194
+ */
195
+ setAvatar(image?: ArrayBuffer | Blob | globalThis.File | FormData | string | null): Promise<User>;
196
+ }
197
+ //# sourceMappingURL=User.d.ts.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The `FetchError` object indicates an error when request to Open Cloud Server could not be
3
+ * performed. A `FetchError` is typically (but not exclusively) thrown when a network error
4
+ * occurs, access denied, or object not found.
5
+ */
6
+ export declare class FetchError extends Error {
7
+ protected status: number;
8
+ protected statusText: string;
9
+ /**
10
+ * @property status - The <a href="https://developer.mozilla.org/docs/Web/HTTP/Status" target
11
+ * ="_blank">HTTP status code</a> of the response.
12
+ * @property message - Error message. Inherited from <a
13
+ * href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error"
14
+ * target ="_blank">Error</a>.
15
+ */
16
+ constructor(status: number, message?: string);
17
+ }
18
+ //# sourceMappingURL=FetchError.d.ts.map
@@ -0,0 +1,33 @@
1
+ export declare function json(request: any): any;
2
+ export declare function text(request: any): any;
3
+ export declare function arrayBuffer(request: any): any;
4
+ export declare function $init(method: "GET" | "POST" | "PUT" | "DELETE", headers?: HeadersInit, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null, signal?: AbortSignal): RequestInit;
5
+ export declare function $fetch(url: RequestInfo | URL, init?: RequestInit): Promise<Response>;
6
+ export declare function $get(url: RequestInfo | URL, headers?: HeadersInit, signal?: AbortSignal): Promise<Response>;
7
+ export declare function $put(url: RequestInfo | URL, headers?: HeadersInit, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise<Response>;
8
+ export declare function $post(url: RequestInfo | URL, headers?: HeadersInit, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise<Response>;
9
+ export declare function $delete(url: RequestInfo | URL, headers?: HeadersInit): Promise<Response>;
10
+ export declare function streamProgress(stream: ReadableStream<Uint8Array>, onprogress: (progress: number) => void): ReadableStream<Uint8Array>;
11
+ export declare function downloadProgress(response: Response, onprogress?: (progress: number) => void): Response;
12
+ interface XMLHttpParams {
13
+ headers: HeadersInit;
14
+ method: "GET" | "POST" | "PUT" | "DELETE";
15
+ body?: XMLHttpRequestBodyInit | Document;
16
+ uploadProgress?: (progress: number) => void;
17
+ downloadProgress?: (progress: number) => void;
18
+ }
19
+ export declare function $XMLHttp(url: string, { headers, method, body, uploadProgress, downloadProgress }: XMLHttpParams): Promise<XMLHttpRequest>;
20
+ export declare function waitFor(func: (params: any) => Promise<boolean>, params?: {
21
+ timeout?: number;
22
+ interval?: number;
23
+ signal?: AbortSignal;
24
+ abortError?: DOMException;
25
+ timeoutError?: DOMException;
26
+ result?: any;
27
+ }): Promise<any>;
28
+ export declare function downloadPartOfFile(requestId: number, records: any | null, url: string, defHeaders: HeadersInit, onProgress?: (progress: number, downloaded: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<void>;
29
+ export declare function parseArgs(args: string | object): object;
30
+ export declare function userFullName(firstName: string | any, lastName?: string, userName?: string): string;
31
+ export declare function userInitials(fullName?: string): string;
32
+ export {};
33
+ //# sourceMappingURL=Utils.d.ts.map
@@ -0,0 +1,67 @@
1
+ export declare const STATUS_CODES: {
2
+ 100: string;
3
+ 101: string;
4
+ 102: string;
5
+ 103: string;
6
+ 200: string;
7
+ 201: string;
8
+ 202: string;
9
+ 203: string;
10
+ 204: string;
11
+ 205: string;
12
+ 206: string;
13
+ 207: string;
14
+ 208: string;
15
+ 226: string;
16
+ 300: string;
17
+ 301: string;
18
+ 302: string;
19
+ 303: string;
20
+ 304: string;
21
+ 305: string;
22
+ 307: string;
23
+ 308: string;
24
+ 400: string;
25
+ 401: string;
26
+ 402: string;
27
+ 403: string;
28
+ 404: string;
29
+ 405: string;
30
+ 406: string;
31
+ 407: string;
32
+ 408: string;
33
+ 409: string;
34
+ 410: string;
35
+ 411: string;
36
+ 412: string;
37
+ 413: string;
38
+ 414: string;
39
+ 415: string;
40
+ 416: string;
41
+ 417: string;
42
+ 418: string;
43
+ 421: string;
44
+ 422: string;
45
+ 423: string;
46
+ 424: string;
47
+ 425: string;
48
+ 426: string;
49
+ 428: string;
50
+ 429: string;
51
+ 431: string;
52
+ 451: string;
53
+ 500: string;
54
+ 501: string;
55
+ 502: string;
56
+ 503: string;
57
+ 504: string;
58
+ 505: string;
59
+ 506: string;
60
+ 507: string;
61
+ 508: string;
62
+ 509: string;
63
+ 510: string;
64
+ 511: string;
65
+ };
66
+ export declare function statusText(status: number): string;
67
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Convert world coordinates to screen normalized (-1, 1)
3
+ *
4
+ * @param viewMatrix Camera world matrix
5
+ * @param projectionMatrix Camera projection matrix
6
+ * @param worldPoint World point
7
+ */
8
+ export declare function worldToScreenNormalized(viewMatrix: Array<number>, projectionMatrix: Array<number>, worldPoint: [x: number, y: number, z: number]): [x: number, y: number, z: number];
9
+ export declare function multiplyMatrices(a: Array<number>, b: Array<number>): Array<number>;
10
+ /**
11
+ * @param matrix
12
+ * @returns Matrix
13
+ */
14
+ export declare function invertMatrix(matrix: Array<number>): Array<number>;
15
+ /**
16
+ * Convert world coordinates to screen (screenWidth, screenHeight)
17
+ *
18
+ * @param viewMatrix Camera world matrix
19
+ * @param projectionMatrix Camera projection matrix
20
+ * @param worldPoint World point
21
+ * @param screenWidth Screen width
22
+ * @param screenHeight Screen height
23
+ */
24
+ export declare function worldToScreen(viewMatrix: Array<number>, projectionMatrix: Array<number>, worldPoint: [x: number, y: number, z: number], screenWidth: number, screenHeight: number): number[];
25
+ export declare function createOrthoProjectionMatrix(camera: any, width: any, height: any): number[];
26
+ export declare function createViewMatrix(camera: any): any[];
27
+ export declare function bcfWorldToScreenFromCamera(camera: any, canvas: HTMLCanvasElement, point: [x: number, y: number, z: number]): number[];
28
+ export declare function matrixLookAt(matrix: any, eye: any, target: any, up: any): any;
29
+ //# sourceMappingURL=ConvetMath.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const CANVAS_EVENTS: string[];
2
+ //# sourceMappingURL=CanvasEvents.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const composeMatrixFromTransform: (translate: any, rotate: any, scale: any, modelCenter: any, matrix: any) => any;
2
+ //# sourceMappingURL=ApplyModelTransform.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ClearMarkup.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ClearSlices.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CreatePreview.d.ts.map