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:
parent
3eac30a1e3
commit
c5baf25a24
@ -3,13 +3,6 @@ syntax = "proto3";
|
||||
package alert.v1;
|
||||
|
||||
import "auth/v1/msg.proto";
|
||||
import "base/v1/msg.proto";
|
||||
|
||||
message AlertFilter {
|
||||
base.v1.BaseQueryParam base_filter = 1;
|
||||
Importance importance = 2;
|
||||
LogSource source = 3;
|
||||
}
|
||||
|
||||
// Importance of given event
|
||||
enum Importance {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -14,23 +14,13 @@ message IdReq {
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
|
||||
message YesNoRes {
|
||||
bool yes = 1;
|
||||
}
|
||||
message PaginationReq {
|
||||
uint32 page = 1; // in query param it will be p
|
||||
uint32 page_size = 2; // in query param it will be pz
|
||||
}
|
||||
|
||||
message PaginationRespSample {
|
||||
|
||||
message PaginationResp {
|
||||
uint32 no = 1;
|
||||
uint32 size = 2;
|
||||
optional uint32 count = 3;
|
||||
}
|
||||
|
||||
message BaseQueryParam {
|
||||
repeated string sort = 2; // sort by
|
||||
optional PaginationReq page = 3;
|
||||
uint32 page_no = 2;
|
||||
uint32 page_size = 3;
|
||||
optional uint32 total_count = 4;
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ syntax = "proto3";
|
||||
package market.v1;
|
||||
|
||||
import "auth/v1/msg.proto";
|
||||
import "base/v1/msg.proto";
|
||||
import "wallet/v1/msg.proto";
|
||||
|
||||
enum MarketParticipantType {
|
||||
@ -36,8 +35,7 @@ message CalcMarketReq {
|
||||
double amount = 4;
|
||||
double unit_price = 5;
|
||||
MarketParticipantType type = 6;
|
||||
wallet.v1.BuyAssetSide req_side =
|
||||
7; // For Calculation : can be from asset or irt
|
||||
wallet.v1.BuyAssetSide req_side = 7; // For Calculation : can be from asset or irt
|
||||
}
|
||||
|
||||
message CalcMarketRes {
|
||||
@ -45,8 +43,7 @@ message CalcMarketRes {
|
||||
double calculated_asset_amount = 2;
|
||||
wallet.v1.EffectiveCommission commission = 3;
|
||||
MarketParticipantType type = 4;
|
||||
wallet.v1.BuyAssetSide req_side =
|
||||
5; // For Calculation : can be from asset or irt
|
||||
wallet.v1.BuyAssetSide req_side = 5; // For Calculation : can be from asset or irt
|
||||
}
|
||||
|
||||
message MPHistoryFilter {}
|
||||
@ -78,20 +75,23 @@ message MarketOrder {
|
||||
}
|
||||
|
||||
message MarketAssetListReq {
|
||||
base.v1.BaseQueryParam base = 1;
|
||||
optional auth.v1.InternalIAM iam =
|
||||
2; // If not set, will returns only public orders which are limited by a
|
||||
// white list
|
||||
optional auth.v1.InternalIAM iam = 1; // If not set, will returns only public orders which are limited by a
|
||||
optional uint32 page_no = 2;
|
||||
optional uint32 page_size = 3;
|
||||
}
|
||||
|
||||
message MarketAssetList { repeated wallet.v1.Asset list = 1; }
|
||||
message MarketAssetList {
|
||||
repeated wallet.v1.Asset list = 1;
|
||||
uint32 page_no = 2;
|
||||
uint32 page_size = 3;
|
||||
optional uint32 total_count = 4;
|
||||
}
|
||||
|
||||
message PurchaseReq {
|
||||
auth.v1.InternalIAM iam = 1;
|
||||
uint64 order_id = 2;
|
||||
double amount = 3;
|
||||
wallet.v1.BuyAssetSide req_side =
|
||||
7; // For Calculation : can be from asset or irt
|
||||
wallet.v1.BuyAssetSide req_side = 7; // For Calculation : can be from asset or irt
|
||||
optional bool accepted_contract = 4;
|
||||
optional auth.v1.TFA tfa = 5;
|
||||
}
|
||||
@ -105,8 +105,10 @@ message PurchaseRes {
|
||||
}
|
||||
|
||||
message MarketOrderList {
|
||||
base.v1.PaginationResp page = 2;
|
||||
repeated MarketOrder list = 1;
|
||||
uint32 page_no = 2;
|
||||
uint32 page_size = 3;
|
||||
optional uint32 total_count = 4;
|
||||
}
|
||||
|
||||
message NewMarketReq {
|
||||
@ -116,8 +118,7 @@ message NewMarketReq {
|
||||
double amount = 4;
|
||||
double unit_price = 5;
|
||||
MarketParticipantType type = 6;
|
||||
wallet.v1.BuyAssetSide req_side =
|
||||
7; // For Calculation : can be from asset or irt
|
||||
wallet.v1.BuyAssetSide req_side = 7; // For Calculation : can be from asset or irt
|
||||
MarketOrderSide side = 8;
|
||||
optional auth.v1.TFA tfa = 9;
|
||||
optional bool accepted_contract = 10;
|
||||
@ -137,7 +138,6 @@ enum MarketOrdersSortBy {
|
||||
|
||||
message OrderListFilter {
|
||||
optional auth.v1.InternalIAM iam = 1;
|
||||
base.v1.BaseQueryParam base = 2;
|
||||
optional string search = 3;
|
||||
optional MarketOrderSide side = 4;
|
||||
repeated MarketOrderStatus status = 5;
|
||||
@ -154,4 +154,6 @@ message OrderListFilter {
|
||||
optional string from_date = 16;
|
||||
optional string to_date = 17;
|
||||
optional MarketOrdersSortBy sort_by = 18;
|
||||
optional uint32 page_no = 19;
|
||||
optional uint32 page_size = 20;
|
||||
}
|
||||
|
||||
@ -45,10 +45,13 @@ message UserInitWalletReq {
|
||||
|
||||
message WalletList {
|
||||
repeated Wallet list = 1;
|
||||
// optional base.v1.Pagination pagination = 2;
|
||||
double available_balance = 3;
|
||||
double locked_balance = 4;
|
||||
double total_balance = 5;
|
||||
|
||||
uint32 page_no = 6;
|
||||
uint32 page_size = 7;
|
||||
optional uint32 total_count = 8;
|
||||
}
|
||||
|
||||
message Wallet {
|
||||
@ -147,6 +150,9 @@ enum AssetType {
|
||||
|
||||
message AssetList {
|
||||
repeated Asset list = 1;
|
||||
uint32 page_no = 2;
|
||||
uint32 page_size = 3;
|
||||
optional uint32 total_count = 4;
|
||||
}
|
||||
|
||||
message AssetFilter {
|
||||
@ -282,10 +288,10 @@ message UserBNPLResp {
|
||||
message UserBNPLReq {
|
||||
uint64 id = 1;
|
||||
int64 bnpl_id = 2;
|
||||
auth.v1.InternalIAM iam = 6;
|
||||
optional string created_at = 3;
|
||||
optional string employee_id = 4;
|
||||
optional int64 company_id = 5;
|
||||
auth.v1.InternalIAM iam = 6;
|
||||
optional float amount = 7;
|
||||
optional PaymentPeriodInfo payment_period = 8;
|
||||
optional bool has_agreed_contract = 9;
|
||||
@ -315,6 +321,9 @@ message BNPLInfo {
|
||||
|
||||
message BNPLList {
|
||||
repeated BNPLInfo list = 1;
|
||||
uint32 page_no = 2;
|
||||
uint32 page_size = 3;
|
||||
optional uint32 total_count = 4;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -323,7 +332,9 @@ message BNPLList {
|
||||
|
||||
message TransactionList {
|
||||
repeated Transaction list = 1;
|
||||
int64 total_count = 2;
|
||||
uint32 page_no = 2;
|
||||
uint32 page_size = 3;
|
||||
optional uint32 total_count = 4;
|
||||
}
|
||||
|
||||
enum TransactionType {
|
||||
@ -381,7 +392,7 @@ message Transaction {
|
||||
|
||||
message UserGetTransactionListReq {
|
||||
auth.v1.InternalIAM iam = 1;
|
||||
optional int32 page_index = 2;
|
||||
optional int32 page_no = 2;
|
||||
optional int32 page_size = 3;
|
||||
optional int64 id = 4;
|
||||
optional int64 asset_id = 5;
|
||||
@ -458,6 +469,9 @@ message RedeemTokenRes {
|
||||
}
|
||||
message RedeemTokenResList {
|
||||
repeated RedeemTokenRes list = 1;
|
||||
uint32 page_no = 2;
|
||||
uint32 page_size = 3;
|
||||
optional uint32 total_count = 4;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -499,6 +513,9 @@ message Network {
|
||||
|
||||
message NetworkList {
|
||||
repeated Network list = 1;
|
||||
uint32 page_no = 2;
|
||||
uint32 page_size = 3;
|
||||
optional uint32 total_count = 4;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -530,6 +547,9 @@ message Commission {
|
||||
|
||||
message CommissionList {
|
||||
repeated Commission list = 1;
|
||||
uint32 page_no = 2;
|
||||
uint32 page_size = 3;
|
||||
optional uint32 total_count = 4;
|
||||
}
|
||||
|
||||
message EffectiveCommission {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user