mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-07 12:46:30 +00:00
feat: implement topup functionality with create, get, and cancel operations ✨
This commit is contained in:
@ -57,6 +57,20 @@ export interface ApiError {
|
||||
detail?: string;
|
||||
}
|
||||
|
||||
export interface Topup {
|
||||
id: string;
|
||||
amount: number;
|
||||
user: Pick<User, "id" | "id_card" | "mobile"> & {
|
||||
name: string;
|
||||
};
|
||||
paid: boolean;
|
||||
mib_reference: string | null;
|
||||
expires_at: string;
|
||||
is_expired: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface Payment {
|
||||
id: string;
|
||||
devices: Device[];
|
||||
|
14
lib/types.ts
14
lib/types.ts
@ -1,9 +1,19 @@
|
||||
export type TopupType = {
|
||||
amount: number;
|
||||
userId: string;
|
||||
paid: boolean;
|
||||
};
|
||||
|
||||
export type Transaction = {
|
||||
ref: string;
|
||||
sourceBank: string;
|
||||
trxDate: string;
|
||||
}
|
||||
|
||||
export type TopupResponse = {
|
||||
status: boolean;
|
||||
message: string;
|
||||
transaction?: Transaction
|
||||
}
|
||||
|
||||
interface IpAddress {
|
||||
ip: string;
|
||||
mask: number;
|
||||
|
Reference in New Issue
Block a user