@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,339 @@
1
+ import { IHttpClient } from "./IHttpClient";
2
+ import { IAssociatedFileData, IAssemblyVersionInfo } from "./IAssembly";
3
+ import { IShortUserDescription } from "./IUser";
4
+ import { Model } from "./Model";
5
+ import { ClashTest } from "./ClashTest";
6
+ /**
7
+ * The class representing a `assembly` entity.
8
+ */
9
+ export declare class Assembly {
10
+ private _data;
11
+ private _useVersion;
12
+ httpClient: IHttpClient;
13
+ path: string;
14
+ /**
15
+ * @param data - An object that implements assembly data storage.
16
+ * @param httpClient - Http client.
17
+ */
18
+ constructor(data: any, httpClient: IHttpClient);
19
+ appendVersionParam(relativePath: string): string;
20
+ protected internalGet(relativePath: string, signal?: AbortSignal): Promise<Response>;
21
+ protected internalPost(relativePath: string, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise<Response>;
22
+ protected internalPut(relativePath: string, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise<Response>;
23
+ protected internalDelete(relativePath: string): Promise<Response>;
24
+ partialDownloadResource(dataId: string, onProgress?: (progress: number, downloaded: Uint8Array) => void, signal?: AbortSignal): Promise<void>;
25
+ downloadFileRange(requestId: number, records: any | null, dataId: string, onProgress?: (progress: number, downloaded: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<void>;
26
+ get activeVersion(): number;
27
+ /**
28
+ * List of unique files from which the assembly was created.
29
+ *
30
+ * @readonly
31
+ */
32
+ get associatedFiles(): IAssociatedFileData[];
33
+ /**
34
+ * Assembly creation time (UTC) in the format specified in <a
35
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
36
+ *
37
+ * @readonly
38
+ */
39
+ get created(): string;
40
+ /**
41
+ * Raw assembly data received from the server.
42
+ *
43
+ * @readonly
44
+ */
45
+ get data(): any;
46
+ private set data(value);
47
+ /**
48
+ * List of file IDs from which the assembly was created.
49
+ *
50
+ * @readonly
51
+ */
52
+ get files(): string[];
53
+ /**
54
+ * Assembly geometry data type:
55
+ *
56
+ * - `vsfx` - VSFX, assembly can be opened in `VisualizeJS` viewer.
57
+ *
58
+ * Returns an empty string if geometry data has not yet been extracted.
59
+ */
60
+ get geometryType(): string;
61
+ /**
62
+ * Unique assembly ID.
63
+ *
64
+ * @readonly
65
+ */
66
+ get id(): string;
67
+ /**
68
+ * Assembly name.
69
+ */
70
+ get name(): string;
71
+ set name(value: string);
72
+ get originalAssemblyId(): string;
73
+ /**
74
+ * Assembly owner information.
75
+ *
76
+ * @property {string} userId - User ID.
77
+ * @property {string} userName - User name.
78
+ * @property {string} name - First name.
79
+ * @property {string} lastName - Last name.
80
+ * @property {string} fullName - Full name.
81
+ * @property {string} initials - Initials.
82
+ * @property {string} email - User email.
83
+ * @property {string} avatarUrl - User avatar image URL.
84
+ * @readonly
85
+ */
86
+ get owner(): IShortUserDescription;
87
+ get previewUrl(): string;
88
+ /**
89
+ * List of assembly related job IDs.
90
+ *
91
+ * @readonly
92
+ */
93
+ get relatedJobs(): string[];
94
+ /**
95
+ * Assembly geometry data and properties status. Can be `waiting`, `inprogress`, `done` or `failed`.
96
+ *
97
+ * An assemblies without geometry data cannot be opened in viewer.
98
+ *
99
+ * @readonly
100
+ */
101
+ get status(): string;
102
+ /**
103
+ * Assembly type. Returns an `assembly`.
104
+ *
105
+ * @readonly
106
+ */
107
+ get type(): string;
108
+ get version(): number;
109
+ get versions(): IAssemblyVersionInfo[];
110
+ /**
111
+ * Refresh assembly data.
112
+ *
113
+ * @async
114
+ */
115
+ checkout(): Promise<Assembly>;
116
+ /**
117
+ * Updates assembly data on the server.
118
+ *
119
+ * @async
120
+ * @param data - Raw assembly data.
121
+ */
122
+ update(data: any): Promise<Assembly>;
123
+ /**
124
+ * Delete the assembly from the server.
125
+ *
126
+ * @async
127
+ * @returns Returns the raw data of a deleted assembly.
128
+ */
129
+ delete(): Promise<any>;
130
+ /**
131
+ * Save assembly data changes to the server. Call this method to update assembly data on the
132
+ * server after any changes.
133
+ *
134
+ * @async
135
+ */
136
+ save(): Promise<Assembly>;
137
+ setPreview(image?: ArrayBuffer | Blob | globalThis.File | FormData | string | null): Promise<Awaited<this>>;
138
+ /**
139
+ * Returns list of assembly models.
140
+ *
141
+ * @async
142
+ */
143
+ getModels(): Promise<Model[]>;
144
+ /**
145
+ * Transformation matrix.
146
+ *
147
+ * @typedef {any} Transform
148
+ * @property {any} translate - Translation part, move along the X, Y, Z axes.
149
+ * @property {number} translate.x - The value for substruct for X axes.
150
+ * @property {number} translate.y - The value for substruct for Y axes.
151
+ * @property {number} translate.z - The value for substruct for Z axes.
152
+ * @property {any} rotation - Rotation part, rotate by the specified angle, around the
153
+ * specified vector.
154
+ * @property {number} rotation.x - X coordinate of the rotation vector.
155
+ * @property {number} rotation.y - Y coordinate of the rotation vector.
156
+ * @property {number} rotation.z - Z coordinate of the rotation vector.
157
+ * @property {number} rotation.angle - The angle of rotation.
158
+ * @property {number} scale - Scaling part, scale with multiplier, from center of extends.
159
+ */
160
+ /**
161
+ * Returns a model transformation.
162
+ *
163
+ * @param handle - Model handle.
164
+ */
165
+ getModelTransformMatrix(handle: string): any;
166
+ /**
167
+ * Set or delete a model transformation.
168
+ *
169
+ * @async
170
+ * @param handle - Model handle.
171
+ * @param transform - Transformation matrix. To delete transformation provide this to `undefined`.
172
+ */
173
+ setModelTransformMatrix(handle: string, transform: any): Promise<Assembly>;
174
+ /**
175
+ * Returns the properties for an objects in the assembly.
176
+ *
177
+ * @async
178
+ * @param handles - Object original handle or handles array. Leave this parameter undefined
179
+ * to get properties for all objects in the assembly.
180
+ * @returns {Promise<any>}
181
+ */
182
+ getProperties(handles?: string | string[]): Promise<any[]>;
183
+ /**
184
+ * Returns the list of original handles for an objects in the file that match the specified
185
+ * patterns. Search patterns may be combined using query operators.
186
+ *
187
+ * @async
188
+ * @example <caption>Simple search pattern.</caption>
189
+ * searchPattern = {
190
+ * key: "Category",
191
+ * value: "OST_Stairs",
192
+ * };
193
+ *
194
+ * @example <caption>Search patterns combination.</caption>
195
+ * searchPattern = {
196
+ * $or: [
197
+ * {
198
+ * $and: [
199
+ * { key: "Category", value: "OST_GenericModel" },
200
+ * { key: "Level", value: "03 - Floor" },
201
+ * ],
202
+ * },
203
+ * { key: "Category", value: "OST_Stairs" },
204
+ * ],
205
+ * };
206
+ *
207
+ * @param searchPattern - Search pattern or combination of the patterns, see example below.
208
+ */
209
+ searchProperties(searchPattern: any): Promise<any[]>;
210
+ /**
211
+ * Returns the cda.json for an assembly.
212
+ *
213
+ * @async
214
+ */
215
+ getCdaTree(): Promise<any[]>;
216
+ getViewpoints(): Promise<[]>;
217
+ saveViewpoint(viewpoint: any): Promise<any>;
218
+ deleteViewpoint(guid: any): Promise<any>;
219
+ getSnapshot(guid: any): Promise<any>;
220
+ getSnapshotData(guid: any, bitmapGuid: any): Promise<string>;
221
+ /**
222
+ * Download assembly resource data, such as geometry data.
223
+ *
224
+ * @async
225
+ * @param dataId - Resource ID.
226
+ * @param onProgress - Download progress callback.
227
+ * @param signal - An <a href="https://developer.mozilla.org/docs/Web/API/AbortSignal" target
228
+ * ="_blank">AbortSignal</a> object instance. Allows to communicate with a fetch request
229
+ * and abort it if desired.
230
+ */
231
+ downloadResource(dataId: string, onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
232
+ getReferences(signal?: AbortSignal): Promise<{
233
+ fileId: string;
234
+ references: any[];
235
+ }>;
236
+ /**
237
+ * Wait for assembly to be created. Assembly is created when it changes to `done` or `failed` status.
238
+ *
239
+ * @async
240
+ * @param params - An object containing waiting parameters.
241
+ * @param params.timeout - The time, in milliseconds that the function should wait assembly.
242
+ * If assembly is not created during this time, the `TimeoutError` exception will be thrown.
243
+ * @param params.interval - The time, in milliseconds, the function should delay in between
244
+ * checking assembly status.
245
+ * @param params.signal- An <a
246
+ * href="https://developer.mozilla.org/docs/Web/API/AbortController">AbortController</a>
247
+ * signal object instance, which can be used to abort waiting as desired.
248
+ * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
249
+ * @returns {Promise<Assembly>}
250
+ */
251
+ waitForDone(params?: {
252
+ timeout?: number;
253
+ interval?: number;
254
+ signal?: AbortSignal;
255
+ onCheckout?: (assembly: Assembly, ready: boolean) => boolean;
256
+ }): Promise<Assembly>;
257
+ /**
258
+ * Returns a list of assembly clash tests.
259
+ *
260
+ * @async
261
+ * @param {number} start - The starting index in the test list. Used for paging.
262
+ * @param {number} limit - The maximum number of tests that should be returned per request.
263
+ * Used for paging.
264
+ * @param {string} name - Filter the tests by part of the name.
265
+ * @param {string | string[]} ids - List of tests IDs to return. You can specify multiple IDs
266
+ * on one `string` by separating them with a "|".
267
+ * @param {bool} sortByDesc - Allows to specify the descending order of the result. By
268
+ * default tests are sorted by name in ascending order.
269
+ * @param {string} sortField - Allows to specify sort field.
270
+ */
271
+ getClashTests(start?: number, limit?: number, name?: string, ids?: string | string[], sortByDesc?: boolean, sortField?: string): Promise<{
272
+ allSize: number;
273
+ start: number;
274
+ limit: number;
275
+ result: ClashTest[];
276
+ size: number;
277
+ }>;
278
+ /**
279
+ * Returns the assembly clash test information.
280
+ *
281
+ * @async
282
+ * @param testId - Test ID.
283
+ */
284
+ getClashTest(testId: string): Promise<ClashTest>;
285
+ /**
286
+ * Create assembly clash test. Assembly must be in a `done` state, otherwise the test will fail.
287
+ *
288
+ * @async
289
+ * @param name - Test name.
290
+ * @param selectionTypeA - The type of first selection set for clash detection. Can be `all`,
291
+ * `handles`, `models` or `searchquery`.
292
+ * @param selectionTypeB - The type of second selection set for clash detection. Can be
293
+ * `all`, `handles`, `models` or `searchquery`.
294
+ * @param selectionSetA - First selection set for clash detection.
295
+ * @param selectionSetB - Second selection set for clash detection.
296
+ * @param params - An object containing test parameters.
297
+ * @param params.tolerance - The distance of separation between entities at which test begins
298
+ * detecting clashes.
299
+ * @param params.clearance - The type of the clashes that the test detects: `true` for
300
+ * `Сlearance clash` or `false` for `Hard clash`.
301
+ * @param params.waitForDone - Wait for test to complete.
302
+ * @param params.timeout - The time, in milliseconds that the function should wait test. If
303
+ * test is not complete during this time, the `TimeoutError` exception will be thrown.
304
+ * @param params.interval - The time, in milliseconds, the function should delay in between
305
+ * checking test status.
306
+ * @param params.signal- An <a
307
+ * href="https://developer.mozilla.org/docs/Web/API/AbortController">AbortController</a>
308
+ * signal object instance, which can be used to abort waiting as desired.
309
+ */
310
+ createClashTest(name: string, selectionTypeA: string, selectionTypeB: string, selectionSetA?: string | string[], selectionSetB?: string | string[], params?: {
311
+ tolerance?: number | string;
312
+ clearance?: boolean;
313
+ waitForDone?: boolean;
314
+ timeout?: number;
315
+ interval?: number;
316
+ signal?: AbortSignal;
317
+ }): Promise<ClashTest>;
318
+ /**
319
+ * Delete assembly clash test.
320
+ *
321
+ * @async
322
+ * @param testId - Test ID.
323
+ * @returns Returns the raw data of a deleted test.
324
+ */
325
+ deleteClashTest(testId: string): Promise<any>;
326
+ updateVersion(files?: string[], params?: {
327
+ waitForDone?: boolean;
328
+ timeout?: number;
329
+ interval?: number;
330
+ signal?: AbortSignal;
331
+ onProgress?: (progress: number, file: globalThis.File) => void;
332
+ }): Promise<Assembly>;
333
+ getVersions(): Promise<Assembly[] | undefined>;
334
+ getVersion(version: number): Promise<Assembly>;
335
+ deleteVersion(version: number): Promise<any>;
336
+ setActiveVersion(version: number): Promise<Assembly>;
337
+ useVersion(version?: number): this;
338
+ }
339
+ //# sourceMappingURL=Assembly.d.ts.map
@@ -0,0 +1,176 @@
1
+ import { IHttpClient } from "./IHttpClient";
2
+ import { IShortUserDescription } from "./IUser";
3
+ /**
4
+ * The base class provides information about the file/assembly clash detection test and test results.
5
+ */
6
+ export declare class ClashTest {
7
+ private _data;
8
+ private basePath;
9
+ private httpClient;
10
+ /**
11
+ * @param data - Raw test data.
12
+ * @param basePath - Clash tests API base path for the owner file/assembly.
13
+ * @param httpClient - Http client.
14
+ */
15
+ constructor(data: any, basePath: string, httpClient: IHttpClient);
16
+ protected internalGet(relativePath: string): Promise<any>;
17
+ protected internalPut(relativePath: string, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise<any>;
18
+ protected internalDelete(relativePath: string): Promise<any>;
19
+ /**
20
+ * The type of the clashes that the test detects:
21
+ *
22
+ * - `Сlearance clash` (true) - a clash in which the entity A may or may not intersect with
23
+ * entity B, but comes within a distance of less than the `tolerance`.
24
+ * - `Hard clash` (false) - a clash in which the entity A intersects with entity B by a
25
+ * distance of more than the `tolerance`.
26
+ *
27
+ * @readonly
28
+ */
29
+ get clearance(): boolean;
30
+ /**
31
+ * Test creation time (UTC) in the format specified in <a
32
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
33
+ *
34
+ * @readonly
35
+ */
36
+ get createdAt(): string;
37
+ /**
38
+ * Raw test data received from the server.
39
+ *
40
+ * @readonly
41
+ */
42
+ get data(): any;
43
+ private set data(value);
44
+ /**
45
+ * Unique test ID.
46
+ *
47
+ * @readonly
48
+ */
49
+ get id(): string;
50
+ /**
51
+ * Test last update (UTC) time in the format specified in <a
52
+ * href="https://www.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a>.
53
+ *
54
+ * @readonly
55
+ */
56
+ get lastModifiedAt(): string;
57
+ /**
58
+ * Test name.
59
+ */
60
+ get name(): string;
61
+ set name(value: string);
62
+ /**
63
+ * Test owner information.
64
+ *
65
+ * @property {string} userId - User ID.
66
+ * @property {string} userName - User name.
67
+ * @property {string} name - First name.
68
+ * @property {string} lastName - Last name.
69
+ * @property {string} fullName - Full name.
70
+ * @property {string} initials - Initials.
71
+ * @property {string} email - User email.
72
+ * @property {string} avatarUrl - User avatar image URL.
73
+ * @readonly
74
+ */
75
+ get owner(): IShortUserDescription;
76
+ /**
77
+ * First selection set for clash detection. Entities from `selectionSetA` will be tested
78
+ * against each others by entities from the `selectionSetB` during the test.
79
+ *
80
+ * @readonly
81
+ */
82
+ get selectionSetA(): string[];
83
+ /**
84
+ * The type of first selection set for clash detection. Can be one of:
85
+ *
86
+ * - `all` - All file/assembly entities.
87
+ * - `handle` - Entities with handles specified in the `selectionSetA`.
88
+ * - `models` - Entities of file/assembly models specified in `selectionSetA`.
89
+ * - `searchquery` - Entities retrieved by the search queries specified in `selectionSetA`.
90
+ *
91
+ * @readonly
92
+ */
93
+ get selectionTypeA(): string;
94
+ /**
95
+ * Second selection set for clash detection. Entities from `selectionSetB` will be tested
96
+ * against each others by entities from the `selectionSetA` during the test.
97
+ *
98
+ * @readonly
99
+ */
100
+ get selectionSetB(): string[];
101
+ /**
102
+ * The type of second selection set for clash detection. Can be one of:
103
+ *
104
+ * - `all` - All file/assembly entities.
105
+ * - `handle` - Entities with handles specified in the `selectionSetB`.
106
+ * - `models` - Entities of file/assembly models specified in `selectionSetB`.
107
+ * - `searchquery` - Entities retrieved by the search queries specified in `selectionSetB`.
108
+ *
109
+ * @readonly
110
+ */
111
+ get selectionTypeB(): string;
112
+ /**
113
+ * Test status. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.
114
+ *
115
+ * @readonly
116
+ */
117
+ get status(): string;
118
+ /**
119
+ * The distance of separation between entities at which test begins detecting clashes.
120
+ *
121
+ * @readonly
122
+ */
123
+ get tolerance(): number;
124
+ /**
125
+ * Refresh test data.
126
+ *
127
+ * @async
128
+ */
129
+ checkout(): Promise<this>;
130
+ /**
131
+ * Update test data on the server.
132
+ *
133
+ * @async
134
+ * @param data - Raw test data.
135
+ */
136
+ update(data: any): Promise<this>;
137
+ /**
138
+ * Remove a test from a file.
139
+ *
140
+ * @async
141
+ * @returns Returns the raw data of a deleted test.
142
+ */
143
+ delete(): Promise<any>;
144
+ /**
145
+ * Save test data changes to the server. Call this method to update test data on the server
146
+ * after any changes.
147
+ *
148
+ * @async
149
+ */
150
+ save(): Promise<this>;
151
+ /**
152
+ * Wait for test to complete. Test is done when it changes to `done` or `failed` status.
153
+ *
154
+ * @async
155
+ * @param params - An object containing waiting parameters.
156
+ * @param params.timeout - The time, in milliseconds that the function should wait test. If
157
+ * test is not complete during this time, the `TimeoutError` exception will be thrown.
158
+ * @param params.interval - The time, in milliseconds, the function should delay in between
159
+ * checking test status.
160
+ * @param params.signal- An <a
161
+ * href="https://developer.mozilla.org/docs/Web/API/AbortController">AbortController</a>
162
+ * signal object instance, which can be used to abort waiting as desired.
163
+ */
164
+ waitForDone(params?: {
165
+ timeout?: number;
166
+ interval?: number;
167
+ signal?: AbortSignal;
168
+ }): Promise<this>;
169
+ /**
170
+ * Returns a report with the clash detection results for this test.
171
+ *
172
+ * @async
173
+ */
174
+ getReport(): Promise<any>;
175
+ }
176
+ //# sourceMappingURL=ClashTest.d.ts.map