@daocloud-proto/ghippo 0.6.0 → 0.6.5

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.0",
3
+ "version":"0.6.5",
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
+ }
@@ -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 = {
@@ -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
@@ -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,26 +41,89 @@ 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
+ }
65
+
66
+ export type CreateWorkspaceRequest = {
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[]
64
127
  }
65
128
 
66
129
  export class Workspace {
@@ -70,10 +133,28 @@ export class Workspace {
70
133
  static ListWorkspaceResources(req: ListWorkspaceResourcesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceResourcesResponse> {
71
134
  return fm.fetchReq<ListWorkspaceResourcesRequest, ListWorkspaceResourcesResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/resources?${fm.renderURLSearchParams(req, ["workspace_id"])}`, {...initReq, method: "GET"})
72
135
  }
73
- static AddResourceToWorkspace(req: AddResourceToWorkspaceRequest, initReq?: fm.InitReq): Promise<AddResourceToWorkspaceResponse> {
74
- 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)})
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
+ }
145
+ static GetWorkspace(req: GetWorkspaceRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResponse> {
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)})
75
156
  }
76
- static DeleteResourceFromWorkspace(req: DeleteResourceFromWorkspaceRequest, initReq?: fm.InitReq): Promise<DeleteResourceFromWorkspaceResponse> {
77
- return fm.fetchReq<DeleteResourceFromWorkspaceRequest, DeleteResourceFromWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/resources`, {...initReq, method: "PUT", body: JSON.stringify(req)})
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"})
78
159
  }
79
160
  }