@wildix/wim-wilma-client 0.0.2 → 0.0.3
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-cjs/Wilma.js +4 -0
- package/dist-cjs/commands/ListAgentFeedbacksCommand.js +21 -0
- package/dist-cjs/commands/ListFeedbacksCommand.js +21 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +77 -14
- package/dist-es/Wilma.js +4 -0
- package/dist-es/commands/ListAgentFeedbacksCommand.js +17 -0
- package/dist-es/commands/ListFeedbacksCommand.js +17 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +72 -13
- package/dist-types/Wilma.d.ts +15 -0
- package/dist-types/WilmaClient.d.ts +4 -2
- package/dist-types/commands/DeleteChatCommand.d.ts +1 -1
- package/dist-types/commands/DislikeAnswerCommand.d.ts +2 -7
- package/dist-types/commands/GetChatCommand.d.ts +3 -1
- package/dist-types/commands/LikeAnswerCommand.d.ts +2 -7
- package/dist-types/commands/ListAgentFeedbacksCommand.d.ts +86 -0
- package/dist-types/commands/ListChatsCommand.d.ts +1 -0
- package/dist-types/commands/ListFeedbacksCommand.d.ts +85 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +42 -11
- package/dist-types/protocols/Aws_restJson1.d.ts +18 -0
- package/package.json +1 -1
package/dist-cjs/Wilma.js
CHANGED
|
@@ -6,14 +6,18 @@ const DeleteChatCommand_1 = require("./commands/DeleteChatCommand");
|
|
|
6
6
|
const DislikeAnswerCommand_1 = require("./commands/DislikeAnswerCommand");
|
|
7
7
|
const GetChatCommand_1 = require("./commands/GetChatCommand");
|
|
8
8
|
const LikeAnswerCommand_1 = require("./commands/LikeAnswerCommand");
|
|
9
|
+
const ListAgentFeedbacksCommand_1 = require("./commands/ListAgentFeedbacksCommand");
|
|
9
10
|
const ListChatsCommand_1 = require("./commands/ListChatsCommand");
|
|
11
|
+
const ListFeedbacksCommand_1 = require("./commands/ListFeedbacksCommand");
|
|
10
12
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
11
13
|
const commands = {
|
|
12
14
|
DeleteChatCommand: DeleteChatCommand_1.DeleteChatCommand,
|
|
13
15
|
DislikeAnswerCommand: DislikeAnswerCommand_1.DislikeAnswerCommand,
|
|
14
16
|
GetChatCommand: GetChatCommand_1.GetChatCommand,
|
|
15
17
|
LikeAnswerCommand: LikeAnswerCommand_1.LikeAnswerCommand,
|
|
18
|
+
ListAgentFeedbacksCommand: ListAgentFeedbacksCommand_1.ListAgentFeedbacksCommand,
|
|
16
19
|
ListChatsCommand: ListChatsCommand_1.ListChatsCommand,
|
|
20
|
+
ListFeedbacksCommand: ListFeedbacksCommand_1.ListFeedbacksCommand,
|
|
17
21
|
};
|
|
18
22
|
class Wilma extends WilmaClient_1.WilmaClient {
|
|
19
23
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListAgentFeedbacksCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class ListAgentFeedbacksCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("Wilma", "ListAgentFeedbacks", {})
|
|
15
|
+
.n("WilmaClient", "ListAgentFeedbacksCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_ListAgentFeedbacksCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_ListAgentFeedbacksCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.ListAgentFeedbacksCommand = ListAgentFeedbacksCommand;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListFeedbacksCommand = exports.$Command = void 0;
|
|
4
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
5
|
+
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
+
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
+
class ListFeedbacksCommand extends smithy_client_1.Command.classBuilder()
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [
|
|
11
|
+
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
12
|
+
];
|
|
13
|
+
})
|
|
14
|
+
.s("Wilma", "ListFeedbacks", {})
|
|
15
|
+
.n("WilmaClient", "ListFeedbacksCommand")
|
|
16
|
+
.f(void 0, void 0)
|
|
17
|
+
.ser(Aws_restJson1_1.se_ListFeedbacksCommand)
|
|
18
|
+
.de(Aws_restJson1_1.de_ListFeedbacksCommand)
|
|
19
|
+
.build() {
|
|
20
|
+
}
|
|
21
|
+
exports.ListFeedbacksCommand = ListFeedbacksCommand;
|
|
@@ -5,4 +5,6 @@ tslib_1.__exportStar(require("./DeleteChatCommand"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./DislikeAnswerCommand"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./GetChatCommand"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./LikeAnswerCommand"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./ListAgentFeedbacksCommand"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./ListChatsCommand"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./ListFeedbacksCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_ListChatsCommand = exports.de_LikeAnswerCommand = exports.de_GetChatCommand = exports.de_DislikeAnswerCommand = exports.de_DeleteChatCommand = exports.se_ListChatsCommand = exports.se_LikeAnswerCommand = exports.se_GetChatCommand = exports.se_DislikeAnswerCommand = exports.se_DeleteChatCommand = void 0;
|
|
3
|
+
exports.de_ListFeedbacksCommand = exports.de_ListChatsCommand = exports.de_ListAgentFeedbacksCommand = exports.de_LikeAnswerCommand = exports.de_GetChatCommand = exports.de_DislikeAnswerCommand = exports.de_DeleteChatCommand = exports.se_ListFeedbacksCommand = exports.se_ListChatsCommand = exports.se_ListAgentFeedbacksCommand = exports.se_LikeAnswerCommand = exports.se_GetChatCommand = exports.se_DislikeAnswerCommand = exports.se_DeleteChatCommand = void 0;
|
|
4
4
|
const WilmaServiceException_1 = require("../models/WilmaServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
6
|
const core_1 = require("@aws-sdk/core");
|
|
@@ -9,8 +9,8 @@ const smithy_client_1 = require("@smithy/smithy-client");
|
|
|
9
9
|
const se_DeleteChatCommand = async (input, context) => {
|
|
10
10
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
11
11
|
const headers = {};
|
|
12
|
-
b.bp("/
|
|
13
|
-
b.p('
|
|
12
|
+
b.bp("/v1/wilma/chats/{chatId}");
|
|
13
|
+
b.p('chatId', () => input.chatId, '{chatId}', false);
|
|
14
14
|
const query = (0, smithy_client_1.map)({
|
|
15
15
|
[_c]: [, input[_c]],
|
|
16
16
|
[_u]: [, input[_u]],
|
|
@@ -28,7 +28,7 @@ const se_DislikeAnswerCommand = async (input, context) => {
|
|
|
28
28
|
const headers = {
|
|
29
29
|
'content-type': 'application/json',
|
|
30
30
|
};
|
|
31
|
-
b.bp("/
|
|
31
|
+
b.bp("/v1/wilma/dislike");
|
|
32
32
|
const query = (0, smithy_client_1.map)({
|
|
33
33
|
[_c]: [, input[_c]],
|
|
34
34
|
[_u]: [, input[_u]],
|
|
@@ -36,8 +36,8 @@ const se_DislikeAnswerCommand = async (input, context) => {
|
|
|
36
36
|
let body;
|
|
37
37
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
38
38
|
'chatId': [],
|
|
39
|
-
'
|
|
40
|
-
'
|
|
39
|
+
'messageId': [],
|
|
40
|
+
'text': [],
|
|
41
41
|
}));
|
|
42
42
|
b.m("POST")
|
|
43
43
|
.h(headers)
|
|
@@ -49,8 +49,8 @@ exports.se_DislikeAnswerCommand = se_DislikeAnswerCommand;
|
|
|
49
49
|
const se_GetChatCommand = async (input, context) => {
|
|
50
50
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
51
51
|
const headers = {};
|
|
52
|
-
b.bp("/
|
|
53
|
-
b.p('
|
|
52
|
+
b.bp("/v1/wilma/chats/{chatId}");
|
|
53
|
+
b.p('chatId', () => input.chatId, '{chatId}', false);
|
|
54
54
|
const query = (0, smithy_client_1.map)({
|
|
55
55
|
[_c]: [, input[_c]],
|
|
56
56
|
[_u]: [, input[_u]],
|
|
@@ -68,7 +68,7 @@ const se_LikeAnswerCommand = async (input, context) => {
|
|
|
68
68
|
const headers = {
|
|
69
69
|
'content-type': 'application/json',
|
|
70
70
|
};
|
|
71
|
-
b.bp("/
|
|
71
|
+
b.bp("/v1/wilma/like");
|
|
72
72
|
const query = (0, smithy_client_1.map)({
|
|
73
73
|
[_c]: [, input[_c]],
|
|
74
74
|
[_u]: [, input[_u]],
|
|
@@ -76,8 +76,8 @@ const se_LikeAnswerCommand = async (input, context) => {
|
|
|
76
76
|
let body;
|
|
77
77
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
78
78
|
'chatId': [],
|
|
79
|
-
'
|
|
80
|
-
'
|
|
79
|
+
'messageId': [],
|
|
80
|
+
'text': [],
|
|
81
81
|
}));
|
|
82
82
|
b.m("POST")
|
|
83
83
|
.h(headers)
|
|
@@ -86,6 +86,23 @@ const se_LikeAnswerCommand = async (input, context) => {
|
|
|
86
86
|
return b.build();
|
|
87
87
|
};
|
|
88
88
|
exports.se_LikeAnswerCommand = se_LikeAnswerCommand;
|
|
89
|
+
const se_ListAgentFeedbacksCommand = async (input, context) => {
|
|
90
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
91
|
+
const headers = {};
|
|
92
|
+
b.bp("/v1/wilma/agents/{agentId}/feedbacks");
|
|
93
|
+
b.p('agentId', () => input.agentId, '{agentId}', false);
|
|
94
|
+
const query = (0, smithy_client_1.map)({
|
|
95
|
+
[_c]: [, input[_c]],
|
|
96
|
+
[_eSK]: [, input[_eSK]],
|
|
97
|
+
});
|
|
98
|
+
let body;
|
|
99
|
+
b.m("GET")
|
|
100
|
+
.h(headers)
|
|
101
|
+
.q(query)
|
|
102
|
+
.b(body);
|
|
103
|
+
return b.build();
|
|
104
|
+
};
|
|
105
|
+
exports.se_ListAgentFeedbacksCommand = se_ListAgentFeedbacksCommand;
|
|
89
106
|
const se_ListChatsCommand = async (input, context) => {
|
|
90
107
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
91
108
|
const headers = {};
|
|
@@ -103,6 +120,22 @@ const se_ListChatsCommand = async (input, context) => {
|
|
|
103
120
|
return b.build();
|
|
104
121
|
};
|
|
105
122
|
exports.se_ListChatsCommand = se_ListChatsCommand;
|
|
123
|
+
const se_ListFeedbacksCommand = async (input, context) => {
|
|
124
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
125
|
+
const headers = {};
|
|
126
|
+
b.bp("/v1/wilma/feedbacks");
|
|
127
|
+
const query = (0, smithy_client_1.map)({
|
|
128
|
+
[_c]: [, input[_c]],
|
|
129
|
+
[_eSK]: [, input[_eSK]],
|
|
130
|
+
});
|
|
131
|
+
let body;
|
|
132
|
+
b.m("GET")
|
|
133
|
+
.h(headers)
|
|
134
|
+
.q(query)
|
|
135
|
+
.b(body);
|
|
136
|
+
return b.build();
|
|
137
|
+
};
|
|
138
|
+
exports.se_ListFeedbacksCommand = se_ListFeedbacksCommand;
|
|
106
139
|
const de_DeleteChatCommand = async (output, context) => {
|
|
107
140
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
108
141
|
return de_CommandError(output, context);
|
|
@@ -152,6 +185,22 @@ const de_LikeAnswerCommand = async (output, context) => {
|
|
|
152
185
|
return contents;
|
|
153
186
|
};
|
|
154
187
|
exports.de_LikeAnswerCommand = de_LikeAnswerCommand;
|
|
188
|
+
const de_ListAgentFeedbacksCommand = async (output, context) => {
|
|
189
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
190
|
+
return de_CommandError(output, context);
|
|
191
|
+
}
|
|
192
|
+
const contents = (0, smithy_client_1.map)({
|
|
193
|
+
$metadata: deserializeMetadata(output),
|
|
194
|
+
});
|
|
195
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
196
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
197
|
+
'feedbacks': smithy_client_1._json,
|
|
198
|
+
'lastEvaluatedKey': smithy_client_1.expectString,
|
|
199
|
+
});
|
|
200
|
+
Object.assign(contents, doc);
|
|
201
|
+
return contents;
|
|
202
|
+
};
|
|
203
|
+
exports.de_ListAgentFeedbacksCommand = de_ListAgentFeedbacksCommand;
|
|
155
204
|
const de_ListChatsCommand = async (output, context) => {
|
|
156
205
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
157
206
|
return de_CommandError(output, context);
|
|
@@ -168,6 +217,22 @@ const de_ListChatsCommand = async (output, context) => {
|
|
|
168
217
|
return contents;
|
|
169
218
|
};
|
|
170
219
|
exports.de_ListChatsCommand = de_ListChatsCommand;
|
|
220
|
+
const de_ListFeedbacksCommand = async (output, context) => {
|
|
221
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
222
|
+
return de_CommandError(output, context);
|
|
223
|
+
}
|
|
224
|
+
const contents = (0, smithy_client_1.map)({
|
|
225
|
+
$metadata: deserializeMetadata(output),
|
|
226
|
+
});
|
|
227
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
228
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
229
|
+
'feedbacks': smithy_client_1._json,
|
|
230
|
+
'lastEvaluatedKey': smithy_client_1.expectString,
|
|
231
|
+
});
|
|
232
|
+
Object.assign(contents, doc);
|
|
233
|
+
return contents;
|
|
234
|
+
};
|
|
235
|
+
exports.de_ListFeedbacksCommand = de_ListFeedbacksCommand;
|
|
171
236
|
const de_CommandError = async (output, context) => {
|
|
172
237
|
const parsedOutput = {
|
|
173
238
|
...output,
|
|
@@ -233,9 +298,6 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
233
298
|
});
|
|
234
299
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
235
300
|
};
|
|
236
|
-
const se_Document = (input, context) => {
|
|
237
|
-
return input;
|
|
238
|
-
};
|
|
239
301
|
const de_Document = (output, context) => {
|
|
240
302
|
return output;
|
|
241
303
|
};
|
|
@@ -243,6 +305,7 @@ const de_ChatHistory = (output, context) => {
|
|
|
243
305
|
return (0, smithy_client_1.take)(output, {
|
|
244
306
|
'mentions': (_) => de_ChatMentionsList(_, context),
|
|
245
307
|
'messages': (_) => de_ChatMessagesList(_, context),
|
|
308
|
+
'version': smithy_client_1.expectString,
|
|
246
309
|
});
|
|
247
310
|
};
|
|
248
311
|
const de_ChatMentionsList = (output, context) => {
|
package/dist-es/Wilma.js
CHANGED
|
@@ -3,14 +3,18 @@ import { DeleteChatCommand, } from "./commands/DeleteChatCommand";
|
|
|
3
3
|
import { DislikeAnswerCommand, } from "./commands/DislikeAnswerCommand";
|
|
4
4
|
import { GetChatCommand, } from "./commands/GetChatCommand";
|
|
5
5
|
import { LikeAnswerCommand, } from "./commands/LikeAnswerCommand";
|
|
6
|
+
import { ListAgentFeedbacksCommand, } from "./commands/ListAgentFeedbacksCommand";
|
|
6
7
|
import { ListChatsCommand, } from "./commands/ListChatsCommand";
|
|
8
|
+
import { ListFeedbacksCommand, } from "./commands/ListFeedbacksCommand";
|
|
7
9
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
8
10
|
const commands = {
|
|
9
11
|
DeleteChatCommand,
|
|
10
12
|
DislikeAnswerCommand,
|
|
11
13
|
GetChatCommand,
|
|
12
14
|
LikeAnswerCommand,
|
|
15
|
+
ListAgentFeedbacksCommand,
|
|
13
16
|
ListChatsCommand,
|
|
17
|
+
ListFeedbacksCommand,
|
|
14
18
|
};
|
|
15
19
|
export class Wilma extends WilmaClient {
|
|
16
20
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_ListAgentFeedbacksCommand, se_ListAgentFeedbacksCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class ListAgentFeedbacksCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Wilma", "ListAgentFeedbacks", {})
|
|
12
|
+
.n("WilmaClient", "ListAgentFeedbacksCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_ListAgentFeedbacksCommand)
|
|
15
|
+
.de(de_ListAgentFeedbacksCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { de_ListFeedbacksCommand, se_ListFeedbacksCommand, } from "../protocols/Aws_restJson1";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
export { $Command };
|
|
5
|
+
export class ListFeedbacksCommand extends $Command.classBuilder()
|
|
6
|
+
.m(function (Command, cs, config, o) {
|
|
7
|
+
return [
|
|
8
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
+
];
|
|
10
|
+
})
|
|
11
|
+
.s("Wilma", "ListFeedbacks", {})
|
|
12
|
+
.n("WilmaClient", "ListFeedbacksCommand")
|
|
13
|
+
.f(void 0, void 0)
|
|
14
|
+
.ser(se_ListFeedbacksCommand)
|
|
15
|
+
.de(de_ListFeedbacksCommand)
|
|
16
|
+
.build() {
|
|
17
|
+
}
|
|
@@ -2,4 +2,6 @@ export * from "./DeleteChatCommand";
|
|
|
2
2
|
export * from "./DislikeAnswerCommand";
|
|
3
3
|
export * from "./GetChatCommand";
|
|
4
4
|
export * from "./LikeAnswerCommand";
|
|
5
|
+
export * from "./ListAgentFeedbacksCommand";
|
|
5
6
|
export * from "./ListChatsCommand";
|
|
7
|
+
export * from "./ListFeedbacksCommand";
|
|
@@ -6,8 +6,8 @@ import { decorateServiceException as __decorateServiceException, expectNonNull a
|
|
|
6
6
|
export const se_DeleteChatCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {};
|
|
9
|
-
b.bp("/
|
|
10
|
-
b.p('
|
|
9
|
+
b.bp("/v1/wilma/chats/{chatId}");
|
|
10
|
+
b.p('chatId', () => input.chatId, '{chatId}', false);
|
|
11
11
|
const query = map({
|
|
12
12
|
[_c]: [, input[_c]],
|
|
13
13
|
[_u]: [, input[_u]],
|
|
@@ -24,7 +24,7 @@ export const se_DislikeAnswerCommand = async (input, context) => {
|
|
|
24
24
|
const headers = {
|
|
25
25
|
'content-type': 'application/json',
|
|
26
26
|
};
|
|
27
|
-
b.bp("/
|
|
27
|
+
b.bp("/v1/wilma/dislike");
|
|
28
28
|
const query = map({
|
|
29
29
|
[_c]: [, input[_c]],
|
|
30
30
|
[_u]: [, input[_u]],
|
|
@@ -32,8 +32,8 @@ export const se_DislikeAnswerCommand = async (input, context) => {
|
|
|
32
32
|
let body;
|
|
33
33
|
body = JSON.stringify(take(input, {
|
|
34
34
|
'chatId': [],
|
|
35
|
-
'
|
|
36
|
-
'
|
|
35
|
+
'messageId': [],
|
|
36
|
+
'text': [],
|
|
37
37
|
}));
|
|
38
38
|
b.m("POST")
|
|
39
39
|
.h(headers)
|
|
@@ -44,8 +44,8 @@ export const se_DislikeAnswerCommand = async (input, context) => {
|
|
|
44
44
|
export const se_GetChatCommand = async (input, context) => {
|
|
45
45
|
const b = rb(input, context);
|
|
46
46
|
const headers = {};
|
|
47
|
-
b.bp("/
|
|
48
|
-
b.p('
|
|
47
|
+
b.bp("/v1/wilma/chats/{chatId}");
|
|
48
|
+
b.p('chatId', () => input.chatId, '{chatId}', false);
|
|
49
49
|
const query = map({
|
|
50
50
|
[_c]: [, input[_c]],
|
|
51
51
|
[_u]: [, input[_u]],
|
|
@@ -62,7 +62,7 @@ export const se_LikeAnswerCommand = async (input, context) => {
|
|
|
62
62
|
const headers = {
|
|
63
63
|
'content-type': 'application/json',
|
|
64
64
|
};
|
|
65
|
-
b.bp("/
|
|
65
|
+
b.bp("/v1/wilma/like");
|
|
66
66
|
const query = map({
|
|
67
67
|
[_c]: [, input[_c]],
|
|
68
68
|
[_u]: [, input[_u]],
|
|
@@ -70,8 +70,8 @@ export const se_LikeAnswerCommand = async (input, context) => {
|
|
|
70
70
|
let body;
|
|
71
71
|
body = JSON.stringify(take(input, {
|
|
72
72
|
'chatId': [],
|
|
73
|
-
'
|
|
74
|
-
'
|
|
73
|
+
'messageId': [],
|
|
74
|
+
'text': [],
|
|
75
75
|
}));
|
|
76
76
|
b.m("POST")
|
|
77
77
|
.h(headers)
|
|
@@ -79,6 +79,22 @@ export const se_LikeAnswerCommand = async (input, context) => {
|
|
|
79
79
|
.b(body);
|
|
80
80
|
return b.build();
|
|
81
81
|
};
|
|
82
|
+
export const se_ListAgentFeedbacksCommand = async (input, context) => {
|
|
83
|
+
const b = rb(input, context);
|
|
84
|
+
const headers = {};
|
|
85
|
+
b.bp("/v1/wilma/agents/{agentId}/feedbacks");
|
|
86
|
+
b.p('agentId', () => input.agentId, '{agentId}', false);
|
|
87
|
+
const query = map({
|
|
88
|
+
[_c]: [, input[_c]],
|
|
89
|
+
[_eSK]: [, input[_eSK]],
|
|
90
|
+
});
|
|
91
|
+
let body;
|
|
92
|
+
b.m("GET")
|
|
93
|
+
.h(headers)
|
|
94
|
+
.q(query)
|
|
95
|
+
.b(body);
|
|
96
|
+
return b.build();
|
|
97
|
+
};
|
|
82
98
|
export const se_ListChatsCommand = async (input, context) => {
|
|
83
99
|
const b = rb(input, context);
|
|
84
100
|
const headers = {};
|
|
@@ -95,6 +111,21 @@ export const se_ListChatsCommand = async (input, context) => {
|
|
|
95
111
|
.b(body);
|
|
96
112
|
return b.build();
|
|
97
113
|
};
|
|
114
|
+
export const se_ListFeedbacksCommand = async (input, context) => {
|
|
115
|
+
const b = rb(input, context);
|
|
116
|
+
const headers = {};
|
|
117
|
+
b.bp("/v1/wilma/feedbacks");
|
|
118
|
+
const query = map({
|
|
119
|
+
[_c]: [, input[_c]],
|
|
120
|
+
[_eSK]: [, input[_eSK]],
|
|
121
|
+
});
|
|
122
|
+
let body;
|
|
123
|
+
b.m("GET")
|
|
124
|
+
.h(headers)
|
|
125
|
+
.q(query)
|
|
126
|
+
.b(body);
|
|
127
|
+
return b.build();
|
|
128
|
+
};
|
|
98
129
|
export const de_DeleteChatCommand = async (output, context) => {
|
|
99
130
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
100
131
|
return de_CommandError(output, context);
|
|
@@ -140,6 +171,21 @@ export const de_LikeAnswerCommand = async (output, context) => {
|
|
|
140
171
|
await collectBody(output.body, context);
|
|
141
172
|
return contents;
|
|
142
173
|
};
|
|
174
|
+
export const de_ListAgentFeedbacksCommand = async (output, context) => {
|
|
175
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
176
|
+
return de_CommandError(output, context);
|
|
177
|
+
}
|
|
178
|
+
const contents = map({
|
|
179
|
+
$metadata: deserializeMetadata(output),
|
|
180
|
+
});
|
|
181
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
182
|
+
const doc = take(data, {
|
|
183
|
+
'feedbacks': _json,
|
|
184
|
+
'lastEvaluatedKey': __expectString,
|
|
185
|
+
});
|
|
186
|
+
Object.assign(contents, doc);
|
|
187
|
+
return contents;
|
|
188
|
+
};
|
|
143
189
|
export const de_ListChatsCommand = async (output, context) => {
|
|
144
190
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
145
191
|
return de_CommandError(output, context);
|
|
@@ -155,6 +201,21 @@ export const de_ListChatsCommand = async (output, context) => {
|
|
|
155
201
|
Object.assign(contents, doc);
|
|
156
202
|
return contents;
|
|
157
203
|
};
|
|
204
|
+
export const de_ListFeedbacksCommand = async (output, context) => {
|
|
205
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
206
|
+
return de_CommandError(output, context);
|
|
207
|
+
}
|
|
208
|
+
const contents = map({
|
|
209
|
+
$metadata: deserializeMetadata(output),
|
|
210
|
+
});
|
|
211
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
212
|
+
const doc = take(data, {
|
|
213
|
+
'feedbacks': _json,
|
|
214
|
+
'lastEvaluatedKey': __expectString,
|
|
215
|
+
});
|
|
216
|
+
Object.assign(contents, doc);
|
|
217
|
+
return contents;
|
|
218
|
+
};
|
|
158
219
|
const de_CommandError = async (output, context) => {
|
|
159
220
|
const parsedOutput = {
|
|
160
221
|
...output,
|
|
@@ -220,9 +281,6 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
220
281
|
});
|
|
221
282
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
222
283
|
};
|
|
223
|
-
const se_Document = (input, context) => {
|
|
224
|
-
return input;
|
|
225
|
-
};
|
|
226
284
|
const de_Document = (output, context) => {
|
|
227
285
|
return output;
|
|
228
286
|
};
|
|
@@ -230,6 +288,7 @@ const de_ChatHistory = (output, context) => {
|
|
|
230
288
|
return take(output, {
|
|
231
289
|
'mentions': (_) => de_ChatMentionsList(_, context),
|
|
232
290
|
'messages': (_) => de_ChatMessagesList(_, context),
|
|
291
|
+
'version': __expectString,
|
|
233
292
|
});
|
|
234
293
|
};
|
|
235
294
|
const de_ChatMentionsList = (output, context) => {
|
package/dist-types/Wilma.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ import { DeleteChatCommandInput, DeleteChatCommandOutput } from "./commands/Dele
|
|
|
3
3
|
import { DislikeAnswerCommandInput, DislikeAnswerCommandOutput } from "./commands/DislikeAnswerCommand";
|
|
4
4
|
import { GetChatCommandInput, GetChatCommandOutput } from "./commands/GetChatCommand";
|
|
5
5
|
import { LikeAnswerCommandInput, LikeAnswerCommandOutput } from "./commands/LikeAnswerCommand";
|
|
6
|
+
import { ListAgentFeedbacksCommandInput, ListAgentFeedbacksCommandOutput } from "./commands/ListAgentFeedbacksCommand";
|
|
6
7
|
import { ListChatsCommandInput, ListChatsCommandOutput } from "./commands/ListChatsCommand";
|
|
8
|
+
import { ListFeedbacksCommandInput, ListFeedbacksCommandOutput } from "./commands/ListFeedbacksCommand";
|
|
7
9
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
8
10
|
export interface Wilma {
|
|
9
11
|
/**
|
|
@@ -30,6 +32,12 @@ export interface Wilma {
|
|
|
30
32
|
likeAnswer(args: LikeAnswerCommandInput, options?: __HttpHandlerOptions): Promise<LikeAnswerCommandOutput>;
|
|
31
33
|
likeAnswer(args: LikeAnswerCommandInput, cb: (err: any, data?: LikeAnswerCommandOutput) => void): void;
|
|
32
34
|
likeAnswer(args: LikeAnswerCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: LikeAnswerCommandOutput) => void): void;
|
|
35
|
+
/**
|
|
36
|
+
* @see {@link ListAgentFeedbacksCommand}
|
|
37
|
+
*/
|
|
38
|
+
listAgentFeedbacks(args: ListAgentFeedbacksCommandInput, options?: __HttpHandlerOptions): Promise<ListAgentFeedbacksCommandOutput>;
|
|
39
|
+
listAgentFeedbacks(args: ListAgentFeedbacksCommandInput, cb: (err: any, data?: ListAgentFeedbacksCommandOutput) => void): void;
|
|
40
|
+
listAgentFeedbacks(args: ListAgentFeedbacksCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAgentFeedbacksCommandOutput) => void): void;
|
|
33
41
|
/**
|
|
34
42
|
* @see {@link ListChatsCommand}
|
|
35
43
|
*/
|
|
@@ -37,6 +45,13 @@ export interface Wilma {
|
|
|
37
45
|
listChats(args: ListChatsCommandInput, options?: __HttpHandlerOptions): Promise<ListChatsCommandOutput>;
|
|
38
46
|
listChats(args: ListChatsCommandInput, cb: (err: any, data?: ListChatsCommandOutput) => void): void;
|
|
39
47
|
listChats(args: ListChatsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListChatsCommandOutput) => void): void;
|
|
48
|
+
/**
|
|
49
|
+
* @see {@link ListFeedbacksCommand}
|
|
50
|
+
*/
|
|
51
|
+
listFeedbacks(): Promise<ListFeedbacksCommandOutput>;
|
|
52
|
+
listFeedbacks(args: ListFeedbacksCommandInput, options?: __HttpHandlerOptions): Promise<ListFeedbacksCommandOutput>;
|
|
53
|
+
listFeedbacks(args: ListFeedbacksCommandInput, cb: (err: any, data?: ListFeedbacksCommandOutput) => void): void;
|
|
54
|
+
listFeedbacks(args: ListFeedbacksCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListFeedbacksCommandOutput) => void): void;
|
|
40
55
|
}
|
|
41
56
|
/**
|
|
42
57
|
* @public
|
|
@@ -2,7 +2,9 @@ import { DeleteChatCommandInput, DeleteChatCommandOutput } from "./commands/Dele
|
|
|
2
2
|
import { DislikeAnswerCommandInput, DislikeAnswerCommandOutput } from "./commands/DislikeAnswerCommand";
|
|
3
3
|
import { GetChatCommandInput, GetChatCommandOutput } from "./commands/GetChatCommand";
|
|
4
4
|
import { LikeAnswerCommandInput, LikeAnswerCommandOutput } from "./commands/LikeAnswerCommand";
|
|
5
|
+
import { ListAgentFeedbacksCommandInput, ListAgentFeedbacksCommandOutput } from "./commands/ListAgentFeedbacksCommand";
|
|
5
6
|
import { ListChatsCommandInput, ListChatsCommandOutput } from "./commands/ListChatsCommand";
|
|
7
|
+
import { ListFeedbacksCommandInput, ListFeedbacksCommandOutput } from "./commands/ListFeedbacksCommand";
|
|
6
8
|
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
7
9
|
import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
8
10
|
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
@@ -14,11 +16,11 @@ export { __Client };
|
|
|
14
16
|
/**
|
|
15
17
|
* @public
|
|
16
18
|
*/
|
|
17
|
-
export type ServiceInputTypes = DeleteChatCommandInput | DislikeAnswerCommandInput | GetChatCommandInput | LikeAnswerCommandInput | ListChatsCommandInput;
|
|
19
|
+
export type ServiceInputTypes = DeleteChatCommandInput | DislikeAnswerCommandInput | GetChatCommandInput | LikeAnswerCommandInput | ListAgentFeedbacksCommandInput | ListChatsCommandInput | ListFeedbacksCommandInput;
|
|
18
20
|
/**
|
|
19
21
|
* @public
|
|
20
22
|
*/
|
|
21
|
-
export type ServiceOutputTypes = DeleteChatCommandOutput | DislikeAnswerCommandOutput | GetChatCommandOutput | LikeAnswerCommandOutput | ListChatsCommandOutput;
|
|
23
|
+
export type ServiceOutputTypes = DeleteChatCommandOutput | DislikeAnswerCommandOutput | GetChatCommandOutput | LikeAnswerCommandOutput | ListAgentFeedbacksCommandOutput | ListChatsCommandOutput | ListFeedbacksCommandOutput;
|
|
22
24
|
/**
|
|
23
25
|
* @public
|
|
24
26
|
*/
|
|
@@ -37,7 +37,7 @@ declare const DeleteChatCommand_base: {
|
|
|
37
37
|
* const input = { // DeleteChatInput
|
|
38
38
|
* company: "STRING_VALUE",
|
|
39
39
|
* user: "STRING_VALUE",
|
|
40
|
-
*
|
|
40
|
+
* chatId: "STRING_VALUE", // required
|
|
41
41
|
* };
|
|
42
42
|
* const command = new DeleteChatCommand(input);
|
|
43
43
|
* const response = await client.send(command);
|
|
@@ -38,13 +38,8 @@ declare const DislikeAnswerCommand_base: {
|
|
|
38
38
|
* company: "STRING_VALUE",
|
|
39
39
|
* user: "STRING_VALUE",
|
|
40
40
|
* chatId: "STRING_VALUE", // required
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* id: "STRING_VALUE", // required
|
|
44
|
-
* text: "STRING_VALUE", // required
|
|
45
|
-
* score: "LIKE" || "DISLIKE", // required
|
|
46
|
-
* createdAt: "STRING_VALUE", // required
|
|
47
|
-
* },
|
|
41
|
+
* messageId: "STRING_VALUE", // required
|
|
42
|
+
* text: "STRING_VALUE", // required
|
|
48
43
|
* };
|
|
49
44
|
* const command = new DislikeAnswerCommand(input);
|
|
50
45
|
* const response = await client.send(command);
|
|
@@ -37,19 +37,21 @@ declare const GetChatCommand_base: {
|
|
|
37
37
|
* const input = { // GetChatInput
|
|
38
38
|
* company: "STRING_VALUE",
|
|
39
39
|
* user: "STRING_VALUE",
|
|
40
|
-
*
|
|
40
|
+
* chatId: "STRING_VALUE", // required
|
|
41
41
|
* };
|
|
42
42
|
* const command = new GetChatCommand(input);
|
|
43
43
|
* const response = await client.send(command);
|
|
44
44
|
* // { // GetChatOutput
|
|
45
45
|
* // chat: { // Chat
|
|
46
46
|
* // id: "STRING_VALUE", // required
|
|
47
|
+
* // agentId: "STRING_VALUE",
|
|
47
48
|
* // title: "STRING_VALUE",
|
|
48
49
|
* // target: "STRING_VALUE",
|
|
49
50
|
* // createdAt: "STRING_VALUE", // required
|
|
50
51
|
* // updatedAt: "STRING_VALUE",
|
|
51
52
|
* // },
|
|
52
53
|
* // history: { // ChatHistory
|
|
54
|
+
* // version: "STRING_VALUE", // required
|
|
53
55
|
* // messages: [ // ChatMessagesList // required
|
|
54
56
|
* // "DOCUMENT_VALUE",
|
|
55
57
|
* // ],
|
|
@@ -38,13 +38,8 @@ declare const LikeAnswerCommand_base: {
|
|
|
38
38
|
* company: "STRING_VALUE",
|
|
39
39
|
* user: "STRING_VALUE",
|
|
40
40
|
* chatId: "STRING_VALUE", // required
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* id: "STRING_VALUE", // required
|
|
44
|
-
* text: "STRING_VALUE", // required
|
|
45
|
-
* score: "LIKE" || "DISLIKE", // required
|
|
46
|
-
* createdAt: "STRING_VALUE", // required
|
|
47
|
-
* },
|
|
41
|
+
* messageId: "STRING_VALUE", // required
|
|
42
|
+
* text: "STRING_VALUE", // required
|
|
48
43
|
* };
|
|
49
44
|
* const command = new LikeAnswerCommand(input);
|
|
50
45
|
* const response = await client.send(command);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ServiceInputTypes, ServiceOutputTypes, WilmaClientResolvedConfig } from "../WilmaClient";
|
|
2
|
+
import { ListAgentFeedbacksInput, ListAgentFeedbacksOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link ListAgentFeedbacksCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ListAgentFeedbacksCommandInput extends ListAgentFeedbacksInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link ListAgentFeedbacksCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface ListAgentFeedbacksCommandOutput extends ListAgentFeedbacksOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const ListAgentFeedbacksCommand_base: {
|
|
25
|
+
new (input: ListAgentFeedbacksCommandInput): import("@smithy/smithy-client").CommandImpl<ListAgentFeedbacksCommandInput, ListAgentFeedbacksCommandOutput, WilmaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: ListAgentFeedbacksCommandInput): import("@smithy/smithy-client").CommandImpl<ListAgentFeedbacksCommandInput, ListAgentFeedbacksCommandOutput, WilmaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Lists recent feedbacks for specific agent.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { WilmaClient, ListAgentFeedbacksCommand } from "@wildix/wim-wilma-client"; // ES Modules import
|
|
35
|
+
* // const { WilmaClient, ListAgentFeedbacksCommand } = require("@wildix/wim-wilma-client"); // CommonJS import
|
|
36
|
+
* const client = new WilmaClient(config);
|
|
37
|
+
* const input = { // ListAgentFeedbacksInput
|
|
38
|
+
* company: "STRING_VALUE",
|
|
39
|
+
* agentId: "STRING_VALUE", // required
|
|
40
|
+
* exclusiveStartKey: "STRING_VALUE",
|
|
41
|
+
* };
|
|
42
|
+
* const command = new ListAgentFeedbacksCommand(input);
|
|
43
|
+
* const response = await client.send(command);
|
|
44
|
+
* // { // ListAgentFeedbacksOutput
|
|
45
|
+
* // feedbacks: [ // ChatFeedbacksList // required
|
|
46
|
+
* // { // ChatFeedback
|
|
47
|
+
* // id: "STRING_VALUE", // required
|
|
48
|
+
* // text: "STRING_VALUE", // required
|
|
49
|
+
* // score: "LIKE" || "DISLIKE", // required
|
|
50
|
+
* // createdAt: "STRING_VALUE", // required
|
|
51
|
+
* // },
|
|
52
|
+
* // ],
|
|
53
|
+
* // lastEvaluatedKey: "STRING_VALUE",
|
|
54
|
+
* // };
|
|
55
|
+
*
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @param ListAgentFeedbacksCommandInput - {@link ListAgentFeedbacksCommandInput}
|
|
59
|
+
* @returns {@link ListAgentFeedbacksCommandOutput}
|
|
60
|
+
* @see {@link ListAgentFeedbacksCommandInput} for command's `input` shape.
|
|
61
|
+
* @see {@link ListAgentFeedbacksCommandOutput} for command's `response` shape.
|
|
62
|
+
* @see {@link WilmaClientResolvedConfig | config} for WilmaClient's `config` shape.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link ValidationException} (client fault)
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link WilmaServiceException}
|
|
69
|
+
* <p>Base exception class for all service exceptions from Wilma service.</p>
|
|
70
|
+
*
|
|
71
|
+
*
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
export declare class ListAgentFeedbacksCommand extends ListAgentFeedbacksCommand_base {
|
|
75
|
+
/** @internal type navigation helper, not in runtime. */
|
|
76
|
+
protected static __types: {
|
|
77
|
+
api: {
|
|
78
|
+
input: ListAgentFeedbacksInput;
|
|
79
|
+
output: ListAgentFeedbacksOutput;
|
|
80
|
+
};
|
|
81
|
+
sdk: {
|
|
82
|
+
input: ListAgentFeedbacksCommandInput;
|
|
83
|
+
output: ListAgentFeedbacksCommandOutput;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -45,6 +45,7 @@ declare const ListChatsCommand_base: {
|
|
|
45
45
|
* // chats: [ // ChatsList // required
|
|
46
46
|
* // { // Chat
|
|
47
47
|
* // id: "STRING_VALUE", // required
|
|
48
|
+
* // agentId: "STRING_VALUE",
|
|
48
49
|
* // title: "STRING_VALUE",
|
|
49
50
|
* // target: "STRING_VALUE",
|
|
50
51
|
* // createdAt: "STRING_VALUE", // required
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ServiceInputTypes, ServiceOutputTypes, WilmaClientResolvedConfig } from "../WilmaClient";
|
|
2
|
+
import { ListFeedbacksInput, ListFeedbacksOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link ListFeedbacksCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ListFeedbacksCommandInput extends ListFeedbacksInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link ListFeedbacksCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface ListFeedbacksCommandOutput extends ListFeedbacksOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const ListFeedbacksCommand_base: {
|
|
25
|
+
new (input: ListFeedbacksCommandInput): import("@smithy/smithy-client").CommandImpl<ListFeedbacksCommandInput, ListFeedbacksCommandOutput, WilmaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (...[input]: [] | [ListFeedbacksCommandInput]): import("@smithy/smithy-client").CommandImpl<ListFeedbacksCommandInput, ListFeedbacksCommandOutput, WilmaClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Lists recent feedbacks for the organization.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { WilmaClient, ListFeedbacksCommand } from "@wildix/wim-wilma-client"; // ES Modules import
|
|
35
|
+
* // const { WilmaClient, ListFeedbacksCommand } = require("@wildix/wim-wilma-client"); // CommonJS import
|
|
36
|
+
* const client = new WilmaClient(config);
|
|
37
|
+
* const input = { // ListFeedbacksInput
|
|
38
|
+
* company: "STRING_VALUE",
|
|
39
|
+
* exclusiveStartKey: "STRING_VALUE",
|
|
40
|
+
* };
|
|
41
|
+
* const command = new ListFeedbacksCommand(input);
|
|
42
|
+
* const response = await client.send(command);
|
|
43
|
+
* // { // ListFeedbacksOutput
|
|
44
|
+
* // feedbacks: [ // ChatFeedbacksList // required
|
|
45
|
+
* // { // ChatFeedback
|
|
46
|
+
* // id: "STRING_VALUE", // required
|
|
47
|
+
* // text: "STRING_VALUE", // required
|
|
48
|
+
* // score: "LIKE" || "DISLIKE", // required
|
|
49
|
+
* // createdAt: "STRING_VALUE", // required
|
|
50
|
+
* // },
|
|
51
|
+
* // ],
|
|
52
|
+
* // lastEvaluatedKey: "STRING_VALUE",
|
|
53
|
+
* // };
|
|
54
|
+
*
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @param ListFeedbacksCommandInput - {@link ListFeedbacksCommandInput}
|
|
58
|
+
* @returns {@link ListFeedbacksCommandOutput}
|
|
59
|
+
* @see {@link ListFeedbacksCommandInput} for command's `input` shape.
|
|
60
|
+
* @see {@link ListFeedbacksCommandOutput} for command's `response` shape.
|
|
61
|
+
* @see {@link WilmaClientResolvedConfig | config} for WilmaClient's `config` shape.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link ValidationException} (client fault)
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link WilmaServiceException}
|
|
68
|
+
* <p>Base exception class for all service exceptions from Wilma service.</p>
|
|
69
|
+
*
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export declare class ListFeedbacksCommand extends ListFeedbacksCommand_base {
|
|
74
|
+
/** @internal type navigation helper, not in runtime. */
|
|
75
|
+
protected static __types: {
|
|
76
|
+
api: {
|
|
77
|
+
input: ListFeedbacksInput;
|
|
78
|
+
output: ListFeedbacksOutput;
|
|
79
|
+
};
|
|
80
|
+
sdk: {
|
|
81
|
+
input: ListFeedbacksCommandInput;
|
|
82
|
+
output: ListFeedbacksCommandOutput;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -2,4 +2,6 @@ export * from "./DeleteChatCommand";
|
|
|
2
2
|
export * from "./DislikeAnswerCommand";
|
|
3
3
|
export * from "./GetChatCommand";
|
|
4
4
|
export * from "./LikeAnswerCommand";
|
|
5
|
+
export * from "./ListAgentFeedbacksCommand";
|
|
5
6
|
export * from "./ListChatsCommand";
|
|
7
|
+
export * from "./ListFeedbacksCommand";
|
|
@@ -39,6 +39,7 @@ export declare class ForbiddenException extends __BaseException {
|
|
|
39
39
|
*/
|
|
40
40
|
export interface Chat {
|
|
41
41
|
id: string;
|
|
42
|
+
agentId?: string | undefined;
|
|
42
43
|
title?: string | undefined;
|
|
43
44
|
target?: string | undefined;
|
|
44
45
|
createdAt: string;
|
|
@@ -69,6 +70,7 @@ export interface ChatFeedback {
|
|
|
69
70
|
* @public
|
|
70
71
|
*/
|
|
71
72
|
export interface ChatHistory {
|
|
73
|
+
version: string;
|
|
72
74
|
messages: (__DocumentType)[];
|
|
73
75
|
mentions?: (__DocumentType)[] | undefined;
|
|
74
76
|
}
|
|
@@ -86,7 +88,7 @@ export interface DeleteChatInput {
|
|
|
86
88
|
* @public
|
|
87
89
|
*/
|
|
88
90
|
user?: string | undefined;
|
|
89
|
-
|
|
91
|
+
chatId: string;
|
|
90
92
|
}
|
|
91
93
|
/**
|
|
92
94
|
* @public
|
|
@@ -108,8 +110,8 @@ export interface DislikeAnswerInput {
|
|
|
108
110
|
*/
|
|
109
111
|
user?: string | undefined;
|
|
110
112
|
chatId: string;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
messageId: string;
|
|
114
|
+
text: string;
|
|
113
115
|
}
|
|
114
116
|
/**
|
|
115
117
|
* @public
|
|
@@ -130,7 +132,7 @@ export interface GetChatInput {
|
|
|
130
132
|
* @public
|
|
131
133
|
*/
|
|
132
134
|
user?: string | undefined;
|
|
133
|
-
|
|
135
|
+
chatId: string;
|
|
134
136
|
}
|
|
135
137
|
/**
|
|
136
138
|
* @public
|
|
@@ -154,8 +156,8 @@ export interface LikeAnswerInput {
|
|
|
154
156
|
*/
|
|
155
157
|
user?: string | undefined;
|
|
156
158
|
chatId: string;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
messageId: string;
|
|
160
|
+
text: string;
|
|
159
161
|
}
|
|
160
162
|
/**
|
|
161
163
|
* @public
|
|
@@ -165,21 +167,36 @@ export interface LikeAnswerOutput {
|
|
|
165
167
|
/**
|
|
166
168
|
* @public
|
|
167
169
|
*/
|
|
168
|
-
export interface
|
|
170
|
+
export interface ListAgentFeedbacksInput {
|
|
169
171
|
/**
|
|
170
172
|
* The unique identifier of the tenant when a service token is used.
|
|
171
173
|
* @public
|
|
172
174
|
*/
|
|
173
175
|
company?: string | undefined;
|
|
176
|
+
agentId: string;
|
|
177
|
+
exclusiveStartKey?: string | undefined;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* @public
|
|
181
|
+
*/
|
|
182
|
+
export interface ListAgentFeedbacksOutput {
|
|
183
|
+
feedbacks: (ChatFeedback)[];
|
|
184
|
+
lastEvaluatedKey?: string | undefined;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* @public
|
|
188
|
+
*/
|
|
189
|
+
export interface ListChatsInput {
|
|
174
190
|
/**
|
|
175
|
-
* The unique identifier of the
|
|
191
|
+
* The unique identifier of the tenant when a service token is used.
|
|
176
192
|
* @public
|
|
177
193
|
*/
|
|
178
|
-
|
|
194
|
+
company?: string | undefined;
|
|
179
195
|
/**
|
|
180
|
-
*
|
|
196
|
+
* The unique identifier of the user when a service or tenant token is used.
|
|
181
197
|
* @public
|
|
182
198
|
*/
|
|
199
|
+
user?: string | undefined;
|
|
183
200
|
exclusiveStartKey?: string | undefined;
|
|
184
201
|
}
|
|
185
202
|
/**
|
|
@@ -187,9 +204,23 @@ export interface ListChatsInput {
|
|
|
187
204
|
*/
|
|
188
205
|
export interface ListChatsOutput {
|
|
189
206
|
chats: (Chat)[];
|
|
207
|
+
lastEvaluatedKey?: string | undefined;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @public
|
|
211
|
+
*/
|
|
212
|
+
export interface ListFeedbacksInput {
|
|
190
213
|
/**
|
|
191
|
-
*
|
|
214
|
+
* The unique identifier of the tenant when a service token is used.
|
|
192
215
|
* @public
|
|
193
216
|
*/
|
|
217
|
+
company?: string | undefined;
|
|
218
|
+
exclusiveStartKey?: string | undefined;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* @public
|
|
222
|
+
*/
|
|
223
|
+
export interface ListFeedbacksOutput {
|
|
224
|
+
feedbacks: (ChatFeedback)[];
|
|
194
225
|
lastEvaluatedKey?: string | undefined;
|
|
195
226
|
}
|
|
@@ -2,7 +2,9 @@ import { DeleteChatCommandInput, DeleteChatCommandOutput } from "../commands/Del
|
|
|
2
2
|
import { DislikeAnswerCommandInput, DislikeAnswerCommandOutput } from "../commands/DislikeAnswerCommand";
|
|
3
3
|
import { GetChatCommandInput, GetChatCommandOutput } from "../commands/GetChatCommand";
|
|
4
4
|
import { LikeAnswerCommandInput, LikeAnswerCommandOutput } from "../commands/LikeAnswerCommand";
|
|
5
|
+
import { ListAgentFeedbacksCommandInput, ListAgentFeedbacksCommandOutput } from "../commands/ListAgentFeedbacksCommand";
|
|
5
6
|
import { ListChatsCommandInput, ListChatsCommandOutput } from "../commands/ListChatsCommand";
|
|
7
|
+
import { ListFeedbacksCommandInput, ListFeedbacksCommandOutput } from "../commands/ListFeedbacksCommand";
|
|
6
8
|
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
7
9
|
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
8
10
|
/**
|
|
@@ -21,10 +23,18 @@ export declare const se_GetChatCommand: (input: GetChatCommandInput, context: __
|
|
|
21
23
|
* serializeAws_restJson1LikeAnswerCommand
|
|
22
24
|
*/
|
|
23
25
|
export declare const se_LikeAnswerCommand: (input: LikeAnswerCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
26
|
+
/**
|
|
27
|
+
* serializeAws_restJson1ListAgentFeedbacksCommand
|
|
28
|
+
*/
|
|
29
|
+
export declare const se_ListAgentFeedbacksCommand: (input: ListAgentFeedbacksCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
24
30
|
/**
|
|
25
31
|
* serializeAws_restJson1ListChatsCommand
|
|
26
32
|
*/
|
|
27
33
|
export declare const se_ListChatsCommand: (input: ListChatsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
34
|
+
/**
|
|
35
|
+
* serializeAws_restJson1ListFeedbacksCommand
|
|
36
|
+
*/
|
|
37
|
+
export declare const se_ListFeedbacksCommand: (input: ListFeedbacksCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
28
38
|
/**
|
|
29
39
|
* deserializeAws_restJson1DeleteChatCommand
|
|
30
40
|
*/
|
|
@@ -41,7 +51,15 @@ export declare const de_GetChatCommand: (output: __HttpResponse, context: __Serd
|
|
|
41
51
|
* deserializeAws_restJson1LikeAnswerCommand
|
|
42
52
|
*/
|
|
43
53
|
export declare const de_LikeAnswerCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<LikeAnswerCommandOutput>;
|
|
54
|
+
/**
|
|
55
|
+
* deserializeAws_restJson1ListAgentFeedbacksCommand
|
|
56
|
+
*/
|
|
57
|
+
export declare const de_ListAgentFeedbacksCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListAgentFeedbacksCommandOutput>;
|
|
44
58
|
/**
|
|
45
59
|
* deserializeAws_restJson1ListChatsCommand
|
|
46
60
|
*/
|
|
47
61
|
export declare const de_ListChatsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListChatsCommandOutput>;
|
|
62
|
+
/**
|
|
63
|
+
* deserializeAws_restJson1ListFeedbacksCommand
|
|
64
|
+
*/
|
|
65
|
+
export declare const de_ListFeedbacksCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListFeedbacksCommandOutput>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-wilma-client",
|
|
3
3
|
"description": "@wildix/wim-wilma-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
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",
|