@daocloud-proto/ghippo 0.6.22 → 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/role.pb.ts +17 -88
package/package.json
CHANGED
package/v1alpha1/role.pb.ts
CHANGED
|
@@ -11,6 +11,12 @@ export enum globalRoleType {
|
|
|
11
11
|
custom = "custom",
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
export type Pagination = {
|
|
15
|
+
total?: number
|
|
16
|
+
page?: number
|
|
17
|
+
page_size?: number
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
export type GlobalRoleInfo = {
|
|
15
21
|
id?: string
|
|
16
22
|
name?: string
|
|
@@ -22,13 +28,13 @@ export type GlobalRoleInfo = {
|
|
|
22
28
|
}
|
|
23
29
|
|
|
24
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
36
|
export type ListGlobalRolesResponse = {
|
|
31
|
-
|
|
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
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export type GetGlobalRoleRequest = {
|
|
55
|
-
id?: string
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type GetGlobalRoleResponse = {
|
|
59
|
-
role?: GlobalRoleInfo
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export type CreateGlobalRoleRequest = {
|
|
63
|
-
name?: string
|
|
64
|
-
description?: string
|
|
65
|
-
relation_role_id?: string[]
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type CreateGlobalRoleResponse = {
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export type UpdateGlobalRoleRequest = {
|
|
72
|
-
id?: string
|
|
73
|
-
description?: string
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export type UpdateGlobalRoleResponse = {
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export type DeleteGlobalRoleRequest = {
|
|
80
|
-
id?: string
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export type DeleteGlobalRoleResponse = {
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export type AddGlobalRoleCompositeRequest = {
|
|
87
|
-
id?: string
|
|
88
|
-
relation_role_id?: string[]
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export type AddGlobalRoleCompositeResponse = {
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export type RemoveGlobalRoleCompositeRequest = {
|
|
95
|
-
id?: string
|
|
96
|
-
relation_role_id?: string[]
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export type RemoveGlobalRoleCompositeResponse = {
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export type ListGlobalRoleCompositeRequest = {
|
|
103
|
-
id?: string
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export type ListGlobalRoleCompositeResponse = {
|
|
107
|
-
roles?: GlobalRoleInfo[]
|
|
56
|
+
items?: WorkspaceRoleInfo[]
|
|
57
|
+
pagination?: Pagination
|
|
108
58
|
}
|
|
109
59
|
|
|
110
60
|
export type ListGlobalRoleSubjectsRequest = {
|
|
61
|
+
page?: number
|
|
62
|
+
page_size?: number
|
|
111
63
|
id?: string
|
|
112
|
-
offset?: number
|
|
113
|
-
size?: number
|
|
114
64
|
search?: string
|
|
115
65
|
}
|
|
116
66
|
|
|
117
67
|
export type ListGlobalRoleSubjectsResponse = {
|
|
118
|
-
|
|
119
|
-
|
|
68
|
+
items?: Subject[]
|
|
69
|
+
pagination?: Pagination
|
|
120
70
|
}
|
|
121
71
|
|
|
122
72
|
export type Subject = {
|
|
@@ -133,27 +83,6 @@ export class Role {
|
|
|
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 GetGlobalRole(req: GetGlobalRoleRequest, initReq?: fm.InitReq): Promise<GetGlobalRoleResponse> {
|
|
137
|
-
return fm.fetchReq<GetGlobalRoleRequest, GetGlobalRoleResponse>(`/apis/ghippo.io/v1alpha1/globalrole/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
138
|
-
}
|
|
139
|
-
static CreateGlobalRole(req: CreateGlobalRoleRequest, initReq?: fm.InitReq): Promise<CreateGlobalRoleResponse> {
|
|
140
|
-
return fm.fetchReq<CreateGlobalRoleRequest, CreateGlobalRoleResponse>(`/apis/ghippo.io/v1alpha1/globalrole`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
141
|
-
}
|
|
142
|
-
static UpdateGlobalRole(req: UpdateGlobalRoleRequest, initReq?: fm.InitReq): Promise<UpdateGlobalRoleResponse> {
|
|
143
|
-
return fm.fetchReq<UpdateGlobalRoleRequest, UpdateGlobalRoleResponse>(`/apis/ghippo.io/v1alpha1/globalrole/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
144
|
-
}
|
|
145
|
-
static DeleteGlobalRole(req: DeleteGlobalRoleRequest, initReq?: fm.InitReq): Promise<DeleteGlobalRoleResponse> {
|
|
146
|
-
return fm.fetchReq<DeleteGlobalRoleRequest, DeleteGlobalRoleResponse>(`/apis/ghippo.io/v1alpha1/globalrole/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
147
|
-
}
|
|
148
|
-
static AddGlobalRoleComposite(req: AddGlobalRoleCompositeRequest, initReq?: fm.InitReq): Promise<AddGlobalRoleCompositeResponse> {
|
|
149
|
-
return fm.fetchReq<AddGlobalRoleCompositeRequest, AddGlobalRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/globalrole/${req["id"]}/composites`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
150
|
-
}
|
|
151
|
-
static RemoveGlobalRoleComposite(req: RemoveGlobalRoleCompositeRequest, initReq?: fm.InitReq): Promise<RemoveGlobalRoleCompositeResponse> {
|
|
152
|
-
return fm.fetchReq<RemoveGlobalRoleCompositeRequest, RemoveGlobalRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/globalrole/${req["id"]}/composites`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
153
|
-
}
|
|
154
|
-
static ListGlobalRoleComposite(req: ListGlobalRoleCompositeRequest, initReq?: fm.InitReq): Promise<ListGlobalRoleCompositeResponse> {
|
|
155
|
-
return fm.fetchReq<ListGlobalRoleCompositeRequest, ListGlobalRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/globalrole/${req["id"]}/composites?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
156
|
-
}
|
|
157
86
|
static ListGlobalRoleSubjects(req: ListGlobalRoleSubjectsRequest, initReq?: fm.InitReq): Promise<ListGlobalRoleSubjectsResponse> {
|
|
158
87
|
return fm.fetchReq<ListGlobalRoleSubjectsRequest, ListGlobalRoleSubjectsResponse>(`/apis/ghippo.io/v1alpha1/globalroles/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
159
88
|
}
|