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;
|
package alert.v1;
|
||||||
|
|
||||||
import "auth/v1/msg.proto";
|
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
|
// Importance of given event
|
||||||
enum Importance {
|
enum Importance {
|
||||||
|
|||||||
@ -2,13 +2,13 @@ syntax = "proto3";
|
|||||||
|
|
||||||
package auth.v1;
|
package auth.v1;
|
||||||
|
|
||||||
import "base/v1/msg.proto";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Internal
|
Internal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message InternalInitRoutesReq { repeated InternalRoute routes = 1; }
|
message InternalInitRoutesReq {
|
||||||
|
repeated InternalRoute routes = 1;
|
||||||
|
}
|
||||||
message InternalRoute {
|
message InternalRoute {
|
||||||
string path = 1;
|
string path = 1;
|
||||||
string method = 2;
|
string method = 2;
|
||||||
@ -30,14 +30,23 @@ message Permission {
|
|||||||
string method = 5;
|
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
|
UserSendOtp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message UserSendOtpReq { string mobile = 1; }
|
message UserSendOtpReq {
|
||||||
message UserSendOtpRes { int64 expired_at = 1; }
|
string mobile = 1;
|
||||||
|
}
|
||||||
|
message UserSendOtpRes {
|
||||||
|
int64 expired_at = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UserLogin
|
UserLogin
|
||||||
@ -47,7 +56,9 @@ message UserLoginReq {
|
|||||||
string mobile = 1;
|
string mobile = 1;
|
||||||
string otp_code = 2;
|
string otp_code = 2;
|
||||||
}
|
}
|
||||||
message UserRefreshTokenReq { string refresh_token = 1; }
|
message UserRefreshTokenReq {
|
||||||
|
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;
|
||||||
@ -81,18 +92,14 @@ message IdReqWithIAMAndTFA {
|
|||||||
TFA tfa = 6;
|
TFA tfa = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used for endpoints that need token and Query Param
|
|
||||||
message IAMWithQP {
|
|
||||||
InternalIAM iam = 1;
|
|
||||||
base.v1.BaseQueryParam qp = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message ReqWithIAMAndParams {
|
message ReqWithIAMAndParams {
|
||||||
InternalIAM iam = 1;
|
InternalIAM iam = 1;
|
||||||
optional bool accepted = 2;
|
optional bool accepted = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ReqWithOptionalIAM { optional InternalIAM iam = 1; }
|
message ReqWithOptionalIAM {
|
||||||
|
optional InternalIAM iam = 1;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
User
|
User
|
||||||
@ -195,7 +202,12 @@ message UserUpdateBankInfoReq {
|
|||||||
string card_number = 4;
|
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:
|
// Status 0: Fail Verify, 1: Verified, 2: Does not Match user's credential , 3:
|
||||||
// Closed for potential fraud
|
// Closed for potential fraud
|
||||||
@ -217,17 +229,11 @@ message BankInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Two Factor Authentication */
|
/* Two Factor Authentication */
|
||||||
// message IdReqWithIAMAndTFA {
|
|
||||||
// int64 id = 1;
|
|
||||||
// InternalIAM iam = 2;
|
|
||||||
// string tfa_code = 3;
|
|
||||||
// }
|
|
||||||
message TFAReq {
|
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 =
|
optional string reason = 4; // issued jwt reason -> can be login, redeem, withdrawal
|
||||||
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,9 +281,13 @@ message Recipient {
|
|||||||
optional string public_key = 5;
|
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 {
|
message BasicUserInfo {
|
||||||
string name = 1;
|
string name = 1;
|
||||||
@ -286,4 +296,9 @@ message BasicUserInfo {
|
|||||||
int64 user_id = 4;
|
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;
|
int64 id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message YesNoRes {
|
||||||
message YesNoRes{
|
|
||||||
bool yes = 1;
|
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 page_no = 2;
|
||||||
uint32 no = 1;
|
uint32 page_size = 3;
|
||||||
uint32 size = 2;
|
optional uint32 total_count = 4;
|
||||||
optional uint32 count = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message BaseQueryParam {
|
|
||||||
repeated string sort = 2; // sort by
|
|
||||||
optional PaginationReq page = 3;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,6 @@ syntax = "proto3";
|
|||||||
package market.v1;
|
package market.v1;
|
||||||
|
|
||||||
import "auth/v1/msg.proto";
|
import "auth/v1/msg.proto";
|
||||||
import "base/v1/msg.proto";
|
|
||||||
import "wallet/v1/msg.proto";
|
import "wallet/v1/msg.proto";
|
||||||
|
|
||||||
enum MarketParticipantType {
|
enum MarketParticipantType {
|
||||||
@ -36,8 +35,7 @@ message CalcMarketReq {
|
|||||||
double amount = 4;
|
double amount = 4;
|
||||||
double unit_price = 5;
|
double unit_price = 5;
|
||||||
MarketParticipantType type = 6;
|
MarketParticipantType type = 6;
|
||||||
wallet.v1.BuyAssetSide req_side =
|
wallet.v1.BuyAssetSide req_side = 7; // For Calculation : can be from asset or irt
|
||||||
7; // For Calculation : can be from asset or irt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message CalcMarketRes {
|
message CalcMarketRes {
|
||||||
@ -45,8 +43,7 @@ message CalcMarketRes {
|
|||||||
double calculated_asset_amount = 2;
|
double calculated_asset_amount = 2;
|
||||||
wallet.v1.EffectiveCommission commission = 3;
|
wallet.v1.EffectiveCommission commission = 3;
|
||||||
MarketParticipantType type = 4;
|
MarketParticipantType type = 4;
|
||||||
wallet.v1.BuyAssetSide req_side =
|
wallet.v1.BuyAssetSide req_side = 5; // For Calculation : can be from asset or irt
|
||||||
5; // For Calculation : can be from asset or irt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message MPHistoryFilter {}
|
message MPHistoryFilter {}
|
||||||
@ -78,20 +75,23 @@ message MarketOrder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message MarketAssetListReq {
|
message MarketAssetListReq {
|
||||||
base.v1.BaseQueryParam base = 1;
|
optional auth.v1.InternalIAM iam = 1; // If not set, will returns only public orders which are limited by a
|
||||||
optional auth.v1.InternalIAM iam =
|
optional uint32 page_no = 2;
|
||||||
2; // If not set, will returns only public orders which are limited by a
|
optional uint32 page_size = 3;
|
||||||
// white list
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
message PurchaseReq {
|
||||||
auth.v1.InternalIAM iam = 1;
|
auth.v1.InternalIAM iam = 1;
|
||||||
uint64 order_id = 2;
|
uint64 order_id = 2;
|
||||||
double amount = 3;
|
double amount = 3;
|
||||||
wallet.v1.BuyAssetSide req_side =
|
wallet.v1.BuyAssetSide req_side = 7; // For Calculation : can be from asset or irt
|
||||||
7; // For Calculation : can be from asset or irt
|
|
||||||
optional bool accepted_contract = 4;
|
optional bool accepted_contract = 4;
|
||||||
optional auth.v1.TFA tfa = 5;
|
optional auth.v1.TFA tfa = 5;
|
||||||
}
|
}
|
||||||
@ -105,8 +105,10 @@ message PurchaseRes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message MarketOrderList {
|
message MarketOrderList {
|
||||||
base.v1.PaginationResp page = 2;
|
|
||||||
repeated MarketOrder list = 1;
|
repeated MarketOrder list = 1;
|
||||||
|
uint32 page_no = 2;
|
||||||
|
uint32 page_size = 3;
|
||||||
|
optional uint32 total_count = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message NewMarketReq {
|
message NewMarketReq {
|
||||||
@ -116,8 +118,7 @@ message NewMarketReq {
|
|||||||
double amount = 4;
|
double amount = 4;
|
||||||
double unit_price = 5;
|
double unit_price = 5;
|
||||||
MarketParticipantType type = 6;
|
MarketParticipantType type = 6;
|
||||||
wallet.v1.BuyAssetSide req_side =
|
wallet.v1.BuyAssetSide req_side = 7; // For Calculation : can be from asset or irt
|
||||||
7; // For Calculation : can be from asset or irt
|
|
||||||
MarketOrderSide side = 8;
|
MarketOrderSide side = 8;
|
||||||
optional auth.v1.TFA tfa = 9;
|
optional auth.v1.TFA tfa = 9;
|
||||||
optional bool accepted_contract = 10;
|
optional bool accepted_contract = 10;
|
||||||
@ -137,7 +138,6 @@ enum MarketOrdersSortBy {
|
|||||||
|
|
||||||
message OrderListFilter {
|
message OrderListFilter {
|
||||||
optional auth.v1.InternalIAM iam = 1;
|
optional auth.v1.InternalIAM iam = 1;
|
||||||
base.v1.BaseQueryParam base = 2;
|
|
||||||
optional string search = 3;
|
optional string search = 3;
|
||||||
optional MarketOrderSide side = 4;
|
optional MarketOrderSide side = 4;
|
||||||
repeated MarketOrderStatus status = 5;
|
repeated MarketOrderStatus status = 5;
|
||||||
@ -154,4 +154,6 @@ message OrderListFilter {
|
|||||||
optional string from_date = 16;
|
optional string from_date = 16;
|
||||||
optional string to_date = 17;
|
optional string to_date = 17;
|
||||||
optional MarketOrdersSortBy sort_by = 18;
|
optional MarketOrdersSortBy sort_by = 18;
|
||||||
|
optional uint32 page_no = 19;
|
||||||
|
optional uint32 page_size = 20;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,10 +45,13 @@ message UserInitWalletReq {
|
|||||||
|
|
||||||
message WalletList {
|
message WalletList {
|
||||||
repeated Wallet list = 1;
|
repeated Wallet list = 1;
|
||||||
// optional base.v1.Pagination pagination = 2;
|
|
||||||
double available_balance = 3;
|
double available_balance = 3;
|
||||||
double locked_balance = 4;
|
double locked_balance = 4;
|
||||||
double total_balance = 5;
|
double total_balance = 5;
|
||||||
|
|
||||||
|
uint32 page_no = 6;
|
||||||
|
uint32 page_size = 7;
|
||||||
|
optional uint32 total_count = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Wallet {
|
message Wallet {
|
||||||
@ -147,6 +150,9 @@ enum AssetType {
|
|||||||
|
|
||||||
message AssetList {
|
message AssetList {
|
||||||
repeated Asset list = 1;
|
repeated Asset list = 1;
|
||||||
|
uint32 page_no = 2;
|
||||||
|
uint32 page_size = 3;
|
||||||
|
optional uint32 total_count = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message AssetFilter {
|
message AssetFilter {
|
||||||
@ -282,10 +288,10 @@ message UserBNPLResp {
|
|||||||
message UserBNPLReq {
|
message UserBNPLReq {
|
||||||
uint64 id = 1;
|
uint64 id = 1;
|
||||||
int64 bnpl_id = 2;
|
int64 bnpl_id = 2;
|
||||||
auth.v1.InternalIAM iam = 6;
|
|
||||||
optional string created_at = 3;
|
optional string created_at = 3;
|
||||||
optional string employee_id = 4;
|
optional string employee_id = 4;
|
||||||
optional int64 company_id = 5;
|
optional int64 company_id = 5;
|
||||||
|
auth.v1.InternalIAM iam = 6;
|
||||||
optional float amount = 7;
|
optional float amount = 7;
|
||||||
optional PaymentPeriodInfo payment_period = 8;
|
optional PaymentPeriodInfo payment_period = 8;
|
||||||
optional bool has_agreed_contract = 9;
|
optional bool has_agreed_contract = 9;
|
||||||
@ -315,6 +321,9 @@ message BNPLInfo {
|
|||||||
|
|
||||||
message BNPLList {
|
message BNPLList {
|
||||||
repeated BNPLInfo list = 1;
|
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 {
|
message TransactionList {
|
||||||
repeated Transaction list = 1;
|
repeated Transaction list = 1;
|
||||||
int64 total_count = 2;
|
uint32 page_no = 2;
|
||||||
|
uint32 page_size = 3;
|
||||||
|
optional uint32 total_count = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TransactionType {
|
enum TransactionType {
|
||||||
@ -381,7 +392,7 @@ message Transaction {
|
|||||||
|
|
||||||
message UserGetTransactionListReq {
|
message UserGetTransactionListReq {
|
||||||
auth.v1.InternalIAM iam = 1;
|
auth.v1.InternalIAM iam = 1;
|
||||||
optional int32 page_index = 2;
|
optional int32 page_no = 2;
|
||||||
optional int32 page_size = 3;
|
optional int32 page_size = 3;
|
||||||
optional int64 id = 4;
|
optional int64 id = 4;
|
||||||
optional int64 asset_id = 5;
|
optional int64 asset_id = 5;
|
||||||
@ -458,6 +469,9 @@ message RedeemTokenRes {
|
|||||||
}
|
}
|
||||||
message RedeemTokenResList {
|
message RedeemTokenResList {
|
||||||
repeated RedeemTokenRes list = 1;
|
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 {
|
message NetworkList {
|
||||||
repeated Network list = 1;
|
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 {
|
message CommissionList {
|
||||||
repeated Commission list = 1;
|
repeated Commission list = 1;
|
||||||
|
uint32 page_no = 2;
|
||||||
|
uint32 page_size = 3;
|
||||||
|
optional uint32 total_count = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message EffectiveCommission {
|
message EffectiveCommission {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user