czapp-shared 1.0.14 → 1.0.16

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
@@ -98,6 +98,7 @@ declare enum AppError {
98
98
  REQUEST_UPDATE_FAMILIARITY_FAILED = "Failed to update familiarity",
99
99
  REQUEST_UPDATE_USER_SETTINGS_FAILED = "Failed to update user settings",
100
100
  REQUEST_INSERT_OR_UPDATE_LEXEME_PAIR_FAILED = "Failed to insert or update lexeme pair",
101
+ REQUEST_RECYCLE_LEXEME_PAIR_FAILED = "Failed to recycle lexeme pair",
101
102
  REQUEST_TRANSLATION_FAILED = "Failed to get translation",
102
103
  REQUEST_TEST_COMPLETE_FAILED = "Failed to complete test",
103
104
  REQUEST_TEST_SKIP_FAILED = "Failed to skip to the next deck"
@@ -204,6 +205,7 @@ interface IUserData {
204
205
  signUpDate: MySQLDate;
205
206
  testsCompletedCount: number;
206
207
  uiLanguage: Language;
208
+ onboardingStatus: boolean;
207
209
  }
208
210
 
209
211
  declare enum HttpStatusCode {
@@ -233,6 +235,7 @@ declare enum ApiPath {
233
235
  LEXEME_PAIRS_BY_TEXT = "/lexemePairsByText/:inputText/:inputLang",
234
236
  LEXEME_PAIR_FAMILIARITY = "/lexemePair/:czId/:enId/:familiarity",
235
237
  LEXEME_PAIR_COUNT = "/lexemePairCount",
238
+ LEXEME_PAIR_RECYCLE = "/lexemePair/recycle/:czId/:enId",
236
239
  SIGN_IN = "/signIn",
237
240
  SIGN_OUT = "/signOut",
238
241
  TEST_COMPLETE = "/test/complete",
@@ -241,6 +244,7 @@ declare enum ApiPath {
241
244
  TRANSLATE = "/translate",
242
245
  TRANSLATIONS_ALL = "/lexemes/allTranslations/:sourceText/:sourceLang",
243
246
  USER = "/user",
247
+ USER_ONBOARDING = "/user/onboarding",
244
248
  USER_RESET_TEST = "/user/test/reset/:flashcardReviewCompletedCount/:currentStreakEnd"
245
249
  }
246
250
  declare enum ClientPlatform {
@@ -285,6 +289,9 @@ interface InsertOrUpdateRequestBody {
285
289
  interface SignInRequestBody {
286
290
  rememberMe: boolean;
287
291
  }
292
+ interface UpdateOnboardingStatusRequestBody {
293
+ onboardingStatus: boolean;
294
+ }
288
295
  /**
289
296
  * Request Params
290
297
  */
@@ -316,6 +323,10 @@ interface UpdateLexemePairFamiliarityParams {
316
323
  enId: number;
317
324
  familiarity: Familiarity;
318
325
  }
326
+ interface RecycleLexemePairParams {
327
+ czId: number;
328
+ enId: number;
329
+ }
319
330
  interface DeleteLexemePairRequestParams {
320
331
  czId: number;
321
332
  enId: number;
@@ -364,4 +375,4 @@ type DeeplTranslation = {
364
375
  }>;
365
376
  };
366
377
 
367
- export { ApiMethod, ApiPath, AppError, type AutologinRequestBody, ClientPlatform, type ControllerResponse, type DeeplTranslation, type DeleteLexemePairRequestParams, Familiarity, HttpStatusCode, type ICount, type ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ITestResult, type IUserData, type InsertOrUpdateRequestBody, type InsertOrUpdateResponseData, Language, LearningStage, Lexeme, LexemePair, type LexemePairRequestBody, type LexemePairWithLang, type MySQLDate, Progress, ReminderFrequency, type ResetTestUserParams, type Result, Scenario, type SelectAllTranslationsParams, type SelectLexemeCountParams, type SelectLexemePairParams, type SelectLexemePairsByTextParams, type SelectLexemesParams, type SelectTestLexemesParams, type SignInRequestBody, type SignInResponseData, type TestCompleteRequestBody, type TestCompleteResponseData, type TestInitRequestBody, type TestInitResponseData, type TranslationRequestBody, type TranslationResponseData, type UpdateLexemePairFamiliarityParams, type UpdateUserRequestBody, VocabCheckType, convertJSDateStringToMySQLDate, dateDifferenceInDays, getFormattedDate, getMysqlDateIgnoreTZ, isClientDateTooFarFromServerDate, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, parameterReplace };
378
+ export { ApiMethod, ApiPath, AppError, type AutologinRequestBody, ClientPlatform, type ControllerResponse, type DeeplTranslation, type DeleteLexemePairRequestParams, Familiarity, HttpStatusCode, type ICount, type ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ITestResult, type IUserData, type InsertOrUpdateRequestBody, type InsertOrUpdateResponseData, Language, LearningStage, Lexeme, LexemePair, type LexemePairRequestBody, type LexemePairWithLang, type MySQLDate, Progress, type RecycleLexemePairParams, ReminderFrequency, type ResetTestUserParams, type Result, Scenario, type SelectAllTranslationsParams, type SelectLexemeCountParams, type SelectLexemePairParams, type SelectLexemePairsByTextParams, type SelectLexemesParams, type SelectTestLexemesParams, type SignInRequestBody, type SignInResponseData, type TestCompleteRequestBody, type TestCompleteResponseData, type TestInitRequestBody, type TestInitResponseData, type TranslationRequestBody, type TranslationResponseData, type UpdateLexemePairFamiliarityParams, type UpdateOnboardingStatusRequestBody, type UpdateUserRequestBody, VocabCheckType, convertJSDateStringToMySQLDate, dateDifferenceInDays, getFormattedDate, getMysqlDateIgnoreTZ, isClientDateTooFarFromServerDate, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, parameterReplace };
package/dist/index.d.ts CHANGED
@@ -98,6 +98,7 @@ declare enum AppError {
98
98
  REQUEST_UPDATE_FAMILIARITY_FAILED = "Failed to update familiarity",
99
99
  REQUEST_UPDATE_USER_SETTINGS_FAILED = "Failed to update user settings",
100
100
  REQUEST_INSERT_OR_UPDATE_LEXEME_PAIR_FAILED = "Failed to insert or update lexeme pair",
101
+ REQUEST_RECYCLE_LEXEME_PAIR_FAILED = "Failed to recycle lexeme pair",
101
102
  REQUEST_TRANSLATION_FAILED = "Failed to get translation",
102
103
  REQUEST_TEST_COMPLETE_FAILED = "Failed to complete test",
103
104
  REQUEST_TEST_SKIP_FAILED = "Failed to skip to the next deck"
@@ -204,6 +205,7 @@ interface IUserData {
204
205
  signUpDate: MySQLDate;
205
206
  testsCompletedCount: number;
206
207
  uiLanguage: Language;
208
+ onboardingStatus: boolean;
207
209
  }
208
210
 
209
211
  declare enum HttpStatusCode {
@@ -233,6 +235,7 @@ declare enum ApiPath {
233
235
  LEXEME_PAIRS_BY_TEXT = "/lexemePairsByText/:inputText/:inputLang",
234
236
  LEXEME_PAIR_FAMILIARITY = "/lexemePair/:czId/:enId/:familiarity",
235
237
  LEXEME_PAIR_COUNT = "/lexemePairCount",
238
+ LEXEME_PAIR_RECYCLE = "/lexemePair/recycle/:czId/:enId",
236
239
  SIGN_IN = "/signIn",
237
240
  SIGN_OUT = "/signOut",
238
241
  TEST_COMPLETE = "/test/complete",
@@ -241,6 +244,7 @@ declare enum ApiPath {
241
244
  TRANSLATE = "/translate",
242
245
  TRANSLATIONS_ALL = "/lexemes/allTranslations/:sourceText/:sourceLang",
243
246
  USER = "/user",
247
+ USER_ONBOARDING = "/user/onboarding",
244
248
  USER_RESET_TEST = "/user/test/reset/:flashcardReviewCompletedCount/:currentStreakEnd"
245
249
  }
246
250
  declare enum ClientPlatform {
@@ -285,6 +289,9 @@ interface InsertOrUpdateRequestBody {
285
289
  interface SignInRequestBody {
286
290
  rememberMe: boolean;
287
291
  }
292
+ interface UpdateOnboardingStatusRequestBody {
293
+ onboardingStatus: boolean;
294
+ }
288
295
  /**
289
296
  * Request Params
290
297
  */
@@ -316,6 +323,10 @@ interface UpdateLexemePairFamiliarityParams {
316
323
  enId: number;
317
324
  familiarity: Familiarity;
318
325
  }
326
+ interface RecycleLexemePairParams {
327
+ czId: number;
328
+ enId: number;
329
+ }
319
330
  interface DeleteLexemePairRequestParams {
320
331
  czId: number;
321
332
  enId: number;
@@ -364,4 +375,4 @@ type DeeplTranslation = {
364
375
  }>;
365
376
  };
366
377
 
367
- export { ApiMethod, ApiPath, AppError, type AutologinRequestBody, ClientPlatform, type ControllerResponse, type DeeplTranslation, type DeleteLexemePairRequestParams, Familiarity, HttpStatusCode, type ICount, type ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ITestResult, type IUserData, type InsertOrUpdateRequestBody, type InsertOrUpdateResponseData, Language, LearningStage, Lexeme, LexemePair, type LexemePairRequestBody, type LexemePairWithLang, type MySQLDate, Progress, ReminderFrequency, type ResetTestUserParams, type Result, Scenario, type SelectAllTranslationsParams, type SelectLexemeCountParams, type SelectLexemePairParams, type SelectLexemePairsByTextParams, type SelectLexemesParams, type SelectTestLexemesParams, type SignInRequestBody, type SignInResponseData, type TestCompleteRequestBody, type TestCompleteResponseData, type TestInitRequestBody, type TestInitResponseData, type TranslationRequestBody, type TranslationResponseData, type UpdateLexemePairFamiliarityParams, type UpdateUserRequestBody, VocabCheckType, convertJSDateStringToMySQLDate, dateDifferenceInDays, getFormattedDate, getMysqlDateIgnoreTZ, isClientDateTooFarFromServerDate, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, parameterReplace };
378
+ export { ApiMethod, ApiPath, AppError, type AutologinRequestBody, ClientPlatform, type ControllerResponse, type DeeplTranslation, type DeleteLexemePairRequestParams, Familiarity, HttpStatusCode, type ICount, type ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ITestResult, type IUserData, type InsertOrUpdateRequestBody, type InsertOrUpdateResponseData, Language, LearningStage, Lexeme, LexemePair, type LexemePairRequestBody, type LexemePairWithLang, type MySQLDate, Progress, type RecycleLexemePairParams, ReminderFrequency, type ResetTestUserParams, type Result, Scenario, type SelectAllTranslationsParams, type SelectLexemeCountParams, type SelectLexemePairParams, type SelectLexemePairsByTextParams, type SelectLexemesParams, type SelectTestLexemesParams, type SignInRequestBody, type SignInResponseData, type TestCompleteRequestBody, type TestCompleteResponseData, type TestInitRequestBody, type TestInitResponseData, type TranslationRequestBody, type TranslationResponseData, type UpdateLexemePairFamiliarityParams, type UpdateOnboardingStatusRequestBody, type UpdateUserRequestBody, VocabCheckType, convertJSDateStringToMySQLDate, dateDifferenceInDays, getFormattedDate, getMysqlDateIgnoreTZ, isClientDateTooFarFromServerDate, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, parameterReplace };
package/dist/index.js CHANGED
@@ -153,6 +153,7 @@ var AppError = /* @__PURE__ */ ((AppError2) => {
153
153
  AppError2["REQUEST_UPDATE_FAMILIARITY_FAILED"] = "Failed to update familiarity";
154
154
  AppError2["REQUEST_UPDATE_USER_SETTINGS_FAILED"] = "Failed to update user settings";
155
155
  AppError2["REQUEST_INSERT_OR_UPDATE_LEXEME_PAIR_FAILED"] = "Failed to insert or update lexeme pair";
156
+ AppError2["REQUEST_RECYCLE_LEXEME_PAIR_FAILED"] = "Failed to recycle lexeme pair";
156
157
  AppError2["REQUEST_TRANSLATION_FAILED"] = "Failed to get translation";
157
158
  AppError2["REQUEST_TEST_COMPLETE_FAILED"] = "Failed to complete test";
158
159
  AppError2["REQUEST_TEST_SKIP_FAILED"] = "Failed to skip to the next deck";
@@ -243,6 +244,7 @@ var ApiPath = /* @__PURE__ */ ((ApiPath2) => {
243
244
  ApiPath2["LEXEME_PAIRS_BY_TEXT"] = "/lexemePairsByText/:inputText/:inputLang";
244
245
  ApiPath2["LEXEME_PAIR_FAMILIARITY"] = "/lexemePair/:czId/:enId/:familiarity";
245
246
  ApiPath2["LEXEME_PAIR_COUNT"] = "/lexemePairCount";
247
+ ApiPath2["LEXEME_PAIR_RECYCLE"] = "/lexemePair/recycle/:czId/:enId";
246
248
  ApiPath2["SIGN_IN"] = "/signIn";
247
249
  ApiPath2["SIGN_OUT"] = "/signOut";
248
250
  ApiPath2["TEST_COMPLETE"] = "/test/complete";
@@ -251,6 +253,7 @@ var ApiPath = /* @__PURE__ */ ((ApiPath2) => {
251
253
  ApiPath2["TRANSLATE"] = "/translate";
252
254
  ApiPath2["TRANSLATIONS_ALL"] = "/lexemes/allTranslations/:sourceText/:sourceLang";
253
255
  ApiPath2["USER"] = "/user";
256
+ ApiPath2["USER_ONBOARDING"] = "/user/onboarding";
254
257
  ApiPath2["USER_RESET_TEST"] = "/user/test/reset/:flashcardReviewCompletedCount/:currentStreakEnd";
255
258
  return ApiPath2;
256
259
  })(ApiPath || {});
package/dist/index.mjs CHANGED
@@ -104,6 +104,7 @@ var AppError = /* @__PURE__ */ ((AppError2) => {
104
104
  AppError2["REQUEST_UPDATE_FAMILIARITY_FAILED"] = "Failed to update familiarity";
105
105
  AppError2["REQUEST_UPDATE_USER_SETTINGS_FAILED"] = "Failed to update user settings";
106
106
  AppError2["REQUEST_INSERT_OR_UPDATE_LEXEME_PAIR_FAILED"] = "Failed to insert or update lexeme pair";
107
+ AppError2["REQUEST_RECYCLE_LEXEME_PAIR_FAILED"] = "Failed to recycle lexeme pair";
107
108
  AppError2["REQUEST_TRANSLATION_FAILED"] = "Failed to get translation";
108
109
  AppError2["REQUEST_TEST_COMPLETE_FAILED"] = "Failed to complete test";
109
110
  AppError2["REQUEST_TEST_SKIP_FAILED"] = "Failed to skip to the next deck";
@@ -194,6 +195,7 @@ var ApiPath = /* @__PURE__ */ ((ApiPath2) => {
194
195
  ApiPath2["LEXEME_PAIRS_BY_TEXT"] = "/lexemePairsByText/:inputText/:inputLang";
195
196
  ApiPath2["LEXEME_PAIR_FAMILIARITY"] = "/lexemePair/:czId/:enId/:familiarity";
196
197
  ApiPath2["LEXEME_PAIR_COUNT"] = "/lexemePairCount";
198
+ ApiPath2["LEXEME_PAIR_RECYCLE"] = "/lexemePair/recycle/:czId/:enId";
197
199
  ApiPath2["SIGN_IN"] = "/signIn";
198
200
  ApiPath2["SIGN_OUT"] = "/signOut";
199
201
  ApiPath2["TEST_COMPLETE"] = "/test/complete";
@@ -202,6 +204,7 @@ var ApiPath = /* @__PURE__ */ ((ApiPath2) => {
202
204
  ApiPath2["TRANSLATE"] = "/translate";
203
205
  ApiPath2["TRANSLATIONS_ALL"] = "/lexemes/allTranslations/:sourceText/:sourceLang";
204
206
  ApiPath2["USER"] = "/user";
207
+ ApiPath2["USER_ONBOARDING"] = "/user/onboarding";
205
208
  ApiPath2["USER_RESET_TEST"] = "/user/test/reset/:flashcardReviewCompletedCount/:currentStreakEnd";
206
209
  return ApiPath2;
207
210
  })(ApiPath || {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "czapp-shared",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "This is a shared library for Czapp projects. It contains common code that is used across multiple projects.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/design/api.ts CHANGED
@@ -40,6 +40,7 @@ export enum ApiPath {
40
40
  TRANSLATE = '/translate',
41
41
  TRANSLATIONS_ALL = '/lexemes/allTranslations/:sourceText/:sourceLang',
42
42
  USER = '/user',
43
+ USER_ONBOARDING = '/user/onboarding',
43
44
  USER_RESET_TEST = '/user/test/reset/:flashcardReviewCompletedCount/:currentStreakEnd',
44
45
  }
45
46
 
@@ -87,6 +88,10 @@ export interface SignInRequestBody {
87
88
  rememberMe: boolean;
88
89
  }
89
90
 
91
+ export interface UpdateOnboardingStatusRequestBody {
92
+ onboardingStatus: boolean;
93
+ }
94
+
90
95
  /**
91
96
  * Request Params
92
97
  */
@@ -55,6 +55,7 @@ export enum AppError {
55
55
  REQUEST_UPDATE_FAMILIARITY_FAILED = 'Failed to update familiarity',
56
56
  REQUEST_UPDATE_USER_SETTINGS_FAILED = 'Failed to update user settings',
57
57
  REQUEST_INSERT_OR_UPDATE_LEXEME_PAIR_FAILED = 'Failed to insert or update lexeme pair',
58
+ REQUEST_RECYCLE_LEXEME_PAIR_FAILED = 'Failed to recycle lexeme pair',
58
59
  REQUEST_TRANSLATION_FAILED = 'Failed to get translation',
59
60
  REQUEST_TEST_COMPLETE_FAILED = 'Failed to complete test',
60
61
  REQUEST_TEST_SKIP_FAILED = "Failed to skip to the next deck"
@@ -18,4 +18,5 @@ export interface IUserData {
18
18
  signUpDate: MySQLDate,
19
19
  testsCompletedCount: number,
20
20
  uiLanguage: Language,
21
+ onboardingStatus: boolean
21
22
  }