@aws-sdk/client-lex-runtime-v2 3.170.0 → 3.178.0

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.
@@ -1,2056 +1,852 @@
1
- /// <reference types="node" />
2
- import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
3
- import { Readable } from "stream";
4
- import { LexRuntimeV2ServiceException as __BaseException } from "./LexRuntimeV2ServiceException";
5
- /**
6
- * <p></p>
7
- */
8
- export declare class AccessDeniedException extends __BaseException {
9
- readonly name: "AccessDeniedException";
10
- readonly $fault: "client";
11
- /**
12
- * @internal
13
- */
14
- constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
15
- }
16
- /**
17
- * <p>The time that a context is active. You can specify the time to live
18
- * in seconds or in conversation turns.</p>
19
- */
20
- export interface ActiveContextTimeToLive {
21
- /**
22
- * <p>The number of seconds that the context is active. You can specify
23
- * between 5 and 86400 seconds (24 hours).</p>
24
- */
25
- timeToLiveInSeconds: number | undefined;
26
- /**
27
- * <p>The number of turns that the context is active. You can specify up
28
- * to 20 turns. Each request and response from the bot is a turn.</p>
29
- */
30
- turnsToLive: number | undefined;
31
- }
32
- /**
33
- * <p>Contains information about the contexts that a user is using in a
34
- * session. You can configure Amazon Lex V2 to set a context when an intent is
35
- * fulfilled, or you can set a context using the , , or operations.</p>
36
- * <p>Use a context to indicate to Amazon Lex V2 intents that should be used as
37
- * follow-up intents. For example, if the active context is
38
- * <code>order-fulfilled</code>, only intents that have
39
- * <code>order-fulfilled</code> configured as a trigger are considered
40
- * for follow up.</p>
41
- */
42
- export interface ActiveContext {
43
- /**
44
- * <p>The name of the context.</p>
45
- */
46
- name: string | undefined;
47
- /**
48
- * <p>Indicates the number of turns or seconds that the context is active.
49
- * Once the time to live expires, the context is no longer returned in a
50
- * response.</p>
51
- */
52
- timeToLive: ActiveContextTimeToLive | undefined;
53
- /**
54
- * <p>A list of contexts active for the request. A context can be
55
- * activated when a previous intent is fulfilled, or by including the
56
- * context in the request.</p>
57
- * <p>If you don't specify a list of contexts, Amazon Lex V2 will use the current
58
- * list of contexts for the session. If you specify an empty list, all
59
- * contexts for the session are cleared. </p>
60
- */
61
- contextAttributes: Record<string, string> | undefined;
62
- }
63
- /**
64
- * <p>Represents a chunk of audio sent from the client application to
65
- * Amazon Lex V2. The audio is all or part of an utterance from the user.</p>
66
- * <p>Amazon Lex V2 accumulates audio chunks until it recognizes a natural pause
67
- * in speech before processing the input.</p>
68
- */
69
- export interface AudioInputEvent {
70
- /**
71
- * <p>An encoded stream of audio.</p>
72
- */
73
- audioChunk?: Uint8Array;
74
- /**
75
- * <p>The encoding used for the audio chunk. You must use 8 KHz PCM 16-bit
76
- * mono-channel little-endian format. The value of the field should
77
- * be:</p>
78
- * <p>
79
- * <code>audio/lpcm; sample-rate=8000; sample-size-bits=16;
80
- * channel-count=1; is-big-endian=false</code>
81
- * </p>
82
- */
83
- contentType: string | undefined;
84
- /**
85
- * <p>A unique identifier that your application assigns to the event. You
86
- * can use this to identify events in logs.</p>
87
- */
88
- eventId?: string;
89
- /**
90
- * <p>A timestamp set by the client of the date and time that the event
91
- * was sent to Amazon Lex V2.</p>
92
- */
93
- clientTimestampMillis?: number;
94
- }
95
- /**
96
- * <p>An event sent from Amazon Lex V2 to your client application containing audio
97
- * to play to the user. </p>
98
- */
99
- export interface AudioResponseEvent {
100
- /**
101
- * <p>A chunk of the audio to play. </p>
102
- */
103
- audioChunk?: Uint8Array;
104
- /**
105
- * <p>The encoding of the audio chunk. This is the same as the encoding
106
- * configure in the <code>contentType</code> field of the
107
- * <code>ConfigurationEvent</code>.</p>
108
- */
109
- contentType?: string;
110
- /**
111
- * <p>A unique identifier of the event sent by Amazon Lex V2. The identifier is in
112
- * the form <code>RESPONSE-N</code>, where N is a number starting with one
113
- * and incremented for each event sent by Amazon Lex V2 in the current
114
- * session.</p>
115
- */
116
- eventId?: string;
117
- }
118
- /**
119
- * <p></p>
120
- */
121
- export declare class ConflictException extends __BaseException {
122
- readonly name: "ConflictException";
123
- readonly $fault: "client";
124
- /**
125
- * @internal
126
- */
127
- constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
128
- }
129
- export interface DeleteSessionRequest {
130
- /**
131
- * <p>The identifier of the bot that contains the session data.</p>
132
- */
133
- botId: string | undefined;
134
- /**
135
- * <p>The alias identifier in use for the bot that contains the session
136
- * data.</p>
137
- */
138
- botAliasId: string | undefined;
139
- /**
140
- * <p>The locale where the session is in use.</p>
141
- */
142
- localeId: string | undefined;
143
- /**
144
- * <p>The identifier of the session to delete.</p>
145
- */
146
- sessionId: string | undefined;
147
- }
148
- export interface DeleteSessionResponse {
149
- /**
150
- * <p>The identifier of the bot that contained the session data.</p>
151
- */
152
- botId?: string;
153
- /**
154
- * <p>The alias identifier in use for the bot that contained the session
155
- * data.</p>
156
- */
157
- botAliasId?: string;
158
- /**
159
- * <p>The locale where the session was used.</p>
160
- */
161
- localeId?: string;
162
- /**
163
- * <p>The identifier of the deleted session.</p>
164
- */
165
- sessionId?: string;
166
- }
167
- /**
168
- * <p></p>
169
- */
170
- export declare class InternalServerException extends __BaseException {
171
- readonly name: "InternalServerException";
172
- readonly $fault: "server";
173
- /**
174
- * @internal
175
- */
176
- constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
177
- }
178
- /**
179
- * <p></p>
180
- */
181
- export declare class ResourceNotFoundException extends __BaseException {
182
- readonly name: "ResourceNotFoundException";
183
- readonly $fault: "client";
184
- /**
185
- * @internal
186
- */
187
- constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
188
- }
189
- /**
190
- * <p></p>
191
- */
192
- export declare class ThrottlingException extends __BaseException {
193
- readonly name: "ThrottlingException";
194
- readonly $fault: "client";
195
- /**
196
- * @internal
197
- */
198
- constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>);
199
- }
200
- /**
201
- * <p></p>
202
- */
203
- export declare class ValidationException extends __BaseException {
204
- readonly name: "ValidationException";
205
- readonly $fault: "client";
206
- /**
207
- * @internal
208
- */
209
- constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
210
- }
211
- export interface GetSessionRequest {
212
- /**
213
- * <p>The identifier of the bot that contains the session data.</p>
214
- */
215
- botId: string | undefined;
216
- /**
217
- * <p>The alias identifier in use for the bot that contains the session
218
- * data.</p>
219
- */
220
- botAliasId: string | undefined;
221
- /**
222
- * <p>The locale where the session is in use.</p>
223
- */
224
- localeId: string | undefined;
225
- /**
226
- * <p>The identifier of the session to return.</p>
227
- */
228
- sessionId: string | undefined;
229
- }
230
- export declare enum ConfirmationState {
231
- CONFIRMED = "Confirmed",
232
- DENIED = "Denied",
233
- NONE = "None"
234
- }
235
- export declare enum Shape {
236
- COMPOSITE = "Composite",
237
- LIST = "List",
238
- SCALAR = "Scalar"
239
- }
240
- /**
241
- * <p>The value of a slot.</p>
242
- */
243
- export interface Value {
244
- /**
245
- * <p>The text of the utterance from the user that was entered for the
246
- * slot.</p>
247
- */
248
- originalValue?: string;
249
- /**
250
- * <p>The value that Amazon Lex V2 determines for the slot. The actual value
251
- * depends on the setting of the value selection strategy for the bot. You
252
- * can choose to use the value entered by the user, or you can have Amazon Lex V2
253
- * choose the first value in the <code>resolvedValues</code> list.</p>
254
- */
255
- interpretedValue: string | undefined;
256
- /**
257
- * <p>A list of additional values that have been recognized for the
258
- * slot.</p>
259
- */
260
- resolvedValues?: string[];
261
- }
262
- export declare enum IntentState {
263
- FAILED = "Failed",
264
- FULFILLED = "Fulfilled",
265
- FULFILLMENT_IN_PROGRESS = "FulfillmentInProgress",
266
- IN_PROGRESS = "InProgress",
267
- READY_FOR_FULFILLMENT = "ReadyForFulfillment",
268
- WAITING = "Waiting"
269
- }
270
- /**
271
- * <p>Provides a score that indicates the confidence that Amazon Lex V2 has that
272
- * an intent is the one that satisfies the user's intent.</p>
273
- */
274
- export interface ConfidenceScore {
275
- /**
276
- * <p>A score that indicates how confident Amazon Lex V2 is that an intent
277
- * satisfies the user's intent. Ranges between 0.00 and 1.00. Higher
278
- * scores indicate higher confidence.</p>
279
- */
280
- score?: number;
281
- }
282
- export declare enum SentimentType {
283
- MIXED = "MIXED",
284
- NEGATIVE = "NEGATIVE",
285
- NEUTRAL = "NEUTRAL",
286
- POSITIVE = "POSITIVE"
287
- }
288
- /**
289
- * <p>The individual sentiment responses for the utterance.</p>
290
- */
291
- export interface SentimentScore {
292
- /**
293
- * <p>The level of confidence that Amazon Comprehend has in the accuracy
294
- * of its detection of the <code>POSITIVE</code> sentiment.</p>
295
- */
296
- positive?: number;
297
- /**
298
- * <p>The level of confidence that Amazon Comprehend has in the accuracy
299
- * of its detection of the <code>NEGATIVE</code> sentiment.</p>
300
- */
301
- negative?: number;
302
- /**
303
- * <p>The level of confidence that Amazon Comprehend has in the accuracy
304
- * of its detection of the <code>NEUTRAL</code> sentiment.</p>
305
- */
306
- neutral?: number;
307
- /**
308
- * <p>The level of confidence that Amazon Comprehend has in the accuracy
309
- * of its detection of the <code>MIXED</code> sentiment.</p>
310
- */
311
- mixed?: number;
312
- }
313
- /**
314
- * <p>Provides information about the sentiment expressed in a user's
315
- * response in a conversation. Sentiments are determined using Amazon
316
- * Comprehend. Sentiments are only returned if they are enabled for the
317
- * bot.</p>
318
- * <p>For more information, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/how-sentiment.html">
319
- * Determine Sentiment </a> in the <i>Amazon Comprehend
320
- * developer guide</i>.</p>
321
- */
322
- export interface SentimentResponse {
323
- /**
324
- * <p>The overall sentiment expressed in the user's response. This is the
325
- * sentiment most likely expressed by the user based on the analysis by
326
- * Amazon Comprehend.</p>
327
- */
328
- sentiment?: SentimentType | string;
329
- /**
330
- * <p>The individual sentiment responses for the utterance.</p>
331
- */
332
- sentimentScore?: SentimentScore;
333
- }
334
- export declare enum MessageContentType {
335
- CUSTOM_PAYLOAD = "CustomPayload",
336
- IMAGE_RESPONSE_CARD = "ImageResponseCard",
337
- PLAIN_TEXT = "PlainText",
338
- SSML = "SSML"
339
- }
340
- /**
341
- * <p>A button that appears on a response card show to the user.</p>
342
- */
343
- export interface Button {
344
- /**
345
- * <p>The text that is displayed on the button.</p>
346
- */
347
- text: string | undefined;
348
- /**
349
- * <p>The value returned to Amazon Lex V2 when a user chooses the button.</p>
350
- */
351
- value: string | undefined;
352
- }
353
- /**
354
- * <p>A card that is shown to the user by a messaging platform. You define
355
- * the contents of the card, the card is displayed by the platform. </p>
356
- * <p>When you use a response card, the response from the user is
357
- * constrained to the text associated with a button on the card.</p>
358
- */
359
- export interface ImageResponseCard {
360
- /**
361
- * <p>The title to display on the response card. The format of the title
362
- * is determined by the platform displaying the response card.</p>
363
- */
364
- title: string | undefined;
365
- /**
366
- * <p>The subtitle to display on the response card. The format of the
367
- * subtitle is determined by the platform displaying the response
368
- * card.</p>
369
- */
370
- subtitle?: string;
371
- /**
372
- * <p>The URL of an image to display on the response card. The image URL
373
- * must be publicly available so that the platform displaying the response
374
- * card has access to the image.</p>
375
- */
376
- imageUrl?: string;
377
- /**
378
- * <p>A list of buttons that should be displayed on the response card. The
379
- * arrangement of the buttons is determined by the platform that displays
380
- * the button.</p>
381
- */
382
- buttons?: Button[];
383
- }
384
- /**
385
- * <p>Container for text that is returned to the customer..</p>
386
- */
387
- export interface Message {
388
- /**
389
- * <p>The text of the message.</p>
390
- */
391
- content?: string;
392
- /**
393
- * <p>Indicates the type of response.</p>
394
- */
395
- contentType: MessageContentType | string | undefined;
396
- /**
397
- * <p>A card that is shown to the user by a messaging platform. You define
398
- * the contents of the card, the card is displayed by the platform. </p>
399
- * <p>When you use a response card, the response from the user is
400
- * constrained to the text associated with a button on the card.</p>
401
- */
402
- imageResponseCard?: ImageResponseCard;
403
- }
404
- export declare enum StyleType {
405
- DEFAULT = "Default",
406
- SPELL_BY_LETTER = "SpellByLetter",
407
- SPELL_BY_WORD = "SpellByWord"
408
- }
409
- export declare enum DialogActionType {
410
- CLOSE = "Close",
411
- CONFIRM_INTENT = "ConfirmIntent",
412
- DELEGATE = "Delegate",
413
- ELICIT_INTENT = "ElicitIntent",
414
- ELICIT_SLOT = "ElicitSlot",
415
- NONE = "None"
416
- }
417
- /**
418
- * <p>Provides the phrase that Amazon Lex V2 should look for in the user's input
419
- * to the bot.</p>
420
- */
421
- export interface RuntimeHintValue {
422
- /**
423
- * <p>The phrase that Amazon Lex V2 should look for in the user's input to the
424
- * bot.</p>
425
- */
426
- phrase: string | undefined;
427
- }
428
- /**
429
- * <p></p>
430
- */
431
- export declare class BadGatewayException extends __BaseException {
432
- readonly name: "BadGatewayException";
433
- readonly $fault: "server";
434
- /**
435
- * @internal
436
- */
437
- constructor(opts: __ExceptionOptionType<BadGatewayException, __BaseException>);
438
- }
439
- /**
440
- * <p></p>
441
- */
442
- export declare class DependencyFailedException extends __BaseException {
443
- readonly name: "DependencyFailedException";
444
- readonly $fault: "client";
445
- /**
446
- * @internal
447
- */
448
- constructor(opts: __ExceptionOptionType<DependencyFailedException, __BaseException>);
449
- }
450
- export interface PutSessionResponse {
451
- /**
452
- * <p>The type of response. Same as the type specified in the
453
- * <code>responseContentType</code> field in the request.</p>
454
- */
455
- contentType?: string;
456
- /**
457
- * <p>A list of messages that were last sent to the user. The messages are
458
- * ordered based on how you return the messages from you Lambda function
459
- * or the order that the messages are defined in the bot.</p>
460
- */
461
- messages?: string;
462
- /**
463
- * <p>Represents the current state of the dialog between the user and the
464
- * bot.</p>
465
- * <p>Use this to determine the progress of the conversation and what the
466
- * next action may be.</p>
467
- */
468
- sessionState?: string;
469
- /**
470
- * <p>Request-specific information passed between the client application
471
- * and Amazon Lex V2. These are the same as the <code>requestAttribute</code>
472
- * parameter in the call to the <code>PutSession</code> operation.</p>
473
- */
474
- requestAttributes?: string;
475
- /**
476
- * <p>The identifier of the session that received the data.</p>
477
- */
478
- sessionId?: string;
479
- /**
480
- * <p>If the requested content type was audio, the audio version of the
481
- * message to convey to the user.</p>
482
- */
483
- audioStream?: Readable | ReadableStream | Blob;
484
- }
485
- export interface RecognizeUtteranceRequest {
486
- /**
487
- * <p>The identifier of the bot that should receive the request.</p>
488
- */
489
- botId: string | undefined;
490
- /**
491
- * <p>The alias identifier in use for the bot that should receive the
492
- * request.</p>
493
- */
494
- botAliasId: string | undefined;
495
- /**
496
- * <p>The locale where the session is in use.</p>
497
- */
498
- localeId: string | undefined;
499
- /**
500
- * <p>The identifier of the session in use.</p>
501
- */
502
- sessionId: string | undefined;
503
- /**
504
- * <p>Sets the state of the session with the user. You can use this to set
505
- * the current intent, attributes, context, and dialog action. Use the
506
- * dialog action to determine the next step that Amazon Lex V2 should use in the
507
- * conversation with the user.</p>
508
- * <p>The <code>sessionState</code> field must be compressed using gzip
509
- * and then base64 encoded before sending to Amazon Lex V2.</p>
510
- */
511
- sessionState?: string;
512
- /**
513
- * <p>Request-specific information passed between the client application
514
- * and Amazon Lex V2 </p>
515
- * <p>The namespace <code>x-amz-lex:</code> is reserved for special
516
- * attributes. Don't create any request attributes for prefix
517
- * <code>x-amz-lex:</code>.</p>
518
- * <p>The <code>requestAttributes</code> field must be compressed using
519
- * gzip and then base64 encoded before sending to Amazon Lex V2.</p>
520
- */
521
- requestAttributes?: string;
522
- /**
523
- * <p>Indicates the format for audio input or that the content is text.
524
- * The header must start with one of the following prefixes:</p>
525
- * <ul>
526
- * <li>
527
- * <p>PCM format, audio data must be in little-endian byte
528
- * order.</p>
529
- * <ul>
530
- * <li>
531
- * <p>audio/l16; rate=16000; channels=1</p>
532
- * </li>
533
- * <li>
534
- * <p>audio/x-l16; sample-rate=16000; channel-count=1</p>
535
- * </li>
536
- * <li>
537
- * <p>audio/lpcm; sample-rate=8000; sample-size-bits=16;
538
- * channel-count=1; is-big-endian=false</p>
539
- * </li>
540
- * </ul>
541
- * </li>
542
- * <li>
543
- * <p>Opus format</p>
544
- * <ul>
545
- * <li>
546
- * <p>audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4</p>
547
- * </li>
548
- * </ul>
549
- * </li>
550
- * <li>
551
- * <p>Text format</p>
552
- * <ul>
553
- * <li>
554
- * <p>text/plain; charset=utf-8</p>
555
- * </li>
556
- * </ul>
557
- * </li>
558
- * </ul>
559
- */
560
- requestContentType: string | undefined;
561
- /**
562
- * <p>The message that Amazon Lex V2 returns in the response can be either text or
563
- * speech based on the <code>responseContentType</code> value.</p>
564
- * <ul>
565
- * <li>
566
- * <p>If the value is <code>text/plain;charset=utf-8</code>, Amazon Lex V2
567
- * returns text in the response.</p>
568
- * </li>
569
- * <li>
570
- * <p>If the value begins with <code>audio/</code>, Amazon Lex V2 returns
571
- * speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech
572
- * using the configuration that you specified in the
573
- * <code>requestContentType</code> parameter. For example, if you
574
- * specify <code>audio/mpeg</code> as the value, Amazon Lex V2 returns
575
- * speech in the MPEG format.</p>
576
- * </li>
577
- * <li>
578
- * <p>If the value is <code>audio/pcm</code>, the speech returned is
579
- * <code>audio/pcm</code> at 16 KHz in 16-bit, little-endian
580
- * format.</p>
581
- * </li>
582
- * <li>
583
- * <p>The following are the accepted values:</p>
584
- * <ul>
585
- * <li>
586
- * <p>audio/mpeg</p>
587
- * </li>
588
- * <li>
589
- * <p>audio/ogg</p>
590
- * </li>
591
- * <li>
592
- * <p>audio/pcm (16 KHz)</p>
593
- * </li>
594
- * <li>
595
- * <p>audio/* (defaults to mpeg)</p>
596
- * </li>
597
- * <li>
598
- * <p>text/plain; charset=utf-8</p>
599
- * </li>
600
- * </ul>
601
- * </li>
602
- * </ul>
603
- */
604
- responseContentType?: string;
605
- /**
606
- * <p>User input in PCM or Opus audio format or text format as described
607
- * in the <code>requestContentType</code> parameter.</p>
608
- */
609
- inputStream?: Readable | ReadableStream | Blob;
610
- }
611
- export interface RecognizeUtteranceResponse {
612
- /**
613
- * <p>Indicates whether the input mode to the operation was text or
614
- * speech.
615
- * </p>
616
- */
617
- inputMode?: string;
618
- /**
619
- * <p>Content type as specified in the <code>responseContentType</code> in
620
- * the request.</p>
621
- */
622
- contentType?: string;
623
- /**
624
- * <p>A list of messages that were last sent to the user. The messages are
625
- * ordered based on the order that you returned the messages from your
626
- * Lambda function or the order that the messages are defined in the
627
- * bot.</p>
628
- * <p>The <code>messages</code> field is compressed with gzip and then
629
- * base64 encoded. Before you can use the contents of the field, you must
630
- * decode and decompress the contents. See the example for a simple
631
- * function to decode and decompress the contents.</p>
632
- */
633
- messages?: string;
634
- /**
635
- * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
636
- * utterance.</p>
637
- * <p>Each interpretation includes the intent, a score that indicates how
638
- * confident Amazon Lex V2 is that the interpretation is the correct one, and an
639
- * optional sentiment response that indicates the sentiment expressed in
640
- * the utterance.</p>
641
- * <p>The <code>interpretations</code> field is compressed with gzip and
642
- * then base64 encoded. Before you can use the contents of the field, you
643
- * must decode and decompress the contents. See the example for a simple
644
- * function to decode and decompress the contents.</p>
645
- */
646
- interpretations?: string;
647
- /**
648
- * <p>Represents the current state of the dialog between the user and the
649
- * bot.</p>
650
- * <p>Use this to determine the progress of the conversation and what the
651
- * next action might be.</p>
652
- * <p>The <code>sessionState</code> field is compressed with gzip and then
653
- * base64 encoded. Before you can use the contents of the field, you must
654
- * decode and decompress the contents. See the example for a simple
655
- * function to decode and decompress the contents.</p>
656
- */
657
- sessionState?: string;
658
- /**
659
- * <p>The attributes sent in the request.</p>
660
- * <p>The <code>requestAttributes</code> field is compressed with gzip and
661
- * then base64 encoded. Before you can use the contents of the field, you
662
- * must decode and decompress the contents.</p>
663
- */
664
- requestAttributes?: string;
665
- /**
666
- * <p>The identifier of the session in use.</p>
667
- */
668
- sessionId?: string;
669
- /**
670
- * <p>The text used to process the request.</p>
671
- * <p>If the input was an audio stream, the <code>inputTranscript</code>
672
- * field contains the text extracted from the audio stream. This is the
673
- * text that is actually processed to recognize intents and slot values.
674
- * You can use this information to determine if Amazon Lex V2 is correctly
675
- * processing the audio that you send.</p>
676
- * <p>The <code>inputTranscript</code> field is compressed with gzip and
677
- * then base64 encoded. Before you can use the contents of the field, you
678
- * must decode and decompress the contents. See the example for a simple
679
- * function to decode and decompress the contents.</p>
680
- */
681
- inputTranscript?: string;
682
- /**
683
- * <p>The prompt or statement to send to the user. This is based on the
684
- * bot configuration and context. For example, if Amazon Lex V2 did not understand
685
- * the user intent, it sends the <code>clarificationPrompt</code>
686
- * configured for the bot. If the intent requires confirmation before
687
- * taking the fulfillment action, it sends the
688
- * <code>confirmationPrompt</code>. Another example: Suppose that the
689
- * Lambda function successfully fulfilled the intent, and sent a message
690
- * to convey to the user. Then Amazon Lex V2 sends that message in the
691
- * response.</p>
692
- */
693
- audioStream?: Readable | ReadableStream | Blob;
694
- }
695
- export declare enum ConversationMode {
696
- AUDIO = "AUDIO",
697
- TEXT = "TEXT"
698
- }
699
- /**
700
- * <p>A notification from the client that it is disconnecting from Amazon Lex V2.
701
- * Sending a <code>DisconnectionEvent</code> event is optional, but can
702
- * help identify a conversation in logs.</p>
703
- */
704
- export interface DisconnectionEvent {
705
- /**
706
- * <p>A unique identifier that your application assigns to the event. You
707
- * can use this to identify events in logs.</p>
708
- */
709
- eventId?: string;
710
- /**
711
- * <p>A timestamp set by the client of the date and time that the event
712
- * was sent to Amazon Lex V2.</p>
713
- */
714
- clientTimestampMillis?: number;
715
- }
716
- /**
717
- * <p>A DTMF character sent from the client application. DTMF characters
718
- * are typically sent from a phone keypad to represent numbers. For
719
- * example, you can have Amazon Lex V2 process a credit card number input from a
720
- * phone.</p>
721
- */
722
- export interface DTMFInputEvent {
723
- /**
724
- * <p>The DTMF character that the user pressed. The allowed characters are
725
- * A - D, 0 - 9, # and *.</p>
726
- */
727
- inputCharacter: string | undefined;
728
- /**
729
- * <p>A unique identifier that your application assigns to the event. You
730
- * can use this to identify events in logs.</p>
731
- */
732
- eventId?: string;
733
- /**
734
- * <p>A timestamp set by the client of the date and time that the event
735
- * was sent to Amazon Lex V2.</p>
736
- */
737
- clientTimestampMillis?: number;
738
- }
739
- /**
740
- * <p>Event sent from the client application to Amazon Lex V2 to indicate that
741
- * playback of audio is complete and that Amazon Lex V2 should start processing
742
- * the user's input.</p>
743
- */
744
- export interface PlaybackCompletionEvent {
745
- /**
746
- * <p>A unique identifier that your application assigns to the event. You
747
- * can use this to identify events in logs.</p>
748
- */
749
- eventId?: string;
750
- /**
751
- * <p>A timestamp set by the client of the date and time that the event
752
- * was sent to Amazon Lex V2.</p>
753
- */
754
- clientTimestampMillis?: number;
755
- }
756
- /**
757
- * <p>The event sent from your client application to Amazon Lex V2 with text input
758
- * from the user.</p>
759
- */
760
- export interface TextInputEvent {
761
- /**
762
- * <p>The text from the user. Amazon Lex V2 processes this as a complete
763
- * statement.</p>
764
- */
765
- text: string | undefined;
766
- /**
767
- * <p>A unique identifier that your application assigns to the event. You
768
- * can use this to identify events in logs.</p>
769
- */
770
- eventId?: string;
771
- /**
772
- * <p>A timestamp set by the client of the date and time that the event
773
- * was sent to Amazon Lex V2.</p>
774
- */
775
- clientTimestampMillis?: number;
776
- }
777
- /**
778
- * <p>Event that Amazon Lex V2 sends to indicate that the stream is still open
779
- * between the client application and Amazon Lex V2 </p>
780
- */
781
- export interface HeartbeatEvent {
782
- /**
783
- * <p>A unique identifier of the event sent by Amazon Lex V2. The identifier is in
784
- * the form <code>RESPONSE-N</code>, where N is a number starting with one
785
- * and incremented for each event sent by Amazon Lex V2 in the current
786
- * session.</p>
787
- */
788
- eventId?: string;
789
- }
790
- export declare enum InputMode {
791
- DTMF = "DTMF",
792
- SPEECH = "Speech",
793
- TEXT = "Text"
794
- }
795
- export declare enum PlaybackInterruptionReason {
796
- DTMF_START_DETECTED = "DTMF_START_DETECTED",
797
- TEXT_DETECTED = "TEXT_DETECTED",
798
- VOICE_START_DETECTED = "VOICE_START_DETECTED"
799
- }
800
- /**
801
- * <p>Event sent from Amazon Lex V2 to indicate to the client application should
802
- * stop playback of audio. For example, if the client is playing a prompt
803
- * that asks for the user's telephone number, the user might start to say
804
- * the phone number before the prompt is complete. Amazon Lex V2 sends this event
805
- * to the client application to indicate that the user is responding and
806
- * that Amazon Lex V2 is processing their input.</p>
807
- */
808
- export interface PlaybackInterruptionEvent {
809
- /**
810
- * <p>Indicates the type of user input that Amazon Lex V2 detected.</p>
811
- */
812
- eventReason?: PlaybackInterruptionReason | string;
813
- /**
814
- * <p>The identifier of the event that contained the audio, DTMF, or text
815
- * that caused the interruption.</p>
816
- */
817
- causedByEventId?: string;
818
- /**
819
- * <p>A unique identifier of the event sent by Amazon Lex V2. The identifier is in
820
- * the form <code>RESPONSE-N</code>, where N is a number starting with one
821
- * and incremented for each event sent by Amazon Lex V2 in the current
822
- * session.</p>
823
- */
824
- eventId?: string;
825
- }
826
- /**
827
- * <p>The event sent from Amazon Lex V2 to your application with text to present
828
- * to the user.</p>
829
- */
830
- export interface TextResponseEvent {
831
- /**
832
- * <p>A list of messages to send to the user. Messages are ordered based
833
- * on the order that you returned the messages from your Lambda function
834
- * or the order that the messages are defined in the bot.</p>
835
- */
836
- messages?: Message[];
837
- /**
838
- * <p>A unique identifier of the event sent by Amazon Lex V2. The identifier is in
839
- * the form <code>RESPONSE-N</code>, where N is a number starting with one
840
- * and incremented for each event sent by Amazon Lex V2 in the current
841
- * session.</p>
842
- */
843
- eventId?: string;
844
- }
845
- /**
846
- * <p>Event sent from Amazon Lex V2 to your client application that contains a
847
- * transcript of voice audio. </p>
848
- */
849
- export interface TranscriptEvent {
850
- /**
851
- * <p>The transcript of the voice audio from the user.</p>
852
- */
853
- transcript?: string;
854
- /**
855
- * <p>A unique identifier of the event sent by Amazon Lex V2. The identifier is in
856
- * the form <code>RESPONSE-N</code>, where N is a number starting with one
857
- * and incremented for each event sent by Amazon Lex V2 in the current
858
- * session.</p>
859
- */
860
- eventId?: string;
861
- }
862
- /**
863
- * <p>The specific constituent sub slot of the composite slot to elicit in dialog action.</p>
864
- */
865
- export interface ElicitSubSlot {
866
- /**
867
- * <p>The name of the slot that should be elicited from the user.</p>
868
- */
869
- name: string | undefined;
870
- /**
871
- * <p>The field is not supported.</p>
872
- */
873
- subSlotToElicit?: ElicitSubSlot;
874
- }
875
- /**
876
- * <p>The next action that Amazon Lex V2 should take.</p>
877
- */
878
- export interface DialogAction {
879
- /**
880
- * <p>The next action that the bot should take in its interaction with the
881
- * user. The possible values are:</p>
882
- * <ul>
883
- * <li>
884
- * <p>
885
- * <code>Close</code> - Indicates that there will not be a
886
- * response from the user. For example, the statement "Your order
887
- * has been placed" does not require a response.</p>
888
- * </li>
889
- * <li>
890
- * <p>
891
- * <code>ConfirmIntent</code> - The next action is asking the
892
- * user if the intent is complete and ready to be fulfilled. This is
893
- * a yes/no question such as "Place the order?"</p>
894
- * </li>
895
- * <li>
896
- * <p>
897
- * <code>Delegate</code> - The next action is determined by
898
- * Amazon Lex V2.</p>
899
- * </li>
900
- * <li>
901
- * <p>
902
- * <code>ElicitIntent</code> - The next action is to elicit an
903
- * intent from the user.</p>
904
- * </li>
905
- * <li>
906
- * <p>
907
- * <code>ElicitSlot</code> - The next action is to elicit a slot
908
- * value from the user.</p>
909
- * </li>
910
- * </ul>
911
- */
912
- type: DialogActionType | string | undefined;
913
- /**
914
- * <p>The name of the slot that should be elicited from the user.</p>
915
- */
916
- slotToElicit?: string;
917
- /**
918
- * <p>Configures the slot to use spell-by-letter or spell-by-word style.
919
- * When you use a style on a slot, users can spell out their input to make
920
- * it clear to your bot.</p>
921
- * <ul>
922
- * <li>
923
- * <p>Spell by letter - "b" "o" "b"</p>
924
- * </li>
925
- * <li>
926
- * <p>Spell by word - "b as in boy" "o as in oscar" "b as in
927
- * boy"</p>
928
- * </li>
929
- * </ul>
930
- * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-spelling.html">
931
- * Using spelling to enter slot values </a>.</p>
932
- */
933
- slotElicitationStyle?: StyleType | string;
934
- /**
935
- * <p>The name of the constituent sub slot of the composite slot
936
- * specified in slotToElicit that should be elicited from the user.</p>
937
- */
938
- subSlotToElicit?: ElicitSubSlot;
939
- }
940
- /**
941
- * <p>Provides an array of phrases that should be given preference when
942
- * resolving values for a slot.</p>
943
- */
944
- export interface RuntimeHintDetails {
945
- /**
946
- * <p>One or more strings that Amazon Lex V2 should look for in the input to the
947
- * bot. Each phrase is given preference when deciding on slot
948
- * values.</p>
949
- */
950
- runtimeHintValues?: RuntimeHintValue[];
951
- /**
952
- * <p>A map of constituent sub slot names inside a composite slot in the intent and the phrases
953
- * that should be added for each sub slot. Inside each composite slot hints, this structure provides
954
- * a mechanism to add granular sub slot phrases. Only sub slot hints are supported for composite slots.
955
- * The intent name, composite slot name and the constituent sub slot names must exist.</p>
956
- */
957
- subSlotHints?: Record<string, RuntimeHintDetails>;
958
- }
959
- /**
960
- * <p>You can provide Amazon Lex V2 with hints to the phrases that a customer is
961
- * likely to use for a slot. When a slot with hints is resolved, the
962
- * phrases in the runtime hints are preferred in the resolution. You can
963
- * provide hints for a maximum of 100 intents. You can provide a maximum
964
- * of 100 slots.</p>
965
- * <p>Before you can use runtime hints with an existing bot, you must
966
- * first rebuild the bot.</p>
967
- * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.html">Using runtime hints to
968
- * improve recognition of slot values</a>.</p>
969
- */
970
- export interface RuntimeHints {
971
- /**
972
- * <p>A list of the slots in the intent that should have runtime hints
973
- * added, and the phrases that should be added for each slot.</p>
974
- * <p>The first level of the <code>slotHints</code> map is the name of the
975
- * intent. The second level is the name of the slot within the intent. For
976
- * more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.html">Using hints to improve
977
- * accuracy</a>.</p>
978
- * <p>The intent name and slot name must exist.</p>
979
- */
980
- slotHints?: Record<string, Record<string, RuntimeHintDetails>>;
981
- }
982
- /**
983
- * <p>A value that Amazon Lex V2 uses to fulfill an intent. </p>
984
- */
985
- export interface Slot {
986
- /**
987
- * <p>The current value of the slot.</p>
988
- */
989
- value?: Value;
990
- /**
991
- * <p>When the <code>shape</code> value is <code>List</code>, it indicates
992
- * that the <code>values</code> field contains a list of slot values. When
993
- * the value is <code>Scalar</code>, it indicates that the
994
- * <code>value</code> field contains a single value.</p>
995
- */
996
- shape?: Shape | string;
997
- /**
998
- * <p>A list of one or more values that the user provided for the slot.
999
- * For example, if a for a slot that elicits pizza toppings, the values
1000
- * might be "pepperoni" and "pineapple." </p>
1001
- */
1002
- values?: Slot[];
1003
- /**
1004
- * <p>The constituent sub slots of a composite slot.</p>
1005
- */
1006
- subSlots?: Record<string, Slot>;
1007
- }
1008
- /**
1009
- * <p>The current intent that Amazon Lex V2 is attempting to fulfill.</p>
1010
- */
1011
- export interface Intent {
1012
- /**
1013
- * <p>The name of the intent.</p>
1014
- */
1015
- name: string | undefined;
1016
- /**
1017
- * <p>A map of all of the slots for the intent. The name of the slot maps
1018
- * to the value of the slot. If a slot has not been filled, the value is
1019
- * null.</p>
1020
- */
1021
- slots?: Record<string, Slot>;
1022
- /**
1023
- * <p>Contains fulfillment information for the intent. </p>
1024
- */
1025
- state?: IntentState | string;
1026
- /**
1027
- * <p>Contains information about whether fulfillment of the intent has
1028
- * been confirmed.</p>
1029
- */
1030
- confirmationState?: ConfirmationState | string;
1031
- }
1032
- /**
1033
- * <p>An intent that Amazon Lex V2 determined might satisfy the user's utterance.
1034
- * The intents are ordered by the confidence score. </p>
1035
- */
1036
- export interface Interpretation {
1037
- /**
1038
- * <p>Determines the threshold where Amazon Lex V2 will insert the
1039
- * <code>AMAZON.FallbackIntent</code>,
1040
- * <code>AMAZON.KendraSearchIntent</code>, or both when returning
1041
- * alternative intents in a response. <code>AMAZON.FallbackIntent</code>
1042
- * and <code>AMAZON.KendraSearchIntent</code> are only inserted if they
1043
- * are configured for the bot.</p>
1044
- */
1045
- nluConfidence?: ConfidenceScore;
1046
- /**
1047
- * <p>The sentiment expressed in an utterance. </p>
1048
- * <p>When the bot is configured to send utterances to Amazon Comprehend
1049
- * for sentiment analysis, this field contains the result of the
1050
- * analysis.</p>
1051
- */
1052
- sentimentResponse?: SentimentResponse;
1053
- /**
1054
- * <p>A list of intents that might satisfy the user's utterance. The
1055
- * intents are ordered by the confidence score.</p>
1056
- */
1057
- intent?: Intent;
1058
- }
1059
- /**
1060
- * <p>The state of the user's session with Amazon Lex V2.</p>
1061
- */
1062
- export interface SessionState {
1063
- /**
1064
- * <p>The next step that Amazon Lex V2 should take in the conversation with a
1065
- * user.</p>
1066
- */
1067
- dialogAction?: DialogAction;
1068
- /**
1069
- * <p>The active intent that Amazon Lex V2 is processing.</p>
1070
- */
1071
- intent?: Intent;
1072
- /**
1073
- * <p>One or more contexts that indicate to Amazon Lex V2 the context of a
1074
- * request. When a context is active, Amazon Lex V2 considers intents with the
1075
- * matching context as a trigger as the next intent in a session.</p>
1076
- */
1077
- activeContexts?: ActiveContext[];
1078
- /**
1079
- * <p>Map of key/value pairs representing session-specific context
1080
- * information. It contains application information passed between Amazon Lex V2
1081
- * and a client application.</p>
1082
- */
1083
- sessionAttributes?: Record<string, string>;
1084
- /**
1085
- * <p>A unique identifier for a specific request.</p>
1086
- */
1087
- originatingRequestId?: string;
1088
- /**
1089
- * <p>Hints for phrases that a customer is likely to use for a slot. Amazon Lex V2
1090
- * uses the hints to help determine the correct value of a slot.</p>
1091
- */
1092
- runtimeHints?: RuntimeHints;
1093
- }
1094
- /**
1095
- * <p>The initial event sent from the application to Amazon Lex V2 to configure
1096
- * the conversation, including session and request attributes and the
1097
- * response content type.</p>
1098
- */
1099
- export interface ConfigurationEvent {
1100
- /**
1101
- * <p>Request-specific information passed between the client application
1102
- * and Amazon Lex V2.</p>
1103
- * <p>The namespace <code>x-amz-lex:</code> is reserved for special
1104
- * attributes. Don't create any request attributes for prefix
1105
- * <code>x-amz-lex:</code>.</p>
1106
- */
1107
- requestAttributes?: Record<string, string>;
1108
- /**
1109
- * <p>The message that Amazon Lex V2 returns in the response can be either text or
1110
- * speech based on the <code>responseContentType</code> value.</p>
1111
- * <ul>
1112
- * <li>
1113
- * <p>If the value is <code>text/plain;charset=utf-8</code>, Amazon Lex V2
1114
- * returns text in the response.</p>
1115
- * </li>
1116
- * <li>
1117
- * <p>If the value begins with <code>audio/</code>, Amazon Lex V2 returns
1118
- * speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech
1119
- * using the configuration that you specified in the
1120
- * <code>requestContentType</code> parameter. For example, if you
1121
- * specify <code>audio/mpeg</code> as the value, Amazon Lex V2 returns
1122
- * speech in the MPEG format.</p>
1123
- * </li>
1124
- * <li>
1125
- * <p>If the value is <code>audio/pcm</code>, the speech returned is
1126
- * audio/pcm in 16-bit, little-endian format.</p>
1127
- * </li>
1128
- * <li>
1129
- * <p>The following are the accepted values:</p>
1130
- * <ul>
1131
- * <li>
1132
- * <p>audio/mpeg</p>
1133
- * </li>
1134
- * <li>
1135
- * <p>audio/ogg</p>
1136
- * </li>
1137
- * <li>
1138
- * <p>audio/pcm</p>
1139
- * </li>
1140
- * <li>
1141
- * <p>audio/* (defaults to mpeg)</p>
1142
- * </li>
1143
- * <li>
1144
- * <p>text/plain; charset=utf-8</p>
1145
- * </li>
1146
- * </ul>
1147
- * </li>
1148
- * </ul>
1149
- */
1150
- responseContentType: string | undefined;
1151
- /**
1152
- * <p>The state of the user's session with Amazon Lex V2.</p>
1153
- */
1154
- sessionState?: SessionState;
1155
- /**
1156
- * <p>A list of messages to send to the user.</p>
1157
- * <p>If you set the <code>welcomeMessage</code> field, you must also set
1158
- * the <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_runtime_DialogAction.html">
1159
- * <code>DialogAction</code>
1160
- * </a> structure's <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_runtime_DialogAction.html#lexv2-Type-runtime_DialogAction-type">
1161
- * <code>type</code>
1162
- * </a> field.</p>
1163
- */
1164
- welcomeMessages?: Message[];
1165
- /**
1166
- * <p>Determines whether Amazon Lex V2 should send audio responses to the client
1167
- * application.
1168
- * </p>
1169
- * <p>Set this field to false when the client is operating in a playback
1170
- * mode where audio responses are played to the user. If the client isn't
1171
- * operating in playback mode, such as a text chat application, set this
1172
- * to true so that Amazon Lex V2 doesn't wait for the prompt to finish playing on
1173
- * the client.</p>
1174
- */
1175
- disablePlayback?: boolean;
1176
- /**
1177
- * <p>A unique identifier that your application assigns to the event. You
1178
- * can use this to identify events in logs.</p>
1179
- */
1180
- eventId?: string;
1181
- /**
1182
- * <p>A timestamp set by the client of the date and time that the event
1183
- * was sent to Amazon Lex V2.</p>
1184
- */
1185
- clientTimestampMillis?: number;
1186
- }
1187
- export interface PutSessionRequest {
1188
- /**
1189
- * <p>The identifier of the bot that receives the session data.</p>
1190
- */
1191
- botId: string | undefined;
1192
- /**
1193
- * <p>The alias identifier of the bot that receives the session
1194
- * data.</p>
1195
- */
1196
- botAliasId: string | undefined;
1197
- /**
1198
- * <p>The locale where the session is in use.</p>
1199
- */
1200
- localeId: string | undefined;
1201
- /**
1202
- * <p>The identifier of the session that receives the session data.</p>
1203
- */
1204
- sessionId: string | undefined;
1205
- /**
1206
- * <p>A list of messages to send to the user. Messages are sent in the
1207
- * order that they are defined in the list.</p>
1208
- */
1209
- messages?: Message[];
1210
- /**
1211
- * <p>Sets the state of the session with the user. You can use this to set
1212
- * the current intent, attributes, context, and dialog action. Use the
1213
- * dialog action to determine the next step that Amazon Lex V2 should use in the
1214
- * conversation with the user.</p>
1215
- */
1216
- sessionState: SessionState | undefined;
1217
- /**
1218
- * <p>Request-specific information passed between Amazon Lex V2 and the client
1219
- * application.</p>
1220
- * <p>The namespace <code>x-amz-lex:</code> is reserved for special
1221
- * attributes. Don't create any request attributes with the prefix
1222
- * <code>x-amz-lex:</code>.</p>
1223
- */
1224
- requestAttributes?: Record<string, string>;
1225
- /**
1226
- * <p>The message that Amazon Lex V2 returns in the response can be either text or
1227
- * speech depending on the value of this parameter. </p>
1228
- * <ul>
1229
- * <li>
1230
- * <p>If the value is <code>text/plain; charset=utf-8</code>, Amazon Lex V2
1231
- * returns text in the response.</p>
1232
- * </li>
1233
- * </ul>
1234
- */
1235
- responseContentType?: string;
1236
- }
1237
- export interface RecognizeTextRequest {
1238
- /**
1239
- * <p>The identifier of the bot that processes the request.</p>
1240
- */
1241
- botId: string | undefined;
1242
- /**
1243
- * <p>The alias identifier in use for the bot that processes the
1244
- * request.</p>
1245
- */
1246
- botAliasId: string | undefined;
1247
- /**
1248
- * <p>The locale where the session is in use.</p>
1249
- */
1250
- localeId: string | undefined;
1251
- /**
1252
- * <p>The identifier of the user session that is having the
1253
- * conversation.</p>
1254
- */
1255
- sessionId: string | undefined;
1256
- /**
1257
- * <p>The text that the user entered. Amazon Lex V2 interprets this text.</p>
1258
- */
1259
- text: string | undefined;
1260
- /**
1261
- * <p>The current state of the dialog between the user and the bot.</p>
1262
- */
1263
- sessionState?: SessionState;
1264
- /**
1265
- * <p>Request-specific information passed between the client application
1266
- * and Amazon Lex V2 </p>
1267
- * <p>The namespace <code>x-amz-lex:</code> is reserved for special
1268
- * attributes. Don't create any request attributes with the prefix
1269
- * <code>x-amz-lex:</code>.</p>
1270
- */
1271
- requestAttributes?: Record<string, string>;
1272
- }
1273
- /**
1274
- * <p>Represents a stream of events between your application and
1275
- * Amazon Lex V2.</p>
1276
- */
1277
- export declare type StartConversationRequestEventStream = StartConversationRequestEventStream.AudioInputEventMember | StartConversationRequestEventStream.ConfigurationEventMember | StartConversationRequestEventStream.DTMFInputEventMember | StartConversationRequestEventStream.DisconnectionEventMember | StartConversationRequestEventStream.PlaybackCompletionEventMember | StartConversationRequestEventStream.TextInputEventMember | StartConversationRequestEventStream.$UnknownMember;
1278
- export declare namespace StartConversationRequestEventStream {
1279
- /**
1280
- * <p>Configuration information sent from your client application to
1281
- * Amazon Lex V2</p>
1282
- */
1283
- interface ConfigurationEventMember {
1284
- ConfigurationEvent: ConfigurationEvent;
1285
- AudioInputEvent?: never;
1286
- DTMFInputEvent?: never;
1287
- TextInputEvent?: never;
1288
- PlaybackCompletionEvent?: never;
1289
- DisconnectionEvent?: never;
1290
- $unknown?: never;
1291
- }
1292
- /**
1293
- * <p>Speech audio sent from your client application to Amazon Lex V2. Audio
1294
- * starts accumulating when Amazon Lex V2 identifies a voice and continues until a
1295
- * natural pause in the speech is found before processing.</p>
1296
- */
1297
- interface AudioInputEventMember {
1298
- ConfigurationEvent?: never;
1299
- AudioInputEvent: AudioInputEvent;
1300
- DTMFInputEvent?: never;
1301
- TextInputEvent?: never;
1302
- PlaybackCompletionEvent?: never;
1303
- DisconnectionEvent?: never;
1304
- $unknown?: never;
1305
- }
1306
- /**
1307
- * <p>DTMF information sent to Amazon Lex V2 by your application. Amazon Lex V2
1308
- * accumulates the DMTF information from when the user sends the first
1309
- * character and ends</p>
1310
- * <ul>
1311
- * <li>
1312
- * <p>when there's a pause longer that the value configured for the
1313
- * end timeout.</p>
1314
- * </li>
1315
- * <li>
1316
- * <p>when there's a digit that is the configured end
1317
- * character.</p>
1318
- * </li>
1319
- * <li>
1320
- * <p>when Amazon Lex V2 accumulates characters equal to the maximum DTMF
1321
- * character configuration.</p>
1322
- * </li>
1323
- * </ul>
1324
- */
1325
- interface DTMFInputEventMember {
1326
- ConfigurationEvent?: never;
1327
- AudioInputEvent?: never;
1328
- DTMFInputEvent: DTMFInputEvent;
1329
- TextInputEvent?: never;
1330
- PlaybackCompletionEvent?: never;
1331
- DisconnectionEvent?: never;
1332
- $unknown?: never;
1333
- }
1334
- /**
1335
- * <p>Text sent from your client application to Amazon Lex V2. Each
1336
- * <code>TextInputEvent</code> is processed individually.</p>
1337
- */
1338
- interface TextInputEventMember {
1339
- ConfigurationEvent?: never;
1340
- AudioInputEvent?: never;
1341
- DTMFInputEvent?: never;
1342
- TextInputEvent: TextInputEvent;
1343
- PlaybackCompletionEvent?: never;
1344
- DisconnectionEvent?: never;
1345
- $unknown?: never;
1346
- }
1347
- /**
1348
- * <p>Event sent from the client application to Amazon Lex V2 to indicate that it
1349
- * has finished playing audio and that Amazon Lex V2 should start listening for
1350
- * user input.</p>
1351
- */
1352
- interface PlaybackCompletionEventMember {
1353
- ConfigurationEvent?: never;
1354
- AudioInputEvent?: never;
1355
- DTMFInputEvent?: never;
1356
- TextInputEvent?: never;
1357
- PlaybackCompletionEvent: PlaybackCompletionEvent;
1358
- DisconnectionEvent?: never;
1359
- $unknown?: never;
1360
- }
1361
- /**
1362
- * <p>Event sent from the client application to indicate to Amazon Lex V2 that the
1363
- * conversation is over.</p>
1364
- */
1365
- interface DisconnectionEventMember {
1366
- ConfigurationEvent?: never;
1367
- AudioInputEvent?: never;
1368
- DTMFInputEvent?: never;
1369
- TextInputEvent?: never;
1370
- PlaybackCompletionEvent?: never;
1371
- DisconnectionEvent: DisconnectionEvent;
1372
- $unknown?: never;
1373
- }
1374
- interface $UnknownMember {
1375
- ConfigurationEvent?: never;
1376
- AudioInputEvent?: never;
1377
- DTMFInputEvent?: never;
1378
- TextInputEvent?: never;
1379
- PlaybackCompletionEvent?: never;
1380
- DisconnectionEvent?: never;
1381
- $unknown: [
1382
- string,
1383
- any
1384
- ];
1385
- }
1386
- interface Visitor<T> {
1387
- ConfigurationEvent: (value: ConfigurationEvent) => T;
1388
- AudioInputEvent: (value: AudioInputEvent) => T;
1389
- DTMFInputEvent: (value: DTMFInputEvent) => T;
1390
- TextInputEvent: (value: TextInputEvent) => T;
1391
- PlaybackCompletionEvent: (value: PlaybackCompletionEvent) => T;
1392
- DisconnectionEvent: (value: DisconnectionEvent) => T;
1393
- _: (name: string, value: any) => T;
1394
- }
1395
- const visit: <T>(value: StartConversationRequestEventStream, visitor: Visitor<T>) => T;
1396
- }
1397
- export interface StartConversationRequest {
1398
- /**
1399
- * <p>The identifier of the bot to process the request.</p>
1400
- */
1401
- botId: string | undefined;
1402
- /**
1403
- * <p>The alias identifier in use for the bot that processes the
1404
- * request.</p>
1405
- */
1406
- botAliasId: string | undefined;
1407
- /**
1408
- * <p>The locale where the session is in use.</p>
1409
- */
1410
- localeId: string | undefined;
1411
- /**
1412
- * <p>The identifier of the user session that is having the
1413
- * conversation.</p>
1414
- */
1415
- sessionId: string | undefined;
1416
- /**
1417
- * <p>The conversation type that you are using the Amazon Lex V2. If the
1418
- * conversation mode is <code>AUDIO</code> you can send both audio and
1419
- * DTMF information. If the mode is <code>TEXT</code> you can only send
1420
- * text.</p>
1421
- */
1422
- conversationMode?: ConversationMode | string;
1423
- /**
1424
- * <p>Represents the stream of events to Amazon Lex V2 from your application. The
1425
- * events are encoded as HTTP/2 data frames.</p>
1426
- */
1427
- requestEventStream: AsyncIterable<StartConversationRequestEventStream> | undefined;
1428
- }
1429
- export interface GetSessionResponse {
1430
- /**
1431
- * <p>The identifier of the returned session.</p>
1432
- */
1433
- sessionId?: string;
1434
- /**
1435
- * <p>A list of messages that were last sent to the user. The messages are
1436
- * ordered based on the order that your returned the messages from your
1437
- * Lambda function or the order that messages are defined in the bot.
1438
- * </p>
1439
- */
1440
- messages?: Message[];
1441
- /**
1442
- * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
1443
- * utterance. </p>
1444
- * <p>Each interpretation includes the intent, a score that indicates how
1445
- * confident Amazon Lex V2 is that the interpretation is the correct one, and an
1446
- * optional sentiment response that indicates the sentiment expressed in
1447
- * the utterance.</p>
1448
- */
1449
- interpretations?: Interpretation[];
1450
- /**
1451
- * <p>Represents the current state of the dialog between the user and the
1452
- * bot.</p>
1453
- * <p>You can use this to determine the progress of the conversation and
1454
- * what the next action might be.</p>
1455
- */
1456
- sessionState?: SessionState;
1457
- }
1458
- /**
1459
- * <p>Contains the current state of the conversation between the client
1460
- * application and Amazon Lex V2.</p>
1461
- */
1462
- export interface IntentResultEvent {
1463
- /**
1464
- * <p>Indicates whether the input to the operation was text or
1465
- * speech.</p>
1466
- */
1467
- inputMode?: InputMode | string;
1468
- /**
1469
- * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
1470
- * utterance.</p>
1471
- *
1472
- * <p>Each interpretation includes the intent, a score that indicates how
1473
- * confident Amazon Lex V2 is that the interpretation is the correct one, and an
1474
- * optional sentiment response that indicates the sentiment expressed in
1475
- * the utterance.</p>
1476
- */
1477
- interpretations?: Interpretation[];
1478
- /**
1479
- * <p>The state of the user's session with Amazon Lex V2.</p>
1480
- */
1481
- sessionState?: SessionState;
1482
- /**
1483
- * <p>The attributes sent in the request.</p>
1484
- */
1485
- requestAttributes?: Record<string, string>;
1486
- /**
1487
- * <p>The identifier of the session in use.</p>
1488
- */
1489
- sessionId?: string;
1490
- /**
1491
- * <p>A unique identifier of the event sent by Amazon Lex V2. The identifier is in
1492
- * the form <code>RESPONSE-N</code>, where N is a number starting with one
1493
- * and incremented for each event sent by Amazon Lex V2 in the current
1494
- * session.</p>
1495
- */
1496
- eventId?: string;
1497
- }
1498
- export interface RecognizeTextResponse {
1499
- /**
1500
- * <p>A list of messages last sent to the user. The messages are ordered
1501
- * based on the order that you returned the messages from your Lambda
1502
- * function or the order that the messages are defined in the bot.</p>
1503
- */
1504
- messages?: Message[];
1505
- /**
1506
- * <p>Represents the current state of the dialog between the user and the
1507
- * bot. </p>
1508
- * <p>Use this to determine the progress of the conversation and what the
1509
- * next action may be.</p>
1510
- */
1511
- sessionState?: SessionState;
1512
- /**
1513
- * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
1514
- * utterance. </p>
1515
- * <p>Each interpretation includes the intent, a score that indicates now
1516
- * confident Amazon Lex V2 is that the interpretation is the correct one, and an
1517
- * optional sentiment response that indicates the sentiment expressed in
1518
- * the utterance.</p>
1519
- */
1520
- interpretations?: Interpretation[];
1521
- /**
1522
- * <p>The attributes sent in the request.</p>
1523
- */
1524
- requestAttributes?: Record<string, string>;
1525
- /**
1526
- * <p>The identifier of the session in use.</p>
1527
- */
1528
- sessionId?: string;
1529
- }
1530
- /**
1531
- * <p>Represents a stream of events between Amazon Lex V2 and your
1532
- * application.</p>
1533
- */
1534
- export declare type StartConversationResponseEventStream = StartConversationResponseEventStream.AccessDeniedExceptionMember | StartConversationResponseEventStream.AudioResponseEventMember | StartConversationResponseEventStream.BadGatewayExceptionMember | StartConversationResponseEventStream.ConflictExceptionMember | StartConversationResponseEventStream.DependencyFailedExceptionMember | StartConversationResponseEventStream.HeartbeatEventMember | StartConversationResponseEventStream.IntentResultEventMember | StartConversationResponseEventStream.InternalServerExceptionMember | StartConversationResponseEventStream.PlaybackInterruptionEventMember | StartConversationResponseEventStream.ResourceNotFoundExceptionMember | StartConversationResponseEventStream.TextResponseEventMember | StartConversationResponseEventStream.ThrottlingExceptionMember | StartConversationResponseEventStream.TranscriptEventMember | StartConversationResponseEventStream.ValidationExceptionMember | StartConversationResponseEventStream.$UnknownMember;
1535
- export declare namespace StartConversationResponseEventStream {
1536
- /**
1537
- * <p>Event sent from Amazon Lex V2 to indicate to the client application should
1538
- * stop playback of audio. For example, if the client is playing a prompt
1539
- * that asks for the user's telephone number, the user might start to say
1540
- * the phone number before the prompt is complete. Amazon Lex V2 sends this event
1541
- * to the client application to indicate that the user is responding and
1542
- * that Amazon Lex V2 is processing their input.</p>
1543
- */
1544
- interface PlaybackInterruptionEventMember {
1545
- PlaybackInterruptionEvent: PlaybackInterruptionEvent;
1546
- TranscriptEvent?: never;
1547
- IntentResultEvent?: never;
1548
- TextResponseEvent?: never;
1549
- AudioResponseEvent?: never;
1550
- HeartbeatEvent?: never;
1551
- AccessDeniedException?: never;
1552
- ResourceNotFoundException?: never;
1553
- ValidationException?: never;
1554
- ThrottlingException?: never;
1555
- InternalServerException?: never;
1556
- ConflictException?: never;
1557
- DependencyFailedException?: never;
1558
- BadGatewayException?: never;
1559
- $unknown?: never;
1560
- }
1561
- /**
1562
- * <p>Event sent from Amazon Lex V2 to your client application that contains a
1563
- * transcript of voice audio. </p>
1564
- */
1565
- interface TranscriptEventMember {
1566
- PlaybackInterruptionEvent?: never;
1567
- TranscriptEvent: TranscriptEvent;
1568
- IntentResultEvent?: never;
1569
- TextResponseEvent?: never;
1570
- AudioResponseEvent?: never;
1571
- HeartbeatEvent?: never;
1572
- AccessDeniedException?: never;
1573
- ResourceNotFoundException?: never;
1574
- ValidationException?: never;
1575
- ThrottlingException?: never;
1576
- InternalServerException?: never;
1577
- ConflictException?: never;
1578
- DependencyFailedException?: never;
1579
- BadGatewayException?: never;
1580
- $unknown?: never;
1581
- }
1582
- /**
1583
- * <p>Event sent from Amazon Lex V2 to the client application containing the
1584
- * current state of the conversation between the user and Amazon Lex V2.</p>
1585
- */
1586
- interface IntentResultEventMember {
1587
- PlaybackInterruptionEvent?: never;
1588
- TranscriptEvent?: never;
1589
- IntentResultEvent: IntentResultEvent;
1590
- TextResponseEvent?: never;
1591
- AudioResponseEvent?: never;
1592
- HeartbeatEvent?: never;
1593
- AccessDeniedException?: never;
1594
- ResourceNotFoundException?: never;
1595
- ValidationException?: never;
1596
- ThrottlingException?: never;
1597
- InternalServerException?: never;
1598
- ConflictException?: never;
1599
- DependencyFailedException?: never;
1600
- BadGatewayException?: never;
1601
- $unknown?: never;
1602
- }
1603
- /**
1604
- * <p>The event sent from Amazon Lex V2 to your application with text to present
1605
- * to the user.</p>
1606
- */
1607
- interface TextResponseEventMember {
1608
- PlaybackInterruptionEvent?: never;
1609
- TranscriptEvent?: never;
1610
- IntentResultEvent?: never;
1611
- TextResponseEvent: TextResponseEvent;
1612
- AudioResponseEvent?: never;
1613
- HeartbeatEvent?: never;
1614
- AccessDeniedException?: never;
1615
- ResourceNotFoundException?: never;
1616
- ValidationException?: never;
1617
- ThrottlingException?: never;
1618
- InternalServerException?: never;
1619
- ConflictException?: never;
1620
- DependencyFailedException?: never;
1621
- BadGatewayException?: never;
1622
- $unknown?: never;
1623
- }
1624
- /**
1625
- * <p>An event sent from Amazon Lex V2 to your client application containing audio
1626
- * to play to the user. </p>
1627
- */
1628
- interface AudioResponseEventMember {
1629
- PlaybackInterruptionEvent?: never;
1630
- TranscriptEvent?: never;
1631
- IntentResultEvent?: never;
1632
- TextResponseEvent?: never;
1633
- AudioResponseEvent: AudioResponseEvent;
1634
- HeartbeatEvent?: never;
1635
- AccessDeniedException?: never;
1636
- ResourceNotFoundException?: never;
1637
- ValidationException?: never;
1638
- ThrottlingException?: never;
1639
- InternalServerException?: never;
1640
- ConflictException?: never;
1641
- DependencyFailedException?: never;
1642
- BadGatewayException?: never;
1643
- $unknown?: never;
1644
- }
1645
- /**
1646
- * <p>Event that Amazon Lex V2 sends to indicate that the stream is still open
1647
- * between the client application and Amazon Lex V2 </p>
1648
- */
1649
- interface HeartbeatEventMember {
1650
- PlaybackInterruptionEvent?: never;
1651
- TranscriptEvent?: never;
1652
- IntentResultEvent?: never;
1653
- TextResponseEvent?: never;
1654
- AudioResponseEvent?: never;
1655
- HeartbeatEvent: HeartbeatEvent;
1656
- AccessDeniedException?: never;
1657
- ResourceNotFoundException?: never;
1658
- ValidationException?: never;
1659
- ThrottlingException?: never;
1660
- InternalServerException?: never;
1661
- ConflictException?: never;
1662
- DependencyFailedException?: never;
1663
- BadGatewayException?: never;
1664
- $unknown?: never;
1665
- }
1666
- /**
1667
- * <p>Exception thrown when the credentials passed with the request are
1668
- * invalid or expired. Also thrown when the credentials in the request do
1669
- * not have permission to access the <code>StartConversation</code>
1670
- * operation.</p>
1671
- */
1672
- interface AccessDeniedExceptionMember {
1673
- PlaybackInterruptionEvent?: never;
1674
- TranscriptEvent?: never;
1675
- IntentResultEvent?: never;
1676
- TextResponseEvent?: never;
1677
- AudioResponseEvent?: never;
1678
- HeartbeatEvent?: never;
1679
- AccessDeniedException: AccessDeniedException;
1680
- ResourceNotFoundException?: never;
1681
- ValidationException?: never;
1682
- ThrottlingException?: never;
1683
- InternalServerException?: never;
1684
- ConflictException?: never;
1685
- DependencyFailedException?: never;
1686
- BadGatewayException?: never;
1687
- $unknown?: never;
1688
- }
1689
- /**
1690
- * <p>Exception thrown if one of the input parameters points to a resource
1691
- * that does not exist. For example, if the bot ID specified does not
1692
- * exist.</p>
1693
- */
1694
- interface ResourceNotFoundExceptionMember {
1695
- PlaybackInterruptionEvent?: never;
1696
- TranscriptEvent?: never;
1697
- IntentResultEvent?: never;
1698
- TextResponseEvent?: never;
1699
- AudioResponseEvent?: never;
1700
- HeartbeatEvent?: never;
1701
- AccessDeniedException?: never;
1702
- ResourceNotFoundException: ResourceNotFoundException;
1703
- ValidationException?: never;
1704
- ThrottlingException?: never;
1705
- InternalServerException?: never;
1706
- ConflictException?: never;
1707
- DependencyFailedException?: never;
1708
- BadGatewayException?: never;
1709
- $unknown?: never;
1710
- }
1711
- /**
1712
- * <p>Exception thrown when one or more parameters could not be validated.
1713
- * The <code>message</code> contains the name of the field that isn't
1714
- * valid.</p>
1715
- */
1716
- interface ValidationExceptionMember {
1717
- PlaybackInterruptionEvent?: never;
1718
- TranscriptEvent?: never;
1719
- IntentResultEvent?: never;
1720
- TextResponseEvent?: never;
1721
- AudioResponseEvent?: never;
1722
- HeartbeatEvent?: never;
1723
- AccessDeniedException?: never;
1724
- ResourceNotFoundException?: never;
1725
- ValidationException: ValidationException;
1726
- ThrottlingException?: never;
1727
- InternalServerException?: never;
1728
- ConflictException?: never;
1729
- DependencyFailedException?: never;
1730
- BadGatewayException?: never;
1731
- $unknown?: never;
1732
- }
1733
- /**
1734
- * <p>Exception thrown when your application exceeds the maximum number of
1735
- * concurrent requests. </p>
1736
- */
1737
- interface ThrottlingExceptionMember {
1738
- PlaybackInterruptionEvent?: never;
1739
- TranscriptEvent?: never;
1740
- IntentResultEvent?: never;
1741
- TextResponseEvent?: never;
1742
- AudioResponseEvent?: never;
1743
- HeartbeatEvent?: never;
1744
- AccessDeniedException?: never;
1745
- ResourceNotFoundException?: never;
1746
- ValidationException?: never;
1747
- ThrottlingException: ThrottlingException;
1748
- InternalServerException?: never;
1749
- ConflictException?: never;
1750
- DependencyFailedException?: never;
1751
- BadGatewayException?: never;
1752
- $unknown?: never;
1753
- }
1754
- /**
1755
- * <p>An error occurred with Amazon Lex V2.</p>
1756
- */
1757
- interface InternalServerExceptionMember {
1758
- PlaybackInterruptionEvent?: never;
1759
- TranscriptEvent?: never;
1760
- IntentResultEvent?: never;
1761
- TextResponseEvent?: never;
1762
- AudioResponseEvent?: never;
1763
- HeartbeatEvent?: never;
1764
- AccessDeniedException?: never;
1765
- ResourceNotFoundException?: never;
1766
- ValidationException?: never;
1767
- ThrottlingException?: never;
1768
- InternalServerException: InternalServerException;
1769
- ConflictException?: never;
1770
- DependencyFailedException?: never;
1771
- BadGatewayException?: never;
1772
- $unknown?: never;
1773
- }
1774
- /**
1775
- * <p>Exception thrown when two clients are using the same AWS account,
1776
- * Amazon Lex V2 bot, and session ID.</p>
1777
- */
1778
- interface ConflictExceptionMember {
1779
- PlaybackInterruptionEvent?: never;
1780
- TranscriptEvent?: never;
1781
- IntentResultEvent?: never;
1782
- TextResponseEvent?: never;
1783
- AudioResponseEvent?: never;
1784
- HeartbeatEvent?: never;
1785
- AccessDeniedException?: never;
1786
- ResourceNotFoundException?: never;
1787
- ValidationException?: never;
1788
- ThrottlingException?: never;
1789
- InternalServerException?: never;
1790
- ConflictException: ConflictException;
1791
- DependencyFailedException?: never;
1792
- BadGatewayException?: never;
1793
- $unknown?: never;
1794
- }
1795
- /**
1796
- * <p></p>
1797
- */
1798
- interface DependencyFailedExceptionMember {
1799
- PlaybackInterruptionEvent?: never;
1800
- TranscriptEvent?: never;
1801
- IntentResultEvent?: never;
1802
- TextResponseEvent?: never;
1803
- AudioResponseEvent?: never;
1804
- HeartbeatEvent?: never;
1805
- AccessDeniedException?: never;
1806
- ResourceNotFoundException?: never;
1807
- ValidationException?: never;
1808
- ThrottlingException?: never;
1809
- InternalServerException?: never;
1810
- ConflictException?: never;
1811
- DependencyFailedException: DependencyFailedException;
1812
- BadGatewayException?: never;
1813
- $unknown?: never;
1814
- }
1815
- /**
1816
- * <p></p>
1817
- */
1818
- interface BadGatewayExceptionMember {
1819
- PlaybackInterruptionEvent?: never;
1820
- TranscriptEvent?: never;
1821
- IntentResultEvent?: never;
1822
- TextResponseEvent?: never;
1823
- AudioResponseEvent?: never;
1824
- HeartbeatEvent?: never;
1825
- AccessDeniedException?: never;
1826
- ResourceNotFoundException?: never;
1827
- ValidationException?: never;
1828
- ThrottlingException?: never;
1829
- InternalServerException?: never;
1830
- ConflictException?: never;
1831
- DependencyFailedException?: never;
1832
- BadGatewayException: BadGatewayException;
1833
- $unknown?: never;
1834
- }
1835
- interface $UnknownMember {
1836
- PlaybackInterruptionEvent?: never;
1837
- TranscriptEvent?: never;
1838
- IntentResultEvent?: never;
1839
- TextResponseEvent?: never;
1840
- AudioResponseEvent?: never;
1841
- HeartbeatEvent?: never;
1842
- AccessDeniedException?: never;
1843
- ResourceNotFoundException?: never;
1844
- ValidationException?: never;
1845
- ThrottlingException?: never;
1846
- InternalServerException?: never;
1847
- ConflictException?: never;
1848
- DependencyFailedException?: never;
1849
- BadGatewayException?: never;
1850
- $unknown: [
1851
- string,
1852
- any
1853
- ];
1854
- }
1855
- interface Visitor<T> {
1856
- PlaybackInterruptionEvent: (value: PlaybackInterruptionEvent) => T;
1857
- TranscriptEvent: (value: TranscriptEvent) => T;
1858
- IntentResultEvent: (value: IntentResultEvent) => T;
1859
- TextResponseEvent: (value: TextResponseEvent) => T;
1860
- AudioResponseEvent: (value: AudioResponseEvent) => T;
1861
- HeartbeatEvent: (value: HeartbeatEvent) => T;
1862
- AccessDeniedException: (value: AccessDeniedException) => T;
1863
- ResourceNotFoundException: (value: ResourceNotFoundException) => T;
1864
- ValidationException: (value: ValidationException) => T;
1865
- ThrottlingException: (value: ThrottlingException) => T;
1866
- InternalServerException: (value: InternalServerException) => T;
1867
- ConflictException: (value: ConflictException) => T;
1868
- DependencyFailedException: (value: DependencyFailedException) => T;
1869
- BadGatewayException: (value: BadGatewayException) => T;
1870
- _: (name: string, value: any) => T;
1871
- }
1872
- const visit: <T>(value: StartConversationResponseEventStream, visitor: Visitor<T>) => T;
1873
- }
1874
- export interface StartConversationResponse {
1875
- /**
1876
- * <p>Represents the stream of events from Amazon Lex V2 to your application. The
1877
- * events are encoded as HTTP/2 data frames.</p>
1878
- */
1879
- responseEventStream?: AsyncIterable<StartConversationResponseEventStream>;
1880
- }
1881
- /**
1882
- * @internal
1883
- */
1884
- export declare const ActiveContextTimeToLiveFilterSensitiveLog: (obj: ActiveContextTimeToLive) => any;
1885
- /**
1886
- * @internal
1887
- */
1888
- export declare const ActiveContextFilterSensitiveLog: (obj: ActiveContext) => any;
1889
- /**
1890
- * @internal
1891
- */
1892
- export declare const AudioInputEventFilterSensitiveLog: (obj: AudioInputEvent) => any;
1893
- /**
1894
- * @internal
1895
- */
1896
- export declare const AudioResponseEventFilterSensitiveLog: (obj: AudioResponseEvent) => any;
1897
- /**
1898
- * @internal
1899
- */
1900
- export declare const DeleteSessionRequestFilterSensitiveLog: (obj: DeleteSessionRequest) => any;
1901
- /**
1902
- * @internal
1903
- */
1904
- export declare const DeleteSessionResponseFilterSensitiveLog: (obj: DeleteSessionResponse) => any;
1905
- /**
1906
- * @internal
1907
- */
1908
- export declare const GetSessionRequestFilterSensitiveLog: (obj: GetSessionRequest) => any;
1909
- /**
1910
- * @internal
1911
- */
1912
- export declare const ValueFilterSensitiveLog: (obj: Value) => any;
1913
- /**
1914
- * @internal
1915
- */
1916
- export declare const ConfidenceScoreFilterSensitiveLog: (obj: ConfidenceScore) => any;
1917
- /**
1918
- * @internal
1919
- */
1920
- export declare const SentimentScoreFilterSensitiveLog: (obj: SentimentScore) => any;
1921
- /**
1922
- * @internal
1923
- */
1924
- export declare const SentimentResponseFilterSensitiveLog: (obj: SentimentResponse) => any;
1925
- /**
1926
- * @internal
1927
- */
1928
- export declare const ButtonFilterSensitiveLog: (obj: Button) => any;
1929
- /**
1930
- * @internal
1931
- */
1932
- export declare const ImageResponseCardFilterSensitiveLog: (obj: ImageResponseCard) => any;
1933
- /**
1934
- * @internal
1935
- */
1936
- export declare const MessageFilterSensitiveLog: (obj: Message) => any;
1937
- /**
1938
- * @internal
1939
- */
1940
- export declare const RuntimeHintValueFilterSensitiveLog: (obj: RuntimeHintValue) => any;
1941
- /**
1942
- * @internal
1943
- */
1944
- export declare const PutSessionResponseFilterSensitiveLog: (obj: PutSessionResponse) => any;
1945
- /**
1946
- * @internal
1947
- */
1948
- export declare const RecognizeUtteranceRequestFilterSensitiveLog: (obj: RecognizeUtteranceRequest) => any;
1949
- /**
1950
- * @internal
1951
- */
1952
- export declare const RecognizeUtteranceResponseFilterSensitiveLog: (obj: RecognizeUtteranceResponse) => any;
1953
- /**
1954
- * @internal
1955
- */
1956
- export declare const DisconnectionEventFilterSensitiveLog: (obj: DisconnectionEvent) => any;
1957
- /**
1958
- * @internal
1959
- */
1960
- export declare const DTMFInputEventFilterSensitiveLog: (obj: DTMFInputEvent) => any;
1961
- /**
1962
- * @internal
1963
- */
1964
- export declare const PlaybackCompletionEventFilterSensitiveLog: (obj: PlaybackCompletionEvent) => any;
1965
- /**
1966
- * @internal
1967
- */
1968
- export declare const TextInputEventFilterSensitiveLog: (obj: TextInputEvent) => any;
1969
- /**
1970
- * @internal
1971
- */
1972
- export declare const HeartbeatEventFilterSensitiveLog: (obj: HeartbeatEvent) => any;
1973
- /**
1974
- * @internal
1975
- */
1976
- export declare const PlaybackInterruptionEventFilterSensitiveLog: (obj: PlaybackInterruptionEvent) => any;
1977
- /**
1978
- * @internal
1979
- */
1980
- export declare const TextResponseEventFilterSensitiveLog: (obj: TextResponseEvent) => any;
1981
- /**
1982
- * @internal
1983
- */
1984
- export declare const TranscriptEventFilterSensitiveLog: (obj: TranscriptEvent) => any;
1985
- /**
1986
- * @internal
1987
- */
1988
- export declare const ElicitSubSlotFilterSensitiveLog: (obj: ElicitSubSlot) => any;
1989
- /**
1990
- * @internal
1991
- */
1992
- export declare const DialogActionFilterSensitiveLog: (obj: DialogAction) => any;
1993
- /**
1994
- * @internal
1995
- */
1996
- export declare const RuntimeHintDetailsFilterSensitiveLog: (obj: RuntimeHintDetails) => any;
1997
- /**
1998
- * @internal
1999
- */
2000
- export declare const RuntimeHintsFilterSensitiveLog: (obj: RuntimeHints) => any;
2001
- /**
2002
- * @internal
2003
- */
2004
- export declare const SlotFilterSensitiveLog: (obj: Slot) => any;
2005
- /**
2006
- * @internal
2007
- */
2008
- export declare const IntentFilterSensitiveLog: (obj: Intent) => any;
2009
- /**
2010
- * @internal
2011
- */
2012
- export declare const InterpretationFilterSensitiveLog: (obj: Interpretation) => any;
2013
- /**
2014
- * @internal
2015
- */
2016
- export declare const SessionStateFilterSensitiveLog: (obj: SessionState) => any;
2017
- /**
2018
- * @internal
2019
- */
2020
- export declare const ConfigurationEventFilterSensitiveLog: (obj: ConfigurationEvent) => any;
2021
- /**
2022
- * @internal
2023
- */
2024
- export declare const PutSessionRequestFilterSensitiveLog: (obj: PutSessionRequest) => any;
2025
- /**
2026
- * @internal
2027
- */
2028
- export declare const RecognizeTextRequestFilterSensitiveLog: (obj: RecognizeTextRequest) => any;
2029
- /**
2030
- * @internal
2031
- */
2032
- export declare const StartConversationRequestEventStreamFilterSensitiveLog: (obj: StartConversationRequestEventStream) => any;
2033
- /**
2034
- * @internal
2035
- */
2036
- export declare const StartConversationRequestFilterSensitiveLog: (obj: StartConversationRequest) => any;
2037
- /**
2038
- * @internal
2039
- */
2040
- export declare const GetSessionResponseFilterSensitiveLog: (obj: GetSessionResponse) => any;
2041
- /**
2042
- * @internal
2043
- */
2044
- export declare const IntentResultEventFilterSensitiveLog: (obj: IntentResultEvent) => any;
2045
- /**
2046
- * @internal
2047
- */
2048
- export declare const RecognizeTextResponseFilterSensitiveLog: (obj: RecognizeTextResponse) => any;
2049
- /**
2050
- * @internal
2051
- */
2052
- export declare const StartConversationResponseEventStreamFilterSensitiveLog: (obj: StartConversationResponseEventStream) => any;
2053
- /**
2054
- * @internal
2055
- */
2056
- export declare const StartConversationResponseFilterSensitiveLog: (obj: StartConversationResponse) => any;
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { Readable } from "stream";
3
+ import { LexRuntimeV2ServiceException as __BaseException } from "./LexRuntimeV2ServiceException";
4
+ export declare class AccessDeniedException extends __BaseException {
5
+ readonly name: "AccessDeniedException";
6
+ readonly $fault: "client";
7
+ constructor(
8
+ opts: __ExceptionOptionType<AccessDeniedException, __BaseException>
9
+ );
10
+ }
11
+ export interface ActiveContextTimeToLive {
12
+ timeToLiveInSeconds: number | undefined;
13
+ turnsToLive: number | undefined;
14
+ }
15
+ export interface ActiveContext {
16
+ name: string | undefined;
17
+ timeToLive: ActiveContextTimeToLive | undefined;
18
+ contextAttributes: Record<string, string> | undefined;
19
+ }
20
+ export interface AudioInputEvent {
21
+ audioChunk?: Uint8Array;
22
+ contentType: string | undefined;
23
+ eventId?: string;
24
+ clientTimestampMillis?: number;
25
+ }
26
+ export interface AudioResponseEvent {
27
+ audioChunk?: Uint8Array;
28
+ contentType?: string;
29
+ eventId?: string;
30
+ }
31
+ export declare class ConflictException extends __BaseException {
32
+ readonly name: "ConflictException";
33
+ readonly $fault: "client";
34
+ constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
35
+ }
36
+ export interface DeleteSessionRequest {
37
+ botId: string | undefined;
38
+ botAliasId: string | undefined;
39
+ localeId: string | undefined;
40
+ sessionId: string | undefined;
41
+ }
42
+ export interface DeleteSessionResponse {
43
+ botId?: string;
44
+ botAliasId?: string;
45
+ localeId?: string;
46
+ sessionId?: string;
47
+ }
48
+ export declare class InternalServerException extends __BaseException {
49
+ readonly name: "InternalServerException";
50
+ readonly $fault: "server";
51
+ constructor(
52
+ opts: __ExceptionOptionType<InternalServerException, __BaseException>
53
+ );
54
+ }
55
+ export declare class ResourceNotFoundException extends __BaseException {
56
+ readonly name: "ResourceNotFoundException";
57
+ readonly $fault: "client";
58
+ constructor(
59
+ opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>
60
+ );
61
+ }
62
+ export declare class ThrottlingException extends __BaseException {
63
+ readonly name: "ThrottlingException";
64
+ readonly $fault: "client";
65
+ constructor(
66
+ opts: __ExceptionOptionType<ThrottlingException, __BaseException>
67
+ );
68
+ }
69
+ export declare class ValidationException extends __BaseException {
70
+ readonly name: "ValidationException";
71
+ readonly $fault: "client";
72
+ constructor(
73
+ opts: __ExceptionOptionType<ValidationException, __BaseException>
74
+ );
75
+ }
76
+ export interface GetSessionRequest {
77
+ botId: string | undefined;
78
+ botAliasId: string | undefined;
79
+ localeId: string | undefined;
80
+ sessionId: string | undefined;
81
+ }
82
+ export declare enum ConfirmationState {
83
+ CONFIRMED = "Confirmed",
84
+ DENIED = "Denied",
85
+ NONE = "None",
86
+ }
87
+ export declare enum Shape {
88
+ COMPOSITE = "Composite",
89
+ LIST = "List",
90
+ SCALAR = "Scalar",
91
+ }
92
+ export interface Value {
93
+ originalValue?: string;
94
+ interpretedValue: string | undefined;
95
+ resolvedValues?: string[];
96
+ }
97
+ export declare enum IntentState {
98
+ FAILED = "Failed",
99
+ FULFILLED = "Fulfilled",
100
+ FULFILLMENT_IN_PROGRESS = "FulfillmentInProgress",
101
+ IN_PROGRESS = "InProgress",
102
+ READY_FOR_FULFILLMENT = "ReadyForFulfillment",
103
+ WAITING = "Waiting",
104
+ }
105
+ export interface ConfidenceScore {
106
+ score?: number;
107
+ }
108
+ export declare enum SentimentType {
109
+ MIXED = "MIXED",
110
+ NEGATIVE = "NEGATIVE",
111
+ NEUTRAL = "NEUTRAL",
112
+ POSITIVE = "POSITIVE",
113
+ }
114
+ export interface SentimentScore {
115
+ positive?: number;
116
+ negative?: number;
117
+ neutral?: number;
118
+ mixed?: number;
119
+ }
120
+ export interface SentimentResponse {
121
+ sentiment?: SentimentType | string;
122
+ sentimentScore?: SentimentScore;
123
+ }
124
+ export declare enum MessageContentType {
125
+ CUSTOM_PAYLOAD = "CustomPayload",
126
+ IMAGE_RESPONSE_CARD = "ImageResponseCard",
127
+ PLAIN_TEXT = "PlainText",
128
+ SSML = "SSML",
129
+ }
130
+ export interface Button {
131
+ text: string | undefined;
132
+ value: string | undefined;
133
+ }
134
+ export interface ImageResponseCard {
135
+ title: string | undefined;
136
+ subtitle?: string;
137
+ imageUrl?: string;
138
+ buttons?: Button[];
139
+ }
140
+ export interface Message {
141
+ content?: string;
142
+ contentType: MessageContentType | string | undefined;
143
+ imageResponseCard?: ImageResponseCard;
144
+ }
145
+ export declare enum StyleType {
146
+ DEFAULT = "Default",
147
+ SPELL_BY_LETTER = "SpellByLetter",
148
+ SPELL_BY_WORD = "SpellByWord",
149
+ }
150
+ export declare enum DialogActionType {
151
+ CLOSE = "Close",
152
+ CONFIRM_INTENT = "ConfirmIntent",
153
+ DELEGATE = "Delegate",
154
+ ELICIT_INTENT = "ElicitIntent",
155
+ ELICIT_SLOT = "ElicitSlot",
156
+ NONE = "None",
157
+ }
158
+ export interface RuntimeHintValue {
159
+ phrase: string | undefined;
160
+ }
161
+ export declare class BadGatewayException extends __BaseException {
162
+ readonly name: "BadGatewayException";
163
+ readonly $fault: "server";
164
+ constructor(
165
+ opts: __ExceptionOptionType<BadGatewayException, __BaseException>
166
+ );
167
+ }
168
+ export declare class DependencyFailedException extends __BaseException {
169
+ readonly name: "DependencyFailedException";
170
+ readonly $fault: "client";
171
+ constructor(
172
+ opts: __ExceptionOptionType<DependencyFailedException, __BaseException>
173
+ );
174
+ }
175
+ export interface PutSessionResponse {
176
+ contentType?: string;
177
+ messages?: string;
178
+ sessionState?: string;
179
+ requestAttributes?: string;
180
+ sessionId?: string;
181
+ audioStream?: Readable | ReadableStream | Blob;
182
+ }
183
+ export interface RecognizeUtteranceRequest {
184
+ botId: string | undefined;
185
+ botAliasId: string | undefined;
186
+ localeId: string | undefined;
187
+ sessionId: string | undefined;
188
+ sessionState?: string;
189
+ requestAttributes?: string;
190
+ requestContentType: string | undefined;
191
+ responseContentType?: string;
192
+ inputStream?: Readable | ReadableStream | Blob;
193
+ }
194
+ export interface RecognizeUtteranceResponse {
195
+ inputMode?: string;
196
+ contentType?: string;
197
+ messages?: string;
198
+ interpretations?: string;
199
+ sessionState?: string;
200
+ requestAttributes?: string;
201
+ sessionId?: string;
202
+ inputTranscript?: string;
203
+ audioStream?: Readable | ReadableStream | Blob;
204
+ }
205
+ export declare enum ConversationMode {
206
+ AUDIO = "AUDIO",
207
+ TEXT = "TEXT",
208
+ }
209
+ export interface DisconnectionEvent {
210
+ eventId?: string;
211
+ clientTimestampMillis?: number;
212
+ }
213
+ export interface DTMFInputEvent {
214
+ inputCharacter: string | undefined;
215
+ eventId?: string;
216
+ clientTimestampMillis?: number;
217
+ }
218
+ export interface PlaybackCompletionEvent {
219
+ eventId?: string;
220
+ clientTimestampMillis?: number;
221
+ }
222
+ export interface TextInputEvent {
223
+ text: string | undefined;
224
+ eventId?: string;
225
+ clientTimestampMillis?: number;
226
+ }
227
+ export interface HeartbeatEvent {
228
+ eventId?: string;
229
+ }
230
+ export declare enum InputMode {
231
+ DTMF = "DTMF",
232
+ SPEECH = "Speech",
233
+ TEXT = "Text",
234
+ }
235
+ export declare enum PlaybackInterruptionReason {
236
+ DTMF_START_DETECTED = "DTMF_START_DETECTED",
237
+ TEXT_DETECTED = "TEXT_DETECTED",
238
+ VOICE_START_DETECTED = "VOICE_START_DETECTED",
239
+ }
240
+ export interface PlaybackInterruptionEvent {
241
+ eventReason?: PlaybackInterruptionReason | string;
242
+ causedByEventId?: string;
243
+ eventId?: string;
244
+ }
245
+ export interface TextResponseEvent {
246
+ messages?: Message[];
247
+ eventId?: string;
248
+ }
249
+ export interface TranscriptEvent {
250
+ transcript?: string;
251
+ eventId?: string;
252
+ }
253
+ export interface ElicitSubSlot {
254
+ name: string | undefined;
255
+ subSlotToElicit?: ElicitSubSlot;
256
+ }
257
+ export interface DialogAction {
258
+ type: DialogActionType | string | undefined;
259
+ slotToElicit?: string;
260
+ slotElicitationStyle?: StyleType | string;
261
+ subSlotToElicit?: ElicitSubSlot;
262
+ }
263
+ export interface RuntimeHintDetails {
264
+ runtimeHintValues?: RuntimeHintValue[];
265
+ subSlotHints?: Record<string, RuntimeHintDetails>;
266
+ }
267
+ export interface RuntimeHints {
268
+ slotHints?: Record<string, Record<string, RuntimeHintDetails>>;
269
+ }
270
+ export interface Slot {
271
+ value?: Value;
272
+ shape?: Shape | string;
273
+ values?: Slot[];
274
+ subSlots?: Record<string, Slot>;
275
+ }
276
+ export interface Intent {
277
+ name: string | undefined;
278
+ slots?: Record<string, Slot>;
279
+ state?: IntentState | string;
280
+ confirmationState?: ConfirmationState | string;
281
+ }
282
+ export interface Interpretation {
283
+ nluConfidence?: ConfidenceScore;
284
+ sentimentResponse?: SentimentResponse;
285
+ intent?: Intent;
286
+ }
287
+ export interface SessionState {
288
+ dialogAction?: DialogAction;
289
+ intent?: Intent;
290
+ activeContexts?: ActiveContext[];
291
+ sessionAttributes?: Record<string, string>;
292
+ originatingRequestId?: string;
293
+ runtimeHints?: RuntimeHints;
294
+ }
295
+ export interface ConfigurationEvent {
296
+ requestAttributes?: Record<string, string>;
297
+ responseContentType: string | undefined;
298
+ sessionState?: SessionState;
299
+ welcomeMessages?: Message[];
300
+ disablePlayback?: boolean;
301
+ eventId?: string;
302
+ clientTimestampMillis?: number;
303
+ }
304
+ export interface PutSessionRequest {
305
+ botId: string | undefined;
306
+ botAliasId: string | undefined;
307
+ localeId: string | undefined;
308
+ sessionId: string | undefined;
309
+ messages?: Message[];
310
+ sessionState: SessionState | undefined;
311
+ requestAttributes?: Record<string, string>;
312
+ responseContentType?: string;
313
+ }
314
+ export interface RecognizeTextRequest {
315
+ botId: string | undefined;
316
+ botAliasId: string | undefined;
317
+ localeId: string | undefined;
318
+ sessionId: string | undefined;
319
+ text: string | undefined;
320
+ sessionState?: SessionState;
321
+ requestAttributes?: Record<string, string>;
322
+ }
323
+ export declare type StartConversationRequestEventStream =
324
+ | StartConversationRequestEventStream.AudioInputEventMember
325
+ | StartConversationRequestEventStream.ConfigurationEventMember
326
+ | StartConversationRequestEventStream.DTMFInputEventMember
327
+ | StartConversationRequestEventStream.DisconnectionEventMember
328
+ | StartConversationRequestEventStream.PlaybackCompletionEventMember
329
+ | StartConversationRequestEventStream.TextInputEventMember
330
+ | StartConversationRequestEventStream.$UnknownMember;
331
+ export declare namespace StartConversationRequestEventStream {
332
+ interface ConfigurationEventMember {
333
+ ConfigurationEvent: ConfigurationEvent;
334
+ AudioInputEvent?: never;
335
+ DTMFInputEvent?: never;
336
+ TextInputEvent?: never;
337
+ PlaybackCompletionEvent?: never;
338
+ DisconnectionEvent?: never;
339
+ $unknown?: never;
340
+ }
341
+ interface AudioInputEventMember {
342
+ ConfigurationEvent?: never;
343
+ AudioInputEvent: AudioInputEvent;
344
+ DTMFInputEvent?: never;
345
+ TextInputEvent?: never;
346
+ PlaybackCompletionEvent?: never;
347
+ DisconnectionEvent?: never;
348
+ $unknown?: never;
349
+ }
350
+ interface DTMFInputEventMember {
351
+ ConfigurationEvent?: never;
352
+ AudioInputEvent?: never;
353
+ DTMFInputEvent: DTMFInputEvent;
354
+ TextInputEvent?: never;
355
+ PlaybackCompletionEvent?: never;
356
+ DisconnectionEvent?: never;
357
+ $unknown?: never;
358
+ }
359
+ interface TextInputEventMember {
360
+ ConfigurationEvent?: never;
361
+ AudioInputEvent?: never;
362
+ DTMFInputEvent?: never;
363
+ TextInputEvent: TextInputEvent;
364
+ PlaybackCompletionEvent?: never;
365
+ DisconnectionEvent?: never;
366
+ $unknown?: never;
367
+ }
368
+ interface PlaybackCompletionEventMember {
369
+ ConfigurationEvent?: never;
370
+ AudioInputEvent?: never;
371
+ DTMFInputEvent?: never;
372
+ TextInputEvent?: never;
373
+ PlaybackCompletionEvent: PlaybackCompletionEvent;
374
+ DisconnectionEvent?: never;
375
+ $unknown?: never;
376
+ }
377
+ interface DisconnectionEventMember {
378
+ ConfigurationEvent?: never;
379
+ AudioInputEvent?: never;
380
+ DTMFInputEvent?: never;
381
+ TextInputEvent?: never;
382
+ PlaybackCompletionEvent?: never;
383
+ DisconnectionEvent: DisconnectionEvent;
384
+ $unknown?: never;
385
+ }
386
+ interface $UnknownMember {
387
+ ConfigurationEvent?: never;
388
+ AudioInputEvent?: never;
389
+ DTMFInputEvent?: never;
390
+ TextInputEvent?: never;
391
+ PlaybackCompletionEvent?: never;
392
+ DisconnectionEvent?: never;
393
+ $unknown: [string, any];
394
+ }
395
+ interface Visitor<T> {
396
+ ConfigurationEvent: (value: ConfigurationEvent) => T;
397
+ AudioInputEvent: (value: AudioInputEvent) => T;
398
+ DTMFInputEvent: (value: DTMFInputEvent) => T;
399
+ TextInputEvent: (value: TextInputEvent) => T;
400
+ PlaybackCompletionEvent: (value: PlaybackCompletionEvent) => T;
401
+ DisconnectionEvent: (value: DisconnectionEvent) => T;
402
+ _: (name: string, value: any) => T;
403
+ }
404
+ const visit: <T>(
405
+ value: StartConversationRequestEventStream,
406
+ visitor: Visitor<T>
407
+ ) => T;
408
+ }
409
+ export interface StartConversationRequest {
410
+ botId: string | undefined;
411
+ botAliasId: string | undefined;
412
+ localeId: string | undefined;
413
+ sessionId: string | undefined;
414
+ conversationMode?: ConversationMode | string;
415
+ requestEventStream:
416
+ | AsyncIterable<StartConversationRequestEventStream>
417
+ | undefined;
418
+ }
419
+ export interface GetSessionResponse {
420
+ sessionId?: string;
421
+ messages?: Message[];
422
+ interpretations?: Interpretation[];
423
+ sessionState?: SessionState;
424
+ }
425
+ export interface IntentResultEvent {
426
+ inputMode?: InputMode | string;
427
+ interpretations?: Interpretation[];
428
+ sessionState?: SessionState;
429
+ requestAttributes?: Record<string, string>;
430
+ sessionId?: string;
431
+ eventId?: string;
432
+ }
433
+ export interface RecognizeTextResponse {
434
+ messages?: Message[];
435
+ sessionState?: SessionState;
436
+ interpretations?: Interpretation[];
437
+ requestAttributes?: Record<string, string>;
438
+ sessionId?: string;
439
+ }
440
+ export declare type StartConversationResponseEventStream =
441
+ | StartConversationResponseEventStream.AccessDeniedExceptionMember
442
+ | StartConversationResponseEventStream.AudioResponseEventMember
443
+ | StartConversationResponseEventStream.BadGatewayExceptionMember
444
+ | StartConversationResponseEventStream.ConflictExceptionMember
445
+ | StartConversationResponseEventStream.DependencyFailedExceptionMember
446
+ | StartConversationResponseEventStream.HeartbeatEventMember
447
+ | StartConversationResponseEventStream.IntentResultEventMember
448
+ | StartConversationResponseEventStream.InternalServerExceptionMember
449
+ | StartConversationResponseEventStream.PlaybackInterruptionEventMember
450
+ | StartConversationResponseEventStream.ResourceNotFoundExceptionMember
451
+ | StartConversationResponseEventStream.TextResponseEventMember
452
+ | StartConversationResponseEventStream.ThrottlingExceptionMember
453
+ | StartConversationResponseEventStream.TranscriptEventMember
454
+ | StartConversationResponseEventStream.ValidationExceptionMember
455
+ | StartConversationResponseEventStream.$UnknownMember;
456
+ export declare namespace StartConversationResponseEventStream {
457
+ interface PlaybackInterruptionEventMember {
458
+ PlaybackInterruptionEvent: PlaybackInterruptionEvent;
459
+ TranscriptEvent?: never;
460
+ IntentResultEvent?: never;
461
+ TextResponseEvent?: never;
462
+ AudioResponseEvent?: never;
463
+ HeartbeatEvent?: never;
464
+ AccessDeniedException?: never;
465
+ ResourceNotFoundException?: never;
466
+ ValidationException?: never;
467
+ ThrottlingException?: never;
468
+ InternalServerException?: never;
469
+ ConflictException?: never;
470
+ DependencyFailedException?: never;
471
+ BadGatewayException?: never;
472
+ $unknown?: never;
473
+ }
474
+ interface TranscriptEventMember {
475
+ PlaybackInterruptionEvent?: never;
476
+ TranscriptEvent: TranscriptEvent;
477
+ IntentResultEvent?: never;
478
+ TextResponseEvent?: never;
479
+ AudioResponseEvent?: never;
480
+ HeartbeatEvent?: never;
481
+ AccessDeniedException?: never;
482
+ ResourceNotFoundException?: never;
483
+ ValidationException?: never;
484
+ ThrottlingException?: never;
485
+ InternalServerException?: never;
486
+ ConflictException?: never;
487
+ DependencyFailedException?: never;
488
+ BadGatewayException?: never;
489
+ $unknown?: never;
490
+ }
491
+ interface IntentResultEventMember {
492
+ PlaybackInterruptionEvent?: never;
493
+ TranscriptEvent?: never;
494
+ IntentResultEvent: IntentResultEvent;
495
+ TextResponseEvent?: never;
496
+ AudioResponseEvent?: never;
497
+ HeartbeatEvent?: never;
498
+ AccessDeniedException?: never;
499
+ ResourceNotFoundException?: never;
500
+ ValidationException?: never;
501
+ ThrottlingException?: never;
502
+ InternalServerException?: never;
503
+ ConflictException?: never;
504
+ DependencyFailedException?: never;
505
+ BadGatewayException?: never;
506
+ $unknown?: never;
507
+ }
508
+ interface TextResponseEventMember {
509
+ PlaybackInterruptionEvent?: never;
510
+ TranscriptEvent?: never;
511
+ IntentResultEvent?: never;
512
+ TextResponseEvent: TextResponseEvent;
513
+ AudioResponseEvent?: never;
514
+ HeartbeatEvent?: never;
515
+ AccessDeniedException?: never;
516
+ ResourceNotFoundException?: never;
517
+ ValidationException?: never;
518
+ ThrottlingException?: never;
519
+ InternalServerException?: never;
520
+ ConflictException?: never;
521
+ DependencyFailedException?: never;
522
+ BadGatewayException?: never;
523
+ $unknown?: never;
524
+ }
525
+ interface AudioResponseEventMember {
526
+ PlaybackInterruptionEvent?: never;
527
+ TranscriptEvent?: never;
528
+ IntentResultEvent?: never;
529
+ TextResponseEvent?: never;
530
+ AudioResponseEvent: AudioResponseEvent;
531
+ HeartbeatEvent?: never;
532
+ AccessDeniedException?: never;
533
+ ResourceNotFoundException?: never;
534
+ ValidationException?: never;
535
+ ThrottlingException?: never;
536
+ InternalServerException?: never;
537
+ ConflictException?: never;
538
+ DependencyFailedException?: never;
539
+ BadGatewayException?: never;
540
+ $unknown?: never;
541
+ }
542
+ interface HeartbeatEventMember {
543
+ PlaybackInterruptionEvent?: never;
544
+ TranscriptEvent?: never;
545
+ IntentResultEvent?: never;
546
+ TextResponseEvent?: never;
547
+ AudioResponseEvent?: never;
548
+ HeartbeatEvent: HeartbeatEvent;
549
+ AccessDeniedException?: never;
550
+ ResourceNotFoundException?: never;
551
+ ValidationException?: never;
552
+ ThrottlingException?: never;
553
+ InternalServerException?: never;
554
+ ConflictException?: never;
555
+ DependencyFailedException?: never;
556
+ BadGatewayException?: never;
557
+ $unknown?: never;
558
+ }
559
+ interface AccessDeniedExceptionMember {
560
+ PlaybackInterruptionEvent?: never;
561
+ TranscriptEvent?: never;
562
+ IntentResultEvent?: never;
563
+ TextResponseEvent?: never;
564
+ AudioResponseEvent?: never;
565
+ HeartbeatEvent?: never;
566
+ AccessDeniedException: AccessDeniedException;
567
+ ResourceNotFoundException?: never;
568
+ ValidationException?: never;
569
+ ThrottlingException?: never;
570
+ InternalServerException?: never;
571
+ ConflictException?: never;
572
+ DependencyFailedException?: never;
573
+ BadGatewayException?: never;
574
+ $unknown?: never;
575
+ }
576
+ interface ResourceNotFoundExceptionMember {
577
+ PlaybackInterruptionEvent?: never;
578
+ TranscriptEvent?: never;
579
+ IntentResultEvent?: never;
580
+ TextResponseEvent?: never;
581
+ AudioResponseEvent?: never;
582
+ HeartbeatEvent?: never;
583
+ AccessDeniedException?: never;
584
+ ResourceNotFoundException: ResourceNotFoundException;
585
+ ValidationException?: never;
586
+ ThrottlingException?: never;
587
+ InternalServerException?: never;
588
+ ConflictException?: never;
589
+ DependencyFailedException?: never;
590
+ BadGatewayException?: never;
591
+ $unknown?: never;
592
+ }
593
+ interface ValidationExceptionMember {
594
+ PlaybackInterruptionEvent?: never;
595
+ TranscriptEvent?: never;
596
+ IntentResultEvent?: never;
597
+ TextResponseEvent?: never;
598
+ AudioResponseEvent?: never;
599
+ HeartbeatEvent?: never;
600
+ AccessDeniedException?: never;
601
+ ResourceNotFoundException?: never;
602
+ ValidationException: ValidationException;
603
+ ThrottlingException?: never;
604
+ InternalServerException?: never;
605
+ ConflictException?: never;
606
+ DependencyFailedException?: never;
607
+ BadGatewayException?: never;
608
+ $unknown?: never;
609
+ }
610
+ interface ThrottlingExceptionMember {
611
+ PlaybackInterruptionEvent?: never;
612
+ TranscriptEvent?: never;
613
+ IntentResultEvent?: never;
614
+ TextResponseEvent?: never;
615
+ AudioResponseEvent?: never;
616
+ HeartbeatEvent?: never;
617
+ AccessDeniedException?: never;
618
+ ResourceNotFoundException?: never;
619
+ ValidationException?: never;
620
+ ThrottlingException: ThrottlingException;
621
+ InternalServerException?: never;
622
+ ConflictException?: never;
623
+ DependencyFailedException?: never;
624
+ BadGatewayException?: never;
625
+ $unknown?: never;
626
+ }
627
+ interface InternalServerExceptionMember {
628
+ PlaybackInterruptionEvent?: never;
629
+ TranscriptEvent?: never;
630
+ IntentResultEvent?: never;
631
+ TextResponseEvent?: never;
632
+ AudioResponseEvent?: never;
633
+ HeartbeatEvent?: never;
634
+ AccessDeniedException?: never;
635
+ ResourceNotFoundException?: never;
636
+ ValidationException?: never;
637
+ ThrottlingException?: never;
638
+ InternalServerException: InternalServerException;
639
+ ConflictException?: never;
640
+ DependencyFailedException?: never;
641
+ BadGatewayException?: never;
642
+ $unknown?: never;
643
+ }
644
+ interface ConflictExceptionMember {
645
+ PlaybackInterruptionEvent?: never;
646
+ TranscriptEvent?: never;
647
+ IntentResultEvent?: never;
648
+ TextResponseEvent?: never;
649
+ AudioResponseEvent?: never;
650
+ HeartbeatEvent?: never;
651
+ AccessDeniedException?: never;
652
+ ResourceNotFoundException?: never;
653
+ ValidationException?: never;
654
+ ThrottlingException?: never;
655
+ InternalServerException?: never;
656
+ ConflictException: ConflictException;
657
+ DependencyFailedException?: never;
658
+ BadGatewayException?: never;
659
+ $unknown?: never;
660
+ }
661
+ interface DependencyFailedExceptionMember {
662
+ PlaybackInterruptionEvent?: never;
663
+ TranscriptEvent?: never;
664
+ IntentResultEvent?: never;
665
+ TextResponseEvent?: never;
666
+ AudioResponseEvent?: never;
667
+ HeartbeatEvent?: never;
668
+ AccessDeniedException?: never;
669
+ ResourceNotFoundException?: never;
670
+ ValidationException?: never;
671
+ ThrottlingException?: never;
672
+ InternalServerException?: never;
673
+ ConflictException?: never;
674
+ DependencyFailedException: DependencyFailedException;
675
+ BadGatewayException?: never;
676
+ $unknown?: never;
677
+ }
678
+ interface BadGatewayExceptionMember {
679
+ PlaybackInterruptionEvent?: never;
680
+ TranscriptEvent?: never;
681
+ IntentResultEvent?: never;
682
+ TextResponseEvent?: never;
683
+ AudioResponseEvent?: never;
684
+ HeartbeatEvent?: never;
685
+ AccessDeniedException?: never;
686
+ ResourceNotFoundException?: never;
687
+ ValidationException?: never;
688
+ ThrottlingException?: never;
689
+ InternalServerException?: never;
690
+ ConflictException?: never;
691
+ DependencyFailedException?: never;
692
+ BadGatewayException: BadGatewayException;
693
+ $unknown?: never;
694
+ }
695
+ interface $UnknownMember {
696
+ PlaybackInterruptionEvent?: never;
697
+ TranscriptEvent?: never;
698
+ IntentResultEvent?: never;
699
+ TextResponseEvent?: never;
700
+ AudioResponseEvent?: never;
701
+ HeartbeatEvent?: never;
702
+ AccessDeniedException?: never;
703
+ ResourceNotFoundException?: never;
704
+ ValidationException?: never;
705
+ ThrottlingException?: never;
706
+ InternalServerException?: never;
707
+ ConflictException?: never;
708
+ DependencyFailedException?: never;
709
+ BadGatewayException?: never;
710
+ $unknown: [string, any];
711
+ }
712
+ interface Visitor<T> {
713
+ PlaybackInterruptionEvent: (value: PlaybackInterruptionEvent) => T;
714
+ TranscriptEvent: (value: TranscriptEvent) => T;
715
+ IntentResultEvent: (value: IntentResultEvent) => T;
716
+ TextResponseEvent: (value: TextResponseEvent) => T;
717
+ AudioResponseEvent: (value: AudioResponseEvent) => T;
718
+ HeartbeatEvent: (value: HeartbeatEvent) => T;
719
+ AccessDeniedException: (value: AccessDeniedException) => T;
720
+ ResourceNotFoundException: (value: ResourceNotFoundException) => T;
721
+ ValidationException: (value: ValidationException) => T;
722
+ ThrottlingException: (value: ThrottlingException) => T;
723
+ InternalServerException: (value: InternalServerException) => T;
724
+ ConflictException: (value: ConflictException) => T;
725
+ DependencyFailedException: (value: DependencyFailedException) => T;
726
+ BadGatewayException: (value: BadGatewayException) => T;
727
+ _: (name: string, value: any) => T;
728
+ }
729
+ const visit: <T>(
730
+ value: StartConversationResponseEventStream,
731
+ visitor: Visitor<T>
732
+ ) => T;
733
+ }
734
+ export interface StartConversationResponse {
735
+ responseEventStream?: AsyncIterable<StartConversationResponseEventStream>;
736
+ }
737
+ export declare const ActiveContextTimeToLiveFilterSensitiveLog: (
738
+ obj: ActiveContextTimeToLive
739
+ ) => any;
740
+ export declare const ActiveContextFilterSensitiveLog: (
741
+ obj: ActiveContext
742
+ ) => any;
743
+ export declare const AudioInputEventFilterSensitiveLog: (
744
+ obj: AudioInputEvent
745
+ ) => any;
746
+ export declare const AudioResponseEventFilterSensitiveLog: (
747
+ obj: AudioResponseEvent
748
+ ) => any;
749
+ export declare const DeleteSessionRequestFilterSensitiveLog: (
750
+ obj: DeleteSessionRequest
751
+ ) => any;
752
+ export declare const DeleteSessionResponseFilterSensitiveLog: (
753
+ obj: DeleteSessionResponse
754
+ ) => any;
755
+ export declare const GetSessionRequestFilterSensitiveLog: (
756
+ obj: GetSessionRequest
757
+ ) => any;
758
+ export declare const ValueFilterSensitiveLog: (obj: Value) => any;
759
+ export declare const ConfidenceScoreFilterSensitiveLog: (
760
+ obj: ConfidenceScore
761
+ ) => any;
762
+ export declare const SentimentScoreFilterSensitiveLog: (
763
+ obj: SentimentScore
764
+ ) => any;
765
+ export declare const SentimentResponseFilterSensitiveLog: (
766
+ obj: SentimentResponse
767
+ ) => any;
768
+ export declare const ButtonFilterSensitiveLog: (obj: Button) => any;
769
+ export declare const ImageResponseCardFilterSensitiveLog: (
770
+ obj: ImageResponseCard
771
+ ) => any;
772
+ export declare const MessageFilterSensitiveLog: (obj: Message) => any;
773
+ export declare const RuntimeHintValueFilterSensitiveLog: (
774
+ obj: RuntimeHintValue
775
+ ) => any;
776
+ export declare const PutSessionResponseFilterSensitiveLog: (
777
+ obj: PutSessionResponse
778
+ ) => any;
779
+ export declare const RecognizeUtteranceRequestFilterSensitiveLog: (
780
+ obj: RecognizeUtteranceRequest
781
+ ) => any;
782
+ export declare const RecognizeUtteranceResponseFilterSensitiveLog: (
783
+ obj: RecognizeUtteranceResponse
784
+ ) => any;
785
+ export declare const DisconnectionEventFilterSensitiveLog: (
786
+ obj: DisconnectionEvent
787
+ ) => any;
788
+ export declare const DTMFInputEventFilterSensitiveLog: (
789
+ obj: DTMFInputEvent
790
+ ) => any;
791
+ export declare const PlaybackCompletionEventFilterSensitiveLog: (
792
+ obj: PlaybackCompletionEvent
793
+ ) => any;
794
+ export declare const TextInputEventFilterSensitiveLog: (
795
+ obj: TextInputEvent
796
+ ) => any;
797
+ export declare const HeartbeatEventFilterSensitiveLog: (
798
+ obj: HeartbeatEvent
799
+ ) => any;
800
+ export declare const PlaybackInterruptionEventFilterSensitiveLog: (
801
+ obj: PlaybackInterruptionEvent
802
+ ) => any;
803
+ export declare const TextResponseEventFilterSensitiveLog: (
804
+ obj: TextResponseEvent
805
+ ) => any;
806
+ export declare const TranscriptEventFilterSensitiveLog: (
807
+ obj: TranscriptEvent
808
+ ) => any;
809
+ export declare const ElicitSubSlotFilterSensitiveLog: (
810
+ obj: ElicitSubSlot
811
+ ) => any;
812
+ export declare const DialogActionFilterSensitiveLog: (obj: DialogAction) => any;
813
+ export declare const RuntimeHintDetailsFilterSensitiveLog: (
814
+ obj: RuntimeHintDetails
815
+ ) => any;
816
+ export declare const RuntimeHintsFilterSensitiveLog: (obj: RuntimeHints) => any;
817
+ export declare const SlotFilterSensitiveLog: (obj: Slot) => any;
818
+ export declare const IntentFilterSensitiveLog: (obj: Intent) => any;
819
+ export declare const InterpretationFilterSensitiveLog: (
820
+ obj: Interpretation
821
+ ) => any;
822
+ export declare const SessionStateFilterSensitiveLog: (obj: SessionState) => any;
823
+ export declare const ConfigurationEventFilterSensitiveLog: (
824
+ obj: ConfigurationEvent
825
+ ) => any;
826
+ export declare const PutSessionRequestFilterSensitiveLog: (
827
+ obj: PutSessionRequest
828
+ ) => any;
829
+ export declare const RecognizeTextRequestFilterSensitiveLog: (
830
+ obj: RecognizeTextRequest
831
+ ) => any;
832
+ export declare const StartConversationRequestEventStreamFilterSensitiveLog: (
833
+ obj: StartConversationRequestEventStream
834
+ ) => any;
835
+ export declare const StartConversationRequestFilterSensitiveLog: (
836
+ obj: StartConversationRequest
837
+ ) => any;
838
+ export declare const GetSessionResponseFilterSensitiveLog: (
839
+ obj: GetSessionResponse
840
+ ) => any;
841
+ export declare const IntentResultEventFilterSensitiveLog: (
842
+ obj: IntentResultEvent
843
+ ) => any;
844
+ export declare const RecognizeTextResponseFilterSensitiveLog: (
845
+ obj: RecognizeTextResponse
846
+ ) => any;
847
+ export declare const StartConversationResponseEventStreamFilterSensitiveLog: (
848
+ obj: StartConversationResponseEventStream
849
+ ) => any;
850
+ export declare const StartConversationResponseFilterSensitiveLog: (
851
+ obj: StartConversationResponse
852
+ ) => any;