Hiyve Components - v1.0.0
    Preparing search index...

    Events the components report so your app can notify people or keep records.

    interface CourseEvents {
        onApprovalRequested?: (
            event: { enrollment: Enrollment; lessonId: string },
        ) => void;
        onClientEnrolled?: (event: { enrollment: Enrollment }) => void;
        onCourseCompleted?: (event: { enrollment: Enrollment }) => void;
        onJoinLiveSession?: (
            event: { block: LiveSessionBlock; courseId: string; lessonId: string },
        ) => void;
        onLessonCommentAdded?: (
            event: {
                comment: SubmissionComment;
                enrollment: Enrollment;
                lessonId: string;
            },
        ) => void;
        onLessonCompleted?: (
            event: { enrollment: Enrollment; lessonId: string },
        ) => void;
        onLessonDecided?: (
            event: {
                approved: boolean;
                enrollment: Enrollment;
                lessonId: string;
                note?: string;
            },
        ) => void;
        onLessonReplyAdded?: (
            event: {
                enrollment: Enrollment;
                lessonId: string;
                reply: SubmissionComment;
            },
        ) => void;
        onLessonsUnlocked?: (
            event: {
                clientId: string;
                courseId: string;
                enrollmentId: string;
                lessonIds: string[];
            },
        ) => void;
        onReplyAdded?: (
            event: {
                enrollment: Enrollment;
                reply: SubmissionComment;
                submissionId: string;
            },
        ) => void;
        onSubmissionCreated?: (
            event: {
                enrollment: Enrollment;
                lessonId: string;
                submission: Submission;
            },
        ) => void;
        onSubmissionReviewed?: (
            event: {
                comment?: SubmissionComment;
                enrollment: Enrollment;
                status?: ReviewStatus;
                submissionId: string;
            },
        ) => void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    onApprovalRequested?: (
        event: { enrollment: Enrollment; lessonId: string },
    ) => void

    A client completed a lesson that needs the provider's approval — a good moment to notify the provider.

    onClientEnrolled?: (event: { enrollment: Enrollment }) => void

    The provider enrolled a client.

    onCourseCompleted?: (event: { enrollment: Enrollment }) => void

    A client completed every lesson in a course.

    onJoinLiveSession?: (
        event: { block: LiveSessionBlock; courseId: string; lessonId: string },
    ) => void

    A client wants to join a live session block's room. Route them to it.

    onLessonCommentAdded?: (
        event: {
            comment: SubmissionComment;
            enrollment: Enrollment;
            lessonId: string;
        },
    ) => void

    A client asked a question or left a note on a lesson — a good moment to notify the provider.

    onLessonCompleted?: (
        event: { enrollment: Enrollment; lessonId: string },
    ) => void

    A client completed a lesson.

    onLessonDecided?: (
        event: {
            approved: boolean;
            enrollment: Enrollment;
            lessonId: string;
            note?: string;
        },
    ) => void

    The provider approved a lesson or sent it back — a good moment to notify the client.

    onLessonReplyAdded?: (
        event: {
            enrollment: Enrollment;
            lessonId: string;
            reply: SubmissionComment;
        },
    ) => void

    The provider replied on a lesson — a good moment to notify the client.

    onLessonsUnlocked?: (
        event: {
            clientId: string;
            courseId: string;
            enrollmentId: string;
            lessonIds: string[];
        },
    ) => void

    Lessons opened to a client — a good moment to notify the client.

    onReplyAdded?: (
        event: {
            enrollment: Enrollment;
            reply: SubmissionComment;
            submissionId: string;
        },
    ) => void

    A client replied to a review — a good moment to notify the provider.

    onSubmissionCreated?: (
        event: {
            enrollment: Enrollment;
            lessonId: string;
            submission: Submission;
        },
    ) => void

    A client submitted work — a good moment to notify the provider.

    onSubmissionReviewed?: (
        event: {
            comment?: SubmissionComment;
            enrollment: Enrollment;
            status?: ReviewStatus;
            submissionId: string;
        },
    ) => void

    The provider commented on or gave a status to a submission — a good moment to notify the client.