@aws-sdk/client-lex-runtime-service 3.121.0 → 3.130.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.130.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.129.0...v3.130.0) (2022-07-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **codegen:** fix error code parsing when it's a number ([#3371](https://github.com/aws/aws-sdk-js-v3/issues/3371)) ([c2d8522](https://github.com/aws/aws-sdk-js-v3/commit/c2d852279a3d23958521a6ceb4f4c642b0cb1848))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/client-lex-runtime-service
20
+
21
+
22
+
23
+
24
+
25
+ # [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-lex-runtime-service
28
+
29
+
30
+
31
+
32
+
6
33
  # [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
7
34
 
8
35
 
@@ -206,17 +206,14 @@ const serializeAws_restJson1PostTextCommand = async (input, context) => {
206
206
  }
207
207
  let body;
208
208
  body = JSON.stringify({
209
- ...(input.activeContexts !== undefined &&
210
- input.activeContexts !== null && {
209
+ ...(input.activeContexts != null && {
211
210
  activeContexts: serializeAws_restJson1ActiveContextsList(input.activeContexts, context),
212
211
  }),
213
- ...(input.inputText !== undefined && input.inputText !== null && { inputText: input.inputText }),
214
- ...(input.requestAttributes !== undefined &&
215
- input.requestAttributes !== null && {
212
+ ...(input.inputText != null && { inputText: input.inputText }),
213
+ ...(input.requestAttributes != null && {
216
214
  requestAttributes: serializeAws_restJson1StringMap(input.requestAttributes, context),
217
215
  }),
218
- ...(input.sessionAttributes !== undefined &&
219
- input.sessionAttributes !== null && {
216
+ ...(input.sessionAttributes != null && {
220
217
  sessionAttributes: serializeAws_restJson1StringMap(input.sessionAttributes, context),
221
218
  }),
222
219
  });
@@ -271,18 +268,16 @@ const serializeAws_restJson1PutSessionCommand = async (input, context) => {
271
268
  }
272
269
  let body;
273
270
  body = JSON.stringify({
274
- ...(input.activeContexts !== undefined &&
275
- input.activeContexts !== null && {
271
+ ...(input.activeContexts != null && {
276
272
  activeContexts: serializeAws_restJson1ActiveContextsList(input.activeContexts, context),
277
273
  }),
278
- ...(input.dialogAction !== undefined &&
279
- input.dialogAction !== null && { dialogAction: serializeAws_restJson1DialogAction(input.dialogAction, context) }),
280
- ...(input.recentIntentSummaryView !== undefined &&
281
- input.recentIntentSummaryView !== null && {
274
+ ...(input.dialogAction != null && {
275
+ dialogAction: serializeAws_restJson1DialogAction(input.dialogAction, context),
276
+ }),
277
+ ...(input.recentIntentSummaryView != null && {
282
278
  recentIntentSummaryView: serializeAws_restJson1IntentSummaryList(input.recentIntentSummaryView, context),
283
279
  }),
284
- ...(input.sessionAttributes !== undefined &&
285
- input.sessionAttributes !== null && {
280
+ ...(input.sessionAttributes != null && {
286
281
  sessionAttributes: serializeAws_restJson1StringMap(input.sessionAttributes, context),
287
282
  }),
288
283
  });
@@ -905,13 +900,11 @@ const deserializeAws_restJson1UnsupportedMediaTypeExceptionResponse = async (par
905
900
  };
906
901
  const serializeAws_restJson1ActiveContext = (input, context) => {
907
902
  return {
908
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
909
- ...(input.parameters !== undefined &&
910
- input.parameters !== null && {
903
+ ...(input.name != null && { name: input.name }),
904
+ ...(input.parameters != null && {
911
905
  parameters: serializeAws_restJson1ActiveContextParametersMap(input.parameters, context),
912
906
  }),
913
- ...(input.timeToLive !== undefined &&
914
- input.timeToLive !== null && {
907
+ ...(input.timeToLive != null && {
915
908
  timeToLive: serializeAws_restJson1ActiveContextTimeToLive(input.timeToLive, context),
916
909
  }),
917
910
  };
@@ -939,38 +932,30 @@ const serializeAws_restJson1ActiveContextsList = (input, context) => {
939
932
  };
940
933
  const serializeAws_restJson1ActiveContextTimeToLive = (input, context) => {
941
934
  return {
942
- ...(input.timeToLiveInSeconds !== undefined &&
943
- input.timeToLiveInSeconds !== null && { timeToLiveInSeconds: input.timeToLiveInSeconds }),
944
- ...(input.turnsToLive !== undefined && input.turnsToLive !== null && { turnsToLive: input.turnsToLive }),
935
+ ...(input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds }),
936
+ ...(input.turnsToLive != null && { turnsToLive: input.turnsToLive }),
945
937
  };
946
938
  };
947
939
  const serializeAws_restJson1DialogAction = (input, context) => {
948
940
  return {
949
- ...(input.fulfillmentState !== undefined &&
950
- input.fulfillmentState !== null && { fulfillmentState: input.fulfillmentState }),
951
- ...(input.intentName !== undefined && input.intentName !== null && { intentName: input.intentName }),
952
- ...(input.message !== undefined && input.message !== null && { message: input.message }),
953
- ...(input.messageFormat !== undefined && input.messageFormat !== null && { messageFormat: input.messageFormat }),
954
- ...(input.slotToElicit !== undefined && input.slotToElicit !== null && { slotToElicit: input.slotToElicit }),
955
- ...(input.slots !== undefined &&
956
- input.slots !== null && { slots: serializeAws_restJson1StringMap(input.slots, context) }),
957
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
941
+ ...(input.fulfillmentState != null && { fulfillmentState: input.fulfillmentState }),
942
+ ...(input.intentName != null && { intentName: input.intentName }),
943
+ ...(input.message != null && { message: input.message }),
944
+ ...(input.messageFormat != null && { messageFormat: input.messageFormat }),
945
+ ...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }),
946
+ ...(input.slots != null && { slots: serializeAws_restJson1StringMap(input.slots, context) }),
947
+ ...(input.type != null && { type: input.type }),
958
948
  };
959
949
  };
960
950
  const serializeAws_restJson1IntentSummary = (input, context) => {
961
951
  return {
962
- ...(input.checkpointLabel !== undefined &&
963
- input.checkpointLabel !== null && { checkpointLabel: input.checkpointLabel }),
964
- ...(input.confirmationStatus !== undefined &&
965
- input.confirmationStatus !== null && { confirmationStatus: input.confirmationStatus }),
966
- ...(input.dialogActionType !== undefined &&
967
- input.dialogActionType !== null && { dialogActionType: input.dialogActionType }),
968
- ...(input.fulfillmentState !== undefined &&
969
- input.fulfillmentState !== null && { fulfillmentState: input.fulfillmentState }),
970
- ...(input.intentName !== undefined && input.intentName !== null && { intentName: input.intentName }),
971
- ...(input.slotToElicit !== undefined && input.slotToElicit !== null && { slotToElicit: input.slotToElicit }),
972
- ...(input.slots !== undefined &&
973
- input.slots !== null && { slots: serializeAws_restJson1StringMap(input.slots, context) }),
952
+ ...(input.checkpointLabel != null && { checkpointLabel: input.checkpointLabel }),
953
+ ...(input.confirmationStatus != null && { confirmationStatus: input.confirmationStatus }),
954
+ ...(input.dialogActionType != null && { dialogActionType: input.dialogActionType }),
955
+ ...(input.fulfillmentState != null && { fulfillmentState: input.fulfillmentState }),
956
+ ...(input.intentName != null && { intentName: input.intentName }),
957
+ ...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }),
958
+ ...(input.slots != null && { slots: serializeAws_restJson1StringMap(input.slots, context) }),
974
959
  };
975
960
  };
976
961
  const serializeAws_restJson1IntentSummaryList = (input, context) => {
@@ -997,10 +982,10 @@ const serializeAws_restJson1StringMap = (input, context) => {
997
982
  const deserializeAws_restJson1ActiveContext = (output, context) => {
998
983
  return {
999
984
  name: (0, smithy_client_1.expectString)(output.name),
1000
- parameters: output.parameters !== undefined && output.parameters !== null
985
+ parameters: output.parameters != null
1001
986
  ? deserializeAws_restJson1ActiveContextParametersMap(output.parameters, context)
1002
987
  : undefined,
1003
- timeToLive: output.timeToLive !== undefined && output.timeToLive !== null
988
+ timeToLive: output.timeToLive != null
1004
989
  ? deserializeAws_restJson1ActiveContextTimeToLive(output.timeToLive, context)
1005
990
  : undefined,
1006
991
  };
@@ -1046,18 +1031,14 @@ const deserializeAws_restJson1DialogAction = (output, context) => {
1046
1031
  message: (0, smithy_client_1.expectString)(output.message),
1047
1032
  messageFormat: (0, smithy_client_1.expectString)(output.messageFormat),
1048
1033
  slotToElicit: (0, smithy_client_1.expectString)(output.slotToElicit),
1049
- slots: output.slots !== undefined && output.slots !== null
1050
- ? deserializeAws_restJson1StringMap(output.slots, context)
1051
- : undefined,
1034
+ slots: output.slots != null ? deserializeAws_restJson1StringMap(output.slots, context) : undefined,
1052
1035
  type: (0, smithy_client_1.expectString)(output.type),
1053
1036
  };
1054
1037
  };
1055
1038
  const deserializeAws_restJson1GenericAttachment = (output, context) => {
1056
1039
  return {
1057
1040
  attachmentLinkUrl: (0, smithy_client_1.expectString)(output.attachmentLinkUrl),
1058
- buttons: output.buttons !== undefined && output.buttons !== null
1059
- ? deserializeAws_restJson1listOfButtons(output.buttons, context)
1060
- : undefined,
1041
+ buttons: output.buttons != null ? deserializeAws_restJson1listOfButtons(output.buttons, context) : undefined,
1061
1042
  imageUrl: (0, smithy_client_1.expectString)(output.imageUrl),
1062
1043
  subTitle: (0, smithy_client_1.expectString)(output.subTitle),
1063
1044
  title: (0, smithy_client_1.expectString)(output.title),
@@ -1098,9 +1079,7 @@ const deserializeAws_restJson1IntentSummary = (output, context) => {
1098
1079
  fulfillmentState: (0, smithy_client_1.expectString)(output.fulfillmentState),
1099
1080
  intentName: (0, smithy_client_1.expectString)(output.intentName),
1100
1081
  slotToElicit: (0, smithy_client_1.expectString)(output.slotToElicit),
1101
- slots: output.slots !== undefined && output.slots !== null
1102
- ? deserializeAws_restJson1StringMap(output.slots, context)
1103
- : undefined,
1082
+ slots: output.slots != null ? deserializeAws_restJson1StringMap(output.slots, context) : undefined,
1104
1083
  };
1105
1084
  };
1106
1085
  const deserializeAws_restJson1IntentSummaryList = (output, context) => {
@@ -1128,18 +1107,16 @@ const deserializeAws_restJson1listOfButtons = (output, context) => {
1128
1107
  const deserializeAws_restJson1PredictedIntent = (output, context) => {
1129
1108
  return {
1130
1109
  intentName: (0, smithy_client_1.expectString)(output.intentName),
1131
- nluIntentConfidence: output.nluIntentConfidence !== undefined && output.nluIntentConfidence !== null
1110
+ nluIntentConfidence: output.nluIntentConfidence != null
1132
1111
  ? deserializeAws_restJson1IntentConfidence(output.nluIntentConfidence, context)
1133
1112
  : undefined,
1134
- slots: output.slots !== undefined && output.slots !== null
1135
- ? deserializeAws_restJson1StringMap(output.slots, context)
1136
- : undefined,
1113
+ slots: output.slots != null ? deserializeAws_restJson1StringMap(output.slots, context) : undefined,
1137
1114
  };
1138
1115
  };
1139
1116
  const deserializeAws_restJson1ResponseCard = (output, context) => {
1140
1117
  return {
1141
1118
  contentType: (0, smithy_client_1.expectString)(output.contentType),
1142
- genericAttachments: output.genericAttachments !== undefined && output.genericAttachments !== null
1119
+ genericAttachments: output.genericAttachments != null
1143
1120
  ? deserializeAws_restJson1genericAttachmentList(output.genericAttachments, context)
1144
1121
  : undefined,
1145
1122
  version: (0, smithy_client_1.expectString)(output.version),
@@ -1193,6 +1170,9 @@ const loadRestJsonErrorCode = (output, data) => {
1193
1170
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1194
1171
  const sanitizeErrorCode = (rawValue) => {
1195
1172
  let cleanValue = rawValue;
1173
+ if (typeof cleanValue === "number") {
1174
+ cleanValue = cleanValue.toString();
1175
+ }
1196
1176
  if (cleanValue.indexOf(":") >= 0) {
1197
1177
  cleanValue = cleanValue.split(":")[0];
1198
1178
  }
@@ -212,14 +212,11 @@ export var serializeAws_restJson1PostTextCommand = function (input, context) { r
212
212
  else {
213
213
  throw new Error("No value provided for input HTTP label: userId.");
214
214
  }
215
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.activeContexts !== undefined &&
216
- input.activeContexts !== null && {
215
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.activeContexts != null && {
217
216
  activeContexts: serializeAws_restJson1ActiveContextsList(input.activeContexts, context),
218
- })), (input.inputText !== undefined && input.inputText !== null && { inputText: input.inputText })), (input.requestAttributes !== undefined &&
219
- input.requestAttributes !== null && {
217
+ })), (input.inputText != null && { inputText: input.inputText })), (input.requestAttributes != null && {
220
218
  requestAttributes: serializeAws_restJson1StringMap(input.requestAttributes, context),
221
- })), (input.sessionAttributes !== undefined &&
222
- input.sessionAttributes !== null && {
219
+ })), (input.sessionAttributes != null && {
223
220
  sessionAttributes: serializeAws_restJson1StringMap(input.sessionAttributes, context),
224
221
  })));
225
222
  return [2, new __HttpRequest({
@@ -274,15 +271,13 @@ export var serializeAws_restJson1PutSessionCommand = function (input, context) {
274
271
  else {
275
272
  throw new Error("No value provided for input HTTP label: userId.");
276
273
  }
277
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.activeContexts !== undefined &&
278
- input.activeContexts !== null && {
274
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.activeContexts != null && {
279
275
  activeContexts: serializeAws_restJson1ActiveContextsList(input.activeContexts, context),
280
- })), (input.dialogAction !== undefined &&
281
- input.dialogAction !== null && { dialogAction: serializeAws_restJson1DialogAction(input.dialogAction, context) })), (input.recentIntentSummaryView !== undefined &&
282
- input.recentIntentSummaryView !== null && {
276
+ })), (input.dialogAction != null && {
277
+ dialogAction: serializeAws_restJson1DialogAction(input.dialogAction, context),
278
+ })), (input.recentIntentSummaryView != null && {
283
279
  recentIntentSummaryView: serializeAws_restJson1IntentSummaryList(input.recentIntentSummaryView, context),
284
- })), (input.sessionAttributes !== undefined &&
285
- input.sessionAttributes !== null && {
280
+ })), (input.sessionAttributes != null && {
286
281
  sessionAttributes: serializeAws_restJson1StringMap(input.sessionAttributes, context),
287
282
  })));
288
283
  return [2, new __HttpRequest({
@@ -1016,11 +1011,9 @@ var deserializeAws_restJson1UnsupportedMediaTypeExceptionResponse = function (pa
1016
1011
  });
1017
1012
  }); };
1018
1013
  var serializeAws_restJson1ActiveContext = function (input, context) {
1019
- return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.parameters !== undefined &&
1020
- input.parameters !== null && {
1014
+ return __assign(__assign(__assign({}, (input.name != null && { name: input.name })), (input.parameters != null && {
1021
1015
  parameters: serializeAws_restJson1ActiveContextParametersMap(input.parameters, context),
1022
- })), (input.timeToLive !== undefined &&
1023
- input.timeToLive !== null && {
1016
+ })), (input.timeToLive != null && {
1024
1017
  timeToLive: serializeAws_restJson1ActiveContextTimeToLive(input.timeToLive, context),
1025
1018
  }));
1026
1019
  };
@@ -1045,21 +1038,13 @@ var serializeAws_restJson1ActiveContextsList = function (input, context) {
1045
1038
  });
1046
1039
  };
1047
1040
  var serializeAws_restJson1ActiveContextTimeToLive = function (input, context) {
1048
- return __assign(__assign({}, (input.timeToLiveInSeconds !== undefined &&
1049
- input.timeToLiveInSeconds !== null && { timeToLiveInSeconds: input.timeToLiveInSeconds })), (input.turnsToLive !== undefined && input.turnsToLive !== null && { turnsToLive: input.turnsToLive }));
1041
+ return __assign(__assign({}, (input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds })), (input.turnsToLive != null && { turnsToLive: input.turnsToLive }));
1050
1042
  };
1051
1043
  var serializeAws_restJson1DialogAction = function (input, context) {
1052
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.fulfillmentState !== undefined &&
1053
- input.fulfillmentState !== null && { fulfillmentState: input.fulfillmentState })), (input.intentName !== undefined && input.intentName !== null && { intentName: input.intentName })), (input.message !== undefined && input.message !== null && { message: input.message })), (input.messageFormat !== undefined && input.messageFormat !== null && { messageFormat: input.messageFormat })), (input.slotToElicit !== undefined && input.slotToElicit !== null && { slotToElicit: input.slotToElicit })), (input.slots !== undefined &&
1054
- input.slots !== null && { slots: serializeAws_restJson1StringMap(input.slots, context) })), (input.type !== undefined && input.type !== null && { type: input.type }));
1044
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.fulfillmentState != null && { fulfillmentState: input.fulfillmentState })), (input.intentName != null && { intentName: input.intentName })), (input.message != null && { message: input.message })), (input.messageFormat != null && { messageFormat: input.messageFormat })), (input.slotToElicit != null && { slotToElicit: input.slotToElicit })), (input.slots != null && { slots: serializeAws_restJson1StringMap(input.slots, context) })), (input.type != null && { type: input.type }));
1055
1045
  };
