@thomas-labs/scrape-service-lib 1.1.5 → 1.1.7
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.js +1 -1
- package/dist/core/OpenAPI.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/models/UpdateAiKeyDto.d.ts +5 -0
- package/dist/models/UpdateAiKeyDto.js +2 -0
- package/dist/models/UpdateCollectionDto.d.ts +3 -0
- package/dist/models/UpdateCollectionDto.js +2 -0
- package/dist/models/UpdateTelegramBotConfigDto.d.ts +6 -0
- package/dist/models/UpdateTelegramBotConfigDto.js +2 -0
- package/dist/services/AiService.d.ts +34 -0
- package/dist/services/AiService.js +67 -0
- package/dist/services/CollectionsService.d.ts +27 -8
- package/dist/services/CollectionsService.js +57 -2
- package/dist/services/TelegramService.d.ts +34 -0
- package/dist/services/TelegramService.js +67 -0
- 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.
|
|
19
|
+
VERSION: config?.VERSION ?? '1.0.8',
|
|
20
20
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
21
21
|
CREDENTIALS: config?.CREDENTIALS ?? 'include',
|
|
22
22
|
TOKEN: config?.TOKEN,
|
package/dist/core/OpenAPI.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,9 @@ export type { TelegramMessage } from './models/TelegramMessage';
|
|
|
32
32
|
export type { TelegramMessageEntity } from './models/TelegramMessageEntity';
|
|
33
33
|
export type { TelegramUpdate } from './models/TelegramUpdate';
|
|
34
34
|
export type { TelegramUser } from './models/TelegramUser';
|
|
35
|
+
export type { UpdateAiKeyDto } from './models/UpdateAiKeyDto';
|
|
36
|
+
export type { UpdateCollectionDto } from './models/UpdateCollectionDto';
|
|
37
|
+
export type { UpdateTelegramBotConfigDto } from './models/UpdateTelegramBotConfigDto';
|
|
35
38
|
export type { UpsertAiKeyDto } from './models/UpsertAiKeyDto';
|
|
36
39
|
export type { UpsertTelegramBotConfigDto } from './models/UpsertTelegramBotConfigDto';
|
|
37
40
|
export { AiService } from './services/AiService';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EnrichTermsDto } from '../models/EnrichTermsDto';
|
|
2
|
+
import type { UpdateAiKeyDto } from '../models/UpdateAiKeyDto';
|
|
2
3
|
import type { UpsertAiKeyDto } from '../models/UpsertAiKeyDto';
|
|
3
4
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
5
|
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
@@ -24,4 +25,37 @@ export declare class AiService {
|
|
|
24
25
|
* @throws ApiError
|
|
25
26
|
*/
|
|
26
27
|
upsertKey(requestBody: UpsertAiKeyDto): CancelablePromise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* @param page
|
|
30
|
+
* @param limit
|
|
31
|
+
* @param search
|
|
32
|
+
* @param cursorId
|
|
33
|
+
* @param take
|
|
34
|
+
* @returns any Ok
|
|
35
|
+
* @throws ApiError
|
|
36
|
+
*/
|
|
37
|
+
listKeys(page?: number, limit?: number, search?: string, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
38
|
+
/**
|
|
39
|
+
* @param keyId
|
|
40
|
+
* @returns any Ok
|
|
41
|
+
* @throws ApiError
|
|
42
|
+
*/
|
|
43
|
+
getKey(keyId: string): CancelablePromise<any>;
|
|
44
|
+
/**
|
|
45
|
+
* @param keyId
|
|
46
|
+
* @param requestBody
|
|
47
|
+
* @returns any Ok
|
|
48
|
+
* @throws ApiError
|
|
49
|
+
*/
|
|
50
|
+
updateKey(keyId: string, requestBody: UpdateAiKeyDto): CancelablePromise<{
|
|
51
|
+
ok: boolean;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* @param keyId
|
|
55
|
+
* @returns any Ok
|
|
56
|
+
* @throws ApiError
|
|
57
|
+
*/
|
|
58
|
+
deleteKey(keyId: string): CancelablePromise<{
|
|
59
|
+
ok: boolean;
|
|
60
|
+
}>;
|
|
27
61
|
}
|
|
@@ -31,5 +31,72 @@ class AiService {
|
|
|
31
31
|
mediaType: 'application/json',
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @param page
|
|
36
|
+
* @param limit
|
|
37
|
+
* @param search
|
|
38
|
+
* @param cursorId
|
|
39
|
+
* @param take
|
|
40
|
+
* @returns any Ok
|
|
41
|
+
* @throws ApiError
|
|
42
|
+
*/
|
|
43
|
+
listKeys(page, limit, search, cursorId, take) {
|
|
44
|
+
return this.httpRequest.request({
|
|
45
|
+
method: 'GET',
|
|
46
|
+
url: '/ai/keys',
|
|
47
|
+
query: {
|
|
48
|
+
'page': page,
|
|
49
|
+
'limit': limit,
|
|
50
|
+
'search': search,
|
|
51
|
+
'cursorId': cursorId,
|
|
52
|
+
'take': take,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @param keyId
|
|
58
|
+
* @returns any Ok
|
|
59
|
+
* @throws ApiError
|
|
60
|
+
*/
|
|
61
|
+
getKey(keyId) {
|
|
62
|
+
return this.httpRequest.request({
|
|
63
|
+
method: 'GET',
|
|
64
|
+
url: '/ai/keys/{keyId}',
|
|
65
|
+
path: {
|
|
66
|
+
'keyId': keyId,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* @param keyId
|
|
72
|
+
* @param requestBody
|
|
73
|
+
* @returns any Ok
|
|
74
|
+
* @throws ApiError
|
|
75
|
+
*/
|
|
76
|
+
updateKey(keyId, requestBody) {
|
|
77
|
+
return this.httpRequest.request({
|
|
78
|
+
method: 'PATCH',
|
|
79
|
+
url: '/ai/keys/{keyId}',
|
|
80
|
+
path: {
|
|
81
|
+
'keyId': keyId,
|
|
82
|
+
},
|
|
83
|
+
body: requestBody,
|
|
84
|
+
mediaType: 'application/json',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @param keyId
|
|
89
|
+
* @returns any Ok
|
|
90
|
+
* @throws ApiError
|
|
91
|
+
*/
|
|
92
|
+
deleteKey(keyId) {
|
|
93
|
+
return this.httpRequest.request({
|
|
94
|
+
method: 'DELETE',
|
|
95
|
+
url: '/ai/keys/{keyId}',
|
|
96
|
+
path: {
|
|
97
|
+
'keyId': keyId,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
34
101
|
}
|
|
35
102
|
exports.AiService = AiService;
|
|
@@ -2,6 +2,7 @@ import type { CreateCollectionDto } from '../models/CreateCollectionDto';
|
|
|
2
2
|
import type { CreateCollectionJsonDto } from '../models/CreateCollectionJsonDto';
|
|
3
3
|
import type { StartCollectionDto } from '../models/StartCollectionDto';
|
|
4
4
|
import type { StopCollectionDto } from '../models/StopCollectionDto';
|
|
5
|
+
import type { UpdateCollectionDto } from '../models/UpdateCollectionDto';
|
|
5
6
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
6
7
|
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
7
8
|
export declare class CollectionsService {
|
|
@@ -20,10 +21,15 @@ export declare class CollectionsService {
|
|
|
20
21
|
id: any;
|
|
21
22
|
}>;
|
|
22
23
|
/**
|
|
24
|
+
* @param page
|
|
25
|
+
* @param limit
|
|
26
|
+
* @param search
|
|
27
|
+
* @param cursorId
|
|
28
|
+
* @param take
|
|
23
29
|
* @returns any Ok
|
|
24
30
|
* @throws ApiError
|
|
25
31
|
*/
|
|
26
|
-
list(): CancelablePromise<any>;
|
|
32
|
+
list(page?: number, limit?: number, search?: string, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
27
33
|
/**
|
|
28
34
|
* @param requestBody
|
|
29
35
|
* @returns any Ok
|
|
@@ -56,15 +62,28 @@ export declare class CollectionsService {
|
|
|
56
62
|
}>;
|
|
57
63
|
/**
|
|
58
64
|
* @param collectionId
|
|
65
|
+
* @param page
|
|
66
|
+
* @param limit
|
|
67
|
+
* @param search
|
|
68
|
+
* @param cursorId
|
|
69
|
+
* @param take
|
|
59
70
|
* @returns any Ok
|
|
60
71
|
* @throws ApiError
|
|
61
72
|
*/
|
|
62
|
-
detail(collectionId: string): CancelablePromise<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
detail(collectionId: string, page?: number, limit?: number, search?: string, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
74
|
+
/**
|
|
75
|
+
* @param collectionId
|
|
76
|
+
* @param requestBody
|
|
77
|
+
* @returns any Ok
|
|
78
|
+
* @throws ApiError
|
|
79
|
+
*/
|
|
80
|
+
update(collectionId: string, requestBody: UpdateCollectionDto): CancelablePromise<{
|
|
81
|
+
ok: boolean;
|
|
69
82
|
}>;
|
|
83
|
+
/**
|
|
84
|
+
* @param collectionId
|
|
85
|
+
* @returns any Ok
|
|
86
|
+
* @throws ApiError
|
|
87
|
+
*/
|
|
88
|
+
remove(collectionId: string): CancelablePromise<any>;
|
|
70
89
|
}
|
|
@@ -19,13 +19,25 @@ class CollectionsService {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
+
* @param page
|
|
23
|
+
* @param limit
|
|
24
|
+
* @param search
|
|
25
|
+
* @param cursorId
|
|
26
|
+
* @param take
|
|
22
27
|
* @returns any Ok
|
|
23
28
|
* @throws ApiError
|
|
24
29
|
*/
|
|
25
|
-
list() {
|
|
30
|
+
list(page, limit, search, cursorId, take) {
|
|
26
31
|
return this.httpRequest.request({
|
|
27
32
|
method: 'GET',
|
|
28
33
|
url: '/collections',
|
|
34
|
+
query: {
|
|
35
|
+
'page': page,
|
|
36
|
+
'limit': limit,
|
|
37
|
+
'search': search,
|
|
38
|
+
'cursorId': cursorId,
|
|
39
|
+
'take': take,
|
|
40
|
+
},
|
|
29
41
|
});
|
|
30
42
|
}
|
|
31
43
|
/**
|
|
@@ -69,16 +81,59 @@ class CollectionsService {
|
|
|
69
81
|
}
|
|
70
82
|
/**
|
|
71
83
|
* @param collectionId
|
|
84
|
+
* @param page
|
|
85
|
+
* @param limit
|
|
86
|
+
* @param search
|
|
87
|
+
* @param cursorId
|
|
88
|
+
* @param take
|
|
72
89
|
* @returns any Ok
|
|
73
90
|
* @throws ApiError
|
|
74
91
|
*/
|
|
75
|
-
detail(collectionId) {
|
|
92
|
+
detail(collectionId, page, limit, search, cursorId, take) {
|
|
76
93
|
return this.httpRequest.request({
|
|
77
94
|
method: 'GET',
|
|
78
95
|
url: '/collections/{collectionId}',
|
|
79
96
|
path: {
|
|
80
97
|
'collectionId': collectionId,
|
|
81
98
|
},
|
|
99
|
+
query: {
|
|
100
|
+
'page': page,
|
|
101
|
+
'limit': limit,
|
|
102
|
+
'search': search,
|
|
103
|
+
'cursorId': cursorId,
|
|
104
|
+
'take': take,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @param collectionId
|
|
110
|
+
* @param requestBody
|
|
111
|
+
* @returns any Ok
|
|
112
|
+
* @throws ApiError
|
|
113
|
+
*/
|
|
114
|
+
update(collectionId, requestBody) {
|
|
115
|
+
return this.httpRequest.request({
|
|
116
|
+
method: 'PATCH',
|
|
117
|
+
url: '/collections/{collectionId}',
|
|
118
|
+
path: {
|
|
119
|
+
'collectionId': collectionId,
|
|
120
|
+
},
|
|
121
|
+
body: requestBody,
|
|
122
|
+
mediaType: 'application/json',
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* @param collectionId
|
|
127
|
+
* @returns any Ok
|
|
128
|
+
* @throws ApiError
|
|
129
|
+
*/
|
|
130
|
+
remove(collectionId) {
|
|
131
|
+
return this.httpRequest.request({
|
|
132
|
+
method: 'DELETE',
|
|
133
|
+
url: '/collections/{collectionId}',
|
|
134
|
+
path: {
|
|
135
|
+
'collectionId': collectionId,
|
|
136
|
+
},
|
|
82
137
|
});
|
|
83
138
|
}
|
|
84
139
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TelegramUpdate } from '../models/TelegramUpdate';
|
|
2
|
+
import type { UpdateTelegramBotConfigDto } from '../models/UpdateTelegramBotConfigDto';
|
|
2
3
|
import type { UpsertTelegramBotConfigDto } from '../models/UpsertTelegramBotConfigDto';
|
|
3
4
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
5
|
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
@@ -20,6 +21,39 @@ export declare class TelegramService {
|
|
|
20
21
|
* @throws ApiError
|
|
21
22
|
*/
|
|
22
23
|
upsertBotConfig(requestBody: UpsertTelegramBotConfigDto): CancelablePromise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* @param page
|
|
26
|
+
* @param limit
|
|
27
|
+
* @param search
|
|
28
|
+
* @param cursorId
|
|
29
|
+
* @param take
|
|
30
|
+
* @returns any Ok
|
|
31
|
+
* @throws ApiError
|
|
32
|
+
*/
|
|
33
|
+
listBotConfigs(page?: number, limit?: number, search?: string, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
34
|
+
/**
|
|
35
|
+
* @param configId
|
|
36
|
+
* @returns any Ok
|
|
37
|
+
* @throws ApiError
|
|
38
|
+
*/
|
|
39
|
+
getBotConfig(configId: string): CancelablePromise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* @param configId
|
|
42
|
+
* @param requestBody
|
|
43
|
+
* @returns any Ok
|
|
44
|
+
* @throws ApiError
|
|
45
|
+
*/
|
|
46
|
+
updateBotConfig(configId: string, requestBody: UpdateTelegramBotConfigDto): CancelablePromise<{
|
|
47
|
+
ok: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* @param configId
|
|
51
|
+
* @returns any Ok
|
|
52
|
+
* @throws ApiError
|
|
53
|
+
*/
|
|
54
|
+
deleteBotConfig(configId: string): CancelablePromise<{
|
|
55
|
+
ok: boolean;
|
|
56
|
+
}>;
|
|
23
57
|
/**
|
|
24
58
|
* @returns any Ok
|
|
25
59
|
* @throws ApiError
|
|
@@ -35,6 +35,73 @@ class TelegramService {
|
|
|
35
35
|
mediaType: 'application/json',
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @param page
|
|
40
|
+
* @param limit
|
|
41
|
+
* @param search
|
|
42
|
+
* @param cursorId
|
|
43
|
+
* @param take
|
|
44
|
+
* @returns any Ok
|
|
45
|
+
* @throws ApiError
|
|
46
|
+
*/
|
|
47
|
+
listBotConfigs(page, limit, search, cursorId, take) {
|
|
48
|
+
return this.httpRequest.request({
|
|
49
|
+
method: 'GET',
|
|
50
|
+
url: '/telegram/bot-configs',
|
|
51
|
+
query: {
|
|
52
|
+
'page': page,
|
|
53
|
+
'limit': limit,
|
|
54
|
+
'search': search,
|
|
55
|
+
'cursorId': cursorId,
|
|
56
|
+
'take': take,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @param configId
|
|
62
|
+
* @returns any Ok
|
|
63
|
+
* @throws ApiError
|
|
64
|
+
*/
|
|
65
|
+
getBotConfig(configId) {
|
|
66
|
+
return this.httpRequest.request({
|
|
67
|
+
method: 'GET',
|
|
68
|
+
url: '/telegram/bot-configs/{configId}',
|
|
69
|
+
path: {
|
|
70
|
+
'configId': configId,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* @param configId
|
|
76
|
+
* @param requestBody
|
|
77
|
+
* @returns any Ok
|
|
78
|
+
* @throws ApiError
|
|
79
|
+
*/
|
|
80
|
+
updateBotConfig(configId, requestBody) {
|
|
81
|
+
return this.httpRequest.request({
|
|
82
|
+
method: 'PATCH',
|
|
83
|
+
url: '/telegram/bot-configs/{configId}',
|
|
84
|
+
path: {
|
|
85
|
+
'configId': configId,
|
|
86
|
+
},
|
|
87
|
+
body: requestBody,
|
|
88
|
+
mediaType: 'application/json',
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @param configId
|
|
93
|
+
* @returns any Ok
|
|
94
|
+
* @throws ApiError
|
|
95
|
+
*/
|
|
96
|
+
deleteBotConfig(configId) {
|
|
97
|
+
return this.httpRequest.request({
|
|
98
|
+
method: 'DELETE',
|
|
99
|
+
url: '/telegram/bot-configs/{configId}',
|
|
100
|
+
path: {
|
|
101
|
+
'configId': configId,
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
}
|
|
38
105
|
/**
|
|
39
106
|
* @returns any Ok
|
|
40
107
|
* @throws ApiError
|