@daocloud-proto/ghippo 0.6.24 → 0.6.25

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.6.24",
3
+ "version":"0.6.25",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -53,13 +53,13 @@ export type DeleteGroupResponse = {
53
53
  export type GroupMembersRequest = {
54
54
  id?: string
55
55
  search?: string
56
- offset?: number
57
- size?: number
56
+ page?: number
57
+ page_size?: number
58
58
  }
59
59
 
60
60
  export type GroupMembersResponse = {
61
- total?: number
62
- user?: User[]
61
+ pagination?: Pagination
62
+ items?: User[]
63
63
  }
64
64
 
65
65
  export type User = {
@@ -35,6 +35,7 @@ export type ListGlobalRolesRequest = {
35
35
 
36
36
  export type ListGlobalRolesResponse = {
37
37
  items?: GlobalRoleInfo[]
38
+ pagination?: Pagination
38
39
  }
39
40
 
40
41
  export type WorkspaceRoleInfo = {
@@ -57,6 +58,22 @@ export type ListWorkspaceRolesResponse = {
57
58
  pagination?: Pagination
58
59
  }
59
60
 
61
+ export type GetGlobalRoleRequest = {
62
+ id?: string
63
+ }
64
+
65
+ export type GetGlobalRoleResponse = {
66
+ role?: GlobalRoleInfo
67
+ }
68
+
69
+ export type UpdateGlobalRoleRequest = {
70
+ id?: string
71
+ description?: string
72
+ }
73
+
74
+ export type UpdateGlobalRoleResponse = {
75
+ }
76
+
60
77
  export type ListGlobalRoleSubjectsRequest = {
61
78
  page?: number
62
79
  page_size?: number
@@ -83,6 +100,12 @@ export class Role {
83
100
  static ListWorkspaceRoles(req: ListWorkspaceRolesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceRolesResponse> {
84
101
  return fm.fetchReq<ListWorkspaceRolesRequest, ListWorkspaceRolesResponse>(`/apis/ghippo.io/v1alpha1/workspaceroles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
85
102
  }
103
+ static GetGlobalRole(req: GetGlobalRoleRequest, initReq?: fm.InitReq): Promise<GetGlobalRoleResponse> {
104
+ return fm.fetchReq<GetGlobalRoleRequest, GetGlobalRoleResponse>(`/apis/ghippo.io/v1alpha1/globalrole/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
105
+ }
106
+ static UpdateGlobalRole(req: UpdateGlobalRoleRequest, initReq?: fm.InitReq): Promise<UpdateGlobalRoleResponse> {
107
+ return fm.fetchReq<UpdateGlobalRoleRequest, UpdateGlobalRoleResponse>(`/apis/ghippo.io/v1alpha1/globalrole/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
108
+ }
86
109
  static ListGlobalRoleSubjects(req: ListGlobalRoleSubjectsRequest, initReq?: fm.InitReq): Promise<ListGlobalRoleSubjectsResponse> {
87
110
  return fm.fetchReq<ListGlobalRoleSubjectsRequest, ListGlobalRoleSubjectsResponse>(`/apis/ghippo.io/v1alpha1/globalroles/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
88
111
  }
@@ -100,7 +100,7 @@ export type ListUserGroupsRequest = {
100
100
 
101
101
  export type ListUserGroupsResponse = {
102
102
  pagination?: Pagination
103
- data?: Group[]
103
+ items?: Group[]
104
104
  }
105
105
 
106
106
  export type ListUserRolesRequest = {
@@ -138,7 +138,7 @@ export type ListUserSubjectRequest = {
138
138
 
139
139
  export type ListUserSubjectResponse = {
140
140
  pagination?: Pagination
141
- subjects?: UserSubject[]
141
+ items?: UserSubject[]
142
142
  }
143
143
 
144
144
  export type UserSubject = {