@aws-sdk/client-lex-runtime-v2 3.312.0 → 3.316.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.
@@ -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);