feat(interfaces): Add new interfaces
New interfaces related to referral code and trade request are added to the `api.interface.ts`. Additionally, import statement modified to include `ICryptoInWalletInfo` into the module. This enriches the module with a set of necessary interfaces providing better control over referral codes, trades, and offers operations.
This commit is contained in:
parent
69484cc90f
commit
0a239f4478
@ -1,4 +1,4 @@
|
||||
import { ITrade, type IUserWalletCryptos } from "@/interfaces/crypto.interface";
|
||||
import {type ICryptoInWalletInfo, ITrade, type IUserWalletCryptos} from "@/interfaces/crypto.interface";
|
||||
import type { IUserData } from "@/interfaces/userdata.interface";
|
||||
|
||||
// ----- Request -----
|
||||
@ -27,6 +27,20 @@ export interface IApiOfferCreateReq {
|
||||
amount: number;
|
||||
}
|
||||
|
||||
export interface IApiCreateReferralCodeReq {
|
||||
name: string;
|
||||
value: number;
|
||||
}
|
||||
|
||||
export interface IApiDoTradeReq {
|
||||
id_offer: string;
|
||||
}
|
||||
|
||||
export interface IApiDoOfferReq {
|
||||
id_crypto: string;
|
||||
amount: number;
|
||||
}
|
||||
|
||||
// ----- Response -----
|
||||
|
||||
export interface IAbstractApiResponse {
|
||||
@ -58,6 +72,19 @@ export interface IAllRankRes extends IAbstractApiResponse {}
|
||||
|
||||
export interface IAllReferralCodeRes extends IAbstractApiResponse {}
|
||||
|
||||
export interface ICreateReferralCodeRes extends IAbstractApiResponse {}
|
||||
|
||||
export interface IReferralCodeUpdateRes extends IAbstractApiResponse {}
|
||||
|
||||
export interface IReferralCodeDeleteRes extends IAbstractApiResponse {}
|
||||
|
||||
export interface IApiAllOffersRes extends IAbstractApiResponse {
|
||||
id: string
|
||||
User: {
|
||||
pseudo: string
|
||||
}
|
||||
amount: number
|
||||
created_at: string
|
||||
id_user: string
|
||||
Crypto: ICryptoInWalletInfo
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user