@inweb/client 25.4.4 → 25.4.7
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 +8 -2
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +5 -2
- package/dist/client.module.js.map +1 -1
- package/lib/Api/User.d.ts +4 -30
- package/package.json +2 -2
- package/src/Api/User.ts +7 -37
package/lib/Api/User.d.ts
CHANGED
|
@@ -1,34 +1,4 @@
|
|
|
1
1
|
import { IHttpClient } from "./IHttpClient";
|
|
2
|
-
export interface UserParams {
|
|
3
|
-
/**
|
|
4
|
-
* `true` if user is an administrator
|
|
5
|
-
*/
|
|
6
|
-
isAdmin?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* User name
|
|
9
|
-
*/
|
|
10
|
-
userName?: string;
|
|
11
|
-
/**
|
|
12
|
-
* First name
|
|
13
|
-
*/
|
|
14
|
-
firstName?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Last name
|
|
17
|
-
*/
|
|
18
|
-
lastName?: string;
|
|
19
|
-
/**
|
|
20
|
-
* `true` if user is allowed to create a project
|
|
21
|
-
*/
|
|
22
|
-
canCreateProject?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* The maximum number of projects that the user can create
|
|
25
|
-
*/
|
|
26
|
-
projectsLimit?: number;
|
|
27
|
-
/**
|
|
28
|
-
* The size of the file storage available to the user
|
|
29
|
-
*/
|
|
30
|
-
storageLimit?: number;
|
|
31
|
-
}
|
|
32
2
|
/**
|
|
33
3
|
* The class representing a `user` entity.
|
|
34
4
|
*/
|
|
@@ -104,6 +74,10 @@ export declare class User {
|
|
|
104
74
|
* and last names are empty, returns the first letter of the user name.
|
|
105
75
|
*/
|
|
106
76
|
get initials(): string;
|
|
77
|
+
/**
|
|
78
|
+
* `true` if user is has an administrator rights.
|
|
79
|
+
*/
|
|
80
|
+
get isAdmin(): boolean;
|
|
107
81
|
/**
|
|
108
82
|
* `false` if the user has not yet confirmed his email address.
|
|
109
83
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/client",
|
|
3
|
-
"version": "25.4.
|
|
3
|
+
"version": "25.4.7",
|
|
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
|
"ts-docs": "typedoc"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@inweb/eventemitter2": "~25.4.
|
|
29
|
+
"@inweb/eventemitter2": "~25.4.7"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/Api/User.ts
CHANGED
|
@@ -24,43 +24,6 @@
|
|
|
24
24
|
import { IHttpClient } from "./IHttpClient";
|
|
25
25
|
import { userFullName, userInitials } from "./Utils";
|
|
26
26
|
|
|
27
|
-
export interface UserParams {
|
|
28
|
-
/**
|
|
29
|
-
* `true` if user is an administrator
|
|
30
|
-
*/
|
|
31
|
-
isAdmin?: boolean;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* User name
|
|
35
|
-
*/
|
|
36
|
-
userName?: string;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* First name
|
|
40
|
-
*/
|
|
41
|
-
firstName?: string;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Last name
|
|
45
|
-
*/
|
|
46
|
-
lastName?: string;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* `true` if user is allowed to create a project
|
|
50
|
-
*/
|
|
51
|
-
canCreateProject?: boolean;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* The maximum number of projects that the user can create
|
|
55
|
-
*/
|
|
56
|
-
projectsLimit?: number;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The size of the file storage available to the user
|
|
60
|
-
*/
|
|
61
|
-
storageLimit?: number;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
27
|
/**
|
|
65
28
|
* The class representing a `user` entity.
|
|
66
29
|
*/
|
|
@@ -187,6 +150,13 @@ export class User {
|
|
|
187
150
|
return this.data.initials;
|
|
188
151
|
}
|
|
189
152
|
|
|
153
|
+
/**
|
|
154
|
+
* `true` if user is has an administrator rights.
|
|
155
|
+
*/
|
|
156
|
+
get isAdmin(): boolean {
|
|
157
|
+
return this.data.isAdmin;
|
|
158
|
+
}
|
|
159
|
+
|
|
190
160
|
/**
|
|
191
161
|
* `false` if the user has not yet confirmed his email address.
|
|
192
162
|
*
|