@wildix/wim-tools-client 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist-cjs/Tools.js +12 -0
  2. package/dist-cjs/ToolsClient.js +13 -15
  3. package/dist-cjs/commands/AddToolCommand.js +21 -0
  4. package/dist-cjs/commands/DeleteToolCommand.js +21 -0
  5. package/dist-cjs/commands/ExecuteToolCommand.js +21 -0
  6. package/dist-cjs/commands/GetToolCommand.js +21 -0
  7. package/dist-cjs/commands/ListToolsCommand.js +21 -0
  8. package/dist-cjs/commands/UpdateToolCommand.js +21 -0
  9. package/dist-cjs/commands/index.js +6 -0
  10. package/dist-cjs/models/models_0.js +45 -1
  11. package/dist-cjs/protocols/Aws_restJson1.js +306 -1
  12. package/dist-es/Tools.js +12 -0
  13. package/dist-es/ToolsClient.js +13 -15
  14. package/dist-es/commands/AddToolCommand.js +17 -0
  15. package/dist-es/commands/DeleteToolCommand.js +17 -0
  16. package/dist-es/commands/ExecuteToolCommand.js +17 -0
  17. package/dist-es/commands/GetToolCommand.js +17 -0
  18. package/dist-es/commands/ListToolsCommand.js +17 -0
  19. package/dist-es/commands/UpdateToolCommand.js +17 -0
  20. package/dist-es/commands/index.js +6 -0
  21. package/dist-es/models/models_0.js +41 -0
  22. package/dist-es/protocols/Aws_restJson1.js +295 -2
  23. package/dist-types/Tools.d.ts +42 -0
  24. package/dist-types/ToolsClient.d.ts +12 -7
  25. package/dist-types/commands/AddToolCommand.d.ts +98 -0
  26. package/dist-types/commands/DeleteToolCommand.d.ts +79 -0
  27. package/dist-types/commands/ExecuteToolCommand.d.ts +93 -0
  28. package/dist-types/commands/GetToolCommand.d.ts +91 -0
  29. package/dist-types/commands/ListToolsCommand.d.ts +103 -0
  30. package/dist-types/commands/TestEndpointCommand.d.ts +9 -3
  31. package/dist-types/commands/UpdateToolCommand.d.ts +95 -0
  32. package/dist-types/commands/index.d.ts +6 -0
  33. package/dist-types/models/models_0.d.ts +396 -0
  34. package/dist-types/protocols/Aws_restJson1.d.ts +54 -0
  35. package/dist-types/runtimeConfig.browser.d.ts +5 -2
  36. package/dist-types/runtimeConfig.d.ts +5 -2
  37. package/dist-types/runtimeConfig.native.d.ts +5 -2
  38. package/package.json +3 -4
@@ -1,5 +1,6 @@
1
1
  import { ToolsServiceException as __BaseException } from "./ToolsServiceException";
2
2
  import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
3
+ import { DocumentType as __DocumentType } from "@smithy/types";
3
4
  /**
4
5
  * @public
5
6
  */
@@ -11,6 +12,356 @@ export declare class ValidationException extends __BaseException {
11
12
  */
12
13
  constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
13
14
  }
