diff --git a/services/backend/src/services/faculty/facultyService.ts b/services/backend/src/services/faculty/facultyService.ts index a700b06bfd..b73502ce7b 100644 --- a/services/backend/src/services/faculty/facultyService.ts +++ b/services/backend/src/services/faculty/facultyService.ts @@ -3,6 +3,7 @@ import moment from 'moment' import { Graduated, Name, ProgrammeFilter, SpecialGroups, YearType } from '../../types' import { redisClient } from '../redis' import { getDegreeProgrammesOfFaculty } from './faculty' +import { FacultyProgressData } from './facultyStudentProgress' const createRedisKeyForFacultyProgrammes = (id: string, programmeFilter: ProgrammeFilter) => { return `FACULTY_PROGRAMMES_${id}_${programmeFilter}` @@ -247,34 +248,6 @@ export const getGraduationStats = async ( return data } -type Titles = Array - -type ProgrammeStats = Record>> - -type CreditCount = Record - -type FacultyProgressData = { - id: string - years: string[] - yearlyBachelorTitles: Titles - yearlyBcMsTitles: Titles - yearlyMasterTitles: Titles - yearlyLicentiateTitles: Titles - programmeNames: ProgrammeNames - bachelorsProgStats: ProgrammeStats - bcMsProgStats: ProgrammeStats - licentiateProgStats: ProgrammeStats - mastersProgStats: ProgrammeStats - doctoralProgStats: ProgrammeStats - creditCounts: { - bachelor: CreditCount - bachelorMaster: CreditCount - master: CreditCount - licentiate: CreditCount - doctor: CreditCount - } -} - export const setFacultyProgressStats = async ( data: FacultyProgressData, specialGroups: SpecialGroups, diff --git a/services/backend/src/services/faculty/facultyStudentProgress.ts b/services/backend/src/services/faculty/facultyStudentProgress.ts index 48264368fa..d44b2c5c06 100644 --- a/services/backend/src/services/faculty/facultyStudentProgress.ts +++ b/services/backend/src/services/faculty/facultyStudentProgress.ts @@ -196,3 +196,5 @@ export const combineFacultyStudentProgress = async ( return result } + +export type FacultyProgressData = Awaited>