# modules

name: search
path: E:\Desktop\CICD\src\modules\search
layer: modules
created_at: 2026-07-07T12:24:11.405Z
description:
> 跨 4 表(questions/textbooks/exams/announcements)全文检索聚合,供 API route 直接调用,questions 用 FULLTEXT 索引其他用 LIKE


# files

kind: component
path:
E:/Desktop/CICD/src/modules/dashboard/components/student-dashboard/student-upcoming-assignments-card.tsx


kind: component
path:
E:/Desktop/CICD/src/modules/homework/components/homework-assignment-question-error-overview-card.tsx


# symbols

name: VARIANT_TYPES
kind: const
signature:
VARIANT_TYPES: readonly string[] = ["same_knowledge_point", "different_difficulty", "different_format"]


name: markAnnouncementAsReadAction
kind: function
signature:
export async function markAnnouncementAsReadAction(announcementId: string): Promise<ActionState<string>> {


name: markAnnouncementAsRead
kind: function
signature:
export async function markAnnouncementAsRead(announcementId: string, userId: string): Promise<void> {


name: isAnnouncementReadByUser
kind: function
signature:
export async function isAnnouncementReadByUser(announcementId: string, userId: string): Promise<boolean> {


name: getAuditRetentionConfigAction
kind: function
signature:
export async function getAuditRetentionConfigAction(): Promise<ActionState<AuditRetentionConfig>> {


name: ensureClassInvitationCodeAction
kind: function
signature:
export async function ensureClassInvitationCodeAction(classId: string): Promise<ActionState<{ code: string }>> {


name: regenerateClassInvitationCodeAction
kind: function
signature:
export async function regenerateClassInvitationCodeAction(classId: string): Promise<ActionState<{ code: string }>> {


name: ClassScheduleGrid
kind: function
signature:
export function ClassScheduleGrid({ schedule, compact = false }: { schedule: ClassScheduleItem[], compact?: boolean }) {


name: transformAssignmentsToChartData
kind: function
signature:
export function transformAssignmentsToChartData(assignments: AssignmentSummary[], limit?: number) {


name: getPositionStyle
kind: function
signature:
export function getPositionStyle(startTime: string, endTime: string): { top: string; height: string } {


name: getManagedGradesRaw
kind: function
signature:
getManagedGradesRaw = async (userId: string): Promise<{ id: string; name: string; schoolId: string; schoolName: string }[]> => {


name: createAdminClass
kind: function
signature:
export async function createAdminClass(data: CreateTeacherClassInput & { teacherId: string }): Promise<string> {


name: getActiveInvitationCodeRaw
kind: function
signature:
export async function getActiveInvitationCodeRaw(classId: string): Promise<InvitationCodeRecord | null> {


name: listClassInvitationCodesRaw
kind: function
signature:
export async function listClassInvitationCodesRaw(classId: string): Promise<InvitationCodeRecord[]> {


name: enrollStudentByInvitationCode
kind: function
signature:
export async function enrollStudentByInvitationCode(studentId: string, invitationCode: string): Promise<string> {


name: updateTeacherClass
kind: function
signature:
export async function updateTeacherClass(classId: string, data: UpdateTeacherClassInput): Promise<void> {


name: setStudentEnrollmentStatus
kind: function
signature:
export async function setStudentEnrollmentStatus(classId: string, studentId: string, status: "active" | "inactive"): Promise<void> {


name: verifyTeacherOwnsClass
kind: function
signature:
export async function verifyTeacherOwnsClass(classId: string, teacherId: string): Promise<boolean> {


name: getTeacherSubjectIdsForClassRaw
kind: function
signature:
getTeacherSubjectIdsForClassRaw = async (teacherId: string, classId: string): Promise<string[]> => {


name: getTeacherSubjectIdsByClassRaw
kind: function
signature:
getTeacherSubjectIdsByClassRaw = async (classId: string, teacherId: string): Promise<string[]> => {


name: getClassesByGradeIdRaw
kind: function
signature:
getClassesByGradeIdRaw = async (gradeId: string): Promise<Array<{ id: string; name: string }>> => {


name: getCoursePlansRaw
kind: function
signature:
getCoursePlansRaw = async (params?: GetCoursePlansParams, scope?: CoursePlanQueryScope): Promise<CoursePlanListItem[]> => {


name: getCoursePlanByIdRaw
kind: function
signature:
getCoursePlanByIdRaw = async (id: string, scope?: CoursePlanQueryScope): Promise<CoursePlanWithItems | null> => {


name: getGradeCoursePlanProgressRaw
kind: function
signature:
getGradeCoursePlanProgressRaw = async (params: { gradeId: string }): Promise<GradeCoursePlanProgressResult> => {


name: AdminDashboardView
kind: function
signature:
export async function AdminDashboardView({ streams }: { streams: AdminDashboardStreams }): Promise<ReactNode> {


name: AdminHeaderBadges
kind: function
signature:
export function AdminHeaderBadges({ t, streams }: { t: TranslationFunction; streams: AdminDashboardStreams }) {


name: AdminContentCard
kind: function
signature:
export function AdminContentCard({ t, streams }: { t: TranslationFunction; streams: AdminDashboardStreams }) {


name: AdminHomeworkActivityCard
kind: function
signature:
export function AdminHomeworkActivityCard({ t, streams }: { t: TranslationFunction; streams: AdminDashboardStreams }) {


name: AdminUserRolesCard
kind: function
signature:
export function AdminUserRolesCard({ t, streams }: { t: TranslationFunction; streams: AdminDashboardStreams }) {


name: AdminRecentUsersTable
kind: function
signature:
export function AdminRecentUsersTable({ t, streams }: { t: TranslationFunction; streams: AdminDashboardStreams }) {


name: DashboardErrorFallback
kind: function
signature:
export function DashboardErrorFallback({ reset }: { error: Error & { digest?: string }; reset: () => void }) {


name: StudentDashboard
kind: function
signature:
export function StudentDashboard({ dataPromise }: { dataPromise: Promise<StudentDashboardResult> }) {


name: StudentUpcomingAssignmentsCard
kind: function
signature:
export async function StudentUpcomingAssignmentsCard({ upcomingAssignments }: { upcomingAssignments: StudentHomeworkAssignmentListItem[] }) {


name: TeacherDashboardResult
kind: type
signature:
type TeacherDashboardResult = ActionState<TeacherDashboardData & { metrics: TeacherDashboardMetrics }>


name: TeacherDashboardView
kind: function
signature:
export function TeacherDashboardView({ dataPromise }: { dataPromise: Promise<TeacherDashboardResult> }) {


name: TeacherHomeworkCard
kind: function
signature:
export async function TeacherHomeworkCard({ assignments }: { assignments: HomeworkAssignmentListItem[] }) {


name: VARIANT_STYLES
kind: const
signature:
VARIANT_STYLES: Record<TeacherTodoItem["variant"], { icon: typeof AlertCircle; iconColor: string; badge: string }> = {


name: getStudentMasterySummaryRaw
kind: function
signature:
getStudentMasterySummaryRaw = async (studentId: string): Promise<StudentMasterySummary | null> => {


name: getKnowledgePointStatsRaw
kind: function
signature:
getKnowledgePointStatsRaw = async (classId?: string, gradeId?: string): Promise<KnowledgePointStat[]> => {


name: ELECTIVE_STATUS_BADGE_VARIANTS
kind: const
signature:
ELECTIVE_STATUS_BADGE_VARIANTS: Record<ElectiveCourseStatus, "default" | "secondary" | "destructive" | "outline"> = {


name: COURSE_SELECTION_STATUS_BADGE_VARIANTS
kind: const
signature:
COURSE_SELECTION_STATUS_BADGE_VARIANTS: Record<CourseSelectionStatus, "default" | "secondary" | "destructive" | "outline"> = {


name: resolveStudentDisplayNames
kind: function
signature:
resolveStudentDisplayNames = async (rows: SelectionCoreRow[]): Promise<Map<string, string | null>> => {


name: ExamPaperPreview
kind: function
signature:
export function ExamPaperPreview({ title, subject, grade, durationMin, totalScore, nodes }: ExamPaperPreviewProps) {


name: QuestionBankList
kind: function
signature:
export function QuestionBankList({ questions, onAdd, isAdded, onLoadMore, hasMore, isLoading, subject }: QuestionBankListProps): React.ReactNode {


name: StructureEditor
kind: function
signature:
export function StructureEditor({ items, onChange, onScoreChange, onGroupTitleChange, onRemove, onAddGroup, onAddSection }: StructureEditorProps) {


name: updatePreviewQuestionNodeInList
kind: function
signature:
export function updatePreviewQuestionNodeInList(questionId: string, items: ExamNode[], updater: (node: ExamNode) => ExamNode): ExamNode[] {


name: buildTaskFormValues
kind: function
signature:
export function buildTaskFormValues(values: ExamFormValues): NonNullable<PreviewBackgroundTask["result"]>["formValues"] {


name: parseStoredPreviewTasks
kind: function
signature:
export function parseStoredPreviewTasks(raw: string, t: Translator): PreviewBackgroundTask[] | null {


name: getExamsByGradeIdRaw
kind: function
signature:
getExamsByGradeIdRaw = async (params: { gradeId: string; scope: DataScope }): Promise<GradeExamsResult> => {


name: getExamForGradeEntryRaw
kind: function
signature:
getExamForGradeEntryRaw = async (examId: string, scope?: DataScope): Promise<ExamForGradeEntry | null> => {


name: toRichQuestionType
kind: function
signature:
export function toRichQuestionType(v: unknown, fallback: RichQuestionType = "single_choice"): RichQuestionType {


name: hydrateStructure
kind: function
signature:
export function hydrateStructure(nodes: ExamNode[], questionById: Map<string, Question>): ExamNode[] {


name: getFileAttachmentsByTargetRaw
kind: function
signature:
getFileAttachmentsByTargetRaw = async (targetType: string, targetId: string): Promise<FileAttachment[]> => {


name: getFileAttachmentsWithFiltersRaw
kind: function
signature:
getFileAttachmentsWithFiltersRaw = async (params: FileAttachmentQueryParams): Promise<FileAttachment[]> => {


name: effectSizeToLevel
kind: function
signature:
function effectSizeToLevel(effectSizeLabel: ClassComparisonSignificance["effectSizeLabel"]): SignificanceLevel {


name: ClassGradeReport
kind: function
signature:
export async function ClassGradeReport({ stats, ranking }: ClassGradeReportProps): Promise<JSX.Element> {


name: StudentGradeSummary
kind: function
signature:
export async function StudentGradeSummary({ summary }: { summary: StudentGradeSummary | null }): Promise<JSX.Element> {


name: getClassComparisonWithSignificanceRaw
kind: function
signature:
getClassComparisonWithSignificanceRaw = async (params: ClassComparisonParams): Promise<ClassComparisonResult> => {


name: getSubjectComparisonRaw
kind: function
signature:
getSubjectComparisonRaw = async (params: SubjectComparisonParams): Promise<SubjectComparisonItem[]> => {


name: getGradeDistributionRaw
kind: function
signature:
getGradeDistributionRaw = async (params: GradeDistributionParams): Promise<GradeDistributionResult> => {


name: getGradeDistributionByGradeIdRaw
kind: function
signature:
getGradeDistributionByGradeIdRaw = async (params: GradeDistributionByGradeParams): Promise<GradeDistributionByGradeResult> => {


name: HomeworkAssignmentForm
kind: function
signature:
export function HomeworkAssignmentForm({ exams, classes }: { exams: ExamOption[]; classes: TeacherClass[] }) {


name: HomeworkSubmissionResult
kind: function
signature:
export function HomeworkSubmissionResult({ submission }: HomeworkSubmissionResultProps): JSX.Element {


name: getHomeworkAssignmentsByIdsRaw
kind: function
signature:
getHomeworkAssignmentsByIdsRaw = async (params: { assignmentIds: string[]; limit?: number }): Promise<HomeworkAssignmentBrief[]> => {


name: getAssignmentTargetCountsRaw
kind: function
signature:
getAssignmentTargetCountsRaw = async (params: { assignmentIds: string[]; studentIds: string[] }): Promise<Map<string, number>> => {


name: getHomeworkSubmissionsForStudentsRaw
kind: function
signature:
getHomeworkSubmissionsForStudentsRaw = async (params: { assignmentIds: string[]; studentIds: string[] }): Promise<HomeworkSubmissionRecord[]> => {


name: getPublishedHomeworkAssignmentsWithSubjectRaw
kind: function
signature:
getPublishedHomeworkAssignmentsWithSubjectRaw = async (params: { assignmentIds: string[] }): Promise<HomeworkAssignmentSubjectRow[]> => {


name: getPublishedHomeworkAssignmentsWithSubject
kind: const
signature:
getPublishedHomeworkAssignmentsWithSubject = cacheFn(getPublishedHomeworkAssignmentsWithSubjectRaw, {


name: getHomeworkSubmissionsForAssignmentsRaw
kind: function
signature:
getHomeworkSubmissionsForAssignmentsRaw = async (assignmentIds: string[]): Promise<HomeworkSubmissionScoreRecord[]> => {


name: getHomeworkSubmissionDataForErrorCollection
kind: const
signature:
getHomeworkSubmissionDataForErrorCollection = cacheFn(getHomeworkSubmissionDataForErrorCollectionRaw, {


name: getHomeworkSubmissionWithAnswersForMastery
kind: const
signature:
getHomeworkSubmissionWithAnswersForMastery = cacheFn(getHomeworkSubmissionWithAnswersForMasteryRaw, {


name: getStudentHomeworkAssignmentsRaw
kind: function
signature:
getStudentHomeworkAssignmentsRaw = async (studentId: string): Promise<StudentHomeworkAssignmentListItem[]> => {


name: getStudentHomeworkTakeDataRaw
kind: function
signature:
getStudentHomeworkTakeDataRaw = async (assignmentId: string, studentId: string): Promise<StudentHomeworkTakeData | null> => {


name: getHomeworkAssignmentsRaw
kind: function
signature:
getHomeworkAssignmentsRaw = async (params?: { creatorId?: string; ids?: string[]; classId?: string; scope?: DataScope }): Promise<HomeworkAssignmentListItem[]> => {


name: getHomeworkAssignmentReviewListRaw
kind: function
signature:
getHomeworkAssignmentReviewListRaw = async (params: { creatorId: string; scope?: DataScope }): Promise<HomeworkAssignmentReviewListItem[]> => {


name: getHomeworkSubmissionsRaw
kind: function
signature:
getHomeworkSubmissionsRaw = async (params?: { assignmentId?: string; classId?: string; creatorId?: string; scope?: DataScope }): Promise<HomeworkSubmissionListItem[]> => {


name: getHomeworkSubmissionDetailsRaw
kind: function
signature:
getHomeworkSubmissionDetailsRaw = async (submissionId: string): Promise<HomeworkSubmissionDetails | null> => {


name: getTeacherGradeTrendsRaw
kind: function
signature:
getTeacherGradeTrendsRaw = async (teacherId: string, limit: number = 5): Promise<TeacherGradeTrendItem[]> => {


name: getHomeworkAssignmentAnalyticsRaw
kind: function
signature:
getHomeworkAssignmentAnalyticsRaw = async (assignmentId: string): Promise<HomeworkAssignmentAnalytics | null> => {


name: InvitationCodeRow
kind: function
signature:
function InvitationCodeRow({ record, now, onCopy, onDelete, roleLabel, t }: InvitationCodeRowProps) {


name: STATUS_STYLES
kind: const
signature:
STATUS_STYLES: Record<LeaveStatus, { variant: "default" | "secondary" | "destructive" | "outline"; iconKey: IconKey }> = {


name: MonthGrid
kind: function
signature:
function MonthGrid({ days, cursor, grouped, today, loading, t }: GridProps & { cursor: Date }): JSX.Element {


name: QaTurnEditor
kind: function
signature:
function QaTurnEditor({ turn, index, total, onUpdate, onRemove, onMoveUp, onMoveDown }: TurnProps) {


name: LessonPlanList
kind: function
signature:
export function LessonPlanList({ initialItems, subjects, viewMode = "teacher" }: Props): JSX.Element {


name: BlockRenderer
kind: function
signature:
export function BlockRenderer(props: BlockRenderProps & { type: BlockType }): ReactElement | null {


name: getTeacherInvestment
kind: const
signature:
getTeacherInvestment = cacheFn(getTeacherInvestmentRaw, { tags: ["lesson-preparation"], ttl: 60, keyParts: ["lp", "analytics", "teacher-investment"] })


name: getTemplateUsageStats
kind: const
signature:
getTemplateUsageStats = cacheFn(getTemplateUsageStatsRaw, { tags: ["lesson-preparation"], ttl: 60, keyParts: ["lp", "analytics", "template-usage"] })


name: getStandardsCoverageHeatmap
kind: const
signature:
getStandardsCoverageHeatmap = cacheFn(getStandardsCoverageHeatmapRaw, { tags: ["lesson-preparation"], ttl: 60, keyParts: ["lp", "analytics", "standards-coverage"] })


name: getGlobalLessonPlanStats
kind: const
signature:
getGlobalLessonPlanStats = cacheFn(getGlobalLessonPlanStatsRaw, { tags: ["lesson-preparation"], ttl: 60, keyParts: ["lp", "analytics", "global-stats"] })


name: getAttachmentsByPlanId
kind: const
signature:
getAttachmentsByPlanId = cacheFn(getAttachmentsByPlanIdRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "attachments", "by-plan"] })


name: getAttachmentsByBlockId
kind: const
signature:
getAttachmentsByBlockId = cacheFn(getAttachmentsByBlockIdRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "attachments", "by-block"] })


name: getAttachmentById
kind: const
signature:
getAttachmentById = cacheFn(getAttachmentByIdRaw, { tags: ["lesson-preparation"], ttl: 600, keyParts: ["lp", "attachments", "by-id"] })


name: getCalendarEvents
kind: const
signature:
getCalendarEvents = cacheFn(getCalendarEventsRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "calendar", "events"] })


name: getCommentsByPlanId
kind: const
signature:
getCommentsByPlanId = cacheFn(getCommentsByPlanIdRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "comments", "by-plan"] })


name: getCommentsByBlockId
kind: const
signature:
getCommentsByBlockId = cacheFn(getCommentsByBlockIdRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "comments", "by-block"] })


name: countUnresolvedComments
kind: const
signature:
countUnresolvedComments = cacheFn(countUnresolvedCommentsRaw, { tags: ["lesson-preparation"], ttl: 60, keyParts: ["lp", "comments", "unresolved-count"] })


name: getFormativeItemsByPlanId
kind: const
signature:
getFormativeItemsByPlanId = cacheFn(getFormativeItemsByPlanIdRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "formative", "items-by-plan"] })


name: getFormativeItemById
kind: const
signature:
getFormativeItemById = cacheFn(getFormativeItemByIdRaw, { tags: ["lesson-preparation"], ttl: 600, keyParts: ["lp", "formative", "by-id"] })


name: getResponsesByItemId
kind: const
signature:
getResponsesByItemId = cacheFn(getResponsesByItemIdRaw, { tags: ["lesson-preparation:students"], ttl: 60, keyParts: ["lp", "formative", "responses-by-item"] })


name: getResponsesByStudentId
kind: const
signature:
getResponsesByStudentId = cacheFn(getResponsesByStudentIdRaw, { tags: ["lesson-preparation:students"], ttl: 60, keyParts: ["lp", "formative", "responses-by-student"] })


name: getFormativeItemStats
kind: const
signature:
getFormativeItemStats = cacheFn(getFormativeItemStatsRaw, { tags: ["lesson-preparation"], ttl: 60, keyParts: ["lp", "formative", "stats"] })


name: getLessonPlansByKnowledgePoint
kind: const
signature:
getLessonPlansByKnowledgePoint = cacheFn(getLessonPlansByKnowledgePointRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "by-knowledge-point"] })


name: getLessonPlansByQuestion
kind: const
signature:
getLessonPlansByQuestion = cacheFn(getLessonPlansByQuestionRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "by-question"] })


name: getReviewRecordsByPlanId
kind: const
signature:
getReviewRecordsByPlanId = cacheFn(getReviewRecordsByPlanIdRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "review-records", "by-plan"] })


name: getPendingReviewPlans
kind: const
signature:
getPendingReviewPlans = cacheFn(getPendingReviewPlansRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "review", "pending"] })


name: getPlansByStatuses
kind: const
signature:
getPlansByStatuses = cacheFn(getPlansByStatusesRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "by-statuses"] })


name: getSchedulesByPlanId
kind: const
signature:
getSchedulesByPlanId = cacheFn(getSchedulesByPlanIdRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "schedules", "by-plan"] })


name: getSchedulesByDateRange
kind: const
signature:
getSchedulesByDateRange = cacheFn(getSchedulesByDateRangeRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "schedules", "by-date-range"] })


name: getSubstitutesByPlanId
kind: const
signature:
getSubstitutesByPlanId = cacheFn(getSubstitutesByPlanIdRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "substitutes", "by-plan"] })


name: getActiveSubstitutesByTeacherId
kind: const
signature:
getActiveSubstitutesByTeacherId = cacheFn(getActiveSubstitutesByTeacherIdRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "substitutes", "active-by-teacher"] })


name: getLessonPlanTemplates
kind: const
signature:
getLessonPlanTemplates = cacheFn(getLessonPlanTemplatesRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "templates", "list"] })


name: getLessonPlanVersions
kind: const
signature:
getLessonPlanVersions = cacheFn(getLessonPlanVersionsRaw, { tags: ["lesson-preparation"], ttl: 300, keyParts: ["lp", "versions", "by-plan"] })


name: getVersionContent
kind: const
signature:
getVersionContent = cacheFn(getVersionContentRaw, { tags: ["lesson-preparation"], ttl: 600, keyParts: ["lp", "versions", "content"] })


name: LESSON_PLAN_STATUSES
kind: const
signature:
LESSON_PLAN_STATUSES = ["draft", "submitted", "approved", "published", "rejected", "archived"] as const


name: deleteMessageTemplateAction
kind: function
signature:
export async function deleteMessageTemplateAction(templateId: string): Promise<ActionState<string>> {


name: resolveClassTaughtRecipients
kind: function
signature:
resolveClassTaughtRecipients = async (ctx: RecipientResolverContext): Promise<RecipientOption[]> => {


name: resolveGradeManagedRecipients
kind: function
signature:
resolveGradeManagedRecipients = async (ctx: RecipientResolverContext): Promise<RecipientOption[]> => {


name: resolveClassMembersRecipients
kind: function
signature:
resolveClassMembersRecipients = async (ctx: RecipientResolverContext): Promise<RecipientOption[]> => {


name: getMessageDraftById
kind: function
signature:
export async function getMessageDraftById(id: string, userId: string): Promise<MessageDraft | null> {


name: getNotificationPreferencesAction
kind: function
signature:
export async function getNotificationPreferencesAction(): Promise<ActionState<NotificationPreferences>> {


name: useNotificationStream
kind: function
signature:
export function useNotificationStream(options?: UseNotificationStreamOptions): UseNotificationStreamResult {


name: ChildDetailTab
kind: type
signature:
export type ChildDetailTab = "overview" | "homework" | "grades" | "exams" | "schedule" | "attendance" | "diagnostic"


name: VALID_TABS
kind: const
signature:
VALID_TABS: ChildDetailTab[] = ["overview", "homework", "grades", "exams", "schedule", "attendance", "diagnostic"]


name: ChildExamDetail
kind: function
signature:
export function ChildExamDetail({ examResults, childId, childName }: ChildExamDetailProps): JSX.Element {


name: WEEKDAY_LABELS
kind: const
signature:
WEEKDAY_LABELS = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] as const


name: verifyParentChildRelationRaw
kind: function
signature:
verifyParentChildRelationRaw = async (studentId: string, parentId: string): Promise<string | null> => {


name: getChildDashboardDataRaw
kind: function
signature:
getChildDashboardDataRaw = async (studentId: string, relation: string | null = null): Promise<ChildDashboardData | null> => {


name: getChildNameListRaw
kind: function
signature:
getChildNameListRaw = async (parentId: string): Promise<Array<{ id: string; name: string | null }>> => {


name: getParentStudentMapByStudentIdsRaw
kind: function
signature:
getParentStudentMapByStudentIdsRaw = async (studentIds: string[]): Promise<Array<{ parentId: string; studentId: string }>> => {


name: getRecentProctoringEventsRaw
kind: function
signature:
getRecentProctoringEventsRaw = async (examId: string, limit = 20): Promise<ProctoringEventWithDetails[]> => {


name: BatchOperations
kind: function
signature:
export function BatchOperations({ selectedIds, onClearSelection }: BatchOperationsProps): React.ReactNode {


name: KnowledgePointSelector
kind: function
signature:
export function KnowledgePointSelector({ selectedIds, onChange }: KnowledgePointSelectorProps): React.ReactNode {


name: OptionsEditor
kind: function
signature:
export function OptionsEditor({ options, onChange, singleChoice }: OptionsEditorProps): React.ReactNode {


name: QuestionBankResultsClient
kind: function
signature:
export function QuestionBankResultsClient({ questions }: QuestionBankResultsClientProps): React.ReactNode {


name: getKnowledgePointOptionsByChapterRaw
kind: function
signature:
export async function getKnowledgePointOptionsByChapterRaw(chapterId: string): Promise<{ id: string; name: string }[]> {


name: trackQuestionCreated
kind: function
signature:
export function trackQuestionCreated(questionId: string, questionType: string, difficulty: number): void {


name: trackQuestionUpdated
kind: function
signature:
export function trackQuestionUpdated(questionId: string, questionType: string, difficulty: number): void {


name: deleteAcademicYearAction
kind: function
signature:
export async function deleteAcademicYearAction(academicYearId: string): Promise<ActionState<string>> {


name: OrgTreeItem
kind: function
signature:
function OrgTreeItem({ node, depth, onSelect, selectedId, search }: OrgTreeItemProps): JSX.Element {


name: NotificationConfigCard
kind: function
signature:
export function NotificationConfigCard({ values, onChange }: NotificationConfigCardProps): ReactElement {


name: STRENGTH_META
kind: const
signature:
STRENGTH_META: Record<PasswordStrength, { value: number; labelKey: string; barClassName: string; indicatorClassName: string }> = {


name: SortableChapterItem
kind: function
signature:
function SortableChapterItem({ chapter, level, selectedId, onSelect, textbookId, onDelete, onCreateSub, canEdit = false }: SortableChapterItemProps) {


name: RecursiveSortableList
kind: function
signature:
function RecursiveSortableList({ items, level, selectedId, onSelect, textbookId, onDelete, onCreateSub, canEdit = false }: {


name: ChapterSidebarList
kind: function
signature:
export function ChapterSidebarList({ chapters, selectedChapterId, onSelectChapter, textbookId, canEdit = false }: ChapterSidebarListProps) {


name: TextbookSettingsDialog
kind: function
signature:
export function TextbookSettingsDialog({ textbook, trigger, redirectAfterDelete = "/teacher/textbooks" }: TextbookSettingsDialogProps) {


name: reorderChapters
kind: function
signature:
export async function reorderChapters(chapterId: string, newIndex: number, parentId: string | null): Promise<void> {


name: getTextbooksRaw
kind: function
signature:
getTextbooksRaw = async (query?: string, subject?: string, grade?: string): Promise<Textbook[]> => {


name: makeChapter
kind: function
signature:
makeChapter = (over: Partial<Chapter> & Pick<Chapter, "id" | "title" | "textbookId">): Chapter => ({


name: getCurrentStudentUserRaw
kind: function
signature:
getCurrentStudentUserRaw = async (): Promise<{ id: string; name: string; gradeId: string | null } | null> => {


name: PageHeader
kind: function
signature:
export function PageHeader({ title, description, icon: Icon, actions, className }: PageHeaderProps) {


name: attendanceStatusEnum
kind: const
signature:
attendanceStatusEnum = mysqlEnum("status", ["present", "absent", "late", "early_leave", "excused", "school_activity"])


name: attendancePeriodEnum
kind: const
signature:
attendancePeriodEnum = mysqlEnum("period", ["morning_reading", "morning", "afternoon", "evening", "full_day"])


name: courseSelectionStatusEnum
kind: const
signature:
courseSelectionStatusEnum = mysqlEnum("selection_status", ["selected", "enrolled", "waitlist", "dropped", "rejected"])


name: questionTypeEnum
kind: const
signature:
questionTypeEnum = mysqlEnum("type", ["single_choice", "multiple_choice", "text", "judgment", "composite"])


name: useLocalStorage
kind: function
signature:
export function useLocalStorage<T>(key: string, initialValue: T): [T, (value: T | ((prev: T) => T)) => void] {


name: testAiProviderConfig
kind: function
signature:
testAiProviderConfig = async (input: { apiKey: string; baseUrl?: string; model: string }): Promise<boolean> => {


name: createAiChatCompletion
kind: function
signature:
createAiChatCompletion = async (input: AiChatRequest): Promise<{ content: string; usage: unknown }> => {


name: downloadFile
kind: function
signature:
export function downloadFile(content: string, filename: string, mimeType = "text/csv;charset=utf-8"): void {


# file_imports

import_path: ./lib/source-meta
imported_names:
{ isWeakChapterSourceMeta, isAiRecommendedSourceMeta, isKnowledgePointSourceMeta, isErrorVariantSourceMeta }


import_path: @/modules/classes/data-access
imported_names:
{ getClassSchedule, getStudentClasses, getStudentSchedule, getTeacherClasses, getTeacherIdForMutations }


import_path: ../actions
imported_names:
{ saveHomeworkAnswerAction, startHomeworkSubmissionAction, submitHomeworkAction, getScansAction, deleteScanAction }


import_path: @/modules/textbooks/data-access
imported_names:
{ getChaptersByTextbookId, getTextbooks, findChapterById, getTextbookTitlesByIds, getChapterTitlesByIds }


import_path: lucide-react
imported_names:
{ Mail, MailOpen, Plus, Send, Inbox, Search, Loader2, ChevronLeft, ChevronRight, Star, RotateCcw, Users }


import_path: ./types
imported_names:
{ NotificationPayload, ChannelSendResult, Notification, NotificationPreferences, UpdateNotificationPreferencesInput }


import_path: ./schema
imported_names:
{ UpsertAcademicYearSchema, UpsertDepartmentSchema, UpsertGradeSchema, UpsertSchoolSchema, PromoteGradesSchema }


import_path: @/modules/settings/actions
imported_names:
{ deleteAiProviderAction, getAiProviderSummaries, testAiProviderAction, upsertAiProviderAction, type AiProviderSummary }


import_path: lucide-react
imported_names:
{ Loader2, Save, Bell, Mail, MessageSquare, Megaphone, GraduationCap, BookOpen, CalendarCheck, Moon, Send }


