@daocloud-proto/ghippo 0.5.6 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.5.6",
3
+ "version":"0.6.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -0,0 +1,24 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../fetch.pb"
8
+ export type ListDevelopersRequest = {
9
+ }
10
+
11
+ export type ListDevelopersResponse = {
12
+ data?: Developer[]
13
+ }
14
+
15
+ export type Developer = {
16
+ name?: string
17
+ message?: string
18
+ }
19
+
20
+ export class About {
21
+ static ListDevelopers(req: ListDevelopersRequest, initReq?: fm.InitReq): Promise<ListDevelopersResponse> {
22
+ return fm.fetchReq<ListDevelopersRequest, ListDevelopersResponse>(`/apis/ghippo.io/v1alpha1/about/developers?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
23
+ }
24
+ }
@@ -11,6 +11,7 @@ export type CreateGroupRequest = {
11
11
  }
12
12
 
13
13
  export type CreateGroupResponse = {
14
+ id?: string
14
15
  }
15
16
 
16
17
  export type ListGroupsRequest = {
@@ -82,6 +83,7 @@ export type DeleteUserFromGroupResponse = {
82
83
 
83
84
  export type UpdateGroupRequest = {
84
85
  id?: string
86
+ name?: string
85
87
  description?: string
86
88
  }
87
89
 
@@ -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 = {
@@ -25,6 +23,16 @@ export type GetLoginPageVersionResponse = {
25
23
  version?: number
26
24
  }
27
25
 
26
+ export type UpdateLoginPageInfoRequest = {
27
+ platform_name?: string
28
+ copyright?: string
29
+ icon?: string
30
+ favicon?: string
31
+ }
32
+
33
+ export type UpdateLoginPageInfoResponse = {
34
+ }
35
+
28
36
  export class LoginPage {
29
37
  static GetInfo(req: GetLoginPageInfoRequest, initReq?: fm.InitReq): Promise<GetLoginPageInfoResponse> {
30
38
  return fm.fetchReq<GetLoginPageInfoRequest, GetLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -32,4 +40,7 @@ export class LoginPage {
32
40
  static GetVersion(req: GetLoginPageVersionRequest, initReq?: fm.InitReq): Promise<GetLoginPageVersionResponse> {
33
41
  return fm.fetchReq<GetLoginPageVersionRequest, GetLoginPageVersionResponse>(`/apis/ghippo.io/v1alpha1/login-page/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
34
42
  }
43
+ static UpdateInfo(req: UpdateLoginPageInfoRequest, initReq?: fm.InitReq): Promise<UpdateLoginPageInfoResponse> {
44
+ return fm.fetchReq<UpdateLoginPageInfoRequest, UpdateLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info`, {...initReq, method: "PUT", body: JSON.stringify(req)})
45
+ }
35
46
  }
@@ -21,7 +21,7 @@ export type ListMessagesRequest = {
21
21
  }
22
22
 
23
23
  export type ListMessagesResponse = {
24
- total?: string
24
+ total?: number
25
25
  messages?: MessageInfo[]
26
26
  }
27
27
 
@@ -66,6 +66,15 @@ export type SetReadMessagesRequest = {
66
66
  export type SetReadMessagesResponse = {
67
67
  }
68
68
 
69
+ export type GetMessagesCountRequest = {
70
+ }
71
+
72
+ export type GetMessagesCountResponse = {
73
+ total?: number
74
+ readTotal?: number
75
+ unreadTotal?: number
76
+ }
77
+
69
78
  export class Message {
70
79
  static ListMessages(req: ListMessagesRequest, initReq?: fm.InitReq): Promise<ListMessagesResponse> {
71
80
  return fm.fetchReq<ListMessagesRequest, ListMessagesResponse>(`/apis/ghippo.io/v1alpha1/messages?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -82,4 +91,7 @@ export class Message {
82
91
  static SetReadMessages(req: SetReadMessagesRequest, initReq?: fm.InitReq): Promise<SetReadMessagesResponse> {
83
92
  return fm.fetchReq<SetReadMessagesRequest, SetReadMessagesResponse>(`/apis/ghippo.io/v1alpha1/read-messages`, {...initReq, method: "POST", body: JSON.stringify(req)})
84
93
  }
94
+ static GetMessagesCount(req: GetMessagesCountRequest, initReq?: fm.InitReq): Promise<GetMessagesCountResponse> {
95
+ return fm.fetchReq<GetMessagesCountRequest, GetMessagesCountResponse>(`/apis/ghippo.io/v1alpha1/messages/count?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
96
+ }
85
97
  }
@@ -14,7 +14,6 @@ export type ProductNavResponse = {
14
14
 
15
15
  export type ProductNavCategory = {
16
16
  name?: string
17
- locale?: string
18
17
  menus?: ProductMenu[]
19
18
  }
20
19
 
@@ -5,10 +5,16 @@
5
5
  */
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
+
9
+ export enum roleType {
10
+ system = "system",
11
+ custom = "custom",
12
+ }
13
+
8
14
  export type RoleInfo = {
9
15
  id?: string
10
16
  name?: string
11
- type?: string
17
+ type?: roleType
12
18
  description?: string
13
19
  composite?: boolean
14
20
  created_at?: string
@@ -8,7 +8,7 @@ import * as fm from "../fetch.pb"
8
8
  export type SetSmtpServerRequest = {
9
9
  host?: string
10
10
  port?: string
11
- ssl?: string
11
+ ssl?: boolean
12
12
  from?: string
13
13
  user?: string
14
14
  password?: string
@@ -24,7 +24,7 @@ export type GetSmtpServerRequest = {
24
24
  export type GetSmtpServerResponse = {
25
25
  host?: string
26
26
  port?: string
27
- ssl?: string
27
+ ssl?: boolean
28
28
  from?: string
29
29
  user?: string
30
30
  password?: string
@@ -34,7 +34,7 @@ export type GetSmtpServerResponse = {
34
34
  export type SmtpConnTestRequest = {
35
35
  host?: string
36
36
  port?: string
37
- ssl?: string
37
+ ssl?: boolean
38
38
  from?: string
39
39
  user?: string
40
40
  password?: string
@@ -32,6 +32,6 @@ export class TopNavigator {
32
32
  return fm.fetchReq<TopNavRequest, TopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
33
33
  }
34
34
  static UpdateTopNav(req: UpdateTopNavRequest, initReq?: fm.InitReq): Promise<UpdateTopNavResponse> {
35
- return fm.fetchReq<UpdateTopNavRequest, UpdateTopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav`, {...initReq, method: "PATCH", body: JSON.stringify(req)})
35
+ return fm.fetchReq<UpdateTopNavRequest, UpdateTopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav`, {...initReq, method: "PUT", body: JSON.stringify(req)})
36
36
  }
37
37
  }
@@ -5,17 +5,156 @@
5
5
  */
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
- export type GetWorkspaceRequest = {
8
+ export type WorkspaceInfo = {
9
9
  id?: string
10
+ name?: string
11
+ parent_workspace_id?: string
10
12
  }
11
13
 
12
- export type GetWorkspaceResponse = {
13
- id?: string
14
+ export type ResourceInfo = {
15
+ resource_name?: string
16
+ workspace_id?: string
17
+ resource_type?: string
18
+ resource_scope?: string
19
+ gproduct?: string
20
+ }
21
+
22
+ export type ListWorkspacesRequest = {
23
+ size?: number
24
+ offset?: number
25
+ }
26
+
27
+ export type ListWorkspacesResponse = {
28
+ total?: number
29
+ workspaces?: WorkspaceInfo[]
30
+ }
31
+
32
+ export type ListWorkspaceResourcesRequest = {
33
+ workspace_id?: string
34
+ gproduct?: string
35
+ size?: number
36
+ offset?: number
37
+ }
38
+
39
+ export type ListWorkspaceResourcesResponse = {
40
+ total?: number
41
+ resources?: ResourceInfo[]
42
+ }
43
+
44
+ export type BindResourceToWorkspaceRequest = {
45
+ workspace_id?: string
46
+ resource_name?: string
47
+ resource_type?: string
48
+ gproduct?: string
49
+ resource_scope?: string
50
+ }
51
+
52
+ export type BindResourceToWorkspaceResponse = {
53
+ }
54
+
55
+ export type UnbindResourceFromWorkspaceRequest = {
56
+ workspace_id?: string
57
+ resource_name?: string
58
+ resource_type?: string
59
+ gproduct?: string
60
+ resource_scope?: string
61
+ }
62
+
63
+ export type UnbindResourceFromWorkspaceResponse = {
64
+ }
65
+
66
+ export type CreateWorkspaceRequest = {
14
67
  name?: string
68
+ parent_workspace_id?: string
69
+ }
70
+
71
+ export type CreateWorkspaceResponse = {
72
+ }
73
+
74
+ export type GetWorkspaceRequest = {
75
+ workspace_id?: string
76
+ }
77
+
78
+ export type GetWorkspaceResponse = {
79
+ workspace?: WorkspaceInfo
80
+ }
81
+
82
+ export type DeleteWorkspaceRequest = {
83
+ workspace_id?: string
84
+ }
85
+
86
+ export type DeleteWorkspaceResponse = {
87
+ }
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[]
15
127
  }
16
128
 
17
129
  export class Workspace {
130
+ static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
131
+ return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
132
+ }
133
+ static ListWorkspaceResources(req: ListWorkspaceResourcesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceResourcesResponse> {
134
+ return fm.fetchReq<ListWorkspaceResourcesRequest, ListWorkspaceResourcesResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/resources?${fm.renderURLSearchParams(req, ["workspace_id"])}`, {...initReq, method: "GET"})
135
+ }
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)})
138
+ }
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)})
141
+ }
142
+ static CreateWorkspace(req: CreateWorkspaceRequest, initReq?: fm.InitReq): Promise<CreateWorkspaceResponse> {
143
+ return fm.fetchReq<CreateWorkspaceRequest, CreateWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces`, {...initReq, method: "POST", body: JSON.stringify(req)})
144
+ }
18
145
  static GetWorkspace(req: GetWorkspaceRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResponse> {
19
- return fm.fetchReq<GetWorkspaceRequest, GetWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
146
+ return fm.fetchReq<GetWorkspaceRequest, GetWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}?${fm.renderURLSearchParams(req, ["workspace_id"])}`, {...initReq, method: "GET"})
147
+ }
148
+ static DeleteWorkspace(req: DeleteWorkspaceRequest, initReq?: fm.InitReq): Promise<DeleteWorkspaceResponse> {
149
+ return fm.fetchReq<DeleteWorkspaceRequest, DeleteWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}`, {...initReq, method: "DELETE"})
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"})
20
159
  }
21
160
  }