@speakableio/core 0.1.21 → 0.1.23
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/dist/index.d.mts +12 -13
- package/dist/index.d.ts +12 -13
- package/dist/index.js +171 -152
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +165 -146
- package/dist/index.mjs.map +1 -0
- package/dist/index.native.d.mts +1291 -0
- package/dist/index.native.mjs +2263 -0
- package/dist/index.native.mjs.map +1 -0
- package/dist/index.web.d.mts +1291 -0
- package/dist/index.web.mjs +2263 -0
- package/dist/index.web.mjs.map +1 -0
- package/package.json +7 -7
|
@@ -0,0 +1,1291 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
5
|
+
import * as firebase_firestore from 'firebase/firestore';
|
|
6
|
+
import { Firestore, Timestamp as Timestamp$1, FieldValue } from 'firebase/firestore';
|
|
7
|
+
import { FirebaseFirestoreTypes, Timestamp } from '@react-native-firebase/firestore';
|
|
8
|
+
|
|
9
|
+
type FirebaseInstance = FirebaseFirestoreTypes.Module | Firestore;
|
|
10
|
+
type FirestoreHelpers = typeof firebase_firestore;
|
|
11
|
+
type CustomTimestamp = Timestamp | Timestamp$1;
|
|
12
|
+
type CallableFunction<T = any, R = any> = (data: T) => Promise<R>;
|
|
13
|
+
|
|
14
|
+
interface Assignment {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
scheduledTime?: string | null;
|
|
18
|
+
dueTime?: {
|
|
19
|
+
hours: number;
|
|
20
|
+
minutes: number;
|
|
21
|
+
nanos: number;
|
|
22
|
+
};
|
|
23
|
+
speakableio: boolean;
|
|
24
|
+
owners: string[];
|
|
25
|
+
image: {
|
|
26
|
+
path: string | null;
|
|
27
|
+
url: string;
|
|
28
|
+
};
|
|
29
|
+
dueDate: {
|
|
30
|
+
day: number;
|
|
31
|
+
month: number;
|
|
32
|
+
year: number;
|
|
33
|
+
};
|
|
34
|
+
teacherName: string;
|
|
35
|
+
courseWorkId: string | null;
|
|
36
|
+
dueDateTimestamp: CustomTimestamp;
|
|
37
|
+
scheduledTimeTimestamp: number;
|
|
38
|
+
active: boolean;
|
|
39
|
+
voice: string | null;
|
|
40
|
+
setId: string;
|
|
41
|
+
dateMade: {
|
|
42
|
+
seconds: number;
|
|
43
|
+
nanoseconds: number;
|
|
44
|
+
};
|
|
45
|
+
maxPoints: number;
|
|
46
|
+
courseId: string;
|
|
47
|
+
isAssessment: boolean;
|
|
48
|
+
isAvailable: boolean;
|
|
49
|
+
ltiDeeplink?: string;
|
|
50
|
+
}
|
|
51
|
+
interface AssignmentWithId extends Assignment {
|
|
52
|
+
id: string;
|
|
53
|
+
isAvailable: boolean;
|
|
54
|
+
scores?: unknown;
|
|
55
|
+
}
|
|
56
|
+
interface Score {
|
|
57
|
+
userId: string;
|
|
58
|
+
owners: string[];
|
|
59
|
+
progress: number;
|
|
60
|
+
score: number;
|
|
61
|
+
cards?: {
|
|
62
|
+
[cardId: string]: CardScore;
|
|
63
|
+
};
|
|
64
|
+
courseId?: string;
|
|
65
|
+
firstLoad?: boolean;
|
|
66
|
+
googleClassroomUserId?: string;
|
|
67
|
+
skippedCards?: number;
|
|
68
|
+
lastPlayed?: CustomTimestamp;
|
|
69
|
+
startDate?: CustomTimestamp;
|
|
70
|
+
submissionDate?: CustomTimestamp;
|
|
71
|
+
status?: 'SUBMITTED' | 'PENDING_REVIEW' | 'IN_PROGRESS' | 'FINALIZED';
|
|
72
|
+
submitted?: boolean;
|
|
73
|
+
successfulCards?: number;
|
|
74
|
+
total_voiceSuccess?: number;
|
|
75
|
+
total_voice_attempts?: number;
|
|
76
|
+
total_words_spoken?: number;
|
|
77
|
+
history?: CardScore[];
|
|
78
|
+
attempts?: number;
|
|
79
|
+
assignmentId?: string;
|
|
80
|
+
setId?: string;
|
|
81
|
+
}
|
|
82
|
+
interface ScoreWithId extends Score {
|
|
83
|
+
id: string;
|
|
84
|
+
}
|
|
85
|
+
interface CardScore {
|
|
86
|
+
voiceSuccess?: number;
|
|
87
|
+
voiceAttempts?: number;
|
|
88
|
+
voiceFail?: number;
|
|
89
|
+
completed?: boolean;
|
|
90
|
+
attempts?: number;
|
|
91
|
+
correct?: number;
|
|
92
|
+
success?: boolean;
|
|
93
|
+
aiSuccess?: boolean;
|
|
94
|
+
grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based';
|
|
95
|
+
grammar_insights?: {
|
|
96
|
+
type?: string;
|
|
97
|
+
justification?: string;
|
|
98
|
+
error?: boolean;
|
|
99
|
+
correction?: string;
|
|
100
|
+
}[];
|
|
101
|
+
promptSuccess?: boolean;
|
|
102
|
+
score?: number;
|
|
103
|
+
simple_grading?: {
|
|
104
|
+
justification?: string;
|
|
105
|
+
success?: boolean;
|
|
106
|
+
};
|
|
107
|
+
suggested_response?: string;
|
|
108
|
+
summary?: string;
|
|
109
|
+
transcript?: string;
|
|
110
|
+
errors?: any;
|
|
111
|
+
improvedResponse?: string;
|
|
112
|
+
audio?: string;
|
|
113
|
+
actfl?: {
|
|
114
|
+
justification: string;
|
|
115
|
+
level: string;
|
|
116
|
+
};
|
|
117
|
+
wida?: {
|
|
118
|
+
justification: string;
|
|
119
|
+
level: string;
|
|
120
|
+
};
|
|
121
|
+
earned_points?: number;
|
|
122
|
+
fileName?: string;
|
|
123
|
+
max_points?: number;
|
|
124
|
+
passing_score?: number;
|
|
125
|
+
rubric?: {
|
|
126
|
+
description: string;
|
|
127
|
+
justification: string;
|
|
128
|
+
maxPoints: number;
|
|
129
|
+
score: number;
|
|
130
|
+
score_title: string;
|
|
131
|
+
title: string;
|
|
132
|
+
}[];
|
|
133
|
+
scoring_type?: string;
|
|
134
|
+
history?: CardScore[];
|
|
135
|
+
media_area_opened?: boolean;
|
|
136
|
+
noFeedbackAvailable?: boolean;
|
|
137
|
+
proficiency_level?: {
|
|
138
|
+
standardId: string;
|
|
139
|
+
level: string;
|
|
140
|
+
justification: string;
|
|
141
|
+
key_indicators?: string[];
|
|
142
|
+
};
|
|
143
|
+
status?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare const enum AssignmentAnalyticsType {
|
|
147
|
+
Macro = "macro",
|
|
148
|
+
Gradebook = "gradebook",
|
|
149
|
+
Cards = "cards",
|
|
150
|
+
Student = "student",
|
|
151
|
+
StudentSummary = "student_summary",
|
|
152
|
+
All = "all"
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
declare const createAssignmentRepo: () => {
|
|
156
|
+
getAssignment: (params: {
|
|
157
|
+
assignmentId: string;
|
|
158
|
+
currentUserId: string;
|
|
159
|
+
analyticType?: AssignmentAnalyticsType;
|
|
160
|
+
studentId?: string;
|
|
161
|
+
}) => Promise<AssignmentWithId | {
|
|
162
|
+
scores: any;
|
|
163
|
+
id: string;
|
|
164
|
+
isAvailable: boolean;
|
|
165
|
+
name: string;
|
|
166
|
+
description: string;
|
|
167
|
+
scheduledTime?: string | null;
|
|
168
|
+
dueTime?: {
|
|
169
|
+
hours: number;
|
|
170
|
+
minutes: number;
|
|
171
|
+
nanos: number;
|
|
172
|
+
};
|
|
173
|
+
speakableio: boolean;
|
|
174
|
+
owners: string[];
|
|
175
|
+
image: {
|
|
176
|
+
path: string | null;
|
|
177
|
+
url: string;
|
|
178
|
+
};
|
|
179
|
+
dueDate: {
|
|
180
|
+
day: number;
|
|
181
|
+
month: number;
|
|
182
|
+
year: number;
|
|
183
|
+
};
|
|
184
|
+
teacherName: string;
|
|
185
|
+
courseWorkId: string | null;
|
|
186
|
+
dueDateTimestamp: CustomTimestamp;
|
|
187
|
+
scheduledTimeTimestamp: number;
|
|
188
|
+
active: boolean;
|
|
189
|
+
voice: string | null;
|
|
190
|
+
setId: string;
|
|
191
|
+
dateMade: {
|
|
192
|
+
seconds: number;
|
|
193
|
+
nanoseconds: number;
|
|
194
|
+
};
|
|
195
|
+
maxPoints: number;
|
|
196
|
+
courseId: string;
|
|
197
|
+
isAssessment: boolean;
|
|
198
|
+
ltiDeeplink?: string;
|
|
199
|
+
} | null>;
|
|
200
|
+
attachScoresAssignment: (args_0: {
|
|
201
|
+
assignments: AssignmentWithId[];
|
|
202
|
+
analyticType: AssignmentAnalyticsType;
|
|
203
|
+
studentId?: string;
|
|
204
|
+
currentUserId: string;
|
|
205
|
+
}) => Promise<{
|
|
206
|
+
scores: any;
|
|
207
|
+
id: string;
|
|
208
|
+
isAvailable: boolean;
|
|
209
|
+
name: string;
|
|
210
|
+
description: string;
|
|
211
|
+
scheduledTime?: string | null;
|
|
212
|
+
dueTime?: {
|
|
213
|
+
hours: number;
|
|
214
|
+
minutes: number;
|
|
215
|
+
nanos: number;
|
|
216
|
+
};
|
|
217
|
+
speakableio: boolean;
|
|
218
|
+
owners: string[];
|
|
219
|
+
image: {
|
|
220
|
+
path: string | null;
|
|
221
|
+
url: string;
|
|
222
|
+
};
|
|
223
|
+
dueDate: {
|
|
224
|
+
day: number;
|
|
225
|
+
month: number;
|
|
226
|
+
year: number;
|
|
227
|
+
};
|
|
228
|
+
teacherName: string;
|
|
229
|
+
courseWorkId: string | null;
|
|
230
|
+
dueDateTimestamp: CustomTimestamp;
|
|
231
|
+
scheduledTimeTimestamp: number;
|
|
232
|
+
active: boolean;
|
|
233
|
+
voice: string | null;
|
|
234
|
+
setId: string;
|
|
235
|
+
dateMade: {
|
|
236
|
+
seconds: number;
|
|
237
|
+
nanoseconds: number;
|
|
238
|
+
};
|
|
239
|
+
maxPoints: number;
|
|
240
|
+
courseId: string;
|
|
241
|
+
isAssessment: boolean;
|
|
242
|
+
ltiDeeplink?: string;
|
|
243
|
+
}[]>;
|
|
244
|
+
getAssignmentScores: (args_0: {
|
|
245
|
+
assignmentId: string;
|
|
246
|
+
currentUserId: string;
|
|
247
|
+
analyticType?: AssignmentAnalyticsType;
|
|
248
|
+
studentId?: string;
|
|
249
|
+
}) => Promise<{
|
|
250
|
+
scores: unknown;
|
|
251
|
+
id: string;
|
|
252
|
+
} | undefined>;
|
|
253
|
+
getAllAssignments: () => Promise<AssignmentWithId[]>;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
declare const assignmentQueryKeys: {
|
|
257
|
+
all: readonly ["assignments"];
|
|
258
|
+
byId: (id: string) => readonly ["assignments", string];
|
|
259
|
+
list: () => readonly ["assignments", "list"];
|
|
260
|
+
};
|
|
261
|
+
declare function useAssignment({ assignmentId, enabled, analyticType, userId, }: {
|
|
262
|
+
assignmentId: string;
|
|
263
|
+
enabled?: boolean;
|
|
264
|
+
analyticType?: AssignmentAnalyticsType;
|
|
265
|
+
userId: string;
|
|
266
|
+
}): _tanstack_react_query.UseQueryResult<AssignmentWithId | {
|
|
267
|
+
scores: any;
|
|
268
|
+
id: string;
|
|
269
|
+
isAvailable: boolean;
|
|
270
|
+
name: string;
|
|
271
|
+
description: string;
|
|
272
|
+
scheduledTime?: string | null;
|
|
273
|
+
dueTime?: {
|
|
274
|
+
hours: number;
|
|
275
|
+
minutes: number;
|
|
276
|
+
nanos: number;
|
|
277
|
+
};
|
|
278
|
+
speakableio: boolean;
|
|
279
|
+
owners: string[];
|
|
280
|
+
image: {
|
|
281
|
+
path: string | null;
|
|
282
|
+
url: string;
|
|
283
|
+
};
|
|
284
|
+
dueDate: {
|
|
285
|
+
day: number;
|
|
286
|
+
month: number;
|
|
287
|
+
year: number;
|
|
288
|
+
};
|
|
289
|
+
teacherName: string;
|
|
290
|
+
courseWorkId: string | null;
|
|
291
|
+
dueDateTimestamp: CustomTimestamp;
|
|
292
|
+
scheduledTimeTimestamp: number;
|
|
293
|
+
active: boolean;
|
|
294
|
+
voice: string | null;
|
|
295
|
+
setId: string;
|
|
296
|
+
dateMade: {
|
|
297
|
+
seconds: number;
|
|
298
|
+
nanoseconds: number;
|
|
299
|
+
};
|
|
300
|
+
maxPoints: number;
|
|
301
|
+
courseId: string;
|
|
302
|
+
isAssessment: boolean;
|
|
303
|
+
ltiDeeplink?: string;
|
|
304
|
+
} | null, Error>;
|
|
305
|
+
|
|
306
|
+
declare const enum FeedbackTypesCard {
|
|
307
|
+
SuggestedResponse = "suggested_response",
|
|
308
|
+
Wida = "wida",
|
|
309
|
+
GrammarInsights = "grammar_insights",
|
|
310
|
+
Actfl = "actfl",
|
|
311
|
+
ProficiencyLevel = "proficiency_level"
|
|
312
|
+
}
|
|
313
|
+
declare const enum LeniencyCard {
|
|
314
|
+
CONFIDENCE = "confidence",
|
|
315
|
+
EASY = "easy",
|
|
316
|
+
NORMAL = "normal",
|
|
317
|
+
HARD = "hard"
|
|
318
|
+
}
|
|
319
|
+
declare const LENIENCY_OPTIONS: {
|
|
320
|
+
label: string;
|
|
321
|
+
value: LeniencyCard;
|
|
322
|
+
}[];
|
|
323
|
+
declare const STUDENT_LEVELS_OPTIONS: {
|
|
324
|
+
label: string;
|
|
325
|
+
description: string;
|
|
326
|
+
value: string;
|
|
327
|
+
}[];
|
|
328
|
+
declare const BASE_RESPOND_FIELD_VALUES: {
|
|
329
|
+
title: string;
|
|
330
|
+
allowRetries: boolean;
|
|
331
|
+
respondTime: number;
|
|
332
|
+
maxCharacters: number;
|
|
333
|
+
};
|
|
334
|
+
declare const BASE_REPEAT_FIELD_VALUES: {
|
|
335
|
+
repeat: number;
|
|
336
|
+
};
|
|
337
|
+
declare const BASE_MULTIPLE_CHOICE_FIELD_VALUES: {
|
|
338
|
+
MCQType: string;
|
|
339
|
+
answer: string[];
|
|
340
|
+
choices: {
|
|
341
|
+
option: string;
|
|
342
|
+
value: string;
|
|
343
|
+
}[];
|
|
344
|
+
};
|
|
345
|
+
declare const enum VerificationCardStatus {
|
|
346
|
+
VERIFIED = "VERIFIED",
|
|
347
|
+
WARNING = "WARNING",
|
|
348
|
+
NOT_RECOMMENDED = "NOT_RECOMMENDED",
|
|
349
|
+
NOT_WORKING = "NOT_WORKING",
|
|
350
|
+
NOT_CHECKED = "NOT_CHECKED"
|
|
351
|
+
}
|
|
352
|
+
declare const CARDS_COLLECTION = "flashcards";
|
|
353
|
+
type RefsCardsFiresotre = `${typeof CARDS_COLLECTION}/${string}`;
|
|
354
|
+
declare const refsCardsFiresotre: {
|
|
355
|
+
allCards: string;
|
|
356
|
+
card: (id: string) => `flashcards/${string}`;
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
interface CardActivityWithId extends CardActivity {
|
|
360
|
+
id: string;
|
|
361
|
+
}
|
|
362
|
+
interface CardActivity {
|
|
363
|
+
owners: string[];
|
|
364
|
+
checked?: boolean;
|
|
365
|
+
completed?: boolean;
|
|
366
|
+
media_area_id?: string | null;
|
|
367
|
+
media_area_layout?: 'left' | 'right' | null;
|
|
368
|
+
score?: number;
|
|
369
|
+
verificationStatus?: VerificationCardStatus;
|
|
370
|
+
native_text?: string;
|
|
371
|
+
repeat?: number;
|
|
372
|
+
language?: string | null;
|
|
373
|
+
image?: {
|
|
374
|
+
path?: string | null;
|
|
375
|
+
url?: string;
|
|
376
|
+
};
|
|
377
|
+
audio?: {
|
|
378
|
+
path?: string | null;
|
|
379
|
+
url?: string;
|
|
380
|
+
} | null;
|
|
381
|
+
notes?: string;
|
|
382
|
+
difficulty?: string;
|
|
383
|
+
default_language?: string;
|
|
384
|
+
target_text?: string;
|
|
385
|
+
type: CardActivityType;
|
|
386
|
+
grading_criteria?: string;
|
|
387
|
+
scoring_type?: string;
|
|
388
|
+
grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based';
|
|
389
|
+
feedback_types?: string[];
|
|
390
|
+
rubricId?: string;
|
|
391
|
+
prompt?: string;
|
|
392
|
+
title?: string;
|
|
393
|
+
passing_score?: number;
|
|
394
|
+
maxCharacters?: number;
|
|
395
|
+
answer?: string[];
|
|
396
|
+
choices?: {
|
|
397
|
+
value: string;
|
|
398
|
+
option: string;
|
|
399
|
+
}[];
|
|
400
|
+
MCQType?: string;
|
|
401
|
+
multipleAttemptsAllowed?: boolean;
|
|
402
|
+
allowRetries?: boolean;
|
|
403
|
+
question?: string;
|
|
404
|
+
respondTime?: number;
|
|
405
|
+
hidePrompt?: boolean;
|
|
406
|
+
videoUrl?: string;
|
|
407
|
+
link?: string;
|
|
408
|
+
text?: string;
|
|
409
|
+
isListenAloud?: boolean;
|
|
410
|
+
embedCode?: string;
|
|
411
|
+
attempt?: number;
|
|
412
|
+
correct?: number;
|
|
413
|
+
autoGrade?: boolean;
|
|
414
|
+
points?: number;
|
|
415
|
+
shuffle?: boolean;
|
|
416
|
+
translation?: string;
|
|
417
|
+
includeAIContext?: boolean;
|
|
418
|
+
media_area_context_ref?: string | null;
|
|
419
|
+
standardId?: string;
|
|
420
|
+
target_proficiency_level?: string;
|
|
421
|
+
allowTTS?: boolean;
|
|
422
|
+
}
|
|
423
|
+
declare const enum CardActivityType {
|
|
424
|
+
READ_REPEAT = "READ_REPEAT",
|
|
425
|
+
VIDEO = "VIDEO",
|
|
426
|
+
TEXT = "TEXT",
|
|
427
|
+
READ_RESPOND = "READ_RESPOND",
|
|
428
|
+
FREE_RESPONSE = "FREE_RESPONSE",
|
|
429
|
+
REPEAT = "REPEAT",
|
|
430
|
+
RESPOND = "RESPOND",
|
|
431
|
+
RESPOND_WRITE = "RESPOND_WRITE",
|
|
432
|
+
TEXT_TO_SPEECH = "TEXT_TO_SPEECH",
|
|
433
|
+
MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
|
|
434
|
+
PODCAST = "PODCAST",
|
|
435
|
+
MEDIA_PAGE = "MEDIA_PAGE",
|
|
436
|
+
WRITE = "WRITE",
|
|
437
|
+
SHORT_ANSWER = "SHORT_ANSWER",
|
|
438
|
+
SHORT_STORY = "SHORT_STORY",
|
|
439
|
+
SPEAK = "SPEAK",
|
|
440
|
+
CONVERSATION = "CONVERSATION",
|
|
441
|
+
CONVERSATION_WRITE = "CONVERSATION_WRITE",
|
|
442
|
+
DIALOGUE = "DIALOGUE",
|
|
443
|
+
INSTRUCTION = "INSTRUCTION",
|
|
444
|
+
LISTEN = "LISTEN",
|
|
445
|
+
READ = "READ",
|
|
446
|
+
ANSWER = "ANSWER"
|
|
447
|
+
}
|
|
448
|
+
declare const RESPOND_CARD_ACTIVITY_TYPES: CardActivityType[];
|
|
449
|
+
declare const MULTIPLE_CHOICE_CARD_ACTIVITY_TYPES: CardActivityType[];
|
|
450
|
+
declare const REPEAT_CARD_ACTIVITY_TYPES: CardActivityType[];
|
|
451
|
+
declare const RESPOND_WRITE_CARD_ACTIVITY_TYPES: CardActivityType[];
|
|
452
|
+
declare const RESPOND_AUDIO_CARD_ACTIVITY_TYPES: CardActivityType[];
|
|
453
|
+
declare const ALLOWED_CARD_ACTIVITY_TYPES_FOR_SUMMARY: CardActivityType[];
|
|
454
|
+
|
|
455
|
+
declare const cardsQueryKeys: {
|
|
456
|
+
all: string[];
|
|
457
|
+
one: (params: {
|
|
458
|
+
cardId: string;
|
|
459
|
+
}) => string[];
|
|
460
|
+
};
|
|
461
|
+
declare function useCards({ cardIds, enabled, asObject, }: {
|
|
462
|
+
cardIds: string[];
|
|
463
|
+
enabled: boolean;
|
|
464
|
+
asObject?: boolean;
|
|
465
|
+
}): {
|
|
466
|
+
cards: CardActivityWithId[];
|
|
467
|
+
cardsObject: Record<string, CardActivityWithId> | null;
|
|
468
|
+
cardsQueries: _tanstack_react_query.UseQueryResult<CardActivityWithId | null, Error>[];
|
|
469
|
+
};
|
|
470
|
+
declare function useCreateCard(): {
|
|
471
|
+
mutationCreateCard: _tanstack_react_query.UseMutationResult<{
|
|
472
|
+
id: string;
|
|
473
|
+
} & Partial<CardActivity>, Error, {
|
|
474
|
+
data: Partial<CardActivity>;
|
|
475
|
+
}, unknown>;
|
|
476
|
+
};
|
|
477
|
+
declare function useCreateCards(): {
|
|
478
|
+
mutationCreateCards: _tanstack_react_query.UseMutationResult<{
|
|
479
|
+
id: string;
|
|
480
|
+
owners: string[];
|
|
481
|
+
checked?: boolean;
|
|
482
|
+
completed?: boolean;
|
|
483
|
+
media_area_id?: string | null;
|
|
484
|
+
media_area_layout?: "left" | "right" | null;
|
|
485
|
+
score?: number;
|
|
486
|
+
verificationStatus?: VerificationCardStatus;
|
|
487
|
+
native_text?: string;
|
|
488
|
+
repeat?: number;
|
|
489
|
+
language?: string | null;
|
|
490
|
+
image?: {
|
|
491
|
+
path?: string | null;
|
|
492
|
+
url?: string;
|
|
493
|
+
};
|
|
494
|
+
audio?: {
|
|
495
|
+
path?: string | null;
|
|
496
|
+
url?: string;
|
|
497
|
+
} | null;
|
|
498
|
+
notes?: string;
|
|
499
|
+
difficulty?: string;
|
|
500
|
+
default_language?: string;
|
|
501
|
+
target_text?: string;
|
|
502
|
+
type: CardActivityType;
|
|
503
|
+
grading_criteria?: string;
|
|
504
|
+
scoring_type?: string;
|
|
505
|
+
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
506
|
+
feedback_types?: string[];
|
|
507
|
+
rubricId?: string;
|
|
508
|
+
prompt?: string;
|
|
509
|
+
title?: string;
|
|
510
|
+
passing_score?: number;
|
|
511
|
+
maxCharacters?: number;
|
|
512
|
+
answer?: string[];
|
|
513
|
+
choices?: {
|
|
514
|
+
value: string;
|
|
515
|
+
option: string;
|
|
516
|
+
}[];
|
|
517
|
+
MCQType?: string;
|
|
518
|
+
multipleAttemptsAllowed?: boolean;
|
|
519
|
+
allowRetries?: boolean;
|
|
520
|
+
question?: string;
|
|
521
|
+
respondTime?: number;
|
|
522
|
+
hidePrompt?: boolean;
|
|
523
|
+
videoUrl?: string;
|
|
524
|
+
link?: string;
|
|
525
|
+
text?: string;
|
|
526
|
+
isListenAloud?: boolean;
|
|
527
|
+
embedCode?: string;
|
|
528
|
+
attempt?: number;
|
|
529
|
+
correct?: number;
|
|
530
|
+
autoGrade?: boolean;
|
|
531
|
+
points?: number;
|
|
532
|
+
shuffle?: boolean;
|
|
533
|
+
translation?: string;
|
|
534
|
+
includeAIContext?: boolean;
|
|
535
|
+
media_area_context_ref?: string | null;
|
|
536
|
+
standardId?: string;
|
|
537
|
+
target_proficiency_level?: string;
|
|
538
|
+
allowTTS?: boolean;
|
|
539
|
+
}[], Error, {
|
|
540
|
+
cards: CardActivity[];
|
|
541
|
+
}, unknown>;
|
|
542
|
+
};
|
|
543
|
+
declare function getCardFromCache({ cardId, queryClient, }: {
|
|
544
|
+
cardId: string;
|
|
545
|
+
queryClient: QueryClient;
|
|
546
|
+
}): CardActivityWithId | undefined;
|
|
547
|
+
declare function updateCardInCache({ cardId, card, queryClient, }: {
|
|
548
|
+
cardId: string;
|
|
549
|
+
card: CardActivityWithId | null;
|
|
550
|
+
queryClient: QueryClient;
|
|
551
|
+
}): void;
|
|
552
|
+
|
|
553
|
+
declare const createCardRepo: () => {
|
|
554
|
+
createCard: (args_0: {
|
|
555
|
+
data: Partial<CardActivity>;
|
|
556
|
+
}) => Promise<{
|
|
557
|
+
id: string;
|
|
558
|
+
} & Partial<CardActivity>>;
|
|
559
|
+
createCards: (args_0: {
|
|
560
|
+
cards: CardActivity[];
|
|
561
|
+
}) => Promise<{
|
|
562
|
+
id: string;
|
|
563
|
+
owners: string[];
|
|
564
|
+
checked?: boolean;
|
|
565
|
+
completed?: boolean;
|
|
566
|
+
media_area_id?: string | null;
|
|
567
|
+
media_area_layout?: "left" | "right" | null;
|
|
568
|
+
score?: number;
|
|
569
|
+
verificationStatus?: VerificationCardStatus;
|
|
570
|
+
native_text?: string;
|
|
571
|
+
repeat?: number;
|
|
572
|
+
language?: string | null;
|
|
573
|
+
image?: {
|
|
574
|
+
path?: string | null;
|
|
575
|
+
url?: string;
|
|
576
|
+
};
|
|
577
|
+
audio?: {
|
|
578
|
+
path?: string | null;
|
|
579
|
+
url?: string;
|
|
580
|
+
} | null;
|
|
581
|
+
notes?: string;
|
|
582
|
+
difficulty?: string;
|
|
583
|
+
default_language?: string;
|
|
584
|
+
target_text?: string;
|
|
585
|
+
type: CardActivityType;
|
|
586
|
+
grading_criteria?: string;
|
|
587
|
+
scoring_type?: string;
|
|
588
|
+
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
589
|
+
feedback_types?: string[];
|
|
590
|
+
rubricId?: string;
|
|
591
|
+
prompt?: string;
|
|
592
|
+
title?: string;
|
|
593
|
+
passing_score?: number;
|
|
594
|
+
maxCharacters?: number;
|
|
595
|
+
answer?: string[];
|
|
596
|
+
choices?: {
|
|
597
|
+
value: string;
|
|
598
|
+
option: string;
|
|
599
|
+
}[];
|
|
600
|
+
MCQType?: string;
|
|
601
|
+
multipleAttemptsAllowed?: boolean;
|
|
602
|
+
allowRetries?: boolean;
|
|
603
|
+
question?: string;
|
|
604
|
+
respondTime?: number;
|
|
605
|
+
hidePrompt?: boolean;
|
|
606
|
+
videoUrl?: string;
|
|
607
|
+
link?: string;
|
|
608
|
+
text?: string;
|
|
609
|
+
isListenAloud?: boolean;
|
|
610
|
+
embedCode?: string;
|
|
611
|
+
attempt?: number;
|
|
612
|
+
correct?: number;
|
|
613
|
+
autoGrade?: boolean;
|
|
614
|
+
points?: number;
|
|
615
|
+
shuffle?: boolean;
|
|
616
|
+
translation?: string;
|
|
617
|
+
includeAIContext?: boolean;
|
|
618
|
+
media_area_context_ref?: string | null;
|
|
619
|
+
standardId?: string;
|
|
620
|
+
target_proficiency_level?: string;
|
|
621
|
+
allowTTS?: boolean;
|
|
622
|
+
}[]>;
|
|
623
|
+
getCard: (params: {
|
|
624
|
+
cardId: string;
|
|
625
|
+
}) => Promise<CardActivityWithId | null>;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
interface SetWithId extends Set {
|
|
629
|
+
id: string;
|
|
630
|
+
}
|
|
631
|
+
interface Set {
|
|
632
|
+
id: string;
|
|
633
|
+
language: string;
|
|
634
|
+
ownerName: string;
|
|
635
|
+
weights: Record<string, number>;
|
|
636
|
+
repeat?: number;
|
|
637
|
+
voice?: string;
|
|
638
|
+
averagePhraseLength?: number;
|
|
639
|
+
passing_score?: number;
|
|
640
|
+
organizations?: string[];
|
|
641
|
+
description: string;
|
|
642
|
+
image: {
|
|
643
|
+
url: string;
|
|
644
|
+
path: null | string;
|
|
645
|
+
};
|
|
646
|
+
additionalLanguages?: string[];
|
|
647
|
+
owners: string[];
|
|
648
|
+
name: string;
|
|
649
|
+
content: string[];
|
|
650
|
+
types: {
|
|
651
|
+
[key in CardActivityType]?: number;
|
|
652
|
+
};
|
|
653
|
+
defaultLanguage: string;
|
|
654
|
+
createdAt: FieldValue;
|
|
655
|
+
public: boolean;
|
|
656
|
+
defaultRubricId?: string;
|
|
657
|
+
difficulty?: string;
|
|
658
|
+
end_screen?: {
|
|
659
|
+
variant: 0 | 1 | 2;
|
|
660
|
+
title: string;
|
|
661
|
+
description: string;
|
|
662
|
+
};
|
|
663
|
+
mcAllowRetries?: boolean;
|
|
664
|
+
welcome_screen?: {
|
|
665
|
+
variant: 'colored' | 'blank';
|
|
666
|
+
};
|
|
667
|
+
poorFunctionalityWarning?: boolean;
|
|
668
|
+
status?: 'draft' | 'published';
|
|
669
|
+
subjects?: any[];
|
|
670
|
+
respondAllowRetries?: boolean;
|
|
671
|
+
respondAllowTTS?: boolean;
|
|
672
|
+
feedbackLanguage?: string;
|
|
673
|
+
respondMaxCharacters?: number;
|
|
674
|
+
respondMaxTime?: number;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
declare const setsQueryKeys: {
|
|
678
|
+
all: string[];
|
|
679
|
+
one: (params: {
|
|
680
|
+
setId: string;
|
|
681
|
+
}) => string[];
|
|
682
|
+
};
|
|
683
|
+
declare const useSet: ({ setId, enabled }: {
|
|
684
|
+
setId: string;
|
|
685
|
+
enabled?: boolean;
|
|
686
|
+
}) => _tanstack_react_query.UseQueryResult<SetWithId | null, Error>;
|
|
687
|
+
declare function getSetFromCache({ setId, queryClient, }: {
|
|
688
|
+
setId: string | undefined;
|
|
689
|
+
queryClient: QueryClient;
|
|
690
|
+
}): SetWithId | null | undefined;
|
|
691
|
+
declare function updateSetInCache({ set, queryClient, }: {
|
|
692
|
+
set: SetWithId;
|
|
693
|
+
queryClient: QueryClient;
|
|
694
|
+
}): void;
|
|
695
|
+
|
|
696
|
+
declare const SETS_COLLECTION = "sets";
|
|
697
|
+
type RefsSetsFirestore = `${typeof SETS_COLLECTION}/${string}`;
|
|
698
|
+
declare const refsSetsFirestore: {
|
|
699
|
+
allSets: string;
|
|
700
|
+
set: (id: string) => `sets/${string}`;
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
declare const createSetRepo: () => {
|
|
704
|
+
getSet: (args_0: {
|
|
705
|
+
setId: string;
|
|
706
|
+
}) => Promise<SetWithId | null>;
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
declare const SPEAKABLE_NOTIFICATIONS: {
|
|
710
|
+
readonly NEW_ASSIGNMENT: "new_assignment";
|
|
711
|
+
readonly ASSESSMENT_SUBMITTED: "assessment_submitted";
|
|
712
|
+
readonly ASSESSMENT_SCORED: "assessment_scored";
|
|
713
|
+
readonly NEW_COMMENT: "NEW_COMMENT";
|
|
714
|
+
};
|
|
715
|
+
type SpeakableNotificationType = (typeof SPEAKABLE_NOTIFICATIONS)[keyof typeof SPEAKABLE_NOTIFICATIONS];
|
|
716
|
+
declare const SpeakableNotificationTypes: {
|
|
717
|
+
NEW_ASSIGNMENT: string;
|
|
718
|
+
FEEDBACK_FROM_TEACHER: string;
|
|
719
|
+
MESSAGE_FROM_STUDENT: string;
|
|
720
|
+
PHRASE_MARKED_CORRECT: string;
|
|
721
|
+
STUDENT_PROGRESS: string;
|
|
722
|
+
PLAYLIST_FOLLOWERS: string;
|
|
723
|
+
PLAYLIST_PLAYS: string;
|
|
724
|
+
ASSESSMENT_SUBMITTED: string;
|
|
725
|
+
ASSESSMENT_SCORED: string;
|
|
726
|
+
NEW_COMMENT: string;
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
declare const useCreateNotification: () => {
|
|
730
|
+
createNotification: (type: SpeakableNotificationType, data: any) => Promise<any>;
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
type FsClient = ReturnType<typeof createFsClientBase>;
|
|
734
|
+
declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
735
|
+
db: FirebaseInstance;
|
|
736
|
+
helpers: FirestoreHelpers;
|
|
737
|
+
httpsCallable: (name: string) => CallableFunction;
|
|
738
|
+
logEvent: (name: string, data: any) => void;
|
|
739
|
+
}): {
|
|
740
|
+
assignmentRepo: {
|
|
741
|
+
getAssignment: (params: {
|
|
742
|
+
assignmentId: string;
|
|
743
|
+
currentUserId: string;
|
|
744
|
+
analyticType?: AssignmentAnalyticsType;
|
|
745
|
+
studentId?: string;
|
|
746
|
+
}) => Promise<AssignmentWithId | {
|
|
747
|
+
scores: any;
|
|
748
|
+
id: string;
|
|
749
|
+
isAvailable: boolean;
|
|
750
|
+
name: string;
|
|
751
|
+
description: string;
|
|
752
|
+
scheduledTime?: string | null;
|
|
753
|
+
dueTime?: {
|
|
754
|
+
hours: number;
|
|
755
|
+
minutes: number;
|
|
756
|
+
nanos: number;
|
|
757
|
+
};
|
|
758
|
+
speakableio: boolean;
|
|
759
|
+
owners: string[];
|
|
760
|
+
image: {
|
|
761
|
+
path: string | null;
|
|
762
|
+
url: string;
|
|
763
|
+
};
|
|
764
|
+
dueDate: {
|
|
765
|
+
day: number;
|
|
766
|
+
month: number;
|
|
767
|
+
year: number;
|
|
768
|
+
};
|
|
769
|
+
teacherName: string;
|
|
770
|
+
courseWorkId: string | null;
|
|
771
|
+
dueDateTimestamp: CustomTimestamp;
|
|
772
|
+
scheduledTimeTimestamp: number;
|
|
773
|
+
active: boolean;
|
|
774
|
+
voice: string | null;
|
|
775
|
+
setId: string;
|
|
776
|
+
dateMade: {
|
|
777
|
+
seconds: number;
|
|
778
|
+
nanoseconds: number;
|
|
779
|
+
};
|
|
780
|
+
maxPoints: number;
|
|
781
|
+
courseId: string;
|
|
782
|
+
isAssessment: boolean;
|
|
783
|
+
ltiDeeplink?: string;
|
|
784
|
+
} | null>;
|
|
785
|
+
attachScoresAssignment: (args_0: {
|
|
786
|
+
assignments: AssignmentWithId[];
|
|
787
|
+
analyticType: AssignmentAnalyticsType;
|
|
788
|
+
studentId?: string;
|
|
789
|
+
currentUserId: string;
|
|
790
|
+
}) => Promise<{
|
|
791
|
+
scores: any;
|
|
792
|
+
id: string;
|
|
793
|
+
isAvailable: boolean;
|
|
794
|
+
name: string;
|
|
795
|
+
description: string;
|
|
796
|
+
scheduledTime?: string | null;
|
|
797
|
+
dueTime?: {
|
|
798
|
+
hours: number;
|
|
799
|
+
minutes: number;
|
|
800
|
+
nanos: number;
|
|
801
|
+
};
|
|
802
|
+
speakableio: boolean;
|
|
803
|
+
owners: string[];
|
|
804
|
+
image: {
|
|
805
|
+
path: string | null;
|
|
806
|
+
url: string;
|
|
807
|
+
};
|
|
808
|
+
dueDate: {
|
|
809
|
+
day: number;
|
|
810
|
+
month: number;
|
|
811
|
+
year: number;
|
|
812
|
+
};
|
|
813
|
+
teacherName: string;
|
|
814
|
+
courseWorkId: string | null;
|
|
815
|
+
dueDateTimestamp: CustomTimestamp;
|
|
816
|
+
scheduledTimeTimestamp: number;
|
|
817
|
+
active: boolean;
|
|
818
|
+
voice: string | null;
|
|
819
|
+
setId: string;
|
|
820
|
+
dateMade: {
|
|
821
|
+
seconds: number;
|
|
822
|
+
nanoseconds: number;
|
|
823
|
+
};
|
|
824
|
+
maxPoints: number;
|
|
825
|
+
courseId: string;
|
|
826
|
+
isAssessment: boolean;
|
|
827
|
+
ltiDeeplink?: string;
|
|
828
|
+
}[]>;
|
|
829
|
+
getAssignmentScores: (args_0: {
|
|
830
|
+
assignmentId: string;
|
|
831
|
+
currentUserId: string;
|
|
832
|
+
analyticType?: AssignmentAnalyticsType;
|
|
833
|
+
studentId?: string;
|
|
834
|
+
}) => Promise<{
|
|
835
|
+
scores: unknown;
|
|
836
|
+
id: string;
|
|
837
|
+
} | undefined>;
|
|
838
|
+
getAllAssignments: () => Promise<AssignmentWithId[]>;
|
|
839
|
+
};
|
|
840
|
+
cardRepo: {
|
|
841
|
+
createCard: (args_0: {
|
|
842
|
+
data: Partial<CardActivity>;
|
|
843
|
+
}) => Promise<{
|
|
844
|
+
id: string;
|
|
845
|
+
} & Partial<CardActivity>>;
|
|
846
|
+
createCards: (args_0: {
|
|
847
|
+
cards: CardActivity[];
|
|
848
|
+
}) => Promise<{
|
|
849
|
+
id: string;
|
|
850
|
+
owners: string[];
|
|
851
|
+
checked?: boolean;
|
|
852
|
+
completed?: boolean;
|
|
853
|
+
media_area_id?: string | null;
|
|
854
|
+
media_area_layout?: "left" | "right" | null;
|
|
855
|
+
score?: number;
|
|
856
|
+
verificationStatus?: VerificationCardStatus;
|
|
857
|
+
native_text?: string;
|
|
858
|
+
repeat?: number;
|
|
859
|
+
language?: string | null;
|
|
860
|
+
image?: {
|
|
861
|
+
path?: string | null;
|
|
862
|
+
url?: string;
|
|
863
|
+
};
|
|
864
|
+
audio?: {
|
|
865
|
+
path?: string | null;
|
|
866
|
+
url?: string;
|
|
867
|
+
} | null;
|
|
868
|
+
notes?: string;
|
|
869
|
+
difficulty?: string;
|
|
870
|
+
default_language?: string;
|
|
871
|
+
target_text?: string;
|
|
872
|
+
type: CardActivityType;
|
|
873
|
+
grading_criteria?: string;
|
|
874
|
+
scoring_type?: string;
|
|
875
|
+
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
876
|
+
feedback_types?: string[];
|
|
877
|
+
rubricId?: string;
|
|
878
|
+
prompt?: string;
|
|
879
|
+
title?: string;
|
|
880
|
+
passing_score?: number;
|
|
881
|
+
maxCharacters?: number;
|
|
882
|
+
answer?: string[];
|
|
883
|
+
choices?: {
|
|
884
|
+
value: string;
|
|
885
|
+
option: string;
|
|
886
|
+
}[];
|
|
887
|
+
MCQType?: string;
|
|
888
|
+
multipleAttemptsAllowed?: boolean;
|
|
889
|
+
allowRetries?: boolean;
|
|
890
|
+
question?: string;
|
|
891
|
+
respondTime?: number;
|
|
892
|
+
hidePrompt?: boolean;
|
|
893
|
+
videoUrl?: string;
|
|
894
|
+
link?: string;
|
|
895
|
+
text?: string;
|
|
896
|
+
isListenAloud?: boolean;
|
|
897
|
+
embedCode?: string;
|
|
898
|
+
attempt?: number;
|
|
899
|
+
correct?: number;
|
|
900
|
+
autoGrade?: boolean;
|
|
901
|
+
points?: number;
|
|
902
|
+
shuffle?: boolean;
|
|
903
|
+
translation?: string;
|
|
904
|
+
includeAIContext?: boolean;
|
|
905
|
+
media_area_context_ref?: string | null;
|
|
906
|
+
standardId?: string;
|
|
907
|
+
target_proficiency_level?: string;
|
|
908
|
+
allowTTS?: boolean;
|
|
909
|
+
}[]>;
|
|
910
|
+
getCard: (params: {
|
|
911
|
+
cardId: string;
|
|
912
|
+
}) => Promise<CardActivityWithId | null>;
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
interface UserProfile {
|
|
917
|
+
googleClassroomUserId: string;
|
|
918
|
+
image: {
|
|
919
|
+
url: string;
|
|
920
|
+
path: string;
|
|
921
|
+
};
|
|
922
|
+
displayName: string;
|
|
923
|
+
}
|
|
924
|
+
interface UserAuth {
|
|
925
|
+
uid: string;
|
|
926
|
+
email: string;
|
|
927
|
+
displayName: string | null;
|
|
928
|
+
}
|
|
929
|
+
interface Lti {
|
|
930
|
+
data: {
|
|
931
|
+
services: {
|
|
932
|
+
serviceKey: string;
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
interface User {
|
|
937
|
+
profile: UserProfile;
|
|
938
|
+
auth: UserAuth;
|
|
939
|
+
lti: Lti;
|
|
940
|
+
roles: string[];
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
declare const SpeakablePlanTypes: {
|
|
944
|
+
readonly basic: "basic";
|
|
945
|
+
readonly teacher_pro: "teacher_pro";
|
|
946
|
+
readonly school_starter: "school_starter";
|
|
947
|
+
readonly organization: "organization";
|
|
948
|
+
readonly starter: "starter";
|
|
949
|
+
readonly growth: "growth";
|
|
950
|
+
readonly professional: "professional";
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
interface Permissions {
|
|
954
|
+
loaded: boolean;
|
|
955
|
+
loading: boolean;
|
|
956
|
+
permissions: string[];
|
|
957
|
+
plan: keyof typeof SpeakablePlanTypes;
|
|
958
|
+
subscriptionId: string;
|
|
959
|
+
isInstitutionPlan: boolean;
|
|
960
|
+
type: string;
|
|
961
|
+
contact: string;
|
|
962
|
+
hasStudentPortfolios?: boolean;
|
|
963
|
+
refreshDate: string;
|
|
964
|
+
isStripePlan: boolean;
|
|
965
|
+
freeOrgTrialExpired?: boolean;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
interface FsContext {
|
|
969
|
+
speakableApi: Awaited<FsClient>;
|
|
970
|
+
queryClient: QueryClient;
|
|
971
|
+
user: User;
|
|
972
|
+
permissions: Permissions;
|
|
973
|
+
}
|
|
974
|
+
declare const FsCtx: React.Context<FsContext | null>;
|
|
975
|
+
declare function SpeakableProvider({ user, children, queryClient, permissions, fsClient, }: {
|
|
976
|
+
children: React.ReactNode;
|
|
977
|
+
fsClient: FsClient;
|
|
978
|
+
permissions: Permissions;
|
|
979
|
+
queryClient: QueryClient;
|
|
980
|
+
user: User;
|
|
981
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
982
|
+
declare function useSpeakableApi(): FsContext;
|
|
983
|
+
|
|
984
|
+
declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData, }: {
|
|
985
|
+
id: string;
|
|
986
|
+
isAssignment: boolean;
|
|
987
|
+
onAssignmentSubmitted: (assignmentId: string) => void;
|
|
988
|
+
ltiData?: {
|
|
989
|
+
lineItemId?: string;
|
|
990
|
+
lti_id?: string;
|
|
991
|
+
serviceKey?: string;
|
|
992
|
+
};
|
|
993
|
+
}): {
|
|
994
|
+
set: {
|
|
995
|
+
data: SetWithId | null | undefined;
|
|
996
|
+
query: _tanstack_react_query.UseQueryResult<SetWithId | null, Error>;
|
|
997
|
+
};
|
|
998
|
+
cards: {
|
|
999
|
+
data: Record<string, CardActivityWithId> | null;
|
|
1000
|
+
query: _tanstack_react_query.UseQueryResult<CardActivityWithId | null, Error>[];
|
|
1001
|
+
cardsArray: CardActivityWithId[];
|
|
1002
|
+
};
|
|
1003
|
+
assignment: {
|
|
1004
|
+
data: AssignmentWithId | {
|
|
1005
|
+
scores: any;
|
|
1006
|
+
id: string;
|
|
1007
|
+
isAvailable: boolean;
|
|
1008
|
+
name: string;
|
|
1009
|
+
description: string;
|
|
1010
|
+
scheduledTime?: string | null;
|
|
1011
|
+
dueTime?: {
|
|
1012
|
+
hours: number;
|
|
1013
|
+
minutes: number;
|
|
1014
|
+
nanos: number;
|
|
1015
|
+
};
|
|
1016
|
+
speakableio: boolean;
|
|
1017
|
+
owners: string[];
|
|
1018
|
+
image: {
|
|
1019
|
+
path: string | null;
|
|
1020
|
+
url: string;
|
|
1021
|
+
};
|
|
1022
|
+
dueDate: {
|
|
1023
|
+
day: number;
|
|
1024
|
+
month: number;
|
|
1025
|
+
year: number;
|
|
1026
|
+
};
|
|
1027
|
+
teacherName: string;
|
|
1028
|
+
courseWorkId: string | null;
|
|
1029
|
+
dueDateTimestamp: CustomTimestamp;
|
|
1030
|
+
scheduledTimeTimestamp: number;
|
|
1031
|
+
active: boolean;
|
|
1032
|
+
voice: string | null;
|
|
1033
|
+
setId: string;
|
|
1034
|
+
dateMade: {
|
|
1035
|
+
seconds: number;
|
|
1036
|
+
nanoseconds: number;
|
|
1037
|
+
};
|
|
1038
|
+
maxPoints: number;
|
|
1039
|
+
courseId: string;
|
|
1040
|
+
isAssessment: boolean;
|
|
1041
|
+
ltiDeeplink?: string;
|
|
1042
|
+
} | null | undefined;
|
|
1043
|
+
query: _tanstack_react_query.UseQueryResult<AssignmentWithId | {
|
|
1044
|
+
scores: any;
|
|
1045
|
+
id: string;
|
|
1046
|
+
isAvailable: boolean;
|
|
1047
|
+
name: string;
|
|
1048
|
+
description: string;
|
|
1049
|
+
scheduledTime?: string | null;
|
|
1050
|
+
dueTime?: {
|
|
1051
|
+
hours: number;
|
|
1052
|
+
minutes: number;
|
|
1053
|
+
nanos: number;
|
|
1054
|
+
};
|
|
1055
|
+
speakableio: boolean;
|
|
1056
|
+
owners: string[];
|
|
1057
|
+
image: {
|
|
1058
|
+
path: string | null;
|
|
1059
|
+
url: string;
|
|
1060
|
+
};
|
|
1061
|
+
dueDate: {
|
|
1062
|
+
day: number;
|
|
1063
|
+
month: number;
|
|
1064
|
+
year: number;
|
|
1065
|
+
};
|
|
1066
|
+
teacherName: string;
|
|
1067
|
+
courseWorkId: string | null;
|
|
1068
|
+
dueDateTimestamp: CustomTimestamp;
|
|
1069
|
+
scheduledTimeTimestamp: number;
|
|
1070
|
+
active: boolean;
|
|
1071
|
+
voice: string | null;
|
|
1072
|
+
setId: string;
|
|
1073
|
+
dateMade: {
|
|
1074
|
+
seconds: number;
|
|
1075
|
+
nanoseconds: number;
|
|
1076
|
+
};
|
|
1077
|
+
maxPoints: number;
|
|
1078
|
+
courseId: string;
|
|
1079
|
+
isAssessment: boolean;
|
|
1080
|
+
ltiDeeplink?: string;
|
|
1081
|
+
} | null, Error>;
|
|
1082
|
+
};
|
|
1083
|
+
scores: {
|
|
1084
|
+
data: ScoreWithId | undefined;
|
|
1085
|
+
query: _tanstack_react_query.UseQueryResult<ScoreWithId, Error>;
|
|
1086
|
+
actions: {
|
|
1087
|
+
update: (data: Partial<Score>) => void;
|
|
1088
|
+
clear: ({ cardId, wasCompleted, }: {
|
|
1089
|
+
cardId: string;
|
|
1090
|
+
wasCompleted?: boolean;
|
|
1091
|
+
}) => void;
|
|
1092
|
+
submit: () => Promise<{
|
|
1093
|
+
success: boolean;
|
|
1094
|
+
message: string;
|
|
1095
|
+
error?: undefined;
|
|
1096
|
+
} | {
|
|
1097
|
+
success: boolean;
|
|
1098
|
+
error: unknown;
|
|
1099
|
+
message?: undefined;
|
|
1100
|
+
}>;
|
|
1101
|
+
updateCard: (cardId: string, cardScore: CardScore) => void;
|
|
1102
|
+
logGradingStandardEntry: ({ cardId, gradingStandard, type, }: {
|
|
1103
|
+
cardId: string;
|
|
1104
|
+
gradingStandard: {
|
|
1105
|
+
level: string;
|
|
1106
|
+
justification: string;
|
|
1107
|
+
};
|
|
1108
|
+
type: "actfl" | "wida" | "custom";
|
|
1109
|
+
}) => void;
|
|
1110
|
+
};
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
declare const createFsClientNative: ({ db, httpsCallable, logEvent, }: Parameters<typeof createFsClientBase>[0]) => {
|
|
1115
|
+
assignmentRepo: {
|
|
1116
|
+
getAssignment: (params: {
|
|
1117
|
+
assignmentId: string;
|
|
1118
|
+
currentUserId: string;
|
|
1119
|
+
analyticType?: AssignmentAnalyticsType;
|
|
1120
|
+
studentId?: string;
|
|
1121
|
+
}) => Promise<AssignmentWithId | {
|
|
1122
|
+
scores: any;
|
|
1123
|
+
id: string;
|
|
1124
|
+
isAvailable: boolean;
|
|
1125
|
+
name: string;
|
|
1126
|
+
description: string;
|
|
1127
|
+
scheduledTime?: string | null;
|
|
1128
|
+
dueTime?: {
|
|
1129
|
+
hours: number;
|
|
1130
|
+
minutes: number;
|
|
1131
|
+
nanos: number;
|
|
1132
|
+
};
|
|
1133
|
+
speakableio: boolean;
|
|
1134
|
+
owners: string[];
|
|
1135
|
+
image: {
|
|
1136
|
+
path: string | null;
|
|
1137
|
+
url: string;
|
|
1138
|
+
};
|
|
1139
|
+
dueDate: {
|
|
1140
|
+
day: number;
|
|
1141
|
+
month: number;
|
|
1142
|
+
year: number;
|
|
1143
|
+
};
|
|
1144
|
+
teacherName: string;
|
|
1145
|
+
courseWorkId: string | null;
|
|
1146
|
+
dueDateTimestamp: CustomTimestamp;
|
|
1147
|
+
scheduledTimeTimestamp: number;
|
|
1148
|
+
active: boolean;
|
|
1149
|
+
voice: string | null;
|
|
1150
|
+
setId: string;
|
|
1151
|
+
dateMade: {
|
|
1152
|
+
seconds: number;
|
|
1153
|
+
nanoseconds: number;
|
|
1154
|
+
};
|
|
1155
|
+
maxPoints: number;
|
|
1156
|
+
courseId: string;
|
|
1157
|
+
isAssessment: boolean;
|
|
1158
|
+
ltiDeeplink?: string;
|
|
1159
|
+
} | null>;
|
|
1160
|
+
attachScoresAssignment: (args_0: {
|
|
1161
|
+
assignments: AssignmentWithId[];
|
|
1162
|
+
analyticType: AssignmentAnalyticsType;
|
|
1163
|
+
studentId?: string;
|
|
1164
|
+
currentUserId: string;
|
|
1165
|
+
}) => Promise<{
|
|
1166
|
+
scores: any;
|
|
1167
|
+
id: string;
|
|
1168
|
+
isAvailable: boolean;
|
|
1169
|
+
name: string;
|
|
1170
|
+
description: string;
|
|
1171
|
+
scheduledTime?: string | null;
|
|
1172
|
+
dueTime?: {
|
|
1173
|
+
hours: number;
|
|
1174
|
+
minutes: number;
|
|
1175
|
+
nanos: number;
|
|
1176
|
+
};
|
|
1177
|
+
speakableio: boolean;
|
|
1178
|
+
owners: string[];
|
|
1179
|
+
image: {
|
|
1180
|
+
path: string | null;
|
|
1181
|
+
url: string;
|
|
1182
|
+
};
|
|
1183
|
+
dueDate: {
|
|
1184
|
+
day: number;
|
|
1185
|
+
month: number;
|
|
1186
|
+
year: number;
|
|
1187
|
+
};
|
|
1188
|
+
teacherName: string;
|
|
1189
|
+
courseWorkId: string | null;
|
|
1190
|
+
dueDateTimestamp: CustomTimestamp;
|
|
1191
|
+
scheduledTimeTimestamp: number;
|
|
1192
|
+
active: boolean;
|
|
1193
|
+
voice: string | null;
|
|
1194
|
+
setId: string;
|
|
1195
|
+
dateMade: {
|
|
1196
|
+
seconds: number;
|
|
1197
|
+
nanoseconds: number;
|
|
1198
|
+
};
|
|
1199
|
+
maxPoints: number;
|
|
1200
|
+
courseId: string;
|
|
1201
|
+
isAssessment: boolean;
|
|
1202
|
+
ltiDeeplink?: string;
|
|
1203
|
+
}[]>;
|
|
1204
|
+
getAssignmentScores: (args_0: {
|
|
1205
|
+
assignmentId: string;
|
|
1206
|
+
currentUserId: string;
|
|
1207
|
+
analyticType?: AssignmentAnalyticsType;
|
|
1208
|
+
studentId?: string;
|
|
1209
|
+
}) => Promise<{
|
|
1210
|
+
scores: unknown;
|
|
1211
|
+
id: string;
|
|
1212
|
+
} | undefined>;
|
|
1213
|
+
getAllAssignments: () => Promise<AssignmentWithId[]>;
|
|
1214
|
+
};
|
|
1215
|
+
cardRepo: {
|
|
1216
|
+
createCard: (args_0: {
|
|
1217
|
+
data: Partial<CardActivity>;
|
|
1218
|
+
}) => Promise<{
|
|
1219
|
+
id: string;
|
|
1220
|
+
} & Partial<CardActivity>>;
|
|
1221
|
+
createCards: (args_0: {
|
|
1222
|
+
cards: CardActivity[];
|
|
1223
|
+
}) => Promise<{
|
|
1224
|
+
id: string;
|
|
1225
|
+
owners: string[];
|
|
1226
|
+
checked?: boolean;
|
|
1227
|
+
completed?: boolean;
|
|
1228
|
+
media_area_id?: string | null;
|
|
1229
|
+
media_area_layout?: "left" | "right" | null;
|
|
1230
|
+
score?: number;
|
|
1231
|
+
verificationStatus?: VerificationCardStatus;
|
|
1232
|
+
native_text?: string;
|
|
1233
|
+
repeat?: number;
|
|
1234
|
+
language?: string | null;
|
|
1235
|
+
image?: {
|
|
1236
|
+
path?: string | null;
|
|
1237
|
+
url?: string;
|
|
1238
|
+
};
|
|
1239
|
+
audio?: {
|
|
1240
|
+
path?: string | null;
|
|
1241
|
+
url?: string;
|
|
1242
|
+
} | null;
|
|
1243
|
+
notes?: string;
|
|
1244
|
+
difficulty?: string;
|
|
1245
|
+
default_language?: string;
|
|
1246
|
+
target_text?: string;
|
|
1247
|
+
type: CardActivityType;
|
|
1248
|
+
grading_criteria?: string;
|
|
1249
|
+
scoring_type?: string;
|
|
1250
|
+
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1251
|
+
feedback_types?: string[];
|
|
1252
|
+
rubricId?: string;
|
|
1253
|
+
prompt?: string;
|
|
1254
|
+
title?: string;
|
|
1255
|
+
passing_score?: number;
|
|
1256
|
+
maxCharacters?: number;
|
|
1257
|
+
answer?: string[];
|
|
1258
|
+
choices?: {
|
|
1259
|
+
value: string;
|
|
1260
|
+
option: string;
|
|
1261
|
+
}[];
|
|
1262
|
+
MCQType?: string;
|
|
1263
|
+
multipleAttemptsAllowed?: boolean;
|
|
1264
|
+
allowRetries?: boolean;
|
|
1265
|
+
question?: string;
|
|
1266
|
+
respondTime?: number;
|
|
1267
|
+
hidePrompt?: boolean;
|
|
1268
|
+
videoUrl?: string;
|
|
1269
|
+
link?: string;
|
|
1270
|
+
text?: string;
|
|
1271
|
+
isListenAloud?: boolean;
|
|
1272
|
+
embedCode?: string;
|
|
1273
|
+
attempt?: number;
|
|
1274
|
+
correct?: number;
|
|
1275
|
+
autoGrade?: boolean;
|
|
1276
|
+
points?: number;
|
|
1277
|
+
shuffle?: boolean;
|
|
1278
|
+
translation?: string;
|
|
1279
|
+
includeAIContext?: boolean;
|
|
1280
|
+
media_area_context_ref?: string | null;
|
|
1281
|
+
standardId?: string;
|
|
1282
|
+
target_proficiency_level?: string;
|
|
1283
|
+
allowTTS?: boolean;
|
|
1284
|
+
}[]>;
|
|
1285
|
+
getCard: (params: {
|
|
1286
|
+
cardId: string;
|
|
1287
|
+
}) => Promise<CardActivityWithId | null>;
|
|
1288
|
+
};
|
|
1289
|
+
};
|
|
1290
|
+
|
|
1291
|
+
export { ALLOWED_CARD_ACTIVITY_TYPES_FOR_SUMMARY, type Assignment, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CardActivity, CardActivityType, type CardActivityWithId, type CardScore, FeedbackTypesCard, FsCtx, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_CARD_ACTIVITY_TYPES, REPEAT_CARD_ACTIVITY_TYPES, RESPOND_AUDIO_CARD_ACTIVITY_TYPES, RESPOND_CARD_ACTIVITY_TYPES, RESPOND_WRITE_CARD_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, getCardFromCache, getSetFromCache, refsCardsFiresotre, refsSetsFirestore, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useAssignment, useCards, useCreateCard, useCreateCards, useCreateNotification, useSet, useSpeakableApi };
|