@speakableio/core 0.1.60 → 0.1.61

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.
@@ -751,6 +751,23 @@ declare const createCardRepo: () => {
751
751
  }) => Promise<CardActivityWithId | null>;
752
752
  };
753
753
 
754
+ declare function checkIsRepeatCard(cardType: CardActivityType | undefined): boolean;
755
+ declare function checkIsMCCard(cardType: CardActivityType | undefined): boolean;
756
+ declare function checkIsRespondCard(cardType: CardActivityType | undefined): boolean;
757
+ declare function checkIsRespondWrittenCard(cardType: CardActivityType | undefined): boolean;
758
+ declare function checkIsRespondAudioCard(cardType: CardActivityType | undefined): boolean;
759
+ declare const checkIsMediaPageCard: (cardType: CardActivityType | undefined) => boolean;
760
+ declare const checkIsShortAnswerCard: (cardType: CardActivityType | undefined) => boolean;
761
+ declare const checkTypeCardActivity: (cardType: CardActivityType | undefined) => {
762
+ isRespondAudio: boolean;
763
+ isRespondWritten: boolean;
764
+ isRespond: boolean;
765
+ isMC: boolean;
766
+ isRepeat: boolean;
767
+ isMediaPage: boolean;
768
+ isShortAnswer: boolean;
769
+ };
770
+
754
771
  interface SetWithId extends Set {
755
772
  id: string;
756
773
  }
@@ -2688,4 +2705,4 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
2688
2705
  };
2689
2706
  };
2690
2707
 
2691
- 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, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_CARD_ACTIVITY_TYPES, type Organization, type OrganizationAccess, 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, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getRespondCardTool, getSetFromCache, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUserCredits };
2708
+ 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, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_CARD_ACTIVITY_TYPES, type Organization, type OrganizationAccess, 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, checkIsMCCard, checkIsMediaPageCard, checkIsRepeatCard, checkIsRespondAudioCard, checkIsRespondCard, checkIsRespondWrittenCard, checkIsShortAnswerCard, checkTypeCardActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getRespondCardTool, getSetFromCache, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUserCredits };
@@ -1832,6 +1832,54 @@ var createCardRepo = () => {
1832
1832
  };
1833
1833
  };
1834
1834
 
1835
+ // src/domains/cards/utils/check-page-type.ts
1836
+ function checkIsRepeatCard(cardType) {
1837
+ if (cardType === void 0) return false;
1838
+ return REPEAT_CARD_ACTIVITY_TYPES.includes(cardType);
1839
+ }
1840
+ function checkIsMCCard(cardType) {
1841
+ if (cardType === void 0) return false;
1842
+ return MULTIPLE_CHOICE_CARD_ACTIVITY_TYPES.includes(cardType);
1843
+ }
1844
+ function checkIsRespondCard(cardType) {
1845
+ if (cardType === void 0) return false;
1846
+ return RESPOND_CARD_ACTIVITY_TYPES.includes(cardType);
1847
+ }
1848
+ function checkIsRespondWrittenCard(cardType) {
1849
+ if (cardType === void 0) return false;
1850
+ return RESPOND_WRITE_CARD_ACTIVITY_TYPES.includes(cardType);
1851
+ }
1852
+ function checkIsRespondAudioCard(cardType) {
1853
+ if (cardType === void 0) return false;
1854
+ return RESPOND_AUDIO_CARD_ACTIVITY_TYPES.includes(cardType);
1855
+ }
1856
+ var checkIsMediaPageCard = (cardType) => {
1857
+ if (cardType === void 0) return false;
1858
+ return cardType === "MEDIA_PAGE" /* MEDIA_PAGE */;
1859
+ };
1860
+ var checkIsShortAnswerCard = (cardType) => {
1861
+ if (cardType === void 0) return false;
1862
+ return cardType === "SHORT_ANSWER" /* SHORT_ANSWER */;
1863
+ };
1864
+ var checkTypeCardActivity = (cardType) => {
1865
+ const isRespondAudio = checkIsRespondAudioCard(cardType);
1866
+ const isRespondWritten = checkIsRespondWrittenCard(cardType);
1867
+ const isRespond = checkIsRespondCard(cardType);
1868
+ const isMC = checkIsMCCard(cardType);
1869
+ const isRepeat = checkIsRepeatCard(cardType);
1870
+ const isMediaPage = checkIsMediaPageCard(cardType);
1871
+ const isShortAnswer = checkIsShortAnswerCard(cardType);
1872
+ return {
1873
+ isRespondAudio,
1874
+ isRespondWritten,
1875
+ isRespond,
1876
+ isMC,
1877
+ isRepeat,
1878
+ isMediaPage,
1879
+ isShortAnswer
1880
+ };
1881
+ };
1882
+
1835
1883
  // src/domains/sets/set.hooks.ts
1836
1884
  import { useQuery as useQuery4 } from "@tanstack/react-query";
1837
1885
 
@@ -3014,6 +3062,14 @@ export {
3014
3062
  VerificationCardStatus,
3015
3063
  assignmentQueryKeys,
3016
3064
  cardsQueryKeys,
3065
+ checkIsMCCard,
3066
+ checkIsMediaPageCard,
3067
+ checkIsRepeatCard,
3068
+ checkIsRespondAudioCard,
3069
+ checkIsRespondCard,
3070
+ checkIsRespondWrittenCard,
3071
+ checkIsShortAnswerCard,
3072
+ checkTypeCardActivity,
3017
3073
  cleanString,
3018
3074
  createAssignmentRepo,
3019
3075
  createCardRepo,