@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
@@ -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 add
37
- * custom headers at any time.
36
+ * Endpoint-specific HTTP headers for the `GET`, `POST`, `PUT` and `DELETE` requests. You can
37
+ * add 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 specified HTTP
47
- * client.
46
+ * @param path - The API path of the endpoint relative to the REST API server URL of the
47
+ * specified HTTP 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} signal. Allows
80
- * to communicate with a fetch request and abort it if desired.
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.
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 performed. A
104
- * `FetchError` is typically (but not exclusively) thrown when a network error occurs, access denied, or
105
- * object not found.
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.
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 {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code}
121
- * of the response.
120
+ * @property status - The
121
+ * {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code} 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 Server and
37
- * managing its data and versions.
36
+ * Provides properties and methods for obtaining information about a file on the Open Cloud
37
+ * Server and 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 geometry data
145
- * 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
145
+ * geometry data 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 other
166
- * formats.
165
+ * A files with deleted source file can be opened in the viewer, but cannot be exported to
166
+ * other 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 version file
329
- * use {@link deleteVersion | deleteVersion()}.
328
+ * You cannot delete a version file using `delete()`, only the original file. To delete a
329
+ * version file 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 server
340
- * after any property changes.
339
+ * Saves file properties changes to the server. Call this method to update file data on the
340
+ * server after any property changes.
341
341
  */
342
342
  save(): Promise<this> {
343
343
  return this.update(this.data);
@@ -347,11 +347,12 @@ 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} string,
350
+ * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
351
+ * string,
351
352
  * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},
352
353
  * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or
353
- * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`
354
- * to `null` will remove the preview.
354
+ * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting
355
+ * the `image` to `null` will remove the preview.
355
356
  */
356
357
  async setPreview(image?: BodyInit | null): Promise<this> {
357
358
  if (!image) {
@@ -403,8 +404,8 @@ export class File extends Endpoint {
403
404
  /**
404
405
  * Returns the properties for an objects in the active version of the file.
405
406
  *
406
- * @param handles - Object original handle or handles array. Specify `undefined` to get properties for
407
- * all objects in the file.
407
+ * @param handles - Object original handle or handles array. Specify `undefined` to get
408
+ * properties for all objects in the file.
408
409
  */
409
410
  getProperties(handles?: string | string[]): Promise<any[]> {
410
411
  const relativePath = handles !== undefined ? `/properties?handles=${handles}` : "/properties";
@@ -423,41 +424,35 @@ export class File extends Endpoint {
423
424
  * Query operator. Operator name can be `$and`, `$or`, `$not`, `$eq`, `$regex`.
424
425
  *
425
426
  * @typedef {any} QueryOperator
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.
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.
461
456
  * @returns {Promise<Properties[]>}
462
457
  */
463
458
 
@@ -528,8 +523,8 @@ export class File extends Endpoint {
528
523
  *
529
524
  * @param onProgress - Download progress callback.
530
525
  * @param signal - An
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.
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.
533
528
  */
534
529
  download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {
535
530
  return this.httpClient
@@ -538,26 +533,23 @@ export class File extends Endpoint {
538
533
  }
539
534
 
540
535
  /**
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.
543
- *
544
- * @example Export file to DWG.
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.
545
538
  *
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
- * ```
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);
555
547
  *
556
548
  * @param dataId - Resource file name.
557
549
  * @param onProgress - Download progress callback.
558
550
  * @param signal - An
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.
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.
561
553
  */
