@inweb/client 25.7.0 → 25.7.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.
- package/dist/client.js +185 -348
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +6 -6
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Assembly.d.ts +19 -42
- package/lib/Api/ClashTest.d.ts +7 -16
- package/lib/Api/Client.d.ts +25 -58
- package/lib/Api/ClientEvents.d.ts +4 -2
- package/lib/Api/FetchError.d.ts +3 -5
- package/lib/Api/File.d.ts +67 -105
- package/lib/Api/Job.d.ts +11 -16
- package/lib/Api/Member.d.ts +1 -7
- package/lib/Api/Model.d.ts +19 -26
- package/lib/Api/Permission.d.ts +0 -6
- package/lib/Api/Project.d.ts +13 -34
- package/lib/Api/Role.d.ts +0 -6
- package/lib/Api/User.d.ts +3 -10
- package/package.json +3 -3
- package/src/Api/Assembly.ts +21 -44
- package/src/Api/ClashTest.ts +9 -18
- package/src/Api/Client.ts +27 -60
- package/src/Api/ClientEvents.ts +4 -2
- package/src/Api/Fetch.ts +2 -2
- package/src/Api/FetchError.ts +5 -7
- package/src/Api/File.ts +69 -107
- package/src/Api/HttpClient.ts +2 -2
- package/src/Api/IAssembly.ts +2 -2
- package/src/Api/IFile.ts +2 -2
- package/src/Api/IHttpClient.ts +2 -2
- package/src/Api/IUser.ts +2 -2
- package/src/Api/Job.ts +14 -19
- package/src/Api/Member.ts +3 -9
- package/src/Api/Model.ts +21 -28
- package/src/Api/Permission.ts +2 -8
- package/src/Api/Project.ts +15 -36
- package/src/Api/Role.ts +2 -8
- package/src/Api/User.ts +5 -12
- package/src/Api/Utils.ts +2 -2
- package/src/Api/XMLHttp.ts +2 -2
- package/src/index.ts +2 -2
package/lib/Api/Assembly.d.ts
CHANGED
|
@@ -29,8 +29,8 @@ export declare class Assembly {
|
|
|
29
29
|
*/
|
|
30
30
|
get associatedFiles(): IAssociatedFileData[];
|
|
31
31
|
/**
|
|
32
|
-
* Assembly creation time (UTC) in the format specified in
|
|
33
|
-
*
|
|
32
|
+
* Assembly creation time (UTC) in the format specified in
|
|
33
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
34
34
|
*
|
|
35
35
|
* @readonly
|
|
36
36
|
*/
|
|
@@ -107,37 +107,29 @@ export declare class Assembly {
|
|
|
107
107
|
get versions(): IAssemblyVersionInfo[];
|
|
108
108
|
/**
|
|
109
109
|
* Refresh assembly data.
|
|
110
|
-
*
|
|
111
|
-
* @async
|
|
112
110
|
*/
|
|
113
111
|
checkout(): Promise<this>;
|
|
114
112
|
/**
|
|
115
113
|
* Updates assembly data on the server.
|
|
116
114
|
*
|
|
117
|
-
* @async
|
|
118
115
|
* @param data - Raw assembly data.
|
|
119
116
|
*/
|
|
120
117
|
update(data: any): Promise<this>;
|
|
121
118
|
/**
|
|
122
119
|
* Delete the assembly from the server.
|
|
123
120
|
*
|
|
124
|
-
* @async
|
|
125
121
|
* @returns Returns the raw data of a deleted assembly.
|
|
126
122
|
*/
|
|
127
123
|
delete(): Promise<any>;
|
|
128
124
|
/**
|
|
129
125
|
* Save assembly data changes to the server. Call this method to update assembly data on the
|
|
130
126
|
* server after any changes.
|
|
131
|
-
*
|
|
132
|
-
* @async
|
|
133
127
|
*/
|
|
134
128
|
save(): Promise<this>;
|
|
135
129
|
setPreview(image?: BodyInit | null): Promise<this>;
|
|
136
130
|
deletePreview(): Promise<this>;
|
|
137
131
|
/**
|
|
138
132
|
* Returns list of assembly models.
|
|
139
|
-
*
|
|
140
|
-
* @async
|
|
141
133
|
*/
|
|
142
134
|
getModels(): Promise<Model[]>;
|
|
143
135
|
/**
|
|
@@ -165,7 +157,6 @@ export declare class Assembly {
|
|
|
165
157
|
/**
|
|
166
158
|
* Set or delete a model transformation.
|
|
167
159
|
*
|
|
168
|
-
* @async
|
|
169
160
|
* @param handle - Model handle.
|
|
170
161
|
* @param transform - Transformation matrix. To delete transformation provide this to `undefined`.
|
|
171
162
|
*/
|
|
@@ -173,7 +164,6 @@ export declare class Assembly {
|
|
|
173
164
|
/**
|
|
174
165
|
* Returns the properties for an objects in the assembly.
|
|
175
166
|
*
|
|
176
|
-
* @async
|
|
177
167
|
* @param handles - Object original handle or handles array. Leave this parameter undefined
|
|
178
168
|
* to get properties for all objects in the assembly.
|
|
179
169
|
* @returns {Promise<any>}
|
|
@@ -183,7 +173,6 @@ export declare class Assembly {
|
|
|
183
173
|
* Returns the list of original handles for an objects in the file that match the specified
|
|
184
174
|
* patterns. Search patterns may be combined using query operators.
|
|
185
175
|
*
|
|
186
|
-
* @async
|
|
187
176
|
* @example <caption>Simple search pattern.</caption>
|
|
188
177
|
* searchPattern = {
|
|
189
178
|
* key: "Category",
|
|
@@ -208,27 +197,21 @@ export declare class Assembly {
|
|
|
208
197
|
searchProperties(searchPattern: any): Promise<any[]>;
|
|
209
198
|
/**
|
|
210
199
|
* Returns the cda.json for an assembly.
|
|
211
|
-
*
|
|
212
|
-
* @async
|
|
213
200
|
*/
|
|
214
201
|
getCdaTree(): Promise<any[]>;
|
|
215
202
|
/**
|
|
216
203
|
* Returns a list of assembly viewpoints.
|
|
217
|
-
*
|
|
218
|
-
* @async
|
|
219
204
|
*/
|
|
220
205
|
getViewpoints(): Promise<any[]>;
|
|
221
206
|
/**
|
|
222
|
-
* Add new assembly viewpoint. To create a
|
|
207
|
+
* Add new assembly viewpoint. To create a viewpoint use `Viewer.createViewpoint()`.
|
|
223
208
|
*
|
|
224
|
-
* @async
|
|
225
209
|
* @param viewpoint - Viewpoint.
|
|
226
210
|
*/
|
|
227
211
|
saveViewpoint(viewpoint: any): Promise<any>;
|
|
228
212
|
/**
|
|
229
213
|
* Delete assembly viewpoint.
|
|
230
214
|
*
|
|
231
|
-
* @async
|
|
232
215
|
* @param guid - Viewpoint GUID.
|
|
233
216
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
234
217
|
*/
|
|
@@ -237,14 +220,12 @@ export declare class Assembly {
|
|
|
237
220
|
* Returns viewpoint preview image as
|
|
238
221
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
|
|
239
222
|
*
|
|
240
|
-
* @async
|
|
241
223
|
* @param guid - Viewpoint GUID.
|
|
242
224
|
*/
|
|
243
225
|
getSnapshot(guid: any): Promise<any>;
|
|
244
226
|
/**
|
|
245
227
|
* Returns viewpoint preview data.
|
|
246
228
|
*
|
|
247
|
-
* @async
|
|
248
229
|
* @param guid - Viewpoint GUID.
|
|
249
230
|
* @param bitmapGuid - Bitmap GUID.
|
|
250
231
|
*/
|
|
@@ -253,12 +234,11 @@ export declare class Assembly {
|
|
|
253
234
|
* Download assembly resource file. Resource files are files that contain model scene
|
|
254
235
|
* descriptions, or geometry data.
|
|
255
236
|
*
|
|
256
|
-
* @async
|
|
257
237
|
* @param dataId - Resource file name.
|
|
258
238
|
* @param onProgress - Download progress callback.
|
|
259
|
-
* @param signal - An
|
|
260
|
-
*
|
|
261
|
-
* and abort it if desired.
|
|
239
|
+
* @param signal - An
|
|
240
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
241
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
262
242
|
*/
|
|
263
243
|
downloadResource(dataId: string, onProgress?: (progress: number, chunk: Uint8Array) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
264
244
|
/**
|
|
@@ -269,9 +249,9 @@ export declare class Assembly {
|
|
|
269
249
|
* @param ranges - A range of resource file contents to download.
|
|
270
250
|
* @param requestId - Request ID for download progress callback.
|
|
271
251
|
* @param onProgress - Download progress callback.
|
|
272
|
-
* @param signal - An
|
|
273
|
-
*
|
|
274
|
-
* and abort it if desired.
|
|
252
|
+
* @param signal - An
|
|
253
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
254
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
275
255
|
*/
|
|
276
256
|
downloadResourceRange(dataId: string, requestId: number, ranges: Array<{
|
|
277
257
|
begin: number;
|
|
@@ -279,26 +259,27 @@ export declare class Assembly {
|
|
|
279
259
|
requestId: number;
|
|
280
260
|
}>, onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
281
261
|
/**
|
|
282
|
-
* Deprecated since `25.3`. Use {@link
|
|
262
|
+
* Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.
|
|
263
|
+
*
|
|
264
|
+
* @deprecated
|
|
283
265
|
*/
|
|
284
266
|
partialDownloadResource(dataId: string, onProgress?: (progress: number, chunk: Uint8Array) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
285
267
|
/**
|
|
286
|
-
* Deprecated since `25.3`. Use {@link
|
|
268
|
+
* Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.
|
|
287
269
|
*/
|
|
288
270
|
downloadFileRange(requestId: number, records: any | null, dataId: string, onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<void>;
|
|
289
271
|
getReferences(signal?: AbortSignal): Promise<any>;
|
|
290
272
|
/**
|
|
291
273
|
* Wait for assembly to be created. Assembly is created when it changes to `done` or `failed` status.
|
|
292
274
|
*
|
|
293
|
-
* @async
|
|
294
275
|
* @param params - An object containing waiting parameters.
|
|
295
276
|
* @param params.timeout - The time, in milliseconds that the function should wait assembly.
|
|
296
277
|
* If assembly is not created during this time, the `TimeoutError` exception will be thrown.
|
|
297
278
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
298
279
|
* checking assembly status.
|
|
299
|
-
* @param params.signal- An
|
|
300
|
-
*
|
|
301
|
-
* signal
|
|
280
|
+
* @param params.signal - An
|
|
281
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
282
|
+
* signal, which can be used to abort waiting as desired.
|
|
302
283
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
303
284
|
*/
|
|
304
285
|
waitForDone(params?: {
|
|
@@ -310,7 +291,6 @@ export declare class Assembly {
|
|
|
310
291
|
/**
|
|
311
292
|
* Returns a list of assembly clash tests.
|
|
312
293
|
*
|
|
313
|
-
* @async
|
|
314
294
|
* @param {number} start - The starting index in the test list. Used for paging.
|
|
315
295
|
* @param {number} limit - The maximum number of tests that should be returned per request.
|
|
316
296
|
* Used for paging.
|
|
@@ -331,14 +311,12 @@ export declare class Assembly {
|
|
|
331
311
|
/**
|
|
332
312
|
* Returns the assembly clash test information.
|
|
333
313
|
*
|
|
334
|
-
* @async
|
|
335
314
|
* @param testId - Test ID.
|
|
336
315
|
*/
|
|
337
316
|
getClashTest(testId: string): Promise<ClashTest>;
|
|
338
317
|
/**
|
|
339
318
|
* Create assembly clash test. Assembly must be in a `done` state, otherwise the test will fail.
|
|
340
319
|
*
|
|
341
|
-
* @async
|
|
342
320
|
* @param name - Test name.
|
|
343
321
|
* @param selectionTypeA - The type of first selection set for clash detection. Can be `all`,
|
|
344
322
|
* `handles`, `models` or `searchquery`.
|
|
@@ -356,9 +334,9 @@ export declare class Assembly {
|
|
|
356
334
|
* test is not complete during this time, the `TimeoutError` exception will be thrown.
|
|
357
335
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
358
336
|
* checking test status.
|
|
359
|
-
* @param params.signal- An
|
|
360
|
-
*
|
|
361
|
-
* signal
|
|
337
|
+
* @param params.signal - An
|
|
338
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
339
|
+
* signal, which can be used to abort waiting as desired.
|
|
362
340
|
*/
|
|
363
341
|
createClashTest(name: string, selectionTypeA: string, selectionTypeB: string, selectionSetA?: string | string[], selectionSetB?: string | string[], params?: {
|
|
364
342
|
tolerance?: number | string;
|
|
@@ -371,7 +349,6 @@ export declare class Assembly {
|
|
|
371
349
|
/**
|
|
372
350
|
* Delete assembly clash test.
|
|
373
351
|
*
|
|
374
|
-
* @async
|
|
375
352
|
* @param testId - Test ID.
|
|
376
353
|
* @returns Returns the raw data of a deleted test.
|
|
377
354
|
*/
|
package/lib/Api/ClashTest.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ export declare class ClashTest {
|
|
|
28
28
|
*/
|
|
29
29
|
get clearance(): boolean;
|
|
30
30
|
/**
|
|
31
|
-
* Test creation time (UTC) in the format specified in
|
|
32
|
-
*
|
|
31
|
+
* Test creation time (UTC) in the format specified in
|
|
32
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
33
33
|
*
|
|
34
34
|
* @readonly
|
|
35
35
|
*/
|
|
@@ -48,8 +48,8 @@ export declare class ClashTest {
|
|
|
48
48
|
*/
|
|
49
49
|
get id(): string;
|
|
50
50
|
/**
|
|
51
|
-
* Test last update (UTC) time in the format specified in
|
|
52
|
-
*
|
|
51
|
+
* Test last update (UTC) time in the format specified in
|
|
52
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
53
53
|
*
|
|
54
54
|
* @readonly
|
|
55
55
|
*/
|
|
@@ -123,43 +123,36 @@ export declare class ClashTest {
|
|
|
123
123
|
get tolerance(): number;
|
|
124
124
|
/**
|
|
125
125
|
* Refresh test data.
|
|
126
|
-
*
|
|
127
|
-
* @async
|
|
128
126
|
*/
|
|
129
127
|
checkout(): Promise<this>;
|
|
130
128
|
/**
|
|
131
129
|
* Update test data on the server.
|
|
132
130
|
*
|
|
133
|
-
* @async
|
|
134
131
|
* @param data - Raw test data.
|
|
135
132
|
*/
|
|
136
133
|
update(data: any): Promise<this>;
|
|
137
134
|
/**
|
|
138
135
|
* Remove a test from a file.
|
|
139
136
|
*
|
|
140
|
-
* @async
|
|
141
137
|
* @returns Returns the raw data of a deleted test.
|
|
142
138
|
*/
|
|
143
139
|
delete(): Promise<any>;
|
|
144
140
|
/**
|
|
145
141
|
* Save test data changes to the server. Call this method to update test data on the server
|
|
146
142
|
* after any changes.
|
|
147
|
-
*
|
|
148
|
-
* @async
|
|
149
143
|
*/
|
|
150
144
|
save(): Promise<this>;
|
|
151
145
|
/**
|
|
152
146
|
* Wait for test to complete. Test is done when it changes to `done` or `failed` status.
|
|
153
147
|
*
|
|
154
|
-
* @async
|
|
155
148
|
* @param params - An object containing waiting parameters.
|
|
156
149
|
* @param params.timeout - The time, in milliseconds that the function should wait test. If
|
|
157
150
|
* test is not complete during this time, the `TimeoutError` exception will be thrown.
|
|
158
151
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
159
152
|
* checking test status.
|
|
160
|
-
* @param params.signal- An
|
|
161
|
-
*
|
|
162
|
-
* signal
|
|
153
|
+
* @param params.signal - An
|
|
154
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
155
|
+
* signal, which can be used to abort waiting as desired.
|
|
163
156
|
*/
|
|
164
157
|
waitForDone(params?: {
|
|
165
158
|
timeout?: number;
|
|
@@ -168,8 +161,6 @@ export declare class ClashTest {
|
|
|
168
161
|
}): Promise<this>;
|
|
169
162
|
/**
|
|
170
163
|
* Returns a report with the clash detection results for this test.
|
|
171
|
-
*
|
|
172
|
-
* @async
|
|
173
164
|
*/
|
|
174
165
|
getReport(): Promise<any>;
|
|
175
166
|
}
|
package/lib/Api/Client.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ import { Job } from "./Job";
|
|
|
7
7
|
import { Project } from "./Project";
|
|
8
8
|
import { User } from "./User";
|
|
9
9
|
/**
|
|
10
|
-
* The `Client.js` library class that provides methods to access the
|
|
11
|
-
*
|
|
12
|
-
* Projects, Files, Issues etc.
|
|
10
|
+
* The `Client.js` library class that provides methods to access the
|
|
11
|
+
* {@link https://cloud.opendesign.com/docs/index.html#/opencloud_server | Open Cloud Server}
|
|
12
|
+
* resources like Projects, Files, Issues etc.
|
|
13
13
|
*/
|
|
14
14
|
export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
15
15
|
private _serverUrl;
|
|
@@ -25,13 +25,15 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
25
25
|
url?: string;
|
|
26
26
|
});
|
|
27
27
|
/**
|
|
28
|
-
* Open Cloud Server URL. Use {@link
|
|
28
|
+
* Open Cloud Server URL. Use {@link configure | configure()} to change server URL.
|
|
29
29
|
*
|
|
30
30
|
* @readonly
|
|
31
31
|
*/
|
|
32
32
|
get serverUrl(): string;
|
|
33
33
|
/**
|
|
34
34
|
* Deprecated since `25.3`. Use `Viewer.options()` instead to change Viewer parameters.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated
|
|
35
37
|
*/
|
|
36
38
|
get options(): any;
|
|
37
39
|
/**
|
|
@@ -53,17 +55,14 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
53
55
|
*/
|
|
54
56
|
/**
|
|
55
57
|
* Returns server version.
|
|
56
|
-
*
|
|
57
|
-
* @async
|
|
58
58
|
*/
|
|
59
59
|
version(): Promise<any>;
|
|
60
60
|
/**
|
|
61
61
|
* Register a new user with the specified email and password.
|
|
62
62
|
*
|
|
63
|
-
* @async
|
|
64
63
|
* @param email - User email. Cannot be empty.
|
|
65
64
|
* @param password - User password. Cannot be empty. Password can only contain letters (a-z,
|
|
66
|
-
* A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]
|
|
65
|
+
* A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
|
|
67
66
|
* @param userName - User name. Cannot be empty or blank if defined. Leave undefined to use
|
|
68
67
|
* `username` from email.
|
|
69
68
|
*/
|
|
@@ -72,7 +71,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
72
71
|
* Resend the Confirmation Email to new user. If the user's email is already confirmed, an
|
|
73
72
|
* exception will be thrown.
|
|
74
73
|
*
|
|
75
|
-
* @async
|
|
76
74
|
* @param email - User email.
|
|
77
75
|
* @param password - User password.
|
|
78
76
|
*/
|
|
@@ -80,14 +78,12 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
80
78
|
/**
|
|
81
79
|
* Confirm the user's email. If the user's email is already confirmed, an exception will be thrown.
|
|
82
80
|
*
|
|
83
|
-
* @async
|
|
84
81
|
* @param emailConfirmationId - Confirmation code from the Confirmation Email.
|
|
85
82
|
*/
|
|
86
83
|
confirmUserEmail(emailConfirmationId: string): Promise<any>;
|
|
87
84
|
/**
|
|
88
85
|
* Log in an existing user using email or user name.
|
|
89
86
|
*
|
|
90
|
-
* @async
|
|
91
87
|
* @param email - An email or user name for authentication request.
|
|
92
88
|
* @param password - Password for authentication request.
|
|
93
89
|
*/
|
|
@@ -95,7 +91,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
95
91
|
/**
|
|
96
92
|
* Log in an existing user using access token (API Key).
|
|
97
93
|
*
|
|
98
|
-
* @async
|
|
99
94
|
* @param token - An access token for authentication request. See {@link User.token} for more details.
|
|
100
95
|
*/
|
|
101
96
|
signInWithToken(token: string): Promise<User>;
|
|
@@ -114,14 +109,10 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
114
109
|
* - Open the `provider.url` link using `window.open()`.
|
|
115
110
|
* - Add a `/oauth` path (server-defined) handler to the router. In this handler, show an error
|
|
116
111
|
* message if the `error` search parameter is present, or log in with the `token` search parameter.
|
|
117
|
-
*
|
|
118
|
-
* @async
|
|
119
112
|
*/
|
|
120
113
|
getIdentityProviders(): Promise<any>;
|
|
121
114
|
/**
|
|
122
115
|
* Returns the current server settings.
|
|
123
|
-
*
|
|
124
|
-
* @async
|
|
125
116
|
*/
|
|
126
117
|
getServerSettings(): Promise<any>;
|
|
127
118
|
/**
|
|
@@ -129,8 +120,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
129
120
|
*
|
|
130
121
|
* Only administrators can change server settings. If the current logged in user is not an
|
|
131
122
|
* administrator, an exception will be thrown.
|
|
132
|
-
*
|
|
133
|
-
* @async
|
|
134
123
|
*/
|
|
135
124
|
updateServerSettings(settings: any): Promise<any>;
|
|
136
125
|
/**
|
|
@@ -138,8 +127,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
138
127
|
*
|
|
139
128
|
* Only administrators can get a list of users. If the current logged in user is not an
|
|
140
129
|
* administrator, an exception will be thrown.
|
|
141
|
-
*
|
|
142
|
-
* @async
|
|
143
130
|
*/
|
|
144
131
|
getUsers(): Promise<User[]>;
|
|
145
132
|
/**
|
|
@@ -148,7 +135,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
148
135
|
* Only administrators can get other users. If the current logged in user is not an
|
|
149
136
|
* administrator, they can only get themselves, otherwise an exception will be thrown.
|
|
150
137
|
*
|
|
151
|
-
* @async
|
|
152
138
|
* @param userId - User ID.
|
|
153
139
|
*/
|
|
154
140
|
getUser(userId: string): Promise<User>;
|
|
@@ -158,10 +144,9 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
158
144
|
* Only administrators can create users. If the current logged in user is not an
|
|
159
145
|
* administrator, an exception will be thrown.
|
|
160
146
|
*
|
|
161
|
-
* @async
|
|
162
147
|
* @param email - User email. Cannot be empty.
|
|
163
148
|
* @param password - User password. Cannot be empty. Password can only contain latin letters
|
|
164
|
-
* (a-z, A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]
|
|
149
|
+
* (a-z, A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
|
|
165
150
|
* @param params - Additional user data.
|
|
166
151
|
* @param params.isAdmin - `true` if user is an administrator.
|
|
167
152
|
* @param params.userName - User name. Cannot be empty or blank if defined. Leave undefined
|
|
@@ -192,7 +177,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
192
177
|
*
|
|
193
178
|
* You need to re-login to continue working after deleting the current logged in user.
|
|
194
179
|
*
|
|
195
|
-
* @async
|
|
196
180
|
* @param userId - User ID.
|
|
197
181
|
* @returns Returns the raw data of a deleted user.
|
|
198
182
|
*/
|
|
@@ -210,16 +194,15 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
210
194
|
/**
|
|
211
195
|
* Returns a list of files the user has access to.
|
|
212
196
|
*
|
|
213
|
-
* @async
|
|
214
197
|
* @param start - The starting index in the file list. Used for paging.
|
|
215
198
|
* @param limit - The maximum number of files that should be returned per request. Used for paging.
|
|
216
199
|
* @param name - Filter the files by part of the name.
|
|
217
200
|
* @param ext - Filter the files by extension. Extension can be `dgn`, `dwf`, `dwg`, `dxf`,
|
|
218
201
|
* `ifc`, `ifczip`, `nwc`, `nwd`, `obj`, `rcs`, `rfa`, `rvt`, `step`, `stl`, `stp`, `vsf`,
|
|
219
202
|
* or any other drawing or reference file type extension. You can specify multiple
|
|
220
|
-
* extensions on one
|
|
203
|
+
* extensions on one string by separating them with a `|`.
|
|
221
204
|
* @param ids - List of file IDs to return. You can specify multiple IDs on one `string` by
|
|
222
|
-
* separating them with a
|
|
205
|
+
* separating them with a `|`.
|
|
223
206
|
* @param sortByDesc - Allows to specify the descending order of the result. By default,
|
|
224
207
|
* files are sorted by name in ascending order.
|
|
225
208
|
* @param {string} sortField - Allows to specify sort field.
|
|
@@ -234,7 +217,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
234
217
|
/**
|
|
235
218
|
* Returns the file information.
|
|
236
219
|
*
|
|
237
|
-
* @async
|
|
238
220
|
* @param fileId - File ID.
|
|
239
221
|
*/
|
|
240
222
|
getFile(fileId: string): Promise<File>;
|
|
@@ -245,27 +227,26 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
245
227
|
*
|
|
246
228
|
* - {@link UploadProgressEvent | uploadprogress}
|
|
247
229
|
*
|
|
248
|
-
* @
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
* object returned as a result of a user selecting files using the HTML `<input>` element.
|
|
230
|
+
* @param file - Web API {@link https://developer.mozilla.org/docs/Web/API/File | File} object
|
|
231
|
+
* are generally retrieved from a
|
|
232
|
+
* {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList} object returned as
|
|
233
|
+
* a result of a user selecting files using the HTML `<input>` element.
|
|
253
234
|
* @param params - An object containing upload parameters.
|
|
254
|
-
* @param params.geometry
|
|
235
|
+
* @param params.geometry - Create job to extract file geometry data. Can be:
|
|
255
236
|
*
|
|
256
237
|
* - `true` - Extract file geometry data into `VSFX` to open the file in `VisualizeJS` viewer.
|
|
257
238
|
* - `vsfx` - Extract file geometry data into `VSFX` to open the file in `VisualizeJS` viewer.
|
|
258
239
|
* - `gltf` - Extract file geometry data into `glTF` to open the file in `Three.js` viewer.
|
|
259
240
|
*
|
|
260
|
-
* @param params.properties
|
|
261
|
-
* @param params.waitForDone
|
|
241
|
+
* @param params.properties - Create job to extract file properties.
|
|
242
|
+
* @param params.waitForDone - Wait for geometry and properties jobs to complete.
|
|
262
243
|
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
263
244
|
* no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
264
245
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
265
246
|
* checking jobs status.
|
|
266
|
-
* @param params.signal - An
|
|
267
|
-
*
|
|
268
|
-
* signal
|
|
247
|
+
* @param params.signal - An
|
|
248
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} *
|
|
249
|
+
* signal, which can be used to abort waiting as desired.
|
|
269
250
|
* @param params.onProgress - Upload progress callback.
|
|
270
251
|
*/
|
|
271
252
|
uploadFile(file: globalThis.File, params?: {
|
|
@@ -280,7 +261,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
280
261
|
/**
|
|
281
262
|
* Delete the drawing or reference file from the server.
|
|
282
263
|
*
|
|
283
|
-
* @async
|
|
284
264
|
* @param fileId - File ID.
|
|
285
265
|
* @returns Returns the raw data of a deleted file.
|
|
286
266
|
*/
|
|
@@ -288,12 +268,11 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
288
268
|
/**
|
|
289
269
|
* Download the drawing or reference file.
|
|
290
270
|
*
|
|
291
|
-
* @async
|
|
292
271
|
* @param fileId - File ID.
|
|
293
272
|
* @param onProgress - Download progress callback.
|
|
294
|
-
* @param signal - An
|
|
295
|
-
*
|
|
296
|
-
* and abort it if desired.
|
|
273
|
+
* @param signal - An
|
|
274
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
275
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
297
276
|
*/
|
|
298
277
|
downloadFile(fileId: string, onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
299
278
|
/**
|
|
@@ -309,7 +288,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
309
288
|
/**
|
|
310
289
|
* Returns a list of jobs created by current user.
|
|
311
290
|
*
|
|
312
|
-
* @async
|
|
313
291
|
* @param status - Filter the jobs by status. Status can be `waiting`, `inpogress`, `done` or
|
|
314
292
|
* `failed`. You can specify multiple statuses on one `string` by separating them with a "|".
|
|
315
293
|
* @param limit - The maximum number of jobs that should be returned per request. Used for paging.
|
|
@@ -328,14 +306,12 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
328
306
|
/**
|
|
329
307
|
* Returns the job information.
|
|
330
308
|
*
|
|
331
|
-
* @async
|
|
332
309
|
* @param jobId - Job ID.
|
|
333
310
|
*/
|
|
334
311
|
getJob(jobId: string): Promise<Job>;
|
|
335
312
|
/**
|
|
336
313
|
* Create a new job.
|
|
337
314
|
*
|
|
338
|
-
* @async
|
|
339
315
|
* @param fileId - File ID.
|
|
340
316
|
* @param outputFormat - The job type. Can be one of:
|
|
341
317
|
*
|
|
@@ -348,14 +324,13 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
348
324
|
* before creating a job.
|
|
349
325
|
*
|
|
350
326
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
351
|
-
* for the File Converter tool in form
|
|
327
|
+
* for the File Converter tool in form `--arg=value`.
|
|
352
328
|
*/
|
|
353
329
|
createJob(fileId: string, outputFormat: string, parameters?: string | object): Promise<Job>;
|
|
354
330
|
/**
|
|
355
331
|
* Remove a job from the server job list. The method does not delete or stop jobs that are
|
|
356
332
|
* already being executed.
|
|
357
333
|
*
|
|
358
|
-
* @async
|
|
359
334
|
* @param jobId - Job ID.
|
|
360
335
|
* @returns Returns the raw data of a deleted job.
|
|
361
336
|
*/
|
|
@@ -373,7 +348,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
373
348
|
/**
|
|
374
349
|
* Returns a list of assemblies the user has access to.
|
|
375
350
|
*
|
|
376
|
-
* @async
|
|
377
351
|
* @param start - The starting index in the assembly list. Used for paging.
|
|
378
352
|
* @param limit - The maximum number of assemblies that should be returned per request. Used
|
|
379
353
|
* for paging.
|
|
@@ -394,18 +368,16 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
394
368
|
/**
|
|
395
369
|
* Get assembly information.
|
|
396
370
|
*
|
|
397
|
-
* @async
|
|
398
371
|
* @param assemblyId - Assembly ID.
|
|
399
372
|
*/
|
|
400
373
|
getAssembly(assemblyId: string): Promise<Assembly>;
|
|
401
374
|
/**
|
|
402
375
|
* Create a new assembly.
|
|
403
376
|
*
|
|
404
|
-
* @async
|
|
405
377
|
* @param files - List of file IDs.
|
|
406
378
|
* @param name - Assembly name.
|
|
407
379
|
* @param params - An object containing upload parameters.
|
|
408
|
-
* @param params.waitForDone
|
|
380
|
+
* @param params.waitForDone - Wait for assembly to be created.
|
|
409
381
|
*/
|
|
410
382
|
createAssembly(files: string[], name: string, params?: {
|
|
411
383
|
waitForDone?: boolean;
|
|
@@ -416,7 +388,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
416
388
|
/**
|
|
417
389
|
* Delete the assembly from the server.
|
|
418
390
|
*
|
|
419
|
-
* @async
|
|
420
391
|
* @param assemblyId - Assembly ID.
|
|
421
392
|
* @returns Returns the raw data of a deleted assembly.
|
|
422
393
|
*/
|
|
@@ -434,7 +405,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
434
405
|
/**
|
|
435
406
|
* Returns a list of projects the user has access to.
|
|
436
407
|
*
|
|
437
|
-
* @async
|
|
438
408
|
* @param start - The starting index in the project list. Used for paging.
|
|
439
409
|
* @param limit - The maximum number of projects that should be returned per request. Used for paging.
|
|
440
410
|
* @param name - Filter the projects by part of the name.
|
|
@@ -453,14 +423,12 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
453
423
|
/**
|
|
454
424
|
* Returns the project information.
|
|
455
425
|
*
|
|
456
|
-
* @async
|
|
457
426
|
* @param projectId - Project ID.
|
|
458
427
|
*/
|
|
459
428
|
getProject(projectId: string): Promise<Project>;
|
|
460
429
|
/**
|
|
461
430
|
* Create a new project.
|
|
462
431
|
*
|
|
463
|
-
* @async
|
|
464
432
|
* @param name - Project name.
|
|
465
433
|
* @param description - Project description.
|
|
466
434
|
* @param startDate - Project start date.
|
|
@@ -470,7 +438,6 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
470
438
|
/**
|
|
471
439
|
* Delete the project from the server.
|
|
472
440
|
*
|
|
473
|
-
* @async
|
|
474
441
|
* @param projectId - Project ID.
|
|
475
442
|
* @returns Returns the raw data of a deleted project.
|
|
476
443
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* An event measuring progress of an file uploading process.
|
|
3
3
|
*
|
|
4
4
|
* @event
|
|
5
5
|
*/
|
|
@@ -19,10 +19,12 @@ export interface UploadProgressEvent {
|
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Client events.
|
|
22
|
+
*
|
|
23
|
+
* @event
|
|
22
24
|
*/
|
|
23
25
|
export interface ClientEventMap {
|
|
24
26
|
/**
|
|
25
|
-
*
|
|
27
|
+
* An event measuring progress of an file uploading process.
|
|
26
28
|
*/
|
|
27
29
|
uploadprogress: UploadProgressEvent;
|
|
28
30
|
}
|
package/lib/Api/FetchError.d.ts
CHANGED
|
@@ -9,11 +9,9 @@ export declare class FetchError extends Error {
|
|
|
9
9
|
protected status: number;
|
|
10
10
|
protected statusText: string;
|
|
11
11
|
/**
|
|
12
|
-
* @property status - The
|
|
13
|
-
*
|
|
14
|
-
* @property message - Error message.
|
|
15
|
-
* href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error"
|
|
16
|
-
* target ="_blank">Error</a>.
|
|
12
|
+
* @property status - The
|
|
13
|
+
* {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code} of the response.
|
|
14
|
+
* @property message - Error message.
|
|
17
15
|
*/
|
|
18
16
|
constructor(status: number, message?: string);
|
|
19
17
|
}
|