@inweb/client 26.1.0 → 26.1.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 (44) hide show
  1. package/dist/client.js +449 -434
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.min.js +1 -1
  4. package/dist/client.module.js +35 -35
  5. package/dist/client.module.js.map +1 -1
  6. package/lib/Api/Assembly.d.ts +69 -65
  7. package/lib/Api/ClashTest.d.ts +16 -16
  8. package/lib/Api/Client.d.ts +77 -78
  9. package/lib/Api/Endpoint.d.ts +6 -6
  10. package/lib/Api/FetchError.d.ts +5 -5
  11. package/lib/Api/File.d.ts +132 -120
  12. package/lib/Api/IHttpClient.d.ts +3 -4
  13. package/lib/Api/IRole.d.ts +6 -6
  14. package/lib/Api/ISharedLink.d.ts +1 -1
  15. package/lib/Api/IUser.d.ts +4 -4
  16. package/lib/Api/Job.d.ts +12 -12
  17. package/lib/Api/Member.d.ts +6 -6
  18. package/lib/Api/Model.d.ts +18 -18
  19. package/lib/Api/OAuthClient.d.ts +10 -10
  20. package/lib/Api/Permission.d.ts +20 -17
  21. package/lib/Api/Project.d.ts +13 -14
  22. package/lib/Api/Role.d.ts +2 -2
  23. package/lib/Api/SharedLink.d.ts +2 -2
  24. package/lib/Api/User.d.ts +31 -33
  25. package/package.json +2 -2
  26. package/src/Api/Assembly.ts +70 -66
  27. package/src/Api/ClashTest.ts +16 -16
  28. package/src/Api/Client.ts +77 -78
  29. package/src/Api/Endpoint.ts +6 -6
  30. package/src/Api/FetchError.ts +5 -5
  31. package/src/Api/File.ts +133 -121
  32. package/src/Api/IHttpClient.ts +3 -4
  33. package/src/Api/IRole.ts +6 -6
  34. package/src/Api/ISharedLink.ts +1 -1
  35. package/src/Api/IUser.ts +4 -4
  36. package/src/Api/Job.ts +12 -12
  37. package/src/Api/Member.ts +6 -6
  38. package/src/Api/Model.ts +18 -18
  39. package/src/Api/OAuthClient.ts +10 -10
  40. package/src/Api/Permission.ts +20 -17
  41. package/src/Api/Project.ts +13 -14
  42. package/src/Api/Role.ts +2 -2
  43. package/src/Api/SharedLink.ts +2 -2
  44. package/src/Api/User.ts +31 -33
@@ -34,8 +34,8 @@ import { SharedLink } from "./SharedLink";
34
34
  import { waitFor, userFullName, userInitials } from "./Utils";
35
35
 
36
36
  /**
37
- * Provides properties and methods for obtaining information about an assembly on the Open
38
- * Cloud Server and managing its data.
37
+ * Provides properties and methods for obtaining information about an assembly on the Open Cloud Server
38
+ * and managing its data.
39
39
  */
