@speakableio/core 1.0.0 → 1.0.2

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.
Files changed (42) hide show
  1. package/dist/analytics.d.mts +38 -1
  2. package/dist/analytics.js +117 -1
  3. package/dist/analytics.js.map +1 -1
  4. package/dist/index.native.js +15 -1
  5. package/dist/index.native.js.map +1 -1
  6. package/dist/index.native.mjs +15 -1
  7. package/dist/index.native.mjs.map +1 -1
  8. package/dist/index.web.js +15 -1
  9. package/dist/index.web.js.map +1 -1
  10. package/package.json +2 -2
  11. package/dist/analytics-Bj2i88Zk.d.ts +0 -89
  12. package/dist/analytics.d.ts +0 -88
  13. package/dist/assignment.constants-BIKM6fYi.d.ts +0 -32
  14. package/dist/assignment.model-BRS4h8gX.d.ts +0 -301
  15. package/dist/assignment.model-Bc61gBHl.d.ts +0 -302
  16. package/dist/assignment.model-Bm9gE2YK.d.ts +0 -301
  17. package/dist/card.constants-DhKFipX3.d.ts +0 -54
  18. package/dist/const.d.ts +0 -261
  19. package/dist/const.js +0 -503
  20. package/dist/const.js.map +0 -1
  21. package/dist/everything.d.ts +0 -1348
  22. package/dist/everything.js +0 -3509
  23. package/dist/everything.js.map +0 -1
  24. package/dist/hooks.d.ts +0 -911
  25. package/dist/hooks.js +0 -2699
  26. package/dist/hooks.js.map +0 -1
  27. package/dist/index.web-DNYJV_41.d.ts +0 -469
  28. package/dist/index.web.d.ts +0 -471
  29. package/dist/models.d.ts +0 -56
  30. package/dist/models.js +0 -52
  31. package/dist/models.js.map +0 -1
  32. package/dist/notification.constants-B72fb734.d.ts +0 -21
  33. package/dist/repos.d.ts +0 -209
  34. package/dist/repos.js +0 -453
  35. package/dist/repos.js.map +0 -1
  36. package/dist/speakable-plans-BjWWEWrQ.d.ts +0 -72
  37. package/dist/speakable-plans-DR1cQ6IK.d.ts +0 -92
  38. package/dist/speakable-plans-Dq9nRefI.d.ts +0 -72
  39. package/dist/utils.d.ts +0 -121
  40. package/dist/utils.js +0 -646
  41. package/dist/utils.js.map +0 -1
  42. package/dist/web.constants-qmx4rGyO.d.ts +0 -26
