@inweb/client 26.1.2 → 26.1.4

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 +434 -449
  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 +65 -69
  7. package/lib/Api/ClashTest.d.ts +16 -16
  8. package/lib/Api/Client.d.ts +78 -77
  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 +120 -132
  12. package/lib/Api/IHttpClient.d.ts +4 -3
  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 +17 -20
  21. package/lib/Api/Project.d.ts +14 -13
  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 +33 -31
  25. package/package.json +2 -2
  26. package/src/Api/Assembly.ts +66 -70
  27. package/src/Api/ClashTest.ts +16 -16
  28. package/src/Api/Client.ts +78 -77
  29. package/src/Api/Endpoint.ts +6 -6
  30. package/src/Api/FetchError.ts +5 -5
  31. package/src/Api/File.ts +121 -133
  32. package/src/Api/IHttpClient.ts +4 -3
  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 +17 -20
  41. package/src/Api/Project.ts +14 -13
  42. package/src/Api/Role.ts +2 -2
  43. package/src/Api/SharedLink.ts +2 -2
  44. package/src/Api/User.ts +33 -31
@@ -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 Cloud Server
38
- * and managing its data.
37
+ * Provides properties and methods for obtaining information about an assembly on the Open
38
+ * Cloud Server 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 on the
229
- * server after any property changes.
228
+ * Saves assembly properties changes to the server. Call this method to update assembly data
229
+ * on the 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 properties for
289
- * all objects in the assembly.
288
+ * @param handles - Object original handle or handles array. Specify `undefined` to get
289
+ * properties for 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,33 +294,27 @@ 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 patterns.
298
- * 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
298
+ * patterns. Search patterns may be combined using query operators.
299
299
  *
