@wildix/wim-knowledge-base-client 0.1.0 → 0.1.2
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/protocols/Aws_restJson1.js +5 -2
- package/dist-es/protocols/Aws_restJson1.js +5 -2
- package/dist-types/commands/ListDataSourceSynchronizationLogsCommand.d.ts +5 -0
- package/dist-types/commands/ListDocumentsCommand.d.ts +5 -0
- package/dist-types/commands/ListSearchQueriesHistoryCommand.d.ts +9 -4
- package/dist-types/models/models_0.d.ts +28 -5
- package/package.json +1 -1
|
@@ -974,6 +974,7 @@ const de_ListDataSourceSynchronizationLogsCommand = async (output, context) => {
|
|
|
974
974
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
975
975
|
const doc = (0, smithy_client_1.take)(data, {
|
|
976
976
|
'logs': smithy_client_1._json,
|
|
977
|
+
'metadata': smithy_client_1._json,
|
|
977
978
|
});
|
|
978
979
|
Object.assign(contents, doc);
|
|
979
980
|
return contents;
|
|
@@ -989,6 +990,7 @@ const de_ListDocumentsCommand = async (output, context) => {
|
|
|
989
990
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
990
991
|
const doc = (0, smithy_client_1.take)(data, {
|
|
991
992
|
'documents': smithy_client_1._json,
|
|
993
|
+
'metadata': smithy_client_1._json,
|
|
992
994
|
});
|
|
993
995
|
Object.assign(contents, doc);
|
|
994
996
|
return contents;
|
|
@@ -1034,6 +1036,7 @@ const de_ListSearchQueriesHistoryCommand = async (output, context) => {
|
|
|
1034
1036
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
1035
1037
|
const doc = (0, smithy_client_1.take)(data, {
|
|
1036
1038
|
'history': _ => de_SearchHistoryList(_, context),
|
|
1039
|
+
'metadata': smithy_client_1._json,
|
|
1037
1040
|
});
|
|
1038
1041
|
Object.assign(contents, doc);
|
|
1039
1042
|
return contents;
|
|
@@ -1343,13 +1346,13 @@ const de_SearchHistoryList = (output, context) => {
|
|
|
1343
1346
|
};
|
|
1344
1347
|
const de_SearchHistoryRequest = (output, context) => {
|
|
1345
1348
|
return (0, smithy_client_1.take)(output, {
|
|
1346
|
-
'externalSessionId': smithy_client_1.expectString,
|
|
1347
1349
|
'knowledgeBaseId': smithy_client_1.expectString,
|
|
1348
1350
|
'query': smithy_client_1.expectString,
|
|
1349
1351
|
'searchLimit': smithy_client_1.expectInt32,
|
|
1350
1352
|
'searchStrategy': smithy_client_1.expectString,
|
|
1351
1353
|
'searchThreshold': smithy_client_1.limitedParseDouble,
|
|
1352
|
-
'
|
|
1354
|
+
'sessionUri': smithy_client_1.expectString,
|
|
1355
|
+
'sessionUser': smithy_client_1.expectString,
|
|
1353
1356
|
});
|
|
1354
1357
|
};
|
|
1355
1358
|
const de_SearchHistoryResultItem = (output, context) => {
|
|
@@ -915,6 +915,7 @@ export const de_ListDataSourceSynchronizationLogsCommand = async (output, contex
|
|
|
915
915
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
916
916
|
const doc = take(data, {
|
|
917
917
|
'logs': _json,
|
|
918
|
+
'metadata': _json,
|
|
918
919
|
});
|
|
919
920
|
Object.assign(contents, doc);
|
|
920
921
|
return contents;
|
|
@@ -929,6 +930,7 @@ export const de_ListDocumentsCommand = async (output, context) => {
|
|
|
929
930
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
930
931
|
const doc = take(data, {
|
|
931
932
|
'documents': _json,
|
|
933
|
+
'metadata': _json,
|
|
932
934
|
});
|
|
933
935
|
Object.assign(contents, doc);
|
|
934
936
|
return contents;
|
|
@@ -971,6 +973,7 @@ export const de_ListSearchQueriesHistoryCommand = async (output, context) => {
|
|
|
971
973
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
972
974
|
const doc = take(data, {
|
|
973
975
|
'history': _ => de_SearchHistoryList(_, context),
|
|
976
|
+
'metadata': _json,
|
|
974
977
|
});
|
|
975
978
|
Object.assign(contents, doc);
|
|
976
979
|
return contents;
|
|
@@ -1273,13 +1276,13 @@ const de_SearchHistoryList = (output, context) => {
|
|
|
1273
1276
|
};
|
|
1274
1277
|
const de_SearchHistoryRequest = (output, context) => {
|
|
1275
1278
|
return take(output, {
|
|
1276
|
-
'externalSessionId': __expectString,
|
|
1277
1279
|
'knowledgeBaseId': __expectString,
|
|
1278
1280
|
'query': __expectString,
|
|
1279
1281
|
'searchLimit': __expectInt32,
|
|
1280
1282
|
'searchStrategy': __expectString,
|
|
1281
1283
|
'searchThreshold': __limitedParseDouble,
|
|
1282
|
-
'
|
|
1284
|
+
'sessionUri': __expectString,
|
|
1285
|
+
'sessionUser': __expectString,
|
|
1283
1286
|
});
|
|
1284
1287
|
};
|
|
1285
1288
|
const de_SearchHistoryResultItem = (output, context) => {
|
|
@@ -53,6 +53,11 @@ declare const ListDataSourceSynchronizationLogsCommand_base: {
|
|
|
53
53
|
* // message: "STRING_VALUE", // required
|
|
54
54
|
* // },
|
|
55
55
|
* // ],
|
|
56
|
+
* // metadata: { // PaginationMetadata
|
|
57
|
+
* // total: Number("int"), // required
|
|
58
|
+
* // limit: Number("int"),
|
|
59
|
+
* // offset: Number("int"),
|
|
60
|
+
* // },
|
|
56
61
|
* // };
|
|
57
62
|
*
|
|
58
63
|
* ```
|
|
@@ -65,6 +65,11 @@ declare const ListDocumentsCommand_base: {
|
|
|
65
65
|
* // errorMessage: "STRING_VALUE",
|
|
66
66
|
* // },
|
|
67
67
|
* // ],
|
|
68
|
+
* // metadata: { // PaginationMetadata
|
|
69
|
+
* // total: Number("int"), // required
|
|
70
|
+
* // limit: Number("int"),
|
|
71
|
+
* // offset: Number("int"),
|
|
72
|
+
* // },
|
|
68
73
|
* // };
|
|
69
74
|
*
|
|
70
75
|
* ```
|
|
@@ -43,8 +43,8 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
43
43
|
* knowledgeBaseId: "STRING_VALUE",
|
|
44
44
|
* dataSourceId: "STRING_VALUE",
|
|
45
45
|
* sessionId: "STRING_VALUE",
|
|
46
|
-
*
|
|
47
|
-
*
|
|
46
|
+
* sessionUri: "STRING_VALUE",
|
|
47
|
+
* sessionUser: "STRING_VALUE",
|
|
48
48
|
* withEmptyResults: true || false,
|
|
49
49
|
* },
|
|
50
50
|
* search: "STRING_VALUE",
|
|
@@ -59,8 +59,8 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
59
59
|
* // companyId: "STRING_VALUE", // required
|
|
60
60
|
* // request: { // SearchHistoryRequest
|
|
61
61
|
* // query: "STRING_VALUE", // required
|
|
62
|
-
* //
|
|
63
|
-
* //
|
|
62
|
+
* // sessionUser: "STRING_VALUE", // required
|
|
63
|
+
* // sessionUri: "STRING_VALUE", // required
|
|
64
64
|
* // knowledgeBaseId: "STRING_VALUE", // required
|
|
65
65
|
* // searchStrategy: "bm25" || "vector" || "hybrid", // required
|
|
66
66
|
* // searchLimit: Number("int"), // required
|
|
@@ -122,6 +122,11 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
122
122
|
* // resultsCount: Number("int"), // required
|
|
123
123
|
* // },
|
|
124
124
|
* // ],
|
|
125
|
+
* // metadata: { // PaginationMetadata
|
|
126
|
+
* // total: Number("int"), // required
|
|
127
|
+
* // limit: Number("int"),
|
|
128
|
+
* // offset: Number("int"),
|
|
129
|
+
* // },
|
|
125
130
|
* // };
|
|
126
131
|
*
|
|
127
132
|
* ```
|
|
@@ -1481,11 +1481,32 @@ export interface SyncLogItem {
|
|
|
1481
1481
|
level: SyncLogLevel;
|
|
1482
1482
|
message: string;
|
|
1483
1483
|
}
|
|
1484
|
+
/**
|
|
1485
|
+
* @public
|
|
1486
|
+
*/
|
|
1487
|
+
export interface PaginationMetadata {
|
|
1488
|
+
/**
|
|
1489
|
+
* The total number of results.
|
|
1490
|
+
* @public
|
|
1491
|
+
*/
|
|
1492
|
+
total: number;
|
|
1493
|
+
/**
|
|
1494
|
+
* The number of results per page.
|
|
1495
|
+
* @public
|
|
1496
|
+
*/
|
|
1497
|
+
limit?: number | undefined;
|
|
1498
|
+
/**
|
|
1499
|
+
* The offset from which to start the results.
|
|
1500
|
+
* @public
|
|
1501
|
+
*/
|
|
1502
|
+
offset?: number | undefined;
|
|
1503
|
+
}
|
|
1484
1504
|
/**
|
|
1485
1505
|
* @public
|
|
1486
1506
|
*/
|
|
1487
1507
|
export interface ListDataSourceSynchronizationLogsOutput {
|
|
1488
1508
|
logs: (SyncLogItem)[];
|
|
1509
|
+
metadata: PaginationMetadata;
|
|
1489
1510
|
}
|
|
1490
1511
|
/**
|
|
1491
1512
|
* @public
|
|
@@ -1519,6 +1540,7 @@ export interface ListDocumentsInput {
|
|
|
1519
1540
|
*/
|
|
1520
1541
|
export interface ListDocumentsOutput {
|
|
1521
1542
|
documents: (DocumentItem)[];
|
|
1543
|
+
metadata: PaginationMetadata;
|
|
1522
1544
|
}
|
|
1523
1545
|
/**
|
|
1524
1546
|
* @public
|
|
@@ -1573,15 +1595,15 @@ export interface SearchHistoryFilter {
|
|
|
1573
1595
|
*/
|
|
1574
1596
|
sessionId?: string | undefined;
|
|
1575
1597
|
/**
|
|
1576
|
-
* Filter history by the
|
|
1598
|
+
* Filter history by the session URI. Used for tracking and analytics purposes. Example: chatbots://\{agentId\}/id-of-chat-session/id-of-message
|
|
1577
1599
|
* @public
|
|
1578
1600
|
*/
|
|
1579
|
-
|
|
1601
|
+
sessionUri?: string | undefined;
|
|
1580
1602
|
/**
|
|
1581
1603
|
* Filter history by the user who performs the search in the knowledge base. Example: user@example.com
|
|
1582
1604
|
* @public
|
|
1583
1605
|
*/
|
|
1584
|
-
|
|
1606
|
+
sessionUser?: string | undefined;
|
|
1585
1607
|
/**
|
|
1586
1608
|
* Whether to include the history results with empty results.
|
|
1587
1609
|
* @public
|
|
@@ -1638,8 +1660,8 @@ export type SearchStrategy = typeof SearchStrategy[keyof typeof SearchStrategy];
|
|
|
1638
1660
|
*/
|
|
1639
1661
|
export interface SearchHistoryRequest {
|
|
1640
1662
|
query: string;
|
|
1641
|
-
|
|
1642
|
-
|
|
1663
|
+
sessionUser: string;
|
|
1664
|
+
sessionUri: string;
|
|
1643
1665
|
/**
|
|
1644
1666
|
* Unique identifier of the knowledge base
|
|
1645
1667
|
* @public
|
|
@@ -1768,6 +1790,7 @@ export interface SearchHistoryItem {
|
|
|
1768
1790
|
*/
|
|
1769
1791
|
export interface ListSearchQueriesHistoryOutput {
|
|
1770
1792
|
history: (SearchHistoryItem)[];
|
|
1793
|
+
metadata: PaginationMetadata;
|
|
1771
1794
|
}
|
|
1772
1795
|
/**
|
|
1773
1796
|
* @public
|
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.1.
|
|
4
|
+
"version": "0.1.2",
|
|
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",
|