@aws-sdk/client-lex-runtime-v2 3.163.0 → 3.169.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 CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.169.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.168.0...v3.169.0) (2022-09-12)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-lex-runtime-v2
9
+
10
+
11
+
12
+
13
+
14
+ # [3.168.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.167.0...v3.168.0) (2022-09-09)
15
+
16
+
17
+ ### Features
18
+
19
+ * **client-lex-runtime-v2:** This release is for supporting Composite Slot Type feature in AWS Lex V2. Composite Slot Type will help developer to logically group coherent slots and maintain their inter-relationships in runtime conversation. ([e01fa5e](https://github.com/aws/aws-sdk-js-v3/commit/e01fa5e3aacf7cdafc7c92ebdedc7dc2390abb7d))
20
+
21
+
22
+
23
+
24
+
25
+ # [3.165.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.164.0...v3.165.0) (2022-09-06)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-lex-runtime-v2
28
+
29
+
30
+
31
+
32
+
6
33
  # [3.163.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.162.0...v3.163.0) (2022-09-01)
7
34
 
8
35
  **Note:** Version bump only for package @aws-sdk/client-lex-runtime-v2
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SlotFilterSensitiveLog = exports.TranscriptEventFilterSensitiveLog = exports.TextResponseEventFilterSensitiveLog = exports.PlaybackInterruptionEventFilterSensitiveLog = exports.HeartbeatEventFilterSensitiveLog = exports.TextInputEventFilterSensitiveLog = exports.PlaybackCompletionEventFilterSensitiveLog = exports.DTMFInputEventFilterSensitiveLog = exports.DisconnectionEventFilterSensitiveLog = exports.RecognizeUtteranceResponseFilterSensitiveLog = exports.RecognizeUtteranceRequestFilterSensitiveLog = exports.PutSessionResponseFilterSensitiveLog = exports.RuntimeHintsFilterSensitiveLog = exports.RuntimeHintDetailsFilterSensitiveLog = exports.RuntimeHintValueFilterSensitiveLog = exports.DialogActionFilterSensitiveLog = exports.MessageFilterSensitiveLog = exports.ImageResponseCardFilterSensitiveLog = exports.ButtonFilterSensitiveLog = exports.SentimentResponseFilterSensitiveLog = exports.SentimentScoreFilterSensitiveLog = exports.ConfidenceScoreFilterSensitiveLog = exports.ValueFilterSensitiveLog = exports.GetSessionRequestFilterSensitiveLog = exports.DeleteSessionResponseFilterSensitiveLog = exports.DeleteSessionRequestFilterSensitiveLog = exports.AudioResponseEventFilterSensitiveLog = exports.AudioInputEventFilterSensitiveLog = exports.ActiveContextFilterSensitiveLog = exports.ActiveContextTimeToLiveFilterSensitiveLog = exports.StartConversationResponseEventStream = exports.StartConversationRequestEventStream = exports.PlaybackInterruptionReason = exports.InputMode = exports.ConversationMode = exports.DependencyFailedException = exports.BadGatewayException = exports.DialogActionType = exports.StyleType = exports.MessageContentType = exports.SentimentType = exports.IntentState = exports.Shape = exports.ConfirmationState = exports.ValidationException = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.AccessDeniedException = void 0;
4
- exports.StartConversationResponseFilterSensitiveLog = exports.StartConversationResponseEventStreamFilterSensitiveLog = exports.RecognizeTextResponseFilterSensitiveLog = exports.IntentResultEventFilterSensitiveLog = exports.GetSessionResponseFilterSensitiveLog = exports.StartConversationRequestFilterSensitiveLog = exports.StartConversationRequestEventStreamFilterSensitiveLog = exports.RecognizeTextRequestFilterSensitiveLog = exports.PutSessionRequestFilterSensitiveLog = exports.ConfigurationEventFilterSensitiveLog = exports.SessionStateFilterSensitiveLog = exports.InterpretationFilterSensitiveLog = exports.IntentFilterSensitiveLog = void 0;
3
+ exports.RuntimeHintsFilterSensitiveLog = exports.RuntimeHintDetailsFilterSensitiveLog = exports.DialogActionFilterSensitiveLog = exports.ElicitSubSlotFilterSensitiveLog = exports.TranscriptEventFilterSensitiveLog = exports.TextResponseEventFilterSensitiveLog = exports.PlaybackInterruptionEventFilterSensitiveLog = exports.HeartbeatEventFilterSensitiveLog = exports.TextInputEventFilterSensitiveLog = exports.PlaybackCompletionEventFilterSensitiveLog = exports.DTMFInputEventFilterSensitiveLog = exports.DisconnectionEventFilterSensitiveLog = exports.RecognizeUtteranceResponseFilterSensitiveLog = exports.RecognizeUtteranceRequestFilterSensitiveLog = exports.PutSessionResponseFilterSensitiveLog = exports.RuntimeHintValueFilterSensitiveLog = exports.MessageFilterSensitiveLog = exports.ImageResponseCardFilterSensitiveLog = exports.ButtonFilterSensitiveLog = exports.SentimentResponseFilterSensitiveLog = exports.SentimentScoreFilterSensitiveLog = exports.ConfidenceScoreFilterSensitiveLog = exports.ValueFilterSensitiveLog = exports.GetSessionRequestFilterSensitiveLog = exports.DeleteSessionResponseFilterSensitiveLog = exports.DeleteSessionRequestFilterSensitiveLog = exports.AudioResponseEventFilterSensitiveLog = exports.AudioInputEventFilterSensitiveLog = exports.ActiveContextFilterSensitiveLog = exports.ActiveContextTimeToLiveFilterSensitiveLog = exports.StartConversationResponseEventStream = exports.StartConversationRequestEventStream = exports.PlaybackInterruptionReason = exports.InputMode = exports.ConversationMode = exports.DependencyFailedException = exports.BadGatewayException = exports.DialogActionType = exports.StyleType = exports.MessageContentType = exports.SentimentType = exports.IntentState = exports.Shape = exports.ConfirmationState = exports.ValidationException = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.AccessDeniedException = void 0;
4
+ exports.StartConversationResponseFilterSensitiveLog = exports.StartConversationResponseEventStreamFilterSensitiveLog = exports.RecognizeTextResponseFilterSensitiveLog = exports.IntentResultEventFilterSensitiveLog = exports.GetSessionResponseFilterSensitiveLog = exports.StartConversationRequestFilterSensitiveLog = exports.StartConversationRequestEventStreamFilterSensitiveLog = exports.RecognizeTextRequestFilterSensitiveLog = exports.PutSessionRequestFilterSensitiveLog = exports.ConfigurationEventFilterSensitiveLog = exports.SessionStateFilterSensitiveLog = exports.InterpretationFilterSensitiveLog = exports.IntentFilterSensitiveLog = exports.SlotFilterSensitiveLog = void 0;
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const LexRuntimeV2ServiceException_1 = require("./LexRuntimeV2ServiceException");
7
7
  class AccessDeniedException extends LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException {
@@ -90,6 +90,7 @@ var ConfirmationState;
90
90
  })(ConfirmationState = exports.ConfirmationState || (exports.ConfirmationState = {}));
91
91
  var Shape;
92
92
  (function (Shape) {
93
+ Shape["COMPOSITE"] = "Composite";
93
94
  Shape["LIST"] = "List";
94
95
  Shape["SCALAR"] = "Scalar";
95
96
  })(Shape = exports.Shape || (exports.Shape = {}));
@@ -284,22 +285,10 @@ const MessageFilterSensitiveLog = (obj) => ({
284
285
  ...(obj.content && { content: smithy_client_1.SENSITIVE_STRING }),
285
286
  });
286
287
  exports.MessageFilterSensitiveLog = MessageFilterSensitiveLog;
287
- const DialogActionFilterSensitiveLog = (obj) => ({
288
- ...obj,
289
- });
290
- exports.DialogActionFilterSensitiveLog = DialogActionFilterSensitiveLog;
291
288
  const RuntimeHintValueFilterSensitiveLog = (obj) => ({
292
289
  ...obj,
293
290
  });
294
291
  exports.RuntimeHintValueFilterSensitiveLog = RuntimeHintValueFilterSensitiveLog;
295
- const RuntimeHintDetailsFilterSensitiveLog = (obj) => ({
296
- ...obj,
297
- });
298
- exports.RuntimeHintDetailsFilterSensitiveLog = RuntimeHintDetailsFilterSensitiveLog;
299
- const RuntimeHintsFilterSensitiveLog = (obj) => ({
300
- ...obj,
301
- });
302
- exports.RuntimeHintsFilterSensitiveLog = RuntimeHintsFilterSensitiveLog;
303
292
  const PutSessionResponseFilterSensitiveLog = (obj) => ({
304
293
  ...obj,
305
294
  });
@@ -349,6 +338,22 @@ const TranscriptEventFilterSensitiveLog = (obj) => ({
349
338
  ...obj,
350
339
  });
351
340
  exports.TranscriptEventFilterSensitiveLog = TranscriptEventFilterSensitiveLog;
341
+ const ElicitSubSlotFilterSensitiveLog = (obj) => ({
342
+ ...obj,
343
+ });
344
+ exports.ElicitSubSlotFilterSensitiveLog = ElicitSubSlotFilterSensitiveLog;
345
+ const DialogActionFilterSensitiveLog = (obj) => ({
346
+ ...obj,
347
+ });
348
+ exports.DialogActionFilterSensitiveLog = DialogActionFilterSensitiveLog;
349
+ const RuntimeHintDetailsFilterSensitiveLog = (obj) => ({
350
+ ...obj,
351
+ });
352
+ exports.RuntimeHintDetailsFilterSensitiveLog = RuntimeHintDetailsFilterSensitiveLog;
353
+ const RuntimeHintsFilterSensitiveLog = (obj) => ({
354
+ ...obj,
355
+ });
356
+ exports.RuntimeHintsFilterSensitiveLog = RuntimeHintsFilterSensitiveLog;
352
357
  const SlotFilterSensitiveLog = (obj) => ({
353
358
  ...obj,
354
359
  });
@@ -927,6 +927,9 @@ const serializeAws_restJson1DialogAction = (input, context) => {
927
927
  return {
928
928
  ...(input.slotElicitationStyle != null && { slotElicitationStyle: input.slotElicitationStyle }),
929
929
  ...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }),
930
+ ...(input.subSlotToElicit != null && {
931
+ subSlotToElicit: serializeAws_restJson1ElicitSubSlot(input.subSlotToElicit, context),
932
+ }),
930
933
  ...(input.type != null && { type: input.type }),
931
934
  };
