@wildix/wim-knowledge-base-client 0.0.39 → 0.0.40

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.
@@ -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,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_StartSyncDataSourceCommand = exports.de_SearchKnowledgeBaseCommand = 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_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 = 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,29 @@ 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
+ }));
414
+ b.m("POST")
415
+ .h(headers)
416
+ .q(query)
417
+ .b(body);
418
+ return b.build();
419
+ };
420
+ exports.se_SearchHistoryCommand = se_SearchHistoryCommand;
398
421
  const se_SearchKnowledgeBaseCommand = async (input, context) => {
399
422
  const b = (0, core_2.requestBuilder)(input, context);
400
423
  const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
@@ -831,6 +854,21 @@ const de_QueryKnowledgeBaseCommand = async (output, context) => {
831
854
  return contents;
832
855
  };
833
856
  exports.de_QueryKnowledgeBaseCommand = de_QueryKnowledgeBaseCommand;
857
+ const de_SearchHistoryCommand = async (output, context) => {
858
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
859
+ return de_CommandError(output, context);
860
+ }
861
+ const contents = (0, smithy_client_1.map)({
862
+ $metadata: deserializeMetadata(output),
863
+ });
864
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
865
+ const doc = (0, smithy_client_1.take)(data, {
866
+ 'results': _ => de_SearchHistoryResults(_, context),
867
+ });
868
+ Object.assign(contents, doc);
869
+ return contents;
870
+ };
871
+ exports.de_SearchHistoryCommand = de_SearchHistoryCommand;
834
872
  const de_SearchKnowledgeBaseCommand = async (output, context) => {
835
873
  if (output.statusCode !== 200 && output.statusCode >= 300) {
836
874
  return de_CommandError(output, context);
@@ -1149,6 +1187,12 @@ const de_ProxyConfig = (output, context) => {
1149
1187
  'username': smithy_client_1.expectString,
1150
1188
  });
1151
1189
  };
