@wildix/wim-voicebots-client 1.0.1 → 1.0.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 +13 -6
- package/dist-cjs/protocols/Aws_restJson1.js +13 -14
- package/dist-es/models/models_0.js +12 -5
- package/dist-es/protocols/Aws_restJson1.js +13 -14
- package/dist-types/commands/CreateVoiceBotCommand.d.ts +0 -4
- package/dist-types/commands/DescribeEventCommand.d.ts +65 -19
- package/dist-types/commands/GetVoiceBotCommand.d.ts +0 -2
- package/dist-types/commands/ListVoiceBotsCommand.d.ts +0 -2
- package/dist-types/commands/UpdateVoiceBotCommand.d.ts +0 -4
- package/dist-types/models/models_0.d.ts +139 -64
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.
|
|
3
|
+
exports.VoiceSessionNotFoundException = exports.VoiceBotNotFoundException = exports.VoiceBotCommandType = exports.BotEndpoint = exports.VoiceBotEventType = exports.ForbiddenException = exports.ValidationException = void 0;
|
|
4
4
|
const VoiceBotsServiceException_1 = require("./VoiceBotsServiceException");
|
|
5
5
|
class ValidationException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -28,6 +28,14 @@ class ForbiddenException extends VoiceBotsServiceException_1.VoiceBotsServiceExc
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.ForbiddenException = ForbiddenException;
|
|
31
|
+
exports.VoiceBotEventType = {
|
|
32
|
+
COMPLETE: "complete",
|
|
33
|
+
ENDED: "ended",
|
|
34
|
+
INTERRUPTION: "interruption",
|
|
35
|
+
REPLY: "reply",
|
|
36
|
+
STARTED: "started",
|
|
37
|
+
TRANSCRIPTION: "transcription",
|
|
38
|
+
};
|
|
31
39
|
var BotEndpoint;
|
|
32
40
|
(function (BotEndpoint) {
|
|
33
41
|
BotEndpoint.visit = (value, visitor) => {
|
|
@@ -42,11 +50,10 @@ var BotEndpoint;
|
|
|
42
50
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
43
51
|
};
|
|
44
52
|
})(BotEndpoint = exports.BotEndpoint || (exports.BotEndpoint = {}));
|
|
45
|
-
exports.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
TRANSCRIPTION: "transcription",
|
|
53
|
+
exports.VoiceBotCommandType = {
|
|
54
|
+
HANGUP: "hangup",
|
|
55
|
+
SAY: "say",
|
|
56
|
+
TRANSFER: "transfer",
|
|
50
57
|
};
|
|
51
58
|
class VoiceBotNotFoundException extends VoiceBotsServiceException_1.VoiceBotsServiceException {
|
|
52
59
|
constructor(opts) {
|
|
@@ -17,11 +17,9 @@ const se_CreateVoiceBotCommand = async (input, context) => {
|
|
|
17
17
|
let body;
|
|
18
18
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
19
19
|
'endpoint': _ => se_BotEndpoint(_, context),
|
|
20
|
-
'languageCode': [],
|
|
21
20
|
'maximumDuration': [],
|
|
22
21
|
'name': [],
|
|
23
22
|
'silenceTimeout': [],
|
|
24
|
-
'voiceId': [],
|
|
25
23
|
}));
|
|
26
24
|
b.m("POST")
|
|
27
25
|
.h(headers)
|
|
@@ -173,11 +171,9 @@ const se_UpdateVoiceBotCommand = async (input, context) => {
|
|
|
173
171
|
let body;
|
|
174
172
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
175
173
|
'endpoint': _ => se_BotEndpoint(_, context),
|
|
176
|
-
'languageCode': [],
|
|
177
174
|
'maximumDuration': [],
|
|
178
175
|
'name': [],
|
|
179
176
|
'silenceTimeout': [],
|
|
180
|
-
'voiceId': [],
|
|
181
177
|
}));
|
|
182
178
|
b.m("PUT")
|
|
183
179
|
.h(headers)
|
|
@@ -221,14 +217,19 @@ const de_DescribeEventCommand = async (output, context) => {
|
|
|
221
217
|
});
|
|
222
218
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
|
|
223
219
|
const doc = (0, smithy_client_1.take)(data, {
|
|
224
|
-
'
|
|
225
|
-
'
|
|
226
|
-
'
|
|
227
|
-
'
|
|
228
|
-
'
|
|
229
|
-
'
|
|
230
|
-
'
|
|
231
|
-
'
|
|
220
|
+
'CompleteWebhookEvent': smithy_client_1._json,
|
|
221
|
+
'CompleteWebsocketEvent': smithy_client_1._json,
|
|
222
|
+
'HangupWebsocketCommand': smithy_client_1._json,
|
|
223
|
+
'InterruptionWebhookEvent': smithy_client_1._json,
|
|
224
|
+
'InterruptionWebsocketEvent': smithy_client_1._json,
|
|
225
|
+
'ReplyWebhookEvent': smithy_client_1._json,
|
|
226
|
+
'ReplyWebsocketEvent': smithy_client_1._json,
|
|
227
|
+
'SayWebsocketCommand': smithy_client_1._json,
|
|
228
|
+
'SessionEndedWebhookEvent': smithy_client_1._json,
|
|
229
|
+
'SessionStartedWebhookEvent': smithy_client_1._json,
|
|
230
|
+
'TranscriptionWebhookEvent': smithy_client_1._json,
|
|
231
|
+
'TranscriptionWebsocketEvent': smithy_client_1._json,
|
|
232
|
+
'TransferWebsocketCommand': smithy_client_1._json,
|
|
232
233
|
});
|
|
233
234
|
Object.assign(contents, doc);
|
|
234
235
|
return contents;
|
|
@@ -438,12 +439,10 @@ const de_VoiceBot = (output, context) => {
|
|
|
438
439
|
'createdAt': smithy_client_1.expectString,
|
|
439
440
|
'endpoint': (_) => de_BotEndpoint((0, smithy_client_1.expectUnion)(_), context),
|
|
440
441
|
'id': smithy_client_1.expectString,
|
|
441
|
-
'languageCode': smithy_client_1.expectString,
|
|
442
442
|
'maximumDuration': smithy_client_1.expectInt32,
|
|
443
443
|
'name': smithy_client_1.expectString,
|
|
444
444
|
'silenceTimeout': smithy_client_1.expectInt32,
|
|
445
445
|
'updatedAt': smithy_client_1.expectString,
|
|
446
|
-
'voiceId': smithy_client_1.expectString,
|
|
447
446
|
});
|
|
448
447
|
};
|
|
449
448
|
const de_VoiceBotsList = (output, context) => {
|
|
@@ -23,6 +23,14 @@ export class ForbiddenException extends __BaseException {
|
|
|
23
23
|
Object.setPrototypeOf(this, ForbiddenException.prototype);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
export const VoiceBotEventType = {
|
|
27
|
+
COMPLETE: "complete",
|
|
28
|
+
ENDED: "ended",
|
|
29
|
+
INTERRUPTION: "interruption",
|
|
30
|
+
REPLY: "reply",
|
|
31
|
+
STARTED: "started",
|
|
32
|
+
TRANSCRIPTION: "transcription",
|
|
33
|
+
};
|
|
26
34
|
export var BotEndpoint;
|
|
27
35
|
(function (BotEndpoint) {
|
|
28
36
|
BotEndpoint.visit = (value, visitor) => {
|
|
@@ -37,11 +45,10 @@ export var BotEndpoint;
|
|
|
37
45
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
38
46
|
};
|
|
39
47
|
})(BotEndpoint || (BotEndpoint = {}));
|
|
40
|
-
export const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
TRANSCRIPTION: "transcription",
|
|
48
|
+
export const VoiceBotCommandType = {
|
|
49
|
+
HANGUP: "hangup",
|
|
50
|
+
SAY: "say",
|
|
51
|
+
TRANSFER: "transfer",
|
|
45
52
|
};
|
|
46
53
|
export class VoiceBotNotFoundException extends __BaseException {
|
|
47
54
|
constructor(opts) {
|
|
@@ -14,11 +14,9 @@ export const se_CreateVoiceBotCommand = async (input, context) => {
|
|
|
14
14
|
let body;
|
|
15
15
|
body = JSON.stringify(take(input, {
|
|
16
16
|
'endpoint': _ => se_BotEndpoint(_, context),
|
|
17
|
-
'languageCode': [],
|
|
18
17
|
'maximumDuration': [],
|
|
19
18
|
'name': [],
|
|
20
19
|
'silenceTimeout': [],
|
|
21
|
-
'voiceId': [],
|
|
22
20
|
}));
|
|
23
21
|
b.m("POST")
|
|
24
22
|
.h(headers)
|
|
@@ -161,11 +159,9 @@ export const se_UpdateVoiceBotCommand = async (input, context) => {
|
|
|
161
159
|
let body;
|
|
162
160
|
body = JSON.stringify(take(input, {
|
|
163
161
|
'endpoint': _ => se_BotEndpoint(_, context),
|
|
164
|
-
'languageCode': [],
|
|
165
162
|
'maximumDuration': [],
|
|
166
163
|
'name': [],
|
|
167
164
|
'silenceTimeout': [],
|
|
168
|
-
'voiceId': [],
|
|
169
165
|
}));
|
|
170
166
|
b.m("PUT")
|
|
171
167
|
.h(headers)
|
|
@@ -206,14 +202,19 @@ export const de_DescribeEventCommand = async (output, context) => {
|
|
|
206
202
|
});
|
|
207
203
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
208
204
|
const doc = take(data, {
|
|
209
|
-
'
|
|
210
|
-
'
|
|
211
|
-
'
|
|
212
|
-
'
|
|
213
|
-
'
|
|
214
|
-
'
|
|
215
|
-
'
|
|
216
|
-
'
|
|
205
|
+
'CompleteWebhookEvent': _json,
|
|
206
|
+
'CompleteWebsocketEvent': _json,
|
|
207
|
+
'HangupWebsocketCommand': _json,
|
|
208
|
+
'InterruptionWebhookEvent': _json,
|
|
209
|
+
'InterruptionWebsocketEvent': _json,
|
|
210
|
+
'ReplyWebhookEvent': _json,
|
|
211
|
+
'ReplyWebsocketEvent': _json,
|
|
212
|
+
'SayWebsocketCommand': _json,
|
|
213
|
+
'SessionEndedWebhookEvent': _json,
|
|
214
|
+
'SessionStartedWebhookEvent': _json,
|
|
215
|
+
'TranscriptionWebhookEvent': _json,
|
|
216
|
+
'TranscriptionWebsocketEvent': _json,
|
|
217
|
+
'TransferWebsocketCommand': _json,
|
|
217
218
|
});
|
|
218
219
|
Object.assign(contents, doc);
|
|
219
220
|
return contents;
|
|
@@ -415,12 +416,10 @@ const de_VoiceBot = (output, context) => {
|
|
|
415
416
|
'createdAt': __expectString,
|
|
416
417
|
'endpoint': (_) => de_BotEndpoint(__expectUnion(_), context),
|
|
417
418
|
'id': __expectString,
|
|
418
|
-
'languageCode': __expectString,
|
|
419
419
|
'maximumDuration': __expectInt32,
|
|
420
420
|
'name': __expectString,
|
|
421
421
|
'silenceTimeout': __expectInt32,
|
|
422
422
|
'updatedAt': __expectString,
|
|
423
|
-
'voiceId': __expectString,
|
|
424
423
|
});
|
|
425
424
|
};
|
|
426
425
|
const de_VoiceBotsList = (output, context) => {
|
|
@@ -37,8 +37,6 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
37
37
|
* const client = new VoiceBotsClient(config);
|
|
38
38
|
* const input = { // CreateVoiceBotInput
|
|
39
39
|
* name: "STRING_VALUE", // required
|
|
40
|
-
* languageCode: "STRING_VALUE", // required
|
|
41
|
-
* voiceId: "STRING_VALUE", // required
|
|
42
40
|
* maximumDuration: Number("int"),
|
|
43
41
|
* silenceTimeout: Number("int"),
|
|
44
42
|
* endpoint: { // BotEndpoint Union: only one key present
|
|
@@ -69,8 +67,6 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
69
67
|
* // { // CreateVoiceBotOutput
|
|
70
68
|
* // bot: { // VoiceBot
|
|
71
69
|
* // name: "STRING_VALUE", // required
|
|
72
|
-
* // languageCode: "STRING_VALUE", // required
|
|
73
|
-
* // voiceId: "STRING_VALUE", // required
|
|
74
70
|
* // maximumDuration: Number("int"),
|
|
75
71
|
* // silenceTimeout: Number("int"),
|
|
76
72
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
@@ -39,81 +39,127 @@ declare const DescribeEventCommand_base: {
|
|
|
39
39
|
* const command = new DescribeEventCommand(input);
|
|
40
40
|
* const response = await client.send(command);
|
|
41
41
|
* // { // DescribeEventOutput
|
|
42
|
-
* //
|
|
42
|
+
* // TranscriptionWebsocketEvent: { // TranscriptionWebsocketEvent
|
|
43
43
|
* // type: "STRING_VALUE", // required
|
|
44
|
-
* // event: { //
|
|
45
|
-
* // type: "ended" || "reply" || "transcription" || "interruption", // required
|
|
44
|
+
* // event: { // TranscriptionEvent
|
|
45
|
+
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
46
46
|
* // id: "STRING_VALUE", // required
|
|
47
47
|
* // text: "STRING_VALUE", // required
|
|
48
48
|
* // time: Number("long"), // required
|
|
49
49
|
* // },
|
|
50
50
|
* // },
|
|
51
|
-
* //
|
|
51
|
+
* // ReplyWebsocketEvent: { // ReplyWebsocketEvent
|
|
52
52
|
* // type: "STRING_VALUE", // required
|
|
53
|
-
* // event: { //
|
|
54
|
-
* // type: "ended" || "reply" || "transcription" || "interruption", // required
|
|
53
|
+
* // event: { // ReplyEvent
|
|
54
|
+
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
55
55
|
* // id: "STRING_VALUE", // required
|
|
56
56
|
* // text: "STRING_VALUE", // required
|
|
57
57
|
* // startTime: Number("long"), // required
|
|
58
58
|
* // endTime: Number("long"), // required
|
|
59
59
|
* // },
|
|
60
60
|
* // },
|
|
61
|
-
* //
|
|
61
|
+
* // InterruptionWebsocketEvent: { // InterruptionWebsocketEvent
|
|
62
62
|
* // type: "STRING_VALUE", // required
|
|
63
|
-
* // event: { //
|
|
64
|
-
* // type: "ended" || "reply" || "transcription" || "interruption", // required
|
|
63
|
+
* // event: { // InterruptionEvent
|
|
64
|
+
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
65
65
|
* // replyId: "STRING_VALUE", // required
|
|
66
66
|
* // playedText: "STRING_VALUE", // required
|
|
67
67
|
* // originalText: "STRING_VALUE", // required
|
|
68
68
|
* // time: Number("long"), // required
|
|
69
69
|
* // },
|
|
70
70
|
* // },
|
|
71
|
-
* //
|
|
71
|
+
* // CompleteWebsocketEvent: { // CompleteWebsocketEvent
|
|
72
72
|
* // type: "STRING_VALUE", // required
|
|
73
|
-
* // event: { //
|
|
74
|
-
* // type: "ended" || "reply" || "transcription" || "interruption", // required
|
|
73
|
+
* // event: { // CompleteEvent
|
|
74
|
+
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
75
75
|
* // time: Number("long"), // required
|
|
76
76
|
* // },
|
|
77
77
|
* // },
|
|
78
|
-
* //
|
|
78
|
+
* // SayWebsocketCommand: { // SayWebsocketCommand
|
|
79
|
+
* // type: "STRING_VALUE", // required
|
|
80
|
+
* // command: { // SayWebsocketCommandData
|
|
81
|
+
* // text: "STRING_VALUE", // required
|
|
82
|
+
* // replyId: "STRING_VALUE", // required
|
|
83
|
+
* // interruptible: true || false,
|
|
84
|
+
* // type: "say" || "hangup" || "transfer", // required
|
|
85
|
+
* // },
|
|
86
|
+
* // },
|
|
87
|
+
* // HangupWebsocketCommand: { // HangupWebsocketCommand
|
|
88
|
+
* // type: "STRING_VALUE", // required
|
|
89
|
+
* // command: { // HangupWebsocketCommandData
|
|
90
|
+
* // reason: "STRING_VALUE",
|
|
91
|
+
* // type: "say" || "hangup" || "transfer", // required
|
|
92
|
+
* // },
|
|
93
|
+
* // },
|
|
94
|
+
* // TransferWebsocketCommand: { // TransferWebsocketCommand
|
|
95
|
+
* // type: "STRING_VALUE", // required
|
|
96
|
+
* // command: { // TransferWebsocketCommandData
|
|
97
|
+
* // context: "STRING_VALUE", // required
|
|
98
|
+
* // extension: "STRING_VALUE", // required
|
|
99
|
+
* // type: "say" || "hangup" || "transfer", // required
|
|
100
|
+
* // },
|
|
101
|
+
* // },
|
|
102
|
+
* // SessionStartedWebhookEvent: { // SessionStartedWebhookEvent
|
|
103
|
+
* // sessionId: "STRING_VALUE", // required
|
|
104
|
+
* // botId: "STRING_VALUE", // required
|
|
105
|
+
* // callId: "STRING_VALUE", // required
|
|
106
|
+
* // flowIndex: Number("int"), // required
|
|
107
|
+
* // event: { // SessionStartedEvent
|
|
108
|
+
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
109
|
+
* // language: "STRING_VALUE", // required
|
|
110
|
+
* // time: Number("long"), // required
|
|
111
|
+
* // },
|
|
112
|
+
* // },
|
|
113
|
+
* // SessionEndedWebhookEvent: { // SessionEndedWebhookEvent
|
|
114
|
+
* // sessionId: "STRING_VALUE", // required
|
|
115
|
+
* // botId: "STRING_VALUE", // required
|
|
116
|
+
* // callId: "STRING_VALUE", // required
|
|
117
|
+
* // flowIndex: Number("int"), // required
|
|
118
|
+
* // event: { // SessionEndedEvent
|
|
119
|
+
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
120
|
+
* // error: "STRING_VALUE",
|
|
121
|
+
* // time: Number("long"), // required
|
|
122
|
+
* // },
|
|
123
|
+
* // },
|
|
124
|
+
* // TranscriptionWebhookEvent: { // TranscriptionWebhookEvent
|
|
79
125
|
* // sessionId: "STRING_VALUE", // required
|
|
80
126
|
* // botId: "STRING_VALUE", // required
|
|
81
127
|
* // callId: "STRING_VALUE", // required
|
|
82
128
|
* // flowIndex: Number("int"), // required
|
|
83
129
|
* // event: {
|
|
84
|
-
* // type: "ended" || "reply" || "transcription" || "interruption", // required
|
|
130
|
+
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
85
131
|
* // id: "STRING_VALUE", // required
|
|
86
132
|
* // text: "STRING_VALUE", // required
|
|
87
133
|
* // time: Number("long"), // required
|
|
88
134
|
* // },
|
|
89
135
|
* // },
|
|
90
|
-
* //
|
|
136
|
+
* // ReplyWebhookEvent: { // ReplyWebhookEvent
|
|
91
137
|
* // sessionId: "STRING_VALUE", // required
|
|
92
138
|
* // botId: "STRING_VALUE", // required
|
|
93
139
|
* // callId: "STRING_VALUE", // required
|
|
94
140
|
* // flowIndex: Number("int"), // required
|
|
95
141
|
* // event: {
|
|
96
|
-
* // type: "ended" || "reply" || "transcription" || "interruption", // required
|
|
142
|
+
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
97
143
|
* // id: "STRING_VALUE", // required
|
|
98
144
|
* // text: "STRING_VALUE", // required
|
|
99
145
|
* // startTime: Number("long"), // required
|
|
100
146
|
* // endTime: Number("long"), // required
|
|
101
147
|
* // },
|
|
102
148
|
* // },
|
|
103
|
-
* //
|
|
149
|
+
* // InterruptionWebhookEvent: { // InterruptionWebhookEvent
|
|
104
150
|
* // sessionId: "STRING_VALUE", // required
|
|
105
151
|
* // botId: "STRING_VALUE", // required
|
|
106
152
|
* // callId: "STRING_VALUE", // required
|
|
107
153
|
* // flowIndex: Number("int"), // required
|
|
108
154
|
* // event: {
|
|
109
|
-
* // type: "ended" || "reply" || "transcription" || "interruption", // required
|
|
155
|
+
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
110
156
|
* // replyId: "STRING_VALUE", // required
|
|
111
157
|
* // playedText: "STRING_VALUE", // required
|
|
112
158
|
* // originalText: "STRING_VALUE", // required
|
|
113
159
|
* // time: Number("long"), // required
|
|
114
160
|
* // },
|
|
115
161
|
* // },
|
|
116
|
-
* //
|
|
162
|
+
* // CompleteWebhookEvent: { // CompleteWebhookEvent
|
|
117
163
|
* // sessionId: "STRING_VALUE", // required
|
|
118
164
|
* // botId: "STRING_VALUE", // required
|
|
119
165
|
* // callId: "STRING_VALUE", // required
|
|
@@ -44,8 +44,6 @@ declare const GetVoiceBotCommand_base: {
|
|
|
44
44
|
* // { // GetVoiceBotOutput
|
|
45
45
|
* // bot: { // VoiceBot
|
|
46
46
|
* // name: "STRING_VALUE", // required
|
|
47
|
-
* // languageCode: "STRING_VALUE", // required
|
|
48
|
-
* // voiceId: "STRING_VALUE", // required
|
|
49
47
|
* // maximumDuration: Number("int"),
|
|
50
48
|
* // silenceTimeout: Number("int"),
|
|
51
49
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
@@ -44,8 +44,6 @@ declare const ListVoiceBotsCommand_base: {
|
|
|
44
44
|
* // bots: [ // VoiceBotsList // required
|
|
45
45
|
* // { // VoiceBot
|
|
46
46
|
* // name: "STRING_VALUE", // required
|
|
47
|
-
* // languageCode: "STRING_VALUE", // required
|
|
48
|
-
* // voiceId: "STRING_VALUE", // required
|
|
49
47
|
* // maximumDuration: Number("int"),
|
|
50
48
|
* // silenceTimeout: Number("int"),
|
|
51
49
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
@@ -37,8 +37,6 @@ declare const UpdateVoiceBotCommand_base: {
|
|
|
37
37
|
* const client = new VoiceBotsClient(config);
|
|
38
38
|
* const input = { // UpdateVoiceBotInput
|
|
39
39
|
* name: "STRING_VALUE", // required
|
|
40
|
-
* languageCode: "STRING_VALUE", // required
|
|
41
|
-
* voiceId: "STRING_VALUE", // required
|
|
42
40
|
* maximumDuration: Number("int"),
|
|
43
41
|
* silenceTimeout: Number("int"),
|
|
44
42
|
* endpoint: { // BotEndpoint Union: only one key present
|
|
@@ -70,8 +68,6 @@ declare const UpdateVoiceBotCommand_base: {
|
|
|
70
68
|
* // { // UpdateVoiceBotOutput
|
|
71
69
|
* // bot: { // VoiceBot
|
|
72
70
|
* // name: "STRING_VALUE", // required
|
|
73
|
-
* // languageCode: "STRING_VALUE", // required
|
|
74
|
-
* // voiceId: "STRING_VALUE", // required
|
|
75
71
|
* // maximumDuration: Number("int"),
|
|
76
72
|
* // silenceTimeout: Number("int"),
|
|
77
73
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
@@ -23,6 +23,45 @@ export declare class ForbiddenException extends __BaseException {
|
|
|
23
23
|
*/
|
|
24
24
|
constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @public
|
|
28
|
+
* @enum
|
|
29
|
+
*/
|
|
30
|
+
export declare const VoiceBotEventType: {
|
|
31
|
+
readonly COMPLETE: "complete";
|
|
32
|
+
readonly ENDED: "ended";
|
|
33
|
+
readonly INTERRUPTION: "interruption";
|
|
34
|
+
readonly REPLY: "reply";
|
|
35
|
+
readonly STARTED: "started";
|
|
36
|
+
readonly TRANSCRIPTION: "transcription";
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export type VoiceBotEventType = typeof VoiceBotEventType[keyof typeof VoiceBotEventType];
|
|
42
|
+
/**
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export interface CompleteEvent {
|
|
46
|
+
type: VoiceBotEventType;
|
|
47
|
+
time: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export interface CompleteWebhookEvent {
|
|
53
|
+
sessionId: string;
|
|
54
|
+
botId: string;
|
|
55
|
+
callId: string;
|
|
56
|
+
flowIndex: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export interface CompleteWebsocketEvent {
|
|
62
|
+
type: string;
|
|
63
|
+
event: CompleteEvent;
|
|
64
|
+
}
|
|
26
65
|
/**
|
|
27
66
|
* @public
|
|
28
67
|
*/
|
|
@@ -130,16 +169,6 @@ export declare namespace BotEndpoint {
|
|
|
130
169
|
*/
|
|
131
170
|
export interface CreateVoiceBotInput {
|
|
132
171
|
name: string;
|
|
133
|
-
/**
|
|
134
|
-
* The language code that represents the language spoken in the voice bot.
|
|
135
|
-
* @public
|
|
136
|
-
*/
|
|
137
|
-
languageCode: string;
|
|
138
|
-
/**
|
|
139
|
-
* Voice ID to use for the speech synthesis.
|
|
140
|
-
* @public
|
|
141
|
-
*/
|
|
142
|
-
voiceId: string;
|
|
143
172
|
/**
|
|
144
173
|
* The maximum number of seconds a call will last.
|
|
145
174
|
* @public
|
|
@@ -162,16 +191,6 @@ export interface CreateVoiceBotInput {
|
|
|
162
191
|
*/
|
|
163
192
|
export interface VoiceBot {
|
|
164
193
|
name: string;
|
|
165
|
-
/**
|
|
166
|
-
* The language code that represents the language spoken in the voice bot.
|
|
167
|
-
* @public
|
|
168
|
-
*/
|
|
169
|
-
languageCode: string;
|
|
170
|
-
/**
|
|
171
|
-
* Voice ID to use for the speech synthesis.
|
|
172
|
-
* @public
|
|
173
|
-
*/
|
|
174
|
-
voiceId: string;
|
|
175
194
|
/**
|
|
176
195
|
* The maximum number of seconds a call will last.
|
|
177
196
|
* @public
|
|
@@ -218,20 +237,33 @@ export interface DescribeEventInput {
|
|
|
218
237
|
* @public
|
|
219
238
|
* @enum
|
|
220
239
|
*/
|
|
221
|
-
export declare const
|
|
222
|
-
readonly
|
|
223
|
-
readonly
|
|
224
|
-
readonly
|
|
225
|
-
readonly TRANSCRIPTION: "transcription";
|
|
240
|
+
export declare const VoiceBotCommandType: {
|
|
241
|
+
readonly HANGUP: "hangup";
|
|
242
|
+
readonly SAY: "say";
|
|
243
|
+
readonly TRANSFER: "transfer";
|
|
226
244
|
};
|
|
227
245
|
/**
|
|
228
246
|
* @public
|
|
229
247
|
*/
|
|
230
|
-
export type
|
|
248
|
+
export type VoiceBotCommandType = typeof VoiceBotCommandType[keyof typeof VoiceBotCommandType];
|
|
231
249
|
/**
|
|
232
250
|
* @public
|
|
233
251
|
*/
|
|
234
|
-
export interface
|
|
252
|
+
export interface HangupWebsocketCommandData {
|
|
253
|
+
reason?: string;
|
|
254
|
+
type: VoiceBotCommandType;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* @public
|
|
258
|
+
*/
|
|
259
|
+
export interface HangupWebsocketCommand {
|
|
260
|
+
type: string;
|
|
261
|
+
command: HangupWebsocketCommandData;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* @public
|
|
265
|
+
*/
|
|
266
|
+
export interface InterruptionEvent {
|
|
235
267
|
type: VoiceBotEventType;
|
|
236
268
|
replyId: string;
|
|
237
269
|
playedText: string;
|
|
@@ -241,24 +273,24 @@ export interface VoiceBotInterruptionEvent {
|
|
|
241
273
|
/**
|
|
242
274
|
* @public
|
|
243
275
|
*/
|
|
244
|
-
export interface
|
|
276
|
+
export interface InterruptionWebhookEvent {
|
|
245
277
|
sessionId: string;
|
|
246
278
|
botId: string;
|
|
247
279
|
callId: string;
|
|
248
280
|
flowIndex: number;
|
|
249
|
-
event:
|
|
281
|
+
event: InterruptionEvent;
|
|
250
282
|
}
|
|
251
283
|
/**
|
|
252
284
|
* @public
|
|
253
285
|
*/
|
|
254
|
-
export interface
|
|
286
|
+
export interface InterruptionWebsocketEvent {
|
|
255
287
|
type: string;
|
|
256
|
-
event:
|
|
288
|
+
event: InterruptionEvent;
|
|
257
289
|
}
|
|
258
290
|
/**
|
|
259
291
|
* @public
|
|
260
292
|
*/
|
|
261
|
-
export interface
|
|
293
|
+
export interface ReplyEvent {
|
|
262
294
|
type: VoiceBotEventType;
|
|
263
295
|
id: string;
|
|
264
296
|
text: string;
|
|
@@ -268,47 +300,80 @@ export interface VoiceBotReplyEvent {
|
|
|
268
300
|
/**
|
|
269
301
|
* @public
|
|
270
302
|
*/
|
|
271
|
-
export interface
|
|
303
|
+
export interface ReplyWebhookEvent {
|
|
272
304
|
sessionId: string;
|
|
273
305
|
botId: string;
|
|
274
306
|
callId: string;
|
|
275
307
|
flowIndex: number;
|
|
276
|
-
event:
|
|
308
|
+
event: ReplyEvent;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* @public
|
|
312
|
+
*/
|
|
313
|
+
export interface ReplyWebsocketEvent {
|
|
314
|
+
type: string;
|
|
315
|
+
event: ReplyEvent;
|
|
277
316
|
}
|
|
278
317
|
/**
|
|
279
318
|
* @public
|
|
280
319
|
*/
|
|
281
|
-
export interface
|
|
320
|
+
export interface SayWebsocketCommandData {
|
|
321
|
+
text: string;
|
|
322
|
+
replyId: string;
|
|
323
|
+
interruptible?: boolean;
|
|
324
|
+
type: VoiceBotCommandType;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* @public
|
|
328
|
+
*/
|
|
329
|
+
export interface SayWebsocketCommand {
|
|
282
330
|
type: string;
|
|
283
|
-
|
|
331
|
+
command: SayWebsocketCommandData;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* @public
|
|
335
|
+
*/
|
|
336
|
+
export interface SessionEndedEvent {
|
|
337
|
+
type: VoiceBotEventType;
|
|
338
|
+
error?: string;
|
|
339
|
+
time: number;
|
|
284
340
|
}
|
|
285
341
|
/**
|
|
286
342
|
* @public
|
|
287
343
|
*/
|
|
288
|
-
export interface
|
|
344
|
+
export interface SessionEndedWebhookEvent {
|
|
289
345
|
sessionId: string;
|
|
290
346
|
botId: string;
|
|
291
347
|
callId: string;
|
|
292
348
|
flowIndex: number;
|
|
349
|
+
event: SessionEndedEvent;
|
|
293
350
|
}
|
|
294
351
|
/**
|
|
295
352
|
* @public
|
|
296
353
|
*/
|
|
297
|
-
export interface
|
|
354
|
+
export interface SessionStartedEvent {
|
|
298
355
|
type: VoiceBotEventType;
|
|
356
|
+
/**
|
|
357
|
+
* The language code that represents the language spoken in the session.
|
|
358
|
+
* @public
|
|
359
|
+
*/
|
|
360
|
+
language: string;
|
|
299
361
|
time: number;
|
|
300
362
|
}
|
|
301
363
|
/**
|
|
302
364
|
* @public
|
|
303
365
|
*/
|
|
304
|
-
export interface
|
|
305
|
-
|
|
306
|
-
|
|
366
|
+
export interface SessionStartedWebhookEvent {
|
|
367
|
+
sessionId: string;
|
|
368
|
+
botId: string;
|
|
369
|
+
callId: string;
|
|
370
|
+
flowIndex: number;
|
|
371
|
+
event: SessionStartedEvent;
|
|
307
372
|
}
|
|
308
373
|
/**
|
|
309
374
|
* @public
|
|
310
375
|
*/
|
|
311
|
-
export interface
|
|
376
|
+
export interface TranscriptionEvent {
|
|
312
377
|
type: VoiceBotEventType;
|
|
313
378
|
id: string;
|
|
314
379
|
text: string;
|
|
@@ -317,32 +382,52 @@ export interface VoiceBotTranscriptionEvent {
|
|
|
317
382
|
/**
|
|
318
383
|
* @public
|
|
319
384
|
*/
|
|
320
|
-
export interface
|
|
385
|
+
export interface TranscriptionWebhookEvent {
|
|
321
386
|
sessionId: string;
|
|
322
387
|
botId: string;
|
|
323
388
|
callId: string;
|
|
324
389
|
flowIndex: number;
|
|
325
|
-
event:
|
|
390
|
+
event: TranscriptionEvent;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* @public
|
|
394
|
+
*/
|
|
395
|
+
export interface TranscriptionWebsocketEvent {
|
|
396
|
+
type: string;
|
|
397
|
+
event: TranscriptionEvent;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* @public
|
|
401
|
+
*/
|
|
402
|
+
export interface TransferWebsocketCommandData {
|
|
403
|
+
context: string;
|
|
404
|
+
extension: string;
|
|
405
|
+
type: VoiceBotCommandType;
|
|
326
406
|
}
|
|
327
407
|
/**
|
|
328
408
|
* @public
|
|
329
409
|
*/
|
|
330
|
-
export interface
|
|
410
|
+
export interface TransferWebsocketCommand {
|
|
331
411
|
type: string;
|
|
332
|
-
|
|
412
|
+
command: TransferWebsocketCommandData;
|
|
333
413
|
}
|
|
334
414
|
/**
|
|
335
415
|
* @public
|
|
336
416
|
*/
|
|
337
417
|
export interface DescribeEventOutput {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
418
|
+
TranscriptionWebsocketEvent?: TranscriptionWebsocketEvent;
|
|
419
|
+
ReplyWebsocketEvent?: ReplyWebsocketEvent;
|
|
420
|
+
InterruptionWebsocketEvent?: InterruptionWebsocketEvent;
|
|
421
|
+
CompleteWebsocketEvent?: CompleteWebsocketEvent;
|
|
422
|
+
SayWebsocketCommand?: SayWebsocketCommand;
|
|
423
|
+
HangupWebsocketCommand?: HangupWebsocketCommand;
|
|
424
|
+
TransferWebsocketCommand?: TransferWebsocketCommand;
|
|
425
|
+
SessionStartedWebhookEvent?: SessionStartedWebhookEvent;
|
|
426
|
+
SessionEndedWebhookEvent?: SessionEndedWebhookEvent;
|
|
427
|
+
TranscriptionWebhookEvent?: TranscriptionWebhookEvent;
|
|
428
|
+
ReplyWebhookEvent?: ReplyWebhookEvent;
|
|
429
|
+
InterruptionWebhookEvent?: InterruptionWebhookEvent;
|
|
430
|
+
CompleteWebhookEvent?: CompleteWebhookEvent;
|
|
346
431
|
}
|
|
347
432
|
/**
|
|
348
433
|
* @public
|
|
@@ -456,16 +541,6 @@ export interface SendTransferOutput {
|
|
|
456
541
|
*/
|
|
457
542
|
export interface UpdateVoiceBotInput {
|
|
458
543
|
name: string;
|
|
459
|
-
/**
|
|
460
|
-
* The language code that represents the language spoken in the voice bot.
|
|
461
|
-
* @public
|
|
462
|
-
*/
|
|
463
|
-
languageCode: string;
|
|
464
|
-
/**
|
|
465
|
-
* Voice ID to use for the speech synthesis.
|
|
466
|
-
* @public
|
|
467
|
-
*/
|
|
468
|
-
voiceId: string;
|
|
469
544
|
/**
|
|
470
545
|
* The maximum number of seconds a call will last.
|
|
471
546
|
* @public
|
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.0.
|
|
4
|
+
"version": "1.0.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",
|