932
935
  };
@@ -943,6 +946,14 @@ const serializeAws_restJson1DTMFInputEvent = (input, context) => {
943
946
  ...(input.inputCharacter != null && { inputCharacter: input.inputCharacter }),
944
947
  };
945
948
  };
949
+ const serializeAws_restJson1ElicitSubSlot = (input, context) => {
950
+ return {
951
+ ...(input.name != null && { name: input.name }),
952
+ ...(input.subSlotToElicit != null && {
953
+ subSlotToElicit: serializeAws_restJson1ElicitSubSlot(input.subSlotToElicit, context),
954
+ }),
955
+ };
956
+ };
946
957
  const serializeAws_restJson1ImageResponseCard = (input, context) => {
947
958
  return {
948
959
  ...(input.buttons != null && { buttons: serializeAws_restJson1ButtonsList(input.buttons, context) }),
@@ -986,6 +997,9 @@ const serializeAws_restJson1RuntimeHintDetails = (input, context) => {
986
997
  ...(input.runtimeHintValues != null && {
987
998
  runtimeHintValues: serializeAws_restJson1RuntimeHintValuesList(input.runtimeHintValues, context),
988
999
  }),
1000
+ ...(input.subSlotHints != null && {
1001
+ subSlotHints: serializeAws_restJson1SlotHintsSlotMap(input.subSlotHints, context),
1002
+ }),
989
1003
  };
990
1004
  };
991
1005
  const serializeAws_restJson1RuntimeHints = (input, context) => {
@@ -1026,6 +1040,7 @@ const serializeAws_restJson1SessionState = (input, context) => {
1026
1040
  const serializeAws_restJson1Slot = (input, context) => {
1027
1041
  return {
1028
1042
  ...(input.shape != null && { shape: input.shape }),
1043
+ ...(input.subSlots != null && { subSlots: serializeAws_restJson1Slots(input.subSlots, context) }),
1029
1044
  ...(input.value != null && { value: serializeAws_restJson1Value(input.value, context) }),
1030
1045
  ...(input.values != null && { values: serializeAws_restJson1Values(input.values, context) }),
1031
1046
  };
@@ -1176,9 +1191,20 @@ const deserializeAws_restJson1DialogAction = (output, context) => {
1176
1191
  return {
1177
1192
  slotElicitationStyle: (0, smithy_client_1.expectString)(output.slotElicitationStyle),
1178
1193
  slotToElicit: (0, smithy_client_1.expectString)(output.slotToElicit),
1194
+ subSlotToElicit: output.subSlotToElicit != null
1195
+ ? deserializeAws_restJson1ElicitSubSlot(output.subSlotToElicit, context)
1196
+ : undefined,
1179
1197
  type: (0, smithy_client_1.expectString)(output.type),
1180
1198
  };
1181
1199
  };
1200
+ const deserializeAws_restJson1ElicitSubSlot = (output, context) => {
1201
+ return {
1202
+ name: (0, smithy_client_1.expectString)(output.name),
1203
+ subSlotToElicit: output.subSlotToElicit != null
1204
+ ? deserializeAws_restJson1ElicitSubSlot(output.subSlotToElicit, context)
1205
+ : undefined,
1206
+ };
1207
+ };
1182
1208
  const deserializeAws_restJson1HeartbeatEvent = (output, context) => {
1183
1209
  return {
1184
1210
  eventId: (0, smithy_client_1.expectString)(output.eventId),
@@ -1266,6 +1292,7 @@ const deserializeAws_restJson1RuntimeHintDetails = (output, context) => {
1266
1292
  runtimeHintValues: output.runtimeHintValues != null
1267
1293
  ? deserializeAws_restJson1RuntimeHintValuesList(output.runtimeHintValues, context)
1268
1294
  : undefined,
1295
+ subSlotHints: output.subSlotHints != null ? deserializeAws_restJson1SlotHintsSlotMap(output.subSlotHints, context) : undefined,
1269
1296
  };
1270
1297
  };
1271
1298
  const deserializeAws_restJson1RuntimeHints = (output, context) => {
@@ -1322,6 +1349,7 @@ const deserializeAws_restJson1SessionState = (output, context) => {
1322
1349
  const deserializeAws_restJson1Slot = (output, context) => {
1323
1350
  return {
1324
1351
  shape: (0, smithy_client_1.expectString)(output.shape),
1352
+ subSlots: output.subSlots != null ? deserializeAws_restJson1Slots(output.subSlots, context) : undefined,
1325
1353
  value: output.value != null ? deserializeAws_restJson1Value(output.value, context) : undefined,
1326
1354
  values: output.values != null ? deserializeAws_restJson1Values(output.values, context) : undefined,
1327
1355
  };
@@ -1445,6 +1473,9 @@ const loadRestJsonErrorCode = (output, data) => {
1445
1473
  if (typeof cleanValue === "number") {
1446
1474
  cleanValue = cleanValue.toString();
1447
1475
  }
1476
+ if (cleanValue.indexOf(",") >= 0) {
1477
+ cleanValue = cleanValue.split(",")[0];
1478
+ }
1448
1479
  if (cleanValue.indexOf(":") >= 0) {
1449
1480
  cleanValue = cleanValue.split(":")[0];
1450
1481
  }
@@ -81,6 +81,7 @@ export var ConfirmationState;
81
81
  })(ConfirmationState || (ConfirmationState = {}));
82
82
  export var Shape;
83
83
  (function (Shape) {
84
+ Shape["COMPOSITE"] = "Composite";
84
85
  Shape["LIST"] = "List";
85
86
  Shape["SCALAR"] = "Scalar";
86
87
  })(Shape || (Shape = {}));
@@ -229,10 +230,7 @@ export var SentimentResponseFilterSensitiveLog = function (obj) { return (__assi
229
230
  export var ButtonFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
230
231
  export var ImageResponseCardFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
231
232
  export var MessageFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.content && { content: SENSITIVE_STRING }))); };
232
- export var DialogActionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
233
233
  export var RuntimeHintValueFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
234
- export var RuntimeHintDetailsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
235
- export var RuntimeHintsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
236
234
  export var PutSessionResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
237
235
  export var RecognizeUtteranceRequestFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.sessionState && { sessionState: SENSITIVE_STRING })), (obj.requestAttributes && { requestAttributes: SENSITIVE_STRING }))); };
