@aws-sdk/client-wisdom 3.141.0 → 3.150.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/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); }) }))); };