czapp-shared 1.0.39 → 1.1.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.
package/dist/index.d.mts CHANGED
@@ -1,3 +1,13 @@
1
+ type Hsl = {
2
+ h: number;
3
+ s: number;
4
+ l: number;
5
+ };
6
+ declare const hexToHsl: (hex: string) => Hsl;
7
+ declare const hslToHex: ({ h, s, l }: Hsl) => string;
8
+ declare const shiftHue: (hex: string, degrees: number) => string;
9
+ declare const isHexColor: (value: unknown) => value is string;
10
+
1
11
  /**
2
12
  * @name getMysqlDateIgnoreTZ
3
13
  * @description Converts a JavaScript Date object to a MySQL date string by ignoring the timezone
@@ -51,6 +61,96 @@ declare const isTheSameDay: (date1: MySQLDate, date2: MySQLDate) => boolean;
51
61
  declare const getFormattedDate: (date: Date) => DateString;
52
62
  declare const isExpired: (date: MySQLDate) => boolean;
53
63
 
64
+ /**
65
+ * Experience level definitions, as stored per level in the czapp-server xp_levels table (draft and published JSON),
66
+ * edited in the backoffice Level Designer and loaded by the apps from GET /levels. See concrete/level.ts for how a
67
+ * user's level is worked out, and concrete/levelDefaults.ts for the built-in defaults.
68
+ */
69
+ declare enum AvatarPresetId {
70
+ COOL_CATALYST = "coolCatalyst",
71
+ SWIFT_STARTER = "swiftStarter",
72
+ BOLD_BUILDER = "boldBuilder",
73
+ WORD_WRANGLER = "wordWrangler",
74
+ FLUENT_FLAME = "fluentFlame",
75
+ MIGHTY_MASTER = "mightyMaster",
76
+ RADIANT_ROCKSTAR = "radiantRockstar",
77
+ WISE_WIZARD = "wiseWizard",
78
+ LEGENDARY_LINGUIST = "legendaryLinguist",
79
+ ABSOLUTE_ALPHA = "absoluteAlpha"
80
+ }
81
+ /**
82
+ * Named colour tokens for one level's theme. Every themed colour in the apps comes from one of these, so a designer
83
+ * can coordinate foreground, background and accents freely. All are #rrggbb hex.
84
+ */
85
+ interface ILevelPalette {
86
+ background: string;
87
+ card: string;
88
+ brand: string;
89
+ brandMid: string;
90
+ brandLight: string;
91
+ brandPale: string;
92
+ points: string;
93
+ streak: string;
94
+ test: string;
95
+ testDark: string;
96
+ testText: string;
97
+ accent: string;
98
+ accentDark: string;
99
+ accentLight: string;
100
+ accentPale: string;
101
+ chartRetired: string;
102
+ chartLearning: string;
103
+ chartQueued: string;
104
+ leaderboardHighlight: string;
105
+ divider: string;
106
+ heatScale: [string, string, string, string, string, string];
107
+ celebrationGradient: [string, string, string];
108
+ iconHueShift: number;
109
+ }
110
+ interface ILevelAvatar {
111
+ alphaHueShift: number;
112
+ preset?: {
113
+ id: AvatarPresetId;
114
+ params: Record<string, number | string>;
115
+ };
116
+ lottie?: string;
117
+ images?: {
118
+ id: string;
119
+ svg: string;
120
+ }[];
121
+ }
122
+ interface ILevelDefinition {
123
+ level: number;
124
+ xpThreshold: number;
125
+ minBestStreak: number;
126
+ names: {
127
+ en: string;
128
+ cz: string;
129
+ };
130
+ palette: ILevelPalette;
131
+ avatar: ILevelAvatar;
132
+ }
133
+ interface IXpAwards {
134
+ flashcardReview: number;
135
+ test: number;
136
+ perTestKnownAnswer: number;
137
+ perWordRetired: number;
138
+ dailyStreakBonusCap: number;
139
+ }
140
+ interface ILevelsConfig {
141
+ version: number;
142
+ levels: ILevelDefinition[];
143
+ awards: IXpAwards;
144
+ }
145
+ /**
146
+ * GET /levels?version=<the app's cached version>: the published configuration, or just `unchanged` when the app
147
+ * already has the current version, so unchanged configurations aren't re-downloaded on every launch.
148
+ */
149
+ type LevelsResponseData = ILevelsConfig | {
150
+ version: number;
151
+ unchanged: true;
152
+ };
153
+
54
154
  /**
55
155
  * XP and experience levels.
56
156
  *
@@ -72,6 +172,7 @@ declare const isExpired: (date: MySQLDate) => boolean;
72
172
  * A user's level is derived from their XP and their best streak - it is never stored, so client and server can't
73
173
  * disagree, and because neither value ever decreases, a level once reached is never lost.
74
174
  */
