UNPKG

education-module-ai

Version:
79 lines (78 loc) 2.85 kB
import { LearningSessionResource } from "../models/LearningSession"; import { UserProfileResource } from "../models/UserProfile"; import { LearningPathResource } from "../models/LearningPath"; import { EducationPlugin } from "./plugin-manager"; /** * Notification types supported by the plugin */ export declare enum NotificationType { SESSION_REMINDER = "session_reminder", CONTENT_RECOMMENDATION = "content_recommendation", PROGRESS_UPDATE = "progress_update", ACHIEVEMENT = "achievement", SYSTEM = "system", LEARNING_PATH = "learning_path" } /** * Notification data structure */ export interface Notification { id: string; userId: string; type: NotificationType; title: string; message: string; timestamp: Date; read: boolean; data?: any; } /** * Notification Plugin for the Education Module * Manages user notifications for learning activities and achievements */ export declare class NotificationPlugin implements EducationPlugin { private isInitialized; private notifications; private notificationCount; /** * Initialize the notification plugin */ initialize(): Promise<void>; /** * Create and send a notification to a user */ sendNotification(userId: string, type: NotificationType, title: string, message: string, data?: any): Promise<Notification>; /** * Get all notifications for a user */ getUserNotifications(userId: string): Promise<Notification[]>; /** * Mark a notification as read */ markNotificationAsRead(userId: string, notificationId: string): Promise<boolean>; /** * Clear all notifications for a user */ clearUserNotifications(userId: string): Promise<boolean>; onSessionStarted(session: LearningSessionResource): Promise<void>; onSessionEnded(session: LearningSessionResource): Promise<void>; onProfileCreated(profile: UserProfileResource): Promise<void>; onLearningPathGenerated(path: LearningPathResource): Promise<void>; onLearningPathCompleted(path: LearningPathResource): Promise<void>; /** * Send a recommendation notification to a user */ sendRecommendation(userId: string, subject: string, contentTitle: string, contentId: string): Promise<Notification>; /** * Send an achievement notification to a user */ sendAchievementNotification(userId: string, achievementTitle: string, description: string, subject?: string): Promise<Notification>; /** * Schedule a session reminder for a user */ scheduleSessionReminder(userId: string, subject: string, scheduledTime: Date): Promise<void>; /** * Send a learning path step reminder */ sendPathStepReminder(userId: string, pathId: string, topic: string, stepNumber: number, stepTitle: string): Promise<Notification>; }