@speakableio/core 0.1.105 → 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 (55) hide show
  1. package/dist/analytics-Bj2i88Zk.d.ts +89 -0
  2. package/dist/{assignment.model-DLMWAp0Y.d.ts → assignment.model-BRS4h8gX.d.ts} +1 -1
  3. package/dist/{assignment.model-Bcbxx8oI.d.mts → assignment.model-Bc61gBHl.d.ts} +5 -2
  4. package/dist/{assignment.model-Lu21tZCh.d.mts → assignment.model-Bm9gE2YK.d.ts} +2 -2
  5. package/dist/const.d.ts +3 -73
  6. package/dist/everything.d.ts +1348 -0
  7. package/dist/everything.js +3509 -0
  8. package/dist/everything.js.map +1 -0
  9. package/dist/hooks.d.ts +621 -4
  10. package/dist/hooks.js +1167 -39
  11. package/dist/hooks.js.map +1 -1
  12. package/dist/index.native.d.mts +2272 -27
  13. package/dist/index.native.d.ts +2272 -27
  14. package/dist/index.native.js +2915 -98
  15. package/dist/index.native.js.map +1 -1
  16. package/dist/index.native.mjs +2937 -120
  17. package/dist/index.native.mjs.map +1 -1
  18. package/dist/index.web-DNYJV_41.d.ts +469 -0
  19. package/dist/index.web.d.mts +2437 -6
  20. package/dist/index.web.d.ts +68 -2
  21. package/dist/index.web.js +2937 -120
  22. package/dist/index.web.js.map +1 -1
  23. package/dist/models.d.ts +2 -2
  24. package/dist/repos.d.ts +1 -1
  25. package/dist/speakable-plans-BjWWEWrQ.d.ts +72 -0
  26. package/dist/{const.d.mts → speakable-plans-DR1cQ6IK.d.ts} +19 -258
  27. package/dist/speakable-plans-Dq9nRefI.d.ts +72 -0
  28. package/dist/utils.d.ts +84 -2
  29. package/dist/utils.js +307 -1
  30. package/dist/utils.js.map +1 -1
  31. package/dist/web.constants-qmx4rGyO.d.ts +26 -0
  32. package/package.json +6 -62
  33. package/dist/analytics.cjs +0 -376
  34. package/dist/analytics.cjs.map +0 -1
  35. package/dist/assignment.constants-BIKM6fYi.d.mts +0 -32
  36. package/dist/card.constants-DhKFipX3.d.mts +0 -54
  37. package/dist/const.cjs +0 -526
  38. package/dist/const.cjs.map +0 -1
  39. package/dist/hooks.cjs +0 -1604
  40. package/dist/hooks.cjs.map +0 -1
  41. package/dist/hooks.d.mts +0 -294
  42. package/dist/index.web.cjs +0 -517
  43. package/dist/index.web.cjs.map +0 -1
  44. package/dist/models.cjs +0 -75
  45. package/dist/models.cjs.map +0 -1
  46. package/dist/models.d.mts +0 -56
  47. package/dist/notification.constants-Da4-_0kX.d.mts +0 -21
  48. package/dist/notification.constants-Da4-_0kX.d.ts +0 -21
  49. package/dist/repos.cjs +0 -486
  50. package/dist/repos.cjs.map +0 -1
  51. package/dist/repos.d.mts +0 -209
  52. package/dist/utils.cjs +0 -373
  53. package/dist/utils.cjs.map +0 -1
  54. package/dist/utils.d.mts +0 -39
  55. /package/dist/{notification.constants-B72fb734.d.mts → notification.constants-B72fb734.d.ts} +0 -0
@@ -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 };