default: {
    checkIfTopicGroupExistsWithEmail(
        topicGroup: string,
        email: string,
    ): Promise<boolean>;
    deleteTopicGroupByName(
        topicGroup: string,
        userid: undefined | number,
    ): Promise<ResultSetHeader>;
    getAllUserTopicGroupsAndTopics(email: string): Promise<RowDataPacket[]>;
    updateTopicGroup(
        topicGroup: string,
        topics: string[],
        email: string,
    ): Promise<{ email: string; message: string; state: string }>;
    updateUserCourseTopics(
        usercourseid: number,
        topics: string[],
    ): Promise<{ message: string; state: string }>;
} = ...

Type declaration

  • checkIfTopicGroupExistsWithEmail:function
    • Checks if a topic group exists for a user.

      Parameters

      • topicGroup: string

        The name of the topic group.

      • email: string

        The email of the user.

      Returns Promise<boolean>

      Whether the topic group exists for the user.

  • deleteTopicGroupByName:function
    • Deletes a topic group by its name.

      Parameters

      • topicGroup: string

        The name of the topic group.

      • userid: undefined | number

        The ID of the user.

      Returns Promise<ResultSetHeader>

      The result of the delete operation.

  • getAllUserTopicGroupsAndTopics:function
    • Fetches all topic groups and topics for a user.

      Parameters

      • email: string

        The email of the user.

      Returns Promise<RowDataPacket[]>

      The topic groups and topics of the user.

  • updateTopicGroup:function
    • Updates a topic group.

      Parameters

      • topicGroup: string

        The name of the topic group.

      • topics: string[]

        The topics in the topic group.

      • email: string

        The email of the user.

      Returns Promise<{ email: string; message: string; state: string }>

      The result of the update operation.

  • updateUserCourseTopics:function
    • Updates the topics for a user course.

      Parameters

      • usercourseid: number

        The ID of the user course.

      • topics: string[]

        The topics for the user course.

      Returns Promise<{ message: string; state: string }>

      The result of the update operation.