@wildix/wim-tools-client 1.0.0 → 1.0.1
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 +14 -1
- package/dist-cjs/protocols/Aws_restJson1.js +19 -3
- package/dist-es/models/models_0.js +12 -0
- package/dist-es/protocols/Aws_restJson1.js +20 -4
- package/dist-types/commands/CreateToolCommand.d.ts +14 -2
- package/dist-types/commands/DeleteToolCommand.d.ts +4 -0
- package/dist-types/commands/DescribeToolsCommand.d.ts +4 -0
- package/dist-types/commands/DiscoverToolsCommand.d.ts +4 -0
- package/dist-types/commands/ExecuteToolCommand.d.ts +2 -0
- package/dist-types/commands/GetToolCommand.d.ts +9 -1
- package/dist-types/commands/ListToolsCommand.d.ts +9 -1
- package/dist-types/commands/UpdateToolCommand.d.ts +14 -2
- package/dist-types/models/models_0.d.ts +18 -2
- package/package.json +2 -2
|
@@ -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.ToolMcpAuthorization = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
|
|
3
|
+
exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolMcpAuthorization = exports.ToolEmailHandler = exports.ToolChatRecipient = exports.ValidationException = exports.UnauthorizedException = 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";
|
|
@@ -41,6 +41,19 @@ class NotFoundException extends ToolsServiceException_1.ToolsServiceException {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
exports.NotFoundException = NotFoundException;
|
|
44
|
+
class UnauthorizedException extends ToolsServiceException_1.ToolsServiceException {
|
|
45
|
+
name = "UnauthorizedException";
|
|
46
|
+
$fault = "client";
|
|
47
|
+
constructor(opts) {
|
|
48
|
+
super({
|
|
49
|
+
name: "UnauthorizedException",
|
|
50
|
+
$fault: "client",
|
|
51
|
+
...opts
|
|
52
|
+
});
|
|
53
|
+
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.UnauthorizedException = UnauthorizedException;
|
|
44
57
|
class ValidationException extends ToolsServiceException_1.ToolsServiceException {
|
|
45
58
|
name = "ValidationException";
|
|
46
59
|
$fault = "client";
|
|
@@ -292,6 +292,9 @@ const de_CommandError = async (output, context) => {
|
|
|
292
292
|
case "AlreadyExistException":
|
|
293
293
|
case "smithy.framework#AlreadyExistException":
|
|
294
294
|
throw await de_AlreadyExistExceptionRes(parsedOutput, context);
|
|
295
|
+
case "ForbiddenException":
|
|
296
|
+
case "smithy.framework#ForbiddenException":
|
|
297
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
295
298
|
case "NotFoundException":
|
|
296
299
|
case "smithy.framework#NotFoundException":
|
|
297
300
|
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
@@ -301,12 +304,12 @@ const de_CommandError = async (output, context) => {
|
|
|
301
304
|
case "ToolExecutionServerException":
|
|
302
305
|
case "wildix.wim.tools#ToolExecutionServerException":
|
|
303
306
|
throw await de_ToolExecutionServerExceptionRes(parsedOutput, context);
|
|
307
|
+
case "UnauthorizedException":
|
|
308
|
+
case "smithy.framework#UnauthorizedException":
|
|
309
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
304
310
|
case "ValidationException":
|
|
305
311
|
case "smithy.framework#ValidationException":
|
|
306
312
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
307
|
-
case "ForbiddenException":
|
|
308
|
-
case "smithy.framework#ForbiddenException":
|
|
309
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
310
313
|
default:
|
|
311
314
|
const parsedBody = parsedOutput.body;
|
|
312
315
|
return throwDefaultError({
|
|
@@ -356,6 +359,19 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
356
359
|
});
|
|
357
360
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
358
361
|
};
|
|
362
|
+
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
363
|
+
const contents = (0, smithy_client_1.map)({});
|
|
364
|
+
const data = parsedOutput.body;
|
|
365
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
366
|
+
'message': smithy_client_1.expectString,
|
|
367
|
+
});
|
|
368
|
+
Object.assign(contents, doc);
|
|
369
|
+
const exception = new models_0_1.UnauthorizedException({
|
|
370
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
371
|
+
...contents
|
|
372
|
+
});
|
|
373
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
374
|
+
};
|
|
359
375
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
360
376
|
const contents = (0, smithy_client_1.map)({});
|
|
361
377
|
const data = parsedOutput.body;
|
|
@@ -35,6 +35,18 @@ export class NotFoundException extends __BaseException {
|
|
|
35
35
|
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
export class UnauthorizedException extends __BaseException {
|
|
39
|
+
name = "UnauthorizedException";
|
|
40
|
+
$fault = "client";
|
|
41
|
+
constructor(opts) {
|
|
42
|
+
super({
|
|
43
|
+
name: "UnauthorizedException",
|
|
44
|
+
$fault: "client",
|
|
45
|
+
...opts
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
38
50
|
export class ValidationException extends __BaseException {
|
|
39
51
|
name = "ValidationException";
|
|
40
52
|
$fault = "client";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ToolsServiceException as __BaseException } from "../models/ToolsServiceException";
|
|
2
|
-
import { AlreadyExistException, ForbiddenException, NotFoundException, ToolExecutionException, ToolExecutionServerException, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { AlreadyExistException, ForbiddenException, NotFoundException, ToolExecutionException, ToolExecutionServerException, UnauthorizedException, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
5
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
@@ -273,6 +273,9 @@ const de_CommandError = async (output, context) => {
|
|
|
273
273
|
case "AlreadyExistException":
|
|
274
274
|
case "smithy.framework#AlreadyExistException":
|
|
275
275
|
throw await de_AlreadyExistExceptionRes(parsedOutput, context);
|
|
276
|
+
case "ForbiddenException":
|
|
277
|
+
case "smithy.framework#ForbiddenException":
|
|
278
|
+
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
276
279
|
case "NotFoundException":
|
|
277
280
|
case "smithy.framework#NotFoundException":
|
|
278
281
|
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
@@ -282,12 +285,12 @@ const de_CommandError = async (output, context) => {
|
|
|
282
285
|
case "ToolExecutionServerException":
|
|
283
286
|
case "wildix.wim.tools#ToolExecutionServerException":
|
|
284
287
|
throw await de_ToolExecutionServerExceptionRes(parsedOutput, context);
|
|
288
|
+
case "UnauthorizedException":
|
|
289
|
+
case "smithy.framework#UnauthorizedException":
|
|
290
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
285
291
|
case "ValidationException":
|
|
286
292
|
case "smithy.framework#ValidationException":
|
|
287
293
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
288
|
-
case "ForbiddenException":
|
|
289
|
-
case "smithy.framework#ForbiddenException":
|
|
290
|
-
throw await de_ForbiddenExceptionRes(parsedOutput, context);
|
|
291
294
|
default:
|
|
292
295
|
const parsedBody = parsedOutput.body;
|
|
293
296
|
return throwDefaultError({
|
|
@@ -337,6 +340,19 @@ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
337
340
|
});
|
|
338
341
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
339
342
|
};
|
|
343
|
+
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
344
|
+
const contents = map({});
|
|
345
|
+
const data = parsedOutput.body;
|
|
346
|
+
const doc = take(data, {
|
|
347
|
+
'message': __expectString,
|
|
348
|
+
});
|
|
349
|
+
Object.assign(contents, doc);
|
|
350
|
+
const exception = new UnauthorizedException({
|
|
351
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
352
|
+
...contents
|
|
353
|
+
});
|
|
354
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
355
|
+
};
|
|
340
356
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
341
357
|
const contents = map({});
|
|
342
358
|
const data = parsedOutput.body;
|
|
@@ -102,7 +102,11 @@ declare const CreateToolCommand_base: {
|
|
|
102
102
|
* },
|
|
103
103
|
* timeout: Number("int"),
|
|
104
104
|
* },
|
|
105
|
-
* search: {
|
|
105
|
+
* search: { // ToolSearchConfig
|
|
106
|
+
* includeDomains: [ // ToolSearchIncludeDomainsList
|
|
107
|
+
* "STRING_VALUE",
|
|
108
|
+
* ],
|
|
109
|
+
* },
|
|
106
110
|
* chat: { // ToolChatHandler
|
|
107
111
|
* config: { // ToolChatConfig
|
|
108
112
|
* recipient: { // ToolChatRecipient Union: only one key present
|
|
@@ -212,7 +216,11 @@ declare const CreateToolCommand_base: {
|
|
|
212
216
|
* // },
|
|
213
217
|
* // timeout: Number("int"),
|
|
214
218
|
* // },
|
|
215
|
-
* // search: {
|
|
219
|
+
* // search: { // ToolSearchConfig
|
|
220
|
+
* // includeDomains: [ // ToolSearchIncludeDomainsList
|
|
221
|
+
* // "STRING_VALUE",
|
|
222
|
+
* // ],
|
|
223
|
+
* // },
|
|
216
224
|
* // chat: { // ToolChatHandler
|
|
217
225
|
* // config: { // ToolChatConfig
|
|
218
226
|
* // recipient: { // ToolChatRecipient Union: only one key present
|
|
@@ -264,6 +272,10 @@ declare const CreateToolCommand_base: {
|
|
|
264
272
|
*
|
|
265
273
|
* @throws {@link AlreadyExistException} (client fault)
|
|
266
274
|
*
|
|
275
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
276
|
+
*
|
|
277
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
278
|
+
*
|
|
267
279
|
* @throws {@link NotFoundException} (client fault)
|
|
268
280
|
*
|
|
269
281
|
* @throws {@link ToolExecutionException} (client fault)
|
|
@@ -54,6 +54,10 @@ declare const DeleteToolCommand_base: {
|
|
|
54
54
|
*
|
|
55
55
|
* @throws {@link NotFoundException} (client fault)
|
|
56
56
|
*
|
|
57
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
60
|
+
*
|
|
57
61
|
* @throws {@link AlreadyExistException} (client fault)
|
|
58
62
|
*
|
|
59
63
|
* @throws {@link ToolExecutionException} (client fault)
|
|
@@ -71,6 +71,10 @@ declare const DescribeToolsCommand_base: {
|
|
|
71
71
|
*
|
|
72
72
|
* @throws {@link ValidationException} (client fault)
|
|
73
73
|
*
|
|
74
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
77
|
+
*
|
|
74
78
|
* @throws {@link NotFoundException} (client fault)
|
|
75
79
|
*
|
|
76
80
|
* @throws {@link AlreadyExistException} (client fault)
|
|
@@ -68,6 +68,10 @@ declare const DiscoverToolsCommand_base: {
|
|
|
68
68
|
*
|
|
69
69
|
* @throws {@link ValidationException} (client fault)
|
|
70
70
|
*
|
|
71
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
74
|
+
*
|
|
71
75
|
* @throws {@link NotFoundException} (client fault)
|
|
72
76
|
*
|
|
73
77
|
* @throws {@link AlreadyExistException} (client fault)
|
|
@@ -67,6 +67,8 @@ declare const ExecuteToolCommand_base: {
|
|
|
67
67
|
*
|
|
68
68
|
* @throws {@link ToolExecutionServerException} (server fault)
|
|
69
69
|
*
|
|
70
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
71
|
+
*
|
|
70
72
|
* @throws {@link AlreadyExistException} (client fault)
|
|
71
73
|
*
|
|
72
74
|
* @throws {@link ToolsServiceException}
|
|
@@ -110,7 +110,11 @@ declare const GetToolCommand_base: {
|
|
|
110
110
|
* // },
|
|
111
111
|
* // timeout: Number("int"),
|
|
112
112
|
* // },
|
|
113
|
-
* // search: {
|
|
113
|
+
* // search: { // ToolSearchConfig
|
|
114
|
+
* // includeDomains: [ // ToolSearchIncludeDomainsList
|
|
115
|
+
* // "STRING_VALUE",
|
|
116
|
+
* // ],
|
|
117
|
+
* // },
|
|
114
118
|
* // chat: { // ToolChatHandler
|
|
115
119
|
* // config: { // ToolChatConfig
|
|
116
120
|
* // recipient: { // ToolChatRecipient Union: only one key present
|
|
@@ -162,6 +166,10 @@ declare const GetToolCommand_base: {
|
|
|
162
166
|
*
|
|
163
167
|
* @throws {@link NotFoundException} (client fault)
|
|
164
168
|
*
|
|
169
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
170
|
+
*
|
|
171
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
172
|
+
*
|
|
165
173
|
* @throws {@link AlreadyExistException} (client fault)
|
|
166
174
|
*
|
|
167
175
|
* @throws {@link ToolExecutionException} (client fault)
|
|
@@ -110,7 +110,11 @@ declare const ListToolsCommand_base: {
|
|
|
110
110
|
* // },
|
|
111
111
|
* // timeout: Number("int"),
|
|
112
112
|
* // },
|
|
113
|
-
* // search: {
|
|
113
|
+
* // search: { // ToolSearchConfig
|
|
114
|
+
* // includeDomains: [ // ToolSearchIncludeDomainsList
|
|
115
|
+
* // "STRING_VALUE",
|
|
116
|
+
* // ],
|
|
117
|
+
* // },
|
|
114
118
|
* // chat: { // ToolChatHandler
|
|
115
119
|
* // config: { // ToolChatConfig
|
|
116
120
|
* // recipient: { // ToolChatRecipient Union: only one key present
|
|
@@ -161,6 +165,10 @@ declare const ListToolsCommand_base: {
|
|
|
161
165
|
*
|
|
162
166
|
* @throws {@link ValidationException} (client fault)
|
|
163
167
|
*
|
|
168
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
169
|
+
*
|
|
170
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
171
|
+
*
|
|
164
172
|
* @throws {@link NotFoundException} (client fault)
|
|
165
173
|
*
|
|
166
174
|
* @throws {@link AlreadyExistException} (client fault)
|
|
@@ -103,7 +103,11 @@ declare const UpdateToolCommand_base: {
|
|
|
103
103
|
* },
|
|
104
104
|
* timeout: Number("int"),
|
|
105
105
|
* },
|
|
106
|
-
* search: {
|
|
106
|
+
* search: { // ToolSearchConfig
|
|
107
|
+
* includeDomains: [ // ToolSearchIncludeDomainsList
|
|
108
|
+
* "STRING_VALUE",
|
|
109
|
+
* ],
|
|
110
|
+
* },
|
|
107
111
|
* chat: { // ToolChatHandler
|
|
108
112
|
* config: { // ToolChatConfig
|
|
109
113
|
* recipient: { // ToolChatRecipient Union: only one key present
|
|
@@ -213,7 +217,11 @@ declare const UpdateToolCommand_base: {
|
|
|
213
217
|
* // },
|
|
214
218
|
* // timeout: Number("int"),
|
|
215
219
|
* // },
|
|
216
|
-
* // search: {
|
|
220
|
+
* // search: { // ToolSearchConfig
|
|
221
|
+
* // includeDomains: [ // ToolSearchIncludeDomainsList
|
|
222
|
+
* // "STRING_VALUE",
|
|
223
|
+
* // ],
|
|
224
|
+
* // },
|
|
217
225
|
* // chat: { // ToolChatHandler
|
|
218
226
|
* // config: { // ToolChatConfig
|
|
219
227
|
* // recipient: { // ToolChatRecipient Union: only one key present
|
|
@@ -265,6 +273,10 @@ declare const UpdateToolCommand_base: {
|
|
|
265
273
|
*
|
|
266
274
|
* @throws {@link NotFoundException} (client fault)
|
|
267
275
|
*
|
|
276
|
+
* @throws {@link UnauthorizedException} (client fault)
|
|
277
|
+
*
|
|
278
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
279
|
+
*
|
|
268
280
|
* @throws {@link AlreadyExistException} (client fault)
|
|
269
281
|
*
|
|
270
282
|
* @throws {@link ToolExecutionException} (client fault)
|
|
@@ -34,6 +34,17 @@ export declare class NotFoundException extends __BaseException {
|
|
|
34
34
|
*/
|
|
35
35
|
constructor(opts: __ExceptionOptionType<NotFoundException, __BaseException>);
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export declare class UnauthorizedException extends __BaseException {
|
|
41
|
+
readonly name: "UnauthorizedException";
|
|
42
|
+
readonly $fault: "client";
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
|
|
47
|
+
}
|
|
37
48
|
/**
|
|
38
49
|
* @public
|
|
39
50
|
*/
|
|
@@ -344,10 +355,15 @@ export interface ToolMcpToolHandler {
|
|
|
344
355
|
mcpToolName: string;
|
|
345
356
|
}
|
|
346
357
|
/**
|
|
347
|
-
* Search handler configuration.
|
|
358
|
+
* Search handler configuration. API key comes from AppConfig; query comes from tool input. Optionally restrict results to specific domains.
|
|
348
359
|
* @public
|
|
349
360
|
*/
|
|
350
361
|
export interface ToolSearchConfig {
|
|
362
|
+
/**
|
|
363
|
+
* When non-empty, only return results from these domains or hosts. Customers may enter plain hostnames (example.com) or full URLs (https://example.com/path) — URLs are normalized to hostnames before calling the search API.
|
|
364
|
+
* @public
|
|
365
|
+
*/
|
|
366
|
+
includeDomains?: (string)[] | undefined;
|
|
351
367
|
}
|
|
352
368
|
/**
|
|
353
369
|
* @public
|
|
@@ -568,7 +584,7 @@ export declare namespace ToolHandler {
|
|
|
568
584
|
$unknown?: never;
|
|
569
585
|
}
|
|
570
586
|
/**
|
|
571
|
-
* Search handler configuration.
|
|
587
|
+
* Search handler configuration. API key comes from AppConfig; query comes from tool input. Optionally restrict results to specific domains.
|
|
572
588
|
* @public
|
|
573
589
|
*/
|
|
574
590
|
interface SearchMember {
|
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": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
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",
|
|
@@ -79,4 +79,4 @@
|
|
|
79
79
|
"react-native": {
|
|
80
80
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
}
|