@wildix/wim-tools-client 0.0.34 → 0.0.35
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/models/models_0.js +18 -13
- package/dist-cjs/protocols/Aws_restJson1.js +2 -2
- package/dist-es/models/models_0.js +17 -12
- package/dist-es/protocols/Aws_restJson1.js +2 -2
- package/dist-types/commands/CreateMcpConnectionCommand.d.ts +28 -2
- package/dist-types/commands/CreateToolCommand.d.ts +8 -16
- package/dist-types/commands/DescribeToolsCommand.d.ts +4 -8
- package/dist-types/commands/GetMcpConnectionCommand.d.ts +14 -1
- package/dist-types/commands/GetToolCommand.d.ts +4 -8
- package/dist-types/commands/ListMcpConnectionsCommand.d.ts +14 -1
- package/dist-types/commands/ListToolsCommand.d.ts +4 -8
- package/dist-types/commands/UpdateMcpConnectionCommand.d.ts +28 -2
- package/dist-types/commands/UpdateToolCommand.d.ts +8 -16
- package/dist-types/models/models_0.d.ts +115 -73
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToolVariableType = exports.
|
|
3
|
+
exports.ToolVariableType = exports.ToolVariableInstructionType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ToolExecutionServerException = exports.ToolExecutionException = exports.McpConnectionException = exports.ToolMcpAuthorization = 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,18 @@ class ValidationException extends ToolsServiceException_1.ToolsServiceException
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
exports.ValidationException = ValidationException;
|
|
57
|
+
var ToolMcpAuthorization;
|
|
58
|
+
(function (ToolMcpAuthorization) {
|
|
59
|
+
ToolMcpAuthorization.visit = (value, visitor) => {
|
|
60
|
+
if (value.apiKey !== undefined)
|
|
61
|
+
return visitor.apiKey(value.apiKey);
|
|
62
|
+
if (value.bearerToken !== undefined)
|
|
63
|
+
return visitor.bearerToken(value.bearerToken);
|
|
64
|
+
if (value.customHeaders !== undefined)
|
|
65
|
+
return visitor.customHeaders(value.customHeaders);
|
|
66
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
67
|
+
};
|
|
68
|
+
})(ToolMcpAuthorization || (exports.ToolMcpAuthorization = ToolMcpAuthorization = {}));
|
|
57
69
|
class McpConnectionException extends ToolsServiceException_1.ToolsServiceException {
|
|
58
70
|
name = "McpConnectionException";
|
|
59
71
|
$fault = "server";
|
|
@@ -154,18 +166,11 @@ var ToolHandler;
|
|
|
154
166
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
155
167
|
};
|
|
156
168
|
})(ToolHandler || (exports.ToolHandler = ToolHandler = {}));
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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 = {}));
|
|
169
|
+
exports.ToolVariableInstructionType = {
|
|
170
|
+
AUTO: "auto",
|
|
171
|
+
GUIDED: "guided",
|
|
172
|
+
PREDEFINED: "predefined",
|
|
173
|
+
};
|
|
169
174
|
exports.ToolVariableType = {
|
|
170
175
|
BOOLEAN: "boolean",
|
|
171
176
|
NUMBER: "number",
|
|
@@ -17,7 +17,7 @@ const se_CreateMcpConnectionCommand = async (input, context) => {
|
|
|
17
17
|
});
|
|
18
18
|
let body;
|
|
19
19
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
20
|
-
'
|
|
20
|
+
'authorization': _ => (0, smithy_client_1._json)(_),
|
|
21
21
|
'description': [],
|
|
22
22
|
'name': [],
|
|
23
23
|
'serverUrl': [],
|
|
@@ -218,7 +218,7 @@ const se_UpdateMcpConnectionCommand = async (input, context) => {
|
|
|
218
218
|
});
|
|
219
219
|
let body;
|
|
220
220
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
221
|
-
'
|
|
221
|
+
'authorization': _ => (0, smithy_client_1._json)(_),
|
|
222
222
|
'description': [],
|
|
223
223
|
'name': [],
|
|
224
224
|
'serverUrl': [],
|
|
@@ -47,6 +47,18 @@ export class ValidationException extends __BaseException {
|
|
|
47
47
|
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
export var ToolMcpAuthorization;
|
|
51
|
+
(function (ToolMcpAuthorization) {
|
|
52
|
+
ToolMcpAuthorization.visit = (value, visitor) => {
|
|
53
|
+
if (value.apiKey !== undefined)
|
|
54
|
+
return visitor.apiKey(value.apiKey);
|
|
55
|
+
if (value.bearerToken !== undefined)
|
|
56
|
+
return visitor.bearerToken(value.bearerToken);
|
|
57
|
+
if (value.customHeaders !== undefined)
|
|
58
|
+
return visitor.customHeaders(value.customHeaders);
|
|
59
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
60
|
+
};
|
|
61
|
+
})(ToolMcpAuthorization || (ToolMcpAuthorization = {}));
|
|
50
62
|
export class McpConnectionException extends __BaseException {
|
|
51
63
|
name = "McpConnectionException";
|
|
52
64
|
$fault = "server";
|
|
@@ -144,18 +156,11 @@ export var ToolHandler;
|
|
|
144
156
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
145
157
|
};
|
|
146
158
|
})(ToolHandler || (ToolHandler = {}));
|
|
147
|
-
export
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
if (value.guided !== undefined)
|
|
153
|
-
return visitor.guided(value.guided);
|
|
154
|
-
if (value.predefined !== undefined)
|
|
155
|
-
return visitor.predefined(value.predefined);
|
|
156
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
157
|
-
};
|
|
158
|
-
})(ToolVariableHandler || (ToolVariableHandler = {}));
|
|
159
|
+
export const ToolVariableInstructionType = {
|
|
160
|
+
AUTO: "auto",
|
|
161
|
+
GUIDED: "guided",
|
|
162
|
+
PREDEFINED: "predefined",
|
|
163
|
+
};
|
|
159
164
|
export const ToolVariableType = {
|
|
160
165
|
BOOLEAN: "boolean",
|
|
161
166
|
NUMBER: "number",
|
|
@@ -14,7 +14,7 @@ export const se_CreateMcpConnectionCommand = async (input, context) => {
|
|
|
14
14
|
});
|
|
15
15
|
let body;
|
|
16
16
|
body = JSON.stringify(take(input, {
|
|
17
|
-
'
|
|
17
|
+
'authorization': _ => _json(_),
|
|
18
18
|
'description': [],
|
|
19
19
|
'name': [],
|
|
20
20
|
'serverUrl': [],
|
|
@@ -204,7 +204,7 @@ export const se_UpdateMcpConnectionCommand = async (input, context) => {
|
|
|
204
204
|
});
|
|
205
205
|
let body;
|
|
206
206
|
body = JSON.stringify(take(input, {
|
|
207
|
-
'
|
|
207
|
+
'authorization': _ => _json(_),
|
|
208
208
|
'description': [],
|
|
209
209
|
'name': [],
|
|
210
210
|
'serverUrl': [],
|
|
@@ -39,7 +39,20 @@ declare const CreateMcpConnectionCommand_base: {
|
|
|
39
39
|
* name: "STRING_VALUE", // required
|
|
40
40
|
* description: "STRING_VALUE",
|
|
41
41
|
* serverUrl: "STRING_VALUE", // required
|
|
42
|
-
*
|
|
42
|
+
* authorization: { // ToolMcpAuthorization Union: only one key present
|
|
43
|
+
* apiKey: { // ApiKeyAuthorization
|
|
44
|
+
* apiKey: "STRING_VALUE", // required
|
|
45
|
+
* paramName: "STRING_VALUE",
|
|
46
|
+
* },
|
|
47
|
+
* bearerToken: { // BearerTokenAuthorization
|
|
48
|
+
* token: "STRING_VALUE", // required
|
|
49
|
+
* },
|
|
50
|
+
* customHeaders: { // CustomHeadersAuthorization
|
|
51
|
+
* headers: { // HeadersMap // required
|
|
52
|
+
* "<keys>": "STRING_VALUE",
|
|
53
|
+
* },
|
|
54
|
+
* },
|
|
55
|
+
* },
|
|
43
56
|
* };
|
|
44
57
|
* const command = new CreateMcpConnectionCommand(input);
|
|
45
58
|
* const response = await client.send(command);
|
|
@@ -50,7 +63,20 @@ declare const CreateMcpConnectionCommand_base: {
|
|
|
50
63
|
* // name: "STRING_VALUE", // required
|
|
51
64
|
* // description: "STRING_VALUE",
|
|
52
65
|
* // serverUrl: "STRING_VALUE", // required
|
|
53
|
-
* //
|
|
66
|
+
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
67
|
+
* // apiKey: { // ApiKeyAuthorization
|
|
68
|
+
* // apiKey: "STRING_VALUE", // required
|
|
69
|
+
* // paramName: "STRING_VALUE",
|
|
70
|
+
* // },
|
|
71
|
+
* // bearerToken: { // BearerTokenAuthorization
|
|
72
|
+
* // token: "STRING_VALUE", // required
|
|
73
|
+
* // },
|
|
74
|
+
* // customHeaders: { // CustomHeadersAuthorization
|
|
75
|
+
* // headers: { // HeadersMap // required
|
|
76
|
+
* // "<keys>": "STRING_VALUE",
|
|
77
|
+
* // },
|
|
78
|
+
* // },
|
|
79
|
+
* // },
|
|
54
80
|
* // createdAt: Number("long"), // required
|
|
55
81
|
* // updatedAt: Number("long"), // required
|
|
56
82
|
* // },
|
|
@@ -45,14 +45,10 @@ declare const CreateToolCommand_base: {
|
|
|
45
45
|
* name: "STRING_VALUE", // required
|
|
46
46
|
* type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
|
|
47
47
|
* optional: true || false, // required
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* },
|
|
53
|
-
* predefined: { // ToolVariablePredefinedHandler
|
|
54
|
-
* value: "STRING_VALUE", // required
|
|
55
|
-
* },
|
|
48
|
+
* description: "STRING_VALUE",
|
|
49
|
+
* instructions: { // ToolVariableInstructions
|
|
50
|
+
* type: "auto" || "guided" || "predefined", // required
|
|
51
|
+
* value: "STRING_VALUE",
|
|
56
52
|
* },
|
|
57
53
|
* },
|
|
58
54
|
* ],
|
|
@@ -147,14 +143,10 @@ declare const CreateToolCommand_base: {
|
|
|
147
143
|
* // name: "STRING_VALUE", // required
|
|
148
144
|
* // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
|
|
149
145
|
* // optional: true || false, // required
|
|
150
|
-
* //
|
|
151
|
-
* //
|
|
152
|
-
* //
|
|
153
|
-
* //
|
|
154
|
-
* // },
|
|
155
|
-
* // predefined: { // ToolVariablePredefinedHandler
|
|
156
|
-
* // value: "STRING_VALUE", // required
|
|
157
|
-
* // },
|
|
146
|
+
* // description: "STRING_VALUE",
|
|
147
|
+
* // instructions: { // ToolVariableInstructions
|
|
148
|
+
* // type: "auto" || "guided" || "predefined", // required
|
|
149
|
+
* // value: "STRING_VALUE",
|
|
158
150
|
* // },
|
|
159
151
|
* // },
|
|
160
152
|
* // ],
|
|
@@ -53,14 +53,10 @@ declare const DescribeToolsCommand_base: {
|
|
|
53
53
|
* // name: "STRING_VALUE", // required
|
|
54
54
|
* // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
|
|
55
55
|
* // optional: true || false, // required
|
|
56
|
-
* //
|
|
57
|
-
* //
|
|
58
|
-
* //
|
|
59
|
-
* //
|
|
60
|
-
* // },
|
|
61
|
-
* // predefined: { // ToolVariablePredefinedHandler
|
|
62
|
-
* // value: "STRING_VALUE", // required
|
|
63
|
-
* // },
|
|
56
|
+
* // description: "STRING_VALUE",
|
|
57
|
+
* // instructions: { // ToolVariableInstructions
|
|
58
|
+
* // type: "auto" || "guided" || "predefined", // required
|
|
59
|
+
* // value: "STRING_VALUE",
|
|
64
60
|
* // },
|
|
65
61
|
* // },
|
|
66
62
|
* // ],
|
|
@@ -47,7 +47,20 @@ declare const GetMcpConnectionCommand_base: {
|
|
|
47
47
|
* // name: "STRING_VALUE", // required
|
|
48
48
|
* // description: "STRING_VALUE",
|
|
49
49
|
* // serverUrl: "STRING_VALUE", // required
|
|
50
|
-
* //
|
|
50
|
+
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
51
|
+
* // apiKey: { // ApiKeyAuthorization
|
|
52
|
+
* // apiKey: "STRING_VALUE", // required
|
|
53
|
+
* // paramName: "STRING_VALUE",
|
|
54
|
+
* // },
|
|
55
|
+
* // bearerToken: { // BearerTokenAuthorization
|
|
56
|
+
* // token: "STRING_VALUE", // required
|
|
57
|
+
* // },
|
|
58
|
+
* // customHeaders: { // CustomHeadersAuthorization
|
|
59
|
+
* // headers: { // HeadersMap // required
|
|
60
|
+
* // "<keys>": "STRING_VALUE",
|
|
61
|
+
* // },
|
|
62
|
+
* // },
|
|
63
|
+
* // },
|
|
51
64
|
* // createdAt: Number("long"), // required
|
|
52
65
|
* // updatedAt: Number("long"), // required
|
|
53
66
|
* // },
|
|
@@ -53,14 +53,10 @@ declare const GetToolCommand_base: {
|
|
|
53
53
|
* // name: "STRING_VALUE", // required
|
|
54
54
|
* // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
|
|
55
55
|
* // optional: true || false, // required
|
|
56
|
-
* //
|
|
57
|
-
* //
|
|
58
|
-
* //
|
|
59
|
-
* //
|
|
60
|
-
* // },
|
|
61
|
-
* // predefined: { // ToolVariablePredefinedHandler
|
|
62
|
-
* // value: "STRING_VALUE", // required
|
|
63
|
-
* // },
|
|
56
|
+
* // description: "STRING_VALUE",
|
|
57
|
+
* // instructions: { // ToolVariableInstructions
|
|
58
|
+
* // type: "auto" || "guided" || "predefined", // required
|
|
59
|
+
* // value: "STRING_VALUE",
|
|
64
60
|
* // },
|
|
65
61
|
* // },
|
|
66
62
|
* // ],
|
|
@@ -47,7 +47,20 @@ declare const ListMcpConnectionsCommand_base: {
|
|
|
47
47
|
* // name: "STRING_VALUE", // required
|
|
48
48
|
* // description: "STRING_VALUE",
|
|
49
49
|
* // serverUrl: "STRING_VALUE", // required
|
|
50
|
-
* //
|
|
50
|
+
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
51
|
+
* // apiKey: { // ApiKeyAuthorization
|
|
52
|
+
* // apiKey: "STRING_VALUE", // required
|
|
53
|
+
* // paramName: "STRING_VALUE",
|
|
54
|
+
* // },
|
|
55
|
+
* // bearerToken: { // BearerTokenAuthorization
|
|
56
|
+
* // token: "STRING_VALUE", // required
|
|
57
|
+
* // },
|
|
58
|
+
* // customHeaders: { // CustomHeadersAuthorization
|
|
59
|
+
* // headers: { // HeadersMap // required
|
|
60
|
+
* // "<keys>": "STRING_VALUE",
|
|
61
|
+
* // },
|
|
62
|
+
* // },
|
|
63
|
+
* // },
|
|
51
64
|
* // createdAt: Number("long"), // required
|
|
52
65
|
* // updatedAt: Number("long"), // required
|
|
53
66
|
* // },
|
|
@@ -53,14 +53,10 @@ declare const ListToolsCommand_base: {
|
|
|
53
53
|
* // name: "STRING_VALUE", // required
|
|
54
54
|
* // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
|
|
55
55
|
* // optional: true || false, // required
|
|
56
|
-
* //
|
|
57
|
-
* //
|
|
58
|
-
* //
|
|
59
|
-
* //
|
|
60
|
-
* // },
|
|
61
|
-
* // predefined: { // ToolVariablePredefinedHandler
|
|
62
|
-
* // value: "STRING_VALUE", // required
|
|
63
|
-
* // },
|
|
56
|
+
* // description: "STRING_VALUE",
|
|
57
|
+
* // instructions: { // ToolVariableInstructions
|
|
58
|
+
* // type: "auto" || "guided" || "predefined", // required
|
|
59
|
+
* // value: "STRING_VALUE",
|
|
64
60
|
* // },
|
|
65
61
|
* // },
|
|
66
62
|
* // ],
|
|
@@ -40,7 +40,20 @@ declare const UpdateMcpConnectionCommand_base: {
|
|
|
40
40
|
* name: "STRING_VALUE",
|
|
41
41
|
* description: "STRING_VALUE",
|
|
42
42
|
* serverUrl: "STRING_VALUE",
|
|
43
|
-
*
|
|
43
|
+
* authorization: { // ToolMcpAuthorization Union: only one key present
|
|
44
|
+
* apiKey: { // ApiKeyAuthorization
|
|
45
|
+
* apiKey: "STRING_VALUE", // required
|
|
46
|
+
* paramName: "STRING_VALUE",
|
|
47
|
+
* },
|
|
48
|
+
* bearerToken: { // BearerTokenAuthorization
|
|
49
|
+
* token: "STRING_VALUE", // required
|
|
50
|
+
* },
|
|
51
|
+
* customHeaders: { // CustomHeadersAuthorization
|
|
52
|
+
* headers: { // HeadersMap // required
|
|
53
|
+
* "<keys>": "STRING_VALUE",
|
|
54
|
+
* },
|
|
55
|
+
* },
|
|
56
|
+
* },
|
|
44
57
|
* };
|
|
45
58
|
* const command = new UpdateMcpConnectionCommand(input);
|
|
46
59
|
* const response = await client.send(command);
|
|
@@ -51,7 +64,20 @@ declare const UpdateMcpConnectionCommand_base: {
|
|
|
51
64
|
* // name: "STRING_VALUE", // required
|
|
52
65
|
* // description: "STRING_VALUE",
|
|
53
66
|
* // serverUrl: "STRING_VALUE", // required
|
|
54
|
-
* //
|
|
67
|
+
* // authorization: { // ToolMcpAuthorization Union: only one key present
|
|
68
|
+
* // apiKey: { // ApiKeyAuthorization
|
|
69
|
+
* // apiKey: "STRING_VALUE", // required
|
|
70
|
+
* // paramName: "STRING_VALUE",
|
|
71
|
+
* // },
|
|
72
|
+
* // bearerToken: { // BearerTokenAuthorization
|
|
73
|
+
* // token: "STRING_VALUE", // required
|
|
74
|
+
* // },
|
|
75
|
+
* // customHeaders: { // CustomHeadersAuthorization
|
|
76
|
+
* // headers: { // HeadersMap // required
|
|
77
|
+
* // "<keys>": "STRING_VALUE",
|
|
78
|
+
* // },
|
|
79
|
+
* // },
|
|
80
|
+
* // },
|
|
55
81
|
* // createdAt: Number("long"), // required
|
|
56
82
|
* // updatedAt: Number("long"), // required
|
|
57
83
|
* // },
|
|
@@ -46,14 +46,10 @@ declare const UpdateToolCommand_base: {
|
|
|
46
46
|
* name: "STRING_VALUE", // required
|
|
47
47
|
* type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
|
|
48
48
|
* optional: true || false, // required
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* },
|
|
54
|
-
* predefined: { // ToolVariablePredefinedHandler
|
|
55
|
-
* value: "STRING_VALUE", // required
|
|
56
|
-
* },
|
|
49
|
+
* description: "STRING_VALUE",
|
|
50
|
+
* instructions: { // ToolVariableInstructions
|
|
51
|
+
* type: "auto" || "guided" || "predefined", // required
|
|
52
|
+
* value: "STRING_VALUE",
|
|
57
53
|
* },
|
|
58
54
|
* },
|
|
59
55
|
* ],
|
|
@@ -148,14 +144,10 @@ declare const UpdateToolCommand_base: {
|
|
|
148
144
|
* // name: "STRING_VALUE", // required
|
|
149
145
|
* // type: "string" || "number" || "boolean" || "string_array" || "number_array", // required
|
|
150
146
|
* // optional: true || false, // required
|
|
151
|
-
* //
|
|
152
|
-
* //
|
|
153
|
-
* //
|
|
154
|
-
* //
|
|
155
|
-
* // },
|
|
156
|
-
* // predefined: { // ToolVariablePredefinedHandler
|
|
157
|
-
* // value: "STRING_VALUE", // required
|
|
158
|
-
* // },
|
|
147
|
+
* // description: "STRING_VALUE",
|
|
148
|
+
* // instructions: { // ToolVariableInstructions
|
|
149
|
+
* // type: "auto" || "guided" || "predefined", // required
|
|
150
|
+
* // value: "STRING_VALUE",
|
|
159
151
|
* // },
|
|
160
152
|
* // },
|
|
161
153
|
* // ],
|
|
@@ -45,6 +45,96 @@ export declare class ValidationException extends __BaseException {
|
|
|
45
45
|
*/
|
|
46
46
|
constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
export interface ApiKeyAuthorization {
|
|
52
|
+
/**
|
|
53
|
+
* API key value (e.g., 'tvly-xxx' or just 'my-secret-key')
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
apiKey: string;
|
|
57
|
+
/**
|
|
58
|
+
* Optional: parameter name for URL-based API keys (e.g., 'tavilyApiKey' for ?tavilyApiKey=value). If not provided, uses Authorization: Bearer header
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
paramName?: string | undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
export interface BearerTokenAuthorization {
|
|
67
|
+
/**
|
|
68
|
+
* Bearer token value
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
token: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export interface CustomHeadersAuthorization {
|
|
77
|
+
/**
|
|
78
|
+
* Custom HTTP headers (e.g., \{'Authorization': 'Bearer token', 'X-API-Key': 'key', 'X-Custom': 'value'\})
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
headers: Record<string, string>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
export type ToolMcpAuthorization = ToolMcpAuthorization.ApiKeyMember | ToolMcpAuthorization.BearerTokenMember | ToolMcpAuthorization.CustomHeadersMember | ToolMcpAuthorization.$UnknownMember;
|
|
87
|
+
/**
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export declare namespace ToolMcpAuthorization {
|
|
91
|
+
/**
|
|
92
|
+
* API key-based authorization
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
interface ApiKeyMember {
|
|
96
|
+
apiKey: ApiKeyAuthorization;
|
|
97
|
+
bearerToken?: never;
|
|
98
|
+
customHeaders?: never;
|
|
99
|
+
$unknown?: never;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Bearer token authorization
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
interface BearerTokenMember {
|
|
106
|
+
apiKey?: never;
|
|
107
|
+
bearerToken: BearerTokenAuthorization;
|
|
108
|
+
customHeaders?: never;
|
|
109
|
+
$unknown?: never;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Custom headers authorization
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
interface CustomHeadersMember {
|
|
116
|
+
apiKey?: never;
|
|
117
|
+
bearerToken?: never;
|
|
118
|
+
customHeaders: CustomHeadersAuthorization;
|
|
119
|
+
$unknown?: never;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @public
|
|
123
|
+
*/
|
|
124
|
+
interface $UnknownMember {
|
|
125
|
+
apiKey?: never;
|
|
126
|
+
bearerToken?: never;
|
|
127
|
+
customHeaders?: never;
|
|
128
|
+
$unknown: [string, any];
|
|
129
|
+
}
|
|
130
|
+
interface Visitor<T> {
|
|
131
|
+
apiKey: (value: ApiKeyAuthorization) => T;
|
|
132
|
+
bearerToken: (value: BearerTokenAuthorization) => T;
|
|
133
|
+
customHeaders: (value: CustomHeadersAuthorization) => T;
|
|
134
|
+
_: (name: string, value: any) => T;
|
|
135
|
+
}
|
|
136
|
+
const visit: <T>(value: ToolMcpAuthorization, visitor: Visitor<T>) => T;
|
|
137
|
+
}
|
|
48
138
|
/**
|
|
49
139
|
* @public
|
|
50
140
|
*/
|
|
@@ -70,10 +160,10 @@ export interface CreateMcpConnectionInput {
|
|
|
70
160
|
*/
|
|
71
161
|
serverUrl: string;
|
|
72
162
|
/**
|
|
73
|
-
* API key
|
|
163
|
+
* Authorization configuration (API key, bearer token, or custom headers)
|
|
74
164
|
* @public
|
|
75
165
|
*/
|
|
76
|
-
|
|
166
|
+
authorization: ToolMcpAuthorization;
|
|
77
167
|
}
|
|
78
168
|
/**
|
|
79
169
|
* @public
|
|
@@ -105,10 +195,10 @@ export interface McpConnection {
|
|
|
105
195
|
*/
|
|
106
196
|
serverUrl: string;
|
|
107
197
|
/**
|
|
108
|
-
*
|
|
198
|
+
* Authorization configuration for the MCP server
|
|
109
199
|
* @public
|
|
110
200
|
*/
|
|
111
|
-
|
|
201
|
+
authorization: ToolMcpAuthorization;
|
|
112
202
|
/**
|
|
113
203
|
* Timestamp when the connection was created
|
|
114
204
|
* @public
|
|
@@ -710,86 +800,33 @@ export declare namespace ToolHandler {
|
|
|
710
800
|
}
|
|
711
801
|
const visit: <T>(value: ToolHandler, visitor: Visitor<T>) => T;
|
|
712
802
|
}
|
|
713
|
-
/**
|
|
714
|
-
* Empty structure - LLM fills automatically based on context
|
|
715
|
-
* @public
|
|
716
|
-
*/
|
|
717
|
-
export interface ToolVariableAutoHandler {
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
* @public
|
|
721
|
-
*/
|
|
722
|
-
export interface ToolVariableGuidedHandler {
|
|
723
|
-
/**
|
|
724
|
-
* Instructions for LLM on how to fill this variable
|
|
725
|
-
* @public
|
|
726
|
-
*/
|
|
727
|
-
description: string;
|
|
728
|
-
}
|
|
729
803
|
/**
|
|
730
804
|
* @public
|
|
805
|
+
* @enum
|
|
731
806
|
*/
|
|
732
|
-
export
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
value: string;
|
|
738
|
-
}
|
|
807
|
+
export declare const ToolVariableInstructionType: {
|
|
808
|
+
readonly AUTO: "auto";
|
|
809
|
+
readonly GUIDED: "guided";
|
|
810
|
+
readonly PREDEFINED: "predefined";
|
|
811
|
+
};
|
|
739
812
|
/**
|
|
740
813
|
* @public
|
|
741
814
|
*/
|
|
742
|
-
export type
|
|
815
|
+
export type ToolVariableInstructionType = typeof ToolVariableInstructionType[keyof typeof ToolVariableInstructionType];
|
|
743
816
|
/**
|
|
744
817
|
* @public
|
|
745
818
|
*/
|
|
746
|
-
export
|
|
819
|
+
export interface ToolVariableInstructions {
|
|
747
820
|
/**
|
|
748
|
-
*
|
|
821
|
+
* Type of instruction: auto, guided, or predefined
|
|
749
822
|
* @public
|
|
750
823
|
*/
|
|
751
|
-
|
|
752
|
-
auto: ToolVariableAutoHandler;
|
|
753
|
-
guided?: never;
|
|
754
|
-
predefined?: never;
|
|
755
|
-
$unknown?: never;
|
|
756
|
-
}
|
|
824
|
+
type: ToolVariableInstructionType;
|
|
757
825
|
/**
|
|
758
|
-
*
|
|
826
|
+
* For guided: instruction text. For predefined: fixed value
|
|
759
827
|
* @public
|
|
760
828
|
*/
|
|
761
|
-
|
|
762
|
-
auto?: never;
|
|
763
|
-
guided: ToolVariableGuidedHandler;
|
|
764
|
-
predefined?: never;
|
|
765
|
-
$unknown?: never;
|
|
766
|
-
}
|
|
767
|
-
/**
|
|
768
|
-
* Fixed predefined value
|
|
769
|
-
* @public
|
|
770
|
-
*/
|
|
771
|
-
interface PredefinedMember {
|
|
772
|
-
auto?: never;
|
|
773
|
-
guided?: never;
|
|
774
|
-
predefined: ToolVariablePredefinedHandler;
|
|
775
|
-
$unknown?: never;
|
|
776
|
-
}
|
|
777
|
-
/**
|
|
778
|
-
* @public
|
|
779
|
-
*/
|
|
780
|
-
interface $UnknownMember {
|
|
781
|
-
auto?: never;
|
|
782
|
-
guided?: never;
|
|
783
|
-
predefined?: never;
|
|
784
|
-
$unknown: [string, any];
|
|
785
|
-
}
|
|
786
|
-
interface Visitor<T> {
|
|
787
|
-
auto: (value: ToolVariableAutoHandler) => T;
|
|
788
|
-
guided: (value: ToolVariableGuidedHandler) => T;
|
|
789
|
-
predefined: (value: ToolVariablePredefinedHandler) => T;
|
|
790
|
-
_: (name: string, value: any) => T;
|
|
791
|
-
}
|
|
792
|
-
const visit: <T>(value: ToolVariableHandler, visitor: Visitor<T>) => T;
|
|
829
|
+
value?: string | undefined;
|
|
793
830
|
}
|
|
794
831
|
/**
|
|
795
832
|
* @public
|
|
@@ -826,10 +863,15 @@ export interface ToolVariable {
|
|
|
826
863
|
*/
|
|
827
864
|
optional: boolean;
|
|
828
865
|
/**
|
|
829
|
-
*
|
|
866
|
+
* Original description from MCP tool schema (preserved)
|
|
867
|
+
* @public
|
|
868
|
+
*/
|
|
869
|
+
description?: string | undefined;
|
|
870
|
+
/**
|
|
871
|
+
* Instructions for how LLM should fill this variable
|
|
830
872
|
* @public
|
|
831
873
|
*/
|
|
832
|
-
|
|
874
|
+
instructions?: ToolVariableInstructions | undefined;
|
|
833
875
|
}
|
|
834
876
|
/**
|
|
835
877
|
* @public
|
|
@@ -1227,10 +1269,10 @@ export interface UpdateMcpConnectionInput {
|
|
|
1227
1269
|
*/
|
|
1228
1270
|
serverUrl?: string | undefined;
|
|
1229
1271
|
/**
|
|
1230
|
-
* New
|
|
1272
|
+
* New authorization configuration (requires re-validation)
|
|
1231
1273
|
* @public
|
|
1232
1274
|
*/
|
|
1233
|
-
|
|
1275
|
+
authorization?: ToolMcpAuthorization | undefined;
|
|
1234
1276
|
}
|
|
1235
1277
|
/**
|
|
1236
1278
|
* @public
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-tools-client",
|
|
3
3
|
"description": "@wildix/wim-tools-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.35",
|
|
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",
|