@speakableio/core 0.1.102 → 0.1.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,301 @@
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.mjs';
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 ScoreWithId as S, type FirestoreHelpers as a, type CustomTimestamp as b, ActivityPageType as c, type PageActivityWithId as d, type Score 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 };
package/dist/hooks.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { QueryClient } from '@tanstack/react-query';
3
- import { A as AssignmentWithId, b as CustomTimestamp, c as ActivityPageType, S as ScoreWithId, e as Score, f as PageScore, d as PageActivityWithId, P as PageActivity } from './assignment.model-Bcbxx8oI.mjs';
3
+ import { A as AssignmentWithId, b as CustomTimestamp, c as ActivityPageType, S as ScoreWithId, e as Score, f as PageScore, d as PageActivityWithId, P as PageActivity } from './assignment.model-Lu21tZCh.mjs';
4
4
  import { A as AssignmentAnalyticsType } from './assignment.constants-BIKM6fYi.mjs';
5
5
  import { V as VerificationCardStatus } from './card.constants-DhKFipX3.mjs';
6
6
  import { a as SpeakableNotificationType } from './notification.constants-B72fb734.mjs';
@@ -1,5 +1,5 @@
1
1
  import { V as VerificationCardStatus } from './card.constants-DhKFipX3.mjs';
2
- import { F as FirebaseInstance, a as FirestoreHelpers, C as CallableFunction, A as AssignmentWithId, b as CustomTimestamp, c as ActivityPageType, P as PageActivity, d as PageActivityWithId } from './assignment.model-Bcbxx8oI.mjs';
2
+ import { F as FirebaseInstance, a as FirestoreHelpers, C as CallableFunction, A as AssignmentWithId, b as CustomTimestamp, c as ActivityPageType, P as PageActivity, d as PageActivityWithId } from './assignment.model-Lu21tZCh.mjs';
3
3
  import { A as AssignmentAnalyticsType } from './assignment.constants-BIKM6fYi.mjs';
4
4
  import '@react-native-firebase/firestore';
5
5
  import 'firebase/firestore';
package/dist/models.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { c as ActivityPageType } from './assignment.model-Bcbxx8oI.mjs';
2
- export { g as Assignment, A as AssignmentWithId, M as MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, P as PageActivity, d as PageActivityWithId, f as PageScore, h as REPEAT_PAGE_ACTIVITY_TYPES, j as RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, R as RESPOND_PAGE_ACTIVITY_TYPES, i as RESPOND_WRITE_PAGE_ACTIVITY_TYPES, e as Score, S as ScoreWithId } from './assignment.model-Bcbxx8oI.mjs';
1
+ import { c as ActivityPageType } from './assignment.model-Lu21tZCh.mjs';
2
+ export { g as Assignment, A as AssignmentWithId, M as MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, P as PageActivity, d as PageActivityWithId, f as PageScore, h as REPEAT_PAGE_ACTIVITY_TYPES, j as RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, R as RESPOND_PAGE_ACTIVITY_TYPES, i as RESPOND_WRITE_PAGE_ACTIVITY_TYPES, e as Score, S as ScoreWithId } from './assignment.model-Lu21tZCh.mjs';
3
3
  import { FieldValue } from 'firebase/firestore';
4
4
  import '@react-native-firebase/firestore';
5
5
  import './card.constants-DhKFipX3.mjs';
package/dist/repos.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AssignmentWithId, b as CustomTimestamp, c as ActivityPageType, P as PageActivity, d as PageActivityWithId } from './assignment.model-Bcbxx8oI.mjs';
1
+ import { A as AssignmentWithId, b as CustomTimestamp, c as ActivityPageType, P as PageActivity, d as PageActivityWithId } from './assignment.model-Lu21tZCh.mjs';
2
2
  import { A as AssignmentAnalyticsType } from './assignment.constants-BIKM6fYi.mjs';
3
3
  import { V as VerificationCardStatus } from './card.constants-DhKFipX3.mjs';
4
4
  import { SetWithId } from './models.mjs';
package/dist/utils.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { b as CustomTimestamp, e as Score, c as ActivityPageType, d as PageActivityWithId } from './assignment.model-Bcbxx8oI.mjs';
1
+ import { b as CustomTimestamp, e as Score, c as ActivityPageType, d as PageActivityWithId } from './assignment.model-Lu21tZCh.mjs';
2
2
  import '@react-native-firebase/firestore';
3
3
  import 'firebase/firestore';
4
4
  import './card.constants-DhKFipX3.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakableio/core",
3
- "version": "0.1.102",
3
+ "version": "0.1.103",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Speakable-io/speakable-core.git"