@wildix/wim-knowledge-base-client 0.0.39 → 0.0.41
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/KnowledgeBase.js +2 -0
- package/dist-cjs/commands/SearchHistoryCommand.js +21 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +5 -1
- package/dist-cjs/protocols/Aws_restJson1.js +48 -2
- package/dist-es/KnowledgeBase.js +2 -0
- package/dist-es/commands/SearchHistoryCommand.js +17 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +4 -0
- package/dist-es/protocols/Aws_restJson1.js +44 -0
- package/dist-types/KnowledgeBase.d.ts +7 -0
- package/dist-types/KnowledgeBaseClient.d.ts +3 -2
- package/dist-types/commands/SearchHistoryCommand.d.ts +98 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +81 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ const ListDataSourcesCommand_1 = require("./commands/ListDataSourcesCommand");
|
|
|
23
23
|
const ListDocumentsCommand_1 = require("./commands/ListDocumentsCommand");
|
|
24
24
|
const ListKnowledgeBasesCommand_1 = require("./commands/ListKnowledgeBasesCommand");
|
|
25
25
|
const QueryKnowledgeBaseCommand_1 = require("./commands/QueryKnowledgeBaseCommand");
|
|
26
|
+
const SearchHistoryCommand_1 = require("./commands/SearchHistoryCommand");
|
|
26
27
|
const SearchKnowledgeBaseCommand_1 = require("./commands/SearchKnowledgeBaseCommand");
|
|
27
28
|
const StartSyncDataSourceCommand_1 = require("./commands/StartSyncDataSourceCommand");
|
|
28
29
|
const StopSyncDataSourceCommand_1 = require("./commands/StopSyncDataSourceCommand");
|
|
@@ -52,6 +53,7 @@ const commands = {
|
|
|
52
53
|
ListDocumentsCommand: ListDocumentsCommand_1.ListDocumentsCommand,
|
|
53
54
|
ListKnowledgeBasesCommand: ListKnowledgeBasesCommand_1.ListKnowledgeBasesCommand,
|
|
54
55
|
QueryKnowledgeBaseCommand: QueryKnowledgeBaseCommand_1.QueryKnowledgeBaseCommand,
|
|
56
|
+
SearchHistoryCommand: SearchHistoryCommand_1.SearchHistoryCommand,
|
|
55
57
|
SearchKnowledgeBaseCommand: SearchKnowledgeBaseCommand_1.SearchKnowledgeBaseCommand,
|
|
56
58
|
StartSyncDataSourceCommand: StartSyncDataSourceCommand_1.StartSyncDataSourceCommand,
|
|
57
59
|
StopSyncDataSourceCommand: StopSyncDataSourceCommand_1.StopSyncDataSourceCommand,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SearchHistoryCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class SearchHistoryCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("KnowledgeBase", "SearchHistory", {})
|
|
15
|
+
.n("KnowledgeBaseClient", "SearchHistoryCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_SearchHistoryCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_SearchHistoryCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.SearchHistoryCommand = SearchHistoryCommand;
|
|
@@ -22,6 +22,7 @@ tslib_1.__exportStar(require("./ListDataSourcesCommand"), exports);
|
|
|
22
22
|
tslib_1.__exportStar(require("./ListDocumentsCommand"), exports);
|
|
23
23
|
tslib_1.__exportStar(require("./ListKnowledgeBasesCommand"), exports);
|
|
24
24
|
tslib_1.__exportStar(require("./QueryKnowledgeBaseCommand"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./SearchHistoryCommand"), exports);
|
|
25
26
|
tslib_1.__exportStar(require("./SearchKnowledgeBaseCommand"), exports);
|
|
26
27
|
tslib_1.__exportStar(require("./StartSyncDataSourceCommand"), exports);
|
|
27
28
|
tslib_1.__exportStar(require("./StopSyncDataSourceCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchStrategy = exports.SyncLogLevel = exports.DownloadDocumentType = exports.DocumentStatus = exports.DataSourceType = exports.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.ScheduleConfiguration = exports.DataSourceConfig = exports.ProxyMethod = exports.KnowledgeBaseNotFoundException = exports.DocumentNotFoundException = exports.DataSourceNotFoundException = exports.UnauthorizedException = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
3
|
+
exports.SearchHistoryMode = exports.SearchStrategy = exports.SyncLogLevel = exports.DownloadDocumentType = exports.DocumentStatus = exports.DataSourceType = exports.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.ScheduleConfiguration = exports.DataSourceConfig = exports.ProxyMethod = 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";
|
|
@@ -144,3 +144,7 @@ exports.SearchStrategy = {
|
|
|
144
144
|
HYBRID: "hybrid",
|
|
145
145
|
VECTOR: "vector",
|
|
146
146
|
};
|
|
147
|
+
exports.SearchHistoryMode = {
|
|
148
|
+
AI_ANSWER: "ai_answer",
|
|
149
|
+
SEARCH: "search",
|
|
150
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.de_UpdateKnowledgeBaseCommand = exports.de_UpdateDocumentCommand = exports.de_UpdateDataSourceCommand = exports.de_StopSyncDataSourceCommand = void 0;
|
|
3
|
+
exports.de_SearchHistoryCommand = exports.de_QueryKnowledgeBaseCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListDocumentsCommand = exports.de_ListDataSourcesCommand = exports.de_GetSyncStatusCommand = exports.de_GetSyncLogsCommand = exports.de_GetKnowledgeBaseCommand = exports.de_GetDocumentPresignedUploadUrlCommand = exports.de_GetDocumentPresignedDownloadUrlCommand = exports.de_GetDocumentCommand = exports.de_GetDataSourceCommand = exports.de_DescribeDataSourceCommand = exports.de_DeleteKnowledgeBaseCommand = exports.de_DeleteDocumentCommand = exports.de_DeleteDataSourceCommand = exports.de_CreateKnowledgeBaseCommand = exports.de_CreateDocumentCommand = exports.de_CreateDataSourceCommand = exports.de_ConfigureDataSourceCommand = exports.de_CloneDataSourceCommand = exports.de_CleanDataSourceCommand = exports.se_UpdateKnowledgeBaseCommand = exports.se_UpdateDocumentCommand = exports.se_UpdateDataSourceCommand = exports.se_StopSyncDataSourceCommand = exports.se_StartSyncDataSourceCommand = exports.se_SearchKnowledgeBaseCommand = exports.se_SearchHistoryCommand = exports.se_QueryKnowledgeBaseCommand = exports.se_ListKnowledgeBasesCommand = exports.se_ListDocumentsCommand = exports.se_ListDataSourcesCommand = exports.se_GetSyncStatusCommand = exports.se_GetSyncLogsCommand = exports.se_GetKnowledgeBaseCommand = exports.se_GetDocumentPresignedUploadUrlCommand = exports.se_GetDocumentPresignedDownloadUrlCommand = exports.se_GetDocumentCommand = exports.se_GetDataSourceCommand = exports.se_DescribeDataSourceCommand = exports.se_DeleteKnowledgeBaseCommand = exports.se_DeleteDocumentCommand = exports.se_DeleteDataSourceCommand = exports.se_CreateKnowledgeBaseCommand = exports.se_CreateDocumentCommand = exports.se_CreateDataSourceCommand = exports.se_ConfigureDataSourceCommand = exports.se_CloneDataSourceCommand = exports.se_CleanDataSourceCommand = void 0;
|
|
4
|
+
exports.de_UpdateKnowledgeBaseCommand = exports.de_UpdateDocumentCommand = exports.de_UpdateDataSourceCommand = exports.de_StopSyncDataSourceCommand = exports.de_StartSyncDataSourceCommand = exports.de_SearchKnowledgeBaseCommand = void 0;
|
|
5
5
|
const KnowledgeBaseServiceException_1 = require("../models/KnowledgeBaseServiceException");
|
|
6
6
|
const models_0_1 = require("../models/models_0");
|
|
7
7
|
const core_1 = require("@aws-sdk/core");
|
|
@@ -395,6 +395,30 @@ const se_QueryKnowledgeBaseCommand = async (input, context) => {
|
|
|
395
395
|
return b.build();
|
|
396
396
|
};
|
|
397
397
|
exports.se_QueryKnowledgeBaseCommand = se_QueryKnowledgeBaseCommand;
|
|
398
|
+
const se_SearchHistoryCommand = async (input, context) => {
|
|
399
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
400
|
+
const headers = {
|
|
401
|
+
'content-type': 'application/json',
|
|
402
|
+
};
|
|
403
|
+
b.bp("/api/v1/history/search");
|
|
404
|
+
const query = (0, smithy_client_1.map)({
|
|
405
|
+
[_c]: [, input[_cI]],
|
|
406
|
+
[_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
|
|
407
|
+
[_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
|
|
408
|
+
[_s]: [, input[_s]],
|
|
409
|
+
});
|
|
410
|
+
let body;
|
|
411
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
412
|
+
'filter': _ => (0, smithy_client_1._json)(_),
|
|
413
|
+
'search': [],
|
|
414
|
+
}));
|
|
415
|
+
b.m("POST")
|
|
416
|
+
.h(headers)
|
|
417
|
+
.q(query)
|
|
418
|
+
.b(body);
|
|
419
|
+
return b.build();
|
|
420
|
+
};
|
|
421
|
+
exports.se_SearchHistoryCommand = se_SearchHistoryCommand;
|
|
398
422
|
const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
399
423
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
400
424
|
const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
|
|
@@ -831,6 +855,21 @@ const de_QueryKnowledgeBaseCommand = async (output, context) => {
|
|
|
831
855
|
return contents;
|
|
832
856
|
};
|
|
833
857
|
exports.de_QueryKnowledgeBaseCommand = de_QueryKnowledgeBaseCommand;
|
|
858
|
+
const de_SearchHistoryCommand = async (output, context) => {
|
|
859
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
860
|
+
return de_CommandError(output, context);
|
|
861
|
+
}
|
|
862
|
+
const contents = (0, smithy_client_1.map)({
|
|
863
|
+
$metadata: deserializeMetadata(output),
|
|
864
|
+
});
|
|
865
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
866
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
867
|
+
'results': _ => de_SearchHistoryResults(_, context),
|
|
868
|
+
});
|
|
869
|
+
Object.assign(contents, doc);
|
|
870
|
+
return contents;
|
|
871
|
+
};
|
|
872
|
+
exports.de_SearchHistoryCommand = de_SearchHistoryCommand;
|
|
834
873
|
const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
835
874
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
836
875
|
return de_CommandError(output, context);
|
|
@@ -1149,6 +1188,12 @@ const de_ProxyConfig = (output, context) => {
|
|
|
1149
1188
|
'username': smithy_client_1.expectString,
|
|
1150
1189
|
});
|
|
1151
1190
|
};
|
|
1191
|
+
const de_SearchHistoryResults = (output, context) => {
|
|
1192
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1193
|
+
return de_Document(entry, context);
|
|
1194
|
+
});
|
|
1195
|
+
return retVal;
|
|
1196
|
+
};
|
|
1152
1197
|
const de_SearchKnowledgeBaseResult = (output, context) => {
|
|
1153
1198
|
return (0, smithy_client_1.take)(output, {
|
|
1154
1199
|
'content': smithy_client_1.expectString,
|
|
@@ -1180,6 +1225,7 @@ const _eSI = "externalSessionId";
|
|
|
1180
1225
|
const _l = "limit";
|
|
1181
1226
|
const _o = "offset";
|
|
1182
1227
|
const _q = "query";
|
|
1228
|
+
const _s = "sort";
|
|
1183
1229
|
const _sT = "syncType";
|
|
1184
1230
|
const _sU = "searchUser";
|
|
1185
1231
|
const _wC = "withContent";
|
package/dist-es/KnowledgeBase.js
CHANGED
|
@@ -20,6 +20,7 @@ import { ListDataSourcesCommand, } from "./commands/ListDataSourcesCommand";
|
|
|
20
20
|
import { ListDocumentsCommand, } from "./commands/ListDocumentsCommand";
|
|
21
21
|
import { ListKnowledgeBasesCommand, } from "./commands/ListKnowledgeBasesCommand";
|
|
22
22
|
import { QueryKnowledgeBaseCommand, } from "./commands/QueryKnowledgeBaseCommand";
|
|
23
|
+
import { SearchHistoryCommand, } from "./commands/SearchHistoryCommand";
|
|
23
24
|
import { SearchKnowledgeBaseCommand, } from "./commands/SearchKnowledgeBaseCommand";
|
|
24
25
|
import { StartSyncDataSourceCommand, } from "./commands/StartSyncDataSourceCommand";
|
|
25
26
|
import { StopSyncDataSourceCommand, } from "./commands/StopSyncDataSourceCommand";
|
|
@@ -49,6 +50,7 @@ const commands = {
|
|
|
49
50
|
ListDocumentsCommand,
|
|
50
51
|
ListKnowledgeBasesCommand,
|
|
51
52
|
QueryKnowledgeBaseCommand,
|
|
53
|
+
SearchHistoryCommand,
|
|
52
54
|
SearchKnowledgeBaseCommand,
|
|
53
55
|
StartSyncDataSourceCommand,
|
|
54
56
|
StopSyncDataSourceCommand,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_SearchHistoryCommand, se_SearchHistoryCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class SearchHistoryCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("KnowledgeBase", "SearchHistory", {})
|
|
12
|
+
.n("KnowledgeBaseClient", "SearchHistoryCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_SearchHistoryCommand)
|
|
15
|
+
.de(de_SearchHistoryCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -19,6 +19,7 @@ export * from "./ListDataSourcesCommand";
|
|
|
19
19
|
export * from "./ListDocumentsCommand";
|
|
20
20
|
export * from "./ListKnowledgeBasesCommand";
|
|
21
21
|
export * from "./QueryKnowledgeBaseCommand";
|
|
22
|
+
export * from "./SearchHistoryCommand";
|
|
22
23
|
export * from "./SearchKnowledgeBaseCommand";
|
|
23
24
|
export * from "./StartSyncDataSourceCommand";
|
|
24
25
|
export * from "./StopSyncDataSourceCommand";
|
|
@@ -370,6 +370,29 @@ export const se_QueryKnowledgeBaseCommand = async (input, context) => {
|
|
|
370
370
|
.b(body);
|
|
371
371
|
return b.build();
|
|
372
372
|
};
|
|
373
|
+
export const se_SearchHistoryCommand = async (input, context) => {
|
|
374
|
+
const b = rb(input, context);
|
|
375
|
+
const headers = {
|
|
376
|
+
'content-type': 'application/json',
|
|
377
|
+
};
|
|
378
|
+
b.bp("/api/v1/history/search");
|
|
379
|
+
const query = map({
|
|
380
|
+
[_c]: [, input[_cI]],
|
|
381
|
+
[_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
|
|
382
|
+
[_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
|
|
383
|
+
[_s]: [, input[_s]],
|
|
384
|
+
});
|
|
385
|
+
let body;
|
|
386
|
+
body = JSON.stringify(take(input, {
|
|
387
|
+
'filter': _ => _json(_),
|
|
388
|
+
'search': [],
|
|
389
|
+
}));
|
|
390
|
+
b.m("POST")
|
|
391
|
+
.h(headers)
|
|
392
|
+
.q(query)
|
|
393
|
+
.b(body);
|
|
394
|
+
return b.build();
|
|
395
|
+
};
|
|
373
396
|
export const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
374
397
|
const b = rb(input, context);
|
|
375
398
|
const headers = map({}, isSerializableHeaderValue, {
|
|
@@ -779,6 +802,20 @@ export const de_QueryKnowledgeBaseCommand = async (output, context) => {
|
|
|
779
802
|
Object.assign(contents, doc);
|
|
780
803
|
return contents;
|
|
781
804
|
};
|
|
805
|
+
export const de_SearchHistoryCommand = async (output, context) => {
|
|
806
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
807
|
+
return de_CommandError(output, context);
|
|
808
|
+
}
|
|
809
|
+
const contents = map({
|
|
810
|
+
$metadata: deserializeMetadata(output),
|
|
811
|
+
});
|
|
812
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
813
|
+
const doc = take(data, {
|
|
814
|
+
'results': _ => de_SearchHistoryResults(_, context),
|
|
815
|
+
});
|
|
816
|
+
Object.assign(contents, doc);
|
|
817
|
+
return contents;
|
|
818
|
+
};
|
|
782
819
|
export const de_SearchKnowledgeBaseCommand = async (output, context) => {
|
|
783
820
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
784
821
|
return de_CommandError(output, context);
|
|
@@ -1091,6 +1128,12 @@ const de_ProxyConfig = (output, context) => {
|
|
|
1091
1128
|
'username': __expectString,
|
|
1092
1129
|
});
|
|
1093
1130
|
};
|
|
1131
|
+
const de_SearchHistoryResults = (output, context) => {
|
|
1132
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1133
|
+
return de_Document(entry, context);
|
|
1134
|
+
});
|
|
1135
|
+
return retVal;
|
|
1136
|
+
};
|
|
1094
1137
|
const de_SearchKnowledgeBaseResult = (output, context) => {
|
|
1095
1138
|
return take(output, {
|
|
1096
1139
|
'content': __expectString,
|
|
@@ -1122,6 +1165,7 @@ const _eSI = "externalSessionId";
|
|
|
1122
1165
|
const _l = "limit";
|
|
1123
1166
|
const _o = "offset";
|
|
1124
1167
|
const _q = "query";
|
|
1168
|
+
const _s = "sort";
|
|
1125
1169
|
const _sT = "syncType";
|
|
1126
1170
|
const _sU = "searchUser";
|
|
1127
1171
|
const _wC = "withContent";
|
|
@@ -20,6 +20,7 @@ import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "./com
|
|
|
20
20
|
import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./commands/ListDocumentsCommand";
|
|
21
21
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
22
22
|
import { QueryKnowledgeBaseCommandInput, QueryKnowledgeBaseCommandOutput } from "./commands/QueryKnowledgeBaseCommand";
|
|
23
|
+
import { SearchHistoryCommandInput, SearchHistoryCommandOutput } from "./commands/SearchHistoryCommand";
|
|
23
24
|
import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "./commands/SearchKnowledgeBaseCommand";
|
|
24
25
|
import { StartSyncDataSourceCommandInput, StartSyncDataSourceCommandOutput } from "./commands/StartSyncDataSourceCommand";
|
|
25
26
|
import { StopSyncDataSourceCommandInput, StopSyncDataSourceCommandOutput } from "./commands/StopSyncDataSourceCommand";
|
|
@@ -156,6 +157,12 @@ export interface KnowledgeBase {
|
|
|
156
157
|
queryKnowledgeBase(args: QueryKnowledgeBaseCommandInput, options?: __HttpHandlerOptions): Promise<QueryKnowledgeBaseCommandOutput>;
|
|
157
158
|
queryKnowledgeBase(args: QueryKnowledgeBaseCommandInput, cb: (err: any, data?: QueryKnowledgeBaseCommandOutput) => void): void;
|
|
158
159
|
queryKnowledgeBase(args: QueryKnowledgeBaseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryKnowledgeBaseCommandOutput) => void): void;
|
|
160
|
+
/**
|
|
161
|
+
* @see {@link SearchHistoryCommand}
|
|
162
|
+
*/
|
|
163
|
+
searchHistory(args: SearchHistoryCommandInput, options?: __HttpHandlerOptions): Promise<SearchHistoryCommandOutput>;
|
|
164
|
+
searchHistory(args: SearchHistoryCommandInput, cb: (err: any, data?: SearchHistoryCommandOutput) => void): void;
|
|
165
|
+
searchHistory(args: SearchHistoryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchHistoryCommandOutput) => void): void;
|
|
159
166
|
/**
|
|
160
167
|
* @see {@link SearchKnowledgeBaseCommand}
|
|
161
168
|
*/
|
|
@@ -19,6 +19,7 @@ import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "./com
|
|
|
19
19
|
import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./commands/ListDocumentsCommand";
|
|
20
20
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
21
21
|
import { QueryKnowledgeBaseCommandInput, QueryKnowledgeBaseCommandOutput } from "./commands/QueryKnowledgeBaseCommand";
|
|
22
|
+
import { SearchHistoryCommandInput, SearchHistoryCommandOutput } from "./commands/SearchHistoryCommand";
|
|
22
23
|
import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "./commands/SearchKnowledgeBaseCommand";
|
|
23
24
|
import { StartSyncDataSourceCommandInput, StartSyncDataSourceCommandOutput } from "./commands/StartSyncDataSourceCommand";
|
|
24
25
|
import { StopSyncDataSourceCommandInput, StopSyncDataSourceCommandOutput } from "./commands/StopSyncDataSourceCommand";
|
|
@@ -36,11 +37,11 @@ export { __Client };
|
|
|
36
37
|
/**
|
|
37
38
|
* @public
|
|
38
39
|
*/
|
|
39
|
-
export type ServiceInputTypes = CleanDataSourceCommandInput | CloneDataSourceCommandInput | ConfigureDataSourceCommandInput | CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | DescribeDataSourceCommandInput | GetDataSourceCommandInput | GetDocumentCommandInput | GetDocumentPresignedDownloadUrlCommandInput | GetDocumentPresignedUploadUrlCommandInput | GetKnowledgeBaseCommandInput | GetSyncLogsCommandInput | GetSyncStatusCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListKnowledgeBasesCommandInput | QueryKnowledgeBaseCommandInput | SearchKnowledgeBaseCommandInput | StartSyncDataSourceCommandInput | StopSyncDataSourceCommandInput | UpdateDataSourceCommandInput | UpdateDocumentCommandInput | UpdateKnowledgeBaseCommandInput;
|
|
40
|
+
export type ServiceInputTypes = CleanDataSourceCommandInput | CloneDataSourceCommandInput | ConfigureDataSourceCommandInput | CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | DescribeDataSourceCommandInput | GetDataSourceCommandInput | GetDocumentCommandInput | GetDocumentPresignedDownloadUrlCommandInput | GetDocumentPresignedUploadUrlCommandInput | GetKnowledgeBaseCommandInput | GetSyncLogsCommandInput | GetSyncStatusCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListKnowledgeBasesCommandInput | QueryKnowledgeBaseCommandInput | SearchHistoryCommandInput | SearchKnowledgeBaseCommandInput | StartSyncDataSourceCommandInput | StopSyncDataSourceCommandInput | UpdateDataSourceCommandInput | UpdateDocumentCommandInput | UpdateKnowledgeBaseCommandInput;
|
|
40
41
|
/**
|
|
41
42
|
* @public
|
|
42
43
|
*/
|
|
43
|
-
export type ServiceOutputTypes = CleanDataSourceCommandOutput | CloneDataSourceCommandOutput | ConfigureDataSourceCommandOutput | CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | DescribeDataSourceCommandOutput | GetDataSourceCommandOutput | GetDocumentCommandOutput | GetDocumentPresignedDownloadUrlCommandOutput | GetDocumentPresignedUploadUrlCommandOutput | GetKnowledgeBaseCommandOutput | GetSyncLogsCommandOutput | GetSyncStatusCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListKnowledgeBasesCommandOutput | QueryKnowledgeBaseCommandOutput | SearchKnowledgeBaseCommandOutput | StartSyncDataSourceCommandOutput | StopSyncDataSourceCommandOutput | UpdateDataSourceCommandOutput | UpdateDocumentCommandOutput | UpdateKnowledgeBaseCommandOutput;
|
|
44
|
+
export type ServiceOutputTypes = CleanDataSourceCommandOutput | CloneDataSourceCommandOutput | ConfigureDataSourceCommandOutput | CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | DescribeDataSourceCommandOutput | GetDataSourceCommandOutput | GetDocumentCommandOutput | GetDocumentPresignedDownloadUrlCommandOutput | GetDocumentPresignedUploadUrlCommandOutput | GetKnowledgeBaseCommandOutput | GetSyncLogsCommandOutput | GetSyncStatusCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListKnowledgeBasesCommandOutput | QueryKnowledgeBaseCommandOutput | SearchHistoryCommandOutput | SearchKnowledgeBaseCommandOutput | StartSyncDataSourceCommandOutput | StopSyncDataSourceCommandOutput | UpdateDataSourceCommandOutput | UpdateDocumentCommandOutput | UpdateKnowledgeBaseCommandOutput;
|
|
44
45
|
/**
|
|
45
46
|
* @public
|
|
46
47
|
*/
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KnowledgeBaseClient";
|
|
2
|
+
import { SearchHistoryInput, SearchHistoryOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link SearchHistoryCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface SearchHistoryCommandInput extends SearchHistoryInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link SearchHistoryCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface SearchHistoryCommandOutput extends SearchHistoryOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const SearchHistoryCommand_base: {
|
|
25
|
+
new (input: SearchHistoryCommandInput): import("@smithy/smithy-client").CommandImpl<SearchHistoryCommandInput, SearchHistoryCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: SearchHistoryCommandInput): import("@smithy/smithy-client").CommandImpl<SearchHistoryCommandInput, SearchHistoryCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* You can use this endpoint to retrieve the search history of the knowledge base.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { KnowledgeBaseClient, SearchHistoryCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
|
|
35
|
+
* // const { KnowledgeBaseClient, SearchHistoryCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
|
|
36
|
+
* const client = new KnowledgeBaseClient(config);
|
|
37
|
+
* const input = { // SearchHistoryInput
|
|
38
|
+
* companyId: "STRING_VALUE",
|
|
39
|
+
* limit: Number("int"),
|
|
40
|
+
* offset: Number("int"),
|
|
41
|
+
* sort: "STRING_VALUE",
|
|
42
|
+
* filter: { // SearchHistoryFilter
|
|
43
|
+
* knowledgeBaseId: "STRING_VALUE",
|
|
44
|
+
* dataSourceId: "STRING_VALUE",
|
|
45
|
+
* sessionId: "STRING_VALUE",
|
|
46
|
+
* externalSessionId: "STRING_VALUE",
|
|
47
|
+
* searchUser: "STRING_VALUE",
|
|
48
|
+
* mode: "search" || "ai_answer",
|
|
49
|
+
* },
|
|
50
|
+
* search: "STRING_VALUE", // required
|
|
51
|
+
* };
|
|
52
|
+
* const command = new SearchHistoryCommand(input);
|
|
53
|
+
* const response = await client.send(command);
|
|
54
|
+
* // { // SearchHistoryOutput
|
|
55
|
+
* // results: [ // SearchHistoryResults // required
|
|
56
|
+
* // "DOCUMENT_VALUE",
|
|
57
|
+
* // ],
|
|
58
|
+
* // };
|
|
59
|
+
*
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param SearchHistoryCommandInput - {@link SearchHistoryCommandInput}
|
|
63
|
+
* @returns {@link SearchHistoryCommandOutput}
|
|
64
|
+
* @see {@link SearchHistoryCommandInput} for command's `input` shape.
|
|
65
|
+
* @see {@link SearchHistoryCommandOutput} for command's `response` shape.
|
|
66
|
+
* @see {@link KnowledgeBaseClientResolvedConfig | config} for KnowledgeBaseClient's `config` shape.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link ValidationException} (client fault)
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link KnowledgeBaseNotFoundException} (client fault)
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link DataSourceNotFoundException} (client fault)
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link DocumentNotFoundException} (client fault)
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link KnowledgeBaseServiceException}
|
|
81
|
+
* <p>Base exception class for all service exceptions from KnowledgeBase service.</p>
|
|
82
|
+
*
|
|
83
|
+
*
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
export declare class SearchHistoryCommand extends SearchHistoryCommand_base {
|
|
87
|
+
/** @internal type navigation helper, not in runtime. */
|
|
88
|
+
protected static __types: {
|
|
89
|
+
api: {
|
|
90
|
+
input: SearchHistoryInput;
|
|
91
|
+
output: SearchHistoryOutput;
|
|
92
|
+
};
|
|
93
|
+
sdk: {
|
|
94
|
+
input: SearchHistoryCommandInput;
|
|
95
|
+
output: SearchHistoryCommandOutput;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -19,6 +19,7 @@ export * from "./ListDataSourcesCommand";
|
|
|
19
19
|
export * from "./ListDocumentsCommand";
|
|
20
20
|
export * from "./ListKnowledgeBasesCommand";
|
|
21
21
|
export * from "./QueryKnowledgeBaseCommand";
|
|
22
|
+
export * from "./SearchHistoryCommand";
|
|
22
23
|
export * from "./SearchKnowledgeBaseCommand";
|
|
23
24
|
export * from "./StartSyncDataSourceCommand";
|
|
24
25
|
export * from "./StopSyncDataSourceCommand";
|
|
@@ -1482,7 +1482,7 @@ export interface QueryKnowledgeBaseInput {
|
|
|
1482
1482
|
*/
|
|
1483
1483
|
searchUser?: string | undefined;
|
|
1484
1484
|
/**
|
|
1485
|
-
* The external session ID
|
|
1485
|
+
* The external session ID from the client.
|
|
1486
1486
|
* @public
|
|
1487
1487
|
*/
|
|
1488
1488
|
externalSessionId?: string | undefined;
|
|
@@ -1495,6 +1495,86 @@ export interface QueryKnowledgeBaseOutput {
|
|
|
1495
1495
|
metadata: __DocumentType;
|
|
1496
1496
|
sources: __DocumentType;
|
|
1497
1497
|
}
|
|
1498
|
+
/**
|
|
1499
|
+
* @public
|
|
1500
|
+
* @enum
|
|
1501
|
+
*/
|
|
1502
|
+
export declare const SearchHistoryMode: {
|
|
1503
|
+
readonly AI_ANSWER: "ai_answer";
|
|
1504
|
+
readonly SEARCH: "search";
|
|
1505
|
+
};
|
|
1506
|
+
/**
|
|
1507
|
+
* @public
|
|
1508
|
+
*/
|
|
1509
|
+
export type SearchHistoryMode = typeof SearchHistoryMode[keyof typeof SearchHistoryMode];
|
|
1510
|
+
/**
|
|
1511
|
+
* @public
|
|
1512
|
+
*/
|
|
1513
|
+
export interface SearchHistoryFilter {
|
|
1514
|
+
/**
|
|
1515
|
+
* Filter history by the knowledge base ID.
|
|
1516
|
+
* @public
|
|
1517
|
+
*/
|
|
1518
|
+
knowledgeBaseId?: string | undefined;
|
|
1519
|
+
/**
|
|
1520
|
+
* Filter history by the data source ID.
|
|
1521
|
+
* @public
|
|
1522
|
+
*/
|
|
1523
|
+
dataSourceId?: string | undefined;
|
|
1524
|
+
/**
|
|
1525
|
+
* Filter history by the internal session ID.
|
|
1526
|
+
* @public
|
|
1527
|
+
*/
|
|
1528
|
+
sessionId?: string | undefined;
|
|
1529
|
+
/**
|
|
1530
|
+
* Filter history by the external session ID from the client.
|
|
1531
|
+
* @public
|
|
1532
|
+
*/
|
|
1533
|
+
externalSessionId?: string | undefined;
|
|
1534
|
+
/**
|
|
1535
|
+
* Filter history by the user who performs the search in the knowledge base. Example: user@example.com
|
|
1536
|
+
* @public
|
|
1537
|
+
*/
|
|
1538
|
+
searchUser?: string | undefined;
|
|
1539
|
+
/**
|
|
1540
|
+
* Filter history by the mode of the search. Can by 'search' or 'ai_answer'.
|
|
1541
|
+
* @public
|
|
1542
|
+
*/
|
|
1543
|
+
mode?: SearchHistoryMode | undefined;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* @public
|
|
1547
|
+
*/
|
|
1548
|
+
export interface SearchHistoryInput {
|
|
1549
|
+
/**
|
|
1550
|
+
* The unique identifier of the tenant when a service token is used.
|
|
1551
|
+
* @public
|
|
1552
|
+
*/
|
|
1553
|
+
companyId?: string | undefined;
|
|
1554
|
+
limit?: number | undefined;
|
|
1555
|
+
offset?: number | undefined;
|
|
1556
|
+
/**
|
|
1557
|
+
* 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.
|
|
1558
|
+
* @public
|
|
1559
|
+
*/
|
|
1560
|
+
sort?: string | undefined;
|
|
1561
|
+
/**
|
|
1562
|
+
* Filters for the history query. All filters are optional.
|
|
1563
|
+
* @public
|
|
1564
|
+
*/
|
|
1565
|
+
filter: SearchHistoryFilter;
|
|
1566
|
+
/**
|
|
1567
|
+
* The search query string for filtering the history results.
|
|
1568
|
+
* @public
|
|
1569
|
+
*/
|
|
1570
|
+
search: string;
|
|
1571
|
+
}
|
|
1572
|
+
/**
|
|
1573
|
+
* @public
|
|
1574
|
+
*/
|
|
1575
|
+
export interface SearchHistoryOutput {
|
|
1576
|
+
results: (__DocumentType)[];
|
|
1577
|
+
}
|
|
1498
1578
|
/**
|
|
1499
1579
|
* @public
|
|
1500
1580
|
*/
|
|
@@ -19,6 +19,7 @@ import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "../co
|
|
|
19
19
|
import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "../commands/ListDocumentsCommand";
|
|
20
20
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "../commands/ListKnowledgeBasesCommand";
|
|
21
21
|
import { QueryKnowledgeBaseCommandInput, QueryKnowledgeBaseCommandOutput } from "../commands/QueryKnowledgeBaseCommand";
|
|
22
|
+
import { SearchHistoryCommandInput, SearchHistoryCommandOutput } from "../commands/SearchHistoryCommand";
|
|
22
23
|
import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "../commands/SearchKnowledgeBaseCommand";
|
|
23
24
|
import { StartSyncDataSourceCommandInput, StartSyncDataSourceCommandOutput } from "../commands/StartSyncDataSourceCommand";
|
|
24
25
|
import { StopSyncDataSourceCommandInput, StopSyncDataSourceCommandOutput } from "../commands/StopSyncDataSourceCommand";
|
|
@@ -111,6 +112,10 @@ export declare const se_ListKnowledgeBasesCommand: (input: ListKnowledgeBasesCom
|
|
|
111
112
|
* serializeAws_restJson1QueryKnowledgeBaseCommand
|
|
112
113
|
*/
|
|
113
114
|
export declare const se_QueryKnowledgeBaseCommand: (input: QueryKnowledgeBaseCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
115
|
+
/**
|
|
116
|
+
* serializeAws_restJson1SearchHistoryCommand
|
|
117
|
+
*/
|
|
118
|
+
export declare const se_SearchHistoryCommand: (input: SearchHistoryCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
114
119
|
/**
|
|
115
120
|
* serializeAws_restJson1SearchKnowledgeBaseCommand
|
|
116
121
|
*/
|
|
@@ -219,6 +224,10 @@ export declare const de_ListKnowledgeBasesCommand: (output: __HttpResponse, cont
|
|
|
219
224
|
* deserializeAws_restJson1QueryKnowledgeBaseCommand
|
|
220
225
|
*/
|
|
221
226
|
export declare const de_QueryKnowledgeBaseCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<QueryKnowledgeBaseCommandOutput>;
|
|
227
|
+
/**
|
|
228
|
+
* deserializeAws_restJson1SearchHistoryCommand
|
|
229
|
+
*/
|
|
230
|
+
export declare const de_SearchHistoryCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SearchHistoryCommandOutput>;
|
|
222
231
|
/**
|
|
223
232
|
* deserializeAws_restJson1SearchKnowledgeBaseCommand
|
|
224
233
|
*/
|
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.41",
|
|
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",
|