feat(exam): version templates on dashboard

This commit is contained in:
2026-06-07 00:33:06 +01:00
parent adc7a2a05b
commit fdbc19cf0d
3 changed files with 364 additions and 64 deletions
+19 -1
View File
@@ -31,6 +31,13 @@ export interface CreateTemplatePayload {
institute_id?: string;
}
export interface UpdateTemplateMetaPayload {
title?: string;
subject?: string | null;
page_count?: number | null;
status?: ExamTemplateStatus;
}
/** Canvas children (used from S4-9 onward; defined here so the seam is complete). */
export interface ExamQuestion {
id: string;
@@ -44,16 +51,27 @@ export interface ExamQuestion {
mark_scheme: Record<string, unknown>;
is_container: boolean;
spec_ref: string | null;
bounds?: Record<string, number> | null;
page?: number | null;
}
export type ExamResponseAreaKind =
| 'response'
| 'context'
| 'question_number'
| 'mark_area'
| 'reference'
| 'furniture';
export interface ExamResponseArea {
id: string;
question_id: string;
template_id: string;
page: number;
bounds: Record<string, number>;
kind: 'response' | 'context';
kind: ExamResponseAreaKind;
response_form: string | null;
context_type?: string | null;
source: 'manual' | 'ai';
confirmed: boolean;
confidence: number | null;