@wildix/wim-wilma-client 0.0.3 → 0.0.5

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.
Files changed (40) hide show
  1. package/dist-cjs/Wilma.js +14 -0
  2. package/dist-cjs/commands/CreateAgentCommand.js +21 -0
  3. package/dist-cjs/commands/DeleteAgentCommand.js +21 -0
  4. package/dist-cjs/commands/ExecuteAgentCommand.js +21 -0
  5. package/dist-cjs/commands/GetAgentCommand.js +21 -0
  6. package/dist-cjs/commands/ListAgentsCommand.js +21 -0
  7. package/dist-cjs/commands/ListAgentsNamesCommand.js +21 -0
  8. package/dist-cjs/commands/UpdateAgentCommand.js +21 -0
  9. package/dist-cjs/commands/index.js +7 -0
  10. package/dist-cjs/models/models_0.js +43 -14
  11. package/dist-cjs/protocols/Aws_restJson1.js +269 -6
  12. package/dist-es/Wilma.js +14 -0
  13. package/dist-es/commands/CreateAgentCommand.js +17 -0
  14. package/dist-es/commands/DeleteAgentCommand.js +17 -0
  15. package/dist-es/commands/ExecuteAgentCommand.js +17 -0
  16. package/dist-es/commands/GetAgentCommand.js +17 -0
  17. package/dist-es/commands/ListAgentsCommand.js +17 -0
  18. package/dist-es/commands/ListAgentsNamesCommand.js +17 -0
  19. package/dist-es/commands/UpdateAgentCommand.js +17 -0
  20. package/dist-es/commands/index.js +7 -0
  21. package/dist-es/models/models_0.js +41 -12
  22. package/dist-es/protocols/Aws_restJson1.js +254 -5
  23. package/dist-types/Wilma.d.ts +51 -0
  24. package/dist-types/WilmaClient.d.ts +9 -2
  25. package/dist-types/commands/CreateAgentCommand.d.ts +142 -0
  26. package/dist-types/commands/DeleteAgentCommand.d.ts +73 -0
  27. package/dist-types/commands/ExecuteAgentCommand.d.ts +84 -0
  28. package/dist-types/commands/GetAgentCommand.d.ts +113 -0
  29. package/dist-types/commands/GetChatCommand.d.ts +2 -0
  30. package/dist-types/commands/ListAgentsCommand.d.ts +112 -0
  31. package/dist-types/commands/ListAgentsNamesCommand.d.ts +80 -0
  32. package/dist-types/commands/ListChatsCommand.d.ts +2 -0
  33. package/dist-types/commands/UpdateAgentCommand.d.ts +145 -0
  34. package/dist-types/commands/index.d.ts +7 -0
  35. package/dist-types/models/models_0.d.ts +333 -5
  36. package/dist-types/protocols/Aws_restJson1.d.ts +63 -0
  37. package/dist-types/runtimeConfig.browser.d.ts +6 -1
  38. package/dist-types/runtimeConfig.d.ts +6 -1
  39. package/dist-types/runtimeConfig.native.d.ts +6 -1
  40. package/package.json +1 -1
package/dist-cjs/Wilma.js CHANGED
@@ -2,22 +2,36 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Wilma = void 0;
4
4
  const WilmaClient_1 = require("./WilmaClient");
5
+ const CreateAgentCommand_1 = require("./commands/CreateAgentCommand");
6
+ const DeleteAgentCommand_1 = require("./commands/DeleteAgentCommand");
5
7
  const DeleteChatCommand_1 = require("./commands/DeleteChatCommand");
6
8
  const DislikeAnswerCommand_1 = require("./commands/DislikeAnswerCommand");
9
+ const ExecuteAgentCommand_1 = require("./commands/ExecuteAgentCommand");
10
+ const GetAgentCommand_1 = require("./commands/GetAgentCommand");
7
11
  const GetChatCommand_1 = require("./commands/GetChatCommand");
8
12
  const LikeAnswerCommand_1 = require("./commands/LikeAnswerCommand");
