@wildix/wim-tools-client 0.0.32 → 0.0.34

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 (39) hide show
  1. package/dist-cjs/Tools.js +12 -0
  2. package/dist-cjs/commands/CreateMcpConnectionCommand.js +21 -0
  3. package/dist-cjs/commands/DeleteMcpConnectionCommand.js +21 -0
  4. package/dist-cjs/commands/GetMcpConnectionCommand.js +21 -0
  5. package/dist-cjs/commands/ListMcpConnectionsCommand.js +21 -0
  6. package/dist-cjs/commands/ListMcpToolsCommand.js +21 -0
  7. package/dist-cjs/commands/UpdateMcpConnectionCommand.js +21 -0
  8. package/dist-cjs/commands/index.js +6 -0
  9. package/dist-cjs/models/models_0.js +58 -31
  10. package/dist-cjs/protocols/Aws_restJson1.js +226 -1
  11. package/dist-es/Tools.js +12 -0
  12. package/dist-es/commands/CreateMcpConnectionCommand.js +17 -0
  13. package/dist-es/commands/DeleteMcpConnectionCommand.js +17 -0
  14. package/dist-es/commands/GetMcpConnectionCommand.js +17 -0
  15. package/dist-es/commands/ListMcpConnectionsCommand.js +17 -0
  16. package/dist-es/commands/ListMcpToolsCommand.js +17 -0
  17. package/dist-es/commands/UpdateMcpConnectionCommand.js +17 -0
  18. package/dist-es/commands/index.js +6 -0
  19. package/dist-es/models/models_0.js +54 -28
  20. package/dist-es/protocols/Aws_restJson1.js +214 -1
  21. package/dist-types/Tools.d.ts +43 -0
  22. package/dist-types/ToolsClient.d.ts +8 -2
  23. package/dist-types/commands/CreateMcpConnectionCommand.d.ts +97 -0
  24. package/dist-types/commands/CreateToolCommand.d.ts +28 -0
  25. package/dist-types/commands/DeleteMcpConnectionCommand.d.ts +83 -0
  26. package/dist-types/commands/DeleteToolCommand.d.ts +2 -0
  27. package/dist-types/commands/DescribeToolsCommand.d.ts +11 -0
  28. package/dist-types/commands/ExecuteToolCommand.d.ts +2 -0
  29. package/dist-types/commands/GetMcpConnectionCommand.d.ts +94 -0
  30. package/dist-types/commands/GetToolCommand.d.ts +15 -0
  31. package/dist-types/commands/ListMcpConnectionsCommand.d.ts +95 -0
  32. package/dist-types/commands/ListMcpToolsCommand.d.ts +91 -0
  33. package/dist-types/commands/ListToolsCommand.d.ts +15 -0
  34. package/dist-types/commands/UpdateMcpConnectionCommand.d.ts +98 -0
  35. package/dist-types/commands/UpdateToolCommand.d.ts +28 -0
  36. package/dist-types/commands/index.d.ts +6 -0
  37. package/dist-types/models/models_0.d.ts +392 -20
  38. package/dist-types/protocols/Aws_restJson1.d.ts +54 -0
  39. package/package.json +1 -1
package/dist-cjs/Tools.js CHANGED
@@ -2,21 +2,33 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Tools = void 0;
4
4
  const ToolsClient_1 = require("./ToolsClient");
5
+ const CreateMcpConnectionCommand_1 = require("./commands/CreateMcpConnectionCommand");
5
6
  const CreateToolCommand_1 = require("./commands/CreateToolCommand");
7
+ const DeleteMcpConnectionCommand_1 = require("./commands/DeleteMcpConnectionCommand");
6
8
  const DeleteToolCommand_1 = require("./commands/DeleteToolCommand");
7
9
  const DescribeToolsCommand_1 = require("./commands/DescribeToolsCommand");
8
10
  const ExecuteToolCommand_1 = require("./commands/ExecuteToolCommand");
11
+ const GetMcpConnectionCommand_1 = require("./commands/GetMcpConnectionCommand");
9
12
  const GetToolCommand_1 = require("./commands/GetToolCommand");
