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