@wildix/wim-knowledge-base-client 0.0.62 → 0.0.65

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.
@@ -26,6 +26,7 @@ const ListDataSourceStatisticsCommand_1 = require("./commands/ListDataSourceStat
26
26
  const ListDataSourceSynchronizationLogsCommand_1 = require("./commands/ListDataSourceSynchronizationLogsCommand");
27
27
  const ListDataSourcesCommand_1 = require("./commands/ListDataSourcesCommand");
28
28
  const ListDocumentsCommand_1 = require("./commands/ListDocumentsCommand");
29
+ const ListHistoryStatisticsCommand_1 = require("./commands/ListHistoryStatisticsCommand");
29
30
  const ListKnowledgeBasesCommand_1 = require("./commands/ListKnowledgeBasesCommand");
30
31
  const ListSearchQueriesHistoryCommand_1 = require("./commands/ListSearchQueriesHistoryCommand");
31
32
  const SearchKnowledgeBaseCommand_1 = require("./commands/SearchKnowledgeBaseCommand");
@@ -60,6 +61,7 @@ const commands = {
60
61
  ListDataSourceStatisticsCommand: ListDataSourceStatisticsCommand_1.ListDataSourceStatisticsCommand,
61
62
  ListDataSourceSynchronizationLogsCommand: ListDataSourceSynchronizationLogsCommand_1.ListDataSourceSynchronizationLogsCommand,
62
63
  ListDocumentsCommand: ListDocumentsCommand_1.ListDocumentsCommand,
64
+ ListHistoryStatisticsCommand: ListHistoryStatisticsCommand_1.ListHistoryStatisticsCommand,
63
65
  ListKnowledgeBasesCommand: ListKnowledgeBasesCommand_1.ListKnowledgeBasesCommand,
64
66
  ListSearchQueriesHistoryCommand: ListSearchQueriesHistoryCommand_1.ListSearchQueriesHistoryCommand,
65
67
  SearchKnowledgeBaseCommand: SearchKnowledgeBaseCommand_1.SearchKnowledgeBaseCommand,
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListHistoryStatisticsCommand = 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 ListHistoryStatisticsCommand 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", "ListHistoryStatistics", {})
15
+ .n("KnowledgeBaseClient", "ListHistoryStatisticsCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ListHistoryStatisticsCommand)
18
+ .de(Aws_restJson1_1.de_ListHistoryStatisticsCommand)
19
+ .build() {
20
+ }
21
+ exports.ListHistoryStatisticsCommand = ListHistoryStatisticsCommand;
@@ -25,6 +25,7 @@ tslib_1.__exportStar(require("./ListDataSourcesCommand"), exports);
25
25
  tslib_1.__exportStar(require("./ListDataSourceStatisticsCommand"), exports);
26
26
  tslib_1.__exportStar(require("./ListDataSourceSynchronizationLogsCommand"), exports);
27
27
  tslib_1.__exportStar(require("./ListDocumentsCommand"), exports);
28
+ tslib_1.__exportStar(require("./ListHistoryStatisticsCommand"), exports);
28
29
  tslib_1.__exportStar(require("./ListKnowledgeBasesCommand"), exports);
29
30
  tslib_1.__exportStar(require("./ListSearchQueriesHistoryCommand"), exports);
30
31
  tslib_1.__exportStar(require("./SearchKnowledgeBaseCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetDocumentUploadUrlCommand = exports.de_GetDocumentMarkdownCommand = exports.de_GetDocumentDownloadUrlCommand = exports.de_GetDocumentChunksCommand = exports.de_GetDocumentCommand = exports.de_GetDataSourceSyncStatusCommand = exports.de_GetDataSourceCommand = exports.de_GenerateSearchAnswerCommand = 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_ListSearchQueriesHistoryCommand = exports.se_ListKnowledgeBasesCommand = exports.se_ListDocumentsCommand = exports.se_ListDataSourceSynchronizationLogsCommand = exports.se_ListDataSourceStatisticsCommand = exports.se_ListDataSourcesCommand = exports.se_GetKnowledgeBaseCommand = exports.se_GetDocumentWithContentAndChunksCommand = exports.se_GetDocumentUploadUrlCommand = exports.se_GetDocumentMarkdownCommand = exports.se_GetDocumentDownloadUrlCommand = exports.se_GetDocumentChunksCommand = exports.se_GetDocumentCommand = exports.se_GetDataSourceSyncStatusCommand = exports.se_GetDataSourceCommand = exports.se_GenerateSearchAnswerCommand = 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 = exports.de_ListSearchQueriesHistoryCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListDocumentsCommand = exports.de_ListDataSourceSynchronizationLogsCommand = exports.de_ListDataSourceStatisticsCommand = exports.de_ListDataSourcesCommand = exports.de_GetKnowledgeBaseCommand = exports.de_GetDocumentWithContentAndChunksCommand = void 0;
3
+ exports.de_GetDocumentMarkdownCommand = exports.de_GetDocumentDownloadUrlCommand = exports.de_GetDocumentChunksCommand = exports.de_GetDocumentCommand = exports.de_GetDataSourceSyncStatusCommand = exports.de_GetDataSourceCommand = exports.de_GenerateSearchAnswerCommand = 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_ListSearchQueriesHistoryCommand = exports.se_ListKnowledgeBasesCommand = exports.se_ListHistoryStatisticsCommand = exports.se_ListDocumentsCommand = exports.se_ListDataSourceSynchronizationLogsCommand = exports.se_ListDataSourceStatisticsCommand = exports.se_ListDataSourcesCommand = exports.se_GetKnowledgeBaseCommand = exports.se_GetDocumentWithContentAndChunksCommand = exports.se_GetDocumentUploadUrlCommand = exports.se_GetDocumentMarkdownCommand = exports.se_GetDocumentDownloadUrlCommand = exports.se_GetDocumentChunksCommand = exports.se_GetDocumentCommand = exports.se_GetDataSourceSyncStatusCommand = exports.se_GetDataSourceCommand = exports.se_GenerateSearchAnswerCommand = 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 = exports.de_ListSearchQueriesHistoryCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListHistoryStatisticsCommand = exports.de_ListDocumentsCommand = exports.de_ListDataSourceSynchronizationLogsCommand = exports.de_ListDataSourceStatisticsCommand = exports.de_ListDataSourcesCommand = exports.de_GetKnowledgeBaseCommand = exports.de_GetDocumentWithContentAndChunksCommand = exports.de_GetDocumentUploadUrlCommand = 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");
@@ -449,6 +449,26 @@ const se_ListDocumentsCommand = async (input, context) => {
449
449
  return b.build();
450
450
  };
451
451
  exports.se_ListDocumentsCommand = se_ListDocumentsCommand;
452
+ const se_ListHistoryStatisticsCommand = async (input, context) => {
453
+ const b = (0, core_2.requestBuilder)(input, context);
454
+ const headers = {
455
+ 'content-type': 'application/json',
456
+ };
457
+ b.bp("/api/v1/knowledge-bases/history/statistics");
458
+ const query = (0, smithy_client_1.map)({
459
+ [_c]: [, input[_cI]],
460
+ });
461
+ let body;
462
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
463
+ 'filter': _ => (0, smithy_client_1._json)(_),
464
+ }));
465
+ b.m("POST")
466
+ .h(headers)
467
+ .q(query)
468
+ .b(body);
469
+ return b.build();
470
+ };
471
+ exports.se_ListHistoryStatisticsCommand = se_ListHistoryStatisticsCommand;
452
472
  const se_ListKnowledgeBasesCommand = async (input, context) => {
453
473
  const b = (0, core_2.requestBuilder)(input, context);
454
474
  const headers = {};
@@ -797,10 +817,10 @@ const de_GetDataSourceSyncStatusCommand = async (output, context) => {
797
817
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
798
818
  const doc = (0, smithy_client_1.take)(data, {
799
819
  'documentsStats': smithy_client_1._json,
800
- 'lastSyncErrorMessage': smithy_client_1.expectString,
801
- 'lastSyncMode': smithy_client_1.expectString,
802
- 'lastSyncedAt': smithy_client_1.expectString,
803
- 'syncStatus': smithy_client_1.expectString,
820
+ 'error': smithy_client_1.expectString,
821
+ 'mode': smithy_client_1.expectString,
822
+ 'status': smithy_client_1.expectString,
823
+ 'syncedAt': smithy_client_1.expectString,
804
824
  });
805
825
  Object.assign(contents, doc);
806
826
  return contents;
@@ -974,6 +994,21 @@ const de_ListDocumentsCommand = async (output, context) => {
974
994
  return contents;
975
995
  };
976
996
  exports.de_ListDocumentsCommand = de_ListDocumentsCommand;
997
+ const de_ListHistoryStatisticsCommand = async (output, context) => {
998
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
999
+ return de_CommandError(output, context);
1000
+ }
1001
+ const contents = (0, smithy_client_1.map)({
1002
+ $metadata: deserializeMetadata(output),
1003
+ });
1004
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1005
+ const doc = (0, smithy_client_1.take)(data, {
1006
+ 'statistics': smithy_client_1._json,
1007
+ });
1008
+ Object.assign(contents, doc);
1009
+ return contents;
1010
+ };
1011
+ exports.de_ListHistoryStatisticsCommand = de_ListHistoryStatisticsCommand;
977
1012
  const de_ListKnowledgeBasesCommand = async (output, context) => {
978
1013
  if (output.statusCode !== 200 && output.statusCode >= 300) {
979
1014
  return de_CommandError(output, context);
@@ -23,6 +23,7 @@ import { ListDataSourceStatisticsCommand, } from "./commands/ListDataSourceStati
23
23
  import { ListDataSourceSynchronizationLogsCommand, } from "./commands/ListDataSourceSynchronizationLogsCommand";
24
24
  import { ListDataSourcesCommand, } from "./commands/ListDataSourcesCommand";
25
25
  import { ListDocumentsCommand, } from "./commands/ListDocumentsCommand";
26
+ import { ListHistoryStatisticsCommand, } from "./commands/ListHistoryStatisticsCommand";
26
27
  import { ListKnowledgeBasesCommand, } from "./commands/ListKnowledgeBasesCommand";
27
28
  import { ListSearchQueriesHistoryCommand, } from "./commands/ListSearchQueriesHistoryCommand";
28
29
  import { SearchKnowledgeBaseCommand, } from "./commands/SearchKnowledgeBaseCommand";
@@ -57,6 +58,7 @@ const commands = {
57
58
  ListDataSourceStatisticsCommand,
58
59
  ListDataSourceSynchronizationLogsCommand,
59
60
  ListDocumentsCommand,
61
+ ListHistoryStatisticsCommand,
60
62
  ListKnowledgeBasesCommand,
61
63
  ListSearchQueriesHistoryCommand,
62
64
  SearchKnowledgeBaseCommand,
@@ -0,0 +1,17 @@
1
+ import { de_ListHistoryStatisticsCommand, se_ListHistoryStatisticsCommand, } 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 ListHistoryStatisticsCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("KnowledgeBase", "ListHistoryStatistics", {})
12
+ .n("KnowledgeBaseClient", "ListHistoryStatisticsCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_ListHistoryStatisticsCommand)
15
+ .de(de_ListHistoryStatisticsCommand)
16
+ .build() {
17
+ }
@@ -22,6 +22,7 @@ export * from "./ListDataSourcesCommand";
22
22
  export * from "./ListDataSourceStatisticsCommand";
23
23
  export * from "./ListDataSourceSynchronizationLogsCommand";
24
24
  export * from "./ListDocumentsCommand";
25
+ export * from "./ListHistoryStatisticsCommand";
25
26
  export * from "./ListKnowledgeBasesCommand";
26
27
  export * from "./ListSearchQueriesHistoryCommand";
27
28
  export * from "./SearchKnowledgeBaseCommand";
@@ -421,6 +421,25 @@ export const se_ListDocumentsCommand = async (input, context) => {
421
421
  .b(body);
422
422
  return b.build();
423
423
  };
424
+ export const se_ListHistoryStatisticsCommand = async (input, context) => {
425
+ const b = rb(input, context);
426
+ const headers = {
427
+ 'content-type': 'application/json',
428
+ };
429
+ b.bp("/api/v1/knowledge-bases/history/statistics");
430
+ const query = map({
431
+ [_c]: [, input[_cI]],
432
+ });
433
+ let body;
434
+ body = JSON.stringify(take(input, {
435
+ 'filter': _ => _json(_),
436
+ }));
437
+ b.m("POST")
438
+ .h(headers)
439
+ .q(query)
440
+ .b(body);
441
+ return b.build();
442
+ };
424
443
  export const se_ListKnowledgeBasesCommand = async (input, context) => {
425
444
  const b = rb(input, context);
426
445
  const headers = {};
@@ -749,10 +768,10 @@ export const de_GetDataSourceSyncStatusCommand = async (output, context) => {
749
768
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
750
769
  const doc = take(data, {
751
770
  'documentsStats': _json,
752
- 'lastSyncErrorMessage': __expectString,
753
- 'lastSyncMode': __expectString,
754
- 'lastSyncedAt': __expectString,
755
- 'syncStatus': __expectString,
771
+ 'error': __expectString,
772
+ 'mode': __expectString,
773
+ 'status': __expectString,
774
+ 'syncedAt': __expectString,
756
775
  });
757
776
  Object.assign(contents, doc);
758
777
  return contents;
@@ -914,6 +933,20 @@ export const de_ListDocumentsCommand = async (output, context) => {
914
933
  Object.assign(contents, doc);
915
934
  return contents;
916
935
  };
936
+ export const de_ListHistoryStatisticsCommand = async (output, context) => {
937
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
938
+ return de_CommandError(output, context);
939
+ }
940
+ const contents = map({
941
+ $metadata: deserializeMetadata(output),
942
+ });
943
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
944
+ const doc = take(data, {
945
+ 'statistics': _json,
946
+ });
947
+ Object.assign(contents, doc);
948
+ return contents;
949
+ };
917
950
  export const de_ListKnowledgeBasesCommand = async (output, context) => {
918
951
  if (output.statusCode !== 200 && output.statusCode >= 300) {
919
952
  return de_CommandError(output, context);
@@ -23,6 +23,7 @@ import { ListDataSourceStatisticsCommandInput, ListDataSourceStatisticsCommandOu
23
23
  import { ListDataSourceSynchronizationLogsCommandInput, ListDataSourceSynchronizationLogsCommandOutput } from "./commands/ListDataSourceSynchronizationLogsCommand";
24
24
  import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "./commands/ListDataSourcesCommand";
25
25
  import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./commands/ListDocumentsCommand";
26
+ import { ListHistoryStatisticsCommandInput, ListHistoryStatisticsCommandOutput } from "./commands/ListHistoryStatisticsCommand";
26
27
  import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
27
28
  import { ListSearchQueriesHistoryCommandInput, ListSearchQueriesHistoryCommandOutput } from "./commands/ListSearchQueriesHistoryCommand";
28
29
  import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "./commands/SearchKnowledgeBaseCommand";
@@ -178,6 +179,12 @@ export interface KnowledgeBase {
178
179
  listDocuments(args: ListDocumentsCommandInput, options?: __HttpHandlerOptions): Promise<ListDocumentsCommandOutput>;
179
180
  listDocuments(args: ListDocumentsCommandInput, cb: (err: any, data?: ListDocumentsCommandOutput) => void): void;
180
181
  listDocuments(args: ListDocumentsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListDocumentsCommandOutput) => void): void;
182
+ /**
183
+ * @see {@link ListHistoryStatisticsCommand}
184
+ */
185
+ listHistoryStatistics(args: ListHistoryStatisticsCommandInput, options?: __HttpHandlerOptions): Promise<ListHistoryStatisticsCommandOutput>;
186
+ listHistoryStatistics(args: ListHistoryStatisticsCommandInput, cb: (err: any, data?: ListHistoryStatisticsCommandOutput) => void): void;
187
+ listHistoryStatistics(args: ListHistoryStatisticsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListHistoryStatisticsCommandOutput) => void): void;
181
188
  /**
182
189
  * @see {@link ListKnowledgeBasesCommand}
183
190
  */
@@ -22,6 +22,7 @@ import { ListDataSourceStatisticsCommandInput, ListDataSourceStatisticsCommandOu
22
22
  import { ListDataSourceSynchronizationLogsCommandInput, ListDataSourceSynchronizationLogsCommandOutput } from "./commands/ListDataSourceSynchronizationLogsCommand";
23
23
  import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "./commands/ListDataSourcesCommand";
24
24
  import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "./commands/ListDocumentsCommand";
25
+ import { ListHistoryStatisticsCommandInput, ListHistoryStatisticsCommandOutput } from "./commands/ListHistoryStatisticsCommand";
25
26
  import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
26
27
  import { ListSearchQueriesHistoryCommandInput, ListSearchQueriesHistoryCommandOutput } from "./commands/ListSearchQueriesHistoryCommand";
27
28
  import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "./commands/SearchKnowledgeBaseCommand";
@@ -41,11 +42,11 @@ export { __Client };
41
42
  /**
42
43
  * @public
43
44
  */
44
- export type ServiceInputTypes = CleanDataSourceCommandInput | CloneDataSourceCommandInput | ConfigureDataSourceCommandInput | CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | DescribeDataSourceCommandInput | GenerateSearchAnswerCommandInput | GetDataSourceCommandInput | GetDataSourceSyncStatusCommandInput | GetDocumentChunksCommandInput | GetDocumentCommandInput | GetDocumentDownloadUrlCommandInput | GetDocumentMarkdownCommandInput | GetDocumentUploadUrlCommandInput | GetDocumentWithContentAndChunksCommandInput | GetKnowledgeBaseCommandInput | ListDataSourceStatisticsCommandInput | ListDataSourceSynchronizationLogsCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListKnowledgeBasesCommandInput | ListSearchQueriesHistoryCommandInput | SearchKnowledgeBaseCommandInput | StartSyncDataSourceCommandInput | StopSyncDataSourceCommandInput | UpdateDataSourceCommandInput | UpdateDocumentCommandInput | UpdateKnowledgeBaseCommandInput;
45
+ export type ServiceInputTypes = CleanDataSourceCommandInput | CloneDataSourceCommandInput | ConfigureDataSourceCommandInput | CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | DescribeDataSourceCommandInput | GenerateSearchAnswerCommandInput | GetDataSourceCommandInput | GetDataSourceSyncStatusCommandInput | GetDocumentChunksCommandInput | GetDocumentCommandInput | GetDocumentDownloadUrlCommandInput | GetDocumentMarkdownCommandInput | GetDocumentUploadUrlCommandInput | GetDocumentWithContentAndChunksCommandInput | GetKnowledgeBaseCommandInput | ListDataSourceStatisticsCommandInput | ListDataSourceSynchronizationLogsCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListHistoryStatisticsCommandInput | ListKnowledgeBasesCommandInput | ListSearchQueriesHistoryCommandInput | SearchKnowledgeBaseCommandInput | StartSyncDataSourceCommandInput | StopSyncDataSourceCommandInput | UpdateDataSourceCommandInput | UpdateDocumentCommandInput | UpdateKnowledgeBaseCommandInput;
45
46
  /**
46
47
  * @public
47
48
  */
48
- export type ServiceOutputTypes = CleanDataSourceCommandOutput | CloneDataSourceCommandOutput | ConfigureDataSourceCommandOutput | CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | DescribeDataSourceCommandOutput | GenerateSearchAnswerCommandOutput | GetDataSourceCommandOutput | GetDataSourceSyncStatusCommandOutput | GetDocumentChunksCommandOutput | GetDocumentCommandOutput | GetDocumentDownloadUrlCommandOutput | GetDocumentMarkdownCommandOutput | GetDocumentUploadUrlCommandOutput | GetDocumentWithContentAndChunksCommandOutput | GetKnowledgeBaseCommandOutput | ListDataSourceStatisticsCommandOutput | ListDataSourceSynchronizationLogsCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListKnowledgeBasesCommandOutput | ListSearchQueriesHistoryCommandOutput | SearchKnowledgeBaseCommandOutput | StartSyncDataSourceCommandOutput | StopSyncDataSourceCommandOutput | UpdateDataSourceCommandOutput | UpdateDocumentCommandOutput | UpdateKnowledgeBaseCommandOutput;
49
+ export type ServiceOutputTypes = CleanDataSourceCommandOutput | CloneDataSourceCommandOutput | ConfigureDataSourceCommandOutput | CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | DescribeDataSourceCommandOutput | GenerateSearchAnswerCommandOutput | GetDataSourceCommandOutput | GetDataSourceSyncStatusCommandOutput | GetDocumentChunksCommandOutput | GetDocumentCommandOutput | GetDocumentDownloadUrlCommandOutput | GetDocumentMarkdownCommandOutput | GetDocumentUploadUrlCommandOutput | GetDocumentWithContentAndChunksCommandOutput | GetKnowledgeBaseCommandOutput | ListDataSourceStatisticsCommandOutput | ListDataSourceSynchronizationLogsCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListHistoryStatisticsCommandOutput | ListKnowledgeBasesCommandOutput | ListSearchQueriesHistoryCommandOutput | SearchKnowledgeBaseCommandOutput | StartSyncDataSourceCommandOutput | StopSyncDataSourceCommandOutput | UpdateDataSourceCommandOutput | UpdateDocumentCommandOutput | UpdateKnowledgeBaseCommandOutput;
49
50
  /**
50
51
  * @public
51
52
  */
@@ -41,10 +41,10 @@ declare const GetDataSourceSyncStatusCommand_base: {
41
41
  * const command = new GetDataSourceSyncStatusCommand(input);
42
42
  * const response = await client.send(command);
43
43
  * // { // GetDataSourceSyncStatusOutput
44
- * // syncStatus: "idle" || "running" || "success" || "failed", // required
45
- * // lastSyncedAt: "STRING_VALUE",
46
- * // lastSyncMode: "full" || "incremental",
47
- * // lastSyncErrorMessage: "STRING_VALUE",
44
+ * // status: "idle" || "running" || "success" || "failed", // required
45
+ * // syncedAt: "STRING_VALUE",
46
+ * // mode: "full" || "incremental",
47
+ * // error: "STRING_VALUE",
48
48
  * // documentsStats: { // SyncStatusStats
49
49
  * // "<keys>": Number("int"),
50
50
  * // },
@@ -0,0 +1,107 @@
1
+ import { KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KnowledgeBaseClient";
2
+ import { ListHistoryStatisticsInput, ListHistoryStatisticsOutput } 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 ListHistoryStatisticsCommand}.
14
+ */
15
+ export interface ListHistoryStatisticsCommandInput extends ListHistoryStatisticsInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListHistoryStatisticsCommand}.
21
+ */
22
+ export interface ListHistoryStatisticsCommandOutput extends ListHistoryStatisticsOutput, __MetadataBearer {
23
+ }
24
+ declare const ListHistoryStatisticsCommand_base: {
25
+ new (input: ListHistoryStatisticsCommandInput): import("@smithy/smithy-client").CommandImpl<ListHistoryStatisticsCommandInput, ListHistoryStatisticsCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: ListHistoryStatisticsCommandInput): import("@smithy/smithy-client").CommandImpl<ListHistoryStatisticsCommandInput, ListHistoryStatisticsCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * You can use this endpoint to retrieve the search history statistics.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { KnowledgeBaseClient, ListHistoryStatisticsCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
35
+ * // const { KnowledgeBaseClient, ListHistoryStatisticsCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
36
+ * const client = new KnowledgeBaseClient(config);
37
+ * const input = { // ListHistoryStatisticsInput
38
+ * companyId: "STRING_VALUE",
39
+ * filter: { // HistoryStatisticsFilter
40
+ * knowledgeBaseIds: [ // StringList
41
+ * "STRING_VALUE",
42
+ * ],
43
+ * dataSourceIds: [
44
+ * "STRING_VALUE",
45
+ * ],
46
+ * daysBack: Number("int"),
47
+ * },
48
+ * };
49
+ * const command = new ListHistoryStatisticsCommand(input);
50
+ * const response = await client.send(command);
51
+ * // { // ListHistoryStatisticsOutput
52
+ * // statistics: { // HistoryStatistics
53
+ * // totalRequests: Number("int"), // required
54
+ * // recentRequests: Number("int"), // required
55
+ * // totalUniqueUsers: Number("int"), // required
56
+ * // recentUniqueUsers: Number("int"), // required
57
+ * // noResultsRequests: Number("int"), // required
58
+ * // dailyBreakdown: [ // DailyStatisticsList
59
+ * // { // DailyStatistics
60
+ * // date: "STRING_VALUE", // required
61
+ * // requests: Number("int"), // required
62
+ * // uniqueUsers: Number("int"), // required
63
+ * // noResultsRequests: Number("int"), // required
64
+ * // },
65
+ * // ],
66
+ * // },
67
+ * // };
68
+ *
69
+ * ```
70
+ *
71
+ * @param ListHistoryStatisticsCommandInput - {@link ListHistoryStatisticsCommandInput}
72
+ * @returns {@link ListHistoryStatisticsCommandOutput}
73
+ * @see {@link ListHistoryStatisticsCommandInput} for command's `input` shape.
74
+ * @see {@link ListHistoryStatisticsCommandOutput} for command's `response` shape.
75
+ * @see {@link KnowledgeBaseClientResolvedConfig | config} for KnowledgeBaseClient's `config` shape.
76
+ *
77
+ * @throws {@link ValidationException} (client fault)
78
+ *
79
+ * @throws {@link UnauthorizedException} (client fault)
80
+ *
81
+ * @throws {@link ForbiddenException} (client fault)
82
+ *
83
+ * @throws {@link KnowledgeBaseNotFoundException} (client fault)
84
+ *
85
+ * @throws {@link DataSourceNotFoundException} (client fault)
86
+ *
87
+ * @throws {@link DocumentNotFoundException} (client fault)
88
+ *
89
+ * @throws {@link KnowledgeBaseServiceException}
90
+ * <p>Base exception class for all service exceptions from KnowledgeBase service.</p>
91
+ *
92
+ *
93
+ * @public
94
+ */
95
+ export declare class ListHistoryStatisticsCommand extends ListHistoryStatisticsCommand_base {
96
+ /** @internal type navigation helper, not in runtime. */
97
+ protected static __types: {
98
+ api: {
99
+ input: ListHistoryStatisticsInput;
100
+ output: ListHistoryStatisticsOutput;
101
+ };
102
+ sdk: {
103
+ input: ListHistoryStatisticsCommandInput;
104
+ output: ListHistoryStatisticsCommandOutput;
105
+ };
106
+ };
107
+ }
@@ -22,6 +22,7 @@ export * from "./ListDataSourcesCommand";
22
22
  export * from "./ListDataSourceStatisticsCommand";
23
23
  export * from "./ListDataSourceSynchronizationLogsCommand";
24
24
  export * from "./ListDocumentsCommand";
25
+ export * from "./ListHistoryStatisticsCommand";
25
26
  export * from "./ListKnowledgeBasesCommand";
26
27
  export * from "./ListSearchQueriesHistoryCommand";
27
28
  export * from "./SearchKnowledgeBaseCommand";
@@ -624,6 +624,31 @@ export interface KnowledgeBaseItem {
624
624
  export interface CreateKnowledgeBaseOutput {
625
625
  knowledgeBase: KnowledgeBaseItem;
626
626
  }
627
+ /**
628
+ * @public
629
+ */
630
+ export interface DailyStatistics {
631
+ /**
632
+ * Date in format yyyy-MM-dd
633
+ * @public
634
+ */
635
+ date: string;
636
+ /**
637
+ * Number of search requests on this day
638
+ * @public
639
+ */
640
+ requests: number;
641
+ /**
642
+ * Number of unique users on this day
643
+ * @public
644
+ */
645
+ uniqueUsers: number;
646
+ /**
647
+ * Number of requests with no results on this day
648
+ * @public
649
+ */
650
+ noResultsRequests: number;
651
+ }
627
652
  /**
628
653
  * @public
629
654
  */
@@ -1099,10 +1124,30 @@ export type SyncDataSourceStatus = typeof SyncDataSourceStatus[keyof typeof Sync
1099
1124
  * @public
1100
1125
  */
1101
1126
  export interface GetDataSourceSyncStatusOutput {
1102
- syncStatus: SyncDataSourceStatus;
1103
- lastSyncedAt?: string | undefined;
1104
- lastSyncMode?: SyncDataSourceMode | undefined;
1105
- lastSyncErrorMessage?: string | undefined;
1127
+ /**
1128
+ * The current status of the data source synchronization.
1129
+ * @public
1130
+ */
1131
+ status: SyncDataSourceStatus;
1132
+ /**
1133
+ * Timestamp when the data source was last synced (ISO 8601 format). Example: 2021-01-01T00:00:00Z
1134
+ * @public
1135
+ */
1136
+ syncedAt?: string | undefined;
1137
+ /**
1138
+ * The synchronization mode used for the last sync.
1139
+ * @public
1140
+ */
1141
+ mode?: SyncDataSourceMode | undefined;
1142
+ /**
1143
+ * The error message from the last sync, if any.
1144
+ * @public
1145
+ */
1146
+ error?: string | undefined;
1147
+ /**
1148
+ * The statistics of the documents in the data source.
1149
+ * @public
1150
+ */
1106
1151
  documentsStats?: Partial<Record<DocumentStatus, number>> | undefined;
1107
1152
  }
1108
1153
  /**
@@ -1284,6 +1329,61 @@ export interface GetKnowledgeBaseInput {
1284
1329
  export interface GetKnowledgeBaseOutput {
1285
1330
  knowledgeBase: KnowledgeBaseItem;
1286
1331
  }
1332
+ /**
1333
+ * @public
1334
+ */
1335
+ export interface HistoryStatistics {
1336
+ /**
1337
+ * Total number of all search requests (all time)
1338
+ * @public
1339
+ */
1340
+ totalRequests: number;
1341
+ /**
1342
+ * Number of search requests in the last N days (where N is daysBack)
1343
+ * @public
1344
+ */
1345
+ recentRequests: number;
1346
+ /**
1347
+ * Total number of unique users (all time)
1348
+ * @public
1349
+ */
1350
+ totalUniqueUsers: number;
1351
+ /**
1352
+ * Number of unique users in the last N days
1353
+ * @public
1354
+ */
1355
+ recentUniqueUsers: number;
1356
+ /**
1357
+ * Number of requests with no results (in the last N days if daysBack specified, otherwise all time)
1358
+ * @public
1359
+ */
1360
+ noResultsRequests: number;
1361
+ /**
1362
+ * Daily breakdown of statistics for the last N days. Only present if daysBack is specified.
1363
+ * @public
1364
+ */
1365
+ dailyBreakdown?: (DailyStatistics)[] | undefined;
1366
+ }
1367
+ /**
1368
+ * @public
1369
+ */
1370
+ export interface HistoryStatisticsFilter {
1371
+ /**
1372
+ * Filter history by the knowledge base IDs.
1373
+ * @public
1374
+ */
1375
+ knowledgeBaseIds?: (string)[] | undefined;
1376
+ /**
1377
+ * Filter history by the data source IDs.
1378
+ * @public
1379
+ */
1380
+ dataSourceIds?: (string)[] | undefined;
1381
+ /**
1382
+ * Number of days to look back for recent statistics. If not specified, defaults to 7 days.
1383
+ * @public
1384
+ */
1385
+ daysBack?: number | undefined;
1386
+ }
1287
1387
  /**
1288
1388
  * @public
1289
1389
  */
@@ -1415,6 +1515,23 @@ export interface ListDocumentsInput {
1415
1515
  export interface ListDocumentsOutput {
1416
1516
  documents: (DocumentItem)[];
1417
1517
  }
1518
+ /**
1519
+ * @public
1520
+ */
1521
+ export interface ListHistoryStatisticsInput {
1522
+ /**
1523
+ * The unique identifier of the tenant when a service token is used.
1524
+ * @public
1525
+ */
1526
+ companyId?: string | undefined;
1527
+ filter: HistoryStatisticsFilter;
1528
+ }
1529
+ /**
1530
+ * @public
1531
+ */
1532
+ export interface ListHistoryStatisticsOutput {
1533
+ statistics: HistoryStatistics;
1534
+ }
1418
1535
  /**
1419
1536
  * @public
1420
1537
  */
@@ -22,6 +22,7 @@ import { ListDataSourceStatisticsCommandInput, ListDataSourceStatisticsCommandOu
22
22
  import { ListDataSourceSynchronizationLogsCommandInput, ListDataSourceSynchronizationLogsCommandOutput } from "../commands/ListDataSourceSynchronizationLogsCommand";
23
23
  import { ListDataSourcesCommandInput, ListDataSourcesCommandOutput } from "../commands/ListDataSourcesCommand";
24
24
  import { ListDocumentsCommandInput, ListDocumentsCommandOutput } from "../commands/ListDocumentsCommand";
25
+ import { ListHistoryStatisticsCommandInput, ListHistoryStatisticsCommandOutput } from "../commands/ListHistoryStatisticsCommand";
25
26
  import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "../commands/ListKnowledgeBasesCommand";
26
27
  import { ListSearchQueriesHistoryCommandInput, ListSearchQueriesHistoryCommandOutput } from "../commands/ListSearchQueriesHistoryCommand";
27
28
  import { SearchKnowledgeBaseCommandInput, SearchKnowledgeBaseCommandOutput } from "../commands/SearchKnowledgeBaseCommand";
@@ -128,6 +129,10 @@ export declare const se_ListDataSourceSynchronizationLogsCommand: (input: ListDa
128
129
  * serializeAws_restJson1ListDocumentsCommand
129
130
  */
130
131
  export declare const se_ListDocumentsCommand: (input: ListDocumentsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
132
+ /**
133
+ * serializeAws_restJson1ListHistoryStatisticsCommand
134
+ */
135
+ export declare const se_ListHistoryStatisticsCommand: (input: ListHistoryStatisticsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
131
136
  /**
132
137
  * serializeAws_restJson1ListKnowledgeBasesCommand
133
138
  */
@@ -256,6 +261,10 @@ export declare const de_ListDataSourceSynchronizationLogsCommand: (output: __Htt
256
261
  * deserializeAws_restJson1ListDocumentsCommand
257
262
  */
258
263
  export declare const de_ListDocumentsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListDocumentsCommandOutput>;
264
+ /**
265
+ * deserializeAws_restJson1ListHistoryStatisticsCommand
266
+ */
267
+ export declare const de_ListHistoryStatisticsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListHistoryStatisticsCommandOutput>;
259
268
  /**
260
269
  * deserializeAws_restJson1ListKnowledgeBasesCommand
261
270
  */
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.62",
4
+ "version": "0.0.65",
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",