@wildix/wim-knowledge-base-client 0.0.24 → 0.0.25

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.
@@ -385,6 +385,7 @@ const se_SearchKnowledgeBaseCommand = async (input, context) => {
385
385
  let body;
386
386
  body = JSON.stringify((0, smithy_client_1.take)(input, {
387
387
  'searchConfig': _ => se_SearchConfig(_, context),
388
+ 'withMetadata': [],
388
389
  }));
389
390
  b.m("POST")
390
391
  .h(headers)
@@ -802,6 +803,7 @@ const de_SearchKnowledgeBaseCommand = async (output, context) => {
802
803
  });
803
804
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
804
805
  const doc = (0, smithy_client_1.take)(data, {
806
+ 'metadata': _ => de_Document(_, context),
805
807
  'results': _ => de_SearchKnowledgeBaseResults(_, context),
806
808
  });
807
809
  Object.assign(contents, doc);
@@ -1111,12 +1113,12 @@ const de_ProxyConfig = (output, context) => {
1111
1113
  const de_SearchKnowledgeBaseResult = (output, context) => {
1112
1114
  return (0, smithy_client_1.take)(output, {
1113
1115
  'content': smithy_client_1.expectString,
1116
+ 'dataSourceId': smithy_client_1.expectString,
1114
1117
  'dataSourceType': smithy_client_1.expectString,
1115
1118
  'documentId': smithy_client_1.expectString,
1116
1119
  'documentTitle': smithy_client_1.expectString,
1117
1120
  'documentUrl': smithy_client_1.expectString,
1118
1121
  'score': smithy_client_1.limitedParseDouble,
1119
- 'source': smithy_client_1.expectString,
1120
1122
  });
1121
1123
  };
1122
1124
  const de_SearchKnowledgeBaseResults = (output, context) => {
@@ -361,6 +361,7 @@ export const se_SearchKnowledgeBaseCommand = async (input, context) => {
361
361
  let body;
362
362
  body = JSON.stringify(take(input, {
363
363
  'searchConfig': _ => se_SearchConfig(_, context),
364
+ 'withMetadata': [],
364
365
  }));
365
366
  b.m("POST")
366
367
  .h(headers)
@@ -752,6 +753,7 @@ export const de_SearchKnowledgeBaseCommand = async (output, context) => {
752
753
  });
753
754
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
754
755
  const doc = take(data, {
756
+ 'metadata': _ => de_Document(_, context),
755
757
  'results': _ => de_SearchKnowledgeBaseResults(_, context),
756
758
  });
757
759
  Object.assign(contents, doc);
@@ -1055,12 +1057,12 @@ const de_ProxyConfig = (output, context) => {
1055
1057
  const de_SearchKnowledgeBaseResult = (output, context) => {
1056
1058
  return take(output, {
1057
1059
  'content': __expectString,
1060
+ 'dataSourceId': __expectString,
1058
1061
  'dataSourceType': __expectString,
1059
1062
  'documentId': __expectString,
1060
1063
  'documentTitle': __expectString,
1061
1064
  'documentUrl': __expectString,
1062
1065
  'score': __limitedParseDouble,
1063
- 'source': __expectString,
1064
1066
  });
1065
1067
  };
1066
1068
  const de_SearchKnowledgeBaseResults = (output, context) => {
@@ -37,13 +37,8 @@ declare const CreateKnowledgeBaseCommand_base: {
37
37
  * const input = { // CreateKnowledgeBaseInput
38
38
  * name: "STRING_VALUE", // required
39
39
  * description: "STRING_VALUE",
40
- * dataSources: [ // KnowledgeBaseDataSourcesList // required
41
- * { // DataSourceListItem
42
- * id: "STRING_VALUE", // required
43
- * name: "STRING_VALUE", // required
44
- * type: "files" || "confluence" || "gdrive" || "proxy", // required
45
- * enabled: true || false, // required
46
- * },
40
+ * dataSources: [ // DataSourceIdsList // required
41
+ * "STRING_VALUE",
47
42
  * ],
48
43
  * companyId: "STRING_VALUE",
49
44
  * };
@@ -53,13 +48,8 @@ declare const CreateKnowledgeBaseCommand_base: {
53
48
  * // knowledgeBase: { // KnowledgeBaseItem
54
49
  * // name: "STRING_VALUE", // required
55
50
  * // description: "STRING_VALUE",
56
- * // dataSources: [ // KnowledgeBaseDataSourcesList // required
57
- * // { // DataSourceListItem
58
- * // id: "STRING_VALUE", // required
59
- * // name: "STRING_VALUE", // required
60
- * // type: "files" || "confluence" || "gdrive" || "proxy", // required
61
- * // enabled: true || false, // required
62
- * // },
51
+ * // dataSources: [ // DataSourceIdsList // required
52
+ * // "STRING_VALUE",
63
53
  * // ],
64
54
  * // id: "STRING_VALUE", // required
65
55
  * // companyId: "STRING_VALUE", // required
@@ -44,13 +44,8 @@ declare const GetKnowledgeBaseCommand_base: {
44
44
  * // knowledgeBase: { // KnowledgeBaseItem
45
45
  * // name: "STRING_VALUE", // required
46
46
  * // description: "STRING_VALUE",
47
- * // dataSources: [ // KnowledgeBaseDataSourcesList // required
48
- * // { // DataSourceListItem
49
- * // id: "STRING_VALUE", // required
50
- * // name: "STRING_VALUE", // required
51
- * // type: "files" || "confluence" || "gdrive" || "proxy", // required
52
- * // enabled: true || false, // required
53
- * // },
47
+ * // dataSources: [ // DataSourceIdsList // required
48
+ * // "STRING_VALUE",
54
49
  * // ],
55
50
  * // id: "STRING_VALUE", // required
56
51
  * // companyId: "STRING_VALUE", // required
@@ -44,13 +44,8 @@ declare const ListKnowledgeBasesCommand_base: {
44
44
  * // { // KnowledgeBaseItem
45
45
  * // name: "STRING_VALUE", // required
46
46
  * // description: "STRING_VALUE",
47
- * // dataSources: [ // KnowledgeBaseDataSourcesList // required
48
- * // { // DataSourceListItem
49
- * // id: "STRING_VALUE", // required
50
- * // name: "STRING_VALUE", // required
51
- * // type: "files" || "confluence" || "gdrive" || "proxy", // required
52
- * // enabled: true || false, // required
53
- * // },
47
+ * // dataSources: [ // DataSourceIdsList // required
48
+ * // "STRING_VALUE",
54
49
  * // ],
55
50
  * // id: "STRING_VALUE", // required
56
51
  * // companyId: "STRING_VALUE", // required
@@ -43,6 +43,7 @@ declare const SearchKnowledgeBaseCommand_base: {
43
43
  * threshold: Number("double"),
44
44
  * searchStrategy: "bm25" || "vector" || "hybrid",
45
45
  * },
46
+ * withMetadata: true || false,
46
47
  * };
47
48
  * const command = new SearchKnowledgeBaseCommand(input);
48
49
  * const response = await client.send(command);
@@ -51,13 +52,14 @@ declare const SearchKnowledgeBaseCommand_base: {
51
52
  * // { // SearchKnowledgeBaseResult
52
53
  * // documentId: "STRING_VALUE", // required
53
54
  * // documentTitle: "STRING_VALUE", // required
54
- * // score: Number("double"), // required
55
- * // source: "STRING_VALUE", // required
56
- * // content: "STRING_VALUE", // required
57
55
  * // documentUrl: "STRING_VALUE", // required
56
+ * // dataSourceId: "STRING_VALUE", // required
58
57
  * // dataSourceType: "files" || "confluence" || "gdrive" || "proxy", // required
58
+ * // content: "STRING_VALUE", // required
59
+ * // score: Number("double"), // required
59
60
  * // },
60
61
  * // ],
62
+ * // metadata: "DOCUMENT_VALUE",
61
63
  * // };
62
64
  *
63
65
  * ```
@@ -37,13 +37,8 @@ declare const UpdateKnowledgeBaseCommand_base: {
37
37
  * const input = { // UpdateKnowledgeBaseInput
38
38
  * name: "STRING_VALUE", // required
39
39
  * description: "STRING_VALUE",
40
- * dataSources: [ // KnowledgeBaseDataSourcesList // required
41
- * { // DataSourceListItem
42
- * id: "STRING_VALUE", // required
43
- * name: "STRING_VALUE", // required
44
- * type: "files" || "confluence" || "gdrive" || "proxy", // required
45
- * enabled: true || false, // required
46
- * },
40
+ * dataSources: [ // DataSourceIdsList // required
41
+ * "STRING_VALUE",
47
42
  * ],
48
43
  * companyId: "STRING_VALUE",
49
44
  * knowledgeBaseId: "STRING_VALUE", // required
@@ -54,13 +49,8 @@ declare const UpdateKnowledgeBaseCommand_base: {
54
49
  * // knowledgeBase: { // KnowledgeBaseItem
55
50
  * // name: "STRING_VALUE", // required
56
51
  * // description: "STRING_VALUE",
57
- * // dataSources: [ // KnowledgeBaseDataSourcesList // required
58
- * // { // DataSourceListItem
59
- * // id: "STRING_VALUE", // required
60
- * // name: "STRING_VALUE", // required
61
- * // type: "files" || "confluence" || "gdrive" || "proxy", // required
62
- * // enabled: true || false, // required
63
- * // },
52
+ * // dataSources: [ // DataSourceIdsList // required
53
+ * // "STRING_VALUE",
64
54
  * // ],
65
55
  * // id: "STRING_VALUE", // required
66
56
  * // companyId: "STRING_VALUE", // required
@@ -579,31 +579,6 @@ export interface DocumentItem {
579
579
  export interface CreateDocumentOutput {
580
580
  document: DocumentItem;
581
581
  }
582
- /**
583
- * @public
584
- */
585
- export interface DataSourceListItem {
586
- /**
587
- * The ID of the data source. Example: 123e4567-e89b-12d3-a456-426614174000
588
- * @public
589
- */
590
- id: string;
591
- /**
592
- * The name of the data source. Example: Product Confluence
593
- * @public
594
- */
595
- name: string;
596
- /**
597
- * The type of the data source. Example: confluence
598
- * @public
599
- */
600
- type: DataSourceType;
601
- /**
602
- * Whether the data source is enabled. Example: true
603
- * @public
604
- */
605
- enabled: boolean;
606
- }
607
582
  /**
608
583
  * @public
609
584
  */
@@ -618,7 +593,7 @@ export interface CreateKnowledgeBaseInput {
618
593
  * @public
619
594
  */
620
595
  description?: string | undefined;
621
- dataSources: (DataSourceListItem)[];
596
+ dataSources: (string)[];
622
597
  /**
623
598
  * The unique identifier of the tenant when a service token is used.
624
599
  * @public
@@ -639,7 +614,7 @@ export interface KnowledgeBaseItem {
639
614
  * @public
640
615
  */
641
616
  description?: string | undefined;
642
- dataSources: (DataSourceListItem)[];
617
+ dataSources: (string)[];
643
618
  /**
644
619
  * The ID of the knowledge base. Example: 123e4567-e89b-12d3-a456-426614174000
645
620
  * @public
@@ -1352,6 +1327,11 @@ export interface SearchKnowledgeBaseInput {
1352
1327
  * @public
1353
1328
  */
1354
1329
  searchConfig?: SearchConfig | undefined;
1330
+ /**
1331
+ * Whether to include the metadata of the search results.
1332
+ * @public
1333
+ */
1334
+ withMetadata?: boolean | undefined;
1355
1335
  }
1356
1336
  /**
1357
1337
  * @public
@@ -1363,21 +1343,22 @@ export interface SearchKnowledgeBaseResult {
1363
1343
  */
1364
1344
  documentId: string;
1365
1345
  documentTitle: string;
1366
- score: number;
1346
+ documentUrl: string;
1367
1347
  /**
1368
1348
  * The ID of the data source. Example: 123e4567-e89b-12d3-a456-426614174000
1369
1349
  * @public
1370
1350
  */
1371
- source: string;
1372
- content: string;
1373
- documentUrl: string;
1351
+ dataSourceId: string;
1374
1352
  dataSourceType: DataSourceType;
1353
+ content: string;
1354
+ score: number;
1375
1355
  }
1376
1356
  /**
1377
1357
  * @public
1378
1358
  */
1379
1359
  export interface SearchKnowledgeBaseOutput {
1380
1360
  results: (SearchKnowledgeBaseResult)[];
1361
+ metadata?: __DocumentType | undefined;
1381
1362
  }
1382
1363
  /**
1383
1364
  * @public
@@ -1537,7 +1518,7 @@ export interface UpdateKnowledgeBaseInput {
1537
1518
  * @public
1538
1519
  */
1539
1520
  description?: string | undefined;
1540
- dataSources: (DataSourceListItem)[];
1521
+ dataSources: (string)[];
1541
1522
  /**
1542
1523
  * The unique identifier of the tenant when a service token is used.
1543
1524
  * @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.24",
4
+ "version": "0.0.25",
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",