@brighterly/lib-core-types 0.18.12 → 0.19.0

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.
@@ -0,0 +1,9 @@
1
+ export declare enum AssessmentStatus {
2
+ Pending = "PENDING",
3
+ Incomplete = "INCOMPLETE",
4
+ NeedGrading = "NEED_GRADING",
5
+ Completed = "COMPLETED"
6
+ }
7
+ export declare enum AssessmentType {
8
+ Baseline = "BASELINE"
9
+ }
@@ -0,0 +1,11 @@
1
+ export var AssessmentStatus;
2
+ (function (AssessmentStatus) {
3
+ AssessmentStatus["Pending"] = "PENDING";
4
+ AssessmentStatus["Incomplete"] = "INCOMPLETE";
5
+ AssessmentStatus["NeedGrading"] = "NEED_GRADING";
6
+ AssessmentStatus["Completed"] = "COMPLETED";
7
+ })(AssessmentStatus || (AssessmentStatus = {}));
8
+ export var AssessmentType;
9
+ (function (AssessmentType) {
10
+ AssessmentType["Baseline"] = "BASELINE";
11
+ })(AssessmentType || (AssessmentType = {}));
@@ -0,0 +1,136 @@
1
+ import type { AssessmentStatus, AssessmentType } from './enums';
2
+ import type { ContentBlock, DisciplineCode, Interaction, OutcomeKind, ResponseKind, RubricScoreMap } from './types';
3
+ export interface AssetRef {
4
+ url: string;
5
+ }
6
+ export interface TextBlock {
7
+ type: 'text';
8
+ value: string;
9
+ audioUrl?: string;
10
+ }
11
+ export interface ImageBlock {
12
+ type: 'image';
13
+ asset: AssetRef;
14
+ alt: string;
15
+ }
16
+ export interface AudioBlock {
17
+ type: 'audio';
18
+ asset: AssetRef;
19
+ }
20
+ export interface Choice {
21
+ id: string;
22
+ text: string;
23
+ correct: boolean;
24
+ }
25
+ export interface MultipleChoice {
26
+ type: 'multiple_choice';
27
+ mode: 'single' | 'multi';
28
+ options: Choice[];
29
+ }
30
+ export interface Blank {
31
+ accepted: string[];
32
+ caseSensitive?: boolean;
33
+ acceptSpellingErrors?: boolean;
34
+ }
35
+ export interface FillInBlanks {
36
+ type: 'fill_in_blanks';
37
+ text: string;
38
+ blanks: Blank[];
39
+ }
40
+ export interface DragTheWords {
41
+ type: 'drag_the_words';
42
+ text: string;
43
+ distractors?: string[];
44
+ }
45
+ export interface OpenEnded {
46
+ type: 'open_ended';
47
+ }
48
+ export interface WhiteboardStroke {
49
+ points: {
50
+ x: number;
51
+ y: number;
52
+ }[];
53
+ color: string;
54
+ width: number;
55
+ }
56
+ export interface Whiteboard {
57
+ type: 'whiteboard';
58
+ backgroundAsset?: AssetRef;
59
+ backgroundAlt?: string;
60
+ }
61
+ export interface AudioResponse {
62
+ type: 'audio_response';
63
+ }
64
+ export interface OpenEndedValue {
65
+ text: string;
66
+ }
67
+ export interface WhiteboardValue {
68
+ strokes: WhiteboardStroke[];
69
+ }
70
+ export interface AudioResponseValue {
71
+ asset: AssetRef;
72
+ }
73
+ export interface Standard {
74
+ code: string;
75
+ label: string;
76
+ }
77
+ export interface Rubric {
78
+ id: string;
79
+ name: string;
80
+ levels: {
81
+ score: number;
82
+ label: string;
83
+ }[];
84
+ }
85
+ export interface Activity {
86
+ id: string;
87
+ content: ContentBlock[];
88
+ interaction?: Interaction;
89
+ idkEnabled?: boolean;
90
+ points?: number;
91
+ standard?: Standard;
92
+ rubrics?: string[];
93
+ }
94
+ export interface Assessment {
95
+ id: string;
96
+ schemaVersion: number;
97
+ title: string;
98
+ disciplineCode: DisciplineCode;
99
+ grade: string;
100
+ activities: Activity[];
101
+ }
102
+ export interface Response {
103
+ activityId: string;
104
+ kind: ResponseKind;
105
+ value?: unknown;
106
+ }
107
+ export interface Outcome {
108
+ activityId: string;
109
+ outcome: OutcomeKind;
110
+ score: number;
111
+ max: number;
112
+ }
113
+ export interface AssessmentDocument {
114
+ definition: Assessment;
115
+ responses: Response[];
116
+ outcomes?: Outcome[];
117
+ rubrics?: Record<string, Rubric>;
118
+ rubricScores?: RubricScoreMap;
119
+ }
120
+ export interface StudentAssessmentDetail {
121
+ id: number;
122
+ type: AssessmentType;
123
+ type_label: string;
124
+ discipline: string;
125
+ status: AssessmentStatus;
126
+ status_label: string;
127
+ score: number | null;
128
+ submitted_at: string | null;
129
+ link: string | null;
130
+ data: AssessmentDocument | null;
131
+ }
132
+ export interface StudentAssessmentUpdatePayload {
133
+ data: AssessmentDocument;
134
+ score: number | null;
135
+ status: AssessmentStatus.NeedGrading | AssessmentStatus.Completed;
136
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { AudioBlock, AudioResponse, DragTheWords, FillInBlanks, ImageBlock, MultipleChoice, OpenEnded, TextBlock, Whiteboard } from './interfaces';
2
+ export type DisciplineCode = 'MATH' | 'ELA';
3
+ export type ContentBlock = TextBlock | ImageBlock | AudioBlock;
4
+ export type Interaction = MultipleChoice | FillInBlanks | DragTheWords | OpenEnded | Whiteboard | AudioResponse;
5
+ export type InteractionType = Interaction['type'];
6
+ export type ResponseKind = 'answered' | 'idk' | 'blank';
7
+ export type OutcomeKind = 'correct' | 'incorrect' | 'no_evidence' | 'needs_review' | 'blank' | 'graded';
8
+ export type MultipleChoiceValue = string[];
9
+ export type FillInBlanksValue = string[];
10
+ export type DragTheWordsValue = string[];
11
+ export type RubricScoreMap = Record<string, Record<string, number>>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brighterly/lib-core-types",
3
- "version": "0.18.12",
3
+ "version": "0.19.0",
4
4
  "description": "Official Brighterly lib-core-types",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -68,6 +68,16 @@
68
68
  "types": "./dist/assessment/enums.d.ts",
69
69
  "import": "./dist/assessment/enums.js"
70
70
  },
71
+ "./student-assessment/interfaces": {
72
+ "types": "./dist/student-assessment/interfaces.d.ts"
73
+ },
74
+ "./student-assessment/types": {
75
+ "types": "./dist/student-assessment/types.d.ts"
76
+ },
77
+ "./student-assessment/enums": {
78
+ "types": "./dist/student-assessment/enums.d.ts",
79
+ "import": "./dist/student-assessment/enums.js"
80
+ },
71
81
  "./booking/interfaces": {
72
82
  "types": "./dist/booking/interfaces.d.ts"
73
83
  },