@wildix/wim-voicebots-client 1.0.3 → 1.0.4
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/protocols/Aws_restJson1.js +6 -6
- package/dist-es/protocols/Aws_restJson1.js +7 -7
- package/dist-types/commands/CreateVoiceBotCommand.d.ts +16 -4
- package/dist-types/commands/DescribeEventCommand.d.ts +1 -0
- package/dist-types/commands/GetVoiceBotCommand.d.ts +8 -2
- package/dist-types/commands/ListVoiceBotsCommand.d.ts +8 -2
- package/dist-types/commands/UpdateVoiceBotCommand.d.ts +16 -4
- package/dist-types/models/models_0.d.ts +35 -16
- package/package.json +1 -1
|
@@ -17,9 +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
|
-
'
|
|
20
|
+
'message': [],
|
|
21
21
|
'name': [],
|
|
22
|
-
'
|
|
22
|
+
'pipeline': _ => (0, smithy_client_1._json)(_),
|
|
23
23
|
}));
|
|
24
24
|
b.m("POST")
|
|
25
25
|
.h(headers)
|
|
@@ -171,9 +171,9 @@ const se_UpdateVoiceBotCommand = async (input, context) => {
|
|
|
171
171
|
let body;
|
|
172
172
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
173
173
|
'endpoint': _ => se_BotEndpoint(_, context),
|
|
174
|
-
'
|
|
174
|
+
'message': [],
|
|
175
175
|
'name': [],
|
|
176
|
-
'
|
|
176
|
+
'pipeline': _ => (0, smithy_client_1._json)(_),
|
|
177
177
|
}));
|
|
178
178
|
b.m("PUT")
|
|
179
179
|
.h(headers)
|
|
@@ -439,9 +439,9 @@ const de_VoiceBot = (output, context) => {
|
|
|
439
439
|
'createdAt': smithy_client_1.expectString,
|
|
440
440
|
'endpoint': (_) => de_BotEndpoint((0, smithy_client_1.expectUnion)(_), context),
|
|
441
441
|
'id': smithy_client_1.expectString,
|
|
442
|
-
'
|
|
442
|
+
'message': smithy_client_1.expectString,
|
|
443
443
|
'name': smithy_client_1.expectString,
|
|
444
|
-
'
|
|
444
|
+
'pipeline': smithy_client_1._json,
|
|
445
445
|
'updatedAt': smithy_client_1.expectString,
|
|
446
446
|
});
|
|
447
447
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VoiceBotsServiceException as __BaseException } from "../models/VoiceBotsServiceException";
|
|
2
2
|
import { BotEndpoint, ForbiddenException, ValidationException, VoiceBotNotFoundException, VoiceSessionNotFoundException, } from "../models/models_0";
|
|
3
3
|
import { requestBuilder as rb } from "@smithy/core";
|
|
4
|
-
import { decorateServiceException as __decorateServiceException,
|
|
4
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
5
|
export const se_CreateVoiceBotCommand = async (input, context) => {
|
|
6
6
|
const b = rb(input, context);
|
|
7
7
|
const headers = {
|
|
@@ -14,9 +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
|
-
'
|
|
17
|
+
'message': [],
|
|
18
18
|
'name': [],
|
|
19
|
-
'
|
|
19
|
+
'pipeline': _ => _json(_),
|
|
20
20
|
}));
|
|
21
21
|
b.m("POST")
|
|
22
22
|
.h(headers)
|
|
@@ -159,9 +159,9 @@ export const se_UpdateVoiceBotCommand = async (input, context) => {
|
|
|
159
159
|
let body;
|
|
160
160
|
body = JSON.stringify(take(input, {
|
|
161
161
|
'endpoint': _ => se_BotEndpoint(_, context),
|
|
162
|
-
'
|
|
162
|
+
'message': [],
|
|
163
163
|
'name': [],
|
|
164
|
-
'
|
|
164
|
+
'pipeline': _ => _json(_),
|
|
165
165
|
}));
|
|
166
166
|
b.m("PUT")
|
|
167
167
|
.h(headers)
|
|
@@ -416,9 +416,9 @@ const de_VoiceBot = (output, context) => {
|
|
|
416
416
|
'createdAt': __expectString,
|
|
417
417
|
'endpoint': (_) => de_BotEndpoint(__expectUnion(_), context),
|
|
418
418
|
'id': __expectString,
|
|
419
|
-
'
|
|
419
|
+
'message': __expectString,
|
|
420
420
|
'name': __expectString,
|
|
421
|
-
'
|
|
421
|
+
'pipeline': _json,
|
|
422
422
|
'updatedAt': __expectString,
|
|
423
423
|
});
|
|
424
424
|
};
|
|
@@ -37,8 +37,14 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
37
37
|
* const client = new VoiceBotsClient(config);
|
|
38
38
|
* const input = { // CreateVoiceBotInput
|
|
39
39
|
* name: "STRING_VALUE", // required
|
|
40
|
-
*
|
|
41
|
-
*
|
|
40
|
+
* message: "STRING_VALUE",
|
|
41
|
+
* pipeline: { // VoiceBotPipelineSettings
|
|
42
|
+
* interuptionsEnabled: true || false,
|
|
43
|
+
* maximumDuration: Number("int"),
|
|
44
|
+
* silenceTimeout: Number("int"),
|
|
45
|
+
* endCallEnabled: true || false,
|
|
46
|
+
* endCallPhases: "STRING_VALUE",
|
|
47
|
+
* },
|
|
42
48
|
* endpoint: { // BotEndpoint Union: only one key present
|
|
43
49
|
* dialogflowCx: { // BotDialogflowCxEndpoint
|
|
44
50
|
* credentials: "DOCUMENT_VALUE", // required
|
|
@@ -67,8 +73,14 @@ declare const CreateVoiceBotCommand_base: {
|
|
|
67
73
|
* // { // CreateVoiceBotOutput
|
|
68
74
|
* // bot: { // VoiceBot
|
|
69
75
|
* // name: "STRING_VALUE", // required
|
|
70
|
-
* //
|
|
71
|
-
* //
|
|
76
|
+
* // message: "STRING_VALUE",
|
|
77
|
+
* // pipeline: { // VoiceBotPipelineSettings
|
|
78
|
+
* // interuptionsEnabled: true || false,
|
|
79
|
+
* // maximumDuration: Number("int"),
|
|
80
|
+
* // silenceTimeout: Number("int"),
|
|
81
|
+
* // endCallEnabled: true || false,
|
|
82
|
+
* // endCallPhases: "STRING_VALUE",
|
|
83
|
+
* // },
|
|
72
84
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
73
85
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
74
86
|
* // credentials: "DOCUMENT_VALUE", // required
|
|
@@ -72,6 +72,7 @@ declare const DescribeEventCommand_base: {
|
|
|
72
72
|
* // type: "STRING_VALUE", // required
|
|
73
73
|
* // event: { // CompleteEvent
|
|
74
74
|
* // type: "started" || "ended" || "reply" || "transcription" || "interruption" || "complete", // required
|
|
75
|
+
* // reason: "STRING_VALUE", // required
|
|
75
76
|
* // time: Number("long"), // required
|
|
76
77
|
* // },
|
|
77
78
|
* // },
|
|
@@ -44,8 +44,14 @@ declare const GetVoiceBotCommand_base: {
|
|
|
44
44
|
* // { // GetVoiceBotOutput
|
|
45
45
|
* // bot: { // VoiceBot
|
|
46
46
|
* // name: "STRING_VALUE", // required
|
|
47
|
-
* //
|
|
48
|
-
* //
|
|
47
|
+
* // message: "STRING_VALUE",
|
|
48
|
+
* // pipeline: { // VoiceBotPipelineSettings
|
|
49
|
+
* // interuptionsEnabled: true || false,
|
|
50
|
+
* // maximumDuration: Number("int"),
|
|
51
|
+
* // silenceTimeout: Number("int"),
|
|
52
|
+
* // endCallEnabled: true || false,
|
|
53
|
+
* // endCallPhases: "STRING_VALUE",
|
|
54
|
+
* // },
|
|
49
55
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
50
56
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
51
57
|
* // credentials: "DOCUMENT_VALUE", // required
|
|
@@ -44,8 +44,14 @@ declare const ListVoiceBotsCommand_base: {
|
|
|
44
44
|
* // bots: [ // VoiceBotsList // required
|
|
45
45
|
* // { // VoiceBot
|
|
46
46
|
* // name: "STRING_VALUE", // required
|
|
47
|
-
* //
|
|
48
|
-
* //
|
|
47
|
+
* // message: "STRING_VALUE",
|
|
48
|
+
* // pipeline: { // VoiceBotPipelineSettings
|
|
49
|
+
* // interuptionsEnabled: true || false,
|
|
50
|
+
* // maximumDuration: Number("int"),
|
|
51
|
+
* // silenceTimeout: Number("int"),
|
|
52
|
+
* // endCallEnabled: true || false,
|
|
53
|
+
* // endCallPhases: "STRING_VALUE",
|
|
54
|
+
* // },
|
|
49
55
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
50
56
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
51
57
|
* // credentials: "DOCUMENT_VALUE", // required
|
|
@@ -37,8 +37,14 @@ declare const UpdateVoiceBotCommand_base: {
|
|
|
37
37
|
* const client = new VoiceBotsClient(config);
|
|
38
38
|
* const input = { // UpdateVoiceBotInput
|
|
39
39
|
* name: "STRING_VALUE", // required
|
|
40
|
-
*
|
|
41
|
-
*
|
|
40
|
+
* message: "STRING_VALUE",
|
|
41
|
+
* pipeline: { // VoiceBotPipelineSettings
|
|
42
|
+
* interuptionsEnabled: true || false,
|
|
43
|
+
* maximumDuration: Number("int"),
|
|
44
|
+
* silenceTimeout: Number("int"),
|
|
45
|
+
* endCallEnabled: true || false,
|
|
46
|
+
* endCallPhases: "STRING_VALUE",
|
|
47
|
+
* },
|
|
42
48
|
* endpoint: { // BotEndpoint Union: only one key present
|
|
43
49
|
* dialogflowCx: { // BotDialogflowCxEndpoint
|
|
44
50
|
* credentials: "DOCUMENT_VALUE", // required
|
|
@@ -68,8 +74,14 @@ declare const UpdateVoiceBotCommand_base: {
|
|
|
68
74
|
* // { // UpdateVoiceBotOutput
|
|
69
75
|
* // bot: { // VoiceBot
|
|
70
76
|
* // name: "STRING_VALUE", // required
|
|
71
|
-
* //
|
|
72
|
-
* //
|
|
77
|
+
* // message: "STRING_VALUE",
|
|
78
|
+
* // pipeline: { // VoiceBotPipelineSettings
|
|
79
|
+
* // interuptionsEnabled: true || false,
|
|
80
|
+
* // maximumDuration: Number("int"),
|
|
81
|
+
* // silenceTimeout: Number("int"),
|
|
82
|
+
* // endCallEnabled: true || false,
|
|
83
|
+
* // endCallPhases: "STRING_VALUE",
|
|
84
|
+
* // },
|
|
73
85
|
* // endpoint: { // BotEndpoint Union: only one key present
|
|
74
86
|
* // dialogflowCx: { // BotDialogflowCxEndpoint
|
|
75
87
|
* // credentials: "DOCUMENT_VALUE", // required
|
|
@@ -44,6 +44,7 @@ export type VoiceBotEventType = typeof VoiceBotEventType[keyof typeof VoiceBotEv
|
|
|
44
44
|
*/
|
|
45
45
|
export interface CompleteEvent {
|
|
46
46
|
type: VoiceBotEventType;
|
|
47
|
+
reason: string;
|
|
47
48
|
time: number;
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
@@ -167,8 +168,12 @@ export declare namespace BotEndpoint {
|
|
|
167
168
|
/**
|
|
168
169
|
* @public
|
|
169
170
|
*/
|
|
170
|
-
export interface
|
|
171
|
-
|
|
171
|
+
export interface VoiceBotPipelineSettings {
|
|
172
|
+
/**
|
|
173
|
+
* If enabled the user can interrupt the the bot playback.
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
interuptionsEnabled?: boolean;
|
|
172
177
|
/**
|
|
173
178
|
* The maximum number of seconds a call will last.
|
|
174
179
|
* @public
|
|
@@ -179,6 +184,28 @@ export interface CreateVoiceBotInput {
|
|
|
179
184
|
* @public
|
|
180
185
|
*/
|
|
181
186
|
silenceTimeout?: number;
|
|
187
|
+
/**
|
|
188
|
+
* If enabled the bot can hangup the call.
|
|
189
|
+
* @public
|
|
190
|
+
*/
|
|
191
|
+
endCallEnabled?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* A list of phases separated by comma, which will end the call matched.
|
|
194
|
+
* @public
|
|
195
|
+
*/
|
|
196
|
+
endCallPhases?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* @public
|
|
200
|
+
*/
|
|
201
|
+
export interface CreateVoiceBotInput {
|
|
202
|
+
name: string;
|
|
203
|
+
/**
|
|
204
|
+
* The initial message that will be played at the start of the session.
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
message?: string;
|
|
208
|
+
pipeline?: VoiceBotPipelineSettings;
|
|
182
209
|
/**
|
|
183
210
|
* An endpoint to use to generate replies during voice bot session.
|
|
184
211
|
* @public
|
|
@@ -192,15 +219,11 @@ export interface CreateVoiceBotInput {
|
|
|
192
219
|
export interface VoiceBot {
|
|
193
220
|
name: string;
|
|
194
221
|
/**
|
|
195
|
-
* The
|
|
222
|
+
* The initial message that will be played at the start of the session.
|
|
196
223
|
* @public
|
|
197
224
|
*/
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
* How long to wait before a call is automatically ended due to inactivity.
|
|
201
|
-
* @public
|
|
202
|
-
*/
|
|
203
|
-
silenceTimeout?: number;
|
|
225
|
+
message?: string;
|
|
226
|
+
pipeline?: VoiceBotPipelineSettings;
|
|
204
227
|
/**
|
|
205
228
|
* An endpoint to use to generate replies during voice bot session.
|
|
206
229
|
* @public
|
|
@@ -542,15 +565,11 @@ export interface SendTransferOutput {
|
|
|
542
565
|
export interface UpdateVoiceBotInput {
|
|
543
566
|
name: string;
|
|
544
567
|
/**
|
|
545
|
-
* The
|
|
546
|
-
* @public
|
|
547
|
-
*/
|
|
548
|
-
maximumDuration?: number;
|
|
549
|
-
/**
|
|
550
|
-
* How long to wait before a call is automatically ended due to inactivity.
|
|
568
|
+
* The initial message that will be played at the start of the session.
|
|
551
569
|
* @public
|
|
552
570
|
*/
|
|
553
|
-
|
|
571
|
+
message?: string;
|
|
572
|
+
pipeline?: VoiceBotPipelineSettings;
|
|
554
573
|
/**
|
|
555
574
|
* An endpoint to use to generate replies during voice bot session.
|
|
556
575
|
* @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.4",
|
|
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",
|