Files
asan-installer-front/src/types/index.ts
T
hamid zarghami 75a5149a8d fix bug
2024-12-22 16:59:53 +03:30

356 lines
6.2 KiB
TypeScript

import React from "react";
export interface LoginFormInterface {
username: string;
password: string;
remember_me?: boolean;
}
export interface LoginResponseInterface {
token: string;
}
export interface ResetPasswordInterface {
mobile_number?: string | any;
otp?: string | any;
password: string;
password_confirmation: string;
}
export interface ForgotPasswordInterface {
mobile_number: string;
}
export interface LoginWithCodeInterface {
mobile_number: string | any;
}
export interface ResetPasswordCodeInterface {
mobile_number?: string | any;
otp: string;
}
export interface LoginCodeInterface {
mobile_number: any;
otp: string;
}
export interface RegisterInterface {
first_name: string;
last_name: string;
national_code: string;
city_name: object | any;
province_name: object | any;
shopName: string;
mobile_number: string;
password: string;
password_confirmation: string;
}
export interface SidebarInterface {
name: string;
title: string;
route: string;
icon: React.ReactNode;
activeIcon: React.ReactNode;
}
export interface SocialsInterface {
name: string;
path: string;
}
export interface StatusBoxItemInterface {
name: string;
title: string;
icon: React.ReactNode;
value: number;
detail?: boolean;
}
export interface UpdateUserInterface {
id?: any;
first_name: string;
last_name: string;
city_name: object | any;
province_name: object | any;
shopName: string;
birthDate: string;
address: string;
cell_number: string;
national_code?: string;
mobile_number?: string;
image?: any;
}
export interface CardBank {
_id: string;
holderName: string;
PAN: number;
IBAN: string;
created_at: string;
updated_at: string;
id: string;
}
export interface BankCartInterface {
_id: string;
cardBank: CardBank[] | [] | CardBank;
id: string;
}
export interface BanksInterface {
name: string;
name_farsi: string;
icon: React.ReactNode;
iban_nbc: string;
pan_iin: string[] | [];
}
export interface AddNewCartInterface {
name: string;
family: string;
PAN: string;
IBAN: string;
holderName?: string;
}
export interface installationReportsInterface {
status: boolean;
dollar: string;
score: string;
device_model: string;
imei_number: string;
install_date: string;
install_iemi: string;
}
export interface colConfig {
accessor: string;
header: string;
cellRenderer?: (info: any) => JSX.Element;
}
export interface TransactionsInterface {
status: boolean;
amount: string;
request_date: string;
traking_number: string;
deposit_date: string;
}
export interface ScoreInterface {
title: string;
score: number;
date: string;
}
export interface SubscriptionReportInterface {
imei_number: string;
renewal_date: string;
renewal_type: string;
amount: string;
contribution: string;
percentage: string;
}
export interface DeviceId {
tomanPrice: number;
dollarProfit: number;
profit: number;
status: number;
_id: string;
IMEI: string;
model: string;
score: number;
renewalProfit: number;
created_at: string;
updated_at: string;
__v: number;
id: string;
}
export interface RegisterDeviceResponse {
data: RegisterDeviceData[] | [];
total: number;
}
export interface RegisterDeviceData {
status: number;
_id: string;
deviceId: DeviceId[] | [];
registerDate: string;
userId: string;
created_at: string;
updated_at: string;
__v: number;
id: string;
}
export interface RegisterDeviceId {
tomanPrice: number;
dollarProfit: number;
profit: number;
status: number;
_id: string;
IMEI: string;
model: string;
score: number;
renewalProfit: number;
created_at: string;
updated_at: string;
__v: number;
id: string;
}
export interface AwardsResponse {
score: number;
title: string;
desc: string;
req: {
userId: string;
desc: string;
metaData: null | any;
status: number;
};
status: number;
expireDate: string;
}
interface TransactionsData {
_id: string;
card: TransactionsCard;
userId: string;
amount: number;
dollarAmount: number;
status: number;
created_at: string;
updated_at: string;
__v: number;
id: string;
}
interface TransactionsCard {
_id: string;
holderName: string;
PAN: number;
IBAN: string;
created_at: string;
updated_at: string;
id: string;
}
export interface TransactionsResponse {
data: TransactionsData[] | [];
total: number;
}
type OverviewUser = {
walletBalance: number;
dollarBalance: number;
score: number;
_id: string;
id: string;
};
export interface OverviewResponse {
pending: boolean;
user: OverviewUser;
}
type ScoreData = {
_id: string;
deviceId: string;
score: number;
created_at: string;
updated_at: string;
__v: number;
userId: string;
id: string;
};
export interface ScoreResponse {
data: ScoreData[] | [];
score: number;
total: number;
}
export interface ComboBoxItems {
name: string;
id: number;
}
export interface TableParams {
page: number;
rows: number;
search: string;
}
export type ProvinceType = {
ProvinceID: number;
ProvinceName: string;
};
export interface ProvinceResponse {
data: { data: ProvinceType[] | [] };
error: string | null;
}
export interface LoginWithOTP {
mobile_number?: string | any;
otp: string;
}
export type CitiesType = {
CityID: number;
CityName: string;
ProvinceID: string;
ProvinceName: string;
};
export interface CitiesResponse {
data: CitiesType[] | [];
error: string | null | any;
}
export interface UserInterface {
cardBank: CardBank[] | [];
city_name: string;
created_at: string;
dollarBalance: string;
first_name: string;
id: string;
last_name: string;
mobile_number: string;
national_code: string;
profilePic: string;
province_name: string;
score: number;
shopName: string;
updated_at: string;
walletBalance: number;
active: boolean;
_id: string;
address: string;
birthDate: string;
cell_number: string;
}
export interface ResetPasswordUser {
password: string;
newPassword: string;
password_confirmation: string;
}
export interface AwardStatus {
awards: number;
my_score: number;
}
export interface SendWithdraw {
holderName: string;
card: any;
}
export interface CheckIMEI {
IMEI: string;
}