@daocloud-proto/ghippo 0.8.5 → 0.8.8
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/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
|
}
|