@daocloud-proto/ghippo 0.6.1 → 0.6.6

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.1",
3
+ "version":"0.6.6",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -12,10 +12,8 @@ export type GetLoginPageInfoResponse = {
12
12
  version?: number
13
13
  platform_name?: string
14
14
  copyright?: string
15
- icon?: Uint8Array
16
- icon_filename?: string
17
- favicon?: Uint8Array
18
- favicon_filename?: string
15
+ icon?: string
16
+ favicon?: string
19
17
  }
20
18
 
21
19
  export type GetLoginPageVersionRequest = {
@@ -28,8 +26,8 @@ export type GetLoginPageVersionResponse = {
28
26
  export type UpdateLoginPageInfoRequest = {
29
27
  platform_name?: string
30
28
  copyright?: string
31
- icon?: Uint8Array
32
- favicon?: Uint8Array
29
+ icon?: string
30
+ favicon?: string
33
31
  }
34
32
 
35
33
  export type UpdateLoginPageInfoResponse = {
@@ -6,14 +6,14 @@
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
8
  export type WorkspaceInfo = {
9
- id?: number
9
+ id?: string
10
10
  name?: string
11
- parent_workspace_id?: number
11
+ parent_workspace_id?: string
12
12
  }
13
13
 
14
14
  export type ResourceInfo = {
15
15
  resource_name?: string
16
- workspace_id?: number
16
+ workspace_id?: string
17
17
  resource_type?: string
18
18
  resource_scope?: string
19
19
  gproduct?: string
@@ -30,7 +30,7 @@ export type ListWorkspacesResponse = {
30
30
  }
31
31
 
32
32
  export type ListWorkspaceResourcesRequest = {
33
- workspace_id?: number
33
+ workspace_id?: string
34
34
  gproduct?: string
35
35
  size?: number
36
36
  offset?: number
@@ -41,38 +41,38 @@ export type ListWorkspaceResourcesResponse = {
41
41
  resources?: ResourceInfo[]
42
42
  }
43
43
 
44
- export type AddResourceToWorkspaceRequest = {
45
- workspace_id?: number
44
+ export type BindResourceToWorkspaceRequest = {
45
+ workspace_id?: string
46
46
  resource_name?: string
47
47
  resource_type?: string
48
48
  gproduct?: string
49
49
  resource_scope?: string
50
50
  }
51
51
 
52
- export type AddResourceToWorkspaceResponse = {
52
+ export type BindResourceToWorkspaceResponse = {
53
53
  }
54
54
 
55
- export type DeleteResourceFromWorkspaceRequest = {
56
- workspace_id?: number
55
+ export type UnbindResourceFromWorkspaceRequest = {
56
+ workspace_id?: string
57
57
  resource_name?: string
58
58
  resource_type?: string
59
59
  gproduct?: string
60
60
  resource_scope?: string
61
61
  }
62
62
 
63
- export type DeleteResourceFromWorkspaceResponse = {
63
+ export type UnbindResourceFromWorkspaceResponse = {
64
64
  }
65
65
 
66
66
  export type CreateWorkspaceRequest = {
67
67
  name?: string
68
- parent_workspace_id?: number
68
+ parent_workspace_id?: string
69
69
  }
70
70
 
71
71
  export type CreateWorkspaceResponse = {
72
72
  }
73
73
 
74
74
  export type GetWorkspaceRequest = {
75
- workspace_id?: number
75
+ workspace_id?: string
76
76
  }
77
77
 
78
78
  export type GetWorkspaceResponse = {
@@ -80,12 +80,52 @@ export type GetWorkspaceResponse = {
80
80
  }
81
81
 
82
82
  export type DeleteWorkspaceRequest = {
83
- workspace_id?: number
83
+ workspace_id?: string
84
84
  }
85
85
 
86
86
  export type DeleteWorkspaceResponse = {
87
87
  }
88
88
 
89
+ export type AuthorizeRequest = {
90
+ workspace_id?: string
91
+ role_name?: string
92
+ member_name?: string
93
+ member_type?: string
94
+ }
95
+
96
+ export type AuthorizeResponse = {
97
+ }
98
+
99
+ export type DeauthorizeRequest = {
100
+ workspace_id?: string
101
+ role_name?: string
102
+ member_name?: string
103
+ member_type?: string
104
+ }
105
+
106
+ export type DeauthorizeResponse = {
107
+ }
108
+
109
+ export type MemberRoleWorkspaceInfo = {
110
+ member_name?: string
111
+ member_type?: string
112
+ role_name?: string
113
+ workspace_id?: string
114
+ }
115
+
116
+ export type ListMembersRolesWorkspacesRequest = {
117
+ member_name?: string
118
+ member_type?: string
119
+ role_name?: string
120
+ offset?: number
121
+ size?: number
122
+ }
123
+
124
+ export type ListMembersRolesWorkspacesResponse = {
125
+ total?: number
126
+ members_roles_workspaces?: MemberRoleWorkspaceInfo[]
127
+ }
128
+
89
129
  export class Workspace {
90
130
  static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
91
131
  return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -93,11 +133,11 @@ export class Workspace {
93
133
  static ListWorkspaceResources(req: ListWorkspaceResourcesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceResourcesResponse> {
94
134
  return fm.fetchReq<ListWorkspaceResourcesRequest, ListWorkspaceResourcesResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/resources?${fm.renderURLSearchParams(req, ["workspace_id"])}`, {...initReq, method: "GET"})
95
135
  }
96
- static AddResourceToWorkspace(req: AddResourceToWorkspaceRequest, initReq?: fm.InitReq): Promise<AddResourceToWorkspaceResponse> {
97
- return fm.fetchReq<AddResourceToWorkspaceRequest, AddResourceToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/resources`, {...initReq, method: "POST", body: JSON.stringify(req)})
136
+ static BindResourceToWorkspace(req: BindResourceToWorkspaceRequest, initReq?: fm.InitReq): Promise<BindResourceToWorkspaceResponse> {
137
+ return fm.fetchReq<BindResourceToWorkspaceRequest, BindResourceToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/resources`, {...initReq, method: "POST", body: JSON.stringify(req)})
98
138
  }
99
- static DeleteResourceFromWorkspace(req: DeleteResourceFromWorkspaceRequest, initReq?: fm.InitReq): Promise<DeleteResourceFromWorkspaceResponse> {
100
- return fm.fetchReq<DeleteResourceFromWorkspaceRequest, DeleteResourceFromWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/resources`, {...initReq, method: "PUT", body: JSON.stringify(req)})
139
+ static UnbindResourceFromWorkspace(req: UnbindResourceFromWorkspaceRequest, initReq?: fm.InitReq): Promise<UnbindResourceFromWorkspaceResponse> {
140
+ return fm.fetchReq<UnbindResourceFromWorkspaceRequest, UnbindResourceFromWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/resources`, {...initReq, method: "PUT", body: JSON.stringify(req)})
101
141
  }
102
142
  static CreateWorkspace(req: CreateWorkspaceRequest, initReq?: fm.InitReq): Promise<CreateWorkspaceResponse> {
103
143
  return fm.fetchReq<CreateWorkspaceRequest, CreateWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces`, {...initReq, method: "POST", body: JSON.stringify(req)})
@@ -108,4 +148,13 @@ export class Workspace {
108
148
  static DeleteWorkspace(req: DeleteWorkspaceRequest, initReq?: fm.InitReq): Promise<DeleteWorkspaceResponse> {
109
149
  return fm.fetchReq<DeleteWorkspaceRequest, DeleteWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}`, {...initReq, method: "DELETE"})
110
150
  }
151
+ static Authorize(req: AuthorizeRequest, initReq?: fm.InitReq): Promise<AuthorizeResponse> {
152
+ return fm.fetchReq<AuthorizeRequest, AuthorizeResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/authorize`, {...initReq, method: "POST", body: JSON.stringify(req)})
153
+ }
154
+ static Deauthorize(req: DeauthorizeRequest, initReq?: fm.InitReq): Promise<DeauthorizeResponse> {
155
+ return fm.fetchReq<DeauthorizeRequest, DeauthorizeResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/deauthorize`, {...initReq, method: "PUT", body: JSON.stringify(req)})
156
+ }
157
+ static ListMembersRolesWorkspaces(req: ListMembersRolesWorkspacesRequest, initReq?: fm.InitReq): Promise<ListMembersRolesWorkspacesResponse> {
158
+ return fm.fetchReq<ListMembersRolesWorkspacesRequest, ListMembersRolesWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/members-roles-workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
159
+ }
111
160
  }