13
+ const ListMcpConnectionsCommand_1 = require("./commands/ListMcpConnectionsCommand");
14
+ const ListMcpToolsCommand_1 = require("./commands/ListMcpToolsCommand");
10
15
  const ListToolsCommand_1 = require("./commands/ListToolsCommand");
16
+ const UpdateMcpConnectionCommand_1 = require("./commands/UpdateMcpConnectionCommand");
11
17
  const UpdateToolCommand_1 = require("./commands/UpdateToolCommand");
12
18
  const smithy_client_1 = require("@smithy/smithy-client");
13
19
  const commands = {
20
+ CreateMcpConnectionCommand: CreateMcpConnectionCommand_1.CreateMcpConnectionCommand,
14
21
  CreateToolCommand: CreateToolCommand_1.CreateToolCommand,
22
+ DeleteMcpConnectionCommand: DeleteMcpConnectionCommand_1.DeleteMcpConnectionCommand,
15
23
  DeleteToolCommand: DeleteToolCommand_1.DeleteToolCommand,
16
24
  DescribeToolsCommand: DescribeToolsCommand_1.DescribeToolsCommand,
17
25
  ExecuteToolCommand: ExecuteToolCommand_1.ExecuteToolCommand,
26
+ GetMcpConnectionCommand: GetMcpConnectionCommand_1.GetMcpConnectionCommand,
18
27
  GetToolCommand: GetToolCommand_1.GetToolCommand,
28
+ ListMcpConnectionsCommand: ListMcpConnectionsCommand_1.ListMcpConnectionsCommand,
29
+ ListMcpToolsCommand: ListMcpToolsCommand_1.ListMcpToolsCommand,
19
30
  ListToolsCommand: ListToolsCommand_1.ListToolsCommand,
31
+ UpdateMcpConnectionCommand: UpdateMcpConnectionCommand_1.UpdateMcpConnectionCommand,
20
32
  UpdateToolCommand: UpdateToolCommand_1.UpdateToolCommand,
21
33
  };
