feat(v3): restructure project + add complete frontend
- Restructure: move backend from new_project/ to backend/ - Add full React/TypeScript frontend (37 pages, 17 services, 16 type defs, 11 query hooks) - Add docs/ with SRS specs, user stories, and workflow documentation - Update .gitignore for new directory layout Workflows implemented: WF1 User Signup, WF2 Placement Test, WF3 Exam Configuration, WF4 General English Exam, WF5 Course Generation, WF6 Entity Student Onboarding, AI Course Generation, Adaptive Learning Engine UI, White-Label Branding, Score Release Made-with: Cursor
This commit is contained in:
44
frontend/src/services/ielts-exam.service.ts
Normal file
44
frontend/src/services/ielts-exam.service.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { api } from "@/lib/api-client";
|
||||
import type {
|
||||
IELTSExamConfig,
|
||||
IELTSExamResponse,
|
||||
IELTSSkillConfig,
|
||||
ContentPoolItem,
|
||||
ContentPoolFilters,
|
||||
AssemblyResult,
|
||||
ExamValidationReport,
|
||||
ExamAssignRequest,
|
||||
} from "@/types";
|
||||
import type { ApiSuccessResponse } from "@/types";
|
||||
|
||||
export const ieltsExamService = {
|
||||
create: (data: IELTSExamConfig) =>
|
||||
api.post<IELTSExamResponse>("/exam/ielts/create", data),
|
||||
|
||||
getSkills: (examId: number) =>
|
||||
api.get<IELTSSkillConfig[]>(`/exam/ielts/${examId}/skills`),
|
||||
|
||||
getContentPoolCount: (examId: number) =>
|
||||
api.get<Record<string, number>>(`/exam/ielts/${examId}/content-pool-count`),
|
||||
|
||||
getContentPool: (examId: number, filters: ContentPoolFilters) =>
|
||||
api.get<ContentPoolItem[]>(`/exam/ielts/${examId}/content-pool`, filters as Record<string, string | number | boolean | undefined>),
|
||||
|
||||
autoAssemble: (examId: number) =>
|
||||
api.post<AssemblyResult[]>(`/exam/ielts/${examId}/auto-assemble`),
|
||||
|
||||
suggest: (examId: number) =>
|
||||
api.post<AssemblyResult[]>(`/exam/ielts/${examId}/suggest`),
|
||||
|
||||
saveQuestions: (examId: number, sectionId: number, questionIds: number[]) =>
|
||||
api.put<ApiSuccessResponse>(`/exam/ielts/${examId}/sections/${sectionId}/questions`, { question_ids: questionIds }),
|
||||
|
||||
validate: (examId: number) =>
|
||||
api.get<ExamValidationReport>(`/exam/ielts/${examId}/validate`),
|
||||
|
||||
update: (examId: number, data: { status: string }) =>
|
||||
api.put<ApiSuccessResponse>(`/exam/ielts/${examId}`, data),
|
||||
|
||||
assign: (examId: number, data: ExamAssignRequest) =>
|
||||
api.post<ApiSuccessResponse>(`/exam/ielts/${examId}/assign`, data),
|
||||
};
|
||||
Reference in New Issue
Block a user