@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/lib/Api/File.d.ts
CHANGED
|
@@ -29,8 +29,8 @@ export declare class File {
|
|
|
29
29
|
*/
|
|
30
30
|
get activeVersion(): number;
|
|
31
31
|
/**
|
|
32
|
-
* File creation time (UTC) in the format specified in
|
|
33
|
-
*
|
|
32
|
+
* File creation time (UTC) in the format specified in
|
|
33
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
34
34
|
*
|
|
35
35
|
* @readonly
|
|
36
36
|
*/
|
|
@@ -52,7 +52,8 @@ export declare class File {
|
|
|
52
52
|
/**
|
|
53
53
|
* Returns a list of files in different formats in which the active version of the file was
|
|
54
54
|
* exported. To export file to one of the supported formats create File Converter job using
|
|
55
|
-
* {@link
|
|
55
|
+
* {@link createJob | createJob()}. To download exported file use
|
|
56
|
+
* {@link downloadResource | downloadResource()}.
|
|
56
57
|
*
|
|
57
58
|
* @readonly
|
|
58
59
|
*/
|
|
@@ -100,7 +101,7 @@ export declare class File {
|
|
|
100
101
|
get owner(): IShortUserDescription;
|
|
101
102
|
/**
|
|
102
103
|
* File preview image URL or empty string if the file does not have a preview. Use
|
|
103
|
-
* {@link
|
|
104
|
+
* {@link setPreview | setPreview()} to change preview image.
|
|
104
105
|
*
|
|
105
106
|
* @readonly
|
|
106
107
|
*/
|
|
@@ -140,8 +141,8 @@ export declare class File {
|
|
|
140
141
|
*/
|
|
141
142
|
get type(): string;
|
|
142
143
|
/**
|
|
143
|
-
* File last update time (UTC) in the format specified in
|
|
144
|
-
*
|
|
144
|
+
* File last update time (UTC) in the format specified in
|
|
145
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
145
146
|
*
|
|
146
147
|
* @readonly
|
|
147
148
|
*/
|
|
@@ -172,35 +173,28 @@ export declare class File {
|
|
|
172
173
|
get versions(): IFileVersionInfo[];
|
|
173
174
|
/**
|
|
174
175
|
* Refresh file data.
|
|
175
|
-
*
|
|
176
|
-
* @async
|
|
177
176
|
*/
|
|
178
177
|
checkout(): Promise<this>;
|
|
179
178
|
/**
|
|
180
179
|
* Update file data on the server.
|
|
181
180
|
*
|
|
182
|
-
* @async
|
|
183
181
|
* @param data - Raw file data.
|
|
184
182
|
*/
|
|
185
183
|
update(data: any): Promise<this>;
|
|
186
184
|
/**
|
|
187
185
|
* Delete the file and all its versions from the server.
|
|
188
186
|
*
|
|
189
|
-
* @async
|
|
190
187
|
* @returns Returns the raw data of a deleted file.
|
|
191
188
|
*/
|
|
192
189
|
delete(): Promise<any>;
|
|
193
190
|
/**
|
|
194
191
|
* Save file data changes to the server. Call this method to update file data on the server
|
|
195
192
|
* after any changes.
|
|
196
|
-
*
|
|
197
|
-
* @async
|
|
198
193
|
*/
|
|
199
194
|
save(): Promise<this>;
|
|
200
195
|
/**
|
|
201
196
|
* Set or remove the file preview.
|
|
202
197
|
*
|
|
203
|
-
* @async
|
|
204
198
|
* @param image - Preview image.Can be a
|
|
205
199
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
206
200
|
* string,
|
|
@@ -212,14 +206,10 @@ export declare class File {
|
|
|
212
206
|
setPreview(image?: BodyInit | null): Promise<this>;
|
|
213
207
|
/**
|
|
214
208
|
* Remove the file preview.
|
|
215
|
-
*
|
|
216
|
-
* @async
|
|
217
209
|
*/
|
|
218
210
|
deletePreview(): Promise<this>;
|
|
219
211
|
/**
|
|
220
212
|
* Returns a list of models of the active version of the file.
|
|
221
|
-
*
|
|
222
|
-
* @async
|
|
223
213
|
*/
|
|
224
214
|
getModels(): Promise<Model[]>;
|
|
225
215
|
getModelTransformMatrix(handle: string): any;
|
|
@@ -234,7 +224,6 @@ export declare class File {
|
|
|
234
224
|
/**
|
|
235
225
|
* Returns the properties for an objects in the active version of the file.
|
|
236
226
|
*
|
|
237
|
-
* @async
|
|
238
227
|
* @param handles - Object original handle or handles array. Leave this parameter `undefined`
|
|
239
228
|
* to get properties for all objects in the file.
|
|
240
229
|
*/
|
|
@@ -257,7 +246,6 @@ export declare class File {
|
|
|
257
246
|
* Returns the list of original handles for an objects in the active version of the file that
|
|
258
247
|
* match the specified patterns. Search patterns may be combined using query operators.
|
|
259
248
|
*
|
|
260
|
-
* @async
|
|
261
249
|
* @example <caption>Simple search pattern.</caption>
|
|
262
250
|
* searchPattern = {
|
|
263
251
|
* key: "Category",
|
|
@@ -284,27 +272,21 @@ export declare class File {
|
|
|
284
272
|
searchProperties(searchPattern: any): Promise<any[]>;
|
|
285
273
|
/**
|
|
286
274
|
* Returns the cda.json for an active version of the file.
|
|
287
|
-
*
|
|
288
|
-
* @async
|
|
289
275
|
*/
|
|
290
276
|
getCdaTree(): Promise<any[]>;
|
|
291
277
|
/**
|
|
292
278
|
* Returns a list of file viewpoints.
|
|
293
|
-
*
|
|
294
|
-
* @async
|
|
295
279
|
*/
|
|
296
280
|
getViewpoints(): Promise<any[]>;
|
|
297
281
|
/**
|
|
298
|
-
* Add new file viewpoint. To create a
|
|
282
|
+
* Add new file viewpoint. To create a viewpoint use `Viewer.createViewpoint()`.
|
|
299
283
|
*
|
|
300
|
-
* @async
|
|
301
284
|
* @param viewpoint - Viewpoint.
|
|
302
285
|
*/
|
|
303
286
|
saveViewpoint(viewpoint: any): Promise<any>;
|
|
304
287
|
/**
|
|
305
288
|
* Delete file viewpoint.
|
|
306
289
|
*
|
|
307
|
-
* @async
|
|
308
290
|
* @param guid - Viewpoint GUID.
|
|
309
291
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
310
292
|
*/
|
|
@@ -313,14 +295,12 @@ export declare class File {
|
|
|
313
295
|
* Returns viewpoint preview image as
|
|
314
296
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
|
|
315
297
|
*
|
|
316
|
-
* @async
|
|
317
298
|
* @param guid - Viewpoint GUID.
|
|
318
299
|
*/
|
|
319
300
|
getSnapshot(guid: string): Promise<string>;
|
|
320
301
|
/**
|
|
321
302
|
* Returns viewpoint preview data.
|
|
322
303
|
*
|
|
323
|
-
* @async
|
|
324
304
|
* @param guid - Viewpoint GUID.
|
|
325
305
|
* @param bitmapGuid - Bitmap GUID.
|
|
326
306
|
*/
|
|
@@ -328,11 +308,10 @@ export declare class File {
|
|
|
328
308
|
/**
|
|
329
309
|
* Download source of active version of the file.
|
|
330
310
|
*
|
|
331
|
-
* @async
|
|
332
311
|
* @param onProgress - Download progress callback.
|
|
333
|
-
* @param signal - An
|
|
334
|
-
*
|
|
335
|
-
* and abort it if desired.
|
|
312
|
+
* @param signal - An
|
|
313
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
314
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
336
315
|
*/
|
|
337
316
|
download(onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
338
317
|
/**
|
|
@@ -350,9 +329,9 @@ export declare class File {
|
|
|
350
329
|
*
|
|
351
330
|
* @param dataId - Resource file name.
|
|
352
331
|
* @param onProgress - Download progress callback.
|
|
353
|
-
* @param signal - An
|
|
354
|
-
*
|
|
355
|
-
* and abort it if desired.
|
|
332
|
+
* @param signal - An
|
|
333
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
334
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
356
335
|
*/
|
|
357
336
|
downloadResource(dataId: string, onProgress?: (progress: number, chunk: Uint8Array) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
358
337
|
/**
|
|
@@ -363,9 +342,9 @@ export declare class File {
|
|
|
363
342
|
* @param ranges - A range of resource file contents to download.
|
|
364
343
|
* @param requestId - Request ID for download progress callback.
|
|
365
344
|
* @param onProgress - Download progress callback.
|
|
366
|
-
* @param signal - An
|
|
367
|
-
*
|
|
368
|
-
* and abort it if desired.
|
|
345
|
+
* @param signal - An
|
|
346
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
347
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
369
348
|
*/
|
|
370
349
|
downloadResourceRange(dataId: string, requestId: number, ranges: Array<{
|
|
371
350
|
begin: number;
|
|
@@ -373,33 +352,34 @@ export declare class File {
|
|
|
373
352
|
requestId: number;
|
|
374
353
|
}>, onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
375
354
|
/**
|
|
376
|
-
* Deprecated since `25.3`. Use {@link
|
|
355
|
+
* Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.
|
|
356
|
+
*
|
|
357
|
+
* @deprecated
|
|
377
358
|
*/
|
|
378
359
|
partialDownloadResource(dataId: string, onProgress?: (progress: number, downloaded: Uint8Array) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
379
360
|
/**
|
|
380
|
-
* Deprecated since `25.3`. Use {@link
|
|
361
|
+
* Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.
|
|
362
|
+
*
|
|
363
|
+
* @deprecated
|
|
381
364
|
*/
|
|
382
365
|
downloadFileRange(requestId: number, records: any | null, dataId: string, onProgress?: (progress: number, downloaded: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<void>;
|
|
383
366
|
/**
|
|
384
367
|
* Returns a list of references to files used to correct rendering of the current file.
|
|
385
368
|
*
|
|
386
|
-
* @
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
* signal object instance, which can be used to abort waiting as desired.
|
|
369
|
+
* @param signal - An
|
|
370
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
371
|
+
* signal, which can be used to abort waiting as desired.
|
|
390
372
|
*/
|
|
391
373
|
getReferences(signal?: AbortSignal): Promise<IFileReferences>;
|
|
392
374
|
/**
|
|
393
375
|
* Set the file references.
|
|
394
376
|
*
|
|
395
|
-
* @async
|
|
396
377
|
* @param references - File references.
|
|
397
378
|
*/
|
|
398
379
|
setReferences(references: IFileReferences): Promise<IFileReferences>;
|
|
399
380
|
/**
|
|
400
381
|
* Create a new job for the active version of the file.
|
|
401
382
|
*
|
|
402
|
-
* @async
|
|
403
383
|
* @param outputFormat - The job type. Can be one of:
|
|
404
384
|
*
|
|
405
385
|
* - `geometry` - Extract file geometry data into `VSFX`.
|
|
@@ -407,71 +387,64 @@ export declare class File {
|
|
|
407
387
|
* - `properties` - Extract file properties.
|
|
408
388
|
* - `validation` - Validate the file. Only for `IFC`.
|
|
409
389
|
* - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the
|
|
410
|
-
* supported format. Use {@link
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
*
|
|
414
|
-
* before creating a job.
|
|
390
|
+
* supported format. Use {@link exports | exports()} to get the list of completed file
|
|
391
|
+
* exports. Use {@link downloadResource | downloadResource()} to download the exported file.
|
|
392
|
+
* - Other custom job name. Custom job runner must be registered in the job templates before
|
|
393
|
+
* creating a job.
|
|
415
394
|
*
|
|
416
395
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
417
|
-
* for the File Converter tool in form
|
|
396
|
+
* for the File Converter tool in form `--arg=value`.
|
|
418
397
|
*/
|
|
419
398
|
createJob(outputFormat: string, parameters?: string | object): Promise<Job>;
|
|
420
399
|
/**
|
|
421
400
|
* Create job to extract geometry data of active version of the file. This is alias to
|
|
422
|
-
* {@link
|
|
401
|
+
* {@link createJob | createJob("geometry")}.
|
|
423
402
|
*
|
|
424
|
-
* @async
|
|
425
403
|
* @param type - Geometry data type. Can be one of:
|
|
426
404
|
*
|
|
427
405
|
* - `vsfx` - `VSFX` (default), for opening a file in `VisualizeJS` viewer.
|
|
428
406
|
* - `gltf` - `glTF`, for opening a file in `Three.js` viewer.
|
|
429
407
|
*
|
|
430
408
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
431
|
-
* for the File Converter tool in form
|
|
409
|
+
* for the File Converter tool in form `--arg=value`.
|
|
432
410
|
*/
|
|
433
411
|
extractGeometry(type?: string, parameters?: string | object): Promise<Job>;
|
|
434
412
|
/**
|
|
435
413
|
* Create job to extract properties of the active version of the file. This is alias to
|
|
436
|
-
* {@link
|
|
414
|
+
* {@link createJob | createJob("properties")}.
|
|
437
415
|
*
|
|
438
|
-
* @async
|
|
439
416
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
440
|
-
* for the File Converter tool in form
|
|
417
|
+
* for the File Converter tool in form `--arg=value`.
|
|
441
418
|
*/
|
|
442
419
|
extractProperties(parameters?: string | object): Promise<Job>;
|
|
443
420
|
/**
|
|
444
421
|
* Create a job to validate the active version of the file. This is alias to
|
|
445
|
-
* {@link
|
|
422
|
+
* {@link createJob | createJob("validation")}.
|
|
446
423
|
*
|
|
447
|
-
* To get validation report use
|
|
448
|
-
* {@link File.downloadResource | File.downloadResource("validation_report.json")}.
|
|
424
|
+
* To get validation report use {@link downloadResource | downloadResource("validation_report.json")}.
|
|
449
425
|
*
|
|
450
|
-
* @async
|
|
451
426
|
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
452
|
-
* for the File Converter tool in form
|
|
427
|
+
* for the File Converter tool in form `--arg=value`.
|
|
453
428
|
*/
|
|
454
429
|
validate(parameters?: string | object): Promise<Job>;
|
|
455
430
|
/**
|
|
456
431
|
* Wait for jobs of the active version of the file to be done. Job is done when it changes to
|
|
457
432
|
* `none`, `done` or `failed` status.
|
|
458
433
|
*
|
|
459
|
-
* @
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
* @param
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
* @param {function} [params.onCheckout] - Waiting progress callback. Return `true` to cancel waiting.
|
|
474
|
-
* @returns {Promise<File>}
|
|
434
|
+
* @param jobs - Job or job array to wait on. Can be `geometry`, `geometryGltf`,
|
|
435
|
+
* `properties`, `validation`, `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` or custom
|
|
436
|
+
* job name.
|
|
437
|
+
* @param waitAll - If this parameter is `true`, the function returns when all the specified
|
|
438
|
+
* jobs have done. If `false`, the function returns when any one of the jobs are done.
|
|
439
|
+
* @param params - An object containing waiting parameters.
|
|
440
|
+
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
441
|
+
* no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
442
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
443
|
+
* checking jobs status.
|
|
444
|
+
* @param params.signal - An
|
|
445
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
446
|
+
* signal, which can be used to abort waiting as desired.
|
|
447
|
+
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
475
448
|
*/
|
|
476
449
|
waitForDone(jobs: string | string[], waitAll?: boolean, params?: {
|
|
477
450
|
timeout?: number;
|
|
@@ -481,31 +454,26 @@ export declare class File {
|
|
|
481
454
|
}): Promise<this>;
|
|
482
455
|
/**
|
|
483
456
|
* Returns a list of file permissions.
|
|
484
|
-
*
|
|
485
|
-
* @async
|
|
486
457
|
*/
|
|
487
458
|
getPermissions(): Promise<Permission[]>;
|
|
488
459
|
/**
|
|
489
460
|
* Returns the permission information.
|
|
490
461
|
*
|
|
491
|
-
* @async
|
|
492
462
|
* @param permissionId - Permission ID.
|
|
493
463
|
*/
|
|
494
464
|
getPermission(permissionId: string): Promise<Permission>;
|
|
495
465
|
/**
|
|
496
466
|
* Create a new file permission.
|
|
497
467
|
*
|
|
498
|
-
* @async
|
|
499
468
|
* @param actions - Actions are allowed to be performed on a file with this permission. See
|
|
500
|
-
* {@link Permission
|
|
469
|
+
* {@link Permission.actions} for more details.
|
|
501
470
|
* @param grantedTo - A collection of principials that will get access to the file.
|
|
502
|
-
* @param
|
|
471
|
+
* @param _public - Specifies whether all users have access to the file or not.
|
|
503
472
|
*/
|
|
504
473
|
createPermission(actions: string | string[], grantedTo: any[], _public: boolean): Promise<Permission>;
|
|
505
474
|
/**
|
|
506
475
|
* Delete file permission.
|
|
507
476
|
*
|
|
508
|
-
* @async
|
|
509
477
|
* @param permissionId - Permission ID.
|
|
510
478
|
* @returns Returns the raw data of a deleted permission.
|
|
511
479
|
*/
|
|
@@ -513,23 +481,22 @@ export declare class File {
|
|
|
513
481
|
/**
|
|
514
482
|
* Upload the new version of the file to the server and extract the geometry and properties as needed.
|
|
515
483
|
*
|
|
516
|
-
* @
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
* object returned as a result of a user selecting files using the HTML `<input>` element.
|
|
484
|
+
* @param file - Web API {@link https://developer.mozilla.org/docs/Web/API/File | File} object
|
|
485
|
+
* are generally retrieved from a
|
|
486
|
+
* {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList} object returned as
|
|
487
|
+
* a result of a user selecting files using the HTML `<input>` element.
|
|
521
488
|
* @param params - An object containing upload parameters.
|
|
522
|
-
* @param params.geometry
|
|
523
|
-
*
|
|
524
|
-
* @param params.properties
|
|
525
|
-
* @param params.waitForDone
|
|
489
|
+
* @param params.geometry - Create job to extract file geometry data. The geometry data type
|
|
490
|
+
* is the same as the original file.
|
|
491
|
+
* @param params.properties - Create job to extract file properties.
|
|
492
|
+
* @param params.waitForDone - Wait for geometry and properties jobs to complete.
|
|
526
493
|
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
527
494
|
* no one jobs are done during this time, the `TimeoutError` exception will be thrown.
|
|
528
495
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
529
496
|
* checking jobs status.
|
|
530
|
-
* @param params.signal - An
|
|
531
|
-
*
|
|
532
|
-
* signal
|
|
497
|
+
* @param params.signal - An
|
|
498
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
499
|
+
* signal, which can be used to abort waiting as desired.
|
|
533
500
|
* @param params.onProgress - Upload progress callback.
|
|
534
501
|
*/
|
|
535
502
|
uploadVersion(file: globalThis.File, params?: {
|
|
@@ -543,28 +510,23 @@ export declare class File {
|
|
|
543
510
|
}): Promise<File>;
|
|
544
511
|
/**
|
|
545
512
|
* Returns a list of version files.
|
|
546
|
-
*
|
|
547
|
-
* @async
|
|
548
513
|
*/
|
|
549
514
|
getVersions(): Promise<File[]>;
|
|
550
515
|
/**
|
|
551
516
|
* Returns the version file.
|
|
552
517
|
*
|
|
553
|
-
* @async
|
|
554
518
|
* @param version - Desired version.
|
|
555
519
|
*/
|
|
556
520
|
getVersion(version: number): Promise<File>;
|
|
557
521
|
/**
|
|
558
522
|
* Delete version file.
|
|
559
523
|
*
|
|
560
|
-
* @async
|
|
561
524
|
* @param version - Version to delete.
|
|
562
525
|
*/
|
|
563
526
|
deleteVersion(version: number): Promise<any>;
|
|
564
527
|
/**
|
|
565
528
|
* Replace the active version of the file with the selected version.
|
|
566
529
|
*
|
|
567
|
-
* @async
|
|
568
530
|
* @param version - Desired active version.
|
|
569
531
|
*/
|
|
570
532
|
setActiveVersion(version: number): Promise<this>;
|
|
@@ -588,8 +550,8 @@ export declare class File {
|
|
|
588
550
|
* Other clients will still continue to use the current active version of the file. Use
|
|
589
551
|
* `undefined` to revert back to the active version.
|
|
590
552
|
*
|
|
591
|
-
* Note. You need to update the file data using
|
|
592
|
-
*
|
|
553
|
+
* Note. You need to update the file data using {@link checkout | checkout()} to match the
|
|
554
|
+
* size and status fields to the version you selected.
|
|
593
555
|
*/
|
|
594
556
|
useVersion(version?: number): this;
|
|
595
557
|
}
|
package/lib/Api/Job.d.ts
CHANGED
|
@@ -21,14 +21,14 @@ export declare class Job {
|
|
|
21
21
|
*/
|
|
22
22
|
get assemblyId(): string;
|
|
23
23
|
/**
|
|
24
|
-
* Job creator ID. Use {@link Client
|
|
24
|
+
* Job creator ID. Use {@link Client.getUser | Client.getUser()} to obtain detailed creator information.
|
|
25
25
|
*
|
|
26
26
|
* @readonly
|
|
27
27
|
*/
|
|
28
28
|
get authorId(): string;
|
|
29
29
|
/**
|
|
30
|
-
* Job creation time (UTC) in the format specified in
|
|
31
|
-
*
|
|
30
|
+
* Job creation time (UTC) in the format specified in
|
|
31
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
32
32
|
*
|
|
33
33
|
* @readonly
|
|
34
34
|
*/
|
|
@@ -41,7 +41,7 @@ export declare class Job {
|
|
|
41
41
|
get data(): any;
|
|
42
42
|
private set data(value);
|
|
43
43
|
/**
|
|
44
|
-
* `true` if job is `done` or `failed`. See {@link
|
|
44
|
+
* `true` if job is `done` or `failed`. See {@link status} for more details.
|
|
45
45
|
*
|
|
46
46
|
* @readonly
|
|
47
47
|
*/
|
|
@@ -59,8 +59,8 @@ export declare class Job {
|
|
|
59
59
|
*/
|
|
60
60
|
get id(): string;
|
|
61
61
|
/**
|
|
62
|
-
* Job last update (UTC) time in the format specified in
|
|
63
|
-
*
|
|
62
|
+
* Job last update (UTC) time in the format specified in
|
|
63
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
64
64
|
*
|
|
65
65
|
* @readonly
|
|
66
66
|
*/
|
|
@@ -91,16 +91,14 @@ export declare class Job {
|
|
|
91
91
|
*/
|
|
92
92
|
get statusMessage(): string;
|
|
93
93
|
/**
|
|
94
|
-
* Job starting time (UTC) in the format specified in
|
|
95
|
-
*
|
|
94
|
+
* Job starting time (UTC) in the format specified in
|
|
95
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
96
96
|
*
|
|
97
97
|
* @readonly
|
|
98
98
|
*/
|
|
99
99
|
get startedAt(): string;
|
|
100
100
|
/**
|
|
101
101
|
* Refresh job data.
|
|
102
|
-
*
|
|
103
|
-
* @async
|
|
104
102
|
*/
|
|
105
103
|
checkout(): Promise<this>;
|
|
106
104
|
/**
|
|
@@ -109,7 +107,6 @@ export declare class Job {
|
|
|
109
107
|
* Only administrators can update job data. If the current logged in user is not an
|
|
110
108
|
* administrator, an exception will be thrown.
|
|
111
109
|
*
|
|
112
|
-
* @async
|
|
113
110
|
* @param data - Raw job data.
|
|
114
111
|
*/
|
|
115
112
|
update(data: any): Promise<this>;
|
|
@@ -117,22 +114,20 @@ export declare class Job {
|
|
|
117
114
|
* Remove a job from the server job list. Jobs that are in progress or have already been
|
|
118
115
|
* completed cannot be deleted.
|
|
119
116
|
*
|
|
120
|
-
* @async
|
|
121
117
|
* @returns Returns the raw data of a deleted job.
|
|
122
118
|
*/
|
|
123
119
|
delete(): Promise<any>;
|
|
124
120
|
/**
|
|
125
121
|
* Wait for job to be done. Job is done when it changes to `done` or `failed` status.
|
|
126
122
|
*
|
|
127
|
-
* @async
|
|
128
123
|
* @param params - An object containing waiting parameters.
|
|
129
124
|
* @param params.timeout - The time, in milliseconds that the function should wait job. If
|
|
130
125
|
* jobs is not done during this time, the `TimeoutError` exception will be thrown.
|
|
131
126
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
132
127
|
* checking job status.
|
|
133
|
-
* @param params.signal- An
|
|
134
|
-
*
|
|
135
|
-
* signal
|
|
128
|
+
* @param params.signal - An
|
|
129
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
130
|
+
* signal, which can be used to abort waiting as desired.
|
|
136
131
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
137
132
|
*/
|
|
138
133
|
waitForDone(params?: {
|
package/lib/Api/Member.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare class Member {
|
|
|
30
30
|
*/
|
|
31
31
|
get id(): string;
|
|
32
32
|
/**
|
|
33
|
-
* Member role. See {@link Project
|
|
33
|
+
* Member role. See {@link Project.getRoles | Project.getRoles()} for more details.
|
|
34
34
|
*/
|
|
35
35
|
get role(): string;
|
|
36
36
|
set role(value: string);
|
|
@@ -56,29 +56,23 @@ export declare class Member {
|
|
|
56
56
|
get user(): IShortUserDescription;
|
|
57
57
|
/**
|
|
58
58
|
* Refresh member data.
|
|
59
|
-
*
|
|
60
|
-
* @async
|
|
61
59
|
*/
|
|
62
60
|
checkout(): Promise<this>;
|
|
63
61
|
/**
|
|
64
62
|
* Update member data on the server.
|
|
65
63
|
*
|
|
66
|
-
* @async
|
|
67
64
|
* @param data - Raw member data.
|
|
68
65
|
*/
|
|
69
66
|
update(data: any): Promise<this>;
|
|
70
67
|
/**
|
|
71
68
|
* Remove a member from a project.
|
|
72
69
|
*
|
|
73
|
-
* @async
|
|
74
70
|
* @returns Returns the raw data of a deleted member.
|
|
75
71
|
*/
|
|
76
72
|
delete(): Promise<any>;
|
|
77
73
|
/**
|
|
78
74
|
* Save member data changes to the server. Call this method to update member data on the
|
|
79
75
|
* server after any changes.
|
|
80
|
-
*
|
|
81
|
-
* @async
|
|
82
76
|
*/
|
|
83
77
|
save(): Promise<this>;
|
|
84
78
|
}
|