@wildix/wim-wilma-client 0.0.2 → 0.0.4

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 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,7 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChatFeedbackScore = exports.ForbiddenException = exports.ValidationException = exports.NotFoundException = void 0;
3
+ exports.ChatFeedbackScore = exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = void 0;
4
4
  const WilmaServiceException_1 = require("./WilmaServiceException");
5
+ class ForbiddenException extends WilmaServiceException_1.WilmaServiceException {
6
+ name = "ForbiddenException";
7
+ $fault = "client";
8
+ constructor(opts) {
9
+ super({
10
+ name: "ForbiddenException",
11
+ $fault: "client",
12
+ ...opts
13
+ });
14
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
15
+ }
16
+ }
17
+ exports.ForbiddenException = ForbiddenException;
5
18
  class NotFoundException extends WilmaServiceException_1.WilmaServiceException {
6
19
  name = "NotFoundException";
7
20
  $fault = "client";
@@ -28,19 +41,6 @@ class ValidationException extends WilmaServiceException_1.WilmaServiceException
28
41
  }
29
42
  }
30
43
  exports.ValidationException = ValidationException;
31
- class ForbiddenException extends WilmaServiceException_1.WilmaServiceException {
32
- name = "ForbiddenException";
33
- $fault = "client";
34
- constructor(opts) {
35
- super({
36
- name: "ForbiddenException",
37
- $fault: "client",
38
- ...opts
39
- });
40
- Object.setPrototypeOf(this, ForbiddenException.prototype);
41
- }
42
- }
43
- exports.ForbiddenException = ForbiddenException;
44
44
  exports.ChatFeedbackScore = {
45
45
  DISLIKE: "DISLIKE",
46
46
  LIKE: "LIKE",
@@ -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("/v2/wilma/chats/{id}");
13
- b.p('id', () => input.id, '{id}', false);
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("/v2/wilma/feedback/dislike");
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
- 'feedback': _ => (0, smithy_client_1._json)(_),
40
- 'message': _ => se_Document(_, context),
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("/v2/wilma/chats/{id}");
53
- b.p('id', () => input.id, '{id}', false);
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("/v2/wilma/feedback/like");
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
- 'feedback': _ => (0, smithy_client_1._json)(_),
80
- 'message': _ => se_Document(_, context),
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);
@@ -134,7 +167,7 @@ const de_GetChatCommand = async (output, context) => {
134
167
  });
135
168
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
136
169
  const doc = (0, smithy_client_1.take)(data, {
137
- 'chat': smithy_client_1._json,
170
+ 'chat': _ => de_Chat(_, context),
138
171
  'history': _ => de_ChatHistory(_, context),
139
172
  });
140
173
  Object.assign(contents, doc);
@@ -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);
@@ -161,13 +210,29 @@ const de_ListChatsCommand = async (output, context) => {
161
210
  });
162
211
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
163
212
  const doc = (0, smithy_client_1.take)(data, {
164
- 'chats': smithy_client_1._json,
213
+ 'chats': _ => de_ChatsList(_, context),
165
214
  'lastEvaluatedKey': smithy_client_1.expectString,
166
215
  });
167
216
  Object.assign(contents, doc);
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,16 +298,26 @@ 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
  };
304
+ const de_Chat = (output, context) => {
305
+ return (0, smithy_client_1.take)(output, {
306
+ 'agentId': smithy_client_1.expectString,
307
+ 'createdAt': smithy_client_1.expectString,
308
+ 'id': smithy_client_1.expectString,
309
+ 'mentions': (_) => de_Document(_, context),
310
+ 'options': (_) => de_Document(_, context),
311
+ 'target': smithy_client_1.expectString,
312
+ 'title': smithy_client_1.expectString,
313
+ 'updatedAt': smithy_client_1.expectString,
314
+ });
315
+ };
242
316
  const de_ChatHistory = (output, context) => {
243
317
  return (0, smithy_client_1.take)(output, {
244
318
  'mentions': (_) => de_ChatMentionsList(_, context),
245
319
  'messages': (_) => de_ChatMessagesList(_, context),
320
+ 'version': smithy_client_1.expectString,
246
321
  });
247
322
  };
