@daocloud-proto/hydra 0.5.0-dev-18 → 0.5.0-dev-20
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/common/errorcode.ts
CHANGED
|
@@ -9,6 +9,9 @@ export enum ErrorCode {
|
|
|
9
9
|
// EN: resource not found: %v
|
|
10
10
|
// ZH: 资源未找到:%v
|
|
11
11
|
SYSTEM_NOT_FOUND_ERROR = "SYSTEM-NOT_FOUND_ERROR",
|
|
12
|
+
// EN: user is no real-name authentication
|
|
13
|
+
// ZH: 用户未实名认证
|
|
14
|
+
SYSTEM_NOT_VERIFIED_ERROR = "SYSTEM-NOT_VERIFIED_ERROR",
|
|
12
15
|
// EN: order system error: %v
|
|
13
16
|
// ZH: 订单系统错误:%v
|
|
14
17
|
SYSTEM_ORDER_SYSTEM_ERROR = "SYSTEM-ORDER_SYSTEM_ERROR",
|
|
@@ -0,0 +1,23 @@
|
|
|
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 CurrentUserRequest = {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type UserInfo = {
|
|
12
|
+
id?: string
|
|
13
|
+
username?: string
|
|
14
|
+
balance?: string
|
|
15
|
+
amount?: string
|
|
16
|
+
idVerified?: boolean
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class UserService {
|
|
20
|
+
static CurrentUser(req: CurrentUserRequest, initReq?: fm.InitReq): Promise<UserInfo> {
|
|
21
|
+
return fm.fetchReq<CurrentUserRequest, UserInfo>(`/apis/hydra.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
22
|
+
}
|
|
23
|
+
}
|