@inweb/client 25.7.0 → 25.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +185 -348
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +6 -6
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Assembly.d.ts +19 -42
- package/lib/Api/ClashTest.d.ts +7 -16
- package/lib/Api/Client.d.ts +25 -58
- package/lib/Api/ClientEvents.d.ts +4 -2
- package/lib/Api/FetchError.d.ts +3 -5
- package/lib/Api/File.d.ts +67 -105
- package/lib/Api/Job.d.ts +11 -16
- package/lib/Api/Member.d.ts +1 -7
- package/lib/Api/Model.d.ts +19 -26
- package/lib/Api/Permission.d.ts +0 -6
- package/lib/Api/Project.d.ts +13 -34
- package/lib/Api/Role.d.ts +0 -6
- package/lib/Api/User.d.ts +3 -10
- package/package.json +3 -3
- package/src/Api/Assembly.ts +21 -44
- package/src/Api/ClashTest.ts +9 -18
- package/src/Api/Client.ts +27 -60
- package/src/Api/ClientEvents.ts +4 -2
- package/src/Api/Fetch.ts +2 -2
- package/src/Api/FetchError.ts +5 -7
- package/src/Api/File.ts +69 -107
- package/src/Api/HttpClient.ts +2 -2
- package/src/Api/IAssembly.ts +2 -2
- package/src/Api/IFile.ts +2 -2
- package/src/Api/IHttpClient.ts +2 -2
- package/src/Api/IUser.ts +2 -2
- package/src/Api/Job.ts +14 -19
- package/src/Api/Member.ts +3 -9
- package/src/Api/Model.ts +21 -28
- package/src/Api/Permission.ts +2 -8
- package/src/Api/Project.ts +15 -36
- package/src/Api/Role.ts +2 -8
- package/src/Api/User.ts +5 -12
- package/src/Api/Utils.ts +2 -2
- package/src/Api/XMLHttp.ts +2 -2
- package/src/index.ts +2 -2
package/src/Api/Job.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -63,7 +63,7 @@ export class Job {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* Job creator ID. Use {@link Client
|
|
66
|
+
* Job creator ID. Use {@link Client.getUser | Client.getUser()} to obtain detailed creator information.
|
|
67
67
|
*
|
|
68
68
|
* @readonly
|
|
69
69
|
*/
|
|
@@ -72,8 +72,8 @@ export class Job {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* Job creation time (UTC) in the format specified in
|
|
76
|
-
*
|
|
75
|
+
* Job creation time (UTC) in the format specified in
|
|
76
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
77
77
|
*
|
|
78
78
|
* @readonly
|
|
79
79
|
*/
|
|
@@ -95,7 +95,7 @@ export class Job {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
|
-
* `true` if job is `done` or `failed`. See {@link
|
|
98
|
+
* `true` if job is `done` or `failed`. See {@link status} for more details.
|
|
99
99
|
*
|
|
100
100
|
* @readonly
|
|
101
101
|
*/
|
|
@@ -122,8 +122,8 @@ export class Job {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
* Job last update (UTC) time in the format specified in
|
|
126
|
-
*
|
|
125
|
+
* Job last update (UTC) time in the format specified in
|
|
126
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
127
127
|
*
|
|
128
128
|
* @readonly
|
|
129
129
|
*/
|
|
@@ -169,8 +169,8 @@ export class Job {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
|
-
* Job starting time (UTC) in the format specified in
|
|
173
|
-
*
|
|
172
|
+
* Job starting time (UTC) in the format specified in
|
|
173
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
174
174
|
*
|
|
175
175
|
* @readonly
|
|
176
176
|
*/
|
|
@@ -180,8 +180,6 @@ export class Job {
|
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
182
|
* Refresh job data.
|
|
183
|
-
*
|
|
184
|
-
* @async
|
|
185
183
|
*/
|
|
186
184
|
async checkout(): Promise<this> {
|
|
187
185
|
const response = await this.internalGet();
|
|
@@ -195,7 +193,6 @@ export class Job {
|
|
|
195
193
|
* Only administrators can update job data. If the current logged in user is not an
|
|
196
194
|
* administrator, an exception will be thrown.
|
|
197
195
|
*
|
|
198
|
-
* @async
|
|
199
196
|
* @param data - Raw job data.
|
|
200
197
|
*/
|
|
201
198
|
async update(data: any): Promise<this> {
|
|
@@ -208,7 +205,6 @@ export class Job {
|
|
|
208
205
|
* Remove a job from the server job list. Jobs that are in progress or have already been
|
|
209
206
|
* completed cannot be deleted.
|
|
210
207
|
*
|
|
211
|
-
* @async
|
|
212
208
|
* @returns Returns the raw data of a deleted job.
|
|
213
209
|
*/
|
|
214
210
|
delete(): Promise<any> {
|
|
@@ -219,7 +215,7 @@ export class Job {
|
|
|
219
215
|
// * Save job data changes to the server. Call this method to update job data on the server
|
|
220
216
|
// * after any changes.
|
|
221
217
|
// *
|
|
222
|
-
// *
|
|
218
|
+
// *
|
|
223
219
|
// * @returns {Promise<Job>}
|
|
224
220
|
// */
|
|
225
221
|
// save() {
|
|
@@ -229,15 +225,14 @@ export class Job {
|
|
|
229
225
|
/**
|
|
230
226
|
* Wait for job to be done. Job is done when it changes to `done` or `failed` status.
|
|
231
227
|
*
|
|
232
|
-
* @async
|
|
233
228
|
* @param params - An object containing waiting parameters.
|
|
234
229
|
* @param params.timeout - The time, in milliseconds that the function should wait job. If
|
|
235
230
|
* jobs is not done during this time, the `TimeoutError` exception will be thrown.
|
|
236
231
|
* @param params.interval - The time, in milliseconds, the function should delay in between
|
|
237
232
|
* checking job status.
|
|
238
|
-
* @param params.signal- An
|
|
239
|
-
*
|
|
240
|
-
* signal
|
|
233
|
+
* @param params.signal - An
|
|
234
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
235
|
+
* signal, which can be used to abort waiting as desired.
|
|
241
236
|
* @param params.onCheckout - Waiting progress callback. Return `true` to cancel waiting.
|
|
242
237
|
*/
|
|
243
238
|
waitForDone(params?: {
|
package/src/Api/Member.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -82,7 +82,7 @@ export class Member {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* Member role. See {@link Project
|
|
85
|
+
* Member role. See {@link Project.getRoles | Project.getRoles()} for more details.
|
|
86
86
|
*/
|
|
87
87
|
get role(): string {
|
|
88
88
|
return this.data.role;
|
|
@@ -120,8 +120,6 @@ export class Member {
|
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
* Refresh member data.
|
|
123
|
-
*
|
|
124
|
-
* @async
|
|
125
123
|
*/
|
|
126
124
|
async checkout(): Promise<this> {
|
|
127
125
|
const response = await this.internalGet();
|
|
@@ -132,7 +130,6 @@ export class Member {
|
|
|
132
130
|
/**
|
|
133
131
|
* Update member data on the server.
|
|
134
132
|
*
|
|
135
|
-
* @async
|
|
136
133
|
* @param data - Raw member data.
|
|
137
134
|
*/
|
|
138
135
|
async update(data: any): Promise<this> {
|
|
@@ -144,7 +141,6 @@ export class Member {
|
|
|
144
141
|
/**
|
|
145
142
|
* Remove a member from a project.
|
|
146
143
|
*
|
|
147
|
-
* @async
|
|
148
144
|
* @returns Returns the raw data of a deleted member.
|
|
149
145
|
*/
|
|
150
146
|
delete(): Promise<any> {
|
|
@@ -154,8 +150,6 @@ export class Member {
|
|
|
154
150
|
/**
|
|
155
151
|
* Save member data changes to the server. Call this method to update member data on the
|
|
156
152
|
* server after any changes.
|
|
157
|
-
*
|
|
158
|
-
* @async
|
|
159
153
|
*/
|
|
160
154
|
save(): Promise<this> {
|
|
161
155
|
return this.update(this.data);
|
package/src/Api/Model.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -69,8 +69,8 @@ export class Model {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Scene description resource file name. Use {@link
|
|
73
|
-
* scene description file.
|
|
72
|
+
* Scene description resource file name. Use {@link downloadResource | downloadResource()} to
|
|
73
|
+
* download scene description file.
|
|
74
74
|
*
|
|
75
75
|
* @readonly
|
|
76
76
|
*/
|
|
@@ -106,8 +106,8 @@ export class Model {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* The list of geometry data resource files. Use {@link
|
|
110
|
-
* geometry data files.
|
|
109
|
+
* The list of geometry data resource files. Use {@link downloadResource | downloadResource()}
|
|
110
|
+
* to download geometry data files.
|
|
111
111
|
*
|
|
112
112
|
* @readonly
|
|
113
113
|
*/
|
|
@@ -150,8 +150,6 @@ export class Model {
|
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* Returns model list with one item `self`.
|
|
153
|
-
*
|
|
154
|
-
* @async
|
|
155
153
|
*/
|
|
156
154
|
getModels(): Promise<Model[]> {
|
|
157
155
|
return Promise.resolve([this]);
|
|
@@ -169,7 +167,6 @@ export class Model {
|
|
|
169
167
|
/**
|
|
170
168
|
* Set or delete a model transformation.
|
|
171
169
|
*
|
|
172
|
-
* @async
|
|
173
170
|
* @param handle - Model handle.
|
|
174
171
|
* @param transform - Transformation matrix. To delete transformation provide this to `undefined`.
|
|
175
172
|
*/
|
|
@@ -179,8 +176,6 @@ export class Model {
|
|
|
179
176
|
|
|
180
177
|
/**
|
|
181
178
|
* Returns model viewpoint list.
|
|
182
|
-
*
|
|
183
|
-
* @async
|
|
184
179
|
*/
|
|
185
180
|
getViewpoints(): Promise<any[]> {
|
|
186
181
|
return this._file
|
|
@@ -195,7 +190,6 @@ export class Model {
|
|
|
195
190
|
/**
|
|
196
191
|
* Add new model viewpoint. To create a new viewpoint use `Viewer.createViewpoint()`.
|
|
197
192
|
*
|
|
198
|
-
* @async
|
|
199
193
|
* @param viewpoint - Viewpoint.
|
|
200
194
|
*/
|
|
201
195
|
saveViewpoint(viewpoint: any): Promise<any> {
|
|
@@ -208,7 +202,6 @@ export class Model {
|
|
|
208
202
|
/**
|
|
209
203
|
* Delete model viewpoint.
|
|
210
204
|
*
|
|
211
|
-
* @async
|
|
212
205
|
* @param guid - Viewpoint GUID.
|
|
213
206
|
* @returns Returns the raw data of a deleted viewpoint.
|
|
214
207
|
*/
|
|
@@ -220,7 +213,6 @@ export class Model {
|
|
|
220
213
|
* Returns viewpoint preview image as
|
|
221
214
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
|
|
222
215
|
*
|
|
223
|
-
* @async
|
|
224
216
|
* @param guid - Viewpoint GIID.
|
|
225
217
|
*/
|
|
226
218
|
getSnapshot(guid: string): Promise<string> {
|
|
@@ -230,7 +222,6 @@ export class Model {
|
|
|
230
222
|
/**
|
|
231
223
|
* Returns snapshot data.
|
|
232
224
|
*
|
|
233
|
-
* @async
|
|
234
225
|
* @param guid - Viewpoint GUID.
|
|
235
226
|
* @param bitmapGuid - Bitmap GUID.
|
|
236
227
|
*/
|
|
@@ -242,12 +233,11 @@ export class Model {
|
|
|
242
233
|
* Download model resource file. Resource files are files that contain model scene
|
|
243
234
|
* descriptions, or geometry data.
|
|
244
235
|
*
|
|
245
|
-
* @async
|
|
246
236
|
* @param dataId - Resource file name.
|
|
247
237
|
* @param onProgress - Download progress callback.
|
|
248
|
-
* @param signal - An
|
|
249
|
-
*
|
|
250
|
-
* and abort it if desired.
|
|
238
|
+
* @param signal - An
|
|
239
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
240
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
251
241
|
*/
|
|
252
242
|
downloadResource(
|
|
253
243
|
dataId: string,
|
|
@@ -265,9 +255,9 @@ export class Model {
|
|
|
265
255
|
* @param ranges - A range of resource file contents to download.
|
|
266
256
|
* @param requestId - Request ID for download progress callback.
|
|
267
257
|
* @param onProgress - Download progress callback.
|
|
268
|
-
* @param signal - An
|
|
269
|
-
*
|
|
270
|
-
* and abort it if desired.
|
|
258
|
+
* @param signal - An
|
|
259
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
260
|
+
* signal. Allows to communicate with a fetch request and abort it if desired.
|
|
271
261
|
*/
|
|
272
262
|
downloadResourceRange(
|
|
273
263
|
dataId: string,
|
|
@@ -280,7 +270,9 @@ export class Model {
|
|
|
280
270
|
}
|
|
281
271
|
|
|
282
272
|
/**
|
|
283
|
-
* Deprecated since `25.3`. Use {@link
|
|
273
|
+
* Deprecated since `25.3`. Use {@link downloadResource | downloadResource()} instead.
|
|
274
|
+
*
|
|
275
|
+
* @deprecated
|
|
284
276
|
*/
|
|
285
277
|
partialDownloadResource(
|
|
286
278
|
dataId: string,
|
|
@@ -294,7 +286,9 @@ export class Model {
|
|
|
294
286
|
}
|
|
295
287
|
|
|
296
288
|
/**
|
|
297
|
-
* Deprecated since `25.3`. Use {@link
|
|
289
|
+
* Deprecated since `25.3`. Use {@link downloadResourceRange | downloadResourceRange()} instead.
|
|
290
|
+
*
|
|
291
|
+
* @deprecated
|
|
298
292
|
*/
|
|
299
293
|
async downloadFileRange(
|
|
300
294
|
requestId: number,
|
|
@@ -326,10 +320,9 @@ export class Model {
|
|
|
326
320
|
/**
|
|
327
321
|
* Returns a list of references to files used to extract geometry data.
|
|
328
322
|
*
|
|
329
|
-
* @
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
* signal object instance, which can be used to abort waiting as desired.
|
|
323
|
+
* @param signal - An
|
|
324
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
325
|
+
* signal, which can be used to abort waiting as desired.
|
|
333
326
|
*/
|
|
334
327
|
getReferences(signal?: AbortSignal): Promise<any> {
|
|
335
328
|
return this._file.getReferences(signal);
|
package/src/Api/Permission.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -131,8 +131,6 @@ export class Permission {
|
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* Refresh permission data.
|
|
134
|
-
*
|
|
135
|
-
* @async
|
|
136
134
|
*/
|
|
137
135
|
async checkout(): Promise<this> {
|
|
138
136
|
const response = await this.internalGet();
|
|
@@ -143,7 +141,6 @@ export class Permission {
|
|
|
143
141
|
/**
|
|
144
142
|
* Update permission data on the server.
|
|
145
143
|
*
|
|
146
|
-
* @async
|
|
147
144
|
* @param data - Raw permission data.
|
|
148
145
|
*/
|
|
149
146
|
async update(data: any): Promise<this> {
|
|
@@ -155,7 +152,6 @@ export class Permission {
|
|
|
155
152
|
/**
|
|
156
153
|
* Remove a permission from a file.
|
|
157
154
|
*
|
|
158
|
-
* @async
|
|
159
155
|
* @returns Returns the raw data of a deleted permission.
|
|
160
156
|
*/
|
|
161
157
|
delete(): Promise<any> {
|
|
@@ -165,8 +161,6 @@ export class Permission {
|
|
|
165
161
|
/**
|
|
166
162
|
* Save permission data changes to the server. Call this method to update permission data on
|
|
167
163
|
* the server after any changes.
|
|
168
|
-
*
|
|
169
|
-
* @async
|
|
170
164
|
*/
|
|
171
165
|
save(): Promise<this> {
|
|
172
166
|
return this.update(this.data);
|
package/src/Api/Project.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -71,8 +71,8 @@ export class Project {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* Project creation time (UTC) in the format specified in
|
|
75
|
-
*
|
|
74
|
+
* Project creation time (UTC) in the format specified in
|
|
75
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
76
76
|
*
|
|
77
77
|
* @readonly
|
|
78
78
|
*/
|
|
@@ -122,8 +122,8 @@ export class Project {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
* Project end date in the format specified in
|
|
126
|
-
*
|
|
125
|
+
* Project end date in the format specified in
|
|
126
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
127
127
|
*/
|
|
128
128
|
get endDate(): string {
|
|
129
129
|
return this.data.endDate;
|
|
@@ -210,8 +210,8 @@ export class Project {
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
|
-
* Project start date in the format specified in
|
|
214
|
-
*
|
|
213
|
+
* Project start date in the format specified in
|
|
214
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
215
215
|
*/
|
|
216
216
|
get startDate(): string {
|
|
217
217
|
return this.data.startDate;
|
|
@@ -231,8 +231,8 @@ export class Project {
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
/**
|
|
234
|
-
* Project last update time (UTC) in the format specified in
|
|
235
|
-
*
|
|
234
|
+
* Project last update time (UTC) in the format specified in
|
|
235
|
+
* {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
|
|
236
236
|
*
|
|
237
237
|
* @readonly
|
|
238
238
|
*/
|
|
@@ -242,8 +242,6 @@ export class Project {
|
|
|
242
242
|
|
|
243
243
|
/**
|
|
244
244
|
* Refresh project data.
|
|
245
|
-
*
|
|
246
|
-
* @async
|
|
247
245
|
*/
|
|
248
246
|
async checkout(): Promise<this> {
|
|
249
247
|
const response = await this.internalGet("");
|
|
@@ -254,7 +252,6 @@ export class Project {
|
|
|
254
252
|
/**
|
|
255
253
|
* Update project data on the server.
|
|
256
254
|
*
|
|
257
|
-
* @async
|
|
258
255
|
* @param data - Raw project data.
|
|
259
256
|
*/
|
|
260
257
|
async update(data: any): Promise<this> {
|
|
@@ -266,7 +263,6 @@ export class Project {
|
|
|
266
263
|
/**
|
|
267
264
|
* Delete the project from the server.
|
|
268
265
|
*
|
|
269
|
-
* @async
|
|
270
266
|
* @returns Returns the raw data of a deleted project.
|
|
271
267
|
*/
|
|
272
268
|
delete(): Promise<any> {
|
|
@@ -285,8 +281,6 @@ export class Project {
|
|
|
285
281
|
/**
|
|
286
282
|
* Save project data changes to the server. Call this method to update project data on the
|
|
287
283
|
* server after any changes.
|
|
288
|
-
*
|
|
289
|
-
* @async
|
|
290
284
|
*/
|
|
291
285
|
save(): Promise<this> {
|
|
292
286
|
return this.update(this.data);
|
|
@@ -295,7 +289,6 @@ export class Project {
|
|
|
295
289
|
/**
|
|
296
290
|
* Set or remove the project preview.
|
|
297
291
|
*
|
|
298
|
-
* @async
|
|
299
292
|
* @param image - Preview image. Can be a
|
|
300
293
|
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
301
294
|
* string,
|
|
@@ -317,8 +310,6 @@ export class Project {
|
|
|
317
310
|
|
|
318
311
|
/**
|
|
319
312
|
* Remove the project preview.
|
|
320
|
-
*
|
|
321
|
-
* @async
|
|
322
313
|
*/
|
|
323
314
|
async deletePreview(): Promise<this> {
|
|
324
315
|
const response = await this.internalDelete("/preview");
|
|
@@ -327,10 +318,8 @@ export class Project {
|
|
|
327
318
|
}
|
|
328
319
|
|
|
329
320
|
/**
|
|
330
|
-
* Returns a list of project roles. Project
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
* @async
|
|
321
|
+
* Returns a list of project roles. Project members have different abilities depending on the
|
|
322
|
+
* role they have in a project.
|
|
334
323
|
*/
|
|
335
324
|
getRoles(): Promise<Role[]> {
|
|
336
325
|
return this.internalGet("/roles")
|
|
@@ -341,7 +330,6 @@ export class Project {
|
|
|
341
330
|
/**
|
|
342
331
|
* Returns the role information.
|
|
343
332
|
*
|
|
344
|
-
* @async
|
|
345
333
|
* @param name - Role name.
|
|
346
334
|
*/
|
|
347
335
|
getRole(name: string): Promise<Role> {
|
|
@@ -353,11 +341,10 @@ export class Project {
|
|
|
353
341
|
/**
|
|
354
342
|
* Create a new project role.
|
|
355
343
|
*
|
|
356
|
-
* @async
|
|
357
344
|
* @param name - Role name.
|
|
358
345
|
* @param description - Role description.
|
|
359
|
-
* @param permissions - Actions are allowed to be performed. See
|
|
360
|
-
*
|
|
346
|
+
* @param permissions - Actions are allowed to be performed. See {@link Role.permissions} for
|
|
347
|
+
* more details.
|
|
361
348
|
*/
|
|
362
349
|
createRole(name: string, description: string, permissions: any): Promise<Role> {
|
|
363
350
|
return this.internalPost("/roles", {
|
|
@@ -372,7 +359,6 @@ export class Project {
|
|
|
372
359
|
/**
|
|
373
360
|
* Delete project role.
|
|
374
361
|
*
|
|
375
|
-
* @async
|
|
376
362
|
* @param name - Role name.
|
|
377
363
|
* @returns Returns the raw data of a deleted role.
|
|
378
364
|
*/
|
|
@@ -382,8 +368,6 @@ export class Project {
|
|
|
382
368
|
|
|
383
369
|
/**
|
|
384
370
|
* Returns a list of project members.
|
|
385
|
-
*
|
|
386
|
-
* @async
|
|
387
371
|
*/
|
|
388
372
|
getMembers(): Promise<Member[]> {
|
|
389
373
|
return this.internalGet("/members")
|
|
@@ -394,7 +378,6 @@ export class Project {
|
|
|
394
378
|
/**
|
|
395
379
|
* Returns the member information.
|
|
396
380
|
*
|
|
397
|
-
* @async
|
|
398
381
|
* @param memberId - Member ID.
|
|
399
382
|
*/
|
|
400
383
|
getMember(memberId: string): Promise<Member> {
|
|
@@ -406,7 +389,6 @@ export class Project {
|
|
|
406
389
|
/**
|
|
407
390
|
* Add a user to the project to become a member and have permission to perform actions.
|
|
408
391
|
*
|
|
409
|
-
* @async
|
|
410
392
|
* @param userId - User ID.
|
|
411
393
|
* @param role - User role from the list of project roles.
|
|
412
394
|
*/
|
|
@@ -419,7 +401,6 @@ export class Project {
|
|
|
419
401
|
/**
|
|
420
402
|
* Remove a member from a project.
|
|
421
403
|
*
|
|
422
|
-
* @async
|
|
423
404
|
* @param memberId - Member ID.
|
|
424
405
|
* @returns Returns the raw data of a deleted member.
|
|
425
406
|
*/
|
|
@@ -442,9 +423,7 @@ export class Project {
|
|
|
442
423
|
|
|
443
424
|
/**
|
|
444
425
|
* Returns a list of project files. To add a file to this list, create a `project` permission
|
|
445
|
-
* on the file using {@link File
|
|
446
|
-
*
|
|
447
|
-
* @async
|
|
426
|
+
* on the file using {@link File.createPermission | File.createPermission()}.
|
|
448
427
|
*/
|
|
449
428
|
getFilesInformation(): Promise<any[]> {
|
|
450
429
|
return this.httpClient
|
package/src/Api/Role.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright (C) 2002-
|
|
2
|
+
// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
3
3
|
// All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
// This software and its documentation and related materials are owned by
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
//
|
|
15
15
|
// This application incorporates Open Design Alliance software pursuant to a
|
|
16
16
|
// license agreement with Open Design Alliance.
|
|
17
|
-
// Open Design Alliance Copyright (C) 2002-
|
|
17
|
+
// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
18
18
|
// All rights reserved.
|
|
19
19
|
//
|
|
20
20
|
// By use of this software, its documentation or related materials, you
|
|
@@ -116,8 +116,6 @@ export class Role {
|
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
118
|
* Refresh role data.
|
|
119
|
-
*
|
|
120
|
-
* @async
|
|
121
119
|
*/
|
|
122
120
|
async checkout(): Promise<this> {
|
|
123
121
|
const response = await this.internalGet();
|
|
@@ -128,7 +126,6 @@ export class Role {
|
|
|
128
126
|
/**
|
|
129
127
|
* Update role data on the server.
|
|
130
128
|
*
|
|
131
|
-
* @async
|
|
132
129
|
* @param data - Raw role data.
|
|
133
130
|
*/
|
|
134
131
|
async update(data: any): Promise<this> {
|
|
@@ -140,7 +137,6 @@ export class Role {
|
|
|
140
137
|
/**
|
|
141
138
|
* Delete a role from the project.
|
|
142
139
|
*
|
|
143
|
-
* @async
|
|
144
140
|
* @returns Returns the raw data of a deleted role.
|
|
145
141
|
*/
|
|
146
142
|
delete(): Promise<any> {
|
|
@@ -150,8 +146,6 @@ export class Role {
|
|
|
150
146
|
/**
|
|
151
147
|
* Save role data changes to the server. Call this method to update role data on the server
|
|
152
148
|
* after any changes.
|
|
153
|
-
*
|
|
154
|
-
* @async
|
|
155
149
|
*/
|
|
156
150
|
save(): Promise<this> {
|
|
157
151
|
return this.update(this.data);
|