@wildix/wim-knowledge-base-client 0.0.62 → 0.0.64
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/ListHistoryStatisticsCommand.js +21 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/protocols/Aws_restJson1.js +37 -2
- package/dist-es/KnowledgeBase.js +2 -0
- package/dist-es/commands/ListHistoryStatisticsCommand.js +17 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +33 -0
- package/dist-types/KnowledgeBase.d.ts +7 -0
- package/dist-types/KnowledgeBaseClient.d.ts +3 -2
- package/dist-types/commands/ListHistoryStatisticsCommand.d.ts +107 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +97 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/package.json +1 -1
|
@@ -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.
|
|
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 = {};
|
|
@@ -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);
|
package/dist-es/KnowledgeBase.js
CHANGED
|
@@ -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 = {};
|
|
@@ -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
|
*/
|
|
@@ -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
|
*/
|
|
@@ -1284,6 +1309,61 @@ export interface GetKnowledgeBaseInput {
|
|
|
1284
1309
|
export interface GetKnowledgeBaseOutput {
|
|
1285
1310
|
knowledgeBase: KnowledgeBaseItem;
|
|
1286
1311
|
}
|
|
1312
|
+
/**
|
|
1313
|
+
* @public
|
|
1314
|
+
*/
|
|
1315
|
+
export interface HistoryStatistics {
|
|
1316
|
+
/**
|
|
1317
|
+
* Total number of all search requests (all time)
|
|
1318
|
+
* @public
|
|
1319
|
+
*/
|
|
1320
|
+
totalRequests: number;
|
|
1321
|
+
/**
|
|
1322
|
+
* Number of search requests in the last N days (where N is daysBack)
|
|
1323
|
+
* @public
|
|
1324
|
+
*/
|
|
1325
|
+
recentRequests: number;
|
|
1326
|
+
/**
|
|
1327
|
+
* Total number of unique users (all time)
|
|
1328
|
+
* @public
|
|
1329
|
+
*/
|
|
1330
|
+
totalUniqueUsers: number;
|
|
1331
|
+
/**
|
|
1332
|
+
* Number of unique users in the last N days
|
|
1333
|
+
* @public
|
|
1334
|
+
*/
|
|
1335
|
+
recentUniqueUsers: number;
|
|
1336
|
+
/**
|
|
1337
|
+
* Number of requests with no results (in the last N days if daysBack specified, otherwise all time)
|
|
1338
|
+
* @public
|
|
1339
|
+
*/
|
|
1340
|
+
noResultsRequests: number;
|
|
1341
|
+
/**
|
|
1342
|
+
* Daily breakdown of statistics for the last N days. Only present if daysBack is specified.
|
|
1343
|
+
* @public
|
|
1344
|
+
*/
|
|
1345
|
+
dailyBreakdown?: (DailyStatistics)[] | undefined;
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* @public
|
|
1349
|
+
*/
|
|
1350
|
+
export interface HistoryStatisticsFilter {
|
|
1351
|
+
/**
|
|
1352
|
+
* Filter history by the knowledge base IDs.
|
|
1353
|
+
* @public
|
|
1354
|
+
*/
|
|
1355
|
+
knowledgeBaseIds?: (string)[] | undefined;
|
|
1356
|
+
/**
|
|
1357
|
+
* Filter history by the data source IDs.
|
|
1358
|
+
* @public
|
|
1359
|
+
*/
|
|
1360
|
+
dataSourceIds?: (string)[] | undefined;
|
|
1361
|
+
/**
|
|
1362
|
+
* Number of days to look back for recent statistics. If not specified, defaults to 7 days.
|
|
1363
|
+
* @public
|
|
1364
|
+
*/
|
|
1365
|
+
daysBack?: number | undefined;
|
|
1366
|
+
}
|
|
1287
1367
|
/**
|
|
1288
1368
|
* @public
|
|
1289
1369
|
*/
|
|
@@ -1415,6 +1495,23 @@ export interface ListDocumentsInput {
|
|
|
1415
1495
|
export interface ListDocumentsOutput {
|
|
1416
1496
|
documents: (DocumentItem)[];
|
|
1417
1497
|
}
|
|
1498
|
+
/**
|
|
1499
|
+
* @public
|
|
1500
|
+
*/
|
|
1501
|
+
export interface ListHistoryStatisticsInput {
|
|
1502
|
+
/**
|
|
1503
|
+
* The unique identifier of the tenant when a service token is used.
|
|
1504
|
+
* @public
|
|
1505
|
+
*/
|
|
1506
|
+
companyId?: string | undefined;
|
|
1507
|
+
filter: HistoryStatisticsFilter;
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* @public
|
|
1511
|
+
*/
|
|
1512
|
+
export interface ListHistoryStatisticsOutput {
|
|
1513
|
+
statistics: HistoryStatistics;
|
|
1514
|
+
}
|
|
1418
1515
|
/**
|
|
1419
1516
|
* @public
|
|
1420
1517
|
*/
|
|
@@ -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.
|
|
4
|
+
"version": "0.0.64",
|
|
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",
|