1056
1046
  var serializeAws_restJson1IntentSummary = function (input, context) {
1057
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.checkpointLabel !== undefined &&
1058
- input.checkpointLabel !== null && { checkpointLabel: input.checkpointLabel })), (input.confirmationStatus !== undefined &&
1059
- input.confirmationStatus !== null && { confirmationStatus: input.confirmationStatus })), (input.dialogActionType !== undefined &&
1060
- input.dialogActionType !== null && { dialogActionType: input.dialogActionType })), (input.fulfillmentState !== undefined &&
1061
- input.fulfillmentState !== null && { fulfillmentState: input.fulfillmentState })), (input.intentName !== undefined && input.intentName !== null && { intentName: input.intentName })), (input.slotToElicit !== undefined && input.slotToElicit !== null && { slotToElicit: input.slotToElicit })), (input.slots !== undefined &&
1062
- input.slots !== null && { slots: serializeAws_restJson1StringMap(input.slots, context) }));
1047
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.checkpointLabel != null && { checkpointLabel: input.checkpointLabel })), (input.confirmationStatus != null && { confirmationStatus: input.confirmationStatus })), (input.dialogActionType != null && { dialogActionType: input.dialogActionType })), (input.fulfillmentState != null && { fulfillmentState: input.fulfillmentState })), (input.intentName != null && { intentName: input.intentName })), (input.slotToElicit != null && { slotToElicit: input.slotToElicit })), (input.slots != null && { slots: serializeAws_restJson1StringMap(input.slots, context) }));
1063
1048
  };
