@aws-sdk/client-lex-runtime-service 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,82 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LexRuntimeService = 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 PostContentCommand_1 = require("./commands/PostContentCommand");
7
8
  const PostTextCommand_1 = require("./commands/PostTextCommand");
8
9
  const PutSessionCommand_1 = require("./commands/PutSessionCommand");
9
10
  const LexRuntimeServiceClient_1 = require("./LexRuntimeServiceClient");
11
+ const commands = {
12
+ DeleteSessionCommand: DeleteSessionCommand_1.DeleteSessionCommand,
13
+ GetSessionCommand: GetSessionCommand_1.GetSessionCommand,
14
+ PostContentCommand: PostContentCommand_1.PostContentCommand,
15
+ PostTextCommand: PostTextCommand_1.PostTextCommand,
16
+ PutSessionCommand: PutSessionCommand_1.PutSessionCommand,
17
+ };
10
18
  class LexRuntimeService extends LexRuntimeServiceClient_1.LexRuntimeServiceClient {
11
- deleteSession(args, optionsOrCb, cb) {
12
- const command = new DeleteSessionCommand_1.DeleteSessionCommand(args);
13
- if (typeof optionsOrCb === "function") {
14
- this.send(command, optionsOrCb);
15
- }
16
- else if (typeof cb === "function") {
17
- if (typeof optionsOrCb !== "object")
18
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
19
- this.send(command, optionsOrCb || {}, cb);
20
- }
21
- else {
22
- return this.send(command, optionsOrCb);
23
- }
24
- }
25
- getSession(args, optionsOrCb, cb) {
26
- const command = new GetSessionCommand_1.GetSessionCommand(args);
27
- if (typeof optionsOrCb === "function") {
28
- this.send(command, optionsOrCb);
29
- }
30
- else if (typeof cb === "function") {
31
- if (typeof optionsOrCb !== "object")
32
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
33
- this.send(command, optionsOrCb || {}, cb);
34
- }
35
- else {
36
- return this.send(command, optionsOrCb);
37
- }
38
- }
39
- postContent(args, optionsOrCb, cb) {
40
- const command = new PostContentCommand_1.PostContentCommand(args);
41
- if (typeof optionsOrCb === "function") {
42
- this.send(command, optionsOrCb);
43
- }
44
- else if (typeof cb === "function") {
45
- if (typeof optionsOrCb !== "object")
46
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
47
- this.send(command, optionsOrCb || {}, cb);
48
- }
49
- else {
50
- return this.send(command, optionsOrCb);
51
- }
52
- }
53
- postText(args, optionsOrCb, cb) {
54
- const command = new PostTextCommand_1.PostTextCommand(args);
55
- if (typeof optionsOrCb === "function") {
56
- this.send(command, optionsOrCb);
57
- }
58
- else if (typeof cb === "function") {
59
- if (typeof optionsOrCb !== "object")
60
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
61
- this.send(command, optionsOrCb || {}, cb);
62
- }
63
- else {
64
- return this.send(command, optionsOrCb);
65
- }
66
- }
67
- putSession(args, optionsOrCb, cb) {
68
- const command = new PutSessionCommand_1.PutSessionCommand(args);
69
- if (typeof optionsOrCb === "function") {
70
- this.send(command, optionsOrCb);
71
- }
72
- else if (typeof cb === "function") {
73
- if (typeof optionsOrCb !== "object")
74
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
75
- this.send(command, optionsOrCb || {}, cb);
76
- }
77
- else {
78
- return this.send(command, optionsOrCb);
79
- }
80
- }
81
19
  }
82
20
  exports.LexRuntimeService = LexRuntimeService;
21
+ (0, smithy_client_1.createAggregatedClient)(commands, LexRuntimeService);