@wildix/wim-voicebots-client 1.1.1 → 1.1.3
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 +23 -1
- package/dist-cjs/protocols/Aws_restJson1.js +6 -0
- package/dist-es/models/models_0.js +22 -0
- package/dist-es/protocols/Aws_restJson1.js +6 -0
- package/dist-types/commands/CreateVoiceBotCommand.d.ts +105 -0
- package/dist-types/commands/GetVoiceBotCommand.d.ts +53 -0
- package/dist-types/commands/ListVoiceBotsCommand.d.ts +53 -0
- package/dist-types/commands/UpdateVoiceBotCommand.d.ts +105 -0
- package/dist-types/models/models_0.d.ts +140 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.TraceSessionStatus = exports.TraceSegmentStatus = exports.TraceSegmentResult = exports.TraceSegmentInput = exports.TraceGenericInputBlockContent = exports.TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessage = exports.TraceToolCall = exports.TraceActivityTrigger = exports.TraceActivityStatus = exports.TraceActivityResult = exports.VoiceBotCommandType = exports.VoiceBotNonUniqueNameException = exports.VoiceBotPipelineTerminateAction = exports.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotEventType = exports.ValidationException = exports.ForbiddenException = void 0;
|
|
3
|
+
exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.TraceSessionStatus = exports.TraceSegmentStatus = exports.TraceSegmentResult = exports.TraceSegmentInput = exports.TraceGenericInputBlockContent = exports.TraceSegmentCompletionMessageItem = exports.TraceSegmentCompletionMessage = exports.TraceToolCall = exports.TraceActivityTrigger = exports.TraceActivityStatus = exports.TraceActivityResult = exports.VoiceBotCommandType = exports.VoiceBotNonUniqueNameException = exports.VoiceBotPipelineTerminateAction = exports.VoiceBotEndpoint = exports.VoiceBotToolType = exports.VoiceBotFunctionIntegration = exports.VoiceBotFunctionIntegrationMethod = exports.VoiceBotFunctionIntegrationWebhookAuthorization = exports.VoiceBotEmbeddedToolType = exports.VoiceBotCapability = exports.VoiceBotToolVariableHandler = exports.VoiceBotEventType = exports.ValidationException = exports.ForbiddenException = void 0;
|
|
4
4
|
const VoiceBotsServiceException_1 = require("./VoiceBotsServiceException");
|
|
5
5
|
class ForbiddenException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
|
|
6
6
|
name = "ForbiddenException";
|
|
@@ -38,6 +38,28 @@ exports.VoiceBotEventType = {
|
|
|
38
38
|
STARTED: "started",
|
|
39
39
|
TRANSCRIPTION: "transcription",
|
|
40
40
|
};
|
|
41
|
+
var VoiceBotToolVariableHandler;
|
|
42
|
+
(function (VoiceBotToolVariableHandler) {
|
|
43
|
+
VoiceBotToolVariableHandler.visit = (value, visitor) => {
|
|
44
|
+
if (value.auto !== undefined)
|
|
45
|
+
return visitor.auto(value.auto);
|
|
46
|
+
if (value.guided !== undefined)
|
|
47
|
+
return visitor.guided(value.guided);
|
|
48
|
+
if (value.predefined !== undefined)
|
|
49
|
+
return visitor.predefined(value.predefined);
|
|
50
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
51
|
+
};
|
|
52
|
+
})(VoiceBotToolVariableHandler || (exports.VoiceBotToolVariableHandler = VoiceBotToolVariableHandler = {}));
|
|
53
|
+
var VoiceBotCapability;
|
|
54
|
+
(function (VoiceBotCapability) {
|
|
55
|
+
VoiceBotCapability.visit = (value, visitor) => {
|
|
56
|
+
if (value.tool !== undefined)
|
|
57
|
+
return visitor.tool(value.tool);
|
|
58
|
+
if (value.kb !== undefined)
|
|
59
|
+
return visitor.kb(value.kb);
|
|
60
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
61
|
+
};
|
|
62
|
+
})(VoiceBotCapability || (exports.VoiceBotCapability = VoiceBotCapability = {}));
|
|
41
63
|
exports.VoiceBotEmbeddedToolType = {
|
|
42
64
|
DELEGATE: "DELEGATE",
|
|
43
65
|
HANGUP: "HANGUP",
|
|
@@ -17,6 +17,7 @@ const se_CreateVoiceBotCommand = async (input, context) => {
|
|
|
17
17
|
});
|
|
18
18
|
let body;
|
|
19
19
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
20
|
+
'capabilities': _ => (0, smithy_client_1._json)(_),
|
|
20
21
|
'endpoint': _ => se_VoiceBotEndpoint(_, context),
|
|
21
22
|
'message': [],
|
|
22
23
|
'name': [],
|
|
@@ -232,6 +233,7 @@ const se_UpdateVoiceBotCommand = async (input, context) => {
|
|
|
232
233
|
});
|
|
233
234
|
let body;
|
|
234
235
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
236
|
+
'capabilities': _ => (0, smithy_client_1._json)(_),
|
|
235
237
|
'endpoint': _ => se_VoiceBotEndpoint(_, context),
|
|
236
238
|
'message': [],
|
|
237
239
|
'name': [],
|
|
@@ -605,6 +607,7 @@ const se_VoiceBotFunctionIntegrationWebhook = (input, context) => {
|
|
|
605
607
|
};
|
|
606
608
|
const se_VoiceBotLlmEndpoint = (input, context) => {
|
|
607
609
|
return (0, smithy_client_1.take)(input, {
|
|
610
|
+
'capabilities': smithy_client_1._json,
|
|
608
611
|
'embeddedTools': _ => se_VoiceBotEmbeddedToolsList(_, context),
|
|
609
612
|
'metadata': smithy_client_1._json,
|
|
610
613
|
'model': [],
|
|
@@ -891,6 +894,8 @@ const de_TraceTimings = (output, context) => {
|
|
|
891
894
|
};
|
|
892
895
|
const de_VoiceBot = (output, context) => {
|
|
893
896
|
return (0, smithy_client_1.take)(output, {
|
|
897
|
+
'capabilities': smithy_client_1._json,
|
|
898
|
+
'category': smithy_client_1.expectString,
|
|
894
899
|
'createdAt': smithy_client_1.expectString,
|
|
895
900
|
'endpoint': (_) => de_VoiceBotEndpoint((0, core_1.awsExpectUnion)(_), context),
|
|
896
901
|
'id': smithy_client_1.expectString,
|
|
@@ -971,6 +976,7 @@ const de_VoiceBotFunctionIntegrationWebhook = (output, context) => {
|
|
|
971
976
|
};
|
|
972
977
|
const de_VoiceBotLlmEndpoint = (output, context) => {
|
|
973
978
|
return (0, smithy_client_1.take)(output, {
|
|
979
|
+
'capabilities': smithy_client_1._json,
|
|
974
980
|
'embeddedTools': (_) => de_VoiceBotEmbeddedToolsList(_, context),
|
|
975
981
|
'metadata': smithy_client_1._json,
|
|
976
982
|
'model': smithy_client_1.expectString,
|
|
@@ -33,6 +33,28 @@ export const VoiceBotEventType = {
|
|
|
33
33
|
STARTED: "started",
|
|
34
34
|
TRANSCRIPTION: "transcription",
|
|
35
35
|
};
|
|
36
|
+
export var VoiceBotToolVariableHandler;
|
|
37
|
+
(function (VoiceBotToolVariableHandler) {
|
|
38
|
+
VoiceBotToolVariableHandler.visit = (value, visitor) => {
|
|
39
|
+
if (value.auto !== undefined)
|
|
40
|
+
return visitor.auto(value.auto);
|
|
41
|
+
if (value.guided !== undefined)
|
|
42
|
+
return visitor.guided(value.guided);
|
|
43
|
+
if (value.predefined !== undefined)
|
|
44
|
+
return visitor.predefined(value.predefined);
|
|
45
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
46
|
+
};
|
|
47
|
+
})(VoiceBotToolVariableHandler || (VoiceBotToolVariableHandler = {}));
|
|
48
|
+
export var VoiceBotCapability;
|
|
49
|
+
(function (VoiceBotCapability) {
|
|
50
|
+
VoiceBotCapability.visit = (value, visitor) => {
|
|
51
|
+
if (value.tool !== undefined)
|
|
52
|
+
return visitor.tool(value.tool);
|
|
53
|
+
if (value.kb !== undefined)
|
|
54
|
+
return visitor.kb(value.kb);
|
|
55
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
56
|
+
};
|
|
57
|
+
})(VoiceBotCapability || (VoiceBotCapability = {}));
|
|
36
58
|
export const VoiceBotEmbeddedToolType = {
|
|
37
59
|
DELEGATE: "DELEGATE",
|
|
38
60
|
HANGUP: "HANGUP",
|
|
@@ -14,6 +14,7 @@ export const se_CreateVoiceBotCommand = async (input, context) => {
|
|
|
14
14
|
});
|
|
15
15
|
let body;
|
|
16
16
|
body = JSON.stringify(take(input, {
|
|
17
|
+
'capabilities': _ => _json(_),
|
|
17
18
|
'endpoint': _ => se_VoiceBotEndpoint(_, context),
|
|
18
19
|
'message': [],
|
|
19
20
|
'name': [],
|
|
@@ -216,6 +217,7 @@ export const se_UpdateVoiceBotCommand = async (input, context) => {
|
|
|
216
217
|
});
|
|
217
218
|
let body;
|
|
218
219
|
body = JSON.stringify(take(input, {
|
|
220
|
+
'capabilities': _ => _json(_),
|
|
219
221
|
'endpoint': _ => se_VoiceBotEndpoint(_, context),
|
|
220
222
|
'message': [],
|
|
221
223
|
'name': [],
|
|
@@ -574,6 +576,7 @@ const se_VoiceBotFunctionIntegrationWebhook = (input, context) => {
|
|
|
574
576
|
};
|
|
575
577
|
const se_VoiceBotLlmEndpoint = (input, context) => {
|
|
576
578
|
return take(input, {
|
|
579
|
+
'capabilities': _json,
|
|
577
580
|
'embeddedTools': _ => se_VoiceBotEmbeddedToolsList(_, context),
|
|
578
581
|
'metadata': _json,
|
|
579
582
|
'model': [],
|
|
@@ -860,6 +863,8 @@ const de_TraceTimings = (output, context) => {
|
|
|
860
863
|
};
|
|
861
864
|
const de_VoiceBot = (output, context) => {
|
|
862
865
|
return take(output, {
|
|
866
|
+
'capabilities': _json,
|
|
867
|
+
'category': __expectString,
|
|
863
868
|
'createdAt': __expectString,
|
|
864
869
|
'endpoint': (_) => de_VoiceBotEndpoint(__expectUnion(_), context),
|
|
865
870
|
'id': __expectString,
|
|
@@ -940,6 +945,7 @@ const de_VoiceBotFunctionIntegrationWebhook = (output, context) => {
|
|
|
940
945
|
};
|
|
941
946
|
const de_VoiceBotLlmEndpoint = (output, context) => {
|
|
942
947
|
return take(output, {
|
|
948
|
+
'capabilities': _json,
|
|
943
949
|
'embeddedTools': (_) => de_VoiceBotEmbeddedToolsList(_, context),
|
|
944
950
|
'metadata': _json,
|
|
945
951
|
'model': __expectString,
|
|
@@ -128,6 +128,32 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
128
128
|
* },
|
|
129
129
|
* },
|
|
130
130
|
* ],
|
|
131
|
+
* capabilities: [ // VoiceBotCapabilitiesList
|
|
132
|
+
* { // VoiceBotCapability Union: only one key present
|
|
133
|
+
* tool: { // VoiceBotCapabilityTool
|
|
134
|
+
* id: "STRING_VALUE", // required
|
|
135
|
+
* variables: [ // VoiceBotToolVariablesList
|
|
136
|
+
* { // VoiceBotToolVariable
|
|
137
|
+
* name: "STRING_VALUE", // required
|
|
138
|
+
* handler: { // VoiceBotToolVariableHandler Union: only one key present
|
|
139
|
+
* auto: {},
|
|
140
|
+
* guided: { // VoiceBotToolVariableGuidedHandler
|
|
141
|
+
* description: "STRING_VALUE", // required
|
|
142
|
+
* },
|
|
143
|
+
* predefined: { // VoiceBotToolVariablePredefinedHandler
|
|
144
|
+
* description: "STRING_VALUE", // required
|
|
145
|
+
* },
|
|
146
|
+
* },
|
|
147
|
+
* },
|
|
148
|
+
* ],
|
|
149
|
+
* startMessage: "STRING_VALUE",
|
|
150
|
+
* },
|
|
151
|
+
* kb: { // VoiceBotKnowledgeBase
|
|
152
|
+
* knowledgeBaseId: "STRING_VALUE",
|
|
153
|
+
* instructions: "STRING_VALUE",
|
|
154
|
+
* },
|
|
155
|
+
* },
|
|
156
|
+
* ],
|
|
131
157
|
* },
|
|
132
158
|
* dialogflowCx: { // BotDialogflowCxEndpoint
|
|
133
159
|
* credentials: "DOCUMENT_VALUE", // required
|
|
@@ -149,6 +175,32 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
149
175
|
* secret: "STRING_VALUE", // required
|
|
150
176
|
* },
|
|
151
177
|
* },
|
|
178
|
+
* capabilities: [
|
|
179
|
+
* {// Union: only one key present
|
|
180
|
+
* tool: {
|
|
181
|
+
* id: "STRING_VALUE", // required
|
|
182
|
+
* variables: [
|
|
183
|
+
* {
|
|
184
|
+
* name: "STRING_VALUE", // required
|
|
185
|
+
* handler: {// Union: only one key present
|
|
186
|
+
* auto: {},
|
|
187
|
+
* guided: {
|
|
188
|
+
* description: "STRING_VALUE", // required
|
|
189
|
+
* },
|
|
190
|
+
* predefined: {
|
|
191
|
+
* description: "STRING_VALUE", // required
|
|
192
|
+
* },
|
|
193
|
+
* },
|
|
194
|
+
* },
|
|
195
|
+
* ],
|
|
196
|
+
* startMessage: "STRING_VALUE",
|
|
197
|
+
* },
|
|
198
|
+
* kb: {
|
|
199
|
+
* knowledgeBaseId: "STRING_VALUE",
|
|
200
|
+
* instructions: "STRING_VALUE",
|
|
201
|
+
* },
|
|
202
|
+
* },
|
|
203
|
+
* ],
|
|
152
204
|
* company: "STRING_VALUE",
|
|
153
205
|
* };
|
|
154
206
|
* const command = new CreateVoiceBotCommand(input);
|
|
@@ -248,6 +300,32 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
248
300
|
* // },
|
|
249
301
|
* // },
|
|
250
302
|
* // ],
|
|
303
|
+
* // capabilities: [ // VoiceBotCapabilitiesList
|
|
304
|
+
* // { // VoiceBotCapability Union: only one key present
|
|
305
|
+
* // tool: { // VoiceBotCapabilityTool
|
|
306
|
+
* // id: "STRING_VALUE", // required
|
|
307
|
+
* // variables: [ // VoiceBotToolVariablesList
|
|
308
|
+
* // { // VoiceBotToolVariable
|
|
309
|
+
* // name: "STRING_VALUE", // required
|
|
310
|
+
* // handler: { // VoiceBotToolVariableHandler Union: only one key present
|
|
311
|
+
* // auto: {},
|
|
312
|
+
* // guided: { // VoiceBotToolVariableGuidedHandler
|
|
313
|
+
* // description: "STRING_VALUE", // required
|
|
314
|
+
* // },
|
|
315
|
+
* // predefined: { // VoiceBotToolVariablePredefinedHandler
|
|
316
|
+
* // description: "STRING_VALUE", // required
|
|
317
|
+
* // },
|
|
318
|
+
* // },
|
|
319
|
+
* // },
|
|
320
|
+
* // ],
|
|
321
|
+
* // startMessage: "STRING_VALUE",
|
|
322
|
+
* // },
|
|
323
|
+
* // kb: { // VoiceBotKnowledgeBase
|
|
324
|
+
* // knowledgeBaseId: "STRING_VALUE",
|
|
325
|
+
* // instructions: "STRING_VALUE",
|
|
326
|
+
* // },
|
|
327
|
+
* // },
|
|
328
|
+
* // ],
|
|
251
329
|
* // },
|
|
252
330
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
253
331
|
* // credentials: "DOCUMENT_VALUE", // required
|
|
@@ -269,7 +347,34 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
269
347
|
* // secret: "STRING_VALUE", // required
|
|
270
348
|
* // },
|
|
271
349
|
* // },
|
|
350
|
+
* // capabilities: [
|
|
351
|
+
* // {// Union: only one key present
|
|
352
|
+
* // tool: {
|
|
353
|
+
* // id: "STRING_VALUE", // required
|
|
354
|
+
* // variables: [
|
|
355
|
+
* // {
|
|
356
|
+
* // name: "STRING_VALUE", // required
|
|
357
|
+
* // handler: {// Union: only one key present
|
|
358
|
+
* // auto: {},
|
|
359
|
+
* // guided: {
|
|
360
|
+
* // description: "STRING_VALUE", // required
|
|
361
|
+
* // },
|
|
362
|
+
* // predefined: {
|
|
363
|
+
* // description: "STRING_VALUE", // required
|
|
364
|
+
* // },
|
|
365
|
+
* // },
|
|
366
|
+
* // },
|
|
367
|
+
* // ],
|
|
368
|
+
* // startMessage: "STRING_VALUE",
|
|
369
|
+
* // },
|
|
370
|
+
* // kb: {
|
|
371
|
+
* // knowledgeBaseId: "STRING_VALUE",
|
|
372
|
+
* // instructions: "STRING_VALUE",
|
|
373
|
+
* // },
|
|
374
|
+
* // },
|
|
375
|
+
* // ],
|
|
272
376
|
* // id: "STRING_VALUE", // required
|
|
377
|
+
* // category: "STRING_VALUE",
|
|
273
378
|
* // createdAt: "STRING_VALUE", // required
|
|
274
379
|
* // updatedAt: "STRING_VALUE",
|
|
275
380
|
* // },
|
|
@@ -135,6 +135,32 @@ declare const GetVoiceBotCommand_base: {
|
|
|
135
135
|
* // },
|
|
136
136
|
* // },
|
|
137
137
|
* // ],
|
|
138
|
+
* // capabilities: [ // VoiceBotCapabilitiesList
|
|
139
|
+
* // { // VoiceBotCapability Union: only one key present
|
|
140
|
+
* // tool: { // VoiceBotCapabilityTool
|
|
141
|
+
* // id: "STRING_VALUE", // required
|
|
142
|
+
* // variables: [ // VoiceBotToolVariablesList
|
|
143
|
+
* // { // VoiceBotToolVariable
|
|
144
|
+
* // name: "STRING_VALUE", // required
|
|
145
|
+
* // handler: { // VoiceBotToolVariableHandler Union: only one key present
|
|
146
|
+
* // auto: {},
|
|
147
|
+
* // guided: { // VoiceBotToolVariableGuidedHandler
|
|
148
|
+
* // description: "STRING_VALUE", // required
|
|
149
|
+
* // },
|
|
150
|
+
* // predefined: { // VoiceBotToolVariablePredefinedHandler
|
|
151
|
+
* // description: "STRING_VALUE", // required
|
|
152
|
+
* // },
|
|
153
|
+
* // },
|
|
154
|
+
* // },
|
|
155
|
+
* // ],
|
|
156
|
+
* // startMessage: "STRING_VALUE",
|
|
157
|
+
* // },
|
|
158
|
+
* // kb: { // VoiceBotKnowledgeBase
|
|
159
|
+
* // knowledgeBaseId: "STRING_VALUE",
|
|
160
|
+
* // instructions: "STRING_VALUE",
|
|
161
|
+
* // },
|
|
162
|
+
* // },
|
|
163
|
+
* // ],
|
|
138
164
|
* // },
|
|
139
165
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
140
166
|
* // credentials: "DOCUMENT_VALUE", // required
|
|
@@ -156,7 +182,34 @@ declare const GetVoiceBotCommand_base: {
|
|
|
156
182
|
* // secret: "STRING_VALUE", // required
|
|
157
183
|
* // },
|
|
158
184
|
* // },
|
|
185
|
+
* // capabilities: [
|
|
186
|
+
* // {// Union: only one key present
|
|
187
|
+
* // tool: {
|
|
188
|
+
* // id: "STRING_VALUE", // required
|
|
189
|
+
* // variables: [
|
|
190
|
+
* // {
|
|
191
|
+
* // name: "STRING_VALUE", // required
|
|
192
|
+
* // handler: {// Union: only one key present
|
|
193
|
+
* // auto: {},
|
|
194
|
+
* // guided: {
|
|
195
|
+
* // description: "STRING_VALUE", // required
|
|
196
|
+
* // },
|
|
197
|
+
* // predefined: {
|
|
198
|
+
* // description: "STRING_VALUE", // required
|
|
199
|
+
* // },
|
|
200
|
+
* // },
|
|
201
|
+
* // },
|
|
202
|
+
* // ],
|
|
203
|
+
* // startMessage: "STRING_VALUE",
|
|
204
|
+
* // },
|
|
205
|
+
* // kb: {
|
|
206
|
+
* // knowledgeBaseId: "STRING_VALUE",
|
|
207
|
+
* // instructions: "STRING_VALUE",
|
|
208
|
+
* // },
|
|
209
|
+
* // },
|
|
210
|
+
* // ],
|
|
159
211
|
* // id: "STRING_VALUE", // required
|
|
212
|
+
* // category: "STRING_VALUE",
|
|
160
213
|
* // createdAt: "STRING_VALUE", // required
|
|
161
214
|
* // updatedAt: "STRING_VALUE",
|
|
162
215
|
* // },
|
|
@@ -135,6 +135,32 @@ declare const ListVoiceBotsCommand_base: {
|
|
|
135
135
|
* // },
|
|
136
136
|
* // },
|
|
137
137
|
* // ],
|
|
138
|
+
* // capabilities: [ // VoiceBotCapabilitiesList
|
|
139
|
+
* // { // VoiceBotCapability Union: only one key present
|
|
140
|
+
* // tool: { // VoiceBotCapabilityTool
|
|
141
|
+
* // id: "STRING_VALUE", // required
|
|
142
|
+
* // variables: [ // VoiceBotToolVariablesList
|
|
143
|
+
* // { // VoiceBotToolVariable
|
|
144
|
+
* // name: "STRING_VALUE", // required
|
|
145
|
+
* // handler: { // VoiceBotToolVariableHandler Union: only one key present
|
|
146
|
+
* // auto: {},
|
|
147
|
+
* // guided: { // VoiceBotToolVariableGuidedHandler
|
|
148
|
+
* // description: "STRING_VALUE", // required
|
|
149
|
+
* // },
|
|
150
|
+
* // predefined: { // VoiceBotToolVariablePredefinedHandler
|
|
151
|
+
* // description: "STRING_VALUE", // required
|
|
152
|
+
* // },
|
|
153
|
+
* // },
|
|
154
|
+
* // },
|
|
155
|
+
* // ],
|
|
156
|
+
* // startMessage: "STRING_VALUE",
|
|
157
|
+
* // },
|
|
158
|
+
* // kb: { // VoiceBotKnowledgeBase
|
|
159
|
+
* // knowledgeBaseId: "STRING_VALUE",
|
|
160
|
+
* // instructions: "STRING_VALUE",
|
|
161
|
+
* // },
|
|
162
|
+
* // },
|
|
163
|
+
* // ],
|
|
138
164
|
* // },
|
|
139
165
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
140
166
|
* // credentials: "DOCUMENT_VALUE", // required
|
|
@@ -156,7 +182,34 @@ declare const ListVoiceBotsCommand_base: {
|
|
|
156
182
|
* // secret: "STRING_VALUE", // required
|
|
157
183
|
* // },
|
|
158
184
|
* // },
|
|
185
|
+
* // capabilities: [
|
|
186
|
+
* // {// Union: only one key present
|
|
187
|
+
* // tool: {
|
|
188
|
+
* // id: "STRING_VALUE", // required
|
|
189
|
+
* // variables: [
|
|
190
|
+
* // {
|
|
191
|
+
* // name: "STRING_VALUE", // required
|
|
192
|
+
* // handler: {// Union: only one key present
|
|
193
|
+
* // auto: {},
|
|
194
|
+
* // guided: {
|
|
195
|
+
* // description: "STRING_VALUE", // required
|
|
196
|
+
* // },
|
|
197
|
+
* // predefined: {
|
|
198
|
+
* // description: "STRING_VALUE", // required
|
|
199
|
+
* // },
|
|
200
|
+
* // },
|
|
201
|
+
* // },
|
|
202
|
+
* // ],
|
|
203
|
+
* // startMessage: "STRING_VALUE",
|
|
204
|
+
* // },
|
|
205
|
+
* // kb: {
|
|
206
|
+
* // knowledgeBaseId: "STRING_VALUE",
|
|
207
|
+
* // instructions: "STRING_VALUE",
|
|
208
|
+
* // },
|
|
209
|
+
* // },
|
|
210
|
+
* // ],
|
|
159
211
|
* // id: "STRING_VALUE", // required
|
|
212
|
+
* // category: "STRING_VALUE",
|
|
160
213
|
* // createdAt: "STRING_VALUE", // required
|
|
161
214
|
* // updatedAt: "STRING_VALUE",
|
|
162
215
|
* // },
|
|
@@ -128,6 +128,32 @@ declare const UpdateVoiceBotCommand_base: {
|
|
|
128
128
|
* },
|
|
129
129
|
* },
|
|
130
130
|
* ],
|
|
131
|
+
* capabilities: [ // VoiceBotCapabilitiesList
|
|
132
|
+
* { // VoiceBotCapability Union: only one key present
|
|
133
|
+
* tool: { // VoiceBotCapabilityTool
|
|
134
|
+
* id: "STRING_VALUE", // required
|
|
135
|
+
* variables: [ // VoiceBotToolVariablesList
|
|
136
|
+
* { // VoiceBotToolVariable
|
|
137
|
+
* name: "STRING_VALUE", // required
|
|
138
|
+
* handler: { // VoiceBotToolVariableHandler Union: only one key present
|
|
139
|
+
* auto: {},
|
|
140
|
+
* guided: { // VoiceBotToolVariableGuidedHandler
|
|
141
|
+
* description: "STRING_VALUE", // required
|
|
142
|
+
* },
|
|
143
|
+
* predefined: { // VoiceBotToolVariablePredefinedHandler
|
|
144
|
+
* description: "STRING_VALUE", // required
|
|
145
|
+
* },
|
|
146
|
+
* },
|
|
147
|
+
* },
|
|
148
|
+
* ],
|
|
149
|
+
* startMessage: "STRING_VALUE",
|
|
150
|
+
* },
|
|
151
|
+
* kb: { // VoiceBotKnowledgeBase
|
|
152
|
+
* knowledgeBaseId: "STRING_VALUE",
|
|
153
|
+
* instructions: "STRING_VALUE",
|
|
154
|
+
* },
|
|
155
|
+
* },
|
|
156
|
+
* ],
|
|
131
157
|
* },
|
|
132
158
|
* dialogflowCx: { // BotDialogflowCxEndpoint
|
|
133
159
|
* credentials: "DOCUMENT_VALUE", // required
|
|
@@ -149,6 +175,32 @@ declare const UpdateVoiceBotCommand_base: {
|
|
|
149
175
|
* secret: "STRING_VALUE", // required
|
|
150
176
|
* },
|
|
151
177
|
* },
|
|
178
|
+
* capabilities: [
|
|
179
|
+
* {// Union: only one key present
|
|
180
|
+
* tool: {
|
|
181
|
+
* id: "STRING_VALUE", // required
|
|
182
|
+
* variables: [
|
|
183
|
+
* {
|
|
184
|
+
* name: "STRING_VALUE", // required
|
|
185
|
+
* handler: {// Union: only one key present
|
|
186
|
+
* auto: {},
|
|
187
|
+
* guided: {
|
|
188
|
+
* description: "STRING_VALUE", // required
|
|
189
|
+
* },
|
|
190
|
+
* predefined: {
|
|
191
|
+
* description: "STRING_VALUE", // required
|
|
192
|
+
* },
|
|
193
|
+
* },
|
|
194
|
+
* },
|
|
195
|
+
* ],
|
|
196
|
+
* startMessage: "STRING_VALUE",
|
|
197
|
+
* },
|
|
198
|
+
* kb: {
|
|
199
|
+
* knowledgeBaseId: "STRING_VALUE",
|
|
200
|
+
* instructions: "STRING_VALUE",
|
|
201
|
+
* },
|
|
202
|
+
* },
|
|
203
|
+
* ],
|
|
152
204
|
* company: "STRING_VALUE",
|
|
153
205
|
* botId: "STRING_VALUE", // required
|
|
154
206
|
* };
|
|
@@ -249,6 +301,32 @@ declare const UpdateVoiceBotCommand_base: {
|
|
|
249
301
|
* // },
|
|
250
302
|
* // },
|
|
251
303
|
* // ],
|
|
304
|
+
* // capabilities: [ // VoiceBotCapabilitiesList
|
|
305
|
+
* // { // VoiceBotCapability Union: only one key present
|
|
306
|
+
* // tool: { // VoiceBotCapabilityTool
|
|
307
|
+
* // id: "STRING_VALUE", // required
|
|
308
|
+
* // variables: [ // VoiceBotToolVariablesList
|
|
309
|
+
* // { // VoiceBotToolVariable
|
|
310
|
+
* // name: "STRING_VALUE", // required
|
|
311
|
+
* // handler: { // VoiceBotToolVariableHandler Union: only one key present
|
|
312
|
+
* // auto: {},
|
|
313
|
+
* // guided: { // VoiceBotToolVariableGuidedHandler
|
|
314
|
+
* // description: "STRING_VALUE", // required
|
|
315
|
+
* // },
|
|
316
|
+
* // predefined: { // VoiceBotToolVariablePredefinedHandler
|
|
317
|
+
* // description: "STRING_VALUE", // required
|
|
318
|
+
* // },
|
|
319
|
+
* // },
|
|
320
|
+
* // },
|
|
321
|
+
* // ],
|
|
322
|
+
* // startMessage: "STRING_VALUE",
|
|
323
|
+
* // },
|
|
324
|
+
* // kb: { // VoiceBotKnowledgeBase
|
|
325
|
+
* // knowledgeBaseId: "STRING_VALUE",
|
|
326
|
+
* // instructions: "STRING_VALUE",
|
|
327
|
+
* // },
|
|
328
|
+
* // },
|
|
329
|
+
* // ],
|
|
252
330
|
* // },
|
|
253
331
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
254
332
|
* // credentials: "DOCUMENT_VALUE", // required
|
|
@@ -270,7 +348,34 @@ declare const UpdateVoiceBotCommand_base: {
|
|
|
270
348
|
* // secret: "STRING_VALUE", // required
|
|
271
349
|
* // },
|
|
272
350
|
* // },
|
|
351
|
+
* // capabilities: [
|
|
352
|
+
* // {// Union: only one key present
|
|
353
|
+
* // tool: {
|
|
354
|
+
* // id: "STRING_VALUE", // required
|
|
355
|
+
* // variables: [
|
|
356
|
+
* // {
|
|
357
|
+
* // name: "STRING_VALUE", // required
|
|
358
|
+
* // handler: {// Union: only one key present
|
|
359
|
+
* // auto: {},
|
|
360
|
+
* // guided: {
|
|
361
|
+
* // description: "STRING_VALUE", // required
|
|
362
|
+
* // },
|
|
363
|
+
* // predefined: {
|
|
364
|
+
* // description: "STRING_VALUE", // required
|
|
365
|
+
* // },
|
|
366
|
+
* // },
|
|
367
|
+
* // },
|
|
368
|
+
* // ],
|
|
369
|
+
* // startMessage: "STRING_VALUE",
|
|
370
|
+
* // },
|
|
371
|
+
* // kb: {
|
|
372
|
+
* // knowledgeBaseId: "STRING_VALUE",
|
|
373
|
+
* // instructions: "STRING_VALUE",
|
|
374
|
+
* // },
|
|
375
|
+
* // },
|
|
376
|
+
* // ],
|
|
273
377
|
* // id: "STRING_VALUE", // required
|
|
378
|
+
* // category: "STRING_VALUE",
|
|
274
379
|
* // createdAt: "STRING_VALUE", // required
|
|
275
380
|
* // updatedAt: "STRING_VALUE",
|
|
276
381
|
* // },
|
|
@@ -87,6 +87,137 @@ export interface CompleteWebsocketEvent {
|
|
|
87
87
|
type: string;
|
|
88
88
|
event: CompleteEvent;
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
export interface VoiceBotKnowledgeBase {
|
|
94
|
+
knowledgeBaseId?: string | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Additional instructions for when the bot should use this knowledge base.
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
instructions?: string | undefined;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
export interface VoiceBotToolVariableAutoHandler {
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
109
|
+
export interface VoiceBotToolVariableGuidedHandler {
|
|
110
|
+
description: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
export interface VoiceBotToolVariablePredefinedHandler {
|
|
116
|
+
description: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
export type VoiceBotToolVariableHandler = VoiceBotToolVariableHandler.AutoMember | VoiceBotToolVariableHandler.GuidedMember | VoiceBotToolVariableHandler.PredefinedMember | VoiceBotToolVariableHandler.$UnknownMember;
|
|
122
|
+
/**
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
export declare namespace VoiceBotToolVariableHandler {
|
|
126
|
+
interface AutoMember {
|
|
127
|
+
auto: VoiceBotToolVariableAutoHandler;
|
|
128
|
+
guided?: never;
|
|
129
|
+
predefined?: never;
|
|
130
|
+
$unknown?: never;
|
|
131
|
+
}
|
|
132
|
+
interface GuidedMember {
|
|
133
|
+
auto?: never;
|
|
134
|
+
guided: VoiceBotToolVariableGuidedHandler;
|
|
135
|
+
predefined?: never;
|
|
136
|
+
$unknown?: never;
|
|
137
|
+
}
|
|
138
|
+
interface PredefinedMember {
|
|
139
|
+
auto?: never;
|
|
140
|
+
guided?: never;
|
|
141
|
+
predefined: VoiceBotToolVariablePredefinedHandler;
|
|
142
|
+
$unknown?: never;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
147
|
+
interface $UnknownMember {
|
|
148
|
+
auto?: never;
|
|
149
|
+
guided?: never;
|
|
150
|
+
predefined?: never;
|
|
151
|
+
$unknown: [string, any];
|
|
152
|
+
}
|
|
153
|
+
interface Visitor<T> {
|
|
154
|
+
auto: (value: VoiceBotToolVariableAutoHandler) => T;
|
|
155
|
+
guided: (value: VoiceBotToolVariableGuidedHandler) => T;
|
|
156
|
+
predefined: (value: VoiceBotToolVariablePredefinedHandler) => T;
|
|
157
|
+
_: (name: string, value: any) => T;
|
|
158
|
+
}
|
|
159
|
+
const visit: <T>(value: VoiceBotToolVariableHandler, visitor: Visitor<T>) => T;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* @public
|
|
163
|
+
*/
|
|
164
|
+
export interface VoiceBotToolVariable {
|
|
165
|
+
/**
|
|
166
|
+
* Name of the tool variable, e.g.: 'myvar'
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
169
|
+
name: string;
|
|
170
|
+
handler?: VoiceBotToolVariableHandler | undefined;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* @public
|
|
174
|
+
*/
|
|
175
|
+
export interface VoiceBotCapabilityTool {
|
|
176
|
+
/**
|
|
177
|
+
* Unique identifier of the tool using nanoid format
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
id: string;
|
|
181
|
+
variables?: (VoiceBotToolVariable)[] | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Message spoken when the tool call starts.
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
startMessage?: string | undefined;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* @public
|
|
190
|
+
*/
|
|
191
|
+
export type VoiceBotCapability = VoiceBotCapability.KbMember | VoiceBotCapability.ToolMember | VoiceBotCapability.$UnknownMember;
|
|
192
|
+
/**
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
195
|
+
export declare namespace VoiceBotCapability {
|
|
196
|
+
interface ToolMember {
|
|
197
|
+
tool: VoiceBotCapabilityTool;
|
|
198
|
+
kb?: never;
|
|
199
|
+
$unknown?: never;
|
|
200
|
+
}
|
|
201
|
+
interface KbMember {
|
|
202
|
+
tool?: never;
|
|
203
|
+
kb: VoiceBotKnowledgeBase;
|
|
204
|
+
$unknown?: never;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* @public
|
|
208
|
+
*/
|
|
209
|
+
interface $UnknownMember {
|
|
210
|
+
tool?: never;
|
|
211
|
+
kb?: never;
|
|
212
|
+
$unknown: [string, any];
|
|
213
|
+
}
|
|
214
|
+
interface Visitor<T> {
|
|
215
|
+
tool: (value: VoiceBotCapabilityTool) => T;
|
|
216
|
+
kb: (value: VoiceBotKnowledgeBase) => T;
|
|
217
|
+
_: (name: string, value: any) => T;
|
|
218
|
+
}
|
|
219
|
+
const visit: <T>(value: VoiceBotCapability, visitor: Visitor<T>) => T;
|
|
220
|
+
}
|
|
90
221
|
/**
|
|
91
222
|
* @public
|
|
92
223
|
*/
|
|
@@ -400,6 +531,7 @@ export interface VoiceBotLlmEndpoint {
|
|
|
400
531
|
* @public
|
|
401
532
|
*/
|
|
402
533
|
tools?: (VoiceBotTool)[] | undefined;
|
|
534
|
+
capabilities?: (VoiceBotCapability)[] | undefined;
|
|
403
535
|
}
|
|
404
536
|
/**
|
|
405
537
|
* @public
|
|
@@ -593,6 +725,7 @@ export interface CreateVoiceBotInput {
|
|
|
593
725
|
* @public
|
|
594
726
|
*/
|
|
595
727
|
endpoint: VoiceBotEndpoint;
|
|
728
|
+
capabilities?: (VoiceBotCapability)[] | undefined;
|
|
596
729
|
company?: string | undefined;
|
|
597
730
|
}
|
|
598
731
|
/**
|
|
@@ -611,7 +744,13 @@ export interface VoiceBot {
|
|
|
611
744
|
* @public
|
|
612
745
|
*/
|
|
613
746
|
endpoint: VoiceBotEndpoint;
|
|
747
|
+
capabilities?: (VoiceBotCapability)[] | undefined;
|
|
614
748
|
id: string;
|
|
749
|
+
/**
|
|
750
|
+
* Category of the bot
|
|
751
|
+
* @public
|
|
752
|
+
*/
|
|
753
|
+
category?: string | undefined;
|
|
615
754
|
createdAt: string;
|
|
616
755
|
updatedAt?: string | undefined;
|
|
617
756
|
}
|
|
@@ -1925,6 +2064,7 @@ export interface UpdateVoiceBotInput {
|
|
|
1925
2064
|
* @public
|
|
1926
2065
|
*/
|
|
1927
2066
|
endpoint: VoiceBotEndpoint;
|
|
2067
|
+
capabilities?: (VoiceBotCapability)[] | undefined;
|
|
1928
2068
|
company?: string | undefined;
|
|
1929
2069
|
botId: string;
|
|
1930
2070
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-voicebots-client",
|
|
3
3
|
"description": "@wildix/wim-voicebots-client client",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.3",
|
|
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",
|
|
@@ -80,4 +80,4 @@
|
|
|
80
80
|
"react-native": {
|
|
81
81
|
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
|
|
82
82
|
}
|
|
83
|
-
}
|
|
83
|
+
}
|