@inweb/client 25.7.0 → 25.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +185 -348
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +6 -6
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Assembly.d.ts +19 -42
- package/lib/Api/ClashTest.d.ts +7 -16
- package/lib/Api/Client.d.ts +25 -58
- package/lib/Api/ClientEvents.d.ts +4 -2
- package/lib/Api/FetchError.d.ts +3 -5
- package/lib/Api/File.d.ts +67 -105
- package/lib/Api/Job.d.ts +11 -16
- package/lib/Api/Member.d.ts +1 -7
- package/lib/Api/Model.d.ts +19 -26
- package/lib/Api/Permission.d.ts +0 -6
- package/lib/Api/Project.d.ts +13 -34
- package/lib/Api/Role.d.ts +0 -6
- package/lib/Api/User.d.ts +3 -10
- package/package.json +3 -3
- package/src/Api/Assembly.ts +21 -44
- package/src/Api/ClashTest.ts +9 -18
- package/src/Api/Client.ts +27 -60
- package/src/Api/ClientEvents.ts +4 -2
- package/src/Api/Fetch.ts +2 -2
- package/src/Api/FetchError.ts +5 -7
- package/src/Api/File.ts +69 -107
- package/src/Api/HttpClient.ts +2 -2
- package/src/Api/IAssembly.ts +2 -2
- package/src/Api/IFile.ts +2 -2
- package/src/Api/IHttpClient.ts +2 -2
- package/src/Api/IUser.ts +2 -2
- package/src/Api/Job.ts +14 -19
- package/src/Api/Member.ts +3 -9
- package/src/Api/Model.ts +21 -28
- package/src/Api/Permission.ts +2 -8
- package/src/Api/Project.ts +15 -36
- package/src/Api/Role.ts +2 -8
- package/src/Api/User.ts +5 -12
- package/src/Api/Utils.ts +2 -2
- package/src/Api/XMLHttp.ts +2 -2
- package/src/index.ts +2 -2
package/src/Api/File.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -84,8 +84,8 @@ export class File {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
-
* File creation time (UTC) in the format specified in
|
|
88
|
-
*
|
|
87
|
+
* File creation time (UTC) in the format specified in
|
|
88
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
89
89
|
*
|
|
90
90
|
* @readonly
|
|
91
91
|
*/
|
|
@@ -145,7 +145,8 @@ export class File {
|
|
|
145
145
|
/**
|
|
146
146
|
* Returns a list of files in different formats in which the active version of the file was
|
|
147
147
|
* exported. To export file to one of the supported formats create File Converter job using
|
|
148
|
-
* {@link
|
|
148
|
+
* {@link createJob | createJob()}. To download exported file use
|
|
149
|
+
* {@link downloadResource | downloadResource()}.
|
|
149
150
|
*
|
|
150
151
|
* @readonly
|
|
151
152
|
*/
|
|
@@ -216,7 +217,7 @@ export class File {
|
|
|
216
217
|
|
|
217
218
|
/**
|
|
218
219
|
* File preview image URL or empty string if the file does not have a preview. Use
|
|
219
|
-
* {@link
|
|
220
|
+
* {@link setPreview | setPreview()} to change preview image.
|
|
220
221
|
*
|
|
221
222
|
* @readonly
|
|
222
223
|
*/
|
|
@@ -271,8 +272,8 @@ export class File {
|
|
|
271
272
|
}
|
|
272
273
|
|
|
273
274
|
/**
|
|
274
|
-
* File last update time (UTC) in the format specified in
|
|
275
|
-
*
|
|
275
|
+
* File last update time (UTC) in the format specified in
|
|
276
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
276
277
|
*
|
|
277
278
|
* @readonly
|
|
278
279
|
*/
|
|
@@ -316,8 +317,6 @@ export class File {
|
|
|
316
317
|
|
|
317
318
|
/**
|
|
318
319
|
* Refresh file data.
|
|
319
|
-
*
|
|
320
|
-
* @async
|
|
321
320
|
*/
|
|
322
321
|
async checkout(): Promise<this> {
|
|
323
322
|
const response = await this.internalGet("");
|
|
@@ -328,7 +327,6 @@ export class File {
|
|
|
328
327
|
/**
|
|
329
328
|
* Update file data on the server.
|
|
330
329
|
*
|
|
331
|
-
* @async
|
|
332
330
|
* @param data - Raw file data.
|
|
333
331
|
*/
|
|
334
332
|
async update(data: any): Promise<this> {
|
|
@@ -340,7 +338,6 @@ export class File {
|
|
|
340
338
|
/**
|
|
341
339
|
* Delete the file and all its versions from the server.
|
|
342
340
|
*
|
|
343
|
-
* @async
|
|
344
341
|
* @returns Returns the raw data of a deleted file.
|
|
345
342
|
*/
|
|
346
343
|
delete(): Promise<any> {
|
|
@@ -350,8 +347,6 @@ export class File {
|
|
|
350
347
|
/**
|
|
351
348
|
* Save file data changes to the server. Call this method to update file data on the server
|
|
352
349
|
* after any changes.
|
|
353
|
-
*
|
|
354
|
-
* @async
|
|
355
350
|
*/
|
|
356
351
|
save(): Promise<this> {
|
|
357
352
|
return this.update(this.data);
|
|
@@ -360,7 +355,6 @@ export class File {
|
|
|
360
355
|
/**
|
|
361
356
|
* Set or remove the file preview.
|
|
362
357
|
*
|
|
363
|
-
* @async
|
|
364
358
|
* @param image - Preview image.Can be a
|
|
365
359
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
366
360
|
* string,
|
|
@@ -381,8 +375,6 @@ export class File {
|
|
|
381
375
|
|
|
382
376
|
/**
|
|
383
377
|
* Remove the file preview.
|
|
384
|
-
*
|
|
385
|
-
* @async
|
|
386
378
|
*/
|
|
387
379
|
async deletePreview(): Promise<this> {
|
|
388
380
|
const response = await this.internalDelete("/preview");
|
|
@@ -392,8 +384,6 @@ export class File {
|
|
|
392
384
|
|
|
393
385
|
/**
|
|
394
386
|
* Returns a list of models of the active version of the file.
|
|
395
|
-
*
|
|
396
|
-
* @async
|
|
397
387
|
*/
|
|
398
388
|
getModels(): Promise<Model[]> {
|
|
399
389
|
return this.internalGet("/geometry")
|
|
@@ -423,7 +413,6 @@ export class File {
|
|
|
423
413
|
/**
|
|
424
414
|
* Returns the properties for an objects in the active version of the file.
|
|
425
415
|
*
|
|
426
|
-
* @async
|
|
427
416
|
* @param handles - Object original handle or handles array. Leave this parameter `undefined`
|
|
428
417
|
* to get properties for all objects in the file.
|
|
429
418
|
*/
|
|
@@ -452,7 +441,6 @@ export class File {
|
|
|
452
441
|
* Returns the list of original handles for an objects in the active version of the file that
|
|
453
442
|
* match the specified patterns. Search patterns may be combined using query operators.
|
|
454
443
|
*
|
|
455
|
-
* @async
|
|
456
444
|
* @example <caption>Simple search pattern.</caption>
|
|
457
445
|
* searchPattern = {
|
|
458
446
|
* key: "Category",
|
|
@@ -483,8 +471,6 @@ export class File {
|
|
|
483
471
|
|
|
484
472
|
/**
|
|
485
473
|
* Returns the cda.json for an active version of the file.
|
|
486
|
-
*
|
|
487
|
-
* @async
|
|
488
474
|
*/
|
|
489
475
|
getCdaTree(): Promise<any[]> {
|
|
490
476
|
return this.internalGet(`/properties/tree`).then((response) => response.json());
|
|
@@ -492,8 +478,6 @@ export class File {
|
|
|
492
478
|
|
|
493
479
|
/**
|
|
494
480
|
* Returns a list of file viewpoints.
|
|
495
|
-
*
|
|
496
|
-
* @async
|
|
497
481
|
*/
|
|
498
482
|
getViewpoints(): Promise<any[]> {
|
|
499
483
|
return this.internalGet("/viewpoints")
|
|
@@ -502,9 +486,8 @@ export class File {
|
|
|
502
486
|
}
|
|
503
487
|
|
|
504
488
|
/**
|
|
505
|
-
* Add new file viewpoint. To create a
|
|
489
|
+
* Add new file viewpoint. To create a viewpoint use `Viewer.createViewpoint()`.
|
|
506
490
|
*
|
|
507
|
-
* @async
|
|
508
491
|
* @param viewpoint - Viewpoint.
|
|
509
492
|
*/
|
|
510
493
|
saveViewpoint(viewpoint: any): Promise<any> {
|
|
@@ -514,7 +497,6 @@ export class File {
|
|
|
514
497
|
/**
|
|
515
498
|
* Delete file viewpoint.
|
|
516
499
|
*
|
|
517
|
-
* @async
|
|
518
500
|
* @param guid - Viewpoint GUID.
|
|
519
501
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
520
502
|
*/
|
|
@@ -526,7 +508,6 @@ export class File {
|
|
|
526
508
|
* Returns viewpoint preview image as
|
|
527
509
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
|
|
528
510
|
*
|
|
529
|
-
* @async
|
|
530
511
|
* @param guid - Viewpoint GUID.
|
|
531
512
|
*/
|
|
532
513
|
getSnapshot(guid: string): Promise<string> {
|
|
@@ -536,7 +517,6 @@ export class File {
|
|
|
536
517
|
/**
|
|
537
518
|
* Returns viewpoint preview data.
|
|
538
519
|
*
|
|
539
|
-
* @async
|
|
540
520
|
* @param guid - Viewpoint GUID.
|
|
541
521
|
* @param bitmapGuid - Bitmap GUID.
|
|
542
522
|
*/
|
|
@@ -547,11 +527,10 @@ export class File {
|
|
|
547
527
|
/**
|
|
548
528
|
* Download source of active version of the file.
|
|
549
529
|
*
|
|
550
|
-
* @async
|
|
551
530
|
* @param onProgress - Download progress callback.
|
|
552
|
-
* @param signal - An
|
|
553
|
-
*
|
|
554
|
-
* and abort it if desired.
|
|
531
|
+
* @param signal - An
|
|
532
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
533
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
555
534
|
*/
|
|
556
535
|
download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer> {
|
|
557
536
|
const relativePath = this.appendVersionParam("/downloads");
|
|
@@ -575,9 +554,9 @@ export class File {
|
|
|
575
554
|
*
|
|
576
555
|
* @param dataId - Resource file name.
|
|
577
556
|
* @param onProgress - Download progress callback.
|
|
578
|
-
* @param signal - An
|
|
579
|
-
*
|
|
580
|
-
* and abort it if desired.
|
|
557
|
+
* @param signal - An
|
|
558
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
559
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
581
560
|
*/
|
|
582
561
|
downloadResource(
|
|
583
562
|
dataId: string,
|
|
@@ -598,9 +577,9 @@ export class File {
|
|
|
598
577
|
* @param ranges - A range of resource file contents to download.
|
|
599
578
|
* @param requestId - Request ID for download progress callback.
|
|
600
579
|
* @param onProgress - Download progress callback.
|
|
601
|
-
* @param signal - An
|
|
602
|
-
*
|
|
603
|
-
* and abort it if desired.
|
|
580
|
+
* @param signal - An
|
|
581
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
582
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
604
583
|
*/
|
|
605
584
|
downloadResourceRange(
|
|
606
585
|
dataId: string,
|
|
@@ -616,7 +595,9 @@ export class File {
|
|
|
616
595
|
}
|
|
617
596
|
|
|
618
597
|
/**
|
|
619
|
-
* Deprecated since `25.3`. Use {@link
|
|
598
|
+
* Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.
|
|
599
|
+
*
|
|
600
|
+
* @deprecated
|
|
620
601
|
*/
|
|
621
602
|
partialDownloadResource(
|
|
622
603
|
dataId: string,
|
|
@@ -630,7 +611,9 @@ export class File {
|
|
|
630
611
|
}
|
|
631
612
|
|
|
632
613
|
/**
|
|
633
|
-
* Deprecated since `25.3`. Use {@link
|
|
614
|
+
* Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.
|
|
615
|
+
*
|
|
616
|
+
* @deprecated
|
|
634
617
|
*/
|
|
635
618
|
async downloadFileRange(
|
|
636
619
|
requestId: number,
|
|
@@ -645,10 +628,9 @@ export class File {
|
|
|
645
628
|
/**
|
|
646
629
|
* Returns a list of references to files used to correct rendering of the current file.
|
|
647
630
|
*
|
|
648
|
-
* @
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
* signal object instance, which can be used to abort waiting as desired.
|
|
631
|
+
* @param signal - An
|
|
632
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
633
|
+
* signal, which can be used to abort waiting as desired.
|
|
652
634
|
*/
|
|
653
635
|
getReferences(signal?: AbortSignal): Promise<IFileReferences> {
|
|
654
636
|
return this.internalGet("/references", signal).then((response) => response.json());
|
|
@@ -657,7 +639,6 @@ export class File {
|
|
|
657
639
|
/**
|
|
658
640
|
* Set the file references.
|
|
659
641
|
*
|
|
660
|
-
* @async
|
|
661
642
|
* @param references - File references.
|
|
662
643
|
*/
|
|
663
644
|
setReferences(references: IFileReferences): Promise<IFileReferences> {
|
|
@@ -667,7 +648,6 @@ export class File {
|
|
|
667
648
|
/**
|
|
668
649
|
* Create a new job for the active version of the file.
|
|
669
650
|
*
|
|
670
|
-
* @async
|
|
671
651
|
* @param outputFormat - The job type. Can be one of:
|
|
672
652
|
*
|
|
673
653
|
* - `geometry` - Extract file geometry data into `VSFX`.
|
|
@@ -675,14 +655,13 @@ export class File {
|
|
|
675
655
|
* - `properties` - Extract file properties.
|
|
676
656
|
* - `validation` - Validate the file. Only for `IFC`.
|
|
677
657
|
* - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the
|
|
678
|
-
* supported format. Use {@link
|
|
679
|
-
*
|
|
680
|
-
*
|
|
681
|
-
*
|
|
682
|
-
* before creating a job.
|
|
658
|
+
* supported format. Use {@link exports | exports()} to get the list of completed file
|
|
659
|
+
* exports. Use {@link downloadResource | downloadResource()} to download the exported file.
|
|
660
|
+
* - Other custom job name. Custom job runner must be registered in the job templates before
|
|
661
|
+
* creating a job.
|
|
683
662
|
*
|
|
684
663
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
685
|
-
* for the File Converter tool in form
|
|
664
|
+
* for the File Converter tool in form `--arg=value`.
|
|
686
665
|
*/
|
|
687
666
|
createJob(outputFormat: string, parameters?: string | object): Promise<Job> {
|
|
688
667
|
const relativePath = this.appendVersionParam("/jobs");
|
|
@@ -698,16 +677,15 @@ export class File {
|
|
|
698
677
|
|
|
699
678
|
/**
|
|
700
679
|
* Create job to extract geometry data of active version of the file. This is alias to
|
|
701
|
-
* {@link
|
|
680
|
+
* {@link createJob | createJob("geometry")}.
|
|
702
681
|
*
|
|
703
|
-
* @async
|
|
704
682
|
* @param type - Geometry data type. Can be one of:
|
|
705
683
|
*
|
|
706
684
|
* - `vsfx` - `VSFX` (default), for opening a file in `VisualizeJS` viewer.
|
|
707
685
|
* - `gltf` - `glTF`, for opening a file in `Three.js` viewer.
|
|
708
686
|
*
|
|
709
687
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
710
|
-
* for the File Converter tool in form
|
|
688
|
+
* for the File Converter tool in form `--arg=value`.
|
|
711
689
|
*/
|
|
712
690
|
extractGeometry(type?: string, parameters?: string | object): Promise<Job> {
|
|
713
691
|
return this.createJob(type === "gltf" ? "geometryGltf" : "geometry", parameters);
|
|
@@ -715,11 +693,10 @@ export class File {
|
|
|
715
693
|
|
|
716
694
|
/**
|
|
717
695
|
* Create job to extract properties of the active version of the file. This is alias to
|
|
718
|
-
* {@link
|
|
696
|
+
* {@link createJob | createJob("properties")}.
|
|
719
697
|
*
|
|
720
|
-
* @async
|
|
721
698
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
722
|
-
* for the File Converter tool in form
|
|
699
|
+
* for the File Converter tool in form `--arg=value`.
|
|
723
700
|
*/
|
|
724
701
|
extractProperties(parameters?: string | object): Promise<Job> {
|
|
725
702
|
return this.createJob("properties", parameters);
|
|
@@ -727,14 +704,12 @@ export class File {
|
|
|
727
704
|
|
|
728
705
|
/**
|
|
729
706
|
* Create a job to validate the active version of the file. This is alias to
|
|
730
|
-
* {@link
|
|
707
|
+
* {@link createJob | createJob("validation")}.
|
|
731
708
|
*
|
|
732
|
-
* To get validation report use
|
|
733
|
-
* {@link File.downloadResource | File.downloadResource("validation_report.json")}.
|
|
709
|
+
* To get validation report use {@link downloadResource | downloadResource("validation_report.json")}.
|
|
734
710
|
*
|
|
735
|
-
* @async
|
|
736
711
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
737
|
-
* for the File Converter tool in form
|
|
712
|
+
* for the File Converter tool in form `--arg=value`.
|
|
738
713
|
*/
|
|
739
714
|
validate(parameters?: string | object): Promise<Job> {
|
|
740
715
|
return this.createJob("validation", parameters);
|
|
@@ -744,22 +719,20 @@ export class File {
|
|
|
744
719
|
* Wait for jobs of the active version of the file to be done. Job is done when it changes to
|
|
745
720
|
* `none`, `done` or `failed` status.
|
|
746
721
|
*
|
|
747
|
-
* @
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
* @param
|
|
754
|
-
*
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
758
|
-
*
|
|
759
|
-
*
|
|
760
|
-
*
|
|
761
|
-
* @param {function} [params.onCheckout] - Waiting progress callback. Return `true` to cancel waiting.
|
|
762
|
-
* @returns {Promise<File>}
|
|
722
|
+
* @param jobs - Job or job array to wait on. Can be `geometry`, `geometryGltf`,
|
|
723
|
+
* `properties`, `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom
|
|
724
|
+
* job name.
|
|
725
|
+
* @param waitAll - If this parameter is `true`, the function returns when all the specified
|
|
726
|
+
* jobs have done. If `false`, the function returns when any one of the jobs are done.
|
|
727
|
+
* @param params - An object containing waiting parameters.
|
|
728
|
+
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
729
|
+
* no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
730
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
731
|
+
* checking jobs status.
|
|
732
|
+
* @param params.signal - An
|
|
733
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
734
|
+
* signal, which can be used to abort waiting as desired.
|
|
735
|
+
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
763
736
|
*/
|
|
764
737
|
waitForDone(
|
|
765
738
|
jobs: string | string[],
|
|
@@ -790,8 +763,6 @@ export class File {
|
|
|
790
763
|
|
|
791
764
|
/**
|
|
792
765
|
* Returns a list of file permissions.
|
|
793
|
-
*
|
|
794
|
-
* @async
|
|
795
766
|
*/
|
|
796
767
|
getPermissions(): Promise<Permission[]> {
|
|
797
768
|
return this.internalGet("/permissions")
|
|
@@ -802,7 +773,6 @@ export class File {
|
|
|
802
773
|
/**
|
|
803
774
|
* Returns the permission information.
|
|
804
775
|
*
|
|
805
|
-
* @async
|
|
806
776
|
* @param permissionId - Permission ID.
|
|
807
777
|
*/
|
|
808
778
|
getPermission(permissionId: string): Promise<Permission> {
|
|
@@ -814,11 +784,10 @@ export class File {
|
|
|
814
784
|
/**
|
|
815
785
|
* Create a new file permission.
|
|
816
786
|
*
|
|
817
|
-
* @async
|
|
818
787
|
* @param actions - Actions are allowed to be performed on a file with this permission. See
|
|
819
|
-
* {@link Permission
|
|
788
|
+
* {@link Permission.actions} for more details.
|
|
820
789
|
* @param grantedTo - A collection of principials that will get access to the file.
|
|
821
|
-
* @param
|
|
790
|
+
* @param _public - Specifies whether all users have access to the file or not.
|
|
822
791
|
*/
|
|
823
792
|
createPermission(actions: string | string[], grantedTo: any[], _public: boolean): Promise<Permission> {
|
|
824
793
|
return this.internalPost("/permissions", {
|
|
@@ -833,7 +802,6 @@ export class File {
|
|
|
833
802
|
/**
|
|
834
803
|
* Delete file permission.
|
|
835
804
|
*
|
|
836
|
-
* @async
|
|
837
805
|
* @param permissionId - Permission ID.
|
|
838
806
|
* @returns Returns the raw data of a deleted permission.
|
|
839
807
|
*/
|
|
@@ -844,23 +812,22 @@ export class File {
|
|
|
844
812
|
/**
|
|
845
813
|
* Upload the new version of the file to the server and extract the geometry and properties as needed.
|
|
846
814
|
*
|
|
847
|
-
* @
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
*
|
|
851
|
-
* object returned as a result of a user selecting files using the HTML `<input>` element.
|
|
815
|
+
* @param file - Web API {@link https://developer.mozilla.org/docs/Web/API/File | File} object
|
|
816
|
+
* are generally retrieved from a
|
|
817
|
+
* {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList} object returned as
|
|
818
|
+
* a result of a user selecting files using the HTML `<input>` element.
|
|
852
819
|
* @param params - An object containing upload parameters.
|
|
853
|
-
* @param params.geometry
|
|
854
|
-
*
|
|
855
|
-
* @param params.properties
|
|
856
|
-
* @param params.waitForDone
|
|
820
|
+
* @param params.geometry - Create job to extract file geometry data. The geometry data type
|
|
821
|
+
* is the same as the original file.
|
|
822
|
+
* @param params.properties - Create job to extract file properties.
|
|
823
|
+
* @param params.waitForDone - Wait for geometry and properties jobs to complete.
|
|
857
824
|
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
858
825
|
* no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
859
826
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
860
827
|
* checking jobs status.
|
|
861
|
-
* @param params.signal - An
|
|
862
|
-
*
|
|
863
|
-
* signal
|
|
828
|
+
* @param params.signal - An
|
|
829
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
830
|
+
* signal, which can be used to abort waiting as desired.
|
|
864
831
|
* @param params.onProgress - Upload progress callback.
|
|
865
832
|
*/
|
|
866
833
|
|
|
@@ -905,8 +872,6 @@ export class File {
|
|
|
905
872
|
|
|
906
873
|
/**
|
|
907
874
|
* Returns a list of version files.
|
|
908
|
-
*
|
|
909
|
-
* @async
|
|
910
875
|
*/
|
|
911
876
|
getVersions(): Promise<File[]> {
|
|
912
877
|
return this.internalGet("/versions")
|
|
@@ -918,7 +883,6 @@ export class File {
|
|
|
918
883
|
/**
|
|
919
884
|
* Returns the version file.
|
|
920
885
|
*
|
|
921
|
-
* @async
|
|
922
886
|
* @param version - Desired version.
|
|
923
887
|
*/
|
|
924
888
|
getVersion(version: number): Promise<File> {
|
|
@@ -931,7 +895,6 @@ export class File {
|
|
|
931
895
|
/**
|
|
932
896
|
* Delete version file.
|
|
933
897
|
*
|
|
934
|
-
* @async
|
|
935
898
|
* @param version - Version to delete.
|
|
936
899
|
*/
|
|
937
900
|
async deleteVersion(version: number): Promise<any> {
|
|
@@ -944,7 +907,6 @@ export class File {
|
|
|
944
907
|
/**
|
|
945
908
|
* Replace the active version of the file with the selected version.
|
|
946
909
|
*
|
|
947
|
-
* @async
|
|
948
910
|
* @param version - Desired active version.
|
|
949
911
|
*/
|
|
950
912
|
|
|
@@ -972,8 +934,8 @@ export class File {
|
|
|
972
934
|
* Other clients will still continue to use the current active version of the file. Use
|
|
973
935
|
* `undefined` to revert back to the active version.
|
|
974
936
|
*
|
|
975
|
-
* Note. You need to update the file data using
|
|
976
|
-
*
|
|
937
|
+
* Note. You need to update the file data using {@link checkout | checkout()} to match the
|
|
938
|
+
* size and status fields to the version you selected.
|
|
977
939
|
*/
|
|
978
940
|
useVersion(version?: number): this {
|
|
979
941
|
this._useVersion = version;
|
package/src/Api/HttpClient.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
package/src/Api/IAssembly.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
package/src/Api/IFile.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
package/src/Api/IHttpClient.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
package/src/Api/IUser.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|