@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/dist/client.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
7
|
///////////////////////////////////////////////////////////////////////////////
|
|
8
|
-
// Copyright (C) 2002-
|
|
8
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
9
9
|
// All rights reserved.
|
|
10
10
|
//
|
|
11
11
|
// This software and its documentation and related materials are owned by
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
//
|
|
21
21
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
22
22
|
// license agreement with Open Design Alliance.
|
|
23
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
23
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
24
24
|
// All rights reserved.
|
|
25
25
|
//
|
|
26
26
|
// By use of this software, its documentation or related materials, you
|
|
@@ -109,11 +109,9 @@
|
|
|
109
109
|
*/
|
|
110
110
|
class FetchError extends Error {
|
|
111
111
|
/**
|
|
112
|
-
* @property status - The
|
|
113
|
-
*
|
|
114
|
-
* @property message - Error message.
|
|
115
|
-
* href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error"
|
|
116
|
-
* target ="_blank">Error</a>.
|
|
112
|
+
* @property status - The
|
|
113
|
+
* {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code} of the response.
|
|
114
|
+
* @property message - Error message.
|
|
117
115
|
*/
|
|
118
116
|
constructor(status, message) {
|
|
119
117
|
super(message || statusText(status));
|
|
@@ -124,7 +122,7 @@
|
|
|
124
122
|
}
|
|
125
123
|
|
|
126
124
|
///////////////////////////////////////////////////////////////////////////////
|
|
127
|
-
// Copyright (C) 2002-
|
|
125
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
128
126
|
// All rights reserved.
|
|
129
127
|
//
|
|
130
128
|
// This software and its documentation and related materials are owned by
|
|
@@ -139,7 +137,7 @@
|
|
|
139
137
|
//
|
|
140
138
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
141
139
|
// license agreement with Open Design Alliance.
|
|
142
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
140
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
143
141
|
// All rights reserved.
|
|
144
142
|
//
|
|
145
143
|
// By use of this software, its documentation or related materials, you
|
|
@@ -180,8 +178,8 @@
|
|
|
180
178
|
this._data = value;
|
|
181
179
|
}
|
|
182
180
|
/**
|
|
183
|
-
* Scene description resource file name. Use {@link
|
|
184
|
-
* scene description file.
|
|
181
|
+
* Scene description resource file name. Use {@link downloadResource | downloadResource()} to
|
|
182
|
+
* download scene description file.
|
|
185
183
|
*
|
|
186
184
|
* @readonly
|
|
187
185
|
*/
|
|
@@ -213,8 +211,8 @@
|
|
|
213
211
|
return this.data.fileId;
|
|
214
212
|
}
|
|
215
213
|
/**
|
|
216
|
-
* The list of geometry data resource files. Use {@link
|
|
217
|
-
* geometry data files.
|
|
214
|
+
* The list of geometry data resource files. Use {@link downloadResource | downloadResource()}
|
|
215
|
+
* to download geometry data files.
|
|
218
216
|
*
|
|
219
217
|
* @readonly
|
|
220
218
|
*/
|
|
@@ -252,8 +250,6 @@
|
|
|
252
250
|
}
|
|
253
251
|
/**
|
|
254
252
|
* Returns model list with one item `self`.
|
|
255
|
-
*
|
|
256
|
-
* @async
|
|
257
253
|
*/
|
|
258
254
|
getModels() {
|
|
259
255
|
return Promise.resolve([this]);
|
|
@@ -269,7 +265,6 @@
|
|
|
269
265
|
/**
|
|
270
266
|
* Set or delete a model transformation.
|
|
271
267
|
*
|
|
272
|
-
* @async
|
|
273
268
|
* @param handle - Model handle.
|
|
274
269
|
* @param transform - Transformation matrix. To delete transformation provide this to `undefined`.
|
|
275
270
|
*/
|
|
@@ -278,8 +273,6 @@
|
|
|
278
273
|
}
|
|
279
274
|
/**
|
|
280
275
|
* Returns model viewpoint list.
|
|
281
|
-
*
|
|
282
|
-
* @async
|
|
283
276
|
*/
|
|
284
277
|
getViewpoints() {
|
|
285
278
|
return this._file
|
|
@@ -289,7 +282,6 @@
|
|
|
289
282
|
/**
|
|
290
283
|
* Add new model viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
|
|
291
284
|
*
|
|
292
|
-
* @async
|
|
293
285
|
* @param viewpoint - Viewpoint.
|
|
294
286
|
*/
|
|
295
287
|
saveViewpoint(viewpoint) {
|
|
@@ -301,7 +293,6 @@
|
|
|
301
293
|
/**
|
|
302
294
|
* Delete model viewpoint.
|
|
303
295
|
*
|
|
304
|
-
* @async
|
|
305
296
|
* @param guid - Viewpoint GUID.
|
|
306
297
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
307
298
|
*/
|
|
@@ -312,7 +303,6 @@
|
|
|
312
303
|
* Returns viewpoint preview image as
|
|
313
304
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
|
|
314
305
|
*
|
|
315
|
-
* @async
|
|
316
306
|
* @param guid - Viewpoint GIID.
|
|
317
307
|
*/
|
|
318
308
|
getSnapshot(guid) {
|
|
@@ -321,7 +311,6 @@
|
|
|
321
311
|
/**
|
|
322
312
|
* Returns snapshot data.
|
|
323
313
|
*
|
|
324
|
-
* @async
|
|
325
314
|
* @param guid - Viewpoint GUID.
|
|
326
315
|
* @param bitmapGuid - Bitmap GUID.
|
|
327
316
|
*/
|
|
@@ -332,12 +321,11 @@
|
|
|
332
321
|
* Download model resource file. Resource files are files that contain model scene
|
|
333
322
|
* descriptions, or geometry data.
|
|
334
323
|
*
|
|
335
|
-
* @async
|
|
336
324
|
* @param dataId - Resource file name.
|
|
337
325
|
* @param onProgress - Download progress callback.
|
|
338
|
-
* @param signal - An
|
|
339
|
-
*
|
|
340
|
-
* and abort it if desired.
|
|
326
|
+
* @param signal - An
|
|
327
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
328
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
341
329
|
*/
|
|
342
330
|
downloadResource(dataId, onProgress, signal) {
|
|
343
331
|
return this._file.downloadResource(dataId, onProgress, signal);
|
|
@@ -350,22 +338,26 @@
|
|
|
350
338
|
* @param ranges - A range of resource file contents to download.
|
|
351
339
|
* @param requestId - Request ID for download progress callback.
|
|
352
340
|
* @param onProgress - Download progress callback.
|
|
353
|
-
* @param signal - An
|
|
354
|
-
*
|
|
355
|
-
* and abort it if desired.
|
|
341
|
+
* @param signal - An
|
|
342
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
343
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
356
344
|
*/
|
|
357
345
|
downloadResourceRange(dataId, requestId, ranges, onProgress, signal) {
|
|
358
346
|
return this._file.downloadResourceRange(dataId, requestId, ranges, onProgress, signal);
|
|
359
347
|
}
|
|
360
348
|
/**
|
|
361
|
-
* Deprecated since `25.3`. Use {@link
|
|
349
|
+
* Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.
|
|
350
|
+
*
|
|
351
|
+
* @deprecated
|
|
362
352
|
*/
|
|
363
353
|
partialDownloadResource(dataId, onProgress, signal) {
|
|
364
354
|
console.warn("Model.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use Model.downloadResource() instead.");
|
|
365
355
|
return this.downloadResource(dataId, onProgress, signal);
|
|
366
356
|
}
|
|
367
357
|
/**
|
|
368
|
-
* Deprecated since `25.3`. Use {@link
|
|
358
|
+
* Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.
|
|
359
|
+
*
|
|
360
|
+
* @deprecated
|
|
369
361
|
*/
|
|
370
362
|
async downloadFileRange(requestId, records, dataId, onProgress, signal) {
|
|
371
363
|
if (!records)
|
|
@@ -390,10 +382,9 @@
|
|
|
390
382
|
/**
|
|
391
383
|
* Returns a list of references to files used to extract geometry data.
|
|
392
384
|
*
|
|
393
|
-
* @
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
* signal object instance, which can be used to abort waiting as desired.
|
|
385
|
+
* @param signal - An
|
|
386
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
387
|
+
* signal, which can be used to abort waiting as desired.
|
|
397
388
|
*/
|
|
398
389
|
getReferences(signal) {
|
|
399
390
|
return this._file.getReferences(signal);
|
|
@@ -401,7 +392,7 @@
|
|
|
401
392
|
}
|
|
402
393
|
|
|
403
394
|
///////////////////////////////////////////////////////////////////////////////
|
|
404
|
-
// Copyright (C) 2002-
|
|
395
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
405
396
|
// All rights reserved.
|
|
406
397
|
//
|
|
407
398
|
// This software and its documentation and related materials are owned by
|
|
@@ -416,7 +407,7 @@
|
|
|
416
407
|
//
|
|
417
408
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
418
409
|
// license agreement with Open Design Alliance.
|
|
419
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
410
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
420
411
|
// All rights reserved.
|
|
421
412
|
//
|
|
422
413
|
// By use of this software, its documentation or related materials, you
|
|
@@ -526,8 +517,8 @@
|
|
|
526
517
|
return this.data.clearance;
|
|
527
518
|
}
|
|
528
519
|
/**
|
|
529
|
-
* Test creation time (UTC) in the format specified in
|
|
530
|
-
*
|
|
520
|
+
* Test creation time (UTC) in the format specified in
|
|
521
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
531
522
|
*
|
|
532
523
|
* @readonly
|
|
533
524
|
*/
|
|
@@ -557,8 +548,8 @@
|
|
|
557
548
|
return this.data.id;
|
|
558
549
|
}
|
|
559
550
|
/**
|
|
560
|
-
* Test last update (UTC) time in the format specified in
|
|
561
|
-
*
|
|
551
|
+
* Test last update (UTC) time in the format specified in
|
|
552
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
562
553
|
*
|
|
563
554
|
* @readonly
|
|
564
555
|
*/
|
|
@@ -652,8 +643,6 @@
|
|
|
652
643
|
}
|
|
653
644
|
/**
|
|
654
645
|
* Refresh test data.
|
|
655
|
-
*
|
|
656
|
-
* @async
|
|
657
646
|
*/
|
|
658
647
|
async checkout() {
|
|
659
648
|
const response = await this.internalGet("");
|
|
@@ -663,7 +652,6 @@
|
|
|
663
652
|
/**
|
|
664
653
|
* Update test data on the server.
|
|
665
654
|
*
|
|
666
|
-
* @async
|
|
667
655
|
* @param data - Raw test data.
|
|
668
656
|
*/
|
|
669
657
|
async update(data) {
|
|
@@ -674,7 +662,6 @@
|
|
|
674
662
|
/**
|
|
675
663
|
* Remove a test from a file.
|
|
676
664
|
*
|
|
677
|
-
* @async
|
|
678
665
|
* @returns Returns the raw data of a deleted test.
|
|
679
666
|
*/
|
|
680
667
|
delete() {
|
|
@@ -683,8 +670,6 @@
|
|
|
683
670
|
/**
|
|
684
671
|
* Save test data changes to the server. Call this method to update test data on the server
|
|
685
672
|
* after any changes.
|
|
686
|
-
*
|
|
687
|
-
* @async
|
|
688
673
|
*/
|
|
689
674
|
save() {
|
|
690
675
|
return this.update(this.data);
|
|
@@ -692,15 +677,14 @@
|
|
|
692
677
|
/**
|
|
693
678
|
* Wait for test to complete. Test is done when it changes to `done` or `failed` status.
|
|
694
679
|
*
|
|
695
|
-
* @async
|
|
696
680
|
* @param params - An object containing waiting parameters.
|
|
697
681
|
* @param params.timeout - The time, in milliseconds that the function should wait test. If
|
|
698
682
|
* test is not complete during this time, the `TimeoutError` exception will be thrown.
|
|
699
683
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
700
684
|
* checking test status.
|
|
701
|
-
* @param params.signal- An
|
|
702
|
-
*
|
|
703
|
-
* signal
|
|
685
|
+
* @param params.signal - An
|
|
686
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
687
|
+
* signal, which can be used to abort waiting as desired.
|
|
704
688
|
*/
|
|
705
689
|
waitForDone(params) {
|
|
706
690
|
const checkDone = () => this.checkout().then((test) => ["done", "failed"].includes(test.status));
|
|
@@ -708,8 +692,6 @@
|
|
|
708
692
|
}
|
|
709
693
|
/**
|
|
710
694
|
* Returns a report with the clash detection results for this test.
|
|
711
|
-
*
|
|
712
|
-
* @async
|
|
713
695
|
*/
|
|
714
696
|
getReport() {
|
|
715
697
|
return this.internalGet("/report").then((response) => response.json());
|
|
@@ -765,8 +747,8 @@
|
|
|
765
747
|
return this.data.associatedFiles;
|
|
766
748
|
}
|
|
767
749
|
/**
|
|
768
|
-
* Assembly creation time (UTC) in the format specified in
|
|
769
|
-
*
|
|
750
|
+
* Assembly creation time (UTC) in the format specified in
|
|
751
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
770
752
|
*
|
|
771
753
|
* @readonly
|
|
772
754
|
*/
|
|
@@ -886,8 +868,6 @@
|
|
|
886
868
|
}
|
|
887
869
|
/**
|
|
888
870
|
* Refresh assembly data.
|
|
889
|
-
*
|
|
890
|
-
* @async
|
|
891
871
|
*/
|
|
892
872
|
async checkout() {
|
|
893
873
|
const response = await this.internalGet("");
|
|
@@ -897,7 +877,6 @@
|
|
|
897
877
|
/**
|
|
898
878
|
* Updates assembly data on the server.
|
|
899
879
|
*
|
|
900
|
-
* @async
|
|
901
880
|
* @param data - Raw assembly data.
|
|
902
881
|
*/
|
|
903
882
|
async update(data) {
|
|
@@ -908,7 +887,6 @@
|
|
|
908
887
|
/**
|
|
909
888
|
* Delete the assembly from the server.
|
|
910
889
|
*
|
|
911
|
-
* @async
|
|
912
890
|
* @returns Returns the raw data of a deleted assembly.
|
|
913
891
|
*/
|
|
914
892
|
delete() {
|
|
@@ -917,8 +895,6 @@
|
|
|
917
895
|
/**
|
|
918
896
|
* Save assembly data changes to the server. Call this method to update assembly data on the
|
|
919
897
|
* server after any changes.
|
|
920
|
-
*
|
|
921
|
-
* @async
|
|
922
898
|
*/
|
|
923
899
|
save() {
|
|
924
900
|
return this.update(this.data);
|
|
@@ -934,8 +910,6 @@
|
|
|
934
910
|
}
|
|
935
911
|
/**
|
|
936
912
|
* Returns list of assembly models.
|
|
937
|
-
*
|
|
938
|
-
* @async
|
|
939
913
|
*/
|
|
940
914
|
getModels() {
|
|
941
915
|
return this.internalGet("/geometry")
|
|
@@ -969,7 +943,6 @@
|
|
|
969
943
|
/**
|
|
970
944
|
* Set or delete a model transformation.
|
|
971
945
|
*
|
|
972
|
-
* @async
|
|
973
946
|
* @param handle - Model handle.
|
|
974
947
|
* @param transform - Transformation matrix. To delete transformation provide this to `undefined`.
|
|
975
948
|
*/
|
|
@@ -981,7 +954,6 @@
|
|
|
981
954
|
/**
|
|
982
955
|
* Returns the properties for an objects in the assembly.
|
|
983
956
|
*
|
|
984
|
-
* @async
|
|
985
957
|
* @param handles - Object original handle or handles array. Leave this parameter undefined
|
|
986
958
|
* to get properties for all objects in the assembly.
|
|
987
959
|
* @returns {Promise<any>}
|
|
@@ -994,7 +966,6 @@
|
|
|
994
966
|
* Returns the list of original handles for an objects in the file that match the specified
|
|
995
967
|
* patterns. Search patterns may be combined using query operators.
|
|
996
968
|
*
|
|
997
|
-
* @async
|
|
998
969
|
* @example <caption>Simple search pattern.</caption>
|
|
999
970
|
* searchPattern = {
|
|
1000
971
|
* key: "Category",
|
|
@@ -1021,16 +992,12 @@
|
|
|
1021
992
|
}
|
|
1022
993
|
/**
|
|
1023
994
|
* Returns the cda.json for an assembly.
|
|
1024
|
-
*
|
|
1025
|
-
* @async
|
|
1026
995
|
*/
|
|
1027
996
|
getCdaTree() {
|
|
1028
997
|
return this.internalGet(`/properties/tree`).then((response) => response.json());
|
|
1029
998
|
}
|
|
1030
999
|
/**
|
|
1031
1000
|
* Returns a list of assembly viewpoints.
|
|
1032
|
-
*
|
|
1033
|
-
* @async
|
|
1034
1001
|
*/
|
|
1035
1002
|
getViewpoints() {
|
|
1036
1003
|
return this.internalGet("/viewpoints")
|
|
@@ -1038,9 +1005,8 @@
|
|
|
1038
1005
|
.then((viewpoints) => viewpoints.result);
|
|
1039
1006
|
}
|
|
1040
1007
|
/**
|
|
1041
|
-
* Add new assembly viewpoint. To create a
|
|
1008
|
+
* Add new assembly viewpoint. To create a viewpoint use `Viewer.createViewpoint()`.
|
|
1042
1009
|
*
|
|
1043
|
-
* @async
|
|
1044
1010
|
* @param viewpoint - Viewpoint.
|
|
1045
1011
|
*/
|
|
1046
1012
|
saveViewpoint(viewpoint) {
|
|
@@ -1049,7 +1015,6 @@
|
|
|
1049
1015
|
/**
|
|
1050
1016
|
* Delete assembly viewpoint.
|
|
1051
1017
|
*
|
|
1052
|
-
* @async
|
|
1053
1018
|
* @param guid - Viewpoint GUID.
|
|
1054
1019
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
1055
1020
|
*/
|
|
@@ -1060,7 +1025,6 @@
|
|
|
1060
1025
|
* Returns viewpoint preview image as
|
|
1061
1026
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
|
|
1062
1027
|
*
|
|
1063
|
-
* @async
|
|
1064
1028
|
* @param guid - Viewpoint GUID.
|
|
1065
1029
|
*/
|
|
1066
1030
|
getSnapshot(guid) {
|
|
@@ -1069,7 +1033,6 @@
|
|
|
1069
1033
|
/**
|
|
1070
1034
|
* Returns viewpoint preview data.
|
|
1071
1035
|
*
|
|
1072
|
-
* @async
|
|
1073
1036
|
* @param guid - Viewpoint GUID.
|
|
1074
1037
|
* @param bitmapGuid - Bitmap GUID.
|
|
1075
1038
|
*/
|
|
@@ -1080,12 +1043,11 @@
|
|
|
1080
1043
|
* Download assembly resource file. Resource files are files that contain model scene
|
|
1081
1044
|
* descriptions, or geometry data.
|
|
1082
1045
|
*
|
|
1083
|
-
* @async
|
|
1084
1046
|
* @param dataId - Resource file name.
|
|
1085
1047
|
* @param onProgress - Download progress callback.
|
|
1086
|
-
* @param signal - An
|
|
1087
|
-
*
|
|
1088
|
-
* and abort it if desired.
|
|
1048
|
+
* @param signal - An
|
|
1049
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
1050
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
1089
1051
|
*/
|
|
1090
1052
|
downloadResource(dataId, onProgress, signal) {
|
|
1091
1053
|
const relativePath = this.appendVersionParam(`/downloads/${dataId}`);
|
|
@@ -1101,9 +1063,9 @@
|
|
|
1101
1063
|
* @param ranges - A range of resource file contents to download.
|
|
1102
1064
|
* @param requestId - Request ID for download progress callback.
|
|
1103
1065
|
* @param onProgress - Download progress callback.
|
|
1104
|
-
* @param signal - An
|
|
1105
|
-
*
|
|
1106
|
-
* and abort it if desired.
|
|
1066
|
+
* @param signal - An
|
|
1067
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
1068
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
1107
1069
|
*/
|
|
1108
1070
|
downloadResourceRange(dataId, requestId, ranges, onProgress, signal) {
|
|
1109
1071
|
const relativePath = this.appendVersionParam(`/downloads/${dataId}?requestId=${requestId}`);
|
|
@@ -1112,14 +1074,16 @@
|
|
|
1112
1074
|
.then((response) => response.arrayBuffer());
|
|
1113
1075
|
}
|
|
1114
1076
|
/**
|
|
1115
|
-
* Deprecated since `25.3`. Use {@link
|
|
1077
|
+
* Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.
|
|
1078
|
+
*
|
|
1079
|
+
* @deprecated
|
|
1116
1080
|
*/
|
|
1117
1081
|
partialDownloadResource(dataId, onProgress, signal) {
|
|
1118
1082
|
console.warn("Assembly.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use Assembly.downloadResource() instead.");
|
|
1119
1083
|
return this.downloadResource(dataId, onProgress, signal);
|
|
1120
1084
|
}
|
|
1121
1085
|
/**
|
|
1122
|
-
* Deprecated since `25.3`. Use {@link
|
|
1086
|
+
* Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.
|
|
1123
1087
|
*/
|
|
1124
1088
|
async downloadFileRange(requestId, records, dataId, onProgress, signal) {
|
|
1125
1089
|
await this.downloadResourceRange(dataId, requestId, records, onProgress, signal);
|
|
@@ -1131,15 +1095,14 @@
|
|
|
1131
1095
|
/**
|
|
1132
1096
|
* Wait for assembly to be created. Assembly is created when it changes to `done` or `failed` status.
|
|
1133
1097
|
*
|
|
1134
|
-
* @async
|
|
1135
1098
|
* @param params - An object containing waiting parameters.
|
|
1136
1099
|
* @param params.timeout - The time, in milliseconds that the function should wait assembly.
|
|
1137
1100
|
* If assembly is not created during this time, the `TimeoutError` exception will be thrown.
|
|
1138
1101
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
1139
1102
|
* checking assembly status.
|
|
1140
|
-
* @param params.signal- An
|
|
1141
|
-
*
|
|
1142
|
-
* signal
|
|
1103
|
+
* @param params.signal - An
|
|
1104
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
1105
|
+
* signal, which can be used to abort waiting as desired.
|
|
1143
1106
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
1144
1107
|
*/
|
|
1145
1108
|
waitForDone(params) {
|
|
@@ -1154,7 +1117,6 @@
|
|
|
1154
1117
|
/**
|
|
1155
1118
|
* Returns a list of assembly clash tests.
|
|
1156
1119
|
*
|
|
1157
|
-
* @async
|
|
1158
1120
|
* @param {number} start - The starting index in the test list. Used for paging.
|
|
1159
1121
|
* @param {number} limit - The maximum number of tests that should be returned per request.
|
|
1160
1122
|
* Used for paging.
|
|
@@ -1200,7 +1162,6 @@
|
|
|
1200
1162
|
/**
|
|
1201
1163
|
* Returns the assembly clash test information.
|
|
1202
1164
|
*
|
|
1203
|
-
* @async
|
|
1204
1165
|
* @param testId - Test ID.
|
|
1205
1166
|
*/
|
|
1206
1167
|
getClashTest(testId) {
|
|
@@ -1211,7 +1172,6 @@
|
|
|
1211
1172
|
/**
|
|
1212
1173
|
* Create assembly clash test. Assembly must be in a `done` state, otherwise the test will fail.
|
|
1213
1174
|
*
|
|
1214
|
-
* @async
|
|
1215
1175
|
* @param name - Test name.
|
|
1216
1176
|
* @param selectionTypeA - The type of first selection set for clash detection. Can be `all`,
|
|
1217
1177
|
* `handles`, `models` or `searchquery`.
|
|
@@ -1229,9 +1189,9 @@
|
|
|
1229
1189
|
* test is not complete during this time, the `TimeoutError` exception will be thrown.
|
|
1230
1190
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
1231
1191
|
* checking test status.
|
|
1232
|
-
* @param params.signal- An
|
|
1233
|
-
*
|
|
1234
|
-
* signal
|
|
1192
|
+
* @param params.signal - An
|
|
1193
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
1194
|
+
* signal, which can be used to abort waiting as desired.
|
|
1235
1195
|
*/
|
|
1236
1196
|
createClashTest(name, selectionTypeA, selectionTypeB, selectionSetA, selectionSetB, params) {
|
|
1237
1197
|
const { tolerance, clearance, waitForDone } = params !== null && params !== void 0 ? params : {};
|
|
@@ -1255,7 +1215,6 @@
|
|
|
1255
1215
|
/**
|
|
1256
1216
|
* Delete assembly clash test.
|
|
1257
1217
|
*
|
|
1258
|
-
* @async
|
|
1259
1218
|
* @param testId - Test ID.
|
|
1260
1219
|
* @returns Returns the raw data of a deleted test.
|
|
1261
1220
|
*/
|
|
@@ -1317,11 +1276,11 @@
|
|
|
1317
1276
|
off(type, listener) {
|
|
1318
1277
|
return this.removeEventListener(type, listener);
|
|
1319
1278
|
}
|
|
1320
|
-
emit(
|
|
1321
|
-
if (typeof
|
|
1322
|
-
type:
|
|
1279
|
+
emit(type, ...args) {
|
|
1280
|
+
if (typeof type === "string") return this.emitEvent({
|
|
1281
|
+
type: type,
|
|
1323
1282
|
args: args
|
|
1324
|
-
}); else if (typeof
|
|
1283
|
+
}); else if (typeof type === "object") return this.emitEvent(type); else return false;
|
|
1325
1284
|
}
|
|
1326
1285
|
}
|
|
1327
1286
|
|
|
@@ -1539,7 +1498,7 @@
|
|
|
1539
1498
|
}
|
|
1540
1499
|
|
|
1541
1500
|
///////////////////////////////////////////////////////////////////////////////
|
|
1542
|
-
// Copyright (C) 2002-
|
|
1501
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
1543
1502
|
// All rights reserved.
|
|
1544
1503
|
//
|
|
1545
1504
|
// This software and its documentation and related materials are owned by
|
|
@@ -1554,7 +1513,7 @@
|
|
|
1554
1513
|
//
|
|
1555
1514
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
1556
1515
|
// license agreement with Open Design Alliance.
|
|
1557
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
1516
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
1558
1517
|
// All rights reserved.
|
|
1559
1518
|
//
|
|
1560
1519
|
// By use of this software, its documentation or related materials, you
|
|
@@ -1650,8 +1609,6 @@
|
|
|
1650
1609
|
}
|
|
1651
1610
|
/**
|
|
1652
1611
|
* Refresh permission data.
|
|
1653
|
-
*
|
|
1654
|
-
* @async
|
|
1655
1612
|
*/
|
|
1656
1613
|
async checkout() {
|
|
1657
1614
|
const response = await this.internalGet();
|
|
@@ -1661,7 +1618,6 @@
|
|
|
1661
1618
|
/**
|
|
1662
1619
|
* Update permission data on the server.
|
|
1663
1620
|
*
|
|
1664
|
-
* @async
|
|
1665
1621
|
* @param data - Raw permission data.
|
|
1666
1622
|
*/
|
|
1667
1623
|
async update(data) {
|
|
@@ -1672,7 +1628,6 @@
|
|
|
1672
1628
|
/**
|
|
1673
1629
|
* Remove a permission from a file.
|
|
1674
1630
|
*
|
|
1675
|
-
* @async
|
|
1676
1631
|
* @returns Returns the raw data of a deleted permission.
|
|
1677
1632
|
*/
|
|
1678
1633
|
delete() {
|
|
@@ -1681,8 +1636,6 @@
|
|
|
1681
1636
|
/**
|
|
1682
1637
|
* Save permission data changes to the server. Call this method to update permission data on
|
|
1683
1638
|
* the server after any changes.
|
|
1684
|
-
*
|
|
1685
|
-
* @async
|
|
1686
1639
|
*/
|
|
1687
1640
|
save() {
|
|
1688
1641
|
return this.update(this.data);
|
|
@@ -1721,7 +1674,7 @@
|
|
|
1721
1674
|
return this.data.assemblyId;
|
|
1722
1675
|
}
|
|
1723
1676
|
/**
|
|
1724
|
-
* Job creator ID. Use {@link Client
|
|
1677
|
+
* Job creator ID. Use {@link Client.getUser | Client.getUser()} to obtain detailed creator information.
|
|
1725
1678
|
*
|
|
1726
1679
|
* @readonly
|
|
1727
1680
|
*/
|
|
@@ -1729,8 +1682,8 @@
|
|
|
1729
1682
|
return this.data.authorId;
|
|
1730
1683
|
}
|
|
1731
1684
|
/**
|
|
1732
|
-
* Job creation time (UTC) in the format specified in
|
|
1733
|
-
*
|
|
1685
|
+
* Job creation time (UTC) in the format specified in
|
|
1686
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
1734
1687
|
*
|
|
1735
1688
|
* @readonly
|
|
1736
1689
|
*/
|
|
@@ -1749,7 +1702,7 @@
|
|
|
1749
1702
|
this._data = value;
|
|
1750
1703
|
}
|
|
1751
1704
|
/**
|
|
1752
|
-
* `true` if job is `done` or `failed`. See {@link
|
|
1705
|
+
* `true` if job is `done` or `failed`. See {@link status} for more details.
|
|
1753
1706
|
*
|
|
1754
1707
|
* @readonly
|
|
1755
1708
|
*/
|
|
@@ -1773,8 +1726,8 @@
|
|
|
1773
1726
|
return this.data.id;
|
|
1774
1727
|
}
|
|
1775
1728
|
/**
|
|
1776
|
-
* Job last update (UTC) time in the format specified in
|
|
1777
|
-
*
|
|
1729
|
+
* Job last update (UTC) time in the format specified in
|
|
1730
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
1778
1731
|
*
|
|
1779
1732
|
* @readonly
|
|
1780
1733
|
*/
|
|
@@ -1815,8 +1768,8 @@
|
|
|
1815
1768
|
return this.data.statusMessage;
|
|
1816
1769
|
}
|
|
1817
1770
|
/**
|
|
1818
|
-
* Job starting time (UTC) in the format specified in
|
|
1819
|
-
*
|
|
1771
|
+
* Job starting time (UTC) in the format specified in
|
|
1772
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
1820
1773
|
*
|
|
1821
1774
|
* @readonly
|
|
1822
1775
|
*/
|
|
@@ -1825,8 +1778,6 @@
|
|
|
1825
1778
|
}
|
|
1826
1779
|
/**
|
|
1827
1780
|
* Refresh job data.
|
|
1828
|
-
*
|
|
1829
|
-
* @async
|
|
1830
1781
|
*/
|
|
1831
1782
|
async checkout() {
|
|
1832
1783
|
const response = await this.internalGet();
|
|
@@ -1839,7 +1790,6 @@
|
|
|
1839
1790
|
* Only administrators can update job data. If the current logged in user is not an
|
|
1840
1791
|
* administrator, an exception will be thrown.
|
|
1841
1792
|
*
|
|
1842
|
-
* @async
|
|
1843
1793
|
* @param data - Raw job data.
|
|
1844
1794
|
*/
|
|
1845
1795
|
async update(data) {
|
|
@@ -1851,7 +1801,6 @@
|
|
|
1851
1801
|
* Remove a job from the server job list. Jobs that are in progress or have already been
|
|
1852
1802
|
* completed cannot be deleted.
|
|
1853
1803
|
*
|
|
1854
|
-
* @async
|
|
1855
1804
|
* @returns Returns the raw data of a deleted job.
|
|
1856
1805
|
*/
|
|
1857
1806
|
delete() {
|
|
@@ -1861,7 +1810,7 @@
|
|
|
1861
1810
|
// * Save job data changes to the server. Call this method to update job data on the server
|
|
1862
1811
|
// * after any changes.
|
|
1863
1812
|
// *
|
|
1864
|
-
// *
|
|
1813
|
+
// *
|
|
1865
1814
|
// * @returns {Promise<Job>}
|
|
1866
1815
|
// */
|
|
1867
1816
|
// save() {
|
|
@@ -1870,15 +1819,14 @@
|
|
|
1870
1819
|
/**
|
|
1871
1820
|
* Wait for job to be done. Job is done when it changes to `done` or `failed` status.
|
|
1872
1821
|
*
|
|
1873
|
-
* @async
|
|
1874
1822
|
* @param params - An object containing waiting parameters.
|
|
1875
1823
|
* @param params.timeout - The time, in milliseconds that the function should wait job. If
|
|
1876
1824
|
* jobs is not done during this time, the `TimeoutError` exception will be thrown.
|
|
1877
1825
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
1878
1826
|
* checking job status.
|
|
1879
|
-
* @param params.signal- An
|
|
1880
|
-
*
|
|
1881
|
-
* signal
|
|
1827
|
+
* @param params.signal - An
|
|
1828
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
1829
|
+
* signal, which can be used to abort waiting as desired.
|
|
1882
1830
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
1883
1831
|
*/
|
|
1884
1832
|
waitForDone(params) {
|
|
@@ -1937,8 +1885,8 @@
|
|
|
1937
1885
|
return this.data.activeVersion;
|
|
1938
1886
|
}
|
|
1939
1887
|
/**
|
|
1940
|
-
* File creation time (UTC) in the format specified in
|
|
1941
|
-
*
|
|
1888
|
+
* File creation time (UTC) in the format specified in
|
|
1889
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
1942
1890
|
*
|
|
1943
1891
|
* @readonly
|
|
1944
1892
|
*/
|
|
@@ -1996,7 +1944,8 @@
|
|
|
1996
1944
|
/**
|
|
1997
1945
|
* Returns a list of files in different formats in which the active version of the file was
|
|
1998
1946
|
* exported. To export file to one of the supported formats create File Converter job using
|
|
1999
|
-
* {@link
|
|
1947
|
+
* {@link createJob | createJob()}. To download exported file use
|
|
1948
|
+
* {@link downloadResource | downloadResource()}.
|
|
2000
1949
|
*
|
|
2001
1950
|
* @readonly
|
|
2002
1951
|
*/
|
|
@@ -2063,7 +2012,7 @@
|
|
|
2063
2012
|
}
|
|
2064
2013
|
/**
|
|
2065
2014
|
* File preview image URL or empty string if the file does not have a preview. Use
|
|
2066
|
-
* {@link
|
|
2015
|
+
* {@link setPreview | setPreview()} to change preview image.
|
|
2067
2016
|
*
|
|
2068
2017
|
* @readonly
|
|
2069
2018
|
*/
|
|
@@ -2113,8 +2062,8 @@
|
|
|
2113
2062
|
return this.data.type;
|
|
2114
2063
|
}
|
|
2115
2064
|
/**
|
|
2116
|
-
* File last update time (UTC) in the format specified in
|
|
2117
|
-
*
|
|
2065
|
+
* File last update time (UTC) in the format specified in
|
|
2066
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
2118
2067
|
*
|
|
2119
2068
|
* @readonly
|
|
2120
2069
|
*/
|
|
@@ -2153,8 +2102,6 @@
|
|
|
2153
2102
|
}
|
|
2154
2103
|
/**
|
|
2155
2104
|
* Refresh file data.
|
|
2156
|
-
*
|
|
2157
|
-
* @async
|
|
2158
2105
|
*/
|
|
2159
2106
|
async checkout() {
|
|
2160
2107
|
const response = await this.internalGet("");
|
|
@@ -2164,7 +2111,6 @@
|
|
|
2164
2111
|
/**
|
|
2165
2112
|
* Update file data on the server.
|
|
2166
2113
|
*
|
|
2167
|
-
* @async
|
|
2168
2114
|
* @param data - Raw file data.
|
|
2169
2115
|
*/
|
|
2170
2116
|
async update(data) {
|
|
@@ -2175,7 +2121,6 @@
|
|
|
2175
2121
|
/**
|
|
2176
2122
|
* Delete the file and all its versions from the server.
|
|
2177
2123
|
*
|
|
2178
|
-
* @async
|
|
2179
2124
|
* @returns Returns the raw data of a deleted file.
|
|
2180
2125
|
*/
|
|
2181
2126
|
delete() {
|
|
@@ -2184,8 +2129,6 @@
|
|
|
2184
2129
|
/**
|
|
2185
2130
|
* Save file data changes to the server. Call this method to update file data on the server
|
|
2186
2131
|
* after any changes.
|
|
2187
|
-
*
|
|
2188
|
-
* @async
|
|
2189
2132
|
*/
|
|
2190
2133
|
save() {
|
|
2191
2134
|
return this.update(this.data);
|
|
@@ -2193,7 +2136,6 @@
|
|
|
2193
2136
|
/**
|
|
2194
2137
|
* Set or remove the file preview.
|
|
2195
2138
|
*
|
|
2196
|
-
* @async
|
|
2197
2139
|
* @param image - Preview image.Can be a
|
|
2198
2140
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
2199
2141
|
* string,
|
|
@@ -2214,8 +2156,6 @@
|
|
|
2214
2156
|
}
|
|
2215
2157
|
/**
|
|
2216
2158
|
* Remove the file preview.
|
|
2217
|
-
*
|
|
2218
|
-
* @async
|
|
2219
2159
|
*/
|
|
2220
2160
|
async deletePreview() {
|
|
2221
2161
|
const response = await this.internalDelete("/preview");
|
|
@@ -2224,8 +2164,6 @@
|
|
|
2224
2164
|
}
|
|
2225
2165
|
/**
|
|
2226
2166
|
* Returns a list of models of the active version of the file.
|
|
2227
|
-
*
|
|
2228
|
-
* @async
|
|
2229
2167
|
*/
|
|
2230
2168
|
getModels() {
|
|
2231
2169
|
return this.internalGet("/geometry")
|
|
@@ -2250,7 +2188,6 @@
|
|
|
2250
2188
|
/**
|
|
2251
2189
|
* Returns the properties for an objects in the active version of the file.
|
|
2252
2190
|
*
|
|
2253
|
-
* @async
|
|
2254
2191
|
* @param handles - Object original handle or handles array. Leave this parameter `undefined`
|
|
2255
2192
|
* to get properties for all objects in the file.
|
|
2256
2193
|
*/
|
|
@@ -2276,7 +2213,6 @@
|
|
|
2276
2213
|
* Returns the list of original handles for an objects in the active version of the file that
|
|
2277
2214
|
* match the specified patterns. Search patterns may be combined using query operators.
|
|
2278
2215
|
*
|
|
2279
|
-
* @async
|
|
2280
2216
|
* @example <caption>Simple search pattern.</caption>
|
|
2281
2217
|
* searchPattern = {
|
|
2282
2218
|
* key: "Category",
|
|
@@ -2305,16 +2241,12 @@
|
|
|
2305
2241
|
}
|
|
2306
2242
|
/**
|
|
2307
2243
|
* Returns the cda.json for an active version of the file.
|
|
2308
|
-
*
|
|
2309
|
-
* @async
|
|
2310
2244
|
*/
|
|
2311
2245
|
getCdaTree() {
|
|
2312
2246
|
return this.internalGet(`/properties/tree`).then((response) => response.json());
|
|
2313
2247
|
}
|
|
2314
2248
|
/**
|
|
2315
2249
|
* Returns a list of file viewpoints.
|
|
2316
|
-
*
|
|
2317
|
-
* @async
|
|
2318
2250
|
*/
|
|
2319
2251
|
getViewpoints() {
|
|
2320
2252
|
return this.internalGet("/viewpoints")
|
|
@@ -2322,9 +2254,8 @@
|
|
|
2322
2254
|
.then((viewpoints) => viewpoints.result);
|
|
2323
2255
|
}
|
|
2324
2256
|
/**
|
|
2325
|
-
* Add new file viewpoint. To create a
|
|
2257
|
+
* Add new file viewpoint. To create a viewpoint use `Viewer.createViewpoint()`.
|
|
2326
2258
|
*
|
|
2327
|
-
* @async
|
|
2328
2259
|
* @param viewpoint - Viewpoint.
|
|
2329
2260
|
*/
|
|
2330
2261
|
saveViewpoint(viewpoint) {
|
|
@@ -2333,7 +2264,6 @@
|
|
|
2333
2264
|
/**
|
|
2334
2265
|
* Delete file viewpoint.
|
|
2335
2266
|
*
|
|
2336
|
-
* @async
|
|
2337
2267
|
* @param guid - Viewpoint GUID.
|
|
2338
2268
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
2339
2269
|
*/
|
|
@@ -2344,7 +2274,6 @@
|
|
|
2344
2274
|
* Returns viewpoint preview image as
|
|
2345
2275
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
|
|
2346
2276
|
*
|
|
2347
|
-
* @async
|
|
2348
2277
|
* @param guid - Viewpoint GUID.
|
|
2349
2278
|
*/
|
|
2350
2279
|
getSnapshot(guid) {
|
|
@@ -2353,7 +2282,6 @@
|
|
|
2353
2282
|
/**
|
|
2354
2283
|
* Returns viewpoint preview data.
|
|
2355
2284
|
*
|
|
2356
|
-
* @async
|
|
2357
2285
|
* @param guid - Viewpoint GUID.
|
|
2358
2286
|
* @param bitmapGuid - Bitmap GUID.
|
|
2359
2287
|
*/
|
|
@@ -2363,11 +2291,10 @@
|
|
|
2363
2291
|
/**
|
|
2364
2292
|
* Download source of active version of the file.
|
|
2365
2293
|
*
|
|
2366
|
-
* @async
|
|
2367
2294
|
* @param onProgress - Download progress callback.
|
|
2368
|
-
* @param signal - An
|
|
2369
|
-
*
|
|
2370
|
-
* and abort it if desired.
|
|
2295
|
+
* @param signal - An
|
|
2296
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
2297
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
2371
2298
|
*/
|
|
2372
2299
|
download(onProgress, signal) {
|
|
2373
2300
|
const relativePath = this.appendVersionParam("/downloads");
|
|
@@ -2390,9 +2317,9 @@
|
|
|
2390
2317
|
*
|
|
2391
2318
|
* @param dataId - Resource file name.
|
|
2392
2319
|
* @param onProgress - Download progress callback.
|
|
2393
|
-
* @param signal - An
|
|
2394
|
-
*
|
|
2395
|
-
* and abort it if desired.
|
|
2320
|
+
* @param signal - An
|
|
2321
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
2322
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
2396
2323
|
*/
|
|
2397
2324
|
downloadResource(dataId, onProgress, signal) {
|
|
2398
2325
|
const relativePath = this.appendVersionParam(`/downloads/${dataId}`);
|
|
@@ -2408,9 +2335,9 @@
|
|
|
2408
2335
|
* @param ranges - A range of resource file contents to download.
|
|
2409
2336
|
* @param requestId - Request ID for download progress callback.
|
|
2410
2337
|
* @param onProgress - Download progress callback.
|
|
2411
|
-
* @param signal - An
|
|
2412
|
-
*
|
|
2413
|
-
* and abort it if desired.
|
|
2338
|
+
* @param signal - An
|
|
2339
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
2340
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
2414
2341
|
*/
|
|
2415
2342
|
downloadResourceRange(dataId, requestId, ranges, onProgress, signal) {
|
|
2416
2343
|
const relativePath = this.appendVersionParam(`/downloads/${dataId}?requestId=${requestId}`);
|
|
@@ -2419,14 +2346,18 @@
|
|
|
2419
2346
|
.then((response) => response.arrayBuffer());
|
|
2420
2347
|
}
|
|
2421
2348
|
/**
|
|
2422
|
-
* Deprecated since `25.3`. Use {@link
|
|
2349
|
+
* Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.
|
|
2350
|
+
*
|
|
2351
|
+
* @deprecated
|
|
2423
2352
|
*/
|
|
2424
2353
|
partialDownloadResource(dataId, onProgress, signal) {
|
|
2425
2354
|
console.warn("File.partialDownloadResource() has been deprecated since 25.3 and will be removed in a future release, use File.downloadResource() instead.");
|
|
2426
2355
|
return this.downloadResource(dataId, onProgress, signal);
|
|
2427
2356
|
}
|
|
2428
2357
|
/**
|
|
2429
|
-
* Deprecated since `25.3`. Use {@link
|
|
2358
|
+
* Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.
|
|
2359
|
+
*
|
|
2360
|
+
* @deprecated
|
|
2430
2361
|
*/
|
|
2431
2362
|
async downloadFileRange(requestId, records, dataId, onProgress, signal) {
|
|
2432
2363
|
await this.downloadResourceRange(dataId, requestId, records, onProgress, signal);
|
|
@@ -2434,10 +2365,9 @@
|
|
|
2434
2365
|
/**
|
|
2435
2366
|
* Returns a list of references to files used to correct rendering of the current file.
|
|
2436
2367
|
*
|
|
2437
|
-
* @
|
|
2438
|
-
*
|
|
2439
|
-
*
|
|
2440
|
-
* signal object instance, which can be used to abort waiting as desired.
|
|
2368
|
+
* @param signal - An
|
|
2369
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
2370
|
+
* signal, which can be used to abort waiting as desired.
|
|
2441
2371
|
*/
|
|
2442
2372
|
getReferences(signal) {
|
|
2443
2373
|
return this.internalGet("/references", signal).then((response) => response.json());
|
|
@@ -2445,7 +2375,6 @@
|
|
|
2445
2375
|
/**
|
|
2446
2376
|
* Set the file references.
|
|
2447
2377
|
*
|
|
2448
|
-
* @async
|
|
2449
2378
|
* @param references - File references.
|
|
2450
2379
|
*/
|
|
2451
2380
|
setReferences(references) {
|
|
@@ -2454,7 +2383,6 @@
|
|
|
2454
2383
|
/**
|
|
2455
2384
|
* Create a new job for the active version of the file.
|
|
2456
2385
|
*
|
|
2457
|
-
* @async
|
|
2458
2386
|
* @param outputFormat - The job type. Can be one of:
|
|
2459
2387
|
*
|
|
2460
2388
|
* - `geometry` - Extract file geometry data into `VSFX`.
|
|
@@ -2462,14 +2390,13 @@
|
|
|
2462
2390
|
* - `properties` - Extract file properties.
|
|
2463
2391
|
* - `validation` - Validate the file. Only for `IFC`.
|
|
2464
2392
|
* - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the
|
|
2465
|
-
* supported format. Use {@link
|
|
2466
|
-
*
|
|
2467
|
-
*
|
|
2468
|
-
*
|
|
2469
|
-
* before creating a job.
|
|
2393
|
+
* supported format. Use {@link exports | exports()} to get the list of completed file
|
|
2394
|
+
* exports. Use {@link downloadResource | downloadResource()} to download the exported file.
|
|
2395
|
+
* - Other custom job name. Custom job runner must be registered in the job templates before
|
|
2396
|
+
* creating a job.
|
|
2470
2397
|
*
|
|
2471
2398
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
2472
|
-
* for the File Converter tool in form
|
|
2399
|
+
* for the File Converter tool in form `--arg=value`.
|
|
2473
2400
|
*/
|
|
2474
2401
|
createJob(outputFormat, parameters) {
|
|
2475
2402
|
const relativePath = this.appendVersionParam("/jobs");
|
|
@@ -2484,41 +2411,37 @@
|
|
|
2484
2411
|
}
|
|
2485
2412
|
/**
|
|
2486
2413
|
* Create job to extract geometry data of active version of the file. This is alias to
|
|
2487
|
-
* {@link
|
|
2414
|
+
* {@link createJob | createJob("geometry")}.
|
|
2488
2415
|
*
|
|
2489
|
-
* @async
|
|
2490
2416
|
* @param type - Geometry data type. Can be one of:
|
|
2491
2417
|
*
|
|
2492
2418
|
* - `vsfx` - `VSFX` (default), for opening a file in `VisualizeJS` viewer.
|
|
2493
2419
|
* - `gltf` - `glTF`, for opening a file in `Three.js` viewer.
|
|
2494
2420
|
*
|
|
2495
2421
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
2496
|
-
* for the File Converter tool in form
|
|
2422
|
+
* for the File Converter tool in form `--arg=value`.
|
|
2497
2423
|
*/
|
|
2498
2424
|
extractGeometry(type, parameters) {
|
|
2499
2425
|
return this.createJob(type === "gltf" ? "geometryGltf" : "geometry", parameters);
|
|
2500
2426
|
}
|
|
2501
2427
|
/**
|
|
2502
2428
|
* Create job to extract properties of the active version of the file. This is alias to
|
|
2503
|
-
* {@link
|
|
2429
|
+
* {@link createJob | createJob("properties")}.
|
|
2504
2430
|
*
|
|
2505
|
-
* @async
|
|
2506
2431
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
2507
|
-
* for the File Converter tool in form
|
|
2432
|
+
* for the File Converter tool in form `--arg=value`.
|
|
2508
2433
|
*/
|
|
2509
2434
|
extractProperties(parameters) {
|
|
2510
2435
|
return this.createJob("properties", parameters);
|
|
2511
2436
|
}
|
|
2512
2437
|
/**
|
|
2513
2438
|
* Create a job to validate the active version of the file. This is alias to
|
|
2514
|
-
* {@link
|
|
2439
|
+
* {@link createJob | createJob("validation")}.
|
|
2515
2440
|
*
|
|
2516
|
-
* To get validation report use
|
|
2517
|
-
* {@link File.downloadResource | File.downloadResource("validation_report.json")}.
|
|
2441
|
+
* To get validation report use {@link downloadResource | downloadResource("validation_report.json")}.
|
|
2518
2442
|
*
|
|
2519
|
-
* @async
|
|
2520
2443
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
2521
|
-
* for the File Converter tool in form
|
|
2444
|
+
* for the File Converter tool in form `--arg=value`.
|
|
2522
2445
|
*/
|
|
2523
2446
|
validate(parameters) {
|
|
2524
2447
|
return this.createJob("validation", parameters);
|
|
@@ -2527,22 +2450,20 @@
|
|
|
2527
2450
|
* Wait for jobs of the active version of the file to be done. Job is done when it changes to
|
|
2528
2451
|
* `none`, `done` or `failed` status.
|
|
2529
2452
|
*
|
|
2530
|
-
* @
|
|
2531
|
-
*
|
|
2532
|
-
*
|
|
2533
|
-
*
|
|
2534
|
-
*
|
|
2535
|
-
*
|
|
2536
|
-
* @param
|
|
2537
|
-
*
|
|
2538
|
-
*
|
|
2539
|
-
*
|
|
2540
|
-
*
|
|
2541
|
-
*
|
|
2542
|
-
*
|
|
2543
|
-
*
|
|
2544
|
-
* @param {function} [params.onCheckout] - Waiting progress callback. Return `true` to cancel waiting.
|
|
2545
|
-
* @returns {Promise<File>}
|
|
2453
|
+
* @param jobs - Job or job array to wait on. Can be `geometry`, `geometryGltf`,
|
|
2454
|
+
* `properties`, `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom
|
|
2455
|
+
* job name.
|
|
2456
|
+
* @param waitAll - If this parameter is `true`, the function returns when all the specified
|
|
2457
|
+
* jobs have done. If `false`, the function returns when any one of the jobs are done.
|
|
2458
|
+
* @param params - An object containing waiting parameters.
|
|
2459
|
+
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
2460
|
+
* no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
2461
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
2462
|
+
* checking jobs status.
|
|
2463
|
+
* @param params.signal - An
|
|
2464
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
2465
|
+
* signal, which can be used to abort waiting as desired.
|
|
2466
|
+
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
2546
2467
|
*/
|
|
2547
2468
|
waitForDone(jobs, waitAll, params) {
|
|
2548
2469
|
const waitJobs = Array.isArray(jobs) ? jobs : [jobs];
|
|
@@ -2562,8 +2483,6 @@
|
|
|
2562
2483
|
}
|
|
2563
2484
|
/**
|
|
2564
2485
|
* Returns a list of file permissions.
|
|
2565
|
-
*
|
|
2566
|
-
* @async
|
|
2567
2486
|
*/
|
|
2568
2487
|
getPermissions() {
|
|
2569
2488
|
return this.internalGet("/permissions")
|
|
@@ -2573,7 +2492,6 @@
|
|
|
2573
2492
|
/**
|
|
2574
2493
|
* Returns the permission information.
|
|
2575
2494
|
*
|
|
2576
|
-
* @async
|
|
2577
2495
|
* @param permissionId - Permission ID.
|
|
2578
2496
|
*/
|
|
2579
2497
|
getPermission(permissionId) {
|
|
@@ -2584,11 +2502,10 @@
|
|
|
2584
2502
|
/**
|
|
2585
2503
|
* Create a new file permission.
|
|
2586
2504
|
*
|
|
2587
|
-
* @async
|
|
2588
2505
|
* @param actions - Actions are allowed to be performed on a file with this permission. See
|
|
2589
|
-
* {@link Permission
|
|
2506
|
+
* {@link Permission.actions} for more details.
|
|
2590
2507
|
* @param grantedTo - A collection of principials that will get access to the file.
|
|
2591
|
-
* @param
|
|
2508
|
+
* @param _public - Specifies whether all users have access to the file or not.
|
|
2592
2509
|
*/
|
|
2593
2510
|
createPermission(actions, grantedTo, _public) {
|
|
2594
2511
|
return this.internalPost("/permissions", {
|
|
@@ -2602,7 +2519,6 @@
|
|
|
2602
2519
|
/**
|
|
2603
2520
|
* Delete file permission.
|
|
2604
2521
|
*
|
|
2605
|
-
* @async
|
|
2606
2522
|
* @param permissionId - Permission ID.
|
|
2607
2523
|
* @returns Returns the raw data of a deleted permission.
|
|
2608
2524
|
*/
|
|
@@ -2612,23 +2528,22 @@
|
|
|
2612
2528
|
/**
|
|
2613
2529
|
* Upload the new version of the file to the server and extract the geometry and properties as needed.
|
|
2614
2530
|
*
|
|
2615
|
-
* @
|
|
2616
|
-
*
|
|
2617
|
-
*
|
|
2618
|
-
*
|
|
2619
|
-
* object returned as a result of a user selecting files using the HTML `<input>` element.
|
|
2531
|
+
* @param file - Web API {@link https://developer.mozilla.org/docs/Web/API/File | File} object
|
|
2532
|
+
* are generally retrieved from a
|
|
2533
|
+
* {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList} object returned as
|
|
2534
|
+
* a result of a user selecting files using the HTML `<input>` element.
|
|
2620
2535
|
* @param params - An object containing upload parameters.
|
|
2621
|
-
* @param params.geometry
|
|
2622
|
-
*
|
|
2623
|
-
* @param params.properties
|
|
2624
|
-
* @param params.waitForDone
|
|
2536
|
+
* @param params.geometry - Create job to extract file geometry data. The geometry data type
|
|
2537
|
+
* is the same as the original file.
|
|
2538
|
+
* @param params.properties - Create job to extract file properties.
|
|
2539
|
+
* @param params.waitForDone - Wait for geometry and properties jobs to complete.
|
|
2625
2540
|
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
2626
2541
|
* no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
2627
2542
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
2628
2543
|
* checking jobs status.
|
|
2629
|
-
* @param params.signal - An
|
|
2630
|
-
*
|
|
2631
|
-
* signal
|
|
2544
|
+
* @param params.signal - An
|
|
2545
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
2546
|
+
* signal, which can be used to abort waiting as desired.
|
|
2632
2547
|
* @param params.onProgress - Upload progress callback.
|
|
2633
2548
|
*/
|
|
2634
2549
|
async uploadVersion(file, params = {
|
|
@@ -2663,8 +2578,6 @@
|
|
|
2663
2578
|
}
|
|
2664
2579
|
/**
|
|
2665
2580
|
* Returns a list of version files.
|
|
2666
|
-
*
|
|
2667
|
-
* @async
|
|
2668
2581
|
*/
|
|
2669
2582
|
getVersions() {
|
|
2670
2583
|
return this.internalGet("/versions")
|
|
@@ -2675,7 +2588,6 @@
|
|
|
2675
2588
|
/**
|
|
2676
2589
|
* Returns the version file.
|
|
2677
2590
|
*
|
|
2678
|
-
* @async
|
|
2679
2591
|
* @param version - Desired version.
|
|
2680
2592
|
*/
|
|
2681
2593
|
getVersion(version) {
|
|
@@ -2687,7 +2599,6 @@
|
|
|
2687
2599
|
/**
|
|
2688
2600
|
* Delete version file.
|
|
2689
2601
|
*
|
|
2690
|
-
* @async
|
|
2691
2602
|
* @param version - Version to delete.
|
|
2692
2603
|
*/
|
|
2693
2604
|
async deleteVersion(version) {
|
|
@@ -2699,7 +2610,6 @@
|
|
|
2699
2610
|
/**
|
|
2700
2611
|
* Replace the active version of the file with the selected version.
|
|
2701
2612
|
*
|
|
2702
|
-
* @async
|
|
2703
2613
|
* @param version - Desired active version.
|
|
2704
2614
|
*/
|
|
2705
2615
|
setActiveVersion(version) {
|
|
@@ -2725,8 +2635,8 @@
|
|
|
2725
2635
|
* Other clients will still continue to use the current active version of the file. Use
|
|
2726
2636
|
* `undefined` to revert back to the active version.
|
|
2727
2637
|
*
|
|
2728
|
-
* Note. You need to update the file data using
|
|
2729
|
-
*
|
|
2638
|
+
* Note. You need to update the file data using {@link checkout | checkout()} to match the
|
|
2639
|
+
* size and status fields to the version you selected.
|
|
2730
2640
|
*/
|
|
2731
2641
|
useVersion(version) {
|
|
2732
2642
|
this._useVersion = version;
|
|
@@ -2735,7 +2645,7 @@
|
|
|
2735
2645
|
}
|
|
2736
2646
|
|
|
2737
2647
|
///////////////////////////////////////////////////////////////////////////////
|
|
2738
|
-
// Copyright (C) 2002-
|
|
2648
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
2739
2649
|
// All rights reserved.
|
|
2740
2650
|
//
|
|
2741
2651
|
// This software and its documentation and related materials are owned by
|
|
@@ -2750,7 +2660,7 @@
|
|
|
2750
2660
|
//
|
|
2751
2661
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
2752
2662
|
// license agreement with Open Design Alliance.
|
|
2753
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
2663
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
2754
2664
|
// All rights reserved.
|
|
2755
2665
|
//
|
|
2756
2666
|
// By use of this software, its documentation or related materials, you
|
|
@@ -2833,8 +2743,6 @@
|
|
|
2833
2743
|
}
|
|
2834
2744
|
/**
|
|
2835
2745
|
* Refresh role data.
|
|
2836
|
-
*
|
|
2837
|
-
* @async
|
|
2838
2746
|
*/
|
|
2839
2747
|
async checkout() {
|
|
2840
2748
|
const response = await this.internalGet();
|
|
@@ -2844,7 +2752,6 @@
|
|
|
2844
2752
|
/**
|
|
2845
2753
|
* Update role data on the server.
|
|
2846
2754
|
*
|
|
2847
|
-
* @async
|
|
2848
2755
|
* @param data - Raw role data.
|
|
2849
2756
|
*/
|
|
2850
2757
|
async update(data) {
|
|
@@ -2855,7 +2762,6 @@
|
|
|
2855
2762
|
/**
|
|
2856
2763
|
* Delete a role from the project.
|
|
2857
2764
|
*
|
|
2858
|
-
* @async
|
|
2859
2765
|
* @returns Returns the raw data of a deleted role.
|
|
2860
2766
|
*/
|
|
2861
2767
|
delete() {
|
|
@@ -2864,8 +2770,6 @@
|
|
|
2864
2770
|
/**
|
|
2865
2771
|
* Save role data changes to the server. Call this method to update role data on the server
|
|
2866
2772
|
* after any changes.
|
|
2867
|
-
*
|
|
2868
|
-
* @async
|
|
2869
2773
|
*/
|
|
2870
2774
|
save() {
|
|
2871
2775
|
return this.update(this.data);
|
|
@@ -2919,7 +2823,7 @@
|
|
|
2919
2823
|
return this.data.id;
|
|
2920
2824
|
}
|
|
2921
2825
|
/**
|
|
2922
|
-
* Member role. See {@link Project
|
|
2826
|
+
* Member role. See {@link Project.getRoles | Project.getRoles()} for more details.
|
|
2923
2827
|
*/
|
|
2924
2828
|
get role() {
|
|
2925
2829
|
return this.data.role;
|
|
@@ -2953,8 +2857,6 @@
|
|
|
2953
2857
|
}
|
|
2954
2858
|
/**
|
|
2955
2859
|
* Refresh member data.
|
|
2956
|
-
*
|
|
2957
|
-
* @async
|
|
2958
2860
|
*/
|
|
2959
2861
|
async checkout() {
|
|
2960
2862
|
const response = await this.internalGet();
|
|
@@ -2964,7 +2866,6 @@
|
|
|
2964
2866
|
/**
|
|
2965
2867
|
* Update member data on the server.
|
|
2966
2868
|
*
|
|
2967
|
-
* @async
|
|
2968
2869
|
* @param data - Raw member data.
|
|
2969
2870
|
*/
|
|
2970
2871
|
async update(data) {
|
|
@@ -2975,7 +2876,6 @@
|
|
|
2975
2876
|
/**
|
|
2976
2877
|
* Remove a member from a project.
|
|
2977
2878
|
*
|
|
2978
|
-
* @async
|
|
2979
2879
|
* @returns Returns the raw data of a deleted member.
|
|
2980
2880
|
*/
|
|
2981
2881
|
delete() {
|
|
@@ -2984,8 +2884,6 @@
|
|
|
2984
2884
|
/**
|
|
2985
2885
|
* Save member data changes to the server. Call this method to update member data on the
|
|
2986
2886
|
* server after any changes.
|
|
2987
|
-
*
|
|
2988
|
-
* @async
|
|
2989
2887
|
*/
|
|
2990
2888
|
save() {
|
|
2991
2889
|
return this.update(this.data);
|
|
@@ -3028,8 +2926,8 @@
|
|
|
3028
2926
|
return this.data.authorization;
|
|
3029
2927
|
}
|
|
3030
2928
|
/**
|
|
3031
|
-
* Project creation time (UTC) in the format specified in
|
|
3032
|
-
*
|
|
2929
|
+
* Project creation time (UTC) in the format specified in
|
|
2930
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
3033
2931
|
*
|
|
3034
2932
|
* @readonly
|
|
3035
2933
|
*/
|
|
@@ -3072,8 +2970,8 @@
|
|
|
3072
2970
|
this.data.description = value;
|
|
3073
2971
|
}
|
|
3074
2972
|
/**
|
|
3075
|
-
* Project end date in the format specified in
|
|
3076
|
-
*
|
|
2973
|
+
* Project end date in the format specified in
|
|
2974
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
3077
2975
|
*/
|
|
3078
2976
|
get endDate() {
|
|
3079
2977
|
return this.data.endDate;
|
|
@@ -3149,8 +3047,8 @@
|
|
|
3149
3047
|
this.data.public = value;
|
|
3150
3048
|
}
|
|
3151
3049
|
/**
|
|
3152
|
-
* Project start date in the format specified in
|
|
3153
|
-
*
|
|
3050
|
+
* Project start date in the format specified in
|
|
3051
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
3154
3052
|
*/
|
|
3155
3053
|
get startDate() {
|
|
3156
3054
|
return this.data.startDate;
|
|
@@ -3167,8 +3065,8 @@
|
|
|
3167
3065
|
return this.data.topicCount;
|
|
3168
3066
|
}
|
|
3169
3067
|
/**
|
|
3170
|
-
* Project last update time (UTC) in the format specified in
|
|
3171
|
-
*
|
|
3068
|
+
* Project last update time (UTC) in the format specified in
|
|
3069
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
3172
3070
|
*
|
|
3173
3071
|
* @readonly
|
|
3174
3072
|
*/
|
|
@@ -3177,8 +3075,6 @@
|
|
|
3177
3075
|
}
|
|
3178
3076
|
/**
|
|
3179
3077
|
* Refresh project data.
|
|
3180
|
-
*
|
|
3181
|
-
* @async
|
|
3182
3078
|
*/
|
|
3183
3079
|
async checkout() {
|
|
3184
3080
|
const response = await this.internalGet("");
|
|
@@ -3188,7 +3084,6 @@
|
|
|
3188
3084
|
/**
|
|
3189
3085
|
* Update project data on the server.
|
|
3190
3086
|
*
|
|
3191
|
-
* @async
|
|
3192
3087
|
* @param data - Raw project data.
|
|
3193
3088
|
*/
|
|
3194
3089
|
async update(data) {
|
|
@@ -3199,7 +3094,6 @@
|
|
|
3199
3094
|
/**
|
|
3200
3095
|
* Delete the project from the server.
|
|
3201
3096
|
*
|
|
3202
|
-
* @async
|
|
3203
3097
|
* @returns Returns the raw data of a deleted project.
|
|
3204
3098
|
*/
|
|
3205
3099
|
delete() {
|
|
@@ -3218,8 +3112,6 @@
|
|
|
3218
3112
|
/**
|
|
3219
3113
|
* Save project data changes to the server. Call this method to update project data on the
|
|
3220
3114
|
* server after any changes.
|
|
3221
|
-
*
|
|
3222
|
-
* @async
|
|
3223
3115
|
*/
|
|
3224
3116
|
save() {
|
|
3225
3117
|
return this.update(this.data);
|
|
@@ -3227,7 +3119,6 @@
|
|
|
3227
3119
|
/**
|
|
3228
3120
|
* Set or remove the project preview.
|
|
3229
3121
|
*
|
|
3230
|
-
* @async
|
|
3231
3122
|
* @param image - Preview image. Can be a
|
|
3232
3123
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
3233
3124
|
* string,
|
|
@@ -3248,8 +3139,6 @@
|
|
|
3248
3139
|
}
|
|
3249
3140
|
/**
|
|
3250
3141
|
* Remove the project preview.
|
|
3251
|
-
*
|
|
3252
|
-
* @async
|
|
3253
3142
|
*/
|
|
3254
3143
|
async deletePreview() {
|
|
3255
3144
|
const response = await this.internalDelete("/preview");
|
|
@@ -3257,10 +3146,8 @@
|
|
|
3257
3146
|
return this;
|
|
3258
3147
|
}
|
|
3259
3148
|
/**
|
|
3260
|
-
* Returns a list of project roles. Project
|
|
3261
|
-
*
|
|
3262
|
-
*
|
|
3263
|
-
* @async
|
|
3149
|
+
* Returns a list of project roles. Project members have different abilities depending on the
|
|
3150
|
+
* role they have in a project.
|
|
3264
3151
|
*/
|
|
3265
3152
|
getRoles() {
|
|
3266
3153
|
return this.internalGet("/roles")
|
|
@@ -3270,7 +3157,6 @@
|
|
|
3270
3157
|
/**
|
|
3271
3158
|
* Returns the role information.
|
|
3272
3159
|
*
|
|
3273
|
-
* @async
|
|
3274
3160
|
* @param name - Role name.
|
|
3275
3161
|
*/
|
|
3276
3162
|
getRole(name) {
|
|
@@ -3281,11 +3167,10 @@
|
|
|
3281
3167
|
/**
|
|
3282
3168
|
* Create a new project role.
|
|
3283
3169
|
*
|
|
3284
|
-
* @async
|
|
3285
3170
|
* @param name - Role name.
|
|
3286
3171
|
* @param description - Role description.
|
|
3287
|
-
* @param permissions - Actions are allowed to be performed. See
|
|
3288
|
-
*
|
|
3172
|
+
* @param permissions - Actions are allowed to be performed. See {@link Role.permissions} for
|
|
3173
|
+
* more details.
|
|
3289
3174
|
*/
|
|
3290
3175
|
createRole(name, description, permissions) {
|
|
3291
3176
|
return this.internalPost("/roles", {
|
|
@@ -3299,7 +3184,6 @@
|
|
|
3299
3184
|
/**
|
|
3300
3185
|
* Delete project role.
|
|
3301
3186
|
*
|
|
3302
|
-
* @async
|
|
3303
3187
|
* @param name - Role name.
|
|
3304
3188
|
* @returns Returns the raw data of a deleted role.
|
|
3305
3189
|
*/
|
|
@@ -3308,8 +3192,6 @@
|
|
|
3308
3192
|
}
|
|
3309
3193
|
/**
|
|
3310
3194
|
* Returns a list of project members.
|
|
3311
|
-
*
|
|
3312
|
-
* @async
|
|
3313
3195
|
*/
|
|
3314
3196
|
getMembers() {
|
|
3315
3197
|
return this.internalGet("/members")
|
|
@@ -3319,7 +3201,6 @@
|
|
|
3319
3201
|
/**
|
|
3320
3202
|
* Returns the member information.
|
|
3321
3203
|
*
|
|
3322
|
-
* @async
|
|
3323
3204
|
* @param memberId - Member ID.
|
|
3324
3205
|
*/
|
|
3325
3206
|
getMember(memberId) {
|
|
@@ -3330,7 +3211,6 @@
|
|
|
3330
3211
|
/**
|
|
3331
3212
|
* Add a user to the project to become a member and have permission to perform actions.
|
|
3332
3213
|
*
|
|
3333
|
-
* @async
|
|
3334
3214
|
* @param userId - User ID.
|
|
3335
3215
|
* @param role - User role from the list of project roles.
|
|
3336
3216
|
*/
|
|
@@ -3342,7 +3222,6 @@
|
|
|
3342
3222
|
/**
|
|
3343
3223
|
* Remove a member from a project.
|
|
3344
3224
|
*
|
|
3345
|
-
* @async
|
|
3346
3225
|
* @param memberId - Member ID.
|
|
3347
3226
|
* @returns Returns the raw data of a deleted member.
|
|
3348
3227
|
*/
|
|
@@ -3363,9 +3242,7 @@
|
|
|
3363
3242
|
*/
|
|
3364
3243
|
/**
|
|
3365
3244
|
* Returns a list of project files. To add a file to this list, create a `project` permission
|
|
3366
|
-
* on the file using {@link File
|
|
3367
|
-
*
|
|
3368
|
-
* @async
|
|
3245
|
+
* on the file using {@link File.createPermission | File.createPermission()}.
|
|
3369
3246
|
*/
|
|
3370
3247
|
getFilesInformation() {
|
|
3371
3248
|
return this.httpClient
|
|
@@ -3426,7 +3303,7 @@
|
|
|
3426
3303
|
}
|
|
3427
3304
|
/**
|
|
3428
3305
|
* User avatar image URL or empty string if the user does not have an avatar. Use
|
|
3429
|
-
* {@link
|
|
3306
|
+
* {@link setAvatar | setAvatar()} to change avatar image.
|
|
3430
3307
|
*
|
|
3431
3308
|
* @readonly
|
|
3432
3309
|
*/
|
|
@@ -3611,7 +3488,8 @@
|
|
|
3611
3488
|
return this.data.storageUsed;
|
|
3612
3489
|
}
|
|
3613
3490
|
/**
|
|
3614
|
-
* The user's access token (API key). Use {@link Client.signInWithToken()}
|
|
3491
|
+
* The user's access token (API key). Use {@link signInWithToken | Client.signInWithToken()}
|
|
3492
|
+
* to log in using token.
|
|
3615
3493
|
*
|
|
3616
3494
|
* @readonly
|
|
3617
3495
|
*/
|
|
@@ -3655,7 +3533,6 @@
|
|
|
3655
3533
|
* Only administrators can update other users. If the current logged in user is not an
|
|
3656
3534
|
* administrator, they can only update themself, otherwise an exception will be thrown.
|
|
3657
3535
|
*
|
|
3658
|
-
* @async
|
|
3659
3536
|
* @param data - Raw user data.
|
|
3660
3537
|
*/
|
|
3661
3538
|
async update(data) {
|
|
@@ -3685,7 +3562,6 @@
|
|
|
3685
3562
|
*
|
|
3686
3563
|
* You need to re-login to continue working after deleting the current logged in user.
|
|
3687
3564
|
*
|
|
3688
|
-
* @async
|
|
3689
3565
|
* @returns Returns the raw data of a deleted user.
|
|
3690
3566
|
*/
|
|
3691
3567
|
delete() {
|
|
@@ -3709,8 +3585,6 @@
|
|
|
3709
3585
|
/**
|
|
3710
3586
|
* Save user data changes to the server. Call this method to update user data on the server
|
|
3711
3587
|
* after any changes.
|
|
3712
|
-
*
|
|
3713
|
-
* @async
|
|
3714
3588
|
*/
|
|
3715
3589
|
save() {
|
|
3716
3590
|
return this.update(this.data);
|
|
@@ -3721,7 +3595,6 @@
|
|
|
3721
3595
|
* Only administrators can set the avatar of other users. If the current logged in user is
|
|
3722
3596
|
* not an administrator, they can only set their avatar, otherwise an exception will be thrown.
|
|
3723
3597
|
*
|
|
3724
|
-
* @async
|
|
3725
3598
|
* @param image - Avatar image. Can be a
|
|
3726
3599
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
3727
3600
|
* string,
|
|
@@ -3754,8 +3627,6 @@
|
|
|
3754
3627
|
*
|
|
3755
3628
|
* Only administrators can remove the avatar of other users. If the current logged in user is
|
|
3756
3629
|
* not an administrator, they can only remove their avatar, otherwise an exception will be thrown.
|
|
3757
|
-
*
|
|
3758
|
-
* @async
|
|
3759
3630
|
*/
|
|
3760
3631
|
async deleteAvatar() {
|
|
3761
3632
|
if (this.httpClient.signInUserIsAdmin) {
|
|
@@ -3782,7 +3653,6 @@
|
|
|
3782
3653
|
*
|
|
3783
3654
|
* To change their password, non-administrator users must provide their old password.
|
|
3784
3655
|
*
|
|
3785
|
-
* @async
|
|
3786
3656
|
* @param newPassword - New user password.
|
|
3787
3657
|
* @param oldPassword - Old user password. Only required for non-administrator users to
|
|
3788
3658
|
* change their password.
|
|
@@ -3807,9 +3677,9 @@
|
|
|
3807
3677
|
|
|
3808
3678
|
///////////////////////////////////////////////////////////////////////////////
|
|
3809
3679
|
/**
|
|
3810
|
-
* The `Client.js` library class that provides methods to access the
|
|
3811
|
-
*
|
|
3812
|
-
* Projects, Files, Issues etc.
|
|
3680
|
+
* The `Client.js` library class that provides methods to access the
|
|
3681
|
+
* {@link https://cloud.opendesign.com/docs/index.html#/opencloud_server | Open Cloud Server}
|
|
3682
|
+
* resources like Projects, Files, Issues etc.
|
|
3813
3683
|
*/
|
|
3814
3684
|
class Client extends EventEmitter2 {
|
|
3815
3685
|
/**
|
|
@@ -3825,7 +3695,7 @@
|
|
|
3825
3695
|
this.configure(params);
|
|
3826
3696
|
}
|
|
3827
3697
|
/**
|
|
3828
|
-
* Open Cloud Server URL. Use {@link
|
|
3698
|
+
* Open Cloud Server URL. Use {@link configure | configure()} to change server URL.
|
|
3829
3699
|
*
|
|
3830
3700
|
* @readonly
|
|
3831
3701
|
*/
|
|
@@ -3834,6 +3704,8 @@
|
|
|
3834
3704
|
}
|
|
3835
3705
|
/**
|
|
3836
3706
|
* Deprecated since `25.3`. Use `Viewer.options()` instead to change Viewer parameters.
|
|
3707
|
+
*
|
|
3708
|
+
* @deprecated
|
|
3837
3709
|
*/
|
|
3838
3710
|
get options() {
|
|
3839
3711
|
console.warn("Client.options has been deprecated since 25.3 and will be removed in a future release, use Viewer.options instead.");
|
|
@@ -3894,8 +3766,6 @@
|
|
|
3894
3766
|
*/
|
|
3895
3767
|
/**
|
|
3896
3768
|
* Returns server version.
|
|
3897
|
-
*
|
|
3898
|
-
* @async
|
|
3899
3769
|
*/
|
|
3900
3770
|
version() {
|
|
3901
3771
|
return this.httpClient
|
|
@@ -3904,16 +3774,15 @@
|
|
|
3904
3774
|
.then((data) => ({
|
|
3905
3775
|
...data,
|
|
3906
3776
|
server: data.version,
|
|
3907
|
-
client: "25.7.
|
|
3777
|
+
client: "25.7.2",
|
|
3908
3778
|
}));
|
|
3909
3779
|
}
|
|
3910
3780
|
/**
|
|
3911
3781
|
* Register a new user with the specified email and password.
|
|
3912
3782
|
*
|
|
3913
|
-
* @async
|
|
3914
3783
|
* @param email - User email. Cannot be empty.
|
|
3915
3784
|
* @param password - User password. Cannot be empty. Password can only contain letters (a-z,
|
|
3916
|
-
* A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]
|
|
3785
|
+
* A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
|
|
3917
3786
|
* @param userName - User name. Cannot be empty or blank if defined. Leave undefined to use
|
|
3918
3787
|
* `username` from email.
|
|
3919
3788
|
*/
|
|
@@ -3930,7 +3799,6 @@
|
|
|
3930
3799
|
* Resend the Confirmation Email to new user. If the user's email is already confirmed, an
|
|
3931
3800
|
* exception will be thrown.
|
|
3932
3801
|
*
|
|
3933
|
-
* @async
|
|
3934
3802
|
* @param email - User email.
|
|
3935
3803
|
* @param password - User password.
|
|
3936
3804
|
*/
|
|
@@ -3942,7 +3810,6 @@
|
|
|
3942
3810
|
/**
|
|
3943
3811
|
* Confirm the user's email. If the user's email is already confirmed, an exception will be thrown.
|
|
3944
3812
|
*
|
|
3945
|
-
* @async
|
|
3946
3813
|
* @param emailConfirmationId - Confirmation code from the Confirmation Email.
|
|
3947
3814
|
*/
|
|
3948
3815
|
confirmUserEmail(emailConfirmationId) {
|
|
@@ -3953,7 +3820,6 @@
|
|
|
3953
3820
|
/**
|
|
3954
3821
|
* Log in an existing user using email or user name.
|
|
3955
3822
|
*
|
|
3956
|
-
* @async
|
|
3957
3823
|
* @param email - An email or user name for authentication request.
|
|
3958
3824
|
* @param password - Password for authentication request.
|
|
3959
3825
|
*/
|
|
@@ -3967,7 +3833,6 @@
|
|
|
3967
3833
|
/**
|
|
3968
3834
|
* Log in an existing user using access token (API Key).
|
|
3969
3835
|
*
|
|
3970
|
-
* @async
|
|
3971
3836
|
* @param token - An access token for authentication request. See {@link User.token} for more details.
|
|
3972
3837
|
*/
|
|
3973
3838
|
async signInWithToken(token) {
|
|
@@ -4007,16 +3872,12 @@
|
|
|
4007
3872
|
* - Open the `provider.url` link using `window.open()`.
|
|
4008
3873
|
* - Add a `/oauth` path (server-defined) handler to the router. In this handler, show an error
|
|
4009
3874
|
* message if the `error` search parameter is present, or log in with the `token` search parameter.
|
|
4010
|
-
*
|
|
4011
|
-
* @async
|
|
4012
3875
|
*/
|
|
4013
3876
|
getIdentityProviders() {
|
|
4014
3877
|
return this.httpClient.get("/identity").then((response) => response.json());
|
|
4015
3878
|
}
|
|
4016
3879
|
/**
|
|
4017
3880
|
* Returns the current server settings.
|
|
4018
|
-
*
|
|
4019
|
-
* @async
|
|
4020
3881
|
*/
|
|
4021
3882
|
getServerSettings() {
|
|
4022
3883
|
return this.httpClient.get("/settings").then((response) => response.json());
|
|
@@ -4026,8 +3887,6 @@
|
|
|
4026
3887
|
*
|
|
4027
3888
|
* Only administrators can change server settings. If the current logged in user is not an
|
|
4028
3889
|
* administrator, an exception will be thrown.
|
|
4029
|
-
*
|
|
4030
|
-
* @async
|
|
4031
3890
|
*/
|
|
4032
3891
|
updateServerSettings(settings) {
|
|
4033
3892
|
return this.httpClient.put("/settings", settings).then((response) => response.json());
|
|
@@ -4037,8 +3896,6 @@
|
|
|
4037
3896
|
*
|
|
4038
3897
|
* Only administrators can get a list of users. If the current logged in user is not an
|
|
4039
3898
|
* administrator, an exception will be thrown.
|
|
4040
|
-
*
|
|
4041
|
-
* @async
|
|
4042
3899
|
*/
|
|
4043
3900
|
getUsers() {
|
|
4044
3901
|
return this.httpClient
|
|
@@ -4053,7 +3910,6 @@
|
|
|
4053
3910
|
* Only administrators can get other users. If the current logged in user is not an
|
|
4054
3911
|
* administrator, they can only get themselves, otherwise an exception will be thrown.
|
|
4055
3912
|
*
|
|
4056
|
-
* @async
|
|
4057
3913
|
* @param userId - User ID.
|
|
4058
3914
|
*/
|
|
4059
3915
|
getUser(userId) {
|
|
@@ -4081,10 +3937,9 @@
|
|
|
4081
3937
|
* Only administrators can create users. If the current logged in user is not an
|
|
4082
3938
|
* administrator, an exception will be thrown.
|
|
4083
3939
|
*
|
|
4084
|
-
* @async
|
|
4085
3940
|
* @param email - User email. Cannot be empty.
|
|
4086
3941
|
* @param password - User password. Cannot be empty. Password can only contain latin letters
|
|
4087
|
-
* (a-z, A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]
|
|
3942
|
+
* (a-z, A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
|
|
4088
3943
|
* @param params - Additional user data.
|
|
4089
3944
|
* @param params.isAdmin - `true` if user is an administrator.
|
|
4090
3945
|
* @param params.userName - User name. Cannot be empty or blank if defined. Leave undefined
|
|
@@ -4122,7 +3977,6 @@
|
|
|
4122
3977
|
*
|
|
4123
3978
|
* You need to re-login to continue working after deleting the current logged in user.
|
|
4124
3979
|
*
|
|
4125
|
-
* @async
|
|
4126
3980
|
* @param userId - User ID.
|
|
4127
3981
|
* @returns Returns the raw data of a deleted user.
|
|
4128
3982
|
*/
|
|
@@ -4155,16 +4009,15 @@
|
|
|
4155
4009
|
/**
|
|
4156
4010
|
* Returns a list of files the user has access to.
|
|
4157
4011
|
*
|
|
4158
|
-
* @async
|
|
4159
4012
|
* @param start - The starting index in the file list. Used for paging.
|
|
4160
4013
|
* @param limit - The maximum number of files that should be returned per request. Used for paging.
|
|
4161
4014
|
* @param name - Filter the files by part of the name.
|
|
4162
4015
|
* @param ext - Filter the files by extension. Extension can be `dgn`, `dwf`, `dwg`, `dxf`,
|
|
4163
4016
|
* `ifc`, `ifczip`, `nwc`, `nwd`, `obj`, `rcs`, `rfa`, `rvt`, `step`, `stl`, `stp`, `vsf`,
|
|
4164
4017
|
* or any other drawing or reference file type extension. You can specify multiple
|
|
4165
|
-
* extensions on one
|
|
4018
|
+
* extensions on one string by separating them with a `|`.
|
|
4166
4019
|
* @param ids - List of file IDs to return. You can specify multiple IDs on one `string` by
|
|
4167
|
-
* separating them with a
|
|
4020
|
+
* separating them with a `|`.
|
|
4168
4021
|
* @param sortByDesc - Allows to specify the descending order of the result. By default,
|
|
4169
4022
|
* files are sorted by name in ascending order.
|
|
4170
4023
|
* @param {string} sortField - Allows to specify sort field.
|
|
@@ -4210,7 +4063,6 @@
|
|
|
4210
4063
|
/**
|
|
4211
4064
|
* Returns the file information.
|
|
4212
4065
|
*
|
|
4213
|
-
* @async
|
|
4214
4066
|
* @param fileId - File ID.
|
|
4215
4067
|
*/
|
|
4216
4068
|
getFile(fileId) {
|
|
@@ -4226,27 +4078,26 @@
|
|
|
4226
4078
|
*
|
|
4227
4079
|
* - {@link UploadProgressEvent | uploadprogress}
|
|
4228
4080
|
*
|
|
4229
|
-
* @
|
|
4230
|
-
*
|
|
4231
|
-
*
|
|
4232
|
-
*
|
|
4233
|
-
* object returned as a result of a user selecting files using the HTML `<input>` element.
|
|
4081
|
+
* @param file - Web API {@link https://developer.mozilla.org/docs/Web/API/File | File} object
|
|
4082
|
+
* are generally retrieved from a
|
|
4083
|
+
* {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList} object returned as
|
|
4084
|
+
* a result of a user selecting files using the HTML `<input>` element.
|
|
4234
4085
|
* @param params - An object containing upload parameters.
|
|
4235
|
-
* @param params.geometry
|
|
4086
|
+
* @param params.geometry - Create job to extract file geometry data. Can be:
|
|
4236
4087
|
*
|
|
4237
4088
|
* - `true` - Extract file geometry data into `VSFX` to open the file in `VisualizeJS` viewer.
|
|
4238
4089
|
* - `vsfx` - Extract file geometry data into `VSFX` to open the file in `VisualizeJS` viewer.
|
|
4239
4090
|
* - `gltf` - Extract file geometry data into `glTF` to open the file in `Three.js` viewer.
|
|
4240
4091
|
*
|
|
4241
|
-
* @param params.properties
|
|
4242
|
-
* @param params.waitForDone
|
|
4092
|
+
* @param params.properties - Create job to extract file properties.
|
|
4093
|
+
* @param params.waitForDone - Wait for geometry and properties jobs to complete.
|
|
4243
4094
|
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
4244
4095
|
* no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
4245
4096
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
4246
4097
|
* checking jobs status.
|
|
4247
|
-
* @param params.signal - An
|
|
4248
|
-
*
|
|
4249
|
-
* signal
|
|
4098
|
+
* @param params.signal - An
|
|
4099
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} *
|
|
4100
|
+
* signal, which can be used to abort waiting as desired.
|
|
4250
4101
|
* @param params.onProgress - Upload progress callback.
|
|
4251
4102
|
*/
|
|
4252
4103
|
async uploadFile(file, params = {
|
|
@@ -4278,7 +4129,6 @@
|
|
|
4278
4129
|
/**
|
|
4279
4130
|
* Delete the drawing or reference file from the server.
|
|
4280
4131
|
*
|
|
4281
|
-
* @async
|
|
4282
4132
|
* @param fileId - File ID.
|
|
4283
4133
|
* @returns Returns the raw data of a deleted file.
|
|
4284
4134
|
*/
|
|
@@ -4288,12 +4138,11 @@
|
|
|
4288
4138
|
/**
|
|
4289
4139
|
* Download the drawing or reference file.
|
|
4290
4140
|
*
|
|
4291
|
-
* @async
|
|
4292
4141
|
* @param fileId - File ID.
|
|
4293
4142
|
* @param onProgress - Download progress callback.
|
|
4294
|
-
* @param signal - An
|
|
4295
|
-
*
|
|
4296
|
-
* and abort it if desired.
|
|
4143
|
+
* @param signal - An
|
|
4144
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
4145
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
4297
4146
|
*/
|
|
4298
4147
|
downloadFile(fileId, onProgress, signal) {
|
|
4299
4148
|
return this.httpClient
|
|
@@ -4313,7 +4162,6 @@
|
|
|
4313
4162
|
/**
|
|
4314
4163
|
* Returns a list of jobs created by current user.
|
|
4315
4164
|
*
|
|
4316
|
-
* @async
|
|
4317
4165
|
* @param status - Filter the jobs by status. Status can be `waiting`, `inpogress`, `done` or
|
|
4318
4166
|
* `failed`. You can specify multiple statuses on one `string` by separating them with a "|".
|
|
4319
4167
|
* @param limit - The maximum number of jobs that should be returned per request. Used for paging.
|
|
@@ -4354,7 +4202,6 @@
|
|
|
4354
4202
|
/**
|
|
4355
4203
|
* Returns the job information.
|
|
4356
4204
|
*
|
|
4357
|
-
* @async
|
|
4358
4205
|
* @param jobId - Job ID.
|
|
4359
4206
|
*/
|
|
4360
4207
|
getJob(jobId) {
|
|
@@ -4366,7 +4213,6 @@
|
|
|
4366
4213
|
/**
|
|
4367
4214
|
* Create a new job.
|
|
4368
4215
|
*
|
|
4369
|
-
* @async
|
|
4370
4216
|
* @param fileId - File ID.
|
|
4371
4217
|
* @param outputFormat - The job type. Can be one of:
|
|
4372
4218
|
*
|
|
@@ -4379,7 +4225,7 @@
|
|
|
4379
4225
|
* before creating a job.
|
|
4380
4226
|
*
|
|
4381
4227
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
4382
|
-
* for the File Converter tool in form
|
|
4228
|
+
* for the File Converter tool in form `--arg=value`.
|
|
4383
4229
|
*/
|
|
4384
4230
|
createJob(fileId, outputFormat, parameters) {
|
|
4385
4231
|
return this.httpClient
|
|
@@ -4395,7 +4241,6 @@
|
|
|
4395
4241
|
* Remove a job from the server job list. The method does not delete or stop jobs that are
|
|
4396
4242
|
* already being executed.
|
|
4397
4243
|
*
|
|
4398
|
-
* @async
|
|
4399
4244
|
* @param jobId - Job ID.
|
|
4400
4245
|
* @returns Returns the raw data of a deleted job.
|
|
4401
4246
|
*/
|
|
@@ -4415,7 +4260,6 @@
|
|
|
4415
4260
|
/**
|
|
4416
4261
|
* Returns a list of assemblies the user has access to.
|
|
4417
4262
|
*
|
|
4418
|
-
* @async
|
|
4419
4263
|
* @param start - The starting index in the assembly list. Used for paging.
|
|
4420
4264
|
* @param limit - The maximum number of assemblies that should be returned per request. Used
|
|
4421
4265
|
* for paging.
|
|
@@ -4462,7 +4306,6 @@
|
|
|
4462
4306
|
/**
|
|
4463
4307
|
* Get assembly information.
|
|
4464
4308
|
*
|
|
4465
|
-
* @async
|
|
4466
4309
|
* @param assemblyId - Assembly ID.
|
|
4467
4310
|
*/
|
|
4468
4311
|
getAssembly(assemblyId) {
|
|
@@ -4474,11 +4317,10 @@
|
|
|
4474
4317
|
/**
|
|
4475
4318
|
* Create a new assembly.
|
|
4476
4319
|
*
|
|
4477
|
-
* @async
|
|
4478
4320
|
* @param files - List of file IDs.
|
|
4479
4321
|
* @param name - Assembly name.
|
|
4480
4322
|
* @param params - An object containing upload parameters.
|
|
4481
|
-
* @param params.waitForDone
|
|
4323
|
+
* @param params.waitForDone - Wait for assembly to be created.
|
|
4482
4324
|
*/
|
|
4483
4325
|
createAssembly(files, name, params) {
|
|
4484
4326
|
const { waitForDone } = params !== null && params !== void 0 ? params : {};
|
|
@@ -4491,7 +4333,6 @@
|
|
|
4491
4333
|
/**
|
|
4492
4334
|
* Delete the assembly from the server.
|
|
4493
4335
|
*
|
|
4494
|
-
* @async
|
|
4495
4336
|
* @param assemblyId - Assembly ID.
|
|
4496
4337
|
* @returns Returns the raw data of a deleted assembly.
|
|
4497
4338
|
*/
|
|
@@ -4511,7 +4352,6 @@
|
|
|
4511
4352
|
/**
|
|
4512
4353
|
* Returns a list of projects the user has access to.
|
|
4513
4354
|
*
|
|
4514
|
-
* @async
|
|
4515
4355
|
* @param start - The starting index in the project list. Used for paging.
|
|
4516
4356
|
* @param limit - The maximum number of projects that should be returned per request. Used for paging.
|
|
4517
4357
|
* @param name - Filter the projects by part of the name.
|
|
@@ -4576,7 +4416,6 @@
|
|
|
4576
4416
|
/**
|
|
4577
4417
|
* Returns the project information.
|
|
4578
4418
|
*
|
|
4579
|
-
* @async
|
|
4580
4419
|
* @param projectId - Project ID.
|
|
4581
4420
|
*/
|
|
4582
4421
|
getProject(projectId) {
|
|
@@ -4588,7 +4427,6 @@
|
|
|
4588
4427
|
/**
|
|
4589
4428
|
* Create a new project.
|
|
4590
4429
|
*
|
|
4591
|
-
* @async
|
|
4592
4430
|
* @param name - Project name.
|
|
4593
4431
|
* @param description - Project description.
|
|
4594
4432
|
* @param startDate - Project start date.
|
|
@@ -4608,7 +4446,6 @@
|
|
|
4608
4446
|
/**
|
|
4609
4447
|
* Delete the project from the server.
|
|
4610
4448
|
*
|
|
4611
|
-
* @async
|
|
4612
4449
|
* @param projectId - Project ID.
|
|
4613
4450
|
* @returns Returns the raw data of a deleted project.
|
|
4614
4451
|
*/
|
|
@@ -4629,7 +4466,7 @@
|
|
|
4629
4466
|
}
|
|
4630
4467
|
|
|
4631
4468
|
///////////////////////////////////////////////////////////////////////////////
|
|
4632
|
-
const version = "25.7.
|
|
4469
|
+
const version = "25.7.2";
|
|
4633
4470
|
|
|
4634
4471
|
exports.Assembly = Assembly;
|
|
4635
4472
|
exports.ClashTest = ClashTest;
|