@speakableio/core 1.0.7 → 1.0.8

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.
@@ -153,30 +153,16 @@ interface PageActivity {
153
153
  max_attempts?: number;
154
154
  rich_text?: string;
155
155
  }
156
- declare enum ActivityPageType {
156
+ declare const enum ActivityPageType {
157
157
  READ_REPEAT = "READ_REPEAT",
158
- VIDEO = "VIDEO",
159
- TEXT = "TEXT",
160
158
  READ_RESPOND = "READ_RESPOND",
161
159
  FREE_RESPONSE = "FREE_RESPONSE",
162
160
  REPEAT = "REPEAT",
163
161
  RESPOND = "RESPOND",
164
162
  RESPOND_WRITE = "RESPOND_WRITE",
165
- TEXT_TO_SPEECH = "TEXT_TO_SPEECH",
166
163
  MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
167
- PODCAST = "PODCAST",
168
164
  MEDIA_PAGE = "MEDIA_PAGE",
169
- WRITE = "WRITE",
170
- SHORT_ANSWER = "SHORT_ANSWER",
171
- SHORT_STORY = "SHORT_STORY",
172
- SPEAK = "SPEAK",
173
- CONVERSATION = "CONVERSATION",
174
- CONVERSATION_WRITE = "CONVERSATION_WRITE",
175
- DIALOGUE = "DIALOGUE",
176
- INSTRUCTION = "INSTRUCTION",
177
- LISTEN = "LISTEN",
178
- READ = "READ",
179
- ANSWER = "ANSWER"
165
+ SHORT_ANSWER = "SHORT_ANSWER"
180
166
  }
181
167
  declare const RESPOND_PAGE_ACTIVITY_TYPES: ActivityPageType[];
182
168
  declare const MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES: ActivityPageType[];
@@ -386,6 +372,7 @@ declare const checkTypePageActivity: (cardType: ActivityPageType | undefined) =>
386
372
  isRepeat: boolean;
387
373
  isMediaPage: boolean;
388
374
  isShortAnswer: boolean;
375
+ hasSomeType: boolean;
389
376
  };
390
377
 
391
378
  declare function getPagePrompt(card: PageActivityWithId | undefined): {
@@ -585,6 +572,7 @@ interface PageScore {
585
572
  }[];
586
573
  target_proficiency_level?: string;
587
574
  hint?: string[];
575
+ reviewed?: boolean;
588
576
  }
589
577
 