9
13
  const ListAgentFeedbacksCommand_1 = require("./commands/ListAgentFeedbacksCommand");
14
+ const ListAgentsCommand_1 = require("./commands/ListAgentsCommand");
15
+ const ListAgentsNamesCommand_1 = require("./commands/ListAgentsNamesCommand");
10
16
  const ListChatsCommand_1 = require("./commands/ListChatsCommand");
11
17
  const ListFeedbacksCommand_1 = require("./commands/ListFeedbacksCommand");
18
+ const UpdateAgentCommand_1 = require("./commands/UpdateAgentCommand");
12
19
  const smithy_client_1 = require("@smithy/smithy-client");
13
20
  const commands = {
21
+ CreateAgentCommand: CreateAgentCommand_1.CreateAgentCommand,
22
+ DeleteAgentCommand: DeleteAgentCommand_1.DeleteAgentCommand,
14
23
  DeleteChatCommand: DeleteChatCommand_1.DeleteChatCommand,
15
24
  DislikeAnswerCommand: DislikeAnswerCommand_1.DislikeAnswerCommand,
25
+ ExecuteAgentCommand: ExecuteAgentCommand_1.ExecuteAgentCommand,
26
+ GetAgentCommand: GetAgentCommand_1.GetAgentCommand,
16
27
  GetChatCommand: GetChatCommand_1.GetChatCommand,
17
28
  LikeAnswerCommand: LikeAnswerCommand_1.LikeAnswerCommand,
18
29
  ListAgentFeedbacksCommand: ListAgentFeedbacksCommand_1.ListAgentFeedbacksCommand,
30
+ ListAgentsCommand: ListAgentsCommand_1.ListAgentsCommand,
31
+ ListAgentsNamesCommand: ListAgentsNamesCommand_1.ListAgentsNamesCommand,
19
32
  ListChatsCommand: ListChatsCommand_1.ListChatsCommand,
20
33
  ListFeedbacksCommand: ListFeedbacksCommand_1.ListFeedbacksCommand,
34
+ UpdateAgentCommand: UpdateAgentCommand_1.UpdateAgentCommand,
21
35
  };
22
36
  class Wilma extends WilmaClient_1.WilmaClient {
23
37
  }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateAgentCommand = 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 CreateAgentCommand 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", "CreateAgent", {})
