@daocloud-proto/ghippo 0.26.0-dev4 → 0.26.0-dev6
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/currentuser.pb.ts +54 -0
- package/v1alpha1/user.pb.ts +0 -57
package/package.json
CHANGED
|
@@ -135,6 +135,48 @@ export type GetGlobalPermissionsResponse = {
|
|
|
135
135
|
permissions?: GlobalPermission[]
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
export type CreateSSHKeyRequest = {
|
|
139
|
+
sshKeyName?: string
|
|
140
|
+
publicKey?: string
|
|
141
|
+
expiredAt?: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export type CreateSSHKeyResponse = {
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type UpdateSSHKeyRequest = {
|
|
148
|
+
sshkeyId?: number
|
|
149
|
+
sshKeyName?: string
|
|
150
|
+
publicKey?: string
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export type UpdateSSHKeyResponse = {
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type DeleteSSHKeyRequest = {
|
|
157
|
+
id?: string
|
|
158
|
+
sshkeyId?: number
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type DeleteSSHKeyResponse = {
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export type ListSSHKeysRequest = {
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export type ListSSHKeysResponse = {
|
|
168
|
+
sshKeys?: SSHKey[]
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type SSHKey = {
|
|
172
|
+
id?: number
|
|
173
|
+
sshKeyName?: string
|
|
174
|
+
publicKey?: string
|
|
175
|
+
updatedAt?: string
|
|
176
|
+
createdAt?: string
|
|
177
|
+
expiredAt?: string
|
|
178
|
+
}
|
|
179
|
+
|
|
138
180
|
export class Account {
|
|
139
181
|
static UpdateEmail(req: UpdateEmailRequest, initReq?: fm.InitReq): Promise<UpdateEmailResponse> {
|
|
140
182
|
return fm.fetchReq<UpdateEmailRequest, UpdateEmailResponse>(`/apis/ghippo.io/v1alpha1/current-user/email`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -166,4 +208,16 @@ export class Account {
|
|
|
166
208
|
static SetCurrentUserPassword(req: SetCurrentUserPasswordRequest, initReq?: fm.InitReq): Promise<SetCurrentUserPasswordResponse> {
|
|
167
209
|
return fm.fetchReq<SetCurrentUserPasswordRequest, SetCurrentUserPasswordResponse>(`/apis/ghippo.io/v1alpha1/current-user/set-password`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
168
210
|
}
|
|
211
|
+
static CreateSSHKey(req: CreateSSHKeyRequest, initReq?: fm.InitReq): Promise<CreateSSHKeyResponse> {
|
|
212
|
+
return fm.fetchReq<CreateSSHKeyRequest, CreateSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/current-user/sshkeys`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
213
|
+
}
|
|
214
|
+
static UpdateSSHKey(req: UpdateSSHKeyRequest, initReq?: fm.InitReq): Promise<UpdateSSHKeyResponse> {
|
|
215
|
+
return fm.fetchReq<UpdateSSHKeyRequest, UpdateSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/current-user/sshkeys/${req["sshkeyId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
216
|
+
}
|
|
217
|
+
static DeleteSSHKey(req: DeleteSSHKeyRequest, initReq?: fm.InitReq): Promise<DeleteSSHKeyResponse> {
|
|
218
|
+
return fm.fetchReq<DeleteSSHKeyRequest, DeleteSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/current-user/sshkeys/${req["sshkeyId"]}`, {...initReq, method: "DELETE"})
|
|
219
|
+
}
|
|
220
|
+
static ListSSHKeys(req: ListSSHKeysRequest, initReq?: fm.InitReq): Promise<ListSSHKeysResponse> {
|
|
221
|
+
return fm.fetchReq<ListSSHKeysRequest, ListSSHKeysResponse>(`/apis/ghippo.io/v1alpha1/current-user/sshkeys?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
222
|
+
}
|
|
169
223
|
}
|
package/v1alpha1/user.pb.ts
CHANGED
|
@@ -218,51 +218,6 @@ export type ResetUserMFARequest = {
|
|
|
218
218
|
export type ResetUserMFAResponse = {
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
export type CreateUserSSHKeyRequest = {
|
|
222
|
-
id?: string
|
|
223
|
-
sshKeyName?: string
|
|
224
|
-
publicKey?: string
|
|
225
|
-
expiredAt?: string
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
export type CreateUserSSHKeyResponse = {
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export type UpdateUserSSHKeyRequest = {
|
|
232
|
-
id?: string
|
|
233
|
-
sshkeyId?: number
|
|
234
|
-
sshKeyName?: string
|
|
235
|
-
publicKey?: string
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
export type UpdateUserSSHKeyResponse = {
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export type DeleteUserSSHKeyRequest = {
|
|
242
|
-
id?: string
|
|
243
|
-
sshkeyId?: number
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export type DeleteUserSSHKeyResponse = {
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export type ListUserSSHKeysRequest = {
|
|
250
|
-
id?: string
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export type ListUserSSHKeysResponse = {
|
|
254
|
-
sshKeys?: SSHKey[]
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export type SSHKey = {
|
|
258
|
-
id?: number
|
|
259
|
-
sshKeyName?: string
|
|
260
|
-
publicKey?: string
|
|
261
|
-
updatedAt?: string
|
|
262
|
-
createdAt?: string
|
|
263
|
-
expiredAt?: string
|
|
264
|
-
}
|
|
265
|
-
|
|
266
221
|
export type VerifyUserSSHPublicKeyRequest = {
|
|
267
222
|
username?: string
|
|
268
223
|
publicKey?: Uint8Array
|
|
@@ -326,18 +281,6 @@ export class Users {
|
|
|
326
281
|
static DeleteUserAccessToken(req: DeleteUserAccessTokenRequest, initReq?: fm.InitReq): Promise<DeleteUserAccessTokenResponse> {
|
|
327
282
|
return fm.fetchReq<DeleteUserAccessTokenRequest, DeleteUserAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/accesstokens/${req["aid"]}`, {...initReq, method: "DELETE"})
|
|
328
283
|
}
|
|
329
|
-
static CreateUserSSHKey(req: CreateUserSSHKeyRequest, initReq?: fm.InitReq): Promise<CreateUserSSHKeyResponse> {
|
|
330
|
-
return fm.fetchReq<CreateUserSSHKeyRequest, CreateUserSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/sshkeys`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
331
|
-
}
|
|
332
|
-
static UpdateUserSSHKey(req: UpdateUserSSHKeyRequest, initReq?: fm.InitReq): Promise<UpdateUserSSHKeyResponse> {
|
|
333
|
-
return fm.fetchReq<UpdateUserSSHKeyRequest, UpdateUserSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/sshkeys/${req["sshkeyId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
334
|
-
}
|
|
335
|
-
static DeleteUserSSHKey(req: DeleteUserSSHKeyRequest, initReq?: fm.InitReq): Promise<DeleteUserSSHKeyResponse> {
|
|
336
|
-
return fm.fetchReq<DeleteUserSSHKeyRequest, DeleteUserSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/sshkeys/${req["sshkeyId"]}`, {...initReq, method: "DELETE"})
|
|
337
|
-
}
|
|
338
|
-
static ListUserSSHKeys(req: ListUserSSHKeysRequest, initReq?: fm.InitReq): Promise<ListUserSSHKeysResponse> {
|
|
339
|
-
return fm.fetchReq<ListUserSSHKeysRequest, ListUserSSHKeysResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/sshkeys?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
340
|
-
}
|
|
341
284
|
static VerifyUserSSHPublicKey(req: VerifyUserSSHPublicKeyRequest, initReq?: fm.InitReq): Promise<VerifyUserSSHPublicKeyResponse> {
|
|
342
285
|
return fm.fetchReq<VerifyUserSSHPublicKeyRequest, VerifyUserSSHPublicKeyResponse>(`/apis/ghippo.io/v1alpha1/users/${req["username"]}/sshkeys/verify`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
343
286
|
}
|