@thomas-labs/scrape-service-lib 1.1.14 → 1.1.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.
Files changed (33) hide show
  1. package/dist/AppClient.js +1 -1
  2. package/dist/core/OpenAPI.js +1 -1
  3. package/dist/index.d.ts +11 -0
  4. package/dist/index.js +5 -1
  5. package/dist/models/FirebaseLoginDto.d.ts +3 -0
  6. package/dist/models/FirebaseLoginDto.js +2 -0
  7. package/dist/models/StudyActionDto.d.ts +6 -0
  8. package/dist/models/StudyActionDto.js +14 -0
  9. package/dist/models/StudyAnswerResponseDto.d.ts +4 -8
  10. package/dist/models/StudyAnswerResultDto.d.ts +10 -0
  11. package/dist/models/StudyAnswerResultDto.js +2 -0
  12. package/dist/models/StudyAnswerUiHintDto.d.ts +5 -0
  13. package/dist/models/StudyAnswerUiHintDto.js +2 -0
  14. package/dist/models/StudyCollocationItemDto.d.ts +5 -0
  15. package/dist/models/StudyCollocationItemDto.js +2 -0
  16. package/dist/models/StudyContentDto.d.ts +8 -0
  17. package/dist/models/StudyContentDto.js +2 -0
  18. package/dist/models/StudyExampleItemDto.d.ts +4 -0
  19. package/dist/models/StudyExampleItemDto.js +2 -0
  20. package/dist/models/StudyMeaningItemDto.d.ts +4 -0
  21. package/dist/models/StudyMeaningItemDto.js +2 -0
  22. package/dist/models/StudyNextActionDto.d.ts +3 -0
  23. package/dist/models/StudyNextActionDto.js +11 -0
  24. package/dist/models/StudyNextResponseDto.d.ts +8 -0
  25. package/dist/models/StudySessionDto.d.ts +6 -0
  26. package/dist/models/StudySessionDto.js +2 -0
  27. package/dist/models/StudyTermDto.d.ts +5 -0
  28. package/dist/models/StudyTermDto.js +2 -0
  29. package/dist/services/AuthService.d.ts +7 -0
  30. package/dist/services/AuthService.js +13 -0
  31. package/dist/services/ClientService.d.ts +7 -0
  32. package/dist/services/ClientService.js +13 -0
  33. package/package.json +1 -1
