@wildix/wim-knowledge-base-client 0.0.51 → 0.0.53
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-cjs/models/models_0.js +1 -5
- package/dist-cjs/protocols/Aws_restJson1.js +66 -31
- package/dist-es/models/models_0.js +0 -4
- package/dist-es/protocols/Aws_restJson1.js +67 -32
- package/dist-types/commands/GenerateSearchAnswerCommand.d.ts +4 -0
- package/dist-types/commands/GetDataSourceSyncStatusCommand.d.ts +3 -3
- package/dist-types/commands/GetDocumentCommand.d.ts +0 -10
- package/dist-types/commands/GetDocumentDownloadUrlCommand.d.ts +0 -1
- package/dist-types/commands/GetDocumentWithContentAndChunksCommand.d.ts +1 -1
- package/dist-types/commands/ListDocumentsCommand.d.ts +3 -1
- package/dist-types/commands/ListSearchQueriesHistoryCommand.d.ts +89 -1
- package/dist-types/commands/SearchKnowledgeBaseCommand.d.ts +3 -2
- package/dist-types/models/models_0.d.ts +93 -41
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchThresholdValue = exports.SearchStrategy = exports.SyncLogLevel = exports.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.
|
|
3
|
+
exports.SearchThresholdValue = exports.SearchStrategy = exports.SyncLogLevel = exports.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.DocumentStatus = exports.DataSourceType = exports.ScheduleConfiguration = exports.DataSourceConfig = exports.KnowledgeBaseNotFoundException = exports.DocumentNotFoundException = exports.DataSourceNotFoundException = exports.UnauthorizedException = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
4
4
|
const KnowledgeBaseServiceException_1 = require("./KnowledgeBaseServiceException");
|
|
5
5
|
class ValidationException extends KnowledgeBaseServiceException_1.KnowledgeBaseServiceException {
|
|
6
6
|
name = "ValidationException";
|
|
@@ -111,10 +111,6 @@ exports.DocumentStatus = {
|
|
|
111
111
|
PENDING: "pending",
|
|
112
112
|
PROCESSING: "processing",
|
|
113
113
|
};
|
|
114
|
-
exports.DownloadDocumentType = {
|
|
115
|
-
MARKDOWN: "markdown",
|
|
116
|
-
ORIGINAL: "original",
|
|
117
|
-
};
|
|
118
114
|
exports.SyncDataSourceMode = {
|
|
119
115
|
FULL: "full",
|
|
120
116
|
INCREMENTAL: "incremental",
|
|
@@ -10,7 +10,7 @@ const smithy_client_1 = require("@smithy/smithy-client");
|
|
|
10
10
|
const se_CleanDataSourceCommand = async (input, context) => {
|
|
11
11
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
12
12
|
const headers = {};
|
|
13
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/clean");
|
|
13
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/clean");
|
|
14
14
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
15
15
|
const query = (0, smithy_client_1.map)({
|
|
16
16
|
[_c]: [, input[_cI]],
|
|
@@ -26,7 +26,7 @@ exports.se_CleanDataSourceCommand = se_CleanDataSourceCommand;
|
|
|
26
26
|
const se_CloneDataSourceCommand = async (input, context) => {
|
|
27
27
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
28
28
|
const headers = {};
|
|
29
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/clone");
|
|
29
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/clone");
|
|
30
30
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
31
31
|
const query = (0, smithy_client_1.map)({
|
|
32
32
|
[_c]: [, input[_cI]],
|
|
@@ -44,7 +44,7 @@ const se_ConfigureDataSourceCommand = async (input, context) => {
|
|
|
44
44
|
const headers = {
|
|
45
45
|
'content-type': 'application/json',
|
|
46
46
|
};
|
|
47
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/configure");
|
|
47
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/configure");
|
|
48
48
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
49
49
|
const query = (0, smithy_client_1.map)({
|
|
50
50
|
[_c]: [, input[_cI]],
|
|
@@ -66,7 +66,7 @@ const se_CreateDataSourceCommand = async (input, context) => {
|
|
|
66
66
|
const headers = {
|
|
67
67
|
'content-type': 'application/json',
|
|
68
68
|
};
|
|
69
|
-
b.bp("/api/v1/data-sources");
|
|
69
|
+
b.bp("/api/v1/knowledge-bases/data-sources");
|
|
70
70
|
const query = (0, smithy_client_1.map)({
|
|
71
71
|
[_c]: [, input[_cI]],
|
|
72
72
|
});
|
|
@@ -88,7 +88,7 @@ const se_CreateDocumentCommand = async (input, context) => {
|
|
|
88
88
|
const headers = {
|
|
89
89
|
'content-type': 'application/json',
|
|
90
90
|
};
|
|
91
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents");
|
|
91
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents");
|
|
92
92
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
93
93
|
const query = (0, smithy_client_1.map)({
|
|
94
94
|
[_c]: [, input[_cI]],
|
|
@@ -135,7 +135,7 @@ exports.se_CreateKnowledgeBaseCommand = se_CreateKnowledgeBaseCommand;
|
|
|
135
135
|
const se_DeleteDataSourceCommand = async (input, context) => {
|
|
136
136
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
137
137
|
const headers = {};
|
|
138
|
-
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
138
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}");
|
|
139
139
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
140
140
|
const query = (0, smithy_client_1.map)({
|
|
141
141
|
[_c]: [, input[_cI]],
|
|
@@ -151,7 +151,7 @@ exports.se_DeleteDataSourceCommand = se_DeleteDataSourceCommand;
|
|
|
151
151
|
const se_DeleteDocumentCommand = async (input, context) => {
|
|
152
152
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
153
153
|
const headers = {};
|
|
154
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
154
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}");
|
|
155
155
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
156
156
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
157
157
|
const query = (0, smithy_client_1.map)({
|
|
@@ -186,7 +186,7 @@ const se_DescribeDataSourceCommand = async (input, context) => {
|
|
|
186
186
|
const headers = {
|
|
187
187
|
'content-type': 'application/json',
|
|
188
188
|
};
|
|
189
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/describe");
|
|
189
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/describe");
|
|
190
190
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
191
191
|
const query = (0, smithy_client_1.map)({
|
|
192
192
|
[_c]: [, input[_cI]],
|
|
@@ -230,7 +230,7 @@ exports.se_GenerateSearchAnswerCommand = se_GenerateSearchAnswerCommand;
|
|
|
230
230
|
const se_GetDataSourceCommand = async (input, context) => {
|
|
231
231
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
232
232
|
const headers = {};
|
|
233
|
-
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
233
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}");
|
|
234
234
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
235
235
|
const query = (0, smithy_client_1.map)({
|
|
236
236
|
[_c]: [, input[_cI]],
|
|
@@ -246,7 +246,7 @@ exports.se_GetDataSourceCommand = se_GetDataSourceCommand;
|
|
|
246
246
|
const se_GetDataSourceSyncStatusCommand = async (input, context) => {
|
|
247
247
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
248
248
|
const headers = {};
|
|
249
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/sync-status");
|
|
249
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/sync-status");
|
|
250
250
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
251
251
|
const query = (0, smithy_client_1.map)({
|
|
252
252
|
[_c]: [, input[_cI]],
|
|
@@ -262,12 +262,11 @@ exports.se_GetDataSourceSyncStatusCommand = se_GetDataSourceSyncStatusCommand;
|
|
|
262
262
|
const se_GetDocumentCommand = async (input, context) => {
|
|
263
263
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
264
264
|
const headers = {};
|
|
265
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
265
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}");
|
|
266
266
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
267
267
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
268
268
|
const query = (0, smithy_client_1.map)({
|
|
269
269
|
[_c]: [, input[_cI]],
|
|
270
|
-
[_wC]: [() => input.withChunks !== void 0, () => (input[_wC].toString())],
|
|
271
270
|
});
|
|
272
271
|
let body;
|
|
273
272
|
b.m("GET")
|
|
@@ -280,7 +279,7 @@ exports.se_GetDocumentCommand = se_GetDocumentCommand;
|
|
|
280
279
|
const se_GetDocumentChunksCommand = async (input, context) => {
|
|
281
280
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
282
281
|
const headers = {};
|
|
283
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/chunks");
|
|
282
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/chunks");
|
|
284
283
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
285
284
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
286
285
|
const query = (0, smithy_client_1.map)({
|
|
@@ -297,12 +296,11 @@ exports.se_GetDocumentChunksCommand = se_GetDocumentChunksCommand;
|
|
|
297
296
|
const se_GetDocumentDownloadUrlCommand = async (input, context) => {
|
|
298
297
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
299
298
|
const headers = {};
|
|
300
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/
|
|
299
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/download-url");
|
|
301
300
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
302
301
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
303
302
|
const query = (0, smithy_client_1.map)({
|
|
304
303
|
[_c]: [, input[_cI]],
|
|
305
|
-
[_dT]: [, input[_dT]],
|
|
306
304
|
});
|
|
307
305
|
let body;
|
|
308
306
|
b.m("GET")
|
|
@@ -315,7 +313,7 @@ exports.se_GetDocumentDownloadUrlCommand = se_GetDocumentDownloadUrlCommand;
|
|
|
315
313
|
const se_GetDocumentMarkdownCommand = async (input, context) => {
|
|
316
314
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
317
315
|
const headers = {};
|
|
318
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/markdown");
|
|
316
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/markdown");
|
|
319
317
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
320
318
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
321
319
|
const query = (0, smithy_client_1.map)({
|
|
@@ -332,7 +330,7 @@ exports.se_GetDocumentMarkdownCommand = se_GetDocumentMarkdownCommand;
|
|
|
332
330
|
const se_GetDocumentUploadUrlCommand = async (input, context) => {
|
|
333
331
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
334
332
|
const headers = {};
|
|
335
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/
|
|
333
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/upload-url");
|
|
336
334
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
337
335
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
338
336
|
const query = (0, smithy_client_1.map)({
|
|
@@ -349,7 +347,7 @@ exports.se_GetDocumentUploadUrlCommand = se_GetDocumentUploadUrlCommand;
|
|
|
349
347
|
const se_GetDocumentWithContentAndChunksCommand = async (input, context) => {
|
|
350
348
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
351
349
|
const headers = {};
|
|
352
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/with-content-and-chunks");
|
|
350
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/with-content-and-chunks");
|
|
353
351
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
354
352
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
355
353
|
const query = (0, smithy_client_1.map)({
|
|
@@ -382,7 +380,7 @@ exports.se_GetKnowledgeBaseCommand = se_GetKnowledgeBaseCommand;
|
|
|
382
380
|
const se_ListDataSourcesCommand = async (input, context) => {
|
|
383
381
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
384
382
|
const headers = {};
|
|
385
|
-
b.bp("/api/v1/data-sources");
|
|
383
|
+
b.bp("/api/v1/knowledge-bases/data-sources");
|
|
386
384
|
const query = (0, smithy_client_1.map)({
|
|
387
385
|
[_c]: [, input[_cI]],
|
|
388
386
|
});
|
|
@@ -397,7 +395,7 @@ exports.se_ListDataSourcesCommand = se_ListDataSourcesCommand;
|
|
|
397
395
|
const se_ListDataSourceStatisticsCommand = async (input, context) => {
|
|
398
396
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
399
397
|
const headers = {};
|
|
400
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/statistics");
|
|
398
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/statistics");
|
|
401
399
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
402
400
|
const query = (0, smithy_client_1.map)({
|
|
403
401
|
[_c]: [, input[_cI]],
|
|
@@ -413,7 +411,7 @@ exports.se_ListDataSourceStatisticsCommand = se_ListDataSourceStatisticsCommand;
|
|
|
413
411
|
const se_ListDataSourceSynchronizationLogsCommand = async (input, context) => {
|
|
414
412
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
415
413
|
const headers = {};
|
|
416
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/sync-logs");
|
|
414
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/sync-logs");
|
|
417
415
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
418
416
|
const query = (0, smithy_client_1.map)({
|
|
419
417
|
[_c]: [, input[_cI]],
|
|
@@ -434,12 +432,14 @@ exports.se_ListDataSourceSynchronizationLogsCommand = se_ListDataSourceSynchroni
|
|
|
434
432
|
const se_ListDocumentsCommand = async (input, context) => {
|
|
435
433
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
436
434
|
const headers = {};
|
|
437
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents");
|
|
435
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents");
|
|
438
436
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
439
437
|
const query = (0, smithy_client_1.map)({
|
|
440
438
|
[_c]: [, input[_cI]],
|
|
441
439
|
[_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
|
|
442
440
|
[_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
|
|
441
|
+
[_s]: [, input[_s]],
|
|
442
|
+
[_se]: [, input[_se]],
|
|
443
443
|
});
|
|
444
444
|
let body;
|
|
445
445
|
b.m("GET")
|
|
@@ -469,7 +469,7 @@ const se_ListSearchQueriesHistoryCommand = async (input, context) => {
|
|
|
469
469
|
const headers = {
|
|
470
470
|
'content-type': 'application/json',
|
|
471
471
|
};
|
|
472
|
-
b.bp("/api/v1/history/search-queries");
|
|
472
|
+
b.bp("/api/v1/knowledge-bases/history/search-queries");
|
|
473
473
|
const query = (0, smithy_client_1.map)({
|
|
474
474
|
[_c]: [, input[_cI]],
|
|
475
475
|
[_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
|
|
@@ -518,7 +518,7 @@ exports.se_SearchKnowledgeBaseCommand = se_SearchKnowledgeBaseCommand;
|
|
|
518
518
|
const se_StartSyncDataSourceCommand = async (input, context) => {
|
|
519
519
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
520
520
|
const headers = {};
|
|
521
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/start-sync");
|
|
521
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/start-sync");
|
|
522
522
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
523
523
|
const query = (0, smithy_client_1.map)({
|
|
524
524
|
[_c]: [, input[_cI]],
|
|
@@ -535,7 +535,7 @@ exports.se_StartSyncDataSourceCommand = se_StartSyncDataSourceCommand;
|
|
|
535
535
|
const se_StopSyncDataSourceCommand = async (input, context) => {
|
|
536
536
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
537
537
|
const headers = {};
|
|
538
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/stop-sync");
|
|
538
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/stop-sync");
|
|
539
539
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
540
540
|
const query = (0, smithy_client_1.map)({
|
|
541
541
|
[_c]: [, input[_cI]],
|
|
@@ -553,7 +553,7 @@ const se_UpdateDataSourceCommand = async (input, context) => {
|
|
|
553
553
|
const headers = {
|
|
554
554
|
'content-type': 'application/json',
|
|
555
555
|
};
|
|
556
|
-
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
556
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}");
|
|
557
557
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
558
558
|
const query = (0, smithy_client_1.map)({
|
|
559
559
|
[_c]: [, input[_cI]],
|
|
@@ -575,7 +575,7 @@ const se_UpdateDocumentCommand = async (input, context) => {
|
|
|
575
575
|
const headers = {
|
|
576
576
|
'content-type': 'application/json',
|
|
577
577
|
};
|
|
578
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
578
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}");
|
|
579
579
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
580
580
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
581
581
|
const query = (0, smithy_client_1.map)({
|
|
@@ -813,7 +813,6 @@ const de_GetDocumentCommand = async (output, context) => {
|
|
|
813
813
|
});
|
|
814
814
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
815
815
|
const doc = (0, smithy_client_1.take)(data, {
|
|
816
|
-
'chunks': smithy_client_1._json,
|
|
817
816
|
'document': smithy_client_1._json,
|
|
818
817
|
});
|
|
819
818
|
Object.assign(contents, doc);
|
|
@@ -1227,7 +1226,9 @@ const se_SearchKnowledgeBaseResult = (input, context) => {
|
|
|
1227
1226
|
'documentId': [],
|
|
1228
1227
|
'documentTitle': [],
|
|
1229
1228
|
'documentUrl': [],
|
|
1229
|
+
'fullTextScore': smithy_client_1.serializeFloat,
|
|
1230
1230
|
'score': smithy_client_1.serializeFloat,
|
|
1231
|
+
'semanticScore': smithy_client_1.serializeFloat,
|
|
1231
1232
|
});
|
|
1232
1233
|
};
|
|
1233
1234
|
const se_SearchKnowledgeBaseResults = (input, context) => {
|
|
@@ -1283,9 +1284,43 @@ const de_DescribeDataSourceResult = (output, context) => {
|
|
|
1283
1284
|
'proxy': (_) => de_Document(_, context),
|
|
1284
1285
|
});
|
|
1285
1286
|
};
|
|
1287
|
+
const de_SearchHistoryRequest = (output, context) => {
|
|
1288
|
+
return (0, smithy_client_1.take)(output, {
|
|
1289
|
+
'externalSessionId': smithy_client_1.expectString,
|
|
1290
|
+
'knowledgeBaseId': smithy_client_1.expectString,
|
|
1291
|
+
'query': smithy_client_1.expectString,
|
|
1292
|
+
'searchLimit': smithy_client_1.expectInt32,
|
|
1293
|
+
'searchStrategy': smithy_client_1.expectString,
|
|
1294
|
+
'searchThreshold': smithy_client_1.limitedParseDouble,
|
|
1295
|
+
'user': smithy_client_1.expectString,
|
|
1296
|
+
});
|
|
1297
|
+
};
|
|
1298
|
+
const de_SearchHistoryResponse = (output, context) => {
|
|
1299
|
+
return (0, smithy_client_1.take)(output, {
|
|
1300
|
+
'results': (_) => de_SearchHistorySearchResults(_, context),
|
|
1301
|
+
});
|
|
1302
|
+
};
|
|
1303
|
+
const de_SearchHistoryResultItem = (output, context) => {
|
|
1304
|
+
return (0, smithy_client_1.take)(output, {
|
|
1305
|
+
'companyId': smithy_client_1.expectString,
|
|
1306
|
+
'createdAt': (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1307
|
+
'request': (_) => de_SearchHistoryRequest(_, context),
|
|
1308
|
+
'response': (_) => de_SearchHistoryResponse(_, context),
|
|
1309
|
+
'resultsCount': smithy_client_1.expectInt32,
|
|
1310
|
+
'sessionId': smithy_client_1.expectString,
|
|
1311
|
+
'stages': smithy_client_1._json,
|
|
1312
|
+
'totalDuration': smithy_client_1.expectInt32,
|
|
1313
|
+
});
|
|
1314
|
+
};
|
|
1286
1315
|
const de_SearchHistoryResultsList = (output, context) => {
|
|
1287
1316
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1288
|
-
return
|
|
1317
|
+
return de_SearchHistoryResultItem(entry, context);
|
|
1318
|
+
});
|
|
1319
|
+
return retVal;
|
|
1320
|
+
};
|
|
1321
|
+
const de_SearchHistorySearchResults = (output, context) => {
|
|
1322
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1323
|
+
return de_SearchHistoryResultItem(entry, context);
|
|
1289
1324
|
});
|
|
1290
1325
|
return retVal;
|
|
1291
1326
|
};
|
|
@@ -1298,7 +1333,9 @@ const de_SearchKnowledgeBaseResult = (output, context) => {
|
|
|
1298
1333
|
'documentId': smithy_client_1.expectString,
|
|
1299
1334
|
'documentTitle': smithy_client_1.expectString,
|
|
1300
1335
|
'documentUrl': smithy_client_1.expectString,
|
|
1336
|
+
'fullTextScore': smithy_client_1.limitedParseDouble,
|
|
1301
1337
|
'score': smithy_client_1.limitedParseDouble,
|
|
1338
|
+
'semanticScore': smithy_client_1.limitedParseDouble,
|
|
1302
1339
|
});
|
|
1303
1340
|
};
|
|
1304
1341
|
const de_SearchKnowledgeBaseResults = (output, context) => {
|
|
@@ -1316,11 +1353,9 @@ const deserializeMetadata = (output) => ({
|
|
|
1316
1353
|
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
|
|
1317
1354
|
const _c = "company";
|
|
1318
1355
|
const _cI = "companyId";
|
|
1319
|
-
const _dT = "documentType";
|
|
1320
1356
|
const _l = "limit";
|
|
1321
1357
|
const _lL = "logLevel";
|
|
1322
1358
|
const _o = "offset";
|
|
1323
1359
|
const _s = "sort";
|
|
1324
1360
|
const _sT = "syncType";
|
|
1325
1361
|
const _se = "search";
|
|
1326
|
-
const _wC = "withChunks";
|
|
@@ -102,10 +102,6 @@ export const DocumentStatus = {
|
|
|
102
102
|
PENDING: "pending",
|
|
103
103
|
PROCESSING: "processing",
|
|
104
104
|
};
|
|
105
|
-
export const DownloadDocumentType = {
|
|
106
|
-
MARKDOWN: "markdown",
|
|
107
|
-
ORIGINAL: "original",
|
|
108
|
-
};
|
|
109
105
|
export const SyncDataSourceMode = {
|
|
110
106
|
FULL: "full",
|
|
111
107
|
INCREMENTAL: "incremental",
|
|
@@ -2,11 +2,11 @@ import { KnowledgeBaseServiceException as __BaseException } from "../models/Know
|
|
|
2
2
|
import { DataSourceConfig, DataSourceNotFoundException, DocumentNotFoundException, ForbiddenException, KnowledgeBaseNotFoundException, UnauthorizedException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
6
|
export const se_CleanDataSourceCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {};
|
|
9
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/clean");
|
|
9
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/clean");
|
|
10
10
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
11
11
|
const query = map({
|
|
12
12
|
[_c]: [, input[_cI]],
|
|
@@ -21,7 +21,7 @@ export const se_CleanDataSourceCommand = async (input, context) => {
|
|
|
21
21
|
export const se_CloneDataSourceCommand = async (input, context) => {
|
|
22
22
|
const b = rb(input, context);
|
|
23
23
|
const headers = {};
|
|
24
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/clone");
|
|
24
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/clone");
|
|
25
25
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
26
26
|
const query = map({
|
|
27
27
|
[_c]: [, input[_cI]],
|
|
@@ -38,7 +38,7 @@ export const se_ConfigureDataSourceCommand = async (input, context) => {
|
|
|
38
38
|
const headers = {
|
|
39
39
|
'content-type': 'application/json',
|
|
40
40
|
};
|
|
41
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/configure");
|
|
41
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/configure");
|
|
42
42
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
43
43
|
const query = map({
|
|
44
44
|
[_c]: [, input[_cI]],
|
|
@@ -59,7 +59,7 @@ export const se_CreateDataSourceCommand = async (input, context) => {
|
|
|
59
59
|
const headers = {
|
|
60
60
|
'content-type': 'application/json',
|
|
61
61
|
};
|
|
62
|
-
b.bp("/api/v1/data-sources");
|
|
62
|
+
b.bp("/api/v1/knowledge-bases/data-sources");
|
|
63
63
|
const query = map({
|
|
64
64
|
[_c]: [, input[_cI]],
|
|
65
65
|
});
|
|
@@ -80,7 +80,7 @@ export const se_CreateDocumentCommand = async (input, context) => {
|
|
|
80
80
|
const headers = {
|
|
81
81
|
'content-type': 'application/json',
|
|
82
82
|
};
|
|
83
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents");
|
|
83
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents");
|
|
84
84
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
85
85
|
const query = map({
|
|
86
86
|
[_c]: [, input[_cI]],
|
|
@@ -125,7 +125,7 @@ export const se_CreateKnowledgeBaseCommand = async (input, context) => {
|
|
|
125
125
|
export const se_DeleteDataSourceCommand = async (input, context) => {
|
|
126
126
|
const b = rb(input, context);
|
|
127
127
|
const headers = {};
|
|
128
|
-
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
128
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}");
|
|
129
129
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
130
130
|
const query = map({
|
|
131
131
|
[_c]: [, input[_cI]],
|
|
@@ -140,7 +140,7 @@ export const se_DeleteDataSourceCommand = async (input, context) => {
|
|
|
140
140
|
export const se_DeleteDocumentCommand = async (input, context) => {
|
|
141
141
|
const b = rb(input, context);
|
|
142
142
|
const headers = {};
|
|
143
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
143
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}");
|
|
144
144
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
145
145
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
146
146
|
const query = map({
|
|
@@ -173,7 +173,7 @@ export const se_DescribeDataSourceCommand = async (input, context) => {
|
|
|
173
173
|
const headers = {
|
|
174
174
|
'content-type': 'application/json',
|
|
175
175
|
};
|
|
176
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/describe");
|
|
176
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/describe");
|
|
177
177
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
178
178
|
const query = map({
|
|
179
179
|
[_c]: [, input[_cI]],
|
|
@@ -215,7 +215,7 @@ export const se_GenerateSearchAnswerCommand = async (input, context) => {
|
|
|
215
215
|
export const se_GetDataSourceCommand = async (input, context) => {
|
|
216
216
|
const b = rb(input, context);
|
|
217
217
|
const headers = {};
|
|
218
|
-
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
218
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}");
|
|
219
219
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
220
220
|
const query = map({
|
|
221
221
|
[_c]: [, input[_cI]],
|
|
@@ -230,7 +230,7 @@ export const se_GetDataSourceCommand = async (input, context) => {
|
|
|
230
230
|
export const se_GetDataSourceSyncStatusCommand = async (input, context) => {
|
|
231
231
|
const b = rb(input, context);
|
|
232
232
|
const headers = {};
|
|
233
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/sync-status");
|
|
233
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/sync-status");
|
|
234
234
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
235
235
|
const query = map({
|
|
236
236
|
[_c]: [, input[_cI]],
|
|
@@ -245,12 +245,11 @@ export const se_GetDataSourceSyncStatusCommand = async (input, context) => {
|
|
|
245
245
|
export const se_GetDocumentCommand = async (input, context) => {
|
|
246
246
|
const b = rb(input, context);
|
|
247
247
|
const headers = {};
|
|
248
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
248
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}");
|
|
249
249
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
250
250
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
251
251
|
const query = map({
|
|
252
252
|
[_c]: [, input[_cI]],
|
|
253
|
-
[_wC]: [() => input.withChunks !== void 0, () => (input[_wC].toString())],
|
|
254
253
|
});
|
|
255
254
|
let body;
|
|
256
255
|
b.m("GET")
|
|
@@ -262,7 +261,7 @@ export const se_GetDocumentCommand = async (input, context) => {
|
|
|
262
261
|
export const se_GetDocumentChunksCommand = async (input, context) => {
|
|
263
262
|
const b = rb(input, context);
|
|
264
263
|
const headers = {};
|
|
265
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/chunks");
|
|
264
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/chunks");
|
|
266
265
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
267
266
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
268
267
|
const query = map({
|
|
@@ -278,12 +277,11 @@ export const se_GetDocumentChunksCommand = async (input, context) => {
|
|
|
278
277
|
export const se_GetDocumentDownloadUrlCommand = async (input, context) => {
|
|
279
278
|
const b = rb(input, context);
|
|
280
279
|
const headers = {};
|
|
281
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/
|
|
280
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/download-url");
|
|
282
281
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
283
282
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
284
283
|
const query = map({
|
|
285
284
|
[_c]: [, input[_cI]],
|
|
286
|
-
[_dT]: [, input[_dT]],
|
|
287
285
|
});
|
|
288
286
|
let body;
|
|
289
287
|
b.m("GET")
|
|
@@ -295,7 +293,7 @@ export const se_GetDocumentDownloadUrlCommand = async (input, context) => {
|
|
|
295
293
|
export const se_GetDocumentMarkdownCommand = async (input, context) => {
|
|
296
294
|
const b = rb(input, context);
|
|
297
295
|
const headers = {};
|
|
298
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/markdown");
|
|
296
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/markdown");
|
|
299
297
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
300
298
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
301
299
|
const query = map({
|
|
@@ -311,7 +309,7 @@ export const se_GetDocumentMarkdownCommand = async (input, context) => {
|
|
|
311
309
|
export const se_GetDocumentUploadUrlCommand = async (input, context) => {
|
|
312
310
|
const b = rb(input, context);
|
|
313
311
|
const headers = {};
|
|
314
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/
|
|
312
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/upload-url");
|
|
315
313
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
316
314
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
317
315
|
const query = map({
|
|
@@ -327,7 +325,7 @@ export const se_GetDocumentUploadUrlCommand = async (input, context) => {
|
|
|
327
325
|
export const se_GetDocumentWithContentAndChunksCommand = async (input, context) => {
|
|
328
326
|
const b = rb(input, context);
|
|
329
327
|
const headers = {};
|
|
330
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}/with-content-and-chunks");
|
|
328
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}/with-content-and-chunks");
|
|
331
329
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
332
330
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
333
331
|
const query = map({
|
|
@@ -358,7 +356,7 @@ export const se_GetKnowledgeBaseCommand = async (input, context) => {
|
|
|
358
356
|
export const se_ListDataSourcesCommand = async (input, context) => {
|
|
359
357
|
const b = rb(input, context);
|
|
360
358
|
const headers = {};
|
|
361
|
-
b.bp("/api/v1/data-sources");
|
|
359
|
+
b.bp("/api/v1/knowledge-bases/data-sources");
|
|
362
360
|
const query = map({
|
|
363
361
|
[_c]: [, input[_cI]],
|
|
364
362
|
});
|
|
@@ -372,7 +370,7 @@ export const se_ListDataSourcesCommand = async (input, context) => {
|
|
|
372
370
|
export const se_ListDataSourceStatisticsCommand = async (input, context) => {
|
|
373
371
|
const b = rb(input, context);
|
|
374
372
|
const headers = {};
|
|
375
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/statistics");
|
|
373
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/statistics");
|
|
376
374
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
377
375
|
const query = map({
|
|
378
376
|
[_c]: [, input[_cI]],
|
|
@@ -387,7 +385,7 @@ export const se_ListDataSourceStatisticsCommand = async (input, context) => {
|
|
|
387
385
|
export const se_ListDataSourceSynchronizationLogsCommand = async (input, context) => {
|
|
388
386
|
const b = rb(input, context);
|
|
389
387
|
const headers = {};
|
|
390
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/sync-logs");
|
|
388
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/sync-logs");
|
|
391
389
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
392
390
|
const query = map({
|
|
393
391
|
[_c]: [, input[_cI]],
|
|
@@ -407,12 +405,14 @@ export const se_ListDataSourceSynchronizationLogsCommand = async (input, context
|
|
|
407
405
|
export const se_ListDocumentsCommand = async (input, context) => {
|
|
408
406
|
const b = rb(input, context);
|
|
409
407
|
const headers = {};
|
|
410
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents");
|
|
408
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents");
|
|
411
409
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
412
410
|
const query = map({
|
|
413
411
|
[_c]: [, input[_cI]],
|
|
414
412
|
[_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
|
|
415
413
|
[_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
|
|
414
|
+
[_s]: [, input[_s]],
|
|
415
|
+
[_se]: [, input[_se]],
|
|
416
416
|
});
|
|
417
417
|
let body;
|
|
418
418
|
b.m("GET")
|
|
@@ -440,7 +440,7 @@ export const se_ListSearchQueriesHistoryCommand = async (input, context) => {
|
|
|
440
440
|
const headers = {
|
|
441
441
|
'content-type': 'application/json',
|
|
442
442
|
};
|
|
443
|
-
b.bp("/api/v1/history/search-queries");
|
|
443
|
+
b.bp("/api/v1/knowledge-bases/history/search-queries");
|
|
444
444
|
const query = map({
|
|
445
445
|
[_c]: [, input[_cI]],
|
|
446
446
|
[_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
|
|
@@ -487,7 +487,7 @@ export const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
|
487
487
|
export const se_StartSyncDataSourceCommand = async (input, context) => {
|
|
488
488
|
const b = rb(input, context);
|
|
489
489
|
const headers = {};
|
|
490
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/start-sync");
|
|
490
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/start-sync");
|
|
491
491
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
492
492
|
const query = map({
|
|
493
493
|
[_c]: [, input[_cI]],
|
|
@@ -503,7 +503,7 @@ export const se_StartSyncDataSourceCommand = async (input, context) => {
|
|
|
503
503
|
export const se_StopSyncDataSourceCommand = async (input, context) => {
|
|
504
504
|
const b = rb(input, context);
|
|
505
505
|
const headers = {};
|
|
506
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/stop-sync");
|
|
506
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/stop-sync");
|
|
507
507
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
508
508
|
const query = map({
|
|
509
509
|
[_c]: [, input[_cI]],
|
|
@@ -520,7 +520,7 @@ export const se_UpdateDataSourceCommand = async (input, context) => {
|
|
|
520
520
|
const headers = {
|
|
521
521
|
'content-type': 'application/json',
|
|
522
522
|
};
|
|
523
|
-
b.bp("/api/v1/data-sources/{dataSourceId}");
|
|
523
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}");
|
|
524
524
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
525
525
|
const query = map({
|
|
526
526
|
[_c]: [, input[_cI]],
|
|
@@ -541,7 +541,7 @@ export const se_UpdateDocumentCommand = async (input, context) => {
|
|
|
541
541
|
const headers = {
|
|
542
542
|
'content-type': 'application/json',
|
|
543
543
|
};
|
|
544
|
-
b.bp("/api/v1/data-sources/{dataSourceId}/documents/{documentId}");
|
|
544
|
+
b.bp("/api/v1/knowledge-bases/data-sources/{dataSourceId}/documents/{documentId}");
|
|
545
545
|
b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
|
|
546
546
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
547
547
|
const query = map({
|
|
@@ -764,7 +764,6 @@ export const de_GetDocumentCommand = async (output, context) => {
|
|
|
764
764
|
});
|
|
765
765
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
766
766
|
const doc = take(data, {
|
|
767
|
-
'chunks': _json,
|
|
768
767
|
'document': _json,
|
|
769
768
|
});
|
|
770
769
|
Object.assign(contents, doc);
|
|
@@ -1159,7 +1158,9 @@ const se_SearchKnowledgeBaseResult = (input, context) => {
|
|
|
1159
1158
|
'documentId': [],
|
|
1160
1159
|
'documentTitle': [],
|
|
1161
1160
|
'documentUrl': [],
|
|
1161
|
+
'fullTextScore': __serializeFloat,
|
|
1162
1162
|
'score': __serializeFloat,
|
|
1163
|
+
'semanticScore': __serializeFloat,
|
|
1163
1164
|
});
|
|
1164
1165
|
};
|
|
1165
1166
|
const se_SearchKnowledgeBaseResults = (input, context) => {
|
|
@@ -1215,9 +1216,43 @@ const de_DescribeDataSourceResult = (output, context) => {
|
|
|
1215
1216
|
'proxy': (_) => de_Document(_, context),
|
|
1216
1217
|
});
|
|
1217
1218
|
};
|
|
1219
|
+
const de_SearchHistoryRequest = (output, context) => {
|
|
1220
|
+
return take(output, {
|
|
1221
|
+
'externalSessionId': __expectString,
|
|
1222
|
+
'knowledgeBaseId': __expectString,
|
|
1223
|
+
'query': __expectString,
|
|
1224
|
+
'searchLimit': __expectInt32,
|
|
1225
|
+
'searchStrategy': __expectString,
|
|
1226
|
+
'searchThreshold': __limitedParseDouble,
|
|
1227
|
+
'user': __expectString,
|
|
1228
|
+
});
|
|
1229
|
+
};
|
|
1230
|
+
const de_SearchHistoryResponse = (output, context) => {
|
|
1231
|
+
return take(output, {
|
|
1232
|
+
'results': (_) => de_SearchHistorySearchResults(_, context),
|
|
1233
|
+
});
|
|
1234
|
+
};
|
|
1235
|
+
const de_SearchHistoryResultItem = (output, context) => {
|
|
1236
|
+
return take(output, {
|
|
1237
|
+
'companyId': __expectString,
|
|
1238
|
+
'createdAt': (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1239
|
+
'request': (_) => de_SearchHistoryRequest(_, context),
|
|
1240
|
+
'response': (_) => de_SearchHistoryResponse(_, context),
|
|
1241
|
+
'resultsCount': __expectInt32,
|
|
1242
|
+
'sessionId': __expectString,
|
|
1243
|
+
'stages': _json,
|
|
1244
|
+
'totalDuration': __expectInt32,
|
|
1245
|
+
});
|
|
1246
|
+
};
|
|
1218
1247
|
const de_SearchHistoryResultsList = (output, context) => {
|
|
1219
1248
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1220
|
-
return
|
|
1249
|
+
return de_SearchHistoryResultItem(entry, context);
|
|
1250
|
+
});
|
|
1251
|
+
return retVal;
|
|
1252
|
+
};
|
|
1253
|
+
const de_SearchHistorySearchResults = (output, context) => {
|
|
1254
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1255
|
+
return de_SearchHistoryResultItem(entry, context);
|
|
1221
1256
|
});
|
|
1222
1257
|
return retVal;
|
|
1223
1258
|
};
|
|
@@ -1230,7 +1265,9 @@ const de_SearchKnowledgeBaseResult = (output, context) => {
|
|
|
1230
1265
|
'documentId': __expectString,
|
|
1231
1266
|
'documentTitle': __expectString,
|
|
1232
1267
|
'documentUrl': __expectString,
|
|
1268
|
+
'fullTextScore': __limitedParseDouble,
|
|
1233
1269
|
'score': __limitedParseDouble,
|
|
1270
|
+
'semanticScore': __limitedParseDouble,
|
|
1234
1271
|
});
|
|
1235
1272
|
};
|
|
1236
1273
|
const de_SearchKnowledgeBaseResults = (output, context) => {
|
|
@@ -1248,11 +1285,9 @@ const deserializeMetadata = (output) => ({
|
|
|
1248
1285
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
|
|
1249
1286
|
const _c = "company";
|
|
1250
1287
|
const _cI = "companyId";
|
|
1251
|
-
const _dT = "documentType";
|
|
1252
1288
|
const _l = "limit";
|
|
1253
1289
|
const _lL = "logLevel";
|
|
1254
1290
|
const _o = "offset";
|
|
1255
1291
|
const _s = "sort";
|
|
1256
1292
|
const _sT = "syncType";
|
|
1257
1293
|
const _se = "search";
|
|
1258
|
-
const _wC = "withChunks";
|
|
@@ -46,6 +46,8 @@ declare const GenerateSearchAnswerCommand_base: {
|
|
|
46
46
|
* dataSourceType: "files" || "confluence" || "gdrive", // required
|
|
47
47
|
* content: "STRING_VALUE", // required
|
|
48
48
|
* score: Number("double"), // required
|
|
49
|
+
* fullTextScore: Number("double"),
|
|
50
|
+
* semanticScore: Number("double"),
|
|
49
51
|
* documentHierarchy: [ // StringList
|
|
50
52
|
* "STRING_VALUE",
|
|
51
53
|
* ],
|
|
@@ -75,6 +77,8 @@ declare const GenerateSearchAnswerCommand_base: {
|
|
|
75
77
|
* // dataSourceType: "files" || "confluence" || "gdrive", // required
|
|
76
78
|
* // content: "STRING_VALUE", // required
|
|
77
79
|
* // score: Number("double"), // required
|
|
80
|
+
* // fullTextScore: Number("double"),
|
|
81
|
+
* // semanticScore: Number("double"),
|
|
78
82
|
* // documentHierarchy: [ // StringList
|
|
79
83
|
* // "STRING_VALUE",
|
|
80
84
|
* // ],
|
|
@@ -42,9 +42,9 @@ declare const GetDataSourceSyncStatusCommand_base: {
|
|
|
42
42
|
* const response = await client.send(command);
|
|
43
43
|
* // { // GetDataSourceSyncStatusOutput
|
|
44
44
|
* // syncStatus: "idle" || "running" || "success" || "failed", // required
|
|
45
|
-
* // lastSyncedAt: "STRING_VALUE",
|
|
46
|
-
* // lastSyncMode: "full" || "incremental",
|
|
47
|
-
* // lastSyncErrorMessage: "STRING_VALUE",
|
|
45
|
+
* // lastSyncedAt: "STRING_VALUE",
|
|
46
|
+
* // lastSyncMode: "full" || "incremental",
|
|
47
|
+
* // lastSyncErrorMessage: "STRING_VALUE",
|
|
48
48
|
* // };
|
|
49
49
|
*
|
|
50
50
|
* ```
|
|
@@ -38,7 +38,6 @@ declare const GetDocumentCommand_base: {
|
|
|
38
38
|
* companyId: "STRING_VALUE",
|
|
39
39
|
* dataSourceId: "STRING_VALUE", // required
|
|
40
40
|
* documentId: "STRING_VALUE", // required
|
|
41
|
-
* withChunks: true || false,
|
|
42
41
|
* };
|
|
43
42
|
* const command = new GetDocumentCommand(input);
|
|
44
43
|
* const response = await client.send(command);
|
|
@@ -61,15 +60,6 @@ declare const GetDocumentCommand_base: {
|
|
|
61
60
|
* // processingDuration: Number("int"),
|
|
62
61
|
* // errorMessage: "STRING_VALUE",
|
|
63
62
|
* // },
|
|
64
|
-
* // chunks: [ // ChunksList
|
|
65
|
-
* // { // ChunkItem
|
|
66
|
-
* // id: "STRING_VALUE", // required
|
|
67
|
-
* // documentId: "STRING_VALUE", // required
|
|
68
|
-
* // content: "STRING_VALUE", // required
|
|
69
|
-
* // createdAt: "STRING_VALUE", // required
|
|
70
|
-
* // updatedAt: "STRING_VALUE", // required
|
|
71
|
-
* // },
|
|
72
|
-
* // ],
|
|
73
63
|
* // };
|
|
74
64
|
*
|
|
75
65
|
* ```
|
|
@@ -38,7 +38,6 @@ declare const GetDocumentDownloadUrlCommand_base: {
|
|
|
38
38
|
* companyId: "STRING_VALUE",
|
|
39
39
|
* dataSourceId: "STRING_VALUE", // required
|
|
40
40
|
* documentId: "STRING_VALUE", // required
|
|
41
|
-
* documentType: "original" || "markdown",
|
|
42
41
|
* };
|
|
43
42
|
* const command = new GetDocumentDownloadUrlCommand(input);
|
|
44
43
|
* const response = await client.send(command);
|
|
@@ -60,7 +60,7 @@ declare const GetDocumentWithContentAndChunksCommand_base: {
|
|
|
60
60
|
* // processingDuration: Number("int"),
|
|
61
61
|
* // errorMessage: "STRING_VALUE",
|
|
62
62
|
* // },
|
|
63
|
-
* // content: "STRING_VALUE",
|
|
63
|
+
* // content: "STRING_VALUE", // required
|
|
64
64
|
* // chunks: [ // ChunksList // required
|
|
65
65
|
* // { // ChunkItem
|
|
66
66
|
* // id: "STRING_VALUE", // required
|
|
@@ -36,9 +36,11 @@ declare const ListDocumentsCommand_base: {
|
|
|
36
36
|
* const client = new KnowledgeBaseClient(config);
|
|
37
37
|
* const input = { // ListDocumentsInput
|
|
38
38
|
* companyId: "STRING_VALUE",
|
|
39
|
-
* dataSourceId: "STRING_VALUE", // required
|
|
40
39
|
* limit: Number("int"),
|
|
41
40
|
* offset: Number("int"),
|
|
41
|
+
* sort: "STRING_VALUE",
|
|
42
|
+
* dataSourceId: "STRING_VALUE", // required
|
|
43
|
+
* search: "STRING_VALUE",
|
|
42
44
|
* };
|
|
43
45
|
* const command = new ListDocumentsCommand(input);
|
|
44
46
|
* const response = await client.send(command);
|
|
@@ -52,7 +52,95 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
52
52
|
* const response = await client.send(command);
|
|
53
53
|
* // { // ListSearchQueriesHistoryOutput
|
|
54
54
|
* // results: [ // SearchHistoryResultsList // required
|
|
55
|
-
* //
|
|
55
|
+
* // { // SearchHistoryResultItem
|
|
56
|
+
* // sessionId: "STRING_VALUE", // required
|
|
57
|
+
* // companyId: "STRING_VALUE", // required
|
|
58
|
+
* // request: { // SearchHistoryRequest
|
|
59
|
+
* // query: "STRING_VALUE", // required
|
|
60
|
+
* // user: "STRING_VALUE", // required
|
|
61
|
+
* // externalSessionId: "STRING_VALUE", // required
|
|
62
|
+
* // knowledgeBaseId: "STRING_VALUE", // required
|
|
63
|
+
* // searchStrategy: "bm25" || "vector" || "hybrid", // required
|
|
64
|
+
* // searchLimit: Number("int"), // required
|
|
65
|
+
* // searchThreshold: Number("double"), // required
|
|
66
|
+
* // },
|
|
67
|
+
* // stages: { // SearchHistoryStages
|
|
68
|
+
* // overall: { // SearchHistoryStage
|
|
69
|
+
* // startTime: Number("long"), // required
|
|
70
|
+
* // endTime: Number("long"), // required
|
|
71
|
+
* // duration: Number("int"), // required
|
|
72
|
+
* // },
|
|
73
|
+
* // generateQueryEmbedding: { // SearchHistoryEmbeddingStage
|
|
74
|
+
* // startTime: Number("long"), // required
|
|
75
|
+
* // endTime: Number("long"), // required
|
|
76
|
+
* // duration: Number("int"), // required
|
|
77
|
+
* // provider: "STRING_VALUE", // required
|
|
78
|
+
* // model: "STRING_VALUE", // required
|
|
79
|
+
* // inputTokens: Number("int"), // required
|
|
80
|
+
* // outputTokens: Number("int"), // required
|
|
81
|
+
* // },
|
|
82
|
+
* // search: {
|
|
83
|
+
* // startTime: Number("long"), // required
|
|
84
|
+
* // endTime: Number("long"), // required
|
|
85
|
+
* // duration: Number("int"), // required
|
|
86
|
+
* // },
|
|
87
|
+
* // enrichData: {
|
|
88
|
+
* // startTime: Number("long"), // required
|
|
89
|
+
* // endTime: Number("long"), // required
|
|
90
|
+
* // duration: Number("int"), // required
|
|
91
|
+
* // },
|
|
92
|
+
* // },
|
|
93
|
+
* // response: { // SearchHistoryResponse
|
|
94
|
+
* // results: [ // SearchHistorySearchResults // required
|
|
95
|
+
* // {
|
|
96
|
+
* // sessionId: "STRING_VALUE", // required
|
|
97
|
+
* // companyId: "STRING_VALUE", // required
|
|
98
|
+
* // request: {
|
|
99
|
+
* // query: "STRING_VALUE", // required
|
|
100
|
+
* // user: "STRING_VALUE", // required
|
|
101
|
+
* // externalSessionId: "STRING_VALUE", // required
|
|
102
|
+
* // knowledgeBaseId: "STRING_VALUE", // required
|
|
103
|
+
* // searchStrategy: "bm25" || "vector" || "hybrid", // required
|
|
104
|
+
* // searchLimit: Number("int"), // required
|
|
105
|
+
* // searchThreshold: Number("double"), // required
|
|
106
|
+
* // },
|
|
107
|
+
* // stages: {
|
|
108
|
+
* // overall: {
|
|
109
|
+
* // startTime: Number("long"), // required
|
|
110
|
+
* // endTime: Number("long"), // required
|
|
111
|
+
* // duration: Number("int"), // required
|
|
112
|
+
* // },
|
|
113
|
+
* // generateQueryEmbedding: {
|
|
114
|
+
* // startTime: Number("long"), // required
|
|
115
|
+
* // endTime: Number("long"), // required
|
|
116
|
+
* // duration: Number("int"), // required
|
|
117
|
+
* // provider: "STRING_VALUE", // required
|
|
118
|
+
* // model: "STRING_VALUE", // required
|
|
119
|
+
* // inputTokens: Number("int"), // required
|
|
120
|
+
* // outputTokens: Number("int"), // required
|
|
121
|
+
* // },
|
|
122
|
+
* // search: {
|
|
123
|
+
* // startTime: Number("long"), // required
|
|
124
|
+
* // endTime: Number("long"), // required
|
|
125
|
+
* // duration: Number("int"), // required
|
|
126
|
+
* // },
|
|
127
|
+
* // enrichData: "<SearchHistoryStage>",
|
|
128
|
+
* // },
|
|
129
|
+
* // response: {
|
|
130
|
+
* // results: [ // required
|
|
131
|
+
* // "<SearchHistoryResultItem>",
|
|
132
|
+
* // ],
|
|
133
|
+
* // },
|
|
134
|
+
* // createdAt: new Date("TIMESTAMP"), // required
|
|
135
|
+
* // totalDuration: Number("int"), // required
|
|
136
|
+
* // resultsCount: Number("int"), // required
|
|
137
|
+
* // },
|
|
138
|
+
* // ],
|
|
139
|
+
* // },
|
|
140
|
+
* // createdAt: new Date("TIMESTAMP"), // required
|
|
141
|
+
* // totalDuration: Number("int"), // required
|
|
142
|
+
* // resultsCount: Number("int"), // required
|
|
143
|
+
* // },
|
|
56
144
|
* // ],
|
|
57
145
|
* // };
|
|
58
146
|
*
|
|
@@ -57,15 +57,16 @@ declare const SearchKnowledgeBaseCommand_base: {
|
|
|
57
57
|
* // dataSourceType: "files" || "confluence" || "gdrive", // required
|
|
58
58
|
* // content: "STRING_VALUE", // required
|
|
59
59
|
* // score: Number("double"), // required
|
|
60
|
+
* // fullTextScore: Number("double"),
|
|
61
|
+
* // semanticScore: Number("double"),
|
|
60
62
|
* // documentHierarchy: [ // StringList
|
|
61
63
|
* // "STRING_VALUE",
|
|
62
64
|
* // ],
|
|
63
65
|
* // },
|
|
64
66
|
* // ],
|
|
65
67
|
* // metadata: { // SearchResultMetadata
|
|
68
|
+
* // sessionId: "STRING_VALUE", // required
|
|
66
69
|
* // duration: Number("int"), // required
|
|
67
|
-
* // inputTokens: Number("int"), // required
|
|
68
|
-
* // outputTokens: Number("int"), // required
|
|
69
70
|
* // },
|
|
70
71
|
* // };
|
|
71
72
|
*
|
|
@@ -941,18 +941,6 @@ export interface DescribeDataSourceResult {
|
|
|
941
941
|
export interface DescribeDataSourceOutput {
|
|
942
942
|
result: DescribeDataSourceResult;
|
|
943
943
|
}
|
|
944
|
-
/**
|
|
945
|
-
* @public
|
|
946
|
-
* @enum
|
|
947
|
-
*/
|
|
948
|
-
export declare const DownloadDocumentType: {
|
|
949
|
-
readonly MARKDOWN: "markdown";
|
|
950
|
-
readonly ORIGINAL: "original";
|
|
951
|
-
};
|
|
952
|
-
/**
|
|
953
|
-
* @public
|
|
954
|
-
*/
|
|
955
|
-
export type DownloadDocumentType = typeof DownloadDocumentType[keyof typeof DownloadDocumentType];
|
|
956
944
|
/**
|
|
957
945
|
* @public
|
|
958
946
|
*/
|
|
@@ -976,6 +964,16 @@ export interface SearchKnowledgeBaseResult {
|
|
|
976
964
|
* @public
|
|
977
965
|
*/
|
|
978
966
|
score: number;
|
|
967
|
+
/**
|
|
968
|
+
* The score of the result, calculated from the full-text bm25 search score.
|
|
969
|
+
* @public
|
|
970
|
+
*/
|
|
971
|
+
fullTextScore?: number | undefined;
|
|
972
|
+
/**
|
|
973
|
+
* The score of the result, calculated from the semantic vector search score.
|
|
974
|
+
* @public
|
|
975
|
+
*/
|
|
976
|
+
semanticScore?: number | undefined;
|
|
979
977
|
/**
|
|
980
978
|
* The hierarchy of the document. The hierarchy is a list of document IDs that are the parents of the current document. The hierarchy is used to build the document hierarchy in the search results.
|
|
981
979
|
* @public
|
|
@@ -1097,9 +1095,9 @@ export type SyncDataSourceStatus = typeof SyncDataSourceStatus[keyof typeof Sync
|
|
|
1097
1095
|
*/
|
|
1098
1096
|
export interface GetDataSourceSyncStatusOutput {
|
|
1099
1097
|
syncStatus: SyncDataSourceStatus;
|
|
1100
|
-
lastSyncedAt
|
|
1101
|
-
lastSyncMode
|
|
1102
|
-
lastSyncErrorMessage
|
|
1098
|
+
lastSyncedAt?: string | undefined;
|
|
1099
|
+
lastSyncMode?: SyncDataSourceMode | undefined;
|
|
1100
|
+
lastSyncErrorMessage?: string | undefined;
|
|
1103
1101
|
}
|
|
1104
1102
|
/**
|
|
1105
1103
|
* @public
|
|
@@ -1120,18 +1118,12 @@ export interface GetDocumentInput {
|
|
|
1120
1118
|
* @public
|
|
1121
1119
|
*/
|
|
1122
1120
|
documentId: string;
|
|
1123
|
-
/**
|
|
1124
|
-
* When true, includes the list of text chunks that the document was split into for embedding and search. Useful for understanding how the document was processed. Defaults to false if not specified
|
|
1125
|
-
* @public
|
|
1126
|
-
*/
|
|
1127
|
-
withChunks?: boolean | undefined;
|
|
1128
1121
|
}
|
|
1129
1122
|
/**
|
|
1130
1123
|
* @public
|
|
1131
1124
|
*/
|
|
1132
1125
|
export interface GetDocumentOutput {
|
|
1133
1126
|
document: DocumentItem;
|
|
1134
|
-
chunks?: (ChunkItem)[] | undefined;
|
|
1135
1127
|
}
|
|
1136
1128
|
/**
|
|
1137
1129
|
* @public
|
|
@@ -1178,11 +1170,6 @@ export interface GetDocumentDownloadUrlInput {
|
|
|
1178
1170
|
* @public
|
|
1179
1171
|
*/
|
|
1180
1172
|
documentId: string;
|
|
1181
|
-
/**
|
|
1182
|
-
* Format of the document to download. 'original' returns the file in its original format (pdf, docx, etc.), 'markdown' returns a markdown-converted version. Defaults to 'markdown' if not specified
|
|
1183
|
-
* @public
|
|
1184
|
-
*/
|
|
1185
|
-
documentType?: DownloadDocumentType | undefined;
|
|
1186
1173
|
}
|
|
1187
1174
|
/**
|
|
1188
1175
|
* @public
|
|
@@ -1267,7 +1254,7 @@ export interface GetDocumentWithContentAndChunksInput {
|
|
|
1267
1254
|
*/
|
|
1268
1255
|
export interface GetDocumentWithContentAndChunksOutput {
|
|
1269
1256
|
document: DocumentItem;
|
|
1270
|
-
content
|
|
1257
|
+
content: string;
|
|
1271
1258
|
chunks: (ChunkItem)[];
|
|
1272
1259
|
}
|
|
1273
1260
|
/**
|
|
@@ -1398,21 +1385,23 @@ export interface ListDocumentsInput {
|
|
|
1398
1385
|
* @public
|
|
1399
1386
|
*/
|
|
1400
1387
|
companyId?: string | undefined;
|
|
1388
|
+
limit?: number | undefined;
|
|
1389
|
+
offset?: number | undefined;
|
|
1401
1390
|
/**
|
|
1402
|
-
*
|
|
1391
|
+
* Sort order of the results. If there is a '-' prefix, the results will be sorted in descending order. Otherwise, the results will be sorted in ascending order. Example: '-createdAt' will sort the results by createdAt in descending order. 'createdAt' will sort the results by createdAt in ascending order.
|
|
1403
1392
|
* @public
|
|
1404
1393
|
*/
|
|
1405
|
-
|
|
1394
|
+
sort?: string | undefined;
|
|
1406
1395
|
/**
|
|
1407
|
-
*
|
|
1396
|
+
* Unique identifier of the data source
|
|
1408
1397
|
* @public
|
|
1409
1398
|
*/
|
|
1410
|
-
|
|
1399
|
+
dataSourceId: string;
|
|
1411
1400
|
/**
|
|
1412
|
-
*
|
|
1401
|
+
* The search query string for filtering the documents results.
|
|
1413
1402
|
* @public
|
|
1414
1403
|
*/
|
|
1415
|
-
|
|
1404
|
+
search?: string | undefined;
|
|
1416
1405
|
}
|
|
1417
1406
|
/**
|
|
1418
1407
|
* @public
|
|
@@ -1493,12 +1482,6 @@ export interface ListSearchQueriesHistoryInput {
|
|
|
1493
1482
|
*/
|
|
1494
1483
|
search?: string | undefined;
|
|
1495
1484
|
}
|
|
1496
|
-
/**
|
|
1497
|
-
* @public
|
|
1498
|
-
*/
|
|
1499
|
-
export interface ListSearchQueriesHistoryOutput {
|
|
1500
|
-
results: (__DocumentType)[];
|
|
1501
|
-
}
|
|
1502
1485
|
/**
|
|
1503
1486
|
* @public
|
|
1504
1487
|
* @enum
|
|
@@ -1512,6 +1495,51 @@ export declare const SearchStrategy: {
|
|
|
1512
1495
|
* @public
|
|
1513
1496
|
*/
|
|
1514
1497
|
export type SearchStrategy = typeof SearchStrategy[keyof typeof SearchStrategy];
|
|
1498
|
+
/**
|
|
1499
|
+
* @public
|
|
1500
|
+
*/
|
|
1501
|
+
export interface SearchHistoryRequest {
|
|
1502
|
+
query: string;
|
|
1503
|
+
user: string;
|
|
1504
|
+
externalSessionId: string;
|
|
1505
|
+
/**
|
|
1506
|
+
* Unique identifier of the knowledge base
|
|
1507
|
+
* @public
|
|
1508
|
+
*/
|
|
1509
|
+
knowledgeBaseId: string;
|
|
1510
|
+
searchStrategy: SearchStrategy;
|
|
1511
|
+
searchLimit: number;
|
|
1512
|
+
searchThreshold: number;
|
|
1513
|
+
}
|
|
1514
|
+
/**
|
|
1515
|
+
* @public
|
|
1516
|
+
*/
|
|
1517
|
+
export interface SearchHistoryStage {
|
|
1518
|
+
startTime: number;
|
|
1519
|
+
endTime: number;
|
|
1520
|
+
duration: number;
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* @public
|
|
1524
|
+
*/
|
|
1525
|
+
export interface SearchHistoryEmbeddingStage {
|
|
1526
|
+
startTime: number;
|
|
1527
|
+
endTime: number;
|
|
1528
|
+
duration: number;
|
|
1529
|
+
provider: string;
|
|
1530
|
+
model: string;
|
|
1531
|
+
inputTokens: number;
|
|
1532
|
+
outputTokens: number;
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* @public
|
|
1536
|
+
*/
|
|
1537
|
+
export interface SearchHistoryStages {
|
|
1538
|
+
overall: SearchHistoryStage;
|
|
1539
|
+
generateQueryEmbedding?: SearchHistoryEmbeddingStage | undefined;
|
|
1540
|
+
search?: SearchHistoryStage | undefined;
|
|
1541
|
+
enrichData?: SearchHistoryStage | undefined;
|
|
1542
|
+
}
|
|
1515
1543
|
/**
|
|
1516
1544
|
* @public
|
|
1517
1545
|
* @enum
|
|
@@ -1579,9 +1607,8 @@ export interface SearchKnowledgeBaseInput {
|
|
|
1579
1607
|
* @public
|
|
1580
1608
|
*/
|
|
1581
1609
|
export interface SearchResultMetadata {
|
|
1610
|
+
sessionId: string;
|
|
1582
1611
|
duration: number;
|
|
1583
|
-
inputTokens: number;
|
|
1584
|
-
outputTokens: number;
|
|
1585
1612
|
}
|
|
1586
1613
|
/**
|
|
1587
1614
|
* @public
|
|
@@ -1758,3 +1785,28 @@ export interface UpdateKnowledgeBaseInput {
|
|
|
1758
1785
|
export interface UpdateKnowledgeBaseOutput {
|
|
1759
1786
|
knowledgeBase: KnowledgeBaseItem;
|
|
1760
1787
|
}
|
|
1788
|
+
/**
|
|
1789
|
+
* @public
|
|
1790
|
+
*/
|
|
1791
|
+
export interface SearchHistoryResponse {
|
|
1792
|
+
results: (SearchHistoryResultItem)[];
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* @public
|
|
1796
|
+
*/
|
|
1797
|
+
export interface SearchHistoryResultItem {
|
|
1798
|
+
sessionId: string;
|
|
1799
|
+
companyId: string;
|
|
1800
|
+
request: SearchHistoryRequest;
|
|
1801
|
+
stages: SearchHistoryStages;
|
|
1802
|
+
response: SearchHistoryResponse;
|
|
1803
|
+
createdAt: Date;
|
|
1804
|
+
totalDuration: number;
|
|
1805
|
+
resultsCount: number;
|
|
1806
|
+
}
|
|
1807
|
+
/**
|
|
1808
|
+
* @public
|
|
1809
|
+
*/
|
|
1810
|
+
export interface ListSearchQueriesHistoryOutput {
|
|
1811
|
+
results: (SearchHistoryResultItem)[];
|
|
1812
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-knowledge-base-client",
|
|
3
3
|
"description": "@wildix/wim-knowledge-base-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.53",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|