15
+ /**
16
+ * @public
17
+ * @enum
18
+ */
19
+ export declare const ToolType: {
20
+ /**
21
+ * Send email via WNS Email service
22
+ */
23
+ readonly EMAIL: "EMAIL";
24
+ };
25
+ /**
26
+ * @public
27
+ */
28
+ export type ToolType = typeof ToolType[keyof typeof ToolType];
29
+ /**
30
+ * @public
31
+ */
32
+ export interface AddToolInput {
33
+ /**
34
+ * Company that owns the tool
35
+ * @public
36
+ */
37
+ company: string;
38
+ /**
39
+ * Tool name for LLM
40
+ * @public
41
+ */
42
+ name: string;
43
+ /**
44
+ * Tool description
45
+ * @public
46
+ */
47
+ description: string;
48
+ /**
49
+ * Tool type
50
+ * @public
51
+ */
52
+ type: ToolType;
53
+ /**
54
+ * Tool-specific configuration
55
+ * @public
56
+ */
57
+ config: __DocumentType;
58
+ /**
59
+ * JSON Schema for parameters
60
+ * @public
61
+ */
62
+ jsonSchema: __DocumentType;
63
+ }
64
+ /**
65
+ * Tool configuration and metadata
66
+ * @public
67
+ */
68
+ export interface Tool {
69
+ /**
70
+ * Unique tool identifier
71
+ * @public
72
+ */
73
+ id: string;
74
+ /**
75
+ * Company that owns this tool
76
+ * @public
77
+ */
78
+ company: string;
79
+ /**
80
+ * Tool name for LLM (e.g., "send_email")
81
+ * @public
82
+ */
83
+ name: string;
84
+ /**
85
+ * Human-readable description for LLM
86
+ * @public
87
+ */
88
+ description: string;
89
+ /**
90
+ * Type of tool
91
+ * @public
92
+ */
93
+ type: ToolType;
94
+ /**
95
+ * Tool-specific configuration (JSON)
96
+ * @public
97
+ */
98
+ config: __DocumentType;
99
+ /**
100
+ * JSON Schema for LLM parameters
101
+ * @public
102
+ */
103
+ jsonSchema: __DocumentType;
104
+ /**
105
+ * When the tool was created
106
+ * @public
107
+ */
108
+ createdAt: Date;
109
+ /**
110
+ * When the tool was last updated
111
+ * @public
112
+ */
113
+ updatedAt?: Date | undefined;
114
+ }
115
+ /**
116
+ * @public
117
+ */
118
+ export interface AddToolOutput {
119
+ /**
120
+ * Created tool
121
+ * @public
122
+ */
123
+ tool: Tool;
124
+ }
125
+ /**
126
+ * Tool already exists error
127
+ * @public
128
+ */
129
+ export declare class ToolAlreadyExistsException extends __BaseException {
130
+ readonly name: "ToolAlreadyExistsException";
131
+ readonly $fault: "client";
132
+ /**
133
+ * @internal
134
+ */
135
+ constructor(opts: __ExceptionOptionType<ToolAlreadyExistsException, __BaseException>);
136
+ }
137
+ /**
138
+ * Tool execution failed error
139
+ * @public
140
+ */
141
+ export declare class ToolExecutionException extends __BaseException {
142
+ readonly name: "ToolExecutionException";
143
+ readonly $fault: "server";
144
+ /**
145
+ * Detailed error information
146
+ * @public
147
+ */
148
+ details?: __DocumentType | undefined;
149
+ /**
150
+ * @internal
151
+ */
152
+ constructor(opts: __ExceptionOptionType<ToolExecutionException, __BaseException>);
153
+ }
154
+ /**
155
+ * Tool not found error
156
+ * @public
157
+ */
158
+ export declare class ToolNotFoundException extends __BaseException {
159
+ readonly name: "ToolNotFoundException";
160
+ readonly $fault: "client";
161
+ /**
162
+ * @internal
163
+ */
164
+ constructor(opts: __ExceptionOptionType<ToolNotFoundException, __BaseException>);
165
+ }
166
+ /**
167
+ * @public
168
+ */
169
+ export interface DeleteToolInput {
170
+ /**
171
+ * Company that owns the tool
172
+ * @public
173
+ */
174
+ company: string;
175
+ /**
176
+ * Tool identifier
177
+ * @public
178
+ */
179
+ toolId: string;
180
+ }
181
+ /**
182
+ * @public
183
+ */
184
+ export interface DeleteToolOutput {
185
+ }
186
+ /**
187
+ * Tool execution context
188
+ * @public
189
+ */
190
+ export interface ExecutionContext {
191
+ /**
192
+ * Company executing the tool
193
+ * @public
194
+ */
195
+ company: string;
196
+ /**
197
+ * Session identifier for tracing
198
+ * @public
199
+ */
200
+ sessionId?: string | undefined;
201
+ /**
202
+ * User identifier (if applicable)
203
+ * @public
204
+ */
205
+ userId?: string | undefined;
206
+ /**
207
+ * Additional context data
208
+ * @public
209
+ */
210
+ metadata?: __DocumentType | undefined;
211
+ }
212
+ /**
213
+ * @public
214
+ */
215
+ export interface ExecuteToolInput {
216
+ /**
217
+ * Company executing the tool
218
+ * @public
219
+ */
220
+ company: string;
221
+ /**
222
+ * Tool identifier
223
+ * @public
224
+ */
225
+ toolId: string;
226
+ /**
227
+ * Parameters from LLM (JSON)
228
+ * @public
229
+ */
230
+ parameters: __DocumentType;
231
+ /**
232
+ * Execution context for tracing
233
+ * @public
234
+ */
235
+ context?: ExecutionContext | undefined;
236
+ }
237
+ /**
238
+ * Tool execution result
239
+ * @public
240
+ */
241
+ export interface ExecutionResult {
242
+ /**
243
+ * Whether execution was successful
244
+ * @public
245
+ */
246
+ success: boolean;
247
+ /**
248
+ * Result data (JSON)
249
+ * @public
250
+ */
251
+ result?: __DocumentType | undefined;
252
+ /**
253
+ * Error message if failed
254
+ * @public
255
+ */
256
+ error?: string | undefined;
257
+ /**
258
+ * Execution trace identifier
259
+ * @public
260
+ */
261
+ traceId?: string | undefined;
262
+ }
263
+ /**
264
+ * @public
265
+ */
266
+ export interface ExecuteToolOutput {
267
+ /**
268
+ * Execution result
269
+ * @public
270
+ */
271
+ result: ExecutionResult;
272
+ }
273
+ /**
274
+ * @public
275
+ */
276
+ export interface GetToolInput {
277
+ /**
278
+ * Company identifier
279
+ * @public
280
+ */
281
+ company: string;
282
+ /**
283
+ * Tool identifier
284
+ * @public
285
+ */
286
+ toolId: string;
287
+ }
288
+ /**
289
+ * @public
290
+ */
291
+ export interface GetToolOutput {
292
+ /**
293
+ * Tool details
294
+ * @public
295
+ */
296
+ tool: Tool;
297
+ }
298
+ /**
299
+ * @public
300
+ */
301
+ export interface ListToolsInput {
302
+ /**
303
+ * Company identifier
304
+ * @public
305
+ */
306
+ company: string;
307
+ /**
308
+ * Return in LLM-compatible format
309
+ * @public
310
+ */
311
+ format?: string | undefined;
312
+ }
313
+ /**
314
+ * Function definition for LLM
315
+ * @public
316
+ */
317
+ export interface LlmFunctionDefinition {
318
+ /**
319
+ * Function name
320
+ * @public
321
+ */
322
+ name: string;
323
+ /**
324
+ * Function description
325
+ * @public
326
+ */
327
+ description: string;
328
+ /**
329
+ * JSON Schema for parameters
330
+ * @public
331
+ */
332
+ parameters: __DocumentType;
333
+ }
334
+ /**
335
+ * Tool definition in OpenAI-compatible format for LLM
336
+ * @public
337
+ */
338
+ export interface LlmToolDefinition {
339
+ /**
340
+ * Tool type (always "function" for OpenAI compatibility)
341
+ * @public
342
+ */
343
+ type: string;
344
+ /**
345
+ * Function definition
346
+ * @public
347
+ */
348
+ function: LlmFunctionDefinition;
349
+ }
350
+ /**
351
+ * @public
352
+ */
353
+ export interface ListToolsOutput {
354
+ /**
355
+ * List of tools (raw format)
356
+ * @public
357
+ */
358
+ tools?: (Tool)[] | undefined;
359
+ /**
360
+ * List of tools in LLM format (if format=llm)
361
+ * @public
362
+ */
363
+ llmTools?: (LlmToolDefinition)[] | undefined;
364
+ }
14
365
  /**
15
366
  * @public
16
367
  */