package/dist/AppClient.js CHANGED
@@ -16,7 +16,7 @@ class AppClient {
16
16
  constructor(config, HttpRequest = FetchHttpRequest_1.FetchHttpRequest) {
17
17
  this.request = new HttpRequest({
18
18
  BASE: config?.BASE ?? '/api',
19
- VERSION: config?.VERSION ?? '1.0.15',
19
+ VERSION: config?.VERSION ?? '1.0.17',
20
20
  WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
21
21
  CREDENTIALS: config?.CREDENTIALS ?? 'include',
22
22
  TOKEN: config?.TOKEN,
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpenAPI = void 0;
4
4
  exports.OpenAPI = {
5
5
  BASE: '/api',
6
- VERSION: '1.0.15',
6
+ VERSION: '1.0.17',
7
7
  WITH_CREDENTIALS: false,
8
8
  CREDENTIALS: 'include',
9
9
  TOKEN: undefined,
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { AiProviderDto } from './models/AiProviderDto';
9
9
  export type { CreateCollectionDto } from './models/CreateCollectionDto';
10
10
  export type { CreateCollectionJsonDto } from './models/CreateCollectionJsonDto';
11
11
  export type { EnrichTermsDto } from './models/EnrichTermsDto';
12
+ export type { FirebaseLoginDto } from './models/FirebaseLoginDto';
12
13
  export { GradeTypeDto } from './models/GradeTypeDto';
13
14
  export type { LoginDto } from './models/LoginDto';
14
15
  export type { LoginResDto } from './models/LoginResDto';
@@ -18,11 +19,21 @@ export type { RefreshTokenDto } from './models/RefreshTokenDto';
18
19
  export type { RegisterDto } from './models/RegisterDto';
19
20
  export type { StartCollectionDto } from './models/StartCollectionDto';
20
21
  export type { StopCollectionDto } from './models/StopCollectionDto';
22
+ export { StudyActionDto } from './models/StudyActionDto';
21
23
  export type { StudyAnswerDto } from './models/StudyAnswerDto';
22
24
  export type { StudyAnswerResponseDto } from './models/StudyAnswerResponseDto';
25
+ export type { StudyAnswerResultDto } from './models/StudyAnswerResultDto';
26
+ export type { StudyAnswerUiHintDto } from './models/StudyAnswerUiHintDto';
27
+ export type { StudyCollocationItemDto } from './models/StudyCollocationItemDto';
28
+ export type { StudyContentDto } from './models/StudyContentDto';
29
+ export type { StudyExampleItemDto } from './models/StudyExampleItemDto';
30
+ export type { StudyMeaningItemDto } from './models/StudyMeaningItemDto';
23
31
  export { StudyModeDto } from './models/StudyModeDto';
32
+ export { StudyNextActionDto } from './models/StudyNextActionDto';
24
33
  export type { StudyNextResponseDto } from './models/StudyNextResponseDto';
34
+ export type { StudySessionDto } from './models/StudySessionDto';
25
35
  export { StudySourceDto } from './models/StudySourceDto';
36
+ export type { StudyTermDto } from './models/StudyTermDto';
26
37
  export type { TelegramCallbackQuery } from './models/TelegramCallbackQuery';
27
38
  export { TelegramChat } from './models/TelegramChat';
28
39
  export type { TelegramMessage } from './models/TelegramMessage';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserService = exports.TermsService = exports.TelegramService = exports.StudyService = exports.StatsService = exports.DefaultService = exports.CollectionsService = exports.ClientService = exports.AuthService = exports.AiService = exports.TelegramChat = exports.StudySourceDto = exports.StudyModeDto = exports.ProgressStageDto = exports.GradeTypeDto = exports.AiProviderDto = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.BaseHttpRequest = exports.ApiError = exports.AppClient = void 0;
3
+ exports.UserService = exports.TermsService = exports.TelegramService = exports.StudyService = exports.StatsService = exports.DefaultService = exports.CollectionsService = exports.ClientService = exports.AuthService = exports.AiService = exports.TelegramChat = exports.StudySourceDto = exports.StudyNextActionDto = exports.StudyModeDto = exports.StudyActionDto = exports.ProgressStageDto = exports.GradeTypeDto = exports.AiProviderDto = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.BaseHttpRequest = exports.ApiError = exports.AppClient = void 0;
4
4
  /* generated using openapi-typescript-codegen -- do not edit */
5
5
  /* istanbul ignore file */
6
6
  /* tslint:disable */
@@ -22,8 +22,12 @@ var GradeTypeDto_1 = require("./models/GradeTypeDto");
22
22
  Object.defineProperty(exports, "GradeTypeDto", { enumerable: true, get: function () { return GradeTypeDto_1.GradeTypeDto; } });
23
23
  var ProgressStageDto_1 = require("./models/ProgressStageDto");
24
24
  Object.defineProperty(exports, "ProgressStageDto", { enumerable: true, get: function () { return ProgressStageDto_1.ProgressStageDto; } });
25
+ var StudyActionDto_1 = require("./models/StudyActionDto");
26
+ Object.defineProperty(exports, "StudyActionDto", { enumerable: true, get: function () { return StudyActionDto_1.StudyActionDto; } });
25
27
  var StudyModeDto_1 = require("./models/StudyModeDto");
26
28
  Object.defineProperty(exports, "StudyModeDto", { enumerable: true, get: function () { return StudyModeDto_1.StudyModeDto; } });
29
+ var StudyNextActionDto_1 = require("./models/StudyNextActionDto");
30
+ Object.defineProperty(exports, "StudyNextActionDto", { enumerable: true, get: function () { return StudyNextActionDto_1.StudyNextActionDto; } });
27
31
  var StudySourceDto_1 = require("./models/StudySourceDto");
28
32
  Object.defineProperty(exports, "StudySourceDto", { enumerable: true, get: function () { return StudySourceDto_1.StudySourceDto; } });
29
33
  var TelegramChat_1 = require("./models/TelegramChat");
@@ -0,0 +1,3 @@
1
+ export type FirebaseLoginDto = {
2
+ idToken: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export declare enum StudyActionDto {
2
+ AGAIN = "AGAIN",
3
+ HARD = "HARD",
4
+ GOOD = "GOOD",
5
+ EASY = "EASY"
6
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StudyActionDto = void 0;
4
+ /* generated using openapi-typescript-codegen -- do not edit */
5
+ /* istanbul ignore file */
6
+ /* tslint:disable */
7
+ /* eslint-disable */
8
+ var StudyActionDto;
9
+ (function (StudyActionDto) {
10
+ StudyActionDto["AGAIN"] = "AGAIN";
11
+ StudyActionDto["HARD"] = "HARD";
12
+ StudyActionDto["GOOD"] = "GOOD";
13
+ StudyActionDto["EASY"] = "EASY";
14
+ })(StudyActionDto || (exports.StudyActionDto = StudyActionDto = {}));
@@ -1,10 +1,6 @@
1
- import type { GradeTypeDto } from './GradeTypeDto';
2
- import type { ProgressStageDto } from './ProgressStageDto';
1
+ import type { StudyAnswerResultDto } from './StudyAnswerResultDto';
2
+ import type { StudyAnswerUiHintDto } from './StudyAnswerUiHintDto';
3
3
  export type StudyAnswerResponseDto = {
4
- termId: string;
5
- grade: GradeTypeDto;
6
- stage: ProgressStageDto;
7
- intervalDays: number;
8
- ease: number;
9
- dueAt: string;
4
+ result: StudyAnswerResultDto;
5
+ uiHint: StudyAnswerUiHintDto;
10
6
  };
@@ -0,0 +1,10 @@
1
+ import type { GradeTypeDto } from './GradeTypeDto';
2
+ import type { ProgressStageDto } from './ProgressStageDto';
3
+ export type StudyAnswerResultDto = {
4
+ termId: string;
5
+ grade: GradeTypeDto;
6
+ stage: ProgressStageDto;
7
+ intervalDays: number;
8
+ ease: number;
9
+ dueAt: string;
10
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type { StudyNextActionDto } from './StudyNextActionDto';
2
+ export type StudyAnswerUiHintDto = {
3
+ message: string;
4
+ nextAction: StudyNextActionDto;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export type StudyCollocationItemDto = {
2
+ phrase: string;
3
+ meaningVi: string;
4
+ exampleEn: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type { StudyCollocationItemDto } from './StudyCollocationItemDto';
2
+ import type { StudyExampleItemDto } from './StudyExampleItemDto';
3
+ import type { StudyMeaningItemDto } from './StudyMeaningItemDto';
4
+ export type StudyContentDto = {
5
+ meanings: Array<StudyMeaningItemDto>;
6
+ examples: Array<StudyExampleItemDto>;
7
+ collocations: Array<StudyCollocationItemDto>;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export type StudyExampleItemDto = {
2
+ type: string;
3
+ text: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export type StudyMeaningItemDto = {
2
+ lang: string;
3
+ text: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export declare enum StudyNextActionDto {
2
+ FETCH_NEXT = "FETCH_NEXT"
3
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StudyNextActionDto = void 0;
4
+ /* generated using openapi-typescript-codegen -- do not edit */
5
+ /* istanbul ignore file */
6
+ /* tslint:disable */
7
+ /* eslint-disable */
8
+ var StudyNextActionDto;
9
+ (function (StudyNextActionDto) {
10
+ StudyNextActionDto["FETCH_NEXT"] = "FETCH_NEXT";
11
+ })(StudyNextActionDto || (exports.StudyNextActionDto = StudyNextActionDto = {}));
@@ -1,5 +1,13 @@
1
+ import type { StudyActionDto } from './StudyActionDto';
2
+ import type { StudyContentDto } from './StudyContentDto';
3
+ import type { StudySessionDto } from './StudySessionDto';
1
4
  import type { StudySourceDto } from './StudySourceDto';
5
+ import type { StudyTermDto } from './StudyTermDto';
2
6
  export type StudyNextResponseDto = {
7
+ session: StudySessionDto;
8
+ term: StudyTermDto;
9
+ content: StudyContentDto;
10
+ actions: Array<StudyActionDto>;
3
11
  sessionId: string;
4
12
  source: StudySourceDto;
5
13
  termId: string;
@@ -0,0 +1,6 @@
1
+ import type { StudyModeDto } from './StudyModeDto';
2
+ import type { StudySourceDto } from './StudySourceDto';
3
+ export type StudySessionDto = {
4
+ mode: StudyModeDto;
5
+ source: StudySourceDto;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export type StudyTermDto = {
2
+ id: string;
3
+ raw: string;
4
+ ipaAudioUrl?: string | null;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  import type { ActivateDto } from '../models/ActivateDto';
2
+ import type { FirebaseLoginDto } from '../models/FirebaseLoginDto';
2
3
  import type { LoginDto } from '../models/LoginDto';
3
4
  import type { LoginResDto } from '../models/LoginResDto';
4
5
  import type { RefreshTokenDto } from '../models/RefreshTokenDto';
@@ -26,6 +27,12 @@ export declare class AuthService {
26
27
  * @throws ApiError
27
28
  */
28
29
  login(requestBody: LoginDto): CancelablePromise<LoginResDto>;
30
+ /**
31
+ * @param requestBody
32
+ * @returns LoginResDto Ok
33
+ * @throws ApiError
34
+ */
35
+ firebaseLogin(requestBody: FirebaseLoginDto): CancelablePromise<LoginResDto>;
29
36
  /**
30
37
  * @param requestBody
31
38
  * @returns LoginResDto Ok
@@ -44,6 +44,19 @@ class AuthService {
44
44
  mediaType: 'application/json',
45
45
  });
46
46
  }
47
+ /**
48
+ * @param requestBody
49
+ * @returns LoginResDto Ok
50
+ * @throws ApiError
51
+ */
52
+ firebaseLogin(requestBody) {
53
+ return this.httpRequest.request({
54
+ method: 'POST',
55
+ url: '/auth/firebase/login',
56
+ body: requestBody,
57
+ mediaType: 'application/json',
58
+ });
59
+ }
47
60
  /**
48
61
  * @param requestBody
49
62
  * @returns LoginResDto Ok
@@ -1,4 +1,5 @@
1
1
  import type { ActivateDto } from '../models/ActivateDto';
2
+ import type { FirebaseLoginDto } from '../models/FirebaseLoginDto';
2
3
  import type { LoginDto } from '../models/LoginDto';
3
4
  import type { LoginResDto } from '../models/LoginResDto';
4
5
  import type { RefreshTokenDto } from '../models/RefreshTokenDto';
@@ -26,6 +27,12 @@ export declare class ClientService {
26
27
  * @throws ApiError
27
28
  */
28
29
  login(requestBody: LoginDto): CancelablePromise<LoginResDto>;
30
+ /**
31
+ * @param requestBody
32
+ * @returns LoginResDto Ok
33
+ * @throws ApiError
34
+ */
35
+ firebaseLogin(requestBody: FirebaseLoginDto): CancelablePromise<LoginResDto>;
29
36
  /**
30
37
  * @param requestBody
31
38
  * @returns LoginResDto Ok
@@ -44,6 +44,19 @@ class ClientService {
44
44
  mediaType: 'application/json',
45
45
  });
46
46
  }
47
+ /**
48
+ * @param requestBody
49
+ * @returns LoginResDto Ok
50
+ * @throws ApiError
51
+ */
52
+ firebaseLogin(requestBody) {
53
+ return this.httpRequest.request({
54
+ method: 'POST',
55
+ url: '/auth/firebase/login',
56
+ body: requestBody,
57
+ mediaType: 'application/json',
58
+ });
59
+ }
47
60
  /**
48
61
  * @param requestBody
49
62
  * @returns LoginResDto Ok
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thomas-labs/scrape-service-lib",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",