562
554
  downloadResource(
563
555
  dataId: string,
@@ -570,16 +562,16 @@ export class File extends Endpoint {
570
562
  }
571
563
 
572
564
  /**
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.
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.
575
567
  *
576
568
  * @param dataId - Resource file name.
577
569
  * @param ranges - A range of resource file contents to download.
578
570
  * @param requestId - Request ID for download progress callback.
579
571
  * @param onProgress - Download progress callback.
580
572
  * @param signal - An
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.
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.
583
575
  */
584
576
  downloadResourceRange(
585
577
  dataId: string,
@@ -636,8 +628,8 @@ export class File extends Endpoint {
636
628
  * References are images, fonts, or any other files to correct rendering of the file.
637
629
  *
638
630
  * @param signal - An
639
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
640
- * can be used to abort waiting as desired.
631
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
632
+ * signal, which can be used to abort waiting as desired.
641
633
  */
642
634
  getReferences(signal?: AbortSignal): Promise<IFileReferences> {
643
635
  return this.get("/references", signal).then((response) => response.json());
@@ -646,8 +638,8 @@ export class File extends Endpoint {
646
638
  /**
647
639
  * Sets the file references.
648
640
  *
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.
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.
651
643
  *
652
644
  * @param references - File references.
653
645
  */
@@ -664,14 +656,14 @@ export class File extends Endpoint {
664
656
  * - `geometryGltf` - Convert file geometry data to `glTF` format suitable for `Three.js` viewer.
665
657
  * - `properties` - Extract file properties.
666
658
  * - `validation` - Validate the file. Only for `IFC` files.
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.
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.
672
664
  *
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`.
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`.
675
667
  */
676
668
  createJob(outputFormat: string, parameters?: string | object): Promise<Job> {
677
669
  const jobs = new Endpoint("/jobs", this.httpClient, this.headers);
@@ -694,8 +686,8 @@ export class File extends Endpoint {
694
686
  * - `vsfx` - `VSFX` format (default), for opening a file in `VisualizeJS` viewer.
695
687
  * - `gltf` - `glTF` format, for opening a file in `Three.js` viewer.
696
688
  *
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`.
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`.
699
691
  */
700
692
  extractGeometry(type?: string, parameters?: string | object): Promise<Job> {
701
693
  return this.createJob(type === "gltf" ? "geometryGltf" : "geometry", parameters);
@@ -705,8 +697,8 @@ export class File extends Endpoint {
705
697
  * Runs a job to extract properties of the active version of the file. This is alias to
706
698
  * {@link createJob | createJob("properties")}.
707
699
  *
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`.
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`.
710
702
  */
711
703
  extractProperties(parameters?: string | object): Promise<Job> {
712
704
  return this.createJob("properties", parameters);
@@ -718,29 +710,30 @@ export class File extends Endpoint {
718
710
  *
719
711
  * To get validation report use {@link downloadResource | downloadResource("validation_report.json")}.
720
712
  *
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`.
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`.
723
715
  */
724
716
  validate(parameters?: string | object): Promise<Job> {
725
717
  return this.createJob("validation", parameters);
726
718
  }
727
719
 
728
720
  /**
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.
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.
731
723
  *
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.
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.
736
729
  * @param params - An object containing waiting parameters.
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.
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.
741
734
  * @param params.signal - An
742
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
743
- * can be used to abort waiting as desired.
735
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
736
+ * signal, which can be used to abort waiting as desired.
744
737
  * @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
745
738
  */
746
739
  waitForDone(
@@ -793,21 +786,15 @@ export class File extends Endpoint {
793
786
  /**
794
787
  * Creates a new file permission for a user, project, or group.
795
788
  *
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.
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);
805
793
  *
806
- * ```javascript
807
- * const actions = ["read", "readSourceFile"];
808
- * const grantedTo = [{ project: { id: myProject.id, name: myProject.name } }];
809
- * await file.createPermission(actions, grantedTo);
810
- * ```
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);
811
798
  *
812
799
  * @param actions - Actions are allowed to be performed on a file with this permission:
813
800
  *
@@ -842,24 +829,25 @@ export class File extends Endpoint {
842
829
  }
843
830
 
844
831
  /**
845
- * Uploads the new version of the file to the server, convert the geometry data and extract properties
846
- * as needed.
832
+ * Uploads the new version of the file to the server, convert the geometry data and extract
833
+ * properties as needed.
847
834
  *
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.
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.
851
839
  * @param params - An object containing upload parameters.
852
- * @param params.geometry - Create job to convert file geometry data. The geometry data type is the
853
- * same as the original file.
840
+ * @param params.geometry - Create job to convert file geometry data. The geometry data type
841
+ * is the same as the original file.
854
842
  * @param params.properties - Create job to extract file properties.
855
843
  * @param params.waitForDone - Wait for geometry and properties jobs to complete.
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.
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.
860
848
  * @param params.signal - An
861
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
862
- * can be used to abort waiting as desired.
849
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
850
+ * signal, which can be used to abort waiting as desired.
863
851
  * @param params.onProgress - Upload progress callback.
864
852
  */
865
853
 
@@ -951,8 +939,8 @@ export class File extends Endpoint {
951
939
  }
952
940
 
953
941
  /**
954
- * Makes the given version active on client side. Does not change the active file version on the
955
- * server.
942
+ * Makes the given version active on client side. Does not change the active file version on
943
+ * the server.
956
944
  *
957
945
  * This version change will affect the result:
958
946
  *
@@ -969,11 +957,11 @@ export class File extends Endpoint {
969
957
  * - {@link waitForDone | waitForDone()}
970
958
  * - Viewer.open()
971
959
  *
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.
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.
974
962
  *
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.
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.
977
965
  */
978
966
  override useVersion(version?: number): this {
979
967
  return super.useVersion(version);
@@ -98,9 +98,10 @@ 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 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.
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.
104
105
  * @param onProgress - Upload progress callback.
105
106
  * @param init - A set of options that can be used to configure a fetch request. See
106
107
  * {@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 actions
30
- * include:
29
+ * Defines what actions are allowed to be performed at the project level. The available
30
+ * actions 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 actions
53
- * include:
52
+ * Defines what actions are allowed to be performed at the comment level. The available
53
+ * actions 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 actions
62
- * include:
61
+ * Defines what actions are allowed to be performed at the viewpoint level. The available
62
+ * actions 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?: boolean;
56
+ readonly passwordProtected?: string;
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 empty,
60
- * contains the user name.
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.
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 and last
66
- * 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
66
+ * and last 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`, `obj`,
125
- * `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom job name.
124
+ * Job type. Can be `properties`, `geomerty`, `geomertyGltf`, `validation`, `clash`, `dwg`,
125
+ * `obj`, `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 administrator, an
184
- * exception will be thrown.
183
+ * Only administrators can update job data. If the current logged in user is not an
184
+ * administrator, an 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 completed
197
- * cannot be deleted.
196
+ * Deletes a job from the server job list. Jobs that are in progress or have already been
197
+ * completed 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 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.
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.
222
222
  * @param params.signal - An
223
- * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
224
- * can be used to abort waiting as desired.
223
+ * {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
224
+ * signal, which 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 access to
31
- * the {@link Project | project}.
30
+ * Provides properties and methods for obtaining information about a {@link User | user} who has
31
+ * access to 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 of
75
- * project roles.
74
+ * Member role name in the project. See {@link Project.getRoles | Project.getRoles()} for list
75
+ * of 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 the server
136
- * after any property changes.
135
+ * Saves member properties changes to the server. Call this method to update member data on
136
+ * the server after any property changes.
137
137
  */
138
138
  save(): Promise<this> {
139
139
  return this.update(this.data);