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