@inweb/client 26.1.0 → 26.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +449 -434
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +35 -35
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Assembly.d.ts +69 -65
- package/lib/Api/ClashTest.d.ts +16 -16
- package/lib/Api/Client.d.ts +77 -78
- package/lib/Api/Endpoint.d.ts +6 -6
- package/lib/Api/FetchError.d.ts +5 -5
- package/lib/Api/File.d.ts +132 -120
- package/lib/Api/IHttpClient.d.ts +3 -4
- package/lib/Api/IRole.d.ts +6 -6
- package/lib/Api/ISharedLink.d.ts +1 -1
- package/lib/Api/IUser.d.ts +4 -4
- package/lib/Api/Job.d.ts +12 -12
- package/lib/Api/Member.d.ts +6 -6
- package/lib/Api/Model.d.ts +18 -18
- package/lib/Api/OAuthClient.d.ts +10 -10
- package/lib/Api/Permission.d.ts +20 -17
- package/lib/Api/Project.d.ts +13 -14
- package/lib/Api/Role.d.ts +2 -2
- package/lib/Api/SharedLink.d.ts +2 -2
- package/lib/Api/User.d.ts +31 -33
- package/package.json +2 -2
- package/src/Api/Assembly.ts +70 -66
- package/src/Api/ClashTest.ts +16 -16
- package/src/Api/Client.ts +77 -78
- package/src/Api/Endpoint.ts +6 -6
- package/src/Api/FetchError.ts +5 -5
- package/src/Api/File.ts +133 -121
- package/src/Api/IHttpClient.ts +3 -4
- package/src/Api/IRole.ts +6 -6
- package/src/Api/ISharedLink.ts +1 -1
- package/src/Api/IUser.ts +4 -4
- package/src/Api/Job.ts +12 -12
- package/src/Api/Member.ts +6 -6
- package/src/Api/Model.ts +18 -18
- package/src/Api/OAuthClient.ts +10 -10
- package/src/Api/Permission.ts +20 -17
- package/src/Api/Project.ts +13 -14
- package/src/Api/Role.ts +2 -2
- package/src/Api/SharedLink.ts +2 -2
- package/src/Api/User.ts +31 -33
package/lib/Api/FetchError.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare function statusText(status: number): string;
|
|
2
2
|
export declare function error400(text: string, _default?: string): string;
|
|
3
3
|
/**
|
|
4
|
-
* The `FetchError` object indicates an error when request to Open Cloud Server could not be
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The `FetchError` object indicates an error when request to Open Cloud Server could not be performed. A
|
|
5
|
+
* `FetchError` is typically (but not exclusively) thrown when a network error occurs, access denied, or
|
|
6
|
+
* object not found.
|
|
7
7
|
*/
|
|
8
8
|
export declare class FetchError extends Error {
|
|
9
9
|
/**
|
|
@@ -15,8 +15,8 @@ export declare class FetchError extends Error {
|
|
|
15
15
|
*/
|
|
16
16
|
statusText: string;
|
|
17
17
|
/**
|
|
18
|
-
* @property status - The
|
|
19
|
-
*
|
|
18
|
+
* @property status - The {@link https://developer.mozilla.org/docs/Web/HTTP/Status | HTTP status code}
|
|
19
|
+
* of the response.
|
|
20
20
|
* @property message - Error message.
|
|
21
21
|
*/
|
|
22
22
|
constructor(status: number, message?: string);
|
package/lib/Api/File.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ import { Job } from "./Job";
|
|
|
8
8
|
import { SharedLink } from "./SharedLink";
|
|
9
9
|
import { ISharedLinkPermissions } from "./ISharedLink";
|
|
10
10
|
/**
|
|
11
|
-
* Provides properties and methods for obtaining information about a file on the Open Cloud
|
|
12
|
-
*
|
|
11
|
+
* Provides properties and methods for obtaining information about a file on the Open Cloud Server and
|
|
12
|
+
* managing its data and versions.
|
|
13
13
|
*/
|
|
14
14
|
export declare class File extends Endpoint {
|
|
15
15
|
private _data;
|
|
@@ -63,8 +63,8 @@ export declare class File extends Endpoint {
|
|
|
63
63
|
* - `vsfx` - `VSFX` format, file can be opened in `VisualizeJS` viewer.
|
|
64
64
|
* - `gltf` - `glTF` format, file can be opened in `Three.js` viewer.
|
|
65
65
|
*
|
|
66
|
-
* Returns an empty string if geometry data has not yet been converted. A files without
|
|
67
|
-
*
|
|
66
|
+
* Returns an empty string if geometry data has not yet been converted. A files without geometry data
|
|
67
|
+
* can be exported to other formas, but cannot be opened in viewer.
|
|
68
68
|
*/
|
|
69
69
|
get geometryType(): string;
|
|
70
70
|
/**
|
|
@@ -76,8 +76,8 @@ export declare class File extends Endpoint {
|
|
|
76
76
|
/**
|
|
77
77
|
* Returns `true` if the source file of the active file version has been deleted.
|
|
78
78
|
*
|
|
79
|
-
* A files with deleted source file can be opened in the viewer, but cannot be exported to
|
|
80
|
-
*
|
|
79
|
+
* A files with deleted source file can be opened in the viewer, but cannot be exported to other
|
|
80
|
+
* formats.
|
|
81
81
|
*
|
|
82
82
|
* @readonly
|
|
83
83
|
*/
|
|
@@ -183,28 +183,27 @@ export declare class File extends Endpoint {
|
|
|
183
183
|
/**
|
|
184
184
|
* Deletes a file and all its versions from the server.
|
|
185
185
|
*
|
|
186
|
-
* You cannot delete a version file using `delete()`, only the original file. To delete a
|
|
187
|
-
*
|
|
186
|
+
* You cannot delete a version file using `delete()`, only the original file. To delete a version file
|
|
187
|
+
* use {@link deleteVersion | deleteVersion()}.
|
|
188
188
|
*
|
|
189
189
|
* @returns Returns the raw data of a deleted file. For more information, see
|
|
190
190
|
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
|
|
191
191
|
*/
|
|
192
192
|
delete(): Promise<any>;
|
|
193
193
|
/**
|
|
194
|
-
* Saves file properties changes to the server. Call this method to update file data on the
|
|
195
|
-
*
|
|
194
|
+
* Saves file properties changes to the server. Call this method to update file data on the server
|
|
195
|
+
* after any property changes.
|
|
196
196
|
*/
|
|
197
197
|
save(): Promise<this>;
|
|
198
198
|
/**
|
|
199
199
|
* Sets or removes the file preview.
|
|
200
200
|
*
|
|
201
201
|
* @param image - Preview image. Can be a
|
|
202
|
-
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
203
|
-
* string,
|
|
202
|
+
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,
|
|
204
203
|
* {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},
|
|
205
204
|
* {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or
|
|
206
|
-
* {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting
|
|
207
|
-
*
|
|
205
|
+
* {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`
|
|
206
|
+
* to `null` will remove the preview.
|
|
208
207
|
*/
|
|
209
208
|
setPreview(image?: BodyInit | null): Promise<this>;
|
|
210
209
|
/**
|
|
@@ -227,8 +226,8 @@ export declare class File extends Endpoint {
|
|
|
227
226
|
/**
|
|
228
227
|
* Returns the properties for an objects in the active version of the file.
|
|
229
228
|
*
|
|
230
|
-
* @param handles - Object original handle or handles array. Specify `undefined` to get
|
|
231
|
-
*
|
|
229
|
+
* @param handles - Object original handle or handles array. Specify `undefined` to get properties for
|
|
230
|
+
* all objects in the file.
|
|
232
231
|
*/
|
|
233
232
|
getProperties(handles?: string | string[]): Promise<any[]>;
|
|
234
233
|
/**
|
|
@@ -242,34 +241,40 @@ export declare class File extends Endpoint {
|
|
|
242
241
|
* Query operator. Operator name can be `$and`, `$or`, `$not`, `$eq`, `$regex`.
|
|
243
242
|
*
|
|
244
243
|
* @typedef {any} QueryOperator
|
|
245
|
-
* @property {string | SearchPattern[] | QueryOperator[]} * - Array of the query values or
|
|
246
|
-
*
|
|
247
|
-
*/
|
|
248
|
-
/**
|
|
249
|
-
* Returns the list of original handles for an objects in the active version of the file that
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
* @example
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
244
|
+
* @property {string | SearchPattern[] | QueryOperator[]} * - Array of the query values or patterns for
|
|
245
|
+
* operator.
|
|
246
|
+
*/
|
|
247
|
+
/**
|
|
248
|
+
* Returns the list of original handles for an objects in the active version of the file that match the
|
|
249
|
+
* specified patterns. Search patterns may be combined using query operators.
|
|
250
|
+
*
|
|
251
|
+
* @example Simple search pattern.
|
|
252
|
+
*
|
|
253
|
+
* ```javascript
|
|
254
|
+
* searchPattern = {
|
|
255
|
+
* key: "Category",
|
|
256
|
+
* value: "OST_Stairs",
|
|
257
|
+
* };
|
|
258
|
+
* ```
|
|
259
|
+
*
|
|
260
|
+
* @example Search patterns combination.
|
|
261
|
+
*
|
|
262
|
+
* ```javascript
|
|
263
|
+
* searchPattern = {
|
|
264
|
+
* $or: [
|
|
265
|
+
* {
|
|
266
|
+
* $and: [
|
|
267
|
+
* { key: "Category", value: "OST_GenericModel" },
|
|
268
|
+
* { key: "Level", value: "03 - Floor" },
|
|
269
|
+
* ],
|
|
270
|
+
* },
|
|
271
|
+
* { key: "Category", value: "OST_Stairs" },
|
|
272
|
+
* ],
|
|
273
|
+
* };
|
|
274
|
+
* ```
|
|
275
|
+
*
|
|
276
|
+
* @param {SeacrhPattern | QueryOperator} searchPattern - Search pattern or combination of the
|
|
277
|
+
* patterns, see example below.
|
|
273
278
|
* @returns {Promise<Properties[]>}
|
|
274
279
|
*/
|
|
275
280
|
searchProperties(searchPattern: any): Promise<any[]>;
|
|
@@ -316,41 +321,44 @@ export declare class File extends Endpoint {
|
|
|
316
321
|
*
|
|
317
322
|
* @param onProgress - Download progress callback.
|
|
318
323
|
* @param signal - An
|
|
319
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
320
|
-
*
|
|
324
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
|
|
325
|
+
* to communicate with a fetch request and abort it if desired.
|
|
321
326
|
*/
|
|
322
327
|
download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
323
328
|
/**
|
|
324
|
-
* Downloads a resource file of the active version of the file. Resource files are files that
|
|
325
|
-
*
|
|
329
|
+
* Downloads a resource file of the active version of the file. Resource files are files that contain
|
|
330
|
+
* model scene descriptions, or geometry data, or exported files.
|
|
331
|
+
*
|
|
332
|
+
* @example Export file to DWG.
|
|
326
333
|
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
*
|
|
334
|
+
* ```javascript
|
|
335
|
+
* const job = await file.crateJob("dwg");
|
|
336
|
+
* await job.waitForDone();
|
|
337
|
+
* const dwgFileName = file.exports.find((x) => x.endsWith(".dwg"));
|
|
338
|
+
* const arrayBuffer = await file.downloadResource(dwgFileName);
|
|
339
|
+
* const blob = new Blob([arrayBuffer]);
|
|
340
|
+
* const fileName = file.name + ".dwg";
|
|
341
|
+
* FileSaver.saveAs(blob, fileName);
|
|
342
|
+
* ```
|
|
335
343
|
*
|
|
336
344
|
* @param dataId - Resource file name.
|
|
337
345
|
* @param onProgress - Download progress callback.
|
|
338
346
|
* @param signal - An
|
|
339
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
340
|
-
*
|
|
347
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
|
|
348
|
+
* to communicate with a fetch request and abort it if desired.
|
|
341
349
|
*/
|
|
342
350
|
downloadResource(dataId: string, onProgress?: (progress: number, chunk: Uint8Array) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
343
351
|
/**
|
|
344
|
-
* Downloads a part of resource file of the active version of the file. Resource files are
|
|
345
|
-
*
|
|
352
|
+
* Downloads a part of resource file of the active version of the file. Resource files are files that
|
|
353
|
+
* contain model scene descriptions, or geometry data, or exported files.
|
|
346
354
|
*
|
|
347
355
|
* @param dataId - Resource file name.
|
|
348
356
|
* @param ranges - A range of resource file contents to download.
|
|
349
357
|
* @param requestId - Request ID for download progress callback.
|
|
350
358
|
* @param onProgress - Download progress callback.
|
|
351
359
|
* @param signal - An
|
|
352
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
353
|
-
*
|
|
360
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
|
|
361
|
+
* to communicate with a fetch request and abort it if desired.
|
|
354
362
|
*/
|
|
355
363
|
downloadResourceRange(dataId: string, requestId: number, ranges: Array<{
|
|
356
364
|
begin: number;
|
|
@@ -375,15 +383,15 @@ export declare class File extends Endpoint {
|
|
|
375
383
|
* References are images, fonts, or any other files to correct rendering of the file.
|
|
376
384
|
*
|
|
377
385
|
* @param signal - An
|
|
378
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
379
|
-
*
|
|
386
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
387
|
+
* can be used to abort waiting as desired.
|
|
380
388
|
*/
|
|
381
389
|
getReferences(signal?: AbortSignal): Promise<IFileReferences>;
|
|
382
390
|
/**
|
|
383
391
|
* Sets the file references.
|
|
384
392
|
*
|
|
385
|
-
* References are images, fonts, or any other files to correct rendering of the file.
|
|
386
|
-
*
|
|
393
|
+
* References are images, fonts, or any other files to correct rendering of the file. Reference files
|
|
394
|
+
* must be uploaded to the server before they can be assigned to the current file.
|
|
387
395
|
*
|
|
388
396
|
* @param references - File references.
|
|
389
397
|
*/
|
|
@@ -397,14 +405,14 @@ export declare class File extends Endpoint {
|
|
|
397
405
|
* - `geometryGltf` - Convert file geometry data to `glTF` format suitable for `Three.js` viewer.
|
|
398
406
|
* - `properties` - Extract file properties.
|
|
399
407
|
* - `validation` - Validate the file. Only for `IFC` files.
|
|
400
|
-
* - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
* - Other custom job name. Custom job runner must be registered in the job templates before
|
|
404
|
-
*
|
|
408
|
+
* - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the supported format.
|
|
409
|
+
* Use {@link exports | exports()} to get the list of completed file exports. Use
|
|
410
|
+
* {@link downloadResource | downloadResource()} to download the exported file.
|
|
411
|
+
* - Other custom job name. Custom job runner must be registered in the job templates before creating a
|
|
412
|
+
* job.
|
|
405
413
|
*
|
|
406
|
-
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
407
|
-
*
|
|
414
|
+
* @param parameters - Parameters for the job runner. Can be given as command line arguments for the
|
|
415
|
+
* File Converter tool in form `--arg=value`.
|
|
408
416
|
*/
|
|
409
417
|
createJob(outputFormat: string, parameters?: string | object): Promise<Job>;
|
|
410
418
|
/**
|
|
@@ -416,16 +424,16 @@ export declare class File extends Endpoint {
|
|
|
416
424
|
* - `vsfx` - `VSFX` format (default), for opening a file in `VisualizeJS` viewer.
|
|
417
425
|
* - `gltf` - `glTF` format, for opening a file in `Three.js` viewer.
|
|
418
426
|
*
|
|
419
|
-
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
420
|
-
*
|
|
427
|
+
* @param parameters - Parameters for the job runner. Can be given as command line arguments for the
|
|
428
|
+
* File Converter tool in form `--arg=value`.
|
|
421
429
|
*/
|
|
422
430
|
extractGeometry(type?: string, parameters?: string | object): Promise<Job>;
|
|
423
431
|
/**
|
|
424
432
|
* Runs a job to extract properties of the active version of the file. This is alias to
|
|
425
433
|
* {@link createJob | createJob("properties")}.
|
|
426
434
|
*
|
|
427
|
-
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
428
|
-
*
|
|
435
|
+
* @param parameters - Parameters for the job runner. Can be given as command line arguments for the
|
|
436
|
+
* File Converter tool in form `--arg=value`.
|
|
429
437
|
*/
|
|
430
438
|
extractProperties(parameters?: string | object): Promise<Job>;
|
|
431
439
|
/**
|
|
@@ -434,27 +442,26 @@ export declare class File extends Endpoint {
|
|
|
434
442
|
*
|
|
435
443
|
* To get validation report use {@link downloadResource | downloadResource("validation_report.json")}.
|
|
436
444
|
*
|
|
437
|
-
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
438
|
-
*
|
|
445
|
+
* @param parameters - Parameters for the job runner. Can be given as command line arguments for the
|
|
446
|
+
* File Converter tool in form `--arg=value`.
|
|
439
447
|
*/
|
|
440
448
|
validate(parameters?: string | object): Promise<Job>;
|
|
441
449
|
/**
|
|
442
|
-
* Waits for jobs of the active version of the file to be done. Job is done when it changes
|
|
443
|
-
*
|
|
450
|
+
* Waits for jobs of the active version of the file to be done. Job is done when it changes to `none`,
|
|
451
|
+
* `done` or `failed` status.
|
|
444
452
|
*
|
|
445
|
-
* @param jobs - Job or job array to wait on. Can be `geometry`, `geometryGltf`,
|
|
446
|
-
* `
|
|
447
|
-
*
|
|
448
|
-
*
|
|
449
|
-
* jobs have done. If `false`, the function returns when any one of the jobs are done.
|
|
453
|
+
* @param jobs - Job or job array to wait on. Can be `geometry`, `geometryGltf`, `properties`,
|
|
454
|
+
* `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom job name.
|
|
455
|
+
* @param waitAll - If this parameter is `true`, the function returns when all the specified jobs have
|
|
456
|
+
* done. If `false`, the function returns when any one of the jobs are done.
|
|
450
457
|
* @param params - An object containing waiting parameters.
|
|
451
|
-
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
452
|
-
*
|
|
453
|
-
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
454
|
-
*
|
|
458
|
+
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs
|
|
459
|
+
* are done during this time, the `TimeoutError` exception will be thrown.
|
|
460
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between checking
|
|
461
|
+
* jobs status.
|
|
455
462
|
* @param params.signal - An
|
|
456
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
457
|
-
*
|
|
463
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
464
|
+
* can be used to abort waiting as desired.
|
|
458
465
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
459
466
|
*/
|
|
460
467
|
waitForDone(jobs: string | string[], waitAll?: boolean, params?: {
|
|
@@ -476,15 +483,21 @@ export declare class File extends Endpoint {
|
|
|
476
483
|
/**
|
|
477
484
|
* Creates a new file permission for a user, project, or group.
|
|
478
485
|
*
|
|
479
|
-
* @example
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
*
|
|
486
|
+
* @example Grant the specified user permission to "update" the file.
|
|
487
|
+
*
|
|
488
|
+
* ```javascript
|
|
489
|
+
* const action = "update";
|
|
490
|
+
* const grantedTo = [{ user: { id: myUser.id, email: myUser.email } }];
|
|
491
|
+
* await file.createPermission(action, grantedTo);
|
|
492
|
+
* ```
|
|
493
|
+
*
|
|
494
|
+
* @example Add a file to the specified project in "read-only" mode.
|
|
483
495
|
*
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
496
|
+
* ```javascript
|
|
497
|
+
* const actions = ["read", "readSourceFile"];
|
|
498
|
+
* const grantedTo = [{ project: { id: myProject.id, name: myProject.name } }];
|
|
499
|
+
* await file.createPermission(actions, grantedTo);
|
|
500
|
+
* ```
|
|
488
501
|
*
|
|
489
502
|
* @param actions - Actions are allowed to be performed on a file with this permission:
|
|
490
503
|
*
|
|
@@ -507,25 +520,24 @@ export declare class File extends Endpoint {
|
|
|
507
520
|
*/
|
|
508
521
|
deletePermission(permissionId: string): Promise<any>;
|
|
509
522
|
/**
|
|
510
|
-
* Uploads the new version of the file to the server, convert the geometry data and extract
|
|
511
|
-
*
|
|
523
|
+
* Uploads the new version of the file to the server, convert the geometry data and extract properties
|
|
524
|
+
* as needed.
|
|
512
525
|
*
|
|
513
|
-
* @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
* a result of a user selecting files using the HTML `<input>` element.
|
|
526
|
+
* @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are
|
|
527
|
+
* generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}
|
|
528
|
+
* object returned as a result of a user selecting files using the HTML `<input>` element.
|
|
517
529
|
* @param params - An object containing upload parameters.
|
|
518
|
-
* @param params.geometry - Create job to convert file geometry data. The geometry data type
|
|
519
|
-
*
|
|
530
|
+
* @param params.geometry - Create job to convert file geometry data. The geometry data type is the
|
|
531
|
+
* same as the original file.
|
|
520
532
|
* @param params.properties - Create job to extract file properties.
|
|
521
533
|
* @param params.waitForDone - Wait for geometry and properties jobs to complete.
|
|
522
|
-
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
523
|
-
*
|
|
524
|
-
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
525
|
-
*
|
|
534
|
+
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs
|
|
535
|
+
* are done during this time, the `TimeoutError` exception will be thrown.
|
|
536
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between checking
|
|
537
|
+
* jobs status.
|
|
526
538
|
* @param params.signal - An
|
|
527
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
528
|
-
*
|
|
539
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
540
|
+
* can be used to abort waiting as desired.
|
|
529
541
|
* @param params.onProgress - Upload progress callback.
|
|
530
542
|
*/
|
|
531
543
|
uploadVersion(file: globalThis.File, params?: {
|
|
@@ -562,8 +574,8 @@ export declare class File extends Endpoint {
|
|
|
562
574
|
*/
|
|
563
575
|
setActiveVersion(version: number): Promise<this>;
|
|
564
576
|
/**
|
|
565
|
-
* Makes the given version active on client side. Does not change the active file version on
|
|
566
|
-
*
|
|
577
|
+
* Makes the given version active on client side. Does not change the active file version on the
|
|
578
|
+
* server.
|
|
567
579
|
*
|
|
568
580
|
* This version change will affect the result:
|
|
569
581
|
*
|
|
@@ -580,11 +592,11 @@ export declare class File extends Endpoint {
|
|
|
580
592
|
* - {@link waitForDone | waitForDone()}
|
|
581
593
|
* - Viewer.open()
|
|
582
594
|
*
|
|
583
|
-
* Other clients will still continue to use the current active version of the file. Use
|
|
584
|
-
*
|
|
595
|
+
* Other clients will still continue to use the current active version of the file. Use `undefined` to
|
|
596
|
+
* revert back to the active version.
|
|
585
597
|
*
|
|
586
|
-
* You need to reload the file data using {@link checkout | checkout()} to match the size and
|
|
587
|
-
*
|
|
598
|
+
* You need to reload the file data using {@link checkout | checkout()} to match the size and status
|
|
599
|
+
* fields to the version you selected.
|
|
588
600
|
*/
|
|
589
601
|
useVersion(version?: number): this;
|
|
590
602
|
/**
|
package/lib/Api/IHttpClient.d.ts
CHANGED
|
@@ -67,10 +67,9 @@ export interface IHttpClient {
|
|
|
67
67
|
* Upload a file to the server.
|
|
68
68
|
*
|
|
69
69
|
* @param relativePath - Upload endpoint relative path.
|
|
70
|
-
* @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* a result of a user selecting files using the HTML `<input>` element.
|
|
70
|
+
* @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are
|
|
71
|
+
* generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}
|
|
72
|
+
* object returned as a result of a user selecting files using the HTML `<input>` element.
|
|
74
73
|
* @param onProgress - Upload progress callback.
|
|
75
74
|
* @param init - A set of options that can be used to configure a fetch request. See
|
|
76
75
|
* {@link https://developer.mozilla.org/docs/Web/API/RequestInit | RequestInit} for more details.
|
package/lib/Api/IRole.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface IRoleActions {
|
|
5
5
|
/**
|
|
6
|
-
* Defines what actions are allowed to be performed at the project level. The available
|
|
7
|
-
*
|
|
6
|
+
* Defines what actions are allowed to be performed at the project level. The available actions
|
|
7
|
+
* include:
|
|
8
8
|
*
|
|
9
9
|
* - `update` - The ability to update the project details.
|
|
10
10
|
* - `createTopic` - The ability to create a new topic.
|
|
@@ -24,16 +24,16 @@ export interface IRoleActions {
|
|
|
24
24
|
*/
|
|
25
25
|
topicActions?: string[];
|
|
26
26
|
/**
|
|
27
|
-
* Defines what actions are allowed to be performed at the comment level. The available
|
|
28
|
-
*
|
|
27
|
+
* Defines what actions are allowed to be performed at the comment level. The available actions
|
|
28
|
+
* include:
|
|
29
29
|
*
|
|
30
30
|
* - `update` - The ability to update the comment.
|
|
31
31
|
* - `delete` - The ability to delete the comment.
|
|
32
32
|
*/
|
|
33
33
|
commentActions?: string[];
|
|
34
34
|
/**
|
|
35
|
-
* Defines what actions are allowed to be performed at the viewpoint level. The available
|
|
36
|
-
*
|
|
35
|
+
* Defines what actions are allowed to be performed at the viewpoint level. The available actions
|
|
36
|
+
* include:
|
|
37
37
|
*
|
|
38
38
|
* - `update` - The ability to update the viewpoint.
|
|
39
39
|
* - `delete` - The ability to delete the viewpoint.
|
package/lib/Api/ISharedLink.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface ISharedLinkPermissions {
|
|
|
27
27
|
/**
|
|
28
28
|
* true if the shared link is password protected.
|
|
29
29
|
*/
|
|
30
|
-
readonly passwordProtected?:
|
|
30
|
+
readonly passwordProtected?: boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Link expiration time (UTC) in the format specified in
|
|
33
33
|
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
package/lib/Api/IUser.d.ts
CHANGED
|
@@ -27,13 +27,13 @@ export interface IShortUserDesc {
|
|
|
27
27
|
*/
|
|
28
28
|
avatarUrl?: string;
|
|
29
29
|
/**
|
|
30
|
-
* User full name. Contains the user's first and last name. If first name and last names are
|
|
31
|
-
*
|
|
30
|
+
* User full name. Contains the user's first and last name. If first name and last names are empty,
|
|
31
|
+
* contains the user name.
|
|
32
32
|
*/
|
|
33
33
|
fullName?: string;
|
|
34
34
|
/**
|
|
35
|
-
* User initials. Contains a first letters of the user's first and last names. If first name
|
|
36
|
-
*
|
|
35
|
+
* User initials. Contains a first letters of the user's first and last names. If first name and last
|
|
36
|
+
* names are empty, contains the first letter of the user name.
|
|
37
37
|
*/
|
|
38
38
|
initials?: string;
|
|
39
39
|
}
|
package/lib/Api/Job.d.ts
CHANGED
|
@@ -64,8 +64,8 @@ export declare class Job extends Endpoint {
|
|
|
64
64
|
*/
|
|
65
65
|
get lastUpdate(): string;
|
|
66
66
|
/**
|
|
67
|
-
* Job type. Can be `properties`, `geomerty`, `geomertyGltf`, `validation`, `clash`, `dwg`,
|
|
68
|
-
* `
|
|
67
|
+
* Job type. Can be `properties`, `geomerty`, `geomertyGltf`, `validation`, `clash`, `dwg`, `obj`,
|
|
68
|
+
* `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom job name.
|
|
69
69
|
*
|
|
70
70
|
* @readonly
|
|
71
71
|
*/
|
|
@@ -103,16 +103,16 @@ export declare class Job extends Endpoint {
|
|
|
103
103
|
/**
|
|
104
104
|
* Updates job data on the server.
|
|
105
105
|
*
|
|
106
|
-
* Only administrators can update job data. If the current logged in user is not an
|
|
107
|
-
*
|
|
106
|
+
* Only administrators can update job data. If the current logged in user is not an administrator, an
|
|
107
|
+
* exception will be thrown.
|
|
108
108
|
*
|
|
109
109
|
* @param data - Raw job data. For more information, see
|
|
110
110
|
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
|
|
111
111
|
*/
|
|
112
112
|
update(data: any): Promise<this>;
|
|
113
113
|
/**
|
|
114
|
-
* Deletes a job from the server job list. Jobs that are in progress or have already been
|
|
115
|
-
*
|
|
114
|
+
* Deletes a job from the server job list. Jobs that are in progress or have already been completed
|
|
115
|
+
* cannot be deleted.
|
|
116
116
|
*
|
|
117
117
|
* @returns Returns the raw data of a deleted job. For more information, see
|
|
118
118
|
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
|
|
@@ -122,13 +122,13 @@ export declare class Job extends Endpoint {
|
|
|
122
122
|
* Waits for job to be done. Job is done when it changes to `done` or `failed` status.
|
|
123
123
|
*
|
|
124
124
|
* @param params - An object containing waiting parameters.
|
|
125
|
-
* @param params.timeout - The time, in milliseconds that the function should wait job. If
|
|
126
|
-
*
|
|
127
|
-
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
128
|
-
*
|
|
125
|
+
* @param params.timeout - The time, in milliseconds that the function should wait job. If jobs is not
|
|
126
|
+
* done during this time, the `TimeoutError` exception will be thrown.
|
|
127
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between checking
|
|
128
|
+
* job status.
|
|
129
129
|
* @param params.signal - An
|
|
130
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
131
|
-
*
|
|
130
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
131
|
+
* can be used to abort waiting as desired.
|
|
132
132
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
133
133
|
*/
|
|
134
134
|
waitForDone(params?: {
|
package/lib/Api/Member.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { IHttpClient } from "./IHttpClient";
|
|
|
2
2
|
import { Endpoint } from "./Endpoint";
|
|
3
3
|
import { IShortUserDesc } from "./IUser";
|
|
4
4
|
/**
|
|
5
|
-
* Provides properties and methods for obtaining information about a {@link User | user} who has
|
|
6
|
-
*
|
|
5
|
+
* Provides properties and methods for obtaining information about a {@link User | user} who has access to
|
|
6
|
+
* the {@link Project | project}.
|
|
7
7
|
*/
|
|
8
8
|
export declare class Member extends Endpoint {
|
|
9
9
|
private _data;
|
|
@@ -29,8 +29,8 @@ export declare class Member extends Endpoint {
|
|
|
29
29
|
*/
|
|
30
30
|
get id(): string;
|
|
31
31
|
/**
|
|
32
|
-
* Member role name in the project. See {@link Project.getRoles | Project.getRoles()} for list
|
|
33
|
-
*
|
|
32
|
+
* Member role name in the project. See {@link Project.getRoles | Project.getRoles()} for list of
|
|
33
|
+
* project roles.
|
|
34
34
|
*/
|
|
35
35
|
get role(): string;
|
|
36
36
|
set role(value: string);
|
|
@@ -65,8 +65,8 @@ export declare class Member extends Endpoint {
|
|
|
65
65
|
*/
|
|
66
66
|
delete(): Promise<any>;
|
|
67
67
|
/**
|
|
68
|
-
* Saves member properties changes to the server. Call this method to update member data on
|
|
69
|
-
*
|
|
68
|
+
* Saves member properties changes to the server. Call this method to update member data on the server
|
|
69
|
+
* after any property changes.
|
|
70
70
|
*/
|
|
71
71
|
save(): Promise<this>;
|
|
72
72
|
}
|