248
323
  const de_ChatMentionsList = (output, context) => {
@@ -257,6 +332,12 @@ const de_ChatMessagesList = (output, context) => {
257
332
  });
258
333
  return retVal;
259
334
  };
335
+ const de_ChatsList = (output, context) => {
336
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
337
+ return de_Chat(entry, context);
338
+ });
339
+ return retVal;
340
+ };
260
341
  const deserializeMetadata = (output) => ({
261
342
  httpStatusCode: output.statusCode,
262
343
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
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";
@@ -1,38 +1,38 @@
1
1
  import { WilmaServiceException as __BaseException } from "./WilmaServiceException";
2
- export class NotFoundException extends __BaseException {
3
- name = "NotFoundException";
2
+ export class ForbiddenException extends __BaseException {
3
+ name = "ForbiddenException";
4
4
  $fault = "client";
5
5
  constructor(opts) {
6
6
  super({
7
- name: "NotFoundException",
7
+ name: "ForbiddenException",
8
8
  $fault: "client",
9
9
  ...opts
10
10
  });
11
- Object.setPrototypeOf(this, NotFoundException.prototype);
11
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
12
12
  }
13
13
  }
14
- export class ValidationException extends __BaseException {
15
- name = "ValidationException";
14
+ export class NotFoundException extends __BaseException {
15
+ name = "NotFoundException";
16
16
  $fault = "client";
17
17
  constructor(opts) {
18
18
  super({
19
- name: "ValidationException",
19
+ name: "NotFoundException",
20
20
  $fault: "client",
21
21
  ...opts
22
22
  });
23
- Object.setPrototypeOf(this, ValidationException.prototype);
23
+ Object.setPrototypeOf(this, NotFoundException.prototype);
24
24
  }
25
25
  }
26
- export class ForbiddenException extends __BaseException {
27
- name = "ForbiddenException";
26
+ export class ValidationException extends __BaseException {
27
+ name = "ValidationException";
28
28
  $fault = "client";
29
29
  constructor(opts) {
30
30
  super({
31
- name: "ForbiddenException",
31
+ name: "ValidationException",
32
32
  $fault: "client",
33
33
  ...opts
34
34
  });
35
- Object.setPrototypeOf(this, ForbiddenException.prototype);
35
+ Object.setPrototypeOf(this, ValidationException.prototype);
36
36
  }
37
37
  }
38
38
  export const ChatFeedbackScore = {
@@ -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("/v2/wilma/chats/{id}");
10
- b.p('id', () => input.id, '{id}', false);
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("/v2/wilma/feedback/dislike");
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
- 'feedback': _ => _json(_),
36
- 'message': _ => se_Document(_, context),
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("/v2/wilma/chats/{id}");
48
- b.p('id', () => input.id, '{id}', false);
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("/v2/wilma/feedback/like");
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
- 'feedback': _ => _json(_),
74
- 'message': _ => se_Document(_, context),
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);
@@ -124,7 +155,7 @@ export const de_GetChatCommand = async (output, context) => {
124
155
  });
125
156
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
126
157
  const doc = take(data, {
127
- 'chat': _json,
158
+ 'chat': _ => de_Chat(_, context),
128
159
  'history': _ => de_ChatHistory(_, context),
129
160
  });
130
161
  Object.assign(contents, doc);
@@ -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);
@@ -149,7 +195,22 @@ export const de_ListChatsCommand = async (output, context) => {
149
195
  });
150
196
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
151
197
  const doc = take(data, {
152
- 'chats': _json,
198
+ 'chats': _ => de_ChatsList(_, context),
199
+ 'lastEvaluatedKey': __expectString,
200
+ });
201
+ Object.assign(contents, doc);
202
+ return contents;
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,
153
214
  'lastEvaluatedKey': __expectString,
154
215
  });
155
216
  Object.assign(contents, doc);
@@ -220,16 +281,26 @@ 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
  };
