@speakableio/core 0.1.106 → 1.0.0

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 (66) hide show
  1. package/dist/analytics-Bj2i88Zk.d.ts +89 -0
  2. package/dist/analytics.d.mts +88 -0
  3. package/dist/analytics.js +329 -25
  4. package/dist/analytics.js.map +1 -1
  5. package/dist/{assignment.model-DLMWAp0Y.d.ts → assignment.model-BRS4h8gX.d.ts} +1 -1
  6. package/dist/assignment.model-Bc61gBHl.d.ts +302 -0
  7. package/dist/assignment.model-Bm9gE2YK.d.ts +301 -0
  8. package/dist/const.d.ts +3 -73
  9. package/dist/const.js +355 -45
  10. package/dist/const.js.map +1 -1
  11. package/dist/everything.d.ts +1348 -0
  12. package/dist/everything.js +3509 -0
  13. package/dist/everything.js.map +1 -0
  14. package/dist/hooks.d.ts +621 -4
  15. package/dist/hooks.js +1745 -61
  16. package/dist/hooks.js.map +1 -1
  17. package/dist/index.native.d.mts +2836 -0
  18. package/dist/index.native.d.ts +2272 -27
  19. package/dist/index.native.js +2995 -166
  20. package/dist/index.native.js.map +1 -1
  21. package/dist/index.native.mjs +3322 -0
  22. package/dist/index.native.mjs.map +1 -0
  23. package/dist/index.web-DNYJV_41.d.ts +469 -0
  24. package/dist/index.web.d.mts +2836 -0
  25. package/dist/index.web.d.ts +68 -2
  26. package/dist/index.web.js +3244 -12
  27. package/dist/index.web.js.map +1 -1
  28. package/dist/models.d.ts +2 -2
  29. package/dist/models.js +43 -8
  30. package/dist/models.js.map +1 -1
  31. package/dist/{notification.constants-Da4-_0kX.d.ts → notification.constants-B72fb734.d.ts} +1 -1
  32. package/dist/repos.d.ts +1 -1
  33. package/dist/repos.js +440 -13
  34. package/dist/repos.js.map +1 -1
  35. package/dist/speakable-plans-BjWWEWrQ.d.ts +72 -0
  36. package/dist/speakable-plans-DR1cQ6IK.d.ts +92 -0
  37. package/dist/speakable-plans-Dq9nRefI.d.ts +72 -0
  38. package/dist/utils.d.ts +84 -2
  39. package/dist/utils.js +481 -15
  40. package/dist/utils.js.map +1 -1
  41. package/dist/web.constants-qmx4rGyO.d.ts +26 -0
  42. package/package.json +11 -62
  43. package/dist/chunk-233VJDUF.js +0 -149
  44. package/dist/chunk-233VJDUF.js.map +0 -1
  45. package/dist/chunk-2CRI5MJP.js +0 -225
  46. package/dist/chunk-2CRI5MJP.js.map +0 -1
  47. package/dist/chunk-AWVUNWML.js +0 -141
  48. package/dist/chunk-AWVUNWML.js.map +0 -1
  49. package/dist/chunk-CJ5JXKII.js +0 -129
  50. package/dist/chunk-CJ5JXKII.js.map +0 -1
  51. package/dist/chunk-EEBMPASA.js +0 -21
  52. package/dist/chunk-EEBMPASA.js.map +0 -1
  53. package/dist/chunk-H5XNOXRC.js +0 -11
  54. package/dist/chunk-H5XNOXRC.js.map +0 -1
  55. package/dist/chunk-LZG3MTSH.js +0 -53
  56. package/dist/chunk-LZG3MTSH.js.map +0 -1
  57. package/dist/chunk-OLSTHM2U.js +0 -154
  58. package/dist/chunk-OLSTHM2U.js.map +0 -1
  59. package/dist/chunk-TQGDTKTE.js +0 -13
  60. package/dist/chunk-TQGDTKTE.js.map +0 -1
  61. package/dist/chunk-YKUMIPSO.js +0 -212
  62. package/dist/chunk-YKUMIPSO.js.map +0 -1
  63. package/dist/chunk-YMJRCINF.js +0 -68
  64. package/dist/chunk-YMJRCINF.js.map +0 -1
  65. package/dist/chunk-YO34TZYN.js +0 -28
  66. package/dist/chunk-YO34TZYN.js.map +0 -1
@@ -1,9 +1,14 @@
1
1
  import { V as VerificationCardStatus } from './card.constants-DhKFipX3.js';
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-DLMWAp0Y.js';
2
+ import { F as FirebaseInstance, c as FirestoreHelpers, d as CallableFunction, A as AssignmentWithId, C as CustomTimestamp, a as ActivityPageType, P as PageActivity, b as PageActivityWithId } from './assignment.model-Bm9gE2YK.js';
3
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 { S as SpeakablePlanTypes } from './speakable-plans-BjWWEWrQ.js';
4
8
  import '@react-native-firebase/firestore';
5
9
  import 'firebase/firestore';
6
10
 
11
+ type FsClient = ReturnType<typeof createFsClientBase>;
7
12
  type FsClientParams = Omit<Parameters<typeof createFsClientBase>[0], 'helpers'>;
8
13
  declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
9
14
  db: FirebaseInstance;
@@ -402,4 +407,65 @@ declare const createFsClientWeb: ({ db, httpsCallable, logEvent }: FsClientParam
402
407
  };
403
408
  };
404
409
 
405
- export { createFsClientWeb as createFsClient };
410
+ interface UserProfile {
411
+ googleClassroomUserId: string;
412
+ image: {
413
+ url: string;
414
+ path: string;
415
+ };
416
+ displayName: string;
417
+ isTeacher?: boolean;
418
+ isStudent?: boolean;
419
+ roles?: string[];
420
+ }
421
+ interface UserAuth {
422
+ uid: string;
423
+ email: string;
424
+ displayName: string | null;
425
+ }
426
+ interface Lti {
427
+ data: {
428
+ services: {
429
+ serviceKey: string;
430
+ };
431
+ };
432
+ }
433
+ interface User {
434
+ profile: UserProfile;
435
+ auth: UserAuth;
436
+ lti: Lti;
437
+ roles: string[];
438
+ }
439
+
440
+ interface Permissions {
441
+ loaded: boolean;
442
+ loading: boolean;
443
+ permissions: string[];
444
+ plan: keyof typeof SpeakablePlanTypes;
445
+ subscriptionId: string;
446
+ isInstitutionPlan: boolean;
447
+ type: string;
448
+ contact: string;
449
+ hasStudentPortfolios?: boolean;
450
+ refreshDate: string;
451
+ isStripePlan: boolean;
452
+ freeOrgTrialExpired?: boolean;
453
+ }
454
+
455
+ interface FsContext {
456
+ speakableApi: Awaited<FsClient>;
457
+ queryClient: QueryClient;
458
+ user: User;
459
+ permissions: Permissions;
460
+ }
461
+ declare const FsCtx: React.Context<FsContext | null>;
462
+ declare function SpeakableProvider({ user, children, queryClient, permissions, fsClient, }: {
463
+ children: React.ReactNode;
464
+ fsClient: FsClient;
465
+ permissions: Permissions;
466
+ queryClient: QueryClient;
467
+ user: User;
468
+ }): react_jsx_runtime.JSX.Element | null;
469
+ declare function useSpeakableApi(): FsContext;
470
+
471
+ export { FsCtx, SpeakableProvider, createFsClientWeb as createFsClient, useSpeakableApi };