@api-client/core 0.4.4 → 0.5.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/build/browser.d.ts +6 -4
- package/build/browser.js +5 -3
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +6 -4
- package/build/index.js +5 -3
- package/build/index.js.map +1 -1
- package/build/src/mocking/ProjectMock.d.ts +1 -1
- package/build/src/mocking/lib/User.d.ts +1 -6
- package/build/src/mocking/lib/User.js +1 -15
- package/build/src/mocking/lib/User.js.map +1 -1
- package/build/src/models/Backend.d.ts +11 -2
- package/build/src/models/Workspace.d.ts +5 -46
- package/build/src/models/Workspace.js +12 -43
- package/build/src/models/Workspace.js.map +1 -1
- package/build/src/models/store/File.d.ts +98 -0
- package/build/src/models/store/File.js +91 -0
- package/build/src/models/store/File.js.map +1 -0
- package/build/src/models/store/Group.d.ts +21 -0
- package/build/src/models/store/Group.js +2 -0
- package/build/src/models/store/Group.js.map +1 -0
- package/build/src/models/store/Permission.d.ts +196 -0
- package/build/src/models/store/Permission.js +221 -0
- package/build/src/models/store/Permission.js.map +1 -0
- package/build/src/models/{User.d.ts → store/User.d.ts} +12 -59
- package/build/src/models/{User.js → store/User.js} +0 -0
- package/build/src/models/store/User.js.map +1 -0
- package/build/src/runtime/store/RouteBuilder.d.ts +1 -0
- package/build/src/runtime/store/RouteBuilder.js +3 -0
- package/build/src/runtime/store/RouteBuilder.js.map +1 -1
- package/build/src/runtime/store/Sdk.d.ts +5 -0
- package/build/src/runtime/store/Sdk.js +8 -0
- package/build/src/runtime/store/Sdk.js.map +1 -1
- package/build/src/runtime/store/SharedSdk.d.ts +9 -0
- package/build/src/runtime/store/SharedSdk.js +35 -0
- package/build/src/runtime/store/SharedSdk.js.map +1 -0
- package/build/src/runtime/store/SpacesSdk.d.ts +17 -5
- package/build/src/runtime/store/SpacesSdk.js +11 -2
- package/build/src/runtime/store/SpacesSdk.js.map +1 -1
- package/build/src/runtime/store/StoreSdkNode.d.ts +2 -0
- package/build/src/runtime/store/StoreSdkNode.js.map +1 -1
- package/build/src/runtime/store/StoreSdkWeb.d.ts +2 -0
- package/build/src/runtime/store/StoreSdkWeb.js.map +1 -1
- package/build/src/runtime/store/UsersSdk.d.ts +1 -1
- package/package.json +1 -1
- package/src/mocking/ProjectMock.ts +1 -1
- package/src/mocking/lib/User.ts +1 -21
- package/src/models/Backend.ts +11 -2
- package/src/models/Workspace.ts +16 -67
- package/src/models/store/File.ts +149 -0
- package/src/models/store/Group.ts +21 -0
- package/src/models/store/Permission.ts +332 -0
- package/src/models/store/User.ts +83 -0
- package/src/runtime/store/RouteBuilder.ts +4 -0
- package/src/runtime/store/Sdk.ts +8 -0
- package/src/runtime/store/SharedSdk.ts +35 -0
- package/src/runtime/store/SpacesSdk.ts +26 -7
- package/src/runtime/store/StoreSdkNode.ts +3 -0
- package/src/runtime/store/StoreSdkWeb.ts +3 -0
- package/src/runtime/store/UsersSdk.ts +1 -1
- package/build/src/models/User.js.map +0 -1
- package/src/models/User.ts +0 -138
package/src/models/User.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
export type AccessControlLevel = 'read' | 'comment' | 'write' | 'admin' | 'owner';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This is used in the communication with the backend to add/change user's access to the resource.
|
|
5
|
-
*/
|
|
6
|
-
export interface IUserAccessOperation {
|
|
7
|
-
/**
|
|
8
|
-
* The user id.
|
|
9
|
-
*/
|
|
10
|
-
uid: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface IUserAccessAddOperation extends IUserAccessOperation {
|
|
14
|
-
op: "add";
|
|
15
|
-
/**
|
|
16
|
-
* The level that the user has access to.
|
|
17
|
-
*/
|
|
18
|
-
value: AccessControlLevel;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface IUserAccessRemoveOperation extends IUserAccessOperation {
|
|
22
|
-
op: "remove";
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type UserAccessOperation = IUserAccessAddOperation | IUserAccessRemoveOperation;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* The definition of an access control.
|
|
29
|
-
* The user may have access to a workspace so this is the object describing the level of the workspace.
|
|
30
|
-
*/
|
|
31
|
-
export interface IAccessControl {
|
|
32
|
-
/**
|
|
33
|
-
* The data store key of the referenced object the user has access to.
|
|
34
|
-
*/
|
|
35
|
-
key: string;
|
|
36
|
-
/**
|
|
37
|
-
* The level that the user has access to.
|
|
38
|
-
*/
|
|
39
|
-
level: AccessControlLevel;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface IEmail {
|
|
43
|
-
/**
|
|
44
|
-
* When available the email of the user.
|
|
45
|
-
*/
|
|
46
|
-
email?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Whether the `email` was verified.
|
|
49
|
-
* Not verified emails should have limited use in the system.
|
|
50
|
-
*/
|
|
51
|
-
verified?: boolean;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface IUserPicture {
|
|
55
|
-
/**
|
|
56
|
-
* When available, the URL to the user's picture image.
|
|
57
|
-
*/
|
|
58
|
-
url?: string;
|
|
59
|
-
/**
|
|
60
|
-
* Alternative to the `imageUrl`. When set it is a data URL value of the image.
|
|
61
|
-
*/
|
|
62
|
-
data?: string;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export const Kind = 'Core#User';
|
|
66
|
-
|
|
67
|
-
interface BaseUser {
|
|
68
|
-
kind: typeof Kind;
|
|
69
|
-
/**
|
|
70
|
-
* Data store key of the user.
|
|
71
|
-
*/
|
|
72
|
-
key: string;
|
|
73
|
-
/**
|
|
74
|
-
* The display name of the user.
|
|
75
|
-
*/
|
|
76
|
-
name: string;
|
|
77
|
-
/**
|
|
78
|
-
* When available the email of the user.
|
|
79
|
-
*/
|
|
80
|
-
email?: IEmail[];
|
|
81
|
-
/**
|
|
82
|
-
* The user picture to render.
|
|
83
|
-
*/
|
|
84
|
-
picture?: IUserPicture;
|
|
85
|
-
/**
|
|
86
|
-
* General purpose tags field.
|
|
87
|
-
*/
|
|
88
|
-
tags?: string[];
|
|
89
|
-
/**
|
|
90
|
-
* Optional user locale information.
|
|
91
|
-
*/
|
|
92
|
-
locale?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Optional metadata related to the auth provider.
|
|
95
|
-
*/
|
|
96
|
-
provider?: unknown;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Represents a user in the system.
|
|
101
|
-
* This can be embedded in various situations like project's revision history,
|
|
102
|
-
* ACL, Authorization, etc.
|
|
103
|
-
*
|
|
104
|
-
* Note, the store implementation may have additional fields that support external
|
|
105
|
-
* identity providers. However, this is not exposed to the user through the API.
|
|
106
|
-
*/
|
|
107
|
-
export interface IUser extends BaseUser {
|
|
108
|
-
/**
|
|
109
|
-
* Optional metadata related to the auth provider.
|
|
110
|
-
*/
|
|
111
|
-
provider?: unknown;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* This object may be created for each user in the system.
|
|
116
|
-
* It describes to which spaces user has access to.
|
|
117
|
-
*/
|
|
118
|
-
export interface IUserSpaces {
|
|
119
|
-
/**
|
|
120
|
-
* The list of access to the spaces for the user.
|
|
121
|
-
*/
|
|
122
|
-
spaces: IAccessControl[];
|
|
123
|
-
/**
|
|
124
|
-
* The data store key of the user that has access to the space.
|
|
125
|
-
* This is also the key of the entry.
|
|
126
|
-
*/
|
|
127
|
-
user: string;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* An abstract user object that contains access information to a space.
|
|
132
|
-
*/
|
|
133
|
-
export interface ISpaceUser extends BaseUser {
|
|
134
|
-
/**
|
|
135
|
-
* The level that the user has access to.
|
|
136
|
-
*/
|
|
137
|
-
level: AccessControlLevel;
|
|
138
|
-
}
|