@aws-sdk/client-lex-runtime-v2 3.310.0 → 3.315.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/dist-cjs/protocols/Aws_restJson1.js +213 -516
- package/dist-es/protocols/Aws_restJson1.js +197 -500
- package/package.json +6 -6
|
@@ -49,7 +49,7 @@ const se_GetSessionCommand = async (input, context) => {
|
|
|
49
49
|
exports.se_GetSessionCommand = se_GetSessionCommand;
|
|
50
50
|
const se_PutSessionCommand = async (input, context) => {
|
|
51
51
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
52
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
52
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
53
53
|
"content-type": "application/json",
|
|
54
54
|
responsecontenttype: input.responseContentType,
|
|
55
55
|
});
|
|
@@ -60,11 +60,11 @@ const se_PutSessionCommand = async (input, context) => {
|
|
|
60
60
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "localeId", () => input.localeId, "{localeId}", false);
|
|
61
61
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
|
|
62
62
|
let body;
|
|
63
|
-
body = JSON.stringify({
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
});
|
|
63
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
64
|
+
messages: (_) => (0, smithy_client_1._json)(_),
|
|
65
|
+
requestAttributes: (_) => (0, smithy_client_1._json)(_),
|
|
66
|
+
sessionState: (_) => se_SessionState(_, context),
|
|
67
|
+
}));
|
|
68
68
|
return new protocol_http_1.HttpRequest({
|
|
69
69
|
protocol,
|
|
70
70
|
hostname,
|
|
@@ -88,11 +88,11 @@ const se_RecognizeTextCommand = async (input, context) => {
|
|
|
88
88
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "localeId", () => input.localeId, "{localeId}", false);
|
|
89
89
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "sessionId", () => input.sessionId, "{sessionId}", false);
|
|
90
90
|
let body;
|
|
91
|
-
body = JSON.stringify({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
});
|
|
91
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
92
|
+
requestAttributes: (_) => (0, smithy_client_1._json)(_),
|
|
93
|
+
sessionState: (_) => se_SessionState(_, context),
|
|
94
|
+
text: [],
|
|
95
|
+
}));
|
|
96
96
|
return new protocol_http_1.HttpRequest({
|
|
97
97
|
protocol,
|
|
98
98
|
hostname,
|
|
@@ -106,7 +106,7 @@ const se_RecognizeTextCommand = async (input, context) => {
|
|
|
106
106
|
exports.se_RecognizeTextCommand = se_RecognizeTextCommand;
|
|
107
107
|
const se_RecognizeUtteranceCommand = async (input, context) => {
|
|
108
108
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
109
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
109
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
110
110
|
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
|
|
111
111
|
"content-type": input.requestContentType || "application/octet-stream",
|
|
112
112
|
"x-amz-lex-session-state": input.sessionState,
|
|
@@ -136,7 +136,7 @@ const se_RecognizeUtteranceCommand = async (input, context) => {
|
|
|
136
136
|
exports.se_RecognizeUtteranceCommand = se_RecognizeUtteranceCommand;
|
|
137
137
|
const se_StartConversationCommand = async (input, context) => {
|
|
138
138
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
139
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
139
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
140
140
|
"x-amz-lex-conversation-mode": input.conversationMode,
|
|
141
141
|
});
|
|
142
142
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
@@ -164,22 +164,17 @@ const de_DeleteSessionCommand = async (output, context) => {
|
|
|
164
164
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
165
165
|
return de_DeleteSessionCommandError(output, context);
|
|
166
166
|
}
|
|
167
|
-
const contents = map({
|
|
167
|
+
const contents = (0, smithy_client_1.map)({
|
|
168
168
|
$metadata: deserializeMetadata(output),
|
|
169
169
|
});
|
|
170
170
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
contents.localeId = (0, smithy_client_1.expectString)(data.localeId);
|
|
179
|
-
}
|
|
180
|
-
if (data.sessionId != null) {
|
|
181
|
-
contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
|
|
182
|
-
}
|
|
171
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
172
|
+
botAliasId: smithy_client_1.expectString,
|
|
173
|
+
botId: smithy_client_1.expectString,
|
|
174
|
+
localeId: smithy_client_1.expectString,
|
|
175
|
+
sessionId: smithy_client_1.expectString,
|
|
176
|
+
});
|
|
177
|
+
Object.assign(contents, doc);
|
|
183
178
|
return contents;
|
|
184
179
|
};
|
|
185
180
|
exports.de_DeleteSessionCommand = de_DeleteSessionCommand;
|
|
@@ -210,10 +205,9 @@ const de_DeleteSessionCommandError = async (output, context) => {
|
|
|
210
205
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
211
206
|
default:
|
|
212
207
|
const parsedBody = parsedOutput.body;
|
|
213
|
-
|
|
208
|
+
return throwDefaultError({
|
|
214
209
|
output,
|
|
215
210
|
parsedBody,
|
|
216
|
-
exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
|
|
217
211
|
errorCode,
|
|
218
212
|
});
|
|
219
213
|
}
|
|
@@ -222,22 +216,17 @@ const de_GetSessionCommand = async (output, context) => {
|
|
|
222
216
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
223
217
|
return de_GetSessionCommandError(output, context);
|
|
224
218
|
}
|
|
225
|
-
const contents = map({
|
|
219
|
+
const contents = (0, smithy_client_1.map)({
|
|
226
220
|
$metadata: deserializeMetadata(output),
|
|
227
221
|
});
|
|
228
222
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
|
|
237
|
-
}
|
|
238
|
-
if (data.sessionState != null) {
|
|
239
|
-
contents.sessionState = de_SessionState(data.sessionState, context);
|
|
240
|
-
}
|
|
223
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
224
|
+
interpretations: (_) => de_Interpretations(_, context),
|
|
225
|
+
messages: smithy_client_1._json,
|
|
226
|
+
sessionId: smithy_client_1.expectString,
|
|
227
|
+
sessionState: (_) => de_SessionState(_, context),
|
|
228
|
+
});
|
|
229
|
+
Object.assign(contents, doc);
|
|
241
230
|
return contents;
|
|
242
231
|
};
|
|
243
232
|
exports.de_GetSessionCommand = de_GetSessionCommand;
|
|
@@ -265,10 +254,9 @@ const de_GetSessionCommandError = async (output, context) => {
|
|
|
265
254
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
266
255
|
default:
|
|
267
256
|
const parsedBody = parsedOutput.body;
|
|
268
|
-
|
|
257
|
+
return throwDefaultError({
|
|
269
258
|
output,
|
|
270
259
|
parsedBody,
|
|
271
|
-
exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
|
|
272
260
|
errorCode,
|
|
273
261
|
});
|
|
274
262
|
}
|
|
@@ -277,7 +265,7 @@ const de_PutSessionCommand = async (output, context) => {
|
|
|
277
265
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
278
266
|
return de_PutSessionCommandError(output, context);
|
|
279
267
|
}
|
|
280
|
-
const contents = map({
|
|
268
|
+
const contents = (0, smithy_client_1.map)({
|
|
281
269
|
$metadata: deserializeMetadata(output),
|
|
282
270
|
contentType: [, output.headers["content-type"]],
|
|
283
271
|
messages: [, output.headers["x-amz-lex-messages"]],
|
|
@@ -324,10 +312,9 @@ const de_PutSessionCommandError = async (output, context) => {
|
|
|
324
312
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
325
313
|
default:
|
|
326
314
|
const parsedBody = parsedOutput.body;
|
|
327
|
-
|
|
315
|
+
return throwDefaultError({
|
|
328
316
|
output,
|
|
329
317
|
parsedBody,
|
|
330
|
-
exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
|
|
331
318
|
errorCode,
|
|
332
319
|
});
|
|
333
320
|
}
|
|
@@ -336,28 +323,19 @@ const de_RecognizeTextCommand = async (output, context) => {
|
|
|
336
323
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
337
324
|
return de_RecognizeTextCommandError(output, context);
|
|
338
325
|
}
|
|
339
|
-
const contents = map({
|
|
326
|
+
const contents = (0, smithy_client_1.map)({
|
|
340
327
|
$metadata: deserializeMetadata(output),
|
|
341
328
|
});
|
|
342
329
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
if (data.requestAttributes != null) {
|
|
353
|
-
contents.requestAttributes = de_StringMap(data.requestAttributes, context);
|
|
354
|
-
}
|
|
355
|
-
if (data.sessionId != null) {
|
|
356
|
-
contents.sessionId = (0, smithy_client_1.expectString)(data.sessionId);
|
|
357
|
-
}
|
|
358
|
-
if (data.sessionState != null) {
|
|
359
|
-
contents.sessionState = de_SessionState(data.sessionState, context);
|
|
360
|
-
}
|
|
330
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
331
|
+
interpretations: (_) => de_Interpretations(_, context),
|
|
332
|
+
messages: smithy_client_1._json,
|
|
333
|
+
recognizedBotMember: smithy_client_1._json,
|
|
334
|
+
requestAttributes: smithy_client_1._json,
|
|
335
|
+
sessionId: smithy_client_1.expectString,
|
|
336
|
+
sessionState: (_) => de_SessionState(_, context),
|
|
337
|
+
});
|
|
338
|
+
Object.assign(contents, doc);
|
|
361
339
|
return contents;
|
|
362
340
|
};
|
|
363
341
|
exports.de_RecognizeTextCommand = de_RecognizeTextCommand;
|
|
@@ -394,10 +372,9 @@ const de_RecognizeTextCommandError = async (output, context) => {
|
|
|
394
372
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
395
373
|
default:
|
|
396
374
|
const parsedBody = parsedOutput.body;
|
|
397
|
-
|
|
375
|
+
return throwDefaultError({
|
|
398
376
|
output,
|
|
399
377
|
parsedBody,
|
|
400
|
-
exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
|
|
401
378
|
errorCode,
|
|
402
379
|
});
|
|
403
380
|
}
|
|
@@ -406,7 +383,7 @@ const de_RecognizeUtteranceCommand = async (output, context) => {
|
|
|
406
383
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
407
384
|
return de_RecognizeUtteranceCommandError(output, context);
|
|
408
385
|
}
|
|
409
|
-
const contents = map({
|
|
386
|
+
const contents = (0, smithy_client_1.map)({
|
|
410
387
|
$metadata: deserializeMetadata(output),
|
|
411
388
|
inputMode: [, output.headers["x-amz-lex-input-mode"]],
|
|
412
389
|
contentType: [, output.headers["content-type"]],
|
|
@@ -457,10 +434,9 @@ const de_RecognizeUtteranceCommandError = async (output, context) => {
|
|
|
457
434
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
458
435
|
default:
|
|
459
436
|
const parsedBody = parsedOutput.body;
|
|
460
|
-
|
|
437
|
+
return throwDefaultError({
|
|
461
438
|
output,
|
|
462
439
|
parsedBody,
|
|
463
|
-
exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
|
|
464
440
|
errorCode,
|
|
465
441
|
});
|
|
466
442
|
}
|
|
@@ -469,7 +445,7 @@ const de_StartConversationCommand = async (output, context) => {
|
|
|
469
445
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
470
446
|
return de_StartConversationCommandError(output, context);
|
|
471
447
|
}
|
|
472
|
-
const contents = map({
|
|
448
|
+
const contents = (0, smithy_client_1.map)({
|
|
473
449
|
$metadata: deserializeMetadata(output),
|
|
474
450
|
});
|
|
475
451
|
const data = output.body;
|
|
@@ -498,21 +474,21 @@ const de_StartConversationCommandError = async (output, context) => {
|
|
|
498
474
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
499
475
|
default:
|
|
500
476
|
const parsedBody = parsedOutput.body;
|
|
501
|
-
|
|
477
|
+
return throwDefaultError({
|
|
502
478
|
output,
|
|
503
479
|
parsedBody,
|
|
504
|
-
exceptionCtor: LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException,
|
|
505
480
|
errorCode,
|
|
506
481
|
});
|
|
507
482
|
}
|
|
508
483
|
};
|
|
509
|
-
const
|
|
484
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(LexRuntimeV2ServiceException_1.LexRuntimeV2ServiceException);
|
|
510
485
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
511
|
-
const contents = map({});
|
|
486
|
+
const contents = (0, smithy_client_1.map)({});
|
|
512
487
|
const data = parsedOutput.body;
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}
|
|
488
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
489
|
+
message: smithy_client_1.expectString,
|
|
490
|
+
});
|
|
491
|
+
Object.assign(contents, doc);
|
|
516
492
|
const exception = new models_0_1.AccessDeniedException({
|
|
517
493
|
$metadata: deserializeMetadata(parsedOutput),
|
|
518
494
|
...contents,
|
|
@@ -520,11 +496,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
520
496
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
521
497
|
};
|
|
522
498
|
const de_BadGatewayExceptionRes = async (parsedOutput, context) => {
|
|
523
|
-
const contents = map({});
|
|
499
|
+
const contents = (0, smithy_client_1.map)({});
|
|
524
500
|
const data = parsedOutput.body;
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}
|
|
501
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
502
|
+
message: smithy_client_1.expectString,
|
|
503
|
+
});
|
|
504
|
+
Object.assign(contents, doc);
|
|
528
505
|
const exception = new models_0_1.BadGatewayException({
|
|
529
506
|
$metadata: deserializeMetadata(parsedOutput),
|
|
530
507
|
...contents,
|
|
@@ -532,11 +509,12 @@ const de_BadGatewayExceptionRes = async (parsedOutput, context) => {
|
|
|
532
509
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
533
510
|
};
|
|
534
511
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
535
|
-
const contents = map({});
|
|
512
|
+
const contents = (0, smithy_client_1.map)({});
|
|
536
513
|
const data = parsedOutput.body;
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}
|
|
514
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
515
|
+
message: smithy_client_1.expectString,
|
|
516
|
+
});
|
|
517
|
+
Object.assign(contents, doc);
|
|
540
518
|
const exception = new models_0_1.ConflictException({
|
|
541
519
|
$metadata: deserializeMetadata(parsedOutput),
|
|
542
520
|
...contents,
|
|
@@ -544,11 +522,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
544
522
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
545
523
|
};
|
|
546
524
|
const de_DependencyFailedExceptionRes = async (parsedOutput, context) => {
|
|
547
|
-
const contents = map({});
|
|
525
|
+
const contents = (0, smithy_client_1.map)({});
|
|
548
526
|
const data = parsedOutput.body;
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
}
|
|
527
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
528
|
+
message: smithy_client_1.expectString,
|
|
529
|
+
});
|
|
530
|
+
Object.assign(contents, doc);
|
|
552
531
|
const exception = new models_0_1.DependencyFailedException({
|
|
553
532
|
$metadata: deserializeMetadata(parsedOutput),
|
|
554
533
|
...contents,
|
|
@@ -556,11 +535,12 @@ const de_DependencyFailedExceptionRes = async (parsedOutput, context) => {
|
|
|
556
535
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
557
536
|
};
|
|
558
537
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
559
|
-
const contents = map({});
|
|
538
|
+
const contents = (0, smithy_client_1.map)({});
|
|
560
539
|
const data = parsedOutput.body;
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}
|
|
540
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
541
|
+
message: smithy_client_1.expectString,
|
|
542
|
+
});
|
|
543
|
+
Object.assign(contents, doc);
|
|
564
544
|
const exception = new models_0_1.InternalServerException({
|
|
565
545
|
$metadata: deserializeMetadata(parsedOutput),
|
|
566
546
|
...contents,
|
|
@@ -568,11 +548,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
568
548
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
569
549
|
};
|
|
570
550
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
571
|
-
const contents = map({});
|
|
551
|
+
const contents = (0, smithy_client_1.map)({});
|
|
572
552
|
const data = parsedOutput.body;
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
}
|
|
553
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
554
|
+
message: smithy_client_1.expectString,
|
|
555
|
+
});
|
|
556
|
+
Object.assign(contents, doc);
|
|
576
557
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
577
558
|
$metadata: deserializeMetadata(parsedOutput),
|
|
578
559
|
...contents,
|
|
@@ -580,11 +561,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
580
561
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
581
562
|
};
|
|
582
563
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
583
|
-
const contents = map({});
|
|
564
|
+
const contents = (0, smithy_client_1.map)({});
|
|
584
565
|
const data = parsedOutput.body;
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}
|
|
566
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
567
|
+
message: smithy_client_1.expectString,
|
|
568
|
+
});
|
|
569
|
+
Object.assign(contents, doc);
|
|
588
570
|
const exception = new models_0_1.ThrottlingException({
|
|
589
571
|
$metadata: deserializeMetadata(parsedOutput),
|
|
590
572
|
...contents,
|
|
@@ -592,11 +574,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
592
574
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
593
575
|
};
|
|
594
576
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
595
|
-
const contents = map({});
|
|
577
|
+
const contents = (0, smithy_client_1.map)({});
|
|
596
578
|
const data = parsedOutput.body;
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
}
|
|
579
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
580
|
+
message: smithy_client_1.expectString,
|
|
581
|
+
});
|
|
582
|
+
Object.assign(contents, doc);
|
|
600
583
|
const exception = new models_0_1.ValidationException({
|
|
601
584
|
$metadata: deserializeMetadata(parsedOutput),
|
|
602
585
|
...contents,
|
|
@@ -644,7 +627,7 @@ const se_DisconnectionEvent_event = (input, context) => {
|
|
|
644
627
|
":content-type": { type: "string", value: "application/json" },
|
|
645
628
|
};
|
|
646
629
|
let body = new Uint8Array();
|
|
647
|
-
body =
|
|
630
|
+
body = (0, smithy_client_1._json)(input);
|
|
648
631
|
body = context.utf8Decoder(JSON.stringify(body));
|
|
649
632
|
return { headers, body };
|
|
650
633
|
};
|
|
@@ -655,7 +638,7 @@ const se_DTMFInputEvent_event = (input, context) => {
|
|
|
655
638
|
":content-type": { type: "string", value: "application/json" },
|
|
656
639
|
};
|
|
657
640
|
let body = new Uint8Array();
|
|
658
|
-
body =
|
|
641
|
+
body = (0, smithy_client_1._json)(input);
|
|
659
642
|
body = context.utf8Decoder(JSON.stringify(body));
|
|
660
643
|
return { headers, body };
|
|
661
644
|
};
|
|
@@ -666,7 +649,7 @@ const se_PlaybackCompletionEvent_event = (input, context) => {
|
|
|
666
649
|
":content-type": { type: "string", value: "application/json" },
|
|
667
650
|
};
|
|
668
651
|
let body = new Uint8Array();
|
|
669
|
-
body =
|
|
652
|
+
body = (0, smithy_client_1._json)(input);
|
|
670
653
|
body = context.utf8Decoder(JSON.stringify(body));
|
|
671
654
|
return { headers, body };
|
|
672
655
|
};
|
|
@@ -677,7 +660,7 @@ const se_TextInputEvent_event = (input, context) => {
|
|
|
677
660
|
":content-type": { type: "string", value: "application/json" },
|
|
678
661
|
};
|
|
679
662
|
let body = new Uint8Array();
|
|
680
|
-
body =
|
|
663
|
+
body = (0, smithy_client_1._json)(input);
|
|
681
664
|
body = context.utf8Decoder(JSON.stringify(body));
|
|
682
665
|
return { headers, body };
|
|
683
666
|
};
|
|
@@ -793,7 +776,7 @@ const de_DependencyFailedException_event = async (output, context) => {
|
|
|
793
776
|
const de_HeartbeatEvent_event = async (output, context) => {
|
|
794
777
|
const contents = {};
|
|
795
778
|
const data = await parseBody(output.body, context);
|
|
796
|
-
Object.assign(contents,
|
|
779
|
+
Object.assign(contents, (0, smithy_client_1._json)(data));
|
|
797
780
|
return contents;
|
|
798
781
|
};
|
|
799
782
|
const de_IntentResultEvent_event = async (output, context) => {
|
|
@@ -812,7 +795,7 @@ const de_InternalServerException_event = async (output, context) => {
|
|
|
812
795
|
const de_PlaybackInterruptionEvent_event = async (output, context) => {
|
|
813
796
|
const contents = {};
|
|
814
797
|
const data = await parseBody(output.body, context);
|
|
815
|
-
Object.assign(contents,
|
|
798
|
+
Object.assign(contents, (0, smithy_client_1._json)(data));
|
|
816
799
|
return contents;
|
|
817
800
|
};
|
|
818
801
|
const de_ResourceNotFoundException_event = async (output, context) => {
|
|
@@ -825,7 +808,7 @@ const de_ResourceNotFoundException_event = async (output, context) => {
|
|
|
825
808
|
const de_TextResponseEvent_event = async (output, context) => {
|
|
826
809
|
const contents = {};
|
|
827
810
|
const data = await parseBody(output.body, context);
|
|
828
|
-
Object.assign(contents,
|
|
811
|
+
Object.assign(contents, (0, smithy_client_1._json)(data));
|
|
829
812
|
return contents;
|
|
830
813
|
};
|
|
831
814
|
const de_ThrottlingException_event = async (output, context) => {
|
|
@@ -838,7 +821,7 @@ const de_ThrottlingException_event = async (output, context) => {
|
|
|
838
821
|
const de_TranscriptEvent_event = async (output, context) => {
|
|
839
822
|
const contents = {};
|
|
840
823
|
const data = await parseBody(output.body, context);
|
|
841
|
-
Object.assign(contents,
|
|
824
|
+
Object.assign(contents, (0, smithy_client_1._json)(data));
|
|
842
825
|
return contents;
|
|
843
826
|
};
|
|
844
827
|
const de_ValidationException_event = async (output, context) => {
|
|
@@ -848,176 +831,75 @@ const de_ValidationException_event = async (output, context) => {
|
|
|
848
831
|
};
|
|
849
832
|
return de_ValidationExceptionRes(parsedOutput, context);
|
|
850
833
|
};
|
|
851
|
-
const se_ActiveContext = (input, context) => {
|
|
852
|
-
return {
|
|
853
|
-
...(input.contextAttributes != null && {
|
|
854
|
-
contextAttributes: se_ActiveContextParametersMap(input.contextAttributes, context),
|
|
855
|
-
}),
|
|
856
|
-
...(input.name != null && { name: input.name }),
|
|
857
|
-
...(input.timeToLive != null && { timeToLive: se_ActiveContextTimeToLive(input.timeToLive, context) }),
|
|
858
|
-
};
|
|
859
|
-
};
|
|
860
|
-
const se_ActiveContextParametersMap = (input, context) => {
|
|
861
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
862
|
-
if (value === null) {
|
|
863
|
-
return acc;
|
|
864
|
-
}
|
|
865
|
-
acc[key] = value;
|
|
866
|
-
return acc;
|
|
867
|
-
}, {});
|
|
868
|
-
};
|
|
869
|
-
const se_ActiveContextsList = (input, context) => {
|
|
870
|
-
return input
|
|
871
|
-
.filter((e) => e != null)
|
|
872
|
-
.map((entry) => {
|
|
873
|
-
return se_ActiveContext(entry, context);
|
|
874
|
-
});
|
|
875
|
-
};
|
|
876
|
-
const se_ActiveContextTimeToLive = (input, context) => {
|
|
877
|
-
return {
|
|
878
|
-
...(input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds }),
|
|
879
|
-
...(input.turnsToLive != null && { turnsToLive: input.turnsToLive }),
|
|
880
|
-
};
|
|
881
|
-
};
|
|
882
834
|
const se_AudioInputEvent = (input, context) => {
|
|
883
|
-
return {
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
};
|
|
889
|
-
};
|
|
890
|
-
const se_Button = (input, context) => {
|
|
891
|
-
return {
|
|
892
|
-
...(input.text != null && { text: input.text }),
|
|
893
|
-
...(input.value != null && { value: input.value }),
|
|
894
|
-
};
|
|
895
|
-
};
|
|
896
|
-
const se_ButtonsList = (input, context) => {
|
|
897
|
-
return input
|
|
898
|
-
.filter((e) => e != null)
|
|
899
|
-
.map((entry) => {
|
|
900
|
-
return se_Button(entry, context);
|
|
835
|
+
return (0, smithy_client_1.take)(input, {
|
|
836
|
+
audioChunk: context.base64Encoder,
|
|
837
|
+
clientTimestampMillis: [],
|
|
838
|
+
contentType: [],
|
|
839
|
+
eventId: [],
|
|
901
840
|
});
|
|
902
841
|
};
|
|
903
842
|
const se_ConfigurationEvent = (input, context) => {
|
|
904
|
-
return {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
};
|
|
843
|
+
return (0, smithy_client_1.take)(input, {
|
|
844
|
+
clientTimestampMillis: [],
|
|
845
|
+
disablePlayback: [],
|
|
846
|
+
eventId: [],
|
|
847
|
+
requestAttributes: smithy_client_1._json,
|
|
848
|
+
responseContentType: [],
|
|
849
|
+
sessionState: (_) => se_SessionState(_, context),
|
|
850
|
+
welcomeMessages: smithy_client_1._json,
|
|
851
|
+
});
|
|
913
852
|
};
|
|
914
853
|
const se_DialogAction = (input, context) => {
|
|
915
|
-
return {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
};
|
|
921
|
-
};
|
|
922
|
-
const se_DisconnectionEvent = (input, context) => {
|
|
923
|
-
return {
|
|
924
|
-
...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
|
|
925
|
-
...(input.eventId != null && { eventId: input.eventId }),
|
|
926
|
-
};
|
|
927
|
-
};
|
|
928
|
-
const se_DTMFInputEvent = (input, context) => {
|
|
929
|
-
return {
|
|
930
|
-
...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
|
|
931
|
-
...(input.eventId != null && { eventId: input.eventId }),
|
|
932
|
-
...(input.inputCharacter != null && { inputCharacter: input.inputCharacter }),
|
|
933
|
-
};
|
|
854
|
+
return (0, smithy_client_1.take)(input, {
|
|
855
|
+
slotElicitationStyle: [],
|
|
856
|
+
slotToElicit: [],
|
|
857
|
+
subSlotToElicit: (_) => se_ElicitSubSlot(_, context),
|
|
858
|
+
type: [],
|
|
859
|
+
});
|
|
934
860
|
};
|
|
935
861
|
const se_ElicitSubSlot = (input, context) => {
|
|
936
|
-
return {
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
};
|
|
940
|
-
};
|
|
941
|
-
const se_ImageResponseCard = (input, context) => {
|
|
942
|
-
return {
|
|
943
|
-
...(input.buttons != null && { buttons: se_ButtonsList(input.buttons, context) }),
|
|
944
|
-
...(input.imageUrl != null && { imageUrl: input.imageUrl }),
|
|
945
|
-
...(input.subtitle != null && { subtitle: input.subtitle }),
|
|
946
|
-
...(input.title != null && { title: input.title }),
|
|
947
|
-
};
|
|
862
|
+
return (0, smithy_client_1.take)(input, {
|
|
863
|
+
name: [],
|
|
864
|
+
subSlotToElicit: (_) => se_ElicitSubSlot(_, context),
|
|
865
|
+
});
|
|
948
866
|
};
|
|
949
867
|
const se_Intent = (input, context) => {
|
|
950
|
-
return {
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
};
|
|
956
|
-
};
|
|
957
|
-
const se_Message = (input, context) => {
|
|
958
|
-
return {
|
|
959
|
-
...(input.content != null && { content: input.content }),
|
|
960
|
-
...(input.contentType != null && { contentType: input.contentType }),
|
|
961
|
-
...(input.imageResponseCard != null && {
|
|
962
|
-
imageResponseCard: se_ImageResponseCard(input.imageResponseCard, context),
|
|
963
|
-
}),
|
|
964
|
-
};
|
|
965
|
-
};
|
|
966
|
-
const se_Messages = (input, context) => {
|
|
967
|
-
return input
|
|
968
|
-
.filter((e) => e != null)
|
|
969
|
-
.map((entry) => {
|
|
970
|
-
return se_Message(entry, context);
|
|
868
|
+
return (0, smithy_client_1.take)(input, {
|
|
869
|
+
confirmationState: [],
|
|
870
|
+
name: [],
|
|
871
|
+
slots: (_) => se_Slots(_, context),
|
|
872
|
+
state: [],
|
|
971
873
|
});
|
|
972
874
|
};
|
|
973
|
-
const se_PlaybackCompletionEvent = (input, context) => {
|
|
974
|
-
return {
|
|
975
|
-
...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
|
|
976
|
-
...(input.eventId != null && { eventId: input.eventId }),
|
|
977
|
-
};
|
|
978
|
-
};
|
|
979
875
|
const se_RuntimeHintDetails = (input, context) => {
|
|
980
|
-
return {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
...(input.subSlotHints != null && { subSlotHints: se_SlotHintsSlotMap(input.subSlotHints, context) }),
|
|
985
|
-
};
|
|
876
|
+
return (0, smithy_client_1.take)(input, {
|
|
877
|
+
runtimeHintValues: smithy_client_1._json,
|
|
878
|
+
subSlotHints: (_) => se_SlotHintsSlotMap(_, context),
|
|
879
|
+
});
|
|
986
880
|
};
|
|
987
881
|
const se_RuntimeHints = (input, context) => {
|
|
988
|
-
return {
|
|
989
|
-
|
|
990
|
-
};
|
|
991
|
-
};
|
|
992
|
-
const se_RuntimeHintValue = (input, context) => {
|
|
993
|
-
return {
|
|
994
|
-
...(input.phrase != null && { phrase: input.phrase }),
|
|
995
|
-
};
|
|
996
|
-
};
|
|
997
|
-
const se_RuntimeHintValuesList = (input, context) => {
|
|
998
|
-
return input
|
|
999
|
-
.filter((e) => e != null)
|
|
1000
|
-
.map((entry) => {
|
|
1001
|
-
return se_RuntimeHintValue(entry, context);
|
|
882
|
+
return (0, smithy_client_1.take)(input, {
|
|
883
|
+
slotHints: (_) => se_SlotHintsIntentMap(_, context),
|
|
1002
884
|
});
|
|
1003
885
|
};
|
|
1004
886
|
const se_SessionState = (input, context) => {
|
|
1005
|
-
return {
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
};
|
|
887
|
+
return (0, smithy_client_1.take)(input, {
|
|
888
|
+
activeContexts: smithy_client_1._json,
|
|
889
|
+
dialogAction: (_) => se_DialogAction(_, context),
|
|
890
|
+
intent: (_) => se_Intent(_, context),
|
|
891
|
+
originatingRequestId: [],
|
|
892
|
+
runtimeHints: (_) => se_RuntimeHints(_, context),
|
|
893
|
+
sessionAttributes: smithy_client_1._json,
|
|
894
|
+
});
|
|
1013
895
|
};
|
|
1014
896
|
const se_Slot = (input, context) => {
|
|
1015
|
-
return {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
};
|
|
897
|
+
return (0, smithy_client_1.take)(input, {
|
|
898
|
+
shape: [],
|
|
899
|
+
subSlots: (_) => se_Slots(_, context),
|
|
900
|
+
value: smithy_client_1._json,
|
|
901
|
+
values: (_) => se_Values(_, context),
|
|
902
|
+
});
|
|
1021
903
|
};
|
|
1022
904
|
const se_SlotHintsIntentMap = (input, context) => {
|
|
1023
905
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
@@ -1046,36 +928,6 @@ const se_Slots = (input, context) => {
|
|
|
1046
928
|
return acc;
|
|
1047
929
|
}, {});
|
|
1048
930
|
};
|
|
1049
|
-
const se_StringList = (input, context) => {
|
|
1050
|
-
return input
|
|
1051
|
-
.filter((e) => e != null)
|
|
1052
|
-
.map((entry) => {
|
|
1053
|
-
return entry;
|
|
1054
|
-
});
|
|
1055
|
-
};
|
|
1056
|
-
const se_StringMap = (input, context) => {
|
|
1057
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1058
|
-
if (value === null) {
|
|
1059
|
-
return acc;
|
|
1060
|
-
}
|
|
1061
|
-
acc[key] = value;
|
|
1062
|
-
return acc;
|
|
1063
|
-
}, {});
|
|
1064
|
-
};
|
|
1065
|
-
const se_TextInputEvent = (input, context) => {
|
|
1066
|
-
return {
|
|
1067
|
-
...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }),
|
|
1068
|
-
...(input.eventId != null && { eventId: input.eventId }),
|
|
1069
|
-
...(input.text != null && { text: input.text }),
|
|
1070
|
-
};
|
|
1071
|
-
};
|
|
1072
|
-
const se_Value = (input, context) => {
|
|
1073
|
-
return {
|
|
1074
|
-
...(input.interpretedValue != null && { interpretedValue: input.interpretedValue }),
|
|
1075
|
-
...(input.originalValue != null && { originalValue: input.originalValue }),
|
|
1076
|
-
...(input.resolvedValues != null && { resolvedValues: se_StringList(input.resolvedValues, context) }),
|
|
1077
|
-
};
|
|
1078
|
-
};
|
|
1079
931
|
const se_Values = (input, context) => {
|
|
1080
932
|
return input
|
|
1081
933
|
.filter((e) => e != null)
|
|
@@ -1083,221 +935,108 @@ const se_Values = (input, context) => {
|
|
|
1083
935
|
return se_Slot(entry, context);
|
|
1084
936
|
});
|
|
1085
937
|
};
|
|
1086
|
-
const de_ActiveContext = (output, context) => {
|
|
1087
|
-
return {
|
|
1088
|
-
contextAttributes: output.contextAttributes != null ? de_ActiveContextParametersMap(output.contextAttributes, context) : undefined,
|
|
1089
|
-
name: (0, smithy_client_1.expectString)(output.name),
|
|
1090
|
-
timeToLive: output.timeToLive != null ? de_ActiveContextTimeToLive(output.timeToLive, context) : undefined,
|
|
1091
|
-
};
|
|
1092
|
-
};
|
|
1093
|
-
const de_ActiveContextParametersMap = (output, context) => {
|
|
1094
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1095
|
-
if (value === null) {
|
|
1096
|
-
return acc;
|
|
1097
|
-
}
|
|
1098
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
1099
|
-
return acc;
|
|
1100
|
-
}, {});
|
|
1101
|
-
};
|
|
1102
|
-
const de_ActiveContextsList = (output, context) => {
|
|
1103
|
-
const retVal = (output || [])
|
|
1104
|
-
.filter((e) => e != null)
|
|
1105
|
-
.map((entry) => {
|
|
1106
|
-
if (entry === null) {
|
|
1107
|
-
return null;
|
|
1108
|
-
}
|
|
1109
|
-
return de_ActiveContext(entry, context);
|
|
1110
|
-
});
|
|
1111
|
-
return retVal;
|
|
1112
|
-
};
|
|
1113
|
-
const de_ActiveContextTimeToLive = (output, context) => {
|
|
1114
|
-
return {
|
|
1115
|
-
timeToLiveInSeconds: (0, smithy_client_1.expectInt32)(output.timeToLiveInSeconds),
|
|
1116
|
-
turnsToLive: (0, smithy_client_1.expectInt32)(output.turnsToLive),
|
|
1117
|
-
};
|
|
1118
|
-
};
|
|
1119
938
|
const de_AudioResponseEvent = (output, context) => {
|
|
1120
|
-
return {
|
|
1121
|
-
audioChunk:
|
|
1122
|
-
contentType:
|
|
1123
|
-
eventId:
|
|
1124
|
-
};
|
|
1125
|
-
};
|
|
1126
|
-
const de_Button = (output, context) => {
|
|
1127
|
-
return {
|
|
1128
|
-
text: (0, smithy_client_1.expectString)(output.text),
|
|
1129
|
-
value: (0, smithy_client_1.expectString)(output.value),
|
|
1130
|
-
};
|
|
1131
|
-
};
|
|
1132
|
-
const de_ButtonsList = (output, context) => {
|
|
1133
|
-
const retVal = (output || [])
|
|
1134
|
-
.filter((e) => e != null)
|
|
1135
|
-
.map((entry) => {
|
|
1136
|
-
if (entry === null) {
|
|
1137
|
-
return null;
|
|
1138
|
-
}
|
|
1139
|
-
return de_Button(entry, context);
|
|
939
|
+
return (0, smithy_client_1.take)(output, {
|
|
940
|
+
audioChunk: context.base64Decoder,
|
|
941
|
+
contentType: smithy_client_1.expectString,
|
|
942
|
+
eventId: smithy_client_1.expectString,
|
|
1140
943
|
});
|
|
1141
|
-
return retVal;
|
|
1142
944
|
};
|
|
1143
945
|
const de_ConfidenceScore = (output, context) => {
|
|
1144
|
-
return {
|
|
1145
|
-
score:
|
|
1146
|
-
};
|
|
946
|
+
return (0, smithy_client_1.take)(output, {
|
|
947
|
+
score: smithy_client_1.limitedParseDouble,
|
|
948
|
+
});
|
|
1147
949
|
};
|
|
1148
950
|
const de_DialogAction = (output, context) => {
|
|
1149
|
-
return {
|
|
1150
|
-
slotElicitationStyle:
|
|
1151
|
-
slotToElicit:
|
|
1152
|
-
subSlotToElicit:
|
|
1153
|
-
type:
|
|
1154
|
-
};
|
|
951
|
+
return (0, smithy_client_1.take)(output, {
|
|
952
|
+
slotElicitationStyle: smithy_client_1.expectString,
|
|
953
|
+
slotToElicit: smithy_client_1.expectString,
|
|
954
|
+
subSlotToElicit: (_) => de_ElicitSubSlot(_, context),
|
|
955
|
+
type: smithy_client_1.expectString,
|
|
956
|
+
});
|
|
1155
957
|
};
|
|
1156
958
|
const de_ElicitSubSlot = (output, context) => {
|
|
1157
|
-
return {
|
|
1158
|
-
name:
|
|
1159
|
-
subSlotToElicit:
|
|
1160
|
-
};
|
|
1161
|
-
};
|
|
1162
|
-
const de_HeartbeatEvent = (output, context) => {
|
|
1163
|
-
return {
|
|
1164
|
-
eventId: (0, smithy_client_1.expectString)(output.eventId),
|
|
1165
|
-
};
|
|
1166
|
-
};
|
|
1167
|
-
const de_ImageResponseCard = (output, context) => {
|
|
1168
|
-
return {
|
|
1169
|
-
buttons: output.buttons != null ? de_ButtonsList(output.buttons, context) : undefined,
|
|
1170
|
-
imageUrl: (0, smithy_client_1.expectString)(output.imageUrl),
|
|
1171
|
-
subtitle: (0, smithy_client_1.expectString)(output.subtitle),
|
|
1172
|
-
title: (0, smithy_client_1.expectString)(output.title),
|
|
1173
|
-
};
|
|
959
|
+
return (0, smithy_client_1.take)(output, {
|
|
960
|
+
name: smithy_client_1.expectString,
|
|
961
|
+
subSlotToElicit: (_) => de_ElicitSubSlot(_, context),
|
|
962
|
+
});
|
|
1174
963
|
};
|
|
1175
964
|
const de_Intent = (output, context) => {
|
|
1176
|
-
return {
|
|
1177
|
-
confirmationState:
|
|
1178
|
-
name:
|
|
1179
|
-
slots:
|
|
1180
|
-
state:
|
|
1181
|
-
};
|
|
965
|
+
return (0, smithy_client_1.take)(output, {
|
|
966
|
+
confirmationState: smithy_client_1.expectString,
|
|
967
|
+
name: smithy_client_1.expectString,
|
|
968
|
+
slots: (_) => de_Slots(_, context),
|
|
969
|
+
state: smithy_client_1.expectString,
|
|
970
|
+
});
|
|
1182
971
|
};
|
|
1183
972
|
const de_IntentResultEvent = (output, context) => {
|
|
1184
|
-
return {
|
|
1185
|
-
eventId:
|
|
1186
|
-
inputMode:
|
|
1187
|
-
interpretations:
|
|
1188
|
-
recognizedBotMember:
|
|
1189
|
-
requestAttributes:
|
|
1190
|
-
sessionId:
|
|
1191
|
-
sessionState:
|
|
1192
|
-
};
|
|
973
|
+
return (0, smithy_client_1.take)(output, {
|
|
974
|
+
eventId: smithy_client_1.expectString,
|
|
975
|
+
inputMode: smithy_client_1.expectString,
|
|
976
|
+
interpretations: (_) => de_Interpretations(_, context),
|
|
977
|
+
recognizedBotMember: smithy_client_1._json,
|
|
978
|
+
requestAttributes: smithy_client_1._json,
|
|
979
|
+
sessionId: smithy_client_1.expectString,
|
|
980
|
+
sessionState: (_) => de_SessionState(_, context),
|
|
981
|
+
});
|
|
1193
982
|
};
|
|
1194
983
|
const de_Interpretation = (output, context) => {
|
|
1195
|
-
return {
|
|
1196
|
-
intent:
|
|
1197
|
-
nluConfidence:
|
|
1198
|
-
sentimentResponse:
|
|
1199
|
-
};
|
|
984
|
+
return (0, smithy_client_1.take)(output, {
|
|
985
|
+
intent: (_) => de_Intent(_, context),
|
|
986
|
+
nluConfidence: (_) => de_ConfidenceScore(_, context),
|
|
987
|
+
sentimentResponse: (_) => de_SentimentResponse(_, context),
|
|
988
|
+
});
|
|
1200
989
|
};
|
|
1201
990
|
const de_Interpretations = (output, context) => {
|
|
1202
991
|
const retVal = (output || [])
|
|
1203
992
|
.filter((e) => e != null)
|
|
1204
993
|
.map((entry) => {
|
|
1205
|
-
if (entry === null) {
|
|
1206
|
-
return null;
|
|
1207
|
-
}
|
|
1208
994
|
return de_Interpretation(entry, context);
|
|
1209
995
|
});
|
|
1210
996
|
return retVal;
|
|
1211
997
|
};
|
|
1212
|
-
const de_Message = (output, context) => {
|
|
1213
|
-
return {
|
|
1214
|
-
content: (0, smithy_client_1.expectString)(output.content),
|
|
1215
|
-
contentType: (0, smithy_client_1.expectString)(output.contentType),
|
|
1216
|
-
imageResponseCard: output.imageResponseCard != null ? de_ImageResponseCard(output.imageResponseCard, context) : undefined,
|
|
1217
|
-
};
|
|
1218
|
-
};
|
|
1219
|
-
const de_Messages = (output, context) => {
|
|
1220
|
-
const retVal = (output || [])
|
|
1221
|
-
.filter((e) => e != null)
|
|
1222
|
-
.map((entry) => {
|
|
1223
|
-
if (entry === null) {
|
|
1224
|
-
return null;
|
|
1225
|
-
}
|
|
1226
|
-
return de_Message(entry, context);
|
|
1227
|
-
});
|
|
1228
|
-
return retVal;
|
|
1229
|
-
};
|
|
1230
|
-
const de_PlaybackInterruptionEvent = (output, context) => {
|
|
1231
|
-
return {
|
|
1232
|
-
causedByEventId: (0, smithy_client_1.expectString)(output.causedByEventId),
|
|
1233
|
-
eventId: (0, smithy_client_1.expectString)(output.eventId),
|
|
1234
|
-
eventReason: (0, smithy_client_1.expectString)(output.eventReason),
|
|
1235
|
-
};
|
|
1236
|
-
};
|
|
1237
|
-
const de_RecognizedBotMember = (output, context) => {
|
|
1238
|
-
return {
|
|
1239
|
-
botId: (0, smithy_client_1.expectString)(output.botId),
|
|
1240
|
-
botName: (0, smithy_client_1.expectString)(output.botName),
|
|
1241
|
-
};
|
|
1242
|
-
};
|
|
1243
998
|
const de_RuntimeHintDetails = (output, context) => {
|
|
1244
|
-
return {
|
|
1245
|
-
runtimeHintValues:
|
|
1246
|
-
subSlotHints:
|
|
1247
|
-
};
|
|
999
|
+
return (0, smithy_client_1.take)(output, {
|
|
1000
|
+
runtimeHintValues: smithy_client_1._json,
|
|
1001
|
+
subSlotHints: (_) => de_SlotHintsSlotMap(_, context),
|
|
1002
|
+
});
|
|
1248
1003
|
};
|
|
1249
1004
|
const de_RuntimeHints = (output, context) => {
|
|
1250
|
-
return {
|
|
1251
|
-
slotHints:
|
|
1252
|
-
};
|
|
1253
|
-
};
|
|
1254
|
-
const de_RuntimeHintValue = (output, context) => {
|
|
1255
|
-
return {
|
|
1256
|
-
phrase: (0, smithy_client_1.expectString)(output.phrase),
|
|
1257
|
-
};
|
|
1258
|
-
};
|
|
1259
|
-
const de_RuntimeHintValuesList = (output, context) => {
|
|
1260
|
-
const retVal = (output || [])
|
|
1261
|
-
.filter((e) => e != null)
|
|
1262
|
-
.map((entry) => {
|
|
1263
|
-
if (entry === null) {
|
|
1264
|
-
return null;
|
|
1265
|
-
}
|
|
1266
|
-
return de_RuntimeHintValue(entry, context);
|
|
1005
|
+
return (0, smithy_client_1.take)(output, {
|
|
1006
|
+
slotHints: (_) => de_SlotHintsIntentMap(_, context),
|
|
1267
1007
|
});
|
|
1268
|
-
return retVal;
|
|
1269
1008
|
};
|
|
1270
1009
|
const de_SentimentResponse = (output, context) => {
|
|
1271
|
-
return {
|
|
1272
|
-
sentiment:
|
|
1273
|
-
sentimentScore:
|
|
1274
|
-
};
|
|
1010
|
+
return (0, smithy_client_1.take)(output, {
|
|
1011
|
+
sentiment: smithy_client_1.expectString,
|
|
1012
|
+
sentimentScore: (_) => de_SentimentScore(_, context),
|
|
1013
|
+
});
|
|
1275
1014
|
};
|
|
1276
1015
|
const de_SentimentScore = (output, context) => {
|
|
1277
|
-
return {
|
|
1278
|
-
mixed:
|
|
1279
|
-
negative:
|
|
1280
|
-
neutral:
|
|
1281
|
-
positive:
|
|
1282
|
-
};
|
|
1016
|
+
return (0, smithy_client_1.take)(output, {
|
|
1017
|
+
mixed: smithy_client_1.limitedParseDouble,
|
|
1018
|
+
negative: smithy_client_1.limitedParseDouble,
|
|
1019
|
+
neutral: smithy_client_1.limitedParseDouble,
|
|
1020
|
+
positive: smithy_client_1.limitedParseDouble,
|
|
1021
|
+
});
|
|
1283
1022
|
};
|
|
1284
1023
|
const de_SessionState = (output, context) => {
|
|
1285
|
-
return {
|
|
1286
|
-
activeContexts:
|
|
1287
|
-
dialogAction:
|
|
1288
|
-
intent:
|
|
1289
|
-
originatingRequestId:
|
|
1290
|
-
runtimeHints:
|
|
1291
|
-
sessionAttributes:
|
|
1292
|
-
};
|
|
1024
|
+
return (0, smithy_client_1.take)(output, {
|
|
1025
|
+
activeContexts: smithy_client_1._json,
|
|
1026
|
+
dialogAction: (_) => de_DialogAction(_, context),
|
|
1027
|
+
intent: (_) => de_Intent(_, context),
|
|
1028
|
+
originatingRequestId: smithy_client_1.expectString,
|
|
1029
|
+
runtimeHints: (_) => de_RuntimeHints(_, context),
|
|
1030
|
+
sessionAttributes: smithy_client_1._json,
|
|
1031
|
+
});
|
|
1293
1032
|
};
|
|
1294
1033
|
const de_Slot = (output, context) => {
|
|
1295
|
-
return {
|
|
1296
|
-
shape:
|
|
1297
|
-
subSlots:
|
|
1298
|
-
value:
|
|
1299
|
-
values:
|
|
1300
|
-
};
|
|
1034
|
+
return (0, smithy_client_1.take)(output, {
|
|
1035
|
+
shape: smithy_client_1.expectString,
|
|
1036
|
+
subSlots: (_) => de_Slots(_, context),
|
|
1037
|
+
value: smithy_client_1._json,
|
|
1038
|
+
values: (_) => de_Values(_, context),
|
|
1039
|
+
});
|
|
1301
1040
|
};
|
|
1302
1041
|
const de_SlotHintsIntentMap = (output, context) => {
|
|
1303
1042
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
@@ -1326,52 +1065,10 @@ const de_Slots = (output, context) => {
|
|
|
1326
1065
|
return acc;
|
|
1327
1066
|
}, {});
|
|
1328
1067
|
};
|
|
1329
|
-
const de_StringList = (output, context) => {
|
|
1330
|
-
const retVal = (output || [])
|
|
1331
|
-
.filter((e) => e != null)
|
|
1332
|
-
.map((entry) => {
|
|
1333
|
-
if (entry === null) {
|
|
1334
|
-
return null;
|
|
1335
|
-
}
|
|
1336
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
1337
|
-
});
|
|
1338
|
-
return retVal;
|
|
1339
|
-
};
|
|
1340
|
-
const de_StringMap = (output, context) => {
|
|
1341
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1342
|
-
if (value === null) {
|
|
1343
|
-
return acc;
|
|
1344
|
-
}
|
|
1345
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
1346
|
-
return acc;
|
|
1347
|
-
}, {});
|
|
1348
|
-
};
|
|
1349
|
-
const de_TextResponseEvent = (output, context) => {
|
|
1350
|
-
return {
|
|
1351
|
-
eventId: (0, smithy_client_1.expectString)(output.eventId),
|
|
1352
|
-
messages: output.messages != null ? de_Messages(output.messages, context) : undefined,
|
|
1353
|
-
};
|
|
1354
|
-
};
|
|
1355
|
-
const de_TranscriptEvent = (output, context) => {
|
|
1356
|
-
return {
|
|
1357
|
-
eventId: (0, smithy_client_1.expectString)(output.eventId),
|
|
1358
|
-
transcript: (0, smithy_client_1.expectString)(output.transcript),
|
|
1359
|
-
};
|
|
1360
|
-
};
|
|
1361
|
-
const de_Value = (output, context) => {
|
|
1362
|
-
return {
|
|
1363
|
-
interpretedValue: (0, smithy_client_1.expectString)(output.interpretedValue),
|
|
1364
|
-
originalValue: (0, smithy_client_1.expectString)(output.originalValue),
|
|
1365
|
-
resolvedValues: output.resolvedValues != null ? de_StringList(output.resolvedValues, context) : undefined,
|
|
1366
|
-
};
|
|
1367
|
-
};
|
|
1368
1068
|
const de_Values = (output, context) => {
|
|
1369
1069
|
const retVal = (output || [])
|
|
1370
1070
|
.filter((e) => e != null)
|
|
1371
1071
|
.map((entry) => {
|
|
1372
|
-
if (entry === null) {
|
|
1373
|
-
return null;
|
|
1374
|
-
}
|
|
1375
1072
|
return de_Slot(entry, context);
|
|
1376
1073
|
});
|
|
1377
1074
|
return retVal;
|