Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 227e77d7e5 | |||
| c67c92bdb5 | |||
| eb7bb4854f | |||
| 88cfb4e150 | |||
| 3a44056962 | |||
| c24f5b928f | |||
| 3cd0807585 | |||
| 4010238f8d | |||
| dec09ea33a | |||
| 9609bdfa05 | |||
| 330f8e8bf1 | |||
| a42dd81ede | |||
| cb42f5f673 | |||
| 4d4d4d8820 | |||
| b3e04457f6 | |||
| 016219f1da | |||
| bcdcb6bb21 | |||
| 33896c1aaa | |||
| 2f5fd8a095 | |||
| 0479fca6b5 | |||
| 930dc67791 | |||
| f87dc92d3e | |||
| 039ae2316f | |||
| a61ba518d7 | |||
| 9194906abf | |||
| ddee0dcfbb | |||
| 6e94e0a847 | |||
| dc8d2100b5 | |||
| 14cd8ca8b5 | |||
| 6b2b6b105a | |||
| 6d35ea5706 | |||
| 1e8e8ca920 | |||
| 4be296ee58 | |||
| 39fa4037d8 | |||
| 8f1aa65f99 | |||
| 59284082ac | |||
| 68accdeef0 | |||
| 81b00a7416 | |||
| 79374f9fe7 | |||
| 55e4b6cba2 | |||
| c6850f7d9f | |||
| 95f6f8c032 | |||
| b8d8aac599 | |||
| 0e93462481 |
@ -2,27 +2,37 @@ syntax = "proto3";
|
|||||||
|
|
||||||
package authorization;
|
package authorization;
|
||||||
|
|
||||||
import "base_message.proto";
|
|
||||||
import "authorization_message.proto";
|
import "authorization_message.proto";
|
||||||
|
import "base_message.proto";
|
||||||
|
|
||||||
service AuthorizationService {
|
service AuthorizationService {
|
||||||
rpc InternalAuthorizationDeleteCache(base.Empty) returns(base.StatusRes);
|
rpc InternalAuthorizationDeleteCache(base.Empty) returns (base.StatusRes);
|
||||||
rpc InternalInitRoutes(InternalInitRoutesReq) returns (base.StatusRes){}
|
rpc InternalInitRoutes(InternalInitRoutesReq) returns (base.StatusRes) {}
|
||||||
rpc InternalGetUserIdentityBasic(GetUserReq) returns(UserIdentityBasic){}
|
rpc InternalGetUserIdentityBasic(GetUserReq) returns (UserIdentityBasic) {}
|
||||||
rpc InternalGetUserIAM(GetUserReq) returns(InternalIAM){}
|
rpc InternalGetUserIAM(GetUserReq) returns (InternalIAM) {}
|
||||||
rpc CheckIAM(CheckIAMReq) returns (InternalIAM){}
|
rpc CheckIAM(CheckIAMReq) returns (InternalIAM) {}
|
||||||
|
|
||||||
rpc UserLoginSendOTP(UserSendOtpReq) returns (UserSendOtpRes){}
|
rpc UserLoginSendOTP(UserSendOtpReq) returns (UserSendOtpRes) {}
|
||||||
rpc UserLoginWithOTP(UserLoginReq) returns (UserAccessTokenRes){}
|
rpc UserLoginWithOTP(UserLoginReq) returns (UserAccessTokenRes) {}
|
||||||
rpc UserGetAccessTokenByRefreshToken(UserRefreshTokenReq) returns (UserAccessTokenRes){}
|
rpc UserGetAccessTokenByRefreshToken(UserRefreshTokenReq)
|
||||||
|
returns (UserAccessTokenRes) {}
|
||||||
|
|
||||||
rpc UserGetUserPermission(InternalIAM) returns (PermissionList){}
|
rpc UserGetUserPermission(InternalIAM) returns (PermissionList) {}
|
||||||
|
|
||||||
rpc UserGetIdentity(InternalIAM) returns (Identity){}
|
rpc UserGetIdentity(InternalIAM) returns (Identity) {}
|
||||||
rpc UserUpdateIdentity(UserUpdateIdentityReq) returns (base.StatusRes){}
|
rpc UserUpdateIdentity(UserUpdateIdentityReq) returns (base.StatusRes) {}
|
||||||
|
|
||||||
rpc UserGetBankInfoList(InternalIAM) returns (BankInfoList){}
|
rpc UserGetBankInfoList(ReqWithIAMAndParams) returns (BankInfoList) {}
|
||||||
rpc UserUpdateBankInfo(UserUpdateBankInfoReq) returns (base.StatusRes){}
|
rpc UserUpdateBankInfo(UserUpdateBankInfoReq) returns (base.StatusRes) {}
|
||||||
|
rpc UserRemoveBankInfo(IdReqWithIAM) returns (base.StatusRes) {}
|
||||||
|
|
||||||
rpc GetUser(GetUserReq) returns (User){}
|
rpc GetUser(GetUserReq) returns (User) {}
|
||||||
}
|
|
||||||
|
// Two Factor Authentication
|
||||||
|
// For now it's only SMS-OTP - later will be Email-OTP or other methods can be
|
||||||
|
// added For HMAC-OTP there won't be a need to call this api
|
||||||
|
rpc SendTFAReq(TFAReq) returns (base.StatusRes) {}
|
||||||
|
// For HMAC-OTP an initialization step must be added to exchange keys
|
||||||
|
rpc InitTFAReq(InternalIAM) returns (TFAExRes) {}
|
||||||
|
rpc CheckTFACode(CheckTFAReq) returns (base.StatusRes) {}
|
||||||
|
}
|
||||||
|
|||||||
@ -3,10 +3,10 @@ syntax = "proto3";
|
|||||||
package authorization;
|
package authorization;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Internal
|
Internal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message InternalInitRoutesReq{
|
message InternalInitRoutesReq {
|
||||||
repeated InternalRoute routes = 1;
|
repeated InternalRoute routes = 1;
|
||||||
}
|
}
|
||||||
message InternalRoute {
|
message InternalRoute {
|
||||||
@ -16,14 +16,14 @@ message InternalRoute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Role Permission */
|
/* Role Permission */
|
||||||
message Role{
|
message Role {
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string title = 2;
|
string title = 2;
|
||||||
string Key = 3;
|
string Key = 3;
|
||||||
string type = 4;
|
string type = 4;
|
||||||
}
|
}
|
||||||
message Permission{
|
message Permission {
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string title = 2;
|
string title = 2;
|
||||||
string key = 3;
|
string key = 3;
|
||||||
string route = 4;
|
string route = 4;
|
||||||
@ -35,8 +35,8 @@ message PermissionList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UserSendOtp
|
UserSendOtp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message UserSendOtpReq {
|
message UserSendOtpReq {
|
||||||
string mobile = 1;
|
string mobile = 1;
|
||||||
@ -46,8 +46,8 @@ message UserSendOtpRes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UserLogin
|
UserLogin
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message UserLoginReq {
|
message UserLoginReq {
|
||||||
string mobile = 1;
|
string mobile = 1;
|
||||||
@ -63,26 +63,35 @@ message UserAccessTokenRes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
IAM
|
IAM
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message CheckIAMReq{
|
message CheckIAMReq {
|
||||||
string access_token = 1;
|
string access_token = 1;
|
||||||
string route = 2;
|
string route = 2;
|
||||||
string method = 3;
|
string method = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message InternalIAM {
|
message InternalIAM {
|
||||||
User user = 1;
|
User user = 1;
|
||||||
IdentityBasic identity = 2;
|
IdentityBasic identity = 2;
|
||||||
|
repeated Company company = 3;
|
||||||
|
}
|
||||||
|
message IdReqWithIAM {
|
||||||
|
int64 id = 1;
|
||||||
|
InternalIAM iam = 2;
|
||||||
|
}
|
||||||
|
message ReqWithIAMAndParams {
|
||||||
|
InternalIAM iam = 1;
|
||||||
|
optional bool accepted = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
User
|
User
|
||||||
*/
|
*/
|
||||||
message GetUserReq {
|
message GetUserReq {
|
||||||
int64 user_id = 1;
|
int64 user_id = 1;
|
||||||
string national_id =2;
|
string national_id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message User {
|
message User {
|
||||||
@ -93,6 +102,14 @@ message User {
|
|||||||
repeated int64 roles = 5;
|
repeated int64 roles = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message Company {
|
||||||
|
int64 id = 1;
|
||||||
|
string name = 2;
|
||||||
|
string name_fa = 3;
|
||||||
|
string location = 4;
|
||||||
|
bool can_provide_bnpl = 5;
|
||||||
|
}
|
||||||
|
|
||||||
message Identity {
|
message Identity {
|
||||||
string national_id = 1;
|
string national_id = 1;
|
||||||
string national_serial_id = 2;
|
string national_serial_id = 2;
|
||||||
@ -114,7 +131,9 @@ message Identity {
|
|||||||
string updated_at = 18;
|
string updated_at = 18;
|
||||||
string created_at = 19;
|
string created_at = 19;
|
||||||
string email = 20;
|
string email = 20;
|
||||||
|
string mobile = 21;
|
||||||
|
optional Company company = 22;
|
||||||
|
optional string employee_info = 23;
|
||||||
}
|
}
|
||||||
|
|
||||||
message IdentityBasic {
|
message IdentityBasic {
|
||||||
@ -148,12 +167,44 @@ message BankInfoList {
|
|||||||
repeated BankInfo list = 1;
|
repeated BankInfo list = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Status 0: Fail Verify, 1: Verified, 2: Does not Match user's credential
|
||||||
|
enum BankInfoStatusEnum {
|
||||||
|
FAIL_VERIFY = 0;
|
||||||
|
VERIFIED = 1;
|
||||||
|
DOES_NOT_MATCH = 2;
|
||||||
|
}
|
||||||
message BankInfo {
|
message BankInfo {
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string deposit_number = 2;
|
string deposit_number = 2;
|
||||||
string iban_number = 3;
|
string iban_number = 3;
|
||||||
string card_number = 4;
|
string card_number = 4;
|
||||||
int32 status = 5;
|
BankInfoStatusEnum status = 5;
|
||||||
string updated_at = 6;
|
string updated_at = 6;
|
||||||
string created_at = 7;
|
string created_at = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
}
|
||||||
|
|
||||||
|
// Two Factor Authentication Exchange Response
|
||||||
|
message TFAExRes {
|
||||||
|
InternalIAM iam = 1;
|
||||||
|
string secret = 2;
|
||||||
|
string qrcode_base64 = 3;
|
||||||
|
}
|
||||||
|
message CheckTFAReq {
|
||||||
|
InternalIAM iam = 1;
|
||||||
|
string code = 2;
|
||||||
|
optional string algorithm = 3;
|
||||||
|
optional string reason = 4; // Can be later used as a lookup
|
||||||
|
}
|
||||||
|
|||||||
@ -7,10 +7,9 @@ message Empty {}
|
|||||||
message StatusRes {
|
message StatusRes {
|
||||||
bool success = 1;
|
bool success = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message IdRes {
|
message IdRes {
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
}
|
}
|
||||||
message IdReq {
|
message IdReq {
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
12
buf.yaml
Normal file
12
buf.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
version: v1
|
||||||
|
lint:
|
||||||
|
use:
|
||||||
|
- DEFAULT
|
||||||
|
# disallow_comment_ignores: false
|
||||||
|
# # The default behavior of this key has changed from v1
|
||||||
|
# enum_zero_value_suffix: _UNSPECIFIED
|
||||||
|
# rpc_allow_same_request_response: true
|
||||||
|
# rpc_allow_google_protobuf_empty_requests: false
|
||||||
|
# rpc_allow_google_protobuf_empty_responses: false
|
||||||
|
# service_suffix: Service
|
||||||
43
wallet.proto
43
wallet.proto
@ -2,28 +2,41 @@ syntax = "proto3";
|
|||||||
|
|
||||||
package wallet;
|
package wallet;
|
||||||
|
|
||||||
import "base_message.proto";
|
|
||||||
import "authorization_message.proto";
|
import "authorization_message.proto";
|
||||||
|
import "base_message.proto";
|
||||||
import "wallet_message.proto";
|
import "wallet_message.proto";
|
||||||
|
|
||||||
service WalletService {
|
service WalletService {
|
||||||
rpc InternalWalletDeleteCache(base.Empty) returns(base.StatusRes);
|
rpc InternalWalletDeleteCache(base.Empty) returns (base.StatusRes);
|
||||||
rpc InternalCreateFederation(authorization.InternalIAM) returns(base.StatusRes);
|
rpc InternalCreateFederation(authorization.InternalIAM) returns (base.StatusRes);
|
||||||
|
|
||||||
rpc AdminGetFederation(GetFederationReq) returns(Federation);
|
rpc AdminGetFederation(GetFederationReq) returns (Federation);
|
||||||
rpc UserGetFederation(authorization.InternalIAM) returns(Federation);
|
rpc UserGetFederation(authorization.InternalIAM) returns (Federation);
|
||||||
|
|
||||||
rpc UserGetAssetList(base.Empty) returns(AssetList);
|
rpc UserGetAssetList(base.Empty) returns (AssetList);
|
||||||
rpc AdminGetAssetList(base.Empty) returns(AssetList);
|
rpc AdminGetAssetList(base.Empty) returns (AssetList);
|
||||||
rpc GetAsset(GetAssetReq) returns(Asset);
|
rpc GetAsset(GetAssetReq) returns (Asset);
|
||||||
|
|
||||||
rpc UserInitWallet(UserInitWalletReq) returns(base.StatusRes);
|
rpc UserInitWallet(UserInitWalletReq) returns (base.StatusRes);
|
||||||
rpc UserGetWalletList(authorization.InternalIAM) returns(WalletList);
|
rpc UserGetWalletList(authorization.InternalIAM) returns (WalletList);
|
||||||
rpc UserTransferAsset(UserTransferAssetReq) returns(UserTransferRes);
|
rpc UserTransferAsset(UserTransferAssetReq) returns (UserTransferRes);
|
||||||
|
|
||||||
rpc UserGetTransactionList(UserGetTransactionListReq) returns(TransactionList);
|
rpc UserGetTransactionList(UserGetTransactionListReq) returns (TransactionList);
|
||||||
|
|
||||||
rpc SaleGetToken(SaleGetTokenReq) returns(SaleGetTokenRes);
|
rpc SaleGetToken(SaleGetTokenReq) returns (SaleGetTokenRes);
|
||||||
rpc SaleConfirm(SaleConfirmReq) returns(SaleConfirmRes);
|
rpc SaleConfirm(SaleConfirmReq) returns (SaleConfirmRes);
|
||||||
rpc AdminManualSaleDeposit(SaleManualReq) returns (base.StatusRes);
|
rpc AdminManualSaleDeposit(SaleManualReq) returns (base.StatusRes);
|
||||||
}
|
|
||||||
|
// BNPL
|
||||||
|
rpc GetBNPLList(base.Empty) returns (BNPLList);
|
||||||
|
rpc GetBNPLInfo(base.IdReq) returns (BNPLInfo);
|
||||||
|
rpc GetUserBNPLInfo(GetUserBNPLInfoReq) returns (UserBNPLResp);
|
||||||
|
rpc SubmitBNPLForm(UserBNPLReq) returns (base.StatusRes);
|
||||||
|
rpc UpdateBNPL(UserBNPLReq) returns (base.StatusRes);
|
||||||
|
rpc CancleBNPL(authorization.IdReqWithIAM) returns (base.StatusRes);
|
||||||
|
|
||||||
|
// Redeem Token
|
||||||
|
rpc CalculateRedeemToken(RedeemTokenReq) returns (CalculateRedeemTokenRes);
|
||||||
|
rpc RedeemToken(RedeemTokenReq) returns (base.StatusRes);
|
||||||
|
rpc RedeemTokenList(authorization.ReqWithIAMAndParams) returns (RedeemTokenResList);
|
||||||
|
}
|
||||||
|
|||||||
@ -3,17 +3,18 @@ syntax = "proto3";
|
|||||||
package wallet;
|
package wallet;
|
||||||
|
|
||||||
import "authorization_message.proto";
|
import "authorization_message.proto";
|
||||||
|
import "base_message.proto";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
INTERNAL DATA
|
INTERNAL DATA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message InternalTransactionData {
|
message InternalTransactionData {
|
||||||
int64 transaction_id = 1;
|
int64 transaction_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Federation
|
Federation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message Federation {
|
message Federation {
|
||||||
@ -34,14 +35,13 @@ message GetFederationReq {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Asset
|
Asset
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message AssetList {
|
message AssetList {
|
||||||
repeated Asset list = 1;
|
repeated Asset list = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
message Asset {
|
message Asset {
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
string name = 2;
|
string name = 2;
|
||||||
@ -101,7 +101,91 @@ message PropertyMeta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Wallet
|
BNPL - not really but close name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// enum BNPLPgState {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
message GetUserBNPLInfoReq {
|
||||||
|
authorization.InternalIAM iam = 1;
|
||||||
|
base.IdReq id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum BNPLPaymentsStatus {
|
||||||
|
PENDING = 0;
|
||||||
|
PAYED = 1;
|
||||||
|
OVER_DUE = 2;
|
||||||
|
NOT_STARTED = 3;
|
||||||
|
NOT_YET_DUE = 4;
|
||||||
|
CANCLED = 5;
|
||||||
|
}
|
||||||
|
message BNPLPayments {
|
||||||
|
uint64 id = 1;
|
||||||
|
double amount = 2;
|
||||||
|
double amount_irr = 7;
|
||||||
|
bool is_paied = 3;
|
||||||
|
string due_date = 4;
|
||||||
|
string settlement_date = 5;
|
||||||
|
BNPLPaymentsStatus status = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserBNPLResp {
|
||||||
|
uint64 id = 1;
|
||||||
|
BNPLInfo bnpl = 2;
|
||||||
|
int32 current_step = 3;
|
||||||
|
optional float amount = 4;
|
||||||
|
optional PaymentPeriodInfo payment_period = 5;
|
||||||
|
optional bool accepted_terms = 6;
|
||||||
|
repeated BNPLPayments payments = 7;
|
||||||
|
optional string employee_id = 8;
|
||||||
|
optional authorization.Company company = 10;
|
||||||
|
authorization.InternalIAM iam = 11;
|
||||||
|
optional string updated_at = 12;
|
||||||
|
optional string created_at = 13;
|
||||||
|
Asset selected_asset = 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserBNPLReq {
|
||||||
|
uint64 id = 1;
|
||||||
|
int64 bnpl_id = 2;
|
||||||
|
authorization.InternalIAM iam = 6;
|
||||||
|
optional string created_at = 3;
|
||||||
|
optional string employee_id = 4;
|
||||||
|
optional int64 company_id = 5;
|
||||||
|
optional float amount = 7;
|
||||||
|
optional PaymentPeriodInfo payment_period = 8;
|
||||||
|
optional bool has_agreed_contract = 9;
|
||||||
|
optional int32 current_step = 10; //Can be useful for admin to change the current step
|
||||||
|
optional int64 asset_id = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PaymentPeriodInfo {
|
||||||
|
uint64 id = 1;
|
||||||
|
uint64 period = 2;
|
||||||
|
bool enabled = 3;
|
||||||
|
}
|
||||||
|
message BNPLInfo {
|
||||||
|
uint64 id = 1;
|
||||||
|
string description = 3;
|
||||||
|
repeated Asset supported_assets = 2;
|
||||||
|
optional bool enabled = 4;
|
||||||
|
float amount_start = 5;
|
||||||
|
float amount_end = 6;
|
||||||
|
float amount_steps = 7;
|
||||||
|
repeated PaymentPeriodInfo payment_period = 8;
|
||||||
|
repeated authorization.Company possible_companies = 11;
|
||||||
|
string updated_at = 12;
|
||||||
|
string created_at = 13;
|
||||||
|
string expires_at = 14;
|
||||||
|
}
|
||||||
|
message BNPLList {
|
||||||
|
repeated BNPLInfo list = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Wallet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message WalletList {
|
message WalletList {
|
||||||
@ -127,7 +211,7 @@ message UserInitWalletReq {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Transaction
|
Transaction
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message TransactionList {
|
message TransactionList {
|
||||||
@ -135,10 +219,26 @@ message TransactionList {
|
|||||||
int64 total_count = 2;
|
int64 total_count = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum TransactionType {
|
||||||
|
Unknown = 0;
|
||||||
|
Buy = 1;
|
||||||
|
Sell = 2;
|
||||||
|
Transfer = 3;
|
||||||
|
Redeem = 4;
|
||||||
|
}
|
||||||
|
enum TransactionStatus {
|
||||||
|
Undetermined = 0;
|
||||||
|
Failed = -10;
|
||||||
|
Suspended = -9;
|
||||||
|
Created = -1;
|
||||||
|
Pending = 1;
|
||||||
|
Successful = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message Transaction {
|
message Transaction {
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
int64 asset_id = 2;
|
int64 asset_id = 2;
|
||||||
Asset asset_info = 3;
|
// Asset asset_info = 3; //Causing network overloading
|
||||||
optional int64 from_user_id = 4;
|
optional int64 from_user_id = 4;
|
||||||
optional authorization.UserIdentityBasic from_user_info = 5;
|
optional authorization.UserIdentityBasic from_user_info = 5;
|
||||||
optional int64 from_federation_id = 6;
|
optional int64 from_federation_id = 6;
|
||||||
@ -148,8 +248,8 @@ message Transaction {
|
|||||||
optional int64 to_federation_id = 10;
|
optional int64 to_federation_id = 10;
|
||||||
optional Federation to_federation_info = 11;
|
optional Federation to_federation_info = 11;
|
||||||
double amount = 12;
|
double amount = 12;
|
||||||
int32 status = 13;
|
TransactionStatus status = 13;
|
||||||
int32 type = 14;
|
TransactionType type = 14;
|
||||||
string updated_at = 15;
|
string updated_at = 15;
|
||||||
string created_at = 16;
|
string created_at = 16;
|
||||||
string tracking_code = 17;
|
string tracking_code = 17;
|
||||||
@ -167,12 +267,12 @@ message UserGetTransactionListReq {
|
|||||||
optional int64 to_federation_id = 9;
|
optional int64 to_federation_id = 9;
|
||||||
optional double amount_from = 10;
|
optional double amount_from = 10;
|
||||||
optional double amount_to = 11;
|
optional double amount_to = 11;
|
||||||
optional int32 status = 12;
|
optional TransactionStatus status = 12;
|
||||||
optional int32 type = 13;
|
optional TransactionType type = 13;
|
||||||
optional string tracking_code = 14;
|
optional string tracking_code = 14;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
Buy
|
Buy
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message UserBuyAssetReq {
|
message UserBuyAssetReq {
|
||||||
@ -182,11 +282,11 @@ message UserBuyAssetReq {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Sell
|
Sell
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Transfer
|
Transfer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
message UserTransferAssetReq {
|
message UserTransferAssetReq {
|
||||||
@ -212,33 +312,68 @@ message SaleGetTokenReq {
|
|||||||
// represent the information regarding the ipg gateway
|
// represent the information regarding the ipg gateway
|
||||||
message SaleGetTokenRes {
|
message SaleGetTokenRes {
|
||||||
string url = 1;
|
string url = 1;
|
||||||
int64 unit_price = 2;
|
int64 unit_price = 2;
|
||||||
int64 total_price = 3;
|
int64 total_price = 3;
|
||||||
double amount = 4;
|
double amount = 4;
|
||||||
string asset = 5;
|
string asset = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SaleConfirmReq {
|
message SaleConfirmReq {
|
||||||
string RefId=1;
|
string RefId = 1;
|
||||||
string ResCode=2;
|
string ResCode = 2;
|
||||||
string SaleOrderId=3;
|
string SaleOrderId = 3;
|
||||||
string SaleReferenceId=4;
|
string SaleReferenceId = 4;
|
||||||
string CardHolderInfo=5;
|
string CardHolderInfo = 5;
|
||||||
string CardHolderPan=6;
|
string CardHolderPan = 6;
|
||||||
string FinalAmount=7;
|
string FinalAmount = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SaleConfirmRes {
|
message SaleConfirmRes {
|
||||||
string receiptLink=1;
|
string receiptLink = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SaleManualReq {
|
message SaleManualReq {
|
||||||
authorization.InternalIAM iam = 1;
|
authorization.InternalIAM iam = 1;
|
||||||
int64 asset_id = 2;
|
int64 asset_id = 2;
|
||||||
double amount = 3;
|
double amount = 3;
|
||||||
string paid_at = 4;
|
string paid_at = 4;
|
||||||
string rrn = 5;
|
string rrn = 5;
|
||||||
string national_id = 6;
|
string national_id = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Redeem Token
|
||||||
|
*/
|
||||||
|
message RedeemTokenReq {
|
||||||
|
authorization.InternalIAM iam = 1;
|
||||||
|
int64 asset_id = 2;
|
||||||
|
uint64 bank_info_id = 3;
|
||||||
|
double amount = 4;
|
||||||
|
optional string tfa_code = 5;
|
||||||
|
}
|
||||||
|
message CalculateRedeemTokenRes {
|
||||||
|
Asset asset = 1;
|
||||||
|
double free_balance = 2;
|
||||||
|
double total_balance = 3;
|
||||||
|
double request_amount = 4;
|
||||||
|
double profit_capital = 5;
|
||||||
|
double user_capital = 6;
|
||||||
|
optional authorization.BankInfo bank_info = 7;
|
||||||
|
}
|
||||||
|
message RedeemTokenRes {
|
||||||
|
uint64 id = 1;
|
||||||
|
int64 user_id = 2;
|
||||||
|
Asset asset = 3;
|
||||||
|
double free_balance = 4;
|
||||||
|
double total_balance = 5;
|
||||||
|
double request_amount = 6;
|
||||||
|
string created_at = 7;
|
||||||
|
bool is_paied = 8;
|
||||||
|
// receipt.Receipt receipt = 8;
|
||||||
|
double calculated_profit = 9;
|
||||||
|
optional authorization.BankInfo bank_info = 10;
|
||||||
|
optional string receipt = 11;
|
||||||
|
}
|
||||||
|
message RedeemTokenResList {
|
||||||
|
repeated RedeemTokenRes list = 1;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user