@daocloud-proto/ghippo 0.36.0-rc1 → 0.37.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/currentuser.pb.ts +7 -8
- package/v1alpha1/sms.pb.ts +8 -0
- package/v1alpha1/user.pb.ts +20 -0
package/package.json
CHANGED
|
@@ -225,14 +225,13 @@ export type CertifyCheckResponse = {
|
|
|
225
225
|
passed?: boolean
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
export type
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
subject?: CertifySubject
|
|
228
|
+
export type UpdatePhoneRequest = {
|
|
229
|
+
phone?: string
|
|
230
|
+
countryCode?: string
|
|
231
|
+
verificationCode?: string
|
|
233
232
|
}
|
|
234
233
|
|
|
235
|
-
export type
|
|
234
|
+
export type UpdatePhoneResponse = {
|
|
236
235
|
}
|
|
237
236
|
|
|
238
237
|
export class Account {
|
|
@@ -287,7 +286,7 @@ export class Account {
|
|
|
287
286
|
static CertifyCheck(req: CertifyCheckRequest, initReq?: fm.InitReq): Promise<CertifyCheckResponse> {
|
|
288
287
|
return fm.fetchReq<CertifyCheckRequest, CertifyCheckResponse>(`/apis/ghippo.io/v1alpha1/current-user/certify/check`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
289
288
|
}
|
|
290
|
-
static
|
|
291
|
-
return fm.fetchReq<
|
|
289
|
+
static UpdatePhone(req: UpdatePhoneRequest, initReq?: fm.InitReq): Promise<UpdatePhoneResponse> {
|
|
290
|
+
return fm.fetchReq<UpdatePhoneRequest, UpdatePhoneResponse>(`/apis/ghippo.io/v1alpha1/current-user/phone`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
292
291
|
}
|
|
293
292
|
}
|
package/v1alpha1/sms.pb.ts
CHANGED
|
@@ -5,9 +5,17 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
|
+
|
|
9
|
+
export enum Scene {
|
|
10
|
+
Login = "Login",
|
|
11
|
+
Register = "Register",
|
|
12
|
+
ChangePhone = "ChangePhone",
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export type SendVerificationCodeRequest = {
|
|
9
16
|
phone?: string
|
|
10
17
|
countryCode?: string
|
|
18
|
+
scene?: Scene
|
|
11
19
|
}
|
|
12
20
|
|
|
13
21
|
export type SendVerificationCodeResponse = {
|
package/v1alpha1/user.pb.ts
CHANGED
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../fetch.pb"
|
|
8
|
+
|
|
9
|
+
export enum CertifySubject {
|
|
10
|
+
Individual = "Individual",
|
|
11
|
+
Enterprise = "Enterprise",
|
|
12
|
+
College = "College",
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
export type ListUsersRequest = {
|
|
9
16
|
search?: string
|
|
10
17
|
pageSize?: number
|
|
@@ -258,6 +265,16 @@ export type GetUserCertifyInfoResponse = {
|
|
|
258
265
|
certifyAt?: string
|
|
259
266
|
}
|
|
260
267
|
|
|
268
|
+
export type UpdateUserCertifyRequest = {
|
|
269
|
+
userId?: string
|
|
270
|
+
certName?: string
|
|
271
|
+
certNo?: string
|
|
272
|
+
subject?: CertifySubject
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export type UpdateUserCertifyResponse = {
|
|
276
|
+
}
|
|
277
|
+
|
|
261
278
|
export class Users {
|
|
262
279
|
static ListUsers(req: ListUsersRequest, initReq?: fm.InitReq): Promise<ListUsersResponse> {
|
|
263
280
|
return fm.fetchReq<ListUsersRequest, ListUsersResponse>(`/apis/ghippo.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -316,6 +333,9 @@ export class Users {
|
|
|
316
333
|
static VerifyUserSSHPublicKey(req: VerifyUserSSHPublicKeyRequest, initReq?: fm.InitReq): Promise<VerifyUserSSHPublicKeyResponse> {
|
|
317
334
|
return fm.fetchReq<VerifyUserSSHPublicKeyRequest, VerifyUserSSHPublicKeyResponse>(`/apis/ghippo.io/v1alpha1/users/${req["username"]}/sshkeys/verify`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
318
335
|
}
|
|
336
|
+
static UpdateUserCertify(req: UpdateUserCertifyRequest, initReq?: fm.InitReq): Promise<UpdateUserCertifyResponse> {
|
|
337
|
+
return fm.fetchReq<UpdateUserCertifyRequest, UpdateUserCertifyResponse>(`/apis/ghippo.io/v1alpha1/users/certify`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
338
|
+
}
|
|
319
339
|
static ListUsersSSHPublicKeys(req: ListUsersSSHPublicKeysRequest, initReq?: fm.InitReq): Promise<ListUsersSSHPublicKeysResponse> {
|
|
320
340
|
return fm.fetchReq<ListUsersSSHPublicKeysRequest, ListUsersSSHPublicKeysResponse>(`/v1alpha1.user.Users/ListUsersSSHPublicKeys`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
321
341
|
}
|