@wildix/wim-knowledge-base-client 0.0.12 → 0.0.13

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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KnowledgeBase = void 0;
4
4
  const KnowledgeBaseClient_1 = require("./KnowledgeBaseClient");
5
- const ClearDataSourceCommand_1 = require("./commands/ClearDataSourceCommand");
5
+ const CleanDataSourceCommand_1 = require("./commands/CleanDataSourceCommand");
6
6
  const CloneDataSourceCommand_1 = require("./commands/CloneDataSourceCommand");
7
7
  const CreateDataSourceCommand_1 = require("./commands/CreateDataSourceCommand");
8
8
  const CreateDocumentCommand_1 = require("./commands/CreateDocumentCommand");
@@ -30,7 +30,7 @@ const UpdateDocumentCommand_1 = require("./commands/UpdateDocumentCommand");
30
30
  const UpdateKnowledgeBaseCommand_1 = require("./commands/UpdateKnowledgeBaseCommand");
31
31
  const smithy_client_1 = require("@smithy/smithy-client");
32
32
  const commands = {
33
- ClearDataSourceCommand: ClearDataSourceCommand_1.ClearDataSourceCommand,
33
+ CleanDataSourceCommand: CleanDataSourceCommand_1.CleanDataSourceCommand,
34
34
  CloneDataSourceCommand: CloneDataSourceCommand_1.CloneDataSourceCommand,
35
35
  CreateDataSourceCommand: CreateDataSourceCommand_1.CreateDataSourceCommand,
36
36
  CreateDocumentCommand: CreateDocumentCommand_1.CreateDocumentCommand,
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClearDataSourceCommand = exports.$Command = void 0;
3
+ exports.CleanDataSourceCommand = exports.$Command = void 0;
4
4
  const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
5
  const middleware_serde_1 = require("@smithy/middleware-serde");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- class ClearDataSourceCommand extends smithy_client_1.Command.classBuilder()
8
+ class CleanDataSourceCommand extends smithy_client_1.Command.classBuilder()
9
9
  .m(function (Command, cs, config, o) {
10
10
  return [
11
11
  (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
12
  ];
13
13
  })
14
- .s("KnowledgeBase", "ClearDataSource", {})
15
- .n("KnowledgeBaseClient", "ClearDataSourceCommand")
14
+ .s("KnowledgeBase", "CleanDataSource", {})
15
+ .n("KnowledgeBaseClient", "CleanDataSourceCommand")
16
16
  .f(void 0, void 0)
17
- .ser(Aws_restJson1_1.se_ClearDataSourceCommand)
18
- .de(Aws_restJson1_1.de_ClearDataSourceCommand)
17
+ .ser(Aws_restJson1_1.se_CleanDataSourceCommand)
18
+ .de(Aws_restJson1_1.de_CleanDataSourceCommand)
19
19
  .build() {
20
20
  }
21
- exports.ClearDataSourceCommand = ClearDataSourceCommand;
21
+ exports.CleanDataSourceCommand = CleanDataSourceCommand;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./ClearDataSourceCommand"), exports);
4
+ tslib_1.__exportStar(require("./CleanDataSourceCommand"), exports);
5
5
  tslib_1.__exportStar(require("./CloneDataSourceCommand"), exports);
6
6
  tslib_1.__exportStar(require("./CreateDataSourceCommand"), exports);
7
7
  tslib_1.__exportStar(require("./CreateDocumentCommand"), exports);
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateDataSourceCommand = exports.de_StopSyncDataSourceCommand = exports.de_StartSyncDataSourceCommand = exports.de_SearchKnowledgeBaseCommand = exports.de_QueryKnowledgeBaseCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListDocumentsCommand = exports.de_ListDataSourcesCommand = exports.de_GetSyncStatusCommand = exports.de_GetSyncLogsCommand = exports.de_GetKnowledgeBaseCommand = exports.de_GetExtraInfoForDataSourceCommand = exports.de_GetDocumentPresignedUploadUrlCommand = exports.de_GetDocumentPresignedDownloadUrlCommand = exports.de_GetDocumentCommand = exports.de_GetDataSourceCommand = exports.de_DeleteKnowledgeBaseCommand = exports.de_DeleteDocumentCommand = exports.de_DeleteDataSourceCommand = exports.de_CreateKnowledgeBaseCommand = exports.de_CreateDocumentCommand = exports.de_CreateDataSourceCommand = exports.de_CloneDataSourceCommand = exports.de_ClearDataSourceCommand = exports.se_UpdateKnowledgeBaseCommand = exports.se_UpdateDocumentCommand = exports.se_UpdateDataSourceCommand = exports.se_StopSyncDataSourceCommand = exports.se_StartSyncDataSourceCommand = exports.se_SearchKnowledgeBaseCommand = exports.se_QueryKnowledgeBaseCommand = exports.se_ListKnowledgeBasesCommand = exports.se_ListDocumentsCommand = exports.se_ListDataSourcesCommand = exports.se_GetSyncStatusCommand = exports.se_GetSyncLogsCommand = exports.se_GetKnowledgeBaseCommand = exports.se_GetExtraInfoForDataSourceCommand = exports.se_GetDocumentPresignedUploadUrlCommand = exports.se_GetDocumentPresignedDownloadUrlCommand = exports.se_GetDocumentCommand = exports.se_GetDataSourceCommand = exports.se_DeleteKnowledgeBaseCommand = exports.se_DeleteDocumentCommand = exports.se_DeleteDataSourceCommand = exports.se_CreateKnowledgeBaseCommand = exports.se_CreateDocumentCommand = exports.se_CreateDataSourceCommand = exports.se_CloneDataSourceCommand = exports.se_ClearDataSourceCommand = void 0;
3
+ exports.de_UpdateDataSourceCommand = exports.de_StopSyncDataSourceCommand = exports.de_StartSyncDataSourceCommand = exports.de_SearchKnowledgeBaseCommand = exports.de_QueryKnowledgeBaseCommand = exports.de_ListKnowledgeBasesCommand = exports.de_ListDocumentsCommand = exports.de_ListDataSourcesCommand = exports.de_GetSyncStatusCommand = exports.de_GetSyncLogsCommand = exports.de_GetKnowledgeBaseCommand = exports.de_GetExtraInfoForDataSourceCommand = exports.de_GetDocumentPresignedUploadUrlCommand = exports.de_GetDocumentPresignedDownloadUrlCommand = exports.de_GetDocumentCommand = exports.de_GetDataSourceCommand = exports.de_DeleteKnowledgeBaseCommand = exports.de_DeleteDocumentCommand = exports.de_DeleteDataSourceCommand = exports.de_CreateKnowledgeBaseCommand = exports.de_CreateDocumentCommand = exports.de_CreateDataSourceCommand = 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_QueryKnowledgeBaseCommand = exports.se_ListKnowledgeBasesCommand = exports.se_ListDocumentsCommand = exports.se_ListDataSourcesCommand = exports.se_GetSyncStatusCommand = exports.se_GetSyncLogsCommand = exports.se_GetKnowledgeBaseCommand = exports.se_GetExtraInfoForDataSourceCommand = exports.se_GetDocumentPresignedUploadUrlCommand = exports.se_GetDocumentPresignedDownloadUrlCommand = exports.se_GetDocumentCommand = exports.se_GetDataSourceCommand = exports.se_DeleteKnowledgeBaseCommand = exports.se_DeleteDocumentCommand = exports.se_DeleteDataSourceCommand = exports.se_CreateKnowledgeBaseCommand = exports.se_CreateDocumentCommand = exports.se_CreateDataSourceCommand = exports.se_CloneDataSourceCommand = exports.se_CleanDataSourceCommand = void 0;
4
4
  exports.de_UpdateKnowledgeBaseCommand = exports.de_UpdateDocumentCommand = 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");
8
8
  const core_2 = require("@smithy/core");
9
9
  const smithy_client_1 = require("@smithy/smithy-client");
10
- const se_ClearDataSourceCommand = async (input, context) => {
10
+ const se_CleanDataSourceCommand = async (input, context) => {
11
11
  const b = (0, core_2.requestBuilder)(input, context);
12
12
  const headers = {};
13
- b.bp("/api/v1/data-sources/{dataSourceId}/clear");
13
+ b.bp("/api/v1/data-sources/{dataSourceId}/clean");
14
14
  b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
15
15
  const query = (0, smithy_client_1.map)({
16
16
  [_c]: [, input[_cI]],
@@ -22,7 +22,7 @@ const se_ClearDataSourceCommand = async (input, context) => {
22
22
  .b(body);
23
23
  return b.build();
24
24
  };
25
- exports.se_ClearDataSourceCommand = se_ClearDataSourceCommand;
25
+ exports.se_CleanDataSourceCommand = se_CleanDataSourceCommand;
26
26
  const se_CloneDataSourceCommand = async (input, context) => {
27
27
  const b = (0, core_2.requestBuilder)(input, context);
28
28
  const headers = {};
@@ -500,7 +500,7 @@ const se_UpdateKnowledgeBaseCommand = async (input, context) => {
500
500
  return b.build();
501
501
  };
502
502
  exports.se_UpdateKnowledgeBaseCommand = se_UpdateKnowledgeBaseCommand;
503
- const de_ClearDataSourceCommand = async (output, context) => {
503
+ const de_CleanDataSourceCommand = async (output, context) => {
504
504
  if (output.statusCode !== 204 && output.statusCode >= 300) {
505
505
  return de_CommandError(output, context);
506
506
  }
@@ -510,7 +510,7 @@ const de_ClearDataSourceCommand = async (output, context) => {
510
510
  await (0, smithy_client_1.collectBody)(output.body, context);
511
511
  return contents;
512
512
  };
513
- exports.de_ClearDataSourceCommand = de_ClearDataSourceCommand;
513
+ exports.de_CleanDataSourceCommand = de_CleanDataSourceCommand;
514
514
  const de_CloneDataSourceCommand = async (output, context) => {
515
515
  if (output.statusCode !== 204 && output.statusCode >= 300) {
516
516
  return de_CommandError(output, context);
@@ -781,8 +781,9 @@ const de_QueryKnowledgeBaseCommand = async (output, context) => {
781
781
  });
782
782
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
783
783
  const doc = (0, smithy_client_1.take)(data, {
784
+ 'answer': smithy_client_1.expectString,
784
785
  'metadata': _ => de_Document(_, context),
785
- 'result': smithy_client_1.expectString,
786
+ 'sources': _ => de_Document(_, context),
786
787
  });
787
788
  Object.assign(contents, doc);
788
789
  return contents;
@@ -1089,10 +1090,12 @@ const de_ProxyConfig = (output, context) => {
1089
1090
  const de_SearchKnowledgeBaseResult = (output, context) => {
1090
1091
  return (0, smithy_client_1.take)(output, {
1091
1092
  'content': smithy_client_1.expectString,
1093
+ 'dataSourceType': smithy_client_1.expectString,
1092
1094
  'documentId': smithy_client_1.expectString,
1095
+ 'documentTitle': smithy_client_1.expectString,
1096
+ 'documentUrl': smithy_client_1.expectString,
1093
1097
  'score': smithy_client_1.limitedParseDouble,
1094
1098
  'source': smithy_client_1.expectString,
1095
- 'url': smithy_client_1.expectString,
1096
1099
  });
1097
1100
  };
1098
1101
  const de_SearchKnowledgeBaseResults = (output, context) => {
@@ -1,5 +1,5 @@
1
1
  import { KnowledgeBaseClient, } from "./KnowledgeBaseClient";
2
- import { ClearDataSourceCommand, } from "./commands/ClearDataSourceCommand";
2
+ import { CleanDataSourceCommand, } from "./commands/CleanDataSourceCommand";
3
3
  import { CloneDataSourceCommand, } from "./commands/CloneDataSourceCommand";
4
4
  import { CreateDataSourceCommand, } from "./commands/CreateDataSourceCommand";
5
5
  import { CreateDocumentCommand, } from "./commands/CreateDocumentCommand";
@@ -27,7 +27,7 @@ import { UpdateDocumentCommand, } from "./commands/UpdateDocumentCommand";
27
27
  import { UpdateKnowledgeBaseCommand, } from "./commands/UpdateKnowledgeBaseCommand";
28
28
  import { createAggregatedClient } from "@smithy/smithy-client";
29
29
  const commands = {
30
- ClearDataSourceCommand,
30
+ CleanDataSourceCommand,
31
31
  CloneDataSourceCommand,
32
32
  CreateDataSourceCommand,
33
33
  CreateDocumentCommand,
@@ -1,17 +1,17 @@
1
- import { de_ClearDataSourceCommand, se_ClearDataSourceCommand, } from "../protocols/Aws_restJson1";
1
+ import { de_CleanDataSourceCommand, se_CleanDataSourceCommand, } from "../protocols/Aws_restJson1";
2
2
  import { getSerdePlugin } from "@smithy/middleware-serde";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
4
  export { $Command };
5
- export class ClearDataSourceCommand extends $Command.classBuilder()
5
+ export class CleanDataSourceCommand extends $Command.classBuilder()
6
6
  .m(function (Command, cs, config, o) {
7
7
  return [
8
8
  getSerdePlugin(config, this.serialize, this.deserialize),
9
9
  ];
10
10
  })
11
- .s("KnowledgeBase", "ClearDataSource", {})
12
- .n("KnowledgeBaseClient", "ClearDataSourceCommand")
11
+ .s("KnowledgeBase", "CleanDataSource", {})
12
+ .n("KnowledgeBaseClient", "CleanDataSourceCommand")
13
13
  .f(void 0, void 0)
14
- .ser(se_ClearDataSourceCommand)
15
- .de(de_ClearDataSourceCommand)
14
+ .ser(se_CleanDataSourceCommand)
15
+ .de(de_CleanDataSourceCommand)
16
16
  .build() {
17
17
  }
@@ -1,4 +1,4 @@
1
- export * from "./ClearDataSourceCommand";
1
+ export * from "./CleanDataSourceCommand";
2
2
  export * from "./CloneDataSourceCommand";
3
3
  export * from "./CreateDataSourceCommand";
4
4
  export * from "./CreateDocumentCommand";
@@ -3,10 +3,10 @@ import { DataSourceConfig, DataSourceNotFoundException, DocumentNotFoundExceptio
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
5
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, 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
- export const se_ClearDataSourceCommand = async (input, context) => {
6
+ export const se_CleanDataSourceCommand = async (input, context) => {
7
7
  const b = rb(input, context);
8
8
  const headers = {};
9
- b.bp("/api/v1/data-sources/{dataSourceId}/clear");
9
+ b.bp("/api/v1/data-sources/{dataSourceId}/clean");
10
10
  b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
11
11
  const query = map({
12
12
  [_c]: [, input[_cI]],
@@ -470,7 +470,7 @@ export const se_UpdateKnowledgeBaseCommand = async (input, context) => {
470
470
  .b(body);
471
471
  return b.build();
472
472
  };
473
- export const de_ClearDataSourceCommand = async (output, context) => {
473
+ export const de_CleanDataSourceCommand = async (output, context) => {
474
474
  if (output.statusCode !== 204 && output.statusCode >= 300) {
475
475
  return de_CommandError(output, context);
476
476
  }
@@ -732,8 +732,9 @@ export const de_QueryKnowledgeBaseCommand = async (output, context) => {
732
732
  });
733
733
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
734
734
  const doc = take(data, {
735
+ 'answer': __expectString,
735
736
  'metadata': _ => de_Document(_, context),
736
- 'result': __expectString,
737
+ 'sources': _ => de_Document(_, context),
737
738
  });
738
739
  Object.assign(contents, doc);
739
740
  return contents;
@@ -1033,10 +1034,12 @@ const de_ProxyConfig = (output, context) => {
1033
1034
  const de_SearchKnowledgeBaseResult = (output, context) => {
1034
1035
  return take(output, {
1035
1036
  'content': __expectString,
1037
+ 'dataSourceType': __expectString,
1036
1038
  'documentId': __expectString,
1039
+ 'documentTitle': __expectString,
1040
+ 'documentUrl': __expectString,
1037
1041
  'score': __limitedParseDouble,
1038
1042
  'source': __expectString,
1039
- 'url': __expectString,
1040
1043
  });
1041
1044
  };
1042
1045
  const de_SearchKnowledgeBaseResults = (output, context) => {
@@ -1,5 +1,5 @@
1
1
  import { KnowledgeBaseClient } from "./KnowledgeBaseClient";
2
- import { ClearDataSourceCommandInput, ClearDataSourceCommandOutput } from "./commands/ClearDataSourceCommand";
2
+ import { CleanDataSourceCommandInput, CleanDataSourceCommandOutput } from "./commands/CleanDataSourceCommand";
3
3
  import { CloneDataSourceCommandInput, CloneDataSourceCommandOutput } from "./commands/CloneDataSourceCommand";
4
4
  import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "./commands/CreateDataSourceCommand";
5
5
  import { CreateDocumentCommandInput, CreateDocumentCommandOutput } from "./commands/CreateDocumentCommand";
@@ -28,11 +28,11 @@ import { UpdateKnowledgeBaseCommandInput, UpdateKnowledgeBaseCommandOutput } fro
28
28
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
29
29
  export interface KnowledgeBase {
30
30
  /**
31
- * @see {@link ClearDataSourceCommand}
31
+ * @see {@link CleanDataSourceCommand}
32
32
  */
33
- clearDataSource(args: ClearDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<ClearDataSourceCommandOutput>;
34
- clearDataSource(args: ClearDataSourceCommandInput, cb: (err: any, data?: ClearDataSourceCommandOutput) => void): void;
35
- clearDataSource(args: ClearDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ClearDataSourceCommandOutput) => void): void;
33
+ cleanDataSource(args: CleanDataSourceCommandInput, options?: __HttpHandlerOptions): Promise<CleanDataSourceCommandOutput>;
34
+ cleanDataSource(args: CleanDataSourceCommandInput, cb: (err: any, data?: CleanDataSourceCommandOutput) => void): void;
35
+ cleanDataSource(args: CleanDataSourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CleanDataSourceCommandOutput) => void): void;
36
36
  /**
37
37
  * @see {@link CloneDataSourceCommand}
38
38
  */
@@ -1,4 +1,4 @@
1
- import { ClearDataSourceCommandInput, ClearDataSourceCommandOutput } from "./commands/ClearDataSourceCommand";
1
+ import { CleanDataSourceCommandInput, CleanDataSourceCommandOutput } from "./commands/CleanDataSourceCommand";
2
2
  import { CloneDataSourceCommandInput, CloneDataSourceCommandOutput } from "./commands/CloneDataSourceCommand";
3
3
  import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "./commands/CreateDataSourceCommand";
4
4
  import { CreateDocumentCommandInput, CreateDocumentCommandOutput } from "./commands/CreateDocumentCommand";
@@ -35,11 +35,11 @@ export { __Client };
35
35
  /**
36
36
  * @public
37
37
  */
38
- export type ServiceInputTypes = ClearDataSourceCommandInput | CloneDataSourceCommandInput | CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | GetDataSourceCommandInput | GetDocumentCommandInput | GetDocumentPresignedDownloadUrlCommandInput | GetDocumentPresignedUploadUrlCommandInput | GetExtraInfoForDataSourceCommandInput | GetKnowledgeBaseCommandInput | GetSyncLogsCommandInput | GetSyncStatusCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListKnowledgeBasesCommandInput | QueryKnowledgeBaseCommandInput | SearchKnowledgeBaseCommandInput | StartSyncDataSourceCommandInput | StopSyncDataSourceCommandInput | UpdateDataSourceCommandInput | UpdateDocumentCommandInput | UpdateKnowledgeBaseCommandInput;
38
+ export type ServiceInputTypes = CleanDataSourceCommandInput | CloneDataSourceCommandInput | CreateDataSourceCommandInput | CreateDocumentCommandInput | CreateKnowledgeBaseCommandInput | DeleteDataSourceCommandInput | DeleteDocumentCommandInput | DeleteKnowledgeBaseCommandInput | GetDataSourceCommandInput | GetDocumentCommandInput | GetDocumentPresignedDownloadUrlCommandInput | GetDocumentPresignedUploadUrlCommandInput | GetExtraInfoForDataSourceCommandInput | GetKnowledgeBaseCommandInput | GetSyncLogsCommandInput | GetSyncStatusCommandInput | ListDataSourcesCommandInput | ListDocumentsCommandInput | ListKnowledgeBasesCommandInput | QueryKnowledgeBaseCommandInput | SearchKnowledgeBaseCommandInput | StartSyncDataSourceCommandInput | StopSyncDataSourceCommandInput | UpdateDataSourceCommandInput | UpdateDocumentCommandInput | UpdateKnowledgeBaseCommandInput;
39
39
  /**
40
40
  * @public
41
41
  */
42
- export type ServiceOutputTypes = ClearDataSourceCommandOutput | CloneDataSourceCommandOutput | CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetDataSourceCommandOutput | GetDocumentCommandOutput | GetDocumentPresignedDownloadUrlCommandOutput | GetDocumentPresignedUploadUrlCommandOutput | GetExtraInfoForDataSourceCommandOutput | GetKnowledgeBaseCommandOutput | GetSyncLogsCommandOutput | GetSyncStatusCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListKnowledgeBasesCommandOutput | QueryKnowledgeBaseCommandOutput | SearchKnowledgeBaseCommandOutput | StartSyncDataSourceCommandOutput | StopSyncDataSourceCommandOutput | UpdateDataSourceCommandOutput | UpdateDocumentCommandOutput | UpdateKnowledgeBaseCommandOutput;
42
+ export type ServiceOutputTypes = CleanDataSourceCommandOutput | CloneDataSourceCommandOutput | CreateDataSourceCommandOutput | CreateDocumentCommandOutput | CreateKnowledgeBaseCommandOutput | DeleteDataSourceCommandOutput | DeleteDocumentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetDataSourceCommandOutput | GetDocumentCommandOutput | GetDocumentPresignedDownloadUrlCommandOutput | GetDocumentPresignedUploadUrlCommandOutput | GetExtraInfoForDataSourceCommandOutput | GetKnowledgeBaseCommandOutput | GetSyncLogsCommandOutput | GetSyncStatusCommandOutput | ListDataSourcesCommandOutput | ListDocumentsCommandOutput | ListKnowledgeBasesCommandOutput | QueryKnowledgeBaseCommandOutput | SearchKnowledgeBaseCommandOutput | StartSyncDataSourceCommandOutput | StopSyncDataSourceCommandOutput | UpdateDataSourceCommandOutput | UpdateDocumentCommandOutput | UpdateKnowledgeBaseCommandOutput;
43
43
  /**
44
44
  * @public
45
45
  */
@@ -1,5 +1,5 @@
1
1
  import { KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KnowledgeBaseClient";
2
- import { ClearDataSourceInput, ClearDataSourceOutput } from "../models/models_0";
2
+ import { CleanDataSourceInput, CleanDataSourceOutput } from "../models/models_0";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
4
  import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
5
  /**
@@ -10,44 +10,44 @@ export { $Command };
10
10
  /**
11
11
  * @public
12
12
  *
13
- * The input for {@link ClearDataSourceCommand}.
13
+ * The input for {@link CleanDataSourceCommand}.
14
14
  */
15
- export interface ClearDataSourceCommandInput extends ClearDataSourceInput {
15
+ export interface CleanDataSourceCommandInput extends CleanDataSourceInput {
16
16
  }
17
17
  /**
18
18
  * @public
19
19
  *
20
- * The output of {@link ClearDataSourceCommand}.
20
+ * The output of {@link CleanDataSourceCommand}.
21
21
  */
22
- export interface ClearDataSourceCommandOutput extends ClearDataSourceOutput, __MetadataBearer {
22
+ export interface CleanDataSourceCommandOutput extends CleanDataSourceOutput, __MetadataBearer {
23
23
  }
24
- declare const ClearDataSourceCommand_base: {
25
- new (input: ClearDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<ClearDataSourceCommandInput, ClearDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (__0_0: ClearDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<ClearDataSourceCommandInput, ClearDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
24
+ declare const CleanDataSourceCommand_base: {
25
+ new (input: CleanDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<CleanDataSourceCommandInput, CleanDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: CleanDataSourceCommandInput): import("@smithy/smithy-client").CommandImpl<CleanDataSourceCommandInput, CleanDataSourceCommandOutput, KnowledgeBaseClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Clear the data source by its ID. It will clear all documents and sync logs.
30
+ * Clean the data source by its ID. It will clean all documents and sync logs. This operation is irreversible.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
34
- * import { KnowledgeBaseClient, ClearDataSourceCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
35
- * // const { KnowledgeBaseClient, ClearDataSourceCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
34
+ * import { KnowledgeBaseClient, CleanDataSourceCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
35
+ * // const { KnowledgeBaseClient, CleanDataSourceCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
36
36
  * const client = new KnowledgeBaseClient(config);
37
- * const input = { // ClearDataSourceInput
37
+ * const input = { // CleanDataSourceInput
38
38
  * companyId: "STRING_VALUE",
39
39
  * dataSourceId: "STRING_VALUE", // required
40
40
  * };
41
- * const command = new ClearDataSourceCommand(input);
41
+ * const command = new CleanDataSourceCommand(input);
42
42
  * const response = await client.send(command);
43
43
  * // {};
44
44
  *
45
45
  * ```
46
46
  *
47
- * @param ClearDataSourceCommandInput - {@link ClearDataSourceCommandInput}
48
- * @returns {@link ClearDataSourceCommandOutput}
49
- * @see {@link ClearDataSourceCommandInput} for command's `input` shape.
50
- * @see {@link ClearDataSourceCommandOutput} for command's `response` shape.
47
+ * @param CleanDataSourceCommandInput - {@link CleanDataSourceCommandInput}
48
+ * @returns {@link CleanDataSourceCommandOutput}
49
+ * @see {@link CleanDataSourceCommandInput} for command's `input` shape.
50
+ * @see {@link CleanDataSourceCommandOutput} for command's `response` shape.
51
51
  * @see {@link KnowledgeBaseClientResolvedConfig | config} for KnowledgeBaseClient's `config` shape.
52
52
  *
53
53
  * @throws {@link DataSourceNotFoundException} (client fault)
@@ -68,16 +68,16 @@ declare const ClearDataSourceCommand_base: {
68
68
  *
69
69
  * @public
70
70
  */
71
- export declare class ClearDataSourceCommand extends ClearDataSourceCommand_base {
71
+ export declare class CleanDataSourceCommand extends CleanDataSourceCommand_base {
72
72
  /** @internal type navigation helper, not in runtime. */
73
73
  protected static __types: {
74
74
  api: {
75
- input: ClearDataSourceInput;
75
+ input: CleanDataSourceInput;
76
76
  output: {};
77
77
  };
78
78
  sdk: {
79
- input: ClearDataSourceCommandInput;
80
- output: ClearDataSourceCommandOutput;
79
+ input: CleanDataSourceCommandInput;
80
+ output: CleanDataSourceCommandOutput;
81
81
  };
82
82
  };
83
83
  }
@@ -53,8 +53,9 @@ declare const QueryKnowledgeBaseCommand_base: {
53
53
  * const command = new QueryKnowledgeBaseCommand(input);
54
54
  * const response = await client.send(command);
55
55
  * // { // QueryKnowledgeBaseOutput
56
- * // result: "STRING_VALUE", // required
56
+ * // answer: "STRING_VALUE", // required
57
57
  * // metadata: "DOCUMENT_VALUE", // required
58
+ * // sources: "DOCUMENT_VALUE", // required
58
59
  * // };
59
60
  *
60
61
  * ```
@@ -50,10 +50,12 @@ declare const SearchKnowledgeBaseCommand_base: {
50
50
  * // results: [ // SearchKnowledgeBaseResults // required
51
51
  * // { // SearchKnowledgeBaseResult
52
52
  * // documentId: "STRING_VALUE", // required
53
+ * // documentTitle: "STRING_VALUE", // required
53
54
  * // score: Number("double"), // required
54
55
  * // source: "STRING_VALUE", // required
55
56
  * // content: "STRING_VALUE", // required
56
- * // url: "STRING_VALUE", // required
57
+ * // documentUrl: "STRING_VALUE", // required
58
+ * // dataSourceType: "files" || "confluence" || "gdrive" || "proxy", // required
57
59
  * // },
58
60
  * // ],
59
61
  * // };
@@ -1,4 +1,4 @@
1
- export * from "./ClearDataSourceCommand";
1
+ export * from "./CleanDataSourceCommand";
2
2
  export * from "./CloneDataSourceCommand";
3
3
  export * from "./CreateDataSourceCommand";
4
4
  export * from "./CreateDocumentCommand";
@@ -37,7 +37,7 @@ export declare class UnauthorizedException extends __BaseException {
37
37
  /**
38
38
  * @public
39
39
  */
40
- export interface ClearDataSourceInput {
40
+ export interface CleanDataSourceInput {
41
41
  /**
42
42
  * The unique identifier of the tenant when a service token is used.
43
43
  * @public
@@ -52,7 +52,7 @@ export interface ClearDataSourceInput {
52
52
  /**
53
53
  * @public
54
54
  */
55
- export interface ClearDataSourceOutput {
55
+ export interface CleanDataSourceOutput {
56
56
  }
57
57
  /**
58
58
  * @public
@@ -1027,16 +1027,29 @@ export interface QueryKnowledgeBaseInput {
1027
1027
  * @public
1028
1028
  */
1029
1029
  knowledgeBaseId: string;
1030
+ /**
1031
+ * The query to search the knowledge base. Example: What is the product knowledge base?
1032
+ * @public
1033
+ */
1030
1034
  query: string;
1035
+ /**
1036
+ * The search configuration to use for the query. Example: \{topK: 10, threshold: 0.5, searchStrategy: 'hybrid'\}
1037
+ * @public
1038
+ */
1031
1039
  searchConfig?: SearchConfig | undefined;
1040
+ /**
1041
+ * The LLM configuration to use for the query. Example: \{provider: 'openai', model: 'gpt-4o', temperature: 0.5\}
1042
+ * @public
1043
+ */
1032
1044
  llmConfig?: LlmConfig | undefined;
1033
1045
  }
1034
1046
  /**
1035
1047
  * @public
1036
1048
  */
1037
1049
  export interface QueryKnowledgeBaseOutput {
1038
- result: string;
1050
+ answer: string;
1039
1051
  metadata: __DocumentType;
1052
+ sources: __DocumentType;
1040
1053
  }
1041
1054
  /**
1042
1055
  * @public
@@ -1052,7 +1065,15 @@ export interface SearchKnowledgeBaseInput {
1052
1065
  * @public
1053
1066
  */
1054
1067
  knowledgeBaseId: string;
1068
+ /**
1069
+ * The query to search the knowledge base. Example: What is the product knowledge base?
1070
+ * @public
1071
+ */
1055
1072
  query: string;
1073
+ /**
1074
+ * The search configuration to use for the search. Example: \{topK: 10, threshold: 0.5, searchStrategy: 'hybrid'\}
1075
+ * @public
1076
+ */
1056
1077
  searchConfig?: SearchConfig | undefined;
1057
1078
  }
1058
1079
  /**
@@ -1064,6 +1085,7 @@ export interface SearchKnowledgeBaseResult {
1064
1085
  * @public
1065
1086
  */
1066
1087
  documentId: string;
1088
+ documentTitle: string;
1067
1089
  score: number;
1068
1090
  /**
1069
1091
  * The ID of the data source. Example: 123e4567-e89b-12d3-a456-426614174000
@@ -1071,7 +1093,8 @@ export interface SearchKnowledgeBaseResult {
1071
1093
  */
1072
1094
  source: string;
1073
1095
  content: string;
1074
- url: string;
1096
+ documentUrl: string;
1097
+ dataSourceType: DataSourceType;
1075
1098
  }
1076
1099
  /**
1077
1100
  * @public
@@ -1,4 +1,4 @@
1
- import { ClearDataSourceCommandInput, ClearDataSourceCommandOutput } from "../commands/ClearDataSourceCommand";
1
+ import { CleanDataSourceCommandInput, CleanDataSourceCommandOutput } from "../commands/CleanDataSourceCommand";
2
2
  import { CloneDataSourceCommandInput, CloneDataSourceCommandOutput } from "../commands/CloneDataSourceCommand";
3
3
  import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "../commands/CreateDataSourceCommand";
4
4
  import { CreateDocumentCommandInput, CreateDocumentCommandOutput } from "../commands/CreateDocumentCommand";
@@ -27,9 +27,9 @@ import { UpdateKnowledgeBaseCommandInput, UpdateKnowledgeBaseCommandOutput } fro
27
27
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
28
28
  import { SerdeContext as __SerdeContext } from "@smithy/types";
29
29
  /**
30
- * serializeAws_restJson1ClearDataSourceCommand
30
+ * serializeAws_restJson1CleanDataSourceCommand
31
31
  */
32
- export declare const se_ClearDataSourceCommand: (input: ClearDataSourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
32
+ export declare const se_CleanDataSourceCommand: (input: CleanDataSourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
33
33
  /**
34
34
  * serializeAws_restJson1CloneDataSourceCommand
35
35
  */
@@ -131,9 +131,9 @@ export declare const se_UpdateDocumentCommand: (input: UpdateDocumentCommandInpu
131
131
  */
132
132
  export declare const se_UpdateKnowledgeBaseCommand: (input: UpdateKnowledgeBaseCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
133
133
  /**
134
- * deserializeAws_restJson1ClearDataSourceCommand
134
+ * deserializeAws_restJson1CleanDataSourceCommand
135
135
  */
136
- export declare const de_ClearDataSourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ClearDataSourceCommandOutput>;
136
+ export declare const de_CleanDataSourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CleanDataSourceCommandOutput>;
137
137
  /**
138
138
  * deserializeAws_restJson1CloneDataSourceCommand
139
139
  */
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.12",
4
+ "version": "0.0.13",
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",