@aws-sdk/client-lex-runtime-v2 3.34.0 → 3.37.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/CHANGELOG.md +47 -0
- package/{dist/cjs → dist-cjs}/LexRuntimeV2.js +1 -5
- package/{dist/cjs → dist-cjs}/LexRuntimeV2Client.js +10 -19
- package/dist-cjs/commands/DeleteSessionCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/commands/GetSessionCommand.js +2 -35
- package/{dist/cjs → dist-cjs}/commands/PutSessionCommand.js +2 -29
- package/{dist/cjs → dist-cjs}/commands/RecognizeTextCommand.js +2 -31
- package/dist-cjs/commands/RecognizeUtteranceCommand.js +36 -0
- package/dist-cjs/commands/StartConversationCommand.js +38 -0
- package/{dist/cjs → dist-cjs}/endpoints.js +1 -2
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +2 -145
- package/{dist/cjs → dist-cjs}/protocols/Aws_restJson1.js +1 -7
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/LexRuntimeV2.js +1 -2
- package/{dist/es → dist-es}/LexRuntimeV2Client.js +1 -2
- package/{dist/es → dist-es}/commands/DeleteSessionCommand.js +2 -3
- package/{dist/es → dist-es}/commands/GetSessionCommand.js +2 -3
- package/{dist/es → dist-es}/commands/PutSessionCommand.js +2 -3
- package/{dist/es → dist-es}/commands/RecognizeTextCommand.js +2 -3
- package/{dist/es → dist-es}/commands/RecognizeUtteranceCommand.js +2 -3
- package/{dist/es → dist-es}/commands/StartConversationCommand.js +2 -3
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +2 -1
- package/{dist/es → dist-es}/protocols/Aws_restJson1.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -1
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -2
- package/{dist/types/ts3.4 → dist-types}/LexRuntimeV2.d.ts +223 -139
- package/{dist/types → dist-types}/LexRuntimeV2Client.d.ts +7 -7
- package/{dist/types → dist-types}/commands/DeleteSessionCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetSessionCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/PutSessionCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/RecognizeTextCommand.d.ts +28 -2
- package/{dist/types → dist-types}/commands/RecognizeUtteranceCommand.d.ts +28 -2
- package/{dist/types → dist-types}/commands/StartConversationCommand.d.ts +34 -2
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +15 -9
- package/{dist/types → dist-types}/protocols/Aws_restJson1.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/dist-types/ts3.4/LexRuntimeV2.d.ts +35 -0
- package/{dist/types → dist-types}/ts3.4/LexRuntimeV2Client.d.ts +33 -103
- package/dist-types/ts3.4/commands/DeleteSessionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetSessionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutSessionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RecognizeTextCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RecognizeUtteranceCommand.d.ts +24 -0
- package/dist-types/ts3.4/commands/StartConversationCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +348 -0
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_restJson1.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +50 -47
- package/LexRuntimeV2.ts +0 -299
- package/LexRuntimeV2Client.ts +0 -282
- package/commands/DeleteSessionCommand.ts +0 -107
- package/commands/GetSessionCommand.ts +0 -102
- package/commands/PutSessionCommand.ts +0 -96
- package/commands/RecognizeTextCommand.ts +0 -98
- package/commands/RecognizeUtteranceCommand.ts +0 -139
- package/commands/StartConversationCommand.ts +0 -130
- package/dist/cjs/LexRuntimeV2.js.map +0 -1
- package/dist/cjs/LexRuntimeV2Client.js.map +0 -1
- package/dist/cjs/commands/DeleteSessionCommand.js +0 -74
- package/dist/cjs/commands/DeleteSessionCommand.js.map +0 -1
- package/dist/cjs/commands/GetSessionCommand.js.map +0 -1
- package/dist/cjs/commands/PutSessionCommand.js.map +0 -1
- package/dist/cjs/commands/RecognizeTextCommand.js.map +0 -1
- package/dist/cjs/commands/RecognizeUtteranceCommand.js +0 -97
- package/dist/cjs/commands/RecognizeUtteranceCommand.js.map +0 -1
- package/dist/cjs/commands/StartConversationCommand.js +0 -90
- package/dist/cjs/commands/StartConversationCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -96
- package/dist/cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/LexRuntimeV2.js.map +0 -1
- package/dist/es/LexRuntimeV2Client.js.map +0 -1
- package/dist/es/commands/DeleteSessionCommand.js.map +0 -1
- package/dist/es/commands/GetSessionCommand.js.map +0 -1
- package/dist/es/commands/PutSessionCommand.js.map +0 -1
- package/dist/es/commands/RecognizeTextCommand.js.map +0 -1
- package/dist/es/commands/RecognizeUtteranceCommand.js.map +0 -1
- package/dist/es/commands/StartConversationCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -10
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -96
- package/dist/es/protocols/Aws_restJson1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/types/LexRuntimeV2.d.ts +0 -139
- package/dist/types/ts3.4/commands/DeleteSessionCommand.d.ts +0 -48
- package/dist/types/ts3.4/commands/GetSessionCommand.d.ts +0 -43
- package/dist/types/ts3.4/commands/PutSessionCommand.d.ts +0 -37
- package/dist/types/ts3.4/commands/RecognizeTextCommand.d.ts +0 -39
- package/dist/types/ts3.4/commands/RecognizeUtteranceCommand.d.ts +0 -82
- package/dist/types/ts3.4/commands/StartConversationCommand.d.ts +0 -62
- package/dist/types/ts3.4/models/models_0.d.ts +0 -2035
- package/endpoints.ts +0 -57
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -2458
- package/protocols/Aws_restJson1.ts +0 -2458
- package/runtimeConfig.browser.ts +0 -45
- package/runtimeConfig.native.ts +0 -20
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -49
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -31
- package/tsconfig.types.json +0 -8
package/LexRuntimeV2.ts
DELETED
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { LexRuntimeV2Client } from "./LexRuntimeV2Client";
|
|
2
|
-
import {
|
|
3
|
-
DeleteSessionCommand,
|
|
4
|
-
DeleteSessionCommandInput,
|
|
5
|
-
DeleteSessionCommandOutput,
|
|
6
|
-
} from "./commands/DeleteSessionCommand";
|
|
7
|
-
import { GetSessionCommand, GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand";
|
|
8
|
-
import { PutSessionCommand, PutSessionCommandInput, PutSessionCommandOutput } from "./commands/PutSessionCommand";
|
|
9
|
-
import {
|
|
10
|
-
RecognizeTextCommand,
|
|
11
|
-
RecognizeTextCommandInput,
|
|
12
|
-
RecognizeTextCommandOutput,
|
|
13
|
-
} from "./commands/RecognizeTextCommand";
|
|
14
|
-
import {
|
|
15
|
-
RecognizeUtteranceCommand,
|
|
16
|
-
RecognizeUtteranceCommandInput,
|
|
17
|
-
RecognizeUtteranceCommandOutput,
|
|
18
|
-
} from "./commands/RecognizeUtteranceCommand";
|
|
19
|
-
import {
|
|
20
|
-
StartConversationCommand,
|
|
21
|
-
StartConversationCommandInput,
|
|
22
|
-
StartConversationCommandOutput,
|
|
23
|
-
} from "./commands/StartConversationCommand";
|
|
24
|
-
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* <p></p>
|
|
28
|
-
*/
|
|
29
|
-
export class LexRuntimeV2 extends LexRuntimeV2Client {
|
|
30
|
-
/**
|
|
31
|
-
* <p>Removes session information for a specified bot, alias, and user ID. </p>
|
|
32
|
-
* <p>You can use this operation to restart a conversation with a bot.
|
|
33
|
-
* When you remove a session, the entire history of the session is removed
|
|
34
|
-
* so that you can start again.</p>
|
|
35
|
-
* <p>You don't need to delete a session. Sessions have a time limit and
|
|
36
|
-
* will expire. Set the session time limit when you create the bot. The
|
|
37
|
-
* default is 5 minutes, but you can specify anything between 1 minute and
|
|
38
|
-
* 24 hours.</p>
|
|
39
|
-
* <p>If you specify a bot or alias ID that doesn't exist, you receive a
|
|
40
|
-
* <code>BadRequestException.</code>
|
|
41
|
-
* </p>
|
|
42
|
-
* <p>If the locale doesn't exist in the bot, or if the locale hasn't been
|
|
43
|
-
* enables for the alias, you receive a
|
|
44
|
-
* <code>BadRequestException</code>.</p>
|
|
45
|
-
*/
|
|
46
|
-
public deleteSession(
|
|
47
|
-
args: DeleteSessionCommandInput,
|
|
48
|
-
options?: __HttpHandlerOptions
|
|
49
|
-
): Promise<DeleteSessionCommandOutput>;
|
|
50
|
-
public deleteSession(
|
|
51
|
-
args: DeleteSessionCommandInput,
|
|
52
|
-
cb: (err: any, data?: DeleteSessionCommandOutput) => void
|
|
53
|
-
): void;
|
|
54
|
-
public deleteSession(
|
|
55
|
-
args: DeleteSessionCommandInput,
|
|
56
|
-
options: __HttpHandlerOptions,
|
|
57
|
-
cb: (err: any, data?: DeleteSessionCommandOutput) => void
|
|
58
|
-
): void;
|
|
59
|
-
public deleteSession(
|
|
60
|
-
args: DeleteSessionCommandInput,
|
|
61
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteSessionCommandOutput) => void),
|
|
62
|
-
cb?: (err: any, data?: DeleteSessionCommandOutput) => void
|
|
63
|
-
): Promise<DeleteSessionCommandOutput> | void {
|
|
64
|
-
const command = new DeleteSessionCommand(args);
|
|
65
|
-
if (typeof optionsOrCb === "function") {
|
|
66
|
-
this.send(command, optionsOrCb);
|
|
67
|
-
} else if (typeof cb === "function") {
|
|
68
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
69
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
70
|
-
} else {
|
|
71
|
-
return this.send(command, optionsOrCb);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* <p>Returns session information for a specified bot, alias, and
|
|
77
|
-
* user.</p>
|
|
78
|
-
* <p>For example, you can use this operation to retrieve session
|
|
79
|
-
* information for a user that has left a long-running session in
|
|
80
|
-
* use.</p>
|
|
81
|
-
* <p>If the bot, alias, or session identifier doesn't exist, Amazon Lex V2
|
|
82
|
-
* returns a <code>BadRequestException</code>. If the locale doesn't exist
|
|
83
|
-
* or is not enabled for the alias, you receive a
|
|
84
|
-
* <code>BadRequestException</code>.</p>
|
|
85
|
-
*/
|
|
86
|
-
public getSession(args: GetSessionCommandInput, options?: __HttpHandlerOptions): Promise<GetSessionCommandOutput>;
|
|
87
|
-
public getSession(args: GetSessionCommandInput, cb: (err: any, data?: GetSessionCommandOutput) => void): void;
|
|
88
|
-
public getSession(
|
|
89
|
-
args: GetSessionCommandInput,
|
|
90
|
-
options: __HttpHandlerOptions,
|
|
91
|
-
cb: (err: any, data?: GetSessionCommandOutput) => void
|
|
92
|
-
): void;
|
|
93
|
-
public getSession(
|
|
94
|
-
args: GetSessionCommandInput,
|
|
95
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetSessionCommandOutput) => void),
|
|
96
|
-
cb?: (err: any, data?: GetSessionCommandOutput) => void
|
|
97
|
-
): Promise<GetSessionCommandOutput> | void {
|
|
98
|
-
const command = new GetSessionCommand(args);
|
|
99
|
-
if (typeof optionsOrCb === "function") {
|
|
100
|
-
this.send(command, optionsOrCb);
|
|
101
|
-
} else if (typeof cb === "function") {
|
|
102
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
103
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
104
|
-
} else {
|
|
105
|
-
return this.send(command, optionsOrCb);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* <p>Creates a new session or modifies an existing session with an Amazon Lex V2
|
|
111
|
-
* bot. Use this operation to enable your application to set the state of
|
|
112
|
-
* the bot.</p>
|
|
113
|
-
*/
|
|
114
|
-
public putSession(args: PutSessionCommandInput, options?: __HttpHandlerOptions): Promise<PutSessionCommandOutput>;
|
|
115
|
-
public putSession(args: PutSessionCommandInput, cb: (err: any, data?: PutSessionCommandOutput) => void): void;
|
|
116
|
-
public putSession(
|
|
117
|
-
args: PutSessionCommandInput,
|
|
118
|
-
options: __HttpHandlerOptions,
|
|
119
|
-
cb: (err: any, data?: PutSessionCommandOutput) => void
|
|
120
|
-
): void;
|
|
121
|
-
public putSession(
|
|
122
|
-
args: PutSessionCommandInput,
|
|
123
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutSessionCommandOutput) => void),
|
|
124
|
-
cb?: (err: any, data?: PutSessionCommandOutput) => void
|
|
125
|
-
): Promise<PutSessionCommandOutput> | void {
|
|
126
|
-
const command = new PutSessionCommand(args);
|
|
127
|
-
if (typeof optionsOrCb === "function") {
|
|
128
|
-
this.send(command, optionsOrCb);
|
|
129
|
-
} else if (typeof cb === "function") {
|
|
130
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
131
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
132
|
-
} else {
|
|
133
|
-
return this.send(command, optionsOrCb);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* <p>Sends user input to Amazon Lex V2. Client applications use this API to send
|
|
139
|
-
* requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input
|
|
140
|
-
* using the machine learning model that it build for the bot.</p>
|
|
141
|
-
* <p>In response, Amazon Lex V2 returns the next message to convey to the user
|
|
142
|
-
* and an optional response card to display.</p>
|
|
143
|
-
*/
|
|
144
|
-
public recognizeText(
|
|
145
|
-
args: RecognizeTextCommandInput,
|
|
146
|
-
options?: __HttpHandlerOptions
|
|
147
|
-
): Promise<RecognizeTextCommandOutput>;
|
|
148
|
-
public recognizeText(
|
|
149
|
-
args: RecognizeTextCommandInput,
|
|
150
|
-
cb: (err: any, data?: RecognizeTextCommandOutput) => void
|
|
151
|
-
): void;
|
|
152
|
-
public recognizeText(
|
|
153
|
-
args: RecognizeTextCommandInput,
|
|
154
|
-
options: __HttpHandlerOptions,
|
|
155
|
-
cb: (err: any, data?: RecognizeTextCommandOutput) => void
|
|
156
|
-
): void;
|
|
157
|
-
public recognizeText(
|
|
158
|
-
args: RecognizeTextCommandInput,
|
|
159
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RecognizeTextCommandOutput) => void),
|
|
160
|
-
cb?: (err: any, data?: RecognizeTextCommandOutput) => void
|
|
161
|
-
): Promise<RecognizeTextCommandOutput> | void {
|
|
162
|
-
const command = new RecognizeTextCommand(args);
|
|
163
|
-
if (typeof optionsOrCb === "function") {
|
|
164
|
-
this.send(command, optionsOrCb);
|
|
165
|
-
} else if (typeof cb === "function") {
|
|
166
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
167
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
168
|
-
} else {
|
|
169
|
-
return this.send(command, optionsOrCb);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* <p>Sends user input to Amazon Lex V2. You can send text or speech. Clients use
|
|
175
|
-
* this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2
|
|
176
|
-
* interprets the user input using the machine learning model built for
|
|
177
|
-
* the bot.</p>
|
|
178
|
-
* <p>The following request fields must be compressed with gzip and then
|
|
179
|
-
* base64 encoded before you send them to Amazon Lex V2. </p>
|
|
180
|
-
* <ul>
|
|
181
|
-
* <li>
|
|
182
|
-
* <p>requestAttributes</p>
|
|
183
|
-
* </li>
|
|
184
|
-
* <li>
|
|
185
|
-
* <p>sessionState</p>
|
|
186
|
-
* </li>
|
|
187
|
-
* </ul>
|
|
188
|
-
* <p>The following response fields are compressed using gzip and then
|
|
189
|
-
* base64 encoded by Amazon Lex V2. Before you can use these fields, you must
|
|
190
|
-
* decode and decompress them. </p>
|
|
191
|
-
* <ul>
|
|
192
|
-
* <li>
|
|
193
|
-
* <p>inputTranscript</p>
|
|
194
|
-
* </li>
|
|
195
|
-
* <li>
|
|
196
|
-
* <p>interpretations</p>
|
|
197
|
-
* </li>
|
|
198
|
-
* <li>
|
|
199
|
-
* <p>messages</p>
|
|
200
|
-
* </li>
|
|
201
|
-
* <li>
|
|
202
|
-
* <p>requestAttributes</p>
|
|
203
|
-
* </li>
|
|
204
|
-
* <li>
|
|
205
|
-
* <p>sessionState</p>
|
|
206
|
-
* </li>
|
|
207
|
-
* </ul>
|
|
208
|
-
* <p>The example contains a Java application that compresses and encodes
|
|
209
|
-
* a Java object to send to Amazon Lex V2, and a second that decodes and
|
|
210
|
-
* decompresses a response from Amazon Lex V2.</p>
|
|
211
|
-
*/
|
|
212
|
-
public recognizeUtterance(
|
|
213
|
-
args: RecognizeUtteranceCommandInput,
|
|
214
|
-
options?: __HttpHandlerOptions
|
|
215
|
-
): Promise<RecognizeUtteranceCommandOutput>;
|
|
216
|
-
public recognizeUtterance(
|
|
217
|
-
args: RecognizeUtteranceCommandInput,
|
|
218
|
-
cb: (err: any, data?: RecognizeUtteranceCommandOutput) => void
|
|
219
|
-
): void;
|
|
220
|
-
public recognizeUtterance(
|
|
221
|
-
args: RecognizeUtteranceCommandInput,
|
|
222
|
-
options: __HttpHandlerOptions,
|
|
223
|
-
cb: (err: any, data?: RecognizeUtteranceCommandOutput) => void
|
|
224
|
-
): void;
|
|
225
|
-
public recognizeUtterance(
|
|
226
|
-
args: RecognizeUtteranceCommandInput,
|
|
227
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RecognizeUtteranceCommandOutput) => void),
|
|
228
|
-
cb?: (err: any, data?: RecognizeUtteranceCommandOutput) => void
|
|
229
|
-
): Promise<RecognizeUtteranceCommandOutput> | void {
|
|
230
|
-
const command = new RecognizeUtteranceCommand(args);
|
|
231
|
-
if (typeof optionsOrCb === "function") {
|
|
232
|
-
this.send(command, optionsOrCb);
|
|
233
|
-
} else if (typeof cb === "function") {
|
|
234
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
235
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
236
|
-
} else {
|
|
237
|
-
return this.send(command, optionsOrCb);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* <p>Starts an HTTP/2 bidirectional event stream that enables you to send
|
|
243
|
-
* audio, text, or DTMF input in real time. After your application starts
|
|
244
|
-
* a conversation, users send input to Amazon Lex V2 as a stream of events. Amazon Lex V2
|
|
245
|
-
* processes the incoming events and responds with streaming text or audio
|
|
246
|
-
* events.
|
|
247
|
-
* </p>
|
|
248
|
-
* <p>Audio input must be in the following format: <code>audio/lpcm
|
|
249
|
-
* sample-rate=8000 sample-size-bits=16 channel-count=1;
|
|
250
|
-
* is-big-endian=false</code>.</p>
|
|
251
|
-
* <p>The <code>StartConversation</code> operation is supported only in
|
|
252
|
-
* the following SDKs: </p>
|
|
253
|
-
* <ul>
|
|
254
|
-
* <li>
|
|
255
|
-
* <p>
|
|
256
|
-
* <a href="https://docs.aws.amazon.com/goto/SdkForCpp/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for C++</a>
|
|
257
|
-
* </p>
|
|
258
|
-
* </li>
|
|
259
|
-
* <li>
|
|
260
|
-
* <p>
|
|
261
|
-
* <a href="https://docs.aws.amazon.com/goto/SdkForJavaV2/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for Java V2</a>
|
|
262
|
-
* </p>
|
|
263
|
-
* </li>
|
|
264
|
-
* <li>
|
|
265
|
-
* <p>
|
|
266
|
-
* <a href="https://docs.aws.amazon.com/goto/SdkForRubyV3/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for Ruby V3</a>
|
|
267
|
-
* </p>
|
|
268
|
-
* </li>
|
|
269
|
-
* </ul>
|
|
270
|
-
*/
|
|
271
|
-
public startConversation(
|
|
272
|
-
args: StartConversationCommandInput,
|
|
273
|
-
options?: __HttpHandlerOptions
|
|
274
|
-
): Promise<StartConversationCommandOutput>;
|
|
275
|
-
public startConversation(
|
|
276
|
-
args: StartConversationCommandInput,
|
|
277
|
-
cb: (err: any, data?: StartConversationCommandOutput) => void
|
|
278
|
-
): void;
|
|
279
|
-
public startConversation(
|
|
280
|
-
args: StartConversationCommandInput,
|
|
281
|
-
options: __HttpHandlerOptions,
|
|
282
|
-
cb: (err: any, data?: StartConversationCommandOutput) => void
|
|
283
|
-
): void;
|
|
284
|
-
public startConversation(
|
|
285
|
-
args: StartConversationCommandInput,
|
|
286
|
-
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartConversationCommandOutput) => void),
|
|
287
|
-
cb?: (err: any, data?: StartConversationCommandOutput) => void
|
|
288
|
-
): Promise<StartConversationCommandOutput> | void {
|
|
289
|
-
const command = new StartConversationCommand(args);
|
|
290
|
-
if (typeof optionsOrCb === "function") {
|
|
291
|
-
this.send(command, optionsOrCb);
|
|
292
|
-
} else if (typeof cb === "function") {
|
|
293
|
-
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
294
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
295
|
-
} else {
|
|
296
|
-
return this.send(command, optionsOrCb);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
package/LexRuntimeV2Client.ts
DELETED
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
import { DeleteSessionCommandInput, DeleteSessionCommandOutput } from "./commands/DeleteSessionCommand";
|
|
2
|
-
import { GetSessionCommandInput, GetSessionCommandOutput } from "./commands/GetSessionCommand";
|
|
3
|
-
import { PutSessionCommandInput, PutSessionCommandOutput } from "./commands/PutSessionCommand";
|
|
4
|
-
import { RecognizeTextCommandInput, RecognizeTextCommandOutput } from "./commands/RecognizeTextCommand";
|
|
5
|
-
import { RecognizeUtteranceCommandInput, RecognizeUtteranceCommandOutput } from "./commands/RecognizeUtteranceCommand";
|
|
6
|
-
import { StartConversationCommandInput, StartConversationCommandOutput } from "./commands/StartConversationCommand";
|
|
7
|
-
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
8
|
-
import {
|
|
9
|
-
EndpointsInputConfig,
|
|
10
|
-
EndpointsResolvedConfig,
|
|
11
|
-
RegionInputConfig,
|
|
12
|
-
RegionResolvedConfig,
|
|
13
|
-
resolveEndpointsConfig,
|
|
14
|
-
resolveRegionConfig,
|
|
15
|
-
} from "@aws-sdk/config-resolver";
|
|
16
|
-
import {
|
|
17
|
-
EventStreamSerdeInputConfig,
|
|
18
|
-
EventStreamSerdeResolvedConfig,
|
|
19
|
-
resolveEventStreamSerdeConfig,
|
|
20
|
-
} from "@aws-sdk/eventstream-serde-config-resolver";
|
|
21
|
-
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
22
|
-
import {
|
|
23
|
-
EventStreamInputConfig,
|
|
24
|
-
EventStreamResolvedConfig,
|
|
25
|
-
resolveEventStreamConfig,
|
|
26
|
-
} from "@aws-sdk/middleware-eventstream";
|
|
27
|
-
import {
|
|
28
|
-
HostHeaderInputConfig,
|
|
29
|
-
HostHeaderResolvedConfig,
|
|
30
|
-
getHostHeaderPlugin,
|
|
31
|
-
resolveHostHeaderConfig,
|
|
32
|
-
} from "@aws-sdk/middleware-host-header";
|
|
33
|
-
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
34
|
-
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
|
|
35
|
-
import {
|
|
36
|
-
AwsAuthInputConfig,
|
|
37
|
-
AwsAuthResolvedConfig,
|
|
38
|
-
getAwsAuthPlugin,
|
|
39
|
-
resolveAwsAuthConfig,
|
|
40
|
-
} from "@aws-sdk/middleware-signing";
|
|
41
|
-
import {
|
|
42
|
-
UserAgentInputConfig,
|
|
43
|
-
UserAgentResolvedConfig,
|
|
44
|
-
getUserAgentPlugin,
|
|
45
|
-
resolveUserAgentConfig,
|
|
46
|
-
} from "@aws-sdk/middleware-user-agent";
|
|
47
|
-
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
48
|
-
import {
|
|
49
|
-
Client as __Client,
|
|
50
|
-
SmithyConfiguration as __SmithyConfiguration,
|
|
51
|
-
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
|
|
52
|
-
} from "@aws-sdk/smithy-client";
|
|
53
|
-
import {
|
|
54
|
-
Provider,
|
|
55
|
-
RegionInfoProvider,
|
|
56
|
-
Credentials as __Credentials,
|
|
57
|
-
Decoder as __Decoder,
|
|
58
|
-
Encoder as __Encoder,
|
|
59
|
-
EventStreamPayloadHandlerProvider as __EventStreamPayloadHandlerProvider,
|
|
60
|
-
EventStreamSerdeProvider as __EventStreamSerdeProvider,
|
|
61
|
-
Hash as __Hash,
|
|
62
|
-
HashConstructor as __HashConstructor,
|
|
63
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
64
|
-
Logger as __Logger,
|
|
65
|
-
Provider as __Provider,
|
|
66
|
-
StreamCollector as __StreamCollector,
|
|
67
|
-
UrlParser as __UrlParser,
|
|
68
|
-
UserAgent as __UserAgent,
|
|
69
|
-
} from "@aws-sdk/types";
|
|
70
|
-
|
|
71
|
-
export type ServiceInputTypes =
|
|
72
|
-
| DeleteSessionCommandInput
|
|
73
|
-
| GetSessionCommandInput
|
|
74
|
-
| PutSessionCommandInput
|
|
75
|
-
| RecognizeTextCommandInput
|
|
76
|
-
| RecognizeUtteranceCommandInput
|
|
77
|
-
| StartConversationCommandInput;
|
|
78
|
-
|
|
79
|
-
export type ServiceOutputTypes =
|
|
80
|
-
| DeleteSessionCommandOutput
|
|
81
|
-
| GetSessionCommandOutput
|
|
82
|
-
| PutSessionCommandOutput
|
|
83
|
-
| RecognizeTextCommandOutput
|
|
84
|
-
| RecognizeUtteranceCommandOutput
|
|
85
|
-
| StartConversationCommandOutput;
|
|
86
|
-
|
|
87
|
-
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
88
|
-
/**
|
|
89
|
-
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
90
|
-
*/
|
|
91
|
-
requestHandler?: __HttpHandler;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* A constructor for a class implementing the {@link __Hash} interface
|
|
95
|
-
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
96
|
-
* @internal
|
|
97
|
-
*/
|
|
98
|
-
sha256?: __HashConstructor;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* The function that will be used to convert strings into HTTP endpoints.
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
urlParser?: __UrlParser;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* A function that can calculate the length of a request body.
|
|
108
|
-
* @internal
|
|
109
|
-
*/
|
|
110
|
-
bodyLengthChecker?: (body: any) => number | undefined;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* A function that converts a stream into an array of bytes.
|
|
114
|
-
* @internal
|
|
115
|
-
*/
|
|
116
|
-
streamCollector?: __StreamCollector;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
120
|
-
* @internal
|
|
121
|
-
*/
|
|
122
|
-
base64Decoder?: __Decoder;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* The function that will be used to convert binary data to a base64-encoded string.
|
|
126
|
-
* @internal
|
|
127
|
-
*/
|
|
128
|
-
base64Encoder?: __Encoder;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
132
|
-
* @internal
|
|
133
|
-
*/
|
|
134
|
-
utf8Decoder?: __Decoder;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
138
|
-
* @internal
|
|
139
|
-
*/
|
|
140
|
-
utf8Encoder?: __Encoder;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* The runtime environment.
|
|
144
|
-
* @internal
|
|
145
|
-
*/
|
|
146
|
-
runtime?: string;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Disable dyanamically changing the endpoint of the client based on the hostPrefix
|
|
150
|
-
* trait of an operation.
|
|
151
|
-
*/
|
|
152
|
-
disableHostPrefix?: boolean;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Value for how many times a request will be made at most in case of retry.
|
|
156
|
-
*/
|
|
157
|
-
maxAttempts?: number | __Provider<number>;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Specifies which retry algorithm to use.
|
|
161
|
-
*/
|
|
162
|
-
retryMode?: string | __Provider<string>;
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Optional logger for logging debug/info/warn/error.
|
|
166
|
-
*/
|
|
167
|
-
logger?: __Logger;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Unique service identifier.
|
|
171
|
-
* @internal
|
|
172
|
-
*/
|
|
173
|
-
serviceId?: string;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* The AWS region to which this client will send requests
|
|
177
|
-
*/
|
|
178
|
-
region?: string | __Provider<string>;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Default credentials provider; Not available in browser runtime.
|
|
182
|
-
* @internal
|
|
183
|
-
*/
|
|
184
|
-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Fetch related hostname, signing name or signing region with given region.
|
|
188
|
-
* @internal
|
|
189
|
-
*/
|
|
190
|
-
regionInfoProvider?: RegionInfoProvider;
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* The function that provides necessary utilities for handling request event stream.
|
|
194
|
-
* @internal
|
|
195
|
-
*/
|
|
196
|
-
eventStreamPayloadHandlerProvider?: __EventStreamPayloadHandlerProvider;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
200
|
-
* @internal
|
|
201
|
-
*/
|
|
202
|
-
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* The function that provides necessary utilities for generating and parsing event stream
|
|
206
|
-
*/
|
|
207
|
-
eventStreamSerdeProvider?: __EventStreamSerdeProvider;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
type LexRuntimeV2ClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
|
|
211
|
-
ClientDefaults &
|
|
212
|
-
RegionInputConfig &
|
|
213
|
-
EndpointsInputConfig &
|
|
214
|
-
RetryInputConfig &
|
|
215
|
-
HostHeaderInputConfig &
|
|
216
|
-
AwsAuthInputConfig &
|
|
217
|
-
EventStreamInputConfig &
|
|
218
|
-
UserAgentInputConfig &
|
|
219
|
-
EventStreamSerdeInputConfig;
|
|
220
|
-
/**
|
|
221
|
-
* The configuration interface of LexRuntimeV2Client class constructor that set the region, credentials and other options.
|
|
222
|
-
*/
|
|
223
|
-
export interface LexRuntimeV2ClientConfig extends LexRuntimeV2ClientConfigType {}
|
|
224
|
-
|
|
225
|
-
type LexRuntimeV2ClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
|
|
226
|
-
Required<ClientDefaults> &
|
|
227
|
-
RegionResolvedConfig &
|
|
228
|
-
EndpointsResolvedConfig &
|
|
229
|
-
RetryResolvedConfig &
|
|
230
|
-
HostHeaderResolvedConfig &
|
|
231
|
-
AwsAuthResolvedConfig &
|
|
232
|
-
EventStreamResolvedConfig &
|
|
233
|
-
UserAgentResolvedConfig &
|
|
234
|
-
EventStreamSerdeResolvedConfig;
|
|
235
|
-
/**
|
|
236
|
-
* The resolved configuration interface of LexRuntimeV2Client class. This is resolved and normalized from the {@link LexRuntimeV2ClientConfig | constructor configuration interface}.
|
|
237
|
-
*/
|
|
238
|
-
export interface LexRuntimeV2ClientResolvedConfig extends LexRuntimeV2ClientResolvedConfigType {}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* <p></p>
|
|
242
|
-
*/
|
|
243
|
-
export class LexRuntimeV2Client extends __Client<
|
|
244
|
-
__HttpHandlerOptions,
|
|
245
|
-
ServiceInputTypes,
|
|
246
|
-
ServiceOutputTypes,
|
|
247
|
-
LexRuntimeV2ClientResolvedConfig
|
|
248
|
-
> {
|
|
249
|
-
/**
|
|
250
|
-
* The resolved configuration of LexRuntimeV2Client class. This is resolved and normalized from the {@link LexRuntimeV2ClientConfig | constructor configuration interface}.
|
|
251
|
-
*/
|
|
252
|
-
readonly config: LexRuntimeV2ClientResolvedConfig;
|
|
253
|
-
|
|
254
|
-
constructor(configuration: LexRuntimeV2ClientConfig) {
|
|
255
|
-
let _config_0 = __getRuntimeConfig(configuration);
|
|
256
|
-
let _config_1 = resolveRegionConfig(_config_0);
|
|
257
|
-
let _config_2 = resolveEndpointsConfig(_config_1);
|
|
258
|
-
let _config_3 = resolveRetryConfig(_config_2);
|
|
259
|
-
let _config_4 = resolveHostHeaderConfig(_config_3);
|
|
260
|
-
let _config_5 = resolveAwsAuthConfig(_config_4);
|
|
261
|
-
let _config_6 = resolveEventStreamConfig(_config_5);
|
|
262
|
-
let _config_7 = resolveUserAgentConfig(_config_6);
|
|
263
|
-
let _config_8 = resolveEventStreamSerdeConfig(_config_7);
|
|
264
|
-
super(_config_8);
|
|
265
|
-
this.config = _config_8;
|
|
266
|
-
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
267
|
-
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
268
|
-
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
269
|
-
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
270
|
-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
271
|
-
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
276
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
277
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
278
|
-
*/
|
|
279
|
-
destroy(): void {
|
|
280
|
-
super.destroy();
|
|
281
|
-
}
|
|
282
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { LexRuntimeV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexRuntimeV2Client";
|
|
2
|
-
import { DeleteSessionRequest, DeleteSessionResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_restJson1DeleteSessionCommand,
|
|
5
|
-
serializeAws_restJson1DeleteSessionCommand,
|
|
6
|
-
} from "../protocols/Aws_restJson1";
|
|
7
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
8
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
9
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
FinalizeHandlerArguments,
|
|
12
|
-
Handler,
|
|
13
|
-
HandlerExecutionContext,
|
|
14
|
-
MiddlewareStack,
|
|
15
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
16
|
-
MetadataBearer as __MetadataBearer,
|
|
17
|
-
SerdeContext as __SerdeContext,
|
|
18
|
-
} from "@aws-sdk/types";
|
|
19
|
-
|
|
20
|
-
export interface DeleteSessionCommandInput extends DeleteSessionRequest {}
|
|
21
|
-
export interface DeleteSessionCommandOutput extends DeleteSessionResponse, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>Removes session information for a specified bot, alias, and user ID. </p>
|
|
25
|
-
* <p>You can use this operation to restart a conversation with a bot.
|
|
26
|
-
* When you remove a session, the entire history of the session is removed
|
|
27
|
-
* so that you can start again.</p>
|
|
28
|
-
* <p>You don't need to delete a session. Sessions have a time limit and
|
|
29
|
-
* will expire. Set the session time limit when you create the bot. The
|
|
30
|
-
* default is 5 minutes, but you can specify anything between 1 minute and
|
|
31
|
-
* 24 hours.</p>
|
|
32
|
-
* <p>If you specify a bot or alias ID that doesn't exist, you receive a
|
|
33
|
-
* <code>BadRequestException.</code>
|
|
34
|
-
* </p>
|
|
35
|
-
* <p>If the locale doesn't exist in the bot, or if the locale hasn't been
|
|
36
|
-
* enables for the alias, you receive a
|
|
37
|
-
* <code>BadRequestException</code>.</p>
|
|
38
|
-
* @example
|
|
39
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
40
|
-
* ```javascript
|
|
41
|
-
* import { LexRuntimeV2Client, DeleteSessionCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
|
|
42
|
-
* // const { LexRuntimeV2Client, DeleteSessionCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
|
|
43
|
-
* const client = new LexRuntimeV2Client(config);
|
|
44
|
-
* const command = new DeleteSessionCommand(input);
|
|
45
|
-
* const response = await client.send(command);
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* @see {@link DeleteSessionCommandInput} for command's `input` shape.
|
|
49
|
-
* @see {@link DeleteSessionCommandOutput} for command's `response` shape.
|
|
50
|
-
* @see {@link LexRuntimeV2ClientResolvedConfig | config} for command's `input` shape.
|
|
51
|
-
*
|
|
52
|
-
*/
|
|
53
|
-
export class DeleteSessionCommand extends $Command<
|
|
54
|
-
DeleteSessionCommandInput,
|
|
55
|
-
DeleteSessionCommandOutput,
|
|
56
|
-
LexRuntimeV2ClientResolvedConfig
|
|
57
|
-
> {
|
|
58
|
-
// Start section: command_properties
|
|
59
|
-
// End section: command_properties
|
|
60
|
-
|
|
61
|
-
constructor(readonly input: DeleteSessionCommandInput) {
|
|
62
|
-
// Start section: command_constructor
|
|
63
|
-
super();
|
|
64
|
-
// End section: command_constructor
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
resolveMiddleware(
|
|
71
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
72
|
-
configuration: LexRuntimeV2ClientResolvedConfig,
|
|
73
|
-
options?: __HttpHandlerOptions
|
|
74
|
-
): Handler<DeleteSessionCommandInput, DeleteSessionCommandOutput> {
|
|
75
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
76
|
-
|
|
77
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
78
|
-
|
|
79
|
-
const { logger } = configuration;
|
|
80
|
-
const clientName = "LexRuntimeV2Client";
|
|
81
|
-
const commandName = "DeleteSessionCommand";
|
|
82
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
83
|
-
logger,
|
|
84
|
-
clientName,
|
|
85
|
-
commandName,
|
|
86
|
-
inputFilterSensitiveLog: DeleteSessionRequest.filterSensitiveLog,
|
|
87
|
-
outputFilterSensitiveLog: DeleteSessionResponse.filterSensitiveLog,
|
|
88
|
-
};
|
|
89
|
-
const { requestHandler } = configuration;
|
|
90
|
-
return stack.resolve(
|
|
91
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
92
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
93
|
-
handlerExecutionContext
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
private serialize(input: DeleteSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
98
|
-
return serializeAws_restJson1DeleteSessionCommand(input, context);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteSessionCommandOutput> {
|
|
102
|
-
return deserializeAws_restJson1DeleteSessionCommand(output, context);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Start section: command_body_extra
|
|
106
|
-
// End section: command_body_extra
|
|
107
|
-
}
|