@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,35 +1,65 @@
1
- import { Command as $Command } from "@aws-sdk/smithy-client";
2
- import {
3
- Handler,
4
- HttpHandlerOptions as __HttpHandlerOptions,
5
- MetadataBearer as __MetadataBearer,
6
- MiddlewareStack,
7
- } from "@aws-sdk/types";
8
- import {
9
- LexRuntimeV2ClientResolvedConfig,
10
- ServiceInputTypes,
11
- ServiceOutputTypes,
12
- } from "../LexRuntimeV2Client";
13
- import {
14
- RecognizeTextRequest,
15
- RecognizeTextResponse,
16
- } from "../models/models_0";
17
- export interface RecognizeTextCommandInput extends RecognizeTextRequest {}
18
- export interface RecognizeTextCommandOutput
19
- extends RecognizeTextResponse,
20
- __MetadataBearer {}
21
- export declare class RecognizeTextCommand extends $Command<
22
- RecognizeTextCommandInput,
23
- RecognizeTextCommandOutput,
24
- LexRuntimeV2ClientResolvedConfig
25
- > {
26
- readonly input: RecognizeTextCommandInput;
27
- constructor(input: RecognizeTextCommandInput);
28
- resolveMiddleware(
29
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
30
- configuration: LexRuntimeV2ClientResolvedConfig,
31
- options?: __HttpHandlerOptions
32
- ): Handler<RecognizeTextCommandInput, RecognizeTextCommandOutput>;
33
- private serialize;
34
- private deserialize;
35
- }
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { LexRuntimeV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexRuntimeV2Client";
4
+ import { RecognizeTextRequest, RecognizeTextResponse } from "../models/models_0";
5
+ export interface RecognizeTextCommandInput extends RecognizeTextRequest {
6
+ }
7
+ export interface RecognizeTextCommandOutput extends RecognizeTextResponse, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Sends user input to Amazon Lex V2. Client applications use this API to send
11
+ * requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input
12
+ * using the machine learning model that it build for the bot.</p>
13
+ * <p>In response, Amazon Lex V2 returns the next message to convey to the user
14
+ * and an optional response card to display.</p>
15
+ * <p>If the optional post-fulfillment response is specified, the messages
16
+ * are returned as follows. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_PostFulfillmentStatusSpecification.html">PostFulfillmentStatusSpecification</a>.</p>
17
+ * <ul>
18
+ * <li>
19
+ * <p>
20
+ * <b>Success message</b> - Returned if
21
+ * the Lambda function completes successfully and the intent state is
22
+ * fulfilled or ready fulfillment if the message is present.</p>
23
+ * </li>
24
+ * <li>
25
+ * <p>
26
+ * <b>Failed message</b> - The failed
27
+ * message is returned if the Lambda function throws an exception or
28
+ * if the Lambda function returns a failed intent state without a
29
+ * message.</p>
30
+ * </li>
31
+ * <li>
32
+ * <p>
33
+ * <b>Timeout message</b> - If you
34
+ * don't configure a timeout message and a timeout, and the Lambda
35
+ * function doesn't return within 30 seconds, the timeout message is
36
+ * returned. If you configure a timeout, the timeout message is
37
+ * returned when the period times out. </p>
38
+ * </li>
39
+ * </ul>
40
+ * <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>
41
+ * @example
42
+ * Use a bare-bones client and the command you need to make an API call.
43
+ * ```javascript
44
+ * import { LexRuntimeV2Client, RecognizeTextCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
45
+ * // const { LexRuntimeV2Client, RecognizeTextCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
46
+ * const client = new LexRuntimeV2Client(config);
47
+ * const command = new RecognizeTextCommand(input);
48
+ * const response = await client.send(command);
49
+ * ```
50
+ *
51
+ * @see {@link RecognizeTextCommandInput} for command's `input` shape.
52
+ * @see {@link RecognizeTextCommandOutput} for command's `response` shape.
53
+ * @see {@link LexRuntimeV2ClientResolvedConfig | config} for LexRuntimeV2Client's `config` shape.
54
+ *
55
+ */
56
+ export declare class RecognizeTextCommand extends $Command<RecognizeTextCommandInput, RecognizeTextCommandOutput, LexRuntimeV2ClientResolvedConfig> {
57
+ readonly input: RecognizeTextCommandInput;
58
+ constructor(input: RecognizeTextCommandInput);
59
+ /**
60
+ * @internal
61
+ */
62
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: LexRuntimeV2ClientResolvedConfig, options?: __HttpHandlerOptions): Handler<RecognizeTextCommandInput, RecognizeTextCommandOutput>;
63
+ private serialize;
64
+ private deserialize;
65
+ }
@@ -1,47 +1,108 @@
1
- import { Command as $Command } from "@aws-sdk/smithy-client";
2
- import {
3
- Handler,
4
- HttpHandlerOptions as __HttpHandlerOptions,
5
- MetadataBearer as __MetadataBearer,
6
- MiddlewareStack,
7
- } from "@aws-sdk/types";
8
- import {
9
- LexRuntimeV2ClientResolvedConfig,
10
- ServiceInputTypes,
11
- ServiceOutputTypes,
12
- } from "../LexRuntimeV2Client";
13
- import {
14
- RecognizeUtteranceRequest,
15
- RecognizeUtteranceResponse,
16
- } from "../models/models_0";
17
- declare type RecognizeUtteranceCommandInputType = Pick<
18
- RecognizeUtteranceRequest,
19
- Exclude<keyof RecognizeUtteranceRequest, "inputStream">
20
- > & {
21
- inputStream?:
22
- | RecognizeUtteranceRequest["inputStream"]
23
- | string
24
- | Uint8Array
25
- | Buffer;
26
- };
27
- export interface RecognizeUtteranceCommandInput
28
- extends RecognizeUtteranceCommandInputType {}
29
- export interface RecognizeUtteranceCommandOutput
30
- extends RecognizeUtteranceResponse,
31
- __MetadataBearer {}
32
- export declare class RecognizeUtteranceCommand extends $Command<
33
- RecognizeUtteranceCommandInput,
34
- RecognizeUtteranceCommandOutput,
35
- LexRuntimeV2ClientResolvedConfig
36
- > {
37
- readonly input: RecognizeUtteranceCommandInput;
38
- constructor(input: RecognizeUtteranceCommandInput);
39
- resolveMiddleware(
40
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
41
- configuration: LexRuntimeV2ClientResolvedConfig,
42
- options?: __HttpHandlerOptions
43
- ): Handler<RecognizeUtteranceCommandInput, RecognizeUtteranceCommandOutput>;
44
- private serialize;
45
- private deserialize;
46
- }
47
- export {};
1
+ /// <reference types="node" />
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { LexRuntimeV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexRuntimeV2Client";
5
+ import { RecognizeUtteranceRequest, RecognizeUtteranceResponse } from "../models/models_0";
6
+ declare type RecognizeUtteranceCommandInputType = Pick<RecognizeUtteranceRequest, Exclude<keyof RecognizeUtteranceRequest, "inputStream">> & {
7
+ /**
8
+ * For *`RecognizeUtteranceRequest["inputStream"]`*, see {@link RecognizeUtteranceRequest.inputStream}.
9
+ */
10
+ inputStream?: RecognizeUtteranceRequest["inputStream"] | string | Uint8Array | Buffer;
11
+ };
12
+ /**
13
+ * This interface extends from `RecognizeUtteranceRequest` interface. There are more parameters than `inputStream` defined in {@link RecognizeUtteranceRequest}
14
+ */
15
+ export interface RecognizeUtteranceCommandInput extends RecognizeUtteranceCommandInputType {
16
+ }
17
+ export interface RecognizeUtteranceCommandOutput extends RecognizeUtteranceResponse, __MetadataBearer {
18
+ }
19
+ /**
20
+ * <p>Sends user input to Amazon Lex V2. You can send text or speech. Clients use
21
+ * this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2
22
+ * interprets the user input using the machine learning model built for
23
+ * the bot.</p>
24
+ * <p>The following request fields must be compressed with gzip and then
25
+ * base64 encoded before you send them to Amazon Lex V2. </p>
26
+ * <ul>
27
+ * <li>
28
+ * <p>requestAttributes</p>
29
+ * </li>
30
+ * <li>
31
+ * <p>sessionState</p>
32
+ * </li>
33
+ * </ul>
34
+ * <p>The following response fields are compressed using gzip and then
35
+ * base64 encoded by Amazon Lex V2. Before you can use these fields, you must
36
+ * decode and decompress them. </p>
37
+ * <ul>
38
+ * <li>
39
+ * <p>inputTranscript</p>
40
+ * </li>
41
+ * <li>
42
+ * <p>interpretations</p>
43
+ * </li>
44
+ * <li>
45
+ * <p>messages</p>
46
+ * </li>
47
+ * <li>
48
+ * <p>requestAttributes</p>
49
+ * </li>
50
+ * <li>
51
+ * <p>sessionState</p>
52
+ * </li>
53
+ * </ul>
54
+ * <p>The example contains a Java application that compresses and encodes
55
+ * a Java object to send to Amazon Lex V2, and a second that decodes and
56
+ * decompresses a response from Amazon Lex V2.</p>
57
+ * <p>If the optional post-fulfillment response is specified, the messages
58
+ * are returned as follows. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_PostFulfillmentStatusSpecification.html">PostFulfillmentStatusSpecification</a>.</p>
59
+ * <ul>
60
+ * <li>
61
+ * <p>
62
+ * <b>Success message</b> - Returned if
63
+ * the Lambda function completes successfully and the intent state is
64
+ * fulfilled or ready fulfillment if the message is present.</p>
65
+ * </li>
66
+ * <li>
67
+ * <p>
68
+ * <b>Failed message</b> - The failed
69
+ * message is returned if the Lambda function throws an exception or
70
+ * if the Lambda function returns a failed intent state without a
71
+ * message.</p>
72
+ * </li>
73
+ * <li>
74
+ * <p>
75
+ * <b>Timeout message</b> - If you
76
+ * don't configure a timeout message and a timeout, and the Lambda
77
+ * function doesn't return within 30 seconds, the timeout message is
78
+ * returned. If you configure a timeout, the timeout message is
79
+ * returned when the period times out. </p>
80
+ * </li>
81
+ * </ul>
82
+ * <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>
83
+ * @example
84
+ * Use a bare-bones client and the command you need to make an API call.
85
+ * ```javascript
86
+ * import { LexRuntimeV2Client, RecognizeUtteranceCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
87
+ * // const { LexRuntimeV2Client, RecognizeUtteranceCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
88
+ * const client = new LexRuntimeV2Client(config);
89
+ * const command = new RecognizeUtteranceCommand(input);
90
+ * const response = await client.send(command);
91
+ * ```
92
+ *
93
+ * @see {@link RecognizeUtteranceCommandInput} for command's `input` shape.
94
+ * @see {@link RecognizeUtteranceCommandOutput} for command's `response` shape.
95
+ * @see {@link LexRuntimeV2ClientResolvedConfig | config} for LexRuntimeV2Client's `config` shape.
96
+ *
97
+ */
98
+ export declare class RecognizeUtteranceCommand extends $Command<RecognizeUtteranceCommandInput, RecognizeUtteranceCommandOutput, LexRuntimeV2ClientResolvedConfig> {
99
+ readonly input: RecognizeUtteranceCommandInput;
100
+ constructor(input: RecognizeUtteranceCommandInput);
101
+ /**
102
+ * @internal
103
+ */
104
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: LexRuntimeV2ClientResolvedConfig, options?: __HttpHandlerOptions): Handler<RecognizeUtteranceCommandInput, RecognizeUtteranceCommandOutput>;
105
+ private serialize;
106
+ private deserialize;
107
+ }
108
+ export {};
@@ -1,36 +1,94 @@
1
- import { Command as $Command } from "@aws-sdk/smithy-client";
2
- import {
3
- Handler,
4
- HttpHandlerOptions as __HttpHandlerOptions,
5
- MetadataBearer as __MetadataBearer,
6
- MiddlewareStack,
7
- } from "@aws-sdk/types";
8
- import {
9
- LexRuntimeV2ClientResolvedConfig,
10
- ServiceInputTypes,
11
- ServiceOutputTypes,
12
- } from "../LexRuntimeV2Client";
13
- import {
14
- StartConversationRequest,
15
- StartConversationResponse,
16
- } from "../models/models_0";
17
- export interface StartConversationCommandInput
18
- extends StartConversationRequest {}
19
- export interface StartConversationCommandOutput
20
- extends StartConversationResponse,
21
- __MetadataBearer {}
22
- export declare class StartConversationCommand extends $Command<
23
- StartConversationCommandInput,
24
- StartConversationCommandOutput,
25
- LexRuntimeV2ClientResolvedConfig
26
- > {
27
- readonly input: StartConversationCommandInput;
28
- constructor(input: StartConversationCommandInput);
29
- resolveMiddleware(
30
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
31
- configuration: LexRuntimeV2ClientResolvedConfig,
32
- options?: __HttpHandlerOptions
33
- ): Handler<StartConversationCommandInput, StartConversationCommandOutput>;
34
- private serialize;
35
- private deserialize;
36
- }
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { LexRuntimeV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexRuntimeV2Client";
4
+ import { StartConversationRequest, StartConversationResponse } from "../models/models_0";
5
+ export interface StartConversationCommandInput extends StartConversationRequest {
6
+ }
7
+ export interface StartConversationCommandOutput extends StartConversationResponse, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Starts an HTTP/2 bidirectional event stream that enables you to send
11
+ * audio, text, or DTMF input in real time. After your application starts
12
+ * a conversation, users send input to Amazon Lex V2 as a stream of events. Amazon Lex V2
13
+ * processes the incoming events and responds with streaming text or audio
14
+ * events.
15
+ * </p>
16
+ * <p>Audio input must be in the following format: <code>audio/lpcm
17
+ * sample-rate=8000 sample-size-bits=16 channel-count=1;
18
+ * is-big-endian=false</code>.</p>
19
+ * <p>If the optional post-fulfillment response is specified, the messages
20
+ * are returned as follows. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_PostFulfillmentStatusSpecification.html">PostFulfillmentStatusSpecification</a>.</p>
21
+ * <ul>
22
+ * <li>
23
+ * <p>
24
+ * <b>Success message</b> - Returned if
25
+ * the Lambda function completes successfully and the intent state is
26
+ * fulfilled or ready fulfillment if the message is present.</p>
27
+ * </li>
28
+ * <li>
29
+ * <p>
30
+ * <b>Failed message</b> - The failed
31
+ * message is returned if the Lambda function throws an exception or
32
+ * if the Lambda function returns a failed intent state without a
33
+ * message.</p>
34
+ * </li>
35
+ * <li>
36
+ * <p>
37
+ * <b>Timeout message</b> - If you
38
+ * don't configure a timeout message and a timeout, and the Lambda
39
+ * function doesn't return within 30 seconds, the timeout message is
40
+ * returned. If you configure a timeout, the timeout message is
41
+ * returned when the period times out. </p>
42
+ * </li>
43
+ * </ul>
44
+ * <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>
45
+ * <p>If the optional update message is configured, it is played at the
46
+ * specified frequency while the Lambda function is running and the update
47
+ * message state is active. If the fulfillment update message is not
48
+ * active, the Lambda function runs with a 30 second timeout. </p>
49
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-update.html">Update message </a>
50
+ * </p>
51
+ * <p>The <code>StartConversation</code> operation is supported only in
52
+ * the following SDKs: </p>
53
+ * <ul>
54
+ * <li>
55
+ * <p>
56
+ * <a href="https://docs.aws.amazon.com/goto/SdkForCpp/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for C++</a>
57
+ * </p>
58
+ * </li>
59
+ * <li>
60
+ * <p>
61
+ * <a href="https://docs.aws.amazon.com/goto/SdkForJavaV2/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for Java V2</a>
62
+ * </p>
63
+ * </li>
64
+ * <li>
65
+ * <p>
66
+ * <a href="https://docs.aws.amazon.com/goto/SdkForRubyV3/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for Ruby V3</a>
67
+ * </p>
68
+ * </li>
69
+ * </ul>
70
+ * @example
71
+ * Use a bare-bones client and the command you need to make an API call.
72
+ * ```javascript
73
+ * import { LexRuntimeV2Client, StartConversationCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
74
+ * // const { LexRuntimeV2Client, StartConversationCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
75
+ * const client = new LexRuntimeV2Client(config);
76
+ * const command = new StartConversationCommand(input);
77
+ * const response = await client.send(command);
78
+ * ```
79
+ *
80
+ * @see {@link StartConversationCommandInput} for command's `input` shape.
81
+ * @see {@link StartConversationCommandOutput} for command's `response` shape.
82
+ * @see {@link LexRuntimeV2ClientResolvedConfig | config} for LexRuntimeV2Client's `config` shape.
83
+ *
84
+ */
85
+ export declare class StartConversationCommand extends $Command<StartConversationCommandInput, StartConversationCommandOutput, LexRuntimeV2ClientResolvedConfig> {
86
+ readonly input: StartConversationCommandInput;
87
+ constructor(input: StartConversationCommandInput);
88
+ /**
89
+ * @internal
90
+ */
91
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: LexRuntimeV2ClientResolvedConfig, options?: __HttpHandlerOptions): Handler<StartConversationCommandInput, StartConversationCommandOutput>;
92
+ private serialize;
93
+ private deserialize;
94
+ }
@@ -1,6 +1,6 @@
1
- export * from "./DeleteSessionCommand";
2
- export * from "./GetSessionCommand";
3
- export * from "./PutSessionCommand";
4
- export * from "./RecognizeTextCommand";
5
- export * from "./RecognizeUtteranceCommand";
6
- export * from "./StartConversationCommand";
1
+ export * from "./DeleteSessionCommand";
2
+ export * from "./GetSessionCommand";
3
+ export * from "./PutSessionCommand";
4
+ export * from "./RecognizeTextCommand";
5
+ export * from "./RecognizeUtteranceCommand";
6
+ export * from "./StartConversationCommand";
@@ -1,2 +1,2 @@
1
- import { RegionInfoProvider } from "@aws-sdk/types";
2
- export declare const defaultRegionInfoProvider: RegionInfoProvider;
1
+ import { RegionInfoProvider } from "@aws-sdk/types";
2
+ export declare const defaultRegionInfoProvider: RegionInfoProvider;
@@ -1,5 +1,5 @@
1
- export * from "./LexRuntimeV2";
2
- export * from "./LexRuntimeV2Client";
3
- export * from "./commands";
4
- export * from "./models";
5
- export { LexRuntimeV2ServiceException } from "./models/LexRuntimeV2ServiceException";
1
+ export * from "./LexRuntimeV2";
2
+ export * from "./LexRuntimeV2Client";
3
+ export * from "./commands";
4
+ export * from "./models";
5
+ export { LexRuntimeV2ServiceException } from "./models/LexRuntimeV2ServiceException";
@@ -1,7 +1,10 @@
1
- import {
2
- ServiceException as __ServiceException,
3
- ServiceExceptionOptions as __ServiceExceptionOptions,
4
- } from "@aws-sdk/smithy-client";
5
- export declare class LexRuntimeV2ServiceException extends __ServiceException {
6
- constructor(options: __ServiceExceptionOptions);
7
- }
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+ /**
3
+ * Base exception class for all service exceptions from LexRuntimeV2 service.
4
+ */
5
+ export declare class LexRuntimeV2ServiceException extends __ServiceException {
6
+ /**
7
+ * @internal
8
+ */
9
+ constructor(options: __ServiceExceptionOptions);
10
+ }
@@ -1 +1 @@
1
- export * from "./models_0";
1
+ export * from "./models_0";