@inweb/client 25.8.16 → 25.8.19

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.
@@ -1,16 +1,16 @@
1
1
  import { IHttpClient } from "./IHttpClient";
2
2
  /**
3
- * A permission provides information about {@link File | file} sharing granted to a specific
4
- * {@link User | users}, group, or project {@link Member | member}.
3
+ * Provides properties and methods for obtaining information about {@link File | file} actions
4
+ * granted to a specific {@link User | users}, or project {@link Member | member}.
5
5
  */
6
6
  export declare class Permission {
7
7
  private _data;
8
8
  fileId: string;
9
9
  httpClient: IHttpClient;
10
10
  /**
11
- * @param data - An object that implements permission data storage.
11
+ * @param data - Raw permission data received from the server.
12
12
  * @param fileId - Owner file ID.
13
- * @param httpClient - Http client.
13
+ * @param httpClient - HTTP client instance used to send REST API requests to the server.
14
14
  */
15
15
  constructor(data: any, fileId: string, httpClient: IHttpClient);
16
16
  private internalGet;
@@ -19,11 +19,11 @@ export declare class Permission {
19
19
  /**
20
20
  * Defines what actions are allowed to be performed on a file with this permission:
21
21
  *
22
- * - `read` - The ability to read file description, geometry data and properties
23
- * - `readSourceFile` - The ability to read source file
24
- * - `write` - The ability to modify file name, description and references
25
- * - `readViewpoint` - The ability to read file viewpoints
26
- * - `createViewpoint` - The ability to create file viewpoints
22
+ * - `read` - The ability to read file description, geometry data and properties.
23
+ * - `readSourceFile` - The ability to read source file.
24
+ * - `write` - The ability to modify file name, description and references.
25
+ * - `readViewpoint` - The ability to read file viewpoints.
26
+ * - `createViewpoint` - The ability to create file viewpoints.
27
27
  */
28
28
  get actions(): string[];
29
29
  set actions(value: string[]);
@@ -53,7 +53,7 @@ export declare class Permission {
53
53
  * @property {string} project.name - Project name.
54
54
  */
55
55
  /**
56
- * A collection of principials that will get access to the file.
56
+ * A list of principials that will get access to the file.
57
57
  */
58
58
  get grantedTo(): any[];
59
59
  set grantedTo(value: any[]);
@@ -63,24 +63,24 @@ export declare class Permission {
63
63
  get public(): boolean;
64
64
  set public(value: boolean);
65
65
  /**
66
- * Refresh permission data.
66
+ * Reloads permission data from the server.
67
67
  */
68
68
  checkout(): Promise<this>;
69
69
  /**
70
- * Update permission data on the server.
70
+ * Updates permission data on the server.
71
71
  *
72
72
  * @param data - Raw permission data.
73
73
  */
74
74
  update(data: any): Promise<this>;
75
75
  /**
76
- * Remove a permission from a file.
76
+ * Removes a permission from the file.
77
77
  *
78
78
  * @returns Returns the raw data of a deleted permission.
79
79
  */
80
80
  delete(): Promise<any>;
81
81
  /**
82
- * Save permission data changes to the server. Call this method to update permission data on
83
- * the server after any changes.
82
+ * Saves permission properties changes to the server. Call this method to update permission
83
+ * data on the server after any property changes.
84
84
  */
85
85
  save(): Promise<this>;
86
86
  }
@@ -3,14 +3,15 @@ import { IShortUserDescription } from "./IUser";
3
3
  import { Role } from "./Role";
4
4
  import { Member } from "./Member";
5
5
  /**
6
- * Projects are used to collaborate on models and track issues.
6
+ * Provides properties and methods for obtaining information about a project on the server and
7
+ * managing its {@link Role | roles}, {@link Member | members} and models.
7
8
  */
8
9
  export declare class Project {
9
10
  private _data;
10
11
  httpClient: IHttpClient;
11
12
  /**
12
- * @param data - An object that implements project data storage.
13
- * @param httpClient - Http client.
13
+ * @param data - Raw project data received from the server.
14
+ * @param httpClient - HTTP client instance used to send REST API requests to the server.
14
15
  */
15
16
  constructor(data: any, httpClient: IHttpClient);
16
17
  protected internalGet(relativePath: string): Promise<Response>;
@@ -20,11 +21,18 @@ export declare class Project {
20
21
  /**
21
22
  * Project features the user has access to.
22
23
  *
23
- * @property {string[]} project_actions - Actions are allowed to be performed: `update`,
24
- * `createTopic`, `createDocument`.
25
24
  * @readonly
26
25
  */
27
- get authorization(): any;
26
+ get authorization(): {
27
+ /**
28
+ * Actions are allowed to be performed:
29
+ *
30
+ * - `update` - The ability to update the project details.
31
+ * - `createTopic` - The ability to create a new topic.
32
+ * - `createDocument` - The ability to create a new document.
33
+ */
34
+ project_actions: string[];
35
+ };
28
36
  /**
29
37
  * Project creation time (UTC) in the format specified in
30
38
  * {@link https://www.wikipedia.org/wiki/ISO_8601 | ISO 8601}.
@@ -100,7 +108,7 @@ export declare class Project {
100
108
  */
101
109
  get previewUrl(): string;
102
110
  /**
103
- * `true` if project is public (shared) project.
111
+ * `true` if project is shared project.
104
112
  */
105
113
  get public(): boolean;
106
114
  set public(value: boolean);
@@ -124,40 +132,40 @@ export declare class Project {
124
132
  */
125
133
  get updatedAt(): string;
126
134
  /**
127
- * Refresh project data.
135
+ * Reloads project data from the server.
128
136
  */
129
137
  checkout(): Promise<this>;
130
138
  /**
131
- * Update project data on the server.
139
+ * Updates project data on the server.
132
140
  *
133
141
  * @param data - Raw project data.
134
142
  */
135
143
  update(data: any): Promise<this>;
136
144
  /**
137
- * Delete the project from the server.
145
+ * Deletes a project from the server.
138
146
  *
139
147
  * @returns Returns the raw data of a deleted project.
140
148
  */
141
149
  delete(): Promise<any>;
142
150
  /**
143
- * Save project data changes to the server. Call this method to update project data on the
144
- * server after any changes.
151
+ * Saves project properties changes to the server. Call this method to update project data on
152
+ * the server after any property changes.
145
153
  */
146
154
  save(): Promise<this>;
147
155
  /**
148
- * Set or remove the project preview.
156
+ * Sets or removes the project preview.
149
157
  *
150
158
  * @param image - Preview image. Can be a
151
159
  * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
152
160
  * string,
153
161
  * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},
154
- * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or Web API
155
- * {@link https://developer.mozilla.org/docs/Web/API/File | File} object. Setting the
156
- * `image` to `null` will remove the preview.
162
+ * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or
163
+ * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting
164
+ * the `image` to `null` will remove the preview.
157
165
  */
158
166
  setPreview(image?: BodyInit | null): Promise<any>;
159
167
  /**
160
- * Remove the project preview.
168
+ * Removes the project preview.
161
169
  */
162
170
  deletePreview(): Promise<this>;
163
171
  /**
@@ -166,13 +174,13 @@ export declare class Project {
166
174
  */
167
175
  getRoles(): Promise<Role[]>;
168
176
  /**
169
- * Returns the role information.
177
+ * Returns information about the specified project role.
170
178
  *
171
179
  * @param name - Role name.
172
180
  */
173
181
  getRole(name: string): Promise<Role>;
174
182
  /**
175
- * Create a new project role.
183
+ * Creates a new project role.
176
184
  *
177
185
  * @param name - Role name.
178
186
  * @param description - Role description.
@@ -181,7 +189,7 @@ export declare class Project {
181
189
  */
182
190
  createRole(name: string, description: string, permissions: any): Promise<Role>;
183
191
  /**
184
- * Delete project role.
192
+ * Deletes the specified project role.
185
193
  *
186
194
  * @param name - Role name.
187
195
  * @returns Returns the raw data of a deleted role.
@@ -192,7 +200,7 @@ export declare class Project {
192
200
  */
193
201
  getMembers(): Promise<Member[]>;
194
202
  /**
195
- * Returns the member information.
203
+ * Returns information about the specified project member.
196
204
  *
197
205
  * @param memberId - Member ID.
198
206
  */
@@ -201,11 +209,11 @@ export declare class Project {
201
209
  * Add a user to the project to become a member and have permission to perform actions.
202
210
  *
203
211
  * @param userId - User ID.
204
- * @param role - User role from the list of project roles.
212
+ * @param role - Role name from the list of project roles.
205
213
  */
206
214
  addMember(userId: string, role: string): Promise<Member>;
207
215
  /**
208
- * Remove a member from a project.
216
+ * Remove the specified member from a project.
209
217
  *
210
218
  * @param memberId - Member ID.
211
219
  * @returns Returns the raw data of a deleted member.
package/lib/Api/Role.d.ts CHANGED
@@ -1,15 +1,16 @@
1
1
  import { IHttpClient } from "./IHttpClient";
2
2
  /**
3
- * A roles determines what permissions {@link User | users} have on a {@link Project | project}.
3
+ * A role determines what actions allowed to be performed by {@link User | users} on a
4
+ * {@link Project | project}.
4
5
  */
5
6
  export declare class Role {
6
7
  private _data;
7
8
  projectId: string;
8
9
  httpClient: IHttpClient;
9
10
  /**
10
- * @param data - An object that implements role data storage.
11
+ * @param data - Raw role data received from the server.
11
12
  * @param projectId - Owner project ID.
12
- * @param httpClient - Http client.
13
+ * @param httpClient - HTTP client instance used to send REST API requests to the server.
13
14
  */
14
15
  constructor(data: any, projectId: string, httpClient: IHttpClient);
15
16
  private internalGet;
@@ -52,24 +53,24 @@ export declare class Role {
52
53
  get permissions(): any;
53
54
  set permissions(value: any);
54
55
  /**
55
- * Refresh role data.
56
+ * Reloads role data from the server.
56
57
  */
57
58
  checkout(): Promise<this>;
58
59
  /**
59
- * Update role data on the server.
60
+ * Updates role data on the server.
60
61
  *
61
62
  * @param data - Raw role data.
62
63
  */
63
64
  update(data: any): Promise<this>;
64
65
  /**
65
- * Delete a role from the project.
66
+ * Deletes a role from the project.
66
67
  *
67
68
  * @returns Returns the raw data of a deleted role.
68
69
  */
69
70
  delete(): Promise<any>;
70
71
  /**
71
- * Save role data changes to the server. Call this method to update role data on the server
72
- * after any changes.
72
+ * Saves role properties changes to the server. Call this method to update role data on the
73
+ * server after any property changes.
73
74
  */
74
75
  save(): Promise<this>;
75
76
  }
package/lib/Api/User.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { IHttpClient } from "./IHttpClient";
2
2
  /**
3
- * The class representing a `user` entity.
3
+ * Provides properties and methods for obtaining information about a server user and manage its data.
4
4
  */
5
5
  export declare class User {
6
6
  private _data;
7
7
  httpClient: IHttpClient;
8
8
  /**
9
- * @param data - An object that implements user data storage.
10
- * @param httpClient - Http client.
9
+ * @param data - Raw user data received from the server.
10
+ * @param httpClient - HTTP client instance used to send REST API requests to the server.
11
11
  */
12
12
  constructor(data: any, httpClient: IHttpClient);
13
13
  /**
@@ -18,7 +18,7 @@ export declare class User {
18
18
  */
19
19
  get avatarUrl(): string;
20
20
  /**
21
- * `true` if user is allowed to create a project.
21
+ * `true` if user is allowed to create a projects.
22
22
  *
23
23
  * Only administrators can change create project permission.
24
24
  */
@@ -115,7 +115,8 @@ export declare class User {
115
115
  get projectsLimit(): number;
116
116
  set projectsLimit(value: number);
117
117
  /**
118
- * The identity provider used to create the account. Can be `ldap`, `oauth`, `saml` or empty.
118
+ * The identity provider used to create the account. Can be `ldap`, `oauth`, `saml` or empty
119
+ * for local accounts.
119
120
  *
120
121
  * @readonly
121
122
  */
@@ -134,8 +135,8 @@ export declare class User {
134
135
  */
135
136
  get storageUsed(): number;
136
137
  /**
137
- * The user's access token (API key). Use {@link signInWithToken | Client.signInWithToken()}
138
- * to log in using token.
138
+ * The user's access token (API key). Use
139
+ * {@link Client.signInWithToken | Client.signInWithToken()} to sign in to the server using this token.
139
140
  *
140
141
  * @readonly
141
142
  */
@@ -146,14 +147,14 @@ export declare class User {
146
147
  get userName(): string;
147
148
  set userName(value: string);
148
149
  /**
149
- * Refresh user data.
150
+ * Reloads user data from the server.
150
151
  *
151
152
  * Only administrators can checkout other users. If the current logged in user is not an
152
153
  * administrator, they can only checkout themselves, otherwise an exception will be thrown.
153
154
  */
154
155
  checkout(): Promise<this>;
155
156
  /**
156
- * Update user data on the server.
157
+ * Updates user data on the server.
157
158
  *
158
159
  * Only administrators can update other users. If the current logged in user is not an
159
160
  * administrator, they can only update themself, otherwise an exception will be thrown.
@@ -162,7 +163,7 @@ export declare class User {
162
163
  */
163
164
  update(data: any): Promise<this>;
164
165
  /**
165
- * Delete a user from the server.
166
+ * Deletes a user from the server.
166
167
  *
167
168
  * Only administrators can delete users. If the current logged in user is not an
168
169
  * administrator, an exception will be thrown.
@@ -170,18 +171,18 @@ export declare class User {
170
171
  * Administrators can delete themselves or other administrators. An administrator can only
171
172
  * delete themself if they is not the last administrator.
172
173
  *
173
- * You need to re-login to continue working after deleting the current logged in user.
174
+ * You need to re-login after deleting the current logged in user.
174
175
  *
175
176
  * @returns Returns the raw data of a deleted user.
176
177
  */
177
178
  delete(): Promise<any>;
178
179
  /**
179
- * Save user data changes to the server. Call this method to update user data on the server
180
- * after any changes.
180
+ * Saves user properties changes to the server. Call this method to update user data on the
181
+ * server after any property changes.
181
182
  */
182
183
  save(): Promise<this>;
183
184
  /**
184
- * Set or remove the user avatar.
185
+ * Sets or removes the user avatar.
185
186
  *
186
187
  * Only administrators can set the avatar of other users. If the current logged in user is
187
188
  * not an administrator, they can only set their avatar, otherwise an exception will be thrown.
@@ -190,26 +191,26 @@ export declare class User {
190
191
  * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}
191
192
  * string,
192
193
  * {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | ArrayBuffer},
193
- * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or Web API
194
- * {@link https://developer.mozilla.org/docs/Web/API/File | File} object. Setting the
195
- * `image` to `null` will remove the avatar.
194
+ * {@link https://developer.mozilla.org/docs/Web/API/Blob/Blob | Blob} or
195
+ * {@link https://developer.mozilla.org/docs/Web/API/File | Web API File} object. Setting
196
+ * the `image` to `null` will remove the avatar.
196
197
  */
197
198
  setAvatar(image?: BodyInit | null): Promise<this>;
198
199
  /**
199
- * Remove the user avatar.
200
+ * Removes the user avatar.
200
201
  *
201
202
  * Only administrators can remove the avatar of other users. If the current logged in user is
202
203
  * not an administrator, they can only remove their avatar, otherwise an exception will be thrown.
203
204
  */
204
205
  deleteAvatar(): Promise<this>;
205
206
  /**
206
- * Change the user password.
207
+ * Changes the user password.
207
208
  *
208
209
  * Only administrators can change the passwords of other users. If the current logged in user
209
210
  * is not an administrator, they can only change their password, otherwise an exception will
210
211
  * be thrown.
211
212
  *
212
- * To change their password, non-administrator users must provide their old password.
213
+ * To change their password, non-administrator users must specify their old password.
213
214
  *
214
215
  * @param newPassword - New user password.
215
216
  * @param oldPassword - Old user password. Only required for non-administrator users to
package/lib/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./Api/ClientEvents";
5
5
  export { File } from "./Api/File";
6
6
  export { FetchError, statusText } from "./Api/FetchError";
7
7
  export { Job } from "./Api/Job";
8
+ export { IModelTransformMatrix } from "./Api/IAssembly";
8
9
  export { Member } from "./Api/Member";
9
10
  export { Model } from "./Api/Model";
10
11
  export { Permission } from "./Api/Permission";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/client",
3
- "version": "25.8.16",
3
+ "version": "25.8.19",
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": "~25.8.16"
29
+ "@inweb/eventemitter2": "~25.8.19"
30
30
  }
31
31
  }