@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/Assembly.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ import { ClashTest } from "./ClashTest";
|
|
|
8
8
|
import { ISharedLinkPermissions } from "./ISharedLink";
|
|
9
9
|
import { SharedLink } from "./SharedLink";
|
|
10
10
|
/**
|
|
11
|
-
* Provides properties and methods for obtaining information about an assembly on the Open
|
|
12
|
-
*
|
|
11
|
+
* Provides properties and methods for obtaining information about an assembly on the Open Cloud Server
|
|
12
|
+
* and managing its data.
|
|
13
13
|
*/
|
|
14
14
|
export declare class Assembly extends Endpoint {
|
|
15
15
|
private _data;
|
|
@@ -113,8 +113,8 @@ export declare class Assembly extends Endpoint {
|
|
|
113
113
|
*/
|
|
114
114
|
delete(): Promise<any>;
|
|
115
115
|
/**
|
|
116
|
-
* Saves assembly properties changes to the server. Call this method to update assembly data
|
|
117
|
-
*
|
|
116
|
+
* Saves assembly properties changes to the server. Call this method to update assembly data on the
|
|
117
|
+
* server after any property changes.
|
|
118
118
|
*/
|
|
119
119
|
save(): Promise<this>;
|
|
120
120
|
setPreview(image?: BodyInit | null): Promise<this>;
|
|
@@ -146,32 +146,38 @@ export declare class Assembly extends Endpoint {
|
|
|
146
146
|
/**
|
|
147
147
|
* Returns the properties for an objects in the assembly.
|
|
148
148
|
*
|
|
149
|
-
* @param handles - Object original handle or handles array. Specify `undefined` to get
|
|
150
|
-
*
|
|
149
|
+
* @param handles - Object original handle or handles array. Specify `undefined` to get properties for
|
|
150
|
+
* all objects in the assembly.
|
|
151
151
|
*/
|
|
152
152
|
getProperties(handles?: string | string[]): Promise<any[]>;
|
|
153
153
|
/**
|
|
154
|
-
* Returns the list of original handles for an objects in the file that match the specified
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* @example
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
154
|
+
* Returns the list of original handles for an objects in the file that match the specified patterns.
|
|
155
|
+
* Search patterns may be combined using query operators.
|
|
156
|
+
*
|
|
157
|
+
* @example Simple search pattern.
|
|
158
|
+
*
|
|
159
|
+
* ```javascript
|
|
160
|
+
* searchPattern = {
|
|
161
|
+
* key: "Category",
|
|
162
|
+
* value: "OST_Stairs",
|
|
163
|
+
* };
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* @example Search patterns combination.
|
|
167
|
+
*
|
|
168
|
+
* ```javascript
|
|
169
|
+
* searchPattern = {
|
|
170
|
+
* $or: [
|
|
171
|
+
* {
|
|
172
|
+
* $and: [
|
|
173
|
+
* { key: "Category", value: "OST_GenericModel" },
|
|
174
|
+
* { key: "Level", value: "03 - Floor" },
|
|
175
|
+
* ],
|
|
176
|
+
* },
|
|
177
|
+
* { key: "Category", value: "OST_Stairs" },
|
|
178
|
+
* ],
|
|
179
|
+
* };
|
|
180
|
+
* ```
|
|
175
181
|
*
|
|
176
182
|
* @param searchPattern - Search pattern or combination of the patterns, see example below.
|
|
177
183
|
*/
|
|
@@ -215,27 +221,27 @@ export declare class Assembly extends Endpoint {
|
|
|
215
221
|
*/
|
|
216
222
|
getSnapshotData(guid: string, bitmapGuid: string): Promise<string>;
|
|
217
223
|
/**
|
|
218
|
-
* Downloads an assembly resource file. Resource files are files that contain model scene
|
|
219
|
-
*
|
|
224
|
+
* Downloads an assembly resource file. Resource files are files that contain model scene descriptions,
|
|
225
|
+
* or geometry data.
|
|
220
226
|
*
|
|
221
227
|
* @param dataId - Resource file name.
|
|
222
228
|
* @param onProgress - Download progress callback.
|
|
223
229
|
* @param signal - An
|
|
224
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
225
|
-
*
|
|
230
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
|
|
231
|
+
* to communicate with a fetch request and abort it if desired.
|
|
226
232
|
*/
|
|
227
233
|
downloadResource(dataId: string, onProgress?: (progress: number, chunk: Uint8Array) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
228
234
|
/**
|
|
229
|
-
* Downloads a part of assembly resource file. Resource files are files that contain model
|
|
230
|
-
*
|
|
235
|
+
* Downloads a part of assembly resource file. Resource files are files that contain model scene
|
|
236
|
+
* descriptions, or geometry data.
|
|
231
237
|
*
|
|
232
238
|
* @param dataId - Resource file name.
|
|
233
239
|
* @param ranges - A range of resource file contents to download.
|
|
234
240
|
* @param requestId - Request ID for download progress callback.
|
|
235
241
|
* @param onProgress - Download progress callback.
|
|
236
242
|
* @param signal - An
|
|
237
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
238
|
-
*
|
|
243
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
|
|
244
|
+
* to communicate with a fetch request and abort it if desired.
|
|
239
245
|
*/
|
|
240
246
|
downloadResourceRange(dataId: string, requestId: number, ranges: Array<{
|
|
241
247
|
begin: number;
|
|
@@ -253,27 +259,27 @@ export declare class Assembly extends Endpoint {
|
|
|
253
259
|
*/
|
|
254
260
|
downloadFileRange(requestId: number, records: any | null, dataId: string, onProgress?: (progress: number, chunk: Uint8Array, requestId: number) => void, signal?: AbortSignal): Promise<void>;
|
|
255
261
|
/**
|
|
256
|
-
* Returns a list of assembly references containing references from all the files from which
|
|
257
|
-
*
|
|
262
|
+
* Returns a list of assembly references containing references from all the files from which the
|
|
263
|
+
* assembly was created.
|
|
258
264
|
*
|
|
259
265
|
* References are images, fonts, or any other files to correct rendering of the assembly.
|
|
260
266
|
*
|
|
261
267
|
* @param signal - An
|
|
262
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
263
|
-
*
|
|
268
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
269
|
+
* can be used to abort waiting as desired.
|
|
264
270
|
*/
|
|
265
271
|
getReferences(signal?: AbortSignal): Promise<IFileReferences>;
|
|
266
272
|
/**
|
|
267
273
|
* Waits for assembly to be created. Assembly is created when it changes to `done` or `failed` status.
|
|
268
274
|
*
|
|
269
275
|
* @param params - An object containing waiting parameters.
|
|
270
|
-
* @param params.timeout - The time, in milliseconds that the function should wait assembly.
|
|
271
|
-
*
|
|
272
|
-
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
273
|
-
*
|
|
276
|
+
* @param params.timeout - The time, in milliseconds that the function should wait assembly. If
|
|
277
|
+
* assembly is not created during this time, the `TimeoutError` exception will be thrown.
|
|
278
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between checking
|
|
279
|
+
* assembly status.
|
|
274
280
|
* @param params.signal - An
|
|
275
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
276
|
-
*
|
|
281
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
282
|
+
* can be used to abort waiting as desired.
|
|
277
283
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
278
284
|
*/
|
|
279
285
|
waitForDone(params?: {
|
|
@@ -289,8 +295,8 @@ export declare class Assembly extends Endpoint {
|
|
|
289
295
|
* @param limit - The maximum number of tests that should be returned per request. Used for paging.
|
|
290
296
|
* @param name - Filter the tests by part of the name. Case sensitive.
|
|
291
297
|
* @param ids - List of tests IDs to return.
|
|
292
|
-
* @param sortByDesc - Allows to specify the descending order of the result. By default tests
|
|
293
|
-
*
|
|
298
|
+
* @param sortByDesc - Allows to specify the descending order of the result. By default tests are
|
|
299
|
+
* sorted by name in ascending order.
|
|
294
300
|
* @param sortField - Allows to specify sort field.
|
|
295
301
|
*/
|
|
296
302
|
getClashTests(start?: number, limit?: number, name?: string, ids?: string | string[], sortByDesc?: boolean, sortField?: string): Promise<{
|
|
@@ -324,30 +330,28 @@ export declare class Assembly extends Endpoint {
|
|
|
324
330
|
* - `models` - All objects of the models with original handles specified in the `selectionSetB`.
|
|
325
331
|
* - `searchquery` - Objects retrieved by the search queries specified in `selectionSetB`.
|
|
326
332
|
*
|
|
327
|
-
* @param selectionSetA - First selection set for clash detection. Objects from
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
* `selectionSetB` will be tested against each others by objects from the `selectionSetA`
|
|
332
|
-
* during the test.
|
|
333
|
+
* @param selectionSetA - First selection set for clash detection. Objects from `selectionSetA` will be
|
|
334
|
+
* tested against each others by objects from the `selectionSetB` during the test.
|
|
335
|
+
* @param selectionSetB - Second selection set for clash detection. Objects from `selectionSetB` will
|
|
336
|
+
* be tested against each others by objects from the `selectionSetA` during the test.
|
|
333
337
|
* @param params - An object containing test parameters.
|
|
334
|
-
* @param params.tolerance - The distance of separation between objects at which test begins
|
|
335
|
-
*
|
|
338
|
+
* @param params.tolerance - The distance of separation between objects at which test begins detecting
|
|
339
|
+
* clashes.
|
|
336
340
|
* @param params.clearance - The type of the clashes that the test detects:
|
|
337
341
|
*
|
|
338
|
-
* - `true` - Сlearance clash. A clash in which the object A may or may not intersect with
|
|
339
|
-
*
|
|
340
|
-
* - `false` - Hard clash. A clash in which the object A intersects with object B by a distance
|
|
341
|
-
*
|
|
342
|
+
* - `true` - Сlearance clash. A clash in which the object A may or may not intersect with object B, but
|
|
343
|
+
* comes within a distance of less than the `tolerance`.
|
|
344
|
+
* - `false` - Hard clash. A clash in which the object A intersects with object B by a distance of more
|
|
345
|
+
* than the `tolerance`.
|
|
342
346
|
*
|
|
343
347
|
* @param params.waitForDone - Wait for test to complete.
|
|
344
|
-
* @param params.timeout - The time, in milliseconds that the function should wait test. If
|
|
345
|
-
*
|
|
346
|
-
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
347
|
-
*
|
|
348
|
+
* @param params.timeout - The time, in milliseconds that the function should wait test. If test is not
|
|
349
|
+
* complete during this time, the `TimeoutError` exception will be thrown.
|
|
350
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between checking
|
|
351
|
+
* test status.
|
|
348
352
|
* @param params.signal - An
|
|
349
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
350
|
-
*
|
|
353
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
354
|
+
* can be used to abort waiting as desired.
|
|
351
355
|
*/
|
|
352
356
|
createClashTest(name: string, selectionTypeA: string, selectionTypeB: string, selectionSetA?: string | string[], selectionSetB?: string | string[], params?: {
|
|
353
357
|
tolerance?: number | string;
|
package/lib/Api/ClashTest.d.ts
CHANGED
|
@@ -17,10 +17,10 @@ export declare class ClashTest extends Endpoint {
|
|
|
17
17
|
/**
|
|
18
18
|
* The type of the clashes that the test detects:
|
|
19
19
|
*
|
|
20
|
-
* - `true` - Сlearance clash. A clash in which the object A may or may not intersect with
|
|
21
|
-
*
|
|
22
|
-
* - `false` - Hard clash. A clash in which the object A intersects with object B by a distance
|
|
23
|
-
*
|
|
20
|
+
* - `true` - Сlearance clash. A clash in which the object A may or may not intersect with object B, but
|
|
21
|
+
* comes within a distance of less than the {@link tolerance}.
|
|
22
|
+
* - `false` - Hard clash. A clash in which the object A intersects with object B by a distance of more
|
|
23
|
+
* than the {@link tolerance}.
|
|
24
24
|
*
|
|
25
25
|
* @readonly
|
|
26
26
|
*/
|
|
@@ -65,8 +65,8 @@ export declare class ClashTest extends Endpoint {
|
|
|
65
65
|
*/
|
|
66
66
|
get owner(): IShortUserDesc;
|
|
67
67
|
/**
|
|
68
|
-
* First selection set for clash detection. Objects from `selectionSetA` will be tested
|
|
69
|
-
*
|
|
68
|
+
* First selection set for clash detection. Objects from `selectionSetA` will be tested against each
|
|
69
|
+
* others by objects from the `selectionSetB` during the test.
|
|
70
70
|
*
|
|
71
71
|
* @readonly
|
|
72
72
|
*/
|
|
@@ -83,8 +83,8 @@ export declare class ClashTest extends Endpoint {
|
|
|
83
83
|
*/
|
|
84
84
|
get selectionTypeA(): string;
|
|
85
85
|
/**
|
|
86
|
-
* Second selection set for clash detection. Objects from `selectionSetB` will be tested
|
|
87
|
-
*
|
|
86
|
+
* Second selection set for clash detection. Objects from `selectionSetB` will be tested against each
|
|
87
|
+
* others by objects from the `selectionSetA` during the test.
|
|
88
88
|
*
|
|
89
89
|
* @readonly
|
|
90
90
|
*/
|
|
@@ -131,21 +131,21 @@ export declare class ClashTest extends Endpoint {
|
|
|
131
131
|
*/
|
|
132
132
|
delete(): Promise<any>;
|
|
133
133
|
/**
|
|
134
|
-
* Saves test properties changes to the server. Call this method to update test data on the
|
|
135
|
-
*
|
|
134
|
+
* Saves test properties changes to the server. Call this method to update test data on the server
|
|
135
|
+
* after any property changes.
|
|
136
136
|
*/
|
|
137
137
|
save(): Promise<this>;
|
|
138
138
|
/**
|
|
139
139
|
* Waits for test to complete. Test is done when it changes to `done` or `failed` status.
|
|
140
140
|
*
|
|
141
141
|
* @param params - An object containing waiting parameters.
|
|
142
|
-
* @param params.timeout - The time, in milliseconds that the function should wait test. If
|
|
143
|
-
*
|
|
144
|
-
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
145
|
-
*
|
|
142
|
+
* @param params.timeout - The time, in milliseconds that the function should wait test. If test is not
|
|
143
|
+
* complete during this time, the `TimeoutError` exception will be thrown.
|
|
144
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between checking
|
|
145
|
+
* test status.
|
|
146
146
|
* @param params.signal - An
|
|
147
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
148
|
-
*
|
|
147
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
148
|
+
* can be used to abort waiting as desired.
|
|
149
149
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
150
150
|
*/
|
|
151
151
|
waitForDone(params?: {
|
package/lib/Api/Client.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ import { OAuthClient } from "./OAuthClient";
|
|
|
10
10
|
import { ISharedLinkPermissions } from "./ISharedLink";
|
|
11
11
|
import { SharedLink } from "./SharedLink";
|
|
12
12
|
/**
|
|
13
|
-
* Provides methods for managing Open Cloud Server resources such as users, files, assemblies,
|
|
14
|
-
*
|
|
13
|
+
* Provides methods for managing Open Cloud Server resources such as users, files, assemblies, jobs,
|
|
14
|
+
* projects, etc.
|
|
15
15
|
*/
|
|
16
16
|
export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
17
17
|
private _serverUrl;
|
|
@@ -72,23 +72,23 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
72
72
|
* No login is required to register a new user.
|
|
73
73
|
*
|
|
74
74
|
* @param email - User email. Cannot be empty. Must be unique within the server.
|
|
75
|
-
* @param password - User password. Cannot be empty. Password can only contain letters (a-z,
|
|
76
|
-
*
|
|
77
|
-
* @param userName - User name. Cannot be empty or blank if defined. this to `undefined` to
|
|
78
|
-
*
|
|
75
|
+
* @param password - User password. Cannot be empty. Password can only contain letters (a-z, A-Z),
|
|
76
|
+
* numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
|
|
77
|
+
* @param userName - User name. Cannot be empty or blank if defined. this to `undefined` to use
|
|
78
|
+
* `username` from email.
|
|
79
79
|
*/
|
|
80
80
|
registerUser(email: string, password: string, userName?: string): Promise<any>;
|
|
81
81
|
/**
|
|
82
|
-
* Resends a Confirmation Email to the new user. If the user's email is already confirmed, an
|
|
83
|
-
*
|
|
82
|
+
* Resends a Confirmation Email to the new user. If the user's email is already confirmed, an exception
|
|
83
|
+
* will be thrown.
|
|
84
84
|
*
|
|
85
85
|
* @param email - User email.
|
|
86
86
|
* @param password - User password.
|
|
87
87
|
*/
|
|
88
88
|
resendConfirmationEmail(email: string, password: string): Promise<any>;
|
|
89
89
|
/**
|
|
90
|
-
* Marks the user's email address as confirmed. If the user's email is already confirmed, an
|
|
91
|
-
*
|
|
90
|
+
* Marks the user's email address as confirmed. If the user's email is already confirmed, an exception
|
|
91
|
+
* will be thrown.
|
|
92
92
|
*
|
|
93
93
|
* @param emailConfirmationId - Confirmation code from the Confirmation Email.
|
|
94
94
|
*/
|
|
@@ -109,15 +109,15 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
109
109
|
/**
|
|
110
110
|
* Log out.
|
|
111
111
|
*
|
|
112
|
-
* You must log in again using {@link signInWithEmail} or {@link signInWithToken} to continue
|
|
113
|
-
*
|
|
112
|
+
* You must log in again using {@link signInWithEmail} or {@link signInWithToken} to continue making
|
|
113
|
+
* requests to the server
|
|
114
114
|
*/
|
|
115
115
|
signOut(): void;
|
|
116
116
|
private setCurrentUser;
|
|
117
117
|
private clearCurrentUser;
|
|
118
118
|
/**
|
|
119
|
-
* Returns the current logged in user. Returns `null` if the user is not logged in or the
|
|
120
|
-
*
|
|
119
|
+
* Returns the current logged in user. Returns `null` if the user is not logged in or the logged in
|
|
120
|
+
* user has deleted themself.
|
|
121
121
|
*/
|
|
122
122
|
getCurrentUser(): User | null;
|
|
123
123
|
/**
|
|
@@ -159,8 +159,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
159
159
|
/**
|
|
160
160
|
* Returns a list of OAuth clients of the server.
|
|
161
161
|
*
|
|
162
|
-
* Only administrators can get a list of OAuth clients. If the current logged in user is not
|
|
163
|
-
*
|
|
162
|
+
* Only administrators can get a list of OAuth clients. If the current logged in user is not an
|
|
163
|
+
* administrator, an exception will be thrown.
|
|
164
164
|
*
|
|
165
165
|
* @param start - The starting index in the client list. Used for paging.
|
|
166
166
|
* @param limit - The maximum number of clients that should be returned per request. Used for paging.
|
|
@@ -175,8 +175,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
175
175
|
/**
|
|
176
176
|
* Returns information about the specified OAuth client.
|
|
177
177
|
*
|
|
178
|
-
* Only administrators can get OAuth clients. If the current logged in user is not an
|
|
179
|
-
*
|
|
178
|
+
* Only administrators can get OAuth clients. If the current logged in user is not an administrator, an
|
|
179
|
+
* exception will be thrown.
|
|
180
180
|
*
|
|
181
181
|
* @param clientId - Client ID.
|
|
182
182
|
*/
|
|
@@ -184,8 +184,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
184
184
|
/**
|
|
185
185
|
* Creates a new OAuth client on the server.
|
|
186
186
|
*
|
|
187
|
-
* Only administrators can create OAuth clients. If the current logged in user is not an
|
|
188
|
-
*
|
|
187
|
+
* Only administrators can create OAuth clients. If the current logged in user is not an administrator,
|
|
188
|
+
* an exception will be thrown.
|
|
189
189
|
*
|
|
190
190
|
* @param name - Client name.
|
|
191
191
|
* @param redirectUrl - Endpoint to which the OAuth 2.0 server sends the response.
|
|
@@ -195,8 +195,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
195
195
|
/**
|
|
196
196
|
* Deletes the specified OAuth client from the server.
|
|
197
197
|
*
|
|
198
|
-
* Only administrators can delete OAuth clients. If the current logged in user is not an
|
|
199
|
-
*
|
|
198
|
+
* Only administrators can delete OAuth clients. If the current logged in user is not an administrator,
|
|
199
|
+
* an exception will be thrown.
|
|
200
200
|
*
|
|
201
201
|
* @param clientId - Client ID.
|
|
202
202
|
* @returns Returns the raw data of a deleted client. For more information, see
|
|
@@ -206,15 +206,15 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
206
206
|
/**
|
|
207
207
|
* Returns the list of server users.
|
|
208
208
|
*
|
|
209
|
-
* Only administrators can get a list of users. If the current logged in user is not an
|
|
210
|
-
*
|
|
209
|
+
* Only administrators can get a list of users. If the current logged in user is not an administrator,
|
|
210
|
+
* an exception will be thrown.
|
|
211
211
|
*/
|
|
212
212
|
getUsers(): Promise<User[]>;
|
|
213
213
|
/**
|
|
214
214
|
* Returns information about the specified user.
|
|
215
215
|
*
|
|
216
|
-
* Only administrators can get other users. If the current logged in user is not an
|
|
217
|
-
*
|
|
216
|
+
* Only administrators can get other users. If the current logged in user is not an administrator, they
|
|
217
|
+
* can only get themselves, otherwise an exception will be thrown.
|
|
218
218
|
*
|
|
219
219
|
* @param userId - User ID.
|
|
220
220
|
*/
|
|
@@ -222,16 +222,16 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
222
222
|
/**
|
|
223
223
|
* Creates a new user on the server.
|
|
224
224
|
*
|
|
225
|
-
* Only administrators can create users. If the current logged in user is not an
|
|
226
|
-
*
|
|
225
|
+
* Only administrators can create users. If the current logged in user is not an administrator, an
|
|
226
|
+
* exception will be thrown.
|
|
227
227
|
*
|
|
228
228
|
* @param email - User email. Cannot be empty. Must be unique within the server.
|
|
229
|
-
* @param password - User password. Cannot be empty. Password can only contain latin letters
|
|
230
|
-
*
|
|
229
|
+
* @param password - User password. Cannot be empty. Password can only contain latin letters (a-z,
|
|
230
|
+
* A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
|
|
231
231
|
* @param params - Additional user data.
|
|
232
232
|
* @param params.isAdmin - `true` if user is an administrator.
|
|
233
|
-
* @param params.userName - User name. Cannot be empty or blank if defined. Specify
|
|
234
|
-
* `
|
|
233
|
+
* @param params.userName - User name. Cannot be empty or blank if defined. Specify `undefined` to use
|
|
234
|
+
* `username` from email.
|
|
235
235
|
* @param params.firstName - First name.
|
|
236
236
|
* @param params.lastName - Last name.
|
|
237
237
|
* @param params.canCreateProject - `true` if user is allowed to create a project.
|
|
@@ -250,11 +250,11 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
250
250
|
/**
|
|
251
251
|
* Deletes the specified user from the server.
|
|
252
252
|
*
|
|
253
|
-
* Only administrators can delete users. If the current logged in user is not an
|
|
254
|
-
*
|
|
253
|
+
* Only administrators can delete users. If the current logged in user is not an administrator, an
|
|
254
|
+
* exception will be thrown.
|
|
255
255
|
*
|
|
256
|
-
* Administrators can delete themselves or other administrators. An administrator can only
|
|
257
|
-
*
|
|
256
|
+
* Administrators can delete themselves or other administrators. An administrator can only delete
|
|
257
|
+
* themself if they is not the last administrator.
|
|
258
258
|
*
|
|
259
259
|
* You need to re-login after deleting the current logged in user.
|
|
260
260
|
*
|
|
@@ -279,12 +279,12 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
279
279
|
* @param start - The starting index in the file list. Used for paging.
|
|
280
280
|
* @param limit - The maximum number of files that should be returned per request. Used for paging.
|
|
281
281
|
* @param name - Filter the files by part of the name. Case sensitive.
|
|
282
|
-
* @param ext - Filter the files by extension. Extension can be `dgn`, `dwf`, `dwg`, `dxf`,
|
|
283
|
-
* `
|
|
284
|
-
*
|
|
282
|
+
* @param ext - Filter the files by extension. Extension can be `dgn`, `dwf`, `dwg`, `dxf`, `ifc`,
|
|
283
|
+
* `ifczip`, `nwc`, `nwd`, `obj`, `rcs`, `rfa`, `rvt`, `step`, `stl`, `stp`, `vsf`, or any other file
|
|
284
|
+
* type extension.
|
|
285
285
|
* @param ids - List of file IDs to return.
|
|
286
|
-
* @param sortByDesc - Allows to specify the descending order of the result. By default,
|
|
287
|
-
*
|
|
286
|
+
* @param sortByDesc - Allows to specify the descending order of the result. By default, files are
|
|
287
|
+
* sorted by name in ascending order.
|
|
288
288
|
* @param sortField - Allows to specify sort field.
|
|
289
289
|
* @param shared - Returns shared files only.
|
|
290
290
|
*/
|
|
@@ -308,10 +308,9 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
308
308
|
*
|
|
309
309
|
* - {@link UploadProgressEvent | uploadprogress}
|
|
310
310
|
*
|
|
311
|
-
* @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
* a result of a user selecting files using the HTML `<input>` element.
|
|
311
|
+
* @param file - {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object are
|
|
312
|
+
* generally retrieved from a {@link https://developer.mozilla.org/docs/Web/API/FileList | FileList}
|
|
313
|
+
* object returned as a result of a user selecting files using the HTML `<input>` element.
|
|
315
314
|
* @param params - An object containing upload parameters.
|
|
316
315
|
* @param params.geometry - Create job to convert file geometry data. Can be:
|
|
317
316
|
*
|
|
@@ -321,13 +320,13 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
321
320
|
*
|
|
322
321
|
* @param params.properties - Create job to extract file properties.
|
|
323
322
|
* @param params.waitForDone - Wait for geometry and properties jobs to complete.
|
|
324
|
-
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If
|
|
325
|
-
*
|
|
326
|
-
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
327
|
-
*
|
|
323
|
+
* @param params.timeout - The time, in milliseconds that the function should wait jobs. If no one jobs
|
|
324
|
+
* are done during this time, the `TimeoutError` exception will be thrown.
|
|
325
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between checking
|
|
326
|
+
* jobs status.
|
|
328
327
|
* @param params.signal - An
|
|
329
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
330
|
-
*
|
|
328
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
329
|
+
* can be used to abort waiting as desired.
|
|
331
330
|
* @param params.onProgress - Upload progress callback.
|
|
332
331
|
*/
|
|
333
332
|
uploadFile(file: globalThis.File, params?: {
|
|
@@ -342,8 +341,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
342
341
|
/**
|
|
343
342
|
* Deletes the specified file and all its versions from the server.
|
|
344
343
|
*
|
|
345
|
-
* You cannot delete a version file using `deleteFile()`, only the original file. To delete a
|
|
346
|
-
*
|
|
344
|
+
* You cannot delete a version file using `deleteFile()`, only the original file. To delete a version
|
|
345
|
+
* file use {@link File.deleteVersion | File.deleteVersion()}.
|
|
347
346
|
*
|
|
348
347
|
* @param fileId - File ID.
|
|
349
348
|
* @returns Returns the raw data of a deleted file. For more information, see
|
|
@@ -356,8 +355,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
356
355
|
* @param fileId - File ID.
|
|
357
356
|
* @param onProgress - Download progress callback.
|
|
358
357
|
* @param signal - An
|
|
359
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
360
|
-
*
|
|
358
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
|
|
359
|
+
* to communicate with a fetch request and abort it if desired.
|
|
361
360
|
*/
|
|
362
361
|
downloadFile(fileId: string, onProgress?: (progress: number) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
363
362
|
/**
|
|
@@ -376,8 +375,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
376
375
|
* @param status - Filter the jobs by status. Status can be `waiting`, `inpogress`, `done` or `failed`.
|
|
377
376
|
* @param limit - The maximum number of jobs that should be returned per request. Used for paging.
|
|
378
377
|
* @param start - The starting index in the job list. Used for paging.
|
|
379
|
-
* @param sortByDesc - Allows to specify the descending order of the result. By default, jobs
|
|
380
|
-
*
|
|
378
|
+
* @param sortByDesc - Allows to specify the descending order of the result. By default, jobs are
|
|
379
|
+
* sorted by creation time in ascending order.
|
|
381
380
|
* @param {boolean} sortField - Allows to specify sort field.
|
|
382
381
|
*/
|
|
383
382
|
getJobs(status?: string | string[], limit?: number, start?: number, sortByDesc?: boolean, sortField?: string): Promise<{
|
|
@@ -404,16 +403,16 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
404
403
|
* - `properties` - Extract file properties.
|
|
405
404
|
* - `validation` - Validate the file. Only for `IFC` files.
|
|
406
405
|
* - `dwg`, `obj`, `gltf`, `glb`, `vsf`, `pdf`, `3dpdf` - Export file to the one of the supported format.
|
|
407
|
-
* - Other custom job name. Custom job runner must be registered in the job templates table
|
|
408
|
-
*
|
|
406
|
+
* - Other custom job name. Custom job runner must be registered in the job templates table before
|
|
407
|
+
* creating a job.
|
|
409
408
|
*
|
|
410
|
-
* @param parameters - Parameters for the job runner. Can be given as command line arguments
|
|
411
|
-
*
|
|
409
|
+
* @param parameters - Parameters for the job runner. Can be given as command line arguments for the
|
|
410
|
+
* File Converter tool in form `--arg=value`.
|
|
412
411
|
*/
|
|
413
412
|
createJob(fileId: string, outputFormat: string, parameters?: string | object): Promise<Job>;
|
|
414
413
|
/**
|
|
415
|
-
* Deletes the specified job from the server job list. Jobs that are in progress or have
|
|
416
|
-
*
|
|
414
|
+
* Deletes the specified job from the server job list. Jobs that are in progress or have already been
|
|
415
|
+
* completed cannot be deleted.
|
|
417
416
|
*
|
|
418
417
|
* @param jobId - Job ID.
|
|
419
418
|
* @returns Returns the raw data of a deleted job. For more information, see
|
|
@@ -434,12 +433,12 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
434
433
|
* Returns a list of assemblies created by the current logged in user.
|
|
435
434
|
*
|
|
436
435
|
* @param start - The starting index in the assembly list. Used for paging.
|
|
437
|
-
* @param limit - The maximum number of assemblies that should be returned per request. Used
|
|
438
|
-
*
|
|
436
|
+
* @param limit - The maximum number of assemblies that should be returned per request. Used for
|
|
437
|
+
* paging.
|
|
439
438
|
* @param name - Filter the assemblies by part of the name. Case sensitive.
|
|
440
439
|
* @param ids - List of assembly IDs to return.
|
|
441
|
-
* @param sortByDesc - Allows to specify the descending order of the result. By default
|
|
442
|
-
*
|
|
440
|
+
* @param sortByDesc - Allows to specify the descending order of the result. By default assemblies are
|
|
441
|
+
* sorted by name in ascending order.
|
|
443
442
|
* @param sortField - Allows to specify sort field.
|
|
444
443
|
*/
|
|
445
444
|
getAssemblies(start?: number, limit?: number, name?: string, ids?: string | string[], sortByDesc?: boolean, sortField?: string): Promise<{
|
|
@@ -462,14 +461,14 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
462
461
|
* @param name - Assembly name.
|
|
463
462
|
* @param params - Additional assembly creating parameters.
|
|
464
463
|
* @param params.waitForDone - Wait for assembly to be created.
|
|
465
|
-
* @param params.timeout - The time, in milliseconds, that the function should wait for the
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
469
|
-
*
|
|
464
|
+
* @param params.timeout - The time, in milliseconds, that the function should wait for the assembly to
|
|
465
|
+
* be created. If the assembly is not created within this time, a TimeoutError exception will be
|
|
466
|
+
* thrown.
|
|
467
|
+
* @param params.interval - The time, in milliseconds, the function should delay in between checking
|
|
468
|
+
* assembly status.
|
|
470
469
|
* @param params.signal - An
|
|
471
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
472
|
-
*
|
|
470
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
471
|
+
* can be used to abort waiting as desired.
|
|
473
472
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
474
473
|
*/
|
|
475
474
|
createAssembly(files: string[], name: string, params?: {
|
|
@@ -504,8 +503,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
504
503
|
* @param limit - The maximum number of projects that should be returned per request. Used for paging.
|
|
505
504
|
* @param name - Filter the projects by part of the name. Case sensitive.
|
|
506
505
|
* @param ids - List of project IDs to return.
|
|
507
|
-
* @param sortByDesc - Allows to specify the descending order of the result. By default
|
|
508
|
-
*
|
|
506
|
+
* @param sortByDesc - Allows to specify the descending order of the result. By default projects are
|
|
507
|
+
* sorted by name in ascending order.
|
|
509
508
|
*/
|
|
510
509
|
getProjects(start?: number, limit?: number, name?: string, ids?: string | string[], sortByDesc?: boolean): Promise<{
|
|
511
510
|
result: Project[];
|
|
@@ -553,8 +552,8 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
|
|
|
553
552
|
/**
|
|
554
553
|
* Deletes the specified shared link.
|
|
555
554
|
*
|
|
556
|
-
* Only file owner can delete shared link. If the current logged in user is not a file owner,
|
|
557
|
-
*
|
|
555
|
+
* Only file owner can delete shared link. If the current logged in user is not a file owner, an
|
|
556
|
+
* exception will be thrown.
|
|
558
557
|
*
|
|
559
558
|
* @param token - Shared link token.
|
|
560
559
|
* @returns Returns the raw data of a deleted shared link. For more information, see
|
package/lib/Api/Endpoint.d.ts
CHANGED
|
@@ -8,16 +8,16 @@ export declare class Endpoint {
|
|
|
8
8
|
*/
|
|
9
9
|
path: string;
|
|
10
10
|
/**
|
|
11
|
-
* Endpoint-specific HTTP headers for the `GET`, `POST`, `PUT` and `DELETE` requests. You can
|
|
12
|
-
*
|
|
11
|
+
* Endpoint-specific HTTP headers for the `GET`, `POST`, `PUT` and `DELETE` requests. You can add
|
|
12
|
+
* custom headers at any time.
|
|
13
13
|
*/
|
|
14
14
|
headers: HeadersInit;
|
|
15
15
|
httpClient: IHttpClient;
|
|
16
16
|
private _useVersion;
|
|
17
17
|
/**
|
|
18
18
|
* @ignore
|
|
19
|
-
* @param path - The API path of the endpoint relative to the REST API server URL of the
|
|
20
|
-
*
|
|
19
|
+
* @param path - The API path of the endpoint relative to the REST API server URL of the specified HTTP
|
|
20
|
+
* client.
|
|
21
21
|
* @param httpClient - HTTP client instance used to send requests to the REST API server.
|
|
22
22
|
* @param headers - Endpoint-specific HTTP headers.
|
|
23
23
|
*/
|
|
@@ -36,8 +36,8 @@ export declare class Endpoint {
|
|
|
36
36
|
* @ignore
|
|
37
37
|
* @param relativePath - Nested endpoint relative path.
|
|
38
38
|
* @param signal - An
|
|
39
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
40
|
-
*
|
|
39
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
|
|
40
|
+
* to communicate with a fetch request and abort it if desired.
|
|
41
41
|
*/
|
|
42
42
|
get(relativePath: string, signal?: AbortSignal): Promise<Response>;
|
|
43
43
|
/**
|