@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/Model.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import type { IFileReferences } from "./IFile";
|
|
|
5
5
|
import type { IModelTransformMatrix } from "./IAssembly";
|
|
6
6
|
/**
|
|
7
7
|
* Provides properties and methods for working with view of the {@link File | file} or
|
|
8
|
-
* {@link Assembly| assembly}. For example, for `dwg` it is a `Model` space or layout, and for
|
|
9
|
-
*
|
|
8
|
+
* {@link Assembly| assembly}. For example, for `dwg` it is a `Model` space or layout, and for `rvt` files
|
|
9
|
+
* it is a `3D` view.
|
|
10
10
|
*/
|
|
11
11
|
export declare class Model extends Endpoint {
|
|
12
12
|
private _data;
|
|
@@ -30,8 +30,8 @@ export declare class Model extends Endpoint {
|
|
|
30
30
|
get data(): any;
|
|
31
31
|
private set data(value);
|
|
32
32
|
/**
|
|
33
|
-
* Scene description resource file name. Use {@link downloadResource | downloadResource()} to
|
|
34
|
-
*
|
|
33
|
+
* Scene description resource file name. Use {@link downloadResource | downloadResource()} to download
|
|
34
|
+
* scene description file.
|
|
35
35
|
*
|
|
36
36
|
* @readonly
|
|
37
37
|
*/
|
|
@@ -55,8 +55,8 @@ export declare class Model extends Endpoint {
|
|
|
55
55
|
*/
|
|
56
56
|
get fileId(): string;
|
|
57
57
|
/**
|
|
58
|
-
* The list of geometry data resource files. Use {@link downloadResource | downloadResource()}
|
|
59
|
-
*
|
|
58
|
+
* The list of geometry data resource files. Use {@link downloadResource | downloadResource()} to
|
|
59
|
+
* download geometry data files.
|
|
60
60
|
*
|
|
61
61
|
* @readonly
|
|
62
62
|
*/
|
|
@@ -103,8 +103,8 @@ export declare class Model extends Endpoint {
|
|
|
103
103
|
*/
|
|
104
104
|
getViewpoints(): Promise<any[]>;
|
|
105
105
|
/**
|
|
106
|
-
* Saves a new model owner file/assembly viewpoint to the server. To create a new viewpoint
|
|
107
|
-
*
|
|
106
|
+
* Saves a new model owner file/assembly viewpoint to the server. To create a new viewpoint use
|
|
107
|
+
* `Viewer.createViewpoint()`.
|
|
108
108
|
*
|
|
109
109
|
* @param viewpoint - Viewpoint object.
|
|
110
110
|
*/
|
|
@@ -131,27 +131,27 @@ export declare class Model extends Endpoint {
|
|
|
131
131
|
*/
|
|
132
132
|
getSnapshotData(guid: string, bitmapGuid: string): Promise<string>;
|
|
133
133
|
/**
|
|
134
|
-
* Downloads a resource file. Resource files are files that contain model scene descriptions,
|
|
135
|
-
*
|
|
134
|
+
* Downloads a resource file. Resource files are files that contain model scene descriptions, or
|
|
135
|
+
* geometry data.
|
|
136
136
|
*
|
|
137
137
|
* @param dataId - Resource file name.
|
|
138
138
|
* @param onProgress - Download progress callback.
|
|
139
139
|
* @param signal - An
|
|
140
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
141
|
-
*
|
|
140
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
|
|
141
|
+
* to communicate with a fetch request and abort it if desired.
|
|
142
142
|
*/
|
|
143
143
|
downloadResource(dataId: string, onProgress?: (progress: number, chunk: Uint8Array) => void, signal?: AbortSignal): Promise<ArrayBuffer>;
|
|
144
144
|
/**
|
|
145
|
-
* Downloads a part of resource file. Resource files are files that contain model scene
|
|
146
|
-
*
|
|
145
|
+
* Downloads a part of resource file. Resource files are files that contain model scene descriptions,
|
|
146
|
+
* or geometry data.
|
|
147
147
|
*
|
|
148
148
|
* @param dataId - Resource file name.
|
|
149
149
|
* @param ranges - A range of resource file contents to download.
|
|
150
150
|
* @param requestId - Request ID for download progress callback.
|
|
151
151
|
* @param onProgress - Download progress callback.
|
|
152
152
|
* @param signal - An
|
|
153
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
154
|
-
*
|
|
153
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal. Allows
|
|
154
|
+
* to communicate with a fetch request and abort it if desired.
|
|
155
155
|
*/
|
|
156
156
|
downloadResourceRange(dataId: string, requestId: number, ranges: Array<{
|
|
157
157
|
begin: number;
|
|
@@ -176,8 +176,8 @@ export declare class Model extends Endpoint {
|
|
|
176
176
|
* References are images, fonts, or any other files to correct rendering of the file.
|
|
177
177
|
*
|
|
178
178
|
* @param signal - An
|
|
179
|
-
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController}
|
|
180
|
-
*
|
|
179
|
+
* {@link https://developer.mozilla.org/docs/Web/API/AbortController | AbortController} signal, which
|
|
180
|
+
* can be used to abort waiting as desired.
|
|
181
181
|
*/
|
|
182
182
|
getReferences(signal?: AbortSignal): Promise<IFileReferences>;
|
|
183
183
|
}
|
package/lib/Api/OAuthClient.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IHttpClient } from "./IHttpClient";
|
|
2
2
|
import { Endpoint } from "./Endpoint";
|
|
3
3
|
/**
|
|
4
|
-
* Provides properties and methods for obtaining information about a OAuth 2.0 client that have
|
|
5
|
-
*
|
|
4
|
+
* Provides properties and methods for obtaining information about a OAuth 2.0 client that have access
|
|
5
|
+
* the Open Cloud Server API.
|
|
6
6
|
*/
|
|
7
7
|
export declare class OAuthClient extends Endpoint {
|
|
8
8
|
private _data;
|
|
@@ -72,8 +72,8 @@ export declare class OAuthClient extends Endpoint {
|
|
|
72
72
|
/**
|
|
73
73
|
* Updates client data on the server.
|
|
74
74
|
*
|
|
75
|
-
* Only administrators can update OAuth clients. If the current logged in user is not an
|
|
76
|
-
*
|
|
75
|
+
* Only administrators can update OAuth clients. If the current logged in user is not an administrator,
|
|
76
|
+
* an exception will be thrown.
|
|
77
77
|
*
|
|
78
78
|
* @param data - Raw client data. For more information, see
|
|
79
79
|
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.
|
|
@@ -82,19 +82,19 @@ export declare class OAuthClient extends Endpoint {
|
|
|
82
82
|
/**
|
|
83
83
|
* Deletes a client from the server.
|
|
84
84
|
*
|
|
85
|
-
* Only administrators can delete OAuth clients. If the current logged in user is not an
|
|
86
|
-
*
|
|
85
|
+
* Only administrators can delete OAuth clients. If the current logged in user is not an administrator,
|
|
86
|
+
* an exception will be thrown.
|
|
87
87
|
*
|
|
88
88
|
* @returns Returns the raw data of a deleted client. For more information, see
|
|
89
89
|
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#OAuthClient | Open Cloud OAuth Clients API}.
|
|
90
90
|
*/
|
|
91
91
|
delete(): Promise<any>;
|
|
92
92
|
/**
|
|
93
|
-
* Saves client properties changes to the server. Call this method to update client data on
|
|
94
|
-
*
|
|
93
|
+
* Saves client properties changes to the server. Call this method to update client data on the server
|
|
94
|
+
* after any property changes.
|
|
95
95
|
*
|
|
96
|
-
* Only administrators can update OAuth clients. If the current logged in user is not an
|
|
97
|
-
*
|
|
96
|
+
* Only administrators can update OAuth clients. If the current logged in user is not an administrator,
|
|
97
|
+
* an exception will be thrown.
|
|
98
98
|
*/
|
|
99
99
|
save(): Promise<this>;
|
|
100
100
|
/**
|
package/lib/Api/Permission.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { IHttpClient } from "./IHttpClient";
|
|
|
2
2
|
import { Endpoint } from "./Endpoint";
|
|
3
3
|
import { IGrantedTo } from "./IFile";
|
|
4
4
|
/**
|
|
5
|
-
* Provides properties and methods for obtaining information about {@link File | file} actions
|
|
6
|
-
*
|
|
5
|
+
* Provides properties and methods for obtaining information about {@link File | file} actions granted to
|
|
6
|
+
* a specific user, project, or group.
|
|
7
7
|
*/
|
|
8
8
|
export declare class Permission extends Endpoint {
|
|
9
9
|
private _data;
|
|
@@ -23,19 +23,22 @@ export declare class Permission extends Endpoint {
|
|
|
23
23
|
* - `readViewpoint` - The ability to read file viewpoints.
|
|
24
24
|
* - `createViewpoint` - The ability to create file viewpoints.
|
|
25
25
|
*
|
|
26
|
-
* @example
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
26
|
+
* @example Change file permissions for the the specified project.
|
|
27
|
+
*
|
|
28
|
+
* ```javascript
|
|
29
|
+
* const myFile = client.getFile(myFileId);
|
|
30
|
+
* const permissions = await myFile.getPermissions();
|
|
31
|
+
* const projectPermissions = permissions.filter((permission) =>
|
|
32
|
+
* permission.grantedTo.some((x) => x.project?.id === myProjectId)
|
|
33
|
+
* );
|
|
34
|
+
* const newActions = ["read", "readSourceFile", "update"];
|
|
35
|
+
* await Promise.all(
|
|
36
|
+
* projectPermissions.map((permission) => {
|
|
37
|
+
* permission.actions = newActions;
|
|
38
|
+
* return permission.save();
|
|
39
|
+
* })
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
39
42
|
*/
|
|
40
43
|
get actions(): string[];
|
|
41
44
|
set actions(value: string[]);
|
|
@@ -82,8 +85,8 @@ export declare class Permission extends Endpoint {
|
|
|
82
85
|
*/
|
|
83
86
|
delete(): Promise<any>;
|
|
84
87
|
/**
|
|
85
|
-
* Saves permission properties changes to the server. Call this method to update permission
|
|
86
|
-
*
|
|
88
|
+
* Saves permission properties changes to the server. Call this method to update permission data on the
|
|
89
|
+
* server after any property changes.
|
|
87
90
|
*/
|
|
88
91
|
save(): Promise<this>;
|
|
89
92
|
}
|
package/lib/Api/Project.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { IRoleActions } from "./IRole";
|
|
|
6
6
|
import { Member } from "./Member";
|
|
7
7
|
import { File } from "./File";
|
|
8
8
|
/**
|
|
9
|
-
* Provides properties and methods for obtaining information about a project on the Open Cloud
|
|
10
|
-
*
|
|
9
|
+
* Provides properties and methods for obtaining information about a project on the Open Cloud Server and
|
|
10
|
+
* managing its {@link Role | roles}, {@link Member | members} and models.
|
|
11
11
|
*/
|
|
12
12
|
export declare class Project extends Endpoint {
|
|
13
13
|
private _data;
|
|
@@ -142,20 +142,19 @@ export declare class Project extends Endpoint {
|
|
|
142
142
|
*/
|
|
143
143
|
delete(): Promise<any>;
|
|
144
144
|
/**
|
|
145
|
-
* Saves project properties changes to the server. Call this method to update project data on
|
|
146
|
-
*
|
|
145
|
+
* Saves project properties changes to the server. Call this method to update project data on the
|
|
146
|
+
* server after any property changes.
|
|
147
147
|
*/
|
|
148
148
|
save(): Promise<this>;
|
|
149
149
|
/**
|
|
150
150
|
* Sets or removes the project preview.
|
|
151
151
|
*
|
|
152
152
|
* @param image - Preview image. Can be a
|
|
153
|
-
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
154
|
-
* string,
|
|
153
|
+
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,
|
|
155
154
|
* {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},
|
|
156
155
|
* {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or
|
|
157
|
-
* {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting
|
|
158
|
-
*
|
|
156
|
+
* {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`
|
|
157
|
+
* to `null` will remove the preview.
|
|
159
158
|
*/
|
|
160
159
|
setPreview(image?: BodyInit | null): Promise<this>;
|
|
161
160
|
/**
|
|
@@ -163,8 +162,8 @@ export declare class Project extends Endpoint {
|
|
|
163
162
|
*/
|
|
164
163
|
deletePreview(): Promise<this>;
|
|
165
164
|
/**
|
|
166
|
-
* Returns a list of project roles. Project members have different abilities depending on the
|
|
167
|
-
*
|
|
165
|
+
* Returns a list of project roles. Project members have different abilities depending on the role they
|
|
166
|
+
* have in a project.
|
|
168
167
|
*/
|
|
169
168
|
getRoles(): Promise<Role[]>;
|
|
170
169
|
/**
|
|
@@ -218,8 +217,8 @@ export declare class Project extends Endpoint {
|
|
|
218
217
|
* Information about the file (model) that can be reference in the project topics.
|
|
219
218
|
*
|
|
220
219
|
* @typedef {any} FileInformation
|
|
221
|
-
* @property {any[]} display_information - The list of fields to allow users to associate the
|
|
222
|
-
*
|
|
220
|
+
* @property {any[]} display_information - The list of fields to allow users to associate the file with
|
|
221
|
+
* a server model.
|
|
223
222
|
* @property {string} display_information.field_display_name - Field display name.
|
|
224
223
|
* @property {string} display_information.field_value - Field value.
|
|
225
224
|
* @property {any} file - The file reference object.
|
|
@@ -230,8 +229,8 @@ export declare class Project extends Endpoint {
|
|
|
230
229
|
* Returns a list of project files. For more information, see
|
|
231
230
|
* {@link https://cloud.opendesign.com/docs//pages/server/bcf3.html#ProjectFilesInformation | Open Cloud BCF3 API}.
|
|
232
231
|
*
|
|
233
|
-
* This list contains all files that the project has access to. To add a file to this list,
|
|
234
|
-
*
|
|
232
|
+
* This list contains all files that the project has access to. To add a file to this list, create a
|
|
233
|
+
* {@link IGrantedTo.project | project} permission on the file using
|
|
235
234
|
* {@link File.createPermission | File.createPermission()}.
|
|
236
235
|
*/
|
|
237
236
|
getFilesInformation(): Promise<any[]>;
|
package/lib/Api/Role.d.ts
CHANGED
|
@@ -57,8 +57,8 @@ export declare class Role extends Endpoint {
|
|
|
57
57
|
*/
|
|
58
58
|
delete(): Promise<any>;
|
|
59
59
|
/**
|
|
60
|
-
* Saves role properties changes to the server. Call this method to update role data on the
|
|
61
|
-
*
|
|
60
|
+
* Saves role properties changes to the server. Call this method to update role data on the server
|
|
61
|
+
* after any property changes.
|
|
62
62
|
*/
|
|
63
63
|
save(): Promise<this>;
|
|
64
64
|
}
|
package/lib/Api/SharedLink.d.ts
CHANGED
|
@@ -63,8 +63,8 @@ export declare class SharedLink extends Endpoint {
|
|
|
63
63
|
*/
|
|
64
64
|
delete(): Promise<any>;
|
|
65
65
|
/**
|
|
66
|
-
* Saves shared link properties changes to the server. Call this method to update shared link
|
|
67
|
-
*
|
|
66
|
+
* Saves shared link properties changes to the server. Call this method to update shared link data on
|
|
67
|
+
* the server after any property changes.
|
|
68
68
|
*/
|
|
69
69
|
save(): Promise<this>;
|
|
70
70
|
}
|
package/lib/Api/User.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IHttpClient } from "./IHttpClient";
|
|
2
2
|
import { Endpoint } from "./Endpoint";
|
|
3
3
|
/**
|
|
4
|
-
* Provides properties and methods for obtaining information about a Open Cloud Server user and
|
|
5
|
-
*
|
|
4
|
+
* Provides properties and methods for obtaining information about a Open Cloud Server user and manage
|
|
5
|
+
* its data.
|
|
6
6
|
*/
|
|
7
7
|
export declare class User extends Endpoint {
|
|
8
8
|
private _data;
|
|
@@ -66,8 +66,8 @@ export declare class User extends Endpoint {
|
|
|
66
66
|
get firstName(): string;
|
|
67
67
|
set firstName(value: string);
|
|
68
68
|
/**
|
|
69
|
-
* Full name. Returns the user's first and last name. If first name and last names are empty,
|
|
70
|
-
*
|
|
69
|
+
* Full name. Returns the user's first and last name. If first name and last names are empty, returns
|
|
70
|
+
* the user name.
|
|
71
71
|
*
|
|
72
72
|
* @readonly
|
|
73
73
|
*/
|
|
@@ -79,8 +79,8 @@ export declare class User extends Endpoint {
|
|
|
79
79
|
*/
|
|
80
80
|
get id(): string;
|
|
81
81
|
/**
|
|
82
|
-
* User initials. Returns a first letters of the user's first and last names. If first name
|
|
83
|
-
*
|
|
82
|
+
* User initials. Returns a first letters of the user's first and last names. If first name and last
|
|
83
|
+
* names are empty, returns the first letter of the user name.
|
|
84
84
|
*
|
|
85
85
|
* @readonly
|
|
86
86
|
*/
|
|
@@ -121,8 +121,8 @@ export declare class User extends Endpoint {
|
|
|
121
121
|
get projectsLimit(): number;
|
|
122
122
|
set projectsLimit(value: number);
|
|
123
123
|
/**
|
|
124
|
-
* The identity provider used to create the account. Can be `ldap`, `oauth`, `saml` or empty
|
|
125
|
-
*
|
|
124
|
+
* The identity provider used to create the account. Can be `ldap`, `oauth`, `saml` or empty for local
|
|
125
|
+
* accounts.
|
|
126
126
|
*
|
|
127
127
|
* @readonly
|
|
128
128
|
*/
|
|
@@ -141,8 +141,8 @@ export declare class User extends Endpoint {
|
|
|
141
141
|
*/
|
|
142
142
|
get storageUsed(): number;
|
|
143
143
|
/**
|
|
144
|
-
* The user's access token (API key). Use
|
|
145
|
-
*
|
|
144
|
+
* The user's access token (API key). Use {@link Client.signInWithToken | Client.signInWithToken()} to
|
|
145
|
+
* sign in to the server using this token.
|
|
146
146
|
*
|
|
147
147
|
* @readonly
|
|
148
148
|
*/
|
|
@@ -155,15 +155,15 @@ export declare class User extends Endpoint {
|
|
|
155
155
|
/**
|
|
156
156
|
* Reloads user data from the server.
|
|
157
157
|
*
|
|
158
|
-
* Only administrators can checkout other users. If the current logged in user is not an
|
|
159
|
-
*
|
|
158
|
+
* Only administrators can checkout other users. If the current logged in user is not an administrator,
|
|
159
|
+
* they can only checkout themselves, otherwise an exception will be thrown.
|
|
160
160
|
*/
|
|
161
161
|
checkout(): Promise<this>;
|
|
162
162
|
/**
|
|
163
163
|
* Updates user data on the server.
|
|
164
164
|
*
|
|
165
|
-
* Only administrators can update other users. If the current logged in user is not an
|
|
166
|
-
*
|
|
165
|
+
* Only administrators can update other users. If the current logged in user is not an administrator,
|
|
166
|
+
* they can only update themself, otherwise an exception will be thrown.
|
|
167
167
|
*
|
|
168
168
|
* @param data - Raw user data. For more information, see
|
|
169
169
|
* {@link https://cloud.opendesign.com/docs//pages/server/api.html#Users | Open Cloud Users API}.
|
|
@@ -172,11 +172,11 @@ export declare class User extends Endpoint {
|
|
|
172
172
|
/**
|
|
173
173
|
* Deletes a user from the server.
|
|
174
174
|
*
|
|
175
|
-
* Only administrators can delete users. If the current logged in user is not an
|
|
176
|
-
*
|
|
175
|
+
* Only administrators can delete users. If the current logged in user is not an administrator, an
|
|
176
|
+
* exception will be thrown.
|
|
177
177
|
*
|
|
178
|
-
* Administrators can delete themselves or other administrators. An administrator can only
|
|
179
|
-
*
|
|
178
|
+
* Administrators can delete themselves or other administrators. An administrator can only delete
|
|
179
|
+
* themself if they is not the last administrator.
|
|
180
180
|
*
|
|
181
181
|
* You need to re-login after deleting the current logged in user.
|
|
182
182
|
*
|
|
@@ -185,44 +185,42 @@ export declare class User extends Endpoint {
|
|
|
185
185
|
*/
|
|
186
186
|
delete(): Promise<any>;
|
|
187
187
|
/**
|
|
188
|
-
* Saves user properties changes to the server. Call this method to update user data on the
|
|
189
|
-
*
|
|
188
|
+
* Saves user properties changes to the server. Call this method to update user data on the server
|
|
189
|
+
* after any property changes.
|
|
190
190
|
*/
|
|
191
191
|
save(): Promise<this>;
|
|
192
192
|
/**
|
|
193
193
|
* Sets or removes the user avatar.
|
|
194
194
|
*
|
|
195
|
-
* Only administrators can set the avatar of other users. If the current logged in user is
|
|
196
|
-
*
|
|
195
|
+
* Only administrators can set the avatar of other users. If the current logged in user is not an
|
|
196
|
+
* administrator, they can only set their avatar, otherwise an exception will be thrown.
|
|
197
197
|
*
|
|
198
198
|
* @param image - Avatar image. Can be a
|
|
199
|
-
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
|
|
200
|
-
* string,
|
|
199
|
+
* {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL} string,
|
|
201
200
|
* {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},
|
|
202
201
|
* {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or
|
|
203
|
-
* {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting
|
|
204
|
-
*
|
|
202
|
+
* {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting the `image`
|
|
203
|
+
* to `null` will remove the avatar.
|
|
205
204
|
*/
|
|
206
205
|
setAvatar(image?: BodyInit | null): Promise<this>;
|
|
207
206
|
/**
|
|
208
207
|
* Removes the user avatar.
|
|
209
208
|
*
|
|
210
|
-
* Only administrators can remove the avatar of other users. If the current logged in user is
|
|
211
|
-
*
|
|
209
|
+
* Only administrators can remove the avatar of other users. If the current logged in user is not an
|
|
210
|
+
* administrator, they can only remove their avatar, otherwise an exception will be thrown.
|
|
212
211
|
*/
|
|
213
212
|
deleteAvatar(): Promise<this>;
|
|
214
213
|
/**
|
|
215
214
|
* Changes the user password.
|
|
216
215
|
*
|
|
217
|
-
* Only administrators can change the passwords of other users. If the current logged in user
|
|
218
|
-
*
|
|
219
|
-
* be thrown.
|
|
216
|
+
* Only administrators can change the passwords of other users. If the current logged in user is not an
|
|
217
|
+
* administrator, they can only change their password, otherwise an exception will be thrown.
|
|
220
218
|
*
|
|
221
219
|
* To change their password, non-administrator users must specify their old password.
|
|
222
220
|
*
|
|
223
221
|
* @param newPassword - New user password.
|
|
224
|
-
* @param oldPassword - Old user password. Only required for non-administrator users to
|
|
225
|
-
*
|
|
222
|
+
* @param oldPassword - Old user password. Only required for non-administrator users to change their
|
|
223
|
+
* password.
|
|
226
224
|
*/
|
|
227
225
|
changePassword(newPassword: string, oldPassword?: string): Promise<this>;
|
|
228
226
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/client",
|
|
3
|
-
"version": "26.1.
|
|
3
|
+
"version": "26.1.2",
|
|
4
4
|
"description": "JavaScript REST API client for the Open Cloud Server",
|
|
5
5
|
"homepage": "https://cloud.opendesign.com/docs/index.html",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"docs": "typedoc"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@inweb/eventemitter2": "~26.1.
|
|
29
|
+
"@inweb/eventemitter2": "~26.1.2"
|
|
30
30
|
}
|
|
31
31
|
}
|