@speakableio/core 1.0.54 → 1.0.55

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.
@@ -2992,6 +2992,44 @@ declare const useUpdateStudentVocab: (page: PageActivityWithId | null) => {
2992
2992
  studentVocabMarkVoiceFail: () => Promise<void>;
2993
2993
  };
2994
2994
 
2995
+ declare const SPEAKABLE_ANALYTICS: {
2996
+ readonly VOICE_SUCCESS: "voice_success";
2997
+ readonly VOICE_FALLBACK_SUCCESS: "voice_fallback_success";
2998
+ readonly VOICE_FALLBACK_FAIL: "voice_fallback_fail";
2999
+ readonly VOICE_FAIL: "voice_fail";
3000
+ readonly RESPOND_CARD_SUCCESS: "respond_card_success";
3001
+ readonly RESPOND_CARD_FAIL: "respond_card_fail";
3002
+ readonly RESPOND_WRITE_CARD_SUCCESS: "respond_write_card_success";
3003
+ readonly RESPOND_WRITE_CARD_FAIL: "respond_write_card_fail";
3004
+ readonly RESPOND_WRITE_CARD_SUBMITTED: "respond_write_card_submitted";
3005
+ readonly RESPOND_WRITE_CARD_ERROR: "respond_write_card_error";
3006
+ readonly RESPOND_CARD_ERROR: "respond_card_error";
3007
+ readonly RESPOND_CARD_SUBMITTED: "respond_card_submitted";
3008
+ readonly RESPOND_FREE_PLAN: "respond_free_plan";
3009
+ readonly RESPOND_WRITE_FREE_PLAN: "respond_write_free_plan";
3010
+ readonly SUBMISSION: "assignment_submitted";
3011
+ readonly ASSIGNMENT_STARTED: "assignment_started";
3012
+ readonly CREATE_ASSIGNMENT: "create_assignment";
3013
+ readonly MC_SUCCESS: "multiple_choice_success";
3014
+ readonly MC_FAIL: "multiple_choice_fail";
3015
+ readonly MC_ERROR: "multiple_choice_error";
3016
+ readonly ACTFL_LEVEL: "actfl_level";
3017
+ readonly WIDA_LEVEL: "wida_level";
3018
+ readonly VIEW_SCORES_MODAL: "view_scores_modal";
3019
+ readonly SHORT_ANSWER_SUCCESS: "short_answer_success";
3020
+ readonly SHORT_ANSWER_FAIL: "short_answer_fail";
3021
+ readonly SHORT_ANSWER_ERROR: "short_answer_error";
3022
+ readonly RETRY: "retry";
3023
+ readonly MESSAGE_SENT: "message_sent";
3024
+ readonly MESSAGE_ERROR: "message_error";
3025
+ readonly VIEW_DETAILS_CLICK: "view_details_click";
3026
+ readonly TABS_CLICK: "tabs_click";
3027
+ readonly VIEW_MEDIA: "view_media";
3028
+ readonly VIEW_SCORES: "view_scores";
3029
+ readonly VIEW_GRADING_METHOD: "view_grading_method";
3030
+ readonly VIEW_FEEDBACK: "view_feedback";
3031
+ };
3032
+
2995
3033
  declare const useBaseOpenAI: ({ onTranscriptSuccess, onTranscriptError, onCompletionSuccess, onCompletionError, aiEnabled, submitAudioResponse, uploadAudioAndGetTranscript, onGetAudioUrlAndTranscript, }: {
2996
3034
  onTranscriptSuccess: (transcript: string) => void;
2997
3035
  onTranscriptError: ({ type, message }: {
@@ -3525,4 +3563,4 @@ declare const createFsClientWeb: ({ db, httpsCallable, logEvent }: FsClientParam
3525
3563
  };
3526
3564
  };
3527
3565
 
3528
- export { ActivityPageType, type Assignment, type AssignmentAnalyticsType$1 as AssignmentAnalyticsType, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, CONVERSATION_PAGE_ACTIVITY_TYPES, ConversationPageMode, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type MediaPageActivity, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_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, checkIsConversationPage, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientWeb as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getLabelPage, getPageMediaData, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getSingleMediaPageData, getTotalCompletedCards, getTranscript, getTranscriptCycle, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useClearScoreV2, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSpeakableTranscript, useSpeakableTranscriptCycle, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
3566
+ export { ActivityPageType, type Assignment, type AssignmentAnalyticsType$1 as AssignmentAnalyticsType, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, CONVERSATION_PAGE_ACTIVITY_TYPES, ConversationPageMode, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type MediaPageActivity, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_ANALYTICS, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, checkIsConversationPage, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientWeb as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getLabelPage, getPageMediaData, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getSingleMediaPageData, getTotalCompletedCards, getTranscript, getTranscriptCycle, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useClearScoreV2, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSpeakableTranscript, useSpeakableTranscriptCycle, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
package/dist/index.web.js CHANGED
@@ -828,8 +828,10 @@ var logGradingStandardLog = (data) => {
828
828
  };
829
829
 
830
830
  // src/constants/analytics.constants.ts
831
- var ANALYTICS_EVENT_TYPES = {
831
+ var SPEAKABLE_ANALYTICS = {
832
832
  VOICE_SUCCESS: "voice_success",
833
+ VOICE_FALLBACK_SUCCESS: "voice_fallback_success",
834
+ VOICE_FALLBACK_FAIL: "voice_fallback_fail",
833
835
  VOICE_FAIL: "voice_fail",
834
836
  RESPOND_CARD_SUCCESS: "respond_card_success",
835
837
  RESPOND_CARD_FAIL: "respond_card_fail",
@@ -875,20 +877,20 @@ var logOpenActivityPreview = (data = {}) => {
875
877
  var logSubmitAssignment = (data = {}) => {
876
878
  var _a, _b, _c;
877
879
  (_c = (_b = (_a = api).httpsCallable) == null ? void 0 : _b.call(_a, "handleCouresAnalyticsEvent")) == null ? void 0 : _c({
878
- eventType: ANALYTICS_EVENT_TYPES.SUBMISSION,
880
+ eventType: SPEAKABLE_ANALYTICS.SUBMISSION,
879
881
  ...data
880
882
  });
881
- api.logEvent(ANALYTICS_EVENT_TYPES.SUBMISSION, data);
883
+ api.logEvent(SPEAKABLE_ANALYTICS.SUBMISSION, data);
882
884
  };
883
885
  var logStartAssignment = (data = {}) => {
884
886
  var _a, _b, _c;
885
887
  if (data.courseId) {
886
888
  (_c = (_b = (_a = api).httpsCallable) == null ? void 0 : _b.call(_a, "handleCouresAnalyticsEvent")) == null ? void 0 : _c({
887
- eventType: ANALYTICS_EVENT_TYPES.ASSIGNMENT_STARTED,
889
+ eventType: SPEAKABLE_ANALYTICS.ASSIGNMENT_STARTED,
888
890
  ...data
889
891
  });
890
892
  }
891
- api.logEvent(ANALYTICS_EVENT_TYPES.ASSIGNMENT_STARTED, data);
893
+ api.logEvent(SPEAKABLE_ANALYTICS.ASSIGNMENT_STARTED, data);
892
894
  };
893
895
 
894
896
  // src/domains/assignment/utils/create-default-score.ts
@@ -3799,6 +3801,7 @@ export {
3799
3801
  RESPOND_AUDIO_PAGE_ACTIVITY_TYPES,
3800
3802
  RESPOND_PAGE_ACTIVITY_TYPES,
3801
3803
  RESPOND_WRITE_PAGE_ACTIVITY_TYPES,
3804
+ SPEAKABLE_ANALYTICS,
3802
3805
  SPEAKABLE_NOTIFICATIONS,
3803
3806
  STUDENT_LEVELS_OPTIONS,
3804
3807
  SpeakableNotificationTypes,