@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/CHANGELOG.md +30 -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 +459 -834
- 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 +601 -837
- 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 +11 -6
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); }) }))); };
|