@@ -36,3 +387,48 @@ export interface TestEndpointOutput {
36
387
  */
37
388
  timestamp: Date;
38
389
  }
390
+ /**
391
+ * @public
392
+ */
393
+ export interface UpdateToolInput {
394
+ /**
395
+ * Company that owns the tool
396
+ * @public
397
+ */
398
+ company: string;
399
+ /**
400
+ * Tool identifier
401
+ * @public
402
+ */
403
+ toolId: string;
404
+ /**
405
+ * Updated tool name
406
+ * @public
407
+ */
408
+ name?: string | undefined;
409
+ /**
410
+ * Updated description
411
+ * @public
412
+ */
413
+ description?: string | undefined;
414
+ /**
415
+ * Updated configuration
416
+ * @public
417
+ */
418
+ config?: __DocumentType | undefined;
419
+ /**
420
+ * Updated JSON Schema
421
+ * @public
422
+ */
423
+ jsonSchema?: __DocumentType | undefined;
424
+ }
425
+ /**
426
+ * @public
427
+ */
428
+ export interface UpdateToolOutput {
429
+ /**
430
+ * Updated tool
431
+ * @public
432
+ */
433
+ tool: Tool;
434
+ }
@@ -1,11 +1,65 @@
1
+ import { AddToolCommandInput, AddToolCommandOutput } from "../commands/AddToolCommand";
2
+ import { DeleteToolCommandInput, DeleteToolCommandOutput } from "../commands/DeleteToolCommand";
3
+ import { ExecuteToolCommandInput, ExecuteToolCommandOutput } from "../commands/ExecuteToolCommand";
4
+ import { GetToolCommandInput, GetToolCommandOutput } from "../commands/GetToolCommand";
5
+ import { ListToolsCommandInput, ListToolsCommandOutput } from "../commands/ListToolsCommand";
1
6
  import { TestEndpointCommandInput, TestEndpointCommandOutput } from "../commands/TestEndpointCommand";
