@wildix/wim-knowledge-base-client 0.0.56 → 0.0.60
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.
|
@@ -480,6 +480,7 @@ const se_ListSearchQueriesHistoryCommand = async (input, context) => {
|
|
|
480
480
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
481
481
|
'filter': _ => (0, smithy_client_1._json)(_),
|
|
482
482
|
'search': [],
|
|
483
|
+
'withContent': [],
|
|
483
484
|
}));
|
|
484
485
|
b.m("POST")
|
|
485
486
|
.h(headers)
|
|
@@ -1287,11 +1288,11 @@ const de_DescribeDataSourceResult = (output, context) => {
|
|
|
1287
1288
|
};
|
|
1288
1289
|
const de_SearchHistoryItem = (output, context) => {
|
|
1289
1290
|
return (0, smithy_client_1.take)(output, {
|
|
1290
|
-
'chunksCount': smithy_client_1.expectInt32,
|
|
1291
1291
|
'companyId': smithy_client_1.expectString,
|
|
1292
|
-
'createdAt':
|
|
1292
|
+
'createdAt': smithy_client_1.expectString,
|
|
1293
1293
|
'request': (_) => de_SearchHistoryRequest(_, context),
|
|
1294
1294
|
'results': (_) => de_SearchHistoryResultsList(_, context),
|
|
1295
|
+
'resultsCount': smithy_client_1.expectInt32,
|
|
1295
1296
|
'sessionId': smithy_client_1.expectString,
|
|
1296
1297
|
'stages': smithy_client_1._json,
|
|
1297
1298
|
'totalDuration': smithy_client_1.expectInt32,
|
|
@@ -1314,9 +1315,24 @@ const de_SearchHistoryRequest = (output, context) => {
|
|
|
1314
1315
|
'user': smithy_client_1.expectString,
|
|
1315
1316
|
});
|
|
1316
1317
|
};
|
|
1318
|
+
const de_SearchHistoryResultItem = (output, context) => {
|
|
1319
|
+
return (0, smithy_client_1.take)(output, {
|
|
1320
|
+
'chunkId': smithy_client_1.expectString,
|
|
1321
|
+
'content': smithy_client_1.expectString,
|
|
1322
|
+
'dataSourceId': smithy_client_1.expectString,
|
|
1323
|
+
'dataSourceType': smithy_client_1.expectString,
|
|
1324
|
+
'documentHierarchy': smithy_client_1._json,
|
|
1325
|
+
'documentId': smithy_client_1.expectString,
|
|
1326
|
+
'documentTitle': smithy_client_1.expectString,
|
|
1327
|
+
'documentUrl': smithy_client_1.expectString,
|
|
1328
|
+
'fullTextScore': smithy_client_1.limitedParseDouble,
|
|
1329
|
+
'score': smithy_client_1.limitedParseDouble,
|
|
1330
|
+
'semanticScore': smithy_client_1.limitedParseDouble,
|
|
1331
|
+
});
|
|
1332
|
+
};
|
|
1317
1333
|
const de_SearchHistoryResultsList = (output, context) => {
|
|
1318
1334
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1319
|
-
return
|
|
1335
|
+
return de_SearchHistoryResultItem(entry, context);
|
|
1320
1336
|
});
|
|
1321
1337
|
return retVal;
|
|
1322
1338
|
};
|
|
@@ -2,7 +2,7 @@ import { KnowledgeBaseServiceException as __BaseException } from "../models/Know
|
|
|
2
2
|
import { DataSourceConfig, DataSourceNotFoundException, DocumentNotFoundException, ForbiddenException, KnowledgeBaseNotFoundException, UnauthorizedException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull,
|
|
5
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
6
|
export const se_CleanDataSourceCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {};
|
|
@@ -451,6 +451,7 @@ export const se_ListSearchQueriesHistoryCommand = async (input, context) => {
|
|
|
451
451
|
body = JSON.stringify(take(input, {
|
|
452
452
|
'filter': _ => _json(_),
|
|
453
453
|
'search': [],
|
|
454
|
+
'withContent': [],
|
|
454
455
|
}));
|
|
455
456
|
b.m("POST")
|
|
456
457
|
.h(headers)
|
|
@@ -1219,11 +1220,11 @@ const de_DescribeDataSourceResult = (output, context) => {
|
|
|
1219
1220
|
};
|
|
1220
1221
|
const de_SearchHistoryItem = (output, context) => {
|
|
1221
1222
|
return take(output, {
|
|
1222
|
-
'chunksCount': __expectInt32,
|
|
1223
1223
|
'companyId': __expectString,
|
|
1224
|
-
'createdAt':
|
|
1224
|
+
'createdAt': __expectString,
|
|
1225
1225
|
'request': (_) => de_SearchHistoryRequest(_, context),
|
|
1226
1226
|
'results': (_) => de_SearchHistoryResultsList(_, context),
|
|
1227
|
+
'resultsCount': __expectInt32,
|
|
1227
1228
|
'sessionId': __expectString,
|
|
1228
1229
|
'stages': _json,
|
|
1229
1230
|
'totalDuration': __expectInt32,
|
|
@@ -1246,9 +1247,24 @@ const de_SearchHistoryRequest = (output, context) => {
|
|
|
1246
1247
|
'user': __expectString,
|
|
1247
1248
|
});
|
|
1248
1249
|
};
|
|
1250
|
+
const de_SearchHistoryResultItem = (output, context) => {
|
|
1251
|
+
return take(output, {
|
|
1252
|
+
'chunkId': __expectString,
|
|
1253
|
+
'content': __expectString,
|
|
1254
|
+
'dataSourceId': __expectString,
|
|
1255
|
+
'dataSourceType': __expectString,
|
|
1256
|
+
'documentHierarchy': _json,
|
|
1257
|
+
'documentId': __expectString,
|
|
1258
|
+
'documentTitle': __expectString,
|
|
1259
|
+
'documentUrl': __expectString,
|
|
1260
|
+
'fullTextScore': __limitedParseDouble,
|
|
1261
|
+
'score': __limitedParseDouble,
|
|
1262
|
+
'semanticScore': __limitedParseDouble,
|
|
1263
|
+
});
|
|
1264
|
+
};
|
|
1249
1265
|
const de_SearchHistoryResultsList = (output, context) => {
|
|
1250
1266
|
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
1251
|
-
return
|
|
1267
|
+
return de_SearchHistoryResultItem(entry, context);
|
|
1252
1268
|
});
|
|
1253
1269
|
return retVal;
|
|
1254
1270
|
};
|
|
@@ -47,6 +47,7 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
47
47
|
* searchUser: "STRING_VALUE",
|
|
48
48
|
* },
|
|
49
49
|
* search: "STRING_VALUE",
|
|
50
|
+
* withContent: true || false,
|
|
50
51
|
* };
|
|
51
52
|
* const command = new ListSearchQueriesHistoryCommand(input);
|
|
52
53
|
* const response = await client.send(command);
|
|
@@ -65,33 +66,41 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
65
66
|
* // searchThreshold: Number("double"), // required
|
|
66
67
|
* // },
|
|
67
68
|
* // stages: { // SearchHistoryStages
|
|
68
|
-
* // overall: { //
|
|
69
|
+
* // overall: { // SearchHistoryOverallStage
|
|
69
70
|
* // startTime: Number("long"), // required
|
|
70
71
|
* // endTime: Number("long"), // required
|
|
71
72
|
* // duration: Number("int"), // required
|
|
72
73
|
* // },
|
|
74
|
+
* // transformQuery: { // SearchHistoryTransformQueryStage
|
|
75
|
+
* // startTime: Number("long"), // required
|
|
76
|
+
* // endTime: Number("long"), // required
|
|
77
|
+
* // duration: Number("int"), // required
|
|
78
|
+
* // model: "STRING_VALUE", // required
|
|
79
|
+
* // inputTokens: Number("int"), // required
|
|
80
|
+
* // outputTokens: Number("int"), // required
|
|
81
|
+
* // transformedQuery: "STRING_VALUE", // required
|
|
82
|
+
* // },
|
|
73
83
|
* // generateQueryEmbedding: { // SearchHistoryEmbeddingStage
|
|
74
84
|
* // startTime: Number("long"), // required
|
|
75
85
|
* // endTime: Number("long"), // required
|
|
76
86
|
* // duration: Number("int"), // required
|
|
77
|
-
* // provider: "STRING_VALUE", // required
|
|
78
87
|
* // model: "STRING_VALUE", // required
|
|
79
88
|
* // inputTokens: Number("int"), // required
|
|
80
89
|
* // outputTokens: Number("int"), // required
|
|
81
90
|
* // },
|
|
82
|
-
* // search: {
|
|
91
|
+
* // search: { // SearchHistorySearchStage
|
|
83
92
|
* // startTime: Number("long"), // required
|
|
84
93
|
* // endTime: Number("long"), // required
|
|
85
94
|
* // duration: Number("int"), // required
|
|
86
95
|
* // },
|
|
87
|
-
* // enrichData: {
|
|
96
|
+
* // enrichData: { // SearchEnrichDataStage
|
|
88
97
|
* // startTime: Number("long"), // required
|
|
89
98
|
* // endTime: Number("long"), // required
|
|
90
99
|
* // duration: Number("int"), // required
|
|
91
100
|
* // },
|
|
92
101
|
* // },
|
|
93
102
|
* // results: [ // SearchHistoryResultsList // required
|
|
94
|
-
* // { //
|
|
103
|
+
* // { // SearchHistoryResultItem
|
|
95
104
|
* // chunkId: "STRING_VALUE", // required
|
|
96
105
|
* // documentId: "STRING_VALUE", // required
|
|
97
106
|
* // documentTitle: "STRING_VALUE", // required
|
|
@@ -104,12 +113,12 @@ declare const ListSearchQueriesHistoryCommand_base: {
|
|
|
104
113
|
* // documentHierarchy: [ // StringList
|
|
105
114
|
* // "STRING_VALUE",
|
|
106
115
|
* // ],
|
|
107
|
-
* // content: "STRING_VALUE",
|
|
116
|
+
* // content: "STRING_VALUE",
|
|
108
117
|
* // },
|
|
109
118
|
* // ],
|
|
110
|
-
* // createdAt:
|
|
119
|
+
* // createdAt: "STRING_VALUE", // required
|
|
111
120
|
* // totalDuration: Number("int"), // required
|
|
112
|
-
* //
|
|
121
|
+
* // resultsCount: Number("int"), // required
|
|
113
122
|
* // },
|
|
114
123
|
* // ],
|
|
115
124
|
* // };
|
|
@@ -1486,6 +1486,11 @@ export interface ListSearchQueriesHistoryInput {
|
|
|
1486
1486
|
* @public
|
|
1487
1487
|
*/
|
|
1488
1488
|
search?: string | undefined;
|
|
1489
|
+
/**
|
|
1490
|
+
* Whether to include the content of the chunks in the history results.
|
|
1491
|
+
* @public
|
|
1492
|
+
*/
|
|
1493
|
+
withContent?: boolean | undefined;
|
|
1489
1494
|
}
|
|
1490
1495
|
/**
|
|
1491
1496
|
* @public
|
|
@@ -1519,7 +1524,51 @@ export interface SearchHistoryRequest {
|
|
|
1519
1524
|
/**
|
|
1520
1525
|
* @public
|
|
1521
1526
|
*/
|
|
1522
|
-
export interface
|
|
1527
|
+
export interface SearchHistoryResultItem {
|
|
1528
|
+
/**
|
|
1529
|
+
* The ID of the chunk. Example: 123e4567-e89b-12d3-a456-426614174000
|
|
1530
|
+
* @public
|
|
1531
|
+
*/
|
|
1532
|
+
chunkId: string;
|
|
1533
|
+
/**
|
|
1534
|
+
* Unique identifier of the document
|
|
1535
|
+
* @public
|
|
1536
|
+
*/
|
|
1537
|
+
documentId: string;
|
|
1538
|
+
documentTitle: string;
|
|
1539
|
+
documentUrl: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* Unique identifier of the data source
|
|
1542
|
+
* @public
|
|
1543
|
+
*/
|
|
1544
|
+
dataSourceId: string;
|
|
1545
|
+
dataSourceType: DataSourceType;
|
|
1546
|
+
/**
|
|
1547
|
+
* The total score of the result, calculated from the semantic search score and the full-text search score.
|
|
1548
|
+
* @public
|
|
1549
|
+
*/
|
|
1550
|
+
score: number;
|
|
1551
|
+
/**
|
|
1552
|
+
* The score of the result, calculated from the full-text bm25 search score.
|
|
1553
|
+
* @public
|
|
1554
|
+
*/
|
|
1555
|
+
fullTextScore?: number | undefined;
|
|
1556
|
+
/**
|
|
1557
|
+
* The score of the result, calculated from the semantic vector search score.
|
|
1558
|
+
* @public
|
|
1559
|
+
*/
|
|
1560
|
+
semanticScore?: number | undefined;
|
|
1561
|
+
/**
|
|
1562
|
+
* The hierarchy of the document. The hierarchy is a list of document IDs that are the parents of the current document. The hierarchy is used to build the document hierarchy in the search results.
|
|
1563
|
+
* @public
|
|
1564
|
+
*/
|
|
1565
|
+
documentHierarchy?: (string)[] | undefined;
|
|
1566
|
+
content?: string | undefined;
|
|
1567
|
+
}
|
|
1568
|
+
/**
|
|
1569
|
+
* @public
|
|
1570
|
+
*/
|
|
1571
|
+
export interface SearchEnrichDataStage {
|
|
1523
1572
|
startTime: number;
|
|
1524
1573
|
endTime: number;
|
|
1525
1574
|
duration: number;
|
|
@@ -1531,19 +1580,47 @@ export interface SearchHistoryEmbeddingStage {
|
|
|
1531
1580
|
startTime: number;
|
|
1532
1581
|
endTime: number;
|
|
1533
1582
|
duration: number;
|
|
1534
|
-
provider: string;
|
|
1535
1583
|
model: string;
|
|
1536
1584
|
inputTokens: number;
|
|
1537
1585
|
outputTokens: number;
|
|
1538
1586
|
}
|
|
1587
|
+
/**
|
|
1588
|
+
* @public
|
|
1589
|
+
*/
|
|
1590
|
+
export interface SearchHistoryOverallStage {
|
|
1591
|
+
startTime: number;
|
|
1592
|
+
endTime: number;
|
|
1593
|
+
duration: number;
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* @public
|
|
1597
|
+
*/
|
|
1598
|
+
export interface SearchHistorySearchStage {
|
|
1599
|
+
startTime: number;
|
|
1600
|
+
endTime: number;
|
|
1601
|
+
duration: number;
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* @public
|
|
1605
|
+
*/
|
|
1606
|
+
export interface SearchHistoryTransformQueryStage {
|
|
1607
|
+
startTime: number;
|
|
1608
|
+
endTime: number;
|
|
1609
|
+
duration: number;
|
|
1610
|
+
model: string;
|
|
1611
|
+
inputTokens: number;
|
|
1612
|
+
outputTokens: number;
|
|
1613
|
+
transformedQuery: string;
|
|
1614
|
+
}
|
|
1539
1615
|
/**
|
|
1540
1616
|
* @public
|
|
1541
1617
|
*/
|
|
1542
1618
|
export interface SearchHistoryStages {
|
|
1543
|
-
overall:
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1619
|
+
overall: SearchHistoryOverallStage;
|
|
1620
|
+
transformQuery?: SearchHistoryTransformQueryStage | undefined;
|
|
1621
|
+
generateQueryEmbedding: SearchHistoryEmbeddingStage;
|
|
1622
|
+
search: SearchHistorySearchStage;
|
|
1623
|
+
enrichData?: SearchEnrichDataStage | undefined;
|
|
1547
1624
|
}
|
|
1548
1625
|
/**
|
|
1549
1626
|
* @public
|
|
@@ -1553,10 +1630,10 @@ export interface SearchHistoryItem {
|
|
|
1553
1630
|
companyId: string;
|
|
1554
1631
|
request: SearchHistoryRequest;
|
|
1555
1632
|
stages: SearchHistoryStages;
|
|
1556
|
-
results: (
|
|
1557
|
-
createdAt:
|
|
1633
|
+
results: (SearchHistoryResultItem)[];
|
|
1634
|
+
createdAt: string;
|
|
1558
1635
|
totalDuration: number;
|
|
1559
|
-
|
|
1636
|
+
resultsCount: number;
|
|
1560
1637
|
}
|
|
1561
1638
|
/**
|
|
1562
1639
|
* @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.0.
|
|
4
|
+
"version": "0.0.60",
|
|
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",
|