@wildix/wim-tools-client 0.0.24 → 0.0.25
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 +21 -1
- package/dist-es/models/models_0.js +20 -0
- package/dist-types/commands/CreateToolCommand.d.ts +20 -0
- package/dist-types/commands/GetToolCommand.d.ts +10 -0
- package/dist-types/commands/ListToolsCommand.d.ts +10 -0
- package/dist-types/commands/UpdateToolCommand.d.ts +20 -0
- package/dist-types/models/models_0.d.ts +107 -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.ToolWebhookMethod = exports.ToolWebhookAuth = 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.ToolChatHandler = exports.ToolChatRecipient = 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";
|
|
@@ -53,6 +53,24 @@ var ToolStringValue;
|
|
|
53
53
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
54
54
|
};
|
|
55
55
|
})(ToolStringValue || (exports.ToolStringValue = ToolStringValue = {}));
|
|
56
|
+
var ToolChatRecipient;
|
|
57
|
+
(function (ToolChatRecipient) {
|
|
58
|
+
ToolChatRecipient.visit = (value, visitor) => {
|
|
59
|
+
if (value.channelId !== undefined)
|
|
60
|
+
return visitor.channelId(value.channelId);
|
|
61
|
+
if (value.userId !== undefined)
|
|
62
|
+
return visitor.userId(value.userId);
|
|
63
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
64
|
+
};
|
|
65
|
+
})(ToolChatRecipient || (exports.ToolChatRecipient = ToolChatRecipient = {}));
|
|
66
|
+
var ToolChatHandler;
|
|
67
|
+
(function (ToolChatHandler) {
|
|
68
|
+
ToolChatHandler.visit = (value, visitor) => {
|
|
69
|
+
if (value.config !== undefined)
|
|
70
|
+
return visitor.config(value.config);
|
|
71
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
72
|
+
};
|
|
73
|
+
})(ToolChatHandler || (exports.ToolChatHandler = ToolChatHandler = {}));
|
|
56
74
|
var ToolEmailHandler;
|
|
57
75
|
(function (ToolEmailHandler) {
|
|
58
76
|
ToolEmailHandler.visit = (value, visitor) => {
|
|
@@ -91,6 +109,8 @@ var ToolHandler;
|
|
|
91
109
|
return visitor.webhook(value.webhook);
|
|
92
110
|
if (value.search !== undefined)
|
|
93
111
|
return visitor.search(value.search);
|
|
112
|
+
if (value.chat !== undefined)
|
|
113
|
+
return visitor.chat(value.chat);
|
|
94
114
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
95
115
|
};
|
|
96
116
|
})(ToolHandler || (exports.ToolHandler = ToolHandler = {}));
|
|
@@ -47,6 +47,24 @@ export var ToolStringValue;
|
|
|
47
47
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
48
48
|
};
|
|
49
49
|
})(ToolStringValue || (ToolStringValue = {}));
|
|
50
|
+
export var ToolChatRecipient;
|
|
51
|
+
(function (ToolChatRecipient) {
|
|
52
|
+
ToolChatRecipient.visit = (value, visitor) => {
|
|
53
|
+
if (value.channelId !== undefined)
|
|
54
|
+
return visitor.channelId(value.channelId);
|
|
55
|
+
if (value.userId !== undefined)
|
|
56
|
+
return visitor.userId(value.userId);
|
|
57
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
58
|
+
};
|
|
59
|
+
})(ToolChatRecipient || (ToolChatRecipient = {}));
|
|
60
|
+
export var ToolChatHandler;
|
|
61
|
+
(function (ToolChatHandler) {
|
|
62
|
+
ToolChatHandler.visit = (value, visitor) => {
|
|
63
|
+
if (value.config !== undefined)
|
|
64
|
+
return visitor.config(value.config);
|
|
65
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
66
|
+
};
|
|
67
|
+
})(ToolChatHandler || (ToolChatHandler = {}));
|
|
50
68
|
export var ToolEmailHandler;
|
|
51
69
|
(function (ToolEmailHandler) {
|
|
52
70
|
ToolEmailHandler.visit = (value, visitor) => {
|
|
@@ -85,6 +103,8 @@ export var ToolHandler;
|
|
|
85
103
|
return visitor.webhook(value.webhook);
|
|
86
104
|
if (value.search !== undefined)
|
|
87
105
|
return visitor.search(value.search);
|
|
106
|
+
if (value.chat !== undefined)
|
|
107
|
+
return visitor.chat(value.chat);
|
|
88
108
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
89
109
|
};
|
|
90
110
|
})(ToolHandler || (ToolHandler = {}));
|
|
@@ -120,6 +120,16 @@ declare const CreateToolCommand_base: {
|
|
|
120
120
|
* },
|
|
121
121
|
* },
|
|
122
122
|
* search: {},
|
|
123
|
+
* chat: { // ToolChatHandler Union: only one key present
|
|
124
|
+
* config: { // ToolChatConfig
|
|
125
|
+
* recipient: { // ToolChatRecipient Union: only one key present
|
|
126
|
+
* channelId: "<ToolStringValue>",
|
|
127
|
+
* userId: "<ToolStringValue>",
|
|
128
|
+
* },
|
|
129
|
+
* text: "<ToolStringValue>", // required
|
|
130
|
+
* mentions: "<ToolStringValue>",
|
|
131
|
+
* },
|
|
132
|
+
* },
|
|
123
133
|
* },
|
|
124
134
|
* };
|
|
125
135
|
* const command = new CreateToolCommand(input);
|
|
@@ -212,6 +222,16 @@ declare const CreateToolCommand_base: {
|
|
|
212
222
|
* // },
|
|
213
223
|
* // },
|
|
214
224
|
* // search: {},
|
|
225
|
+
* // chat: { // ToolChatHandler Union: only one key present
|
|
226
|
+
* // config: { // ToolChatConfig
|
|
227
|
+
* // recipient: { // ToolChatRecipient Union: only one key present
|
|
228
|
+
* // channelId: "<ToolStringValue>",
|
|
229
|
+
* // userId: "<ToolStringValue>",
|
|
230
|
+
* // },
|
|
231
|
+
* // text: "<ToolStringValue>", // required
|
|
232
|
+
* // mentions: "<ToolStringValue>",
|
|
233
|
+
* // },
|
|
234
|
+
* // },
|
|
215
235
|
* // },
|
|
216
236
|
* // },
|
|
217
237
|
* // };
|
|
@@ -128,6 +128,16 @@ declare const GetToolCommand_base: {
|
|
|
128
128
|
* // },
|
|
129
129
|
* // },
|
|
130
130
|
* // search: {},
|
|
131
|
+
* // chat: { // ToolChatHandler Union: only one key present
|
|
132
|
+
* // config: { // ToolChatConfig
|
|
133
|
+
* // recipient: { // ToolChatRecipient Union: only one key present
|
|
134
|
+
* // channelId: "<ToolStringValue>",
|
|
135
|
+
* // userId: "<ToolStringValue>",
|
|
136
|
+
* // },
|
|
137
|
+
* // text: "<ToolStringValue>", // required
|
|
138
|
+
* // mentions: "<ToolStringValue>",
|
|
139
|
+
* // },
|
|
140
|
+
* // },
|
|
131
141
|
* // },
|
|
132
142
|
* // },
|
|
133
143
|
* // };
|
|
@@ -128,6 +128,16 @@ declare const ListToolsCommand_base: {
|
|
|
128
128
|
* // },
|
|
129
129
|
* // },
|
|
130
130
|
* // search: {},
|
|
131
|
+
* // chat: { // ToolChatHandler Union: only one key present
|
|
132
|
+
* // config: { // ToolChatConfig
|
|
133
|
+
* // recipient: { // ToolChatRecipient Union: only one key present
|
|
134
|
+
* // channelId: "<ToolStringValue>",
|
|
135
|
+
* // userId: "<ToolStringValue>",
|
|
136
|
+
* // },
|
|
137
|
+
* // text: "<ToolStringValue>", // required
|
|
138
|
+
* // mentions: "<ToolStringValue>",
|
|
139
|
+
* // },
|
|
140
|
+
* // },
|
|
131
141
|
* // },
|
|
132
142
|
* // },
|
|
133
143
|
* // ],
|
|
@@ -121,6 +121,16 @@ declare const UpdateToolCommand_base: {
|
|
|
121
121
|
* },
|
|
122
122
|
* },
|
|
123
123
|
* search: {},
|
|
124
|
+
* chat: { // ToolChatHandler Union: only one key present
|
|
125
|
+
* config: { // ToolChatConfig
|
|
126
|
+
* recipient: { // ToolChatRecipient Union: only one key present
|
|
127
|
+
* channelId: "<ToolStringValue>",
|
|
128
|
+
* userId: "<ToolStringValue>",
|
|
129
|
+
* },
|
|
130
|
+
* text: "<ToolStringValue>", // required
|
|
131
|
+
* mentions: "<ToolStringValue>",
|
|
132
|
+
* },
|
|
133
|
+
* },
|
|
124
134
|
* },
|
|
125
135
|
* };
|
|
126
136
|
* const command = new UpdateToolCommand(input);
|
|
@@ -213,6 +223,16 @@ declare const UpdateToolCommand_base: {
|
|
|
213
223
|
* // },
|
|
214
224
|
* // },
|
|
215
225
|
* // search: {},
|
|
226
|
+
* // chat: { // ToolChatHandler Union: only one key present
|
|
227
|
+
* // config: { // ToolChatConfig
|
|
228
|
+
* // recipient: { // ToolChatRecipient Union: only one key present
|
|
229
|
+
* // channelId: "<ToolStringValue>",
|
|
230
|
+
* // userId: "<ToolStringValue>",
|
|
231
|
+
* // },
|
|
232
|
+
* // text: "<ToolStringValue>", // required
|
|
233
|
+
* // mentions: "<ToolStringValue>",
|
|
234
|
+
* // },
|
|
235
|
+
* // },
|
|
216
236
|
* // },
|
|
217
237
|
* // },
|
|
218
238
|
* // };
|
|
@@ -89,6 +89,96 @@ export declare namespace ToolStringValue {
|
|
|
89
89
|
}
|
|
90
90
|
const visit: <T>(value: ToolStringValue, visitor: Visitor<T>) => T;
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
export type ToolChatRecipient = ToolChatRecipient.ChannelIdMember | ToolChatRecipient.UserIdMember | ToolChatRecipient.$UnknownMember;
|
|
96
|
+
/**
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
export declare namespace ToolChatRecipient {
|
|
100
|
+
/**
|
|
101
|
+
* Channel ID for group channels.
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
interface ChannelIdMember {
|
|
105
|
+
channelId: ToolStringValue;
|
|
106
|
+
userId?: never;
|
|
107
|
+
$unknown?: never;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* User email address for direct messages.
|
|
111
|
+
* @public
|
|
112
|
+
*/
|
|
113
|
+
interface UserIdMember {
|
|
114
|
+
channelId?: never;
|
|
115
|
+
userId: ToolStringValue;
|
|
116
|
+
$unknown?: never;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
interface $UnknownMember {
|
|
122
|
+
channelId?: never;
|
|
123
|
+
userId?: never;
|
|
124
|
+
$unknown: [string, any];
|
|
125
|
+
}
|
|
126
|
+
interface Visitor<T> {
|
|
127
|
+
channelId: (value: ToolStringValue) => T;
|
|
128
|
+
userId: (value: ToolStringValue) => T;
|
|
129
|
+
_: (name: string, value: any) => T;
|
|
130
|
+
}
|
|
131
|
+
const visit: <T>(value: ToolChatRecipient, visitor: Visitor<T>) => T;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
export interface ToolChatConfig {
|
|
137
|
+
/**
|
|
138
|
+
* Recipient of the message - either a channel ID for group channels or user email for direct messages.
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
recipient: ToolChatRecipient;
|
|
142
|
+
/**
|
|
143
|
+
* Message text to send.
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
text: ToolStringValue;
|
|
147
|
+
/**
|
|
148
|
+
* User IDs to mention in the message, comma-separated.
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
151
|
+
mentions?: ToolStringValue | undefined;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
export type ToolChatHandler = ToolChatHandler.ConfigMember | ToolChatHandler.$UnknownMember;
|
|
157
|
+
/**
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
export declare namespace ToolChatHandler {
|
|
161
|
+
/**
|
|
162
|
+
* Chat handler configuration for sending messages via xbees-conversations.
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
165
|
+
interface ConfigMember {
|
|
166
|
+
config: ToolChatConfig;
|
|
167
|
+
$unknown?: never;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* @public
|
|
171
|
+
*/
|
|
172
|
+
interface $UnknownMember {
|
|
173
|
+
config?: never;
|
|
174
|
+
$unknown: [string, any];
|
|
175
|
+
}
|
|
176
|
+
interface Visitor<T> {
|
|
177
|
+
config: (value: ToolChatConfig) => T;
|
|
178
|
+
_: (name: string, value: any) => T;
|
|
179
|
+
}
|
|
180
|
+
const visit: <T>(value: ToolChatHandler, visitor: Visitor<T>) => T;
|
|
181
|
+
}
|
|
92
182
|
/**
|
|
93
183
|
* @public
|
|
94
184
|
*/
|
|
@@ -404,7 +494,7 @@ export interface ToolWebhookConfig {
|
|
|
404
494
|
/**
|
|
405
495
|
* @public
|
|
406
496
|
*/
|
|
407
|
-
export type ToolHandler = ToolHandler.EmailMember | ToolHandler.SearchMember | ToolHandler.WebhookMember | ToolHandler.$UnknownMember;
|
|
497
|
+
export type ToolHandler = ToolHandler.ChatMember | ToolHandler.EmailMember | ToolHandler.SearchMember | ToolHandler.WebhookMember | ToolHandler.$UnknownMember;
|
|
408
498
|
/**
|
|
409
499
|
* @public
|
|
410
500
|
*/
|
|
@@ -417,6 +507,7 @@ export declare namespace ToolHandler {
|
|
|
417
507
|
email: ToolEmailHandler;
|
|
418
508
|
webhook?: never;
|
|
419
509
|
search?: never;
|
|
510
|
+
chat?: never;
|
|
420
511
|
$unknown?: never;
|
|
421
512
|
}
|
|
422
513
|
/**
|
|
@@ -427,6 +518,7 @@ export declare namespace ToolHandler {
|
|
|
427
518
|
email?: never;
|
|
428
519
|
webhook: ToolWebhookConfig;
|
|
429
520
|
search?: never;
|
|
521
|
+
chat?: never;
|
|
430
522
|
$unknown?: never;
|
|
431
523
|
}
|
|
432
524
|
/**
|
|
@@ -437,6 +529,18 @@ export declare namespace ToolHandler {
|
|
|
437
529
|
email?: never;
|
|
438
530
|
webhook?: never;
|
|
439
531
|
search: ToolSearchConfig;
|
|
532
|
+
chat?: never;
|
|
533
|
+
$unknown?: never;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Chat handler of the tool.
|
|
537
|
+
* @public
|
|
538
|
+
*/
|
|
539
|
+
interface ChatMember {
|
|
540
|
+
email?: never;
|
|
541
|
+
webhook?: never;
|
|
542
|
+
search?: never;
|
|
543
|
+
chat: ToolChatHandler;
|
|
440
544
|
$unknown?: never;
|
|
441
545
|
}
|
|
442
546
|
/**
|
|
@@ -446,12 +550,14 @@ export declare namespace ToolHandler {
|
|
|
446
550
|
email?: never;
|
|
447
551
|
webhook?: never;
|
|
448
552
|
search?: never;
|
|
553
|
+
chat?: never;
|
|
449
554
|
$unknown: [string, any];
|
|
450
555
|
}
|
|
451
556
|
interface Visitor<T> {
|
|
452
557
|
email: (value: ToolEmailHandler) => T;
|
|
453
558
|
webhook: (value: ToolWebhookConfig) => T;
|
|
454
559
|
search: (value: ToolSearchConfig) => T;
|
|
560
|
+
chat: (value: ToolChatHandler) => T;
|
|
455
561
|
_: (name: string, value: any) => T;
|
|
456
562
|
}
|
|
457
563
|
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.25",
|
|
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",
|