sarlink-portal/lib/backend-types.ts
i701 8438ceb376
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 9m52s
feat: add vendor information to device components and update related UI elements
fix: update sidebar transition duration for smoother experience
chore: update package dependencies and versions for improved stability and features
2025-06-02 09:17:16 +05:00

75 lines
1.2 KiB
TypeScript

export interface Links {
next_page: string | null;
previous_page: string | null;
}
export interface Meta {
total: number;
per_page: number;
current_page: number;
last_page: number;
}
export interface ApiResponse<T> {
meta: Meta;
links: Links;
data: T[];
}
export interface Atoll {
id: number;
islands: Island[];
name: string;
createdAt: string;
updatedAt: string;
}
export interface Island {
id: number;
name: string;
createdAt: string;
updatedAt: string;
}
export interface Device {
id: number;
name: string;
mac: string;
vendor: string;
reason_for_blocking: string | null;
has_a_pending_payment: boolean;
pending_payment_id: string | null;
is_active: boolean;
registered: boolean;
blocked: boolean;
blocked_by: string;
expiry_date: string | null;
created_at: string;
updated_at: string;
user: number;
}
export interface ApiError {
message?: string;
detail?: string;
}
export interface Payment {
id: string;
devices: Device[];
number_of_months: number;
amount: number;
paid: boolean;
paid_at: string | null;
method: string;
expires_at: string | null;
created_at: string;
updated_at: string;
user: number;
}
export interface NewPayment {
device_ids: number[];
number_of_months: number;
amount: number;
}