175
+
75
176
  declare const XP_FLASHCARD_REVIEW = 10;
76
177
  declare const XP_TEST = 15;
77
178
  declare const XP_PER_TEST_KNOWN_ANSWER = 1;
@@ -88,8 +189,9 @@ declare const maxLevel: number;
88
189
  * @name getLevel
89
190
  * @description The highest level whose XP threshold and best-streak requirement are both met. Levels must be
90
191
  * reached in order, so a missing streak for level 5 holds the user at level 4 however much XP they have.
192
+ * @param levels - the level rules, e.g. the published ILevelsConfig levels; defaults to the built-in LEVELS
91
193
  */
92
- declare const getLevel: (xp: number, bestStreak: number) => number;
194
+ declare const getLevel: (xp: number, bestStreak: number, levels?: readonly ILevel[]) => number;
93
195
  interface ILevelProgress {
94
196
  level: number;
95
197
  nextLevel?: number;
@@ -97,14 +199,16 @@ interface ILevelProgress {
97
199
  xpProgress: number;
98
200
  streakDaysToNextLevel: number;
99
201
  }
100
- declare const getLevelProgress: (xp: number, bestStreak: number) => ILevelProgress;
202
+ declare const getLevelProgress: (xp: number, bestStreak: number, levels?: readonly ILevel[]) => ILevelProgress;
203
+ declare const DEFAULT_XP_AWARDS: IXpAwards;
101
204
  /**
102
205
  * @name getFlashcardReviewXp
103
206
  * @param retiredCount - words promoted to RETIRED (mastered) by this review
104
207
  * @param newStreakDayLength - the streak length if this review is the first of a new streak day, otherwise 0
208
+ * @param awards - the XP award amounts; defaults to the built-in ones
105
209
  */
106
- declare const getFlashcardReviewXp: (retiredCount: number, newStreakDayLength: number) => number;
107
- declare const getTestXp: (knownCount: number) => number;
210
+ declare const getFlashcardReviewXp: (retiredCount: number, newStreakDayLength: number, awards?: IXpAwards) => number;
211
+ declare const getTestXp: (knownCount: number, awards?: IXpAwards) => number;
108
212
  declare const getBestStreak: (user: {
109
213
  highStreakLength: number;
110
214
  currentStreakLength: number;
@@ -113,7 +217,28 @@ declare const getUserLevelProgress: (user: {
113
217
  xp: number;
114
218
  highStreakLength: number;
115
219
  currentStreakLength: number;
116
- }) => ILevelProgress;
220
+ }, levels?: readonly ILevel[]) => ILevelProgress;
221
+
222
+ /**
223
+ * A full palette generated from one hue: the original design rotated round the colour wheel by (hue - level 1's
224
+ * hue), with the level's accent shades derived from the hue itself. The Level Designer's "generate from hue" uses
225
+ * this as a starting point.
226
+ */
227
+ declare const generatePalette: (hue: number) => ILevelPalette;
228
+ declare const DEFAULT_LEVEL_DEFINITIONS: ILevelDefinition[];
229
+ declare const DEFAULT_LEVELS_CONFIG: ILevelsConfig;
230
+
231
+ declare const MAX_LOTTIE_BYTES: number;
232
+ declare const MAX_SVG_BYTES: number;
233
+ declare const MAX_LEVEL_NAME_LENGTH = 40;
234
+ /** Problems with one level definition (empty when it's valid). */
235
+ declare const validateLevelDefinition: (level: ILevelDefinition) => string[];
236
+ declare const validateXpAwards: (awards: IXpAwards) => string[];
237
+ /**
238
+ * Problems with a whole configuration (empty when it can be published): every level valid, levels numbered 1..n
239
+ * with no gaps, XP thresholds rising from 0 and streak gates never falling.
240
+ */
241
+ declare const validateLevelsConfig: (config: Pick<ILevelsConfig, 'levels' | 'awards'>) => string[];
117
242
 
118
243
  interface ISession {
119
244
  sessionToken: string | undefined;
@@ -369,6 +494,7 @@ declare enum ApiPath {
369
494
  HEALTH = "/health",
370
495
  LAST_WORDS_ADDED = "/lastWordsAdded",
371
496
  LEADERBOARD = "/leaderboard",
497
+ LEVELS = "/levels",
372
498
  LEXEMES = "/lexemes",
373
499
  LEXEMES_ALL = "/lexemes/all",
374
500
  LEXEMES_COUNT = "/lexemes/count/:language",
@@ -555,4 +681,4 @@ type DeeplTranslation = {
555
681
  }>;
556
682
  };
557
683
 
558
- export { ApiMethod, ApiPath, AppError, type AutologinRequestBody, ClientPlatform, type ControllerResponse, type DateString, type DeeplTranslation, type DeleteLexemePairRequestParams, Familiarity, type HeatMapParams, type HeatMapResponseData, HttpStatusCode, type IActivityCount, type ICount, type ILeaderboardEntry, type ILevel, type ILevelProgress, type ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ILexemePairTexts, type IProgressHistoryDay, type ISession, type ITestResult, type IUserData, type IVocabCheckActivity, type InsertOrUpdateRequestBody, type InsertOrUpdateResponseData, LEARNING_STAGES_IN_GROUP, LEVELS, Language, LearningStage, LearningStageGroup, Lexeme, LexemePair, type LexemePairRequestBody, type LexemePairWithLang, type MySQLDate, Progress, type RecycleLexemePairParams, type RegisterPushTokenRequestBody, ReminderFrequency, type ResetTestUserParams, type Result, Scenario, type SelectAllTranslationsParams, type SelectLexemeCountParams, type SelectLexemePairParams, type SelectLexemePairsByTextParams, type SelectLexemesParams, type SelectProgressHistoryParams, type SelectTestLexemesParams, type SelectVocabCheckActivityParams, type SignInRequestBody, type SignInResponseData, type Streaks, type TestCompleteRequestBody, type TestCompleteResponseData, type TestInitRequestBody, type TestInitResponseData, type TranslationRequestBody, type TranslationResponseData, type UpdateLexemePairFamiliarityParams, type UpdateOnboardingStatusRequestBody, type UpdateUserRequestBody, VocabCheckType, XP_DAILY_STREAK_BONUS_CAP, XP_FLASHCARD_REVIEW, XP_PER_TEST_KNOWN_ANSWER, XP_PER_WORD_RETIRED, XP_TEST, convertJSDateStringToMySQLDate, dateDifferenceInDays, deriveStreakFromVocabCheckActivity, getBestStreak, getFlashcardReviewXp, getFormattedDate, getLevel, getLevelProgress, getMysqlDateIgnoreTZ, getTestXp, getUserLevelProgress, isClientDateTooFarFromServerDate, isExpired, isFinalTest, isLearningStageGroup, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, maxLevel, parameterReplace };
684
+ export { ApiMethod, ApiPath, AppError, type AutologinRequestBody, AvatarPresetId, ClientPlatform, type ControllerResponse, DEFAULT_LEVELS_CONFIG, DEFAULT_LEVEL_DEFINITIONS, DEFAULT_XP_AWARDS, type DateString, type DeeplTranslation, type DeleteLexemePairRequestParams, Familiarity, type HeatMapParams, type HeatMapResponseData, type Hsl, HttpStatusCode, type IActivityCount, type ICount, type ILeaderboardEntry, type ILevel, type ILevelAvatar, type ILevelDefinition, type ILevelPalette, type ILevelProgress, type ILevelsConfig, type ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ILexemePairTexts, type IProgressHistoryDay, type ISession, type ITestResult, type IUserData, type IVocabCheckActivity, type IXpAwards, type InsertOrUpdateRequestBody, type InsertOrUpdateResponseData, LEARNING_STAGES_IN_GROUP, LEVELS, Language, LearningStage, LearningStageGroup, type LevelsResponseData, Lexeme, LexemePair, type LexemePairRequestBody, type LexemePairWithLang, MAX_LEVEL_NAME_LENGTH, MAX_LOTTIE_BYTES, MAX_SVG_BYTES, type MySQLDate, Progress, type RecycleLexemePairParams, type RegisterPushTokenRequestBody, ReminderFrequency, type ResetTestUserParams, type Result, Scenario, type SelectAllTranslationsParams, type SelectLexemeCountParams, type SelectLexemePairParams, type SelectLexemePairsByTextParams, type SelectLexemesParams, type SelectProgressHistoryParams, type SelectTestLexemesParams, type SelectVocabCheckActivityParams, type SignInRequestBody, type SignInResponseData, type Streaks, type TestCompleteRequestBody, type TestCompleteResponseData, type TestInitRequestBody, type TestInitResponseData, type TranslationRequestBody, type TranslationResponseData, type UpdateLexemePairFamiliarityParams, type UpdateOnboardingStatusRequestBody, type UpdateUserRequestBody, VocabCheckType, XP_DAILY_STREAK_BONUS_CAP, XP_FLASHCARD_REVIEW, XP_PER_TEST_KNOWN_ANSWER, XP_PER_WORD_RETIRED, XP_TEST, convertJSDateStringToMySQLDate, dateDifferenceInDays, deriveStreakFromVocabCheckActivity, generatePalette, getBestStreak, getFlashcardReviewXp, getFormattedDate, getLevel, getLevelProgress, getMysqlDateIgnoreTZ, getTestXp, getUserLevelProgress, hexToHsl, hslToHex, isClientDateTooFarFromServerDate, isExpired, isFinalTest, isHexColor, isLearningStageGroup, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, maxLevel, parameterReplace, shiftHue, validateLevelDefinition, validateLevelsConfig, validateXpAwards };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,13 @@
1
+ type Hsl = {
2
+ h: number;
3
+ s: number;
4
+ l: number;
5
+ };
6
+ declare const hexToHsl: (hex: string) => Hsl;
7
+ declare const hslToHex: ({ h, s, l }: Hsl) => string;
8
+ declare const shiftHue: (hex: string, degrees: number) => string;
9
+ declare const isHexColor: (value: unknown) => value is string;
10
+
1
11
  /**
2
12
  * @name getMysqlDateIgnoreTZ
3
13
  * @description Converts a JavaScript Date object to a MySQL date string by ignoring the timezone
@@ -51,6 +61,96 @@ declare const isTheSameDay: (date1: MySQLDate, date2: MySQLDate) => boolean;
51
61
  declare const getFormattedDate: (date: Date) => DateString;
52
62
  declare const isExpired: (date: MySQLDate) => boolean;
53
63
 
64
+ /**
65
+ * Experience level definitions, as stored per level in the czapp-server xp_levels table (draft and published JSON),
66
+ * edited in the backoffice Level Designer and loaded by the apps from GET /levels. See concrete/level.ts for how a
67
+ * user's level is worked out, and concrete/levelDefaults.ts for the built-in defaults.
68
+ */
69
+ declare enum AvatarPresetId {
70
+ COOL_CATALYST = "coolCatalyst",
71
+ SWIFT_STARTER = "swiftStarter",
72
+ BOLD_BUILDER = "boldBuilder",
73
+ WORD_WRANGLER = "wordWrangler",
74
+ FLUENT_FLAME = "fluentFlame",
75
+ MIGHTY_MASTER = "mightyMaster",
76
+ RADIANT_ROCKSTAR = "radiantRockstar",
77
+ WISE_WIZARD = "wiseWizard",
78
+ LEGENDARY_LINGUIST = "legendaryLinguist",
79
+ ABSOLUTE_ALPHA = "absoluteAlpha"
80
+ }
81
+ /**
82
+ * Named colour tokens for one level's theme. Every themed colour in the apps comes from one of these, so a designer
83
+ * can coordinate foreground, background and accents freely. All are #rrggbb hex.
84
+ */
85
+ interface ILevelPalette {
86
+ background: string;
87
+ card: string;
88
+ brand: string;
89
+ brandMid: string;
90
+ brandLight: string;
91
+ brandPale: string;
92
+ points: string;
93
+ streak: string;
94
+ test: string;
95
+ testDark: string;
96
+ testText: string;
97
+ accent: string;
98
+ accentDark: string;
99
+ accentLight: string;
100
+ accentPale: string;
101
+ chartRetired: string;
102
+ chartLearning: string;
103
+ chartQueued: string;
104
+ leaderboardHighlight: string;
105
+ divider: string;
106
+ heatScale: [string, string, string, string, string, string];
107
+ celebrationGradient: [string, string, string];
108
+ iconHueShift: number;
109
+ }
110
+ interface ILevelAvatar {
111
+ alphaHueShift: number;
112
+ preset?: {
113
+ id: AvatarPresetId;
114
+ params: Record<string, number | string>;
115
+ };
116
+ lottie?: string;
117
+ images?: {
118
+ id: string;
119
+ svg: string;
120
+ }[];
121
+ }
122
+ interface ILevelDefinition {
123
+ level: number;
124
+ xpThreshold: number;
125
+ minBestStreak: number;
126
+ names: {
127
+ en: string;
128
+ cz: string;
129
+ };
130
+ palette: ILevelPalette;
131
+ avatar: ILevelAvatar;
132
+ }
133
+ interface IXpAwards {
134
+ flashcardReview: number;
135
+ test: number;
136
+ perTestKnownAnswer: number;
137
+ perWordRetired: number;
138
+ dailyStreakBonusCap: number;
139
+ }
140
+ interface ILevelsConfig {
141
+ version: number;
142
+ levels: ILevelDefinition[];
143
+ awards: IXpAwards;
144
+ }
145
+ /**
146
+ * GET /levels?version=<the app's cached version>: the published configuration, or just `unchanged` when the app
147
+ * already has the current version, so unchanged configurations aren't re-downloaded on every launch.
148
+ */
149
+ type LevelsResponseData = ILevelsConfig | {
150
+ version: number;
151
+ unchanged: true;
152
+ };
153
+
54
154
  /**
55
155
  * XP and experience levels.
56
156
  *
@@ -72,6 +172,7 @@ declare const isExpired: (date: MySQLDate) => boolean;
72
172
  * A user's level is derived from their XP and their best streak - it is never stored, so client and server can't
73
173
  * disagree, and because neither value ever decreases, a level once reached is never lost.
74
174
  */
175
+
75
176
  declare const XP_FLASHCARD_REVIEW = 10;
76
177
  declare const XP_TEST = 15;
77
178
  declare const XP_PER_TEST_KNOWN_ANSWER = 1;
@@ -88,8 +189,9 @@ declare const maxLevel: number;
88
189
  * @name getLevel
89
190
  * @description The highest level whose XP threshold and best-streak requirement are both met. Levels must be
90
191
  * reached in order, so a missing streak for level 5 holds the user at level 4 however much XP they have.
192
+ * @param levels - the level rules, e.g. the published ILevelsConfig levels; defaults to the built-in LEVELS
91
193
  */
92
- declare const getLevel: (xp: number, bestStreak: number) => number;
194
+ declare const getLevel: (xp: number, bestStreak: number, levels?: readonly ILevel[]) => number;
93
195
  interface ILevelProgress {
94
196
  level: number;
95
197
  nextLevel?: number;
@@ -97,14 +199,16 @@ interface ILevelProgress {
97
199
  xpProgress: number;
98
200
  streakDaysToNextLevel: number;
99
201
  }
100
- declare const getLevelProgress: (xp: number, bestStreak: number) => ILevelProgress;
202
+ declare const getLevelProgress: (xp: number, bestStreak: number, levels?: readonly ILevel[]) => ILevelProgress;
203
+ declare const DEFAULT_XP_AWARDS: IXpAwards;
101
204
  /**
102
205
  * @name getFlashcardReviewXp
103
206
  * @param retiredCount - words promoted to RETIRED (mastered) by this review
104
207
  * @param newStreakDayLength - the streak length if this review is the first of a new streak day, otherwise 0
208
+ * @param awards - the XP award amounts; defaults to the built-in ones
105
209
  */
106
- declare const getFlashcardReviewXp: (retiredCount: number, newStreakDayLength: number) => number;
107
- declare const getTestXp: (knownCount: number) => number;
210
+ declare const getFlashcardReviewXp: (retiredCount: number, newStreakDayLength: number, awards?: IXpAwards) => number;
211
+ declare const getTestXp: (knownCount: number, awards?: IXpAwards) => number;
108
212
  declare const getBestStreak: (user: {
109
213
  highStreakLength: number;
110
214
  currentStreakLength: number;
@@ -113,7 +217,28 @@ declare const getUserLevelProgress: (user: {
113
217
  xp: number;
114
218
  highStreakLength: number;
115
219
  currentStreakLength: number;
116
- }) => ILevelProgress;
220
+ }, levels?: readonly ILevel[]) => ILevelProgress;
221
+
222
+ /**
223
+ * A full palette generated from one hue: the original design rotated round the colour wheel by (hue - level 1's
224
+ * hue), with the level's accent shades derived from the hue itself. The Level Designer's "generate from hue" uses
225
+ * this as a starting point.
226
+ */
227
+ declare const generatePalette: (hue: number) => ILevelPalette;
228
+ declare const DEFAULT_LEVEL_DEFINITIONS: ILevelDefinition[];
229
+ declare const DEFAULT_LEVELS_CONFIG: ILevelsConfig;
230
+
231
+ declare const MAX_LOTTIE_BYTES: number;
232
+ declare const MAX_SVG_BYTES: number;
233
+ declare const MAX_LEVEL_NAME_LENGTH = 40;
234
+ /** Problems with one level definition (empty when it's valid). */
235
+ declare const validateLevelDefinition: (level: ILevelDefinition) => string[];
236
+ declare const validateXpAwards: (awards: IXpAwards) => string[];
237
+ /**
238
+ * Problems with a whole configuration (empty when it can be published): every level valid, levels numbered 1..n
239
+ * with no gaps, XP thresholds rising from 0 and streak gates never falling.
240
+ */
241
+ declare const validateLevelsConfig: (config: Pick<ILevelsConfig, 'levels' | 'awards'>) => string[];
117
242
 
118
243
  interface ISession {
119
244
  sessionToken: string | undefined;
@@ -369,6 +494,7 @@ declare enum ApiPath {
369
494
  HEALTH = "/health",
370
495
  LAST_WORDS_ADDED = "/lastWordsAdded",
371
496
  LEADERBOARD = "/leaderboard",
497
+ LEVELS = "/levels",
372
498
  LEXEMES = "/lexemes",
373
499
  LEXEMES_ALL = "/lexemes/all",
374
500
  LEXEMES_COUNT = "/lexemes/count/:language",
@@ -555,4 +681,4 @@ type DeeplTranslation = {
555
681
  }>;
556
682
  };
557
683
 
558
- export { ApiMethod, ApiPath, AppError, type AutologinRequestBody, ClientPlatform, type ControllerResponse, type DateString, type DeeplTranslation, type DeleteLexemePairRequestParams, Familiarity, type HeatMapParams, type HeatMapResponseData, HttpStatusCode, type IActivityCount, type ICount, type ILeaderboardEntry, type ILevel, type ILevelProgress, type ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ILexemePairTexts, type IProgressHistoryDay, type ISession, type ITestResult, type IUserData, type IVocabCheckActivity, type InsertOrUpdateRequestBody, type InsertOrUpdateResponseData, LEARNING_STAGES_IN_GROUP, LEVELS, Language, LearningStage, LearningStageGroup, Lexeme, LexemePair, type LexemePairRequestBody, type LexemePairWithLang, type MySQLDate, Progress, type RecycleLexemePairParams, type RegisterPushTokenRequestBody, ReminderFrequency, type ResetTestUserParams, type Result, Scenario, type SelectAllTranslationsParams, type SelectLexemeCountParams, type SelectLexemePairParams, type SelectLexemePairsByTextParams, type SelectLexemesParams, type SelectProgressHistoryParams, type SelectTestLexemesParams, type SelectVocabCheckActivityParams, type SignInRequestBody, type SignInResponseData, type Streaks, type TestCompleteRequestBody, type TestCompleteResponseData, type TestInitRequestBody, type TestInitResponseData, type TranslationRequestBody, type TranslationResponseData, type UpdateLexemePairFamiliarityParams, type UpdateOnboardingStatusRequestBody, type UpdateUserRequestBody, VocabCheckType, XP_DAILY_STREAK_BONUS_CAP, XP_FLASHCARD_REVIEW, XP_PER_TEST_KNOWN_ANSWER, XP_PER_WORD_RETIRED, XP_TEST, convertJSDateStringToMySQLDate, dateDifferenceInDays, deriveStreakFromVocabCheckActivity, getBestStreak, getFlashcardReviewXp, getFormattedDate, getLevel, getLevelProgress, getMysqlDateIgnoreTZ, getTestXp, getUserLevelProgress, isClientDateTooFarFromServerDate, isExpired, isFinalTest, isLearningStageGroup, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, maxLevel, parameterReplace };
684
+ export { ApiMethod, ApiPath, AppError, type AutologinRequestBody, AvatarPresetId, ClientPlatform, type ControllerResponse, DEFAULT_LEVELS_CONFIG, DEFAULT_LEVEL_DEFINITIONS, DEFAULT_XP_AWARDS, type DateString, type DeeplTranslation, type DeleteLexemePairRequestParams, Familiarity, type HeatMapParams, type HeatMapResponseData, type Hsl, HttpStatusCode, type IActivityCount, type ICount, type ILeaderboardEntry, type ILevel, type ILevelAvatar, type ILevelDefinition, type ILevelPalette, type ILevelProgress, type ILevelsConfig, type ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ILexemePairTexts, type IProgressHistoryDay, type ISession, type ITestResult, type IUserData, type IVocabCheckActivity, type IXpAwards, type InsertOrUpdateRequestBody, type InsertOrUpdateResponseData, LEARNING_STAGES_IN_GROUP, LEVELS, Language, LearningStage, LearningStageGroup, type LevelsResponseData, Lexeme, LexemePair, type LexemePairRequestBody, type LexemePairWithLang, MAX_LEVEL_NAME_LENGTH, MAX_LOTTIE_BYTES, MAX_SVG_BYTES, type MySQLDate, Progress, type RecycleLexemePairParams, type RegisterPushTokenRequestBody, ReminderFrequency, type ResetTestUserParams, type Result, Scenario, type SelectAllTranslationsParams, type SelectLexemeCountParams, type SelectLexemePairParams, type SelectLexemePairsByTextParams, type SelectLexemesParams, type SelectProgressHistoryParams, type SelectTestLexemesParams, type SelectVocabCheckActivityParams, type SignInRequestBody, type SignInResponseData, type Streaks, type TestCompleteRequestBody, type TestCompleteResponseData, type TestInitRequestBody, type TestInitResponseData, type TranslationRequestBody, type TranslationResponseData, type UpdateLexemePairFamiliarityParams, type UpdateOnboardingStatusRequestBody, type UpdateUserRequestBody, VocabCheckType, XP_DAILY_STREAK_BONUS_CAP, XP_FLASHCARD_REVIEW, XP_PER_TEST_KNOWN_ANSWER, XP_PER_WORD_RETIRED, XP_TEST, convertJSDateStringToMySQLDate, dateDifferenceInDays, deriveStreakFromVocabCheckActivity, generatePalette, getBestStreak, getFlashcardReviewXp, getFormattedDate, getLevel, getLevelProgress, getMysqlDateIgnoreTZ, getTestXp, getUserLevelProgress, hexToHsl, hslToHex, isClientDateTooFarFromServerDate, isExpired, isFinalTest, isHexColor, isLearningStageGroup, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, maxLevel, parameterReplace, shiftHue, validateLevelDefinition, validateLevelsConfig, validateXpAwards };