v2: added user status
Signed-off-by: nfel <nfilsaraee@gmail.com>
This commit is contained in:
parent
de57dfda19
commit
65a9344a7c
@ -8,9 +8,7 @@ import "base/v1/msg.proto";
|
|||||||
Internal
|
Internal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message InternalInitRoutesReq {
|
message InternalInitRoutesReq { repeated InternalRoute routes = 1; }
|
||||||
repeated InternalRoute routes = 1;
|
|
||||||
}
|
|
||||||
message InternalRoute {
|
message InternalRoute {
|
||||||
string path = 1;
|
string path = 1;
|
||||||
string method = 2;
|
string method = 2;
|
||||||
@ -32,20 +30,14 @@ message Permission {
|
|||||||
string method = 5;
|
string method = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PermissionList {
|
message PermissionList { repeated Permission list = 1; }
|
||||||
repeated Permission list = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UserSendOtp
|
UserSendOtp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message UserSendOtpReq {
|
message UserSendOtpReq { string mobile = 1; }
|
||||||
string mobile = 1;
|
message UserSendOtpRes { int64 expired_at = 1; }
|
||||||
}
|
|
||||||
message UserSendOtpRes {
|
|
||||||
int64 expired_at = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UserLogin
|
UserLogin
|
||||||
@ -55,9 +47,7 @@ message UserLoginReq {
|
|||||||
string mobile = 1;
|
string mobile = 1;
|
||||||
string otp_code = 2;
|
string otp_code = 2;
|
||||||
}
|
}
|
||||||
message UserRefreshTokenReq {
|
message UserRefreshTokenReq { string refresh_token = 1; }
|
||||||
string refresh_token = 1;
|
|
||||||
}
|
|
||||||
message UserAccessTokenRes {
|
message UserAccessTokenRes {
|
||||||
string access_token = 1;
|
string access_token = 1;
|
||||||
int64 access_expired_at = 2;
|
int64 access_expired_at = 2;
|
||||||
@ -102,9 +92,7 @@ message ReqWithIAMAndParams {
|
|||||||
optional bool accepted = 2;
|
optional bool accepted = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ReqWithOptionalIAM {
|
message ReqWithOptionalIAM { optional InternalIAM iam = 1; }
|
||||||
optional InternalIAM iam = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
User
|
User
|
||||||
@ -114,15 +102,26 @@ message GetUserReq {
|
|||||||
string national_id = 2;
|
string national_id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum UserStatus {
|
||||||
|
USER_STATUS_UNKNOWN = 0;
|
||||||
|
USER_STATUS_CREATED = 1;
|
||||||
|
USER_STATUS_VALID_LV1 = 2;
|
||||||
|
USER_STATUS_VALID_LV2 = 3;
|
||||||
|
USER_STATUS_VALID_LV3 = 4;
|
||||||
|
USER_STATUS_BANNED = 5;
|
||||||
|
USER_STATUS_DELETED = 6;
|
||||||
|
}
|
||||||
|
|
||||||
message User {
|
message User {
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string national_id = 2;
|
string national_id = 2;
|
||||||
string mobile = 3;
|
string mobile = 3;
|
||||||
string email = 4;
|
string email = 4;
|
||||||
repeated int64 roles = 5;
|
UserStatus status = 5;
|
||||||
|
repeated int64 roles = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
message UserAddress{
|
message UserAddress {
|
||||||
string postal_code = 2;
|
string postal_code = 2;
|
||||||
string user_address = 3;
|
string user_address = 3;
|
||||||
}
|
}
|
||||||
@ -195,11 +194,10 @@ message UserUpdateBankInfoReq {
|
|||||||
string card_number = 4;
|
string card_number = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message BankInfoList {
|
message BankInfoList { repeated BankInfo list = 1; }
|
||||||
repeated BankInfo list = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Status 0: Fail Verify, 1: Verified, 2: Does not Match user's credential , 3: Closed for potential fraud
|
// Status 0: Fail Verify, 1: Verified, 2: Does not Match user's credential , 3:
|
||||||
|
// Closed for potential fraud
|
||||||
enum BankInfoStatusEnum {
|
enum BankInfoStatusEnum {
|
||||||
FAIL_VERIFY = 0;
|
FAIL_VERIFY = 0;
|
||||||
VERIFIED = 1;
|
VERIFIED = 1;
|
||||||
@ -227,7 +225,8 @@ message TFAReq {
|
|||||||
InternalIAM iam = 1;
|
InternalIAM iam = 1;
|
||||||
optional string mobile = 2;
|
optional string mobile = 2;
|
||||||
optional string email = 3;
|
optional string email = 3;
|
||||||
optional string reason = 4; // issued jwt reason -> can be login, redeem, withdrawal
|
optional string reason =
|
||||||
|
4; // issued jwt reason -> can be login, redeem, withdrawal
|
||||||
optional int64 id = 5;
|
optional int64 id = 5;
|
||||||
optional TfaStateEnum state = 6;
|
optional TfaStateEnum state = 6;
|
||||||
}
|
}
|
||||||
@ -275,13 +274,9 @@ message Recipient {
|
|||||||
optional string public_key = 5;
|
optional string public_key = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message LookUpNameReq {
|
message LookUpNameReq { Recipient recipient = 1; }
|
||||||
Recipient recipient = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message LookUpNameRes {
|
message LookUpNameRes { Recipient recipient = 1; }
|
||||||
Recipient recipient = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message BasicUserInfo {
|
message BasicUserInfo {
|
||||||
string name = 1;
|
string name = 1;
|
||||||
@ -290,6 +285,4 @@ message BasicUserInfo {
|
|||||||
int64 user_id = 4;
|
int64 user_id = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message BasicUserInfoList {
|
message BasicUserInfoList { repeated BasicUserInfo list = 1; }
|
||||||
repeated BasicUserInfo list = 1;
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user