238
236
  export var RecognizeUtteranceResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -244,6 +242,10 @@ export var HeartbeatEventFilterSensitiveLog = function (obj) { return (__assign(
244
242
  export var PlaybackInterruptionEventFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
245
243
  export var TextResponseEventFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.messages && { messages: obj.messages.map(function (item) { return MessageFilterSensitiveLog(item); }) }))); };
246
244
  export var TranscriptEventFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
245
+ export var ElicitSubSlotFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
246
+ export var DialogActionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
247
+ export var RuntimeHintDetailsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
248
+ export var RuntimeHintsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
247
249
  export var SlotFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
248
250
  export var IntentFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
249
251
  export var InterpretationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1197,7 +1197,9 @@ var serializeAws_restJson1ConfigurationEvent = function (input, context) {
1197
1197
  }));
1198
1198
  };
1199
1199
  var serializeAws_restJson1DialogAction = function (input, context) {
1200
- return __assign(__assign(__assign({}, (input.slotElicitationStyle != null && { slotElicitationStyle: input.slotElicitationStyle })), (input.slotToElicit != null && { slotToElicit: input.slotToElicit })), (input.type != null && { type: input.type }));
1200
+ return __assign(__assign(__assign(__assign({}, (input.slotElicitationStyle != null && { slotElicitationStyle: input.slotElicitationStyle })), (input.slotToElicit != null && { slotToElicit: input.slotToElicit })), (input.subSlotToElicit != null && {
1201
+ subSlotToElicit: serializeAws_restJson1ElicitSubSlot(input.subSlotToElicit, context),
1202
+ })), (input.type != null && { type: input.type }));
1201
1203
  };