590
578
  declare enum AssignmentAnalyticsType {
@@ -153,30 +153,16 @@ interface PageActivity {
153
153
  max_attempts?: number;
154
154
  rich_text?: string;
155
155
  }
156
- declare enum ActivityPageType {
156
+ declare const enum ActivityPageType {
157
157
  READ_REPEAT = "READ_REPEAT",
158
- VIDEO = "VIDEO",
159
- TEXT = "TEXT",
160
158
  READ_RESPOND = "READ_RESPOND",
161
159
  FREE_RESPONSE = "FREE_RESPONSE",
162
160
  REPEAT = "REPEAT",
163
161
  RESPOND = "RESPOND",
164
162
  RESPOND_WRITE = "RESPOND_WRITE",
165
- TEXT_TO_SPEECH = "TEXT_TO_SPEECH",
166
163
  MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
167
- PODCAST = "PODCAST",
168
164
  MEDIA_PAGE = "MEDIA_PAGE",
169
- WRITE = "WRITE",
170
- SHORT_ANSWER = "SHORT_ANSWER",
171
- SHORT_STORY = "SHORT_STORY",
172
- SPEAK = "SPEAK",
173
- CONVERSATION = "CONVERSATION",
174
- CONVERSATION_WRITE = "CONVERSATION_WRITE",
175
- DIALOGUE = "DIALOGUE",
176
- INSTRUCTION = "INSTRUCTION",
177
- LISTEN = "LISTEN",
178
- READ = "READ",
179
- ANSWER = "ANSWER"
165
+ SHORT_ANSWER = "SHORT_ANSWER"
180
166
  }
181
167
  declare const RESPOND_PAGE_ACTIVITY_TYPES: ActivityPageType[];
182
168
  declare const MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES: ActivityPageType[];
@@ -386,6 +372,7 @@ declare const checkTypePageActivity: (cardType: ActivityPageType | undefined) =>
386
372
  isRepeat: boolean;
387
373
  isMediaPage: boolean;
388
374
  isShortAnswer: boolean;
375
+ hasSomeType: boolean;
389
376
  };
390
377
 
391
378
  declare function getPagePrompt(card: PageActivityWithId | undefined): {
@@ -585,6 +572,7 @@ interface PageScore {
585
572
  }[];
586
573
  target_proficiency_level?: string;
587
574
  hint?: string[];
575
+ reviewed?: boolean;
588
576
  }
589
577
 
590
578
  declare enum AssignmentAnalyticsType {
@@ -1730,28 +1730,14 @@ var import_uuid = require("uuid");
1730
1730
  // src/domains/cards/card.model.ts
1731
1731
  var ActivityPageType = /* @__PURE__ */ ((ActivityPageType2) => {
1732
1732
  ActivityPageType2["READ_REPEAT"] = "READ_REPEAT";
1733
- ActivityPageType2["VIDEO"] = "VIDEO";
1734
- ActivityPageType2["TEXT"] = "TEXT";
1735
1733
  ActivityPageType2["READ_RESPOND"] = "READ_RESPOND";
1736
1734
  ActivityPageType2["FREE_RESPONSE"] = "FREE_RESPONSE";
1737
1735
  ActivityPageType2["REPEAT"] = "REPEAT";
1738
1736
  ActivityPageType2["RESPOND"] = "RESPOND";
1739
1737
  ActivityPageType2["RESPOND_WRITE"] = "RESPOND_WRITE";
1740
- ActivityPageType2["TEXT_TO_SPEECH"] = "TEXT_TO_SPEECH";
1741
1738
  ActivityPageType2["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
1742
- ActivityPageType2["PODCAST"] = "PODCAST";
1743
1739
  ActivityPageType2["MEDIA_PAGE"] = "MEDIA_PAGE";
1744
- ActivityPageType2["WRITE"] = "WRITE";
1745
1740
  ActivityPageType2["SHORT_ANSWER"] = "SHORT_ANSWER";
1746
- ActivityPageType2["SHORT_STORY"] = "SHORT_STORY";
1747
- ActivityPageType2["SPEAK"] = "SPEAK";
1748
- ActivityPageType2["CONVERSATION"] = "CONVERSATION";
1749
- ActivityPageType2["CONVERSATION_WRITE"] = "CONVERSATION_WRITE";
1750
- ActivityPageType2["DIALOGUE"] = "DIALOGUE";
1751
- ActivityPageType2["INSTRUCTION"] = "INSTRUCTION";
1752
- ActivityPageType2["LISTEN"] = "LISTEN";
1753
- ActivityPageType2["READ"] = "READ";
1754
- ActivityPageType2["ANSWER"] = "ANSWER";
1755
1741
  return ActivityPageType2;
1756
1742
  })(ActivityPageType || {});
1757
1743
  var RESPOND_PAGE_ACTIVITY_TYPES = [
@@ -1992,6 +1978,19 @@ var checkTypePageActivity = (cardType) => {
1992
1978
  const isRepeat = checkIsRepeatPage(cardType);
1993
1979
  const isMediaPage = checkIsMediaPage(cardType);
1994
1980
  const isShortAnswer = checkIsShortAnswerPage(cardType);
1981
+ const isNoOneOfThem = !isRespond && !isMC && !isRepeat && !isMediaPage && !isShortAnswer;
1982
+ if (isNoOneOfThem) {
1983
+ return {
1984
+ isRespondAudio: false,
1985
+ isRespondWritten: false,
1986
+ isRespond: false,
1987
+ isMC: false,
1988
+ isRepeat: true,
1989
+ isMediaPage: false,
1990
+ isShortAnswer: false,
1991
+ hasSomeType: false
1992
+ };
1993
+ }
1995
1994
  return {
1996
1995
  isRespondAudio,
1997
1996
  isRespondWritten,
@@ -1999,7 +1998,8 @@ var checkTypePageActivity = (cardType) => {
1999
1998
  isMC,
2000
1999
  isRepeat,
2001
2000
  isMediaPage,
2002
- isShortAnswer
2001
+ isShortAnswer,
2002
+ hasSomeType: true
2003
2003
  };
2004
2004
  };
2005
2005