v2: added user status

Signed-off-by: nfel <nfilsaraee@gmail.com>
This commit is contained in:
nfel 2025-07-09 12:34:03 +03:30
parent de57dfda19
commit 65a9344a7c
Signed by: nfel
GPG Key ID: DCC0BF3F92B0D45F

View File

@ -8,9 +8,7 @@ import "base/v1/msg.proto";
Internal
*/
message InternalInitRoutesReq {
repeated InternalRoute routes = 1;
}
message InternalInitRoutesReq { repeated InternalRoute routes = 1; }
message InternalRoute {
string path = 1;
string method = 2;
@ -32,20 +30,14 @@ message Permission {
string method = 5;
}
message PermissionList {
repeated Permission list = 1;
}
message PermissionList { repeated Permission list = 1; }
/*
UserSendOtp
*/
message UserSendOtpReq {
string mobile = 1;
}
message UserSendOtpRes {
int64 expired_at = 1;
}
message UserSendOtpReq { string mobile = 1; }
message UserSendOtpRes { int64 expired_at = 1; }
/*
UserLogin
@ -55,9 +47,7 @@ message UserLoginReq {
string mobile = 1;
string otp_code = 2;
}
message UserRefreshTokenReq {
string refresh_token = 1;
}
message UserRefreshTokenReq { string refresh_token = 1; }
message UserAccessTokenRes {
string access_token = 1;
int64 access_expired_at = 2;
@ -102,9 +92,7 @@ message ReqWithIAMAndParams {
optional bool accepted = 2;
}
message ReqWithOptionalIAM {
optional InternalIAM iam = 1;
}
message ReqWithOptionalIAM { optional InternalIAM iam = 1; }
/*
User
@ -114,12 +102,23 @@ message GetUserReq {
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 {
int64 id = 1;
string national_id = 2;
string mobile = 3;
string email = 4;
repeated int64 roles = 5;
UserStatus status = 5;
repeated int64 roles = 6;
}
message UserAddress {
@ -195,11 +194,10 @@ message UserUpdateBankInfoReq {
string card_number = 4;
}
message BankInfoList {
repeated BankInfo list = 1;
}
message BankInfoList { 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 {
FAIL_VERIFY = 0;
VERIFIED = 1;
@ -227,7 +225,8 @@ message TFAReq {
InternalIAM iam = 1;
optional string mobile = 2;
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 TfaStateEnum state = 6;
}
@ -275,13 +274,9 @@ message Recipient {
optional string public_key = 5;
}
message LookUpNameReq {
Recipient recipient = 1;
}
message LookUpNameReq { Recipient recipient = 1; }
message LookUpNameRes {
Recipient recipient = 1;
}
message LookUpNameRes { Recipient recipient = 1; }
message BasicUserInfo {
string name = 1;
@ -290,6 +285,4 @@ message BasicUserInfo {
int64 user_id = 4;
}
message BasicUserInfoList {
repeated BasicUserInfo list = 1;
}
message BasicUserInfoList { repeated BasicUserInfo list = 1; }