@daocloud-proto/ghippo 0.38.0-rc1 → 0.39.0-dev1
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/account.pb.ts +175 -0
- package/v1alpha1/currentuser.pb.ts +3 -0
- package/v1alpha1/idp.pb.ts +14 -0
- package/v1alpha1/loginpage.pb.ts +30 -0
package/package.json
CHANGED
|
@@ -0,0 +1,175 @@
|
|
|
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 ListSubAccountsRequest = {
|
|
9
|
+
search?: string
|
|
10
|
+
pageSize?: number
|
|
11
|
+
page?: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type ListSubAccountsResponse = {
|
|
15
|
+
items?: GetSubAccountResponse[]
|
|
16
|
+
pagination?: Pagination
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type Pagination = {
|
|
20
|
+
page?: number
|
|
21
|
+
pageSize?: number
|
|
22
|
+
total?: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type GetSubAccountRequest = {
|
|
26
|
+
id?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type GetSubAccountResponse = {
|
|
30
|
+
id?: string
|
|
31
|
+
name?: string
|
|
32
|
+
email?: string
|
|
33
|
+
description?: string
|
|
34
|
+
firstname?: string
|
|
35
|
+
lastname?: string
|
|
36
|
+
source?: string
|
|
37
|
+
enabled?: boolean
|
|
38
|
+
createdAt?: string
|
|
39
|
+
updatedAt?: string
|
|
40
|
+
lastLoginAt?: string
|
|
41
|
+
canAuthorize?: boolean
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type CreateSubAccountRequest = {
|
|
45
|
+
name?: string
|
|
46
|
+
password?: string
|
|
47
|
+
description?: string
|
|
48
|
+
temporary?: boolean
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type CreateSubAccountResponse = {
|
|
52
|
+
id?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type DeleteSubAccountRequest = {
|
|
56
|
+
id?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type DeleteSubAccountResponse = {
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type UpdateSubAccountRequest = {
|
|
63
|
+
id?: string
|
|
64
|
+
enabled?: boolean
|
|
65
|
+
email?: string
|
|
66
|
+
description?: string
|
|
67
|
+
firstname?: string
|
|
68
|
+
lastname?: string
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type UpdateSubAccountResponse = {
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type SetSubAccountPasswordRequest = {
|
|
75
|
+
id?: string
|
|
76
|
+
password?: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type SetSubAccountPasswordResponse = {
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type ListSubAccountAccessTokensRequest = {
|
|
83
|
+
id?: string
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type ListSubAccountAccessTokensResponse = {
|
|
87
|
+
items?: AccessToken[]
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export type AccessToken = {
|
|
91
|
+
id?: string
|
|
92
|
+
name?: string
|
|
93
|
+
updatedAt?: string
|
|
94
|
+
createdAt?: string
|
|
95
|
+
expiredAt?: string
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type CreateSubAccountAccessTokenRequest = {
|
|
99
|
+
id?: string
|
|
100
|
+
name?: string
|
|
101
|
+
expiredAt?: string
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type CreateSubAccountAccessTokenResponse = {
|
|
105
|
+
id?: string
|
|
106
|
+
token?: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type DeleteSubAccountAccessTokenRequest = {
|
|
110
|
+
id?: string
|
|
111
|
+
aid?: string
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export type DeleteSubAccountAccessTokenResponse = {
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type ResetSubAccountMFARequest = {
|
|
118
|
+
id?: string
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type ResetSubAccountMFAResponse = {
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type VerifySubAccountSSHPublicKeyRequest = {
|
|
125
|
+
username?: string
|
|
126
|
+
publicKey?: Uint8Array
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type VerifySubAccountSSHPublicKeyResponse = {
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export type TransferToMainAccountRequest = {
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type TransferToMainAccountResponse = {
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export class Accounts {
|
|
139
|
+
static TransferToMainAccount(req: TransferToMainAccountRequest, initReq?: fm.InitReq): Promise<TransferToMainAccountResponse> {
|
|
140
|
+
return fm.fetchReq<TransferToMainAccountRequest, TransferToMainAccountResponse>(`/apis/ghippo.io/v1alpha1/accounts/transfer-main`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
141
|
+
}
|
|
142
|
+
static ListSubAccounts(req: ListSubAccountsRequest, initReq?: fm.InitReq): Promise<ListSubAccountsResponse> {
|
|
143
|
+
return fm.fetchReq<ListSubAccountsRequest, ListSubAccountsResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
144
|
+
}
|
|
145
|
+
static GetSubAccount(req: GetSubAccountRequest, initReq?: fm.InitReq): Promise<GetSubAccountResponse> {
|
|
146
|
+
return fm.fetchReq<GetSubAccountRequest, GetSubAccountResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
147
|
+
}
|
|
148
|
+
static CreateSubAccount(req: CreateSubAccountRequest, initReq?: fm.InitReq): Promise<CreateSubAccountResponse> {
|
|
149
|
+
return fm.fetchReq<CreateSubAccountRequest, CreateSubAccountResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
150
|
+
}
|
|
151
|
+
static DeleteSubAccount(req: DeleteSubAccountRequest, initReq?: fm.InitReq): Promise<DeleteSubAccountResponse> {
|
|
152
|
+
return fm.fetchReq<DeleteSubAccountRequest, DeleteSubAccountResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
153
|
+
}
|
|
154
|
+
static UpdateSubAccount(req: UpdateSubAccountRequest, initReq?: fm.InitReq): Promise<UpdateSubAccountResponse> {
|
|
155
|
+
return fm.fetchReq<UpdateSubAccountRequest, UpdateSubAccountResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
156
|
+
}
|
|
157
|
+
static SetSubAccountPassword(req: SetSubAccountPasswordRequest, initReq?: fm.InitReq): Promise<SetSubAccountPasswordResponse> {
|
|
158
|
+
return fm.fetchReq<SetSubAccountPasswordRequest, SetSubAccountPasswordResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/password`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
159
|
+
}
|
|
160
|
+
static ResetSubAccountMFA(req: ResetSubAccountMFARequest, initReq?: fm.InitReq): Promise<ResetSubAccountMFAResponse> {
|
|
161
|
+
return fm.fetchReq<ResetSubAccountMFARequest, ResetSubAccountMFAResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/mfa`, {...initReq, method: "DELETE"})
|
|
162
|
+
}
|
|
163
|
+
static ListSubAccountAccessTokens(req: ListSubAccountAccessTokensRequest, initReq?: fm.InitReq): Promise<ListSubAccountAccessTokensResponse> {
|
|
164
|
+
return fm.fetchReq<ListSubAccountAccessTokensRequest, ListSubAccountAccessTokensResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/accesstokens?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
165
|
+
}
|
|
166
|
+
static CreateSubAccountAccessToken(req: CreateSubAccountAccessTokenRequest, initReq?: fm.InitReq): Promise<CreateSubAccountAccessTokenResponse> {
|
|
167
|
+
return fm.fetchReq<CreateSubAccountAccessTokenRequest, CreateSubAccountAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/accesstoken`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
168
|
+
}
|
|
169
|
+
static DeleteSubAccountAccessToken(req: DeleteSubAccountAccessTokenRequest, initReq?: fm.InitReq): Promise<DeleteSubAccountAccessTokenResponse> {
|
|
170
|
+
return fm.fetchReq<DeleteSubAccountAccessTokenRequest, DeleteSubAccountAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/accesstokens/${req["aid"]}`, {...initReq, method: "DELETE"})
|
|
171
|
+
}
|
|
172
|
+
static VerifySubAccountSSHPublicKey(req: VerifySubAccountSSHPublicKeyRequest, initReq?: fm.InitReq): Promise<VerifySubAccountSSHPublicKeyResponse> {
|
|
173
|
+
return fm.fetchReq<VerifySubAccountSSHPublicKeyRequest, VerifySubAccountSSHPublicKeyResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["username"]}/sshkeys/verify`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
174
|
+
}
|
|
175
|
+
}
|
package/v1alpha1/idp.pb.ts
CHANGED
|
@@ -106,6 +106,17 @@ export type GetWellKnownUrlResponse = {
|
|
|
106
106
|
url?: string
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
export type ImportOpenIdConfigurationRequest = {
|
|
110
|
+
url?: string
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type ImportOpenIdConfigurationResponse = {
|
|
114
|
+
authorizationEndpoint?: string
|
|
115
|
+
tokenEndpoint?: string
|
|
116
|
+
userinfoEndpoint?: string
|
|
117
|
+
endSessionEndpoint?: string
|
|
118
|
+
}
|
|
119
|
+
|
|
109
120
|
export class IDP {
|
|
110
121
|
static CreateIDP(req: CreateIDPRequest, initReq?: fm.InitReq): Promise<CreateIDPResponse> {
|
|
111
122
|
return fm.fetchReq<CreateIDPRequest, CreateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -128,4 +139,7 @@ export class IDP {
|
|
|
128
139
|
static GetWellKnownUrl(req: GetWellKnownUrlRequest, initReq?: fm.InitReq): Promise<GetWellKnownUrlResponse> {
|
|
129
140
|
return fm.fetchReq<GetWellKnownUrlRequest, GetWellKnownUrlResponse>(`/apis/ghippo.io/v1alpha1/idp/wellknown-url?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
130
141
|
}
|
|
142
|
+
static ImportOpenIdConfiguration(req: ImportOpenIdConfigurationRequest, initReq?: fm.InitReq): Promise<ImportOpenIdConfigurationResponse> {
|
|
143
|
+
return fm.fetchReq<ImportOpenIdConfigurationRequest, ImportOpenIdConfigurationResponse>(`/apis/ghippo.io/v1alpha1/idp/import-openid-configuration?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
144
|
+
}
|
|
131
145
|
}
|
package/v1alpha1/loginpage.pb.ts
CHANGED
|
@@ -27,6 +27,27 @@ export type GetLoginPageVersionResponse = {
|
|
|
27
27
|
version?: number
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export type GetTermsOfServiceRequest = {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type GetPrivacyPolicyRequest = {
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type GetSupportQRCodeRequest = {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type GetTermsOfServiceResponse = {
|
|
40
|
+
data?: string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type GetPrivacyPolicyResponse = {
|
|
44
|
+
data?: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type GetSupportQRCodeResponse = {
|
|
48
|
+
data?: string
|
|
49
|
+
}
|
|
50
|
+
|
|
30
51
|
export type UpdateLoginPageInfoRequest = {
|
|
31
52
|
platformName?: string
|
|
32
53
|
copyright?: string
|
|
@@ -50,6 +71,15 @@ export class LoginPage {
|
|
|
50
71
|
static GetInfo(req: GetLoginPageInfoRequest, initReq?: fm.InitReq): Promise<GetLoginPageInfoResponse> {
|
|
51
72
|
return fm.fetchReq<GetLoginPageInfoRequest, GetLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
52
73
|
}
|
|
74
|
+
static GetTermsOfServices(req: GetTermsOfServiceRequest, initReq?: fm.InitReq): Promise<GetTermsOfServiceResponse> {
|
|
75
|
+
return fm.fetchReq<GetTermsOfServiceRequest, GetTermsOfServiceResponse>(`/apis/ghippo.io/v1alpha1/login-page/terms?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
76
|
+
}
|
|
77
|
+
static GetPrivacyPolicy(req: GetPrivacyPolicyRequest, initReq?: fm.InitReq): Promise<GetPrivacyPolicyResponse> {
|
|
78
|
+
return fm.fetchReq<GetPrivacyPolicyRequest, GetPrivacyPolicyResponse>(`/apis/ghippo.io/v1alpha1/login-page/privacy?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
79
|
+
}
|
|
80
|
+
static GetSupportQRCode(req: GetSupportQRCodeRequest, initReq?: fm.InitReq): Promise<GetSupportQRCodeResponse> {
|
|
81
|
+
return fm.fetchReq<GetSupportQRCodeRequest, GetSupportQRCodeResponse>(`/apis/ghippo.io/v1alpha1/login-page/support_qrcode?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
82
|
+
}
|
|
53
83
|
static GetVersion(req: GetLoginPageVersionRequest, initReq?: fm.InitReq): Promise<GetLoginPageVersionResponse> {
|
|
54
84
|
return fm.fetchReq<GetLoginPageVersionRequest, GetLoginPageVersionResponse>(`/apis/ghippo.io/v1alpha1/login-page/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
55
85
|
}
|