40
40
  export class Assembly extends Endpoint {
41
41
  private _data: any;
@@ -225,8 +225,8 @@ export class Assembly extends Endpoint {
225
225
  }
226
226
 
227
227
  /**
228
- * Saves assembly properties changes to the server. Call this method to update assembly data
229
- * on the server after any property changes.
228
+ * Saves assembly properties changes to the server. Call this method to update assembly data on the
229
+ * server after any property changes.
230
230
  */
231
231
  save(): Promise<this> {
232
232
  return this.update(this.data);
@@ -285,8 +285,8 @@ export class Assembly extends Endpoint {
285
285
  /**
286
286
  * Returns the properties for an objects in the assembly.
287
287
  *
288
- * @param handles - Object original handle or handles array. Specify `undefined` to get
289
- * properties for all objects in the assembly.
288
+ * @param handles - Object original handle or handles array. Specify `undefined` to get properties for
289
+ * all objects in the assembly.
290
290
  */
291
291
  getProperties(handles?: string | string[]): Promise<any[]> {
292
292
  const relativePath = handles !== undefined ? `/properties?handles=${handles}` : "/properties";
@@ -294,27 +294,33 @@ export class Assembly extends Endpoint {
294
294
  }
295
295
 
296
296
  /**
297
- * Returns the list of original handles for an objects in the file that match the specified
298
- * patterns. Search patterns may be combined using query operators.
297
+ * Returns the list of original handles for an objects in the file that match the specified patterns.
298
+ * Search patterns may be combined using query operators.
299
299
  *
300
- * @example <caption>Simple search pattern.</caption>
301
- * searchPattern = {
302
- * key: "Category",
303
- * value: "OST_Stairs",
304
- * };
300
+ * @example Simple search pattern.
305
301
  *
306
- * @example <caption>Search patterns combination.</caption>
307
- * searchPattern = {
308
- * $or: [
309
- * {
310
- * $and: [
311
- * { key: "Category", value: "OST_GenericModel" },
312
- * { key: "Level", value: "03 - Floor" },
313
- * ],
314
- * },
315
- * { key: "Category", value: "OST_Stairs" },
316
- * ],
317
- * };
302
+ * ```javascript
303
+ * searchPattern = {
304
+ * key: "Category",
305
+ * value: "OST_Stairs",
306
+ * };
307
+ * ```
308
+ *
309
+ * @example Search patterns combination.
310
+ *
311
+ * ```javascript
312
+ * searchPattern = {
313
+ * $or: [
314
+ * {
315
+ * $and: [
316
+ * { key: "Category", value: "OST_GenericModel" },
317
+ * { key: "Level", value: "03 - Floor" },
318
+ * ],
319
+ * },
320
+ * { key: "Category", value: "OST_Stairs" },
321
+ * ],
322
+ * };
323
+ * ```
318
324
  *
319
325
  * @param searchPattern - Search pattern or combination of the patterns, see example below.
320
326
  */
@@ -381,14 +387,14 @@ export class Assembly extends Endpoint {
381
387
  }
382
388
 
383
389
  /**
384
- * Downloads an assembly resource file. Resource files are files that contain model scene
385
- * descriptions, or geometry data.
390
+ * Downloads an assembly resource file. Resource files are files that contain model scene descriptions,
391
+ * or geometry data.
386
392
  *
387
393
  * @param dataId - Resource file name.
388
394
  * @param onProgress - Download progress callback.
389
395
  * @param signal - An
390
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
391
- * signal. Allows to communicate with a fetch request and abort it if desired.
396
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
397
+ * to communicate with a fetch request and abort it if desired.
392
398
  */
393
399
  downloadResource(
394
400
  dataId: string,
@@ -401,16 +407,16 @@ export class Assembly extends Endpoint {
401
407
  }
402
408
 
403
409
  /**
404
- * Downloads a part of assembly resource file. Resource files are files that contain model
405
- * scene descriptions, or geometry data.
410
+ * Downloads a part of assembly resource file. Resource files are files that contain model scene
411
+ * descriptions, or geometry data.
406
412
  *
407
413
  * @param dataId - Resource file name.
408
414
  * @param ranges - A range of resource file contents to download.
409
415
  * @param requestId - Request ID for download progress callback.
410
416
  * @param onProgress - Download progress callback.
411
417
  * @param signal - An
412
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
413
- * signal. Allows to communicate with a fetch request and abort it if desired.
418
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
419
+ * to communicate with a fetch request and abort it if desired.
414
420
  */
415
421
  downloadResourceRange(
416
422
  dataId: string,
@@ -460,14 +466,14 @@ export class Assembly extends Endpoint {
460
466
  }
461
467
 
462
468
  /**
463
- * Returns a list of assembly references containing references from all the files from which
464
- * the assembly was created.
469
+ * Returns a list of assembly references containing references from all the files from which the
470
+ * assembly was created.
465
471
  *
466
472
  * References are images, fonts, or any other files to correct rendering of the assembly.
467
473
  *
468
474
  * @param signal - An
469
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
470
- * signal, which can be used to abort waiting as desired.
475
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
476
+ * can be used to abort waiting as desired.
471
477
  */
472
478
  async getReferences(signal?: AbortSignal): Promise<IFileReferences> {
473
479
  const files = new Endpoint("/files", this.httpClient, this.headers);
@@ -486,13 +492,13 @@ export class Assembly extends Endpoint {
486
492
  * Waits for assembly to be created. Assembly is created when it changes to `done` or `failed` status.
487
493
  *
488
494
  * @param params - An object containing waiting parameters.
489
- * @param params.timeout - The time, in milliseconds that the function should wait assembly.
490
- * If assembly is not created during this time, the `TimeoutError` exception will be thrown.
491
- * @param params.interval - The time, in milliseconds, the function should delay in between
492
- * checking assembly status.
495
+ * @param params.timeout - The time, in milliseconds that the function should wait assembly. If
496
+ * assembly is not created during this time, the `TimeoutError` exception will be thrown.
497
+ * @param params.interval - The time, in milliseconds, the function should delay in between checking
498
+ * assembly status.
493
499
  * @param params.signal - An
494
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
495
- * signal, which can be used to abort waiting as desired.
500
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
501
+ * can be used to abort waiting as desired.
496
502
  * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
497
503
  */
498
504
  waitForDone(params?: {
@@ -518,8 +524,8 @@ export class Assembly extends Endpoint {
518
524
  * @param limit - The maximum number of tests that should be returned per request. Used for paging.
519
525
  * @param name - Filter the tests by part of the name. Case sensitive.
520
526
  * @param ids - List of tests IDs to return.
521
- * @param sortByDesc - Allows to specify the descending order of the result. By default tests
522
- * are sorted by name in ascending order.
527
+ * @param sortByDesc - Allows to specify the descending order of the result. By default tests are
528
+ * sorted by name in ascending order.
523
529
  * @param sortField - Allows to specify sort field.
524
530
  */
525
531
  getClashTests(
@@ -584,30 +590,28 @@ export class Assembly extends Endpoint {
584
590
  * - `models` - All objects of the models with original handles specified in the `selectionSetB`.
585
591
  * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetB`.
586
592
  *
587
- * @param selectionSetA - First selection set for clash detection. Objects from
588
- * `selectionSetA` will be tested against each others by objects from the `selectionSetB`
589
- * during the test.
590
- * @param selectionSetB - Second selection set for clash detection. Objects from
591
- * `selectionSetB` will be tested against each others by objects from the `selectionSetA`
592
- * during the test.
593
+ * @param selectionSetA - First selection set for clash detection. Objects from `selectionSetA` will be
594
+ * tested against each others by objects from the `selectionSetB` during the test.
595
+ * @param selectionSetB - Second selection set for clash detection. Objects from `selectionSetB` will
596
+ * be tested against each others by objects from the `selectionSetA` during the test.
593
597
  * @param params - An object containing test parameters.
594
- * @param params.tolerance - The distance of separation between objects at which test begins
595
- * detecting clashes.
598
+ * @param params.tolerance - The distance of separation between objects at which test begins detecting
599
+ * clashes.
596
600
  * @param params.clearance - The type of the clashes that the test detects:
597
601
  *
598
- * - `true` - Сlearance clash. A clash in which the object A may or may not intersect with
599
- * object B, but comes within a distance of less than the `tolerance`.
600
- * - `false` - Hard clash. A clash in which the object A intersects with object B by a distance
601
- * of more than the `tolerance`.
602
+ * - `true` - Сlearance clash. A clash in which the object A may or may not intersect with object B, but
603
+ * comes within a distance of less than the `tolerance`.
604
+ * - `false` - Hard clash. A clash in which the object A intersects with object B by a distance of more
605
+ * than the `tolerance`.
602
606
  *
603
607
  * @param params.waitForDone - Wait for test to complete.
604
- * @param params.timeout - The time, in milliseconds that the function should wait test. If
605
- * test is not complete during this time, the `TimeoutError` exception will be thrown.
606
- * @param params.interval - The time, in milliseconds, the function should delay in between
607
- * checking test status.
608
+ * @param params.timeout - The time, in milliseconds that the function should wait test. If test is not
609
+ * complete during this time, the `TimeoutError` exception will be thrown.
610
+ * @param params.interval - The time, in milliseconds, the function should delay in between checking
611
+ * test status.
608
612
  * @param params.signal - An
609
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
610
- * signal, which can be used to abort waiting as desired.
613
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
614
+ * can be used to abort waiting as desired.
611
615
  */
612
616
  createClashTest(
613
617
  name: string,
@@ -688,15 +692,15 @@ export class Assembly extends Endpoint {
688
692
 
689
693
  // Reserved for future use
690
694
 
691
- async createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink> {
695
+ createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink> {
692
696
  return Promise.reject(new Error("Assembly shared link will be implemeted in a future release"));
693
697
  }
694
698
 
695
- async getSharedLink(): Promise<SharedLink> {
699
+ getSharedLink(): Promise<SharedLink> {
696
700
  return Promise.resolve(undefined);
697
701
  }
698
702
 
699
- async deleteSharedLink(): Promise<any> {
703
+ deleteSharedLink(): Promise<any> {
700
704
  return Promise.reject(new FetchError(404));
701
705
  }
702
706
  }
@@ -47,10 +47,10 @@ export class ClashTest extends Endpoint {
47
47
  /**
48
48
  * The type of the clashes that the test detects:
49
49
  *
50
- * - `true` - Сlearance clash. A clash in which the object A may or may not intersect with
51
- * object B, but comes within a distance of less than the {@link tolerance}.
52
- * - `false` - Hard clash. A clash in which the object A intersects with object B by a distance
53
- * of more than the {@link tolerance}.
50
+ * - `true` - Сlearance clash. A clash in which the object A may or may not intersect with object B, but
51
+ * comes within a distance of less than the {@link tolerance}.
52
+ * - `false` - Hard clash. A clash in which the object A intersects with object B by a distance of more
53
+ * than the {@link tolerance}.
54
54
  *
55
55
  * @readonly
56
56
  */
@@ -125,8 +125,8 @@ export class ClashTest extends Endpoint {
125
125
  }
126
126
 
127
127
  /**
128
- * First selection set for clash detection. Objects from `selectionSetA` will be tested
129
- * against each others by objects from the `selectionSetB` during the test.
128
+ * First selection set for clash detection. Objects from `selectionSetA` will be tested against each
129
+ * others by objects from the `selectionSetB` during the test.
130
130
  *
131
131
  * @readonly
132
132
  */
@@ -149,8 +149,8 @@ export class ClashTest extends Endpoint {
149
149
  }
150
150
 
151
151
  /**
152
- * Second selection set for clash detection. Objects from `selectionSetB` will be tested
153
- * against each others by objects from the `selectionSetA` during the test.
152
+ * Second selection set for clash detection. Objects from `selectionSetB` will be tested against each
153
+ * others by objects from the `selectionSetA` during the test.
154
154
  *
155
155
  * @readonly
156
156
  */
@@ -222,8 +222,8 @@ export class ClashTest extends Endpoint {
222
222
  }
223
223
 
224
224
  /**
225
- * Saves test properties changes to the server. Call this method to update test data on the
226
- * server after any property changes.
225
+ * Saves test properties changes to the server. Call this method to update test data on the server
226
+ * after any property changes.
227
227
  */
228
228
  save(): Promise<this> {
229
229
  return this.update(this.data);
@@ -233,13 +233,13 @@ export class ClashTest extends Endpoint {
233
233
  * Waits for test to complete. Test is done when it changes to `done` or `failed` status.
234
234
  *
235
235
  * @param params - An object containing waiting parameters.
236
- * @param params.timeout - The time, in milliseconds that the function should wait test. If
237
- * test is not complete during this time, the `TimeoutError` exception will be thrown.
238
- * @param params.interval - The time, in milliseconds, the function should delay in between
239
- * checking test status.
236
+ * @param params.timeout - The time, in milliseconds that the function should wait test. If test is not
237
+ * complete during this time, the `TimeoutError` exception will be thrown.
238
+ * @param params.interval - The time, in milliseconds, the function should delay in between checking
239
+ * test status.
240
240
  * @param params.signal - An
241
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
242
- * signal, which can be used to abort waiting as desired.
241
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
242
+ * can be used to abort waiting as desired.
243
243
  * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
244
244
  */
245
245
  waitForDone(params?: {
package/src/Api/Client.ts CHANGED
@@ -39,8 +39,8 @@ import { SharedFile } from "./SharedFile";
39
39
  import { parseArgs } from "./Utils";
40
40
 
41
41
  /**
42
- * Provides methods for managing Open Cloud Server resources such as users, files, assemblies,
43
- * jobs, projects, etc.
42
+ * Provides methods for managing Open Cloud Server resources such as users, files, assemblies, jobs,
43
+ * projects, etc.
44
44
  */
45
45
  export class Client extends EventEmitter2<ClientEventMap> {
46
46
  private _serverUrl = "";
@@ -158,10 +158,10 @@ export class Client extends EventEmitter2<ClientEventMap> {
158
158
  * No login is required to register a new user.
159
159
  *
160
160
  * @param email - User email. Cannot be empty. Must be unique within the server.
161
- * @param password - User password. Cannot be empty. Password can only contain letters (a-z,
162
- * A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
163
- * @param userName - User name. Cannot be empty or blank if defined. this to `undefined` to
164
- * use `username` from email.
161
+ * @param password - User password. Cannot be empty. Password can only contain letters (a-z, A-Z),
162
+ * numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
163
+ * @param userName - User name. Cannot be empty or blank if defined. this to `undefined` to use
164
+ * `username` from email.
165
165
  */
166
166
  registerUser(email: string, password: string, userName?: string): Promise<any> {
167
167
  return this.httpClient
@@ -174,8 +174,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
174
174
  }
175
175
 
176
176
  /**
177
- * Resends a Confirmation Email to the new user. If the user's email is already confirmed, an
178
- * exception will be thrown.
177
+ * Resends a Confirmation Email to the new user. If the user's email is already confirmed, an exception
178
+ * will be thrown.
179
179
  *
180
180
  * @param email - User email.
181
181
  * @param password - User password.
@@ -187,8 +187,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
187
187
  }
188
188
 
189
189
  /**
190
- * Marks the user's email address as confirmed. If the user's email is already confirmed, an
191
- * exception will be thrown.
190
+ * Marks the user's email address as confirmed. If the user's email is already confirmed, an exception
191
+ * will be thrown.
192
192
  *
193
193
  * @param emailConfirmationId - Confirmation code from the Confirmation Email.
194
194
  */
@@ -227,8 +227,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
227
227
  /**
228
228
  * Log out.
229
229
  *
230
- * You must log in again using {@link signInWithEmail} or {@link signInWithToken} to continue
231
- * making requests to the server
230
+ * You must log in again using {@link signInWithEmail} or {@link signInWithToken} to continue making
231
+ * requests to the server
232
232
  */
233
233
  signOut(): void {
234
234
  this.clearCurrentUser();
@@ -252,8 +252,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
252
252
  }
253
253
 
254
254
  /**
255
- * Returns the current logged in user. Returns `null` if the user is not logged in or the
256
- * logged in user has deleted themself.
255
+ * Returns the current logged in user. Returns `null` if the user is not logged in or the logged in
256
+ * user has deleted themself.
257
257
  */
258
258
  getCurrentUser(): User | null {
259
259
  if (this._user && !this.httpClient.signInUserId) this._user = null;
@@ -306,8 +306,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
306
306
  /**
307
307
  * Returns a list of OAuth clients of the server.
308
308
  *
309
- * Only administrators can get a list of OAuth clients. If the current logged in user is not
310
- * an administrator, an exception will be thrown.
309
+ * Only administrators can get a list of OAuth clients. If the current logged in user is not an
310
+ * administrator, an exception will be thrown.
311
311
  *
312
312
  * @param start - The starting index in the client list. Used for paging.
313
313
  * @param limit - The maximum number of clients that should be returned per request. Used for paging.
@@ -343,8 +343,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
343
343
  /**
344
344
  * Returns information about the specified OAuth client.
345
345
  *
346
- * Only administrators can get OAuth clients. If the current logged in user is not an
347
- * administrator, an exception will be thrown.
346
+ * Only administrators can get OAuth clients. If the current logged in user is not an administrator, an
347
+ * exception will be thrown.
348
348
  *
349
349
  * @param clientId - Client ID.
350
350
  */
@@ -358,8 +358,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
358
358
  /**
359
359
  * Creates a new OAuth client on the server.
360
360
  *
361
- * Only administrators can create OAuth clients. If the current logged in user is not an
362
- * administrator, an exception will be thrown.
361
+ * Only administrators can create OAuth clients. If the current logged in user is not an administrator,
362
+ * an exception will be thrown.
363
363
  *
364
364
  * @param name - Client name.
365
365
  * @param redirectUrl - Endpoint to which the OAuth 2.0 server sends the response.
@@ -379,8 +379,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
379
379
  /**
380
380
  * Deletes the specified OAuth client from the server.
381
381
  *
382
- * Only administrators can delete OAuth clients. If the current logged in user is not an
383
- * administrator, an exception will be thrown.
382
+ * Only administrators can delete OAuth clients. If the current logged in user is not an administrator,
383
+ * an exception will be thrown.
384
384
  *
385
385
  * @param clientId - Client ID.
386
386
  * @returns Returns the raw data of a deleted client. For more information, see
@@ -393,8 +393,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
393
393
  /**
394
394
  * Returns the list of server users.
395
395
  *
396
- * Only administrators can get a list of users. If the current logged in user is not an
397
- * administrator, an exception will be thrown.
396
+ * Only administrators can get a list of users. If the current logged in user is not an administrator,
397
+ * an exception will be thrown.
398
398
  */
399
399
  getUsers(): Promise<User[]> {
400
400
  return this.httpClient
@@ -407,8 +407,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
407
407
  /**
408
408
  * Returns information about the specified user.
409
409
  *
410
- * Only administrators can get other users. If the current logged in user is not an
411
- * administrator, they can only get themselves, otherwise an exception will be thrown.
410
+ * Only administrators can get other users. If the current logged in user is not an administrator, they
411
+ * can only get themselves, otherwise an exception will be thrown.
412
412
  *
413
413
  * @param userId - User ID.
414
414
  */
@@ -433,16 +433,16 @@ export class Client extends EventEmitter2<ClientEventMap> {
433
433
  /**
434
434
  * Creates a new user on the server.
435
435
  *
436
- * Only administrators can create users. If the current logged in user is not an
437
- * administrator, an exception will be thrown.
436
+ * Only administrators can create users. If the current logged in user is not an administrator, an
437
+ * exception will be thrown.
438
438
  *
439
439
  * @param email - User email. Cannot be empty. Must be unique within the server.
440
- * @param password - User password. Cannot be empty. Password can only contain latin letters
441
- * (a-z, A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
440
+ * @param password - User password. Cannot be empty. Password can only contain latin letters (a-z,
441
+ * A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
442
442
  * @param params - Additional user data.
443
443
  * @param params.isAdmin - `true` if user is an administrator.
444
- * @param params.userName - User name. Cannot be empty or blank if defined. Specify
445
- * `undefined` to use `username` from email.
444
+ * @param params.userName - User name. Cannot be empty or blank if defined. Specify `undefined` to use
445
+ * `username` from email.
446
446
  * @param params.firstName - First name.
447
447
  * @param params.lastName - Last name.
448
448
  * @param params.canCreateProject - `true` if user is allowed to create a project.
@@ -481,11 +481,11 @@ export class Client extends EventEmitter2<ClientEventMap> {
481
481
  /**
482
482
  * Deletes the specified user from the server.
483
483
  *
484
- * Only administrators can delete users. If the current logged in user is not an
485
- * administrator, an exception will be thrown.
484
+ * Only administrators can delete users. If the current logged in user is not an administrator, an
485
+ * exception will be thrown.
486
486
  *
487
- * Administrators can delete themselves or other administrators. An administrator can only
488
- * delete themself if they is not the last administrator.
487
+ * Administrators can delete themselves or other administrators. An administrator can only delete
488
+ * themself if they is not the last administrator.
489
489
  *
490
490
  * You need to re-login after deleting the current logged in user.
491
491
  *
@@ -526,12 +526,12 @@ export class Client extends EventEmitter2<ClientEventMap> {
526
526
  * @param start - The starting index in the file list. Used for paging.
527
527
  * @param limit - The maximum number of files that should be returned per request. Used for paging.
528
528
  * @param name - Filter the files by part of the name. Case sensitive.
529
- * @param ext - Filter the files by extension. Extension can be `dgn`, `dwf`, `dwg`, `dxf`,
530
- * `ifc`, `ifczip`, `nwc`, `nwd`, `obj`, `rcs`, `rfa`, `rvt`, `step`, `stl`, `stp`, `vsf`,
531
- * or any other file type extension.
529
+ * @param ext - Filter the files by extension. Extension can be `dgn`, `dwf`, `dwg`, `dxf`, `ifc`,
530
+ * `ifczip`, `nwc`, `nwd`, `obj`, `rcs`, `rfa`, `rvt`, `step`, `stl`, `stp`, `vsf`, or any other file
531
+ * type extension.
532
532
  * @param ids - List of file IDs to return.
533
- * @param sortByDesc - Allows to specify the descending order of the result. By default,
534
- * files are sorted by name in ascending order.
533
+ * @param sortByDesc - Allows to specify the descending order of the result. By default, files are
534
+ * sorted by name in ascending order.
535
535
  * @param sortField - Allows to specify sort field.
536
536
  * @param shared - Returns shared files only.
537
537
  */
@@ -601,10 +601,9 @@ export class Client extends EventEmitter2<ClientEventMap> {
601
601
  *
602
602
  * - {@link UploadProgressEvent | uploadprogress}
603
603
  *
604
- * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object
605
- * are generally retrieved from a
606
- * {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList} object returned as
607
- * a result of a user selecting files using the HTML `<input>` element.
604
+ * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are
605
+ * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}
606
+ * object returned as a result of a user selecting files using the HTML `<input>` element.
608
607
  * @param params - An object containing upload parameters.
609
608
  * @param params.geometry - Create job to convert file geometry data. Can be:
610
609
  *
@@ -614,13 +613,13 @@ export class Client extends EventEmitter2<ClientEventMap> {
614
613
  *
615
614
  * @param params.properties - Create job to extract file properties.
616
615
  * @param params.waitForDone - Wait for geometry and properties jobs to complete.
617
- * @param params.timeout - The time, in milliseconds that the function should wait jobs. If
618
- * no one jobs are done during this time, the `TimeoutError` exception will be thrown.
619
- * @param params.interval - The time, in milliseconds, the function should delay in between
620
- * checking jobs status.
616
+ * @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs
617
+ * are done during this time, the `TimeoutError` exception will be thrown.
618
+ * @param params.interval - The time, in milliseconds, the function should delay in between checking
619
+ * jobs status.
621
620
  * @param params.signal - An
622
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
623
- * signal, which can be used to abort waiting as desired.
621
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
622
+ * can be used to abort waiting as desired.
624
623
  * @param params.onProgress - Upload progress callback.
625
624
  */
626
625
  async uploadFile(
@@ -662,8 +661,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
662
661
  /**
663
662
  * Deletes the specified file and all its versions from the server.
664
663
  *
665
- * You cannot delete a version file using `deleteFile()`, only the original file. To delete a
666
- * version file use {@link File.deleteVersion | File.deleteVersion()}.
664
+ * You cannot delete a version file using `deleteFile()`, only the original file. To delete a version
665
+ * file use {@link File.deleteVersion | File.deleteVersion()}.
667
666
  *
668
667
  * @param fileId - File ID.
669
668
  * @returns Returns the raw data of a deleted file. For more information, see
@@ -679,8 +678,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
679
678
  * @param fileId - File ID.
680
679
  * @param onProgress - Download progress callback.
681
680
  * @param signal - An
682
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
683
- * signal. Allows to communicate with a fetch request and abort it if desired.
681
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
682
+ * to communicate with a fetch request and abort it if desired.
684
683
  */
685
684
  downloadFile(fileId: string, onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {
686
685
  return this.httpClient
@@ -705,8 +704,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
705
704
  * @param status - Filter the jobs by status. Status can be `waiting`, `inpogress`, `done` or `failed`.
706
705
  * @param limit - The maximum number of jobs that should be returned per request. Used for paging.
707
706
  * @param start - The starting index in the job list. Used for paging.
708
- * @param sortByDesc - Allows to specify the descending order of the result. By default, jobs
709
- * are sorted by creation time in ascending order.
707
+ * @param sortByDesc - Allows to specify the descending order of the result. By default, jobs are
708
+ * sorted by creation time in ascending order.
710
709
  * @param {boolean} sortField - Allows to specify sort field.
711
710
  */
712
711
  getJobs(
@@ -768,11 +767,11 @@ export class Client extends EventEmitter2<ClientEventMap> {
768
767
  * - `properties` - Extract file properties.
769
768
  * - `validation` - Validate the file. Only for `IFC` files.
770
769
  * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the supported format.
771
- * - Other custom job name. Custom job runner must be registered in the job templates table
772
- * before creating a job.
770
+ * - Other custom job name. Custom job runner must be registered in the job templates table before
771
+ * creating a job.
773
772
  *
774
- * @param parameters - Parameters for the job runner. Can be given as command line arguments
775
- * for the File Converter tool in form `--arg=value`.
773
+ * @param parameters - Parameters for the job runner. Can be given as command line arguments for the
774
+ * File Converter tool in form `--arg=value`.
776
775
  */
777
776
  createJob(fileId: string, outputFormat: string, parameters?: string | object): Promise<Job> {
778
777
  return this.httpClient
@@ -786,8 +785,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
786
785
  }
787
786
 
788
787
  /**
789
- * Deletes the specified job from the server job list. Jobs that are in progress or have
790
- * already been completed cannot be deleted.
788
+ * Deletes the specified job from the server job list. Jobs that are in progress or have already been
789
+ * completed cannot be deleted.
791
790
  *
792
791
  * @param jobId - Job ID.
793
792
  * @returns Returns the raw data of a deleted job. For more information, see
@@ -812,12 +811,12 @@ export class Client extends EventEmitter2<ClientEventMap> {
812
811
  * Returns a list of assemblies created by the current logged in user.
813
812
  *
814
813
  * @param start - The starting index in the assembly list. Used for paging.
815
- * @param limit - The maximum number of assemblies that should be returned per request. Used
816
- * for paging.
814
+ * @param limit - The maximum number of assemblies that should be returned per request. Used for
815
+ * paging.
817
816
  * @param name - Filter the assemblies by part of the name. Case sensitive.
818
817
  * @param ids - List of assembly IDs to return.
819
- * @param sortByDesc - Allows to specify the descending order of the result. By default
820
- * assemblies are sorted by name in ascending order.
818
+ * @param sortByDesc - Allows to specify the descending order of the result. By default assemblies are
819
+ * sorted by name in ascending order.
821
820
  * @param sortField - Allows to specify sort field.
822
821
  */
823
822
  getAssemblies(
@@ -879,14 +878,14 @@ export class Client extends EventEmitter2<ClientEventMap> {
879
878
  * @param name - Assembly name.
880
879
  * @param params - Additional assembly creating parameters.
881
880
  * @param params.waitForDone - Wait for assembly to be created.
882
- * @param params.timeout - The time, in milliseconds, that the function should wait for the
883
- * assembly to be created. If the assembly is not created within this time, a TimeoutError
884
- * exception will be thrown.
885
- * @param params.interval - The time, in milliseconds, the function should delay in between
886
- * checking assembly status.
881
+ * @param params.timeout - The time, in milliseconds, that the function should wait for the assembly to
882
+ * be created. If the assembly is not created within this time, a TimeoutError exception will be
883
+ * thrown.
884
+ * @param params.interval - The time, in milliseconds, the function should delay in between checking
885
+ * assembly status.
887
886
  * @param params.signal - An
888
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
889
- * signal, which can be used to abort waiting as desired.
887
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
888
+ * can be used to abort waiting as desired.
890
889
  * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
891
890
  */
892
891
  createAssembly(
@@ -937,8 +936,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
937
936
  * @param limit - The maximum number of projects that should be returned per request. Used for paging.
938
937
  * @param name - Filter the projects by part of the name. Case sensitive.
939
938
  * @param ids - List of project IDs to return.
940
- * @param sortByDesc - Allows to specify the descending order of the result. By default
941
- * projects are sorted by name in ascending order.
939
+ * @param sortByDesc - Allows to specify the descending order of the result. By default projects are
940
+ * sorted by name in ascending order.
942
941
  */
943
942
  getProjects(
944
943
  start?: number,
@@ -1086,8 +1085,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
1086
1085
  /**
1087
1086
  * Deletes the specified shared link.
1088
1087
  *
1089
- * Only file owner can delete shared link. If the current logged in user is not a file owner,
1090
- * an exception will be thrown.
1088
+ * Only file owner can delete shared link. If the current logged in user is not a file owner, an
1089
+ * exception will be thrown.
1091
1090
  *
1092
1091
  * @param token - Shared link token.
1093
1092
  * @returns Returns the raw data of a deleted shared link. For more information, see