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