import Logger from '../../utils/Logger'; export type IUserLogs = | 'GET_USERS_BY_ADMIN_SUCCESS' | 'GET_USERS_BY_ADMIN_ERROR' | 'GET_USER_BY_ID_SUCCESS' | 'GET_USER_BY_ID_ERROR' | 'UPDATE_USER_BY_ID_SUCCESS' | 'UPDATE_USER_BY_ID_ERROR' | 'DELETE_USER_BY_ID_SUCCESS' | 'DELETE_USER_BY_ID_ERROR' | 'USER_ERROR_GENERIC' | 'GET_TEACHERS_BY_SCHOOL_SUCCESS' | 'GET_TEACHERS_BY_SCHOOL_ERROR' | 'GET_USERS_BY_SUPER_ADMIN_SUCCESS' | 'GET_USERS_BY_SUPER_ADMIN_ERROR' | 'GET_SCHOOLS_SUCCESS' | 'GET_SCHOOLS_ERROR' | 'GET_TEACHERS_SUCCESS' | 'GET_TEACHERS_ERROR' | 'GET_TEACHER_BY_ID_SUCCESS' | 'GET_TEACHER_BY_ID_ERROR' | 'GET_INST_DESIGNERS_SUCCESS' | 'GET_INST_DESIGNERS_ERROR' | 'GET_STATISTICS_SUCCESS' | 'GET_STATISTICS_ERROR' ; export const userLogs: IErrors<IUserLogs> = { GET_USERS_BY_ADMIN_SUCCESS: { code: 0, message: 'Users has been fetched successfully.', type: 'GET_USERS_BY_ADMIN_SUCCESS', }, GET_USERS_BY_ADMIN_ERROR: { code: 1, message: 'Error occurred while fetching users: {error}', type: 'GET_USERS_BY_ADMIN_ERROR', }, GET_USER_BY_ID_SUCCESS: { code: 2, message: 'User "{userId}" has been fetched successfully.', type: 'GET_USER_BY_ID_SUCCESS', }, GET_USER_BY_ID_ERROR: { code: 3, message: 'Error occurred while fetching user: {error}', type: 'GET_USER_BY_ID_ERROR', }, UPDATE_USER_BY_ID_SUCCESS: { code: 4, message: 'User "{userId}" has been updated successfully.', type: 'UPDATE_USER_BY_ID_SUCCESS', }, UPDATE_USER_BY_ID_ERROR: { code: 5, message: 'Error occurred while updating user: {error}', type: 'UPDATE_USER_BY_ID_ERROR', }, DELETE_USER_BY_ID_SUCCESS: { code: 6, message: 'User "{userId}" has been deleted successfully.', type: 'DELETE_USER_BY_ID_SUCCESS', }, DELETE_USER_BY_ID_ERROR: { code: 7, message: 'Error occurred while deleting user: {error}', type: 'DELETE_USER_BY_ID_ERROR', }, USER_ERROR_GENERIC: { code: 8, message: 'Generic error happened while loading users.', type: 'USER_ERROR_GENERIC', }, GET_TEACHERS_BY_SCHOOL_SUCCESS: { code: 9, message: 'Teachers has been fetched successfully.', type: 'GET_TEACHERS_BY_SCHOOL_SUCCESS', }, GET_TEACHERS_BY_SCHOOL_ERROR: { code: 10, message: 'Error occurred while fetching teachers: {error}', type: 'GET_TEACHERS_BY_SCHOOL_ERROR', }, GET_USERS_BY_SUPER_ADMIN_SUCCESS: { code: 11, message: 'Users has been fetched successfully.', type: 'GET_USERS_BY_SUPER_ADMIN_SUCCESS', }, GET_USERS_BY_SUPER_ADMIN_ERROR: { code: 12, message: 'Error occurred while fetching users: {error}', type: 'GET_USERS_BY_SUPER_ADMIN_ERROR', }, GET_SCHOOLS_SUCCESS: { code: 13, message: 'Schools has been fetched successfully.', type: 'GET_SCHOOLS_SUCCESS', }, GET_SCHOOLS_ERROR: { code: 14, message: 'Error occurred while fetching schools: {error}', type: 'GET_SCHOOLS_ERROR', }, GET_TEACHERS_SUCCESS: { code: 15, message: 'Teachers has been fetched successfully.', type: 'GET_TEACHERS_SUCCESS', }, GET_TEACHERS_ERROR: { code: 16, message: 'Error occurred while fetching teachers: {error}', type: 'GET_TEACHERS_ERROR', }, GET_TEACHER_BY_ID_SUCCESS: { code: 17, message: 'Teacher "{teacherId}" has been fetched successfully.', type: 'GET_TEACHER_BY_ID_SUCCESS', }, GET_TEACHER_BY_ID_ERROR: { code: 18, message: 'Error occurred while fetching teacher: {error}', type: 'GET_TEACHER_BY_ID_ERROR', }, GET_INST_DESIGNERS_SUCCESS: { code: 19, message: 'Institution designers has been fetched successfully.', type: 'GET_INST_DESIGNERS_SUCCESS', }, GET_INST_DESIGNERS_ERROR: { code: 20, message: 'Error occurred while fetching institution designers: {error}', type: 'GET_INST_DESIGNERS_ERROR', }, GET_STATISTICS_SUCCESS: { code: 21, message: 'Statistics has been fetched successfully.', type: 'GET_STATISTICS_SUCCESS', }, GET_STATISTICS_ERROR: { code: 22, message: 'Error occurred while fetching statistics: {error}', type: 'GET_STATISTICS_ERROR', }, } as const; export default userLogs; export const userLogger = new Logger('user');