1202
1204
  var serializeAws_restJson1DisconnectionEvent = function (input, context) {
1203
1205
  return __assign(__assign({}, (input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis })), (input.eventId != null && { eventId: input.eventId }));
@@ -1205,6 +1207,11 @@ var serializeAws_restJson1DisconnectionEvent = function (input, context) {
1205
1207
  var serializeAws_restJson1DTMFInputEvent = function (input, context) {
1206
1208
  return __assign(__assign(__assign({}, (input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis })), (input.eventId != null && { eventId: input.eventId })), (input.inputCharacter != null && { inputCharacter: input.inputCharacter }));
1207
1209
  };
1210
+ var serializeAws_restJson1ElicitSubSlot = function (input, context) {
1211
+ return __assign(__assign({}, (input.name != null && { name: input.name })), (input.subSlotToElicit != null && {
1212
+ subSlotToElicit: serializeAws_restJson1ElicitSubSlot(input.subSlotToElicit, context),
1213
+ }));
1214
+ };
1208
1215
  var serializeAws_restJson1ImageResponseCard = function (input, context) {
1209
1216
  return __assign(__assign(__assign(__assign({}, (input.buttons != null && { buttons: serializeAws_restJson1ButtonsList(input.buttons, context) })), (input.imageUrl != null && { imageUrl: input.imageUrl })), (input.subtitle != null && { subtitle: input.subtitle })), (input.title != null && { title: input.title }));
1210
1217
  };
@@ -1227,8 +1234,10 @@ var serializeAws_restJson1PlaybackCompletionEvent = function (input, context) {
1227
1234
  return __assign(__assign({}, (input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis })), (input.eventId != null && { eventId: input.eventId }));
1228
1235
  };
