@aws-sdk/client-wisdom 3.142.0 → 3.154.0
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/CHANGELOG.md +27 -0
- package/dist-cjs/Wisdom.js +15 -0
- package/dist-cjs/commands/PutFeedbackCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +25 -3
- package/dist-cjs/protocols/Aws_restJson1.js +88 -2
- package/dist-es/Wisdom.js +15 -0
- package/dist-es/commands/PutFeedbackCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +13 -0
- package/dist-es/protocols/Aws_restJson1.js +109 -0
- package/dist-types/Wisdom.d.ts +11 -0
- package/dist-types/WisdomClient.d.ts +3 -2
- package/dist-types/commands/PutFeedbackCommand.d.ts +39 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +69 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/Wisdom.d.ts +5 -0
- package/dist-types/ts3.4/WisdomClient.d.ts +3 -2
- package/dist-types/ts3.4/commands/PutFeedbackCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +41 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
- package/package.json +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.154.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.153.0...v3.154.0) (2022-08-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-wisdom
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.150.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.149.0...v3.150.0) (2022-08-15)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **client-wisdom:** This release introduces a new API PutFeedback that allows submitting feedback to Wisdom on content relevance. ([53b4df1](https://github.com/aws/aws-sdk-js-v3/commit/53b4df188f94ede91121c7bac0470d7dbda37046))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.145.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.144.0...v3.145.0) (2022-08-08)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @aws-sdk/client-wisdom
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [3.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
7
34
|
|
|
8
35
|
|
package/dist-cjs/Wisdom.js
CHANGED
|
@@ -23,6 +23,7 @@ const ListContentsCommand_1 = require("./commands/ListContentsCommand");
|
|
|
23
23
|
const ListKnowledgeBasesCommand_1 = require("./commands/ListKnowledgeBasesCommand");
|
|
24
24
|
const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
|
|
25
25
|
const NotifyRecommendationsReceivedCommand_1 = require("./commands/NotifyRecommendationsReceivedCommand");
|
|
26
|
+
const PutFeedbackCommand_1 = require("./commands/PutFeedbackCommand");
|
|
26
27
|
const QueryAssistantCommand_1 = require("./commands/QueryAssistantCommand");
|
|
27
28
|
const RemoveKnowledgeBaseTemplateUriCommand_1 = require("./commands/RemoveKnowledgeBaseTemplateUriCommand");
|
|
28
29
|
const SearchContentCommand_1 = require("./commands/SearchContentCommand");
|
|
@@ -342,6 +343,20 @@ class Wisdom extends WisdomClient_1.WisdomClient {
|
|
|
342
343
|
return this.send(command, optionsOrCb);
|
|
343
344
|
}
|
|
344
345
|
}
|
|
346
|
+
putFeedback(args, optionsOrCb, cb) {
|
|
347
|
+
const command = new PutFeedbackCommand_1.PutFeedbackCommand(args);
|
|
348
|
+
if (typeof optionsOrCb === "function") {
|
|
349
|
+
this.send(command, optionsOrCb);
|
|
350
|
+
}
|
|
351
|
+
else if (typeof cb === "function") {
|
|
352
|
+
if (typeof optionsOrCb !== "object")
|
|
353
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
354
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
return this.send(command, optionsOrCb);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
345
360
|
queryAssistant(args, optionsOrCb, cb) {
|
|
346
361
|
const command = new QueryAssistantCommand_1.QueryAssistantCommand(args);
|
|
347
362
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PutFeedbackCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
8
|
+
class PutFeedbackCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "WisdomClient";
|
|
18
|
+
const commandName = "PutFeedbackCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.PutFeedbackRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.PutFeedbackResponseFilterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1PutFeedbackCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1PutFeedbackCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.PutFeedbackCommand = PutFeedbackCommand;
|
|
@@ -23,6 +23,7 @@ tslib_1.__exportStar(require("./ListContentsCommand"), exports);
|
|
|
23
23
|
tslib_1.__exportStar(require("./ListKnowledgeBasesCommand"), exports);
|
|
24
24
|
tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
|
|
25
25
|
tslib_1.__exportStar(require("./NotifyRecommendationsReceivedCommand"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("./PutFeedbackCommand"), exports);
|
|
26
27
|
tslib_1.__exportStar(require("./QueryAssistantCommand"), exports);
|
|
27
28
|
tslib_1.__exportStar(require("./RemoveKnowledgeBaseTemplateUriCommand"), exports);
|
|
28
29
|
tslib_1.__exportStar(require("./SearchContentCommand"), exports);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.UntagResourceResponseFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceResponseFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.ListTagsForResourceResponseFilterSensitiveLog = exports.ListTagsForResourceRequestFilterSensitiveLog = exports.UpdateKnowledgeBaseTemplateUriResponseFilterSensitiveLog = exports.UpdateKnowledgeBaseTemplateUriRequestFilterSensitiveLog = exports.StartContentUploadResponseFilterSensitiveLog = exports.StartContentUploadRequestFilterSensitiveLog = exports.SearchContentResponseFilterSensitiveLog = exports.SearchContentRequestFilterSensitiveLog = exports.RemoveKnowledgeBaseTemplateUriResponseFilterSensitiveLog = exports.RemoveKnowledgeBaseTemplateUriRequestFilterSensitiveLog = void 0;
|
|
3
|
+
exports.HighlightFilterSensitiveLog = exports.ContentReferenceFilterSensitiveLog = exports.GetRecommendationsRequestFilterSensitiveLog = exports.GetAssistantResponseFilterSensitiveLog = exports.GetAssistantRequestFilterSensitiveLog = exports.DeleteAssistantResponseFilterSensitiveLog = exports.DeleteAssistantRequestFilterSensitiveLog = exports.CreateAssistantResponseFilterSensitiveLog = exports.AssistantDataFilterSensitiveLog = exports.CreateAssistantRequestFilterSensitiveLog = exports.ServerSideEncryptionConfigurationFilterSensitiveLog = exports.ListAssistantAssociationsResponseFilterSensitiveLog = exports.AssistantAssociationSummaryFilterSensitiveLog = exports.ListAssistantAssociationsRequestFilterSensitiveLog = exports.GetAssistantAssociationResponseFilterSensitiveLog = exports.GetAssistantAssociationRequestFilterSensitiveLog = exports.DeleteAssistantAssociationResponseFilterSensitiveLog = exports.DeleteAssistantAssociationRequestFilterSensitiveLog = exports.CreateAssistantAssociationResponseFilterSensitiveLog = exports.AssistantAssociationDataFilterSensitiveLog = exports.AssistantAssociationOutputDataFilterSensitiveLog = exports.KnowledgeBaseAssociationDataFilterSensitiveLog = exports.CreateAssistantAssociationRequestFilterSensitiveLog = exports.AssistantAssociationInputDataFilterSensitiveLog = exports.AppIntegrationsConfigurationFilterSensitiveLog = exports.TooManyTagsException = exports.KnowledgeBaseStatus = exports.SourceConfiguration = exports.KnowledgeBaseType = exports.PreconditionFailedException = exports.ContentStatus = exports.FilterOperator = exports.FilterField = exports.TargetType = exports.Relevance = exports.RecommendationTriggerType = exports.RecommendationSourceType = exports.RecommendationTriggerData = exports.RecommendationType = exports.RelevanceLevel = exports.AssistantStatus = exports.AssistantType = exports.ValidationException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.AssistantAssociationOutputData = exports.AssociationType = exports.AssistantAssociationInputData = exports.ConflictException = exports.AccessDeniedException = void 0;
|
|
4
|
+
exports.DeleteKnowledgeBaseResponseFilterSensitiveLog = exports.DeleteKnowledgeBaseRequestFilterSensitiveLog = exports.CreateKnowledgeBaseResponseFilterSensitiveLog = exports.KnowledgeBaseDataFilterSensitiveLog = exports.CreateKnowledgeBaseRequestFilterSensitiveLog = exports.SourceConfigurationFilterSensitiveLog = exports.RenderingConfigurationFilterSensitiveLog = exports.UpdateContentResponseFilterSensitiveLog = exports.UpdateContentRequestFilterSensitiveLog = exports.ListContentsResponseFilterSensitiveLog = exports.ListContentsRequestFilterSensitiveLog = exports.GetContentSummaryResponseFilterSensitiveLog = exports.ContentSummaryFilterSensitiveLog = exports.GetContentSummaryRequestFilterSensitiveLog = exports.GetContentResponseFilterSensitiveLog = exports.GetContentRequestFilterSensitiveLog = exports.DeleteContentResponseFilterSensitiveLog = exports.DeleteContentRequestFilterSensitiveLog = exports.CreateContentResponseFilterSensitiveLog = exports.ContentDataFilterSensitiveLog = exports.CreateContentRequestFilterSensitiveLog = exports.GetSessionResponseFilterSensitiveLog = exports.GetSessionRequestFilterSensitiveLog = exports.CreateSessionResponseFilterSensitiveLog = exports.SessionDataFilterSensitiveLog = exports.CreateSessionRequestFilterSensitiveLog = exports.SearchSessionsResponseFilterSensitiveLog = exports.SessionSummaryFilterSensitiveLog = exports.SearchSessionsRequestFilterSensitiveLog = exports.SearchExpressionFilterSensitiveLog = exports.FilterFilterSensitiveLog = exports.QueryAssistantResponseFilterSensitiveLog = exports.ResultDataFilterSensitiveLog = exports.QueryAssistantRequestFilterSensitiveLog = exports.PutFeedbackResponseFilterSensitiveLog = exports.PutFeedbackRequestFilterSensitiveLog = exports.FeedbackDataFilterSensitiveLog = exports.NotifyRecommendationsReceivedResponseFilterSensitiveLog = exports.NotifyRecommendationsReceivedErrorFilterSensitiveLog = exports.NotifyRecommendationsReceivedRequestFilterSensitiveLog = exports.ListAssistantsResponseFilterSensitiveLog = exports.AssistantSummaryFilterSensitiveLog = exports.ListAssistantsRequestFilterSensitiveLog = exports.GetRecommendationsResponseFilterSensitiveLog = exports.RecommendationTriggerFilterSensitiveLog = exports.RecommendationTriggerDataFilterSensitiveLog = exports.QueryRecommendationTriggerDataFilterSensitiveLog = exports.RecommendationDataFilterSensitiveLog = exports.DocumentFilterSensitiveLog = exports.DocumentTextFilterSensitiveLog = void 0;
|
|
5
|
+
exports.UntagResourceResponseFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceResponseFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.ListTagsForResourceResponseFilterSensitiveLog = exports.ListTagsForResourceRequestFilterSensitiveLog = exports.UpdateKnowledgeBaseTemplateUriResponseFilterSensitiveLog = exports.UpdateKnowledgeBaseTemplateUriRequestFilterSensitiveLog = exports.StartContentUploadResponseFilterSensitiveLog = exports.StartContentUploadRequestFilterSensitiveLog = exports.SearchContentResponseFilterSensitiveLog = exports.SearchContentRequestFilterSensitiveLog = exports.RemoveKnowledgeBaseTemplateUriResponseFilterSensitiveLog = exports.RemoveKnowledgeBaseTemplateUriRequestFilterSensitiveLog = exports.ListKnowledgeBasesResponseFilterSensitiveLog = exports.KnowledgeBaseSummaryFilterSensitiveLog = exports.ListKnowledgeBasesRequestFilterSensitiveLog = exports.GetKnowledgeBaseResponseFilterSensitiveLog = exports.GetKnowledgeBaseRequestFilterSensitiveLog = void 0;
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const WisdomServiceException_1 = require("./WisdomServiceException");
|
|
8
8
|
class AccessDeniedException extends WisdomServiceException_1.WisdomServiceException {
|
|
@@ -132,6 +132,16 @@ var RecommendationTriggerType;
|
|
|
132
132
|
(function (RecommendationTriggerType) {
|
|
133
133
|
RecommendationTriggerType["QUERY"] = "QUERY";
|
|
134
134
|
})(RecommendationTriggerType = exports.RecommendationTriggerType || (exports.RecommendationTriggerType = {}));
|
|
135
|
+
var Relevance;
|
|
136
|
+
(function (Relevance) {
|
|
137
|
+
Relevance["HELPFUL"] = "HELPFUL";
|
|
138
|
+
Relevance["NOT_HELPFUL"] = "NOT_HELPFUL";
|
|
139
|
+
})(Relevance = exports.Relevance || (exports.Relevance = {}));
|
|
140
|
+
var TargetType;
|
|
141
|
+
(function (TargetType) {
|
|
142
|
+
TargetType["RECOMMENDATION"] = "RECOMMENDATION";
|
|
143
|
+
TargetType["RESULT"] = "RESULT";
|
|
144
|
+
})(TargetType = exports.TargetType || (exports.TargetType = {}));
|
|
135
145
|
var FilterField;
|
|
136
146
|
(function (FilterField) {
|
|
137
147
|
FilterField["NAME"] = "NAME";
|
|
@@ -386,6 +396,18 @@ const NotifyRecommendationsReceivedResponseFilterSensitiveLog = (obj) => ({
|
|
|
386
396
|
...obj,
|
|
387
397
|
});
|
|
388
398
|
exports.NotifyRecommendationsReceivedResponseFilterSensitiveLog = NotifyRecommendationsReceivedResponseFilterSensitiveLog;
|
|
399
|
+
const FeedbackDataFilterSensitiveLog = (obj) => ({
|
|
400
|
+
...obj,
|
|
401
|
+
});
|
|
402
|
+
exports.FeedbackDataFilterSensitiveLog = FeedbackDataFilterSensitiveLog;
|
|
403
|
+
const PutFeedbackRequestFilterSensitiveLog = (obj) => ({
|
|
404
|
+
...obj,
|
|
405
|
+
});
|
|
406
|
+
exports.PutFeedbackRequestFilterSensitiveLog = PutFeedbackRequestFilterSensitiveLog;
|
|
407
|
+
const PutFeedbackResponseFilterSensitiveLog = (obj) => ({
|
|
408
|
+
...obj,
|
|
409
|
+
});
|
|
410
|
+
exports.PutFeedbackResponseFilterSensitiveLog = PutFeedbackResponseFilterSensitiveLog;
|
|
389
411
|
const QueryAssistantRequestFilterSensitiveLog = (obj) => ({
|
|
390
412
|
...obj,
|
|
391
413
|
...(obj.queryText && { queryText: smithy_client_1.SENSITIVE_STRING }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.deserializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand = exports.deserializeAws_restJson1UpdateContentCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartContentUploadCommand = exports.deserializeAws_restJson1SearchSessionsCommand = exports.deserializeAws_restJson1SearchContentCommand = exports.deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand = exports.deserializeAws_restJson1QueryAssistantCommand = exports.deserializeAws_restJson1NotifyRecommendationsReceivedCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListKnowledgeBasesCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1ListAssistantsCommand = exports.deserializeAws_restJson1ListAssistantAssociationsCommand = exports.deserializeAws_restJson1GetSessionCommand = exports.deserializeAws_restJson1GetRecommendationsCommand = exports.deserializeAws_restJson1GetKnowledgeBaseCommand = exports.deserializeAws_restJson1GetContentSummaryCommand = exports.deserializeAws_restJson1GetContentCommand = exports.deserializeAws_restJson1GetAssistantAssociationCommand = exports.deserializeAws_restJson1GetAssistantCommand = exports.deserializeAws_restJson1DeleteKnowledgeBaseCommand = exports.deserializeAws_restJson1DeleteContentCommand = exports.deserializeAws_restJson1DeleteAssistantAssociationCommand = exports.deserializeAws_restJson1DeleteAssistantCommand = exports.deserializeAws_restJson1CreateSessionCommand = exports.deserializeAws_restJson1CreateKnowledgeBaseCommand = exports.deserializeAws_restJson1CreateContentCommand = exports.deserializeAws_restJson1CreateAssistantAssociationCommand = exports.deserializeAws_restJson1CreateAssistantCommand = exports.serializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand = exports.serializeAws_restJson1UpdateContentCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartContentUploadCommand = exports.serializeAws_restJson1SearchSessionsCommand = exports.serializeAws_restJson1SearchContentCommand = exports.serializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand = exports.serializeAws_restJson1QueryAssistantCommand = exports.serializeAws_restJson1PutFeedbackCommand = exports.serializeAws_restJson1NotifyRecommendationsReceivedCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListKnowledgeBasesCommand = exports.serializeAws_restJson1ListContentsCommand = exports.serializeAws_restJson1ListAssistantsCommand = exports.serializeAws_restJson1ListAssistantAssociationsCommand = exports.serializeAws_restJson1GetSessionCommand = exports.serializeAws_restJson1GetRecommendationsCommand = exports.serializeAws_restJson1GetKnowledgeBaseCommand = exports.serializeAws_restJson1GetContentSummaryCommand = exports.serializeAws_restJson1GetContentCommand = exports.serializeAws_restJson1GetAssistantAssociationCommand = exports.serializeAws_restJson1GetAssistantCommand = exports.serializeAws_restJson1DeleteKnowledgeBaseCommand = exports.serializeAws_restJson1DeleteContentCommand = exports.serializeAws_restJson1DeleteAssistantAssociationCommand = exports.serializeAws_restJson1DeleteAssistantCommand = exports.serializeAws_restJson1CreateSessionCommand = exports.serializeAws_restJson1CreateKnowledgeBaseCommand = exports.serializeAws_restJson1CreateContentCommand = exports.serializeAws_restJson1CreateAssistantAssociationCommand = exports.serializeAws_restJson1CreateAssistantCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1UpdateKnowledgeBaseTemplateUriCommand = exports.deserializeAws_restJson1UpdateContentCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartContentUploadCommand = exports.deserializeAws_restJson1SearchSessionsCommand = exports.deserializeAws_restJson1SearchContentCommand = exports.deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand = exports.deserializeAws_restJson1QueryAssistantCommand = exports.deserializeAws_restJson1PutFeedbackCommand = exports.deserializeAws_restJson1NotifyRecommendationsReceivedCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListKnowledgeBasesCommand = exports.deserializeAws_restJson1ListContentsCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
7
|
const uuid_1 = require("uuid");
|
|
@@ -491,6 +491,30 @@ const serializeAws_restJson1NotifyRecommendationsReceivedCommand = async (input,
|
|
|
491
491
|
});
|
|
492
492
|
};
|
|
493
493
|
exports.serializeAws_restJson1NotifyRecommendationsReceivedCommand = serializeAws_restJson1NotifyRecommendationsReceivedCommand;
|
|
494
|
+
const serializeAws_restJson1PutFeedbackCommand = async (input, context) => {
|
|
495
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
496
|
+
const headers = {
|
|
497
|
+
"content-type": "application/json",
|
|
498
|
+
};
|
|
499
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/feedback";
|
|
500
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "assistantId", () => input.assistantId, "{assistantId}", false);
|
|
501
|
+
let body;
|
|
502
|
+
body = JSON.stringify({
|
|
503
|
+
...(input.feedback != null && { feedback: serializeAws_restJson1FeedbackData(input.feedback, context) }),
|
|
504
|
+
...(input.targetId != null && { targetId: input.targetId }),
|
|
505
|
+
...(input.targetType != null && { targetType: input.targetType }),
|
|
506
|
+
});
|
|
507
|
+
return new protocol_http_1.HttpRequest({
|
|
508
|
+
protocol,
|
|
509
|
+
hostname,
|
|
510
|
+
port,
|
|
511
|
+
method: "PUT",
|
|
512
|
+
headers,
|
|
513
|
+
path: resolvedPath,
|
|
514
|
+
body,
|
|
515
|
+
});
|
|
516
|
+
};
|
|
517
|
+
exports.serializeAws_restJson1PutFeedbackCommand = serializeAws_restJson1PutFeedbackCommand;
|
|
494
518
|
const serializeAws_restJson1QueryAssistantCommand = async (input, context) => {
|
|
495
519
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
496
520
|
const headers = {
|
|
@@ -1603,6 +1627,58 @@ const deserializeAws_restJson1NotifyRecommendationsReceivedCommandError = async
|
|
|
1603
1627
|
});
|
|
1604
1628
|
}
|
|
1605
1629
|
};
|
|
1630
|
+
const deserializeAws_restJson1PutFeedbackCommand = async (output, context) => {
|
|
1631
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1632
|
+
return deserializeAws_restJson1PutFeedbackCommandError(output, context);
|
|
1633
|
+
}
|
|
1634
|
+
const contents = map({
|
|
1635
|
+
$metadata: deserializeMetadata(output),
|
|
1636
|
+
});
|
|
1637
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1638
|
+
if (data.assistantArn != null) {
|
|
1639
|
+
contents.assistantArn = (0, smithy_client_1.expectString)(data.assistantArn);
|
|
1640
|
+
}
|
|
1641
|
+
if (data.assistantId != null) {
|
|
1642
|
+
contents.assistantId = (0, smithy_client_1.expectString)(data.assistantId);
|
|
1643
|
+
}
|
|
1644
|
+
if (data.feedback != null) {
|
|
1645
|
+
contents.feedback = deserializeAws_restJson1FeedbackData(data.feedback, context);
|
|
1646
|
+
}
|
|
1647
|
+
if (data.targetId != null) {
|
|
1648
|
+
contents.targetId = (0, smithy_client_1.expectString)(data.targetId);
|
|
1649
|
+
}
|
|
1650
|
+
if (data.targetType != null) {
|
|
1651
|
+
contents.targetType = (0, smithy_client_1.expectString)(data.targetType);
|
|
1652
|
+
}
|
|
1653
|
+
return contents;
|
|
1654
|
+
};
|
|
1655
|
+
exports.deserializeAws_restJson1PutFeedbackCommand = deserializeAws_restJson1PutFeedbackCommand;
|
|
1656
|
+
const deserializeAws_restJson1PutFeedbackCommandError = async (output, context) => {
|
|
1657
|
+
const parsedOutput = {
|
|
1658
|
+
...output,
|
|
1659
|
+
body: await parseBody(output.body, context),
|
|
1660
|
+
};
|
|
1661
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1662
|
+
switch (errorCode) {
|
|
1663
|
+
case "AccessDeniedException":
|
|
1664
|
+
case "com.amazonaws.wisdom#AccessDeniedException":
|
|
1665
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1666
|
+
case "ResourceNotFoundException":
|
|
1667
|
+
case "com.amazonaws.wisdom#ResourceNotFoundException":
|
|
1668
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1669
|
+
case "ValidationException":
|
|
1670
|
+
case "com.amazonaws.wisdom#ValidationException":
|
|
1671
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1672
|
+
default:
|
|
1673
|
+
const parsedBody = parsedOutput.body;
|
|
1674
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1675
|
+
output,
|
|
1676
|
+
parsedBody,
|
|
1677
|
+
exceptionCtor: WisdomServiceException_1.WisdomServiceException,
|
|
1678
|
+
errorCode,
|
|
1679
|
+
});
|
|
1680
|
+
}
|
|
1681
|
+
};
|
|
1606
1682
|
const deserializeAws_restJson1QueryAssistantCommand = async (output, context) => {
|
|
1607
1683
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1608
1684
|
return deserializeAws_restJson1QueryAssistantCommandError(output, context);
|
|
@@ -2082,6 +2158,11 @@ const serializeAws_restJson1ContentMetadata = (input, context) => {
|
|
|
2082
2158
|
};
|
|
2083
2159
|
}, {});
|
|
2084
2160
|
};
|
|
2161
|
+
const serializeAws_restJson1FeedbackData = (input, context) => {
|
|
2162
|
+
return {
|
|
2163
|
+
...(input.relevance != null && { relevance: input.relevance }),
|
|
2164
|
+
};
|
|
2165
|
+
};
|
|
2085
2166
|
const serializeAws_restJson1Filter = (input, context) => {
|
|
2086
2167
|
return {
|
|
2087
2168
|
...(input.field != null && { field: input.field }),
|
|
@@ -2312,6 +2393,11 @@ const deserializeAws_restJson1DocumentText = (output, context) => {
|
|
|
2312
2393
|
text: (0, smithy_client_1.expectString)(output.text),
|
|
2313
2394
|
};
|
|
2314
2395
|
};
|
|
2396
|
+
const deserializeAws_restJson1FeedbackData = (output, context) => {
|
|
2397
|
+
return {
|
|
2398
|
+
relevance: (0, smithy_client_1.expectString)(output.relevance),
|
|
2399
|
+
};
|
|
2400
|
+
};
|
|
2315
2401
|
const deserializeAws_restJson1Headers = (output, context) => {
|
|
2316
2402
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2317
2403
|
if (value === null) {
|
package/dist-es/Wisdom.js
CHANGED
|
@@ -21,6 +21,7 @@ import { ListContentsCommand, } from "./commands/ListContentsCommand";
|
|
|
21
21
|
import { ListKnowledgeBasesCommand, } from "./commands/ListKnowledgeBasesCommand";
|
|
22
22
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
23
23
|
import { NotifyRecommendationsReceivedCommand, } from "./commands/NotifyRecommendationsReceivedCommand";
|
|
24
|
+
import { PutFeedbackCommand } from "./commands/PutFeedbackCommand";
|
|
24
25
|
import { QueryAssistantCommand, } from "./commands/QueryAssistantCommand";
|
|
25
26
|
import { RemoveKnowledgeBaseTemplateUriCommand, } from "./commands/RemoveKnowledgeBaseTemplateUriCommand";
|
|
26
27
|
import { SearchContentCommand, } from "./commands/SearchContentCommand";
|
|
@@ -344,6 +345,20 @@ var Wisdom = (function (_super) {
|
|
|
344
345
|
return this.send(command, optionsOrCb);
|
|
345
346
|
}
|
|
346
347
|
};
|
|
348
|
+
Wisdom.prototype.putFeedback = function (args, optionsOrCb, cb) {
|
|
349
|
+
var command = new PutFeedbackCommand(args);
|
|
350
|
+
if (typeof optionsOrCb === "function") {
|
|
351
|
+
this.send(command, optionsOrCb);
|
|
352
|
+
}
|
|
353
|
+
else if (typeof cb === "function") {
|
|
354
|
+
if (typeof optionsOrCb !== "object")
|
|
355
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
356
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
return this.send(command, optionsOrCb);
|
|
360
|
+
}
|
|
361
|
+
};
|
|
347
362
|
Wisdom.prototype.queryAssistant = function (args, optionsOrCb, cb) {
|
|
348
363
|
var command = new QueryAssistantCommand(args);
|
|
349
364
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { PutFeedbackRequestFilterSensitiveLog, PutFeedbackResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1PutFeedbackCommand, serializeAws_restJson1PutFeedbackCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var PutFeedbackCommand = (function (_super) {
|
|
7
|
+
__extends(PutFeedbackCommand, _super);
|
|
8
|
+
function PutFeedbackCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
PutFeedbackCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "WisdomClient";
|
|
18
|
+
var commandName = "PutFeedbackCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: PutFeedbackRequestFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: PutFeedbackResponseFilterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
PutFeedbackCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1PutFeedbackCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
PutFeedbackCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1PutFeedbackCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return PutFeedbackCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { PutFeedbackCommand };
|
|
@@ -20,6 +20,7 @@ export * from "./ListContentsCommand";
|
|
|
20
20
|
export * from "./ListKnowledgeBasesCommand";
|
|
21
21
|
export * from "./ListTagsForResourceCommand";
|
|
22
22
|
export * from "./NotifyRecommendationsReceivedCommand";
|
|
23
|
+
export * from "./PutFeedbackCommand";
|
|
23
24
|
export * from "./QueryAssistantCommand";
|
|
24
25
|
export * from "./RemoveKnowledgeBaseTemplateUriCommand";
|
|
25
26
|
export * from "./SearchContentCommand";
|
|
@@ -123,6 +123,16 @@ export var RecommendationTriggerType;
|
|
|
123
123
|
(function (RecommendationTriggerType) {
|
|
124
124
|
RecommendationTriggerType["QUERY"] = "QUERY";
|
|
125
125
|
})(RecommendationTriggerType || (RecommendationTriggerType = {}));
|
|
126
|
+
export var Relevance;
|
|
127
|
+
(function (Relevance) {
|
|
128
|
+
Relevance["HELPFUL"] = "HELPFUL";
|
|
129
|
+
Relevance["NOT_HELPFUL"] = "NOT_HELPFUL";
|
|
130
|
+
})(Relevance || (Relevance = {}));
|
|
131
|
+
export var TargetType;
|
|
132
|
+
(function (TargetType) {
|
|
133
|
+
TargetType["RECOMMENDATION"] = "RECOMMENDATION";
|
|
134
|
+
TargetType["RESULT"] = "RESULT";
|
|
135
|
+
})(TargetType || (TargetType = {}));
|
|
126
136
|
export var FilterField;
|
|
127
137
|
(function (FilterField) {
|
|
128
138
|
FilterField["NAME"] = "NAME";
|
|
@@ -258,6 +268,9 @@ export var ListAssistantsResponseFilterSensitiveLog = function (obj) { return (_
|
|
|
258
268
|
export var NotifyRecommendationsReceivedRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
259
269
|
export var NotifyRecommendationsReceivedErrorFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
260
270
|
export var NotifyRecommendationsReceivedResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
271
|
+
export var FeedbackDataFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
272
|
+
export var PutFeedbackRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
273
|
+
export var PutFeedbackResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
261
274
|
export var QueryAssistantRequestFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.queryText && { queryText: SENSITIVE_STRING }))); };
|
|
262
275
|
export var ResultDataFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.document && { document: DocumentFilterSensitiveLog(obj.document) }))); };
|
|
263
276
|
export var QueryAssistantResponseFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.results && { results: obj.results.map(function (item) { return ResultDataFilterSensitiveLog(item); }) }))); };
|
|
@@ -562,6 +562,31 @@ export var serializeAws_restJson1NotifyRecommendationsReceivedCommand = function
|
|
|
562
562
|
}
|
|
563
563
|
});
|
|
564
564
|
}); };
|
|
565
|
+
export var serializeAws_restJson1PutFeedbackCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
566
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
567
|
+
return __generator(this, function (_c) {
|
|
568
|
+
switch (_c.label) {
|
|
569
|
+
case 0: return [4, context.endpoint()];
|
|
570
|
+
case 1:
|
|
571
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
572
|
+
headers = {
|
|
573
|
+
"content-type": "application/json",
|
|
574
|
+
};
|
|
575
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/assistants/{assistantId}/feedback";
|
|
576
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", function () { return input.assistantId; }, "{assistantId}", false);
|
|
577
|
+
body = JSON.stringify(__assign(__assign(__assign({}, (input.feedback != null && { feedback: serializeAws_restJson1FeedbackData(input.feedback, context) })), (input.targetId != null && { targetId: input.targetId })), (input.targetType != null && { targetType: input.targetType })));
|
|
578
|
+
return [2, new __HttpRequest({
|
|
579
|
+
protocol: protocol,
|
|
580
|
+
hostname: hostname,
|
|
581
|
+
port: port,
|
|
582
|
+
method: "PUT",
|
|
583
|
+
headers: headers,
|
|
584
|
+
path: resolvedPath,
|
|
585
|
+
body: body,
|
|
586
|
+
})];
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
}); };
|
|
565
590
|
export var serializeAws_restJson1QueryAssistantCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
566
591
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
567
592
|
return __generator(this, function (_c) {
|
|
@@ -2221,6 +2246,82 @@ var deserializeAws_restJson1NotifyRecommendationsReceivedCommandError = function
|
|
|
2221
2246
|
}
|
|
2222
2247
|
});
|
|
2223
2248
|
}); };
|
|
2249
|
+
export var deserializeAws_restJson1PutFeedbackCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2250
|
+
var contents, data, _a, _b;
|
|
2251
|
+
return __generator(this, function (_c) {
|
|
2252
|
+
switch (_c.label) {
|
|
2253
|
+
case 0:
|
|
2254
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2255
|
+
return [2, deserializeAws_restJson1PutFeedbackCommandError(output, context)];
|
|
2256
|
+
}
|
|
2257
|
+
contents = map({
|
|
2258
|
+
$metadata: deserializeMetadata(output),
|
|
2259
|
+
});
|
|
2260
|
+
_a = __expectNonNull;
|
|
2261
|
+
_b = __expectObject;
|
|
2262
|
+
return [4, parseBody(output.body, context)];
|
|
2263
|
+
case 1:
|
|
2264
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
2265
|
+
if (data.assistantArn != null) {
|
|
2266
|
+
contents.assistantArn = __expectString(data.assistantArn);
|
|
2267
|
+
}
|
|
2268
|
+
if (data.assistantId != null) {
|
|
2269
|
+
contents.assistantId = __expectString(data.assistantId);
|
|
2270
|
+
}
|
|
2271
|
+
if (data.feedback != null) {
|
|
2272
|
+
contents.feedback = deserializeAws_restJson1FeedbackData(data.feedback, context);
|
|
2273
|
+
}
|
|
2274
|
+
if (data.targetId != null) {
|
|
2275
|
+
contents.targetId = __expectString(data.targetId);
|
|
2276
|
+
}
|
|
2277
|
+
if (data.targetType != null) {
|
|
2278
|
+
contents.targetType = __expectString(data.targetType);
|
|
2279
|
+
}
|
|
2280
|
+
return [2, contents];
|
|
2281
|
+
}
|
|
2282
|
+
});
|
|
2283
|
+
}); };
|
|
2284
|
+
var deserializeAws_restJson1PutFeedbackCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2285
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
2286
|
+
var _c;
|
|
2287
|
+
return __generator(this, function (_d) {
|
|
2288
|
+
switch (_d.label) {
|
|
2289
|
+
case 0:
|
|
2290
|
+
_a = [__assign({}, output)];
|
|
2291
|
+
_c = {};
|
|
2292
|
+
return [4, parseBody(output.body, context)];
|
|
2293
|
+
case 1:
|
|
2294
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
2295
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2296
|
+
_b = errorCode;
|
|
2297
|
+
switch (_b) {
|
|
2298
|
+
case "AccessDeniedException": return [3, 2];
|
|
2299
|
+
case "com.amazonaws.wisdom#AccessDeniedException": return [3, 2];
|
|
2300
|
+
case "ResourceNotFoundException": return [3, 4];
|
|
2301
|
+
case "com.amazonaws.wisdom#ResourceNotFoundException": return [3, 4];
|
|
2302
|
+
case "ValidationException": return [3, 6];
|
|
2303
|
+
case "com.amazonaws.wisdom#ValidationException": return [3, 6];
|
|
2304
|
+
}
|
|
2305
|
+
return [3, 8];
|
|
2306
|
+
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
2307
|
+
case 3: throw _d.sent();
|
|
2308
|
+
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
2309
|
+
case 5: throw _d.sent();
|
|
2310
|
+
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
2311
|
+
case 7: throw _d.sent();
|
|
2312
|
+
case 8:
|
|
2313
|
+
parsedBody = parsedOutput.body;
|
|
2314
|
+
throwDefaultError({
|
|
2315
|
+
output: output,
|
|
2316
|
+
parsedBody: parsedBody,
|
|
2317
|
+
exceptionCtor: __BaseException,
|
|
2318
|
+
errorCode: errorCode,
|
|
2319
|
+
});
|
|
2320
|
+
_d.label = 9;
|
|
2321
|
+
case 9: return [2];
|
|
2322
|
+
}
|
|
2323
|
+
});
|
|
2324
|
+
}); };
|
|
2224
2325
|
export var deserializeAws_restJson1QueryAssistantCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2225
2326
|
var contents, data, _a, _b;
|
|
2226
2327
|
return __generator(this, function (_c) {
|
|
@@ -2904,6 +3005,9 @@ var serializeAws_restJson1ContentMetadata = function (input, context) {
|
|
|
2904
3005
|
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
2905
3006
|
}, {});
|
|
2906
3007
|
};
|
|
3008
|
+
var serializeAws_restJson1FeedbackData = function (input, context) {
|
|
3009
|
+
return __assign({}, (input.relevance != null && { relevance: input.relevance }));
|
|
3010
|
+
};
|
|
2907
3011
|
var serializeAws_restJson1Filter = function (input, context) {
|
|
2908
3012
|
return __assign(__assign(__assign({}, (input.field != null && { field: input.field })), (input.operator != null && { operator: input.operator })), (input.value != null && { value: input.value }));
|
|
2909
3013
|
};
|
|
@@ -3122,6 +3226,11 @@ var deserializeAws_restJson1DocumentText = function (output, context) {
|
|
|
3122
3226
|
text: __expectString(output.text),
|
|
3123
3227
|
};
|
|
3124
3228
|
};
|
|
3229
|
+
var deserializeAws_restJson1FeedbackData = function (output, context) {
|
|
3230
|
+
return {
|
|
3231
|
+
relevance: __expectString(output.relevance),
|
|
3232
|
+
};
|
|
3233
|
+
};
|
|
3125
3234
|
var deserializeAws_restJson1Headers = function (output, context) {
|
|
3126
3235
|
return Object.entries(output).reduce(function (acc, _a) {
|
|
3127
3236
|
var _b;
|
package/dist-types/Wisdom.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { ListContentsCommandInput, ListContentsCommandOutput } from "./commands/
|
|
|
21
21
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
22
22
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
23
23
|
import { NotifyRecommendationsReceivedCommandInput, NotifyRecommendationsReceivedCommandOutput } from "./commands/NotifyRecommendationsReceivedCommand";
|
|
24
|
+
import { PutFeedbackCommandInput, PutFeedbackCommandOutput } from "./commands/PutFeedbackCommand";
|
|
24
25
|
import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "./commands/QueryAssistantCommand";
|
|
25
26
|
import { RemoveKnowledgeBaseTemplateUriCommandInput, RemoveKnowledgeBaseTemplateUriCommandOutput } from "./commands/RemoveKnowledgeBaseTemplateUriCommand";
|
|
26
27
|
import { SearchContentCommandInput, SearchContentCommandOutput } from "./commands/SearchContentCommand";
|
|
@@ -210,6 +211,16 @@ export declare class Wisdom extends WisdomClient {
|
|
|
210
211
|
notifyRecommendationsReceived(args: NotifyRecommendationsReceivedCommandInput, options?: __HttpHandlerOptions): Promise<NotifyRecommendationsReceivedCommandOutput>;
|
|
211
212
|
notifyRecommendationsReceived(args: NotifyRecommendationsReceivedCommandInput, cb: (err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void): void;
|
|
212
213
|
notifyRecommendationsReceived(args: NotifyRecommendationsReceivedCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void): void;
|
|
214
|
+
/**
|
|
215
|
+
* <p>Submits feedback to Wisdom. The feedback is used to improve future recommendations from
|
|
216
|
+
* <a href="https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html">GetRecommendations</a> or
|
|
217
|
+
* results from <a href="https://docs.aws.amazon.com/wisdom/latest/APIReference/API_QueryAssistant.html">QueryAssistant</a>.
|
|
218
|
+
* Feedback can be resubmitted up to 6 hours after submission.
|
|
219
|
+
* </p>
|
|
220
|
+
*/
|
|
221
|
+
putFeedback(args: PutFeedbackCommandInput, options?: __HttpHandlerOptions): Promise<PutFeedbackCommandOutput>;
|
|
222
|
+
putFeedback(args: PutFeedbackCommandInput, cb: (err: any, data?: PutFeedbackCommandOutput) => void): void;
|
|
223
|
+
putFeedback(args: PutFeedbackCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutFeedbackCommandOutput) => void): void;
|
|
213
224
|
/**
|
|
214
225
|
* <p>Performs a manual search against the specified assistant. To retrieve recommendations for
|
|
215
226
|
* an assistant, use <a href="https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html">GetRecommendations</a>.
|
|
@@ -28,6 +28,7 @@ import { ListContentsCommandInput, ListContentsCommandOutput } from "./commands/
|
|
|
28
28
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
29
29
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
30
30
|
import { NotifyRecommendationsReceivedCommandInput, NotifyRecommendationsReceivedCommandOutput } from "./commands/NotifyRecommendationsReceivedCommand";
|
|
31
|
+
import { PutFeedbackCommandInput, PutFeedbackCommandOutput } from "./commands/PutFeedbackCommand";
|
|
31
32
|
import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "./commands/QueryAssistantCommand";
|
|
32
33
|
import { RemoveKnowledgeBaseTemplateUriCommandInput, RemoveKnowledgeBaseTemplateUriCommandOutput } from "./commands/RemoveKnowledgeBaseTemplateUriCommand";
|
|
33
34
|
import { SearchContentCommandInput, SearchContentCommandOutput } from "./commands/SearchContentCommand";
|
|
@@ -37,8 +38,8 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/Ta
|
|
|
37
38
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
38
39
|
import { UpdateContentCommandInput, UpdateContentCommandOutput } from "./commands/UpdateContentCommand";
|
|
39
40
|
import { UpdateKnowledgeBaseTemplateUriCommandInput, UpdateKnowledgeBaseTemplateUriCommandOutput } from "./commands/UpdateKnowledgeBaseTemplateUriCommand";
|
|
40
|
-
export declare type ServiceInputTypes = CreateAssistantAssociationCommandInput | CreateAssistantCommandInput | CreateContentCommandInput | CreateKnowledgeBaseCommandInput | CreateSessionCommandInput | DeleteAssistantAssociationCommandInput | DeleteAssistantCommandInput | DeleteContentCommandInput | DeleteKnowledgeBaseCommandInput | GetAssistantAssociationCommandInput | GetAssistantCommandInput | GetContentCommandInput | GetContentSummaryCommandInput | GetKnowledgeBaseCommandInput | GetRecommendationsCommandInput | GetSessionCommandInput | ListAssistantAssociationsCommandInput | ListAssistantsCommandInput | ListContentsCommandInput | ListKnowledgeBasesCommandInput | ListTagsForResourceCommandInput | NotifyRecommendationsReceivedCommandInput | QueryAssistantCommandInput | RemoveKnowledgeBaseTemplateUriCommandInput | SearchContentCommandInput | SearchSessionsCommandInput | StartContentUploadCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateContentCommandInput | UpdateKnowledgeBaseTemplateUriCommandInput;
|
|
41
|
-
export declare type ServiceOutputTypes = CreateAssistantAssociationCommandOutput | CreateAssistantCommandOutput | CreateContentCommandOutput | CreateKnowledgeBaseCommandOutput | CreateSessionCommandOutput | DeleteAssistantAssociationCommandOutput | DeleteAssistantCommandOutput | DeleteContentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetAssistantAssociationCommandOutput | GetAssistantCommandOutput | GetContentCommandOutput | GetContentSummaryCommandOutput | GetKnowledgeBaseCommandOutput | GetRecommendationsCommandOutput | GetSessionCommandOutput | ListAssistantAssociationsCommandOutput | ListAssistantsCommandOutput | ListContentsCommandOutput | ListKnowledgeBasesCommandOutput | ListTagsForResourceCommandOutput | NotifyRecommendationsReceivedCommandOutput | QueryAssistantCommandOutput | RemoveKnowledgeBaseTemplateUriCommandOutput | SearchContentCommandOutput | SearchSessionsCommandOutput | StartContentUploadCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateContentCommandOutput | UpdateKnowledgeBaseTemplateUriCommandOutput;
|
|
41
|
+
export declare type ServiceInputTypes = CreateAssistantAssociationCommandInput | CreateAssistantCommandInput | CreateContentCommandInput | CreateKnowledgeBaseCommandInput | CreateSessionCommandInput | DeleteAssistantAssociationCommandInput | DeleteAssistantCommandInput | DeleteContentCommandInput | DeleteKnowledgeBaseCommandInput | GetAssistantAssociationCommandInput | GetAssistantCommandInput | GetContentCommandInput | GetContentSummaryCommandInput | GetKnowledgeBaseCommandInput | GetRecommendationsCommandInput | GetSessionCommandInput | ListAssistantAssociationsCommandInput | ListAssistantsCommandInput | ListContentsCommandInput | ListKnowledgeBasesCommandInput | ListTagsForResourceCommandInput | NotifyRecommendationsReceivedCommandInput | PutFeedbackCommandInput | QueryAssistantCommandInput | RemoveKnowledgeBaseTemplateUriCommandInput | SearchContentCommandInput | SearchSessionsCommandInput | StartContentUploadCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateContentCommandInput | UpdateKnowledgeBaseTemplateUriCommandInput;
|
|
42
|
+
export declare type ServiceOutputTypes = CreateAssistantAssociationCommandOutput | CreateAssistantCommandOutput | CreateContentCommandOutput | CreateKnowledgeBaseCommandOutput | CreateSessionCommandOutput | DeleteAssistantAssociationCommandOutput | DeleteAssistantCommandOutput | DeleteContentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetAssistantAssociationCommandOutput | GetAssistantCommandOutput | GetContentCommandOutput | GetContentSummaryCommandOutput | GetKnowledgeBaseCommandOutput | GetRecommendationsCommandOutput | GetSessionCommandOutput | ListAssistantAssociationsCommandOutput | ListAssistantsCommandOutput | ListContentsCommandOutput | ListKnowledgeBasesCommandOutput | ListTagsForResourceCommandOutput | NotifyRecommendationsReceivedCommandOutput | PutFeedbackCommandOutput | QueryAssistantCommandOutput | RemoveKnowledgeBaseTemplateUriCommandOutput | SearchContentCommandOutput | SearchSessionsCommandOutput | StartContentUploadCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateContentCommandOutput | UpdateKnowledgeBaseTemplateUriCommandOutput;
|
|
42
43
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
43
44
|
/**
|
|
44
45
|
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { PutFeedbackRequest, PutFeedbackResponse } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient";
|
|
5
|
+
export interface PutFeedbackCommandInput extends PutFeedbackRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface PutFeedbackCommandOutput extends PutFeedbackResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Submits feedback to Wisdom. The feedback is used to improve future recommendations from
|
|
11
|
+
* <a href="https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html">GetRecommendations</a> or
|
|
12
|
+
* results from <a href="https://docs.aws.amazon.com/wisdom/latest/APIReference/API_QueryAssistant.html">QueryAssistant</a>.
|
|
13
|
+
* Feedback can be resubmitted up to 6 hours after submission.
|
|
14
|
+
* </p>
|
|
15
|
+
* @example
|
|
16
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
17
|
+
* ```javascript
|
|
18
|
+
* import { WisdomClient, PutFeedbackCommand } from "@aws-sdk/client-wisdom"; // ES Modules import
|
|
19
|
+
* // const { WisdomClient, PutFeedbackCommand } = require("@aws-sdk/client-wisdom"); // CommonJS import
|
|
20
|
+
* const client = new WisdomClient(config);
|
|
21
|
+
* const command = new PutFeedbackCommand(input);
|
|
22
|
+
* const response = await client.send(command);
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @see {@link PutFeedbackCommandInput} for command's `input` shape.
|
|
26
|
+
* @see {@link PutFeedbackCommandOutput} for command's `response` shape.
|
|
27
|
+
* @see {@link WisdomClientResolvedConfig | config} for WisdomClient's `config` shape.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export declare class PutFeedbackCommand extends $Command<PutFeedbackCommandInput, PutFeedbackCommandOutput, WisdomClientResolvedConfig> {
|
|
31
|
+
readonly input: PutFeedbackCommandInput;
|
|
32
|
+
constructor(input: PutFeedbackCommandInput);
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: WisdomClientResolvedConfig, options?: __HttpHandlerOptions): Handler<PutFeedbackCommandInput, PutFeedbackCommandOutput>;
|
|
37
|
+
private serialize;
|
|
38
|
+
private deserialize;
|
|
39
|
+
}
|
|
@@ -20,6 +20,7 @@ export * from "./ListContentsCommand";
|
|
|
20
20
|
export * from "./ListKnowledgeBasesCommand";
|
|
21
21
|
export * from "./ListTagsForResourceCommand";
|
|
22
22
|
export * from "./NotifyRecommendationsReceivedCommand";
|
|
23
|
+
export * from "./PutFeedbackCommand";
|
|
23
24
|
export * from "./QueryAssistantCommand";
|
|
24
25
|
export * from "./RemoveKnowledgeBaseTemplateUriCommand";
|
|
25
26
|
export * from "./SearchContentCommand";
|
|
@@ -707,6 +707,63 @@ export interface NotifyRecommendationsReceivedResponse {
|
|
|
707
707
|
*/
|
|
708
708
|
errors?: NotifyRecommendationsReceivedError[];
|
|
709
709
|
}
|
|
710
|
+
export declare enum Relevance {
|
|
711
|
+
HELPFUL = "HELPFUL",
|
|
712
|
+
NOT_HELPFUL = "NOT_HELPFUL"
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* <p>The feedback to submit to Wisdom.</p>
|
|
716
|
+
*/
|
|
717
|
+
export interface FeedbackData {
|
|
718
|
+
/**
|
|
719
|
+
* <p>The relevance of the target this feedback is for.</p>
|
|
720
|
+
*/
|
|
721
|
+
relevance: Relevance | string | undefined;
|
|
722
|
+
}
|
|
723
|
+
export declare enum TargetType {
|
|
724
|
+
RECOMMENDATION = "RECOMMENDATION",
|
|
725
|
+
RESULT = "RESULT"
|
|
726
|
+
}
|
|
727
|
+
export interface PutFeedbackRequest {
|
|
728
|
+
/**
|
|
729
|
+
* <p>The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
|
|
730
|
+
*/
|
|
731
|
+
assistantId: string | undefined;
|
|
732
|
+
/**
|
|
733
|
+
* <p>The identifier of a recommendation. or The identifier of the result data.</p>
|
|
734
|
+
*/
|
|
735
|
+
targetId: string | undefined;
|
|
736
|
+
/**
|
|
737
|
+
* <p>The type of the targetId for which The feedback. is targeted.</p>
|
|
738
|
+
*/
|
|
739
|
+
targetType: TargetType | string | undefined;
|
|
740
|
+
/**
|
|
741
|
+
* <p>The feedback.</p>
|
|
742
|
+
*/
|
|
743
|
+
feedback: FeedbackData | undefined;
|
|
744
|
+
}
|
|
745
|
+
export interface PutFeedbackResponse {
|
|
746
|
+
/**
|
|
747
|
+
* <p>The identifier of the Wisdom assistant.</p>
|
|
748
|
+
*/
|
|
749
|
+
assistantId: string | undefined;
|
|
750
|
+
/**
|
|
751
|
+
* <p>The Amazon Resource Name (ARN) of the Wisdom assistant.</p>
|
|
752
|
+
*/
|
|
753
|
+
assistantArn: string | undefined;
|
|
754
|
+
/**
|
|
755
|
+
* <p>The identifier of a recommendation. or The identifier of the result data.</p>
|
|
756
|
+
*/
|
|
757
|
+
targetId: string | undefined;
|
|
758
|
+
/**
|
|
759
|
+
* <p>The type of the targetId for which The feedback. is targeted.</p>
|
|
760
|
+
*/
|
|
761
|
+
targetType: TargetType | string | undefined;
|
|
762
|
+
/**
|
|
763
|
+
* <p>The feedback.</p>
|
|
764
|
+
*/
|
|
765
|
+
feedback: FeedbackData | undefined;
|
|
766
|
+
}
|
|
710
767
|
export interface QueryAssistantRequest {
|
|
711
768
|
/**
|
|
712
769
|
* <p>The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.</p>
|
|
@@ -1724,6 +1781,18 @@ export declare const NotifyRecommendationsReceivedErrorFilterSensitiveLog: (obj:
|
|
|
1724
1781
|
* @internal
|
|
1725
1782
|
*/
|
|
1726
1783
|
export declare const NotifyRecommendationsReceivedResponseFilterSensitiveLog: (obj: NotifyRecommendationsReceivedResponse) => any;
|
|
1784
|
+
/**
|
|
1785
|
+
* @internal
|
|
1786
|
+
*/
|
|
1787
|
+
export declare const FeedbackDataFilterSensitiveLog: (obj: FeedbackData) => any;
|
|
1788
|
+
/**
|
|
1789
|
+
* @internal
|
|
1790
|
+
*/
|
|
1791
|
+
export declare const PutFeedbackRequestFilterSensitiveLog: (obj: PutFeedbackRequest) => any;
|
|
1792
|
+
/**
|
|
1793
|
+
* @internal
|
|
1794
|
+
*/
|
|
1795
|
+
export declare const PutFeedbackResponseFilterSensitiveLog: (obj: PutFeedbackResponse) => any;
|
|
1727
1796
|
/**
|
|
1728
1797
|
* @internal
|
|
1729
1798
|
*/
|
|
@@ -22,6 +22,7 @@ import { ListContentsCommandInput, ListContentsCommandOutput } from "../commands
|
|
|
22
22
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "../commands/ListKnowledgeBasesCommand";
|
|
23
23
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "../commands/ListTagsForResourceCommand";
|
|
24
24
|
import { NotifyRecommendationsReceivedCommandInput, NotifyRecommendationsReceivedCommandOutput } from "../commands/NotifyRecommendationsReceivedCommand";
|
|
25
|
+
import { PutFeedbackCommandInput, PutFeedbackCommandOutput } from "../commands/PutFeedbackCommand";
|
|
25
26
|
import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "../commands/QueryAssistantCommand";
|
|
26
27
|
import { RemoveKnowledgeBaseTemplateUriCommandInput, RemoveKnowledgeBaseTemplateUriCommandOutput } from "../commands/RemoveKnowledgeBaseTemplateUriCommand";
|
|
27
28
|
import { SearchContentCommandInput, SearchContentCommandOutput } from "../commands/SearchContentCommand";
|
|
@@ -53,6 +54,7 @@ export declare const serializeAws_restJson1ListContentsCommand: (input: ListCont
|
|
|
53
54
|
export declare const serializeAws_restJson1ListKnowledgeBasesCommand: (input: ListKnowledgeBasesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
54
55
|
export declare const serializeAws_restJson1ListTagsForResourceCommand: (input: ListTagsForResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
55
56
|
export declare const serializeAws_restJson1NotifyRecommendationsReceivedCommand: (input: NotifyRecommendationsReceivedCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
57
|
+
export declare const serializeAws_restJson1PutFeedbackCommand: (input: PutFeedbackCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
56
58
|
export declare const serializeAws_restJson1QueryAssistantCommand: (input: QueryAssistantCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
57
59
|
export declare const serializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand: (input: RemoveKnowledgeBaseTemplateUriCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
58
60
|
export declare const serializeAws_restJson1SearchContentCommand: (input: SearchContentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
@@ -84,6 +86,7 @@ export declare const deserializeAws_restJson1ListContentsCommand: (output: __Htt
|
|
|
84
86
|
export declare const deserializeAws_restJson1ListKnowledgeBasesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListKnowledgeBasesCommandOutput>;
|
|
85
87
|
export declare const deserializeAws_restJson1ListTagsForResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTagsForResourceCommandOutput>;
|
|
86
88
|
export declare const deserializeAws_restJson1NotifyRecommendationsReceivedCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<NotifyRecommendationsReceivedCommandOutput>;
|
|
89
|
+
export declare const deserializeAws_restJson1PutFeedbackCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutFeedbackCommandOutput>;
|
|
87
90
|
export declare const deserializeAws_restJson1QueryAssistantCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<QueryAssistantCommandOutput>;
|
|
88
91
|
export declare const deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RemoveKnowledgeBaseTemplateUriCommandOutput>;
|
|
89
92
|
export declare const deserializeAws_restJson1SearchContentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SearchContentCommandOutput>;
|
|
@@ -21,6 +21,7 @@ import { ListContentsCommandInput, ListContentsCommandOutput } from "./commands/
|
|
|
21
21
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
22
22
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
23
23
|
import { NotifyRecommendationsReceivedCommandInput, NotifyRecommendationsReceivedCommandOutput } from "./commands/NotifyRecommendationsReceivedCommand";
|
|
24
|
+
import { PutFeedbackCommandInput, PutFeedbackCommandOutput } from "./commands/PutFeedbackCommand";
|
|
24
25
|
import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "./commands/QueryAssistantCommand";
|
|
25
26
|
import { RemoveKnowledgeBaseTemplateUriCommandInput, RemoveKnowledgeBaseTemplateUriCommandOutput } from "./commands/RemoveKnowledgeBaseTemplateUriCommand";
|
|
26
27
|
import { SearchContentCommandInput, SearchContentCommandOutput } from "./commands/SearchContentCommand";
|
|
@@ -122,6 +123,10 @@ export declare class Wisdom extends WisdomClient {
|
|
|
122
123
|
notifyRecommendationsReceived(args: NotifyRecommendationsReceivedCommandInput, cb: (err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void): void;
|
|
123
124
|
notifyRecommendationsReceived(args: NotifyRecommendationsReceivedCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: NotifyRecommendationsReceivedCommandOutput) => void): void;
|
|
124
125
|
|
|
126
|
+
putFeedback(args: PutFeedbackCommandInput, options?: __HttpHandlerOptions): Promise<PutFeedbackCommandOutput>;
|
|
127
|
+
putFeedback(args: PutFeedbackCommandInput, cb: (err: any, data?: PutFeedbackCommandOutput) => void): void;
|
|
128
|
+
putFeedback(args: PutFeedbackCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutFeedbackCommandOutput) => void): void;
|
|
129
|
+
|
|
125
130
|
queryAssistant(args: QueryAssistantCommandInput, options?: __HttpHandlerOptions): Promise<QueryAssistantCommandOutput>;
|
|
126
131
|
queryAssistant(args: QueryAssistantCommandInput, cb: (err: any, data?: QueryAssistantCommandOutput) => void): void;
|
|
127
132
|
queryAssistant(args: QueryAssistantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryAssistantCommandOutput) => void): void;
|
|
@@ -28,6 +28,7 @@ import { ListContentsCommandInput, ListContentsCommandOutput } from "./commands/
|
|
|
28
28
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand";
|
|
29
29
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
30
30
|
import { NotifyRecommendationsReceivedCommandInput, NotifyRecommendationsReceivedCommandOutput } from "./commands/NotifyRecommendationsReceivedCommand";
|
|
31
|
+
import { PutFeedbackCommandInput, PutFeedbackCommandOutput } from "./commands/PutFeedbackCommand";
|
|
31
32
|
import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "./commands/QueryAssistantCommand";
|
|
32
33
|
import { RemoveKnowledgeBaseTemplateUriCommandInput, RemoveKnowledgeBaseTemplateUriCommandOutput } from "./commands/RemoveKnowledgeBaseTemplateUriCommand";
|
|
33
34
|
import { SearchContentCommandInput, SearchContentCommandOutput } from "./commands/SearchContentCommand";
|
|
@@ -37,8 +38,8 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/Ta
|
|
|
37
38
|
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
|
|
38
39
|
import { UpdateContentCommandInput, UpdateContentCommandOutput } from "./commands/UpdateContentCommand";
|
|
39
40
|
import { UpdateKnowledgeBaseTemplateUriCommandInput, UpdateKnowledgeBaseTemplateUriCommandOutput } from "./commands/UpdateKnowledgeBaseTemplateUriCommand";
|
|
40
|
-
export declare type ServiceInputTypes = CreateAssistantAssociationCommandInput | CreateAssistantCommandInput | CreateContentCommandInput | CreateKnowledgeBaseCommandInput | CreateSessionCommandInput | DeleteAssistantAssociationCommandInput | DeleteAssistantCommandInput | DeleteContentCommandInput | DeleteKnowledgeBaseCommandInput | GetAssistantAssociationCommandInput | GetAssistantCommandInput | GetContentCommandInput | GetContentSummaryCommandInput | GetKnowledgeBaseCommandInput | GetRecommendationsCommandInput | GetSessionCommandInput | ListAssistantAssociationsCommandInput | ListAssistantsCommandInput | ListContentsCommandInput | ListKnowledgeBasesCommandInput | ListTagsForResourceCommandInput | NotifyRecommendationsReceivedCommandInput | QueryAssistantCommandInput | RemoveKnowledgeBaseTemplateUriCommandInput | SearchContentCommandInput | SearchSessionsCommandInput | StartContentUploadCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateContentCommandInput | UpdateKnowledgeBaseTemplateUriCommandInput;
|
|
41
|
-
export declare type ServiceOutputTypes = CreateAssistantAssociationCommandOutput | CreateAssistantCommandOutput | CreateContentCommandOutput | CreateKnowledgeBaseCommandOutput | CreateSessionCommandOutput | DeleteAssistantAssociationCommandOutput | DeleteAssistantCommandOutput | DeleteContentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetAssistantAssociationCommandOutput | GetAssistantCommandOutput | GetContentCommandOutput | GetContentSummaryCommandOutput | GetKnowledgeBaseCommandOutput | GetRecommendationsCommandOutput | GetSessionCommandOutput | ListAssistantAssociationsCommandOutput | ListAssistantsCommandOutput | ListContentsCommandOutput | ListKnowledgeBasesCommandOutput | ListTagsForResourceCommandOutput | NotifyRecommendationsReceivedCommandOutput | QueryAssistantCommandOutput | RemoveKnowledgeBaseTemplateUriCommandOutput | SearchContentCommandOutput | SearchSessionsCommandOutput | StartContentUploadCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateContentCommandOutput | UpdateKnowledgeBaseTemplateUriCommandOutput;
|
|
41
|
+
export declare type ServiceInputTypes = CreateAssistantAssociationCommandInput | CreateAssistantCommandInput | CreateContentCommandInput | CreateKnowledgeBaseCommandInput | CreateSessionCommandInput | DeleteAssistantAssociationCommandInput | DeleteAssistantCommandInput | DeleteContentCommandInput | DeleteKnowledgeBaseCommandInput | GetAssistantAssociationCommandInput | GetAssistantCommandInput | GetContentCommandInput | GetContentSummaryCommandInput | GetKnowledgeBaseCommandInput | GetRecommendationsCommandInput | GetSessionCommandInput | ListAssistantAssociationsCommandInput | ListAssistantsCommandInput | ListContentsCommandInput | ListKnowledgeBasesCommandInput | ListTagsForResourceCommandInput | NotifyRecommendationsReceivedCommandInput | PutFeedbackCommandInput | QueryAssistantCommandInput | RemoveKnowledgeBaseTemplateUriCommandInput | SearchContentCommandInput | SearchSessionsCommandInput | StartContentUploadCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateContentCommandInput | UpdateKnowledgeBaseTemplateUriCommandInput;
|
|
42
|
+
export declare type ServiceOutputTypes = CreateAssistantAssociationCommandOutput | CreateAssistantCommandOutput | CreateContentCommandOutput | CreateKnowledgeBaseCommandOutput | CreateSessionCommandOutput | DeleteAssistantAssociationCommandOutput | DeleteAssistantCommandOutput | DeleteContentCommandOutput | DeleteKnowledgeBaseCommandOutput | GetAssistantAssociationCommandOutput | GetAssistantCommandOutput | GetContentCommandOutput | GetContentSummaryCommandOutput | GetKnowledgeBaseCommandOutput | GetRecommendationsCommandOutput | GetSessionCommandOutput | ListAssistantAssociationsCommandOutput | ListAssistantsCommandOutput | ListContentsCommandOutput | ListKnowledgeBasesCommandOutput | ListTagsForResourceCommandOutput | NotifyRecommendationsReceivedCommandOutput | PutFeedbackCommandOutput | QueryAssistantCommandOutput | RemoveKnowledgeBaseTemplateUriCommandOutput | SearchContentCommandOutput | SearchSessionsCommandOutput | StartContentUploadCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateContentCommandOutput | UpdateKnowledgeBaseTemplateUriCommandOutput;
|
|
42
43
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
43
44
|
|
|
44
45
|
requestHandler?: __HttpHandler;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { PutFeedbackRequest, PutFeedbackResponse } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, WisdomClientResolvedConfig } from "../WisdomClient";
|
|
5
|
+
export interface PutFeedbackCommandInput extends PutFeedbackRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface PutFeedbackCommandOutput extends PutFeedbackResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare class PutFeedbackCommand extends $Command<PutFeedbackCommandInput, PutFeedbackCommandOutput, WisdomClientResolvedConfig> {
|
|
11
|
+
readonly input: PutFeedbackCommandInput;
|
|
12
|
+
constructor(input: PutFeedbackCommandInput);
|
|
13
|
+
|
|
14
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: WisdomClientResolvedConfig, options?: __HttpHandlerOptions): Handler<PutFeedbackCommandInput, PutFeedbackCommandOutput>;
|
|
15
|
+
private serialize;
|
|
16
|
+
private deserialize;
|
|
17
|
+
}
|
|
@@ -20,6 +20,7 @@ export * from "./ListContentsCommand";
|
|
|
20
20
|
export * from "./ListKnowledgeBasesCommand";
|
|
21
21
|
export * from "./ListTagsForResourceCommand";
|
|
22
22
|
export * from "./NotifyRecommendationsReceivedCommand";
|
|
23
|
+
export * from "./PutFeedbackCommand";
|
|
23
24
|
export * from "./QueryAssistantCommand";
|
|
24
25
|
export * from "./RemoveKnowledgeBaseTemplateUriCommand";
|
|
25
26
|
export * from "./SearchContentCommand";
|
|
@@ -415,6 +415,41 @@ export interface NotifyRecommendationsReceivedResponse {
|
|
|
415
415
|
|
|
416
416
|
errors?: NotifyRecommendationsReceivedError[];
|
|
417
417
|
}
|
|
418
|
+
export declare enum Relevance {
|
|
419
|
+
HELPFUL = "HELPFUL",
|
|
420
|
+
NOT_HELPFUL = "NOT_HELPFUL"
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export interface FeedbackData {
|
|
424
|
+
|
|
425
|
+
relevance: Relevance | string | undefined;
|
|
426
|
+
}
|
|
427
|
+
export declare enum TargetType {
|
|
428
|
+
RECOMMENDATION = "RECOMMENDATION",
|
|
429
|
+
RESULT = "RESULT"
|
|
430
|
+
}
|
|
431
|
+
export interface PutFeedbackRequest {
|
|
432
|
+
|
|
433
|
+
assistantId: string | undefined;
|
|
434
|
+
|
|
435
|
+
targetId: string | undefined;
|
|
436
|
+
|
|
437
|
+
targetType: TargetType | string | undefined;
|
|
438
|
+
|
|
439
|
+
feedback: FeedbackData | undefined;
|
|
440
|
+
}
|
|
441
|
+
export interface PutFeedbackResponse {
|
|
442
|
+
|
|
443
|
+
assistantId: string | undefined;
|
|
444
|
+
|
|
445
|
+
assistantArn: string | undefined;
|
|
446
|
+
|
|
447
|
+
targetId: string | undefined;
|
|
448
|
+
|
|
449
|
+
targetType: TargetType | string | undefined;
|
|
450
|
+
|
|
451
|
+
feedback: FeedbackData | undefined;
|
|
452
|
+
}
|
|
418
453
|
export interface QueryAssistantRequest {
|
|
419
454
|
|
|
420
455
|
assistantId: string | undefined;
|
|
@@ -976,6 +1011,12 @@ export declare const NotifyRecommendationsReceivedErrorFilterSensitiveLog: (obj:
|
|
|
976
1011
|
|
|
977
1012
|
export declare const NotifyRecommendationsReceivedResponseFilterSensitiveLog: (obj: NotifyRecommendationsReceivedResponse) => any;
|
|
978
1013
|
|
|
1014
|
+
export declare const FeedbackDataFilterSensitiveLog: (obj: FeedbackData) => any;
|
|
1015
|
+
|
|
1016
|
+
export declare const PutFeedbackRequestFilterSensitiveLog: (obj: PutFeedbackRequest) => any;
|
|
1017
|
+
|
|
1018
|
+
export declare const PutFeedbackResponseFilterSensitiveLog: (obj: PutFeedbackResponse) => any;
|
|
1019
|
+
|
|
979
1020
|
export declare const QueryAssistantRequestFilterSensitiveLog: (obj: QueryAssistantRequest) => any;
|
|
980
1021
|
|
|
981
1022
|
export declare const ResultDataFilterSensitiveLog: (obj: ResultData) => any;
|
|
@@ -22,6 +22,7 @@ import { ListContentsCommandInput, ListContentsCommandOutput } from "../commands
|
|
|
22
22
|
import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "../commands/ListKnowledgeBasesCommand";
|
|
23
23
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "../commands/ListTagsForResourceCommand";
|
|
24
24
|
import { NotifyRecommendationsReceivedCommandInput, NotifyRecommendationsReceivedCommandOutput } from "../commands/NotifyRecommendationsReceivedCommand";
|
|
25
|
+
import { PutFeedbackCommandInput, PutFeedbackCommandOutput } from "../commands/PutFeedbackCommand";
|
|
25
26
|
import { QueryAssistantCommandInput, QueryAssistantCommandOutput } from "../commands/QueryAssistantCommand";
|
|
26
27
|
import { RemoveKnowledgeBaseTemplateUriCommandInput, RemoveKnowledgeBaseTemplateUriCommandOutput } from "../commands/RemoveKnowledgeBaseTemplateUriCommand";
|
|
27
28
|
import { SearchContentCommandInput, SearchContentCommandOutput } from "../commands/SearchContentCommand";
|
|
@@ -53,6 +54,7 @@ export declare const serializeAws_restJson1ListContentsCommand: (input: ListCont
|
|
|
53
54
|
export declare const serializeAws_restJson1ListKnowledgeBasesCommand: (input: ListKnowledgeBasesCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
54
55
|
export declare const serializeAws_restJson1ListTagsForResourceCommand: (input: ListTagsForResourceCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
55
56
|
export declare const serializeAws_restJson1NotifyRecommendationsReceivedCommand: (input: NotifyRecommendationsReceivedCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
57
|
+
export declare const serializeAws_restJson1PutFeedbackCommand: (input: PutFeedbackCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
56
58
|
export declare const serializeAws_restJson1QueryAssistantCommand: (input: QueryAssistantCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
57
59
|
export declare const serializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand: (input: RemoveKnowledgeBaseTemplateUriCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
58
60
|
export declare const serializeAws_restJson1SearchContentCommand: (input: SearchContentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
@@ -84,6 +86,7 @@ export declare const deserializeAws_restJson1ListContentsCommand: (output: __Htt
|
|
|
84
86
|
export declare const deserializeAws_restJson1ListKnowledgeBasesCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListKnowledgeBasesCommandOutput>;
|
|
85
87
|
export declare const deserializeAws_restJson1ListTagsForResourceCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListTagsForResourceCommandOutput>;
|
|
86
88
|
export declare const deserializeAws_restJson1NotifyRecommendationsReceivedCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<NotifyRecommendationsReceivedCommandOutput>;
|
|
89
|
+
export declare const deserializeAws_restJson1PutFeedbackCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutFeedbackCommandOutput>;
|
|
87
90
|
export declare const deserializeAws_restJson1QueryAssistantCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<QueryAssistantCommandOutput>;
|
|
88
91
|
export declare const deserializeAws_restJson1RemoveKnowledgeBaseTemplateUriCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<RemoveKnowledgeBaseTemplateUriCommandOutput>;
|
|
89
92
|
export declare const deserializeAws_restJson1SearchContentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SearchContentCommandOutput>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-wisdom",
|
|
3
3
|
"description": "AWS SDK for JavaScript Wisdom Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.154.0",
|
|
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",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.154.0",
|
|
22
22
|
"@aws-sdk/config-resolver": "3.130.0",
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.154.0",
|
|
24
24
|
"@aws-sdk/fetch-http-handler": "3.131.0",
|
|
25
25
|
"@aws-sdk/hash-node": "3.127.0",
|
|
26
26
|
"@aws-sdk/invalid-dependency": "3.127.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@aws-sdk/url-parser": "3.127.0",
|
|
42
42
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
43
43
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
44
|
-
"@aws-sdk/util-body-length-browser": "3.
|
|
44
|
+
"@aws-sdk/util-body-length-browser": "3.154.0",
|
|
45
45
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
46
46
|
"@aws-sdk/util-defaults-mode-browser": "3.142.0",
|
|
47
47
|
"@aws-sdk/util-defaults-mode-node": "3.142.0",
|
|
@@ -63,6 +63,11 @@
|
|
|
63
63
|
"typedoc": "0.19.2",
|
|
64
64
|
"typescript": "~4.6.2"
|
|
65
65
|
},
|
|
66
|
+
"overrides": {
|
|
67
|
+
"typedoc": {
|
|
68
|
+
"typescript": "~4.6.2"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
66
71
|
"engines": {
|
|
67
72
|
"node": ">=12.0.0"
|
|
68
73
|
},
|