czapp-shared 1.0.22 → 1.0.24

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/README.md CHANGED
@@ -48,7 +48,8 @@ To run the project in watch mode:
48
48
  npm run watch
49
49
  ```
50
50
 
51
- TODO - make yalc republish after every change. At the moment it is manual. Run `yalc publish` after every change.
51
+ TODO - make yalc republish after every change. At the moment it is manual. Run `yalc push` after every change. Note that
52
+ `yalc publish` is not enough to force the dependent packages to update. `yalc push` is the way!
52
53
 
53
54
  ### Build
54
55
  To build the project (generate the artifacts):
@@ -75,4 +76,4 @@ npm run release:bump
75
76
  // then publish the package to npm so that it can be consumed by other projects
76
77
  npm publish
77
78
  ```
78
-
79
+ Now go to the dependent packages and update to the new version and reinstall deps.
package/dist/index.d.mts CHANGED
@@ -158,6 +158,10 @@ interface ILexemeIdPair {
158
158
  czId: number;
159
159
  enId: number;
160
160
  }
161
+ interface ILexemePairTexts {
162
+ czText: string;
163
+ enText: string;
164
+ }
161
165
  type LexemePairWithLang = {
162
166
  czechLexeme: ILexeme;
163
167
  englishLexeme: ILexeme;
@@ -203,17 +207,15 @@ interface IActivityCount {
203
207
  }
204
208
 
205
209
  interface IUserData {
210
+ googleSub: string;
206
211
  currentStreakEnd: MySQLDate | undefined;
207
212
  currentStreakLength: number;
208
213
  email: string;
209
214
  flashcardReviewCompletedCount: number;
210
- googleSub: string;
211
215
  highStreakEnd: MySQLDate | undefined;
212
216
  highStreakLength: number;
213
217
  lastModified: MySQLDate;
214
- lastWordAdded: string;
215
218
  learningLanguage: Language;
216
- lexemePairCount: number;
217
219
  name: string;
218
220
  phone: string;
219
221
  rewardPoints: number;
@@ -242,6 +244,7 @@ declare enum ApiPath {
242
244
  AUTOLOGIN = "/autologin",
243
245
  DATA_HEATMAP = "/data/heatmap/:weekCount/:endDate",
244
246
  HEALTH = "/health",
247
+ LAST_WORDS_ADDED = "/lastWordsAdded",
245
248
  LEXEMES = "/lexemes",
246
249
  LEXEMES_ALL = "/lexemes/all",
247
250
  LEXEMES_COUNT = "/lexemes/count/:language",
@@ -378,7 +381,6 @@ interface InsertOrUpdateResponseData {
378
381
  }
379
382
  interface SignInResponseData {
380
383
  user: Partial<IUserData>;
381
- sessionToken: string | undefined;
382
384
  }
383
385
  interface TestInitResponseData {
384
386
  lexemePairs: ILexemePair[];
@@ -402,4 +404,4 @@ type DeeplTranslation = {
402
404
  }>;
403
405
  };
404
406
 
405
- 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 ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ISession, 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, isExpired, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, parameterReplace };
407
+ 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 ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ILexemePairTexts, type ISession, 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, isExpired, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, parameterReplace };
package/dist/index.d.ts CHANGED
@@ -158,6 +158,10 @@ interface ILexemeIdPair {
158
158
  czId: number;
159
159
  enId: number;
160
160
  }
161
+ interface ILexemePairTexts {
162
+ czText: string;
163
+ enText: string;
164
+ }
161
165
  type LexemePairWithLang = {
162
166
  czechLexeme: ILexeme;
163
167
  englishLexeme: ILexeme;
@@ -203,17 +207,15 @@ interface IActivityCount {
203
207
  }
204
208
 
205
209
  interface IUserData {
210
+ googleSub: string;
206
211
  currentStreakEnd: MySQLDate | undefined;
207
212
  currentStreakLength: number;
208
213
  email: string;
209
214
  flashcardReviewCompletedCount: number;
210
- googleSub: string;
211
215
  highStreakEnd: MySQLDate | undefined;
212
216
  highStreakLength: number;
213
217
  lastModified: MySQLDate;
214
- lastWordAdded: string;
215
218
  learningLanguage: Language;
216
- lexemePairCount: number;
217
219
  name: string;
218
220
  phone: string;
219
221
  rewardPoints: number;
@@ -242,6 +244,7 @@ declare enum ApiPath {
242
244
  AUTOLOGIN = "/autologin",
243
245
  DATA_HEATMAP = "/data/heatmap/:weekCount/:endDate",
244
246
  HEALTH = "/health",
247
+ LAST_WORDS_ADDED = "/lastWordsAdded",
245
248
  LEXEMES = "/lexemes",
246
249
  LEXEMES_ALL = "/lexemes/all",
247
250
  LEXEMES_COUNT = "/lexemes/count/:language",
@@ -378,7 +381,6 @@ interface InsertOrUpdateResponseData {
378
381
  }
379
382
  interface SignInResponseData {
380
383
  user: Partial<IUserData>;
381
- sessionToken: string | undefined;
382
384
  }
383
385
  interface TestInitResponseData {
384
386
  lexemePairs: ILexemePair[];
@@ -402,4 +404,4 @@ type DeeplTranslation = {
402
404
  }>;
403
405
  };
404
406
 
405
- 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 ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ISession, 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, isExpired, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, parameterReplace };
407
+ 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 ILexeme, type ILexemeIdPair, type ILexemeLearningInfo, type ILexemePair, type ILexemePairTexts, type ISession, 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, isExpired, isStringContainingInteger, isThePreviousDay, isTheSameDay, isValidJsDateString, isValidMysqlDateString, parameterReplace };
package/dist/index.js CHANGED
@@ -242,6 +242,7 @@ var ApiPath = /* @__PURE__ */ ((ApiPath2) => {
242
242
  ApiPath2["AUTOLOGIN"] = "/autologin";
243
243
  ApiPath2["DATA_HEATMAP"] = "/data/heatmap/:weekCount/:endDate";
244
244
  ApiPath2["HEALTH"] = "/health";
245
+ ApiPath2["LAST_WORDS_ADDED"] = "/lastWordsAdded";
245
246
  ApiPath2["LEXEMES"] = "/lexemes";
246
247
  ApiPath2["LEXEMES_ALL"] = "/lexemes/all";
247
248
  ApiPath2["LEXEMES_COUNT"] = "/lexemes/count/:language";
package/dist/index.mjs CHANGED
@@ -192,6 +192,7 @@ var ApiPath = /* @__PURE__ */ ((ApiPath2) => {
192
192
  ApiPath2["AUTOLOGIN"] = "/autologin";
193
193
  ApiPath2["DATA_HEATMAP"] = "/data/heatmap/:weekCount/:endDate";
194
194
  ApiPath2["HEALTH"] = "/health";
195
+ ApiPath2["LAST_WORDS_ADDED"] = "/lastWordsAdded";
195
196
  ApiPath2["LEXEMES"] = "/lexemes";
196
197
  ApiPath2["LEXEMES_ALL"] = "/lexemes/all";
197
198
  ApiPath2["LEXEMES_COUNT"] = "/lexemes/count/:language";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "czapp-shared",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
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",
@@ -9,6 +9,7 @@
9
9
  "build": "tsup src/index.ts --clean --format=cjs,esm --dts",
10
10
  "watch": "npm run build -- --watch",
11
11
  "test:unit": "mocha --require ts-node/register/transpile-only test/**/*.ts",
12
+ "yp": "yalc push",
12
13
  "release:bump": "bumpp"
13
14
  },
14
15
  "repository": {
package/src/design/api.ts CHANGED
@@ -24,6 +24,7 @@ export enum ApiPath {
24
24
  AUTOLOGIN = '/autologin',
25
25
  DATA_HEATMAP = '/data/heatmap/:weekCount/:endDate',
26
26
  HEALTH = '/health',
27
+ LAST_WORDS_ADDED = '/lastWordsAdded',
27
28
  LEXEMES = '/lexemes',
28
29
  LEXEMES_ALL = '/lexemes/all',
29
30
  LEXEMES_COUNT = '/lexemes/count/:language',
@@ -171,7 +172,6 @@ export interface InsertOrUpdateResponseData {
171
172
  }
172
173
  export interface SignInResponseData {
173
174
  user: Partial<IUserData>;
174
- sessionToken: string | undefined;
175
175
  }
176
176
  export interface TestInitResponseData {
177
177
  lexemePairs: ILexemePair[];
@@ -26,6 +26,11 @@ export interface ILexemeIdPair {
26
26
  enId: number;
27
27
  }
28
28
 
29
+ export interface ILexemePairTexts {
30
+ czText: string;
31
+ enText: string;
32
+ }
33
+
29
34
  export type LexemePairWithLang = {
30
35
  czechLexeme: ILexeme,
31
36
  englishLexeme: ILexeme,
@@ -1,17 +1,15 @@
1
1
  import { Language, MySQLDate } from './types';
2
2
 
3
3
  export interface IUserData {
4
+ googleSub: string,
4
5
  currentStreakEnd: MySQLDate | undefined,
5
6
  currentStreakLength: number,
6
7
  email: string,
7
8
  flashcardReviewCompletedCount: number,
8
- googleSub: string,
9
9
  highStreakEnd: MySQLDate | undefined,
10
10
  highStreakLength: number,
11
11
  lastModified: MySQLDate,
12
- lastWordAdded: string,
13
12
  learningLanguage: Language,
14
- lexemePairCount: number,
15
13
  name: string,
16
14
  phone: string,
17
15
  rewardPoints: number,