15
+ .n("WilmaClient", "CreateAgentCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_CreateAgentCommand)
18
+ .de(Aws_restJson1_1.de_CreateAgentCommand)
19
+ .build() {
20
+ }
21
+ exports.CreateAgentCommand = CreateAgentCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteAgentCommand = 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 DeleteAgentCommand 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", "DeleteAgent", {})
15
+ .n("WilmaClient", "DeleteAgentCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_DeleteAgentCommand)
18
+ .de(Aws_restJson1_1.de_DeleteAgentCommand)
19
+ .build() {
20
+ }
21
+ exports.DeleteAgentCommand = DeleteAgentCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExecuteAgentCommand = 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 ExecuteAgentCommand 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", "ExecuteAgent", {})
15
+ .n("WilmaClient", "ExecuteAgentCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ExecuteAgentCommand)
18
+ .de(Aws_restJson1_1.de_ExecuteAgentCommand)
19
+ .build() {
20
+ }
21
+ exports.ExecuteAgentCommand = ExecuteAgentCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetAgentCommand = 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 GetAgentCommand 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", "GetAgent", {})
15
+ .n("WilmaClient", "GetAgentCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetAgentCommand)
18
+ .de(Aws_restJson1_1.de_GetAgentCommand)
19
+ .build() {
20
+ }
21
+ exports.GetAgentCommand = GetAgentCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListAgentsCommand = 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 ListAgentsCommand 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", "ListAgents", {})
15
+ .n("WilmaClient", "ListAgentsCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ListAgentsCommand)
18
+ .de(Aws_restJson1_1.de_ListAgentsCommand)
19
+ .build() {
20
+ }
21
+ exports.ListAgentsCommand = ListAgentsCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListAgentsNamesCommand = 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 ListAgentsNamesCommand 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", "ListAgentsNames", {})
15
+ .n("WilmaClient", "ListAgentsNamesCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ListAgentsNamesCommand)
18
+ .de(Aws_restJson1_1.de_ListAgentsNamesCommand)
19
+ .build() {
20
+ }
21
+ exports.ListAgentsNamesCommand = ListAgentsNamesCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateAgentCommand = 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 UpdateAgentCommand 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", "UpdateAgent", {})
15
+ .n("WilmaClient", "UpdateAgentCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_UpdateAgentCommand)
18
+ .de(Aws_restJson1_1.de_UpdateAgentCommand)
19
+ .build() {
20
+ }
21
+ exports.UpdateAgentCommand = UpdateAgentCommand;
@@ -1,10 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./CreateAgentCommand"), exports);
5
+ tslib_1.__exportStar(require("./DeleteAgentCommand"), exports);
4
6
  tslib_1.__exportStar(require("./DeleteChatCommand"), exports);
5
7
  tslib_1.__exportStar(require("./DislikeAnswerCommand"), exports);
8
+ tslib_1.__exportStar(require("./ExecuteAgentCommand"), exports);
9
+ tslib_1.__exportStar(require("./GetAgentCommand"), exports);
6
10
  tslib_1.__exportStar(require("./GetChatCommand"), exports);
7
11
  tslib_1.__exportStar(require("./LikeAnswerCommand"), exports);
8
12
  tslib_1.__exportStar(require("./ListAgentFeedbacksCommand"), exports);
13
+ tslib_1.__exportStar(require("./ListAgentsCommand"), exports);
14
+ tslib_1.__exportStar(require("./ListAgentsNamesCommand"), exports);
9
15
  tslib_1.__exportStar(require("./ListChatsCommand"), exports);
10
16
  tslib_1.__exportStar(require("./ListFeedbacksCommand"), exports);
17
+ tslib_1.__exportStar(require("./UpdateAgentCommand"), 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.AgentVariableType = exports.AgentCapability = exports.AgentToolVariableHandler = 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,35 @@ 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
+ var AgentToolVariableHandler;
45
+ (function (AgentToolVariableHandler) {
46
+ AgentToolVariableHandler.visit = (value, visitor) => {
47
+ if (value.auto !== undefined)
48
+ return visitor.auto(value.auto);
49
+ if (value.guided !== undefined)
50
+ return visitor.guided(value.guided);
51
+ if (value.predefined !== undefined)
52
+ return visitor.predefined(value.predefined);
53
+ return visitor._(value.$unknown[0], value.$unknown[1]);
54
+ };
55
+ })(AgentToolVariableHandler || (exports.AgentToolVariableHandler = AgentToolVariableHandler = {}));
56
+ var AgentCapability;
57
+ (function (AgentCapability) {
58
+ AgentCapability.visit = (value, visitor) => {
59
+ if (value.tool !== undefined)
60
+ return visitor.tool(value.tool);
61
+ if (value.kb !== undefined)
62
+ return visitor.kb(value.kb);
63
+ return visitor._(value.$unknown[0], value.$unknown[1]);
64
+ };
65
+ })(AgentCapability || (exports.AgentCapability = AgentCapability = {}));
66
+ exports.AgentVariableType = {
67
+ BOOLEAN: "boolean",
68
+ NUMBER: "number",
69
+ NUMBER_ARRAY: "number_array",
70
+ STRING: "string",
71
+ STRING_ARRAY: "string_array",
72
+ };
44
73
  exports.ChatFeedbackScore = {
45
74
  DISLIKE: "DISLIKE",
46
75
  LIKE: "LIKE",
@@ -1,11 +1,51 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
3
+ exports.de_UpdateAgentCommand = exports.de_ListFeedbacksCommand = exports.de_ListChatsCommand = exports.de_ListAgentsNamesCommand = exports.de_ListAgentsCommand = exports.de_ListAgentFeedbacksCommand = exports.de_LikeAnswerCommand = exports.de_GetChatCommand = exports.de_GetAgentCommand = exports.de_ExecuteAgentCommand = exports.de_DislikeAnswerCommand = exports.de_DeleteChatCommand = exports.de_DeleteAgentCommand = exports.de_CreateAgentCommand = exports.se_UpdateAgentCommand = exports.se_ListFeedbacksCommand = exports.se_ListChatsCommand = exports.se_ListAgentsNamesCommand = exports.se_ListAgentsCommand = exports.se_ListAgentFeedbacksCommand = exports.se_LikeAnswerCommand = exports.se_GetChatCommand = exports.se_GetAgentCommand = exports.se_ExecuteAgentCommand = exports.se_DislikeAnswerCommand = exports.se_DeleteChatCommand = exports.se_DeleteAgentCommand = exports.se_CreateAgentCommand = 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");
7
7
  const core_2 = require("@smithy/core");
8
8
  const smithy_client_1 = require("@smithy/smithy-client");
9
+ const se_CreateAgentCommand = async (input, context) => {
10
+ const b = (0, core_2.requestBuilder)(input, context);
11
+ const headers = {
12
+ 'content-type': 'application/json',
13
+ };
14
+ b.bp("/v1/wilma/agents/agents");
15
+ const query = (0, smithy_client_1.map)({
16
+ [_c]: [, input[_c]],
17
+ });
18
+ let body;
19
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
20
+ 'capabilities': _ => (0, smithy_client_1._json)(_),
21
+ 'instructions': [],
22
+ 'model': [],
23
+ 'name': [],
24
+ 'variables': _ => (0, smithy_client_1._json)(_),
25
+ }));
26
+ b.m("POST")
27
+ .h(headers)
28
+ .q(query)
29
+ .b(body);
30
+ return b.build();
31
+ };
32
+ exports.se_CreateAgentCommand = se_CreateAgentCommand;
33
+ const se_DeleteAgentCommand = async (input, context) => {
34
+ const b = (0, core_2.requestBuilder)(input, context);
35
+ const headers = {};
36
+ b.bp("/v1/wilma/agents/{agentId}");
37
+ b.p('agentId', () => input.agentId, '{agentId}', false);
38
+ const query = (0, smithy_client_1.map)({
39
+ [_c]: [, input[_c]],
40
+ });
41
+ let body;
42
+ b.m("DELETE")
43
+ .h(headers)
44
+ .q(query)
45
+ .b(body);
46
+ return b.build();
47
+ };
48
+ exports.se_DeleteAgentCommand = se_DeleteAgentCommand;
9
49
  const se_DeleteChatCommand = async (input, context) => {
10
50
  const b = (0, core_2.requestBuilder)(input, context);
11
51
  const headers = {};
@@ -46,6 +86,46 @@ const se_DislikeAnswerCommand = async (input, context) => {
46
86
  return b.build();
47
87
  };
48
88
  exports.se_DislikeAnswerCommand = se_DislikeAnswerCommand;
89
+ const se_ExecuteAgentCommand = async (input, context) => {
90
+ const b = (0, core_2.requestBuilder)(input, context);
91
+ const headers = {
92
+ 'content-type': 'application/json',
93
+ };
94
+ b.bp("/v1/wilma/agents/agents/{agentId}/execute");
95
+ b.p('agentId', () => input.agentId, '{agentId}', false);
96
+ const query = (0, smithy_client_1.map)({
97
+ [_c]: [, input[_c]],
98
+ });
99
+ let body;
100
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
101
+ 'data': [],
102
+ 'service': [],
103
+ 'user': [],
104
+ 'variables': _ => se_Document(_, context),
105
+ }));
106
+ b.m("POST")
107
+ .h(headers)
108
+ .q(query)
109
+ .b(body);
110
+ return b.build();
111
+ };
112
+ exports.se_ExecuteAgentCommand = se_ExecuteAgentCommand;
113
+ const se_GetAgentCommand = async (input, context) => {
114
+ const b = (0, core_2.requestBuilder)(input, context);
115
+ const headers = {};
116
+ b.bp("/v1/wilma/agents/agents/{agentId}");
117
+ b.p('agentId', () => input.agentId, '{agentId}', false);
118
+ const query = (0, smithy_client_1.map)({
119
+ [_c]: [, input[_c]],
120
+ });
121
+ let body;
122
+ b.m("GET")
123
+ .h(headers)
124
+ .q(query)
125
+ .b(body);
126
+ return b.build();
127
+ };
128
+ exports.se_GetAgentCommand = se_GetAgentCommand;
49
129
  const se_GetChatCommand = async (input, context) => {
50
130
  const b = (0, core_2.requestBuilder)(input, context);
51
131
  const headers = {};
@@ -103,6 +183,36 @@ const se_ListAgentFeedbacksCommand = async (input, context) => {
103
183
  return b.build();
104
184
  };
105
185
  exports.se_ListAgentFeedbacksCommand = se_ListAgentFeedbacksCommand;
186
+ const se_ListAgentsCommand = async (input, context) => {
187
+ const b = (0, core_2.requestBuilder)(input, context);
188
+ const headers = {};
189
+ b.bp("/v1/wilma/agents");
190
+ const query = (0, smithy_client_1.map)({
191
+ [_c]: [, input[_c]],
192
+ });
193
+ let body;
194
+ b.m("GET")
195
+ .h(headers)
196
+ .q(query)
197
+ .b(body);
198
+ return b.build();
199
+ };
200
+ exports.se_ListAgentsCommand = se_ListAgentsCommand;
201
+ const se_ListAgentsNamesCommand = async (input, context) => {
202
+ const b = (0, core_2.requestBuilder)(input, context);
203
+ const headers = {};
204
+ b.bp("/v1/wilma/agents-names");
205
+ const query = (0, smithy_client_1.map)({
206
+ [_c]: [, input[_c]],
207
+ });
208
+ let body;
209
+ b.m("GET")
210
+ .h(headers)
211
+ .q(query)
212
+ .b(body);
213
+ return b.build();
214
+ };
215
+ exports.se_ListAgentsNamesCommand = se_ListAgentsNamesCommand;
106
216
  const se_ListChatsCommand = async (input, context) => {
107
217
  const b = (0, core_2.requestBuilder)(input, context);
108
218
  const headers = {};
@@ -136,6 +246,57 @@ const se_ListFeedbacksCommand = async (input, context) => {
136
246
  return b.build();
137
247
  };
138
248
  exports.se_ListFeedbacksCommand = se_ListFeedbacksCommand;
249
+ const se_UpdateAgentCommand = async (input, context) => {
250
+ const b = (0, core_2.requestBuilder)(input, context);
251
+ const headers = {
252
+ 'content-type': 'application/json',
253
+ };
254
+ b.bp("/v1/wilma/agents/{agentId}");
255
+ b.p('agentId', () => input.agentId, '{agentId}', false);
256
+ const query = (0, smithy_client_1.map)({
257
+ [_c]: [, input[_c]],
258
+ });
259
+ let body;
260
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
261
+ 'capabilities': _ => (0, smithy_client_1._json)(_),
262
+ 'instructions': [],
263
+ 'model': [],
264
+ 'name': [],
265
+ 'variables': _ => (0, smithy_client_1._json)(_),
266
+ }));
267
+ b.m("PUT")
268
+ .h(headers)
269
+ .q(query)
270
+ .b(body);
271
+ return b.build();
272
+ };
273
+ exports.se_UpdateAgentCommand = se_UpdateAgentCommand;
274
+ const de_CreateAgentCommand = async (output, context) => {
275
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
276
+ return de_CommandError(output, context);
277
+ }
278
+ const contents = (0, smithy_client_1.map)({
279
+ $metadata: deserializeMetadata(output),
280
+ });
281
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
282
+ const doc = (0, smithy_client_1.take)(data, {
283
+ 'agent': smithy_client_1._json,
284
+ });
285
+ Object.assign(contents, doc);
286
+ return contents;
287
+ };
288
+ exports.de_CreateAgentCommand = de_CreateAgentCommand;
289
+ const de_DeleteAgentCommand = async (output, context) => {
290
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
291
+ return de_CommandError(output, context);
292
+ }
293
+ const contents = (0, smithy_client_1.map)({
294
+ $metadata: deserializeMetadata(output),
295
+ });
296
+ await (0, smithy_client_1.collectBody)(output.body, context);
297
+ return contents;
298
+ };
299
+ exports.de_DeleteAgentCommand = de_DeleteAgentCommand;
139
300
  const de_DeleteChatCommand = async (output, context) => {
140
301
  if (output.statusCode !== 200 && output.statusCode >= 300) {
141
302
  return de_CommandError(output, context);
@@ -158,6 +319,36 @@ const de_DislikeAnswerCommand = async (output, context) => {
158
319
  return contents;
159
320
  };
160
321
  exports.de_DislikeAnswerCommand = de_DislikeAnswerCommand;
322
+ const de_ExecuteAgentCommand = async (output, context) => {
323
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
324
+ return de_CommandError(output, context);
325
+ }
326
+ const contents = (0, smithy_client_1.map)({
327
+ $metadata: deserializeMetadata(output),
328
+ });
329
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
330
+ const doc = (0, smithy_client_1.take)(data, {
331
+ 'result': _ => de_AgentExecutionResult(_, context),
332
+ });
333
+ Object.assign(contents, doc);
334
+ return contents;
335
+ };
336
+ exports.de_ExecuteAgentCommand = de_ExecuteAgentCommand;
337
+ const de_GetAgentCommand = async (output, context) => {
338
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
339
+ return de_CommandError(output, context);
340
+ }
341
+ const contents = (0, smithy_client_1.map)({
342
+ $metadata: deserializeMetadata(output),
343
+ });
344
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
345
+ const doc = (0, smithy_client_1.take)(data, {
346
+ 'agent': smithy_client_1._json,
347
+ });
348
+ Object.assign(contents, doc);
349
+ return contents;
350
+ };
351
+ exports.de_GetAgentCommand = de_GetAgentCommand;
161
352
  const de_GetChatCommand = async (output, context) => {
162
353
  if (output.statusCode !== 200 && output.statusCode >= 300) {
163
354
  return de_CommandError(output, context);
@@ -167,7 +358,7 @@ const de_GetChatCommand = async (output, context) => {
167
358
  });
168
359
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
169
360
  const doc = (0, smithy_client_1.take)(data, {
170
- 'chat': smithy_client_1._json,
361
+ 'chat': _ => de_Chat(_, context),
171
362
  'history': _ => de_ChatHistory(_, context),
172
363
  });
173
364
  Object.assign(contents, doc);
@@ -201,6 +392,36 @@ const de_ListAgentFeedbacksCommand = async (output, context) => {
201
392
  return contents;
202
393
  };
203
394
  exports.de_ListAgentFeedbacksCommand = de_ListAgentFeedbacksCommand;
395
+ const de_ListAgentsCommand = async (output, context) => {
396
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
397
+ return de_CommandError(output, context);
398
+ }
399
+ const contents = (0, smithy_client_1.map)({
400
+ $metadata: deserializeMetadata(output),
401
+ });
402
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
403
+ const doc = (0, smithy_client_1.take)(data, {
404
+ 'agents': smithy_client_1._json,
405
+ });
406
+ Object.assign(contents, doc);
407
+ return contents;
408
+ };
409
+ exports.de_ListAgentsCommand = de_ListAgentsCommand;
410
+ const de_ListAgentsNamesCommand = async (output, context) => {
411
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
412
+ return de_CommandError(output, context);
413
+ }
414
+ const contents = (0, smithy_client_1.map)({
415
+ $metadata: deserializeMetadata(output),
416
+ });
417
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
418
+ const doc = (0, smithy_client_1.take)(data, {
419
+ 'agents': smithy_client_1._json,
420
+ });
421
+ Object.assign(contents, doc);
422
+ return contents;
423
+ };
424
+ exports.de_ListAgentsNamesCommand = de_ListAgentsNamesCommand;
204
425
  const de_ListChatsCommand = async (output, context) => {
205
426
  if (output.statusCode !== 200 && output.statusCode >= 300) {
206
427
  return de_CommandError(output, context);
@@ -210,7 +431,7 @@ const de_ListChatsCommand = async (output, context) => {
210
431
  });
211
432
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
212
433
  const doc = (0, smithy_client_1.take)(data, {
213
- 'chats': smithy_client_1._json,
434
+ 'chats': _ => de_ChatsList(_, context),
214
435
  'lastEvaluatedKey': smithy_client_1.expectString,
215
436
  });
216
437
  Object.assign(contents, doc);
@@ -233,6 +454,21 @@ const de_ListFeedbacksCommand = async (output, context) => {
233
454
  return contents;
234
455
  };
235
456
  exports.de_ListFeedbacksCommand = de_ListFeedbacksCommand;
457
+ const de_UpdateAgentCommand = async (output, context) => {
458
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
459
+ return de_CommandError(output, context);
460
+ }
461
+ const contents = (0, smithy_client_1.map)({
462
+ $metadata: deserializeMetadata(output),
463
+ });
464
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
465
+ const doc = (0, smithy_client_1.take)(data, {
466
+ 'agent': smithy_client_1._json,
467
+ });
468
+ Object.assign(contents, doc);
469
+ return contents;
470
+ };
471
+ exports.de_UpdateAgentCommand = de_UpdateAgentCommand;
236
472
  const de_CommandError = async (output, context) => {
237
473
  const parsedOutput = {
238
474
  ...output,
@@ -240,12 +476,12 @@ const de_CommandError = async (output, context) => {
240
476
  };
241
477
  const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
242
478
  switch (errorCode) {
243
- case "ForbiddenException":
244
- case "smithy.framework#ForbiddenException":
245
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
246
479
  case "ValidationException":
247
480
  case "smithy.framework#ValidationException":
248
481
  throw await de_ValidationExceptionRes(parsedOutput, context);
482
+ case "ForbiddenException":
483
+ case "smithy.framework#ForbiddenException":
484
+ throw await de_ForbiddenExceptionRes(parsedOutput, context);
249
485
  case "NotFoundException":
250
486
  case "smithy.framework#NotFoundException":
251
487
  throw await de_NotFoundExceptionRes(parsedOutput, context);
@@ -298,9 +534,30 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
298
534
  });
299
535
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
300
536
  };
