@iblai/data-layer 1.12.1 → 1.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,8 +33,21 @@ export declare const GRADING_ENDPOINTS: {
33
33
  service: SERVICES;
34
34
  path: (org: string, mentorId: string, criterionId: number) => string;
35
35
  };
36
+ LIST_GRADE_RESULTS: {
37
+ service: SERVICES;
38
+ path: (org: string, mentorId: string) => string;
39
+ };
40
+ GET_GRADE_RESULT: {
41
+ service: SERVICES;
42
+ path: (org: string, mentorId: string, resultId: string) => string;
43
+ };
44
+ OVERRIDE_GRADE_RESULT: {
45
+ service: SERVICES;
46
+ path: (org: string, mentorId: string, resultId: string) => string;
47
+ };
36
48
  };
37
49
  export declare const GRADING_QUERY_KEYS: {
38
50
  GET_GRADER_CONFIGURATION: () => string[];
39
51
  GET_GRADER_CRITERIA: () => string[];
52
+ GET_GRADE_RESULTS: () => string[];
40
53
  };
@@ -83,3 +83,95 @@ export type GetGraderCriterionArgs = {
83
83
  mentorId: string;
84
84
  criterionId: number;
85
85
  };
86
+ export type GradeResultPublishStatus = 'pending' | 'published' | 'failed';
87
+ export interface GradeResultStudent {
88
+ username: string;
89
+ email: string;
90
+ name: string;
91
+ }
92
+ export interface GradeResultMentor {
93
+ unique_id: string;
94
+ name: string;
95
+ }
96
+ export interface GradeResultPlatform {
97
+ platform_key: string;
98
+ }
99
+ /** List representation: enough to render a gradebook row. */
100
+ export interface GradeResult {
101
+ id: string;
102
+ mentor: GradeResultMentor;
103
+ student: GradeResultStudent;
104
+ platform: GradeResultPlatform;
105
+ /** Normalized percentage score between 0 and 1. */
106
+ score: number;
107
+ /** Normalized percentage score between 0 and 1. */
108
+ override_score: number | null;
109
+ effective_score: number;
110
+ /** Whether the AI score reached the LMS. */
111
+ status: GradeResultPublishStatus;
112
+ /** Whether the most recent override reached the LMS (null when never overridden). */
113
+ override_status: GradeResultPublishStatus | null;
114
+ graded_at: string;
115
+ overridden_at: string | null;
116
+ }
117
+ /** Full representation, including the override and publish record. */
118
+ export interface GradeResultDetail extends GradeResult {
119
+ session_id: string;
120
+ feedback: string;
121
+ /** Snapshot of the rubric used at grading time. */
122
+ rubric_snapshot: unknown;
123
+ /** Additional metadata from the evaluation (e.g. per-criterion scores). */
124
+ evaluation_metadata: unknown;
125
+ total_points: number;
126
+ published_at: string | null;
127
+ /** The override expressed the way the rubric author wrote it. */
128
+ override_points: number | null;
129
+ override_feedback: string;
130
+ /** edX username */
131
+ overridden_by: string | null;
132
+ }
133
+ export interface PaginatedGradeResultList {
134
+ count: number;
135
+ next: string | null;
136
+ previous: string | null;
137
+ results: GradeResult[];
138
+ }
139
+ export type ListGradeResultsArgs = {
140
+ org: string;
141
+ mentorId: string;
142
+ /** Case-insensitive learner email filter. */
143
+ email?: string;
144
+ /** Exact learner username filter. */
145
+ username?: string;
146
+ /** Publish status of the AI score. */
147
+ status?: GradeResultPublishStatus;
148
+ /** Publish status of the most recent override. */
149
+ override_status?: GradeResultPublishStatus;
150
+ /** ISO datetime lower bound on graded_at. */
151
+ graded_at_after?: string;
152
+ /** ISO datetime upper bound on graded_at. */
153
+ graded_at_before?: string;
154
+ /** Which field to use when ordering the results (most recent first by default). */
155
+ ordering?: string;
156
+ page?: number;
157
+ page_size?: number;
158
+ };
159
+ export type GetGradeResultArgs = {
160
+ org: string;
161
+ mentorId: string;
162
+ resultId: string;
163
+ };
164
+ /**
165
+ * PATCH body for an override. `override_points` is in rubric points
166
+ * (0 to `total_points`); null clears the override and restores the AI score.
167
+ */
168
+ export type OverrideGradeResultRequest = {
169
+ override_points?: number | null;
170
+ override_feedback?: string;
171
+ };
172
+ export type OverrideGradeResultArgs = {
173
+ org: string;
174
+ mentorId: string;
175
+ resultId: string;
176
+ formData: OverrideGradeResultRequest;
177
+ };