@wildix/wim-tools-client 0.0.30 → 0.0.32

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.ToolEmailHandler = exports.ToolChatRecipient = exports.ToolStringValue = exports.ValidationException = exports.NotFoundException = exports.ForbiddenException = exports.AlreadyExistException = void 0;
3
+ exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolChatRecipient = 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,18 +54,6 @@ class ValidationException extends ToolsServiceException_1.ToolsServiceException
54
54
  }
55
55
  }
56
56
  exports.ValidationException = ValidationException;
57
- var ToolStringValue;
58
- (function (ToolStringValue) {
59
- ToolStringValue.visit = (value, visitor) => {
60
- if (value.static !== undefined)
61
- return visitor.static(value.static);
62
- if (value.variable !== undefined)
63
- return visitor.variable(value.variable);
64
- if (value.template !== undefined)
65
- return visitor.template(value.template);
66
- return visitor._(value.$unknown[0], value.$unknown[1]);
67
- };
68
- })(ToolStringValue || (exports.ToolStringValue = ToolStringValue = {}));
69
57
  var ToolChatRecipient;
70
58
  (function (ToolChatRecipient) {
71
59
  ToolChatRecipient.visit = (value, visitor) => {
@@ -116,6 +104,8 @@ var ToolHandler;
116
104
  return visitor.search(value.search);
117
105
  if (value.chat !== undefined)
118
106
  return visitor.chat(value.chat);
107
+ if (value.sms !== undefined)
108
+ return visitor.sms(value.sms);
119
109
  return visitor._(value.$unknown[0], value.$unknown[1]);
120
110
  };
121
111
  })(ToolHandler || (exports.ToolHandler = ToolHandler = {}));
@@ -369,9 +369,7 @@ const de_Document = (output, context) => {
369
369
  };
370
370
  const de_ToolExecutionResult = (output, context) => {
371
371
  return (0, smithy_client_1.take)(output, {
372
- 'error': smithy_client_1._json,
373
372
  'output': (_) => de_Document(_, context),
374
- 'statusCode': smithy_client_1.expectInt32,
375
373
  });
376
374
  };