@@ -1,469 +0,0 @@
1
- import { V as VerificationCardStatus } from './card.constants-DhKFipX3.js';
2
- import { j as FirebaseInstance, F as FirestoreHelpers, e as CallableFunction, A as AssignmentWithId, C as CustomTimestamp, a as ActivityPageType, c as PageActivity, d as PageActivityWithId } from './assignment.model-Bc61gBHl.js';
3
- import { A as AssignmentAnalyticsType } from './assignment.constants-BIKM6fYi.js';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import React from 'react';
6
- import { QueryClient } from '@tanstack/react-query';
7
- import { f as SpeakablePlanTypes } from './speakable-plans-Dq9nRefI.js';
8
-
9
- type FsClient = ReturnType<typeof createFsClientBase>;
10
- type FsClientParams = Omit<Parameters<typeof createFsClientBase>[0], 'helpers'>;
11
- declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
12
- db: FirebaseInstance;
13
- helpers: FirestoreHelpers;
14
- httpsCallable: (name: string) => CallableFunction;
15
- logEvent: (name: string, data: any) => void;
16
- }): {
17
- assignmentRepo: {
18
- getAssignment: (params: {
19
- assignmentId: string;
20
- currentUserId: string;
21
- analyticType?: AssignmentAnalyticsType;
22
- studentId?: string;
23
- }) => Promise<AssignmentWithId | {
24
- scores: any;
25
- id: string;
26
- isAvailable: boolean;
27
- name: string;
28
- description: string;
29
- scheduledTime?: string | null;
30
- dueTime?: {
31
- hours: number;
32
- minutes: number;
33
- nanos: number;
34
- };
35
- speakableio: boolean;
36
- owners: string[];
37
- image: {
38
- path: string | null;
39
- url: string;
40
- };
41
- dueDate: {
42
- day: number;
43
- month: number;
44
- year: number;
45
- };
46
- teacherName: string;
47
- courseWorkId: string | null;
48
- dueDateTimestamp: CustomTimestamp;
49
- scheduledTimeTimestamp: number;
50
- active: boolean;
51
- voice: string | null;
52
- setId: string;
53
- dateMade: {
54
- seconds: number;
55
- nanoseconds: number;
56
- };
57
- maxPoints: number;
58
- courseId: string;
59
- isAssessment: boolean;
60
- ltiDeeplink?: string;
61
- content?: string[];
62
- weights?: Record<string, number>;
63
- language?: string;
64
- types?: { [key in ActivityPageType]?: number; };
65
- aiEnabled?: boolean;
66
- chat_experience?: boolean;
67
- } | null>;
68
- attachScoresAssignment: (args_0: {
69
- assignments: AssignmentWithId[];
70
- analyticType: AssignmentAnalyticsType;
71
- studentId?: string;
72
- currentUserId: string;
73
- }) => Promise<{
74
- scores: any;
75
- id: string;
76
- isAvailable: boolean;
77
- name: string;
78
- description: string;
79
- scheduledTime?: string | null;
80
- dueTime?: {
81
- hours: number;
82
- minutes: number;
83
- nanos: number;
84
- };
85
- speakableio: boolean;
86
- owners: string[];
87
- image: {
88
- path: string | null;
89
- url: string;
90
- };
91
- dueDate: {
92
- day: number;
93
- month: number;
94
- year: number;
95
- };
96
- teacherName: string;
97
- courseWorkId: string | null;
98
- dueDateTimestamp: CustomTimestamp;
99
- scheduledTimeTimestamp: number;
100
- active: boolean;
101
- voice: string | null;
102
- setId: string;
103
- dateMade: {
104
- seconds: number;
105
- nanoseconds: number;
106
- };
107
- maxPoints: number;
108
- courseId: string;
109
- isAssessment: boolean;
110
- ltiDeeplink?: string;
111
- content?: string[];
112
- weights?: Record<string, number>;
113
- language?: string;
114
- types?: { [key in ActivityPageType]?: number; };
115
- aiEnabled?: boolean;
116
- chat_experience?: boolean;
117
- }[]>;
118
- getAssignmentScores: (args_0: {
119
- assignmentId: string;
120
- currentUserId: string;
121
- analyticType?: AssignmentAnalyticsType;
122
- studentId?: string;
123
- }) => Promise<{
124
- scores: unknown;
125
- id: string;
126
- } | undefined>;
127
- getAllAssignments: () => Promise<(AssignmentWithId & {
128
- id: string;
129
- })[]>;
130
- };
131
- cardRepo: {
132
- createCard: (args_0: {
133
- data: Partial<PageActivity>;
134
- }) => Promise<{
135
- id: string;
136
- } & Partial<PageActivity>>;
137
- createCards: (args_0: {
138
- cards: PageActivity[];
139
- }) => Promise<{
140
- id: string;
141
- owners: string[];
142
- checked?: boolean;
143
- completed?: boolean;
144
- media_area_id?: string | null;
145
- media_area_layout?: "left" | "right" | null;
146
- score?: number;
147
- verificationStatus?: VerificationCardStatus;
148
- native_text?: string;
149
- repeat?: number;
150
- language?: string | null;
151
- image?: {
152
- path?: string | null;
153
- url?: string;
154
- };
155
- audio?: {
156
- path?: string | null;
157
- url?: string;
158
- } | null;
159
- notes?: string;
160
- difficulty?: string;
161
- default_language?: string;
162
- target_text?: string;
163
- type: ActivityPageType;
164
- grading_criteria?: string;
165
- scoring_type?: string;
166
- grading_method?: "simple" | "rubric" | "manual" | "standards_based";
167
- feedback_types?: string[];
168
- rubricId?: string;
169
- prompt?: string;
170
- title?: string;
171
- passing_score?: number;
172
- maxCharacters?: number;
173
- answer?: string[];
174
- choices?: {
175
- value: string;
176
- option: string;
177
- }[];
178
- MCQType?: string;
179
- multipleAttemptsAllowed?: boolean;
180
- allowRetries?: boolean;
181
- question?: string;
182
- respondTime?: number;
183
- hidePrompt?: boolean;
184
- videoUrl?: string;
185
- link?: string;
186
- text?: string;
187
- isListenAloud?: boolean;
188
- embedCode?: string;
189
- attempt?: number;
190
- correct?: number;
191
- autoGrade?: boolean;
192
- points?: number;
193
- shuffle?: boolean;
194
- translation?: string;
195
- includeAIContext?: boolean;
196
- media_area_context_ref?: string | null;
197
- standardId?: string;
198
- target_proficiency_level?: string;
199
- allowTTS?: boolean;
200
- feedback_language?: string | null;
201
- correct_answer?: string | null;
202
- limit_attempts?: boolean;
203
- max_attempts?: number;
204
- rich_text?: string;
205
- }[]>;
206
- getCard: (params: {
207
- cardId: string;
208
- }) => Promise<PageActivityWithId | null>;
209
- };
210
- };
211
-
212
- declare const createFsClientWeb: ({ db, httpsCallable, logEvent }: FsClientParams) => {
213
- assignmentRepo: {
214
- getAssignment: (params: {
215
- assignmentId: string;
216
- currentUserId: string;
217
- analyticType?: AssignmentAnalyticsType;
218
- studentId?: string;
219
- }) => Promise<AssignmentWithId | {
220
- scores: any;
221
- id: string;
222
- isAvailable: boolean;
223
- name: string;
224
- description: string;
225
- scheduledTime?: string | null;
226
- dueTime?: {
227
- hours: number;
228
- minutes: number;
229
- nanos: number;
230
- };
231
- speakableio: boolean;
232
- owners: string[];
233
- image: {
234
- path: string | null;
235
- url: string;
236
- };
237
- dueDate: {
238
- day: number;
239
- month: number;
240
- year: number;
241
- };
242
- teacherName: string;
243
- courseWorkId: string | null;
244
- dueDateTimestamp: CustomTimestamp;
245
- scheduledTimeTimestamp: number;
246
- active: boolean;
247
- voice: string | null;
248
- setId: string;
249
- dateMade: {
250
- seconds: number;
251
- nanoseconds: number;
252
- };
253
- maxPoints: number;
254
- courseId: string;
255
- isAssessment: boolean;
256
- ltiDeeplink?: string;
257
- content?: string[];
258
- weights?: Record<string, number>;
259
- language?: string;
260
- types?: { [key in ActivityPageType]?: number; };
261
- aiEnabled?: boolean;
262
- chat_experience?: boolean;
263
- } | null>;
264
- attachScoresAssignment: (args_0: {
265
- assignments: AssignmentWithId[];
266
- analyticType: AssignmentAnalyticsType;
267
- studentId?: string;
268
- currentUserId: string;
269
- }) => Promise<{
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
- content?: string[];
308
- weights?: Record<string, number>;
309
- language?: string;
310
- types?: { [key in ActivityPageType]?: number; };
311
- aiEnabled?: boolean;
312
- chat_experience?: boolean;
313
- }[]>;
314
- getAssignmentScores: (args_0: {
315
- assignmentId: string;
316
- currentUserId: string;
317
- analyticType?: AssignmentAnalyticsType;
318
- studentId?: string;
319
- }) => Promise<{
320
- scores: unknown;
321
- id: string;
322
- } | undefined>;
323
- getAllAssignments: () => Promise<(AssignmentWithId & {
324
- id: string;
325
- })[]>;
326
- };
327
- cardRepo: {
328
- createCard: (args_0: {
329
- data: Partial<PageActivity>;
330
- }) => Promise<{
331
- id: string;
332
- } & Partial<PageActivity>>;
333
- createCards: (args_0: {
334
- cards: PageActivity[];
335
- }) => Promise<{
336
- id: string;
337
- owners: string[];
338
- checked?: boolean;
339
- completed?: boolean;
340
- media_area_id?: string | null;
341
- media_area_layout?: "left" | "right" | null;
342
- score?: number;
343
- verificationStatus?: VerificationCardStatus;
344
- native_text?: string;
345
- repeat?: number;
346
- language?: string | null;
347
- image?: {
348
- path?: string | null;
349
- url?: string;
350
- };
351
- audio?: {
352
- path?: string | null;
353
- url?: string;
354
- } | null;
355
- notes?: string;
356
- difficulty?: string;
357
- default_language?: string;
358
- target_text?: string;
359
- type: ActivityPageType;
360
- grading_criteria?: string;
361
- scoring_type?: string;
362
- grading_method?: "simple" | "rubric" | "manual" | "standards_based";
363
- feedback_types?: string[];
364
- rubricId?: string;
365
- prompt?: string;
366
- title?: string;
367
- passing_score?: number;
368
- maxCharacters?: number;
369
- answer?: string[];
370
- choices?: {
371
- value: string;
372
- option: string;
373
- }[];
374
- MCQType?: string;
375
- multipleAttemptsAllowed?: boolean;
376
- allowRetries?: boolean;
377
- question?: string;
378
- respondTime?: number;
379
- hidePrompt?: boolean;
380
- videoUrl?: string;
381
- link?: string;
382
- text?: string;
383
- isListenAloud?: boolean;
384
- embedCode?: string;
385
- attempt?: number;
386
- correct?: number;
387
- autoGrade?: boolean;
388
- points?: number;
389
- shuffle?: boolean;
390
- translation?: string;
391
- includeAIContext?: boolean;
392
- media_area_context_ref?: string | null;
393
- standardId?: string;
394
- target_proficiency_level?: string;
395
- allowTTS?: boolean;
396
- feedback_language?: string | null;
397
- correct_answer?: string | null;
398
- limit_attempts?: boolean;
399
- max_attempts?: number;
400
- rich_text?: string;
401
- }[]>;
402
- getCard: (params: {
403
- cardId: string;
404
- }) => Promise<PageActivityWithId | null>;
405
- };
406
- };
407
-
408
- interface UserProfile {
409
- googleClassroomUserId: string;
410
- image: {
411
- url: string;
412
- path: string;
413
- };
414
- displayName: string;
415
- isTeacher?: boolean;
416
- isStudent?: boolean;
417
- roles?: string[];
418
- }
419
- interface UserAuth {
420
- uid: string;
421
- email: string;
422
- displayName: string | null;
423
- }
424
- interface Lti {
425
- data: {
426
- services: {
427
- serviceKey: string;
428
- };
429
- };
430
- }
431
- interface User {
432
- profile: UserProfile;
433
- auth: UserAuth;
434
- lti: Lti;
435
- roles: string[];
436
- }
437
-
438
- interface Permissions {
439
- loaded: boolean;
440
- loading: boolean;
441
- permissions: string[];
442
- plan: keyof typeof SpeakablePlanTypes;
443
- subscriptionId: string;
444
- isInstitutionPlan: boolean;
445
- type: string;
446
- contact: string;
447
- hasStudentPortfolios?: boolean;
448
- refreshDate: string;
449
- isStripePlan: boolean;
450
- freeOrgTrialExpired?: boolean;
451
- }
452
-
453
- interface FsContext {
454
- speakableApi: Awaited<FsClient>;
455
- queryClient: QueryClient;
456
- user: User;
457
- permissions: Permissions;
458
- }
459
- declare const FsCtx: React.Context<FsContext | null>;
460
- declare function SpeakableProvider({ user, children, queryClient, permissions, fsClient, }: {
461
- children: React.ReactNode;
462
- fsClient: FsClient;
463
- permissions: Permissions;
464
- queryClient: QueryClient;
465
- user: User;
466
- }): react_jsx_runtime.JSX.Element | null;
467
- declare function useSpeakableApi(): FsContext;
468
-
469
- export { type FsClientParams as F, type Permissions as P, SpeakableProvider as S, type User as U, FsCtx as a, createFsClientWeb as c, useSpeakableApi as u };