@inweb/client 25.8.16 → 25.8.19
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/README.md +33 -12
- package/dist/client.js +378 -337
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +13 -5
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Assembly.d.ts +63 -61
- package/lib/Api/ClashTest.d.ts +29 -27
- package/lib/Api/Client.d.ts +85 -76
- package/lib/Api/ClientEvents.d.ts +1 -1
- package/lib/Api/File.d.ts +95 -73
- package/lib/Api/IAssembly.d.ts +26 -0
- package/lib/Api/Job.d.ts +7 -8
- package/lib/Api/Member.d.ts +9 -8
- package/lib/Api/Model.d.ts +19 -15
- package/lib/Api/Permission.d.ts +15 -15
- package/lib/Api/Project.d.ts +31 -23
- package/lib/Api/Role.d.ts +9 -8
- package/lib/Api/User.d.ts +21 -20
- package/lib/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/Api/Assembly.ts +63 -62
- package/src/Api/ClashTest.ts +40 -29
- package/src/Api/Client.ts +89 -77
- package/src/Api/ClientEvents.ts +1 -1
- package/src/Api/File.ts +94 -72
- package/src/Api/IAssembly.ts +27 -0
- package/src/Api/Job.ts +9 -13
- package/src/Api/Member.ts +9 -8
- package/src/Api/Model.ts +19 -15
- package/src/Api/Permission.ts +15 -15
- package/src/Api/Project.ts +31 -23
- package/src/Api/Role.ts +9 -8
- package/src/Api/User.ts +21 -20
- package/src/index.ts +1 -0
package/lib/Api/File.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ import { Model } from "./Model";
|
|
|
5
5
|
import { Permission } from "./Permission";
|
|
6
6
|
import { Job } from "./Job";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Provides properties and methods for obtaining information about a file on the server and
|
|
9
|
+
* managing its data and versions.
|
|
9
10
|
*/
|
|
10
11
|
export declare class File {
|
|
11
12
|
private _data;
|
|
@@ -13,8 +14,8 @@ export declare class File {
|
|
|
13
14
|
httpClient: IHttpClient;
|
|
14
15
|
path: string;
|
|
15
16
|
/**
|
|
16
|
-
* @param data -
|
|
17
|
-
* @param httpClient -
|
|
17
|
+
* @param data - Raw file data received from the server.
|
|
18
|
+
* @param httpClient - HTTP client instance used to send REST API requests to the server.
|
|
18
19
|
*/
|
|
19
20
|
constructor(data: any, httpClient: IHttpClient);
|
|
20
21
|
private appendVersionParam;
|
|
@@ -50,8 +51,9 @@ export declare class File {
|
|
|
50
51
|
get data(): any;
|
|
51
52
|
private set data(value);
|
|
52
53
|
/**
|
|
53
|
-
* Returns a list of
|
|
54
|
-
*
|
|
54
|
+
* Returns a list of file formats in which the active version of the file was exported.
|
|
55
|
+
*
|
|
56
|
+
* To export file to one of the supported formats create File Converter job using
|
|
55
57
|
* {@link createJob | createJob()}. To download exported file use
|
|
56
58
|
* {@link downloadResource | downloadResource()}.
|
|
57
59
|
*
|
|
@@ -61,10 +63,10 @@ export declare class File {
|
|
|
61
63
|
/**
|
|
62
64
|
* Geometry data type of the active file version. Can be one of:
|
|
63
65
|
*
|
|
64
|
-
* - `vsfx` - `VSFX
|
|
65
|
-
* - `gltf` - `glTF
|
|
66
|
+
* - `vsfx` - `VSFX` format, file can be opened in `VisualizeJS` viewer.
|
|
67
|
+
* - `gltf` - `glTF` format, file can be opened in `Three.js` viewer.
|
|
66
68
|
*
|
|
67
|
-
* Returns an empty string if geometry data has not yet been
|
|
69
|
+
* Returns an empty string if geometry data has not yet been converted. A files without
|
|
68
70
|
* geometry data can be exported to other formas, but cannot be opened in viewer.
|
|
69
71
|
*/
|
|
70
72
|
get geometryType(): string;
|
|
@@ -75,7 +77,10 @@ export declare class File {
|
|
|
75
77
|
*/
|
|
76
78
|
get id(): string;
|
|
77
79
|
/**
|
|
78
|
-
* Returns `true` if source of the active file version has been deleted.
|
|
80
|
+
* Returns `true` if the source file of the active file version has been deleted.
|
|
81
|
+
*
|
|
82
|
+
* A files with deleted source file can be opened in the viewer, but cannot be exported to
|
|
83
|
+
* other formats.
|
|
79
84
|
*
|
|
80
85
|
* @readonly
|
|
81
86
|
*/
|
|
@@ -119,7 +124,7 @@ export declare class File {
|
|
|
119
124
|
*/
|
|
120
125
|
get size(): number;
|
|
121
126
|
/**
|
|
122
|
-
* Total size of all versions of the file in
|
|
127
|
+
* Total size of all versions of the file in bytes.
|
|
123
128
|
*
|
|
124
129
|
* @readonly
|
|
125
130
|
*/
|
|
@@ -127,8 +132,8 @@ export declare class File {
|
|
|
127
132
|
/**
|
|
128
133
|
* Data status of the active version of the file. Contains:
|
|
129
134
|
*
|
|
130
|
-
* - `geometry` - status of geometry data of `
|
|
131
|
-
* - `geometryGltf` - status of geometry data of `
|
|
135
|
+
* - `geometry` - status of geometry data of `vsfx` type.
|
|
136
|
+
* - `geometryGltf` - status of geometry data of `gltf` type.
|
|
132
137
|
* - `properties` - status of properties.
|
|
133
138
|
* - `validation` - status of validation.
|
|
134
139
|
*
|
|
@@ -178,40 +183,43 @@ export declare class File {
|
|
|
178
183
|
*/
|
|
179
184
|
get versions(): IFileVersionInfo[];
|
|
180
185
|
/**
|
|
181
|
-
*
|
|
186
|
+
* Reloads file data from the server.
|
|
182
187
|
*/
|
|
183
188
|
checkout(): Promise<this>;
|
|
184
189
|
/**
|
|
185
|
-
*
|
|
190
|
+
* Updates file data on the server.
|
|
186
191
|
*
|
|
187
192
|
* @param data - Raw file data.
|
|
188
193
|
*/
|
|
189
194
|
update(data: any): Promise<this>;
|
|
190
195
|
/**
|
|
191
|
-
*
|
|
196
|
+
* Deletes a file and all its versions from the server.
|
|
197
|
+
*
|
|
198
|
+
* You cannot delete a version file using `delete()`, only the original file. To delete a
|
|
199
|
+
* version file use {@link deleteVersion | deleteVersion()}.
|
|
192
200
|
*
|
|
193
201
|
* @returns Returns the raw data of a deleted file.
|
|
194
202
|
*/
|
|
195
203
|
delete(): Promise<any>;
|
|
196
204
|
/**
|
|
197
|
-
*
|
|
198
|
-
* after any changes.
|
|
205
|
+
* Saves file properties changes to the server. Call this method to update file data on the
|
|
206
|
+
* server after any property changes.
|
|
199
207
|
*/
|
|
200
208
|
save(): Promise<this>;
|
|
201
209
|
/**
|
|
202
|
-
*
|
|
210
|
+
* Sets or removes the file preview.
|
|
203
211
|
*
|
|
204
|
-
* @param image - Preview image.Can be a
|
|
212
|
+
* @param image - Preview image. Can be a
|
|
205
213
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
206
214
|
* string,
|
|
207
215
|
* {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},
|
|
208
|
-
* {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or
|
|
209
|
-
* {@link https://developer.mozilla.org/docs/Web/API/File | File} object. Setting
|
|
210
|
-
* `image` to `null` will remove the preview.
|
|
216
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or
|
|
217
|
+
* {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting
|
|
218
|
+
* the `image` to `null` will remove the preview.
|
|
211
219
|
*/
|
|
212
220
|
setPreview(image?: BodyInit | null): Promise<this>;
|
|
213
221
|
/**
|
|
214
|
-
*
|
|
222
|
+
* Removes the file preview.
|
|
215
223
|
*/
|
|
216
224
|
deletePreview(): Promise<this>;
|
|
217
225
|
/**
|
|
@@ -230,8 +238,8 @@ export declare class File {
|
|
|
230
238
|
/**
|
|
231
239
|
* Returns the properties for an objects in the active version of the file.
|
|
232
240
|
*
|
|
233
|
-
* @param handles - Object original handle or handles array.
|
|
234
|
-
*
|
|
241
|
+
* @param handles - Object original handle or handles array. Specify `undefined` to get
|
|
242
|
+
* properties for all objects in the file.
|
|
235
243
|
*/
|
|
236
244
|
getProperties(handles?: string | string[]): Promise<any[]>;
|
|
237
245
|
/**
|
|
@@ -271,13 +279,13 @@ export declare class File {
|
|
|
271
279
|
* ],
|
|
272
280
|
* };
|
|
273
281
|
*
|
|
274
|
-
* @param {
|
|
282
|
+
* @param {SeacrhPattern | QueryOperator} searchPattern - Search pattern or combination of
|
|
275
283
|
* the patterns, see example below.
|
|
276
284
|
* @returns {Promise<Properties[]>}
|
|
277
285
|
*/
|
|
278
286
|
searchProperties(searchPattern: any): Promise<any[]>;
|
|
279
287
|
/**
|
|
280
|
-
* Returns the
|
|
288
|
+
* Returns the CDA tree for an active version of the file.
|
|
281
289
|
*/
|
|
282
290
|
getCdaTree(): Promise<any[]>;
|
|
283
291
|
/**
|
|
@@ -285,13 +293,13 @@ export declare class File {
|
|
|
285
293
|
*/
|
|
286
294
|
getViewpoints(): Promise<any[]>;
|
|
287
295
|
/**
|
|
288
|
-
*
|
|
296
|
+
* Adds a new viewpoint to the file. To create a viewpoint use `Viewer.createViewpoint()`.
|
|
289
297
|
*
|
|
290
298
|
* @param viewpoint - Viewpoint.
|
|
291
299
|
*/
|
|
292
300
|
saveViewpoint(viewpoint: any): Promise<any>;
|
|
293
301
|
/**
|
|
294
|
-
*
|
|
302
|
+
* Deletes the specified file viewpoint.
|
|
295
303
|
*
|
|
296
304
|
* @param guid - Viewpoint GUID.
|
|
297
305
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
@@ -312,7 +320,7 @@ export declare class File {
|
|
|
312
320
|
*/
|
|
313
321
|
getSnapshotData(guid: string, bitmapGuid: string): Promise<string>;
|
|
314
322
|
/**
|
|
315
|
-
*
|
|
323
|
+
* Downloads the source file of active version of the file from the server.
|
|
316
324
|
*
|
|
317
325
|
* @param onProgress - Download progress callback.
|
|
318
326
|
* @param signal - An
|
|
@@ -321,7 +329,7 @@ export declare class File {
|
|
|
321
329
|
*/
|
|
322
330
|
download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
323
331
|
/**
|
|
324
|
-
*
|
|
332
|
+
* Downloads a resource file of the active version of the file. Resource files are files that
|
|
325
333
|
* contain model scene descriptions, or geometry data, or exported files.
|
|
326
334
|
*
|
|
327
335
|
* @example <caption>Export file to DWG.</caption>
|
|
@@ -341,7 +349,7 @@ export declare class File {
|
|
|
341
349
|
*/
|
|
342
350
|
downloadResource(dataId: string, onProgress?: (progress: number, chunk: Uint8Array) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
343
351
|
/**
|
|
344
|
-
*
|
|
352
|
+
* Downloads a part of resource file of the active version of the file. Resource files are
|
|
345
353
|
* files that contain model scene descriptions, or geometry data, or exported files.
|
|
346
354
|
*
|
|
347
355
|
* @param dataId - Resource file name.
|
|
@@ -370,7 +378,9 @@ export declare class File {
|
|
|
370
378
|
*/
|
|
371
379
|
downloadFileRange(requestId: number, records: any | null, dataId: string, onProgress?: (progress: number, downloaded: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<void>;
|
|
372
380
|
/**
|
|
373
|
-
* Returns a list of references
|
|
381
|
+
* Returns a list of file references.
|
|
382
|
+
*
|
|
383
|
+
* References are images, fonts, or any other files to correct rendering of the file.
|
|
374
384
|
*
|
|
375
385
|
* @param signal - An
|
|
376
386
|
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
@@ -378,20 +388,23 @@ export declare class File {
|
|
|
378
388
|
*/
|
|
379
389
|
getReferences(signal?: AbortSignal): Promise<IFileReferences>;
|
|
380
390
|
/**
|
|
381
|
-
*
|
|
391
|
+
* Sets the file references.
|
|
392
|
+
*
|
|
393
|
+
* References are images, fonts, or any other files to correct rendering of the file.
|
|
394
|
+
* Reference files must be uploaded to the server before they can be assigned to the current file.
|
|
382
395
|
*
|
|
383
396
|
* @param references - File references.
|
|
384
397
|
*/
|
|
385
398
|
setReferences(references: IFileReferences): Promise<IFileReferences>;
|
|
386
399
|
/**
|
|
387
|
-
*
|
|
400
|
+
* Runs a new job on the server for the active version of the file.
|
|
388
401
|
*
|
|
389
402
|
* @param outputFormat - The job type. Can be one of:
|
|
390
403
|
*
|
|
391
|
-
* - `geometry` -
|
|
392
|
-
* - `geometryGltf` -
|
|
404
|
+
* - `geometry` - Convert file geometry data to `VSFX` format suitable for `VisualizeJS` viewer.
|
|
405
|
+
* - `geometryGltf` - Convert file geometry data to `glTF` format suitable for `Three.js` viewer.
|
|
393
406
|
* - `properties` - Extract file properties.
|
|
394
|
-
* - `validation` - Validate the file. Only for `IFC
|
|
407
|
+
* - `validation` - Validate the file. Only for `IFC` files.
|
|
395
408
|
* - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the
|
|
396
409
|
* supported format. Use {@link exports | exports()} to get the list of completed file
|
|
397
410
|
* exports. Use {@link downloadResource | downloadResource()} to download the exported file.
|
|
@@ -403,20 +416,20 @@ export declare class File {
|
|
|
403
416
|
*/
|
|
404
417
|
createJob(outputFormat: string, parameters?: string | object): Promise<Job>;
|
|
405
418
|
/**
|
|
406
|
-
*
|
|
419
|
+
* Runs a job to convert geometry data of active version of the file. This is alias to
|
|
407
420
|
* {@link createJob | createJob("geometry")}.
|
|
408
421
|
*
|
|
409
422
|
* @param type - Geometry data type. Can be one of:
|
|
410
423
|
*
|
|
411
|
-
* - `vsfx` - `VSFX` (default), for opening a file in `VisualizeJS` viewer.
|
|
412
|
-
* - `gltf` - `glTF
|
|
424
|
+
* - `vsfx` - `VSFX` format (default), for opening a file in `VisualizeJS` viewer.
|
|
425
|
+
* - `gltf` - `glTF` format, for opening a file in `Three.js` viewer.
|
|
413
426
|
*
|
|
414
427
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
415
428
|
* for the File Converter tool in form `--arg=value`.
|
|
416
429
|
*/
|
|
417
430
|
extractGeometry(type?: string, parameters?: string | object): Promise<Job>;
|
|
418
431
|
/**
|
|
419
|
-
*
|
|
432
|
+
* Runs a job to extract properties of the active version of the file. This is alias to
|
|
420
433
|
* {@link createJob | createJob("properties")}.
|
|
421
434
|
*
|
|
422
435
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
@@ -424,7 +437,7 @@ export declare class File {
|
|
|
424
437
|
*/
|
|
425
438
|
extractProperties(parameters?: string | object): Promise<Job>;
|
|
426
439
|
/**
|
|
427
|
-
*
|
|
440
|
+
* Runs a job to validate the active version of the file. This is alias to
|
|
428
441
|
* {@link createJob | createJob("validation")}.
|
|
429
442
|
*
|
|
430
443
|
* To get validation report use {@link downloadResource | downloadResource("validation_report.json")}.
|
|
@@ -434,8 +447,8 @@ export declare class File {
|
|
|
434
447
|
*/
|
|
435
448
|
validate(parameters?: string | object): Promise<Job>;
|
|
436
449
|
/**
|
|
437
|
-
*
|
|
438
|
-
* `none`, `done` or `failed` status.
|
|
450
|
+
* Waits for jobs of the active version of the file to be done. Job is done when it changes
|
|
451
|
+
* to `none`, `done` or `failed` status.
|
|
439
452
|
*
|
|
440
453
|
* @param jobs - Job or job array to wait on. Can be `geometry`, `geometryGltf`,
|
|
441
454
|
* `properties`, `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom
|
|
@@ -463,36 +476,43 @@ export declare class File {
|
|
|
463
476
|
*/
|
|
464
477
|
getPermissions(): Promise<Permission[]>;
|
|
465
478
|
/**
|
|
466
|
-
* Returns
|
|
479
|
+
* Returns information about specified file permission.
|
|
467
480
|
*
|
|
468
481
|
* @param permissionId - Permission ID.
|
|
469
482
|
*/
|
|
470
483
|
getPermission(permissionId: string): Promise<Permission>;
|
|
471
484
|
/**
|
|
472
|
-
*
|
|
485
|
+
* Creates a new file permission.
|
|
486
|
+
*
|
|
487
|
+
* @param actions - Actions are allowed to be performed on a file with this permission:
|
|
488
|
+
*
|
|
489
|
+
* - `read` - The ability to read file description, geometry data and properties.
|
|
490
|
+
* - `readSourceFile` - The ability to read source file.
|
|
491
|
+
* - `write` - The ability to modify file name, description and references.
|
|
492
|
+
* - `readViewpoint` - The ability to read file viewpoints.
|
|
493
|
+
* - `createViewpoint` - The ability to create file viewpoints.
|
|
473
494
|
*
|
|
474
|
-
* @param actions - Actions are allowed to be performed on a file with this permission. See
|
|
475
|
-
* {@link Permission.actions} for more details.
|
|
476
495
|
* @param grantedTo - A collection of principials that will get access to the file.
|
|
477
496
|
* @param _public - Specifies whether all users have access to the file or not.
|
|
478
497
|
*/
|
|
479
498
|
createPermission(actions: string | string[], grantedTo: any[], _public: boolean): Promise<Permission>;
|
|
480
499
|
/**
|
|
481
|
-
*
|
|
500
|
+
* Removes the specified permission from the file.
|
|
482
501
|
*
|
|
483
502
|
* @param permissionId - Permission ID.
|
|
484
503
|
* @returns Returns the raw data of a deleted permission.
|
|
485
504
|
*/
|
|
486
505
|
deletePermission(permissionId: string): Promise<any>;
|
|
487
506
|
/**
|
|
488
|
-
*
|
|
507
|
+
* Uploads the new version of the file to the server, convert the geometry data and extract
|
|
508
|
+
* properties as needed.
|
|
489
509
|
*
|
|
490
|
-
* @param file -
|
|
510
|
+
* @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object
|
|
491
511
|
* are generally retrieved from a
|
|
492
512
|
* {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList} object returned as
|
|
493
513
|
* a result of a user selecting files using the HTML `<input>` element.
|
|
494
514
|
* @param params - An object containing upload parameters.
|
|
495
|
-
* @param params.geometry - Create job to
|
|
515
|
+
* @param params.geometry - Create job to convert file geometry data. The geometry data type
|
|
496
516
|
* is the same as the original file.
|
|
497
517
|
* @param params.properties - Create job to extract file properties.
|
|
498
518
|
* @param params.waitForDone - Wait for geometry and properties jobs to complete.
|
|
@@ -519,49 +539,51 @@ export declare class File {
|
|
|
519
539
|
*/
|
|
520
540
|
getVersions(): Promise<File[]>;
|
|
521
541
|
/**
|
|
522
|
-
* Returns the version file.
|
|
542
|
+
* Returns information about the specified version file.
|
|
523
543
|
*
|
|
524
544
|
* @param version - Desired version.
|
|
525
545
|
*/
|
|
526
546
|
getVersion(version: number): Promise<File>;
|
|
527
547
|
/**
|
|
528
|
-
*
|
|
548
|
+
* Deletes the specified version file.
|
|
529
549
|
*
|
|
530
550
|
* @param version - Version to delete.
|
|
531
551
|
*/
|
|
532
552
|
deleteVersion(version: number): Promise<any>;
|
|
533
553
|
/**
|
|
534
|
-
*
|
|
554
|
+
* Replaces the active version of the file with the selected version.
|
|
535
555
|
*
|
|
536
556
|
* @param version - Desired active version.
|
|
537
557
|
*/
|
|
538
558
|
setActiveVersion(version: number): Promise<this>;
|
|
539
559
|
/**
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
* -
|
|
546
|
-
* -
|
|
547
|
-
* -
|
|
548
|
-
* -
|
|
549
|
-
* -
|
|
550
|
-
* -
|
|
551
|
-
* -
|
|
552
|
-
* -
|
|
553
|
-
* -
|
|
560
|
+
* Makes the given version active on client side. Does not change the active file version on
|
|
561
|
+
* the server.
|
|
562
|
+
*
|
|
563
|
+
* This version change will affect the result:
|
|
564
|
+
*
|
|
565
|
+
* - {@link getModels | getModels()}
|
|
566
|
+
* - {@link getProperties | getProperties()}
|
|
567
|
+
* - {@link searchProperties | searchProperties()}
|
|
568
|
+
* - {@link getCdaTree | getCdaTree()}
|
|
569
|
+
* - {@link download | download()}
|
|
570
|
+
* - {@link downloadResource | downloadResource()}
|
|
571
|
+
* - {@link createJob | createJob()}
|
|
572
|
+
* - {@link extractGeometry | extractGeometry()}
|
|
573
|
+
* - {@link extractProperties | extractProperties()}
|
|
574
|
+
* - {@link validate | validate()}
|
|
575
|
+
* - {@link waitForDone | waitForDone()}
|
|
554
576
|
* - Viewer.open()
|
|
555
577
|
*
|
|
556
578
|
* Other clients will still continue to use the current active version of the file. Use
|
|
557
579
|
* `undefined` to revert back to the active version.
|
|
558
580
|
*
|
|
559
|
-
*
|
|
560
|
-
*
|
|
581
|
+
* You need to reload the file data using {@link checkout | checkout()} to match the size and
|
|
582
|
+
* status fields to the version you selected.
|
|
561
583
|
*/
|
|
562
584
|
useVersion(version?: number): this;
|
|
563
585
|
/**
|
|
564
|
-
*
|
|
586
|
+
* Deletes the source file of the active file version from the server.
|
|
565
587
|
*/
|
|
566
588
|
deleteSource(): Promise<this>;
|
|
567
589
|
}
|
package/lib/Api/IAssembly.d.ts
CHANGED
|
@@ -11,3 +11,29 @@ export interface IAssemblyVersionInfo {
|
|
|
11
11
|
createdAt: string;
|
|
12
12
|
ownerId: string;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Model transformation matrix.
|
|
16
|
+
*/
|
|
17
|
+
export interface IModelTransformMatrix {
|
|
18
|
+
/**
|
|
19
|
+
* Translation part, move by specified offset along the X, Y, Z axes.
|
|
20
|
+
*/
|
|
21
|
+
translate: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
z: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Rotation part, rotate by the specified angle, around the specified vector.
|
|
28
|
+
*/
|
|
29
|
+
rotation: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
z: number;
|
|
33
|
+
angle: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Scaling part, scale with multiplier, from center of extends.
|
|
37
|
+
*/
|
|
38
|
+
scale: number;
|
|
39
|
+
}
|
package/lib/Api/Job.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { IHttpClient } from "./IHttpClient";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* format to another, to obtain geometric data, validate the file, or run a clash test.
|
|
3
|
+
* Provides properties and methods for obtaining information about a job on the server.
|
|
5
4
|
*/
|
|
6
5
|
export declare class Job {
|
|
7
6
|
private _data;
|
|
8
7
|
httpClient: IHttpClient;
|
|
9
8
|
/**
|
|
10
|
-
* @param data -
|
|
11
|
-
* @param httpClient -
|
|
9
|
+
* @param data - Raw job data received from the server.
|
|
10
|
+
* @param httpClient - HTTP client instance used to send REST API requests to the server.
|
|
12
11
|
*/
|
|
13
12
|
constructor(data: any, httpClient: IHttpClient);
|
|
14
13
|
protected internalGet(): Promise<Response>;
|
|
@@ -98,11 +97,11 @@ export declare class Job {
|
|
|
98
97
|
*/
|
|
99
98
|
get startedAt(): string;
|
|
100
99
|
/**
|
|
101
|
-
*
|
|
100
|
+
* Reloads job data from the server.
|
|
102
101
|
*/
|
|
103
102
|
checkout(): Promise<this>;
|
|
104
103
|
/**
|
|
105
|
-
*
|
|
104
|
+
* Updates job data on the server.
|
|
106
105
|
*
|
|
107
106
|
* Only administrators can update job data. If the current logged in user is not an
|
|
108
107
|
* administrator, an exception will be thrown.
|
|
@@ -111,14 +110,14 @@ export declare class Job {
|
|
|
111
110
|
*/
|
|
112
111
|
update(data: any): Promise<this>;
|
|
113
112
|
/**
|
|
114
|
-
*
|
|
113
|
+
* Deletes a job from the server job list. Jobs that are in progress or have already been
|
|
115
114
|
* completed cannot be deleted.
|
|
116
115
|
*
|
|
117
116
|
* @returns Returns the raw data of a deleted job.
|
|
118
117
|
*/
|
|
119
118
|
delete(): Promise<any>;
|
|
120
119
|
/**
|
|
121
|
-
*
|
|
120
|
+
* Waits for job to be done. Job is done when it changes to `done` or `failed` status.
|
|
122
121
|
*
|
|
123
122
|
* @param params - An object containing waiting parameters.
|
|
124
123
|
* @param params.timeout - The time, in milliseconds that the function should wait job. If
|
package/lib/Api/Member.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { IHttpClient } from "./IHttpClient";
|
|
2
2
|
import { IShortUserDescription } from "./IUser";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Provides properties and methods for obtaining information about a {@link User | user} who has
|
|
5
|
+
* access to the {@link Project | project}.
|
|
5
6
|
*/
|
|
6
7
|
export declare class Member {
|
|
7
8
|
private _data;
|
|
8
9
|
projectId: string;
|
|
9
10
|
httpClient: IHttpClient;
|
|
10
11
|
/**
|
|
11
|
-
* @param data -
|
|
12
|
+
* @param data - Raw member data received from the server.
|
|
12
13
|
* @param projectId - Owner project ID.
|
|
13
|
-
* @param httpClient -
|
|
14
|
+
* @param httpClient - HTTP client instance used to send REST API requests to the server.
|
|
14
15
|
*/
|
|
15
16
|
constructor(data: any, projectId: string, httpClient: IHttpClient);
|
|
16
17
|
private internalGet;
|
|
@@ -55,24 +56,24 @@ export declare class Member {
|
|
|
55
56
|
*/
|
|
56
57
|
get user(): IShortUserDescription;
|
|
57
58
|
/**
|
|
58
|
-
*
|
|
59
|
+
* Reloads member data from the server.
|
|
59
60
|
*/
|
|
60
61
|
checkout(): Promise<this>;
|
|
61
62
|
/**
|
|
62
|
-
*
|
|
63
|
+
* Updates member data on the server.
|
|
63
64
|
*
|
|
64
65
|
* @param data - Raw member data.
|
|
65
66
|
*/
|
|
66
67
|
update(data: any): Promise<this>;
|
|
67
68
|
/**
|
|
68
|
-
*
|
|
69
|
+
* Removes a member from the project.
|
|
69
70
|
*
|
|
70
71
|
* @returns Returns the raw data of a deleted member.
|
|
71
72
|
*/
|
|
72
73
|
delete(): Promise<any>;
|
|
73
74
|
/**
|
|
74
|
-
*
|
|
75
|
-
* server after any changes.
|
|
75
|
+
* Saves member properties changes to the server. Call this method to update member data on
|
|
76
|
+
* the server after any property changes.
|
|
76
77
|
*/
|
|
77
78
|
save(): Promise<this>;
|
|
78
79
|
}
|
package/lib/Api/Model.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IHttpClient } from "./IHttpClient";
|
|
2
2
|
import type { File } from "./File";
|
|
3
3
|
import type { Assembly } from "./Assembly";
|
|
4
|
+
import type { IModelTransformMatrix } from "./IAssembly";
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* Provides properties and methods for working with view of the file or assembly. For example,
|
|
6
7
|
* for `dwg` it is a `Model` space or layout, and for `rvt` files it is a `3D` view.
|
|
7
8
|
*/
|
|
8
9
|
export declare class Model {
|
|
@@ -11,8 +12,8 @@ export declare class Model {
|
|
|
11
12
|
httpClient: IHttpClient;
|
|
12
13
|
path: string;
|
|
13
14
|
/**
|
|
14
|
-
* @param data -
|
|
15
|
-
* @param file - The
|
|
15
|
+
* @param data - Raw model data received from the server.
|
|
16
|
+
* @param file - The file/assembly instance that owns the model.
|
|
16
17
|
*/
|
|
17
18
|
constructor(data: any, file: File | Assembly);
|
|
18
19
|
/**
|
|
@@ -89,26 +90,27 @@ export declare class Model {
|
|
|
89
90
|
*
|
|
90
91
|
* @param handle - Model handle.
|
|
91
92
|
*/
|
|
92
|
-
getModelTransformMatrix(handle: string):
|
|
93
|
+
getModelTransformMatrix(handle: string): IModelTransformMatrix;
|
|
93
94
|
/**
|
|
94
|
-
*
|
|
95
|
+
* Sets or removes a model transformation.
|
|
95
96
|
*
|
|
96
97
|
* @param handle - Model handle.
|
|
97
|
-
* @param transform - Transformation matrix.
|
|
98
|
+
* @param transform - Transformation matrix. Specify `undefined` to remove transformation.
|
|
98
99
|
*/
|
|
99
|
-
setModelTransformMatrix(handle: string, transform:
|
|
100
|
+
setModelTransformMatrix(handle: string, transform: IModelTransformMatrix): Promise<this>;
|
|
100
101
|
/**
|
|
101
|
-
* Returns
|
|
102
|
+
* Returns a list of viewpoints of the owner file/assembly.
|
|
102
103
|
*/
|
|
103
104
|
getViewpoints(): Promise<any[]>;
|
|
104
105
|
/**
|
|
105
|
-
*
|
|
106
|
+
* Adds a new viewpoint to the owner file/assembly. To create a new viewpoint use
|
|
107
|
+
* `Viewer.createViewpoint()`.
|
|
106
108
|
*
|
|
107
109
|
* @param viewpoint - Viewpoint.
|
|
108
110
|
*/
|
|
109
111
|
saveViewpoint(viewpoint: any): Promise<any>;
|
|
110
112
|
/**
|
|
111
|
-
*
|
|
113
|
+
* Deletes the specified viewpoint from the owner file/assembly.
|
|
112
114
|
*
|
|
113
115
|
* @param guid - Viewpoint GUID.
|
|
114
116
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
@@ -122,15 +124,15 @@ export declare class Model {
|
|
|
122
124
|
*/
|
|
123
125
|
getSnapshot(guid: string): Promise<string>;
|
|
124
126
|
/**
|
|
125
|
-
* Returns snapshot data.
|
|
127
|
+
* Returns viewpoint snapshot data.
|
|
126
128
|
*
|
|
127
129
|
* @param guid - Viewpoint GUID.
|
|
128
130
|
* @param bitmapGuid - Bitmap GUID.
|
|
129
131
|
*/
|
|
130
132
|
getSnapshotData(guid: string, bitmapGuid: string): Promise<string>;
|
|
131
133
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
+
* Downloads a resource file. Resource files are files that contain model scene descriptions,
|
|
135
|
+
* or geometry data.
|
|
134
136
|
*
|
|
135
137
|
* @param dataId - Resource file name.
|
|
136
138
|
* @param onProgress - Download progress callback.
|
|
@@ -140,7 +142,7 @@ export declare class Model {
|
|
|
140
142
|
*/
|
|
141
143
|
downloadResource(dataId: string, onProgress?: (progress: number, chunk: Uint8Array) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
142
144
|
/**
|
|
143
|
-
*
|
|
145
|
+
* Downloads a part of resource file. Resource files are files that contain model scene
|
|
144
146
|
* descriptions, or geometry data.
|
|
145
147
|
*
|
|
146
148
|
* @param dataId - Resource file name.
|
|
@@ -169,7 +171,9 @@ export declare class Model {
|
|
|
169
171
|
*/
|
|
170
172
|
downloadFileRange(requestId: number, records: any | null, dataId: string, onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<void>;
|
|
171
173
|
/**
|
|
172
|
-
* Returns a list of references
|
|
174
|
+
* Returns a list of references of the owner file/assembly.
|
|
175
|
+
*
|
|
176
|
+
* References are images, fonts, or any other files to correct rendering of the file.
|
|
173
177
|
*
|
|
174
178
|
* @param signal - An
|
|
175
179
|
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|