@daocloud-proto/ghippo 0.25.0-dev-5 → 0.25.0-dev-6
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/login.pb.ts +0 -9
- package/v1alpha1/user.pb.ts +55 -0
package/package.json
CHANGED
package/v1alpha1/login.pb.ts
CHANGED
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
|
-
|
|
9
|
-
export enum GrantType {
|
|
10
|
-
grant_type_code = "grant_type_code",
|
|
11
|
-
grant_type_password = "grant_type_password",
|
|
12
|
-
}
|
|
13
|
-
|
|
14
8
|
export type LoginGetRequest = {
|
|
15
9
|
callbackUrl?: string
|
|
16
10
|
}
|
|
@@ -24,9 +18,6 @@ export type LoginPostRequest = {
|
|
|
24
18
|
sessionState?: string
|
|
25
19
|
callbackUrl?: string
|
|
26
20
|
useSso?: string
|
|
27
|
-
grantType?: GrantType
|
|
28
|
-
username?: string
|
|
29
|
-
password?: string
|
|
30
21
|
}
|
|
31
22
|
|
|
32
23
|
export type LoginPostResponse = {
|
package/v1alpha1/user.pb.ts
CHANGED
|
@@ -218,6 +218,49 @@ export type ResetUserMFARequest = {
|
|
|
218
218
|
export type ResetUserMFAResponse = {
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
+
export type CreateUserSSHKeyRequest = {
|
|
222
|
+
id?: string
|
|
223
|
+
sshKeyName?: string
|
|
224
|
+
expiredAt?: string
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export type CreateUserSSHKeyResponse = {
|
|
228
|
+
publicKey?: string
|
|
229
|
+
privateKey?: string
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export type DeleteUserSSHKeyRequest = {
|
|
233
|
+
id?: string
|
|
234
|
+
sshkeyId?: string
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export type DeleteUserSSHKeyResponse = {
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export type ListUserSSHKeysRequest = {
|
|
241
|
+
id?: string
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export type ListUserSSHKeysResponse = {
|
|
245
|
+
sshKeys?: SSHKey[]
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export type SSHKey = {
|
|
249
|
+
id?: string
|
|
250
|
+
sshKeyName?: string
|
|
251
|
+
updatedAt?: string
|
|
252
|
+
createdAt?: string
|
|
253
|
+
expiredAt?: string
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export type VerifyUserSSHPublicKeyRequest = {
|
|
257
|
+
username?: string
|
|
258
|
+
publicKey?: string
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export type VerifyUserSSHPublicKeyResponse = {
|
|
262
|
+
}
|
|
263
|
+
|
|
221
264
|
export class Users {
|
|
222
265
|
static ListUsers(req: ListUsersRequest, initReq?: fm.InitReq): Promise<ListUsersResponse> {
|
|
223
266
|
return fm.fetchReq<ListUsersRequest, ListUsersResponse>(`/apis/ghippo.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -273,4 +316,16 @@ export class Users {
|
|
|
273
316
|
static DeleteUserAccessToken(req: DeleteUserAccessTokenRequest, initReq?: fm.InitReq): Promise<DeleteUserAccessTokenResponse> {
|
|
274
317
|
return fm.fetchReq<DeleteUserAccessTokenRequest, DeleteUserAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/accesstokens/${req["aid"]}`, {...initReq, method: "DELETE"})
|
|
275
318
|
}
|
|
319
|
+
static CreateUserSSHKey(req: CreateUserSSHKeyRequest, initReq?: fm.InitReq): Promise<CreateUserSSHKeyResponse> {
|
|
320
|
+
return fm.fetchReq<CreateUserSSHKeyRequest, CreateUserSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/sshkeys`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
321
|
+
}
|
|
322
|
+
static DeleteUserSSHKey(req: DeleteUserSSHKeyRequest, initReq?: fm.InitReq): Promise<DeleteUserSSHKeyResponse> {
|
|
323
|
+
return fm.fetchReq<DeleteUserSSHKeyRequest, DeleteUserSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/sshkeys/${req["sshkeyId"]}`, {...initReq, method: "DELETE"})
|
|
324
|
+
}
|
|
325
|
+
static ListUserSSHKeys(req: ListUserSSHKeysRequest, initReq?: fm.InitReq): Promise<ListUserSSHKeysResponse> {
|
|
326
|
+
return fm.fetchReq<ListUserSSHKeysRequest, ListUserSSHKeysResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/sshkeys?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
327
|
+
}
|
|
328
|
+
static VerifyUserSSHPublicKey(req: VerifyUserSSHPublicKeyRequest, initReq?: fm.InitReq): Promise<VerifyUserSSHPublicKeyResponse> {
|
|
329
|
+
return fm.fetchReq<VerifyUserSSHPublicKeyRequest, VerifyUserSSHPublicKeyResponse>(`/apis/ghippo.io/v1alpha1/users/${req["username"]}/sshkeys/verify`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
330
|
+
}
|
|
276
331
|
}
|