@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,78 +1,17 @@
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 { PostContentCommand } from "./commands/PostContentCommand";
4
5
  import { PostTextCommand } from "./commands/PostTextCommand";
5
6
  import { PutSessionCommand } from "./commands/PutSessionCommand";
6
7
  import { LexRuntimeServiceClient } from "./LexRuntimeServiceClient";
8
+ const commands = {
9
+ DeleteSessionCommand,
10
+ GetSessionCommand,
11
+ PostContentCommand,
12
+ PostTextCommand,
13
+ PutSessionCommand,
14
+ };
7
15
  export class LexRuntimeService extends LexRuntimeServiceClient {
8
- deleteSession(args, optionsOrCb, cb) {
9
- const command = new DeleteSessionCommand(args);
10
- if (typeof optionsOrCb === "function") {
11
- this.send(command, optionsOrCb);
12
- }
13
- else if (typeof cb === "function") {
14
- if (typeof optionsOrCb !== "object")
15
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
16
- this.send(command, optionsOrCb || {}, cb);
17
- }
18
- else {
19
- return this.send(command, optionsOrCb);
20
- }
21
- }
22
- getSession(args, optionsOrCb, cb) {
23
- const command = new GetSessionCommand(args);
24
- if (typeof optionsOrCb === "function") {
25
- this.send(command, optionsOrCb);
26
- }
27
- else if (typeof cb === "function") {
28
- if (typeof optionsOrCb !== "object")
29
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
30
- this.send(command, optionsOrCb || {}, cb);
31
- }
32
- else {
33
- return this.send(command, optionsOrCb);
34
- }
35
- }
36
- postContent(args, optionsOrCb, cb) {
37
- const command = new PostContentCommand(args);
38
- if (typeof optionsOrCb === "function") {
39
- this.send(command, optionsOrCb);
40
- }
41
- else if (typeof cb === "function") {
42
- if (typeof optionsOrCb !== "object")
43
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
44
- this.send(command, optionsOrCb || {}, cb);
45
- }
46
- else {
47
- return this.send(command, optionsOrCb);
48
- }
49
- }
50
- postText(args, optionsOrCb, cb) {
51
- const command = new PostTextCommand(args);
52
- if (typeof optionsOrCb === "function") {
53
- this.send(command, optionsOrCb);
54
- }
55
- else if (typeof cb === "function") {
56
- if (typeof optionsOrCb !== "object")
57
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
58
- this.send(command, optionsOrCb || {}, cb);
59
- }
60
- else {
61
- return this.send(command, optionsOrCb);
62
- }
63
- }
64
- putSession(args, optionsOrCb, cb) {
65
- const command = new PutSessionCommand(args);
66
- if (typeof optionsOrCb === "function") {
67
- this.send(command, optionsOrCb);
68
- }
69
- else if (typeof cb === "function") {
70
- if (typeof optionsOrCb !== "object")
71
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
72
- this.send(command, optionsOrCb || {}, cb);
73
- }
74
- else {
75
- return this.send(command, optionsOrCb);
76
- }
77
- }
78
16
  }
17
+ createAggregatedClient(commands, LexRuntimeService);