@daocloud-proto/ghippo 0.5.5 → 0.6.1
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/about.pb.ts +24 -0
- package/v1alpha1/group.pb.ts +65 -0
- package/v1alpha1/{loginPage.pb.ts → loginpage.pb.ts} +13 -0
- package/v1alpha1/message.pb.ts +13 -1
- package/v1alpha1/productnav.pb.ts +0 -1
- package/v1alpha1/role.pb.ts +28 -1
- package/v1alpha1/smtpsetting.pb.ts +3 -3
- package/v1alpha1/topnav.pb.ts +13 -0
- package/v1alpha1/user.pb.ts +63 -0
- package/v1alpha1/workspace.pb.ts +94 -4
package/package.json
CHANGED
|
@@ -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
|
+
}
|
package/v1alpha1/group.pb.ts
CHANGED
|
@@ -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,12 +83,67 @@ 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
|
|
|
88
90
|
export type UpdateGroupResponse = {
|
|
89
91
|
}
|
|
90
92
|
|
|
93
|
+
export type ListGroupRolesRequest = {
|
|
94
|
+
id?: string
|
|
95
|
+
search?: string
|
|
96
|
+
offset?: number
|
|
97
|
+
size?: number
|
|
98
|
+
type?: string
|
|
99
|
+
authorized?: boolean
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type ListGroupRolesResponse = {
|
|
103
|
+
total?: number
|
|
104
|
+
authorized_count?: number
|
|
105
|
+
roles?: RoleInfo[]
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type ListGroupSubjectRequest = {
|
|
109
|
+
id?: string
|
|
110
|
+
search?: string
|
|
111
|
+
offset?: number
|
|
112
|
+
size?: number
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type ListGroupSubjectResponse = {
|
|
116
|
+
total?: number
|
|
117
|
+
subjects?: GroupSubject[]
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type GroupSubject = {
|
|
121
|
+
id?: string
|
|
122
|
+
role_id?: string
|
|
123
|
+
type?: string
|
|
124
|
+
name?: string
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type UpdateGroupRolesRequest = {
|
|
128
|
+
id?: string
|
|
129
|
+
add_roles?: string[]
|
|
130
|
+
remove_roles?: string[]
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type UpdateGroupRolesResponse = {
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type RoleInfo = {
|
|
137
|
+
id?: string
|
|
138
|
+
name?: string
|
|
139
|
+
type?: string
|
|
140
|
+
description?: string
|
|
141
|
+
composite?: boolean
|
|
142
|
+
created_at?: string
|
|
143
|
+
updated_at?: string
|
|
144
|
+
authorized?: boolean
|
|
145
|
+
}
|
|
146
|
+
|
|
91
147
|
export class Group {
|
|
92
148
|
static CreateGroup(req: CreateGroupRequest, initReq?: fm.InitReq): Promise<CreateGroupResponse> {
|
|
93
149
|
return fm.fetchReq<CreateGroupRequest, CreateGroupResponse>(`/apis/ghippo.io/v1alpha1/groups`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
@@ -113,4 +169,13 @@ export class Group {
|
|
|
113
169
|
static DeleteUserFromGroup(req: DeleteUserFromGroupRequest, initReq?: fm.InitReq): Promise<DeleteUserFromGroupResponse> {
|
|
114
170
|
return fm.fetchReq<DeleteUserFromGroupRequest, DeleteUserFromGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/members/${req["user_id"]}`, {...initReq, method: "DELETE"})
|
|
115
171
|
}
|
|
172
|
+
static ListGroupRoles(req: ListGroupRolesRequest, initReq?: fm.InitReq): Promise<ListGroupRolesResponse> {
|
|
173
|
+
return fm.fetchReq<ListGroupRolesRequest, ListGroupRolesResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/roles?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
174
|
+
}
|
|
175
|
+
static ListGroupSubjects(req: ListGroupSubjectRequest, initReq?: fm.InitReq): Promise<ListGroupSubjectResponse> {
|
|
176
|
+
return fm.fetchReq<ListGroupSubjectRequest, ListGroupSubjectResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
177
|
+
}
|
|
178
|
+
static UpdateGroupRoles(req: UpdateGroupRolesRequest, initReq?: fm.InitReq): Promise<UpdateGroupRolesResponse> {
|
|
179
|
+
return fm.fetchReq<UpdateGroupRolesRequest, UpdateGroupRolesResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
180
|
+
}
|
|
116
181
|
}
|
|
@@ -25,6 +25,16 @@ export type GetLoginPageVersionResponse = {
|
|
|
25
25
|
version?: number
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
export type UpdateLoginPageInfoRequest = {
|
|
29
|
+
platform_name?: string
|
|
30
|
+
copyright?: string
|
|
31
|
+
icon?: Uint8Array
|
|
32
|
+
favicon?: Uint8Array
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type UpdateLoginPageInfoResponse = {
|
|
36
|
+
}
|
|
37
|
+
|
|
28
38
|
export class LoginPage {
|
|
29
39
|
static GetInfo(req: GetLoginPageInfoRequest, initReq?: fm.InitReq): Promise<GetLoginPageInfoResponse> {
|
|
30
40
|
return fm.fetchReq<GetLoginPageInfoRequest, GetLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -32,4 +42,7 @@ export class LoginPage {
|
|
|
32
42
|
static GetVersion(req: GetLoginPageVersionRequest, initReq?: fm.InitReq): Promise<GetLoginPageVersionResponse> {
|
|
33
43
|
return fm.fetchReq<GetLoginPageVersionRequest, GetLoginPageVersionResponse>(`/apis/ghippo.io/v1alpha1/login-page/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
34
44
|
}
|
|
45
|
+
static UpdateInfo(req: UpdateLoginPageInfoRequest, initReq?: fm.InitReq): Promise<UpdateLoginPageInfoResponse> {
|
|
46
|
+
return fm.fetchReq<UpdateLoginPageInfoRequest, UpdateLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
47
|
+
}
|
|
35
48
|
}
|
package/v1alpha1/message.pb.ts
CHANGED
|
@@ -21,7 +21,7 @@ export type ListMessagesRequest = {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export type ListMessagesResponse = {
|
|
24
|
-
total?:
|
|
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
|
}
|
package/v1alpha1/role.pb.ts
CHANGED
|
@@ -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?:
|
|
17
|
+
type?: roleType
|
|
12
18
|
description?: string
|
|
13
19
|
composite?: boolean
|
|
14
20
|
created_at?: string
|
|
@@ -81,6 +87,24 @@ export type ListRoleCompositeResponse = {
|
|
|
81
87
|
roles?: RoleInfo[]
|
|
82
88
|
}
|
|
83
89
|
|
|
90
|
+
export type ListRoleSubjectsRequest = {
|
|
91
|
+
id?: string
|
|
92
|
+
offset?: number
|
|
93
|
+
size?: number
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type ListRoleSubjectsResponse = {
|
|
97
|
+
total?: number
|
|
98
|
+
subjects?: Subject[]
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type Subject = {
|
|
102
|
+
id?: string
|
|
103
|
+
role_id?: string
|
|
104
|
+
type?: string
|
|
105
|
+
name?: string
|
|
106
|
+
}
|
|
107
|
+
|
|
84
108
|
export class Role {
|
|
85
109
|
static ListRoles(req: ListRolesRequest, initReq?: fm.InitReq): Promise<ListRolesResponse> {
|
|
86
110
|
return fm.fetchReq<ListRolesRequest, ListRolesResponse>(`/apis/ghippo.io/v1alpha1/roles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -106,4 +130,7 @@ export class Role {
|
|
|
106
130
|
static ListRoleComposite(req: ListRoleCompositeRequest, initReq?: fm.InitReq): Promise<ListRoleCompositeResponse> {
|
|
107
131
|
return fm.fetchReq<ListRoleCompositeRequest, ListRoleCompositeResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}/composites?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
108
132
|
}
|
|
133
|
+
static ListRoleSubjects(req: ListRoleSubjectsRequest, initReq?: fm.InitReq): Promise<ListRoleSubjectsResponse> {
|
|
134
|
+
return fm.fetchReq<ListRoleSubjectsRequest, ListRoleSubjectsResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
135
|
+
}
|
|
109
136
|
}
|
|
@@ -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?:
|
|
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?:
|
|
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?:
|
|
37
|
+
ssl?: boolean
|
|
38
38
|
from?: string
|
|
39
39
|
user?: string
|
|
40
40
|
password?: string
|
package/v1alpha1/topnav.pb.ts
CHANGED
|
@@ -17,8 +17,21 @@ export type TopNavResponse = {
|
|
|
17
17
|
portal_url?: string
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
export type UpdateTopNavRequest = {
|
|
21
|
+
platform_name?: string
|
|
22
|
+
icon?: Uint8Array
|
|
23
|
+
favicon?: Uint8Array
|
|
24
|
+
portal_url?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type UpdateTopNavResponse = {
|
|
28
|
+
}
|
|
29
|
+
|
|
20
30
|
export class TopNavigator {
|
|
21
31
|
static Info(req: TopNavRequest, initReq?: fm.InitReq): Promise<TopNavResponse> {
|
|
22
32
|
return fm.fetchReq<TopNavRequest, TopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
23
33
|
}
|
|
34
|
+
static UpdateTopNav(req: UpdateTopNavRequest, initReq?: fm.InitReq): Promise<UpdateTopNavResponse> {
|
|
35
|
+
return fm.fetchReq<UpdateTopNavRequest, UpdateTopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
36
|
+
}
|
|
24
37
|
}
|
package/v1alpha1/user.pb.ts
CHANGED
|
@@ -89,6 +89,60 @@ export type ListUserGroupsResponse = {
|
|
|
89
89
|
data?: Group[]
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
export type ListUserRolesRequest = {
|
|
93
|
+
id?: string
|
|
94
|
+
search?: string
|
|
95
|
+
offset?: number
|
|
96
|
+
size?: number
|
|
97
|
+
type?: string
|
|
98
|
+
authorized?: boolean
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type ListUserRolesResponse = {
|
|
102
|
+
total?: number
|
|
103
|
+
authorized_count?: number
|
|
104
|
+
roles?: RoleInfo[]
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type RoleInfo = {
|
|
108
|
+
id?: string
|
|
109
|
+
name?: string
|
|
110
|
+
type?: string
|
|
111
|
+
description?: string
|
|
112
|
+
composite?: boolean
|
|
113
|
+
created_at?: string
|
|
114
|
+
updated_at?: string
|
|
115
|
+
authorized?: boolean
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export type ListUserSubjectRequest = {
|
|
119
|
+
id?: string
|
|
120
|
+
search?: string
|
|
121
|
+
offset?: number
|
|
122
|
+
size?: number
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type ListUserSubjectResponse = {
|
|
126
|
+
total?: number
|
|
127
|
+
subjects?: UserSubject[]
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type UserSubject = {
|
|
131
|
+
id?: string
|
|
132
|
+
role_id?: string
|
|
133
|
+
type?: string
|
|
134
|
+
name?: string
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type UpdateUserRolesRequest = {
|
|
138
|
+
id?: string
|
|
139
|
+
add_roles?: string[]
|
|
140
|
+
remove_roles?: string[]
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type UpdateUserRolesResponse = {
|
|
144
|
+
}
|
|
145
|
+
|
|
92
146
|
export class Users {
|
|
93
147
|
static ListUsers(req: ListUsersRequest, initReq?: fm.InitReq): Promise<ListUsersResponse> {
|
|
94
148
|
return fm.fetchReq<ListUsersRequest, ListUsersResponse>(`/apis/ghippo.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -111,4 +165,13 @@ export class Users {
|
|
|
111
165
|
static ListUserGroups(req: ListUserGroupsRequest, initReq?: fm.InitReq): Promise<ListUserGroupsResponse> {
|
|
112
166
|
return fm.fetchReq<ListUserGroupsRequest, ListUserGroupsResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/groups?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
113
167
|
}
|
|
168
|
+
static ListUserRoles(req: ListUserRolesRequest, initReq?: fm.InitReq): Promise<ListUserRolesResponse> {
|
|
169
|
+
return fm.fetchReq<ListUserRolesRequest, ListUserRolesResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/roles?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
170
|
+
}
|
|
171
|
+
static ListUserSubjects(req: ListUserSubjectRequest, initReq?: fm.InitReq): Promise<ListUserSubjectResponse> {
|
|
172
|
+
return fm.fetchReq<ListUserSubjectRequest, ListUserSubjectResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
173
|
+
}
|
|
174
|
+
static UpdateUserRoles(req: UpdateUserRolesRequest, initReq?: fm.InitReq): Promise<UpdateUserRolesResponse> {
|
|
175
|
+
return fm.fetchReq<UpdateUserRolesRequest, UpdateUserRolesResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
176
|
+
}
|
|
114
177
|
}
|
package/v1alpha1/workspace.pb.ts
CHANGED
|
@@ -5,17 +5,107 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
|
+
export type WorkspaceInfo = {
|
|
9
|
+
id?: number
|
|
10
|
+
name?: string
|
|
11
|
+
parent_workspace_id?: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type ResourceInfo = {
|
|
15
|
+
resource_name?: string
|
|
16
|
+
workspace_id?: number
|
|
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?: number
|
|
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 AddResourceToWorkspaceRequest = {
|
|
45
|
+
workspace_id?: number
|
|
46
|
+
resource_name?: string
|
|
47
|
+
resource_type?: string
|
|
48
|
+
gproduct?: string
|
|
49
|
+
resource_scope?: string
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type AddResourceToWorkspaceResponse = {
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type DeleteResourceFromWorkspaceRequest = {
|
|
56
|
+
workspace_id?: number
|
|
57
|
+
resource_name?: string
|
|
58
|
+
resource_type?: string
|
|
59
|
+
gproduct?: string
|
|
60
|
+
resource_scope?: string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type DeleteResourceFromWorkspaceResponse = {
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type CreateWorkspaceRequest = {
|
|
67
|
+
name?: string
|
|
68
|
+
parent_workspace_id?: number
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type CreateWorkspaceResponse = {
|
|
72
|
+
}
|
|
73
|
+
|
|
8
74
|
export type GetWorkspaceRequest = {
|
|
9
|
-
|
|
75
|
+
workspace_id?: number
|
|
10
76
|
}
|
|
11
77
|
|
|
12
78
|
export type GetWorkspaceResponse = {
|
|
13
|
-
|
|
14
|
-
|
|
79
|
+
workspace?: WorkspaceInfo
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type DeleteWorkspaceRequest = {
|
|
83
|
+
workspace_id?: number
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type DeleteWorkspaceResponse = {
|
|
15
87
|
}
|
|
16
88
|
|
|
17
89
|
export class Workspace {
|
|
90
|
+
static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
|
|
91
|
+
return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
92
|
+
}
|
|
93
|
+
static ListWorkspaceResources(req: ListWorkspaceResourcesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceResourcesResponse> {
|
|
94
|
+
return fm.fetchReq<ListWorkspaceResourcesRequest, ListWorkspaceResourcesResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}/resources?${fm.renderURLSearchParams(req, ["workspace_id"])}`, {...initReq, method: "GET"})
|
|
95
|
+
}
|
|
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)})
|
|
98
|
+
}
|
|
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)})
|
|
101
|
+
}
|
|
102
|
+
static CreateWorkspace(req: CreateWorkspaceRequest, initReq?: fm.InitReq): Promise<CreateWorkspaceResponse> {
|
|
103
|
+
return fm.fetchReq<CreateWorkspaceRequest, CreateWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
104
|
+
}
|
|
18
105
|
static GetWorkspace(req: GetWorkspaceRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResponse> {
|
|
19
|
-
return fm.fetchReq<GetWorkspaceRequest, GetWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["
|
|
106
|
+
return fm.fetchReq<GetWorkspaceRequest, GetWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}?${fm.renderURLSearchParams(req, ["workspace_id"])}`, {...initReq, method: "GET"})
|
|
107
|
+
}
|
|
108
|
+
static DeleteWorkspace(req: DeleteWorkspaceRequest, initReq?: fm.InitReq): Promise<DeleteWorkspaceResponse> {
|
|
109
|
+
return fm.fetchReq<DeleteWorkspaceRequest, DeleteWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspace_id"]}`, {...initReq, method: "DELETE"})
|
|
20
110
|
}
|
|
21
111
|
}
|