@daocloud-proto/ghippo 0.8.8 → 0.8.11
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/audit.pb.ts +0 -11
- package/v1alpha1/currentuser.pb.ts +51 -0
- package/v1alpha1/openapi.pb.ts +41 -0
- package/v1alpha1/topnav.pb.ts +9 -0
- package/v1alpha1/user.pb.ts +55 -0
- package/v1alpha1/workspace.pb.ts +35 -5
package/package.json
CHANGED
package/v1alpha1/audit.pb.ts
CHANGED
|
@@ -61,14 +61,6 @@ export type ClearAuditRequest = {
|
|
|
61
61
|
export type ClearAuditResponse = {
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export type ExportAuditRequest = {
|
|
65
|
-
days?: number
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type ExportAuditResponse = {
|
|
69
|
-
csv?: string
|
|
70
|
-
}
|
|
71
|
-
|
|
72
64
|
export type CreateAuditRequest = {
|
|
73
65
|
audit?: AuditInfo
|
|
74
66
|
}
|
|
@@ -86,7 +78,4 @@ export class Audit {
|
|
|
86
78
|
static ClearAudit(req: ClearAuditRequest, initReq?: fm.InitReq): Promise<ClearAuditResponse> {
|
|
87
79
|
return fm.fetchReq<ClearAuditRequest, ClearAuditResponse>(`/apis/ghippo.io/v1alpha1/audits`, {...initReq, method: "DELETE"})
|
|
88
80
|
}
|
|
89
|
-
static ExportAudit(req: ExportAuditRequest, initReq?: fm.InitReq): Promise<ExportAuditResponse> {
|
|
90
|
-
return fm.fetchReq<ExportAuditRequest, ExportAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
91
|
-
}
|
|
92
81
|
}
|
|
@@ -36,6 +36,45 @@ export type GetUserResponse = {
|
|
|
36
36
|
locale?: string
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
export type ListSecretsRequest = {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type ListSecretsResponse = {
|
|
43
|
+
items?: Secret[]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type Secret = {
|
|
47
|
+
id?: string
|
|
48
|
+
secret?: string
|
|
49
|
+
enabled?: boolean
|
|
50
|
+
createdAt?: string
|
|
51
|
+
updatedAt?: string
|
|
52
|
+
lastUsedAt?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type CreateSecretRequest = {
|
|
56
|
+
enabled?: boolean
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type CreateSecretResponse = {
|
|
60
|
+
id?: string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type UpdateSecretRequest = {
|
|
64
|
+
id?: string
|
|
65
|
+
enabled?: boolean
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type UpdateSecretResponse = {
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type DeleteSecretRequest = {
|
|
72
|
+
id?: string
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type DeleteSecretResponse = {
|
|
76
|
+
}
|
|
77
|
+
|
|
39
78
|
export class Account {
|
|
40
79
|
static UpdateEmail(req: UpdateEmailRequest, initReq?: fm.InitReq): Promise<UpdateEmailResponse> {
|
|
41
80
|
return fm.fetchReq<UpdateEmailRequest, UpdateEmailResponse>(`/apis/ghippo.io/v1alpha1/current-user/email`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
@@ -49,4 +88,16 @@ export class Account {
|
|
|
49
88
|
static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
50
89
|
return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
51
90
|
}
|
|
91
|
+
static ListSecrets(req: ListSecretsRequest, initReq?: fm.InitReq): Promise<ListSecretsResponse> {
|
|
92
|
+
return fm.fetchReq<ListSecretsRequest, ListSecretsResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
93
|
+
}
|
|
94
|
+
static CreateSecret(req: CreateSecretRequest, initReq?: fm.InitReq): Promise<CreateSecretResponse> {
|
|
95
|
+
return fm.fetchReq<CreateSecretRequest, CreateSecretResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
96
|
+
}
|
|
97
|
+
static UpdateSecret(req: UpdateSecretRequest, initReq?: fm.InitReq): Promise<UpdateSecretResponse> {
|
|
98
|
+
return fm.fetchReq<UpdateSecretRequest, UpdateSecretResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
99
|
+
}
|
|
100
|
+
static DeleteSecret(req: DeleteSecretRequest, initReq?: fm.InitReq): Promise<DeleteSecretResponse> {
|
|
101
|
+
return fm.fetchReq<DeleteSecretRequest, DeleteSecretResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
102
|
+
}
|
|
52
103
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 CertsRequest = {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type CertsResponse = {
|
|
12
|
+
keys?: Key[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type Key = {
|
|
16
|
+
kid?: string
|
|
17
|
+
kty?: string
|
|
18
|
+
alg?: string
|
|
19
|
+
e?: string
|
|
20
|
+
n?: string
|
|
21
|
+
use?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type GetTokenRequest = {
|
|
25
|
+
ak?: string
|
|
26
|
+
sk?: string
|
|
27
|
+
cycle?: number
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type GetTokenResponse = {
|
|
31
|
+
token?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class Openapi {
|
|
35
|
+
static Certs(req: CertsRequest, initReq?: fm.InitReq): Promise<CertsResponse> {
|
|
36
|
+
return fm.fetchReq<CertsRequest, CertsResponse>(`/apis/ghippo.io/v1alpha1/certs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
37
|
+
}
|
|
38
|
+
static GetToken(req: GetTokenRequest, initReq?: fm.InitReq): Promise<GetTokenResponse> {
|
|
39
|
+
return fm.fetchReq<GetTokenRequest, GetTokenResponse>(`/apis/ghippo.io/v1alpha1/token?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
40
|
+
}
|
|
41
|
+
}
|
package/v1alpha1/topnav.pb.ts
CHANGED
|
@@ -27,6 +27,12 @@ export type UpdateTopNavRequest = {
|
|
|
27
27
|
export type UpdateTopNavResponse = {
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export type ResetTopNavRequest = {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type ResetTopNavResponse = {
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
export class TopNavigator {
|
|
31
37
|
static Info(req: TopNavRequest, initReq?: fm.InitReq): Promise<TopNavResponse> {
|
|
32
38
|
return fm.fetchReq<TopNavRequest, TopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -34,4 +40,7 @@ export class TopNavigator {
|
|
|
34
40
|
static UpdateTopNav(req: UpdateTopNavRequest, initReq?: fm.InitReq): Promise<UpdateTopNavResponse> {
|
|
35
41
|
return fm.fetchReq<UpdateTopNavRequest, UpdateTopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
36
42
|
}
|
|
43
|
+
static ResetTopNav(req: ResetTopNavRequest, initReq?: fm.InitReq): Promise<ResetTopNavResponse> {
|
|
44
|
+
return fm.fetchReq<ResetTopNavRequest, ResetTopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav/reset`, {...initReq, method: "POST"})
|
|
45
|
+
}
|
|
37
46
|
}
|
package/v1alpha1/user.pb.ts
CHANGED
|
@@ -158,6 +158,49 @@ export type UpdateUserRolesRequest = {
|
|
|
158
158
|
export type UpdateUserRolesResponse = {
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
export type ListUserSecretsRequest = {
|
|
162
|
+
id?: string
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type ListUserSecretsResponse = {
|
|
166
|
+
items?: Secret[]
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type Secret = {
|
|
170
|
+
id?: string
|
|
171
|
+
secret?: string
|
|
172
|
+
enabled?: boolean
|
|
173
|
+
createdAt?: string
|
|
174
|
+
updatedAt?: string
|
|
175
|
+
lastUsedAt?: string
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export type CreateUserSecretRequest = {
|
|
179
|
+
id?: string
|
|
180
|
+
enabled?: boolean
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export type CreateUserSecretResponse = {
|
|
184
|
+
id?: string
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type UpdateUserSecretRequest = {
|
|
188
|
+
id?: string
|
|
189
|
+
sid?: string
|
|
190
|
+
enabled?: boolean
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export type UpdateUserSecretResponse = {
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type DeleteUserSecretRequest = {
|
|
197
|
+
id?: string
|
|
198
|
+
sid?: string
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export type DeleteUserSecretResponse = {
|
|
202
|
+
}
|
|
203
|
+
|
|
161
204
|
export class Users {
|
|
162
205
|
static ListUsers(req: ListUsersRequest, initReq?: fm.InitReq): Promise<ListUsersResponse> {
|
|
163
206
|
return fm.fetchReq<ListUsersRequest, ListUsersResponse>(`/apis/ghippo.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -192,4 +235,16 @@ export class Users {
|
|
|
192
235
|
static UpdateUserRoles(req: UpdateUserRolesRequest, initReq?: fm.InitReq): Promise<UpdateUserRolesResponse> {
|
|
193
236
|
return fm.fetchReq<UpdateUserRolesRequest, UpdateUserRolesResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
194
237
|
}
|
|
238
|
+
static ListUserSecrets(req: ListUserSecretsRequest, initReq?: fm.InitReq): Promise<ListUserSecretsResponse> {
|
|
239
|
+
return fm.fetchReq<ListUserSecretsRequest, ListUserSecretsResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
240
|
+
}
|
|
241
|
+
static CreateUserSecret(req: CreateUserSecretRequest, initReq?: fm.InitReq): Promise<CreateUserSecretResponse> {
|
|
242
|
+
return fm.fetchReq<CreateUserSecretRequest, CreateUserSecretResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
243
|
+
}
|
|
244
|
+
static UpdateUserSecret(req: UpdateUserSecretRequest, initReq?: fm.InitReq): Promise<UpdateUserSecretResponse> {
|
|
245
|
+
return fm.fetchReq<UpdateUserSecretRequest, UpdateUserSecretResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets/${req["sid"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
246
|
+
}
|
|
247
|
+
static DeleteUserSecret(req: DeleteUserSecretRequest, initReq?: fm.InitReq): Promise<DeleteUserSecretResponse> {
|
|
248
|
+
return fm.fetchReq<DeleteUserSecretRequest, DeleteUserSecretResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets/${req["sid"]}`, {...initReq, method: "DELETE"})
|
|
249
|
+
}
|
|
195
250
|
}
|
package/v1alpha1/workspace.pb.ts
CHANGED
|
@@ -7,11 +7,12 @@
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
8
|
|
|
9
9
|
export enum QuotaType {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
requestsCpu = "requestsCpu",
|
|
11
|
+
limitsCpu = "limitsCpu",
|
|
12
|
+
requestsMemory = "requestsMemory",
|
|
13
|
+
limitsMemory = "limitsMemory",
|
|
14
|
+
persistentvolumeclaims = "persistentvolumeclaims",
|
|
15
|
+
requestsStorage = "requestsStorage",
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
export type Pagination = {
|
|
@@ -284,6 +285,7 @@ export type QuotaHard = {
|
|
|
284
285
|
requestsMemory?: string
|
|
285
286
|
limitsMemory?: string
|
|
286
287
|
persistentvolumeclaims?: string
|
|
288
|
+
requestStorage?: string
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
export type BindResourceAndSetQuotaHardToWorkspaceRequest = {
|
|
@@ -338,6 +340,28 @@ export type UpdateQuotaCheckResponse = {
|
|
|
338
340
|
reason?: string
|
|
339
341
|
}
|
|
340
342
|
|
|
343
|
+
export type BindSharedResourceToWorkspaceRequest = {
|
|
344
|
+
workspaceId?: number
|
|
345
|
+
resourceName?: string
|
|
346
|
+
resourceType?: string
|
|
347
|
+
resourceScope?: string
|
|
348
|
+
gproduct?: string
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export type BindSharedResourceToWorkspaceResponse = {
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export type BindSharedResourceAndSetQuotaHardToWorkspaceRequest = {
|
|
355
|
+
resourceName?: string
|
|
356
|
+
resourceType?: string
|
|
357
|
+
gproduct?: string
|
|
358
|
+
workspaceId?: number
|
|
359
|
+
quotaHard?: QuotaHard
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export type BindSharedResourceAndSetQuotaHardToWorkspaceResponse = {
|
|
363
|
+
}
|
|
364
|
+
|
|
341
365
|
export class Workspace {
|
|
342
366
|
static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
|
|
343
367
|
return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -351,6 +375,9 @@ export class Workspace {
|
|
|
351
375
|
static BindResourceToWorkspace(req: BindResourceToWorkspaceRequest, initReq?: fm.InitReq): Promise<BindResourceToWorkspaceResponse> {
|
|
352
376
|
return fm.fetchReq<BindResourceToWorkspaceRequest, BindResourceToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-resource`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
353
377
|
}
|
|
378
|
+
static BindSharedResourceToWorkspace(req: BindSharedResourceToWorkspaceRequest, initReq?: fm.InitReq): Promise<BindSharedResourceToWorkspaceResponse> {
|
|
379
|
+
return fm.fetchReq<BindSharedResourceToWorkspaceRequest, BindSharedResourceToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-shared-resource`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
380
|
+
}
|
|
354
381
|
static UnbindResourceFromWorkspace(req: UnbindResourceFromWorkspaceRequest, initReq?: fm.InitReq): Promise<UnbindResourceFromWorkspaceResponse> {
|
|
355
382
|
return fm.fetchReq<UnbindResourceFromWorkspaceRequest, UnbindResourceFromWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/unbind-resource`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
356
383
|
}
|
|
@@ -405,6 +432,9 @@ export class Workspace {
|
|
|
405
432
|
static BindResourceAndSetQuotaHardToWorkspace(req: BindResourceAndSetQuotaHardToWorkspaceRequest, initReq?: fm.InitReq): Promise<BindResourceAndSetQuotaHardToWorkspaceResponse> {
|
|
406
433
|
return fm.fetchReq<BindResourceAndSetQuotaHardToWorkspaceRequest, BindResourceAndSetQuotaHardToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-resource-setquota`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
407
434
|
}
|
|
435
|
+
static BindSharedResourceAndSetQuotaHardToWorkspace(req: BindSharedResourceAndSetQuotaHardToWorkspaceRequest, initReq?: fm.InitReq): Promise<BindSharedResourceAndSetQuotaHardToWorkspaceResponse> {
|
|
436
|
+
return fm.fetchReq<BindSharedResourceAndSetQuotaHardToWorkspaceRequest, BindSharedResourceAndSetQuotaHardToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-shared-resource-setquota`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
437
|
+
}
|
|
408
438
|
static SetQuotaHardForWorkspaceResource(req: SetQuotaHardForWorkspaceResourceRequest, initReq?: fm.InitReq): Promise<SetQuotaHardForWorkspaceResourceResponse> {
|
|
409
439
|
return fm.fetchReq<SetQuotaHardForWorkspaceResourceRequest, SetQuotaHardForWorkspaceResourceResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota-hard`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
410
440
|
}
|