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; export interface IUserResponse { token: string; id: string; name: string | null; email: string; firstName: string | null; lastName: string | null; merchantId?: number | null; username?: string | null; phone?: string | null; jobTitle?: string | null; enabled?: boolean; 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; }