22
34
  class Tools extends ToolsClient_1.ToolsClient {
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateMcpConnectionCommand = 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 CreateMcpConnectionCommand 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("Tools", "CreateMcpConnection", {})
15
+ .n("ToolsClient", "CreateMcpConnectionCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_CreateMcpConnectionCommand)
18
+ .de(Aws_restJson1_1.de_CreateMcpConnectionCommand)
19
+ .build() {
20
+ }
21
+ exports.CreateMcpConnectionCommand = CreateMcpConnectionCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteMcpConnectionCommand = 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 DeleteMcpConnectionCommand 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("Tools", "DeleteMcpConnection", {})
15
+ .n("ToolsClient", "DeleteMcpConnectionCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_DeleteMcpConnectionCommand)
18
+ .de(Aws_restJson1_1.de_DeleteMcpConnectionCommand)
19
+ .build() {
20
+ }
21
+ exports.DeleteMcpConnectionCommand = DeleteMcpConnectionCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetMcpConnectionCommand = 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 GetMcpConnectionCommand 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("Tools", "GetMcpConnection", {})
15
+ .n("ToolsClient", "GetMcpConnectionCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_GetMcpConnectionCommand)
18
+ .de(Aws_restJson1_1.de_GetMcpConnectionCommand)
19
+ .build() {
20
+ }
21
+ exports.GetMcpConnectionCommand = GetMcpConnectionCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListMcpConnectionsCommand = 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 ListMcpConnectionsCommand 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("Tools", "ListMcpConnections", {})
15
+ .n("ToolsClient", "ListMcpConnectionsCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ListMcpConnectionsCommand)
18
+ .de(Aws_restJson1_1.de_ListMcpConnectionsCommand)
19
+ .build() {
20
+ }
21
+ exports.ListMcpConnectionsCommand = ListMcpConnectionsCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListMcpToolsCommand = 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 ListMcpToolsCommand 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("Tools", "ListMcpTools", {})
15
+ .n("ToolsClient", "ListMcpToolsCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_ListMcpToolsCommand)
18
+ .de(Aws_restJson1_1.de_ListMcpToolsCommand)
19
+ .build() {
20
+ }
21
+ exports.ListMcpToolsCommand = ListMcpToolsCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateMcpConnectionCommand = 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 UpdateMcpConnectionCommand 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("Tools", "UpdateMcpConnection", {})
15
+ .n("ToolsClient", "UpdateMcpConnectionCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_UpdateMcpConnectionCommand)
18
+ .de(Aws_restJson1_1.de_UpdateMcpConnectionCommand)
19
+ .build() {
20
+ }
21
+ exports.UpdateMcpConnectionCommand = UpdateMcpConnectionCommand;
@@ -1,10 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./CreateMcpConnectionCommand"), exports);
4
5
  tslib_1.__exportStar(require("./CreateToolCommand"), exports);
6
+ tslib_1.__exportStar(require("./DeleteMcpConnectionCommand"), exports);
5
7
  tslib_1.__exportStar(require("./DeleteToolCommand"), exports);
6
8
  tslib_1.__exportStar(require("./DescribeToolsCommand"), exports);
7
9
  tslib_1.__exportStar(require("./ExecuteToolCommand"), exports);
10
+ tslib_1.__exportStar(require("./GetMcpConnectionCommand"), exports);
8
11
  tslib_1.__exportStar(require("./GetToolCommand"), exports);
12
+ tslib_1.__exportStar(require("./ListMcpConnectionsCommand"), exports);
13
+ tslib_1.__exportStar(require("./ListMcpToolsCommand"), exports);
9
14
  tslib_1.__exportStar(require("./ListToolsCommand"), exports);
15
+ tslib_1.__exportStar(require("./UpdateMcpConnectionCommand"), exports);
10
16
  tslib_1.__exportStar(require("./UpdateToolCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
3
+ exports.ToolVariableType = exports.ToolVariableHandler = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ToolExecutionServerException = exports.ToolExecutionException = exports.McpConnectionException = exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
4
4
  const ToolsServiceException_1 = require("./ToolsServiceException");
5
5
  class AlreadyExistException extends ToolsServiceException_1.ToolsServiceException {
6
6
  name = "AlreadyExistException";
@@ -54,6 +54,49 @@ class ValidationException extends ToolsServiceException_1.ToolsServiceException
54
54
  }
55
55
  }
56
56
  exports.ValidationException = ValidationException;
57
+ class McpConnectionException extends ToolsServiceException_1.ToolsServiceException {
58
+ name = "McpConnectionException";
59
+ $fault = "server";
60
+ constructor(opts) {
61
+ super({
62
+ name: "McpConnectionException",
63
+ $fault: "server",
64
+ ...opts
65
+ });
66
+ Object.setPrototypeOf(this, McpConnectionException.prototype);
67
+ }
68
+ }
69
+ exports.McpConnectionException = McpConnectionException;
70
+ class ToolExecutionException extends ToolsServiceException_1.ToolsServiceException {
71
+ name = "ToolExecutionException";
72
+ $fault = "client";
73
+ details;
74
+ constructor(opts) {
75
+ super({
76
+ name: "ToolExecutionException",
77
+ $fault: "client",
78
+ ...opts
79
+ });
80
+ Object.setPrototypeOf(this, ToolExecutionException.prototype);
81
+ this.details = opts.details;
82
+ }
83
+ }
84
+ exports.ToolExecutionException = ToolExecutionException;
85
+ class ToolExecutionServerException extends ToolsServiceException_1.ToolsServiceException {
86
+ name = "ToolExecutionServerException";
87
+ $fault = "server";
88
+ details;
89
+ constructor(opts) {
90
+ super({
91
+ name: "ToolExecutionServerException",
92
+ $fault: "server",
93
+ ...opts
94
+ });
95
+ Object.setPrototypeOf(this, ToolExecutionServerException.prototype);
96
+ this.details = opts.details;
97
+ }
98
+ }
99
+ exports.ToolExecutionServerException = ToolExecutionServerException;
57
100
  var ToolChatRecipient;
58
101
  (function (ToolChatRecipient) {
59
102
  ToolChatRecipient.visit = (value, visitor) => {
@@ -106,9 +149,23 @@ var ToolHandler;
106
149
  return visitor.chat(value.chat);
107
150
  if (value.sms !== undefined)
108
151
  return visitor.sms(value.sms);
152
+ if (value.mcp !== undefined)
153
+ return visitor.mcp(value.mcp);
109
154
  return visitor._(value.$unknown[0], value.$unknown[1]);
110
155
  };
111
156
  })(ToolHandler || (exports.ToolHandler = ToolHandler = {}));
157
+ var ToolVariableHandler;
158
+ (function (ToolVariableHandler) {
159
+ ToolVariableHandler.visit = (value, visitor) => {
160
+ if (value.auto !== undefined)
161
+ return visitor.auto(value.auto);
162
+ if (value.guided !== undefined)
163
+ return visitor.guided(value.guided);
164
+ if (value.predefined !== undefined)
165
+ return visitor.predefined(value.predefined);
166
+ return visitor._(value.$unknown[0], value.$unknown[1]);
167
+ };
168
+ })(ToolVariableHandler || (exports.ToolVariableHandler = ToolVariableHandler = {}));
112
169
  exports.ToolVariableType = {
113
170
  BOOLEAN: "boolean",
114
171
  NUMBER: "number",
@@ -116,33 +173,3 @@ exports.ToolVariableType = {
116
173
  STRING: "string",
117
174
  STRING_ARRAY: "string_array",
118
175
  };
119
- class ToolExecutionException extends ToolsServiceException_1.ToolsServiceException {
120
- name = "ToolExecutionException";
121
- $fault = "client";
122
- details;
123
- constructor(opts) {
124
- super({
125
- name: "ToolExecutionException",
126
- $fault: "client",
127
- ...opts
128
- });
129
- Object.setPrototypeOf(this, ToolExecutionException.prototype);
130
- this.details = opts.details;
131
- }
132
- }
133
- exports.ToolExecutionException = ToolExecutionException;
134
- class ToolExecutionServerException extends ToolsServiceException_1.ToolsServiceException {
135
- name = "ToolExecutionServerException";
136
- $fault = "server";
137
- details;
138
- constructor(opts) {
139
- super({
140
- name: "ToolExecutionServerException",
141
- $fault: "server",
142
- ...opts
143
- });
144
- Object.setPrototypeOf(this, ToolExecutionServerException.prototype);
145
- this.details = opts.details;
146
- }
147
- }
148
- exports.ToolExecutionServerException = ToolExecutionServerException;
@@ -1,11 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UpdateToolCommand = exports.de_ListToolsCommand = exports.de_GetToolCommand = exports.de_ExecuteToolCommand = exports.de_DescribeToolsCommand = exports.de_DeleteToolCommand = exports.de_CreateToolCommand = exports.se_UpdateToolCommand = exports.se_ListToolsCommand = exports.se_GetToolCommand = exports.se_ExecuteToolCommand = exports.se_DescribeToolsCommand = exports.se_DeleteToolCommand = exports.se_CreateToolCommand = void 0;
3
+ exports.de_UpdateToolCommand = exports.de_UpdateMcpConnectionCommand = exports.de_ListToolsCommand = exports.de_ListMcpToolsCommand = exports.de_ListMcpConnectionsCommand = exports.de_GetToolCommand = exports.de_GetMcpConnectionCommand = exports.de_ExecuteToolCommand = exports.de_DescribeToolsCommand = exports.de_DeleteToolCommand = exports.de_DeleteMcpConnectionCommand = exports.de_CreateToolCommand = exports.de_CreateMcpConnectionCommand = exports.se_UpdateToolCommand = exports.se_UpdateMcpConnectionCommand = exports.se_ListToolsCommand = exports.se_ListMcpToolsCommand = exports.se_ListMcpConnectionsCommand = exports.se_GetToolCommand = exports.se_GetMcpConnectionCommand = exports.se_ExecuteToolCommand = exports.se_DescribeToolsCommand = exports.se_DeleteToolCommand = exports.se_DeleteMcpConnectionCommand = exports.se_CreateToolCommand = exports.se_CreateMcpConnectionCommand = void 0;
4
4
  const ToolsServiceException_1 = require("../models/ToolsServiceException");
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_CreateMcpConnectionCommand = 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/tools/mcp/connect");
15
+ const query = (0, smithy_client_1.map)({
16
+ [_c]: [, input[_cI]],
17
+ });
18
+ let body;
19
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
20
+ 'apiKey': [],
21
+ 'description': [],
22
+ 'name': [],
23
+ 'serverUrl': [],
24
+ }));
25
+ b.m("POST")
26
+ .h(headers)
27
+ .q(query)
28
+ .b(body);
29
+ return b.build();
30
+ };
31
+ exports.se_CreateMcpConnectionCommand = se_CreateMcpConnectionCommand;
9
32
  const se_CreateToolCommand = async (input, context) => {
10
33
  const b = (0, core_2.requestBuilder)(input, context);
11
34
  const headers = {
@@ -30,6 +53,22 @@ const se_CreateToolCommand = async (input, context) => {
30
53
  return b.build();
31
54
  };
32
55
  exports.se_CreateToolCommand = se_CreateToolCommand;
56
+ const se_DeleteMcpConnectionCommand = async (input, context) => {
57
+ const b = (0, core_2.requestBuilder)(input, context);
58
+ const headers = {};
59
+ b.bp("/v1/tools/mcp/connections/{connectionId}");
60
+ b.p('connectionId', () => input.connectionId, '{connectionId}', false);
61
+ const query = (0, smithy_client_1.map)({
62
+ [_c]: [, input[_cI]],
63
+ });
64
+ let body;
65
+ b.m("DELETE")
66
+ .h(headers)
67
+ .q(query)
68
+ .b(body);
69
+ return b.build();
70
+ };
71
+ exports.se_DeleteMcpConnectionCommand = se_DeleteMcpConnectionCommand;
33
72
  const se_DeleteToolCommand = async (input, context) => {
34
73
  const b = (0, core_2.requestBuilder)(input, context);
35
74
  const headers = {};
@@ -89,6 +128,22 @@ const se_ExecuteToolCommand = async (input, context) => {
89
128
  return b.build();
90
129
  };
91
130
  exports.se_ExecuteToolCommand = se_ExecuteToolCommand;
131
+ const se_GetMcpConnectionCommand = async (input, context) => {
132
+ const b = (0, core_2.requestBuilder)(input, context);
133
+ const headers = {};
134
+ b.bp("/v1/tools/mcp/connections/{connectionId}");
135
+ b.p('connectionId', () => input.connectionId, '{connectionId}', false);
136
+ const query = (0, smithy_client_1.map)({
137
+ [_c]: [, input[_cI]],
138
+ });
139
+ let body;
140
+ b.m("GET")
141
+ .h(headers)
142
+ .q(query)
143
+ .b(body);
144
+ return b.build();
145
+ };
146
+ exports.se_GetMcpConnectionCommand = se_GetMcpConnectionCommand;
92
147
  const se_GetToolCommand = async (input, context) => {
93
148
  const b = (0, core_2.requestBuilder)(input, context);
94
149
  const headers = {};
@@ -105,6 +160,37 @@ const se_GetToolCommand = async (input, context) => {
105
160
  return b.build();
106
161
  };
107
162
  exports.se_GetToolCommand = se_GetToolCommand;
163
+ const se_ListMcpConnectionsCommand = async (input, context) => {
164
+ const b = (0, core_2.requestBuilder)(input, context);
165
+ const headers = {};
166
+ b.bp("/v1/tools/mcp/connections");
167
+ const query = (0, smithy_client_1.map)({
168
+ [_c]: [, input[_cI]],
169
+ });
170
+ let body;
171
+ b.m("GET")
172
+ .h(headers)
173
+ .q(query)
174
+ .b(body);
175
+ return b.build();
176
+ };
177
+ exports.se_ListMcpConnectionsCommand = se_ListMcpConnectionsCommand;
178
+ const se_ListMcpToolsCommand = async (input, context) => {
179
+ const b = (0, core_2.requestBuilder)(input, context);
180
+ const headers = {};
181
+ b.bp("/v1/tools/mcp/connections/{connectionId}/tools");
182
+ b.p('connectionId', () => input.connectionId, '{connectionId}', false);
183
+ const query = (0, smithy_client_1.map)({
184
+ [_c]: [, input[_cI]],
185
+ });
186
+ let body;
187
+ b.m("GET")
188
+ .h(headers)
189
+ .q(query)
190
+ .b(body);
191
+ return b.build();
192
+ };
193
+ exports.se_ListMcpToolsCommand = se_ListMcpToolsCommand;
108
194
  const se_ListToolsCommand = async (input, context) => {
109
195
  const b = (0, core_2.requestBuilder)(input, context);
110
196
  const headers = {};
@@ -120,6 +206,30 @@ const se_ListToolsCommand = async (input, context) => {
120
206
  return b.build();
121
207
  };
122
208
  exports.se_ListToolsCommand = se_ListToolsCommand;
209
+ const se_UpdateMcpConnectionCommand = async (input, context) => {
210
+ const b = (0, core_2.requestBuilder)(input, context);
211
+ const headers = {
212
+ 'content-type': 'application/json',
213
+ };
214
+ b.bp("/v1/tools/mcp/connections/{connectionId}");
215
+ b.p('connectionId', () => input.connectionId, '{connectionId}', false);
216
+ const query = (0, smithy_client_1.map)({
217
+ [_c]: [, input[_cI]],
218
+ });
219
+ let body;
220
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
221
+ 'apiKey': [],
222
+ 'description': [],
223
+ 'name': [],
224
+ 'serverUrl': [],
225
+ }));
226
+ b.m("PUT")
227
+ .h(headers)
228
+ .q(query)
229
+ .b(body);
230
+ return b.build();
231
+ };
232
+ exports.se_UpdateMcpConnectionCommand = se_UpdateMcpConnectionCommand;
123
233
  const se_UpdateToolCommand = async (input, context) => {
124
234
  const b = (0, core_2.requestBuilder)(input, context);
125
235
  const headers = {
@@ -145,6 +255,21 @@ const se_UpdateToolCommand = async (input, context) => {
145
255
  return b.build();
146
256
  };
147
257
  exports.se_UpdateToolCommand = se_UpdateToolCommand;
258
+ const de_CreateMcpConnectionCommand = async (output, context) => {
259
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
260
+ return de_CommandError(output, context);
261
+ }
262
+ const contents = (0, smithy_client_1.map)({
263
+ $metadata: deserializeMetadata(output),
264
+ });
265
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
266
+ const doc = (0, smithy_client_1.take)(data, {
267
+ 'connection': smithy_client_1._json,
268
+ });
269
+ Object.assign(contents, doc);
270
+ return contents;
271
+ };
272
+ exports.de_CreateMcpConnectionCommand = de_CreateMcpConnectionCommand;
148
273
  const de_CreateToolCommand = async (output, context) => {
149
274
  if (output.statusCode !== 201 && output.statusCode >= 300) {
150
275
  return de_CommandError(output, context);
@@ -160,6 +285,17 @@ const de_CreateToolCommand = async (output, context) => {
160
285
  return contents;
161
286
  };
162
287
  exports.de_CreateToolCommand = de_CreateToolCommand;
288
+ const de_DeleteMcpConnectionCommand = async (output, context) => {
289
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
290
+ return de_CommandError(output, context);
291
+ }
292
+ const contents = (0, smithy_client_1.map)({
293
+ $metadata: deserializeMetadata(output),
294
+ });
295
+ await (0, smithy_client_1.collectBody)(output.body, context);
296
+ return contents;
297
+ };
298
+ exports.de_DeleteMcpConnectionCommand = de_DeleteMcpConnectionCommand;
163
299
  const de_DeleteToolCommand = async (output, context) => {
164
300
  if (output.statusCode !== 204 && output.statusCode >= 300) {
165
301
  return de_CommandError(output, context);
@@ -201,6 +337,21 @@ const de_ExecuteToolCommand = async (output, context) => {
201
337
  return contents;
202
338
  };
203
339
  exports.de_ExecuteToolCommand = de_ExecuteToolCommand;
340
+ const de_GetMcpConnectionCommand = async (output, context) => {
341
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
342
+ return de_CommandError(output, context);
343
+ }
344
+ const contents = (0, smithy_client_1.map)({
345
+ $metadata: deserializeMetadata(output),
346
+ });
347
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
348
+ const doc = (0, smithy_client_1.take)(data, {
349
+ 'connection': smithy_client_1._json,
350
+ });
351
+ Object.assign(contents, doc);
352
+ return contents;
353
+ };
354
+ exports.de_GetMcpConnectionCommand = de_GetMcpConnectionCommand;
204
355
  const de_GetToolCommand = async (output, context) => {
205
356
  if (output.statusCode !== 200 && output.statusCode >= 300) {
206
357
  return de_CommandError(output, context);
@@ -216,6 +367,36 @@ const de_GetToolCommand = async (output, context) => {
216
367
  return contents;
217
368
  };
218
369
  exports.de_GetToolCommand = de_GetToolCommand;
370
+ const de_ListMcpConnectionsCommand = async (output, context) => {
371
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
372
+ return de_CommandError(output, context);
373
+ }
374
+ const contents = (0, smithy_client_1.map)({
375
+ $metadata: deserializeMetadata(output),
376
+ });
377
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
378
+ const doc = (0, smithy_client_1.take)(data, {
379
+ 'connections': smithy_client_1._json,
380
+ });
381
+ Object.assign(contents, doc);
382
+ return contents;
383
+ };
384
+ exports.de_ListMcpConnectionsCommand = de_ListMcpConnectionsCommand;
385
+ const de_ListMcpToolsCommand = async (output, context) => {
386
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
387
+ return de_CommandError(output, context);
388
+ }
389
+ const contents = (0, smithy_client_1.map)({
390
+ $metadata: deserializeMetadata(output),
391
+ });
392
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
393
+ const doc = (0, smithy_client_1.take)(data, {
394
+ 'tools': _ => de_McpToolsList(_, context),
395
+ });
396
+ Object.assign(contents, doc);
397
+ return contents;
398
+ };
399
+ exports.de_ListMcpToolsCommand = de_ListMcpToolsCommand;
219
400
  const de_ListToolsCommand = async (output, context) => {
220
401
  if (output.statusCode !== 200 && output.statusCode >= 300) {
221
402
  return de_CommandError(output, context);
@@ -231,6 +412,21 @@ const de_ListToolsCommand = async (output, context) => {
231
412
  return contents;
232
413
  };
233
414
  exports.de_ListToolsCommand = de_ListToolsCommand;
415
+ const de_UpdateMcpConnectionCommand = async (output, context) => {
416
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
417
+ return de_CommandError(output, context);
418
+ }
419
+ const contents = (0, smithy_client_1.map)({
420
+ $metadata: deserializeMetadata(output),
421
+ });
422
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
423
+ const doc = (0, smithy_client_1.take)(data, {
424
+ 'connection': smithy_client_1._json,
425
+ });
426
+ Object.assign(contents, doc);
427
+ return contents;
428
+ };
429
+ exports.de_UpdateMcpConnectionCommand = de_UpdateMcpConnectionCommand;
234
430
  const de_UpdateToolCommand = async (output, context) => {
235
431
  if (output.statusCode !== 200 && output.statusCode >= 300) {
236
432
  return de_CommandError(output, context);
@@ -256,6 +452,9 @@ const de_CommandError = async (output, context) => {
256
452
  case "AlreadyExistException":
257
453
  case "smithy.framework#AlreadyExistException":
258
454
  throw await de_AlreadyExistExceptionRes(parsedOutput, context);
455
+ case "McpConnectionException":
456
+ case "wildix.wim.tools#McpConnectionException":
457
+ throw await de_McpConnectionExceptionRes(parsedOutput, context);
259
458
  case "NotFoundException":
260
459
  case "smithy.framework#NotFoundException":
261
460
  throw await de_NotFoundExceptionRes(parsedOutput, context);
@@ -333,6 +532,19 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
333
532
  });
334
533
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
335
534
  };
535
+ const de_McpConnectionExceptionRes = async (parsedOutput, context) => {
536
+ const contents = (0, smithy_client_1.map)({});
537
+ const data = parsedOutput.body;
538
+ const doc = (0, smithy_client_1.take)(data, {
539
+ 'message': smithy_client_1.expectString,
540
+ });
541
+ Object.assign(contents, doc);
542
+ const exception = new models_0_1.McpConnectionException({
543
+ $metadata: deserializeMetadata(parsedOutput),
544
+ ...contents
545
+ });
546
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
547
+ };
336
548
  const de_ToolExecutionExceptionRes = async (parsedOutput, context) => {
337
549
  const contents = (0, smithy_client_1.map)({});
338
550
  const data = parsedOutput.body;
@@ -367,6 +579,19 @@ const se_Document = (input, context) => {
367
579
  const de_Document = (output, context) => {
368
580
  return output;
369
581
  };
582
+ const de_McpToolSchema = (output, context) => {
583
+ return (0, smithy_client_1.take)(output, {
584
+ 'description': smithy_client_1.expectString,
585
+ 'inputSchema': (_) => de_Document(_, context),
586
+ 'name': smithy_client_1.expectString,
587
+ });
588
+ };
589
+ const de_McpToolsList = (output, context) => {
590
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
591
+ return de_McpToolSchema(entry, context);
592
+ });
593
+ return retVal;
594
+ };
370
595
  const de_ToolExecutionResult = (output, context) => {
371
596
  return (0, smithy_client_1.take)(output, {
372
597
  'output': (_) => de_Document(_, context),
package/dist-es/Tools.js CHANGED
@@ -1,19 +1,31 @@
1
1
  import { ToolsClient, } from "./ToolsClient";
2
+ import { CreateMcpConnectionCommand, } from "./commands/CreateMcpConnectionCommand";
2
3
  import { CreateToolCommand, } from "./commands/CreateToolCommand";
4
+ import { DeleteMcpConnectionCommand, } from "./commands/DeleteMcpConnectionCommand";
3
5
  import { DeleteToolCommand, } from "./commands/DeleteToolCommand";
4
6
  import { DescribeToolsCommand, } from "./commands/DescribeToolsCommand";
5
7
  import { ExecuteToolCommand, } from "./commands/ExecuteToolCommand";
8
+ import { GetMcpConnectionCommand, } from "./commands/GetMcpConnectionCommand";
6
9
  import { GetToolCommand, } from "./commands/GetToolCommand";
10
+ import { ListMcpConnectionsCommand, } from "./commands/ListMcpConnectionsCommand";
11
+ import { ListMcpToolsCommand, } from "./commands/ListMcpToolsCommand";
7
12
  import { ListToolsCommand, } from "./commands/ListToolsCommand";
13
+ import { UpdateMcpConnectionCommand, } from "./commands/UpdateMcpConnectionCommand";
8
14
  import { UpdateToolCommand, } from "./commands/UpdateToolCommand";
9
15
  import { createAggregatedClient } from "@smithy/smithy-client";
10
16
  const commands = {
17
+ CreateMcpConnectionCommand,
11
18
  CreateToolCommand,
19
+ DeleteMcpConnectionCommand,
12
20
  DeleteToolCommand,
13
21
  DescribeToolsCommand,
14
22
  ExecuteToolCommand,
23
+ GetMcpConnectionCommand,
15
24
  GetToolCommand,
25
+ ListMcpConnectionsCommand,
26
+ ListMcpToolsCommand,
16
27
  ListToolsCommand,
28
+ UpdateMcpConnectionCommand,
17
29
  UpdateToolCommand,
18
30
  };
19
31
  export class Tools extends ToolsClient {
@@ -0,0 +1,17 @@
1
+ import { de_CreateMcpConnectionCommand, se_CreateMcpConnectionCommand, } 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 CreateMcpConnectionCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Tools", "CreateMcpConnection", {})
12
+ .n("ToolsClient", "CreateMcpConnectionCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_CreateMcpConnectionCommand)
15
+ .de(de_CreateMcpConnectionCommand)
16
+ .build() {
17
+ }