@inweb/client 27.1.8 → 27.2.0

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.
@@ -66,7 +66,7 @@ export declare class Assembly extends Endpoint {
66
66
  set name(value: string);
67
67
  get originalAssemblyId(): string;
68
68
  /**
69
- * Assembly owner information.
69
+ * Assembly owner (the user who created the assembly).
70
70
  *
71
71
  * @readonly
72
72
  */
@@ -79,7 +79,7 @@ export declare class Assembly extends Endpoint {
79
79
  */
80
80
  get relatedJobs(): string[];
81
81
  /**
82
- * Assembly geometry data and properties status. Can be `waiting`, `inprogress`, `done` or `failed`.
82
+ * Assembly geometry data and properties status. Can be `waiting`, `inprogress`, `done`, or `failed`.
83
83
  *
84
84
  * An assemblies without geometry data cannot be opened in viewer.
85
85
  *
@@ -59,7 +59,7 @@ export declare class ClashTest extends Endpoint {
59
59
  get name(): string;
60
60
  set name(value: string);
61
61
  /**
62
- * Test owner information.
62
+ * Test owner (the user who created the test).
63
63
  *
64
64
  * @readonly
65
65
  */
@@ -101,7 +101,7 @@ export declare class ClashTest extends Endpoint {
101
101
  */
102
102
  get selectionTypeB(): string;
103
103
  /**
104
- * Test status. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.
104
+ * Test status. Can be `none`, `waiting`, `inprogress`, `done`, or `failed`.
105
105
  *
106
106
  * @readonly
107
107
  */
@@ -65,7 +65,7 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
65
65
  * @param email - User email. Cannot be empty. Must be unique within the server.
66
66
  * @param password - User password. Cannot be empty. Password can only contain letters (a-z, A-Z),
67
67
  * numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
68
- * @param userName - User name. Cannot be empty or blank if defined. this to `undefined` to use
68
+ * @param userName - User name. Cannot be empty or blank if defined. Specify `undefined` to use
69
69
  * `username` from email.
70
70
  */
71
71
  registerUser(email: string, password: string, userName?: string): Promise<any>;
@@ -266,8 +266,12 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
266
266
  * @property {number} size - The number of files in the result list.
267
267
  */
268
268
  /**
269
- * Returns a list of files that the current logged in user has uploaded to the server or has access to
270
- * through a project.
269
+ * Returns a list of files from the server.
270
+ *
271
+ * You cannot list other users' files unless they have explicitly granted you `read` access or you are
272
+ * an administrator. To list these files, you must use the file ID filter.
273
+ *
274
+ * You cannot list files shared with you via shared links.
271
275
  *
272
276
  * @param start - The starting index in the file list. Used for paging.
273
277
  * @param limit - The maximum number of files that should be returned per request. Used for paging.
@@ -275,11 +279,10 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
275
279
  * @param ext - Filter the files by extension. Extension can be `dgn`, `dwf`, `dwg`, `dxf`, `ifc`,
276
280
  * `ifczip`, `nwc`, `nwd`, `obj`, `rcs`, `rfa`, `rvt`, `step`, `stl`, `stp`, `vsf`, or any other file
277
281
  * type extension.
278
- * @param ids - List of file IDs to return. The list can include files that the user has access to
279
- * through a project. If not specified, only files uploaded by the current user are returned.
282
+ * @param ids - List of file IDs to return.
280
283
  * @param sortByDesc - Allows to specify the descending order of the result. By default, files are
281
284
  * sorted by name in ascending order.
282
- * @param sortField - Allows to specify sort field.
285
+ * @param sortField - Allows to specify sort field. Can be `name`, `size`, `created`, or `updatedAt`.
283
286
  * @param shared - Returns shared files only.
284
287
  */
285
288
  getFiles(start?: number, limit?: number, name?: string, ext?: string | string[], ids?: string | string[], sortByDesc?: boolean, sortField?: string, shared?: boolean): Promise<{
@@ -290,8 +293,10 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
290
293
  size: number;
291
294
  }>;
292
295
  /**
293
- * Returns information about the specified file that the current logged in user has uploaded or has
294
- * access to through a project.
296
+ * Returns information about the specified file.
297
+ *
298
+ * You cannot retrieve other users' files unless they have explicitly granted you `read` access or you
299
+ * are an administrator.
295
300
  *
296
301
  * @param fileId - File ID.
297
302
  */
@@ -307,14 +312,15 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
307
312
  * generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}
308
313
  * object returned as a result of a user selecting files using the HTML `<input>` element.
309
314
  * @param params - An object containing upload parameters.
310
- * @param params.geometry - Run File Converter job to convert geometry data after uploading the file.
311
- * Can be one of:
315
+ * @param params.geometry - Create the File Converter job to convert geometry data after uploading the
316
+ * file. Can be one of:
312
317
  *
313
318
  * - `true` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.
314
319
  * - `vsfx` - Convert file geometry data to `VSFX` format for opening in `VisualizeJS` 3D viewer.
315
320
  * - `gltf` - Convert file geometry data to `glTF` format for opening in `Three.js` 3D viewer.
316
321
  *
317
- * @param params.properties - Run File Converter job to extract properties after uploading the file.
322
+ * @param params.properties - Create the File Converter job to extract properties after uploading the
323
+ * file.
318
324
  * @param params.jobParameters - Parameters for the File Converter jobs. Use this to specify additional
319
325
  * parameters for retrieving the geometry and properties of uploaded file. Can be given as command
320
326
  * line arguments in form `--arg=value`.
@@ -346,8 +352,10 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
346
352
  /**
347
353
  * Deletes the specified file and all its versions from the server.
348
354
  *
349
- * You cannot delete a version file using `deleteFile()`, only the original file. To delete a version
350
- * file use {@link File.deleteVersion | File.deleteVersion()}.
355
+ * You cannot delete other users' files unless you are an administrator.
356
+ *
357
+ * You cannot delete a version file, only the original file. To delete a version file use
358
+ * {@link File.deleteVersion | File.deleteVersion()}.
351
359
  *
352
360
  * @param fileId - File ID.
353
361
  * @returns Returns the raw data of a deleted file. For more information, see
@@ -357,6 +365,9 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
357
365
  /**
358
366
  * Downloads the specified file from the server.
359
367
  *
368
+ * You cannot download other users' files unless they have explicitly granted you `readSourceFile`
369
+ * access or you are an administrator.
370
+ *
360
371
  * @param fileId - File ID.
361
372
  * @param onProgress - Download progress callback.
362
373
  * @param signal - An
@@ -375,14 +386,17 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
375
386
  * @property {number} size - The number of jobs in the result list.
376
387
  */
377
388
  /**
378
- * Returns a list of jobs started by the current logged in user.
389
+ * Returns a list of jobs from the server.
390
+ *
391
+ * You cannot list other users' jobs unless you are an administrator.
379
392
  *
380
- * @param status - Filter the jobs by status. Status can be `waiting`, `inpogress`, `done` or `failed`.
393
+ * @param status - Filter the jobs by status. Status can be `waiting`, `inprogress`, `done`, or
394
+ * `failed`.
381
395
  * @param limit - The maximum number of jobs that should be returned per request. Used for paging.
382
396
  * @param start - The starting index in the job list. Used for paging.
383
397
  * @param sortByDesc - Allows to specify the descending order of the result. By default, jobs are
384
398
  * sorted by creation time in ascending order.
385
- * @param {boolean} sortField - Allows to specify sort field.
399
+ * @param sortField - Allows to specify sort field. Can be `createdAt`, `startedAt`, or `lastUpdate`.
386
400
  */
387
401
  getJobs(status?: string | string[], limit?: number, start?: number, sortByDesc?: boolean, sortField?: string): Promise<{
388
402
  result: Job[];
@@ -394,11 +408,16 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
394
408
  /**
395
409
  * Returns information about the specified job.
396
410
  *
411
+ * You cannot retrieve other users' jobs unless you are an administrator.
412
+ *
397
413
  * @param jobId - Job ID.
398
414
  */
399
415
  getJob(jobId: string): Promise<Job>;
400
416
  /**
401
- * Runs a new job on the server for the specified file.
417
+ * Creates a new job on the server for the specified file.
418
+ *
419
+ * You cannot create jobs for other users' files unless they have explicitly granted you `createJob`
420
+ * access or you are an administrator.
402
421
  *
403
422
  * @param fileId - File ID.
404
423
  * @param outputFormat - The job type. Can be one of:
@@ -408,15 +427,20 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
408
427
  * - `properties` - Extract file properties.
409
428
  * - `validation` - Validate the IFC file.
410
429
  * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the specified format.
411
- * - Other custom job name. Custom job must be registered in the job templates before running.
430
+ * - Other custom job name. Custom job must be registered in the job templates.
412
431
  *
413
432
  * @param parameters - Parameters for the File Converter jobs or custom job. Can be given as JSON
414
433
  * object or command line arguments in form `--arg=value`.
415
434
  */
416
435
  createJob(fileId: string, outputFormat: string, parameters?: string | object): Promise<Job>;
417
436
  /**
418
- * Deletes the specified job from the server job list. Jobs that are in progress or have already been
419
- * completed cannot be deleted.
437
+ * Deletes the specified job from the server.
438
+ *
439
+ * You cannot delete other users' jobs unless you are an administrator.
440
+ *
441
+ * You can only delete jobs that are in the `waiting` status (jobs that have been created but not yet
442
+ * started). Jobs that are currently running (`inprogress`) or have already completed (`done` or
443
+ * `failed`) cannot be deleted.
420
444
  *
421
445
  * @param jobId - Job ID.
422
446
  * @returns Returns the raw data of a deleted job. For more information, see
@@ -443,7 +467,7 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
443
467
  * @param ids - List of assembly IDs to return.
444
468
  * @param sortByDesc - Allows to specify the descending order of the result. By default assemblies are
445
469
  * sorted by name in ascending order.
446
- * @param sortField - Allows to specify sort field.
470
+ * @param sortField - Allows to specify sort field. Can be `name` or `created`.
447
471
  */
448
472
  getAssemblies(start?: number, limit?: number, name?: string, ids?: string | string[], sortByDesc?: boolean, sortField?: string): Promise<{
449
473
  result: Assembly[];
@@ -516,8 +540,10 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
516
540
  * @param ids - List of project IDs to return.
517
541
  * @param sortByDesc - Allows to specify the descending order of the result. By default projects are
518
542
  * sorted by name in ascending order.
543
+ * @param sortField - Allows to specify sort field. Can be `name`, `createdAt`, `updatedAt`,
544
+ * `startDate`, or `endDate`.
519
545
  */
520
- getProjects(start?: number, limit?: number, name?: string, ids?: string | string[], sortByDesc?: boolean): Promise<{
546
+ getProjects(start?: number, limit?: number, name?: string, ids?: string | string[], sortByDesc?: boolean, sortField?: string): Promise<{
521
547
  result: Project[];
522
548
  start: number;
523
549
  limit: number;
@@ -554,14 +580,17 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
554
580
  */
555
581
  getSharedLink(token: string): Promise<SharedLink>;
556
582
  /**
557
- * Creates a shared link for the specified file.
583
+ * Creates a file shared link.
584
+ *
585
+ * Only file owner can create shared link. If the current logged in user is not a file owner, an
586
+ * exception will be thrown.
558
587
  *
559
588
  * @param fileId - File ID.
560
589
  * @param permissions - Share permissions.
561
590
  */
562
591
  createSharedLink(fileId: string, permissions?: ISharedLinkPermissions): Promise<SharedLink>;
563
592
  /**
564
- * Deletes the specified shared link.
593
+ * Deletes the specified file shared link.
565
594
  *
566
595
  * Only file owner can delete shared link. If the current logged in user is not a file owner, an
567
596
  * exception will be thrown.
@@ -572,12 +601,12 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
572
601
  */
573
602
  deleteSharedLink(token: string): Promise<any>;
574
603
  /**
575
- * Returns information about a file from a shared link.
604
+ * Returns information about a file for specified shared link token.
576
605
  *
577
606
  * Some file features are not available via shared link:
578
607
  *
579
608
  * - Updating file properties, preview, and viewpoints
580
- * - Running file jobs
609
+ * - Creating file jobs
581
610
  * - Managing file permissions
582
611
  * - Managing file versions
583
612
  * - Deleting file
@@ -596,8 +625,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
596
625
  /**
597
626
  * Returns information about the specified plugin.
598
627
  *
599
- * Only administrators can get plugins. If the current logged in user is not an administrator, they can
600
- * only get themselves, otherwise an exception will be thrown.
628
+ * Only administrators can list plugins. If the current logged in user is not an administrator, an
629
+ * exception will be thrown.
601
630
  *
602
631
  * @param name - Plugin name.
603
632
  * @param version - Plugin version.
@@ -629,8 +658,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
629
658
  /**
630
659
  * Downloads the specified plugin package from the server.
631
660
  *
632
- * Only administrators can download plugins. If the current logged in user is not an administrator, an
633
- * exception will be thrown.
661
+ * Only administrators can download plugin packages. If the current logged in user is not an
662
+ * administrator, an exception will be thrown.
634
663
  *
635
664
  * @param name - Plugin name.
636
665
  * @param version - Plugin version.
package/lib/Api/File.d.ts CHANGED
@@ -48,7 +48,7 @@ export declare class File extends Endpoint {
48
48
  /**
49
49
  * Returns a list of file formats in which the active version of the file was exported.
50
50
  *
51
- * To export file to one of the supported formats run the File Converter job using
51
+ * To export file to one of the supported formats create the File Converter job using
52
52
  * {@link createJob | createJob()}. For an example, see the {@link downloadResource} help.
53
53
  *
54
54
  * @readonly
@@ -91,7 +91,7 @@ export declare class File extends Endpoint {
91
91
  */
92
92
  get originalFileId(): string;
93
93
  /**
94
- * File owner information.
94
+ * File owner (the user who uploaded the file to the server).
95
95
  *
96
96
  * @readonly
97
97
  */
@@ -135,7 +135,7 @@ export declare class File extends Endpoint {
135
135
  *
136
136
  * Each status entity is a record with properties:
137
137
  *
138
- * - `state` - Job state. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.
138
+ * - `state` - Job state. Can be `none`, `waiting`, `inprogress`, `done`, or `failed`.
139
139
  * - `jobId` - Unique ID of the job.
140
140
  *
141
141
  * @readonly
@@ -177,6 +177,9 @@ export declare class File extends Endpoint {
177
177
  /**
178
178
  * Updates file data on the server.
179
179
  *
180
+ * You cannot update other users' files unless they have explicitly granted you `write` access or you
181
+ * are an administrator.
182
+ *
180
183
  * @param data - Raw file data. For more information, see
181
184
  * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
182
185
  */
@@ -184,8 +187,10 @@ export declare class File extends Endpoint {
184
187
  /**
185
188
  * Deletes a file and all its versions from the server.
186
189
  *
187
- * You cannot delete a version file using `delete()`, only the original file. To delete a version file
188
- * use {@link deleteVersion | deleteVersion()}.
190
+ * You cannot delete other users' files unless you are an administrator.
191
+ *
192
+ * You cannot delete a version file, only the original file. To delete a version file use
193
+ * {@link deleteVersion | deleteVersion()}.
189
194
  *
190
195
  * @returns Returns the raw data of a deleted file. For more information, see
191
196
  * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Files | Open Cloud Files API}.
@@ -244,7 +249,7 @@ export declare class File extends Endpoint {
244
249
  * });
245
250
  * ```
246
251
  *
247
- * or when running the {@link extractProperties | extract file properties} job:
252
+ * or when creating the {@link extractProperties | extract file properties} job:
248
253
  *
249
254
  * ```javascript
250
255
  * await file.extractProperties("--properties_group");
@@ -340,7 +345,10 @@ export declare class File extends Endpoint {
340
345
  */
341
346
  getSnapshotData(guid: string, bitmapGuid: string): Promise<string>;
342
347
  /**
343
- * Downloads the source file of active version of the file from the server.
348
+ * Downloads the active version of the file from the server.
349
+ *
350
+ * You cannot download other users' files unless they have explicitly granted you `readSourceFile`
351
+ * access or you are an administrator.
344
352
  *
345
353
  * @param onProgress - Download progress callback.
346
354
  * @param signal - An
@@ -352,6 +360,9 @@ export declare class File extends Endpoint {
352
360
  * Downloads a resource file of the active version of the file. Resource files are files that contain
353
361
  * model scene descriptions, or geometry data, or exported files.
354
362
  *
363
+ * You cannot download resources of other users' files unless they have explicitly granted you `read`
364
+ * access or you are an administrator.
365
+ *
355
366
  * @example Export file to PDF.
356
367
  *
357
368
  * ```javascript
@@ -412,7 +423,10 @@ export declare class File extends Endpoint {
412
423
  */
413
424
  setReferences(references: IFileReferences): Promise<IFileReferences>;
414
425
  /**
415
- * Runs a new job on the server for the active version of the file.
426
+ * Creates a new job on the server for the active version of the file.
427
+ *
428
+ * You cannot create jobs for other users' files unless they have explicitly granted you `createJob`
429
+ * access or you are an administrator.
416
430
  *
417
431
  * @param outputFormat - The job type. Can be one of:
418
432
  *
@@ -423,14 +437,14 @@ export declare class File extends Endpoint {
423
437
  * - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the specified format. Use
424
438
  * {@link exports} to get the list of completed file exports. Use
425
439
  * {@link downloadResource | downloadResource()} to download the exported file.
426
- * - Other custom job name. Custom job must be registered in the job templates before running.
440
+ * - Other custom job name. Custom job must be registered in the job templates.
427
441
  *
428
442
  * @param parameters - Parameters for the File Converter jobs or custom job. Can be given as JSON
429
443
  * object or command line arguments in form `--arg=value`.
430
444
  */
431
445
  createJob(outputFormat: string, parameters?: string | object): Promise<Job>;
432
446
  /**
433
- * Runs a File Converter job to convert geometry data of active version of the file to the specified
447
+ * Creates a File Converter job to convert geometry data of active version of the file to the specified
434
448
  * format. This is alias to {@link createJob | createJob("geometry")}.
435
449
  *
436
450
  * @param type - Geometry data type. Can be one of:
@@ -443,15 +457,15 @@ export declare class File extends Endpoint {
443
457
  */
444
458
  extractGeometry(type?: string, parameters?: string | object): Promise<Job>;
445
459
  /**
446
- * Runs a File Converter job to extract properties of the active version of the file. This is alias to
447
- * {@link createJob | createJob("properties")}.
460
+ * Creates a File Converter job to extract properties of the active version of the file. This is alias
461
+ * to {@link createJob | createJob("properties")}.
448
462
  *
449
463
  * @param parameters - Parameters for the File Converter job. Can be given as command line arguments in
450
464
  * form `--arg=value`.
451
465
  */
452
466
  extractProperties(parameters?: string | object): Promise<Job>;
453
467
  /**
454
- * Runs an IFC validator job to validate the active version of the file. This is alias to
468
+ * Creates an IFC validator job to validate the active version of the file. This is alias to
455
469
  * {@link createJob | createJob("validation")}.
456
470
  *
457
471
  * To get validation report use {@link downloadResource | downloadResource("validation_report.json")}.
@@ -497,12 +511,12 @@ export declare class File extends Endpoint {
497
511
  */
498
512
  getPermission(permissionId: string): Promise<Permission>;
499
513
  /**
500
- * Creates a new file permission for a user, project, or group.
514
+ * Grants specified file permissions to user, project, group, or all users.
501
515
  *
502
- * @example Grant the specified user permission to "update" the file.
516
+ * @example Grant the specified user permission to "read" the file.
503
517
  *
504
518
  * ```javascript
505
- * const action = "update";
519
+ * const action = "read";
506
520
  * const grantedTo = { user: { id: myUser.id, email: myUser.email } };
507
521
  * await file.createPermission(action, grantedTo);
508
522
  * ```
@@ -515,20 +529,21 @@ export declare class File extends Endpoint {
515
529
  * await file.createPermission(actions, grantedTo);
516
530
  * ```
517
531
  *
518
- * @param actions - Actions are allowed to be performed on a file with this permission:
532
+ * @param actions - A single action or list of actions allowed for this permission:
519
533
  *
520
534
  * - `read` - The ability to read file description, geometry data and properties.
521
535
  * - `readSourceFile` - The ability to download source file.
522
536
  * - `write` - The ability to modify file name, description and references.
523
537
  * - `readViewpoint` - The ability to read file viewpoints.
524
- * - `createViewpoint` - The ability to create file viewpoints.
538
+ * - `createViewpoint` - The ability to create new file viewpoints.
539
+ * - `deleteViewpoint` - The ability to delete existing file viewpoints.
525
540
  *
526
- * @param grantedTo - An entity or a list of entities that will get access to the file.
541
+ * @param grantedTo - A user, project, or group that will get access to the file.
527
542
  * @param _public - Specifies whether all users have access to the file or not.
528
543
  */
529
544
  createPermission(actions: string | string[], grantedTo: IGrantedTo | IGrantedTo[], _public?: boolean): Promise<Permission>;
530
545
  /**
531
- * Removes the specified permission from the file.
546
+ * Revokes specified file permission.
532
547
  *
533
548
  * @param permissionId - Permission ID.
534
549
  * @returns Returns the raw data of a deleted permission. For more information, see
@@ -576,7 +591,7 @@ export declare class File extends Endpoint {
576
591
  */
577
592
  getVersion(version: number): Promise<File>;
578
593
  /**
579
- * Deletes the specified version file.
594
+ * Deletes the specified file version.
580
595
  *
581
596
  * @param version - Version to delete.
582
597
  * @returns Returns the raw data of a deleted version file. For more information, see
@@ -626,7 +641,7 @@ export declare class File extends Endpoint {
626
641
  */
627
642
  createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink>;
628
643
  /**
629
- * Returns information about the file shared link or `undefined` if file is not shared.
644
+ * Returns information about the file shared link or `undefined` if file is not shared yet.
630
645
  */
631
646
  getSharedLink(): Promise<SharedLink>;
632
647
  /**
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface IFileDataStatus {
5
5
  /**
6
- * Data state. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.
6
+ * Data state. Can be `none`, `waiting`, `inprogress`, `done`, or `failed`.
7
7
  */
8
8
  state: string;
9
9
  /**
package/lib/Api/Job.d.ts CHANGED
@@ -18,7 +18,8 @@ export declare class Job extends Endpoint {
18
18
  */
19
19
  get assemblyId(): string;
20
20
  /**
21
- * Job creator ID. Use {@link Client.getUser | Client.getUser()} to obtain detailed creator information.
21
+ * Job owner ID (the user who created the job). Use {@link Client.getUser | Client.getUser()} to obtain
22
+ * detailed user information.
22
23
  *
23
24
  * @readonly
24
25
  */
@@ -85,7 +86,7 @@ export declare class Job extends Endpoint {
85
86
  */
86
87
  get parameters(): any;
87
88
  /**
88
- * Job status. Can be `waiting`, `inprogress`, `done` or `failed`.
89
+ * Job status. Can be `waiting`, `inprogress`, `done`, or `failed`.
89
90
  *
90
91
  * @readonly
91
92
  */
@@ -118,8 +119,13 @@ export declare class Job extends Endpoint {
118
119
  */
119
120
  update(data: any): Promise<this>;
120
121
  /**
121
- * Deletes a job from the server job list. Jobs that are in progress or have already been completed
122
- * cannot be deleted.
122
+ * Deletes a job from the server.
123
+ *
124
+ * You cannot delete other users' jobs unless you are an administrator.
125
+ *
126
+ * You can only delete jobs that are in the `waiting` status (jobs that have been created but not yet
127
+ * started). Jobs that are currently running (`inprogress`) or have already completed (`done` or
128
+ * `failed`) cannot be deleted.
123
129
  *
124
130
  * @returns Returns the raw data of a deleted job. For more information, see
125
131
  * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Jobs | Open Cloud Jobs API}.
@@ -129,8 +135,8 @@ export declare class Job extends Endpoint {
129
135
  * Waits for job to be done. Job is done when it changes to `done` or `failed` status.
130
136
  *
131
137
  * @param params - An object containing waiting parameters.
132
- * @param params.timeout - The time, in milliseconds that the function should wait job. If jobs is not
133
- * done during this time, the `TimeoutError` exception will be thrown.
138
+ * @param params.timeout - The time, in milliseconds that the function should wait for the job. If the
139
+ * job is not done during this time, the `TimeoutError` exception will be thrown.
134
140
  * @param params.interval - The time, in milliseconds, the function should delay in between checking
135
141
  * job status.
136
142
  * @param params.signal - An
@@ -22,8 +22,9 @@ export declare class Permission extends Endpoint {
22
22
  * - `write` - The ability to modify file name, description and references.
23
23
  * - `readViewpoint` - The ability to read file viewpoints.
24
24
  * - `createViewpoint` - The ability to create file viewpoints.
25
+ * - `deleteViewpoint` - The ability to delete file viewpoints.
25
26
  *
26
- * @example Change file permissions for the the specified project.
27
+ * @example Change file permissions for the specified project.
27
28
  *
28
29
  * ```javascript
29
30
  * const myFile = client.getFile(myFileId);
@@ -31,7 +32,7 @@ export declare class Permission extends Endpoint {
31
32
  * const projectPermissions = permissions.filter((permission) =>
32
33
  * permission.grantedTo.some((x) => x.project?.id === myProjectId)
33
34
  * );
34
- * const newActions = ["read", "readSourceFile", "update"];
35
+ * const newActions = ["read", "readSourceFile"];
35
36
  * await Promise.all(
36
37
  * projectPermissions.map((permission) => {
37
38
  * permission.actions = newActions;
@@ -87,7 +87,7 @@ export declare class Project extends Endpoint {
87
87
  get name(): string;
88
88
  set name(value: string);
89
89
  /**
90
- * Project owner information.
90
+ * Project owner (the user who created the project).
91
91
  *
92
92
  * @readonly
93
93
  */
@@ -251,11 +251,11 @@ export declare class Project extends Endpoint {
251
251
  * - `write` - The ability to modify file name, description and references.
252
252
  * - `readViewpoint` - The ability to read file viewpoints.
253
253
  * - `createViewpoint` - The ability to create file viewpoints.
254
+ * - `deleteViewpoint` - The ability to delete file viewpoints.
254
255
  *
255
- * @param _public - Specifies whether all users have access to the file or not.
256
256
  * @returns Returns a file instance added to the project.
257
257
  */
258
- addModel(fileId: string, actions: string | string[], _public: boolean): Promise<File>;
258
+ addModel(fileId: string, actions: string | string[]): Promise<File>;
259
259
  /**
260
260
  * Removes the specified file from a project.
261
261
  *
package/lib/Api/User.d.ts CHANGED
@@ -121,7 +121,7 @@ export declare class User extends Endpoint {
121
121
  get projectsLimit(): number;
122
122
  set projectsLimit(value: number);
123
123
  /**
124
- * The identity provider used to create the account. Can be `ldap`, `oauth`, `saml` or empty for local
124
+ * The identity provider used to create the account. Can be `ldap`, `oauth`, `saml`, or empty for local
125
125
  * accounts.
126
126
  *
127
127
  * @readonly
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/client",
3
- "version": "27.1.8",
3
+ "version": "27.2.0",
4
4
  "description": "JavaScript REST API client for the Open Cloud Server",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -26,7 +26,7 @@
26
26
  "docs": "typedoc"
27
27
  },
28
28
  "dependencies": {
29
- "@inweb/eventemitter2": "~27.1.8"
29
+ "@inweb/eventemitter2": "~27.2.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "fflate": "^0.8.2"
@@ -140,7 +140,7 @@ export class Assembly extends Endpoint {
140
140
  }
141
141
 
142
142
  /**
143
- * Assembly owner information.
143
+ * Assembly owner (the user who created the assembly).
144
144
  *
145
145
  * @readonly
146
146
  */
@@ -164,7 +164,7 @@ export class Assembly extends Endpoint {
164
164
  }
165
165
 
166
166
  /**
167
- * Assembly geometry data and properties status. Can be `waiting`, `inprogress`, `done` or `failed`.
167
+ * Assembly geometry data and properties status. Can be `waiting`, `inprogress`, `done`, or `failed`.
168
168
  *
169
169
  * An assemblies without geometry data cannot be opened in viewer.
170
170
  *
@@ -669,7 +669,7 @@ export class Assembly extends Endpoint {
669
669
  waitForDone: false,
670
670
  }
671
671
  ): Promise<Assembly> {
672
- return Promise.reject(new Error("Assembly version support will be implemeted in a future release"));
672
+ return Promise.reject(new Error("Assembly version support will be implemented in a future release"));
673
673
  }
674
674
 
675
675
  getVersions(): Promise<Assembly[] | undefined> {
@@ -691,7 +691,7 @@ export class Assembly extends Endpoint {
691
691
  // Reserved for future use
692
692
 
693
693
  createSharedLink(permissions?: ISharedLinkPermissions): Promise<SharedLink> {
694
- return Promise.reject(new Error("Assembly shared link will be implemeted in a future release"));
694
+ return Promise.reject(new Error("Assembly shared link will be implemented in a future release"));
695
695
  }
696
696
 
697
697
  getSharedLink(): Promise<SharedLink> {
@@ -116,7 +116,7 @@ export class ClashTest extends Endpoint {
116
116
  }
117
117
 
118
118
  /**
119
- * Test owner information.
119
+ * Test owner (the user who created the test).
120
120
  *
121
121
  * @readonly
122
122
  */
@@ -173,7 +173,7 @@ export class ClashTest extends Endpoint {
173
173
  }
174
174
 
175
175
  /**
176
- * Test status. Can be `none`, `waiting`, `inprogress`, `done` or `failed`.
176
+ * Test status. Can be `none`, `waiting`, `inprogress`, `done`, or `failed`.
177
177
  *
178
178
  * @readonly
179
179
  */