@aws-sdk/client-lex-runtime-service 3.36.0 → 3.39.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist-cjs/LexRuntimeService.js +0 -14
  3. package/dist-cjs/LexRuntimeServiceClient.js +0 -19
  4. package/dist-cjs/commands/DeleteSessionCommand.js +0 -25
  5. package/dist-cjs/commands/GetSessionCommand.js +0 -25
  6. package/dist-cjs/commands/PostContentCommand.js +0 -100
  7. package/dist-cjs/commands/PostTextCommand.js +0 -99
  8. package/dist-cjs/commands/PutSessionCommand.js +0 -28
  9. package/dist-cjs/commands/index.js +8 -0
  10. package/dist-cjs/endpoints.js +6 -1
  11. package/dist-cjs/index.js +3 -7
  12. package/dist-cjs/models/models_0.js +0 -93
  13. package/dist-cjs/protocols/Aws_restJson1.js +0 -5
  14. package/dist-cjs/runtimeConfig.browser.js +1 -5
  15. package/dist-cjs/runtimeConfig.js +1 -5
  16. package/dist-cjs/runtimeConfig.native.js +0 -3
  17. package/dist-cjs/runtimeConfig.shared.js +0 -3
  18. package/dist-es/commands/index.js +5 -0
  19. package/dist-es/endpoints.js +6 -1
  20. package/dist-es/index.js +3 -7
  21. package/dist-types/commands/index.d.ts +5 -0
  22. package/dist-types/index.d.ts +3 -7
  23. package/dist-types/ts3.4/LexRuntimeService.d.ts +6 -186
  24. package/dist-types/ts3.4/LexRuntimeServiceClient.d.ts +24 -100
  25. package/dist-types/ts3.4/commands/DeleteSessionCommand.d.ts +2 -21
  26. package/dist-types/ts3.4/commands/GetSessionCommand.d.ts +2 -21
  27. package/dist-types/ts3.4/commands/PostContentCommand.d.ts +5 -103
  28. package/dist-types/ts3.4/commands/PostTextCommand.d.ts +2 -95
  29. package/dist-types/ts3.4/commands/PutSessionCommand.d.ts +2 -24
  30. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  31. package/dist-types/ts3.4/index.d.ts +3 -7
  32. package/dist-types/ts3.4/models/models_0.d.ts +73 -1543
  33. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  34. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  35. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  36. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  37. package/package.json +32 -32
@@ -4,18 +4,12 @@ exports.PutSessionResponse = exports.PutSessionRequest = exports.PostTextRespons
4
4
  const smithy_client_1 = require("@aws-sdk/smithy-client");
5
5
  var ActiveContextTimeToLive;
6
6
  (function (ActiveContextTimeToLive) {
7
- /**
8
- * @internal
9
- */
10
7
  ActiveContextTimeToLive.filterSensitiveLog = (obj) => ({
11
8
  ...obj,
12
9
  });
13
10
  })(ActiveContextTimeToLive = exports.ActiveContextTimeToLive || (exports.ActiveContextTimeToLive = {}));
14
11
  var ActiveContext;
