@daocloud-proto/ghippo 0.6.20 → 0.6.23
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/package.json +1 -1
- package/v1alpha1/about.pb.ts +10 -1
- package/v1alpha1/group.pb.ts +17 -11
- package/v1alpha1/message.pb.ts +9 -3
- package/v1alpha1/role.pb.ts +28 -99
- package/v1alpha1/user.pb.ts +20 -3
- package/v1alpha1/workspace.pb.ts +33 -25
package/package.json
CHANGED
package/v1alpha1/about.pb.ts
CHANGED
|
@@ -18,10 +18,13 @@ export type Developer = {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export type ListOpenSourcesRequest = {
|
|
21
|
+
page?: number
|
|
22
|
+
page_size?: number
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export type ListOpenSourcesResponse = {
|
|
24
|
-
|
|
26
|
+
items?: OpenSource[]
|
|
27
|
+
pagination?: Pagination
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
export type OpenSource = {
|
|
@@ -29,6 +32,12 @@ export type OpenSource = {
|
|
|
29
32
|
license?: string
|
|
30
33
|
}
|
|
31
34
|
|
|
35
|
+
export type Pagination = {
|
|
36
|
+
total?: number
|
|
37
|
+
page?: number
|
|
38
|
+
page_size?: number
|
|
39
|
+
}
|
|
40
|
+
|
|
32
41
|
export type ListGProductVersionsRequest = {
|
|
33
42
|
}
|
|
34
43
|
|
package/v1alpha1/group.pb.ts
CHANGED
|
@@ -16,13 +16,19 @@ export type CreateGroupResponse = {
|
|
|
16
16
|
|
|
17
17
|
export type ListGroupsRequest = {
|
|
18
18
|
search?: string
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
page?: number
|
|
20
|
+
page_size?: number
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export type ListGroupsResponse = {
|
|
24
|
+
pagination?: Pagination
|
|
25
|
+
items?: GroupInfo[]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type Pagination = {
|
|
29
|
+
page?: number
|
|
30
|
+
page_size?: number
|
|
24
31
|
total?: number
|
|
25
|
-
groups?: GroupInfo[]
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
export type GroupInfo = {
|
|
@@ -93,28 +99,28 @@ export type UpdateGroupResponse = {
|
|
|
93
99
|
export type ListGroupRolesRequest = {
|
|
94
100
|
id?: string
|
|
95
101
|
search?: string
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
page?: number
|
|
103
|
+
page_size?: number
|
|
98
104
|
type?: string
|
|
99
105
|
authorized?: boolean
|
|
100
106
|
}
|
|
101
107
|
|
|
102
108
|
export type ListGroupRolesResponse = {
|
|
103
|
-
|
|
109
|
+
pagination?: Pagination
|
|
104
110
|
authorized_count?: number
|
|
105
|
-
|
|
111
|
+
items?: RoleInfo[]
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
export type ListGroupSubjectRequest = {
|
|
109
115
|
id?: string
|
|
110
116
|
search?: string
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
page?: number
|
|
118
|
+
page_size?: number
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
export type ListGroupSubjectResponse = {
|
|
116
|
-
|
|
117
|
-
|
|
122
|
+
pagination?: Pagination
|
|
123
|
+
items?: GroupSubject[]
|
|
118
124
|
}
|
|
119
125
|
|
|
120
126
|
export type GroupSubject = {
|
package/v1alpha1/message.pb.ts
CHANGED
|
@@ -16,13 +16,19 @@ export type ListMessagesRequest = {
|
|
|
16
16
|
unreadCount?: boolean
|
|
17
17
|
search?: string
|
|
18
18
|
read?: ReadType
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
page?: number
|
|
20
|
+
page_size?: number
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export type ListMessagesResponse = {
|
|
24
|
+
items?: MessageInfo[]
|
|
25
|
+
pagination?: Pagination
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type Pagination = {
|
|
24
29
|
total?: number
|
|
25
|
-
|
|
30
|
+
page?: number
|
|
31
|
+
page_size?: number
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
export type MessageInfo = {
|
package/v1alpha1/role.pb.ts
CHANGED
|
@@ -6,29 +6,35 @@
|
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
8
|
|
|
9
|
-
export enum
|
|
9
|
+
export enum globalRoleType {
|
|
10
10
|
system = "system",
|
|
11
11
|
custom = "custom",
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export type
|
|
14
|
+
export type Pagination = {
|
|
15
|
+
total?: number
|
|
16
|
+
page?: number
|
|
17
|
+
page_size?: number
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type GlobalRoleInfo = {
|
|
15
21
|
id?: string
|
|
16
22
|
name?: string
|
|
17
|
-
type?:
|
|
23
|
+
type?: globalRoleType
|
|
18
24
|
description?: string
|
|
19
25
|
composite?: boolean
|
|
20
26
|
created_at?: string
|
|
21
27
|
updated_at?: string
|
|
22
28
|
}
|
|
23
29
|
|
|
24
|
-
export type
|
|
30
|
+
export type ListGlobalRolesRequest = {
|
|
31
|
+
page?: number
|
|
32
|
+
page_size?: number
|
|
25
33
|
search?: string
|
|
26
|
-
offset?: number
|
|
27
|
-
size?: number
|
|
28
34
|
}
|
|
29
35
|
|
|
30
|
-
export type
|
|
31
|
-
|
|
36
|
+
export type ListGlobalRolesResponse = {
|
|
37
|
+
items?: GlobalRoleInfo[]
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
export type WorkspaceRoleInfo = {
|
|
@@ -42,81 +48,25 @@ export type WorkspaceRoleInfo = {
|
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
export type ListWorkspaceRolesRequest = {
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
page?: number
|
|
52
|
+
page_size?: number
|
|
47
53
|
}
|
|
48
54
|
|
|
49
55
|
export type ListWorkspaceRolesResponse = {
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
items?: WorkspaceRoleInfo[]
|
|
57
|
+
pagination?: Pagination
|
|
52
58
|
}
|
|
53
59
|
|
|
54
|
-
export type
|
|
60
|
+
export type ListGlobalRoleSubjectsRequest = {
|
|
61
|
+
page?: number
|
|
62
|
+
page_size?: number
|
|
55
63
|
id?: string
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type GetRoleResponse = {
|
|
59
|
-
role?: RoleInfo
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export type CreateRoleRequest = {
|
|
63
|
-
name?: string
|
|
64
|
-
description?: string
|
|
65
|
-
relation_role_id?: string[]
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type CreateRoleResponse = {
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export type UpdateRoleRequest = {
|
|
72
|
-
id?: string
|
|
73
|
-
description?: string
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export type UpdateRoleResponse = {
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export type DeleteRoleRequest = {
|
|
80
|
-
id?: string
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export type DeleteRoleResponse = {
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export type AddRoleCompositeRequest = {
|
|
87
|
-
id?: string
|
|
88
|
-
relation_role_id?: string[]
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export type AddRoleCompositeResponse = {
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export type RemoveRoleCompositeRequest = {
|
|
95
|
-
id?: string
|
|
96
|
-
relation_role_id?: string[]
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export type RemoveRoleCompositeResponse = {
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export type ListRoleCompositeRequest = {
|
|
103
|
-
id?: string
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export type ListRoleCompositeResponse = {
|
|
107
|
-
roles?: RoleInfo[]
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export type ListRoleSubjectsRequest = {
|
|
111
|
-
id?: string
|
|
112
|
-
offset?: number
|
|
113
|
-
size?: number
|
|
114
64
|
search?: string
|
|
115
65
|
}
|
|
116
66
|
|
|
117
|
-
export type
|
|
118
|
-
|
|
119
|
-
|
|
67
|
+
export type ListGlobalRoleSubjectsResponse = {
|
|
68
|
+
items?: Subject[]
|
|
69
|
+
pagination?: Pagination
|
|
120
70
|
}
|
|
121
71
|
|
|
122
72
|
export type Subject = {
|
|
@@ -127,34 +77,13 @@ export type Subject = {
|
|
|
127
77
|
}
|
|
128
78
|
|
|
129
79
|
export class Role {
|
|
130
|
-
static
|
|
131
|
-
return fm.fetchReq<
|
|
80
|
+
static ListGlobalRoles(req: ListGlobalRolesRequest, initReq?: fm.InitReq): Promise<ListGlobalRolesResponse> {
|
|
81
|
+
return fm.fetchReq<ListGlobalRolesRequest, ListGlobalRolesResponse>(`/apis/ghippo.io/v1alpha1/globalroles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
132
82
|
}
|
|
133
83
|
static ListWorkspaceRoles(req: ListWorkspaceRolesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceRolesResponse> {
|
|
134
84
|
return fm.fetchReq<ListWorkspaceRolesRequest, ListWorkspaceRolesResponse>(`/apis/ghippo.io/v1alpha1/workspaceroles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
135
85
|
}
|
|
136
|
-
static
|
|
137
|
-
return fm.fetchReq<
|
|
138
|
-
}
|
|
139
|
-
static CreateRole(req: CreateRoleRequest, initReq?: fm.InitReq): Promise<CreateRoleResponse> {
|
|
140
|
-
return fm.fetchReq<CreateRoleRequest, CreateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
141
|
-
}
|
|
142
|
-
static UpdateRole(req: UpdateRoleRequest, initReq?: fm.InitReq): Promise<UpdateRoleResponse> {
|
|
143
|
-
return fm.fetchReq<UpdateRoleRequest, UpdateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
144
|
-
}
|
|
145
|
-
static DeleteRole(req: DeleteRoleRequest, initReq?: fm.InitReq): Promise<DeleteRoleResponse> {
|
|
146
|
-
return fm.fetchReq<DeleteRoleRequest, DeleteRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
147
|
-
}
|
|
148
|
-
static AddRoleComposite(req: AddRoleCompositeRequest, initReq?: fm.InitReq): Promise<AddRoleCompositeResponse> {
|
|
149
|
-
return fm.fetchReq<AddRoleCompositeRequest, AddRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}/composites`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
150
|
-
}
|
|
151
|
-
static RemoveRoleComposite(req: RemoveRoleCompositeRequest, initReq?: fm.InitReq): Promise<RemoveRoleCompositeResponse> {
|
|
152
|
-
return fm.fetchReq<RemoveRoleCompositeRequest, RemoveRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}/composites`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
153
|
-
}
|
|
154
|
-
static ListRoleComposite(req: ListRoleCompositeRequest, initReq?: fm.InitReq): Promise<ListRoleCompositeResponse> {
|
|
155
|
-
return fm.fetchReq<ListRoleCompositeRequest, ListRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}/composites?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
156
|
-
}
|
|
157
|
-
static ListRoleSubjects(req: ListRoleSubjectsRequest, initReq?: fm.InitReq): Promise<ListRoleSubjectsResponse> {
|
|
158
|
-
return fm.fetchReq<ListRoleSubjectsRequest, ListRoleSubjectsResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
86
|
+
static ListGlobalRoleSubjects(req: ListGlobalRoleSubjectsRequest, initReq?: fm.InitReq): Promise<ListGlobalRoleSubjectsResponse> {
|
|
87
|
+
return fm.fetchReq<ListGlobalRoleSubjectsRequest, ListGlobalRoleSubjectsResponse>(`/apis/ghippo.io/v1alpha1/globalroles/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
159
88
|
}
|
|
160
89
|
}
|
package/v1alpha1/user.pb.ts
CHANGED
|
@@ -7,13 +7,27 @@
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
8
|
export type ListUsersRequest = {
|
|
9
9
|
search?: string
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
page_size?: number
|
|
11
|
+
page?: number
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export type ListUsersResponse = {
|
|
15
|
+
items?: GetUserResponse[]
|
|
16
|
+
pagination?: Pagination
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type Pagination = {
|
|
20
|
+
page?: number
|
|
21
|
+
page_size?: number
|
|
15
22
|
total?: number
|
|
16
|
-
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type CheckUserRequest = {
|
|
26
|
+
username?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type CheckUserResponse = {
|
|
30
|
+
existed?: boolean
|
|
17
31
|
}
|
|
18
32
|
|
|
19
33
|
export type GetUserRequest = {
|
|
@@ -148,6 +162,9 @@ export class Users {
|
|
|
148
162
|
static ListUsers(req: ListUsersRequest, initReq?: fm.InitReq): Promise<ListUsersResponse> {
|
|
149
163
|
return fm.fetchReq<ListUsersRequest, ListUsersResponse>(`/apis/ghippo.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
150
164
|
}
|
|
165
|
+
static CheckUser(req: CheckUserRequest, initReq?: fm.InitReq): Promise<CheckUserResponse> {
|
|
166
|
+
return fm.fetchReq<CheckUserRequest, CheckUserResponse>(`/apis/ghippo.io/v1alpha1/users/check/${req["username"]}?${fm.renderURLSearchParams(req, ["username"])}`, {...initReq, method: "GET"})
|
|
167
|
+
}
|
|
151
168
|
static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
152
169
|
return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
153
170
|
}
|
package/v1alpha1/workspace.pb.ts
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
|
+
export type Pagination = {
|
|
9
|
+
total?: number
|
|
10
|
+
page?: number
|
|
11
|
+
page_size?: number
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
export type WorkspaceInfo = {
|
|
9
15
|
id?: number
|
|
10
16
|
name?: string
|
|
@@ -12,14 +18,13 @@ export type WorkspaceInfo = {
|
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
export type ListWorkspacesRequest = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
all?: boolean
|
|
21
|
+
page?: number
|
|
22
|
+
page_size?: number
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
export type ListWorkspacesResponse = {
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
items?: WorkspaceInfo[]
|
|
27
|
+
pagination?: Pagination
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
export type ResourceInfo = {
|
|
@@ -31,15 +36,15 @@ export type ResourceInfo = {
|
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
export type ListResourcesRequest = {
|
|
39
|
+
page?: number
|
|
40
|
+
page_size?: number
|
|
34
41
|
workspace_id?: number
|
|
35
42
|
gproduct?: string
|
|
36
|
-
size?: number
|
|
37
|
-
offset?: number
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
export type ListResourcesResponse = {
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
items?: ResourceInfo[]
|
|
47
|
+
pagination?: Pagination
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
export type BindResourceToWorkspaceRequest = {
|
|
@@ -54,8 +59,11 @@ export type BindResourceToWorkspaceResponse = {
|
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
export type UnbindResourceFromWorkspaceRequest = {
|
|
62
|
+
workspace_id?: number
|
|
57
63
|
resource_name?: string
|
|
64
|
+
resource_type?: string
|
|
58
65
|
resource_scope?: string
|
|
66
|
+
gproduct?: string
|
|
59
67
|
}
|
|
60
68
|
|
|
61
69
|
export type UnbindResourceFromWorkspaceResponse = {
|
|
@@ -93,14 +101,14 @@ export type MemberRoleWorkspaceInfo = {
|
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
export type ListMembersRolesByWorkspaceRequest = {
|
|
104
|
+
page?: number
|
|
105
|
+
page_size?: number
|
|
96
106
|
workspace_id?: number
|
|
97
|
-
offset?: number
|
|
98
|
-
size?: number
|
|
99
107
|
}
|
|
100
108
|
|
|
101
109
|
export type ListMembersRolesByWorkspaceResponse = {
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
items?: MemberRoleWorkspaceInfo[]
|
|
111
|
+
pagination?: Pagination
|
|
104
112
|
}
|
|
105
113
|
|
|
106
114
|
export type FolderInfo = {
|
|
@@ -110,13 +118,13 @@ export type FolderInfo = {
|
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
export type ListFoldersRequest = {
|
|
113
|
-
|
|
114
|
-
|
|
121
|
+
page?: number
|
|
122
|
+
page_size?: number
|
|
115
123
|
}
|
|
116
124
|
|
|
117
125
|
export type ListFoldersResponse = {
|
|
118
|
-
|
|
119
|
-
|
|
126
|
+
items?: FolderInfo[]
|
|
127
|
+
pagination?: Pagination
|
|
120
128
|
}
|
|
121
129
|
|
|
122
130
|
export type CreateFolderRequest = {
|
|
@@ -179,27 +187,27 @@ export type MemberRoleFolderInfo = {
|
|
|
179
187
|
}
|
|
180
188
|
|
|
181
189
|
export type ListMembersRolesRequest = {
|
|
190
|
+
page?: number
|
|
191
|
+
page_size?: number
|
|
182
192
|
folder_id?: number
|
|
183
193
|
member_name?: string
|
|
184
194
|
member_type?: string
|
|
185
195
|
role_name?: string
|
|
186
|
-
offset?: number
|
|
187
|
-
size?: number
|
|
188
196
|
}
|
|
189
197
|
|
|
190
198
|
export type ListMembersRolesResponse = {
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
items?: MemberRoleFolderInfo[]
|
|
200
|
+
pagination?: Pagination
|
|
193
201
|
}
|
|
194
202
|
|
|
195
203
|
export type ListMembersRolesResourcesRequest = {
|
|
196
|
-
|
|
197
|
-
|
|
204
|
+
page?: number
|
|
205
|
+
page_size?: number
|
|
198
206
|
}
|
|
199
207
|
|
|
200
208
|
export type ListMembersRolesResourcesResponse = {
|
|
201
|
-
|
|
202
|
-
|
|
209
|
+
items?: MemberRoleWorkspaceInfo[]
|
|
210
|
+
pagination?: Pagination
|
|
203
211
|
}
|
|
204
212
|
|
|
205
213
|
export class Workspace {
|