@wildix/wim-tools-client 0.0.20 → 0.0.22
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 +22 -1
- package/dist-es/models/models_0.js +21 -0
- package/dist-types/commands/CreateToolCommand.d.ts +52 -0
- package/dist-types/commands/GetToolCommand.d.ts +26 -0
- package/dist-types/commands/ListToolsCommand.d.ts +26 -0
- package/dist-types/commands/UpdateToolCommand.d.ts +52 -0
- package/dist-types/models/models_0.d.ts +178 -1
- package/package.json +1 -1
|
@@ -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.ToolEmailHandler = exports.ToolStringValue = exports.ValidationException = exports.NotFoundException = exports.AlreadyExistException = void 0;
|
|
3
|
+
exports.ToolExecutionServerException = exports.ToolExecutionException = exports.ToolVariableType = exports.ToolHandler = exports.ToolWebhookMethod = exports.ToolWebhookAuth = exports.ToolEmailHandler = exports.ToolStringValue = exports.ValidationException = exports.NotFoundException = exports.AlreadyExistException = void 0;
|
|
4
4
|
const ToolsServiceException_1 = require("./ToolsServiceException");
|
|
5
5
|
class AlreadyExistException extends ToolsServiceException_1.ToolsServiceException {
|
|
6
6
|
name = "AlreadyExistException";
|
|
@@ -63,11 +63,32 @@ var ToolEmailHandler;
|
|
|
63
63
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
64
64
|
};
|
|
65
65
|
})(ToolEmailHandler || (exports.ToolEmailHandler = ToolEmailHandler = {}));
|
|
66
|
+
var ToolWebhookAuth;
|
|
67
|
+
(function (ToolWebhookAuth) {
|
|
68
|
+
ToolWebhookAuth.visit = (value, visitor) => {
|
|
69
|
+
if (value.basic !== undefined)
|
|
70
|
+
return visitor.basic(value.basic);
|
|
71
|
+
if (value.bearer !== undefined)
|
|
72
|
+
return visitor.bearer(value.bearer);
|
|
73
|
+
if (value.oauth !== undefined)
|
|
74
|
+
return visitor.oauth(value.oauth);
|
|
75
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
76
|
+
};
|
|
77
|
+
})(ToolWebhookAuth || (exports.ToolWebhookAuth = ToolWebhookAuth = {}));
|
|
78
|
+
exports.ToolWebhookMethod = {
|
|
79
|
+
DELETE: "DELETE",
|
|
80
|
+
GET: "GET",
|
|
81
|
+
PATCH: "PATCH",
|
|
82
|
+
POST: "POST",
|
|
83
|
+
PUT: "PUT",
|
|
84
|
+
};
|
|
66
85
|
var ToolHandler;
|
|
67
86
|
(function (ToolHandler) {
|
|
68
87
|
ToolHandler.visit = (value, visitor) => {
|
|
69
88
|
if (value.email !== undefined)
|
|
70
89
|
return visitor.email(value.email);
|
|
90
|
+
if (value.webhook !== undefined)
|
|
91
|
+
return visitor.webhook(value.webhook);
|
|
71
92
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
72
93
|
};
|
|
73
94
|
})(ToolHandler || (exports.ToolHandler = ToolHandler = {}));
|
|
@@ -57,11 +57,32 @@ export var ToolEmailHandler;
|
|
|
57
57
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
58
58
|
};
|
|
59
59
|
})(ToolEmailHandler || (ToolEmailHandler = {}));
|
|
60
|
+
export var ToolWebhookAuth;
|
|
61
|
+
(function (ToolWebhookAuth) {
|
|
62
|
+
ToolWebhookAuth.visit = (value, visitor) => {
|
|
63
|
+
if (value.basic !== undefined)
|
|
64
|
+
return visitor.basic(value.basic);
|
|
65
|
+
if (value.bearer !== undefined)
|
|
66
|
+
return visitor.bearer(value.bearer);
|
|
67
|
+
if (value.oauth !== undefined)
|
|
68
|
+
return visitor.oauth(value.oauth);
|
|
69
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
70
|
+
};
|
|
71
|
+
})(ToolWebhookAuth || (ToolWebhookAuth = {}));
|
|
72
|
+
export const ToolWebhookMethod = {
|
|
73
|
+
DELETE: "DELETE",
|
|
74
|
+
GET: "GET",
|
|
75
|
+
PATCH: "PATCH",
|
|
76
|
+
POST: "POST",
|
|
77
|
+
PUT: "PUT",
|
|
78
|
+
};
|
|
60
79
|
export var ToolHandler;
|
|
61
80
|
(function (ToolHandler) {
|
|
62
81
|
ToolHandler.visit = (value, visitor) => {
|
|
63
82
|
if (value.email !== undefined)
|
|
64
83
|
return visitor.email(value.email);
|
|
84
|
+
if (value.webhook !== undefined)
|
|
85
|
+
return visitor.webhook(value.webhook);
|
|
65
86
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
66
87
|
};
|
|
67
88
|
})(ToolHandler || (ToolHandler = {}));
|
|
@@ -92,6 +92,32 @@ declare const CreateToolCommand_base: {
|
|
|
92
92
|
* replyTo: "<ToolStringValue>",
|
|
93
93
|
* },
|
|
94
94
|
* },
|
|
95
|
+
* webhook: { // ToolWebhookConfig
|
|
96
|
+
* method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
|
|
97
|
+
* url: "<ToolStringValue>", // required
|
|
98
|
+
* headers: [ // ToolWebhookHeadersList
|
|
99
|
+
* { // ToolWebhookHeader
|
|
100
|
+
* name: "STRING_VALUE", // required
|
|
101
|
+
* value: "<ToolStringValue>", // required
|
|
102
|
+
* },
|
|
103
|
+
* ],
|
|
104
|
+
* body: "<ToolStringValue>",
|
|
105
|
+
* auth: { // ToolWebhookAuth Union: only one key present
|
|
106
|
+
* basic: { // ToolWebhookAuthBasic
|
|
107
|
+
* username: "<ToolStringValue>", // required
|
|
108
|
+
* password: "<ToolStringValue>", // required
|
|
109
|
+
* },
|
|
110
|
+
* bearer: { // ToolWebhookAuthBearer
|
|
111
|
+
* token: "<ToolStringValue>", // required
|
|
112
|
+
* },
|
|
113
|
+
* oauth: { // ToolWebhookAuthOAuth
|
|
114
|
+
* clientId: "STRING_VALUE", // required
|
|
115
|
+
* clientSecret: "STRING_VALUE", // required
|
|
116
|
+
* endpointUrl: "STRING_VALUE", // required
|
|
117
|
+
* scope: "STRING_VALUE",
|
|
118
|
+
* },
|
|
119
|
+
* },
|
|
120
|
+
* },
|
|
95
121
|
* },
|
|
96
122
|
* };
|
|
97
123
|
* const command = new CreateToolCommand(input);
|
|
@@ -156,6 +182,32 @@ declare const CreateToolCommand_base: {
|
|
|
156
182
|
* // replyTo: "<ToolStringValue>",
|
|
157
183
|
* // },
|
|
158
184
|
* // },
|
|
185
|
+
* // webhook: { // ToolWebhookConfig
|
|
186
|
+
* // method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
|
|
187
|
+
* // url: "<ToolStringValue>", // required
|
|
188
|
+
* // headers: [ // ToolWebhookHeadersList
|
|
189
|
+
* // { // ToolWebhookHeader
|
|
190
|
+
* // name: "STRING_VALUE", // required
|
|
191
|
+
* // value: "<ToolStringValue>", // required
|
|
192
|
+
* // },
|
|
193
|
+
* // ],
|
|
194
|
+
* // body: "<ToolStringValue>",
|
|
195
|
+
* // auth: { // ToolWebhookAuth Union: only one key present
|
|
196
|
+
* // basic: { // ToolWebhookAuthBasic
|
|
197
|
+
* // username: "<ToolStringValue>", // required
|
|
198
|
+
* // password: "<ToolStringValue>", // required
|
|
199
|
+
* // },
|
|
200
|
+
* // bearer: { // ToolWebhookAuthBearer
|
|
201
|
+
* // token: "<ToolStringValue>", // required
|
|
202
|
+
* // },
|
|
203
|
+
* // oauth: { // ToolWebhookAuthOAuth
|
|
204
|
+
* // clientId: "STRING_VALUE", // required
|
|
205
|
+
* // clientSecret: "STRING_VALUE", // required
|
|
206
|
+
* // endpointUrl: "STRING_VALUE", // required
|
|
207
|
+
* // scope: "STRING_VALUE",
|
|
208
|
+
* // },
|
|
209
|
+
* // },
|
|
210
|
+
* // },
|
|
159
211
|
* // },
|
|
160
212
|
* // },
|
|
161
213
|
* // };
|
|
@@ -100,6 +100,32 @@ declare const GetToolCommand_base: {
|
|
|
100
100
|
* // replyTo: "<ToolStringValue>",
|
|
101
101
|
* // },
|
|
102
102
|
* // },
|
|
103
|
+
* // webhook: { // ToolWebhookConfig
|
|
104
|
+
* // method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
|
|
105
|
+
* // url: "<ToolStringValue>", // required
|
|
106
|
+
* // headers: [ // ToolWebhookHeadersList
|
|
107
|
+
* // { // ToolWebhookHeader
|
|
108
|
+
* // name: "STRING_VALUE", // required
|
|
109
|
+
* // value: "<ToolStringValue>", // required
|
|
110
|
+
* // },
|
|
111
|
+
* // ],
|
|
112
|
+
* // body: "<ToolStringValue>",
|
|
113
|
+
* // auth: { // ToolWebhookAuth Union: only one key present
|
|
114
|
+
* // basic: { // ToolWebhookAuthBasic
|
|
115
|
+
* // username: "<ToolStringValue>", // required
|
|
116
|
+
* // password: "<ToolStringValue>", // required
|
|
117
|
+
* // },
|
|
118
|
+
* // bearer: { // ToolWebhookAuthBearer
|
|
119
|
+
* // token: "<ToolStringValue>", // required
|
|
120
|
+
* // },
|
|
121
|
+
* // oauth: { // ToolWebhookAuthOAuth
|
|
122
|
+
* // clientId: "STRING_VALUE", // required
|
|
123
|
+
* // clientSecret: "STRING_VALUE", // required
|
|
124
|
+
* // endpointUrl: "STRING_VALUE", // required
|
|
125
|
+
* // scope: "STRING_VALUE",
|
|
126
|
+
* // },
|
|
127
|
+
* // },
|
|
128
|
+
* // },
|
|
103
129
|
* // },
|
|
104
130
|
* // },
|
|
105
131
|
* // };
|
|
@@ -100,6 +100,32 @@ declare const ListToolsCommand_base: {
|
|
|
100
100
|
* // replyTo: "<ToolStringValue>",
|
|
101
101
|
* // },
|
|
102
102
|
* // },
|
|
103
|
+
* // webhook: { // ToolWebhookConfig
|
|
104
|
+
* // method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
|
|
105
|
+
* // url: "<ToolStringValue>", // required
|
|
106
|
+
* // headers: [ // ToolWebhookHeadersList
|
|
107
|
+
* // { // ToolWebhookHeader
|
|
108
|
+
* // name: "STRING_VALUE", // required
|
|
109
|
+
* // value: "<ToolStringValue>", // required
|
|
110
|
+
* // },
|
|
111
|
+
* // ],
|
|
112
|
+
* // body: "<ToolStringValue>",
|
|
113
|
+
* // auth: { // ToolWebhookAuth Union: only one key present
|
|
114
|
+
* // basic: { // ToolWebhookAuthBasic
|
|
115
|
+
* // username: "<ToolStringValue>", // required
|
|
116
|
+
* // password: "<ToolStringValue>", // required
|
|
117
|
+
* // },
|
|
118
|
+
* // bearer: { // ToolWebhookAuthBearer
|
|
119
|
+
* // token: "<ToolStringValue>", // required
|
|
120
|
+
* // },
|
|
121
|
+
* // oauth: { // ToolWebhookAuthOAuth
|
|
122
|
+
* // clientId: "STRING_VALUE", // required
|
|
123
|
+
* // clientSecret: "STRING_VALUE", // required
|
|
124
|
+
* // endpointUrl: "STRING_VALUE", // required
|
|
125
|
+
* // scope: "STRING_VALUE",
|
|
126
|
+
* // },
|
|
127
|
+
* // },
|
|
128
|
+
* // },
|
|
103
129
|
* // },
|
|
104
130
|
* // },
|
|
105
131
|
* // ],
|
|
@@ -93,6 +93,32 @@ declare const UpdateToolCommand_base: {
|
|
|
93
93
|
* replyTo: "<ToolStringValue>",
|
|
94
94
|
* },
|
|
95
95
|
* },
|
|
96
|
+
* webhook: { // ToolWebhookConfig
|
|
97
|
+
* method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
|
|
98
|
+
* url: "<ToolStringValue>", // required
|
|
99
|
+
* headers: [ // ToolWebhookHeadersList
|
|
100
|
+
* { // ToolWebhookHeader
|
|
101
|
+
* name: "STRING_VALUE", // required
|
|
102
|
+
* value: "<ToolStringValue>", // required
|
|
103
|
+
* },
|
|
104
|
+
* ],
|
|
105
|
+
* body: "<ToolStringValue>",
|
|
106
|
+
* auth: { // ToolWebhookAuth Union: only one key present
|
|
107
|
+
* basic: { // ToolWebhookAuthBasic
|
|
108
|
+
* username: "<ToolStringValue>", // required
|
|
109
|
+
* password: "<ToolStringValue>", // required
|
|
110
|
+
* },
|
|
111
|
+
* bearer: { // ToolWebhookAuthBearer
|
|
112
|
+
* token: "<ToolStringValue>", // required
|
|
113
|
+
* },
|
|
114
|
+
* oauth: { // ToolWebhookAuthOAuth
|
|
115
|
+
* clientId: "STRING_VALUE", // required
|
|
116
|
+
* clientSecret: "STRING_VALUE", // required
|
|
117
|
+
* endpointUrl: "STRING_VALUE", // required
|
|
118
|
+
* scope: "STRING_VALUE",
|
|
119
|
+
* },
|
|
120
|
+
* },
|
|
121
|
+
* },
|
|
96
122
|
* },
|
|
97
123
|
* };
|
|
98
124
|
* const command = new UpdateToolCommand(input);
|
|
@@ -157,6 +183,32 @@ declare const UpdateToolCommand_base: {
|
|
|
157
183
|
* // replyTo: "<ToolStringValue>",
|
|
158
184
|
* // },
|
|
159
185
|
* // },
|
|
186
|
+
* // webhook: { // ToolWebhookConfig
|
|
187
|
+
* // method: "GET" || "POST" || "PUT" || "DELETE" || "PATCH", // required
|
|
188
|
+
* // url: "<ToolStringValue>", // required
|
|
189
|
+
* // headers: [ // ToolWebhookHeadersList
|
|
190
|
+
* // { // ToolWebhookHeader
|
|
191
|
+
* // name: "STRING_VALUE", // required
|
|
192
|
+
* // value: "<ToolStringValue>", // required
|
|
193
|
+
* // },
|
|
194
|
+
* // ],
|
|
195
|
+
* // body: "<ToolStringValue>",
|
|
196
|
+
* // auth: { // ToolWebhookAuth Union: only one key present
|
|
197
|
+
* // basic: { // ToolWebhookAuthBasic
|
|
198
|
+
* // username: "<ToolStringValue>", // required
|
|
199
|
+
* // password: "<ToolStringValue>", // required
|
|
200
|
+
* // },
|
|
201
|
+
* // bearer: { // ToolWebhookAuthBearer
|
|
202
|
+
* // token: "<ToolStringValue>", // required
|
|
203
|
+
* // },
|
|
204
|
+
* // oauth: { // ToolWebhookAuthOAuth
|
|
205
|
+
* // clientId: "STRING_VALUE", // required
|
|
206
|
+
* // clientSecret: "STRING_VALUE", // required
|
|
207
|
+
* // endpointUrl: "STRING_VALUE", // required
|
|
208
|
+
* // scope: "STRING_VALUE",
|
|
209
|
+
* // },
|
|
210
|
+
* // },
|
|
211
|
+
* // },
|
|
160
212
|
* // },
|
|
161
213
|
* // },
|
|
162
214
|
* // };
|
|
@@ -233,7 +233,172 @@ export declare namespace ToolEmailHandler {
|
|
|
233
233
|
/**
|
|
234
234
|
* @public
|
|
235
235
|
*/
|
|
236
|
-
export
|
|
236
|
+
export interface ToolWebhookAuthBasic {
|
|
237
|
+
/**
|
|
238
|
+
* Username for basic authentication
|
|
239
|
+
* @public
|
|
240
|
+
*/
|
|
241
|
+
username: ToolStringValue;
|
|
242
|
+
/**
|
|
243
|
+
* Password for basic authentication
|
|
244
|
+
* @public
|
|
245
|
+
*/
|
|
246
|
+
password: ToolStringValue;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
export interface ToolWebhookAuthBearer {
|
|
252
|
+
/**
|
|
253
|
+
* Bearer token value, supports static, variable, or template syntax
|
|
254
|
+
* @public
|
|
255
|
+
*/
|
|
256
|
+
token: ToolStringValue;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* @public
|
|
260
|
+
*/
|
|
261
|
+
export interface ToolWebhookAuthOAuth {
|
|
262
|
+
/**
|
|
263
|
+
* OAuth client ID
|
|
264
|
+
* @public
|
|
265
|
+
*/
|
|
266
|
+
clientId: string;
|
|
267
|
+
/**
|
|
268
|
+
* OAuth client secret
|
|
269
|
+
* @public
|
|
270
|
+
*/
|
|
271
|
+
clientSecret: string;
|
|
272
|
+
/**
|
|
273
|
+
* OAuth token endpoint URL
|
|
274
|
+
* @public
|
|
275
|
+
*/
|
|
276
|
+
endpointUrl: string;
|
|
277
|
+
/**
|
|
278
|
+
* OAuth scope
|
|
279
|
+
* @public
|
|
280
|
+
*/
|
|
281
|
+
scope?: string | undefined;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* @public
|
|
285
|
+
*/
|
|
286
|
+
export type ToolWebhookAuth = ToolWebhookAuth.BasicMember | ToolWebhookAuth.BearerMember | ToolWebhookAuth.OauthMember | ToolWebhookAuth.$UnknownMember;
|
|
287
|
+
/**
|
|
288
|
+
* @public
|
|
289
|
+
*/
|
|
290
|
+
export declare namespace ToolWebhookAuth {
|
|
291
|
+
/**
|
|
292
|
+
* HTTP Basic Authentication
|
|
293
|
+
* @public
|
|
294
|
+
*/
|
|
295
|
+
interface BasicMember {
|
|
296
|
+
basic: ToolWebhookAuthBasic;
|
|
297
|
+
bearer?: never;
|
|
298
|
+
oauth?: never;
|
|
299
|
+
$unknown?: never;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* HTTP Bearer Token Authentication
|
|
303
|
+
* @public
|
|
304
|
+
*/
|
|
305
|
+
interface BearerMember {
|
|
306
|
+
basic?: never;
|
|
307
|
+
bearer: ToolWebhookAuthBearer;
|
|
308
|
+
oauth?: never;
|
|
309
|
+
$unknown?: never;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* HTTP OAuth Authentication
|
|
313
|
+
* @public
|
|
314
|
+
*/
|
|
315
|
+
interface OauthMember {
|
|
316
|
+
basic?: never;
|
|
317
|
+
bearer?: never;
|
|
318
|
+
oauth: ToolWebhookAuthOAuth;
|
|
319
|
+
$unknown?: never;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* @public
|
|
323
|
+
*/
|
|
324
|
+
interface $UnknownMember {
|
|
325
|
+
basic?: never;
|
|
326
|
+
bearer?: never;
|
|
327
|
+
oauth?: never;
|
|
328
|
+
$unknown: [string, any];
|
|
329
|
+
}
|
|
330
|
+
interface Visitor<T> {
|
|
331
|
+
basic: (value: ToolWebhookAuthBasic) => T;
|
|
332
|
+
bearer: (value: ToolWebhookAuthBearer) => T;
|
|
333
|
+
oauth: (value: ToolWebhookAuthOAuth) => T;
|
|
334
|
+
_: (name: string, value: any) => T;
|
|
335
|
+
}
|
|
336
|
+
const visit: <T>(value: ToolWebhookAuth, visitor: Visitor<T>) => T;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* @public
|
|
340
|
+
*/
|
|
341
|
+
export interface ToolWebhookHeader {
|
|
342
|
+
/**
|
|
343
|
+
* Header name, e.g.: 'X-Custom-Header'
|
|
344
|
+
* @public
|
|
345
|
+
*/
|
|
346
|
+
name: string;
|
|
347
|
+
/**
|
|
348
|
+
* Header value, supports static, variable, or template syntax
|
|
349
|
+
* @public
|
|
350
|
+
*/
|
|
351
|
+
value: ToolStringValue;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* @public
|
|
355
|
+
* @enum
|
|
356
|
+
*/
|
|
357
|
+
export declare const ToolWebhookMethod: {
|
|
358
|
+
readonly DELETE: "DELETE";
|
|
359
|
+
readonly GET: "GET";
|
|
360
|
+
readonly PATCH: "PATCH";
|
|
361
|
+
readonly POST: "POST";
|
|
362
|
+
readonly PUT: "PUT";
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* @public
|
|
366
|
+
*/
|
|
367
|
+
export type ToolWebhookMethod = typeof ToolWebhookMethod[keyof typeof ToolWebhookMethod];
|
|
368
|
+
/**
|
|
369
|
+
* @public
|
|
370
|
+
*/
|
|
371
|
+
export interface ToolWebhookConfig {
|
|
372
|
+
/**
|
|
373
|
+
* HTTP method for the webhook request, e.g.: 'POST'
|
|
374
|
+
* @public
|
|
375
|
+
*/
|
|
376
|
+
method: ToolWebhookMethod;
|
|
377
|
+
/**
|
|
378
|
+
* 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\}\}'
|
|
379
|
+
* @public
|
|
380
|
+
*/
|
|
381
|
+
url: ToolStringValue;
|
|
382
|
+
/**
|
|
383
|
+
* HTTP headers for the webhook request. For custom authentication headers (e.g., X-API-Key), add them here instead of using auth.customHeader
|
|
384
|
+
* @public
|
|
385
|
+
*/
|
|
386
|
+
headers?: (ToolWebhookHeader)[] | undefined;
|
|
387
|
+
/**
|
|
388
|
+
* Request body for POST, PUT, or PATCH requests
|
|
389
|
+
* @public
|
|
390
|
+
*/
|
|
391
|
+
body?: ToolStringValue | undefined;
|
|
392
|
+
/**
|
|
393
|
+
* Authentication configuration for the webhook request. For custom header authentication, use the headers field instead
|
|
394
|
+
* @public
|
|
395
|
+
*/
|
|
396
|
+
auth?: ToolWebhookAuth | undefined;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* @public
|
|
400
|
+
*/
|
|
401
|
+
export type ToolHandler = ToolHandler.EmailMember | ToolHandler.WebhookMember | ToolHandler.$UnknownMember;
|
|
237
402
|
/**
|
|
238
403
|
* @public
|
|
239
404
|
*/
|
|
@@ -244,6 +409,16 @@ export declare namespace ToolHandler {
|
|
|
244
409
|
*/
|
|
245
410
|
interface EmailMember {
|
|
246
411
|
email: ToolEmailHandler;
|
|
412
|
+
webhook?: never;
|
|
413
|
+
$unknown?: never;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Webhook handler of the tool.
|
|
417
|
+
* @public
|
|
418
|
+
*/
|
|
419
|
+
interface WebhookMember {
|
|
420
|
+
email?: never;
|
|
421
|
+
webhook: ToolWebhookConfig;
|
|
247
422
|
$unknown?: never;
|
|
248
423
|
}
|
|
249
424
|
/**
|
|
@@ -251,10 +426,12 @@ export declare namespace ToolHandler {
|
|
|
251
426
|
*/
|
|
252
427
|
interface $UnknownMember {
|
|
253
428
|
email?: never;
|
|
429
|
+
webhook?: never;
|
|
254
430
|
$unknown: [string, any];
|
|
255
431
|
}
|
|
256
432
|
interface Visitor<T> {
|
|
257
433
|
email: (value: ToolEmailHandler) => T;
|
|
434
|
+
webhook: (value: ToolWebhookConfig) => T;
|
|
258
435
|
_: (name: string, value: any) => T;
|
|
259
436
|
}
|
|
260
437
|
const visit: <T>(value: ToolHandler, visitor: Visitor<T>) => T;
|
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.
|
|
4
|
+
"version": "0.0.22",
|
|
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",
|