@thomas-labs/scrape-service-lib 1.1.89 → 1.1.90
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 +1 -0
- package/dist/index.js +3 -1
- package/dist/models/AiKeyOwnerTypeDto.d.ts +5 -0
- package/dist/models/AiKeyOwnerTypeDto.js +13 -0
- package/dist/models/UpdateAiKeyDto.d.ts +2 -0
- package/dist/models/UpsertAiKeyDto.d.ts +2 -0
- package/dist/services/AiService.d.ts +31 -3
- package/dist/services/AiService.js +62 -3
- package/package.json +1 -1
package/dist/AppClient.js
CHANGED
|
@@ -22,7 +22,7 @@ class AppClient {
|
|
|
22
22
|
constructor(config, HttpRequest = FetchHttpRequest_1.FetchHttpRequest) {
|
|
23
23
|
this.request = new HttpRequest({
|
|
24
24
|
BASE: config?.BASE ?? '/api',
|
|
25
|
-
VERSION: config?.VERSION ?? '1.0.
|
|
25
|
+
VERSION: config?.VERSION ?? '1.0.101',
|
|
26
26
|
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
27
27
|
CREDENTIALS: config?.CREDENTIALS ?? 'include',
|
|
28
28
|
TOKEN: config?.TOKEN,
|
package/dist/core/OpenAPI.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|
|
5
5
|
export { OpenAPI } from './core/OpenAPI';
|
|
6
6
|
export type { OpenAPIConfig } from './core/OpenAPI';
|
|
7
7
|
export type { ActivateDto } from './models/ActivateDto';
|
|
8
|
+
export { AiKeyOwnerTypeDto } from './models/AiKeyOwnerTypeDto';
|
|
8
9
|
export { AiProviderDto } from './models/AiProviderDto';
|
|
9
10
|
export { CollectionTemplateQueueStatusDto } from './models/CollectionTemplateQueueStatusDto';
|
|
10
11
|
export type { CreateAdminNotificationDto } from './models/CreateAdminNotificationDto';
|
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.NotificationsService = exports.LearningService = exports.DefaultService = 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.NotificationBroadcastJobStatusDto = exports.GradeTypeDto = exports.GenerateImportPromptDto = exports.CollectionTemplateQueueStatusDto = 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.NotificationsService = exports.LearningService = exports.DefaultService = 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.NotificationBroadcastJobStatusDto = exports.GradeTypeDto = exports.GenerateImportPromptDto = exports.CollectionTemplateQueueStatusDto = exports.AiProviderDto = exports.AiKeyOwnerTypeDto = 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 */
|
|
@@ -16,6 +16,8 @@ Object.defineProperty(exports, "CancelablePromise", { enumerable: true, get: fun
|
|
|
16
16
|
Object.defineProperty(exports, "CancelError", { enumerable: true, get: function () { return CancelablePromise_1.CancelError; } });
|
|
17
17
|
var OpenAPI_1 = require("./core/OpenAPI");
|
|
18
18
|
Object.defineProperty(exports, "OpenAPI", { enumerable: true, get: function () { return OpenAPI_1.OpenAPI; } });
|
|
19
|
+
var AiKeyOwnerTypeDto_1 = require("./models/AiKeyOwnerTypeDto");
|
|
20
|
+
Object.defineProperty(exports, "AiKeyOwnerTypeDto", { enumerable: true, get: function () { return AiKeyOwnerTypeDto_1.AiKeyOwnerTypeDto; } });
|
|
19
21
|
var AiProviderDto_1 = require("./models/AiProviderDto");
|
|
20
22
|
Object.defineProperty(exports, "AiProviderDto", { enumerable: true, get: function () { return AiProviderDto_1.AiProviderDto; } });
|
|
21
23
|
var CollectionTemplateQueueStatusDto_1 = require("./models/CollectionTemplateQueueStatusDto");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AiKeyOwnerTypeDto = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var AiKeyOwnerTypeDto;
|
|
9
|
+
(function (AiKeyOwnerTypeDto) {
|
|
10
|
+
AiKeyOwnerTypeDto["USER"] = "USER";
|
|
11
|
+
AiKeyOwnerTypeDto["ADMIN"] = "ADMIN";
|
|
12
|
+
AiKeyOwnerTypeDto["SYSTEM"] = "SYSTEM";
|
|
13
|
+
})(AiKeyOwnerTypeDto || (exports.AiKeyOwnerTypeDto = AiKeyOwnerTypeDto = {}));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { AiKeyOwnerTypeDto } from './AiKeyOwnerTypeDto';
|
|
1
2
|
import type { AiProviderDto } from './AiProviderDto';
|
|
2
3
|
export type UpsertAiKeyDto = {
|
|
3
4
|
provider: AiProviderDto;
|
|
5
|
+
ownerType?: AiKeyOwnerTypeDto;
|
|
4
6
|
apiKey: string;
|
|
5
7
|
model: string;
|
|
6
8
|
isActive?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AiKeyOwnerTypeDto } from '../models/AiKeyOwnerTypeDto';
|
|
1
2
|
import type { EnrichTermsDto } from '../models/EnrichTermsDto';
|
|
2
3
|
import type { UpdateAiKeyDto } from '../models/UpdateAiKeyDto';
|
|
3
4
|
import type { UpsertAiKeyDto } from '../models/UpsertAiKeyDto';
|
|
@@ -70,16 +71,18 @@ export declare class AiService {
|
|
|
70
71
|
* @param search
|
|
71
72
|
* @param cursorId
|
|
72
73
|
* @param take
|
|
74
|
+
* @param ownerType
|
|
73
75
|
* @returns any Ok
|
|
74
76
|
* @throws ApiError
|
|
75
77
|
*/
|
|
76
|
-
adminListKeys(page?: number, limit?: number, search?: string, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
78
|
+
adminListKeys(page?: number, limit?: number, search?: string, cursorId?: string, take?: number, ownerType?: AiKeyOwnerTypeDto): CancelablePromise<any>;
|
|
77
79
|
/**
|
|
78
80
|
* @param keyId
|
|
81
|
+
* @param ownerType
|
|
79
82
|
* @returns any Ok
|
|
80
83
|
* @throws ApiError
|
|
81
84
|
*/
|
|
82
|
-
adminGetKey(keyId: string): CancelablePromise<any>;
|
|
85
|
+
adminGetKey(keyId: string, ownerType?: AiKeyOwnerTypeDto): CancelablePromise<any>;
|
|
83
86
|
/**
|
|
84
87
|
* @param keyId
|
|
85
88
|
* @param requestBody
|
|
@@ -91,10 +94,35 @@ export declare class AiService {
|
|
|
91
94
|
}>;
|
|
92
95
|
/**
|
|
93
96
|
* @param keyId
|
|
97
|
+
* @param ownerType
|
|
94
98
|
* @returns any Ok
|
|
95
99
|
* @throws ApiError
|
|
96
100
|
*/
|
|
97
|
-
adminDeleteKey(keyId: string): CancelablePromise<{
|
|
101
|
+
adminDeleteKey(keyId: string, ownerType?: AiKeyOwnerTypeDto): CancelablePromise<{
|
|
102
|
+
ok: boolean;
|
|
103
|
+
}>;
|
|
104
|
+
/**
|
|
105
|
+
* @param requestBody
|
|
106
|
+
* @returns any Ok
|
|
107
|
+
* @throws ApiError
|
|
108
|
+
*/
|
|
109
|
+
adminUpsertSystemKey(requestBody: UpsertAiKeyDto): CancelablePromise<any>;
|
|
110
|
+
/**
|
|
111
|
+
* @param page
|
|
112
|
+
* @param limit
|
|
113
|
+
* @param search
|
|
114
|
+
* @param cursorId
|
|
115
|
+
* @param take
|
|
116
|
+
* @returns any Ok
|
|
117
|
+
* @throws ApiError
|
|
118
|
+
*/
|
|
119
|
+
adminListSystemKeys(page?: number, limit?: number, search?: string, cursorId?: string, take?: number): CancelablePromise<any>;
|
|
120
|
+
/**
|
|
121
|
+
* @param keyId
|
|
122
|
+
* @returns any Ok
|
|
123
|
+
* @throws ApiError
|
|
124
|
+
*/
|
|
125
|
+
adminDeleteSystemKey(keyId: string): CancelablePromise<{
|
|
98
126
|
ok: boolean;
|
|
99
127
|
}>;
|
|
100
128
|
}
|
|
@@ -117,10 +117,11 @@ class AiService {
|
|
|
117
117
|
* @param search
|
|
118
118
|
* @param cursorId
|
|
119
119
|
* @param take
|
|
120
|
+
* @param ownerType
|
|
120
121
|
* @returns any Ok
|
|
121
122
|
* @throws ApiError
|
|
122
123
|
*/
|
|
123
|
-
adminListKeys(page, limit, search, cursorId, take) {
|
|
124
|
+
adminListKeys(page, limit, search, cursorId, take, ownerType) {
|
|
124
125
|
return this.httpRequest.request({
|
|
125
126
|
method: 'GET',
|
|
126
127
|
url: '/ai/admin/keys',
|
|
@@ -130,21 +131,26 @@ class AiService {
|
|
|
130
131
|
'search': search,
|
|
131
132
|
'cursorId': cursorId,
|
|
132
133
|
'take': take,
|
|
134
|
+
'ownerType': ownerType,
|
|
133
135
|
},
|
|
134
136
|
});
|
|
135
137
|
}
|
|
136
138
|
/**
|
|
137
139
|
* @param keyId
|
|
140
|
+
* @param ownerType
|
|
138
141
|
* @returns any Ok
|
|
139
142
|
* @throws ApiError
|
|
140
143
|
*/
|
|
141
|
-
adminGetKey(keyId) {
|
|
144
|
+
adminGetKey(keyId, ownerType) {
|
|
142
145
|
return this.httpRequest.request({
|
|
143
146
|
method: 'GET',
|
|
144
147
|
url: '/ai/admin/keys/{keyId}',
|
|
145
148
|
path: {
|
|
146
149
|
'keyId': keyId,
|
|
147
150
|
},
|
|
151
|
+
query: {
|
|
152
|
+
'ownerType': ownerType,
|
|
153
|
+
},
|
|
148
154
|
});
|
|
149
155
|
}
|
|
150
156
|
/**
|
|
@@ -166,16 +172,69 @@ class AiService {
|
|
|
166
172
|
}
|
|
167
173
|
/**
|
|
168
174
|
* @param keyId
|
|
175
|
+
* @param ownerType
|
|
169
176
|
* @returns any Ok
|
|
170
177
|
* @throws ApiError
|
|
171
178
|
*/
|
|
172
|
-
adminDeleteKey(keyId) {
|
|
179
|
+
adminDeleteKey(keyId, ownerType) {
|
|
173
180
|
return this.httpRequest.request({
|
|
174
181
|
method: 'DELETE',
|
|
175
182
|
url: '/ai/admin/keys/{keyId}',
|
|
176
183
|
path: {
|
|
177
184
|
'keyId': keyId,
|
|
178
185
|
},
|
|
186
|
+
query: {
|
|
187
|
+
'ownerType': ownerType,
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @param requestBody
|
|
193
|
+
* @returns any Ok
|
|
194
|
+
* @throws ApiError
|
|
195
|
+
*/
|
|
196
|
+
adminUpsertSystemKey(requestBody) {
|
|
197
|
+
return this.httpRequest.request({
|
|
198
|
+
method: 'POST',
|
|
199
|
+
url: '/ai/admin/system-key',
|
|
200
|
+
body: requestBody,
|
|
201
|
+
mediaType: 'application/json',
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* @param page
|
|
206
|
+
* @param limit
|
|
207
|
+
* @param search
|
|
208
|
+
* @param cursorId
|
|
209
|
+
* @param take
|
|
210
|
+
* @returns any Ok
|
|
211
|
+
* @throws ApiError
|
|
212
|
+
*/
|
|
213
|
+
adminListSystemKeys(page, limit, search, cursorId, take) {
|
|
214
|
+
return this.httpRequest.request({
|
|
215
|
+
method: 'GET',
|
|
216
|
+
url: '/ai/admin/system-keys',
|
|
217
|
+
query: {
|
|
218
|
+
'page': page,
|
|
219
|
+
'limit': limit,
|
|
220
|
+
'search': search,
|
|
221
|
+
'cursorId': cursorId,
|
|
222
|
+
'take': take,
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* @param keyId
|
|
228
|
+
* @returns any Ok
|
|
229
|
+
* @throws ApiError
|
|
230
|
+
*/
|
|
231
|
+
adminDeleteSystemKey(keyId) {
|
|
232
|
+
return this.httpRequest.request({
|
|
233
|
+
method: 'DELETE',
|
|
234
|
+
url: '/ai/admin/system-keys/{keyId}',
|
|
235
|
+
path: {
|
|
236
|
+
'keyId': keyId,
|
|
237
|
+
},
|
|
179
238
|
});
|
|
180
239
|
}
|
|
181
240
|
}
|