analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
74 lines • 1.83 kB
TypeScript
import type { ScoreType } from '../../types/common';
import type { SimulationType } from '../SimulatedStudentDetailsModal/types';
/**
* Content item from simulated contents performance API
*/
export interface SimulatedContentItem {
contentId: string;
contentName: string;
bnccCode: string | null;
subject: {
id: string;
name: string;
};
simulatedExamsCount: number;
questionsCount: number;
studentsCount: number;
performance: {
correct: number;
incorrect: number;
correctPercentage: number;
};
[key: string]: unknown;
}
/**
* Paginated response for contents performance
*/
export interface ContentsPerformanceData {
data: SimulatedContentItem[];
page: number;
limit: number;
total: number;
}
/**
* Parameters for fetching contents performance
*/
export interface SimulatedContentsParams {
simulationType: SimulationType;
period?: string;
subjectId?: string | null;
areaKnowledgeId?: string | null;
schoolIds?: string[];
schoolYearIds?: string[];
classIds?: string[];
studentsIds?: string[];
page?: number;
limit?: number;
orderBy?: string;
order?: 'asc' | 'desc';
scoreType?: ScoreType;
}
/**
* API response wrapper
*/
export interface ContentsPerformanceApiResponse {
message: string;
data: ContentsPerformanceData;
}
/**
* Hook state
*/
export interface UseSimulatedContentsState {
data: ContentsPerformanceData | null;
loading: boolean;
isRefreshing: boolean;
error: string | null;
}
/**
* Hook return type
*/
export interface UseSimulatedContentsReturn extends UseSimulatedContentsState {
fetchContents: (params: SimulatedContentsParams, refresh?: boolean) => Promise<void>;
reset: () => void;
}
//# sourceMappingURL=types.d.ts.map