@daocloud-proto/ghippo 0.8.6 → 0.8.9
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 -6
- package/v1alpha1/idp.pb.ts +95 -0
- package/v1alpha1/oidc.pb.ts +84 -0
- package/v1alpha1/role.pb.ts +13 -0
- package/v1alpha1/workspace.pb.ts +35 -5
package/package.json
CHANGED
package/v1alpha1/audit.pb.ts
CHANGED
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
|
|
9
|
+
export enum ProviderType {
|
|
10
|
+
oidc = "oidc",
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum ClientAuthMethod {
|
|
14
|
+
client_secret_post = "client_secret_post",
|
|
15
|
+
client_secret_sent_as_basic_auth = "client_secret_sent_as_basic_auth",
|
|
16
|
+
client_secret_as_jwt = "client_secret_as_jwt",
|
|
17
|
+
jwt_signed_with_private_key = "jwt_signed_with_private_key",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type CreateIDPRequest = {
|
|
21
|
+
alias?: string
|
|
22
|
+
displayName?: string
|
|
23
|
+
clientId?: string
|
|
24
|
+
clientSecret?: string
|
|
25
|
+
clientAuthMethod?: ClientAuthMethod
|
|
26
|
+
providerId?: ProviderType
|
|
27
|
+
enabled?: boolean
|
|
28
|
+
authorizationUrl?: string
|
|
29
|
+
userInfoUrl?: string
|
|
30
|
+
tokenUrl?: string
|
|
31
|
+
logoutUrl?: string
|
|
32
|
+
enableAutoLinkFlow?: boolean
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type CreateIDPResponse = {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type GetIDPRequest = {
|
|
39
|
+
alias?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type GetIDPResponse = {
|
|
43
|
+
alias?: string
|
|
44
|
+
displayName?: string
|
|
45
|
+
clientId?: string
|
|
46
|
+
clientSecret?: string
|
|
47
|
+
clientAuthMethod?: ClientAuthMethod
|
|
48
|
+
providerId?: ProviderType
|
|
49
|
+
enabled?: boolean
|
|
50
|
+
authorizationUrl?: string
|
|
51
|
+
userInfoUrl?: string
|
|
52
|
+
tokenUrl?: string
|
|
53
|
+
logoutUrl?: string
|
|
54
|
+
enableAutoLinkFlow?: boolean
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type DeleteIDPRequest = {
|
|
58
|
+
alias?: string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type DeleteIDPResponse = {
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type UpdateIDPRequest = {
|
|
65
|
+
alias?: string
|
|
66
|
+
displayName?: string
|
|
67
|
+
clientId?: string
|
|
68
|
+
clientSecret?: string
|
|
69
|
+
clientAuthMethod?: ClientAuthMethod
|
|
70
|
+
providerId?: ProviderType
|
|
71
|
+
enabled?: boolean
|
|
72
|
+
authorizationUrl?: string
|
|
73
|
+
userInfoUrl?: string
|
|
74
|
+
tokenUrl?: string
|
|
75
|
+
logoutUrl?: string
|
|
76
|
+
enableAutoLinkFlow?: boolean
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type UpdateIDPResponse = {
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export class IDP {
|
|
83
|
+
static CreateIDP(req: CreateIDPRequest, initReq?: fm.InitReq): Promise<CreateIDPResponse> {
|
|
84
|
+
return fm.fetchReq<CreateIDPRequest, CreateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
85
|
+
}
|
|
86
|
+
static GetIDP(req: GetIDPRequest, initReq?: fm.InitReq): Promise<GetIDPResponse> {
|
|
87
|
+
return fm.fetchReq<GetIDPRequest, GetIDPResponse>(`/apis/ghippo.io/v1alpha1/idp/${req["alias"]}?${fm.renderURLSearchParams(req, ["alias"])}`, {...initReq, method: "GET"})
|
|
88
|
+
}
|
|
89
|
+
static DeleteIDP(req: DeleteIDPRequest, initReq?: fm.InitReq): Promise<DeleteIDPResponse> {
|
|
90
|
+
return fm.fetchReq<DeleteIDPRequest, DeleteIDPResponse>(`/apis/ghippo.io/v1alpha1/idp/${req["alias"]}`, {...initReq, method: "DELETE"})
|
|
91
|
+
}
|
|
92
|
+
static UpdateIDP(req: UpdateIDPRequest, initReq?: fm.InitReq): Promise<UpdateIDPResponse> {
|
|
93
|
+
return fm.fetchReq<UpdateIDPRequest, UpdateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 OIDCTokenRequest = {
|
|
9
|
+
clientId?: string
|
|
10
|
+
grantType?: string
|
|
11
|
+
clientSecret?: string
|
|
12
|
+
code?: string
|
|
13
|
+
redirectUri?: string
|
|
14
|
+
username?: string
|
|
15
|
+
password?: string
|
|
16
|
+
refreshToken?: string
|
|
17
|
+
scope?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type OIDCTokenResponse = {
|
|
21
|
+
accessToken?: string
|
|
22
|
+
idToken?: string
|
|
23
|
+
expiresIn?: number
|
|
24
|
+
refreshExpiresIn?: number
|
|
25
|
+
refreshToken?: string
|
|
26
|
+
tokenType?: string
|
|
27
|
+
notBeforePolicy?: number
|
|
28
|
+
sessionState?: string
|
|
29
|
+
scope?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type WellKnownRequest = {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type WellKnownResponse = {
|
|
36
|
+
issuer?: string
|
|
37
|
+
authorizationEndpoint?: string
|
|
38
|
+
tokenEndpoint?: string
|
|
39
|
+
jwksUri?: string
|
|
40
|
+
userinfoEndpoint?: string
|
|
41
|
+
introspectionEndpoint?: string
|
|
42
|
+
idTokenSigningAlgValuesSupported?: string[]
|
|
43
|
+
endSessionEndpoint?: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type OIDCUserInfoRequest = {
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type OIDCUserInfoResponse = {
|
|
50
|
+
sub?: string
|
|
51
|
+
preferredUsername?: string
|
|
52
|
+
email?: string
|
|
53
|
+
locale?: string
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type OIDCLogoutRequest = {
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type OIDCLogoutResponse = {
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type RedirectFrontendLogoutRequest = {
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type RedirectFrontendLogoutResponse = {
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class OIDC {
|
|
69
|
+
static OIDCToken(req: OIDCTokenRequest, initReq?: fm.InitReq): Promise<OIDCTokenResponse> {
|
|
70
|
+
return fm.fetchReq<OIDCTokenRequest, OIDCTokenResponse>(`/apis/ghippo.io/v1alpha1/oidc/token`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
71
|
+
}
|
|
72
|
+
static WellKnown(req: WellKnownRequest, initReq?: fm.InitReq): Promise<WellKnownResponse> {
|
|
73
|
+
return fm.fetchReq<WellKnownRequest, WellKnownResponse>(`/apis/ghippo.io/v1alpha1/.well-known/openid-configuration?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
74
|
+
}
|
|
75
|
+
static OIDCUserInfo(req: OIDCUserInfoRequest, initReq?: fm.InitReq): Promise<OIDCUserInfoResponse> {
|
|
76
|
+
return fm.fetchReq<OIDCUserInfoRequest, OIDCUserInfoResponse>(`/apis/ghippo.io/v1alpha1/oidc/userinfo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
77
|
+
}
|
|
78
|
+
static OIDCLogout(req: OIDCLogoutRequest, initReq?: fm.InitReq): Promise<OIDCLogoutResponse> {
|
|
79
|
+
return fm.fetchReq<OIDCLogoutRequest, OIDCLogoutResponse>(`/apis/ghippo.io/v1alpha1/oidc/logout`, {...initReq, method: "DELETE"})
|
|
80
|
+
}
|
|
81
|
+
static RedirectFrontendLogout(req: RedirectFrontendLogoutRequest, initReq?: fm.InitReq): Promise<RedirectFrontendLogoutResponse> {
|
|
82
|
+
return fm.fetchReq<RedirectFrontendLogoutRequest, RedirectFrontendLogoutResponse>(`/apis/ghippo.io/v1alpha1/oidc/logout?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
83
|
+
}
|
|
84
|
+
}
|
package/v1alpha1/role.pb.ts
CHANGED
|
@@ -93,10 +93,23 @@ export type Subject = {
|
|
|
93
93
|
subjectName?: string
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
export type ListFolderRolesRequest = {
|
|
97
|
+
page?: number
|
|
98
|
+
pageSize?: number
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export type ListFolderRolesResponse = {
|
|
102
|
+
items?: WorkspaceRoleInfo[]
|
|
103
|
+
pagination?: Pagination
|
|
104
|
+
}
|
|
105
|
+
|
|
96
106
|
export class Role {
|
|
97
107
|
static ListGlobalRoles(req: ListGlobalRolesRequest, initReq?: fm.InitReq): Promise<ListGlobalRolesResponse> {
|
|
98
108
|
return fm.fetchReq<ListGlobalRolesRequest, ListGlobalRolesResponse>(`/apis/ghippo.io/v1alpha1/globalroles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
99
109
|
}
|
|
110
|
+
static ListFolderRoles(req: ListFolderRolesRequest, initReq?: fm.InitReq): Promise<ListFolderRolesResponse> {
|
|
111
|
+
return fm.fetchReq<ListFolderRolesRequest, ListFolderRolesResponse>(`/apis/ghippo.io/v1alpha1/folderroles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
112
|
+
}
|
|
100
113
|
static ListWorkspaceRoles(req: ListWorkspaceRolesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceRolesResponse> {
|
|
101
114
|
return fm.fetchReq<ListWorkspaceRolesRequest, ListWorkspaceRolesResponse>(`/apis/ghippo.io/v1alpha1/workspaceroles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
102
115
|
}
|
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
|
}
|