15
12
  (function (ActiveContext) {
16
- /**
17
- * @internal
18
- */
19
13
  ActiveContext.filterSensitiveLog = (obj) => ({
20
14
  ...obj,
21
15
  ...(obj.parameters && { parameters: smithy_client_1.SENSITIVE_STRING }),
@@ -23,72 +17,48 @@ var ActiveContext;
23
17
  })(ActiveContext = exports.ActiveContext || (exports.ActiveContext = {}));
24
18
  var BadRequestException;
25
19
  (function (BadRequestException) {
26
- /**
27
- * @internal
28
- */
29
20
  BadRequestException.filterSensitiveLog = (obj) => ({
30
21
  ...obj,
31
22
  });
32
23
  })(BadRequestException = exports.BadRequestException || (exports.BadRequestException = {}));
33
24
  var ConflictException;
34
25
  (function (ConflictException) {
35
- /**
36
- * @internal
37
- */
38
26
  ConflictException.filterSensitiveLog = (obj) => ({
39
27
  ...obj,
40
28
  });
41
29
  })(ConflictException = exports.ConflictException || (exports.ConflictException = {}));
42
30
  var DeleteSessionRequest;
43
31
  (function (DeleteSessionRequest) {
44
- /**
45
- * @internal
46
- */
47
32
  DeleteSessionRequest.filterSensitiveLog = (obj) => ({
48
33
  ...obj,
49
34
  });
50
35
  })(DeleteSessionRequest = exports.DeleteSessionRequest || (exports.DeleteSessionRequest = {}));
51
36
  var DeleteSessionResponse;
52
37
  (function (DeleteSessionResponse) {
53
- /**
54
- * @internal
55
- */
56
38
  DeleteSessionResponse.filterSensitiveLog = (obj) => ({
57
39
  ...obj,
58
40
  });
59
41
  })(DeleteSessionResponse = exports.DeleteSessionResponse || (exports.DeleteSessionResponse = {}));
60
42
  var InternalFailureException;
61
43
  (function (InternalFailureException) {
62
- /**
63
- * @internal
64
- */
65
44
  InternalFailureException.filterSensitiveLog = (obj) => ({
66
45
  ...obj,
67
46
  });
68
47
  })(InternalFailureException = exports.InternalFailureException || (exports.InternalFailureException = {}));
69
48
  var LimitExceededException;
70
49
  (function (LimitExceededException) {
71
- /**
72
- * @internal
73
- */
74
50
  LimitExceededException.filterSensitiveLog = (obj) => ({
75
51
  ...obj,
76
52
  });
77
53
  })(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {}));
78
54
  var NotFoundException;
79
55
  (function (NotFoundException) {
80
- /**
81
- * @internal
82
- */
83
56
  NotFoundException.filterSensitiveLog = (obj) => ({
84
57
  ...obj,
85
58
  });
86
59
  })(NotFoundException = exports.NotFoundException || (exports.NotFoundException = {}));
87
60
  var GetSessionRequest;
88
61
  (function (GetSessionRequest) {
89
- /**
90
- * @internal
91
- */
92
62
  GetSessionRequest.filterSensitiveLog = (obj) => ({
93
63
  ...obj,
94
64
  });
@@ -116,9 +86,6 @@ var DialogActionType;
116
86
  })(DialogActionType = exports.DialogActionType || (exports.DialogActionType = {}));
117
87
  var DialogAction;
118
88
  (function (DialogAction) {
119
- /**
120
- * @internal
121
- */
122
89
  DialogAction.filterSensitiveLog = (obj) => ({
123
90
  ...obj,
124
91
  ...(obj.slots && { slots: smithy_client_1.SENSITIVE_STRING }),
@@ -133,9 +100,6 @@ var ConfirmationStatus;
133
100
  })(ConfirmationStatus = exports.ConfirmationStatus || (exports.ConfirmationStatus = {}));
134
101
  var IntentSummary;
135
102
  (function (IntentSummary) {
136
- /**
137
- * @internal
138
- */
139
103
  IntentSummary.filterSensitiveLog = (obj) => ({
140
104
  ...obj,
141
105
  ...(obj.slots && { slots: smithy_client_1.SENSITIVE_STRING }),
@@ -143,9 +107,6 @@ var IntentSummary;
143
107
  })(IntentSummary = exports.IntentSummary || (exports.IntentSummary = {}));
144
108
  var GetSessionResponse;
145
109
  (function (GetSessionResponse) {
146
- /**
147
- * @internal
148
- */
149
110
  GetSessionResponse.filterSensitiveLog = (obj) => ({
150
111
  ...obj,
151
112
  ...(obj.recentIntentSummaryView && {
@@ -158,45 +119,30 @@ var GetSessionResponse;
158
119
  })(GetSessionResponse = exports.GetSessionResponse || (exports.GetSessionResponse = {}));
159
120
  var BadGatewayException;
160
121
  (function (BadGatewayException) {
161
- /**
162
- * @internal
163
- */
164
122
  BadGatewayException.filterSensitiveLog = (obj) => ({
165
123
  ...obj,
166
124
  });
167
125
  })(BadGatewayException = exports.BadGatewayException || (exports.BadGatewayException = {}));
168
126
  var DependencyFailedException;
169
127
  (function (DependencyFailedException) {
170
- /**
171
- * @internal
172
- */
173
128
  DependencyFailedException.filterSensitiveLog = (obj) => ({
174
129
  ...obj,
175
130
  });
176
131
  })(DependencyFailedException = exports.DependencyFailedException || (exports.DependencyFailedException = {}));
177
132
  var LoopDetectedException;
178
133
  (function (LoopDetectedException) {
179
- /**
180
- * @internal
181
- */
182
134
  LoopDetectedException.filterSensitiveLog = (obj) => ({
183
135
  ...obj,
184
136
  });
185
137
  })(LoopDetectedException = exports.LoopDetectedException || (exports.LoopDetectedException = {}));
186
138
  var NotAcceptableException;
187
139
  (function (NotAcceptableException) {
188
- /**
189
- * @internal
190
- */
191
140
  NotAcceptableException.filterSensitiveLog = (obj) => ({
192
141
  ...obj,
193
142
  });
194
143
  })(NotAcceptableException = exports.NotAcceptableException || (exports.NotAcceptableException = {}));
195
144
  var PostContentRequest;
196
145
  (function (PostContentRequest) {
197
- /**
198
- * @internal
199
- */
200
146
  PostContentRequest.filterSensitiveLog = (obj) => ({
201
147
  ...obj,
202
148
  ...(obj.sessionAttributes && { sessionAttributes: smithy_client_1.SENSITIVE_STRING }),
@@ -215,9 +161,6 @@ var DialogState;
215
161
  })(DialogState = exports.DialogState || (exports.DialogState = {}));
216
162
  var PostContentResponse;
217
163
  (function (PostContentResponse) {
218
- /**
219
- * @internal
220
- */
221
164
  PostContentResponse.filterSensitiveLog = (obj) => ({
222
165
  ...obj,
223
166
  ...(obj.message && { message: smithy_client_1.SENSITIVE_STRING }),
@@ -228,27 +171,18 @@ var PostContentResponse;
228
171
  })(PostContentResponse = exports.PostContentResponse || (exports.PostContentResponse = {}));
229
172
  var RequestTimeoutException;
230
173
  (function (RequestTimeoutException) {
231
- /**
232
- * @internal
233
- */
234
174
  RequestTimeoutException.filterSensitiveLog = (obj) => ({
235
175
  ...obj,
236
176
  });
237
177
  })(RequestTimeoutException = exports.RequestTimeoutException || (exports.RequestTimeoutException = {}));
238
178
  var UnsupportedMediaTypeException;
239
179
  (function (UnsupportedMediaTypeException) {
240
- /**
241
- * @internal
242
- */
243
180
  UnsupportedMediaTypeException.filterSensitiveLog = (obj) => ({
244
181
  ...obj,
245
182
  });
246
183
  })(UnsupportedMediaTypeException = exports.UnsupportedMediaTypeException || (exports.UnsupportedMediaTypeException = {}));
247
184
  var PostTextRequest;
248
185
  (function (PostTextRequest) {
249
- /**
250
- * @internal
251
- */
252
186
  PostTextRequest.filterSensitiveLog = (obj) => ({
253
187
  ...obj,
254
188
  ...(obj.sessionAttributes && { sessionAttributes: smithy_client_1.SENSITIVE_STRING }),
@@ -259,18 +193,12 @@ var PostTextRequest;
259
193
  })(PostTextRequest = exports.PostTextRequest || (exports.PostTextRequest = {}));
260
194
  var IntentConfidence;
261
195
  (function (IntentConfidence) {
262
- /**
263
- * @internal
264
- */
265
196
  IntentConfidence.filterSensitiveLog = (obj) => ({
266
197
  ...obj,
267
198
  });
268
199
  })(IntentConfidence = exports.IntentConfidence || (exports.IntentConfidence = {}));
269
200
  var PredictedIntent;
270
201
  (function (PredictedIntent) {
271
- /**
272
- * @internal
273
- */
274
202
  PredictedIntent.filterSensitiveLog = (obj) => ({
275
203
  ...obj,
276
204
  ...(obj.slots && { slots: smithy_client_1.SENSITIVE_STRING }),
@@ -282,45 +210,30 @@ var ContentType;
282
210
  })(ContentType = exports.ContentType || (exports.ContentType = {}));
283
211
  var Button;
284
212
  (function (Button) {
285
- /**
286
- * @internal
287
- */
288
213
  Button.filterSensitiveLog = (obj) => ({
289
214
  ...obj,
290
215
  });
291
216
  })(Button = exports.Button || (exports.Button = {}));
292
217
  var GenericAttachment;
293
218
  (function (GenericAttachment) {
294
- /**
295
- * @internal
296
- */
297
219
  GenericAttachment.filterSensitiveLog = (obj) => ({
298
220
  ...obj,
299
221
  });
300
222
  })(GenericAttachment = exports.GenericAttachment || (exports.GenericAttachment = {}));
301
223
  var ResponseCard;
302
224
  (function (ResponseCard) {
303
- /**
304
- * @internal
305
- */
306
225
  ResponseCard.filterSensitiveLog = (obj) => ({
307
226
  ...obj,
308
227
  });
309
228
  })(ResponseCard = exports.ResponseCard || (exports.ResponseCard = {}));
310
229
  var SentimentResponse;
311
230
  (function (SentimentResponse) {
312
- /**
313
- * @internal
314
- */
315
231
  SentimentResponse.filterSensitiveLog = (obj) => ({
316
232
  ...obj,
317
233
  });
318
234
  })(SentimentResponse = exports.SentimentResponse || (exports.SentimentResponse = {}));
319
235
  var PostTextResponse;
320
236
  (function (PostTextResponse) {
321
- /**
322
- * @internal
323
- */
324
237
  PostTextResponse.filterSensitiveLog = (obj) => ({
325
238
  ...obj,
326
239
  ...(obj.alternativeIntents && {
@@ -334,9 +247,6 @@ var PostTextResponse;
334
247
  })(PostTextResponse = exports.PostTextResponse || (exports.PostTextResponse = {}));
335
248
  var PutSessionRequest;
336
249
  (function (PutSessionRequest) {
337
- /**
338
- * @internal
339
- */
340
250
  PutSessionRequest.filterSensitiveLog = (obj) => ({
341
251
  ...obj,
342
252
  ...(obj.sessionAttributes && { sessionAttributes: smithy_client_1.SENSITIVE_STRING }),
@@ -349,9 +259,6 @@ var PutSessionRequest;
349
259
  })(PutSessionRequest = exports.PutSessionRequest || (exports.PutSessionRequest = {}));
350
260
  var PutSessionResponse;
351
261
  (function (PutSessionResponse) {
352
- /**
353
- * @internal
354
- */
355
262
  PutSessionResponse.filterSensitiveLog = (obj) => ({
356
263
  ...obj,
357
264
  ...(obj.message && { message: smithy_client_1.SENSITIVE_STRING }),
@@ -1381,14 +1381,12 @@ const deserializeMetadata = (output) => {
1381
1381
  cfId: output.headers["x-amz-cf-id"],
1382
1382
  });
1383
1383
  };
1384
- // Collect low-level response body stream to Uint8Array.
1385
1384
  const collectBody = (streamBody = new Uint8Array(), context) => {
1386
1385
  if (streamBody instanceof Uint8Array) {
1387
1386
  return Promise.resolve(streamBody);
1388
1387
  }
1389
1388
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1390
1389
  };
1391
- // Encode Uint8Array data into string with utf-8.
1392
1390
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1393
1391
  const isSerializableHeaderValue = (value) => value !== undefined &&
1394
1392
  value !== null &&
@@ -1401,9 +1399,6 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1401
1399
  }
1402
1400
  return {};
1403
1401
  });
1404
- /**
1405
- * Load an error code for the aws.rest-json-1.1 protocol.
1406
- */
1407
1402
  const loadRestJsonErrorCode = (output, data) => {
1408
1403
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1409
1404
  const sanitizeErrorCode = (rawValue) => {
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
- // @ts-ignore: package.json will be imported from dist folders
6
- const package_json_1 = tslib_1.__importDefault(require("../package.json")); // eslint-disable-line
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
7
6
  const sha256_browser_1 = require("@aws-crypto/sha256-browser");
8
7
  const fetch_http_handler_1 = require("@aws-sdk/fetch-http-handler");
9
8
  const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
@@ -13,9 +12,6 @@ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
13
12
  const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
14
13
  const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
15
14
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
- /**
17
- * @internal
18
- */
19
15
  const getRuntimeConfig = (config) => {
20
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
21
17
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
- // @ts-ignore: package.json will be imported from dist folders
6
- const package_json_1 = tslib_1.__importDefault(require("../package.json")); // eslint-disable-line
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
7
6
  const client_sts_1 = require("@aws-sdk/client-sts");
8
7
  const config_resolver_1 = require("@aws-sdk/config-resolver");
9
8
  const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
@@ -17,9 +16,6 @@ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
17
16
  const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
18
17
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
19
18
  const smithy_client_1 = require("@aws-sdk/smithy-client");
20
- /**
21
- * @internal
22
- */
23
19
  const getRuntimeConfig = (config) => {
24
20
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
25
21
  smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
@@ -3,9 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const sha256_js_1 = require("@aws-crypto/sha256-js");
5
5
  const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
- /**
7
- * @internal
8
- */
9
6
  const getRuntimeConfig = (config) => {
10
7
  var _a;
11
8
  const browserDefaults = runtimeConfig_browser_1.getRuntimeConfig(config);
@@ -3,9 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const url_parser_1 = require("@aws-sdk/url-parser");
5
5
  const endpoints_1 = require("./endpoints");
6
- /**
7
- * @internal
8
- */
9
6
  const getRuntimeConfig = (config) => {
10
7
  var _a, _b, _c, _d, _e;
11
8
  return ({
@@ -0,0 +1,5 @@
1
+ export * from "./DeleteSessionCommand";
2
+ export * from "./GetSessionCommand";
3
+ export * from "./PostContentCommand";
4
+ export * from "./PostTextCommand";
5
+ export * from "./PutSessionCommand";
@@ -41,22 +41,27 @@ var partitionHash = {
41
41
  "us-west-2",
42
42
  "us-west-2-fips",
43
43
  ],
44
+ regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
44
45
  hostname: "runtime.lex.{region}.amazonaws.com",
45
46
  },
46
47
  "aws-cn": {
47
48
  regions: ["cn-north-1", "cn-northwest-1"],
49
+ regionRegex: "^cn\\-\\w+\\-\\d+$",
48
50
  hostname: "runtime.lex.{region}.amazonaws.com.cn",
49
51
  },
50
52
  "aws-iso": {
51
- regions: ["us-iso-east-1"],
53
+ regions: ["us-iso-east-1", "us-iso-west-1"],
54
+ regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
52
55
  hostname: "runtime.lex.{region}.c2s.ic.gov",
53
56
  },
54
57
  "aws-iso-b": {
55
58
  regions: ["us-isob-east-1"],
59
+ regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
56
60
  hostname: "runtime.lex.{region}.sc2s.sgov.gov",
57
61
  },
58
62
  "aws-us-gov": {
59
63
  regions: ["us-gov-east-1", "us-gov-west-1", "us-gov-west-1-fips"],
64
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
60
65
  hostname: "runtime.lex.{region}.amazonaws.com",
61
66
  },
62
67
  };
package/dist-es/index.js CHANGED
@@ -1,8 +1,4 @@
1
- export * from "./LexRuntimeServiceClient";
2
1
  export * from "./LexRuntimeService";
3
- export * from "./commands/DeleteSessionCommand";
4
- export * from "./commands/GetSessionCommand";
5
- export * from "./commands/PostContentCommand";
6
- export * from "./commands/PostTextCommand";
7
- export * from "./commands/PutSessionCommand";
8
- export * from "./models/index";
2
+ export * from "./LexRuntimeServiceClient";
3
+ export * from "./commands";
4
+ export * from "./models";
@@ -0,0 +1,5 @@
1
+ export * from "./DeleteSessionCommand";
2
+ export * from "./GetSessionCommand";
3
+ export * from "./PostContentCommand";
4
+ export * from "./PostTextCommand";
5
+ export * from "./PutSessionCommand";
@@ -1,8 +1,4 @@
1
- export * from "./LexRuntimeServiceClient";
2
1
  export * from "./LexRuntimeService";
3
- export * from "./commands/DeleteSessionCommand";
4
- export * from "./commands/GetSessionCommand";
5
- export * from "./commands/PostContentCommand";
6
- export * from "./commands/PostTextCommand";
7
- export * from "./commands/PutSessionCommand";
8
- export * from "./models/index";
2
+ export * from "./LexRuntimeServiceClient";
3
+ export * from "./commands";
4
+ export * from "./models";
@@ -5,205 +5,25 @@ import { PostContentCommandInput, PostContentCommandOutput } from "./commands/Po
5
5
  import { PostTextCommandInput, PostTextCommandOutput } from "./commands/PostTextCommand";
6
6
  import { PutSessionCommandInput, PutSessionCommandOutput } from "./commands/PutSessionCommand";
7
7
  import { LexRuntimeServiceClient } from "./LexRuntimeServiceClient";
8
- /**
9
- * <p>Amazon Lex provides both build and runtime endpoints. Each endpoint
10
- * provides a set of operations (API). Your conversational bot uses the
11
- * runtime API to understand user utterances (user input text or voice). For
12
- * example, suppose a user says "I want pizza", your bot sends this input to
13
- * Amazon Lex using the runtime API. Amazon Lex recognizes that the user
14
- * request is for the OrderPizza intent (one of the intents defined in the
15
- * bot). Then Amazon Lex engages in user conversation on behalf of the bot to
16
- * elicit required information (slot values, such as pizza size and crust
17
- * type), and then performs fulfillment activity (that you configured when
18
- * you created the bot). You use the build-time API to create and manage your
19
- * Amazon Lex bot. For a list of build-time operations, see the build-time
20
- * API, . </p>
21
- */
8
+
22
9
  export declare class LexRuntimeService extends LexRuntimeServiceClient {
23
- /**
24
- * <p>Removes session information for a specified bot, alias, and user ID.
25
- * </p>
26
- */
10
+
27
11
  deleteSession(args: DeleteSessionCommandInput, options?: __HttpHandlerOptions): Promise<DeleteSessionCommandOutput>;
28
12
  deleteSession(args: DeleteSessionCommandInput, cb: (err: any, data?: DeleteSessionCommandOutput) => void): void;
29
13
  deleteSession(args: DeleteSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteSessionCommandOutput) => void): void;
30
- /**
31
- * <p>Returns session information for a specified bot, alias, and user
32
- * ID.</p>
33
- */
14
+
34
15
  getSession(args: GetSessionCommandInput, options?: __HttpHandlerOptions): Promise<GetSessionCommandOutput>;
35
16
  getSession(args: GetSessionCommandInput, cb: (err: any, data?: GetSessionCommandOutput) => void): void;
36
17
  getSession(args: GetSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetSessionCommandOutput) => void): void;
37
- /**
38
- * <p> Sends user input (text or speech) to Amazon Lex. Clients use this API to
39
- * send text and audio requests to Amazon Lex at runtime. Amazon Lex interprets the
40
- * user input using the machine learning model that it built for the bot. </p>
41
- * <p>The <code>PostContent</code> operation supports audio input at 8kHz
42
- * and 16kHz. You can use 8kHz audio to achieve higher speech recognition
43
- * accuracy in telephone audio applications. </p>
44
- * <p> In response, Amazon Lex returns the next message to convey to the user.
45
- * Consider the following example messages: </p>
46
- * <ul>
47
- * <li>
48
- * <p> For a user input "I would like a pizza," Amazon Lex might return a
49
- * response with a message eliciting slot data (for example,
50
- * <code>PizzaSize</code>): "What size pizza would you like?". </p>
51
- * </li>
52
- * <li>
53
- * <p> After the user provides all of the pizza order information, Amazon Lex
54
- * might return a response with a message to get user confirmation:
55
- * "Order the pizza?". </p>
56
- * </li>
57
- * <li>
58
- * <p> After the user replies "Yes" to the confirmation prompt, Amazon Lex
59
- * might return a conclusion statement: "Thank you, your cheese pizza has
60
- * been ordered.". </p>
61
- * </li>
62
- * </ul>
63
- * <p> Not all Amazon Lex messages require a response from the user. For example,
64
- * conclusion statements do not require a response. Some messages require
65
- * only a yes or no response. In addition to the <code>message</code>, Amazon Lex
66
- * provides additional context about the message in the response that you can
67
- * use to enhance client behavior, such as displaying the appropriate client
68
- * user interface. Consider the following examples: </p>
69
- * <ul>
70
- * <li>
71
- * <p> If the message is to elicit slot data, Amazon Lex returns the
72
- * following context information: </p>
73
- * <ul>
74
- * <li>
75
- * <p>
76
- * <code>x-amz-lex-dialog-state</code> header set to
77
- * <code>ElicitSlot</code>
78
- * </p>
79
- * </li>
80
- * <li>
81
- * <p>
82
- * <code>x-amz-lex-intent-name</code> header set to the intent name
83
- * in the current context </p>
84
- * </li>
85
- * <li>
86
- * <p>
87
- * <code>x-amz-lex-slot-to-elicit</code> header set to the slot name
88
- * for which the <code>message</code> is eliciting information
89
- * </p>
90
- * </li>
91
- * <li>
92
- * <p>
93
- * <code>x-amz-lex-slots</code> header set to a map of slots
94
- * configured for the intent with their current values </p>
95
- * </li>
96
- * </ul>
97
- * </li>
98
- * <li>
99
- * <p> If the message is a confirmation prompt, the
100
- * <code>x-amz-lex-dialog-state</code> header is set to
101
- * <code>Confirmation</code> and the
102
- * <code>x-amz-lex-slot-to-elicit</code> header is omitted. </p>
103
- * </li>
104
- * <li>
105
- * <p> If the message is a clarification prompt configured for the
106
- * intent, indicating that the user intent is not understood, the
107
- * <code>x-amz-dialog-state</code> header is set to
108
- * <code>ElicitIntent</code> and the <code>x-amz-slot-to-elicit</code>
109
- * header is omitted. </p>
110
- * </li>
111
- * </ul>
112
- * <p> In addition, Amazon Lex also returns your application-specific
113
- * <code>sessionAttributes</code>. For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html">Managing
114
- * Conversation Context</a>. </p>
115
- */
18
+
116
19
  postContent(args: PostContentCommandInput, options?: __HttpHandlerOptions): Promise<PostContentCommandOutput>;
117
20
  postContent(args: PostContentCommandInput, cb: (err: any, data?: PostContentCommandOutput) => void): void;
118
21
  postContent(args: PostContentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PostContentCommandOutput) => void): void;
119
- /**
120
- * <p>Sends user input to Amazon Lex. Client applications can use this API to
121
- * send requests to Amazon Lex at runtime. Amazon Lex then interprets the user input
122
- * using the machine learning model it built for the bot. </p>
123
- * <p> In response, Amazon Lex returns the next <code>message</code> to convey to
124
- * the user an optional <code>responseCard</code> to display. Consider the
125
- * following example messages: </p>
126
- * <ul>
127
- * <li>
128
- * <p> For a user input "I would like a pizza", Amazon Lex might return a
129
- * response with a message eliciting slot data (for example, PizzaSize):
130
- * "What size pizza would you like?" </p>
131
- * </li>
132
- * <li>
133
- * <p> After the user provides all of the pizza order information,
134
- * Amazon Lex might return a response with a message to obtain user
135
- * confirmation "Proceed with the pizza order?". </p>
136
- * </li>
137
- * <li>
138
- * <p> After the user replies to a confirmation prompt with a "yes",
139
- * Amazon Lex might return a conclusion statement: "Thank you, your cheese
140
- * pizza has been ordered.". </p>
141
- * </li>
142
- * </ul>
143
- *
144
- * <p> Not all Amazon Lex messages require a user response. For example, a
145
- * conclusion statement does not require a response. Some messages require
146
- * only a "yes" or "no" user response. In addition to the
147
- * <code>message</code>, Amazon Lex provides additional context about the
148
- * message in the response that you might use to enhance client behavior, for
149
- * example, to display the appropriate client user interface. These are the
150
- * <code>slotToElicit</code>, <code>dialogState</code>,
151
- * <code>intentName</code>, and <code>slots</code> fields in the response.
152
- * Consider the following examples: </p>
153
- *
154
- * <ul>
155
- * <li>
156
- * <p>If the message is to elicit slot data, Amazon Lex returns the
157
- * following context information:</p>
158
- * <ul>
159
- * <li>
160
- * <p>
161
- * <code>dialogState</code> set to ElicitSlot </p>
162
- * </li>
163
- * <li>
164
- * <p>
165
- * <code>intentName</code> set to the intent name in the current
166
- * context </p>
167
- * </li>
168
- * <li>
169
- * <p>
170
- * <code>slotToElicit</code> set to the slot name for which the
171
- * <code>message</code> is eliciting information </p>
172
- * </li>
173
- * <li>
174
- * <p>
175
- * <code>slots</code> set to a map of slots, configured for the
176
- * intent, with currently known values </p>
177
- * </li>
178
- * </ul>
179
- * </li>
180
- * <li>
181
- * <p> If the message is a confirmation prompt, the
182
- * <code>dialogState</code> is set to ConfirmIntent and
183
- * <code>SlotToElicit</code> is set to null. </p>
184
- * </li>
185
- * <li>
186
- * <p>If the message is a clarification prompt (configured for the
187
- * intent) that indicates that user intent is not understood, the
188
- * <code>dialogState</code> is set to ElicitIntent and
189
- * <code>slotToElicit</code> is set to null. </p>
190
- * </li>
191
- * </ul>
192
- *
193
- * <p> In addition, Amazon Lex also returns your application-specific
194
- * <code>sessionAttributes</code>. For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html">Managing
195
- * Conversation Context</a>. </p>
196
- */
22
+
197
23
  postText(args: PostTextCommandInput, options?: __HttpHandlerOptions): Promise<PostTextCommandOutput>;
198
24
  postText(args: PostTextCommandInput, cb: (err: any, data?: PostTextCommandOutput) => void): void;
199
25
  postText(args: PostTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PostTextCommandOutput) => void): void;
200
- /**
201
- * <p>Creates a new session or modifies an existing session with an Amazon Lex
202
- * bot. Use this operation to enable your application to set the state of the
203
- * bot.</p>
204
- * <p>For more information, see <a href="https://docs.aws.amazon.com/lex/latest/dg/how-session-api.html">Managing
205
- * Sessions</a>.</p>
206
- */
26
+
207
27
  putSession(args: PutSessionCommandInput, options?: __HttpHandlerOptions): Promise<PutSessionCommandOutput>;
208
28
  putSession(args: PutSessionCommandInput, cb: (err: any, data?: PutSessionCommandOutput) => void): void;
209
29
  putSession(args: PutSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutSessionCommandOutput) => void): void;