287
+ const de_Chat = (output, context) => {
288
+ return take(output, {
289
+ 'agentId': __expectString,
290
+ 'createdAt': __expectString,
291
+ 'id': __expectString,
292
+ 'mentions': (_) => de_Document(_, context),
293
+ 'options': (_) => de_Document(_, context),
294
+ 'target': __expectString,
295
+ 'title': __expectString,
296
+ 'updatedAt': __expectString,
297
+ });
298
+ };
229
299
  const de_ChatHistory = (output, context) => {
230
300
  return take(output, {
231
301
  'mentions': (_) => de_ChatMentionsList(_, context),
232
302
  'messages': (_) => de_ChatMessagesList(_, context),
303
+ 'version': __expectString,
233
304
  });
234
305
  };
235
306
  const de_ChatMentionsList = (output, context) => {
@@ -244,6 +315,12 @@ const de_ChatMessagesList = (output, context) => {
244
315
  });
245
316
  return retVal;
246
317
  };
318
+ const de_ChatsList = (output, context) => {
319
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
320
+ return de_Chat(entry, context);
321
+ });
322
+ return retVal;
323
+ };
247
324
  const deserializeMetadata = (output) => ({
248
325
  httpStatusCode: output.statusCode,
249
326
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -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
- * id: "STRING_VALUE", // required
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
- * message: "DOCUMENT_VALUE", // required
42
- * feedback: { // ChatFeedback
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,23 @@ declare const GetChatCommand_base: {
37
37
  * const input = { // GetChatInput
38
38
  * company: "STRING_VALUE",
39
39
  * user: "STRING_VALUE",
40
- * id: "STRING_VALUE", // required
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",
50
+ * // options: "DOCUMENT_VALUE",
51
+ * // mentions: "DOCUMENT_VALUE",
49
52
  * // createdAt: "STRING_VALUE", // required
50
53
  * // updatedAt: "STRING_VALUE",
51
54
  * // },
52
55
  * // history: { // ChatHistory
56
+ * // version: "STRING_VALUE", // required
53
57
  * // messages: [ // ChatMessagesList // required
54
58
  * // "DOCUMENT_VALUE",
55
59
  * // ],
@@ -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
- * message: "DOCUMENT_VALUE", // required
42
- * feedback: { // ChatFeedback
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,8 +45,11 @@ 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",
51
+ * // options: "DOCUMENT_VALUE",
52
+ * // mentions: "DOCUMENT_VALUE",
50
53
  * // createdAt: "STRING_VALUE", // required
51
54
  * // updatedAt: "STRING_VALUE",
52
55
  * // },
@@ -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";
@@ -4,43 +4,46 @@ import { DocumentType as __DocumentType } from "@smithy/types";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare class NotFoundException extends __BaseException {
8
- readonly name: "NotFoundException";
7
+ export declare class ForbiddenException extends __BaseException {
8
+ readonly name: "ForbiddenException";
9
9
  readonly $fault: "client";
10
10
  /**
11
11
  * @internal
12
12
  */
13
- constructor(opts: __ExceptionOptionType<NotFoundException, __BaseException>);
13
+ constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
14
14
  }
15
15
  /**
16
16
  * @public
17
17
  */
18
- export declare class ValidationException extends __BaseException {
19
- readonly name: "ValidationException";
18
+ export declare class NotFoundException extends __BaseException {
19
+ readonly name: "NotFoundException";
20
20
  readonly $fault: "client";
21
21
  /**
22
22
  * @internal
23
23
  */
24
- constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
24
+ constructor(opts: __ExceptionOptionType<NotFoundException, __BaseException>);
25
25
  }
26
26
  /**
27
27
  * @public
28
28
  */
29
- export declare class ForbiddenException extends __BaseException {
30
- readonly name: "ForbiddenException";
29
+ export declare class ValidationException extends __BaseException {
30
+ readonly name: "ValidationException";
31
31
  readonly $fault: "client";
32
32
  /**
33
33
  * @internal
34
34
  */
35
- constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
35
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
36
36
  }
37
37
  /**
38
38
  * @public
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;
45
+ options?: __DocumentType | undefined;
46
+ mentions?: __DocumentType | undefined;
44
47
  createdAt: string;
45
48
  updatedAt?: string | undefined;
46
49
  }
@@ -69,6 +72,7 @@ export interface ChatFeedback {
69
72
  * @public
70
73
  */
71
74
  export interface ChatHistory {
75
+ version: string;
72
76
  messages: (__DocumentType)[];
73
77
  mentions?: (__DocumentType)[] | undefined;
74
78
  }
@@ -86,7 +90,7 @@ export interface DeleteChatInput {
86
90
  * @public
87
91
  */
88
92
  user?: string | undefined;
89
- id: string;
93
+ chatId: string;
90
94
  }
91
95
  /**
92
96
  * @public
@@ -108,8 +112,8 @@ export interface DislikeAnswerInput {
108
112
  */
109
113
  user?: string | undefined;
110
114
  chatId: string;
111
- message: __DocumentType;
112
- feedback: ChatFeedback;
115
+ messageId: string;
116
+ text: string;
113
117
  }
114
118
  /**
115
119
  * @public
@@ -130,7 +134,7 @@ export interface GetChatInput {
130
134
  * @public
131
135
  */
132
136
  user?: string | undefined;
133
- id: string;
137
+ chatId: string;
134
138
  }
135
139
  /**
136
140
  * @public
@@ -154,8 +158,8 @@ export interface LikeAnswerInput {
154
158
  */
155
159
  user?: string | undefined;
156
160
  chatId: string;
157
- message: __DocumentType;
158
- feedback: ChatFeedback;
161
+ messageId: string;
162
+ text: string;
159
163
  }
160
164
  /**
161
165
  * @public
@@ -165,21 +169,36 @@ export interface LikeAnswerOutput {
165
169
  /**
166
170
  * @public
167
171
  */
168
- export interface ListChatsInput {
172
+ export interface ListAgentFeedbacksInput {
169
173
  /**
170
174
  * The unique identifier of the tenant when a service token is used.
171
175
  * @public
172
176
  */
173
177
  company?: string | undefined;
178
+ agentId: string;
179
+ exclusiveStartKey?: string | undefined;
180
+ }
181
+ /**
182
+ * @public
183
+ */
184
+ export interface ListAgentFeedbacksOutput {
185
+ feedbacks: (ChatFeedback)[];
186
+ lastEvaluatedKey?: string | undefined;
187
+ }
188
+ /**
189
+ * @public
190
+ */
191
+ export interface ListChatsInput {
174
192
  /**
175
- * The unique identifier of the user when a service or tenant token is used.
193
+ * The unique identifier of the tenant when a service token is used.
176
194
  * @public
177
195
  */
178
- user?: string | undefined;
196
+ company?: string | undefined;
179
197
  /**
180
- * ...
198
+ * The unique identifier of the user when a service or tenant token is used.
181
199
  * @public
182
200
  */
201
+ user?: string | undefined;
183
202
  exclusiveStartKey?: string | undefined;
184
203
  }
185
204
  /**
@@ -187,9 +206,23 @@ export interface ListChatsInput {
187
206
  */
188
207
  export interface ListChatsOutput {
189
208
  chats: (Chat)[];
209
+ lastEvaluatedKey?: string | undefined;
210
+ }
211
+ /**
212
+ * @public
213
+ */
214
+ export interface ListFeedbacksInput {
190
215
  /**
191
- * ...
216
+ * The unique identifier of the tenant when a service token is used.
192
217
  * @public
193
218
  */
219
+ company?: string | undefined;
220
+ exclusiveStartKey?: string | undefined;
221
+ }
222
+ /**
223
+ * @public
224
+ */
225
+ export interface ListFeedbacksOutput {
226
+ feedbacks: (ChatFeedback)[];
194
227
  lastEvaluatedKey?: string | undefined;
195
228
  }
@@ -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.2",
4
+ "version": "0.0.4",
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",