1064
1049
  var serializeAws_restJson1IntentSummaryList = function (input, context) {
1065
1050
  return input
@@ -1084,10 +1069,10 @@ var serializeAws_restJson1StringMap = function (input, context) {
1084
1069
  var deserializeAws_restJson1ActiveContext = function (output, context) {
1085
1070
  return {
1086
1071
  name: __expectString(output.name),
1087
- parameters: output.parameters !== undefined && output.parameters !== null
1072
+ parameters: output.parameters != null
1088
1073
  ? deserializeAws_restJson1ActiveContextParametersMap(output.parameters, context)
1089
1074
  : undefined,
1090
- timeToLive: output.timeToLive !== undefined && output.timeToLive !== null
1075
+ timeToLive: output.timeToLive != null
1091
1076
  ? deserializeAws_restJson1ActiveContextTimeToLive(output.timeToLive, context)
1092
1077
  : undefined,
1093
1078
  };
@@ -1132,18 +1117,14 @@ var deserializeAws_restJson1DialogAction = function (output, context) {
1132
1117
  message: __expectString(output.message),
1133
1118
  messageFormat: __expectString(output.messageFormat),
1134
1119
  slotToElicit: __expectString(output.slotToElicit),
1135
- slots: output.slots !== undefined && output.slots !== null
1136
- ? deserializeAws_restJson1StringMap(output.slots, context)
1137
- : undefined,
1120
+ slots: output.slots != null ? deserializeAws_restJson1StringMap(output.slots, context) : undefined,
1138
1121
  type: __expectString(output.type),
1139
1122
  };
1140
1123
  };
1141
1124
  var deserializeAws_restJson1GenericAttachment = function (output, context) {
1142
1125
  return {
1143
1126
  attachmentLinkUrl: __expectString(output.attachmentLinkUrl),
1144
- buttons: output.buttons !== undefined && output.buttons !== null
1145
- ? deserializeAws_restJson1listOfButtons(output.buttons, context)
1146
- : undefined,
1127
+ buttons: output.buttons != null ? deserializeAws_restJson1listOfButtons(output.buttons, context) : undefined,
1147
1128
  imageUrl: __expectString(output.imageUrl),
1148
1129
  subTitle: __expectString(output.subTitle),
1149
1130
  title: __expectString(output.title),
@@ -1184,9 +1165,7 @@ var deserializeAws_restJson1IntentSummary = function (output, context) {
1184
1165
  fulfillmentState: __expectString(output.fulfillmentState),
1185
1166
  intentName: __expectString(output.intentName),
1186
1167
  slotToElicit: __expectString(output.slotToElicit),
1187
- slots: output.slots !== undefined && output.slots !== null
1188
- ? deserializeAws_restJson1StringMap(output.slots, context)
1189
- : undefined,
1168
+ slots: output.slots != null ? deserializeAws_restJson1StringMap(output.slots, context) : undefined,
1190
1169
  };
1191
1170
  };
1192
1171
  var deserializeAws_restJson1IntentSummaryList = function (output, context) {
@@ -1214,18 +1193,16 @@ var deserializeAws_restJson1listOfButtons = function (output, context) {
1214
1193
  var deserializeAws_restJson1PredictedIntent = function (output, context) {
1215
1194
  return {
1216
1195
  intentName: __expectString(output.intentName),
1217
- nluIntentConfidence: output.nluIntentConfidence !== undefined && output.nluIntentConfidence !== null
1196
+ nluIntentConfidence: output.nluIntentConfidence != null
1218
1197
  ? deserializeAws_restJson1IntentConfidence(output.nluIntentConfidence, context)
1219
1198
  : undefined,
1220
- slots: output.slots !== undefined && output.slots !== null
1221
- ? deserializeAws_restJson1StringMap(output.slots, context)
1222
- : undefined,
1199
+ slots: output.slots != null ? deserializeAws_restJson1StringMap(output.slots, context) : undefined,
1223
1200
  };
1224
1201
  };
1225
1202
  var deserializeAws_restJson1ResponseCard = function (output, context) {
1226
1203
  return {
1227
1204
  contentType: __expectString(output.contentType),
1228
- genericAttachments: output.genericAttachments !== undefined && output.genericAttachments !== null
1205
+ genericAttachments: output.genericAttachments != null
1229
1206
  ? deserializeAws_restJson1genericAttachmentList(output.genericAttachments, context)
1230
1207
  : undefined,
1231
1208
  version: __expectString(output.version),
@@ -1285,6 +1262,9 @@ var loadRestJsonErrorCode = function (output, data) {
1285
1262
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
1286
1263
  var sanitizeErrorCode = function (rawValue) {
1287
1264
  var cleanValue = rawValue;
1265
+ if (typeof cleanValue === "number") {
1266
+ cleanValue = cleanValue.toString();
1267
+ }
1288
1268
  if (cleanValue.indexOf(":") >= 0) {
1289
1269
  cleanValue = cleanValue.split(":")[0];
1290
1270
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-lex-runtime-service",
3
3
  "description": "AWS SDK for JavaScript Lex Runtime Service Client for Node.js, Browser and React Native",
4
- "version": "3.121.0",
4
+ "version": "3.130.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",
@@ -20,35 +20,35 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "2.0.0",
22
22
  "@aws-crypto/sha256-js": "2.0.0",
23
- "@aws-sdk/client-sts": "3.121.0",
24
- "@aws-sdk/config-resolver": "3.110.0",
25
- "@aws-sdk/credential-provider-node": "3.121.0",
26
- "@aws-sdk/fetch-http-handler": "3.110.0",
27
- "@aws-sdk/hash-node": "3.110.0",
28
- "@aws-sdk/invalid-dependency": "3.110.0",
29
- "@aws-sdk/middleware-content-length": "3.110.0",
30
- "@aws-sdk/middleware-host-header": "3.110.0",
31
- "@aws-sdk/middleware-logger": "3.110.0",
32
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
33
- "@aws-sdk/middleware-retry": "3.118.1",
34
- "@aws-sdk/middleware-serde": "3.110.0",
35
- "@aws-sdk/middleware-signing": "3.110.0",
36
- "@aws-sdk/middleware-stack": "3.110.0",
37
- "@aws-sdk/middleware-user-agent": "3.110.0",
38
- "@aws-sdk/node-config-provider": "3.110.0",
39
- "@aws-sdk/node-http-handler": "3.118.1",
40
- "@aws-sdk/protocol-http": "3.110.0",
41
- "@aws-sdk/smithy-client": "3.110.0",
42
- "@aws-sdk/types": "3.110.0",
43
- "@aws-sdk/url-parser": "3.110.0",
23
+ "@aws-sdk/client-sts": "3.130.0",
24
+ "@aws-sdk/config-resolver": "3.130.0",
25
+ "@aws-sdk/credential-provider-node": "3.130.0",
26
+ "@aws-sdk/fetch-http-handler": "3.127.0",
27
+ "@aws-sdk/hash-node": "3.127.0",
28
+ "@aws-sdk/invalid-dependency": "3.127.0",
29
+ "@aws-sdk/middleware-content-length": "3.127.0",
30
+ "@aws-sdk/middleware-host-header": "3.127.0",
31
+ "@aws-sdk/middleware-logger": "3.127.0",
32
+ "@aws-sdk/middleware-recursion-detection": "3.127.0",
33
+ "@aws-sdk/middleware-retry": "3.127.0",
34
+ "@aws-sdk/middleware-serde": "3.127.0",
35
+ "@aws-sdk/middleware-signing": "3.130.0",
36
+ "@aws-sdk/middleware-stack": "3.127.0",
37
+ "@aws-sdk/middleware-user-agent": "3.127.0",
38
+ "@aws-sdk/node-config-provider": "3.127.0",
39
+ "@aws-sdk/node-http-handler": "3.127.0",
40
+ "@aws-sdk/protocol-http": "3.127.0",
41
+ "@aws-sdk/smithy-client": "3.127.0",
42
+ "@aws-sdk/types": "3.127.0",
43
+ "@aws-sdk/url-parser": "3.127.0",
44
44
  "@aws-sdk/util-base64-browser": "3.109.0",
45
45
  "@aws-sdk/util-base64-node": "3.55.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.55.0",
47
47
  "@aws-sdk/util-body-length-node": "3.55.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
50
- "@aws-sdk/util-user-agent-browser": "3.110.0",
51
- "@aws-sdk/util-user-agent-node": "3.118.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.127.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.130.0",
50
+ "@aws-sdk/util-user-agent-browser": "3.127.0",
51
+ "@aws-sdk/util-user-agent-node": "3.127.0",
52
52
  "@aws-sdk/util-utf8-browser": "3.109.0",
53
53
  "@aws-sdk/util-utf8-node": "3.109.0",
54
54
  "tslib": "^2.3.1"