@aws-sdk/client-lex-runtime-v2 3.186.0 → 3.186.2

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,106 +1,223 @@
1
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
- import {
3
- DeleteSessionCommandInput,
4
- DeleteSessionCommandOutput,
5
- } from "./commands/DeleteSessionCommand";
6
- import {
7
- GetSessionCommandInput,
8
- GetSessionCommandOutput,
9
- } from "./commands/GetSessionCommand";
10
- import {
11
- PutSessionCommandInput,
12
- PutSessionCommandOutput,
13
- } from "./commands/PutSessionCommand";
14
- import {
15
- RecognizeTextCommandInput,
16
- RecognizeTextCommandOutput,
17
- } from "./commands/RecognizeTextCommand";
18
- import {
19
- RecognizeUtteranceCommandInput,
20
- RecognizeUtteranceCommandOutput,
21
- } from "./commands/RecognizeUtteranceCommand";
22
- import {
23
- StartConversationCommandInput,
24
- StartConversationCommandOutput,
25
- } from "./commands/StartConversationCommand";
26
- import { LexRuntimeV2Client } from "./LexRuntimeV2Client";
27
- export declare class LexRuntimeV2 extends LexRuntimeV2Client {
28
- deleteSession(
29
- args: DeleteSessionCommandInput,
30
- options?: __HttpHandlerOptions
31
- ): Promise<DeleteSessionCommandOutput>;
32
- deleteSession(
33
- args: DeleteSessionCommandInput,
34
- cb: (err: any, data?: DeleteSessionCommandOutput) => void
35
- ): void;
36
- deleteSession(
37
- args: DeleteSessionCommandInput,
38
- options: __HttpHandlerOptions,
39
- cb: (err: any, data?: DeleteSessionCommandOutput) => void
40
- ): void;
41
- getSession(
42
- args: GetSessionCommandInput,
43
- options?: __HttpHandlerOptions
44
- ): Promise<GetSessionCommandOutput>;
45
- getSession(
46
- args: GetSessionCommandInput,
47
- cb: (err: any, data?: GetSessionCommandOutput) => void
48
- ): void;
49
- getSession(
50
- args: GetSessionCommandInput,
51
- options: __HttpHandlerOptions,
52
- cb: (err: any, data?: GetSessionCommandOutput) => void
53
- ): void;
54
- putSession(
55
- args: PutSessionCommandInput,
56
- options?: __HttpHandlerOptions
57
- ): Promise<PutSessionCommandOutput>;
58
- putSession(
59
- args: PutSessionCommandInput,
60
- cb: (err: any, data?: PutSessionCommandOutput) => void
61
- ): void;
62
- putSession(
63
- args: PutSessionCommandInput,
64
- options: __HttpHandlerOptions,
65
- cb: (err: any, data?: PutSessionCommandOutput) => void
66
- ): void;
67
- recognizeText(
68
- args: RecognizeTextCommandInput,
69
- options?: __HttpHandlerOptions
70
- ): Promise<RecognizeTextCommandOutput>;
71
- recognizeText(
72
- args: RecognizeTextCommandInput,
73
- cb: (err: any, data?: RecognizeTextCommandOutput) => void
74
- ): void;
75
- recognizeText(
76
- args: RecognizeTextCommandInput,
77
- options: __HttpHandlerOptions,
78
- cb: (err: any, data?: RecognizeTextCommandOutput) => void
79
- ): void;
80
- recognizeUtterance(
81
- args: RecognizeUtteranceCommandInput,
82
- options?: __HttpHandlerOptions
83
- ): Promise<RecognizeUtteranceCommandOutput>;
84
- recognizeUtterance(
85
- args: RecognizeUtteranceCommandInput,
86
- cb: (err: any, data?: RecognizeUtteranceCommandOutput) => void
87
- ): void;
88
- recognizeUtterance(
89
- args: RecognizeUtteranceCommandInput,
90
- options: __HttpHandlerOptions,
91
- cb: (err: any, data?: RecognizeUtteranceCommandOutput) => void
92
- ): void;
93
- startConversation(
94
- args: StartConversationCommandInput,
95
- options?: __HttpHandlerOptions
96
- ): Promise<StartConversationCommandOutput>;
97
- startConversation(
98
- args: StartConversationCommandInput,
99
- cb: (err: any, data?: StartConversationCommandOutput) => void
100
- ): void;
101
- startConversation(
102
- args: StartConversationCommandInput,
103
- options: __HttpHandlerOptions,
104
- cb: (err: any, data?: StartConversationCommandOutput) => void
105
- ): void;
106
- }
1
+ import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
+ import { DeleteSessionCommandInput, DeleteSessionCommandOutput } from "./commands/DeleteSessionCommand";
3
+ import { GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand";
4
+ import { PutSessionCommandInput, PutSessionCommandOutput } from "./commands/PutSessionCommand";
5
+ import { RecognizeTextCommandInput, RecognizeTextCommandOutput } from "./commands/RecognizeTextCommand";
6
+ import { RecognizeUtteranceCommandInput, RecognizeUtteranceCommandOutput } from "./commands/RecognizeUtteranceCommand";
7
+ import { StartConversationCommandInput, StartConversationCommandOutput } from "./commands/StartConversationCommand";
8
+ import { LexRuntimeV2Client } from "./LexRuntimeV2Client";
9
+ /**
10
+ * <p></p>
11
+ */
12
+ export declare class LexRuntimeV2 extends LexRuntimeV2Client {
13
+ /**
14
+ * <p>Removes session information for a specified bot, alias, and user ID. </p>
15
+ * <p>You can use this operation to restart a conversation with a bot.
16
+ * When you remove a session, the entire history of the session is removed
17
+ * so that you can start again.</p>
18
+ * <p>You don't need to delete a session. Sessions have a time limit and
19
+ * will expire. Set the session time limit when you create the bot. The
20
+ * default is 5 minutes, but you can specify anything between 1 minute and
21
+ * 24 hours.</p>
22
+ * <p>If you specify a bot or alias ID that doesn't exist, you receive a
23
+ * <code>BadRequestException.</code>
24
+ * </p>
25
+ * <p>If the locale doesn't exist in the bot, or if the locale hasn't been
26
+ * enables for the alias, you receive a
27
+ * <code>BadRequestException</code>.</p>
28
+ */
29
+ deleteSession(args: DeleteSessionCommandInput, options?: __HttpHandlerOptions): Promise<DeleteSessionCommandOutput>;
30
+ deleteSession(args: DeleteSessionCommandInput, cb: (err: any, data?: DeleteSessionCommandOutput) => void): void;
31
+ deleteSession(args: DeleteSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteSessionCommandOutput) => void): void;
32
+ /**
33
+ * <p>Returns session information for a specified bot, alias, and
34
+ * user.</p>
35
+ * <p>For example, you can use this operation to retrieve session
36
+ * information for a user that has left a long-running session in
37
+ * use.</p>
38
+ * <p>If the bot, alias, or session identifier doesn't exist, Amazon Lex V2
39
+ * returns a <code>BadRequestException</code>. If the locale doesn't exist
40
+ * or is not enabled for the alias, you receive a
41
+ * <code>BadRequestException</code>.</p>
42
+ */
43
+ getSession(args: GetSessionCommandInput, options?: __HttpHandlerOptions): Promise<GetSessionCommandOutput>;
44
+ getSession(args: GetSessionCommandInput, cb: (err: any, data?: GetSessionCommandOutput) => void): void;
45
+ getSession(args: GetSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSessionCommandOutput) => void): void;
46
+ /**
47
+ * <p>Creates a new session or modifies an existing session with an Amazon Lex V2
48
+ * bot. Use this operation to enable your application to set the state of
49
+ * the bot.</p>
50
+ */
51
+ putSession(args: PutSessionCommandInput, options?: __HttpHandlerOptions): Promise<PutSessionCommandOutput>;
52
+ putSession(args: PutSessionCommandInput, cb: (err: any, data?: PutSessionCommandOutput) => void): void;
53
+ putSession(args: PutSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutSessionCommandOutput) => void): void;
54
+ /**
55
+ * <p>Sends user input to Amazon Lex V2. Client applications use this API to send
56
+ * requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input
57
+ * using the machine learning model that it build for the bot.</p>
58
+ * <p>In response, Amazon Lex V2 returns the next message to convey to the user
59
+ * and an optional response card to display.</p>
60
+ * <p>If the optional post-fulfillment response is specified, the messages
61
+ * are returned as follows. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_PostFulfillmentStatusSpecification.html">PostFulfillmentStatusSpecification</a>.</p>
62
+ * <ul>
63
+ * <li>
64
+ * <p>
65
+ * <b>Success message</b> - Returned if
66
+ * the Lambda function completes successfully and the intent state is
67
+ * fulfilled or ready fulfillment if the message is present.</p>
68
+ * </li>
69
+ * <li>
70
+ * <p>
71
+ * <b>Failed message</b> - The failed
72
+ * message is returned if the Lambda function throws an exception or
73
+ * if the Lambda function returns a failed intent state without a
74
+ * message.</p>
75
+ * </li>
76
+ * <li>
77
+ * <p>
78
+ * <b>Timeout message</b> - If you
79
+ * don't configure a timeout message and a timeout, and the Lambda
80
+ * function doesn't return within 30 seconds, the timeout message is
81
+ * returned. If you configure a timeout, the timeout message is
82
+ * returned when the period times out. </p>
83
+ * </li>
84
+ * </ul>
85
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-complete.html">Completion message</a>.</p>
86
+ */
87
+ recognizeText(args: RecognizeTextCommandInput, options?: __HttpHandlerOptions): Promise<RecognizeTextCommandOutput>;
88
+ recognizeText(args: RecognizeTextCommandInput, cb: (err: any, data?: RecognizeTextCommandOutput) => void): void;
89
+ recognizeText(args: RecognizeTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RecognizeTextCommandOutput) => void): void;
90
+ /**
91
+ * <p>Sends user input to Amazon Lex V2. You can send text or speech. Clients use
92
+ * this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2
93
+ * interprets the user input using the machine learning model built for
94
+ * the bot.</p>
95
+ * <p>The following request fields must be compressed with gzip and then
96
+ * base64 encoded before you send them to Amazon Lex V2. </p>
97
+ * <ul>
98
+ * <li>
99
+ * <p>requestAttributes</p>
100
+ * </li>
101
+ * <li>
102
+ * <p>sessionState</p>
103
+ * </li>
104
+ * </ul>
105
+ * <p>The following response fields are compressed using gzip and then
106
+ * base64 encoded by Amazon Lex V2. Before you can use these fields, you must
107
+ * decode and decompress them. </p>
108
+ * <ul>
109
+ * <li>
110
+ * <p>inputTranscript</p>
111
+ * </li>
112
+ * <li>
113
+ * <p>interpretations</p>
114
+ * </li>
115
+ * <li>
116
+ * <p>messages</p>
117
+ * </li>
118
+ * <li>
119
+ * <p>requestAttributes</p>
120
+ * </li>
121
+ * <li>
122
+ * <p>sessionState</p>
123
+ * </li>
124
+ * </ul>
125
+ * <p>The example contains a Java application that compresses and encodes
126
+ * a Java object to send to Amazon Lex V2, and a second that decodes and
127
+ * decompresses a response from Amazon Lex V2.</p>
128
+ * <p>If the optional post-fulfillment response is specified, the messages
129
+ * are returned as follows. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_PostFulfillmentStatusSpecification.html">PostFulfillmentStatusSpecification</a>.</p>
130
+ * <ul>
131
+ * <li>
132
+ * <p>
133
+ * <b>Success message</b> - Returned if
134
+ * the Lambda function completes successfully and the intent state is
135
+ * fulfilled or ready fulfillment if the message is present.</p>
136
+ * </li>
137
+ * <li>
138
+ * <p>
139
+ * <b>Failed message</b> - The failed
140
+ * message is returned if the Lambda function throws an exception or
141
+ * if the Lambda function returns a failed intent state without a
142
+ * message.</p>
143
+ * </li>
144
+ * <li>
145
+ * <p>
146
+ * <b>Timeout message</b> - If you
147
+ * don't configure a timeout message and a timeout, and the Lambda
148
+ * function doesn't return within 30 seconds, the timeout message is
149
+ * returned. If you configure a timeout, the timeout message is
150
+ * returned when the period times out. </p>
151
+ * </li>
152
+ * </ul>
153
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-complete.html">Completion message</a>.</p>
154
+ */
155
+ recognizeUtterance(args: RecognizeUtteranceCommandInput, options?: __HttpHandlerOptions): Promise<RecognizeUtteranceCommandOutput>;
156
+ recognizeUtterance(args: RecognizeUtteranceCommandInput, cb: (err: any, data?: RecognizeUtteranceCommandOutput) => void): void;
157
+ recognizeUtterance(args: RecognizeUtteranceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: RecognizeUtteranceCommandOutput) => void): void;
158
+ /**
159
+ * <p>Starts an HTTP/2 bidirectional event stream that enables you to send
160
+ * audio, text, or DTMF input in real time. After your application starts
161
+ * a conversation, users send input to Amazon Lex V2 as a stream of events. Amazon Lex V2
162
+ * processes the incoming events and responds with streaming text or audio
163
+ * events.
164
+ * </p>
165
+ * <p>Audio input must be in the following format: <code>audio/lpcm
166
+ * sample-rate=8000 sample-size-bits=16 channel-count=1;
167
+ * is-big-endian=false</code>.</p>
168
+ * <p>If the optional post-fulfillment response is specified, the messages
169
+ * are returned as follows. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_PostFulfillmentStatusSpecification.html">PostFulfillmentStatusSpecification</a>.</p>
170
+ * <ul>
171
+ * <li>
172
+ * <p>
173
+ * <b>Success message</b> - Returned if
174
+ * the Lambda function completes successfully and the intent state is
175
+ * fulfilled or ready fulfillment if the message is present.</p>
176
+ * </li>
177
+ * <li>
178
+ * <p>
179
+ * <b>Failed message</b> - The failed
180
+ * message is returned if the Lambda function throws an exception or
181
+ * if the Lambda function returns a failed intent state without a
182
+ * message.</p>
183
+ * </li>
184
+ * <li>
185
+ * <p>
186
+ * <b>Timeout message</b> - If you
187
+ * don't configure a timeout message and a timeout, and the Lambda
188
+ * function doesn't return within 30 seconds, the timeout message is
189
+ * returned. If you configure a timeout, the timeout message is
190
+ * returned when the period times out. </p>
191
+ * </li>
192
+ * </ul>
193
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-complete.html">Completion message</a>.</p>
194
+ * <p>If the optional update message is configured, it is played at the
195
+ * specified frequency while the Lambda function is running and the update
196
+ * message state is active. If the fulfillment update message is not
197
+ * active, the Lambda function runs with a 30 second timeout. </p>
198
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-update.html">Update message </a>
199
+ * </p>
200
+ * <p>The <code>StartConversation</code> operation is supported only in
201
+ * the following SDKs: </p>
202
+ * <ul>
203
+ * <li>
204
+ * <p>
205
+ * <a href="https://docs.aws.amazon.com/goto/SdkForCpp/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for C++</a>
206
+ * </p>
207
+ * </li>
208
+ * <li>
209
+ * <p>
210
+ * <a href="https://docs.aws.amazon.com/goto/SdkForJavaV2/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for Java V2</a>
211
+ * </p>
212
+ * </li>
213
+ * <li>
214
+ * <p>
215
+ * <a href="https://docs.aws.amazon.com/goto/SdkForRubyV3/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for Ruby V3</a>
216
+ * </p>
217
+ * </li>
218
+ * </ul>
219
+ */
220
+ startConversation(args: StartConversationCommandInput, options?: __HttpHandlerOptions): Promise<StartConversationCommandOutput>;
221
+ startConversation(args: StartConversationCommandInput, cb: (err: any, data?: StartConversationCommandOutput) => void): void;
222
+ startConversation(args: StartConversationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartConversationCommandOutput) => void): void;
223
+ }