300
- * @example Simple search pattern.
300
+ * @example <caption>Simple search pattern.</caption>
301
+ * searchPattern = {
302
+ * key: "Category",
303
+ * value: "OST_Stairs",
304
+ * };
301
305
  *
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
- * ```
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
+ * };
324
318
  *
325
319
  * @param searchPattern - Search pattern or combination of the patterns, see example below.
326
320
  */
@@ -387,14 +381,14 @@ export class Assembly extends Endpoint {
387
381
  }
388
382
 
389
383
  /**
390
- * Downloads an assembly resource file. Resource files are files that contain model scene descriptions,
391
- * or geometry data.
384
+ * Downloads an assembly resource file. Resource files are files that contain model scene
385
+ * descriptions, or geometry data.
392
386
  *
393
387
  * @param dataId - Resource file name.
394
388
  * @param onProgress - Download progress callback.
395
389
  * @param signal - An
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.
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.
398
392
  */
399
393
  downloadResource(
400
394
  dataId: string,
@@ -407,16 +401,16 @@ export class Assembly extends Endpoint {
407
401
  }
408
402
 
409
403
  /**
410
- * Downloads a part of assembly resource file. Resource files are files that contain model scene
411
- * descriptions, or geometry data.
404
+ * Downloads a part of assembly resource file. Resource files are files that contain model
405
+ * scene descriptions, or geometry data.
412
406
  *
413
407
  * @param dataId - Resource file name.
414
408
  * @param ranges - A range of resource file contents to download.
415
409
  * @param requestId - Request ID for download progress callback.
416
410
  * @param onProgress - Download progress callback.
417
411
  * @param signal - An
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.
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.
420
414
  */
421
415
  downloadResourceRange(
422
416
  dataId: string,
@@ -466,14 +460,14 @@ export class Assembly extends Endpoint {
466
460
  }
467
461
 
468
462
  /**
469
- * Returns a list of assembly references containing references from all the files from which the
470
- * assembly was created.
463
+ * Returns a list of assembly references containing references from all the files from which
464
+ * the assembly was created.
471
465
  *
472
466
  * References are images, fonts, or any other files to correct rendering of the assembly.
473
467
  *
474
468
  * @param signal - An
475
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
476
- * can be used to abort waiting as desired.
469
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
470
+ * signal, which can be used to abort waiting as desired.
477
471
  */
478
472
  async getReferences(signal?: AbortSignal): Promise<IFileReferences> {
479
473
  const files = new Endpoint("/files", this.httpClient, this.headers);
@@ -492,13 +486,13 @@ export class Assembly extends Endpoint {
492
486
  * Waits for assembly to be created. Assembly is created when it changes to `done` or `failed` status.
493
487
  *
494
488
  * @param params - An object containing waiting parameters.
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.
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.
499
493
  * @param params.signal - An
500
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
501
- * can be used to abort waiting as desired.
494
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
495
+ * signal, which can be used to abort waiting as desired.
502
496
  * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
503
497
  */
504
498
  waitForDone(params?: {
@@ -524,8 +518,8 @@ export class Assembly extends Endpoint {
524
518
  * @param limit - The maximum number of tests that should be returned per request. Used for paging.
525
519
  * @param name - Filter the tests by part of the name. Case sensitive.
526
520
  * @param ids - List of tests IDs to return.
527
- * @param sortByDesc - Allows to specify the descending order of the result. By default tests are
528
- * sorted by name in ascending order.
521
+ * @param sortByDesc - Allows to specify the descending order of the result. By default tests
522
+ * are sorted by name in ascending order.
529
523
  * @param sortField - Allows to specify sort field.
530
524
  */
531
525
  getClashTests(
@@ -590,28 +584,30 @@ export class Assembly extends Endpoint {
590
584
  * - `models` - All objects of the models with original handles specified in the `selectionSetB`.
591
585
  * - `searchquery` - Objects retrieved by the search queries specified in `selectionSetB`.
592
586
  *
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.
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.
597
593
  * @param params - An object containing test parameters.
598
- * @param params.tolerance - The distance of separation between objects at which test begins detecting
599
- * clashes.
594
+ * @param params.tolerance - The distance of separation between objects at which test begins
595
+ * detecting clashes.
600
596
  * @param params.clearance - The type of the clashes that the test detects:
601
597
  *
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`.
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`.
606
602
  *
607
603
  * @param params.waitForDone - Wait for test to complete.
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.
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.
612
608
  * @param params.signal - An
613
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
614
- * can be used to abort waiting as desired.
609
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
610
+ * signal, which can be used to abort waiting as desired.
615
611
  */
616
612
  createClashTest(
617
613
  name: string,
@@ -692,15 +688,15 @@ export class Assembly extends Endpoint {
692
688
 
693
689
  // Reserved for future use
694
690
 
695
- createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink> {
691
+ async createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink> {
696
692
  return Promise.reject(new Error("Assembly shared link will be implemeted in a future release"));
697
693
  }
698
694
 
699
- getSharedLink(): Promise<SharedLink> {
695
+ async getSharedLink(): Promise<SharedLink> {
700
696
  return Promise.resolve(undefined);
701
697
  }
702
698
 
703
- deleteSharedLink(): Promise<any> {
699
+ async deleteSharedLink(): Promise<any> {
704
700
  return Promise.reject(new FetchError(404));
705
701
  }
706
702
  }
@@ -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 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}.
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}.
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 against each
129
- * others by objects from the `selectionSetB` during the test.
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.
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 against each
153
- * others by objects from the `selectionSetA` during the test.
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.
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 server
226
- * after any property changes.
225
+ * Saves test properties changes to the server. Call this method to update test data on the
226
+ * server 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 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.
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.
240
240
  * @param params.signal - An
241
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
242
- * can be used to abort waiting as desired.
241
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
242
+ * signal, which 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, jobs,
43
- * projects, etc.
42
+ * Provides methods for managing Open Cloud Server resources such as users, files, assemblies,
43
+ * jobs, 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, 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.
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.
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 exception
178
- * will be thrown.
177
+ * Resends a Confirmation Email to the new user. If the user's email is already confirmed, an
178
+ * exception 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 exception
191
- * will be thrown.
190
+ * Marks the user's email address as confirmed. If the user's email is already confirmed, an
191
+ * exception 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 making
231
- * requests to the server
230
+ * You must log in again using {@link signInWithEmail} or {@link signInWithToken} to continue
231
+ * making 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 logged in
256
- * user has deleted themself.
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.
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 an
310
- * administrator, an exception will be thrown.
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.
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 administrator, an
347
- * exception will be thrown.
346
+ * Only administrators can get OAuth clients. If the current logged in user is not an
347
+ * administrator, an 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 administrator,
362
- * an exception will be thrown.
361
+ * Only administrators can create OAuth clients. If the current logged in user is not an
362
+ * administrator, 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 administrator,
383
- * an exception will be thrown.
382
+ * Only administrators can delete OAuth clients. If the current logged in user is not an
383
+ * administrator, 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 administrator,
397
- * an exception will be thrown.
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.
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 administrator, they
411
- * 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
411
+ * administrator, they 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 administrator, an
437
- * exception will be thrown.
436
+ * Only administrators can create users. If the current logged in user is not an
437
+ * administrator, an 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 (a-z,
441
- * A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
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 (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
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 `undefined` to use
445
- * `username` from email.
444
+ * @param params.userName - User name. Cannot be empty or blank if defined. Specify
445
+ * `undefined` to use `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 administrator, an
485
- * exception will be thrown.
484
+ * Only administrators can delete users. If the current logged in user is not an
485
+ * administrator, an exception will be thrown.
486
486
  *