377
375
  const deserializeMetadata = (output) => ({
@@ -47,18 +47,6 @@ export class ValidationException extends __BaseException {
47
47
  Object.setPrototypeOf(this, ValidationException.prototype);
48
48
  }
49
49
  }
50
- export var ToolStringValue;
51
- (function (ToolStringValue) {
52
- ToolStringValue.visit = (value, visitor) => {
53
- if (value.static !== undefined)
54
- return visitor.static(value.static);
55
- if (value.variable !== undefined)
56
- return visitor.variable(value.variable);
57
- if (value.template !== undefined)
58
- return visitor.template(value.template);
59
- return visitor._(value.$unknown[0], value.$unknown[1]);
60
- };
61
- })(ToolStringValue || (ToolStringValue = {}));
62
50
  export var ToolChatRecipient;
63
51
  (function (ToolChatRecipient) {
64
52
  ToolChatRecipient.visit = (value, visitor) => {
@@ -109,6 +97,8 @@ export var ToolHandler;
109
97
  return visitor.search(value.search);
110
98
  if (value.chat !== undefined)
111
99
  return visitor.chat(value.chat);
100
+ if (value.sms !== undefined)
101
+ return visitor.sms(value.sms);
112
102
  return visitor._(value.$unknown[0], value.$unknown[1]);
113
103
  };
114
104
  })(ToolHandler || (ToolHandler = {}));
@@ -2,7 +2,7 @@ import { ToolsServiceException as __BaseException } from "../models/ToolsService
2
2
  import { AlreadyExistException, ForbiddenException, NotFoundException, ToolExecutionException, ToolExecutionServerException, ValidationException, } from "../models/models_0";
3
3
  import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
4
4
  import { requestBuilder as rb } from "@smithy/core";
5
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
6
6
  export const se_CreateToolCommand = async (input, context) => {
7
7
  const b = rb(input, context);
8
8
  const headers = {
@@ -352,9 +352,7 @@ const de_Document = (output, context) => {
352
352
  };
353
353
  const de_ToolExecutionResult = (output, context) => {
354
354
  return take(output, {
355
- 'error': _json,
356
355
  'output': (_) => de_Document(_, context),
357
- 'statusCode': __expectInt32,
358
356
  });
359
357
  };
360
358
  const deserializeMetadata = (output) => ({
@@ -51,21 +51,9 @@ declare const CreateToolCommand_base: {
51
51
  * handler: { // ToolHandler Union: only one key present
52
52
  * email: { // ToolEmailHandler Union: only one key present
53
53
  * wns: { // ToolWnsEmailConfig
54
- * to: { // ToolStringValue Union: only one key present
55
- * static: "STRING_VALUE",
56
- * variable: "STRING_VALUE",
57
- * template: "STRING_VALUE",
58
- * },
59
- * subject: {// Union: only one key present
60
- * static: "STRING_VALUE",
61
- * variable: "STRING_VALUE",
62
- * template: "STRING_VALUE",
63
- * },
64
- * text: {// Union: only one key present
65
- * static: "STRING_VALUE",
66
- * variable: "STRING_VALUE",
67
- * template: "STRING_VALUE",
68
- * },
54
+ * to: "STRING_VALUE", // required
55
+ * subject: "STRING_VALUE", // required
56
+ * text: "STRING_VALUE", // required
69
57
  * },
70
58
  * custom: { // ToolCustomEmailConfig
71
59
  * smtp: { // ToolSmtpConfig
@@ -75,41 +63,33 @@ declare const CreateToolCommand_base: {
75
63
  * password: "STRING_VALUE", // required
76
64
  * secure: true || false, // required
77
65
  * },
78
- * from: {// Union: only one key present
79
- * static: "STRING_VALUE",
80
- * variable: "STRING_VALUE",
81
- * template: "STRING_VALUE",
82
- * },
83
- * to: {// Union: only one key present
84
- * static: "STRING_VALUE",
85
- * variable: "STRING_VALUE",
86
- * template: "STRING_VALUE",
87
- * },
88
- * subject: "<ToolStringValue>", // required
89
- * text: "<ToolStringValue>", // required
90
- * html: "<ToolStringValue>",
91
- * cc: "<ToolStringValue>",
92
- * bcc: "<ToolStringValue>",
93
- * replyTo: "<ToolStringValue>",
66
+ * from: "STRING_VALUE", // required
67
+ * to: "STRING_VALUE", // required
68
+ * subject: "STRING_VALUE", // required
69
+ * text: "STRING_VALUE", // required
70
+ * html: "STRING_VALUE",
71
+ * cc: "STRING_VALUE",
72
+ * bcc: "STRING_VALUE",
73
+ * replyTo: "STRING_VALUE",
94
74
  * },
95
75
  * },
96
76
  * webhook: { // ToolWebhookConfig
97
77
  * method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
98
- * url: "<ToolStringValue>", // required
78
+ * url: "STRING_VALUE", // required
99
79
  * headers: [ // ToolWebhookHeadersList
100
80
  * { // ToolWebhookHeader
101
81
  * name: "STRING_VALUE", // required
102
- * value: "<ToolStringValue>", // required
82
+ * value: "STRING_VALUE", // required
103
83
  * },
104
84
  * ],
105
- * body: "<ToolStringValue>",
85
+ * body: "STRING_VALUE",
106
86
  * auth: { // ToolWebhookAuth Union: only one key present
107
87
  * basic: { // ToolWebhookAuthBasic
108
- * username: "<ToolStringValue>", // required
109
- * password: "<ToolStringValue>", // required
88
+ * username: "STRING_VALUE", // required
89
+ * password: "STRING_VALUE", // required
110
90
  * },
111
91
  * bearer: { // ToolWebhookAuthBearer
112
- * token: "<ToolStringValue>", // required
92
+ * token: "STRING_VALUE", // required
113
93
  * },
114
94
  * oauth: { // ToolWebhookAuthOAuth
115
95
  * clientId: "STRING_VALUE", // required
@@ -123,11 +103,18 @@ declare const CreateToolCommand_base: {
123
103
  * chat: { // ToolChatHandler
124
104
  * config: { // ToolChatConfig
125
105
  * recipient: { // ToolChatRecipient Union: only one key present
126
- * channelId: "<ToolStringValue>",
127
- * userId: "<ToolStringValue>",
106
+ * channelId: "STRING_VALUE",
107
+ * userId: "STRING_VALUE",
128
108
  * },
129
- * text: "<ToolStringValue>", // required
130
- * botName: "<ToolStringValue>", // required
109
+ * text: "STRING_VALUE", // required
110
+ * botName: "STRING_VALUE", // required
111
+ * },
112
+ * },
113
+ * sms: { // ToolSmsHandler
114
+ * config: { // ToolSmsConfig
115
+ * from: "STRING_VALUE", // required
116
+ * to: "STRING_VALUE", // required
117
+ * message: "STRING_VALUE", // required
131
118
  * },
132
119
  * },
133
120
  * },
@@ -153,21 +140,9 @@ declare const CreateToolCommand_base: {
153
140
  * // handler: { // ToolHandler Union: only one key present
154
141
  * // email: { // ToolEmailHandler Union: only one key present
155
142
  * // wns: { // ToolWnsEmailConfig
156
- * // to: { // ToolStringValue Union: only one key present
157
- * // static: "STRING_VALUE",
158
- * // variable: "STRING_VALUE",
159
- * // template: "STRING_VALUE",
160
- * // },
161
- * // subject: {// Union: only one key present
162
- * // static: "STRING_VALUE",
163
- * // variable: "STRING_VALUE",
164
- * // template: "STRING_VALUE",
165
- * // },
166
- * // text: {// Union: only one key present
167
- * // static: "STRING_VALUE",
168
- * // variable: "STRING_VALUE",
169
- * // template: "STRING_VALUE",
170
- * // },
143
+ * // to: "STRING_VALUE", // required
144
+ * // subject: "STRING_VALUE", // required
145
+ * // text: "STRING_VALUE", // required
171
146
  * // },
172
147
  * // custom: { // ToolCustomEmailConfig
173
148
  * // smtp: { // ToolSmtpConfig
@@ -177,41 +152,33 @@ declare const CreateToolCommand_base: {
177
152
  * // password: "STRING_VALUE", // required
178
153
  * // secure: true || false, // required
179
154
  * // },
180
- * // from: {// Union: only one key present
181
- * // static: "STRING_VALUE",
182
- * // variable: "STRING_VALUE",
183
- * // template: "STRING_VALUE",
184
- * // },
185
- * // to: {// Union: only one key present
186
- * // static: "STRING_VALUE",
187
- * // variable: "STRING_VALUE",
188
- * // template: "STRING_VALUE",
189
- * // },
190
- * // subject: "<ToolStringValue>", // required
191
- * // text: "<ToolStringValue>", // required
192
- * // html: "<ToolStringValue>",
193
- * // cc: "<ToolStringValue>",
194
- * // bcc: "<ToolStringValue>",
195
- * // replyTo: "<ToolStringValue>",
155
+ * // from: "STRING_VALUE", // required
156
+ * // to: "STRING_VALUE", // required
157
+ * // subject: "STRING_VALUE", // required
158
+ * // text: "STRING_VALUE", // required
159
+ * // html: "STRING_VALUE",
160
+ * // cc: "STRING_VALUE",
161
+ * // bcc: "STRING_VALUE",
162
+ * // replyTo: "STRING_VALUE",
196
163
  * // },
197
164
  * // },
198
165
  * // webhook: { // ToolWebhookConfig
199
166
  * // method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
200
- * // url: "<ToolStringValue>", // required
167
+ * // url: "STRING_VALUE", // required
201
168
  * // headers: [ // ToolWebhookHeadersList
202
169
  * // { // ToolWebhookHeader
203
170
  * // name: "STRING_VALUE", // required
204
- * // value: "<ToolStringValue>", // required
171
+ * // value: "STRING_VALUE", // required
205
172
  * // },
206
173
  * // ],
207
- * // body: "<ToolStringValue>",
174
+ * // body: "STRING_VALUE",
208
175
  * // auth: { // ToolWebhookAuth Union: only one key present
209
176
  * // basic: { // ToolWebhookAuthBasic
210
- * // username: "<ToolStringValue>", // required
211
- * // password: "<ToolStringValue>", // required
177
+ * // username: "STRING_VALUE", // required
178
+ * // password: "STRING_VALUE", // required
212
179
  * // },
213
180
  * // bearer: { // ToolWebhookAuthBearer
214
- * // token: "<ToolStringValue>", // required
181
+ * // token: "STRING_VALUE", // required
215
182
  * // },
216
183
  * // oauth: { // ToolWebhookAuthOAuth
217
184
  * // clientId: "STRING_VALUE", // required
@@ -225,11 +192,18 @@ declare const CreateToolCommand_base: {
225
192
  * // chat: { // ToolChatHandler
226
193
  * // config: { // ToolChatConfig
227
194
  * // recipient: { // ToolChatRecipient Union: only one key present
228
- * // channelId: "<ToolStringValue>",
229
- * // userId: "<ToolStringValue>",
195
+ * // channelId: "STRING_VALUE",
196
+ * // userId: "STRING_VALUE",
230
197
  * // },
231
- * // text: "<ToolStringValue>", // required
232
- * // botName: "<ToolStringValue>", // required
198
+ * // text: "STRING_VALUE", // required
199
+ * // botName: "STRING_VALUE", // required
200
+ * // },
201
+ * // },
202
+ * // sms: { // ToolSmsHandler
203
+ * // config: { // ToolSmsConfig
204
+ * // from: "STRING_VALUE", // required
205
+ * // to: "STRING_VALUE", // required
206
+ * // message: "STRING_VALUE", // required
233
207
  * // },
234
208
  * // },
235
209
  * // },
@@ -45,11 +45,7 @@ declare const ExecuteToolCommand_base: {
45
45
  * const response = await client.send(command);
46
46
  * // { // ExecuteToolOutput
47
47
  * // result: { // ToolExecutionResult
48
- * // statusCode: Number("int"), // required
49
48
  * // output: "DOCUMENT_VALUE", // required
50
- * // error: { // ToolExecutionError
51
- * // message: "STRING_VALUE", // required
52
- * // },
53
49
  * // },
54
50
  * // };
55
51
  *
@@ -59,21 +59,9 @@ declare const GetToolCommand_base: {
59
59
  * // handler: { // ToolHandler Union: only one key present
60
60
  * // email: { // ToolEmailHandler Union: only one key present
61
61
  * // wns: { // ToolWnsEmailConfig
62
- * // to: { // ToolStringValue Union: only one key present
63
- * // static: "STRING_VALUE",
64
- * // variable: "STRING_VALUE",
65
- * // template: "STRING_VALUE",
66
- * // },
67
- * // subject: {// Union: only one key present
68
- * // static: "STRING_VALUE",
69
- * // variable: "STRING_VALUE",
70
- * // template: "STRING_VALUE",
71
- * // },
72
- * // text: {// Union: only one key present
73
- * // static: "STRING_VALUE",
74
- * // variable: "STRING_VALUE",
75
- * // template: "STRING_VALUE",
76
- * // },
62
+ * // to: "STRING_VALUE", // required
63
+ * // subject: "STRING_VALUE", // required
64
+ * // text: "STRING_VALUE", // required
77
65
  * // },
78
66
  * // custom: { // ToolCustomEmailConfig
79
67
  * // smtp: { // ToolSmtpConfig
@@ -83,41 +71,33 @@ declare const GetToolCommand_base: {
83
71
  * // password: "STRING_VALUE", // required
84
72
  * // secure: true || false, // required
85
73
  * // },
86
- * // from: {// Union: only one key present
87
- * // static: "STRING_VALUE",
88
- * // variable: "STRING_VALUE",
89
- * // template: "STRING_VALUE",
90
- * // },
91
- * // to: {// Union: only one key present
92
- * // static: "STRING_VALUE",
93
- * // variable: "STRING_VALUE",
94
- * // template: "STRING_VALUE",
95
- * // },
96
- * // subject: "<ToolStringValue>", // required
97
- * // text: "<ToolStringValue>", // required
98
- * // html: "<ToolStringValue>",
99
- * // cc: "<ToolStringValue>",
100
- * // bcc: "<ToolStringValue>",
101
- * // replyTo: "<ToolStringValue>",
74
+ * // from: "STRING_VALUE", // required
75
+ * // to: "STRING_VALUE", // required
76
+ * // subject: "STRING_VALUE", // required
77
+ * // text: "STRING_VALUE", // required
78
+ * // html: "STRING_VALUE",
79
+ * // cc: "STRING_VALUE",
80
+ * // bcc: "STRING_VALUE",
81
+ * // replyTo: "STRING_VALUE",
102
82
  * // },
103
83
  * // },
104
84
  * // webhook: { // ToolWebhookConfig
105
85
  * // method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
106
- * // url: "<ToolStringValue>", // required
86
+ * // url: "STRING_VALUE", // required
107
87
  * // headers: [ // ToolWebhookHeadersList
108
88
  * // { // ToolWebhookHeader
109
89
  * // name: "STRING_VALUE", // required
110
- * // value: "<ToolStringValue>", // required
90
+ * // value: "STRING_VALUE", // required
111
91
  * // },
112
92
  * // ],
113
- * // body: "<ToolStringValue>",
93
+ * // body: "STRING_VALUE",
114
94
  * // auth: { // ToolWebhookAuth Union: only one key present
115
95
  * // basic: { // ToolWebhookAuthBasic
116
- * // username: "<ToolStringValue>", // required
117
- * // password: "<ToolStringValue>", // required
96
+ * // username: "STRING_VALUE", // required
97
+ * // password: "STRING_VALUE", // required
118
98
  * // },
119
99
  * // bearer: { // ToolWebhookAuthBearer
120
- * // token: "<ToolStringValue>", // required
100
+ * // token: "STRING_VALUE", // required
121
101
  * // },
122
102
  * // oauth: { // ToolWebhookAuthOAuth
123
103
  * // clientId: "STRING_VALUE", // required
@@ -131,11 +111,18 @@ declare const GetToolCommand_base: {
131
111
  * // chat: { // ToolChatHandler
132
112
  * // config: { // ToolChatConfig
133
113
  * // recipient: { // ToolChatRecipient Union: only one key present
134
- * // channelId: "<ToolStringValue>",
135
- * // userId: "<ToolStringValue>",
114
+ * // channelId: "STRING_VALUE",
115
+ * // userId: "STRING_VALUE",
136
116
  * // },
137
- * // text: "<ToolStringValue>", // required
138
- * // botName: "<ToolStringValue>", // required
117
+ * // text: "STRING_VALUE", // required
118
+ * // botName: "STRING_VALUE", // required
119
+ * // },
120
+ * // },
121
+ * // sms: { // ToolSmsHandler
122
+ * // config: { // ToolSmsConfig
123
+ * // from: "STRING_VALUE", // required
124
+ * // to: "STRING_VALUE", // required
125
+ * // message: "STRING_VALUE", // required
139
126
  * // },
140
127
  * // },
141
128
  * // },
@@ -59,21 +59,9 @@ declare const ListToolsCommand_base: {
59
59
  * // handler: { // ToolHandler Union: only one key present
60
60
  * // email: { // ToolEmailHandler Union: only one key present
61
61
  * // wns: { // ToolWnsEmailConfig
62
- * // to: { // ToolStringValue Union: only one key present
63
- * // static: "STRING_VALUE",
64
- * // variable: "STRING_VALUE",
65
- * // template: "STRING_VALUE",
66
- * // },
67
- * // subject: {// Union: only one key present
68
- * // static: "STRING_VALUE",
69
- * // variable: "STRING_VALUE",
70
- * // template: "STRING_VALUE",
71
- * // },
72
- * // text: {// Union: only one key present
73
- * // static: "STRING_VALUE",
74
- * // variable: "STRING_VALUE",
75
- * // template: "STRING_VALUE",
76
- * // },
62
+ * // to: "STRING_VALUE", // required
63
+ * // subject: "STRING_VALUE", // required
64
+ * // text: "STRING_VALUE", // required
77
65
  * // },
78
66
  * // custom: { // ToolCustomEmailConfig
79
67
  * // smtp: { // ToolSmtpConfig
@@ -83,41 +71,33 @@ declare const ListToolsCommand_base: {
83
71
  * // password: "STRING_VALUE", // required
84
72
  * // secure: true || false, // required
85
73
  * // },
86
- * // from: {// Union: only one key present
87
- * // static: "STRING_VALUE",
88
- * // variable: "STRING_VALUE",
89
- * // template: "STRING_VALUE",
90
- * // },
91
- * // to: {// Union: only one key present
92
- * // static: "STRING_VALUE",
93
- * // variable: "STRING_VALUE",
94
- * // template: "STRING_VALUE",
95
- * // },
96
- * // subject: "<ToolStringValue>", // required
97
- * // text: "<ToolStringValue>", // required
98
- * // html: "<ToolStringValue>",
99
- * // cc: "<ToolStringValue>",
100
- * // bcc: "<ToolStringValue>",
101
- * // replyTo: "<ToolStringValue>",
74
+ * // from: "STRING_VALUE", // required
75
+ * // to: "STRING_VALUE", // required
76
+ * // subject: "STRING_VALUE", // required
77
+ * // text: "STRING_VALUE", // required
78
+ * // html: "STRING_VALUE",
79
+ * // cc: "STRING_VALUE",
80
+ * // bcc: "STRING_VALUE",
81
+ * // replyTo: "STRING_VALUE",
102
82
  * // },
103
83
  * // },
104
84
  * // webhook: { // ToolWebhookConfig
105
85
  * // method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
106
- * // url: "<ToolStringValue>", // required
86
+ * // url: "STRING_VALUE", // required
107
87
  * // headers: [ // ToolWebhookHeadersList
108
88
  * // { // ToolWebhookHeader
109
89
  * // name: "STRING_VALUE", // required
110
- * // value: "<ToolStringValue>", // required
90
+ * // value: "STRING_VALUE", // required
111
91
  * // },
112
92
  * // ],
113
- * // body: "<ToolStringValue>",
93
+ * // body: "STRING_VALUE",
114
94
  * // auth: { // ToolWebhookAuth Union: only one key present
115
95
  * // basic: { // ToolWebhookAuthBasic
116
- * // username: "<ToolStringValue>", // required
117
- * // password: "<ToolStringValue>", // required
96
+ * // username: "STRING_VALUE", // required
97
+ * // password: "STRING_VALUE", // required
118
98
  * // },
119
99
  * // bearer: { // ToolWebhookAuthBearer
120
- * // token: "<ToolStringValue>", // required
100
+ * // token: "STRING_VALUE", // required
121
101
  * // },
122
102
  * // oauth: { // ToolWebhookAuthOAuth
123
103
  * // clientId: "STRING_VALUE", // required
@@ -131,11 +111,18 @@ declare const ListToolsCommand_base: {
131
111
  * // chat: { // ToolChatHandler
132
112
  * // config: { // ToolChatConfig
133
113
  * // recipient: { // ToolChatRecipient Union: only one key present
134
- * // channelId: "<ToolStringValue>",
135
- * // userId: "<ToolStringValue>",
114
+ * // channelId: "STRING_VALUE",
115
+ * // userId: "STRING_VALUE",
136
116
  * // },
137
- * // text: "<ToolStringValue>", // required
138
- * // botName: "<ToolStringValue>", // required
117
+ * // text: "STRING_VALUE", // required
118
+ * // botName: "STRING_VALUE", // required
119
+ * // },
120
+ * // },
121
+ * // sms: { // ToolSmsHandler
122
+ * // config: { // ToolSmsConfig
123
+ * // from: "STRING_VALUE", // required
124
+ * // to: "STRING_VALUE", // required
125
+ * // message: "STRING_VALUE", // required
139
126
  * // },
140
127
  * // },
141
128
  * // },
@@ -52,21 +52,9 @@ declare const UpdateToolCommand_base: {
52
52
  * handler: { // ToolHandler Union: only one key present
53
53
  * email: { // ToolEmailHandler Union: only one key present
54
54
  * wns: { // ToolWnsEmailConfig
55
- * to: { // ToolStringValue Union: only one key present
56
- * static: "STRING_VALUE",
57
- * variable: "STRING_VALUE",
58
- * template: "STRING_VALUE",
59
- * },
60
- * subject: {// Union: only one key present
61
- * static: "STRING_VALUE",
62
- * variable: "STRING_VALUE",
63
- * template: "STRING_VALUE",
64
- * },
65
- * text: {// Union: only one key present
66
- * static: "STRING_VALUE",
67
- * variable: "STRING_VALUE",
68
- * template: "STRING_VALUE",
69
- * },
55
+ * to: "STRING_VALUE", // required
56
+ * subject: "STRING_VALUE", // required
57
+ * text: "STRING_VALUE", // required
70
58
  * },
71
59
  * custom: { // ToolCustomEmailConfig
72
60
  * smtp: { // ToolSmtpConfig
@@ -76,41 +64,33 @@ declare const UpdateToolCommand_base: {
76
64
  * password: "STRING_VALUE", // required
77
65
  * secure: true || false, // required
78
66
  * },
79
- * from: {// Union: only one key present
80
- * static: "STRING_VALUE",
81
- * variable: "STRING_VALUE",
82
- * template: "STRING_VALUE",
83
- * },
84
- * to: {// Union: only one key present
85
- * static: "STRING_VALUE",
86
- * variable: "STRING_VALUE",
87
- * template: "STRING_VALUE",
88
- * },
89
- * subject: "<ToolStringValue>", // required
90
- * text: "<ToolStringValue>", // required
91
- * html: "<ToolStringValue>",
92
- * cc: "<ToolStringValue>",
93
- * bcc: "<ToolStringValue>",
94
- * replyTo: "<ToolStringValue>",
67
+ * from: "STRING_VALUE", // required
68
+ * to: "STRING_VALUE", // required
69
+ * subject: "STRING_VALUE", // required
70
+ * text: "STRING_VALUE", // required
71
+ * html: "STRING_VALUE",
72
+ * cc: "STRING_VALUE",
73
+ * bcc: "STRING_VALUE",
74
+ * replyTo: "STRING_VALUE",
95
75
  * },
96
76
  * },
97
77
  * webhook: { // ToolWebhookConfig
98
78
  * method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
99
- * url: "<ToolStringValue>", // required
79
+ * url: "STRING_VALUE", // required
100
80
  * headers: [ // ToolWebhookHeadersList
101
81
  * { // ToolWebhookHeader
102
82
  * name: "STRING_VALUE", // required
103
- * value: "<ToolStringValue>", // required
83
+ * value: "STRING_VALUE", // required
104
84
  * },
105
85
  * ],
106
- * body: "<ToolStringValue>",
86
+ * body: "STRING_VALUE",
107
87
  * auth: { // ToolWebhookAuth Union: only one key present
108
88
  * basic: { // ToolWebhookAuthBasic
109
- * username: "<ToolStringValue>", // required
110
- * password: "<ToolStringValue>", // required
89
+ * username: "STRING_VALUE", // required
90
+ * password: "STRING_VALUE", // required
111
91
  * },
112
92
  * bearer: { // ToolWebhookAuthBearer
113
- * token: "<ToolStringValue>", // required
93
+ * token: "STRING_VALUE", // required
114
94
  * },
115
95
  * oauth: { // ToolWebhookAuthOAuth
116
96
  * clientId: "STRING_VALUE", // required
@@ -124,11 +104,18 @@ declare const UpdateToolCommand_base: {
124
104
  * chat: { // ToolChatHandler
125
105
  * config: { // ToolChatConfig
126
106
  * recipient: { // ToolChatRecipient Union: only one key present
127
- * channelId: "<ToolStringValue>",
128
- * userId: "<ToolStringValue>",
107
+ * channelId: "STRING_VALUE",
108
+ * userId: "STRING_VALUE",
129
109
  * },
130
- * text: "<ToolStringValue>", // required
131
- * botName: "<ToolStringValue>", // required
110
+ * text: "STRING_VALUE", // required
111
+ * botName: "STRING_VALUE", // required
112
+ * },
113
+ * },
114
+ * sms: { // ToolSmsHandler
115
+ * config: { // ToolSmsConfig
116
+ * from: "STRING_VALUE", // required
117
+ * to: "STRING_VALUE", // required
118
+ * message: "STRING_VALUE", // required
132
119
  * },
133
120
  * },
134
121
  * },
@@ -154,21 +141,9 @@ declare const UpdateToolCommand_base: {
154
141
  * // handler: { // ToolHandler Union: only one key present
155
142
  * // email: { // ToolEmailHandler Union: only one key present
156
143
  * // wns: { // ToolWnsEmailConfig
157
- * // to: { // ToolStringValue Union: only one key present
158
- * // static: "STRING_VALUE",
159
- * // variable: "STRING_VALUE",
160
- * // template: "STRING_VALUE",
161
- * // },
162
- * // subject: {// Union: only one key present
163
- * // static: "STRING_VALUE",
164
- * // variable: "STRING_VALUE",
165
- * // template: "STRING_VALUE",
166
- * // },
167
- * // text: {// Union: only one key present
168
- * // static: "STRING_VALUE",
169
- * // variable: "STRING_VALUE",
170
- * // template: "STRING_VALUE",
171
- * // },
144
+ * // to: "STRING_VALUE", // required
145
+ * // subject: "STRING_VALUE", // required
146
+ * // text: "STRING_VALUE", // required
172
147
  * // },
173
148
  * // custom: { // ToolCustomEmailConfig
174
149
  * // smtp: { // ToolSmtpConfig
@@ -178,41 +153,33 @@ declare const UpdateToolCommand_base: {
178
153
  * // password: "STRING_VALUE", // required
179
154
  * // secure: true || false, // required
180
155
  * // },
181
- * // from: {// Union: only one key present
182
- * // static: "STRING_VALUE",
183
- * // variable: "STRING_VALUE",
184
- * // template: "STRING_VALUE",
185
- * // },
186
- * // to: {// Union: only one key present
187
- * // static: "STRING_VALUE",
188
- * // variable: "STRING_VALUE",
189
- * // template: "STRING_VALUE",
190
- * // },
191
- * // subject: "<ToolStringValue>", // required
192
- * // text: "<ToolStringValue>", // required
193
- * // html: "<ToolStringValue>",
194
- * // cc: "<ToolStringValue>",
195
- * // bcc: "<ToolStringValue>",
196
- * // replyTo: "<ToolStringValue>",
156
+ * // from: "STRING_VALUE", // required
157
+ * // to: "STRING_VALUE", // required
158
+ * // subject: "STRING_VALUE", // required
159
+ * // text: "STRING_VALUE", // required
160
+ * // html: "STRING_VALUE",
161
+ * // cc: "STRING_VALUE",
162
+ * // bcc: "STRING_VALUE",
163
+ * // replyTo: "STRING_VALUE",
197
164
  * // },
198
165
  * // },
199
166
  * // webhook: { // ToolWebhookConfig
200
167
  * // method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
201
- * // url: "<ToolStringValue>", // required
168
+ * // url: "STRING_VALUE", // required
202
169
  * // headers: [ // ToolWebhookHeadersList
203
170
  * // { // ToolWebhookHeader
204
171
  * // name: "STRING_VALUE", // required
205
- * // value: "<ToolStringValue>", // required
172
+ * // value: "STRING_VALUE", // required
206
173
  * // },
207
174
  * // ],
208
- * // body: "<ToolStringValue>",
175
+ * // body: "STRING_VALUE",
209
176
  * // auth: { // ToolWebhookAuth Union: only one key present
210
177
  * // basic: { // ToolWebhookAuthBasic
211
- * // username: "<ToolStringValue>", // required
212
- * // password: "<ToolStringValue>", // required
178
+ * // username: "STRING_VALUE", // required
179
+ * // password: "STRING_VALUE", // required
213
180
  * // },
214
181
  * // bearer: { // ToolWebhookAuthBearer
215
- * // token: "<ToolStringValue>", // required
182
+ * // token: "STRING_VALUE", // required
216
183
  * // },
217
184
  * // oauth: { // ToolWebhookAuthOAuth
218
185
  * // clientId: "STRING_VALUE", // required
@@ -226,11 +193,18 @@ declare const UpdateToolCommand_base: {
226
193
  * // chat: { // ToolChatHandler
227
194
  * // config: { // ToolChatConfig
228
195
  * // recipient: { // ToolChatRecipient Union: only one key present
229
- * // channelId: "<ToolStringValue>",
230
- * // userId: "<ToolStringValue>",
196
+ * // channelId: "STRING_VALUE",
197
+ * // userId: "STRING_VALUE",
231
198
  * // },
232
- * // text: "<ToolStringValue>", // required
233
- * // botName: "<ToolStringValue>", // required
199
+ * // text: "STRING_VALUE", // required
200
+ * // botName: "STRING_VALUE", // required
201
+ * // },
202
+ * // },
203
+ * // sms: { // ToolSmsHandler
204
+ * // config: { // ToolSmsConfig
205
+ * // from: "STRING_VALUE", // required
206
+ * // to: "STRING_VALUE", // required
207
+ * // message: "STRING_VALUE", // required
234
208
  * // },
235
209
  * // },
236
210
  * // },
@@ -45,61 +45,6 @@ export declare class ValidationException extends __BaseException {
45
45
  */
46
46
  constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
47
47
  }
48
- /**
49
- * @public
50
- */
51
- export type ToolStringValue = ToolStringValue.StaticMember | ToolStringValue.TemplateMember | ToolStringValue.VariableMember | ToolStringValue.$UnknownMember;
52
- /**
53
- * @public
54
- */
55
- export declare namespace ToolStringValue {
56
- /**
57
- * A static string value like: 'text'
58
- * @public
59
- */
60
- interface StaticMember {
61
- static: string;
62
- variable?: never;
63
- template?: never;
64
- $unknown?: never;
65
- }
66
- /**
67
- * A variable value like: \{\{variable_name\}\}
68
- * @public
69
- */
70
- interface VariableMember {
71
- static?: never;
72
- variable: string;
73
- template?: never;
74
- $unknown?: never;
75
- }
76
- /**
77
- * A template string value like: some text with \{\{variable_name\}\}
78
- * @public
79
- */
80
- interface TemplateMember {
81
- static?: never;
82
- variable?: never;
83
- template: string;
84
- $unknown?: never;
85
- }
86
- /**
87
- * @public
88
- */
89
- interface $UnknownMember {
90
- static?: never;
91
- variable?: never;
92
- template?: never;
93
- $unknown: [string, any];
94
- }
95
- interface Visitor<T> {
96
- static: (value: string) => T;
97
- variable: (value: string) => T;
98
- template: (value: string) => T;
99
- _: (name: string, value: any) => T;
100
- }
101
- const visit: <T>(value: ToolStringValue, visitor: Visitor<T>) => T;
102
- }
103
48
  /**
104
49
  * @public
105
50
  */
@@ -113,7 +58,7 @@ export declare namespace ToolChatRecipient {
113
58
  * @public
114
59
  */
115
60
  interface ChannelIdMember {
116
- channelId: ToolStringValue;
61
+ channelId: string;
117
62
  userId?: never;
118
63
  $unknown?: never;
119
64
  }
@@ -123,7 +68,7 @@ export declare namespace ToolChatRecipient {
123
68
  */
124
69
  interface UserIdMember {
125
70
  channelId?: never;
126
- userId: ToolStringValue;
71
+ userId: string;
127
72
  $unknown?: never;
128
73
  }
129
74
  /**
@@ -135,8 +80,8 @@ export declare namespace ToolChatRecipient {
135
80
  $unknown: [string, any];
136
81
  }
137
82
  interface Visitor<T> {
138
- channelId: (value: ToolStringValue) => T;
139
- userId: (value: ToolStringValue) => T;
83
+ channelId: (value: string) => T;
84
+ userId: (value: string) => T;
140
85
  _: (name: string, value: any) => T;
141
86
  }
142
87
  const visit: <T>(value: ToolChatRecipient, visitor: Visitor<T>) => T;
@@ -154,12 +99,12 @@ export interface ToolChatConfig {
154
99
  * Message text to send.
155
100
  * @public
156
101
  */
157
- text: ToolStringValue;
102
+ text: string;
158
103
  /**
159
104
  * Name of the system bot that will send the message.
160
105
  * @public
161
106
  */
162
- botName: ToolStringValue;
107
+ botName: string;
163
108
  }
164
109
  /**
165
110
  * @public
@@ -214,42 +159,42 @@ export interface ToolCustomEmailConfig {
214
159
  * From email address associated with the SMTP server, e.g.: 'john.doe@gmail.com'
215
160
  * @public
216
161
  */
217
- from: ToolStringValue;
162
+ from: string;
218
163
  /**
219
164
  * To email address, e.g.: 'jane.doe@example.com'
220
165
  * @public
221
166
  */
222
- to: ToolStringValue;
167
+ to: string;
223
168
  /**
224
169
  * Subject of the email.
225
170
  * @public
226
171
  */
227
- subject: ToolStringValue;
172
+ subject: string;
228
173
  /**
229
174
  * Text of the email.
230
175
  * @public
231
176
  */
232
- text: ToolStringValue;
177
+ text: string;
233
178
  /**
234
179
  * HTML content of the email
235
180
  * @public
236
181
  */
237
- html?: ToolStringValue | undefined;
182
+ html?: string | undefined;
238
183
  /**
239
184
  * CC email addresses
240
185
  * @public
241
186
  */
242
- cc?: ToolStringValue | undefined;
187
+ cc?: string | undefined;
243
188
  /**
244
189
  * BCC email addresses
245
190
  * @public
246
191
  */
247
- bcc?: ToolStringValue | undefined;
192
+ bcc?: string | undefined;
248
193
  /**
249
194
  * Reply-to email address
250
195
  * @public
251
196
  */
252
- replyTo?: ToolStringValue | undefined;
197
+ replyTo?: string | undefined;
253
198
  }
254
199
  /**
255
200
  * @public
@@ -259,17 +204,17 @@ export interface ToolWnsEmailConfig {
259
204
  * To email address, e.g.: 'jane.doe@example.com'.
260
205
  * @public
261
206
  */
262
- to: ToolStringValue;
207
+ to: string;
263
208
  /**
264
209
  * Subject of the email.
265
210
  * @public
266
211
  */
267
- subject: ToolStringValue;
212
+ subject: string;
268
213
  /**
269
214
  * Text of the email.
270
215
  * @public
271
216
  */
272
- text: ToolStringValue;
217
+ text: string;
273
218
  }
274
219
  /**
275
220
  * @public
@@ -318,6 +263,36 @@ export declare namespace ToolEmailHandler {
318
263
  */
319
264
  export interface ToolSearchConfig {
320
265
  }
266
+ /**
267
+ * @public
268
+ */
269
+ export interface ToolSmsConfig {
270
+ /**
271
+ * Sender phone number in E.164 format (e.g., +1234567890). This is the phone number that will appear as the sender of the SMS. Supports template syntax with variables.
272
+ * @public
273
+ */
274
+ from: string;
275
+ /**
276
+ * Recipient phone number in E.164 format (e.g., +1234567890). Supports template syntax with variables.
277
+ * @public
278
+ */
279
+ to: string;
280
+ /**
281
+ * SMS message text to send. Supports template syntax with variables. Maximum length depends on carrier limits (typically 160 characters for single SMS, 1600 for concatenated).
282
+ * @public
283
+ */
284
+ message: string;
285
+ }
286
+ /**
287
+ * @public
288
+ */
289
+ export interface ToolSmsHandler {
290
+ /**
291
+ * SMS handler configuration for sending text messages via Classound a2s API.
292
+ * @public
293
+ */
294
+ config: ToolSmsConfig;
295
+ }
321
296
  /**
322
297
  * @public
323
298
  */
@@ -326,12 +301,12 @@ export interface ToolWebhookAuthBasic {
326
301
  * Username for basic authentication
327
302
  * @public
328
303
  */
329
- username: ToolStringValue;
304
+ username: string;
330
305
  /**
331
306
  * Password for basic authentication
332
307
  * @public
333
308
  */
334
- password: ToolStringValue;
309
+ password: string;
335
310
  }
336
311
  /**
337
312
  * @public
@@ -341,7 +316,7 @@ export interface ToolWebhookAuthBearer {
341
316
  * Bearer token value, supports static, variable, or template syntax
342
317
  * @public
343
318
  */
344
- token: ToolStringValue;
319
+ token: string;
345
320
  }
346
321
  /**
347
322
  * @public
@@ -436,7 +411,7 @@ export interface ToolWebhookHeader {
436
411
  * Header value, supports static, variable, or template syntax
437
412
  * @public
438
413
  */
439
- value: ToolStringValue;
414
+ value: string;
440
415
  }
441
416
  /**
442
417
  * @public
@@ -466,7 +441,7 @@ export interface ToolWebhookConfig {
466
441
  * URL endpoint for the webhook, supports variables in path and query parameters using \{\{variable_name\}\}, e.g.: 'https://api.example.com/users/\{\{userId\}\}?filter=\{\{filter\}\}&page=\{\{page\}\}'
467
442
  * @public
468
443
  */
469
- url: ToolStringValue;
444
+ url: string;
470
445
  /**
471
446
  * HTTP headers for the webhook request. For custom authentication headers (e.g., X-API-Key), add them here instead of using auth.customHeader
472
447
  * @public
@@ -476,7 +451,7 @@ export interface ToolWebhookConfig {
476
451
  * Request body for POST, PUT, or PATCH requests
477
452
  * @public
478
453
  */
479
- body?: ToolStringValue | undefined;
454
+ body?: string | undefined;
480
455
  /**
481
456
  * Authentication configuration for the webhook request. For custom header authentication, use the headers field instead
482
457
  * @public
@@ -486,7 +461,7 @@ export interface ToolWebhookConfig {
486
461
  /**
487
462
  * @public
488
463
  */
489
- export type ToolHandler = ToolHandler.ChatMember | ToolHandler.EmailMember | ToolHandler.SearchMember | ToolHandler.WebhookMember | ToolHandler.$UnknownMember;
464
+ export type ToolHandler = ToolHandler.ChatMember | ToolHandler.EmailMember | ToolHandler.SearchMember | ToolHandler.SmsMember | ToolHandler.WebhookMember | ToolHandler.$UnknownMember;
490
465
  /**
491
466
  * @public
492
467
  */
@@ -500,6 +475,7 @@ export declare namespace ToolHandler {
500
475
  webhook?: never;
501
476
  search?: never;
502
477
  chat?: never;
478
+ sms?: never;
503
479
  $unknown?: never;
504
480
  }
505
481
  /**
@@ -511,6 +487,7 @@ export declare namespace ToolHandler {
511
487
  webhook: ToolWebhookConfig;
512
488
  search?: never;
513
489
  chat?: never;
490
+ sms?: never;
514
491
  $unknown?: never;
515
492
  }
516
493
  /**
@@ -522,6 +499,7 @@ export declare namespace ToolHandler {
522
499
  webhook?: never;
523
500
  search: ToolSearchConfig;
524
501
  chat?: never;
502
+ sms?: never;
525
503
  $unknown?: never;
526
504
  }
527
505
  /**
@@ -533,6 +511,19 @@ export declare namespace ToolHandler {
533
511
  webhook?: never;
534
512
  search?: never;
535
513
  chat: ToolChatHandler;
514
+ sms?: never;
515
+ $unknown?: never;
516
+ }
517
+ /**
518
+ * SMS handler of the tool.
519
+ * @public
520
+ */
521
+ interface SmsMember {
522
+ email?: never;
523
+ webhook?: never;
524
+ search?: never;
525
+ chat?: never;
526
+ sms: ToolSmsHandler;
536
527
  $unknown?: never;
537
528
  }
538
529
  /**
@@ -543,6 +534,7 @@ export declare namespace ToolHandler {
543
534
  webhook?: never;
544
535
  search?: never;
545
536
  chat?: never;
537
+ sms?: never;
546
538
  $unknown: [string, any];
547
539
  }
548
540
  interface Visitor<T> {
@@ -550,6 +542,7 @@ export declare namespace ToolHandler {
550
542
  webhook: (value: ToolWebhookConfig) => T;
551
543
  search: (value: ToolSearchConfig) => T;
552
544
  chat: (value: ToolChatHandler) => T;
545
+ sms: (value: ToolSmsHandler) => T;
553
546
  _: (name: string, value: any) => T;
554
547
  }
555
548
  const visit: <T>(value: ToolHandler, visitor: Visitor<T>) => T;
@@ -812,35 +805,15 @@ export interface ExecuteToolInput {
812
805
  */
813
806
  user?: string | undefined;
814
807
  }
815
- /**
816
- * @public
817
- */
818
- export interface ToolExecutionError {
819
- /**
820
- * Message of the tool execution error
821
- * @public
822
- */
823
- message: string;
824
- }
825
808
  /**
826
809
  * @public
827
810
  */
828
811
  export interface ToolExecutionResult {
829
- /**
830
- * Response status code of the tool execution
831
- * @public
832
- */
833
- statusCode: number;
834
812
  /**
835
813
  * Output of the tool execution
836
814
  * @public
837
815
  */
838
816
  output: __DocumentType;
839
- /**
840
- * Error of the tool execution
841
- * @public
842
- */
843
- error: ToolExecutionError;
844
817
  }
845
818
  /**
846
819
  * @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.30",
4
+ "version": "0.0.32",
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",