@wildix/wim-knowledge-base-client 0.0.52 → 0.0.53

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.
@@ -1300,7 +1300,7 @@ const de_SearchHistoryResponse = (output, context) => {
1300
1300
  'results': (_) => de_SearchHistorySearchResults(_, context),
1301
1301
  });
1302
1302
  };
1303
- const de_SearchHistoryResult = (output, context) => {
1303
+ const de_SearchHistoryResultItem = (output, context) => {
1304
1304
  return (0, smithy_client_1.take)(output, {
1305
1305
  'companyId': smithy_client_1.expectString,
1306
1306
  'createdAt': (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
@@ -1314,26 +1314,13 @@ const de_SearchHistoryResult = (output, context) => {
1314
1314
  };
1315
1315
  const de_SearchHistoryResultsList = (output, context) => {
1316
1316
  const retVal = (output || []).filter((e) => e != null).map((entry) => {
1317
- return de_SearchHistoryResult(entry, context);
1317
+ return de_SearchHistoryResultItem(entry, context);
1318
1318
  });
1319
1319
  return retVal;
1320
1320
  };
1321
- const de_SearchHistorySearchResult = (output, context) => {
1322
- return (0, smithy_client_1.take)(output, {
1323
- 'bm25Score': smithy_client_1.limitedParseDouble,
1324
- 'chunkId': smithy_client_1.expectString,
1325
- 'dataSourceId': smithy_client_1.expectString,
1326
- 'dataSourceType': smithy_client_1.expectString,
1327
- 'documentId': smithy_client_1.expectString,
1328
- 'documentTitle': smithy_client_1.expectString,
1329
- 'documentUrl': smithy_client_1.expectString,
1330
- 'knnScore': smithy_client_1.limitedParseDouble,
1331
- 'score': smithy_client_1.limitedParseDouble,
1332
- });
1333
- };
1334
1321
  const de_SearchHistorySearchResults = (output, context) => {
1335
1322
  const retVal = (output || []).filter((e) => e != null).map((entry) => {
1336
- return de_SearchHistorySearchResult(entry, context);
1323
+ return de_SearchHistoryResultItem(entry, context);
1337
1324
  });
1338
1325
  return retVal;
1339
1326
  };
@@ -1232,7 +1232,7 @@ const de_SearchHistoryResponse = (output, context) => {
1232
1232
  'results': (_) => de_SearchHistorySearchResults(_, context),
1233
1233
  });
1234
1234
  };
1235
- const de_SearchHistoryResult = (output, context) => {
1235
+ const de_SearchHistoryResultItem = (output, context) => {
1236
1236
  return take(output, {
1237
1237
  'companyId': __expectString,
1238
1238
  'createdAt': (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
@@ -1246,26 +1246,13 @@ const de_SearchHistoryResult = (output, context) => {
1246
1246
  };
1247
1247
  const de_SearchHistoryResultsList = (output, context) => {
1248
1248
  const retVal = (output || []).filter((e) => e != null).map((entry) => {
1249
- return de_SearchHistoryResult(entry, context);
1249
+ return de_SearchHistoryResultItem(entry, context);
1250
1250
  });
1251
1251
  return retVal;
1252
1252
  };
1253
- const de_SearchHistorySearchResult = (output, context) => {
1254
- return take(output, {
1255
- 'bm25Score': __limitedParseDouble,
1256
- 'chunkId': __expectString,
1257
- 'dataSourceId': __expectString,
1258
- 'dataSourceType': __expectString,
1259
- 'documentId': __expectString,
1260
- 'documentTitle': __expectString,
1261
- 'documentUrl': __expectString,
1262
- 'knnScore': __limitedParseDouble,
1263
- 'score': __limitedParseDouble,
1264
- });
1265
- };
1266
1253
  const de_SearchHistorySearchResults = (output, context) => {
1267
1254
  const retVal = (output || []).filter((e) => e != null).map((entry) => {
1268
- return de_SearchHistorySearchResult(entry, context);
1255
+ return de_SearchHistoryResultItem(entry, context);
1269
1256
  });
1270
1257
  return retVal;
1271
1258
  };
@@ -52,7 +52,7 @@ declare const ListSearchQueriesHistoryCommand_base: {
52
52
  * const response = await client.send(command);
53
53
  * // { // ListSearchQueriesHistoryOutput
54
54
  * // results: [ // SearchHistoryResultsList // required
55
- * // { // SearchHistoryResult
55
+ * // { // SearchHistoryResultItem
56
56
  * // sessionId: "STRING_VALUE", // required
57
57
  * // companyId: "STRING_VALUE", // required
58
58
  * // request: { // SearchHistoryRequest
@@ -92,16 +92,48 @@ declare const ListSearchQueriesHistoryCommand_base: {
92
92
  * // },
93
93
  * // response: { // SearchHistoryResponse
94
94
  * // results: [ // SearchHistorySearchResults // required
95
- * // { // SearchHistorySearchResult
96
- * // chunkId: "STRING_VALUE", // required
97
- * // documentId: "STRING_VALUE", // required
98
- * // documentTitle: "STRING_VALUE", // required
99
- * // documentUrl: "STRING_VALUE", // required
100
- * // dataSourceId: "STRING_VALUE", // required
101
- * // dataSourceType: "files" || "confluence" || "gdrive", // required
102
- * // score: Number("double"), // required
103
- * // bm25Score: Number("double"),
104
- * // knnScore: Number("double"),
95
+ * // {
96
+ * // sessionId: "STRING_VALUE", // required
97
+ * // companyId: "STRING_VALUE", // required
98
+ * // request: {
99
+ * // query: "STRING_VALUE", // required
100
+ * // user: "STRING_VALUE", // required
101
+ * // externalSessionId: "STRING_VALUE", // required
102
+ * // knowledgeBaseId: "STRING_VALUE", // required
103
+ * // searchStrategy: "bm25" || "vector" || "hybrid", // required
104
+ * // searchLimit: Number("int"), // required
105
+ * // searchThreshold: Number("double"), // required
106
+ * // },
107
+ * // stages: {
108
+ * // overall: {
109
+ * // startTime: Number("long"), // required
110
+ * // endTime: Number("long"), // required
111
+ * // duration: Number("int"), // required
112
+ * // },
113
+ * // generateQueryEmbedding: {
114
+ * // startTime: Number("long"), // required
115
+ * // endTime: Number("long"), // required
116
+ * // duration: Number("int"), // required
117
+ * // provider: "STRING_VALUE", // required
118
+ * // model: "STRING_VALUE", // required
119
+ * // inputTokens: Number("int"), // required
120
+ * // outputTokens: Number("int"), // required
121
+ * // },
122
+ * // search: {
123
+ * // startTime: Number("long"), // required
124
+ * // endTime: Number("long"), // required
125
+ * // duration: Number("int"), // required
126
+ * // },
127
+ * // enrichData: "<SearchHistoryStage>",
128
+ * // },
129
+ * // response: {
130
+ * // results: [ // required
131
+ * // "<SearchHistoryResultItem>",
132
+ * // ],
133
+ * // },
134
+ * // createdAt: new Date("TIMESTAMP"), // required
135
+ * // totalDuration: Number("int"), // required
136
+ * // resultsCount: Number("int"), // required
105
137
  * // },
106
138
  * // ],
107
139
  * // },
@@ -965,12 +965,12 @@ export interface SearchKnowledgeBaseResult {
965
965
  */
966
966
  score: number;
967
967
  /**
968
- * The score of the result, calculated from the full-text search score.
968
+ * The score of the result, calculated from the full-text bm25 search score.
969
969
  * @public
970
970
  */
971
971
  fullTextScore?: number | undefined;
972
972
  /**
973
- * The score of the result, calculated from the semantic search score.
973
+ * The score of the result, calculated from the semantic vector search score.
974
974
  * @public
975
975
  */
976
976
  semanticScore?: number | undefined;
@@ -1511,38 +1511,6 @@ export interface SearchHistoryRequest {
1511
1511
  searchLimit: number;
1512
1512
  searchThreshold: number;
1513
1513
  }
1514
- /**
1515
- * @public
1516
- */
1517
- export interface SearchHistorySearchResult {
1518
- /**
1519
- * The ID of the chunk. Example: 123e4567-e89b-12d3-a456-426614174000
1520
- * @public
1521
- */
1522
- chunkId: string;
1523
- /**
1524
- * Unique identifier of the document
1525
- * @public
1526
- */
1527
- documentId: string;
1528
- documentTitle: string;
1529
- documentUrl: string;
1530
- /**
1531
- * Unique identifier of the data source
1532
- * @public
1533
- */
1534
- dataSourceId: string;
1535
- dataSourceType: DataSourceType;
1536
- score: number;
1537
- bm25Score?: number | undefined;
1538
- knnScore?: number | undefined;
1539
- }
1540
- /**
1541
- * @public
1542
- */
1543
- export interface SearchHistoryResponse {
1544
- results: (SearchHistorySearchResult)[];
1545
- }
1546
1514
  /**
1547
1515
  * @public
1548
1516
  */
@@ -1572,25 +1540,6 @@ export interface SearchHistoryStages {
1572
1540
  search?: SearchHistoryStage | undefined;
1573
1541
  enrichData?: SearchHistoryStage | undefined;
1574
1542
  }
1575
- /**
1576
- * @public
1577
- */
1578
- export interface SearchHistoryResult {
1579
- sessionId: string;
1580
- companyId: string;
1581
- request: SearchHistoryRequest;
1582
- stages: SearchHistoryStages;
1583
- response: SearchHistoryResponse;
1584
- createdAt: Date;
1585
- totalDuration: number;
1586
- resultsCount: number;
1587
- }
1588
- /**
1589
- * @public
1590
- */
1591
- export interface ListSearchQueriesHistoryOutput {
1592
- results: (SearchHistoryResult)[];
1593
- }
1594
1543
  /**
1595
1544
  * @public
1596
1545
  * @enum
@@ -1836,3 +1785,28 @@ export interface UpdateKnowledgeBaseInput {
1836
1785
  export interface UpdateKnowledgeBaseOutput {
1837
1786
  knowledgeBase: KnowledgeBaseItem;
1838
1787
  }
1788
+ /**
1789
+ * @public
1790
+ */
1791
+ export interface SearchHistoryResponse {
1792
+ results: (SearchHistoryResultItem)[];
1793
+ }
1794
+ /**
1795
+ * @public
1796
+ */
1797
+ export interface SearchHistoryResultItem {
1798
+ sessionId: string;
1799
+ companyId: string;
1800
+ request: SearchHistoryRequest;
1801
+ stages: SearchHistoryStages;
1802
+ response: SearchHistoryResponse;
1803
+ createdAt: Date;
1804
+ totalDuration: number;
1805
+ resultsCount: number;
1806
+ }
1807
+ /**
1808
+ * @public
1809
+ */
1810
+ export interface ListSearchQueriesHistoryOutput {
1811
+ results: (SearchHistoryResultItem)[];
1812
+ }
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.52",
4
+ "version": "0.0.53",
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",