537
+ const se_Document = (input, context) => {
538
+ return input;
539
+ };
301
540
  const de_Document = (output, context) => {
302
541
  return output;
303
542
  };
543
+ const de_AgentExecutionResult = (output, context) => {
544
+ return (0, smithy_client_1.take)(output, {
545
+ 'error': smithy_client_1._json,
546
+ 'output': (_) => de_Document(_, context),
547
+ });
548
+ };
549
+ const de_Chat = (output, context) => {
550
+ return (0, smithy_client_1.take)(output, {
551
+ 'agentId': smithy_client_1.expectString,
552
+ 'createdAt': smithy_client_1.expectString,
553
+ 'id': smithy_client_1.expectString,
554
+ 'mentions': (_) => de_Document(_, context),
555
+ 'options': (_) => de_Document(_, context),
556
+ 'target': smithy_client_1.expectString,
557
+ 'title': smithy_client_1.expectString,
558
+ 'updatedAt': smithy_client_1.expectString,
559
+ });
560
+ };
304
561
  const de_ChatHistory = (output, context) => {
305
562
  return (0, smithy_client_1.take)(output, {
306
563
  'mentions': (_) => de_ChatMentionsList(_, context),
@@ -320,6 +577,12 @@ const de_ChatMessagesList = (output, context) => {
320
577
  });
321
578
  return retVal;
322
579
  };
580
+ const de_ChatsList = (output, context) => {
581
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
582
+ return de_Chat(entry, context);
583
+ });
584
+ return retVal;
585
+ };
323
586
  const deserializeMetadata = (output) => ({
324
587
  httpStatusCode: output.statusCode,
325
588
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],