7
+ import { UpdateToolCommandInput, UpdateToolCommandOutput } from "../commands/UpdateToolCommand";
2
8
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
3
9
  import { SerdeContext as __SerdeContext } from "@smithy/types";
10
+ /**
11
+ * serializeAws_restJson1AddToolCommand
12
+ */
13
+ export declare const se_AddToolCommand: (input: AddToolCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
14
+ /**
15
+ * serializeAws_restJson1DeleteToolCommand
16
+ */
17
+ export declare const se_DeleteToolCommand: (input: DeleteToolCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
18
+ /**
19
+ * serializeAws_restJson1ExecuteToolCommand
20
+ */
21
+ export declare const se_ExecuteToolCommand: (input: ExecuteToolCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
22
+ /**
23
+ * serializeAws_restJson1GetToolCommand
24
+ */
25
+ export declare const se_GetToolCommand: (input: GetToolCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
26
+ /**
27
+ * serializeAws_restJson1ListToolsCommand
28
+ */
29
+ export declare const se_ListToolsCommand: (input: ListToolsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
4
30
  /**
5
31
  * serializeAws_restJson1TestEndpointCommand
6
32
  */
7
33
  export declare const se_TestEndpointCommand: (input: TestEndpointCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
34
+ /**
35
+ * serializeAws_restJson1UpdateToolCommand
36
+ */
37
+ export declare const se_UpdateToolCommand: (input: UpdateToolCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
38
+ /**
39
+ * deserializeAws_restJson1AddToolCommand
40
+ */
41
+ export declare const de_AddToolCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AddToolCommandOutput>;
42
+ /**
43
+ * deserializeAws_restJson1DeleteToolCommand
44
+ */
45
+ export declare const de_DeleteToolCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteToolCommandOutput>;
46
+ /**
47
+ * deserializeAws_restJson1ExecuteToolCommand
48
+ */
49
+ export declare const de_ExecuteToolCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ExecuteToolCommandOutput>;
50
+ /**
51
+ * deserializeAws_restJson1GetToolCommand
52
+ */
53
+ export declare const de_GetToolCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetToolCommandOutput>;
54
+ /**
55
+ * deserializeAws_restJson1ListToolsCommand
56
+ */
57
+ export declare const de_ListToolsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListToolsCommandOutput>;
8
58
  /**
9
59
  * deserializeAws_restJson1TestEndpointCommand
10
60
  */
11
61
  export declare const de_TestEndpointCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<TestEndpointCommandOutput>;
62
+ /**
63
+ * deserializeAws_restJson1UpdateToolCommand
64
+ */
65
+ export declare const de_UpdateToolCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<UpdateToolCommandOutput>;
@@ -13,8 +13,6 @@ export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
13
13
  retryMode: string | import("@smithy/types").Provider<string>;
14
14
  sha256: import("@smithy/types").HashConstructor;
15
15
  streamCollector: import("@smithy/types").StreamCollector;
16
- env?: "stage" | "stable" | "prod" | undefined;
17
- token: import("@wildix/smithy-utils").TokenProvider;
18
16
  apiVersion: string;
19
17
  cacheMiddleware?: boolean | undefined;
20
18
  urlParser: import("@smithy/types").UrlParser;
@@ -27,5 +25,10 @@ export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
27
25
  extensions: import("./runtimeExtensions").RuntimeExtension[];
28
26
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
29
27
  userAgentAppId?: string | import("@smithy/types").Provider<string | undefined> | undefined;
28
+ endpoint: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint>;
29
+ tls?: boolean | undefined;
30
+ useDualstackEndpoint?: boolean | import("@smithy/types").Provider<boolean> | undefined;
30
31
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
32
+ region?: string | import("@smithy/types").Provider<string> | undefined;
33
+ useFipsEndpoint?: boolean | import("@smithy/types").Provider<boolean> | undefined;
31
34
  };
@@ -14,8 +14,6 @@ export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
14
14
  sha256: import("@smithy/types").HashConstructor;
15
15
  streamCollector: import("@smithy/types").StreamCollector;
16
16
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
17
- env?: "stage" | "stable" | "prod" | undefined;
18
- token: import("@wildix/smithy-utils").TokenProvider;
19
17
  apiVersion: string;
20
18
  cacheMiddleware?: boolean | undefined;
21
19
  urlParser: import("@smithy/types").UrlParser;
@@ -27,5 +25,10 @@ export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
27
25
  logger: import("@smithy/types").Logger;
28
26
  extensions: import("./runtimeExtensions").RuntimeExtension[];
29
27
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
28
+ endpoint: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint>;
29
+ tls?: boolean | undefined;
30
+ useDualstackEndpoint?: boolean | import("@smithy/types").Provider<boolean> | undefined;
30
31
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
32
+ region?: string | import("@smithy/types").Provider<string> | undefined;
33
+ useFipsEndpoint?: boolean | import("@smithy/types").Provider<boolean> | undefined;
31
34
  };
@@ -5,8 +5,6 @@ import { ToolsClientConfig } from "./ToolsClient";
5
5
  export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
6
6
  runtime: string;
7
7
  sha256: import("@smithy/types").HashConstructor;
8
- env?: "stage" | "stable" | "prod" | undefined;
9
- token: import("@wildix/smithy-utils").TokenProvider;
10
8
  requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
11
9
  apiVersion: string;
12
10
  cacheMiddleware?: boolean | undefined;
@@ -26,5 +24,10 @@ export declare const getRuntimeConfig: (config: ToolsClientConfig) => {
26
24
  defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
27
25
  customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
28
26
  userAgentAppId?: string | import("@smithy/types").Provider<string | undefined> | undefined;
27
+ endpoint: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint>;
28
+ tls?: boolean | undefined;
29
+ useDualstackEndpoint?: boolean | import("@smithy/types").Provider<boolean> | undefined;
29
30
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
31
+ region?: string | import("@smithy/types").Provider<string> | undefined;
32
+ useFipsEndpoint?: boolean | import("@smithy/types").Provider<boolean> | undefined;
30
33
  };
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.3",
4
+ "version": "0.0.4",
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",
@@ -49,8 +49,7 @@
49
49
  "@smithy/util-defaults-mode-browser": "^4.0.8",
50
50
  "@smithy/util-defaults-mode-node": "^4.0.8",
51
51
  "@smithy/util-retry": "^4.0.2",
52
- "@smithy/util-utf8": "^4.0.0",
53
- "@wildix/smithy-utils": "^1.0.3"
52
+ "@smithy/util-utf8": "^4.0.0"
54
53
  },
55
54
  "devDependencies": {
56
55
  "@tsconfig/node18": "18.2.4",
@@ -80,4 +79,4 @@
80
79
  "react-native": {
81
80
  "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
82
81
  }
83
- }
82
+ }