@speakableio/core 1.0.0 → 1.0.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakableio/core",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Speakable-io/speakable-core.git"
@@ -86,4 +86,4 @@
86
86
  "dependencies": {
87
87
  "dayjs": "^1.11.13"
88
88
  }
89
- }
89
+ }
@@ -1,89 +0,0 @@
1
- import { FieldValue } from 'firebase/firestore';
2
-
3
- interface GradingStandard {
4
- type: 'actfl' | 'wida' | 'custom';
5
- customStandardId?: string | undefined;
6
- dateMade: FieldValue;
7
- courseId?: string;
8
- assignmentId?: string;
9
- teacherId?: string;
10
- cardId: string;
11
- setId: string;
12
- level: string;
13
- justification: string;
14
- prompt: string;
15
- transcript: string;
16
- audioUrl?: string;
17
- responseType: 'spoken' | 'written';
18
- language: string;
19
- }
20
- declare const addGradingStandardLog: (gradingStandard: GradingStandard, userId: string) => Promise<void>;
21
-
22
- declare const logGradingStandardLog: (data: {
23
- type: GradingStandard["type"];
24
- level?: GradingStandard["level"];
25
- courseId?: GradingStandard["courseId"];
26
- }) => void;
27
-
28
- declare const logOpenAssignment: (data?: {}) => void;
29
- declare const logOpenActivityPreview: (data?: {}) => void;
30
- declare const logSubmitAssignment: (data?: {}) => void;
31
- declare const logCreateAssignment: (data?: {}) => void;
32
- declare const logStartAssignment: (data?: {}) => void;
33
-
34
- declare const logRepeatSuccess: (data?: {
35
- courseId?: string;
36
- [key: string]: any;
37
- }) => void;
38
- declare const logRepeatFail: (data?: {
39
- courseId?: string;
40
- [key: string]: any;
41
- }) => void;
42
- declare const logRespondSuccess: (data: {
43
- courseId?: string;
44
- [key: string]: any;
45
- }) => void;
46
- declare const logRespondFail: (data: {
47
- courseId?: string;
48
- [key: string]: any;
49
- }) => void;
50
- declare const logRespondSubmitted: (data: {
51
- courseId?: string;
52
- [key: string]: any;
53
- }) => void;
54
- declare const logRespondError: (errorDetails: {
55
- courseId?: string;
56
- [key: string]: any;
57
- }) => void;
58
- declare const logWrittenResponseSuccess: (data: {
59
- courseId?: string;
60
- [key: string]: any;
61
- }) => void;
62
- declare const logWrittenResponseFail: (data: {
63
- courseId?: string;
64
- [key: string]: any;
65
- }) => void;
66
- declare const logWrittenResponseSubmitted: (data?: {}) => void;
67
- declare const logWrittenResponseError: (errorDetails: Record<string, unknown>) => void;
68
- declare const logFreePlanRespond: (data: {
69
- courseId?: string;
70
- [key: string]: any;
71
- }) => void;
72
- declare const logFreePlanWrittenResponse: (data: {
73
- courseId?: string;
74
- [key: string]: any;
75
- }) => void;
76
- declare const logMultipleChoiceSuccess: (data: {
77
- courseId?: string;
78
- [key: string]: any;
79
- }) => void;
80
- declare const logMultipleChoiceFail: (data: {
81
- courseId?: string;
82
- [key: string]: any;
83
- }) => void;
84
- declare const logMultipleChoiceError: (errorDetails: {
85
- courseId?: string;
86
- [key: string]: any;
87
- }) => void;
88
-
89
- export { type GradingStandard as G, addGradingStandardLog as a, logOpenAssignment as b, logOpenActivityPreview as c, logSubmitAssignment as d, logCreateAssignment as e, logStartAssignment as f, logRepeatSuccess as g, logRepeatFail as h, logRespondSuccess as i, logRespondFail as j, logRespondSubmitted as k, logGradingStandardLog as l, logRespondError as m, logWrittenResponseSuccess as n, logWrittenResponseFail as o, logWrittenResponseSubmitted as p, logWrittenResponseError as q, logFreePlanRespond as r, logFreePlanWrittenResponse as s, logMultipleChoiceSuccess as t, logMultipleChoiceFail as u, logMultipleChoiceError as v };
@@ -1,88 +0,0 @@
1
- import { FieldValue } from 'firebase/firestore';
2
-
3
- interface GradingStandard {
4
- type: 'actfl' | 'wida' | 'custom';
5
- customStandardId?: string | undefined;
6
- dateMade: FieldValue;
7
- courseId?: string;
8
- assignmentId?: string;
9
- teacherId?: string;
10
- cardId: string;
11
- setId: string;
12
- level: string;
13
- justification: string;
14
- prompt: string;
15
- transcript: string;
16
- audioUrl?: string;
17
- responseType: 'spoken' | 'written';
18
- language: string;
19
- }
20
-
21
- declare const logGradingStandardLog: (data: {
22
- type: GradingStandard["type"];
23
- level?: GradingStandard["level"];
24
- courseId?: GradingStandard["courseId"];
25
- }) => void;
26
-
27
- declare const logOpenAssignment: (data?: {}) => void;
28
- declare const logOpenActivityPreview: (data?: {}) => void;
29
- declare const logSubmitAssignment: (data?: {}) => void;
30
- declare const logCreateAssignment: (data?: {}) => void;
31
- declare const logStartAssignment: (data?: {}) => void;
32
-
33
- declare const logRepeatSuccess: (data?: {
34
- courseId?: string;
35
- [key: string]: any;
36
- }) => void;
37
- declare const logRepeatFail: (data?: {
38
- courseId?: string;
39
- [key: string]: any;
40
- }) => void;
41
- declare const logRespondSuccess: (data: {
42
- courseId?: string;
43
- [key: string]: any;
44
- }) => void;
45
- declare const logRespondFail: (data: {
46
- courseId?: string;
47
- [key: string]: any;
48
- }) => void;
49
- declare const logRespondSubmitted: (data: {
50
- courseId?: string;
51
- [key: string]: any;
52
- }) => void;
53
- declare const logRespondError: (errorDetails: {
54
- courseId?: string;
55
- [key: string]: any;
56
- }) => void;
57
- declare const logWrittenResponseSuccess: (data: {
58
- courseId?: string;
59
- [key: string]: any;
60
- }) => void;
61
- declare const logWrittenResponseFail: (data: {
62
- courseId?: string;
63
- [key: string]: any;
64
- }) => void;
65
- declare const logWrittenResponseSubmitted: (data?: {}) => void;
66
- declare const logWrittenResponseError: (errorDetails: Record<string, unknown>) => void;
67
- declare const logFreePlanRespond: (data: {
68
- courseId?: string;
69
- [key: string]: any;
70
- }) => void;
71
- declare const logFreePlanWrittenResponse: (data: {
72
- courseId?: string;
73
- [key: string]: any;
74
- }) => void;
75
- declare const logMultipleChoiceSuccess: (data: {
76
- courseId?: string;
77
- [key: string]: any;
78
- }) => void;
79
- declare const logMultipleChoiceFail: (data: {
80
- courseId?: string;
81
- [key: string]: any;
82
- }) => void;
83
- declare const logMultipleChoiceError: (errorDetails: {
84
- courseId?: string;
85
- [key: string]: any;
86
- }) => void;
87
-
88
- export { logCreateAssignment, logFreePlanRespond, logFreePlanWrittenResponse, logGradingStandardLog, logMultipleChoiceError, logMultipleChoiceFail, logMultipleChoiceSuccess, logOpenActivityPreview, logOpenAssignment, logRepeatFail, logRepeatSuccess, logRespondError, logRespondFail, logRespondSubmitted, logRespondSuccess, logStartAssignment, logSubmitAssignment, logWrittenResponseError, logWrittenResponseFail, logWrittenResponseSubmitted, logWrittenResponseSuccess };
@@ -1,32 +0,0 @@
1
- declare enum AssignmentAnalyticsType {
2
- Macro = "macro",
3
- Gradebook = "gradebook",
4
- Cards = "cards",
5
- Student = "student",
6
- StudentSummary = "student_summary",
7
- All = "all"
8
- }
9
- declare const ASSIGNMENT_ANALYTICS_TYPES: AssignmentAnalyticsType[];
10
- declare const ASSIGNMENTS_COLLECTION = "assignments";
11
- declare const ANALYTICS_SUBCOLLECTION = "analytics";
12
- declare const SCORES_SUBCOLLECTION = "scores";
13
- type RefsAssignmentFiresotre = `${typeof ASSIGNMENTS_COLLECTION}/${string}${`/${typeof ANALYTICS_SUBCOLLECTION}/${string}` | `/${typeof SCORES_SUBCOLLECTION}/${string}` | ''}`;
14
- declare const refsAssignmentFiresotre: {
15
- allAssignments: () => string;
16
- assignment: (params: {
17
- id: string;
18
- }) => `assignments/${string}`;
19
- assignmentAllAnalytics: (params: {
20
- id: string;
21
- }) => `assignments/${string}/analytics`;
22
- assignmentAnalytics: (params: {
23
- id: string;
24
- type: string;
25
- }) => `assignments/${string}/analytics/${string}`;
26
- assignmentScores: (params: {
27
- id: string;
28
- userId: string;
29
- }) => `assignments/${string}/scores/${string}`;
30
- };
31
-
32
- export { AssignmentAnalyticsType as A, type RefsAssignmentFiresotre as R, ASSIGNMENT_ANALYTICS_TYPES as a, refsAssignmentFiresotre as r };
@@ -1,301 +0,0 @@
1
- import { FirebaseFirestoreTypes, Timestamp } from '@react-native-firebase/firestore';
2
- import { Firestore, getDoc, getDocs, addDoc, setDoc, updateDoc, deleteDoc, runTransaction, writeBatch, doc, collection, query, serverTimestamp, orderBy, limit, startAt, startAfter, endAt, endBefore, where, increment, Timestamp as Timestamp$1 } from 'firebase/firestore';
3
- import { V as VerificationCardStatus } from './card.constants-DhKFipX3.js';
4
-
5
- interface PageActivityWithId extends PageActivity {
6
- id: string;
7
- }
8
- interface PageActivity {
9
- owners: string[];
10
- checked?: boolean;
11
- completed?: boolean;
12
- media_area_id?: string | null;
13
- media_area_layout?: 'left' | 'right' | null;
14
- score?: number;
15
- verificationStatus?: VerificationCardStatus;
16
- native_text?: string;
17
- repeat?: number;
18
- language?: string | null;
19
- image?: {
20
- path?: string | null;
21
- url?: string;
22
- };
23
- audio?: {
24
- path?: string | null;
25
- url?: string;
26
- } | null;
27
- notes?: string;
28
- difficulty?: string;
29
- default_language?: string;
30
- target_text?: string;
31
- type: ActivityPageType;
32
- grading_criteria?: string;
33
- scoring_type?: string;
34
- grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based';
35
- feedback_types?: string[];
36
- rubricId?: string;
37
- prompt?: string;
38
- title?: string;
39
- passing_score?: number;
40
- maxCharacters?: number;
41
- answer?: string[];
42
- choices?: {
43
- value: string;
44
- option: string;
45
- }[];
46
- MCQType?: string;
47
- multipleAttemptsAllowed?: boolean;
48
- allowRetries?: boolean;
49
- question?: string;
50
- respondTime?: number;
51
- hidePrompt?: boolean;
52
- videoUrl?: string;
53
- link?: string;
54
- text?: string;
55
- isListenAloud?: boolean;
56
- embedCode?: string;
57
- attempt?: number;
58
- correct?: number;
59
- autoGrade?: boolean;
60
- points?: number;
61
- shuffle?: boolean;
62
- translation?: string;
63
- includeAIContext?: boolean;
64
- media_area_context_ref?: string | null;
65
- standardId?: string;
66
- target_proficiency_level?: string;
67
- allowTTS?: boolean;
68
- feedback_language?: string | null;
69
- correct_answer?: string | null;
70
- limit_attempts?: boolean;
71
- max_attempts?: number;
72
- rich_text?: string;
73
- }
74
- declare enum ActivityPageType {
75
- READ_REPEAT = "READ_REPEAT",
76
- VIDEO = "VIDEO",
77
- TEXT = "TEXT",
78
- READ_RESPOND = "READ_RESPOND",
79
- FREE_RESPONSE = "FREE_RESPONSE",
80
- REPEAT = "REPEAT",
81
- RESPOND = "RESPOND",
82
- RESPOND_WRITE = "RESPOND_WRITE",
83
- TEXT_TO_SPEECH = "TEXT_TO_SPEECH",
84
- MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
85
- PODCAST = "PODCAST",
86
- MEDIA_PAGE = "MEDIA_PAGE",
87
- WRITE = "WRITE",
88
- SHORT_ANSWER = "SHORT_ANSWER",
89
- SHORT_STORY = "SHORT_STORY",
90
- SPEAK = "SPEAK",
91
- CONVERSATION = "CONVERSATION",
92
- CONVERSATION_WRITE = "CONVERSATION_WRITE",
93
- DIALOGUE = "DIALOGUE",
94
- INSTRUCTION = "INSTRUCTION",
95
- LISTEN = "LISTEN",
96
- READ = "READ",
97
- ANSWER = "ANSWER"
98
- }
99
- declare const RESPOND_PAGE_ACTIVITY_TYPES: ActivityPageType[];
100
- declare const MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES: ActivityPageType[];
101
- declare const REPEAT_PAGE_ACTIVITY_TYPES: ActivityPageType[];
102
- declare const RESPOND_WRITE_PAGE_ACTIVITY_TYPES: ActivityPageType[];
103
- declare const RESPOND_AUDIO_PAGE_ACTIVITY_TYPES: ActivityPageType[];
104
-
105
- type FirebaseInstance = FirebaseFirestoreTypes.Module | Firestore;
106
- interface FirestoreHelpers {
107
- getDoc: typeof getDoc;
108
- getDocs: typeof getDocs;
109
- addDoc: typeof addDoc;
110
- setDoc: typeof setDoc;
111
- updateDoc: typeof updateDoc;
112
- deleteDoc: typeof deleteDoc;
113
- runTransaction: typeof runTransaction;
114
- writeBatch: typeof writeBatch;
115
- doc: typeof doc;
116
- collection: typeof collection;
117
- query: typeof query;
118
- serverTimestamp: typeof serverTimestamp;
119
- orderBy: typeof orderBy;
120
- limit: typeof limit;
121
- startAt: typeof startAt;
122
- startAfter: typeof startAfter;
123
- endAt: typeof endAt;
124
- endBefore: typeof endBefore;
125
- where: typeof where;
126
- increment: typeof increment;
127
- }
128
- type CustomTimestamp = Timestamp | Timestamp$1;
129
- type CallableFunction<T = any, R = any> = (data: T) => Promise<R>;
130
-
131
- interface Assignment {
132
- name: string;
133
- description: string;
134
- scheduledTime?: string | null;
135
- dueTime?: {
136
- hours: number;
137
- minutes: number;
138
- nanos: number;
139
- };
140
- speakableio: boolean;
141
- owners: string[];
142
- image: {
143
- path: string | null;
144
- url: string;
145
- };
146
- dueDate: {
147
- day: number;
148
- month: number;
149
- year: number;
150
- };
151
- teacherName: string;
152
- courseWorkId: string | null;
153
- dueDateTimestamp: CustomTimestamp;
154
- scheduledTimeTimestamp: number;
155
- active: boolean;
156
- voice: string | null;
157
- setId: string;
158
- dateMade: {
159
- seconds: number;
160
- nanoseconds: number;
161
- };
162
- maxPoints: number;
163
- courseId: string;
164
- isAssessment: boolean;
165
- isAvailable: boolean;
166
- ltiDeeplink?: string;
167
- content?: string[];
168
- weights?: Record<string, number>;
169
- language?: string;
170
- types?: {
171
- [key in ActivityPageType]?: number;
172
- };
173
- aiEnabled?: boolean;
174
- chat_experience?: boolean;
175
- }
176
- interface AssignmentWithId extends Assignment {
177
- id: string;
178
- isAvailable: boolean;
179
- scores?: unknown;
180
- }
181
- interface Score {
182
- userId: string;
183
- owners: string[];
184
- progress: number;
185
- score: number;
186
- cards?: {
187
- [cardId: string]: PageScore;
188
- };
189
- courseId?: string;
190
- firstLoad?: boolean;
191
- googleClassroomUserId?: string;
192
- skippedCards?: number;
193
- lastPlayed?: CustomTimestamp;
194
- startDate?: CustomTimestamp;
195
- submissionDate?: CustomTimestamp;
196
- status?: 'SUBMITTED' | 'PENDING_REVIEW' | 'IN_PROGRESS' | 'FINALIZED';
197
- submitted?: boolean;
198
- successfulCards?: number;
199
- total_voiceSuccess?: number;
200
- total_voice_attempts?: number;
201
- total_words_spoken?: number;
202
- history?: PageScore[];
203
- attempts?: number;
204
- assignmentId?: string;
205
- setId?: string;
206
- }
207
- interface ScoreWithId extends Score {
208
- id: string;
209
- }
210
- interface PageScore {
211
- voiceSuccess?: number;
212
- voiceAttempts?: number;
213
- voiceFail?: number;
214
- completed?: boolean;
215
- attempts?: number;
216
- correct?: number;
217
- success?: boolean;
218
- aiSuccess?: boolean;
219
- grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based' | null;
220
- grammar_insights?: {
221
- type?: string;
222
- justification?: string;
223
- error?: boolean;
224
- correction?: string;
225
- }[];
226
- promptSuccess?: boolean;
227
- score?: number;
228
- simple_grading?: {
229
- justification?: string;
230
- success?: boolean;
231
- };
232
- suggested_response?: string;
233
- summary?: string;
234
- transcript?: string | null;
235
- errors?: any;
236
- improvedResponse?: string;
237
- audio?: string | null;
238
- actfl?: {
239
- justification: string;
240
- level: string;
241
- key_indicators?: string[];
242
- };
243
- wida?: {
244
- justification: string;
245
- level: string;
246
- key_indicators?: string[];
247
- };
248
- earned_points?: number;
249
- fileName?: string | null;
250
- max_points?: number;
251
- passing_score?: number;
252
- rubric?: {
253
- description: string;
254
- justification: string;
255
- maxPoints: number;
256
- score: number;
257
- score_title: string;
258
- title: string;
259
- }[] | null;
260
- scoring_type?: string;
261
- history?: PageScore[];
262
- media_area_opened?: boolean;
263
- noFeedbackAvailable?: boolean;
264
- proficiency_level?: {
265
- standardId: string;
266
- level: string;
267
- justification: string;
268
- key_indicators?: string[];
269
- };
270
- status?: string | null;
271
- transcriptError?: boolean;
272
- feedbackError?: boolean;
273
- totalTrys?: {
274
- markedCorrect?: boolean;
275
- selectedOption?: string | string[];
276
- attemptedAt?: CustomTimestamp;
277
- messageAttemptId?: string;
278
- }[];
279
- tryAgain?: boolean;
280
- updatedAt?: CustomTimestamp;
281
- messageAttemptId?: string;
282
- unmetCriteria?: {
283
- criterion: string;
284
- suggestion: string;
285
- explanation: string;
286
- }[];
287
- meetsCriteria?: boolean;
288
- actionableSteps?: string[];
289
- rubric_results?: {
290
- title: string;
291
- score: number;
292
- score_title: string;
293
- justification: string;
294
- maxPoints: number;
295
- description: string;
296
- }[];
297
- target_proficiency_level?: string;
298
- hint?: string[];
299
- }
300
-
301
- export { type AssignmentWithId as A, type CallableFunction as C, type FirebaseInstance as F, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES as M, type PageActivity as P, RESPOND_PAGE_ACTIVITY_TYPES as R, type Score as S, type FirestoreHelpers as a, type CustomTimestamp as b, ActivityPageType as c, type PageActivityWithId as d, type ScoreWithId as e, type PageScore as f, type Assignment as g, REPEAT_PAGE_ACTIVITY_TYPES as h, RESPOND_WRITE_PAGE_ACTIVITY_TYPES as i, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES as j };