@inweb/client 27.2.1 → 27.2.3

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.
@@ -52,7 +52,7 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
52
52
  /**
53
53
  * Returns client and server versions.
54
54
  *
55
- * No login is required to obtain the version.
55
+ * No authorization is required to obtain the version.
56
56
  */
57
57
  version(): Promise<{
58
58
  server: string;
@@ -60,7 +60,9 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
60
60
  hash: string;
61
61
  }>;
62
62
  /**
63
- * Registers a new user on the server. No authorization is required to register a new user.
63
+ * Registers a new user on the server.
64
+ *
65
+ * No authorization is required to register a new user.
64
66
  *
65
67
  * @param email - User email. Cannot be empty. Must be unique within the server.
66
68
  * @param password - User password. Cannot be empty. Password can only contain letters (a-z, A-Z),
@@ -73,6 +75,12 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
73
75
  * Resends a Confirmation Email to the new user. If the user's email is already confirmed, an exception
74
76
  * will be thrown.
75
77
  *
78
+ * No authorization is required to register a new user.
79
+ *
80
+ * A user must provide their email and password to resend their own confirmation email. An authorized
81
+ * administrator can resend the email for any user by providing the user's email only; a password is
82
+ * not required.
83
+ *
76
84
  * @param email - User email.
77
85
  * @param password - User password.
78
86
  */
@@ -112,8 +120,9 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
112
120
  */
113
121
  getCurrentUser(): User | null;
114
122
  /**
115
- * Returns the list of server enabled identity providers. No authorization is required to obtain a list
116
- * of providers.
123
+ * Returns the list of server enabled identity providers.
124
+ *
125
+ * No authorization is required to obtain a list of providers.
117
126
  */
118
127
  getIdentityProviders(): Promise<{
119
128
  name: string;
@@ -122,6 +131,9 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
122
131
  /**
123
132
  * Returns the current server settings.
124
133
  *
134
+ * Only administrators can get server settings. If the current logged in user is not an administrator,
135
+ * an exception will be thrown.
136
+ *
125
137
  * @returns Returns an object with server settings. For more information, see
126
138
  * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Settings | Open Cloud Settings API}.
127
139
  */
@@ -218,7 +230,7 @@ export declare class Client extends EventEmitter2<ClientEventMap> {
218
230
  * exception will be thrown.
219
231
  *
220
232
  * @param email - User email. Cannot be empty. Must be unique within the server.
221
- * @param password - User password. Cannot be empty. Password can only contain latin letters (a-z,
233
+ * @param password - User password. Cannot be empty. Password can only contain Latin letters (a-z,
222
234
  * A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
223
235
  * @param params - Additional user data.
224
236
  * @param params.isAdmin - `true` if user is an administrator.
package/lib/Api/User.d.ts CHANGED
@@ -218,7 +218,8 @@ export declare class User extends Endpoint {
218
218
  *
219
219
  * To change their password, non-administrator users must specify their old password.
220
220
  *
221
- * @param newPassword - New user password.
221
+ * @param newPassword - New user password. Cannot be empty. Password can only contain Latin letters
222
+ * (a-z, A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
222
223
  * @param oldPassword - Old user password. Only required for non-administrator users to change their
223
224
  * password.
224
225
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/client",
3
- "version": "27.2.1",
3
+ "version": "27.2.3",
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,7 +26,7 @@
26
26
  "docs": "typedoc"
27
27
  },
28
28
  "dependencies": {
29
- "@inweb/eventemitter2": "~27.2.1"
29
+ "@inweb/eventemitter2": "~27.2.3"
30
30
  },
31
31
  "devDependencies": {
32
32
  "fflate": "^0.8.2"
package/src/Api/Client.ts CHANGED
@@ -94,7 +94,7 @@ export class Client extends EventEmitter2<ClientEventMap> {
94
94
  /**
95
95
  * Returns client and server versions.
96
96
  *
97
- * No login is required to obtain the version.
97
+ * No authorization is required to obtain the version.
98
98
  */
99
99
  version(): Promise<{ server: string; client: string; hash: string }> {
100
100
  return this.httpClient
@@ -108,7 +108,9 @@ export class Client extends EventEmitter2<ClientEventMap> {
108
108
  }
109
109
 
110
110
  /**
111
- * Registers a new user on the server. No authorization is required to register a new user.
111
+ * Registers a new user on the server.
112
+ *
113
+ * No authorization is required to register a new user.
112
114
  *
113
115
  * @param email - User email. Cannot be empty. Must be unique within the server.
114
116
  * @param password - User password. Cannot be empty. Password can only contain letters (a-z, A-Z),
@@ -130,6 +132,12 @@ export class Client extends EventEmitter2<ClientEventMap> {
130
132
  * Resends a Confirmation Email to the new user. If the user's email is already confirmed, an exception
131
133
  * will be thrown.
132
134
  *
135
+ * No authorization is required to register a new user.
136
+ *
137
+ * A user must provide their email and password to resend their own confirmation email. An authorized
138
+ * administrator can resend the email for any user by providing the user's email only; a password is
139
+ * not required.
140
+ *
133
141
  * @param email - User email.
134
142
  * @param password - User password.
135
143
  */
@@ -214,8 +222,9 @@ export class Client extends EventEmitter2<ClientEventMap> {
214
222
  }
215
223
 
216
224
  /**
217
- * Returns the list of server enabled identity providers. No authorization is required to obtain a list
218
- * of providers.
225
+ * Returns the list of server enabled identity providers.
226
+ *
227
+ * No authorization is required to obtain a list of providers.
219
228
  */
220
229
  getIdentityProviders(): Promise<{ name: string; url: string }[]> {
221
230
  return this.httpClient.get("/identity").then((response) => response.json());
@@ -224,6 +233,9 @@ export class Client extends EventEmitter2<ClientEventMap> {
224
233
  /**
225
234
  * Returns the current server settings.
226
235
  *
236
+ * Only administrators can get server settings. If the current logged in user is not an administrator,
237
+ * an exception will be thrown.
238
+ *
227
239
  * @returns Returns an object with server settings. For more information, see
228
240
  * {@link https://cloud.opendesign.com/docs//pages/server/api.html#Settings | Open Cloud Settings API}.
229
241
  */
@@ -391,7 +403,7 @@ export class Client extends EventEmitter2<ClientEventMap> {
391
403
  * exception will be thrown.
392
404
  *
393
405
  * @param email - User email. Cannot be empty. Must be unique within the server.
394
- * @param password - User password. Cannot be empty. Password can only contain latin letters (a-z,
406
+ * @param password - User password. Cannot be empty. Password can only contain Latin letters (a-z,
395
407
  * A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
396
408
  * @param params - Additional user data.
397
409
  * @param params.isAdmin - `true` if user is an administrator.
package/src/Api/User.ts CHANGED
@@ -429,7 +429,8 @@ export class User extends Endpoint {
429
429
  *
430
430
  * To change their password, non-administrator users must specify their old password.
431
431
  *
432
- * @param newPassword - New user password.
432
+ * @param newPassword - New user password. Cannot be empty. Password can only contain Latin letters
433
+ * (a-z, A-Z), numbers (0-9), and special characters (~!@#$%^&*()_-+={}[]<>|/'":;.,?).
433
434
  * @param oldPassword - Old user password. Only required for non-administrator users to change their
434
435
  * password.
435
436
  */