487
- * Administrators can delete themselves or other administrators. An administrator can only delete
488
- * themself if they is not the last administrator.
487
+ * Administrators can delete themselves or other administrators. An administrator can only
488
+ * delete 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`, `ifc`,
530
- * `ifczip`, `nwc`, `nwd`, `obj`, `rcs`, `rfa`, `rvt`, `step`, `stl`, `stp`, `vsf`, or any other file
531
- * type extension.
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.
532
532
  * @param ids - List of file IDs to return.
533
- * @param sortByDesc - Allows to specify the descending order of the result. By default, files are
534
- * sorted by name in ascending order.
533
+ * @param sortByDesc - Allows to specify the descending order of the result. By default,
534
+ * files are 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,9 +601,10 @@ 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 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.
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.
607
608
  * @param params - An object containing upload parameters.
608
609
  * @param params.geometry - Create job to convert file geometry data. Can be:
609
610
  *
@@ -613,13 +614,13 @@ export class Client extends EventEmitter2<ClientEventMap> {
613
614
  *
614
615
  * @param params.properties - Create job to extract file properties.
615
616
  * @param params.waitForDone - Wait for geometry and properties jobs to complete.
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.
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.
620
621
  * @param params.signal - An
621
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
622
- * can be used to abort waiting as desired.
622
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
623
+ * signal, which can be used to abort waiting as desired.
623
624
  * @param params.onProgress - Upload progress callback.
624
625
  */
625
626
  async uploadFile(
@@ -661,8 +662,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
661
662
  /**
662
663
  * Deletes the specified file and all its versions from the server.
663
664
  *
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()}.
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()}.
666
667
  *
667
668
  * @param fileId - File ID.
668
669
  * @returns Returns the raw data of a deleted file. For more information, see
@@ -678,8 +679,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
678
679
  * @param fileId - File ID.
679
680
  * @param onProgress - Download progress callback.
680
681
  * @param signal - An
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.
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.
683
684
  */
684
685
  downloadFile(fileId: string, onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {
685
686
  return this.httpClient
@@ -704,8 +705,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
704
705
  * @param status - Filter the jobs by status. Status can be `waiting`, `inpogress`, `done` or `failed`.
705
706
  * @param limit - The maximum number of jobs that should be returned per request. Used for paging.
706
707
  * @param start - The starting index in the job list. Used for paging.
707
- * @param sortByDesc - Allows to specify the descending order of the result. By default, jobs are
708
- * sorted by creation time in ascending order.
708
+ * @param sortByDesc - Allows to specify the descending order of the result. By default, jobs
709
+ * are sorted by creation time in ascending order.
709
710
  * @param {boolean} sortField - Allows to specify sort field.
710
711
  */
711
712
  getJobs(
@@ -767,11 +768,11 @@ export class Client extends EventEmitter2<ClientEventMap> {
767
768
  * - `properties` - Extract file properties.
768
769
  * - `validation` - Validate the file. Only for `IFC` files.
769
770
  * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the supported format.
770
- * - Other custom job name. Custom job runner must be registered in the job templates table before
771
- * creating a job.
771
+ * - Other custom job name. Custom job runner must be registered in the job templates table
772
+ * before creating a job.
772
773
  *
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`.
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`.
775
776
  */
776
777
  createJob(fileId: string, outputFormat: string, parameters?: string | object): Promise<Job> {
777
778
  return this.httpClient
@@ -785,8 +786,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
785
786
  }
786
787
 
787
788
  /**
788
- * Deletes the specified job from the server job list. Jobs that are in progress or have already been
789
- * completed cannot be deleted.
789
+ * Deletes the specified job from the server job list. Jobs that are in progress or have
790
+ * already been completed cannot be deleted.
790
791
  *
791
792
  * @param jobId - Job ID.
792
793
  * @returns Returns the raw data of a deleted job. For more information, see
@@ -811,12 +812,12 @@ export class Client extends EventEmitter2<ClientEventMap> {
811
812
  * Returns a list of assemblies created by the current logged in user.
812
813
  *
813
814
  * @param start - The starting index in the assembly list. Used for paging.
814
- * @param limit - The maximum number of assemblies that should be returned per request. Used for
815
- * paging.
815
+ * @param limit - The maximum number of assemblies that should be returned per request. Used
816
+ * for paging.
816
817
  * @param name - Filter the assemblies by part of the name. Case sensitive.
817
818
  * @param ids - List of assembly IDs to return.
818
- * @param sortByDesc - Allows to specify the descending order of the result. By default assemblies are
819
- * sorted by name in ascending order.
819
+ * @param sortByDesc - Allows to specify the descending order of the result. By default
820
+ * assemblies are sorted by name in ascending order.
820
821
  * @param sortField - Allows to specify sort field.
821
822
  */
822
823
  getAssemblies(
@@ -878,14 +879,14 @@ export class Client extends EventEmitter2<ClientEventMap> {
878
879
  * @param name - Assembly name.
879
880
  * @param params - Additional assembly creating parameters.
880
881
  * @param params.waitForDone - Wait for assembly to be created.
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.
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.
886
887
  * @param params.signal - An
887
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
888
- * can be used to abort waiting as desired.
888
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
889
+ * signal, which can be used to abort waiting as desired.
889
890
  * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
890
891
  */
891
892
  createAssembly(
@@ -936,8 +937,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
936
937
  * @param limit - The maximum number of projects that should be returned per request. Used for paging.
937
938
  * @param name - Filter the projects by part of the name. Case sensitive.
938
939
  * @param ids - List of project IDs to return.
939
- * @param sortByDesc - Allows to specify the descending order of the result. By default projects are
940
- * sorted by name in ascending order.
940
+ * @param sortByDesc - Allows to specify the descending order of the result. By default
941
+ * projects are sorted by name in ascending order.
941
942
  */
942
943
  getProjects(
943
944
  start?: number,
@@ -1085,8 +1086,8 @@ export class Client extends EventEmitter2<ClientEventMap> {
1085
1086
  /**
1086
1087
  * Deletes the specified shared link.
1087
1088
  *
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.
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.
1090
1091
  *
1091
1092
  * @param token - Shared link token.
1092
1093
  * @returns Returns the raw data of a deleted shared link. For more information, see