1190
+ const de_SearchHistoryResults = (output, context) => {
1191
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1192
+ return de_Document(entry, context);
1193
+ });
1194
+ return retVal;
1195
+ };
1152
1196
  const de_SearchKnowledgeBaseResult = (output, context) => {
1153
1197
  return (0, smithy_client_1.take)(output, {
1154
1198
  'content': smithy_client_1.expectString,
@@ -1180,6 +1224,7 @@ const _eSI = "externalSessionId";
1180
1224
  const _l = "limit";
1181
1225
  const _o = "offset";
1182
1226
  const _q = "query";
1227
+ const _s = "sort";
1183
1228
  const _sT = "syncType";
1184
1229
  const _sU = "searchUser";
1185
1230
  const _wC = "withContent";
@@ -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,28 @@ 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
+ }));
389
+ b.m("POST")
390
+ .h(headers)
391
+ .q(query)
392
+ .b(body);
393
+ return b.build();
394
+ };
373
395
  export const se_SearchKnowledgeBaseCommand = async (input, context) => {
374
396
  const b = rb(input, context);
375
397
  const headers = map({}, isSerializableHeaderValue, {
@@ -779,6 +801,20 @@ export const de_QueryKnowledgeBaseCommand = async (output, context) => {
779
801
  Object.assign(contents, doc);
780
802
  return contents;
781
803
  };
804
+ export const de_SearchHistoryCommand = async (output, context) => {
805
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
806
+ return de_CommandError(output, context);
807
+ }
808
+ const contents = map({
809
+ $metadata: deserializeMetadata(output),
810
+ });
811
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
812
+ const doc = take(data, {
813
+ 'results': _ => de_SearchHistoryResults(_, context),
814
+ });
815
+ Object.assign(contents, doc);
816
+ return contents;
817
+ };
782
818
  export const de_SearchKnowledgeBaseCommand = async (output, context) => {
783
819
  if (output.statusCode !== 200 && output.statusCode >= 300) {
784
820
  return de_CommandError(output, context);
@@ -1091,6 +1127,12 @@ const de_ProxyConfig = (output, context) => {
1091
1127
  'username': __expectString,
1092
1128
  });
1093
1129
  };
1130
+ const de_SearchHistoryResults = (output, context) => {
1131
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
1132
+ return de_Document(entry, context);
1133
+ });
1134
+ return retVal;
1135
+ };
1094
1136
  const de_SearchKnowledgeBaseResult = (output, context) => {
1095
1137
  return take(output, {
1096
1138
  'content': __expectString,
@@ -1122,6 +1164,7 @@ const _eSI = "externalSessionId";
1122
1164
  const _l = "limit";
1123
1165
  const _o = "offset";
1124
1166
  const _q = "query";
1167
+ const _s = "sort";
1125
1168
  const _sT = "syncType";
1126
1169
  const _sU = "searchUser";
1127
1170
  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,96 @@
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
+ * },
49
+ * };
50
+ * const command = new SearchHistoryCommand(input);
51
+ * const response = await client.send(command);
52
+ * // { // SearchHistoryOutput
53
+ * // results: [ // SearchHistoryResults // required
54
+ * // "DOCUMENT_VALUE",
55
+ * // ],
56
+ * // };
57
+ *
58
+ * ```
59
+ *
60
+ * @param SearchHistoryCommandInput - {@link SearchHistoryCommandInput}
61
+ * @returns {@link SearchHistoryCommandOutput}
62
+ * @see {@link SearchHistoryCommandInput} for command's `input` shape.
63
+ * @see {@link SearchHistoryCommandOutput} for command's `response` shape.
64
+ * @see {@link KnowledgeBaseClientResolvedConfig | config} for KnowledgeBaseClient's `config` shape.
65
+ *
66
+ * @throws {@link ValidationException} (client fault)
67
+ *
68
+ * @throws {@link UnauthorizedException} (client fault)
69
+ *
70
+ * @throws {@link ForbiddenException} (client fault)
71
+ *
72
+ * @throws {@link KnowledgeBaseNotFoundException} (client fault)
73
+ *
74
+ * @throws {@link DataSourceNotFoundException} (client fault)
75
+ *
76
+ * @throws {@link DocumentNotFoundException} (client fault)
77
+ *
78
+ * @throws {@link KnowledgeBaseServiceException}
79
+ * <p>Base exception class for all service exceptions from KnowledgeBase service.</p>
80
+ *
81
+ *
82
+ * @public
83
+ */
84
+ export declare class SearchHistoryCommand extends SearchHistoryCommand_base {
85
+ /** @internal type navigation helper, not in runtime. */
86
+ protected static __types: {
87
+ api: {
88
+ input: SearchHistoryInput;
89
+ output: SearchHistoryOutput;
90
+ };
91
+ sdk: {
92
+ input: SearchHistoryCommandInput;
93
+ output: SearchHistoryCommandOutput;
94
+ };
95
+ };
96
+ }
@@ -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. Used for tracking and analytics purposes.
1485
+ * The external session ID from the client.
1486
1486
  * @public
1487
1487
  */
1488
1488
  externalSessionId?: string | undefined;
@@ -1495,6 +1495,64 @@ export interface QueryKnowledgeBaseOutput {
1495
1495
  metadata: __DocumentType;
1496
1496
  sources: __DocumentType;
1497
1497
  }
1498
+ /**
1499
+ * @public
1500
+ */
1501
+ export interface SearchHistoryFilter {
1502
+ /**
1503
+ * Unique identifier of the knowledge base
1504
+ * @public
1505
+ */
1506
+ knowledgeBaseId?: string | undefined;
1507
+ /**
1508
+ * Unique identifier of the data source
1509
+ * @public
1510
+ */
1511
+ dataSourceId?: string | undefined;
1512
+ /**
1513
+ * The internal session ID. Used for tracking and analytics purposes.
1514
+ * @public
1515
+ */
1516
+ sessionId?: string | undefined;
1517
+ /**
1518
+ * The external session ID from the client.
1519
+ * @public
1520
+ */
1521
+ externalSessionId?: string | undefined;
1522
+ /**
1523
+ * The user who performs the search in the knowledge base. Example: user@example.com
1524
+ * @public
1525
+ */
1526
+ searchUser?: string | undefined;
1527
+ }
1528
+ /**
1529
+ * @public
1530
+ */
1531
+ export interface SearchHistoryInput {
1532
+ /**
1533
+ * The unique identifier of the tenant when a service token is used.
1534
+ * @public
1535
+ */
1536
+ companyId?: string | undefined;
1537
+ limit?: number | undefined;
1538
+ offset?: number | undefined;
1539
+ /**
1540
+ * 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.
1541
+ * @public
1542
+ */
1543
+ sort?: string | undefined;
1544
+ /**
1545
+ * Filters for the history query. All filters are optional.
1546
+ * @public
1547
+ */
1548
+ filter: SearchHistoryFilter;
1549
+ }
1550
+ /**
1551
+ * @public
1552
+ */
1553
+ export interface SearchHistoryOutput {
1554
+ results: (__DocumentType)[];
1555
+ }
1498
1556
  /**
1499
1557
  * @public
1500
1558
  */
@@ -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.39",
4
+ "version": "0.0.40",
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",