1229
1236
  var serializeAws_restJson1RuntimeHintDetails = function (input, context) {
1230
- return __assign({}, (input.runtimeHintValues != null && {
1237
+ return __assign(__assign({}, (input.runtimeHintValues != null && {
1231
1238
  runtimeHintValues: serializeAws_restJson1RuntimeHintValuesList(input.runtimeHintValues, context),
1239
+ })), (input.subSlotHints != null && {
1240
+ subSlotHints: serializeAws_restJson1SlotHintsSlotMap(input.subSlotHints, context),
1232
1241
  }));
1233
1242
  };
1234
1243
  var serializeAws_restJson1RuntimeHints = function (input, context) {
@@ -1256,7 +1265,7 @@ var serializeAws_restJson1SessionState = function (input, context) {
1256
1265
  }));
1257
1266
  };
1258
1267
  var serializeAws_restJson1Slot = function (input, context) {
1259
- return __assign(__assign(__assign({}, (input.shape != null && { shape: input.shape })), (input.value != null && { value: serializeAws_restJson1Value(input.value, context) })), (input.values != null && { values: serializeAws_restJson1Values(input.values, context) }));
1268
+ return __assign(__assign(__assign(__assign({}, (input.shape != null && { shape: input.shape })), (input.subSlots != null && { subSlots: serializeAws_restJson1Slots(input.subSlots, context) })), (input.value != null && { value: serializeAws_restJson1Value(input.value, context) })), (input.values != null && { values: serializeAws_restJson1Values(input.values, context) }));
1260
1269
  };
1261
1270
  var serializeAws_restJson1SlotHintsIntentMap = function (input, context) {
1262
1271
  return Object.entries(input).reduce(function (acc, _a) {
@@ -1391,9 +1400,20 @@ var deserializeAws_restJson1DialogAction = function (output, context) {
1391
1400
  return {
1392
1401
  slotElicitationStyle: __expectString(output.slotElicitationStyle),
1393
1402
  slotToElicit: __expectString(output.slotToElicit),
1403
+ subSlotToElicit: output.subSlotToElicit != null
1404
+ ? deserializeAws_restJson1ElicitSubSlot(output.subSlotToElicit, context)
1405
+ : undefined,
1394
1406
  type: __expectString(output.type),
1395
1407
  };
1396
1408
  };
1409
+ var deserializeAws_restJson1ElicitSubSlot = function (output, context) {
1410
+ return {
1411
+ name: __expectString(output.name),
1412
+ subSlotToElicit: output.subSlotToElicit != null
1413
+ ? deserializeAws_restJson1ElicitSubSlot(output.subSlotToElicit, context)
1414
+ : undefined,
1415
+ };
1416
+ };
1397
1417
  var deserializeAws_restJson1HeartbeatEvent = function (output, context) {
1398
1418
  return {
1399
1419
  eventId: __expectString(output.eventId),
@@ -1481,6 +1501,7 @@ var deserializeAws_restJson1RuntimeHintDetails = function (output, context) {
1481
1501
  runtimeHintValues: output.runtimeHintValues != null
1482
1502
  ? deserializeAws_restJson1RuntimeHintValuesList(output.runtimeHintValues, context)
1483
1503
  : undefined,
1504
+ subSlotHints: output.subSlotHints != null ? deserializeAws_restJson1SlotHintsSlotMap(output.subSlotHints, context) : undefined,
1484
1505
  };
1485
1506
  };
1486
1507
  var deserializeAws_restJson1RuntimeHints = function (output, context) {
@@ -1537,6 +1558,7 @@ var deserializeAws_restJson1SessionState = function (output, context) {
1537
1558
  var deserializeAws_restJson1Slot = function (output, context) {
1538
1559
  return {
1539
1560
  shape: __expectString(output.shape),
1561
+ subSlots: output.subSlots != null ? deserializeAws_restJson1Slots(output.subSlots, context) : undefined,
1540
1562
  value: output.value != null ? deserializeAws_restJson1Value(output.value, context) : undefined,
1541
1563
  values: output.values != null ? deserializeAws_restJson1Values(output.values, context) : undefined,
1542
1564
  };
@@ -1663,6 +1685,9 @@ var loadRestJsonErrorCode = function (output, data) {
1663
1685
  if (typeof cleanValue === "number") {
1664
1686
  cleanValue = cleanValue.toString();
1665
1687
  }
1688
+ if (cleanValue.indexOf(",") >= 0) {
1689
+ cleanValue = cleanValue.split(",")[0];
1690
+ }
1666
1691
  if (cleanValue.indexOf(":") >= 0) {
1667
1692
  cleanValue = cleanValue.split(":")[0];
1668
1693
  }
@@ -233,6 +233,7 @@ export declare enum ConfirmationState {
233
233
  NONE = "None"
234
234
  }
235
235
  export declare enum Shape {
236
+ COMPOSITE = "Composite",
236
237
  LIST = "List",
237
238
  SCALAR = "Scalar"
238
239
  }
@@ -413,61 +414,6 @@ export declare enum DialogActionType {
413
414
  ELICIT_SLOT = "ElicitSlot",
414
415
  NONE = "None"
415
416
  }
416
- /**
417
- * <p>The next action that Amazon Lex V2 should take.</p>
418
- */
419
- export interface DialogAction {
420
- /**
421
- * <p>The next action that the bot should take in its interaction with the
422
- * user. The possible values are:</p>
423
- * <ul>
424
- * <li>
425
- * <p>
426
- * <code>Close</code> - Indicates that there will not be a
427
- * response from the user. For example, the statement "Your order
428
- * has been placed" does not require a response.</p>
429
- * </li>
430
- * <li>
431
- * <p>
432
- * <code>ConfirmIntent</code> - The next action is asking the
433
- * user if the intent is complete and ready to be fulfilled. This is
434
- * a yes/no question such as "Place the order?"</p>
435
- * </li>
436
- * <li>
437
- * <p>
438
- * <code>Delegate</code> - The next action is determined by
439
- * Amazon Lex V2.</p>
440
- * </li>
441
- * <li>
442
- * <p>
443
- * <code>ElicitSlot</code> - The next action is to elicit a slot
444
- * value from the user.</p>
445
- * </li>
446
- * </ul>
447
- */
448
- type: DialogActionType | string | undefined;
449
- /**
450
- * <p>The name of the slot that should be elicited from the user.</p>
451
- */
452
- slotToElicit?: string;
453
- /**
454
- * <p>Configures the slot to use spell-by-letter or spell-by-word style.
455
- * When you use a style on a slot, users can spell out their input to make
456
- * it clear to your bot.</p>
457
- * <ul>
458
- * <li>
459
- * <p>Spell by letter - "b" "o" "b"</p>
460
- * </li>
461
- * <li>
462
- * <p>Spell by word - "b as in boy" "o as in oscar" "b as in
463
- * boy"</p>
464
- * </li>
465
- * </ul>
466
- * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-spelling.html">
467
- * Using spelling to enter slot values </a>.</p>
468
- */
469
- slotElicitationStyle?: StyleType | string;
470
- }
471
417
  /**
472
418
  * <p>Provides the phrase that Amazon Lex V2 should look for in the user's input
473
419
  * to the bot.</p>
@@ -479,41 +425,6 @@ export interface RuntimeHintValue {
479
425
  */
480
426
  phrase: string | undefined;
481
427
  }
482
- /**
483
- * <p>Provides an array of phrases that should be given preference when
484
- * resolving values for a slot.</p>
485
- */
486
- export interface RuntimeHintDetails {
487
- /**
488
- * <p>One or more strings that Amazon Lex V2 should look for in the input to the
489
- * bot. Each phrase is given preference when deciding on slot
490
- * values.</p>
491
- */
492
- runtimeHintValues: RuntimeHintValue[] | undefined;
493
- }
494
- /**
495
- * <p>You can provide Amazon Lex V2 with hints to the phrases that a customer is
496
- * likely to use for a slot. When a slot with hints is resolved, the
497
- * phrases in the runtime hints are preferred in the resolution. You can
498
- * provide hints for a maximum of 100 intents. You can provide a maximum
499
- * of 100 slots.</p>
500
- * <p>Before you can use runtime hints with an existing bot, you must
501
- * first rebuild the bot.</p>
502
- * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.xml">Using hints to improve
503
- * accuracy</a>.</p>
504
- */
505
- export interface RuntimeHints {
506
- /**
507
- * <p>A list of the slots in the intent that should have runtime hints
508
- * added, and the phrases that should be added for each slot.</p>
509
- * <p>The first level of the <code>slotHints</code> map is the name of the
510
- * intent. The second level is the name of the slot within the intent. For
511
- * more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.xml">Using hints to improve
512
- * accuracy</a>.</p>
513
- * <p>The intent name and slot name must exist.</p>
514
- */
515
- slotHints?: Record<string, Record<string, RuntimeHintDetails>>;
516
- }
517
428
  /**
518
429
  * <p></p>
519
430
  */
@@ -948,6 +859,126 @@ export interface TranscriptEvent {
948
859
  */
949
860
  eventId?: string;
950
861
  }
862
+ /**
863
+ * <p>The specific constituent sub slot of the composite slot to elicit in dialog action.</p>
864
+ */
865
+ export interface ElicitSubSlot {
866
+ /**
867
+ * <p>The name of the slot that should be elicited from the user.</p>
868
+ */
869
+ name: string | undefined;
870
+ /**
871
+ * <p>The field is not supported.</p>
872
+ */
873
+ subSlotToElicit?: ElicitSubSlot;
874
+ }
875
+ /**
876
+ * <p>The next action that Amazon Lex V2 should take.</p>
877
+ */
878
+ export interface DialogAction {
879
+ /**
880
+ * <p>The next action that the bot should take in its interaction with the
881
+ * user. The possible values are:</p>
882
+ * <ul>
883
+ * <li>
884
+ * <p>
885
+ * <code>Close</code> - Indicates that there will not be a
886
+ * response from the user. For example, the statement "Your order
887
+ * has been placed" does not require a response.</p>
888
+ * </li>
889
+ * <li>
890
+ * <p>
891
+ * <code>ConfirmIntent</code> - The next action is asking the
892
+ * user if the intent is complete and ready to be fulfilled. This is
893
+ * a yes/no question such as "Place the order?"</p>
894
+ * </li>
895
+ * <li>
896
+ * <p>
897
+ * <code>Delegate</code> - The next action is determined by
898
+ * Amazon Lex V2.</p>
899
+ * </li>
900
+ * <li>
901
+ * <p>
902
+ * <code>ElicitIntent</code> - The next action is to elicit an
903
+ * intent from the user.</p>
904
+ * </li>
905
+ * <li>
906
+ * <p>
907
+ * <code>ElicitSlot</code> - The next action is to elicit a slot
908
+ * value from the user.</p>
909
+ * </li>
910
+ * </ul>
911
+ */
912
+ type: DialogActionType | string | undefined;
913
+ /**
914
+ * <p>The name of the slot that should be elicited from the user.</p>
915
+ */
916
+ slotToElicit?: string;
917
+ /**
918
+ * <p>Configures the slot to use spell-by-letter or spell-by-word style.
919
+ * When you use a style on a slot, users can spell out their input to make
920
+ * it clear to your bot.</p>
921
+ * <ul>
922
+ * <li>
923
+ * <p>Spell by letter - "b" "o" "b"</p>
924
+ * </li>
925
+ * <li>
926
+ * <p>Spell by word - "b as in boy" "o as in oscar" "b as in
927
+ * boy"</p>
928
+ * </li>
929
+ * </ul>
930
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-spelling.html">
931
+ * Using spelling to enter slot values </a>.</p>
932
+ */
933
+ slotElicitationStyle?: StyleType | string;
934
+ /**
935
+ * <p>The name of the constituent sub slot of the composite slot
936
+ * specified in slotToElicit that should be elicited from the user.</p>
937
+ */
938
+ subSlotToElicit?: ElicitSubSlot;
939
+ }
940
+ /**
941
+ * <p>Provides an array of phrases that should be given preference when
942
+ * resolving values for a slot.</p>
943
+ */
944
+ export interface RuntimeHintDetails {
945
+ /**
946
+ * <p>One or more strings that Amazon Lex V2 should look for in the input to the
947
+ * bot. Each phrase is given preference when deciding on slot
948
+ * values.</p>
949
+ */
950
+ runtimeHintValues?: RuntimeHintValue[];
951
+ /**
952
+ * <p>A map of constituent sub slot names inside a composite slot in the intent and the phrases
953
+ * that should be added for each sub slot. Inside each composite slot hints, this structure provides
954
+ * a mechanism to add granular sub slot phrases. Only sub slot hints are supported for composite slots.
955
+ * The intent name, composite slot name and the constituent sub slot names must exist.</p>
956
+ */
957
+ subSlotHints?: Record<string, RuntimeHintDetails>;
958
+ }
959
+ /**
960
+ * <p>You can provide Amazon Lex V2 with hints to the phrases that a customer is
961
+ * likely to use for a slot. When a slot with hints is resolved, the
962
+ * phrases in the runtime hints are preferred in the resolution. You can
963
+ * provide hints for a maximum of 100 intents. You can provide a maximum
964
+ * of 100 slots.</p>
965
+ * <p>Before you can use runtime hints with an existing bot, you must
966
+ * first rebuild the bot.</p>
967
+ * <p>For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.html">Using runtime hints to
968
+ * improve recognition of slot values</a>.</p>
969
+ */
970
+ export interface RuntimeHints {
971
+ /**
972
+ * <p>A list of the slots in the intent that should have runtime hints
973
+ * added, and the phrases that should be added for each slot.</p>
974
+ * <p>The first level of the <code>slotHints</code> map is the name of the
975
+ * intent. The second level is the name of the slot within the intent. For
976
+ * more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/using-hints.html">Using hints to improve
977
+ * accuracy</a>.</p>
978
+ * <p>The intent name and slot name must exist.</p>
979
+ */
980
+ slotHints?: Record<string, Record<string, RuntimeHintDetails>>;
981
+ }
951
982
  /**
952
983
  * <p>A value that Amazon Lex V2 uses to fulfill an intent. </p>
953
984
  */
@@ -969,6 +1000,10 @@ export interface Slot {
969
1000
  * might be "pepperoni" and "pineapple." </p>
970
1001
  */
971
1002
  values?: Slot[];
1003
+ /**
1004
+ * <p>The constituent sub slots of a composite slot.</p>
1005
+ */
1006
+ subSlots?: Record<string, Slot>;
972
1007
  }
973
1008
  /**
974
1009
  * <p>The current intent that Amazon Lex V2 is attempting to fulfill.</p>
@@ -1051,9 +1086,8 @@ export interface SessionState {
1051
1086
  */
1052
1087
  originatingRequestId?: string;
1053
1088
  /**
1054
- * <p>Hints for phrases that a customer is likely to use
1055
- * for a slot. Amazon Lex V2 uses the hints to help determine the correct
1056
- * value of a slot.</p>
1089
+ * <p>Hints for phrases that a customer is likely to use for a slot. Amazon Lex V2
1090
+ * uses the hints to help determine the correct value of a slot.</p>
1057
1091
  */
1058
1092
  runtimeHints?: RuntimeHints;
1059
1093
  }
@@ -1120,6 +1154,12 @@ export interface ConfigurationEvent {
1120
1154
  sessionState?: SessionState;
1121
1155
  /**
1122
1156
  * <p>A list of messages to send to the user.</p>
1157
+ * <p>If you set the <code>welcomeMessage</code> field, you must also set
1158
+ * the <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_runtime_DialogAction.html">
1159
+ * <code>DialogAction</code>
1160
+ * </a> structure's <a href="https://docs.aws.amazon.com/lexv2/latest/dg/API_runtime_DialogAction.html#lexv2-Type-runtime_DialogAction-type">
1161
+ * <code>type</code>
1162
+ * </a> field.</p>
1123
1163
  */
1124
1164
  welcomeMessages?: Message[];
1125
1165
  /**
@@ -1888,22 +1928,10 @@ export declare const ImageResponseCardFilterSensitiveLog: (obj: ImageResponseCar
1888
1928
  * @internal
1889
1929
  */
1890
1930
  export declare const MessageFilterSensitiveLog: (obj: Message) => any;
1891
- /**
1892
- * @internal
1893
- */
1894
- export declare const DialogActionFilterSensitiveLog: (obj: DialogAction) => any;
1895
1931
  /**
1896
1932
  * @internal
1897
1933
  */
1898
1934
  export declare const RuntimeHintValueFilterSensitiveLog: (obj: RuntimeHintValue) => any;
1899
- /**
1900
- * @internal
1901
- */
1902
- export declare const RuntimeHintDetailsFilterSensitiveLog: (obj: RuntimeHintDetails) => any;
1903
- /**
1904
- * @internal
1905
- */
1906
- export declare const RuntimeHintsFilterSensitiveLog: (obj: RuntimeHints) => any;
1907
1935
  /**
1908
1936
  * @internal
1909
1937
  */
@@ -1948,6 +1976,22 @@ export declare const TextResponseEventFilterSensitiveLog: (obj: TextResponseEven
1948
1976
  * @internal
1949
1977
  */
1950
1978
  export declare const TranscriptEventFilterSensitiveLog: (obj: TranscriptEvent) => any;
1979
+ /**
1980
+ * @internal
1981
+ */
1982
+ export declare const ElicitSubSlotFilterSensitiveLog: (obj: ElicitSubSlot) => any;
1983
+ /**
1984
+ * @internal
1985
+ */
1986
+ export declare const DialogActionFilterSensitiveLog: (obj: DialogAction) => any;
1987
+ /**
1988
+ * @internal
1989
+ */
1990
+ export declare const RuntimeHintDetailsFilterSensitiveLog: (obj: RuntimeHintDetails) => any;
1991
+ /**
1992
+ * @internal
1993
+ */
1994
+ export declare const RuntimeHintsFilterSensitiveLog: (obj: RuntimeHints) => any;
1951
1995
  /**
1952
1996
  * @internal
1953
1997
  */
@@ -116,6 +116,7 @@ export declare enum ConfirmationState {
116
116
  NONE = "None"
117
117
  }
118
118
  export declare enum Shape {
119
+ COMPOSITE = "Composite",
119
120
  LIST = "List",
120
121
  SCALAR = "Scalar"
121
122
  }
@@ -212,30 +213,11 @@ export declare enum DialogActionType {
212
213
  NONE = "None"
213
214
  }
214
215
 
215
- export interface DialogAction {
216
-
217
- type: DialogActionType | string | undefined;
218
-
219
- slotToElicit?: string;
220
-
221
- slotElicitationStyle?: StyleType | string;
222
- }
223
-
224
216
  export interface RuntimeHintValue {
225
217
 
226
218
  phrase: string | undefined;
227
219
  }
228
220
 
229
- export interface RuntimeHintDetails {
230
-
231
- runtimeHintValues: RuntimeHintValue[] | undefined;
232
- }
233
-
234
- export interface RuntimeHints {
235
-
236
- slotHints?: Record<string, Record<string, RuntimeHintDetails>>;
237
- }
238
-
239
221
  export declare class BadGatewayException extends __BaseException {
240
222
  readonly name: "BadGatewayException";
241
223
  readonly $fault: "server";
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-lex-runtime-v2",
3
3
  "description": "AWS SDK for JavaScript Lex Runtime V2 Client for Node.js, Browser and React Native",
4
- "version": "3.163.0",
4
+ "version": "3.169.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
8
8
  "build:docs": "typedoc",
9
9
  "build:es": "tsc -p tsconfig.es.json",
10
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
10
11
  "build:types": "tsc -p tsconfig.types.json",
11
12
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
12
13
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo"
@@ -18,46 +19,46 @@
18
19
  "dependencies": {
19
20
  "@aws-crypto/sha256-browser": "2.0.0",
20
21
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.163.0",
22
- "@aws-sdk/config-resolver": "3.163.0",
23
- "@aws-sdk/credential-provider-node": "3.163.0",
24
- "@aws-sdk/eventstream-handler-node": "3.162.0",
25
- "@aws-sdk/eventstream-serde-browser": "3.162.0",
26
- "@aws-sdk/eventstream-serde-config-resolver": "3.162.0",
27
- "@aws-sdk/eventstream-serde-node": "3.162.0",
28
- "@aws-sdk/fetch-http-handler": "3.162.0",
29
- "@aws-sdk/hash-node": "3.162.0",
30
- "@aws-sdk/invalid-dependency": "3.162.0",
31
- "@aws-sdk/middleware-content-length": "3.162.0",
32
- "@aws-sdk/middleware-eventstream": "3.162.0",
33
- "@aws-sdk/middleware-host-header": "3.162.0",
34
- "@aws-sdk/middleware-logger": "3.162.0",
35
- "@aws-sdk/middleware-recursion-detection": "3.162.0",
36
- "@aws-sdk/middleware-retry": "3.162.0",
37
- "@aws-sdk/middleware-serde": "3.162.0",
38
- "@aws-sdk/middleware-signing": "3.163.0",
39
- "@aws-sdk/middleware-stack": "3.162.0",
40
- "@aws-sdk/middleware-user-agent": "3.162.0",
41
- "@aws-sdk/node-config-provider": "3.162.0",
42
- "@aws-sdk/node-http-handler": "3.162.0",
43
- "@aws-sdk/protocol-http": "3.162.0",
44
- "@aws-sdk/smithy-client": "3.162.0",
45
- "@aws-sdk/types": "3.162.0",
46
- "@aws-sdk/url-parser": "3.162.0",
47
- "@aws-sdk/util-base64-browser": "3.109.0",
48
- "@aws-sdk/util-base64-node": "3.55.0",
49
- "@aws-sdk/util-body-length-browser": "3.154.0",
50
- "@aws-sdk/util-body-length-node": "3.55.0",
51
- "@aws-sdk/util-defaults-mode-browser": "3.162.0",
52
- "@aws-sdk/util-defaults-mode-node": "3.163.0",
53
- "@aws-sdk/util-user-agent-browser": "3.162.0",
54
- "@aws-sdk/util-user-agent-node": "3.162.0",
55
- "@aws-sdk/util-utf8-browser": "3.109.0",
56
- "@aws-sdk/util-utf8-node": "3.109.0",
22
+ "@aws-sdk/client-sts": "3.169.0",
23
+ "@aws-sdk/config-resolver": "3.168.0",
24
+ "@aws-sdk/credential-provider-node": "3.169.0",
25
+ "@aws-sdk/eventstream-handler-node": "3.168.0",
26
+ "@aws-sdk/eventstream-serde-browser": "3.168.0",
27
+ "@aws-sdk/eventstream-serde-config-resolver": "3.168.0",
28
+ "@aws-sdk/eventstream-serde-node": "3.168.0",
29
+ "@aws-sdk/fetch-http-handler": "3.168.0",
30
+ "@aws-sdk/hash-node": "3.168.0",
31
+ "@aws-sdk/invalid-dependency": "3.168.0",
32
+ "@aws-sdk/middleware-content-length": "3.168.0",
33
+ "@aws-sdk/middleware-eventstream": "3.168.0",
34
+ "@aws-sdk/middleware-host-header": "3.168.0",
35
+ "@aws-sdk/middleware-logger": "3.168.0",
36
+ "@aws-sdk/middleware-recursion-detection": "3.168.0",
37
+ "@aws-sdk/middleware-retry": "3.169.0",
38
+ "@aws-sdk/middleware-serde": "3.168.0",
39
+ "@aws-sdk/middleware-signing": "3.168.0",
40
+ "@aws-sdk/middleware-stack": "3.168.0",
41
+ "@aws-sdk/middleware-user-agent": "3.168.0",
42
+ "@aws-sdk/node-config-provider": "3.168.0",
43
+ "@aws-sdk/node-http-handler": "3.168.0",
44
+ "@aws-sdk/protocol-http": "3.168.0",
45
+ "@aws-sdk/smithy-client": "3.168.0",
46
+ "@aws-sdk/types": "3.168.0",
47
+ "@aws-sdk/url-parser": "3.168.0",
48
+ "@aws-sdk/util-base64-browser": "3.168.0",
49
+ "@aws-sdk/util-base64-node": "3.168.0",
50
+ "@aws-sdk/util-body-length-browser": "3.168.0",
51
+ "@aws-sdk/util-body-length-node": "3.168.0",
52
+ "@aws-sdk/util-defaults-mode-browser": "3.168.0",
53
+ "@aws-sdk/util-defaults-mode-node": "3.168.0",
54
+ "@aws-sdk/util-user-agent-browser": "3.168.0",
55
+ "@aws-sdk/util-user-agent-node": "3.168.0",
56
+ "@aws-sdk/util-utf8-browser": "3.168.0",
57
+ "@aws-sdk/util-utf8-node": "3.168.0",
57
58
  "tslib": "^2.3.1"
58
59
  },
59
60
  "devDependencies": {
60
- "@aws-sdk/service-client-documentation-generator": "3.58.0",
61
+ "@aws-sdk/service-client-documentation-generator": "3.168.0",
61
62
  "@tsconfig/recommended": "1.0.1",
62
63
  "@types/node": "^12.7.5",
63
64
  "concurrently": "7.0.0",