@thomas-labs/scrape-service-lib 1.1.17 → 1.1.18

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.
@@ -5,6 +5,7 @@ import { AuthService } from './services/AuthService';
5
5
  import { ClientService } from './services/ClientService';
6
6
  import { CollectionsService } from './services/CollectionsService';
7
7
  import { DefaultService } from './services/DefaultService';
8
+ import { ReportsService } from './services/ReportsService';
8
9
  import { StatsService } from './services/StatsService';
9
10
  import { StudyService } from './services/StudyService';
10
11
  import { TaskRequestsService } from './services/TaskRequestsService';
@@ -19,6 +20,7 @@ export declare class AppClient {
19
20
  readonly client: ClientService;
20
21
  readonly collections: CollectionsService;
21
22
  readonly default: DefaultService;
23
+ readonly reports: ReportsService;
22
24
  readonly stats: StatsService;
23
25
  readonly study: StudyService;
24
26
  readonly taskRequests: TaskRequestsService;
package/dist/AppClient.js CHANGED
@@ -7,6 +7,7 @@ const AuthService_1 = require("./services/AuthService");
7
7
  const ClientService_1 = require("./services/ClientService");
8
8
  const CollectionsService_1 = require("./services/CollectionsService");
9
9
  const DefaultService_1 = require("./services/DefaultService");
10
+ const ReportsService_1 = require("./services/ReportsService");
10
11
  const StatsService_1 = require("./services/StatsService");
11
12
  const StudyService_1 = require("./services/StudyService");
12
13
  const TaskRequestsService_1 = require("./services/TaskRequestsService");
@@ -18,7 +19,7 @@ class AppClient {
18
19
  constructor(config, HttpRequest = FetchHttpRequest_1.FetchHttpRequest) {
19
20
  this.request = new HttpRequest({
20
21
  BASE: config?.BASE ?? '/api',
21
- VERSION: config?.VERSION ?? '1.0.18',
22
+ VERSION: config?.VERSION ?? '1.0.19',
22
23
  WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
23
24
  CREDENTIALS: config?.CREDENTIALS ?? 'include',
24
25
  TOKEN: config?.TOKEN,
@@ -32,6 +33,7 @@ class AppClient {
32
33
  this.client = new ClientService_1.ClientService(this.request);
33
34
  this.collections = new CollectionsService_1.CollectionsService(this.request);
34
35
  this.default = new DefaultService_1.DefaultService(this.request);
36
+ this.reports = new ReportsService_1.ReportsService(this.request);
35
37
  this.stats = new StatsService_1.StatsService(this.request);
36
38
  this.study = new StudyService_1.StudyService(this.request);
37
39
  this.taskRequests = new TaskRequestsService_1.TaskRequestsService(this.request);
@@ -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.18',
6
+ VERSION: '1.0.19',
7
7
  WITH_CREDENTIALS: false,
8
8
  CREDENTIALS: 'include',
9
9
  TOKEN: undefined,
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export type { ActivateDto } from './models/ActivateDto';
8
8
  export { AiProviderDto } from './models/AiProviderDto';
9
9
  export type { CreateCollectionDto } from './models/CreateCollectionDto';
10
10
  export type { CreateCollectionJsonDto } from './models/CreateCollectionJsonDto';
11
+ export type { CreateReportDto } from './models/CreateReportDto';
11
12
  export type { CreateTermImportRequestDto } from './models/CreateTermImportRequestDto';
12
13
  export type { EnrichTermsDto } from './models/EnrichTermsDto';
13
14
  export type { FirebaseLoginDto } from './models/FirebaseLoginDto';
@@ -18,6 +19,8 @@ export { ProgressStageDto } from './models/ProgressStageDto';
18
19
  export type { Record_string_unknown_ } from './models/Record_string_unknown_';
19
20
  export type { RefreshTokenDto } from './models/RefreshTokenDto';
20
21
  export type { RegisterDto } from './models/RegisterDto';
22
+ export type { ReplyReportDto } from './models/ReplyReportDto';
23
+ export { ReportStatusDto } from './models/ReportStatusDto';
21
24
  export { RequestTermsImportDto } from './models/RequestTermsImportDto';
22
25
  export type { StartCollectionDto } from './models/StartCollectionDto';
23
26
  export type { StopCollectionDto } from './models/StopCollectionDto';
@@ -48,6 +51,7 @@ export type { TelegramUpdate } from './models/TelegramUpdate';
48
51
  export type { TelegramUser } from './models/TelegramUser';
49
52
  export type { UpdateAiKeyDto } from './models/UpdateAiKeyDto';
50
53
  export type { UpdateCollectionDto } from './models/UpdateCollectionDto';
54
+ export type { UpdateReportStatusDto } from './models/UpdateReportStatusDto';
51
55
  export type { UpdateTaskRequestStatusDto } from './models/UpdateTaskRequestStatusDto';
52
56
  export type { UpdateTelegramBotConfigDto } from './models/UpdateTelegramBotConfigDto';
53
57
  export type { UpsertAiKeyDto } from './models/UpsertAiKeyDto';
@@ -57,6 +61,7 @@ export { AuthService } from './services/AuthService';
57
61
  export { ClientService } from './services/ClientService';
58
62
  export { CollectionsService } from './services/CollectionsService';
59
63
  export { DefaultService } from './services/DefaultService';
64
+ export { ReportsService } from './services/ReportsService';
60
65
  export { StatsService } from './services/StatsService';
61
66
  export { StudyService } from './services/StudyService';
62
67
  export { TaskRequestsService } from './services/TaskRequestsService';
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.TasksService = exports.TaskRequestsService = exports.StudyService = exports.StatsService = exports.DefaultService = exports.CollectionsService = exports.ClientService = exports.AuthService = exports.AiService = exports.TelegramChat = exports.TaskRequestTypeDto = exports.TaskRequestStatusDto = exports.TaskQueueTypeDto = exports.TaskQueueStatusDto = exports.StudySourceDto = exports.StudyNextActionDto = exports.StudyModeDto = exports.StudyActionDto = exports.RequestTermsImportDto = 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.TasksService = exports.TaskRequestsService = exports.StudyService = exports.StatsService = exports.ReportsService = exports.DefaultService = exports.CollectionsService = exports.ClientService = exports.AuthService = exports.AiService = exports.TelegramChat = exports.TaskRequestTypeDto = exports.TaskRequestStatusDto = exports.TaskQueueTypeDto = exports.TaskQueueStatusDto = exports.StudySourceDto = exports.StudyNextActionDto = exports.StudyModeDto = exports.StudyActionDto = exports.RequestTermsImportDto = exports.ReportStatusDto = 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,6 +22,8 @@ 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 ReportStatusDto_1 = require("./models/ReportStatusDto");
26
+ Object.defineProperty(exports, "ReportStatusDto", { enumerable: true, get: function () { return ReportStatusDto_1.ReportStatusDto; } });
25
27
  var RequestTermsImportDto_1 = require("./models/RequestTermsImportDto");
26
28
  Object.defineProperty(exports, "RequestTermsImportDto", { enumerable: true, get: function () { return RequestTermsImportDto_1.RequestTermsImportDto; } });
27
29
  var StudyActionDto_1 = require("./models/StudyActionDto");
@@ -52,6 +54,8 @@ var CollectionsService_1 = require("./services/CollectionsService");
52
54
  Object.defineProperty(exports, "CollectionsService", { enumerable: true, get: function () { return CollectionsService_1.CollectionsService; } });
53
55
  var DefaultService_1 = require("./services/DefaultService");
54
56
  Object.defineProperty(exports, "DefaultService", { enumerable: true, get: function () { return DefaultService_1.DefaultService; } });
57
+ var ReportsService_1 = require("./services/ReportsService");
58
+ Object.defineProperty(exports, "ReportsService", { enumerable: true, get: function () { return ReportsService_1.ReportsService; } });
55
59
  var StatsService_1 = require("./services/StatsService");
56
60
  Object.defineProperty(exports, "StatsService", { enumerable: true, get: function () { return StatsService_1.StatsService; } });
57
61
  var StudyService_1 = require("./services/StudyService");
@@ -0,0 +1,5 @@
1
+ export type CreateReportDto = {
2
+ title: string;
3
+ message: string;
4
+ category?: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export type ReplyReportDto = {
2
+ message: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export declare enum ReportStatusDto {
2
+ OPEN = "OPEN",
3
+ IN_PROGRESS = "IN_PROGRESS",
4
+ WAITING_USER = "WAITING_USER",
5
+ WAITING_ADMIN = "WAITING_ADMIN",
6
+ RESOLVED = "RESOLVED",
7
+ CLOSED = "CLOSED"
8
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReportStatusDto = void 0;
4
+ /* generated using openapi-typescript-codegen -- do not edit */
5
+ /* istanbul ignore file */
6
+ /* tslint:disable */
7
+ /* eslint-disable */
8
+ var ReportStatusDto;
9
+ (function (ReportStatusDto) {
10
+ ReportStatusDto["OPEN"] = "OPEN";
11
+ ReportStatusDto["IN_PROGRESS"] = "IN_PROGRESS";
12
+ ReportStatusDto["WAITING_USER"] = "WAITING_USER";
13
+ ReportStatusDto["WAITING_ADMIN"] = "WAITING_ADMIN";
14
+ ReportStatusDto["RESOLVED"] = "RESOLVED";
15
+ ReportStatusDto["CLOSED"] = "CLOSED";
16
+ })(ReportStatusDto || (exports.ReportStatusDto = ReportStatusDto = {}));
@@ -0,0 +1,5 @@
1
+ import type { ReportStatusDto } from './ReportStatusDto';
2
+ export type UpdateReportStatusDto = {
3
+ status: ReportStatusDto;
4
+ note?: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,52 @@
1
+ import type { CreateReportDto } from '../models/CreateReportDto';
2
+ import type { ReplyReportDto } from '../models/ReplyReportDto';
3
+ import type { ReportStatusDto } from '../models/ReportStatusDto';
4
+ import type { UpdateReportStatusDto } from '../models/UpdateReportStatusDto';
5
+ import type { CancelablePromise } from '../core/CancelablePromise';
6
+ import type { BaseHttpRequest } from '../core/BaseHttpRequest';
7
+ export declare class ReportsService {
8
+ readonly httpRequest: BaseHttpRequest;
9
+ constructor(httpRequest: BaseHttpRequest);
10
+ /**
11
+ * @param requestBody
12
+ * @returns any Ok
13
+ * @throws ApiError
14
+ */
15
+ create(requestBody: CreateReportDto): CancelablePromise<any>;
16
+ /**
17
+ * @param page
18
+ * @param limit
19
+ * @param status
20
+ * @returns any Ok
21
+ * @throws ApiError
22
+ */
23
+ mine(page?: number, limit?: number, status?: ReportStatusDto): CancelablePromise<any>;
24
+ /**
25
+ * @param page
26
+ * @param limit
27
+ * @param status
28
+ * @returns any Ok
29
+ * @throws ApiError
30
+ */
31
+ admin(page?: number, limit?: number, status?: ReportStatusDto): CancelablePromise<any>;
32
+ /**
33
+ * @param reportId
34
+ * @returns any Ok
35
+ * @throws ApiError
36
+ */
37
+ detail(reportId: string): CancelablePromise<any>;
38
+ /**
39
+ * @param reportId
40
+ * @param requestBody
41
+ * @returns any Ok
42
+ * @throws ApiError
43
+ */
44
+ reply(reportId: string, requestBody: ReplyReportDto): CancelablePromise<any>;
45
+ /**
46
+ * @param reportId
47
+ * @param requestBody
48
+ * @returns any Ok
49
+ * @throws ApiError
50
+ */
51
+ status(reportId: string, requestBody: UpdateReportStatusDto): CancelablePromise<any>;
52
+ }
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReportsService = void 0;
4
+ class ReportsService {
5
+ constructor(httpRequest) {
6
+ this.httpRequest = httpRequest;
7
+ }
8
+ /**
9
+ * @param requestBody
10
+ * @returns any Ok
11
+ * @throws ApiError
12
+ */
13
+ create(requestBody) {
14
+ return this.httpRequest.request({
15
+ method: 'POST',
16
+ url: '/reports',
17
+ body: requestBody,
18
+ mediaType: 'application/json',
19
+ });
20
+ }
21
+ /**
22
+ * @param page
23
+ * @param limit
24
+ * @param status
25
+ * @returns any Ok
26
+ * @throws ApiError
27
+ */
28
+ mine(page, limit, status) {
29
+ return this.httpRequest.request({
30
+ method: 'GET',
31
+ url: '/reports/mine',
32
+ query: {
33
+ 'page': page,
34
+ 'limit': limit,
35
+ 'status': status,
36
+ },
37
+ });
38
+ }
39
+ /**
40
+ * @param page
41
+ * @param limit
42
+ * @param status
43
+ * @returns any Ok
44
+ * @throws ApiError
45
+ */
46
+ admin(page, limit, status) {
47
+ return this.httpRequest.request({
48
+ method: 'GET',
49
+ url: '/reports/admin',
50
+ query: {
51
+ 'page': page,
52
+ 'limit': limit,
53
+ 'status': status,
54
+ },
55
+ });
56
+ }
57
+ /**
58
+ * @param reportId
59
+ * @returns any Ok
60
+ * @throws ApiError
61
+ */
62
+ detail(reportId) {
63
+ return this.httpRequest.request({
64
+ method: 'GET',
65
+ url: '/reports/{reportId}',
66
+ path: {
67
+ 'reportId': reportId,
68
+ },
69
+ });
70
+ }
71
+ /**
72
+ * @param reportId
73
+ * @param requestBody
74
+ * @returns any Ok
75
+ * @throws ApiError
76
+ */
77
+ reply(reportId, requestBody) {
78
+ return this.httpRequest.request({
79
+ method: 'POST',
80
+ url: '/reports/{reportId}/reply',
81
+ path: {
82
+ 'reportId': reportId,
83
+ },
84
+ body: requestBody,
85
+ mediaType: 'application/json',
86
+ });
87
+ }
88
+ /**
89
+ * @param reportId
90
+ * @param requestBody
91
+ * @returns any Ok
92
+ * @throws ApiError
93
+ */
94
+ status(reportId, requestBody) {
95
+ return this.httpRequest.request({
96
+ method: 'PATCH',
97
+ url: '/reports/{reportId}/status',
98
+ path: {
99
+ 'reportId': reportId,
100
+ },
101
+ body: requestBody,
102
+ mediaType: 'application/json',
103
+ });
104
+ }
105
+ }
106
+ exports.ReportsService = ReportsService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thomas-labs/scrape-service-lib",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",