@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
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { LexRuntimeV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexRuntimeV2Client";
|
|
2
|
-
import { GetSessionRequest, GetSessionResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_restJson1GetSessionCommand,
|
|
5
|
-
serializeAws_restJson1GetSessionCommand,
|
|
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 GetSessionCommandInput extends GetSessionRequest {}
|
|
21
|
-
export interface GetSessionCommandOutput extends GetSessionResponse, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>Returns session information for a specified bot, alias, and
|
|
25
|
-
* user.</p>
|
|
26
|
-
* <p>For example, you can use this operation to retrieve session
|
|
27
|
-
* information for a user that has left a long-running session in
|
|
28
|
-
* use.</p>
|
|
29
|
-
* <p>If the bot, alias, or session identifier doesn't exist, Amazon Lex V2
|
|
30
|
-
* returns a <code>BadRequestException</code>. If the locale doesn't exist
|
|
31
|
-
* or is not enabled for the alias, you receive a
|
|
32
|
-
* <code>BadRequestException</code>.</p>
|
|
33
|
-
* @example
|
|
34
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
35
|
-
* ```javascript
|
|
36
|
-
* import { LexRuntimeV2Client, GetSessionCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
|
|
37
|
-
* // const { LexRuntimeV2Client, GetSessionCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
|
|
38
|
-
* const client = new LexRuntimeV2Client(config);
|
|
39
|
-
* const command = new GetSessionCommand(input);
|
|
40
|
-
* const response = await client.send(command);
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* @see {@link GetSessionCommandInput} for command's `input` shape.
|
|
44
|
-
* @see {@link GetSessionCommandOutput} for command's `response` shape.
|
|
45
|
-
* @see {@link LexRuntimeV2ClientResolvedConfig | config} for command's `input` shape.
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
export class GetSessionCommand extends $Command<
|
|
49
|
-
GetSessionCommandInput,
|
|
50
|
-
GetSessionCommandOutput,
|
|
51
|
-
LexRuntimeV2ClientResolvedConfig
|
|
52
|
-
> {
|
|
53
|
-
// Start section: command_properties
|
|
54
|
-
// End section: command_properties
|
|
55
|
-
|
|
56
|
-
constructor(readonly input: GetSessionCommandInput) {
|
|
57
|
-
// Start section: command_constructor
|
|
58
|
-
super();
|
|
59
|
-
// End section: command_constructor
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @internal
|
|
64
|
-
*/
|
|
65
|
-
resolveMiddleware(
|
|
66
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
67
|
-
configuration: LexRuntimeV2ClientResolvedConfig,
|
|
68
|
-
options?: __HttpHandlerOptions
|
|
69
|
-
): Handler<GetSessionCommandInput, GetSessionCommandOutput> {
|
|
70
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
71
|
-
|
|
72
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
73
|
-
|
|
74
|
-
const { logger } = configuration;
|
|
75
|
-
const clientName = "LexRuntimeV2Client";
|
|
76
|
-
const commandName = "GetSessionCommand";
|
|
77
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
78
|
-
logger,
|
|
79
|
-
clientName,
|
|
80
|
-
commandName,
|
|
81
|
-
inputFilterSensitiveLog: GetSessionRequest.filterSensitiveLog,
|
|
82
|
-
outputFilterSensitiveLog: GetSessionResponse.filterSensitiveLog,
|
|
83
|
-
};
|
|
84
|
-
const { requestHandler } = configuration;
|
|
85
|
-
return stack.resolve(
|
|
86
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
87
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
88
|
-
handlerExecutionContext
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
private serialize(input: GetSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
93
|
-
return serializeAws_restJson1GetSessionCommand(input, context);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetSessionCommandOutput> {
|
|
97
|
-
return deserializeAws_restJson1GetSessionCommand(output, context);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Start section: command_body_extra
|
|
101
|
-
// End section: command_body_extra
|
|
102
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { LexRuntimeV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexRuntimeV2Client";
|
|
2
|
-
import { PutSessionRequest, PutSessionResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_restJson1PutSessionCommand,
|
|
5
|
-
serializeAws_restJson1PutSessionCommand,
|
|
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 PutSessionCommandInput extends PutSessionRequest {}
|
|
21
|
-
export interface PutSessionCommandOutput extends PutSessionResponse, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>Creates a new session or modifies an existing session with an Amazon Lex V2
|
|
25
|
-
* bot. Use this operation to enable your application to set the state of
|
|
26
|
-
* the bot.</p>
|
|
27
|
-
* @example
|
|
28
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
29
|
-
* ```javascript
|
|
30
|
-
* import { LexRuntimeV2Client, PutSessionCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
|
|
31
|
-
* // const { LexRuntimeV2Client, PutSessionCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
|
|
32
|
-
* const client = new LexRuntimeV2Client(config);
|
|
33
|
-
* const command = new PutSessionCommand(input);
|
|
34
|
-
* const response = await client.send(command);
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @see {@link PutSessionCommandInput} for command's `input` shape.
|
|
38
|
-
* @see {@link PutSessionCommandOutput} for command's `response` shape.
|
|
39
|
-
* @see {@link LexRuntimeV2ClientResolvedConfig | config} for command's `input` shape.
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
export class PutSessionCommand extends $Command<
|
|
43
|
-
PutSessionCommandInput,
|
|
44
|
-
PutSessionCommandOutput,
|
|
45
|
-
LexRuntimeV2ClientResolvedConfig
|
|
46
|
-
> {
|
|
47
|
-
// Start section: command_properties
|
|
48
|
-
// End section: command_properties
|
|
49
|
-
|
|
50
|
-
constructor(readonly input: PutSessionCommandInput) {
|
|
51
|
-
// Start section: command_constructor
|
|
52
|
-
super();
|
|
53
|
-
// End section: command_constructor
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @internal
|
|
58
|
-
*/
|
|
59
|
-
resolveMiddleware(
|
|
60
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
61
|
-
configuration: LexRuntimeV2ClientResolvedConfig,
|
|
62
|
-
options?: __HttpHandlerOptions
|
|
63
|
-
): Handler<PutSessionCommandInput, PutSessionCommandOutput> {
|
|
64
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
65
|
-
|
|
66
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
67
|
-
|
|
68
|
-
const { logger } = configuration;
|
|
69
|
-
const clientName = "LexRuntimeV2Client";
|
|
70
|
-
const commandName = "PutSessionCommand";
|
|
71
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
72
|
-
logger,
|
|
73
|
-
clientName,
|
|
74
|
-
commandName,
|
|
75
|
-
inputFilterSensitiveLog: PutSessionRequest.filterSensitiveLog,
|
|
76
|
-
outputFilterSensitiveLog: PutSessionResponse.filterSensitiveLog,
|
|
77
|
-
};
|
|
78
|
-
const { requestHandler } = configuration;
|
|
79
|
-
return stack.resolve(
|
|
80
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
81
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
82
|
-
handlerExecutionContext
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
private serialize(input: PutSessionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
87
|
-
return serializeAws_restJson1PutSessionCommand(input, context);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<PutSessionCommandOutput> {
|
|
91
|
-
return deserializeAws_restJson1PutSessionCommand(output, context);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// Start section: command_body_extra
|
|
95
|
-
// End section: command_body_extra
|
|
96
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { LexRuntimeV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexRuntimeV2Client";
|
|
2
|
-
import { RecognizeTextRequest, RecognizeTextResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_restJson1RecognizeTextCommand,
|
|
5
|
-
serializeAws_restJson1RecognizeTextCommand,
|
|
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 RecognizeTextCommandInput extends RecognizeTextRequest {}
|
|
21
|
-
export interface RecognizeTextCommandOutput extends RecognizeTextResponse, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>Sends user input to Amazon Lex V2. Client applications use this API to send
|
|
25
|
-
* requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input
|
|
26
|
-
* using the machine learning model that it build for the bot.</p>
|
|
27
|
-
* <p>In response, Amazon Lex V2 returns the next message to convey to the user
|
|
28
|
-
* and an optional response card to display.</p>
|
|
29
|
-
* @example
|
|
30
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
31
|
-
* ```javascript
|
|
32
|
-
* import { LexRuntimeV2Client, RecognizeTextCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
|
|
33
|
-
* // const { LexRuntimeV2Client, RecognizeTextCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
|
|
34
|
-
* const client = new LexRuntimeV2Client(config);
|
|
35
|
-
* const command = new RecognizeTextCommand(input);
|
|
36
|
-
* const response = await client.send(command);
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @see {@link RecognizeTextCommandInput} for command's `input` shape.
|
|
40
|
-
* @see {@link RecognizeTextCommandOutput} for command's `response` shape.
|
|
41
|
-
* @see {@link LexRuntimeV2ClientResolvedConfig | config} for command's `input` shape.
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
export class RecognizeTextCommand extends $Command<
|
|
45
|
-
RecognizeTextCommandInput,
|
|
46
|
-
RecognizeTextCommandOutput,
|
|
47
|
-
LexRuntimeV2ClientResolvedConfig
|
|
48
|
-
> {
|
|
49
|
-
// Start section: command_properties
|
|
50
|
-
// End section: command_properties
|
|
51
|
-
|
|
52
|
-
constructor(readonly input: RecognizeTextCommandInput) {
|
|
53
|
-
// Start section: command_constructor
|
|
54
|
-
super();
|
|
55
|
-
// End section: command_constructor
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @internal
|
|
60
|
-
*/
|
|
61
|
-
resolveMiddleware(
|
|
62
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
63
|
-
configuration: LexRuntimeV2ClientResolvedConfig,
|
|
64
|
-
options?: __HttpHandlerOptions
|
|
65
|
-
): Handler<RecognizeTextCommandInput, RecognizeTextCommandOutput> {
|
|
66
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
67
|
-
|
|
68
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
69
|
-
|
|
70
|
-
const { logger } = configuration;
|
|
71
|
-
const clientName = "LexRuntimeV2Client";
|
|
72
|
-
const commandName = "RecognizeTextCommand";
|
|
73
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
74
|
-
logger,
|
|
75
|
-
clientName,
|
|
76
|
-
commandName,
|
|
77
|
-
inputFilterSensitiveLog: RecognizeTextRequest.filterSensitiveLog,
|
|
78
|
-
outputFilterSensitiveLog: RecognizeTextResponse.filterSensitiveLog,
|
|
79
|
-
};
|
|
80
|
-
const { requestHandler } = configuration;
|
|
81
|
-
return stack.resolve(
|
|
82
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
83
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
84
|
-
handlerExecutionContext
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
private serialize(input: RecognizeTextCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
89
|
-
return serializeAws_restJson1RecognizeTextCommand(input, context);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<RecognizeTextCommandOutput> {
|
|
93
|
-
return deserializeAws_restJson1RecognizeTextCommand(output, context);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Start section: command_body_extra
|
|
97
|
-
// End section: command_body_extra
|
|
98
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { LexRuntimeV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexRuntimeV2Client";
|
|
2
|
-
import { RecognizeUtteranceRequest, RecognizeUtteranceResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_restJson1RecognizeUtteranceCommand,
|
|
5
|
-
serializeAws_restJson1RecognizeUtteranceCommand,
|
|
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
|
-
type RecognizeUtteranceCommandInputType = Omit<RecognizeUtteranceRequest, "inputStream"> & {
|
|
21
|
-
/**
|
|
22
|
-
* For *`RecognizeUtteranceRequest["inputStream"]`*, see {@link RecognizeUtteranceRequest.inputStream}.
|
|
23
|
-
*/
|
|
24
|
-
inputStream?: RecognizeUtteranceRequest["inputStream"] | string | Uint8Array | Buffer;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* This interface extends from `RecognizeUtteranceRequest` interface. There are more parameters than `inputStream` defined in {@link RecognizeUtteranceRequest}
|
|
28
|
-
*/
|
|
29
|
-
export interface RecognizeUtteranceCommandInput extends RecognizeUtteranceCommandInputType {}
|
|
30
|
-
export interface RecognizeUtteranceCommandOutput extends RecognizeUtteranceResponse, __MetadataBearer {}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* <p>Sends user input to Amazon Lex V2. You can send text or speech. Clients use
|
|
34
|
-
* this API to send text and audio requests to Amazon Lex V2 at runtime. Amazon Lex V2
|
|
35
|
-
* interprets the user input using the machine learning model built for
|
|
36
|
-
* the bot.</p>
|
|
37
|
-
* <p>The following request fields must be compressed with gzip and then
|
|
38
|
-
* base64 encoded before you send them to Amazon Lex V2. </p>
|
|
39
|
-
* <ul>
|
|
40
|
-
* <li>
|
|
41
|
-
* <p>requestAttributes</p>
|
|
42
|
-
* </li>
|
|
43
|
-
* <li>
|
|
44
|
-
* <p>sessionState</p>
|
|
45
|
-
* </li>
|
|
46
|
-
* </ul>
|
|
47
|
-
* <p>The following response fields are compressed using gzip and then
|
|
48
|
-
* base64 encoded by Amazon Lex V2. Before you can use these fields, you must
|
|
49
|
-
* decode and decompress them. </p>
|
|
50
|
-
* <ul>
|
|
51
|
-
* <li>
|
|
52
|
-
* <p>inputTranscript</p>
|
|
53
|
-
* </li>
|
|
54
|
-
* <li>
|
|
55
|
-
* <p>interpretations</p>
|
|
56
|
-
* </li>
|
|
57
|
-
* <li>
|
|
58
|
-
* <p>messages</p>
|
|
59
|
-
* </li>
|
|
60
|
-
* <li>
|
|
61
|
-
* <p>requestAttributes</p>
|
|
62
|
-
* </li>
|
|
63
|
-
* <li>
|
|
64
|
-
* <p>sessionState</p>
|
|
65
|
-
* </li>
|
|
66
|
-
* </ul>
|
|
67
|
-
* <p>The example contains a Java application that compresses and encodes
|
|
68
|
-
* a Java object to send to Amazon Lex V2, and a second that decodes and
|
|
69
|
-
* decompresses a response from Amazon Lex V2.</p>
|
|
70
|
-
* @example
|
|
71
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
72
|
-
* ```javascript
|
|
73
|
-
* import { LexRuntimeV2Client, RecognizeUtteranceCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
|
|
74
|
-
* // const { LexRuntimeV2Client, RecognizeUtteranceCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
|
|
75
|
-
* const client = new LexRuntimeV2Client(config);
|
|
76
|
-
* const command = new RecognizeUtteranceCommand(input);
|
|
77
|
-
* const response = await client.send(command);
|
|
78
|
-
* ```
|
|
79
|
-
*
|
|
80
|
-
* @see {@link RecognizeUtteranceCommandInput} for command's `input` shape.
|
|
81
|
-
* @see {@link RecognizeUtteranceCommandOutput} for command's `response` shape.
|
|
82
|
-
* @see {@link LexRuntimeV2ClientResolvedConfig | config} for command's `input` shape.
|
|
83
|
-
*
|
|
84
|
-
*/
|
|
85
|
-
export class RecognizeUtteranceCommand extends $Command<
|
|
86
|
-
RecognizeUtteranceCommandInput,
|
|
87
|
-
RecognizeUtteranceCommandOutput,
|
|
88
|
-
LexRuntimeV2ClientResolvedConfig
|
|
89
|
-
> {
|
|
90
|
-
// Start section: command_properties
|
|
91
|
-
// End section: command_properties
|
|
92
|
-
|
|
93
|
-
constructor(readonly input: RecognizeUtteranceCommandInput) {
|
|
94
|
-
// Start section: command_constructor
|
|
95
|
-
super();
|
|
96
|
-
// End section: command_constructor
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @internal
|
|
101
|
-
*/
|
|
102
|
-
resolveMiddleware(
|
|
103
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
104
|
-
configuration: LexRuntimeV2ClientResolvedConfig,
|
|
105
|
-
options?: __HttpHandlerOptions
|
|
106
|
-
): Handler<RecognizeUtteranceCommandInput, RecognizeUtteranceCommandOutput> {
|
|
107
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
108
|
-
|
|
109
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
110
|
-
|
|
111
|
-
const { logger } = configuration;
|
|
112
|
-
const clientName = "LexRuntimeV2Client";
|
|
113
|
-
const commandName = "RecognizeUtteranceCommand";
|
|
114
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
115
|
-
logger,
|
|
116
|
-
clientName,
|
|
117
|
-
commandName,
|
|
118
|
-
inputFilterSensitiveLog: RecognizeUtteranceRequest.filterSensitiveLog,
|
|
119
|
-
outputFilterSensitiveLog: RecognizeUtteranceResponse.filterSensitiveLog,
|
|
120
|
-
};
|
|
121
|
-
const { requestHandler } = configuration;
|
|
122
|
-
return stack.resolve(
|
|
123
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
124
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
125
|
-
handlerExecutionContext
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
private serialize(input: RecognizeUtteranceCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
130
|
-
return serializeAws_restJson1RecognizeUtteranceCommand(input, context);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<RecognizeUtteranceCommandOutput> {
|
|
134
|
-
return deserializeAws_restJson1RecognizeUtteranceCommand(output, context);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// Start section: command_body_extra
|
|
138
|
-
// End section: command_body_extra
|
|
139
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { LexRuntimeV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexRuntimeV2Client";
|
|
2
|
-
import { StartConversationRequest, StartConversationResponse } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_restJson1StartConversationCommand,
|
|
5
|
-
serializeAws_restJson1StartConversationCommand,
|
|
6
|
-
} from "../protocols/Aws_restJson1";
|
|
7
|
-
import { getEventStreamPlugin } from "@aws-sdk/middleware-eventstream";
|
|
8
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
9
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
10
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
11
|
-
import {
|
|
12
|
-
FinalizeHandlerArguments,
|
|
13
|
-
Handler,
|
|
14
|
-
HandlerExecutionContext,
|
|
15
|
-
MiddlewareStack,
|
|
16
|
-
EventStreamSerdeContext as __EventStreamSerdeContext,
|
|
17
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
18
|
-
MetadataBearer as __MetadataBearer,
|
|
19
|
-
SerdeContext as __SerdeContext,
|
|
20
|
-
} from "@aws-sdk/types";
|
|
21
|
-
|
|
22
|
-
export interface StartConversationCommandInput extends StartConversationRequest {}
|
|
23
|
-
export interface StartConversationCommandOutput extends StartConversationResponse, __MetadataBearer {}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* <p>Starts an HTTP/2 bidirectional event stream that enables you to send
|
|
27
|
-
* audio, text, or DTMF input in real time. After your application starts
|
|
28
|
-
* a conversation, users send input to Amazon Lex V2 as a stream of events. Amazon Lex V2
|
|
29
|
-
* processes the incoming events and responds with streaming text or audio
|
|
30
|
-
* events.
|
|
31
|
-
* </p>
|
|
32
|
-
* <p>Audio input must be in the following format: <code>audio/lpcm
|
|
33
|
-
* sample-rate=8000 sample-size-bits=16 channel-count=1;
|
|
34
|
-
* is-big-endian=false</code>.</p>
|
|
35
|
-
* <p>The <code>StartConversation</code> operation is supported only in
|
|
36
|
-
* the following SDKs: </p>
|
|
37
|
-
* <ul>
|
|
38
|
-
* <li>
|
|
39
|
-
* <p>
|
|
40
|
-
* <a href="https://docs.aws.amazon.com/goto/SdkForCpp/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for C++</a>
|
|
41
|
-
* </p>
|
|
42
|
-
* </li>
|
|
43
|
-
* <li>
|
|
44
|
-
* <p>
|
|
45
|
-
* <a href="https://docs.aws.amazon.com/goto/SdkForJavaV2/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for Java V2</a>
|
|
46
|
-
* </p>
|
|
47
|
-
* </li>
|
|
48
|
-
* <li>
|
|
49
|
-
* <p>
|
|
50
|
-
* <a href="https://docs.aws.amazon.com/goto/SdkForRubyV3/runtime.lex.v2-2020-08-07/StartConversation">AWS SDK for Ruby V3</a>
|
|
51
|
-
* </p>
|
|
52
|
-
* </li>
|
|
53
|
-
* </ul>
|
|
54
|
-
* @example
|
|
55
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
56
|
-
* ```javascript
|
|
57
|
-
* import { LexRuntimeV2Client, StartConversationCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
|
|
58
|
-
* // const { LexRuntimeV2Client, StartConversationCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
|
|
59
|
-
* const client = new LexRuntimeV2Client(config);
|
|
60
|
-
* const command = new StartConversationCommand(input);
|
|
61
|
-
* const response = await client.send(command);
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
|
-
* @see {@link StartConversationCommandInput} for command's `input` shape.
|
|
65
|
-
* @see {@link StartConversationCommandOutput} for command's `response` shape.
|
|
66
|
-
* @see {@link LexRuntimeV2ClientResolvedConfig | config} for command's `input` shape.
|
|
67
|
-
*
|
|
68
|
-
*/
|
|
69
|
-
export class StartConversationCommand extends $Command<
|
|
70
|
-
StartConversationCommandInput,
|
|
71
|
-
StartConversationCommandOutput,
|
|
72
|
-
LexRuntimeV2ClientResolvedConfig
|
|
73
|
-
> {
|
|
74
|
-
// Start section: command_properties
|
|
75
|
-
// End section: command_properties
|
|
76
|
-
|
|
77
|
-
constructor(readonly input: StartConversationCommandInput) {
|
|
78
|
-
// Start section: command_constructor
|
|
79
|
-
super();
|
|
80
|
-
// End section: command_constructor
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
resolveMiddleware(
|
|
87
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
88
|
-
configuration: LexRuntimeV2ClientResolvedConfig,
|
|
89
|
-
options?: __HttpHandlerOptions
|
|
90
|
-
): Handler<StartConversationCommandInput, StartConversationCommandOutput> {
|
|
91
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
92
|
-
this.middlewareStack.use(getEventStreamPlugin(configuration));
|
|
93
|
-
|
|
94
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
95
|
-
|
|
96
|
-
const { logger } = configuration;
|
|
97
|
-
const clientName = "LexRuntimeV2Client";
|
|
98
|
-
const commandName = "StartConversationCommand";
|
|
99
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
100
|
-
logger,
|
|
101
|
-
clientName,
|
|
102
|
-
commandName,
|
|
103
|
-
inputFilterSensitiveLog: StartConversationRequest.filterSensitiveLog,
|
|
104
|
-
outputFilterSensitiveLog: StartConversationResponse.filterSensitiveLog,
|
|
105
|
-
};
|
|
106
|
-
const { requestHandler } = configuration;
|
|
107
|
-
return stack.resolve(
|
|
108
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
109
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
110
|
-
handlerExecutionContext
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
private serialize(
|
|
115
|
-
input: StartConversationCommandInput,
|
|
116
|
-
context: __SerdeContext & __EventStreamSerdeContext
|
|
117
|
-
): Promise<__HttpRequest> {
|
|
118
|
-
return serializeAws_restJson1StartConversationCommand(input, context);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
private deserialize(
|
|
122
|
-
output: __HttpResponse,
|
|
123
|
-
context: __SerdeContext & __EventStreamSerdeContext
|
|
124
|
-
): Promise<StartConversationCommandOutput> {
|
|
125
|
-
return deserializeAws_restJson1StartConversationCommand(output, context);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// Start section: command_body_extra
|
|
129
|
-
// End section: command_body_extra
|
|
130
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LexRuntimeV2.js","sourceRoot":"","sources":["../../LexRuntimeV2.ts"],"names":[],"mappings":";;;AAAA,6DAA0D;AAC1D,0EAIyC;AACzC,oEAAkH;AAClH,oEAAkH;AAClH,0EAIyC;AACzC,oFAI8C;AAC9C,kFAI6C;AAG7C;;GAEG;AACH,MAAa,YAAa,SAAQ,uCAAkB;IA8B3C,aAA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AAC;CACF;AAvCD,gDAuCC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteSessionCommand = void 0;
|
|
4
|
-
const models_0_1 = require("../models/models_0");
|
|
5
|
-
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
6
|
-
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
7
|
-
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
|
-
/**
|
|
9
|
-
* <p>Removes session information for a specified bot, alias, and user ID. </p>
|
|
10
|
-
* <p>You can use this operation to restart a conversation with a bot.
|
|
11
|
-
* When you remove a session, the entire history of the session is removed
|
|
12
|
-
* so that you can start again.</p>
|
|
13
|
-
* <p>You don't need to delete a session. Sessions have a time limit and
|
|
14
|
-
* will expire. Set the session time limit when you create the bot. The
|
|
15
|
-
* default is 5 minutes, but you can specify anything between 1 minute and
|
|
16
|
-
* 24 hours.</p>
|
|
17
|
-
* <p>If you specify a bot or alias ID that doesn't exist, you receive a
|
|
18
|
-
* <code>BadRequestException.</code>
|
|
19
|
-
* </p>
|
|
20
|
-
* <p>If the locale doesn't exist in the bot, or if the locale hasn't been
|
|
21
|
-
* enables for the alias, you receive a
|
|
22
|
-
* <code>BadRequestException</code>.</p>
|
|
23
|
-
* @example
|
|
24
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
25
|
-
* ```javascript
|
|
26
|
-
* import { LexRuntimeV2Client, DeleteSessionCommand } from "@aws-sdk/client-lex-runtime-v2"; // ES Modules import
|
|
27
|
-
* // const { LexRuntimeV2Client, DeleteSessionCommand } = require("@aws-sdk/client-lex-runtime-v2"); // CommonJS import
|
|
28
|
-
* const client = new LexRuntimeV2Client(config);
|
|
29
|
-
* const command = new DeleteSessionCommand(input);
|
|
30
|
-
* const response = await client.send(command);
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* @see {@link DeleteSessionCommandInput} for command's `input` shape.
|
|
34
|
-
* @see {@link DeleteSessionCommandOutput} for command's `response` shape.
|
|
35
|
-
* @see {@link LexRuntimeV2ClientResolvedConfig | config} for command's `input` shape.
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
class DeleteSessionCommand extends smithy_client_1.Command {
|
|
39
|
-
// Start section: command_properties
|
|
40
|
-
// End section: command_properties
|
|
41
|
-
constructor(input) {
|
|
42
|
-
// Start section: command_constructor
|
|
43
|
-
super();
|
|
44
|
-
this.input = input;
|
|
45
|
-
// End section: command_constructor
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
50
|
-
resolveMiddleware(clientStack, configuration, options) {
|
|
51
|
-
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
52
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
53
|
-
const { logger } = configuration;
|
|
54
|
-
const clientName = "LexRuntimeV2Client";
|
|
55
|
-
const commandName = "DeleteSessionCommand";
|
|
56
|
-
const handlerExecutionContext = {
|
|
57
|
-
logger,
|
|
58
|
-
clientName,
|
|
59
|
-
commandName,
|
|
60
|
-
inputFilterSensitiveLog: models_0_1.DeleteSessionRequest.filterSensitiveLog,
|
|
61
|
-
outputFilterSensitiveLog: models_0_1.DeleteSessionResponse.filterSensitiveLog,
|
|
62
|
-
};
|
|
63
|
-
const { requestHandler } = configuration;
|
|
64
|
-
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
65
|
-
}
|
|
66
|
-
serialize(input, context) {
|
|
67
|
-
return Aws_restJson1_1.serializeAws_restJson1DeleteSessionCommand(input, context);
|
|
68
|
-
}
|
|
69
|
-
deserialize(output, context) {
|
|
70
|
-
return Aws_restJson1_1.deserializeAws_restJson1DeleteSessionCommand(output, context);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.DeleteSessionCommand = DeleteSessionCommand;
|
|
74
|
-
//# sourceMappingURL=DeleteSessionCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteSessionCommand.js","sourceRoot":"","sources":["../../../commands/DeleteSessionCommand.ts"],"names":[],"mappings":";;;AACA,iDAAiF;AACjF,8DAGoC;AACpC,gEAA2D;AAE3D,0DAA6D;AAc7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,oBAAqB,SAAQ,uBAIzC;IACC,oCAAoC;IACpC,kCAAkC;IAElC,YAAqB,KAAgC;QACnD,qCAAqC;QACrC,KAAK,EAAE,CAAC;QAFW,UAAK,GAAL,KAAK,CAA2B;QAGnD,mCAAmC;IACrC,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,WAAmE,EACnE,aAA+C,EAC/C,OAA8B;QAE9B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,iCAAc,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAE1F,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEvD,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,CAAC;QACjC,MAAM,UAAU,GAAG,oBAAoB,CAAC;QACxC,MAAM,WAAW,GAAG,sBAAsB,CAAC;QAC3C,MAAM,uBAAuB,GAA4B;YACvD,MAAM;YACN,UAAU;YACV,WAAW;YACX,uBAAuB,EAAE,+BAAoB,CAAC,kBAAkB;YAChE,wBAAwB,EAAE,gCAAqB,CAAC,kBAAkB;SACnE,CAAC;QACF,MAAM,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC;QACzC,OAAO,KAAK,CAAC,OAAO,CAClB,CAAC,OAAsC,EAAE,EAAE,CACzC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,OAAwB,EAAE,OAAO,IAAI,EAAE,CAAC,EACxE,uBAAuB,CACxB,CAAC;IACJ,CAAC;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