@thomas-labs/scrape-service-lib 1.1.46 → 1.1.48
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/AppClient.d.ts +2 -0
- package/dist/AppClient.js +3 -1
- package/dist/core/OpenAPI.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -1
- package/dist/models/CreateCollectionTemplateDto.d.ts +7 -0
- package/dist/models/CreateCollectionTemplateDto.js +2 -0
- package/dist/models/UpdateCollectionTemplateDto.d.ts +7 -0
- package/dist/models/UpdateCollectionTemplateDto.js +2 -0
- package/dist/services/CollectionTemplatesService.d.ts +83 -0
- package/dist/services/CollectionTemplatesService.js +139 -0
- package/dist/services/TermsService.d.ts +22 -0
- package/dist/services/TermsService.js +38 -0
- package/package.json +1 -1
package/dist/AppClient.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { AiService } from './services/AiService';
|
|
|
4
4
|
import { AuthService } from './services/AuthService';
|
|
5
5
|
import { ClientService } from './services/ClientService';
|
|
6
6
|
import { CollectionsService } from './services/CollectionsService';
|
|
7
|
+
import { CollectionTemplatesService } from './services/CollectionTemplatesService';
|
|
7
8
|
import { CollectionTestService } from './services/CollectionTestService';
|
|
8
9
|
import { DefaultService } from './services/DefaultService';
|
|
9
10
|
import { ReportsService } from './services/ReportsService';
|
|
@@ -20,6 +21,7 @@ export declare class AppClient {
|
|
|
20
21
|
readonly auth: AuthService;
|
|
21
22
|
readonly client: ClientService;
|
|
22
23
|
readonly collections: CollectionsService;
|
|
24
|
+
readonly collectionTemplates: CollectionTemplatesService;
|
|
23
25
|
readonly collectionTest: CollectionTestService;
|
|
24
26
|
readonly default: DefaultService;
|
|
25
27
|
readonly reports: ReportsService;
|
package/dist/AppClient.js
CHANGED
|
@@ -6,6 +6,7 @@ const AiService_1 = require("./services/AiService");
|
|
|
6
6
|
const AuthService_1 = require("./services/AuthService");
|
|
7
7
|
const ClientService_1 = require("./services/ClientService");
|
|
8
8
|
const CollectionsService_1 = require("./services/CollectionsService");
|
|
9
|
+
const CollectionTemplatesService_1 = require("./services/CollectionTemplatesService");
|
|
9
10
|
const CollectionTestService_1 = require("./services/CollectionTestService");
|
|
10
11
|
const DefaultService_1 = require("./services/DefaultService");
|
|
11
12
|
const ReportsService_1 = require("./services/ReportsService");
|
|
@@ -20,7 +21,7 @@ class AppClient {
|
|
|
20
21
|
constructor(config, HttpRequest = FetchHttpRequest_1.FetchHttpRequest) {
|
|
21
22
|
this.request = new HttpRequest({
|
|
22
23
|
BASE: config?.BASE ?? '/api',
|
|
23
|
-
VERSION: config?.VERSION ?? '1.0.
|
|
24
|
+
VERSION: config?.VERSION ?? '1.0.55',
|
|
24
25
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
25
26
|
CREDENTIALS: config?.CREDENTIALS ?? 'include',
|
|
26
27
|
TOKEN: config?.TOKEN,
|
|
@@ -33,6 +34,7 @@ class AppClient {
|
|
|
33
34
|
this.auth = new AuthService_1.AuthService(this.request);
|
|
34
35
|
this.client = new ClientService_1.ClientService(this.request);
|
|
35
36
|
this.collections = new CollectionsService_1.CollectionsService(this.request);
|
|
37
|
+
this.collectionTemplates = new CollectionTemplatesService_1.CollectionTemplatesService(this.request);
|
|
36
38
|
this.collectionTest = new CollectionTestService_1.CollectionTestService(this.request);
|
|
37
39
|
this.default = new DefaultService_1.DefaultService(this.request);
|
|
38
40
|
this.reports = new ReportsService_1.ReportsService(this.request);
|
package/dist/core/OpenAPI.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { CollectionTestPartDto } from './models/CollectionTestPartDto';
|
|
|
10
10
|
export { CollectionTestSessionStatusDto } from './models/CollectionTestSessionStatusDto';
|
|
11
11
|
export type { CreateCollectionDto } from './models/CreateCollectionDto';
|
|
12
12
|
export type { CreateCollectionJsonDto } from './models/CreateCollectionJsonDto';
|
|
13
|
+
export type { CreateCollectionTemplateDto } from './models/CreateCollectionTemplateDto';
|
|
13
14
|
export type { CreateCollectionTestSessionDto } from './models/CreateCollectionTestSessionDto';
|
|
14
15
|
export type { CreateReportDto } from './models/CreateReportDto';
|
|
15
16
|
export type { CreateTermImportRequestDto } from './models/CreateTermImportRequestDto';
|
|
@@ -52,6 +53,7 @@ export { TaskRequestStatusDto } from './models/TaskRequestStatusDto';
|
|
|
52
53
|
export { TaskRequestTypeDto } from './models/TaskRequestTypeDto';
|
|
53
54
|
export type { UpdateAiKeyDto } from './models/UpdateAiKeyDto';
|
|
54
55
|
export type { UpdateCollectionDto } from './models/UpdateCollectionDto';
|
|
56
|
+
export type { UpdateCollectionTemplateDto } from './models/UpdateCollectionTemplateDto';
|
|
55
57
|
export type { UpdateReportStatusDto } from './models/UpdateReportStatusDto';
|
|
56
58
|
export type { UpdateTaskRequestStatusDto } from './models/UpdateTaskRequestStatusDto';
|
|
57
59
|
export type { UpdateTelegramBotConfigDto } from './models/UpdateTelegramBotConfigDto';
|
|
@@ -63,6 +65,7 @@ export { AiService } from './services/AiService';
|
|
|
63
65
|
export { AuthService } from './services/AuthService';
|
|
64
66
|
export { ClientService } from './services/ClientService';
|
|
65
67
|
export { CollectionsService } from './services/CollectionsService';
|
|
68
|
+
export { CollectionTemplatesService } from './services/CollectionTemplatesService';
|
|
66
69
|
export { CollectionTestService } from './services/CollectionTestService';
|
|
67
70
|
export { DefaultService } from './services/DefaultService';
|
|
68
71
|
export { ReportsService } from './services/ReportsService';
|
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.ReportsService = exports.DefaultService = exports.CollectionTestService = exports.CollectionsService = exports.ClientService = exports.AuthService = exports.AiService = 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.GenerateImportPromptDto = exports.CollectionTestSessionStatusDto = exports.CollectionTestPartDto = 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.CollectionTestService = exports.CollectionTemplatesService = exports.CollectionsService = exports.ClientService = exports.AuthService = exports.AiService = 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.GenerateImportPromptDto = exports.CollectionTestSessionStatusDto = exports.CollectionTestPartDto = 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 */
|
|
@@ -56,6 +56,8 @@ var ClientService_1 = require("./services/ClientService");
|
|
|
56
56
|
Object.defineProperty(exports, "ClientService", { enumerable: true, get: function () { return ClientService_1.ClientService; } });
|
|
57
57
|
var CollectionsService_1 = require("./services/CollectionsService");
|
|
58
58
|
Object.defineProperty(exports, "CollectionsService", { enumerable: true, get: function () { return CollectionsService_1.CollectionsService; } });
|
|
59
|
+
var CollectionTemplatesService_1 = require("./services/CollectionTemplatesService");
|
|
60
|
+
Object.defineProperty(exports, "CollectionTemplatesService", { enumerable: true, get: function () { return CollectionTemplatesService_1.CollectionTemplatesService; } });
|
|
59
61
|
var CollectionTestService_1 = require("./services/CollectionTestService");
|
|
60
62
|
Object.defineProperty(exports, "CollectionTestService", { enumerable: true, get: function () { return CollectionTestService_1.CollectionTestService; } });
|
|
61
63
|
var DefaultService_1 = require("./services/DefaultService");
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { CreateCollectionTemplateDto } from '../models/CreateCollectionTemplateDto';
|
|
2
|
+
import type { UpdateCollectionTemplateDto } from '../models/UpdateCollectionTemplateDto';
|
|
3
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
5
|
+
export declare class CollectionTemplatesService {
|
|
6
|
+
readonly httpRequest: BaseHttpRequest;
|
|
7
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
8
|
+
/**
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns any Ok
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
adminCreate(requestBody: CreateCollectionTemplateDto): CancelablePromise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* @param page
|
|
16
|
+
* @param limit
|
|
17
|
+
* @param search
|
|
18
|
+
* @param isPublished
|
|
19
|
+
* @param cursorId
|
|
20
|
+
* @param take
|
|
21
|
+
* @returns any Ok
|
|
22
|
+
* @throws ApiError
|
|
23
|
+
*/
|
|
24
|
+
adminList(page?: number, limit?: number, search?: string, isPublished?: boolean, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* @param templateId
|
|
27
|
+
* @param requestBody
|
|
28
|
+
* @returns any Ok
|
|
29
|
+
* @throws ApiError
|
|
30
|
+
*/
|
|
31
|
+
adminUpdate(templateId: string, requestBody: UpdateCollectionTemplateDto): CancelablePromise<{
|
|
32
|
+
importCount: any;
|
|
33
|
+
termCount: any;
|
|
34
|
+
createdById: any;
|
|
35
|
+
isPublished: any;
|
|
36
|
+
coverImageUrl: any;
|
|
37
|
+
description: any;
|
|
38
|
+
name: any;
|
|
39
|
+
id: any;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* @param templateId
|
|
43
|
+
* @returns any Ok
|
|
44
|
+
* @throws ApiError
|
|
45
|
+
*/
|
|
46
|
+
adminDelete(templateId: string): CancelablePromise<{
|
|
47
|
+
ok: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* @param page
|
|
51
|
+
* @param limit
|
|
52
|
+
* @param search
|
|
53
|
+
* @param cursorId
|
|
54
|
+
* @param take
|
|
55
|
+
* @returns any Ok
|
|
56
|
+
* @throws ApiError
|
|
57
|
+
*/
|
|
58
|
+
list(page?: number, limit?: number, search?: string, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
59
|
+
/**
|
|
60
|
+
* @param templateId
|
|
61
|
+
* @param page
|
|
62
|
+
* @param limit
|
|
63
|
+
* @param termSearch
|
|
64
|
+
* @param cursorId
|
|
65
|
+
* @param take
|
|
66
|
+
* @returns any Ok
|
|
67
|
+
* @throws ApiError
|
|
68
|
+
*/
|
|
69
|
+
detail(templateId: string, page?: number, limit?: number, termSearch?: string, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
70
|
+
/**
|
|
71
|
+
* @param templateId
|
|
72
|
+
* @returns any Ok
|
|
73
|
+
* @throws ApiError
|
|
74
|
+
*/
|
|
75
|
+
importTemplate(templateId: string): CancelablePromise<{
|
|
76
|
+
createdUserTerms: any;
|
|
77
|
+
linkedTerms: any;
|
|
78
|
+
createdCollection: any;
|
|
79
|
+
collectionId: any;
|
|
80
|
+
templateId: string;
|
|
81
|
+
ok: boolean;
|
|
82
|
+
}>;
|
|
83
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollectionTemplatesService = void 0;
|
|
4
|
+
class CollectionTemplatesService {
|
|
5
|
+
constructor(httpRequest) {
|
|
6
|
+
this.httpRequest = httpRequest;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns any Ok
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
adminCreate(requestBody) {
|
|
14
|
+
return this.httpRequest.request({
|
|
15
|
+
method: 'POST',
|
|
16
|
+
url: '/collection-templates/admin',
|
|
17
|
+
body: requestBody,
|
|
18
|
+
mediaType: 'application/json',
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @param page
|
|
23
|
+
* @param limit
|
|
24
|
+
* @param search
|
|
25
|
+
* @param isPublished
|
|
26
|
+
* @param cursorId
|
|
27
|
+
* @param take
|
|
28
|
+
* @returns any Ok
|
|
29
|
+
* @throws ApiError
|
|
30
|
+
*/
|
|
31
|
+
adminList(page, limit, search, isPublished, cursorId, take) {
|
|
32
|
+
return this.httpRequest.request({
|
|
33
|
+
method: 'GET',
|
|
34
|
+
url: '/collection-templates/admin',
|
|
35
|
+
query: {
|
|
36
|
+
'page': page,
|
|
37
|
+
'limit': limit,
|
|
38
|
+
'search': search,
|
|
39
|
+
'isPublished': isPublished,
|
|
40
|
+
'cursorId': cursorId,
|
|
41
|
+
'take': take,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @param templateId
|
|
47
|
+
* @param requestBody
|
|
48
|
+
* @returns any Ok
|
|
49
|
+
* @throws ApiError
|
|
50
|
+
*/
|
|
51
|
+
adminUpdate(templateId, requestBody) {
|
|
52
|
+
return this.httpRequest.request({
|
|
53
|
+
method: 'PATCH',
|
|
54
|
+
url: '/collection-templates/admin/{templateId}',
|
|
55
|
+
path: {
|
|
56
|
+
'templateId': templateId,
|
|
57
|
+
},
|
|
58
|
+
body: requestBody,
|
|
59
|
+
mediaType: 'application/json',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @param templateId
|
|
64
|
+
* @returns any Ok
|
|
65
|
+
* @throws ApiError
|
|
66
|
+
*/
|
|
67
|
+
adminDelete(templateId) {
|
|
68
|
+
return this.httpRequest.request({
|
|
69
|
+
method: 'DELETE',
|
|
70
|
+
url: '/collection-templates/admin/{templateId}',
|
|
71
|
+
path: {
|
|
72
|
+
'templateId': templateId,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @param page
|
|
78
|
+
* @param limit
|
|
79
|
+
* @param search
|
|
80
|
+
* @param cursorId
|
|
81
|
+
* @param take
|
|
82
|
+
* @returns any Ok
|
|
83
|
+
* @throws ApiError
|
|
84
|
+
*/
|
|
85
|
+
list(page, limit, search, cursorId, take) {
|
|
86
|
+
return this.httpRequest.request({
|
|
87
|
+
method: 'GET',
|
|
88
|
+
url: '/collection-templates',
|
|
89
|
+
query: {
|
|
90
|
+
'page': page,
|
|
91
|
+
'limit': limit,
|
|
92
|
+
'search': search,
|
|
93
|
+
'cursorId': cursorId,
|
|
94
|
+
'take': take,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @param templateId
|
|
100
|
+
* @param page
|
|
101
|
+
* @param limit
|
|
102
|
+
* @param termSearch
|
|
103
|
+
* @param cursorId
|
|
104
|
+
* @param take
|
|
105
|
+
* @returns any Ok
|
|
106
|
+
* @throws ApiError
|
|
107
|
+
*/
|
|
108
|
+
detail(templateId, page, limit, termSearch, cursorId, take) {
|
|
109
|
+
return this.httpRequest.request({
|
|
110
|
+
method: 'GET',
|
|
111
|
+
url: '/collection-templates/{templateId}',
|
|
112
|
+
path: {
|
|
113
|
+
'templateId': templateId,
|
|
114
|
+
},
|
|
115
|
+
query: {
|
|
116
|
+
'page': page,
|
|
117
|
+
'limit': limit,
|
|
118
|
+
'termSearch': termSearch,
|
|
119
|
+
'cursorId': cursorId,
|
|
120
|
+
'take': take,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @param templateId
|
|
126
|
+
* @returns any Ok
|
|
127
|
+
* @throws ApiError
|
|
128
|
+
*/
|
|
129
|
+
importTemplate(templateId) {
|
|
130
|
+
return this.httpRequest.request({
|
|
131
|
+
method: 'POST',
|
|
132
|
+
url: '/collection-templates/{templateId}/import',
|
|
133
|
+
path: {
|
|
134
|
+
'templateId': templateId,
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.CollectionTemplatesService = CollectionTemplatesService;
|
|
@@ -57,6 +57,17 @@ export declare class TermsService {
|
|
|
57
57
|
* @throws ApiError
|
|
58
58
|
*/
|
|
59
59
|
list(search?: string, status?: 'PENDING_ENRICH' | 'READY' | 'FAILED', page?: number, limit?: number, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
60
|
+
/**
|
|
61
|
+
* @param search
|
|
62
|
+
* @param status
|
|
63
|
+
* @param page
|
|
64
|
+
* @param limit
|
|
65
|
+
* @param cursorId
|
|
66
|
+
* @param take
|
|
67
|
+
* @returns any Ok
|
|
68
|
+
* @throws ApiError
|
|
69
|
+
*/
|
|
70
|
+
adminList(search?: string, status?: 'PENDING_ENRICH' | 'READY' | 'FAILED', page?: number, limit?: number, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
60
71
|
/**
|
|
61
72
|
* @param termId
|
|
62
73
|
* @returns any Ok
|
|
@@ -71,6 +82,17 @@ export declare class TermsService {
|
|
|
71
82
|
delete(termId: string): CancelablePromise<{
|
|
72
83
|
ok: boolean;
|
|
73
84
|
}>;
|
|
85
|
+
/**
|
|
86
|
+
* @param termId
|
|
87
|
+
* @returns any Ok
|
|
88
|
+
* @throws ApiError
|
|
89
|
+
*/
|
|
90
|
+
adminDelete(termId: string): CancelablePromise<{
|
|
91
|
+
affectedCollections: number;
|
|
92
|
+
affectedUsers: number;
|
|
93
|
+
termId: string;
|
|
94
|
+
ok: boolean;
|
|
95
|
+
}>;
|
|
74
96
|
/**
|
|
75
97
|
* @param termId
|
|
76
98
|
* @param requestBody
|
|
@@ -68,6 +68,30 @@ class TermsService {
|
|
|
68
68
|
},
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* @param search
|
|
73
|
+
* @param status
|
|
74
|
+
* @param page
|
|
75
|
+
* @param limit
|
|
76
|
+
* @param cursorId
|
|
77
|
+
* @param take
|
|
78
|
+
* @returns any Ok
|
|
79
|
+
* @throws ApiError
|
|
80
|
+
*/
|
|
81
|
+
adminList(search, status, page, limit, cursorId, take) {
|
|
82
|
+
return this.httpRequest.request({
|
|
83
|
+
method: 'GET',
|
|
84
|
+
url: '/terms/admin',
|
|
85
|
+
query: {
|
|
86
|
+
'search': search,
|
|
87
|
+
'status': status,
|
|
88
|
+
'page': page,
|
|
89
|
+
'limit': limit,
|
|
90
|
+
'cursorId': cursorId,
|
|
91
|
+
'take': take,
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
}
|
|
71
95
|
/**
|
|
72
96
|
* @param termId
|
|
73
97
|
* @returns any Ok
|
|
@@ -96,6 +120,20 @@ class TermsService {
|
|
|
96
120
|
},
|
|
97
121
|
});
|
|
98
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* @param termId
|
|
125
|
+
* @returns any Ok
|
|
126
|
+
* @throws ApiError
|
|
127
|
+
*/
|
|
128
|
+
adminDelete(termId) {
|
|
129
|
+
return this.httpRequest.request({
|
|
130
|
+
method: 'DELETE',
|
|
131
|
+
url: '/terms/admin/{termId}',
|
|
132
|
+
path: {
|
|
133
|
+
'termId': termId,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
99
137
|
/**
|
|
100
138
|
* @param termId
|
|
101
139
|
* @param requestBody
|