@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
@@ -33,8 +33,8 @@ export class Endpoint {
33
33
  public path: string;
34
34
 
35
35
  /**
36
- * Endpoint-specific HTTP headers for the `GET`, `POST`, `PUT` and `DELETE` requests. You can
37
- * add custom headers at any time.
36
+ * Endpoint-specific HTTP headers for the `GET`, `POST`, `PUT` and `DELETE` requests. You can add
37
+ * custom headers at any time.
38
38
  */
39
39
  public headers: HeadersInit;
40
40
 
@@ -43,8 +43,8 @@ export class Endpoint {
43
43
 
44
44
  /**
45
45
  * @ignore
46
- * @param path - The API path of the endpoint relative to the REST API server URL of the
47
- * specified HTTP client.
46
+ * @param path - The API path of the endpoint relative to the REST API server URL of the specified HTTP
47
+ * client.
48
48
  * @param httpClient - HTTP client instance used to send requests to the REST API server.
49
49
  * @param headers - Endpoint-specific HTTP headers.
50
50
  */
@@ -76,8 +76,8 @@ export class Endpoint {
76
76
  * @ignore
77
77
  * @param relativePath - Nested endpoint relative path.
78
78
  * @param signal - An
79
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
80
- * signal. Allows to communicate with a fetch request and abort it if desired.
79
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
80
+ * to communicate with a fetch request and abort it if desired.
81
81
  */
82
82
  get(relativePath: string, signal?: AbortSignal): Promise<Response> {
83
83
  return this.httpClient.get(this.getEndpointPath(relativePath), { signal, headers: this.headers });
@@ -100,9 +100,9 @@ export function error400(text: string, _default = "400"): string {
100
100
  }
101
101
 
102
102
  /**
103
- * The `FetchError` object indicates an error when request to Open Cloud Server could not be
104
- * performed. A `FetchError` is typically (but not exclusively) thrown when a network error
105
- * occurs, access denied, or object not found.
103
+ * The `FetchError` object indicates an error when request to Open Cloud Server could not be performed. A
104
+ * `FetchError` is typically (but not exclusively) thrown when a network error occurs, access denied, or
105
+ * object not found.
106
106
  */
107
107
 
108
108
  export class FetchError extends Error {
@@ -117,8 +117,8 @@ export class FetchError extends Error {
117
117
  public statusText: string;
118
118
 
119
119
  /**
120
- * @property status - The
121
- * {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code} of the response.
120
+ * @property status - The {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code}
121
+ * of the response.
122
122
  * @property message - Error message.
123
123
  */
124
124
  constructor(status: number, message?: string) {
package/src/Api/File.ts CHANGED
@@ -33,8 +33,8 @@ import { ISharedLinkPermissions } from "./ISharedLink";
33
33
  import { waitFor, parseArgs, userFullName, userInitials } from "./Utils";
34
34
 
35
35
  /**
36
- * Provides properties and methods for obtaining information about a file on the Open Cloud
37
- * Server and managing its data and versions.
36
+ * Provides properties and methods for obtaining information about a file on the Open Cloud Server and
37
+ * managing its data and versions.
38
38
  */
39
39
  export class File extends Endpoint {
40
40
  private _data: any;
@@ -141,8 +141,8 @@ export class File extends Endpoint {
141
141
  * - `vsfx` - `VSFX` format, file can be opened in `VisualizeJS` viewer.
142
142
  * - `gltf` - `glTF` format, file can be opened in `Three.js` viewer.
143
143
  *
144
- * Returns an empty string if geometry data has not yet been converted. A files without
145
- * geometry data can be exported to other formas, but cannot be opened in viewer.
144
+ * Returns an empty string if geometry data has not yet been converted. A files without geometry data
145
+ * can be exported to other formas, but cannot be opened in viewer.
146
146
  */
147
147
  get geometryType(): string {
148
148
  if (this.status.geometryGltf.state === "done") return "gltf";
@@ -162,8 +162,8 @@ export class File extends Endpoint {
162
162
  /**
163
163
  * Returns `true` if the source file of the active file version has been deleted.
164
164
  *
165
- * A files with deleted source file can be opened in the viewer, but cannot be exported to
166
- * other formats.
165
+ * A files with deleted source file can be opened in the viewer, but cannot be exported to other
166
+ * formats.
167
167
  *
168
168
  * @readonly
169
169
  */
@@ -325,8 +325,8 @@ export class File extends Endpoint {
325
325
  /**
326
326
  * Deletes a file and all its versions from the server.
327
327
  *
328
- * You cannot delete a version file using `delete()`, only the original file. To delete a
329
- * version file use {@link deleteVersion | deleteVersion()}.
328
+ * You cannot delete a version file using `delete()`, only the original file. To delete a version file
329
+ * use {@link deleteVersion | deleteVersion()}.
330
330
  *
331
331
  * @returns Returns the raw data of a deleted file. For more information, see
332
332
  * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
@@ -336,8 +336,8 @@ export class File extends Endpoint {
336
336
  }
337
337
 
338
338
  /**
339
- * Saves file properties changes to the server. Call this method to update file data on the
340
- * server after any property changes.
339
+ * Saves file properties changes to the server. Call this method to update file data on the server
340
+ * after any property changes.
341
341
  */
342
342
  save(): Promise<this> {
343
343
  return this.update(this.data);
@@ -347,12 +347,11 @@ export class File extends Endpoint {
347
347
  * Sets or removes the file preview.
348
348
  *
349
349
  * @param image - Preview image. Can be a
350
- * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
351
- * string,
350
+ * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,
352
351
  * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},
353
352
  * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or
354
- * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting
355
- * the `image` to `null` will remove the preview.
353
+ * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`
354
+ * to `null` will remove the preview.
356
355
  */
357
356
  async setPreview(image?: BodyInit | null): Promise<this> {
358
357
  if (!image) {
@@ -404,8 +403,8 @@ export class File extends Endpoint {
404
403
  /**
405
404
  * Returns the properties for an objects in the active version of the file.
406
405
  *
407
- * @param handles - Object original handle or handles array. Specify `undefined` to get
408
- * properties for all objects in the file.
406
+ * @param handles - Object original handle or handles array. Specify `undefined` to get properties for
407
+ * all objects in the file.
409
408
  */
410
409
  getProperties(handles?: string | string[]): Promise<any[]> {
411
410
  const relativePath = handles !== undefined ? `/properties?handles=${handles}` : "/properties";
@@ -424,35 +423,41 @@ export class File extends Endpoint {
424
423
  * Query operator. Operator name can be `$and`, `$or`, `$not`, `$eq`, `$regex`.
425
424
  *
426
425
  * @typedef {any} QueryOperator
427
- * @property {string | SearchPattern[] | QueryOperator[]} * - Array of the query values or
428
- * patterns for operator.
429
- */
430
-
431
- /**
432
- * Returns the list of original handles for an objects in the active version of the file that
433
- * match the specified patterns. Search patterns may be combined using query operators.
434
- *
435
- * @example <caption>Simple search pattern.</caption>
436
- * searchPattern = {
437
- * key: "Category",
438
- * value: "OST_Stairs",
439
- * };
440
- *
441
- * @example <caption>Search patterns combination.</caption>
442
- * searchPattern = {
443
- * $or: [
444
- * {
445
- * $and: [
446
- * { key: "Category", value: "OST_GenericModel" },
447
- * { key: "Level", value: "03 - Floor" },
448
- * ],
449
- * },
450
- * { key: "Category", value: "OST_Stairs" },
451
- * ],
452
- * };
453
- *
454
- * @param {SeacrhPattern | QueryOperator} searchPattern - Search pattern or combination of
455
- * the patterns, see example below.
426
+ * @property {string | SearchPattern[] | QueryOperator[]} * - Array of the query values or patterns for
427
+ * operator.
428
+ */
429
+
430
+ /**
431
+ * Returns the list of original handles for an objects in the active version of the file that match the
432
+ * specified patterns. Search patterns may be combined using query operators.
433
+ *
434
+ * @example Simple search pattern.
435
+ *
436
+ * ```javascript
437
+ * searchPattern = {
438
+ * key: "Category",
439
+ * value: "OST_Stairs",
440
+ * };
441
+ * ```
442
+ *
443
+ * @example Search patterns combination.
444
+ *
445
+ * ```javascript
446
+ * searchPattern = {
447
+ * $or: [
448
+ * {
449
+ * $and: [
450
+ * { key: "Category", value: "OST_GenericModel" },
451
+ * { key: "Level", value: "03 - Floor" },
452
+ * ],
453
+ * },
454
+ * { key: "Category", value: "OST_Stairs" },
455
+ * ],
456
+ * };
457
+ * ```
458
+ *
459
+ * @param {SeacrhPattern | QueryOperator} searchPattern - Search pattern or combination of the
460
+ * patterns, see example below.
456
461
  * @returns {Promise<Properties[]>}
457
462
  */
458
463
 
@@ -523,8 +528,8 @@ export class File extends Endpoint {
523
528
  *
524
529
  * @param onProgress - Download progress callback.
525
530
  * @param signal - An
526
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
527
- * signal. Allows to communicate with a fetch request and abort it if desired.
531
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
532
+ * to communicate with a fetch request and abort it if desired.
528
533
  */
529
534
  download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {
530
535
  return this.httpClient
@@ -533,23 +538,26 @@ export class File extends Endpoint {
533
538
  }
534
539
 
535
540
  /**
536
- * Downloads a resource file of the active version of the file. Resource files are files that
537
- * contain model scene descriptions, or geometry data, or exported files.
541
+ * Downloads a resource file of the active version of the file. Resource files are files that contain
542
+ * model scene descriptions, or geometry data, or exported files.
538
543
  *
539
- * @example <caption>Export file to DWG.</caption>
540
- * const job = await file.crateJob("dwg");
541
- * await job.waitForDone();
542
- * const dwgFileName = file.exports.find((x) => x.endsWith(".dwg"));
543
- * const arrayBuffer = await file.downloadResource(dwgFileName);
544
- * const blob = new Blob([arrayBuffer]);
545
- * const fileName = file.name + ".dwg";
546
- * FileSaver.saveAs(blob, fileName);
544
+ * @example Export file to DWG.
545
+ *
546
+ * ```javascript
547
+ * const job = await file.crateJob("dwg");
548
+ * await job.waitForDone();
549
+ * const dwgFileName = file.exports.find((x) => x.endsWith(".dwg"));
550
+ * const arrayBuffer = await file.downloadResource(dwgFileName);
551
+ * const blob = new Blob([arrayBuffer]);
552
+ * const fileName = file.name + ".dwg";
553
+ * FileSaver.saveAs(blob, fileName);
554
+ * ```
547
555
  *
548
556
  * @param dataId - Resource file name.
549
557
  * @param onProgress - Download progress callback.
550
558
  * @param signal - An
551
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
552
- * signal. Allows to communicate with a fetch request and abort it if desired.
559
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
560
+ * to communicate with a fetch request and abort it if desired.
553
561
  */
554
562
  downloadResource(
555
563
  dataId: string,
@@ -562,16 +570,16 @@ export class File extends Endpoint {
562
570
  }
563
571
 
564
572
  /**
565
- * Downloads a part of resource file of the active version of the file. Resource files are
566
- * files that contain model scene descriptions, or geometry data, or exported files.
573
+ * Downloads a part of resource file of the active version of the file. Resource files are files that
574
+ * contain model scene descriptions, or geometry data, or exported files.
567
575
  *
568
576
  * @param dataId - Resource file name.
569
577
  * @param ranges - A range of resource file contents to download.
570
578
  * @param requestId - Request ID for download progress callback.
571
579
  * @param onProgress - Download progress callback.
572
580
  * @param signal - An
573
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
574
- * signal. Allows to communicate with a fetch request and abort it if desired.
581
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
582
+ * to communicate with a fetch request and abort it if desired.
575
583
  */
576
584
  downloadResourceRange(
577
585
  dataId: string,
@@ -628,8 +636,8 @@ export class File extends Endpoint {
628
636
  * References are images, fonts, or any other files to correct rendering of the file.
629
637
  *
630
638
  * @param signal - An
631
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
632
- * signal, which can be used to abort waiting as desired.
639
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
640
+ * can be used to abort waiting as desired.
633
641
  */
634
642
  getReferences(signal?: AbortSignal): Promise<IFileReferences> {
635
643
  return this.get("/references", signal).then((response) => response.json());
@@ -638,8 +646,8 @@ export class File extends Endpoint {
638
646
  /**
639
647
  * Sets the file references.
640
648
  *
641
- * References are images, fonts, or any other files to correct rendering of the file.
642
- * Reference files must be uploaded to the server before they can be assigned to the current file.
649
+ * References are images, fonts, or any other files to correct rendering of the file. Reference files
650
+ * must be uploaded to the server before they can be assigned to the current file.
643
651
  *
644
652
  * @param references - File references.
645
653
  */
@@ -656,14 +664,14 @@ export class File extends Endpoint {
656
664
  * - `geometryGltf` - Convert file geometry data to `glTF` format suitable for `Three.js` viewer.
657
665
  * - `properties` - Extract file properties.
658
666
  * - `validation` - Validate the file. Only for `IFC` files.
659
- * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the
660
- * supported format. Use {@link exports | exports()} to get the list of completed file
661
- * exports. Use {@link downloadResource | downloadResource()} to download the exported file.
662
- * - Other custom job name. Custom job runner must be registered in the job templates before
663
- * creating a job.
667
+ * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the supported format.
668
+ * Use {@link exports | exports()} to get the list of completed file exports. Use
669
+ * {@link downloadResource | downloadResource()} to download the exported file.
670
+ * - Other custom job name. Custom job runner must be registered in the job templates before creating a
671
+ * job.
664
672
  *
665
- * @param parameters - Parameters for the job runner. Can be given as command line arguments
666
- * for the File Converter tool in form `--arg=value`.
673
+ * @param parameters - Parameters for the job runner. Can be given as command line arguments for the
674
+ * File Converter tool in form `--arg=value`.
667
675
  */
668
676
  createJob(outputFormat: string, parameters?: string | object): Promise<Job> {
669
677
  const jobs = new Endpoint("/jobs", this.httpClient, this.headers);
@@ -686,8 +694,8 @@ export class File extends Endpoint {
686
694
  * - `vsfx` - `VSFX` format (default), for opening a file in `VisualizeJS` viewer.
687
695
  * - `gltf` - `glTF` format, for opening a file in `Three.js` viewer.
688
696
  *
689
- * @param parameters - Parameters for the job runner. Can be given as command line arguments
690
- * for the File Converter tool in form `--arg=value`.
697
+ * @param parameters - Parameters for the job runner. Can be given as command line arguments for the
698
+ * File Converter tool in form `--arg=value`.
691
699
  */
692
700
  extractGeometry(type?: string, parameters?: string | object): Promise<Job> {
693
701
  return this.createJob(type === "gltf" ? "geometryGltf" : "geometry", parameters);
@@ -697,8 +705,8 @@ export class File extends Endpoint {
697
705
  * Runs a job to extract properties of the active version of the file. This is alias to
698
706
  * {@link createJob | createJob("properties")}.
699
707
  *
700
- * @param parameters - Parameters for the job runner. Can be given as command line arguments
701
- * for the File Converter tool in form `--arg=value`.
708
+ * @param parameters - Parameters for the job runner. Can be given as command line arguments for the
709
+ * File Converter tool in form `--arg=value`.
702
710
  */
703
711
  extractProperties(parameters?: string | object): Promise<Job> {
704
712
  return this.createJob("properties", parameters);
@@ -710,30 +718,29 @@ export class File extends Endpoint {
710
718
  *
711
719
  * To get validation report use {@link downloadResource | downloadResource("validation_report.json")}.
712
720
  *
713
- * @param parameters - Parameters for the job runner. Can be given as command line arguments
714
- * for the File Converter tool in form `--arg=value`.
721
+ * @param parameters - Parameters for the job runner. Can be given as command line arguments for the
722
+ * File Converter tool in form `--arg=value`.
715
723
  */
716
724
  validate(parameters?: string | object): Promise<Job> {
717
725
  return this.createJob("validation", parameters);
718
726
  }
719
727
 
720
728
  /**
721
- * Waits for jobs of the active version of the file to be done. Job is done when it changes
722
- * to `none`, `done` or `failed` status.
729
+ * Waits for jobs of the active version of the file to be done. Job is done when it changes to `none`,
730
+ * `done` or `failed` status.
723
731
  *
724
- * @param jobs - Job or job array to wait on. Can be `geometry`, `geometryGltf`,
725
- * `properties`, `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom
726
- * job name.
727
- * @param waitAll - If this parameter is `true`, the function returns when all the specified
728
- * jobs have done. If `false`, the function returns when any one of the jobs are done.
732
+ * @param jobs - Job or job array to wait on. Can be `geometry`, `geometryGltf`, `properties`,
733
+ * `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom job name.
734
+ * @param waitAll - If this parameter is `true`, the function returns when all the specified jobs have
735
+ * done. If `false`, the function returns when any one of the jobs are done.
729
736
  * @param params - An object containing waiting parameters.
730
- * @param params.timeout - The time, in milliseconds that the function should wait jobs. If
731
- * no one jobs are done during this time, the `TimeoutError` exception will be thrown.
732
- * @param params.interval - The time, in milliseconds, the function should delay in between
733
- * checking jobs status.
737
+ * @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs
738
+ * are done during this time, the `TimeoutError` exception will be thrown.
739
+ * @param params.interval - The time, in milliseconds, the function should delay in between checking
740
+ * jobs status.
734
741
  * @param params.signal - An
735
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
736
- * signal, which can be used to abort waiting as desired.
742
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
743
+ * can be used to abort waiting as desired.
737
744
  * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
738
745
  */
739
746
  waitForDone(
@@ -786,15 +793,21 @@ export class File extends Endpoint {
786
793
  /**
787
794
  * Creates a new file permission for a user, project, or group.
788
795
  *
789
- * @example <caption>Grant the specified user permission to "update" the file.</caption>
790
- * const action = "update";
791
- * const grantedTo = [{ user: { id: myUser.id, email: myUser.email } }];
792
- * await file.createPermission(action, grantedTo);
796
+ * @example Grant the specified user permission to "update" the file.
797
+ *
798
+ * ```javascript
799
+ * const action = "update";
800
+ * const grantedTo = [{ user: { id: myUser.id, email: myUser.email } }];
801
+ * await file.createPermission(action, grantedTo);
802
+ * ```
803
+ *
804
+ * @example Add a file to the specified project in "read-only" mode.
793
805
  *
794
- * @example <caption>Add a file to the specified project in `read-only` mode.</caption>
795
- * const actions = ["read", "readSourceFile"];
796
- * const grantedTo = [{ project: { id: myProject.id, name: myProject.name } }];
797
- * await file.createPermission(actions, grantedTo);
806
+ * ```javascript
807
+ * const actions = ["read", "readSourceFile"];
808
+ * const grantedTo = [{ project: { id: myProject.id, name: myProject.name } }];
809
+ * await file.createPermission(actions, grantedTo);
810
+ * ```
798
811
  *
799
812
  * @param actions - Actions are allowed to be performed on a file with this permission:
800
813
  *
@@ -829,25 +842,24 @@ export class File extends Endpoint {
829
842
  }
830
843
 
831
844
  /**
832
- * Uploads the new version of the file to the server, convert the geometry data and extract
833
- * properties as needed.
845
+ * Uploads the new version of the file to the server, convert the geometry data and extract properties
846
+ * as needed.
834
847
  *
835
- * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object
836
- * are generally retrieved from a
837
- * {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList} object returned as
838
- * a result of a user selecting files using the HTML `<input>` element.
848
+ * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are
849
+ * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}
850
+ * object returned as a result of a user selecting files using the HTML `<input>` element.
839
851
  * @param params - An object containing upload parameters.
840
- * @param params.geometry - Create job to convert file geometry data. The geometry data type
841
- * is the same as the original file.
852
+ * @param params.geometry - Create job to convert file geometry data. The geometry data type is the
853
+ * same as the original file.
842
854
  * @param params.properties - Create job to extract file properties.
843
855
  * @param params.waitForDone - Wait for geometry and properties jobs to complete.
844
- * @param params.timeout - The time, in milliseconds that the function should wait jobs. If
845
- * no one jobs are done during this time, the `TimeoutError` exception will be thrown.
846
- * @param params.interval - The time, in milliseconds, the function should delay in between
847
- * checking jobs status.
856
+ * @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs
857
+ * are done during this time, the `TimeoutError` exception will be thrown.
858
+ * @param params.interval - The time, in milliseconds, the function should delay in between checking
859
+ * jobs status.
848
860
  * @param params.signal - An
849
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
850
- * signal, which can be used to abort waiting as desired.
861
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
862
+ * can be used to abort waiting as desired.
851
863
  * @param params.onProgress - Upload progress callback.
852
864
  */
853
865
 
@@ -939,8 +951,8 @@ export class File extends Endpoint {
939
951
  }
940
952
 
941
953
  /**
942
- * Makes the given version active on client side. Does not change the active file version on
943
- * the server.
954
+ * Makes the given version active on client side. Does not change the active file version on the
955
+ * server.
944
956
  *
945
957
  * This version change will affect the result:
946
958
  *
@@ -957,11 +969,11 @@ export class File extends Endpoint {
957
969
  * - {@link waitForDone | waitForDone()}
958
970
  * - Viewer.open()
959
971
  *
960
- * Other clients will still continue to use the current active version of the file. Use
961
- * `undefined` to revert back to the active version.
972
+ * Other clients will still continue to use the current active version of the file. Use `undefined` to
973
+ * revert back to the active version.
962
974
  *
963
- * You need to reload the file data using {@link checkout | checkout()} to match the size and
964
- * status fields to the version you selected.
975
+ * You need to reload the file data using {@link checkout | checkout()} to match the size and status
976
+ * fields to the version you selected.
965
977
  */
966
978
  override useVersion(version?: number): this {
967
979
  return super.useVersion(version);
@@ -98,10 +98,9 @@ export interface IHttpClient {
98
98
  * Upload a file to the server.
99
99
  *
100
100
  * @param relativePath - Upload endpoint relative path.
101
- * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object
102
- * are generally retrieved from a
103
- * {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList} object returned as
104
- * a result of a user selecting files using the HTML `<input>` element.
101
+ * @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are
102
+ * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}
103
+ * object returned as a result of a user selecting files using the HTML `<input>` element.
105
104
  * @param onProgress - Upload progress callback.
106
105
  * @param init - A set of options that can be used to configure a fetch request. See
107
106
  * {@link https://developer.mozilla.org/docs/Web/API/RequestInit | RequestInit} for more details.
package/src/Api/IRole.ts CHANGED
@@ -26,8 +26,8 @@
26
26
  */
27
27
  export interface IRoleActions {
28
28
  /**
29
- * Defines what actions are allowed to be performed at the project level. The available
30
- * actions include:
29
+ * Defines what actions are allowed to be performed at the project level. The available actions
30
+ * include:
31
31
  *
32
32
  * - `update` - The ability to update the project details.
33
33
  * - `createTopic` - The ability to create a new topic.
@@ -49,8 +49,8 @@ export interface IRoleActions {
49
49
  topicActions?: string[];
50
50
 
51
51
  /**
52
- * Defines what actions are allowed to be performed at the comment level. The available
53
- * actions include:
52
+ * Defines what actions are allowed to be performed at the comment level. The available actions
53
+ * include:
54
54
  *
55
55
  * - `update` - The ability to update the comment.
56
56
  * - `delete` - The ability to delete the comment.
@@ -58,8 +58,8 @@ export interface IRoleActions {
58
58
  commentActions?: string[];
59
59
 
60
60
  /**
61
- * Defines what actions are allowed to be performed at the viewpoint level. The available
62
- * actions include:
61
+ * Defines what actions are allowed to be performed at the viewpoint level. The available actions
62
+ * include:
63
63
  *
64
64
  * - `update` - The ability to update the viewpoint.
65
65
  * - `delete` - The ability to delete the viewpoint.
@@ -53,7 +53,7 @@ export interface ISharedLinkPermissions {
53
53
  /**
54
54
  * true if the shared link is password protected.
55
55
  */
56
- readonly passwordProtected?: string;
56
+ readonly passwordProtected?: boolean;
57
57
 
58
58
  /**
59
59
  * Link expiration time (UTC) in the format specified in
package/src/Api/IUser.ts CHANGED
@@ -56,14 +56,14 @@ export interface IShortUserDesc {
56
56
  avatarUrl?: string;
57
57
 
58
58
  /**
59
- * User full name. Contains the user's first and last name. If first name and last names are
60
- * empty, contains the user name.
59
+ * User full name. Contains the user's first and last name. If first name and last names are empty,
60
+ * contains the user name.
61
61
  */
62
62
  fullName?: string;
63
63
 
64
64
  /**
65
- * User initials. Contains a first letters of the user's first and last names. If first name
66
- * and last names are empty, contains the first letter of the user name.
65
+ * User initials. Contains a first letters of the user's first and last names. If first name and last
66
+ * names are empty, contains the first letter of the user name.
67
67
  */
68
68
  initials?: string;
69
69
  }
package/src/Api/Job.ts CHANGED
@@ -121,8 +121,8 @@ export class Job extends Endpoint {
121
121
  }
122
122
 
123
123
  /**
124
- * Job type. Can be `properties`, `geomerty`, `geomertyGltf`, `validation`, `clash`, `dwg`,
125
- * `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom job name.
124
+ * Job type. Can be `properties`, `geomerty`, `geomertyGltf`, `validation`, `clash`, `dwg`, `obj`,
125
+ * `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom job name.
126
126
  *
127
127
  * @readonly
128
128
  */
@@ -180,8 +180,8 @@ export class Job extends Endpoint {
180
180
  /**
181
181
  * Updates job data on the server.
182
182
  *
183
- * Only administrators can update job data. If the current logged in user is not an
184
- * administrator, an exception will be thrown.
183
+ * Only administrators can update job data. If the current logged in user is not an administrator, an
184
+ * exception will be thrown.
185
185
  *
186
186
  * @param data - Raw job data. For more information, see
187
187
  * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
@@ -193,8 +193,8 @@ export class Job extends Endpoint {
193
193
  }
194
194
 
195
195
  /**
196
- * Deletes a job from the server job list. Jobs that are in progress or have already been
197
- * completed cannot be deleted.
196
+ * Deletes a job from the server job list. Jobs that are in progress or have already been completed
197
+ * cannot be deleted.
198
198
  *
199
199
  * @returns Returns the raw data of a deleted job. For more information, see
200
200
  * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
@@ -215,13 +215,13 @@ export class Job extends Endpoint {
215
215
  * Waits for job to be done. Job is done when it changes to `done` or `failed` status.
216
216
  *
217
217
  * @param params - An object containing waiting parameters.
218
- * @param params.timeout - The time, in milliseconds that the function should wait job. If
219
- * jobs is not done during this time, the `TimeoutError` exception will be thrown.
220
- * @param params.interval - The time, in milliseconds, the function should delay in between
221
- * checking job status.
218
+ * @param params.timeout - The time, in milliseconds that the function should wait job. If jobs is not
219
+ * done during this time, the `TimeoutError` exception will be thrown.
220
+ * @param params.interval - The time, in milliseconds, the function should delay in between checking
221
+ * job status.
222
222
  * @param params.signal - An
223
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
224
- * signal, which can be used to abort waiting as desired.
223
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
224
+ * can be used to abort waiting as desired.
225
225
  * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
226
226
  */
227
227
  waitForDone(params?: {
package/src/Api/Member.ts CHANGED
@@ -27,8 +27,8 @@ import { IShortUserDesc } from "./IUser";
27
27
  import { userFullName, userInitials } from "./Utils";
28
28
 
29
29
  /**
30
- * Provides properties and methods for obtaining information about a {@link User | user} who has
31
- * access to the {@link Project | project}.
30
+ * Provides properties and methods for obtaining information about a {@link User | user} who has access to
31
+ * the {@link Project | project}.
32
32
  */
33
33
  export class Member extends Endpoint {
34
34
  private _data: any;
@@ -71,8 +71,8 @@ export class Member extends Endpoint {
71
71
  }
72
72
 
73
73
  /**
74
- * Member role name in the project. See {@link Project.getRoles | Project.getRoles()} for list
75
- * of project roles.
74
+ * Member role name in the project. See {@link Project.getRoles | Project.getRoles()} for list of
75
+ * project roles.
76
76
  */
77
77
  get role(): string {
78
78
  return this.data.role;
@@ -132,8 +132,8 @@ export class Member extends Endpoint {
132
132
  }
133
133
 
134
134
  /**
135
- * Saves member properties changes to the server. Call this method to update member data on
136
- * the server after any property changes.
135
+ * Saves member properties changes to the server. Call this method to update member data on the server
136
+ * after any property changes.
137
137
  */
138
138
  save(): Promise<this> {
139
139
  return this.update(this.data);