@daocloud-proto/ghippo 0.8.4 → 0.8.7
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/idp.pb.ts +95 -0
- package/v1alpha1/oidc.pb.ts +84 -0
- package/v1alpha1/role.pb.ts +13 -0
- package/v1alpha1/workspace.pb.ts +9 -19
package/package.json
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
|
@@ -305,13 +305,16 @@ export type SetQuotaHardForWorkspaceResourceRequest = {
|
|
|
305
305
|
export type SetQuotaHardForWorkspaceResourceResponse = {
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
export type
|
|
308
|
+
export type GetWorkspaceResourceQuotaRequest = {
|
|
309
309
|
workspaceId?: number
|
|
310
|
-
|
|
310
|
+
resourceName?: string
|
|
311
|
+
resourceType?: string
|
|
311
312
|
}
|
|
312
313
|
|
|
313
|
-
export type
|
|
314
|
-
|
|
314
|
+
export type GetWorkspaceResourceQuotaResponse = {
|
|
315
|
+
setting?: {[key: string]: string}
|
|
316
|
+
allocatable?: {[key: string]: string}
|
|
317
|
+
used?: {[key: string]: string}
|
|
315
318
|
}
|
|
316
319
|
|
|
317
320
|
export type ListResourceQuotaTypesRequest = {
|
|
@@ -321,16 +324,6 @@ export type ListResourceQuotaTypesResponse = {
|
|
|
321
324
|
items?: string[]
|
|
322
325
|
}
|
|
323
326
|
|
|
324
|
-
export type GetWorkspaceResourceQuotaAllocatableRequest = {
|
|
325
|
-
workspaceId?: number
|
|
326
|
-
cluster?: string
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export type GetWorkspaceResourceQuotaAllocatableResponse = {
|
|
330
|
-
setting?: {[key: string]: string}
|
|
331
|
-
allocatable?: {[key: string]: string}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
327
|
export type UpdateQuotaCheckRequest = {
|
|
335
328
|
resourceName?: string
|
|
336
329
|
resourceType?: string
|
|
@@ -415,15 +408,12 @@ export class Workspace {
|
|
|
415
408
|
static SetQuotaHardForWorkspaceResource(req: SetQuotaHardForWorkspaceResourceRequest, initReq?: fm.InitReq): Promise<SetQuotaHardForWorkspaceResourceResponse> {
|
|
416
409
|
return fm.fetchReq<SetQuotaHardForWorkspaceResourceRequest, SetQuotaHardForWorkspaceResourceResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota-hard`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
417
410
|
}
|
|
418
|
-
static
|
|
419
|
-
return fm.fetchReq<
|
|
411
|
+
static GetWorkspaceResourceQuota(req: GetWorkspaceResourceQuotaRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResourceQuotaResponse> {
|
|
412
|
+
return fm.fetchReq<GetWorkspaceResourceQuotaRequest, GetWorkspaceResourceQuotaResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
420
413
|
}
|
|
421
414
|
static ListResourceQuotaTypes(req: ListResourceQuotaTypesRequest, initReq?: fm.InitReq): Promise<ListResourceQuotaTypesResponse> {
|
|
422
415
|
return fm.fetchReq<ListResourceQuotaTypesRequest, ListResourceQuotaTypesResponse>(`/apis/ghippo.io/v1alpha1/resourcequota-types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
423
416
|
}
|
|
424
|
-
static GetWorkspaceResourceQuotaAllocatable(req: GetWorkspaceResourceQuotaAllocatableRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResourceQuotaAllocatableResponse> {
|
|
425
|
-
return fm.fetchReq<GetWorkspaceResourceQuotaAllocatableRequest, GetWorkspaceResourceQuotaAllocatableResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota-allocatable?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
426
|
-
}
|
|
427
417
|
static UpdateQuotaCheck(req: UpdateQuotaCheckRequest, initReq?: fm.InitReq): Promise<UpdateQuotaCheckResponse> {
|
|
428
418
|
return fm.fetchReq<UpdateQuotaCheckRequest, UpdateQuotaCheckResponse>(`/apis/ghippo.io/v1alpha1/update-quota-check`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
429
419
|
}
|