@wildix/wim-tools-client 1.0.0 → 1.0.2

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.
@@ -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,14 @@ 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
+ * excludeDomains: [ // ToolSearchExcludeDomainsList
110
+ * "STRING_VALUE",
111
+ * ],
112
+ * },
106
113
  * chat: { // ToolChatHandler
107
114
  * config: { // ToolChatConfig
108
115
  * recipient: { // ToolChatRecipient Union: only one key present
@@ -212,7 +219,14 @@ declare const CreateToolCommand_base: {
212
219
  * // },
213
220
  * // timeout: Number("int"),
214
221
  * // },
215
- * // search: {},
222
+ * // search: { // ToolSearchConfig
223
+ * // includeDomains: [ // ToolSearchIncludeDomainsList
224
+ * // "STRING_VALUE",
225
+ * // ],
226
+ * // excludeDomains: [ // ToolSearchExcludeDomainsList
227
+ * // "STRING_VALUE",
228
+ * // ],
229
+ * // },
216
230
  * // chat: { // ToolChatHandler
217
231
  * // config: { // ToolChatConfig
218
232
  * // recipient: { // ToolChatRecipient Union: only one key present
@@ -264,6 +278,10 @@ declare const CreateToolCommand_base: {
264
278
  *
265
279
  * @throws {@link AlreadyExistException} (client fault)
266
280
  *
281
+ * @throws {@link UnauthorizedException} (client fault)
282
+ *
283
+ * @throws {@link ForbiddenException} (client fault)
284
+ *
267
285
  * @throws {@link NotFoundException} (client fault)
268
286
  *
269
287
  * @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,14 @@ 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
+ * // excludeDomains: [ // ToolSearchExcludeDomainsList
118
+ * // "STRING_VALUE",
119
+ * // ],
120
+ * // },
114
121
  * // chat: { // ToolChatHandler
115
122
  * // config: { // ToolChatConfig
116
123
  * // recipient: { // ToolChatRecipient Union: only one key present
@@ -162,6 +169,10 @@ declare const GetToolCommand_base: {
162
169
  *
163
170
  * @throws {@link NotFoundException} (client fault)
164
171
  *
172
+ * @throws {@link UnauthorizedException} (client fault)
173
+ *
174
+ * @throws {@link ForbiddenException} (client fault)
175
+ *
165
176
  * @throws {@link AlreadyExistException} (client fault)
166
177
  *
167
178
  * @throws {@link ToolExecutionException} (client fault)
@@ -110,7 +110,14 @@ 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
+ * // excludeDomains: [ // ToolSearchExcludeDomainsList
118
+ * // "STRING_VALUE",
119
+ * // ],
120
+ * // },
114
121
  * // chat: { // ToolChatHandler
115
122
  * // config: { // ToolChatConfig
116
123
  * // recipient: { // ToolChatRecipient Union: only one key present
@@ -161,6 +168,10 @@ declare const ListToolsCommand_base: {
161
168
  *
162
169
  * @throws {@link ValidationException} (client fault)
163
170
  *
171
+ * @throws {@link UnauthorizedException} (client fault)
172
+ *
173
+ * @throws {@link ForbiddenException} (client fault)
174
+ *
164
175
  * @throws {@link NotFoundException} (client fault)
165
176
  *
166
177
  * @throws {@link AlreadyExistException} (client fault)
@@ -103,7 +103,14 @@ 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
+ * excludeDomains: [ // ToolSearchExcludeDomainsList
111
+ * "STRING_VALUE",
112
+ * ],
113
+ * },
107
114
  * chat: { // ToolChatHandler
108
115
  * config: { // ToolChatConfig
109
116
  * recipient: { // ToolChatRecipient Union: only one key present
@@ -213,7 +220,14 @@ declare const UpdateToolCommand_base: {
213
220
  * // },
214
221
  * // timeout: Number("int"),
215
222
  * // },
216
- * // search: {},
223
+ * // search: { // ToolSearchConfig
224
+ * // includeDomains: [ // ToolSearchIncludeDomainsList
225
+ * // "STRING_VALUE",
226
+ * // ],
227
+ * // excludeDomains: [ // ToolSearchExcludeDomainsList
228
+ * // "STRING_VALUE",
229
+ * // ],
230
+ * // },
217
231
  * // chat: { // ToolChatHandler
218
232
  * // config: { // ToolChatConfig
219
233
  * // recipient: { // ToolChatRecipient Union: only one key present
@@ -265,6 +279,10 @@ declare const UpdateToolCommand_base: {
265
279
  *
266
280
  * @throws {@link NotFoundException} (client fault)
267
281
  *
282
+ * @throws {@link UnauthorizedException} (client fault)
283
+ *
284
+ * @throws {@link ForbiddenException} (client fault)
285
+ *
268
286
  * @throws {@link AlreadyExistException} (client fault)
269
287
  *
270
288
  * @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,20 @@ export interface ToolMcpToolHandler {
344
355
  mcpToolName: string;
345
356
  }
346
357
  /**
347
- * Search handler configuration. The search tool requires no configuration - API key comes from AppConfig and query comes from tool input.
358
+ * Search handler configuration. API key comes from AppConfig; query comes from tool input. Optionally refine results using Tavily include_domains and/or exclude_domains (see Tavily domain filtering).
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;
367
+ /**
368
+ * When non-empty, omit results from these domains or hosts. Same hostname rules as includeDomains. Can be combined with includeDomains per Tavily API.
369
+ * @public
370
+ */
371
+ excludeDomains?: (string)[] | undefined;
351
372
  }
352
373
  /**
353
374
  * @public
@@ -568,7 +589,7 @@ export declare namespace ToolHandler {
568
589
  $unknown?: never;
569
590
  }
570
591
  /**
571
- * Search handler configuration. The search tool requires no configuration - API key comes from AppConfig and query comes from tool input.
592
+ * Search handler configuration. API key comes from AppConfig; query comes from tool input. Optionally refine results using Tavily include_domains and/or exclude_domains (see Tavily domain filtering).
572
593
  * @public
573
594
  */
574
595
  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.0",
4
+ "version": "1.0.2",
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
+ }