UNPKG

education-module-ai

Version:
84 lines (83 loc) 3.24 kB
import { LearningSessionResource, SessionMessage } from "../models/LearningSession"; import { UserProfileResource } from "../models/UserProfile"; import { EducationalContentResource } from "../models/EducationalContent"; import { LearningPathResource } from "../models/LearningPath"; /** * Interface for education module plugins */ export interface EducationPlugin { initialize(): Promise<void>; onContentCreated?(content: EducationalContentResource): Promise<void>; onContentUpdated?(content: EducationalContentResource): Promise<void>; onContentDeleted?(contentId: string): Promise<void>; onSessionStarted?(session: LearningSessionResource): Promise<void>; onSessionEnded?(session: LearningSessionResource): Promise<void>; onSessionMessageSent?(session: LearningSessionResource, message: SessionMessage): Promise<void>; onProfileCreated?(profile: UserProfileResource): Promise<void>; onProfileUpdated?(profile: UserProfileResource): Promise<void>; onProfileDeleted?(profileId: string): Promise<void>; onLearningPathGenerated?(path: LearningPathResource): Promise<void>; onLearningPathCompleted?(path: LearningPathResource): Promise<void>; } /** * Plugin Manager for the Education Module * Manages and coordinates all plugins */ declare class PluginManager { private plugins; private initialized; /** * Register a plugin with the manager */ registerPlugin(plugin: EducationPlugin): void; /** * Initialize all registered plugins */ initialize(): Promise<void>; /** * Notify plugins when educational content is created */ notifyContentCreated(content: EducationalContentResource): Promise<void>; /** * Notify plugins when educational content is updated */ notifyContentUpdated(content: EducationalContentResource): Promise<void>; /** * Notify plugins when educational content is deleted */ notifyContentDeleted(contentId: string): Promise<void>; /** * Notify plugins when a learning session is started */ notifySessionStarted(session: LearningSessionResource): Promise<void>; /** * Notify plugins when a learning session is ended */ notifySessionEnded(session: LearningSessionResource): Promise<void>; /** * Notify plugins when a message is sent in a learning session */ notifySessionMessageSent(session: LearningSessionResource, message: SessionMessage): Promise<void>; /** * Notify plugins when a user profile is created */ notifyProfileCreated(profile: UserProfileResource): Promise<void>; /** * Notify plugins when a user profile is updated */ notifyProfileUpdated(profile: UserProfileResource): Promise<void>; /** * Notify plugins when a user profile is deleted */ notifyProfileDeleted(profileId: string): Promise<void>; /** * Notify plugins when a learning path is generated */ notifyLearningPathGenerated(path: LearningPathResource): Promise<void>; /** * Notify plugins when a learning path is completed */ notifyLearningPathCompleted(path: LearningPathResource): Promise<void>; } export declare const pluginManager: PluginManager; export {};