export interface RouterInterface { push: (url: string) => void; } export declare const setRouter: (router: RouterInterface) => void; /** * Makes API calls with automatic token refresh * @param endpoint API endpoint (without base URL) * @param method HTTP method * @param data Request data (optional) * @param headers Additional headers (optional) */ export declare const apiCall: (endpoint: string, method?: "GET" | "POST" | "PUT" | "DELETE", data?: any, headers?: Record) => Promise; /** * Utility function to check if user has a specific role * @param roleToCheck The role to check against * @returns boolean indicating if user has the specified role */ export declare const checkUserRole: (roleToCheck: string) => Promise; /** * Utility function to get the user's MongoDB ID */ export declare const getUserMongoId: () => Promise; /** * Fetches notifications for a user */ export declare const fetchUserNotifications: (userId: string, forceRefresh?: boolean) => Promise; /** * Fetches latest notifications */ export declare const getLatestNotificationsWithRefresh: (userId: string) => Promise; /** * Add a function to handle user login that will initialize the socket for notifications */ export declare const handleUserLogin: (userData: any) => Promise; /** * Interface for streak functionality data */ export interface StreakData { currentStreak: number; longestStreak: number; multiplier: number; isActive: boolean; streakDates: Date[]; lastActivityDate: Date | null; timeLeftToLoseStreak?: number | null; streakLossWarning?: boolean; } /** * Fetches the current streak status for a user */ export declare const fetchStreakStatus: (userId: string) => Promise; /** * Updates the streak for a user */ export declare const updateStreak: (userId: string) => Promise; /** * Marks all notifications as read for a user */ export declare const markAllNotificationsAsRead: (userId: string) => Promise; /** * Marks a specific notification as read */ export declare const markNotificationAsRead: (notificationId: string, userId: string) => Promise; /** * Deletes a notification */ export declare const deleteNotification: (notificationId: string, userId: string) => Promise; /** * Gets the streak calendar for a specific month and year */ export declare const getStreakCalendar: (userId: string, year: number, month: number) => Promise; /** * Gets the current streak multiplier for a user */ export declare const getStreakMultiplier: (userId: string) => Promise; /** * Makes API calls that don't require authentication (like login/signup) * @param endpoint API endpoint (without base URL) * @param method HTTP method * @param data Request data (optional) * @param headers Additional headers (optional) */ export declare const publicApiCall: (endpoint: string, method?: "GET" | "POST" | "PUT" | "DELETE", data?: any, headers?: Record) => Promise; //# sourceMappingURL=apiCall.d.ts.map