import { store } from "./store"; export type RootState = ReturnType; export type AppDispatch = typeof store.dispatch; // Generic helper types for Redux thunks that return a user-facing message export type ThunkSuccess = { message: string } & T; export type ThunkError = string; //User related types export type TGroupName = "Super Admin" | "Admin" | "Reader"; export type TJobTitle = | "C-Level" | "Admin" | "Operations" | "Support" | "KYC" | "Payments" | "Risk" | "Finance" | "Trading" | "Compliance" | "DevOps" | "Software Engineer"; export type TMerchantName = "Data Spin" | "Win Bot"; export interface IUserResponse { success: boolean; token: string; id: string; name: string | null; email: string; firstName: string | null; lastName: string | null; merchantId?: number | null; username?: string | null; groups?: TGroupName[]; merchants?: TMerchantName[]; phone?: string | null; jobTitle?: string | null; enabled?: boolean; password?: string; authorities?: string[]; allowedMerchantIds?: number[]; created?: string; disabledBy?: string | null; disabledDate?: string | null; disabledReason?: string | null; incidentNotes?: boolean; lastLogin?: string | null; lastMandatoryUpdated?: string | null; marketingNewsletter?: boolean; releaseNotes?: boolean; requiredActions?: string[]; twoFactorCondition?: string | null; twoFactorCredentials?: string[]; mustChangePassword?: boolean; } export interface ILoginResponse { user: IUserResponse; success: boolean; message: string; must_change_password?: boolean; }