Requests with list as their response now accept

page_no, page_size
Responses with list now have
page_no, page_size, optional total_count
This commit is contained in:
2025-07-16 15:53:24 +03:30
parent 3eac30a1e3
commit c5baf25a24
5 changed files with 93 additions and 73 deletions
+40 -25
View File
@@ -2,13 +2,13 @@ syntax = "proto3";
package auth.v1;
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;
@@ -30,14 +30,23 @@ message Permission {
string method = 5;
}
message PermissionList { repeated Permission list = 1; }
message PermissionList {
repeated Permission list = 1;
uint32 page_no = 2;
uint32 page_size = 3;
optional uint32 total_count = 4;
}
/*
UserSendOtp
*/
message UserSendOtpReq { string mobile = 1; }
message UserSendOtpRes { int64 expired_at = 1; }
message UserSendOtpReq {
string mobile = 1;
}
message UserSendOtpRes {
int64 expired_at = 1;
}
/*
UserLogin
@@ -47,7 +56,9 @@ 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;
@@ -81,18 +92,14 @@ message IdReqWithIAMAndTFA {
TFA tfa = 6;
}
// Used for endpoints that need token and Query Param
message IAMWithQP {
InternalIAM iam = 1;
base.v1.BaseQueryParam qp = 2;
}
message ReqWithIAMAndParams {
InternalIAM iam = 1;
optional bool accepted = 2;
}
message ReqWithOptionalIAM { optional InternalIAM iam = 1; }
message ReqWithOptionalIAM {
optional InternalIAM iam = 1;
}
/*
User
@@ -195,7 +202,12 @@ message UserUpdateBankInfoReq {
string card_number = 4;
}
message BankInfoList { repeated BankInfo list = 1; }
message BankInfoList {
repeated BankInfo list = 1;
uint32 page_no = 2;
uint32 page_size = 3;
optional uint32 total_count = 4;
}
// Status 0: Fail Verify, 1: Verified, 2: Does not Match user's credential , 3:
// Closed for potential fraud
@@ -217,17 +229,11 @@ message BankInfo {
}
/* Two Factor Authentication */
// message IdReqWithIAMAndTFA {
// int64 id = 1;
// InternalIAM iam = 2;
// string tfa_code = 3;
// }
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,9 +281,13 @@ 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;
@@ -286,4 +296,9 @@ message BasicUserInfo {
int64 user_id = 4;
}
message BasicUserInfoList { repeated BasicUserInfo list = 1; }
message BasicUserInfoList {
repeated BasicUserInfo list = 1;
uint32 page_no = 2;
uint32 page_size = 3;
optional uint32 total_count = 4;
}