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

    Result of useCourses.

    interface UseCoursesResult {
        archived: CourseListItem[];
        courses: CourseListItem[];
        createCourse: (
            input: { progression?: CourseProgression; title: string },
        ) => Promise<Course>;
        createFromTemplate: (template: string | CourseTemplate) => Promise<Course>;
        deleteCourse: (courseId: string) => Promise<void>;
        duplicate: (
            courseId: string,
            options?: { isTemplate?: boolean; title?: string },
        ) => Promise<Course>;
        error: Error | null;
        loading: boolean;
        reload: () => void;
        setStatus: (courseId: string, status: CourseStatus) => Promise<Course>;
        templates: CourseListItem[];
    }
    Index

    Properties

    archived: CourseListItem[]

    Archived courses: kept for the clients who have them, closed to new ones.

    courses: CourseListItem[]

    Courses clients take: drafts and published ones.

    createCourse: (
        input: { progression?: CourseProgression; title: string },
    ) => Promise<Course>

    Start a new course. It begins as a draft.

    createFromTemplate: (template: string | CourseTemplate) => Promise<Course>

    Make a new course from a template: one of the provider's (by id) or one your app supplies.

    deleteCourse: (courseId: string) => Promise<void>
    duplicate: (
        courseId: string,
        options?: { isTemplate?: boolean; title?: string },
    ) => Promise<Course>

    Copy a course (or save it as a template with isTemplate).

    error: Error | null
    loading: boolean
    reload: () => void
    setStatus: (courseId: string, status: CourseStatus) => Promise<Course>

    Publish, archive or restore a course.

    templates: CourseListItem[]

    The provider's own templates.