@wildix/wim-tools-client 1.0.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/Tools.js +3 -3
- package/dist-cjs/ToolsClient.js +34 -25
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
- package/dist-cjs/commands/CreateToolCommand.js +10 -11
- package/dist-cjs/commands/DeleteToolCommand.js +10 -11
- package/dist-cjs/commands/DescribeToolsCommand.js +10 -11
- package/dist-cjs/commands/DiscoverToolsCommand.js +10 -11
- package/dist-cjs/commands/ExecuteToolCommand.js +10 -11
- package/dist-cjs/commands/GetToolCommand.js +10 -11
- package/dist-cjs/commands/ListToolsCommand.js +10 -11
- package/dist-cjs/commands/UpdateToolCommand.js +10 -11
- package/dist-cjs/endpoint/EndpointParameters.js +16 -0
- package/dist-cjs/endpoint/bdd.js +28 -0
- package/dist-cjs/endpoint/endpointResolver.js +16 -0
- package/dist-cjs/index.js +4 -1
- package/dist-cjs/models/ToolsServiceException.js +3 -3
- package/dist-cjs/models/enums.js +18 -0
- package/dist-cjs/models/errors.js +99 -0
- package/dist-cjs/models/models_0.js +0 -174
- package/dist-cjs/runtimeConfig.browser.js +11 -11
- package/dist-cjs/runtimeConfig.js +22 -18
- package/dist-cjs/runtimeConfig.shared.js +30 -10
- package/dist-cjs/runtimeExtensions.js +6 -5
- package/dist-cjs/schemas/schemas_0.js +458 -0
- package/dist-es/Tools.js +4 -4
- package/dist-es/ToolsClient.js +30 -21
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commands/CreateToolCommand.js +9 -10
- package/dist-es/commands/DeleteToolCommand.js +9 -10
- package/dist-es/commands/DescribeToolsCommand.js +9 -10
- package/dist-es/commands/DiscoverToolsCommand.js +9 -10
- package/dist-es/commands/ExecuteToolCommand.js +9 -10
- package/dist-es/commands/GetToolCommand.js +9 -10
- package/dist-es/commands/ListToolsCommand.js +9 -10
- package/dist-es/commands/UpdateToolCommand.js +9 -10
- package/dist-es/endpoint/EndpointParameters.js +12 -0
- package/dist-es/endpoint/bdd.js +25 -0
- package/dist-es/endpoint/endpointResolver.js +12 -0
- package/dist-es/index.js +4 -1
- package/dist-es/models/ToolsServiceException.js +1 -1
- package/dist-es/models/enums.js +15 -0
- package/dist-es/models/errors.js +89 -0
- package/dist-es/models/models_0.js +1 -166
- package/dist-es/runtimeConfig.browser.js +7 -7
- package/dist-es/runtimeConfig.js +17 -13
- package/dist-es/runtimeConfig.shared.js +24 -4
- package/dist-es/runtimeExtensions.js +6 -5
- package/dist-es/schemas/schemas_0.js +454 -0
- package/dist-types/Tools.d.ts +9 -9
- package/dist-types/ToolsClient.d.ts +38 -21
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
- package/dist-types/commands/CreateToolCommand.d.ts +11 -7
- package/dist-types/commands/DeleteToolCommand.d.ts +11 -7
- package/dist-types/commands/DescribeToolsCommand.d.ts +11 -7
- package/dist-types/commands/DiscoverToolsCommand.d.ts +11 -7
- package/dist-types/commands/ExecuteToolCommand.d.ts +11 -7
- package/dist-types/commands/GetToolCommand.d.ts +11 -7
- package/dist-types/commands/ListToolsCommand.d.ts +11 -7
- package/dist-types/commands/UpdateToolCommand.d.ts +11 -7
- package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/extensionConfiguration.d.ts +4 -3
- package/dist-types/index.d.ts +5 -1
- package/dist-types/models/ToolsServiceException.d.ts +1 -1
- package/dist-types/models/enums.d.ts +31 -0
- package/dist-types/models/errors.d.ts +90 -0
- package/dist-types/models/models_0.d.ts +32 -136
- package/dist-types/runtimeConfig.browser.d.ts +35 -17
- package/dist-types/runtimeConfig.d.ts +34 -16
- package/dist-types/runtimeConfig.native.d.ts +36 -18
- package/dist-types/runtimeConfig.shared.d.ts +20 -3
- package/dist-types/runtimeExtensions.d.ts +1 -1
- package/dist-types/schemas/schemas_0.d.ts +66 -0
- package/package.json +13 -38
- package/dist-cjs/models/index.js +0 -4
- package/dist-cjs/protocols/Aws_restJson1.js +0 -518
- package/dist-es/models/index.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -499
- package/dist-types/models/index.d.ts +0 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -74
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolMcpAuthorization$ = exports.ToolHandler$ = exports.ToolEmailHandler$ = exports.ToolChatRecipient$ = exports.UpdateToolOutput$ = exports.UpdateToolInput$ = exports.ToolWnsEmailConfig$ = exports.ToolWebhookHeader$ = exports.ToolWebhookConfig$ = exports.ToolWebhookAuthOAuth$ = exports.ToolWebhookAuthBearer$ = exports.ToolWebhookAuthBasic$ = exports.ToolVariable$ = exports.ToolSmtpConfig$ = exports.ToolSmsHandler$ = exports.ToolSmsConfig$ = exports.ToolSearchConfig$ = exports.ToolMcpToolHandler$ = exports.ToolMcpHandler$ = exports.ToolInput$ = exports.ToolExecutionResult$ = exports.ToolDescription$ = exports.ToolCustomEmailConfig$ = exports.ToolChatHandler$ = exports.ToolChatConfig$ = exports.Tool$ = exports.ListToolsOutput$ = exports.ListToolsInput$ = exports.GetToolOutput$ = exports.GetToolInput$ = exports.ExecuteToolOutput$ = exports.ExecuteToolInput$ = exports.DiscoverToolsOutput$ = exports.DiscoverToolsInput$ = exports.DiscoveredTool$ = exports.DescribeToolsOutput$ = exports.DescribeToolsInput$ = exports.DeleteToolOutput$ = exports.DeleteToolInput$ = exports.CreateToolOutput$ = exports.CreateToolInput$ = exports.errorTypeRegistries = exports.ToolExecutionServerException$ = exports.ToolExecutionException$ = exports.ValidationException$ = exports.UnauthorizedException$ = exports.NotFoundException$ = exports.ForbiddenException$ = exports.AlreadyExistException$ = exports.ToolsServiceException$ = void 0;
|
|
4
|
+
exports.UpdateTool$ = exports.ListTools$ = exports.GetTool$ = exports.ExecuteTool$ = exports.DiscoverTools$ = exports.DescribeTools$ = exports.DeleteTool$ = exports.CreateTool$ = exports.ToolWebhookAuth$ = void 0;
|
|
5
|
+
const _AEE = "AlreadyExistException";
|
|
6
|
+
const _CT = "CreateTool";
|
|
7
|
+
const _CTI = "CreateToolInput";
|
|
8
|
+
const _CTO = "CreateToolOutput";
|
|
9
|
+
const _DT = "DiscoveredTool";
|
|
10
|
+
const _DTI = "DeleteToolInput";
|
|
11
|
+
const _DTIe = "DescribeToolsInput";
|
|
12
|
+
const _DTIi = "DiscoverToolsInput";
|
|
13
|
+
const _DTL = "DiscoveredToolList";
|
|
14
|
+
const _DTO = "DeleteToolOutput";
|
|
15
|
+
const _DTOe = "DescribeToolsOutput";
|
|
16
|
+
const _DTOi = "DiscoverToolsOutput";
|
|
17
|
+
const _DTe = "DeleteTool";
|
|
18
|
+
const _DTes = "DescribeTools";
|
|
19
|
+
const _DTi = "DiscoverTools";
|
|
20
|
+
const _ET = "ExecuteTool";
|
|
21
|
+
const _ETI = "ExecuteToolInput";
|
|
22
|
+
const _ETO = "ExecuteToolOutput";
|
|
23
|
+
const _FE = "ForbiddenException";
|
|
24
|
+
const _GT = "GetTool";
|
|
25
|
+
const _GTI = "GetToolInput";
|
|
26
|
+
const _GTO = "GetToolOutput";
|
|
27
|
+
const _LT = "ListTools";
|
|
28
|
+
const _LTI = "ListToolsInput";
|
|
29
|
+
const _LTO = "ListToolsOutput";
|
|
30
|
+
const _NFE = "NotFoundException";
|
|
31
|
+
const _T = "Tool";
|
|
32
|
+
const _TCC = "ToolChatConfig";
|
|
33
|
+
const _TCEC = "ToolCustomEmailConfig";
|
|
34
|
+
const _TCH = "ToolChatHandler";
|
|
35
|
+
const _TCR = "ToolChatRecipient";
|
|
36
|
+
const _TD = "ToolDescription";
|
|
37
|
+
const _TDL = "ToolDescriptionList";
|
|
38
|
+
const _TEE = "ToolExecutionException";
|
|
39
|
+
const _TEH = "ToolEmailHandler";
|
|
40
|
+
const _TER = "ToolExecutionResult";
|
|
41
|
+
const _TESE = "ToolExecutionServerException";
|
|
42
|
+
const _TH = "ToolHandler";
|
|
43
|
+
const _TI = "ToolInput";
|
|
44
|
+
const _TL = "ToolsList";
|
|
45
|
+
const _TMA = "ToolMcpAuthorization";
|
|
46
|
+
const _TMH = "ToolMcpHandler";
|
|
47
|
+
const _TMTH = "ToolMcpToolHandler";
|
|
48
|
+
const _TSC = "ToolSearchConfig";
|
|
49
|
+
const _TSCo = "ToolSmsConfig";
|
|
50
|
+
const _TSCoo = "ToolSmtpConfig";
|
|
51
|
+
const _TSH = "ToolSmsHandler";
|
|
52
|
+
const _TV = "ToolVariable";
|
|
53
|
+
const _TVL = "ToolVariableList";
|
|
54
|
+
const _TWA = "ToolWebhookAuth";
|
|
55
|
+
const _TWAB = "ToolWebhookAuthBasic";
|
|
56
|
+
const _TWABo = "ToolWebhookAuthBearer";
|
|
57
|
+
const _TWAOA = "ToolWebhookAuthOAuth";
|
|
58
|
+
const _TWC = "ToolWebhookConfig";
|
|
59
|
+
const _TWEC = "ToolWnsEmailConfig";
|
|
60
|
+
const _TWH = "ToolWebhookHeader";
|
|
61
|
+
const _TWHL = "ToolWebhookHeadersList";
|
|
62
|
+
const _UE = "UnauthorizedException";
|
|
63
|
+
const _UT = "UpdateTool";
|
|
64
|
+
const _UTI = "UpdateToolInput";
|
|
65
|
+
const _UTO = "UpdateToolOutput";
|
|
66
|
+
const _VE = "ValidationException";
|
|
67
|
+
const _a = "authorization";
|
|
68
|
+
const _au = "auth";
|
|
69
|
+
const _b = "bcc";
|
|
70
|
+
const _bN = "botName";
|
|
71
|
+
const _ba = "basic";
|
|
72
|
+
const _be = "bearer";
|
|
73
|
+
const _bo = "body";
|
|
74
|
+
const _c = "client";
|
|
75
|
+
const _cH = "customHeaders";
|
|
76
|
+
const _cI = "companyId";
|
|
77
|
+
const _cIh = "channelId";
|
|
78
|
+
const _cIl = "clientId";
|
|
79
|
+
const _cS = "clientSecret";
|
|
80
|
+
const _ca = "category";
|
|
81
|
+
const _cc = "cc";
|
|
82
|
+
const _ch = "chat";
|
|
83
|
+
const _co = "company";
|
|
84
|
+
const _con = "config";
|
|
85
|
+
const _cu = "custom";
|
|
86
|
+
const _d = "details";
|
|
87
|
+
const _de = "description";
|
|
88
|
+
const _des = "descriptions";
|
|
89
|
+
const _e = "error";
|
|
90
|
+
const _eD = "excludeDomains";
|
|
91
|
+
const _eU = "endpointUrl";
|
|
92
|
+
const _em = "email";
|
|
93
|
+
const _f = "from";
|
|
94
|
+
const _h = "handler";
|
|
95
|
+
const _hE = "httpError";
|
|
96
|
+
const _hQ = "httpQuery";
|
|
97
|
+
const _he = "headers";
|
|
98
|
+
const _ho = "host";
|
|
99
|
+
const _ht = "html";
|
|
100
|
+
const _htt = "http";
|
|
101
|
+
const _i = "input";
|
|
102
|
+
const _iD = "includeDomains";
|
|
103
|
+
const _iS = "inputSchema";
|
|
104
|
+
const _id = "ids";
|
|
105
|
+
const _id_ = "id";
|
|
106
|
+
const _m = "message";
|
|
107
|
+
const _mT = "mcpTool";
|
|
108
|
+
const _mTI = "mcpToolId";
|
|
109
|
+
const _mTN = "mcpToolName";
|
|
110
|
+
const _mc = "mcp";
|
|
111
|
+
const _me = "method";
|
|
112
|
+
const _n = "name";
|
|
113
|
+
const _o = "output";
|
|
114
|
+
const _oa = "oauth";
|
|
115
|
+
const _op = "optional";
|
|
116
|
+
const _p = "port";
|
|
117
|
+
const _pa = "password";
|
|
118
|
+
const _r = "result";
|
|
119
|
+
const _rT = "replyTo";
|
|
120
|
+
const _re = "recipient";
|
|
121
|
+
const _s = "smithy.ts.sdk.synthetic.wildix.wim.tools";
|
|
122
|
+
const _sU = "serverUrl";
|
|
123
|
+
const _sc = "schema";
|
|
124
|
+
const _sco = "scope";
|
|
125
|
+
const _se = "server";
|
|
126
|
+
const _sea = "search";
|
|
127
|
+
const _sec = "secure";
|
|
128
|
+
const _ser = "service";
|
|
129
|
+
const _sm = "smtp";
|
|
130
|
+
const _sms = "sms";
|
|
131
|
+
const _su = "subject";
|
|
132
|
+
const _t = "tool";
|
|
133
|
+
const _tI = "toolId";
|
|
134
|
+
const _te = "text";
|
|
135
|
+
const _ti = "timeout";
|
|
136
|
+
const _to = "tools";
|
|
137
|
+
const _to_ = "to";
|
|
138
|
+
const _tok = "token";
|
|
139
|
+
const _ty = "type";
|
|
140
|
+
const _u = "user";
|
|
141
|
+
const _uI = "userId";
|
|
142
|
+
const _ur = "url";
|
|
143
|
+
const _us = "username";
|
|
144
|
+
const _v = "variables";
|
|
145
|
+
const _va = "value";
|
|
146
|
+
const _w = "wns";
|
|
147
|
+
const _we = "webhook";
|
|
148
|
+
const n0 = "smithy.framework";
|
|
149
|
+
const n1 = "wildix.wim.tools";
|
|
150
|
+
const schema_1 = require("@smithy/core/schema");
|
|
151
|
+
const errors_1 = require("../models/errors");
|
|
152
|
+
const ToolsServiceException_1 = require("../models/ToolsServiceException");
|
|
153
|
+
const _s_registry = schema_1.TypeRegistry.for(_s);
|
|
154
|
+
exports.ToolsServiceException$ = [-3, _s, "ToolsServiceException", 0, [], []];
|
|
155
|
+
_s_registry.registerError(exports.ToolsServiceException$, ToolsServiceException_1.ToolsServiceException);
|
|
156
|
+
const n0_registry = schema_1.TypeRegistry.for(n0);
|
|
157
|
+
const n1_registry = schema_1.TypeRegistry.for(n1);
|
|
158
|
+
exports.AlreadyExistException$ = [-3, n0, _AEE,
|
|
159
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
160
|
+
[_m],
|
|
161
|
+
[0], 1
|
|
162
|
+
];
|
|
163
|
+
n0_registry.registerError(exports.AlreadyExistException$, errors_1.AlreadyExistException);
|
|
164
|
+
exports.ForbiddenException$ = [-3, n0, _FE,
|
|
165
|
+
{ [_e]: _c, [_hE]: 403 },
|
|
166
|
+
[_m],
|
|
167
|
+
[0], 1
|
|
168
|
+
];
|
|
169
|
+
n0_registry.registerError(exports.ForbiddenException$, errors_1.ForbiddenException);
|
|
170
|
+
exports.NotFoundException$ = [-3, n0, _NFE,
|
|
171
|
+
{ [_e]: _c, [_hE]: 404 },
|
|
172
|
+
[_m],
|
|
173
|
+
[0], 1
|
|
174
|
+
];
|
|
175
|
+
n0_registry.registerError(exports.NotFoundException$, errors_1.NotFoundException);
|
|
176
|
+
exports.UnauthorizedException$ = [-3, n0, _UE,
|
|
177
|
+
{ [_e]: _c, [_hE]: 401 },
|
|
178
|
+
[_m],
|
|
179
|
+
[0], 1
|
|
180
|
+
];
|
|
181
|
+
n0_registry.registerError(exports.UnauthorizedException$, errors_1.UnauthorizedException);
|
|
182
|
+
exports.ValidationException$ = [-3, n0, _VE,
|
|
183
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
184
|
+
[_m],
|
|
185
|
+
[0], 1
|
|
186
|
+
];
|
|
187
|
+
n0_registry.registerError(exports.ValidationException$, errors_1.ValidationException);
|
|
188
|
+
exports.ToolExecutionException$ = [-3, n1, _TEE,
|
|
189
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
190
|
+
[_m, _d],
|
|
191
|
+
[0, 15], 1
|
|
192
|
+
];
|
|
193
|
+
n1_registry.registerError(exports.ToolExecutionException$, errors_1.ToolExecutionException);
|
|
194
|
+
exports.ToolExecutionServerException$ = [-3, n1, _TESE,
|
|
195
|
+
{ [_e]: _se, [_hE]: 500 },
|
|
196
|
+
[_m, _d],
|
|
197
|
+
[0, 15], 1
|
|
198
|
+
];
|
|
199
|
+
n1_registry.registerError(exports.ToolExecutionServerException$, errors_1.ToolExecutionServerException);
|
|
200
|
+
exports.errorTypeRegistries = [
|
|
201
|
+
_s_registry,
|
|
202
|
+
n0_registry,
|
|
203
|
+
n1_registry,
|
|
204
|
+
];
|
|
205
|
+
exports.CreateToolInput$ = [3, n1, _CTI,
|
|
206
|
+
0,
|
|
207
|
+
[_n, _ca, _de, _i, _h, _cI],
|
|
208
|
+
[0, 0, 0, () => exports.ToolInput$, () => exports.ToolHandler$, [0, { [_hQ]: _co }]], 5
|
|
209
|
+
];
|
|
210
|
+
exports.CreateToolOutput$ = [3, n1, _CTO,
|
|
211
|
+
0,
|
|
212
|
+
[_t],
|
|
213
|
+
[() => exports.Tool$], 1
|
|
214
|
+
];
|
|
215
|
+
exports.DeleteToolInput$ = [3, n1, _DTI,
|
|
216
|
+
0,
|
|
217
|
+
[_tI, _cI],
|
|
218
|
+
[[0, 1], [0, { [_hQ]: _co }]], 1
|
|
219
|
+
];
|
|
220
|
+
exports.DeleteToolOutput$ = [3, n1, _DTO,
|
|
221
|
+
0,
|
|
222
|
+
[],
|
|
223
|
+
[]
|
|
224
|
+
];
|
|
225
|
+
exports.DescribeToolsInput$ = [3, n1, _DTIe,
|
|
226
|
+
0,
|
|
227
|
+
[_id, _cI],
|
|
228
|
+
[64 | 0, [0, { [_hQ]: _co }]], 1
|
|
229
|
+
];
|
|
230
|
+
exports.DescribeToolsOutput$ = [3, n1, _DTOe,
|
|
231
|
+
0,
|
|
232
|
+
[_des],
|
|
233
|
+
[() => ToolDescriptionList], 1
|
|
234
|
+
];
|
|
235
|
+
exports.DiscoveredTool$ = [3, n1, _DT,
|
|
236
|
+
0,
|
|
237
|
+
[_n, _de, _iS],
|
|
238
|
+
[0, 0, 15], 3
|
|
239
|
+
];
|
|
240
|
+
exports.DiscoverToolsInput$ = [3, n1, _DTIi,
|
|
241
|
+
0,
|
|
242
|
+
[_sU, _cI, _a],
|
|
243
|
+
[0, [0, { [_hQ]: _co }], () => exports.ToolMcpAuthorization$], 1
|
|
244
|
+
];
|
|
245
|
+
exports.DiscoverToolsOutput$ = [3, n1, _DTOi,
|
|
246
|
+
0,
|
|
247
|
+
[_to],
|
|
248
|
+
[() => DiscoveredToolList], 1
|
|
249
|
+
];
|
|
250
|
+
exports.ExecuteToolInput$ = [3, n1, _ETI,
|
|
251
|
+
0,
|
|
252
|
+
[_id_, _i, _cI, _ser, _u],
|
|
253
|
+
[0, 15, [0, { [_hQ]: _co }], 0, 0], 2
|
|
254
|
+
];
|
|
255
|
+
exports.ExecuteToolOutput$ = [3, n1, _ETO,
|
|
256
|
+
0,
|
|
257
|
+
[_r],
|
|
258
|
+
[() => exports.ToolExecutionResult$], 1
|
|
259
|
+
];
|
|
260
|
+
exports.GetToolInput$ = [3, n1, _GTI,
|
|
261
|
+
0,
|
|
262
|
+
[_tI, _cI],
|
|
263
|
+
[[0, 1], [0, { [_hQ]: _co }]], 1
|
|
264
|
+
];
|
|
265
|
+
exports.GetToolOutput$ = [3, n1, _GTO,
|
|
266
|
+
0,
|
|
267
|
+
[_t],
|
|
268
|
+
[() => exports.Tool$], 1
|
|
269
|
+
];
|
|
270
|
+
exports.ListToolsInput$ = [3, n1, _LTI,
|
|
271
|
+
0,
|
|
272
|
+
[_cI],
|
|
273
|
+
[[0, { [_hQ]: _co }]]
|
|
274
|
+
];
|
|
275
|
+
exports.ListToolsOutput$ = [3, n1, _LTO,
|
|
276
|
+
0,
|
|
277
|
+
[_to],
|
|
278
|
+
[() => ToolsList], 1
|
|
279
|
+
];
|
|
280
|
+
exports.Tool$ = [3, n1, _T,
|
|
281
|
+
0,
|
|
282
|
+
[_id_, _cI, _n, _ca, _de, _i, _h],
|
|
283
|
+
[0, 0, 0, 0, 0, () => exports.ToolInput$, () => exports.ToolHandler$], 7
|
|
284
|
+
];
|
|
285
|
+
exports.ToolChatConfig$ = [3, n1, _TCC,
|
|
286
|
+
0,
|
|
287
|
+
[_re, _te, _bN],
|
|
288
|
+
[() => exports.ToolChatRecipient$, 0, 0], 3
|
|
289
|
+
];
|
|
290
|
+
exports.ToolChatHandler$ = [3, n1, _TCH,
|
|
291
|
+
0,
|
|
292
|
+
[_con],
|
|
293
|
+
[() => exports.ToolChatConfig$], 1
|
|
294
|
+
];
|
|
295
|
+
exports.ToolCustomEmailConfig$ = [3, n1, _TCEC,
|
|
296
|
+
0,
|
|
297
|
+
[_sm, _f, _to_, _su, _te, _ht, _cc, _b, _rT],
|
|
298
|
+
[() => exports.ToolSmtpConfig$, 0, 0, 0, 0, 0, 0, 0, 0], 5
|
|
299
|
+
];
|
|
300
|
+
exports.ToolDescription$ = [3, n1, _TD,
|
|
301
|
+
0,
|
|
302
|
+
[_id_, _n, _de, _v],
|
|
303
|
+
[0, 0, 0, () => ToolVariableList], 4
|
|
304
|
+
];
|
|
305
|
+
exports.ToolExecutionResult$ = [3, n1, _TER,
|
|
306
|
+
0,
|
|
307
|
+
[_o],
|
|
308
|
+
[15], 1
|
|
309
|
+
];
|
|
310
|
+
exports.ToolInput$ = [3, n1, _TI,
|
|
311
|
+
0,
|
|
312
|
+
[_v],
|
|
313
|
+
[() => ToolVariableList], 1
|
|
314
|
+
];
|
|
315
|
+
exports.ToolMcpHandler$ = [3, n1, _TMH,
|
|
316
|
+
0,
|
|
317
|
+
[_sU, _to, _a],
|
|
318
|
+
[0, 64 | 0, () => exports.ToolMcpAuthorization$], 2
|
|
319
|
+
];
|
|
320
|
+
exports.ToolMcpToolHandler$ = [3, n1, _TMTH,
|
|
321
|
+
0,
|
|
322
|
+
[_mTI, _mTN],
|
|
323
|
+
[0, 0], 2
|
|
324
|
+
];
|
|
325
|
+
exports.ToolSearchConfig$ = [3, n1, _TSC,
|
|
326
|
+
0,
|
|
327
|
+
[_iD, _eD],
|
|
328
|
+
[64 | 0, 64 | 0]
|
|
329
|
+
];
|
|
330
|
+
exports.ToolSmsConfig$ = [3, n1, _TSCo,
|
|
331
|
+
0,
|
|
332
|
+
[_f, _to_, _m],
|
|
333
|
+
[0, 0, 0], 3
|
|
334
|
+
];
|
|
335
|
+
exports.ToolSmsHandler$ = [3, n1, _TSH,
|
|
336
|
+
0,
|
|
337
|
+
[_con],
|
|
338
|
+
[() => exports.ToolSmsConfig$], 1
|
|
339
|
+
];
|
|
340
|
+
exports.ToolSmtpConfig$ = [3, n1, _TSCoo,
|
|
341
|
+
0,
|
|
342
|
+
[_ho, _p, _us, _pa, _sec],
|
|
343
|
+
[0, 1, 0, 0, 2], 5
|
|
344
|
+
];
|
|
345
|
+
exports.ToolVariable$ = [3, n1, _TV,
|
|
346
|
+
0,
|
|
347
|
+
[_n, _ty, _op, _de, _sc],
|
|
348
|
+
[0, 0, 2, 0, 15], 3
|
|
349
|
+
];
|
|
350
|
+
exports.ToolWebhookAuthBasic$ = [3, n1, _TWAB,
|
|
351
|
+
0,
|
|
352
|
+
[_us, _pa],
|
|
353
|
+
[0, 0], 2
|
|
354
|
+
];
|
|
355
|
+
exports.ToolWebhookAuthBearer$ = [3, n1, _TWABo,
|
|
356
|
+
0,
|
|
357
|
+
[_tok],
|
|
358
|
+
[0], 1
|
|
359
|
+
];
|
|
360
|
+
exports.ToolWebhookAuthOAuth$ = [3, n1, _TWAOA,
|
|
361
|
+
0,
|
|
362
|
+
[_cIl, _cS, _eU, _sco],
|
|
363
|
+
[0, 0, 0, 0], 3
|
|
364
|
+
];
|
|
365
|
+
exports.ToolWebhookConfig$ = [3, n1, _TWC,
|
|
366
|
+
0,
|
|
367
|
+
[_me, _ur, _he, _bo, _au, _ti],
|
|
368
|
+
[0, 0, () => ToolWebhookHeadersList, 0, () => exports.ToolWebhookAuth$, 1], 2
|
|
369
|
+
];
|
|
370
|
+
exports.ToolWebhookHeader$ = [3, n1, _TWH,
|
|
371
|
+
0,
|
|
372
|
+
[_n, _va],
|
|
373
|
+
[0, 0], 2
|
|
374
|
+
];
|
|
375
|
+
exports.ToolWnsEmailConfig$ = [3, n1, _TWEC,
|
|
376
|
+
0,
|
|
377
|
+
[_to_, _su, _te],
|
|
378
|
+
[0, 0, 0], 3
|
|
379
|
+
];
|
|
380
|
+
exports.UpdateToolInput$ = [3, n1, _UTI,
|
|
381
|
+
0,
|
|
382
|
+
[_tI, _n, _ca, _de, _i, _h, _cI],
|
|
383
|
+
[[0, 1], 0, 0, 0, () => exports.ToolInput$, () => exports.ToolHandler$, [0, { [_hQ]: _co }]], 6
|
|
384
|
+
];
|
|
385
|
+
exports.UpdateToolOutput$ = [3, n1, _UTO,
|
|
386
|
+
0,
|
|
387
|
+
[_t],
|
|
388
|
+
[() => exports.Tool$], 1
|
|
389
|
+
];
|
|
390
|
+
var DiscoveredToolList = [1, n1, _DTL,
|
|
391
|
+
0, () => exports.DiscoveredTool$
|
|
392
|
+
];
|
|
393
|
+
var ToolDescriptionList = [1, n1, _TDL,
|
|
394
|
+
0, () => exports.ToolDescription$
|
|
395
|
+
];
|
|
396
|
+
var ToolIdList = 64 | 0;
|
|
397
|
+
var ToolMcpEnabledToolsList = 64 | 0;
|
|
398
|
+
var ToolSearchExcludeDomainsList = 64 | 0;
|
|
399
|
+
var ToolSearchIncludeDomainsList = 64 | 0;
|
|
400
|
+
var ToolsList = [1, n1, _TL,
|
|
401
|
+
0, () => exports.Tool$
|
|
402
|
+
];
|
|
403
|
+
var ToolVariableList = [1, n1, _TVL,
|
|
404
|
+
0, () => exports.ToolVariable$
|
|
405
|
+
];
|
|
406
|
+
var ToolWebhookHeadersList = [1, n1, _TWHL,
|
|
407
|
+
0, () => exports.ToolWebhookHeader$
|
|
408
|
+
];
|
|
409
|
+
var ToolMcpHeadersMap = 128 | 0;
|
|
410
|
+
exports.ToolChatRecipient$ = [4, n1, _TCR,
|
|
411
|
+
0,
|
|
412
|
+
[_cIh, _uI],
|
|
413
|
+
[0, 0]
|
|
414
|
+
];
|
|
415
|
+
exports.ToolEmailHandler$ = [4, n1, _TEH,
|
|
416
|
+
0,
|
|
417
|
+
[_w, _cu],
|
|
418
|
+
[() => exports.ToolWnsEmailConfig$, () => exports.ToolCustomEmailConfig$]
|
|
419
|
+
];
|
|
420
|
+
exports.ToolHandler$ = [4, n1, _TH,
|
|
421
|
+
0,
|
|
422
|
+
[_em, _we, _sea, _ch, _sms, _mc, _mT],
|
|
423
|
+
[() => exports.ToolEmailHandler$, () => exports.ToolWebhookConfig$, () => exports.ToolSearchConfig$, () => exports.ToolChatHandler$, () => exports.ToolSmsHandler$, () => exports.ToolMcpHandler$, () => exports.ToolMcpToolHandler$]
|
|
424
|
+
];
|
|
425
|
+
exports.ToolMcpAuthorization$ = [4, n1, _TMA,
|
|
426
|
+
0,
|
|
427
|
+
[_be, _cH],
|
|
428
|
+
[() => exports.ToolWebhookAuthBearer$, 128 | 0]
|
|
429
|
+
];
|
|
430
|
+
exports.ToolWebhookAuth$ = [4, n1, _TWA,
|
|
431
|
+
0,
|
|
432
|
+
[_ba, _be, _oa],
|
|
433
|
+
[() => exports.ToolWebhookAuthBasic$, () => exports.ToolWebhookAuthBearer$, () => exports.ToolWebhookAuthOAuth$]
|
|
434
|
+
];
|
|
435
|
+
exports.CreateTool$ = [9, n1, _CT,
|
|
436
|
+
{ [_htt]: ["POST", "/v1/tools", 201] }, () => exports.CreateToolInput$, () => exports.CreateToolOutput$
|
|
437
|
+
];
|
|
438
|
+
exports.DeleteTool$ = [9, n1, _DTe,
|
|
439
|
+
{ [_htt]: ["DELETE", "/v1/tools/{toolId}", 204] }, () => exports.DeleteToolInput$, () => exports.DeleteToolOutput$
|
|
440
|
+
];
|
|
441
|
+
exports.DescribeTools$ = [9, n1, _DTes,
|
|
442
|
+
{ [_htt]: ["POST", "/v1/tools/describe", 200] }, () => exports.DescribeToolsInput$, () => exports.DescribeToolsOutput$
|
|
443
|
+
];
|
|
444
|
+
exports.DiscoverTools$ = [9, n1, _DTi,
|
|
445
|
+
{ [_htt]: ["POST", "/v1/tools/discover", 200] }, () => exports.DiscoverToolsInput$, () => exports.DiscoverToolsOutput$
|
|
446
|
+
];
|
|
447
|
+
exports.ExecuteTool$ = [9, n1, _ET,
|
|
448
|
+
{ [_htt]: ["POST", "/v1/tools/execute", 200] }, () => exports.ExecuteToolInput$, () => exports.ExecuteToolOutput$
|
|
449
|
+
];
|
|
450
|
+
exports.GetTool$ = [9, n1, _GT,
|
|
451
|
+
{ [_htt]: ["GET", "/v1/tools/{toolId}", 200] }, () => exports.GetToolInput$, () => exports.GetToolOutput$
|
|
452
|
+
];
|
|
453
|
+
exports.ListTools$ = [9, n1, _LT,
|
|
454
|
+
{ [_htt]: ["GET", "/v1/tools", 200] }, () => exports.ListToolsInput$, () => exports.ListToolsOutput$
|
|
455
|
+
];
|
|
456
|
+
exports.UpdateTool$ = [9, n1, _UT,
|
|
457
|
+
{ [_htt]: ["PUT", "/v1/tools/{toolId}", 200] }, () => exports.UpdateToolInput$, () => exports.UpdateToolOutput$
|
|
458
|
+
];
|
package/dist-es/Tools.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createAggregatedClient } from "@smithy/core/client";
|
|
2
2
|
import { CreateToolCommand, } from "./commands/CreateToolCommand";
|
|
3
3
|
import { DeleteToolCommand, } from "./commands/DeleteToolCommand";
|
|
4
4
|
import { DescribeToolsCommand, } from "./commands/DescribeToolsCommand";
|
|
5
5
|
import { DiscoverToolsCommand, } from "./commands/DiscoverToolsCommand";
|
|
6
6
|
import { ExecuteToolCommand, } from "./commands/ExecuteToolCommand";
|
|
7
|
-
import { GetToolCommand
|
|
8
|
-
import { ListToolsCommand
|
|
7
|
+
import { GetToolCommand } from "./commands/GetToolCommand";
|
|
8
|
+
import { ListToolsCommand } from "./commands/ListToolsCommand";
|
|
9
9
|
import { UpdateToolCommand, } from "./commands/UpdateToolCommand";
|
|
10
|
-
import {
|
|
10
|
+
import { ToolsClient } from "./ToolsClient";
|
|
11
11
|
const commands = {
|
|
12
12
|
CreateToolCommand,
|
|
13
13
|
DeleteToolCommand,
|
package/dist-es/ToolsClient.js
CHANGED
|
@@ -1,34 +1,43 @@
|
|
|
1
|
+
import { getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, getUserAgentPlugin, resolveHostHeaderConfig, resolveUserAgentConfig, } from "@aws-sdk/core/client";
|
|
2
|
+
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
3
|
+
import { Client as __Client, } from "@smithy/core/client";
|
|
4
|
+
import { resolveEndpointConfig } from "@smithy/core/endpoints";
|
|
5
|
+
import { getContentLengthPlugin } from "@smithy/core/protocols";
|
|
6
|
+
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/core/retry";
|
|
7
|
+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
|
|
8
|
+
import { defaultToolsHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
|
|
9
|
+
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
1
10
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
2
|
-
import { resolveRuntimeExtensions
|
|
3
|
-
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
4
|
-
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
5
|
-
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
|
|
6
|
-
import { Client as __Client, } from "@smithy/smithy-client";
|
|
7
|
-
import { authorizationMiddleware } from '@wildix/smithy-utils';
|
|
11
|
+
import { resolveRuntimeExtensions } from "./runtimeExtensions";
|
|
8
12
|
export { __Client };
|
|
9
13
|
export class ToolsClient extends __Client {
|
|
10
14
|
config;
|
|
11
15
|
constructor(...[configuration]) {
|
|
12
|
-
|
|
16
|
+
const _config_0 = __getRuntimeConfig(configuration || {});
|
|
13
17
|
super(_config_0);
|
|
14
18
|
this.initConfig = _config_0;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
const config = { ..._config_3, endpoint };
|
|
27
|
-
this.config = config;
|
|
28
|
-
this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
|
|
19
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
20
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
21
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
22
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
23
|
+
const _config_5 = resolveEndpointConfig(_config_4);
|
|
24
|
+
const _config_6 = resolveHttpAuthSchemeConfig(_config_5);
|
|
25
|
+
const _config_7 = resolveRuntimeExtensions(_config_6, configuration?.extensions || []);
|
|
26
|
+
this.config = _config_7;
|
|
27
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
29
28
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
30
29
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
31
30
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
31
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
32
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
34
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
35
|
+
httpAuthSchemeParametersProvider: defaultToolsHttpAuthSchemeParametersProvider,
|
|
36
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
37
|
+
"smithy.api#httpBearerAuth": config.token,
|
|
38
|
+
}),
|
|
39
|
+
}));
|
|
40
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
32
41
|
}
|
|
33
42
|
destroy() {
|
|
34
43
|
super.destroy();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
2
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
3
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
4
|
+
let _token = runtimeConfig.token;
|
|
5
|
+
return {
|
|
6
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
7
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
8
|
+
if (index === -1) {
|
|
9
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
httpAuthSchemes() {
|
|
16
|
+
return _httpAuthSchemes;
|
|
17
|
+
},
|
|
18
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
19
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
20
|
+
},
|
|
21
|
+
httpAuthSchemeProvider() {
|
|
22
|
+
return _httpAuthSchemeProvider;
|
|
23
|
+
},
|
|
24
|
+
setToken(token) {
|
|
25
|
+
_token = token;
|
|
26
|
+
},
|
|
27
|
+
token() {
|
|
28
|
+
return _token;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export const resolveHttpAuthRuntimeConfig = (config) => {
|
|
33
|
+
return {
|
|
34
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
35
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
36
|
+
token: config.token(),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider } from "@smithy/core";
|
|
2
|
+
import { getSmithyContext, normalizeProvider } from "@smithy/core/client";
|
|
3
|
+
export const defaultToolsHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
|
+
return {
|
|
5
|
+
operation: getSmithyContext(context).operation,
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
|
|
9
|
+
return {
|
|
10
|
+
schemeId: "smithy.api#httpBearerAuth",
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function createWildixAuthPbxHttpAuthOption(authParameters) {
|
|
14
|
+
return {
|
|
15
|
+
schemeId: "wildix.auth#pbx",
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function createWildixAuthS2sHttpAuthOption(authParameters) {
|
|
19
|
+
return {
|
|
20
|
+
schemeId: "wildix.auth#s2s",
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export const defaultToolsHttpAuthSchemeProvider = (authParameters) => {
|
|
24
|
+
const options = [];
|
|
25
|
+
switch (authParameters.operation) {
|
|
26
|
+
default: {
|
|
27
|
+
options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters));
|
|
28
|
+
options.push(createWildixAuthS2sHttpAuthOption(authParameters));
|
|
29
|
+
options.push(createWildixAuthPbxHttpAuthOption(authParameters));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return options;
|
|
33
|
+
};
|
|
34
|
+
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
35
|
+
const token = memoizeIdentityProvider(config.token, isIdentityExpired, doesIdentityRequireRefresh);
|
|
36
|
+
return Object.assign(config, {
|
|
37
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
38
|
+
token,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { CreateTool$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class CreateToolCommand extends $Command
|
|
6
|
+
export class CreateToolCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("Tools", "CreateTool", {})
|
|
12
13
|
.n("ToolsClient", "CreateToolCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_CreateToolCommand)
|
|
15
|
-
.de(de_CreateToolCommand)
|
|
14
|
+
.sc(CreateTool$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { getEndpointPlugin } from "@smithy/core/endpoints";
|
|
3
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
4
|
+
import { DeleteTool$ } from "../schemas/schemas_0";
|
|
4
5
|
export { $Command };
|
|
5
|
-
export class DeleteToolCommand extends $Command
|
|
6
|
+
export class DeleteToolCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
6
9
|
.m(function (Command, cs, config, o) {
|
|
7
|
-
return [
|
|
8
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
9
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
10
11
|
})
|
|
11
12
|
.s("Tools", "DeleteTool", {})
|
|
12
13
|
.n("ToolsClient", "DeleteToolCommand")
|
|
13
|
-
.
|
|
14
|
-
.ser(se_DeleteToolCommand)
|
|
15
|
-
.de(de_DeleteToolCommand)
|
|
14
|
+
.sc(DeleteTool$)
|
|
16
15
|
.build() {
|
|
17
16
|
}
|