@aws-sdk/client-lex-runtime-v2 3.928.0 → 3.930.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist-cjs/index.js +761 -1106
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/LexRuntimeV2Client.js +2 -0
  4. package/dist-es/commands/DeleteSessionCommand.js +3 -9
  5. package/dist-es/commands/GetSessionCommand.js +3 -10
  6. package/dist-es/commands/PutSessionCommand.js +3 -10
  7. package/dist-es/commands/RecognizeTextCommand.js +3 -10
  8. package/dist-es/commands/RecognizeUtteranceCommand.js +3 -10
  9. package/dist-es/commands/StartConversationCommand.js +3 -11
  10. package/dist-es/models/models_0.js +0 -169
  11. package/dist-es/runtimeConfig.shared.js +2 -0
  12. package/dist-es/schemas/schemas_0.js +746 -0
  13. package/dist-types/LexRuntimeV2Client.d.ts +10 -1
  14. package/dist-types/models/models_0.d.ts +8 -78
  15. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  16. package/dist-types/runtimeConfig.d.ts +1 -0
  17. package/dist-types/runtimeConfig.native.d.ts +1 -0
  18. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  19. package/dist-types/schemas/schemas_0.d.ts +78 -0
  20. package/dist-types/ts3.4/LexRuntimeV2Client.d.ts +4 -0
  21. package/dist-types/ts3.4/models/models_0.d.ts +0 -61
  22. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  23. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  24. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  25. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  26. package/dist-types/ts3.4/schemas/schemas_0.d.ts +85 -0
  27. package/package.json +39 -39
  28. package/dist-es/protocols/Aws_restJson1.js +0 -873
  29. package/dist-types/protocols/Aws_restJson1.d.ts +0 -56
  30. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -81
package/dist-cjs/index.js CHANGED
@@ -7,6 +7,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
7
7
  var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
8
8
  var configResolver = require('@smithy/config-resolver');
9
9
  var core = require('@smithy/core');
10
+ var schema = require('@smithy/core/schema');
10
11
  var eventstreamSerdeConfigResolver = require('@smithy/eventstream-serde-config-resolver');
11
12
  var middlewareContentLength = require('@smithy/middleware-content-length');
12
13
  var middlewareEndpoint = require('@smithy/middleware-endpoint');
@@ -16,8 +17,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
16
17
  var runtimeConfig = require('./runtimeConfig');
17
18
  var regionConfigResolver = require('@aws-sdk/region-config-resolver');
18
19
  var protocolHttp = require('@smithy/protocol-http');
19
- var middlewareSerde = require('@smithy/middleware-serde');
20
- var core$1 = require('@aws-sdk/core');
21
20
 
22
21
  const resolveClientEndpointParameters = (options) => {
23
22
  return Object.assign(options, {
@@ -95,6 +94,7 @@ class LexRuntimeV2Client extends smithyClient.Client {
95
94
  const _config_9 = middlewareEventstream.resolveEventStreamConfig(_config_8);
96
95
  const _config_10 = resolveRuntimeExtensions(_config_9, configuration?.extensions || []);
97
96
  this.config = _config_10;
97
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
98
98
  this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
99
99
  this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
100
100
  this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
@@ -114,14 +114,14 @@ class LexRuntimeV2Client extends smithyClient.Client {
114
114
  }
115
115
  }
116
116
 
117
- class LexRuntimeV2ServiceException extends smithyClient.ServiceException {
117
+ let LexRuntimeV2ServiceException$1 = class LexRuntimeV2ServiceException extends smithyClient.ServiceException {
118
118
  constructor(options) {
119
119
  super(options);
120
120
  Object.setPrototypeOf(this, LexRuntimeV2ServiceException.prototype);
121
121
  }
122
- }
122
+ };
123
123
 
124
- class AccessDeniedException extends LexRuntimeV2ServiceException {
124
+ let AccessDeniedException$1 = class AccessDeniedException extends LexRuntimeV2ServiceException$1 {
125
125
  name = "AccessDeniedException";
126
126
  $fault = "client";
127
127
  constructor(opts) {
@@ -132,8 +132,8 @@ class AccessDeniedException extends LexRuntimeV2ServiceException {
132
132
  });
133
133
  Object.setPrototypeOf(this, AccessDeniedException.prototype);
134
134
  }
135
- }
136
- class ConflictException extends LexRuntimeV2ServiceException {
135
+ };
136
+ let ConflictException$1 = class ConflictException extends LexRuntimeV2ServiceException$1 {
137
137
  name = "ConflictException";
138
138
  $fault = "client";
139
139
  constructor(opts) {
@@ -144,8 +144,8 @@ class ConflictException extends LexRuntimeV2ServiceException {
144
144
  });
145
145
  Object.setPrototypeOf(this, ConflictException.prototype);
146
146
  }
147
- }
148
- class InternalServerException extends LexRuntimeV2ServiceException {
147
+ };
148
+ let InternalServerException$1 = class InternalServerException extends LexRuntimeV2ServiceException$1 {
149
149
  name = "InternalServerException";
150
150
  $fault = "server";
151
151
  constructor(opts) {
@@ -156,8 +156,8 @@ class InternalServerException extends LexRuntimeV2ServiceException {
156
156
  });
157
157
  Object.setPrototypeOf(this, InternalServerException.prototype);
158
158
  }
159
- }
160
- class ResourceNotFoundException extends LexRuntimeV2ServiceException {
159
+ };
160
+ let ResourceNotFoundException$1 = class ResourceNotFoundException extends LexRuntimeV2ServiceException$1 {
161
161
  name = "ResourceNotFoundException";
162
162
  $fault = "client";
163
163
  constructor(opts) {
@@ -168,8 +168,8 @@ class ResourceNotFoundException extends LexRuntimeV2ServiceException {
168
168
  });
169
169
  Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
170
170
  }
171
- }
172
- class ThrottlingException extends LexRuntimeV2ServiceException {
171
+ };
172
+ let ThrottlingException$1 = class ThrottlingException extends LexRuntimeV2ServiceException$1 {
173
173
  name = "ThrottlingException";
174
174
  $fault = "client";
175
175
  constructor(opts) {
@@ -180,8 +180,8 @@ class ThrottlingException extends LexRuntimeV2ServiceException {
180
180
  });
181
181
  Object.setPrototypeOf(this, ThrottlingException.prototype);
182
182
  }
183
- }
184
- class ValidationException extends LexRuntimeV2ServiceException {
183
+ };
184
+ let ValidationException$1 = class ValidationException extends LexRuntimeV2ServiceException$1 {
185
185
  name = "ValidationException";
186
186
  $fault = "client";
187
187
  constructor(opts) {
@@ -192,7 +192,7 @@ class ValidationException extends LexRuntimeV2ServiceException {
192
192
  });
193
193
  Object.setPrototypeOf(this, ValidationException.prototype);
194
194
  }
195
- }
195
+ };
196
196
  const ConfirmationState = {
197
197
  CONFIRMED: "Confirmed",
198
198
  DENIED: "Denied",
@@ -240,7 +240,7 @@ const DialogActionType = {
240
240
  ELICIT_SLOT: "ElicitSlot",
241
241
  NONE: "None",
242
242
  };
243
- class BadGatewayException extends LexRuntimeV2ServiceException {
243
+ let BadGatewayException$1 = class BadGatewayException extends LexRuntimeV2ServiceException$1 {
244
244
  name = "BadGatewayException";
245
245
  $fault = "server";
246
246
  constructor(opts) {
@@ -251,8 +251,8 @@ class BadGatewayException extends LexRuntimeV2ServiceException {
251
251
  });
252
252
  Object.setPrototypeOf(this, BadGatewayException.prototype);
253
253
  }
254
- }
255
- class DependencyFailedException extends LexRuntimeV2ServiceException {
254
+ };
255
+ let DependencyFailedException$1 = class DependencyFailedException extends LexRuntimeV2ServiceException$1 {
256
256
  name = "DependencyFailedException";
257
257
  $fault = "client";
258
258
  constructor(opts) {
@@ -263,7 +263,7 @@ class DependencyFailedException extends LexRuntimeV2ServiceException {
263
263
  });
264
264
  Object.setPrototypeOf(this, DependencyFailedException.prototype);
265
265
  }
266
- }
266
+ };
267
267
  const ConversationMode = {
268
268
  AUDIO: "AUDIO",
269
269
  TEXT: "TEXT",
@@ -278,1033 +278,167 @@ const PlaybackInterruptionReason = {
278
278
  TEXT_DETECTED: "TEXT_DETECTED",
279
279
  VOICE_START_DETECTED: "VOICE_START_DETECTED",
280
280
  };
281
- exports.StartConversationRequestEventStream = void 0;
282
- (function (StartConversationRequestEventStream) {
283
- StartConversationRequestEventStream.visit = (value, visitor) => {
284
- if (value.ConfigurationEvent !== undefined)
285
- return visitor.ConfigurationEvent(value.ConfigurationEvent);
286
- if (value.AudioInputEvent !== undefined)
287
- return visitor.AudioInputEvent(value.AudioInputEvent);
288
- if (value.DTMFInputEvent !== undefined)
289
- return visitor.DTMFInputEvent(value.DTMFInputEvent);
290
- if (value.TextInputEvent !== undefined)
291
- return visitor.TextInputEvent(value.TextInputEvent);
292
- if (value.PlaybackCompletionEvent !== undefined)
293
- return visitor.PlaybackCompletionEvent(value.PlaybackCompletionEvent);
294
- if (value.DisconnectionEvent !== undefined)
295
- return visitor.DisconnectionEvent(value.DisconnectionEvent);
296
- return visitor._(value.$unknown[0], value.$unknown[1]);
297
- };
298
- })(exports.StartConversationRequestEventStream || (exports.StartConversationRequestEventStream = {}));
299
- exports.StartConversationResponseEventStream = void 0;
300
- (function (StartConversationResponseEventStream) {
301
- StartConversationResponseEventStream.visit = (value, visitor) => {
302
- if (value.PlaybackInterruptionEvent !== undefined)
303
- return visitor.PlaybackInterruptionEvent(value.PlaybackInterruptionEvent);
304
- if (value.TranscriptEvent !== undefined)
305
- return visitor.TranscriptEvent(value.TranscriptEvent);
306
- if (value.IntentResultEvent !== undefined)
307
- return visitor.IntentResultEvent(value.IntentResultEvent);
308
- if (value.TextResponseEvent !== undefined)
309
- return visitor.TextResponseEvent(value.TextResponseEvent);
310
- if (value.AudioResponseEvent !== undefined)
311
- return visitor.AudioResponseEvent(value.AudioResponseEvent);
312
- if (value.HeartbeatEvent !== undefined)
313
- return visitor.HeartbeatEvent(value.HeartbeatEvent);
314
- if (value.AccessDeniedException !== undefined)
315
- return visitor.AccessDeniedException(value.AccessDeniedException);
316
- if (value.ResourceNotFoundException !== undefined)
317
- return visitor.ResourceNotFoundException(value.ResourceNotFoundException);
318
- if (value.ValidationException !== undefined)
319
- return visitor.ValidationException(value.ValidationException);
320
- if (value.ThrottlingException !== undefined)
321
- return visitor.ThrottlingException(value.ThrottlingException);
322
- if (value.InternalServerException !== undefined)
323
- return visitor.InternalServerException(value.InternalServerException);
324
- if (value.ConflictException !== undefined)
325
- return visitor.ConflictException(value.ConflictException);
326
- if (value.DependencyFailedException !== undefined)
327
- return visitor.DependencyFailedException(value.DependencyFailedException);
328
- if (value.BadGatewayException !== undefined)
329
- return visitor.BadGatewayException(value.BadGatewayException);
330
- return visitor._(value.$unknown[0], value.$unknown[1]);
331
- };
332
- })(exports.StartConversationResponseEventStream || (exports.StartConversationResponseEventStream = {}));
333
- const ActiveContextFilterSensitiveLog = (obj) => ({
334
- ...obj,
335
- ...(obj.contextAttributes && { contextAttributes: smithyClient.SENSITIVE_STRING }),
336
- });
337
- const MessageFilterSensitiveLog = (obj) => ({
338
- ...obj,
339
- ...(obj.content && { content: smithyClient.SENSITIVE_STRING }),
340
- });
341
- const PutSessionResponseFilterSensitiveLog = (obj) => ({
342
- ...obj,
343
- });
344
- const RecognizeUtteranceRequestFilterSensitiveLog = (obj) => ({
345
- ...obj,
346
- ...(obj.sessionState && { sessionState: smithyClient.SENSITIVE_STRING }),
347
- ...(obj.requestAttributes && { requestAttributes: smithyClient.SENSITIVE_STRING }),
348
- });
349
- const RecognizeUtteranceResponseFilterSensitiveLog = (obj) => ({
350
- ...obj,
351
- });
352
- const DTMFInputEventFilterSensitiveLog = (obj) => ({
353
- ...obj,
354
- ...(obj.inputCharacter && { inputCharacter: smithyClient.SENSITIVE_STRING }),
355
- });
356
- const TextInputEventFilterSensitiveLog = (obj) => ({
357
- ...obj,
358
- ...(obj.text && { text: smithyClient.SENSITIVE_STRING }),
359
- });
360
- const TextResponseEventFilterSensitiveLog = (obj) => ({
361
- ...obj,
362
- ...(obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }),
363
- });
364
- const SessionStateFilterSensitiveLog = (obj) => ({
365
- ...obj,
366
- ...(obj.activeContexts && {
367
- activeContexts: obj.activeContexts.map((item) => ActiveContextFilterSensitiveLog(item)),
368
- }),
369
- });
370
- const ConfigurationEventFilterSensitiveLog = (obj) => ({
371
- ...obj,
372
- ...(obj.welcomeMessages && { welcomeMessages: obj.welcomeMessages.map((item) => MessageFilterSensitiveLog(item)) }),
373
- });
374
- const PutSessionRequestFilterSensitiveLog = (obj) => ({
375
- ...obj,
376
- ...(obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }),
377
- });
378
- const RecognizeTextRequestFilterSensitiveLog = (obj) => ({
379
- ...obj,
380
- ...(obj.text && { text: smithyClient.SENSITIVE_STRING }),
381
- });
382
- const StartConversationRequestEventStreamFilterSensitiveLog = (obj) => {
383
- if (obj.ConfigurationEvent !== undefined)
384
- return { ConfigurationEvent: ConfigurationEventFilterSensitiveLog(obj.ConfigurationEvent) };
385
- if (obj.AudioInputEvent !== undefined)
386
- return { AudioInputEvent: obj.AudioInputEvent };
387
- if (obj.DTMFInputEvent !== undefined)
388
- return { DTMFInputEvent: DTMFInputEventFilterSensitiveLog(obj.DTMFInputEvent) };
389
- if (obj.TextInputEvent !== undefined)
390
- return { TextInputEvent: TextInputEventFilterSensitiveLog(obj.TextInputEvent) };
391
- if (obj.PlaybackCompletionEvent !== undefined)
392
- return { PlaybackCompletionEvent: obj.PlaybackCompletionEvent };
393
- if (obj.DisconnectionEvent !== undefined)
394
- return { DisconnectionEvent: obj.DisconnectionEvent };
395
- if (obj.$unknown !== undefined)
396
- return { [obj.$unknown[0]]: "UNKNOWN" };
397
- };
398
- const StartConversationRequestFilterSensitiveLog = (obj) => ({
399
- ...obj,
400
- ...(obj.requestEventStream && { requestEventStream: "STREAMING_CONTENT" }),
401
- });
402
- const GetSessionResponseFilterSensitiveLog = (obj) => ({
403
- ...obj,
404
- ...(obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }),
405
- });
406
- const IntentResultEventFilterSensitiveLog = (obj) => ({
407
- ...obj,
408
- });
409
- const RecognizeTextResponseFilterSensitiveLog = (obj) => ({
410
- ...obj,
411
- ...(obj.messages && { messages: obj.messages.map((item) => MessageFilterSensitiveLog(item)) }),
412
- });
413
- const StartConversationResponseEventStreamFilterSensitiveLog = (obj) => {
414
- if (obj.PlaybackInterruptionEvent !== undefined)
415
- return { PlaybackInterruptionEvent: obj.PlaybackInterruptionEvent };
416
- if (obj.TranscriptEvent !== undefined)
417
- return { TranscriptEvent: obj.TranscriptEvent };
418
- if (obj.IntentResultEvent !== undefined)
419
- return { IntentResultEvent: IntentResultEventFilterSensitiveLog(obj.IntentResultEvent) };
420
- if (obj.TextResponseEvent !== undefined)
421
- return { TextResponseEvent: TextResponseEventFilterSensitiveLog(obj.TextResponseEvent) };
422
- if (obj.AudioResponseEvent !== undefined)
423
- return { AudioResponseEvent: obj.AudioResponseEvent };
424
- if (obj.HeartbeatEvent !== undefined)
425
- return { HeartbeatEvent: obj.HeartbeatEvent };
426
- if (obj.AccessDeniedException !== undefined)
427
- return { AccessDeniedException: obj.AccessDeniedException };
428
- if (obj.ResourceNotFoundException !== undefined)
429
- return { ResourceNotFoundException: obj.ResourceNotFoundException };
430
- if (obj.ValidationException !== undefined)
431
- return { ValidationException: obj.ValidationException };
432
- if (obj.ThrottlingException !== undefined)
433
- return { ThrottlingException: obj.ThrottlingException };
434
- if (obj.InternalServerException !== undefined)
435
- return { InternalServerException: obj.InternalServerException };
436
- if (obj.ConflictException !== undefined)
437
- return { ConflictException: obj.ConflictException };
438
- if (obj.DependencyFailedException !== undefined)
439
- return { DependencyFailedException: obj.DependencyFailedException };
440
- if (obj.BadGatewayException !== undefined)
441
- return { BadGatewayException: obj.BadGatewayException };
442
- if (obj.$unknown !== undefined)
443
- return { [obj.$unknown[0]]: "UNKNOWN" };
444
- };
445
- const StartConversationResponseFilterSensitiveLog = (obj) => ({
446
- ...obj,
447
- ...(obj.responseEventStream && { responseEventStream: "STREAMING_CONTENT" }),
448
- });
449
281
 
450
- const se_DeleteSessionCommand = async (input, context) => {
451
- const b = core.requestBuilder(input, context);
452
- const headers = {};
453
- b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}");
454
- b.p("botId", () => input.botId, "{botId}", false);
455
- b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
456
- b.p("localeId", () => input.localeId, "{localeId}", false);
457
- b.p("sessionId", () => input.sessionId, "{sessionId}", false);
458
- let body;
459
- b.m("DELETE").h(headers).b(body);
460
- return b.build();
461
- };
462
- const se_GetSessionCommand = async (input, context) => {
463
- const b = core.requestBuilder(input, context);
464
- const headers = {};
465
- b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}");
466
- b.p("botId", () => input.botId, "{botId}", false);
467
- b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
468
- b.p("localeId", () => input.localeId, "{localeId}", false);
469
- b.p("sessionId", () => input.sessionId, "{sessionId}", false);
470
- let body;
471
- b.m("GET").h(headers).b(body);
472
- return b.build();
473
- };
474
- const se_PutSessionCommand = async (input, context) => {
475
- const b = core.requestBuilder(input, context);
476
- const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
477
- "content-type": "application/json",
478
- [_r]: input[_rCT],
479
- });
480
- b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}");
481
- b.p("botId", () => input.botId, "{botId}", false);
482
- b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
483
- b.p("localeId", () => input.localeId, "{localeId}", false);
484
- b.p("sessionId", () => input.sessionId, "{sessionId}", false);
485
- let body;
486
- body = JSON.stringify(smithyClient.take(input, {
487
- messages: (_) => smithyClient._json(_),
488
- requestAttributes: (_) => smithyClient._json(_),
489
- sessionState: (_) => se_SessionState(_),
490
- }));
491
- b.m("POST").h(headers).b(body);
492
- return b.build();
493
- };
494
- const se_RecognizeTextCommand = async (input, context) => {
495
- const b = core.requestBuilder(input, context);
496
- const headers = {
497
- "content-type": "application/json",
498
- };
499
- b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text");
500
- b.p("botId", () => input.botId, "{botId}", false);
501
- b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
502
- b.p("localeId", () => input.localeId, "{localeId}", false);
503
- b.p("sessionId", () => input.sessionId, "{sessionId}", false);
504
- let body;
505
- body = JSON.stringify(smithyClient.take(input, {
506
- requestAttributes: (_) => smithyClient._json(_),
507
- sessionState: (_) => se_SessionState(_),
508
- text: [],
509
- }));
510
- b.m("POST").h(headers).b(body);
511
- return b.build();
512
- };
513
- const se_RecognizeUtteranceCommand = async (input, context) => {
514
- const b = core.requestBuilder(input, context);
515
- const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
516
- "x-amz-content-sha256": "UNSIGNED-PAYLOAD",
517
- [_ct]: input[_rCTe] || "application/octet-stream",
518
- [_xalss]: input[_sS],
519
- [_xalra]: input[_rA],
520
- [_rct]: input[_rCT],
521
- });
522
- b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance");
523
- b.p("botId", () => input.botId, "{botId}", false);
524
- b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
525
- b.p("localeId", () => input.localeId, "{localeId}", false);
526
- b.p("sessionId", () => input.sessionId, "{sessionId}", false);
527
- let body;
528
- if (input.inputStream !== undefined) {
529
- body = input.inputStream;
530
- }
531
- b.m("POST").h(headers).b(body);
532
- return b.build();
533
- };
534
- const se_StartConversationCommand = async (input, context) => {
535
- const b = core.requestBuilder(input, context);
536
- const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
537
- "content-type": "application/json",
538
- [_xalcm]: input[_cM],
539
- });
540
- b.bp("/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/conversation");
541
- b.p("botId", () => input.botId, "{botId}", false);
542
- b.p("botAliasId", () => input.botAliasId, "{botAliasId}", false);
543
- b.p("localeId", () => input.localeId, "{localeId}", false);
544
- b.p("sessionId", () => input.sessionId, "{sessionId}", false);
545
- let body;
546
- if (input.requestEventStream !== undefined) {
547
- body = se_StartConversationRequestEventStream(input.requestEventStream, context);
548
- }
549
- b.m("POST").h(headers).b(body);
550
- return b.build();
551
- };
552
- const de_DeleteSessionCommand = async (output, context) => {
553
- if (output.statusCode !== 200 && output.statusCode >= 300) {
554
- return de_CommandError(output, context);
555
- }
556
- const contents = smithyClient.map({
557
- $metadata: deserializeMetadata(output),
558
- });
559
- const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
560
- const doc = smithyClient.take(data, {
561
- botAliasId: smithyClient.expectString,
562
- botId: smithyClient.expectString,
563
- localeId: smithyClient.expectString,
564
- sessionId: smithyClient.expectString,
565
- });
566
- Object.assign(contents, doc);
567
- return contents;
568
- };
569
- const de_GetSessionCommand = async (output, context) => {
570
- if (output.statusCode !== 200 && output.statusCode >= 300) {
571
- return de_CommandError(output, context);
572
- }
573
- const contents = smithyClient.map({
574
- $metadata: deserializeMetadata(output),
575
- });
576
- const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
577
- const doc = smithyClient.take(data, {
578
- interpretations: (_) => de_Interpretations(_),
579
- messages: smithyClient._json,
580
- sessionId: smithyClient.expectString,
581
- sessionState: (_) => de_SessionState(_),
582
- });
583
- Object.assign(contents, doc);
584
- return contents;
585
- };
586
- const de_PutSessionCommand = async (output, context) => {
587
- if (output.statusCode !== 200 && output.statusCode >= 300) {
588
- return de_CommandError(output, context);
589
- }
590
- const contents = smithyClient.map({
591
- $metadata: deserializeMetadata(output),
592
- [_cT]: [, output.headers[_ct]],
593
- [_m]: [, output.headers[_xalm]],
594
- [_sS]: [, output.headers[_xalss]],
595
- [_rA]: [, output.headers[_xalra]],
596
- [_sI]: [, output.headers[_xalsi]],
597
- });
598
- const data = output.body;
599
- context.sdkStreamMixin(data);
600
- contents.audioStream = data;
601
- return contents;
602
- };
603
- const de_RecognizeTextCommand = async (output, context) => {
604
- if (output.statusCode !== 200 && output.statusCode >= 300) {
605
- return de_CommandError(output, context);
606
- }
607
- const contents = smithyClient.map({
608
- $metadata: deserializeMetadata(output),
609
- });
610
- const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
611
- const doc = smithyClient.take(data, {
612
- interpretations: (_) => de_Interpretations(_),
613
- messages: smithyClient._json,
614
- recognizedBotMember: smithyClient._json,
615
- requestAttributes: smithyClient._json,
616
- sessionId: smithyClient.expectString,
617
- sessionState: (_) => de_SessionState(_),
618
- });
619
- Object.assign(contents, doc);
620
- return contents;
621
- };
622
- const de_RecognizeUtteranceCommand = async (output, context) => {
623
- if (output.statusCode !== 200 && output.statusCode >= 300) {
624
- return de_CommandError(output, context);
625
- }
626
- const contents = smithyClient.map({
627
- $metadata: deserializeMetadata(output),
628
- [_iM]: [, output.headers[_xalim]],
629
- [_cT]: [, output.headers[_ct]],
630
- [_m]: [, output.headers[_xalm]],
631
- [_i]: [, output.headers[_xali]],
632
- [_sS]: [, output.headers[_xalss]],
633
- [_rA]: [, output.headers[_xalra]],
634
- [_sI]: [, output.headers[_xalsi]],
635
- [_iT]: [, output.headers[_xalit]],
636
- [_rBM]: [, output.headers[_xalrbm]],
637
- });
638
- const data = output.body;
639
- context.sdkStreamMixin(data);
640
- contents.audioStream = data;
641
- return contents;
642
- };
643
- const de_StartConversationCommand = async (output, context) => {
644
- if (output.statusCode !== 200 && output.statusCode >= 300) {
645
- return de_CommandError(output, context);
646
- }
647
- const contents = smithyClient.map({
648
- $metadata: deserializeMetadata(output),
649
- });
650
- const data = output.body;
651
- contents.responseEventStream = de_StartConversationResponseEventStream(data, context);
652
- return contents;
653
- };
654
- const de_CommandError = async (output, context) => {
655
- const parsedOutput = {
656
- ...output,
657
- body: await core$1.parseJsonErrorBody(output.body, context),
658
- };
659
- const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
660
- switch (errorCode) {
661
- case "AccessDeniedException":
662
- case "com.amazonaws.lexruntimev2#AccessDeniedException":
663
- throw await de_AccessDeniedExceptionRes(parsedOutput);
664
- case "ConflictException":
665
- case "com.amazonaws.lexruntimev2#ConflictException":
666
- throw await de_ConflictExceptionRes(parsedOutput);
667
- case "InternalServerException":
668
- case "com.amazonaws.lexruntimev2#InternalServerException":
669
- throw await de_InternalServerExceptionRes(parsedOutput);
670
- case "ResourceNotFoundException":
671
- case "com.amazonaws.lexruntimev2#ResourceNotFoundException":
672
- throw await de_ResourceNotFoundExceptionRes(parsedOutput);
673
- case "ThrottlingException":
674
- case "com.amazonaws.lexruntimev2#ThrottlingException":
675
- throw await de_ThrottlingExceptionRes(parsedOutput);
676
- case "ValidationException":
677
- case "com.amazonaws.lexruntimev2#ValidationException":
678
- throw await de_ValidationExceptionRes(parsedOutput);
679
- case "BadGatewayException":
680
- case "com.amazonaws.lexruntimev2#BadGatewayException":
681
- throw await de_BadGatewayExceptionRes(parsedOutput);
682
- case "DependencyFailedException":
683
- case "com.amazonaws.lexruntimev2#DependencyFailedException":
684
- throw await de_DependencyFailedExceptionRes(parsedOutput);
685
- default:
686
- const parsedBody = parsedOutput.body;
687
- return throwDefaultError({
688
- output,
689
- parsedBody,
690
- errorCode,
691
- });
692
- }
693
- };
694
- const throwDefaultError = smithyClient.withBaseException(LexRuntimeV2ServiceException);
695
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
696
- const contents = smithyClient.map({});
697
- const data = parsedOutput.body;
698
- const doc = smithyClient.take(data, {
699
- message: smithyClient.expectString,
700
- });
701
- Object.assign(contents, doc);
702
- const exception = new AccessDeniedException({
703
- $metadata: deserializeMetadata(parsedOutput),
704
- ...contents,
705
- });
706
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
707
- };
708
- const de_BadGatewayExceptionRes = async (parsedOutput, context) => {
709
- const contents = smithyClient.map({});
710
- const data = parsedOutput.body;
711
- const doc = smithyClient.take(data, {
712
- message: smithyClient.expectString,
713
- });
714
- Object.assign(contents, doc);
715
- const exception = new BadGatewayException({
716
- $metadata: deserializeMetadata(parsedOutput),
717
- ...contents,
718
- });
719
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
720
- };
721
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
722
- const contents = smithyClient.map({});
723
- const data = parsedOutput.body;
724
- const doc = smithyClient.take(data, {
725
- message: smithyClient.expectString,
726
- });
727
- Object.assign(contents, doc);
728
- const exception = new ConflictException({
729
- $metadata: deserializeMetadata(parsedOutput),
730
- ...contents,
731
- });
732
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
733
- };
734
- const de_DependencyFailedExceptionRes = async (parsedOutput, context) => {
735
- const contents = smithyClient.map({});
736
- const data = parsedOutput.body;
737
- const doc = smithyClient.take(data, {
738
- message: smithyClient.expectString,
739
- });
740
- Object.assign(contents, doc);
741
- const exception = new DependencyFailedException({
742
- $metadata: deserializeMetadata(parsedOutput),
743
- ...contents,
744
- });
745
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
746
- };
747
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
748
- const contents = smithyClient.map({});
749
- const data = parsedOutput.body;
750
- const doc = smithyClient.take(data, {
751
- message: smithyClient.expectString,
752
- });
753
- Object.assign(contents, doc);
754
- const exception = new InternalServerException({
755
- $metadata: deserializeMetadata(parsedOutput),
756
- ...contents,
757
- });
758
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
759
- };
760
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
761
- const contents = smithyClient.map({});
762
- const data = parsedOutput.body;
763
- const doc = smithyClient.take(data, {
764
- message: smithyClient.expectString,
765
- });
766
- Object.assign(contents, doc);
767
- const exception = new ResourceNotFoundException({
768
- $metadata: deserializeMetadata(parsedOutput),
769
- ...contents,
770
- });
771
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
772
- };
773
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
774
- const contents = smithyClient.map({});
775
- const data = parsedOutput.body;
776
- const doc = smithyClient.take(data, {
777
- message: smithyClient.expectString,
778
- });
779
- Object.assign(contents, doc);
780
- const exception = new ThrottlingException({
781
- $metadata: deserializeMetadata(parsedOutput),
782
- ...contents,
783
- });
784
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
785
- };
786
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
787
- const contents = smithyClient.map({});
788
- const data = parsedOutput.body;
789
- const doc = smithyClient.take(data, {
790
- message: smithyClient.expectString,
791
- });
792
- Object.assign(contents, doc);
793
- const exception = new ValidationException({
794
- $metadata: deserializeMetadata(parsedOutput),
795
- ...contents,
796
- });
797
- return smithyClient.decorateServiceException(exception, parsedOutput.body);
798
- };
799
- const se_StartConversationRequestEventStream = (input, context) => {
800
- const eventMarshallingVisitor = (event) => exports.StartConversationRequestEventStream.visit(event, {
801
- ConfigurationEvent: (value) => se_ConfigurationEvent_event(value, context),
802
- AudioInputEvent: (value) => se_AudioInputEvent_event(value, context),
803
- DTMFInputEvent: (value) => se_DTMFInputEvent_event(value, context),
804
- TextInputEvent: (value) => se_TextInputEvent_event(value, context),
805
- PlaybackCompletionEvent: (value) => se_PlaybackCompletionEvent_event(value, context),
806
- DisconnectionEvent: (value) => se_DisconnectionEvent_event(value, context),
807
- _: (value) => value,
808
- });
809
- return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
810
- };
811
- const se_AudioInputEvent_event = (input, context) => {
812
- const headers = {
813
- ":event-type": { type: "string", value: "AudioInputEvent" },
814
- ":message-type": { type: "string", value: "event" },
815
- ":content-type": { type: "string", value: "application/json" },
816
- };
817
- let body = new Uint8Array();
818
- body = se_AudioInputEvent(input, context);
819
- body = context.utf8Decoder(JSON.stringify(body));
820
- return { headers, body };
821
- };
822
- const se_ConfigurationEvent_event = (input, context) => {
823
- const headers = {
824
- ":event-type": { type: "string", value: "ConfigurationEvent" },
825
- ":message-type": { type: "string", value: "event" },
826
- ":content-type": { type: "string", value: "application/json" },
827
- };
828
- let body = new Uint8Array();
829
- body = se_ConfigurationEvent(input);
830
- body = context.utf8Decoder(JSON.stringify(body));
831
- return { headers, body };
832
- };
833
- const se_DisconnectionEvent_event = (input, context) => {
834
- const headers = {
835
- ":event-type": { type: "string", value: "DisconnectionEvent" },
836
- ":message-type": { type: "string", value: "event" },
837
- ":content-type": { type: "string", value: "application/json" },
838
- };
839
- let body = new Uint8Array();
840
- body = smithyClient._json(input);
841
- body = context.utf8Decoder(JSON.stringify(body));
842
- return { headers, body };
843
- };
844
- const se_DTMFInputEvent_event = (input, context) => {
845
- const headers = {
846
- ":event-type": { type: "string", value: "DTMFInputEvent" },
847
- ":message-type": { type: "string", value: "event" },
848
- ":content-type": { type: "string", value: "application/json" },
849
- };
850
- let body = new Uint8Array();
851
- body = smithyClient._json(input);
852
- body = context.utf8Decoder(JSON.stringify(body));
853
- return { headers, body };
854
- };
855
- const se_PlaybackCompletionEvent_event = (input, context) => {
856
- const headers = {
857
- ":event-type": { type: "string", value: "PlaybackCompletionEvent" },
858
- ":message-type": { type: "string", value: "event" },
859
- ":content-type": { type: "string", value: "application/json" },
860
- };
861
- let body = new Uint8Array();
862
- body = smithyClient._json(input);
863
- body = context.utf8Decoder(JSON.stringify(body));
864
- return { headers, body };
865
- };
866
- const se_TextInputEvent_event = (input, context) => {
867
- const headers = {
868
- ":event-type": { type: "string", value: "TextInputEvent" },
869
- ":message-type": { type: "string", value: "event" },
870
- ":content-type": { type: "string", value: "application/json" },
871
- };
872
- let body = new Uint8Array();
873
- body = smithyClient._json(input);
874
- body = context.utf8Decoder(JSON.stringify(body));
875
- return { headers, body };
876
- };
877
- const de_StartConversationResponseEventStream = (output, context) => {
878
- return context.eventStreamMarshaller.deserialize(output, async (event) => {
879
- if (event["PlaybackInterruptionEvent"] != null) {
880
- return {
881
- PlaybackInterruptionEvent: await de_PlaybackInterruptionEvent_event(event["PlaybackInterruptionEvent"], context),
882
- };
883
- }
884
- if (event["TranscriptEvent"] != null) {
885
- return {
886
- TranscriptEvent: await de_TranscriptEvent_event(event["TranscriptEvent"], context),
887
- };
888
- }
889
- if (event["IntentResultEvent"] != null) {
890
- return {
891
- IntentResultEvent: await de_IntentResultEvent_event(event["IntentResultEvent"], context),
892
- };
893
- }
894
- if (event["TextResponseEvent"] != null) {
895
- return {
896
- TextResponseEvent: await de_TextResponseEvent_event(event["TextResponseEvent"], context),
897
- };
898
- }
899
- if (event["AudioResponseEvent"] != null) {
900
- return {
901
- AudioResponseEvent: await de_AudioResponseEvent_event(event["AudioResponseEvent"], context),
902
- };
903
- }
904
- if (event["HeartbeatEvent"] != null) {
905
- return {
906
- HeartbeatEvent: await de_HeartbeatEvent_event(event["HeartbeatEvent"], context),
907
- };
908
- }
909
- if (event["AccessDeniedException"] != null) {
910
- return {
911
- AccessDeniedException: await de_AccessDeniedException_event(event["AccessDeniedException"], context),
912
- };
913
- }
914
- if (event["ResourceNotFoundException"] != null) {
915
- return {
916
- ResourceNotFoundException: await de_ResourceNotFoundException_event(event["ResourceNotFoundException"], context),
917
- };
918
- }
919
- if (event["ValidationException"] != null) {
920
- return {
921
- ValidationException: await de_ValidationException_event(event["ValidationException"], context),
922
- };
923
- }
924
- if (event["ThrottlingException"] != null) {
925
- return {
926
- ThrottlingException: await de_ThrottlingException_event(event["ThrottlingException"], context),
927
- };
928
- }
929
- if (event["InternalServerException"] != null) {
930
- return {
931
- InternalServerException: await de_InternalServerException_event(event["InternalServerException"], context),
932
- };
933
- }
934
- if (event["ConflictException"] != null) {
935
- return {
936
- ConflictException: await de_ConflictException_event(event["ConflictException"], context),
937
- };
938
- }
939
- if (event["DependencyFailedException"] != null) {
940
- return {
941
- DependencyFailedException: await de_DependencyFailedException_event(event["DependencyFailedException"], context),
942
- };
943
- }
944
- if (event["BadGatewayException"] != null) {
945
- return {
946
- BadGatewayException: await de_BadGatewayException_event(event["BadGatewayException"], context),
947
- };
948
- }
949
- return { $unknown: event };
950
- });
951
- };
952
- const de_AccessDeniedException_event = async (output, context) => {
953
- const parsedOutput = {
954
- ...output,
955
- body: await core$1.parseJsonBody(output.body, context),
956
- };
957
- return de_AccessDeniedExceptionRes(parsedOutput);
958
- };
959
- const de_AudioResponseEvent_event = async (output, context) => {
960
- const contents = {};
961
- const data = await core$1.parseJsonBody(output.body, context);
962
- Object.assign(contents, de_AudioResponseEvent(data, context));
963
- return contents;
964
- };
965
- const de_BadGatewayException_event = async (output, context) => {
966
- const parsedOutput = {
967
- ...output,
968
- body: await core$1.parseJsonBody(output.body, context),
969
- };
970
- return de_BadGatewayExceptionRes(parsedOutput);
971
- };
972
- const de_ConflictException_event = async (output, context) => {
973
- const parsedOutput = {
974
- ...output,
975
- body: await core$1.parseJsonBody(output.body, context),
976
- };
977
- return de_ConflictExceptionRes(parsedOutput);
978
- };
979
- const de_DependencyFailedException_event = async (output, context) => {
980
- const parsedOutput = {
981
- ...output,
982
- body: await core$1.parseJsonBody(output.body, context),
983
- };
984
- return de_DependencyFailedExceptionRes(parsedOutput);
985
- };
986
- const de_HeartbeatEvent_event = async (output, context) => {
987
- const contents = {};
988
- const data = await core$1.parseJsonBody(output.body, context);
989
- Object.assign(contents, smithyClient._json(data));
990
- return contents;
991
- };
992
- const de_IntentResultEvent_event = async (output, context) => {
993
- const contents = {};
994
- const data = await core$1.parseJsonBody(output.body, context);
995
- Object.assign(contents, de_IntentResultEvent(data));
996
- return contents;
997
- };
998
- const de_InternalServerException_event = async (output, context) => {
999
- const parsedOutput = {
1000
- ...output,
1001
- body: await core$1.parseJsonBody(output.body, context),
1002
- };
1003
- return de_InternalServerExceptionRes(parsedOutput);
1004
- };
1005
- const de_PlaybackInterruptionEvent_event = async (output, context) => {
1006
- const contents = {};
1007
- const data = await core$1.parseJsonBody(output.body, context);
1008
- Object.assign(contents, smithyClient._json(data));
1009
- return contents;
1010
- };
1011
- const de_ResourceNotFoundException_event = async (output, context) => {
1012
- const parsedOutput = {
1013
- ...output,
1014
- body: await core$1.parseJsonBody(output.body, context),
1015
- };
1016
- return de_ResourceNotFoundExceptionRes(parsedOutput);
1017
- };
1018
- const de_TextResponseEvent_event = async (output, context) => {
1019
- const contents = {};
1020
- const data = await core$1.parseJsonBody(output.body, context);
1021
- Object.assign(contents, smithyClient._json(data));
1022
- return contents;
1023
- };
1024
- const de_ThrottlingException_event = async (output, context) => {
1025
- const parsedOutput = {
1026
- ...output,
1027
- body: await core$1.parseJsonBody(output.body, context),
1028
- };
1029
- return de_ThrottlingExceptionRes(parsedOutput);
1030
- };
1031
- const de_TranscriptEvent_event = async (output, context) => {
1032
- const contents = {};
1033
- const data = await core$1.parseJsonBody(output.body, context);
1034
- Object.assign(contents, smithyClient._json(data));
1035
- return contents;
1036
- };
1037
- const de_ValidationException_event = async (output, context) => {
1038
- const parsedOutput = {
1039
- ...output,
1040
- body: await core$1.parseJsonBody(output.body, context),
1041
- };
1042
- return de_ValidationExceptionRes(parsedOutput);
1043
- };
1044
- const se_AudioInputEvent = (input, context) => {
1045
- return smithyClient.take(input, {
1046
- audioChunk: context.base64Encoder,
1047
- clientTimestampMillis: [],
1048
- contentType: [],
1049
- eventId: [],
1050
- });
1051
- };
1052
- const se_ConfigurationEvent = (input, context) => {
1053
- return smithyClient.take(input, {
1054
- clientTimestampMillis: [],
1055
- disablePlayback: [],
1056
- eventId: [],
1057
- requestAttributes: smithyClient._json,
1058
- responseContentType: [],
1059
- sessionState: (_) => se_SessionState(_),
1060
- welcomeMessages: smithyClient._json,
1061
- });
1062
- };
1063
- const se_DialogAction = (input, context) => {
1064
- return smithyClient.take(input, {
1065
- slotElicitationStyle: [],
1066
- slotToElicit: [],
1067
- subSlotToElicit: (_) => se_ElicitSubSlot(_),
1068
- type: [],
1069
- });
1070
- };
1071
- const se_ElicitSubSlot = (input, context) => {
1072
- return smithyClient.take(input, {
1073
- name: [],
1074
- subSlotToElicit: (_) => se_ElicitSubSlot(_),
1075
- });
1076
- };
1077
- const se_Intent = (input, context) => {
1078
- return smithyClient.take(input, {
1079
- confirmationState: [],
1080
- name: [],
1081
- slots: (_) => se_Slots(_),
1082
- state: [],
1083
- });
1084
- };
1085
- const se_RuntimeHintDetails = (input, context) => {
1086
- return smithyClient.take(input, {
1087
- runtimeHintValues: smithyClient._json,
1088
- subSlotHints: (_) => se_SlotHintsSlotMap(_),
1089
- });
1090
- };
1091
- const se_RuntimeHints = (input, context) => {
1092
- return smithyClient.take(input, {
1093
- slotHints: (_) => se_SlotHintsIntentMap(_),
1094
- });
1095
- };
1096
- const se_SessionState = (input, context) => {
1097
- return smithyClient.take(input, {
1098
- activeContexts: smithyClient._json,
1099
- dialogAction: (_) => se_DialogAction(_),
1100
- intent: (_) => se_Intent(_),
1101
- originatingRequestId: [],
1102
- runtimeHints: (_) => se_RuntimeHints(_),
1103
- sessionAttributes: smithyClient._json,
1104
- });
1105
- };
1106
- const se_Slot = (input, context) => {
1107
- return smithyClient.take(input, {
1108
- shape: [],
1109
- subSlots: (_) => se_Slots(_),
1110
- value: smithyClient._json,
1111
- values: (_) => se_Values(_),
1112
- });
1113
- };
1114
- const se_SlotHintsIntentMap = (input, context) => {
1115
- return Object.entries(input).reduce((acc, [key, value]) => {
1116
- if (value === null) {
1117
- return acc;
1118
- }
1119
- acc[key] = se_SlotHintsSlotMap(value);
1120
- return acc;
1121
- }, {});
1122
- };
1123
- const se_SlotHintsSlotMap = (input, context) => {
1124
- return Object.entries(input).reduce((acc, [key, value]) => {
1125
- if (value === null) {
1126
- return acc;
1127
- }
1128
- acc[key] = se_RuntimeHintDetails(value);
1129
- return acc;
1130
- }, {});
1131
- };
1132
- const se_Slots = (input, context) => {
1133
- return Object.entries(input).reduce((acc, [key, value]) => {
1134
- if (value === null) {
1135
- return acc;
1136
- }
1137
- acc[key] = se_Slot(value);
1138
- return acc;
1139
- }, {});
1140
- };
1141
- const se_Values = (input, context) => {
1142
- return input
1143
- .filter((e) => e != null)
1144
- .map((entry) => {
1145
- return se_Slot(entry);
1146
- });
1147
- };
1148
- const de_AudioResponseEvent = (output, context) => {
1149
- return smithyClient.take(output, {
1150
- audioChunk: context.base64Decoder,
1151
- contentType: smithyClient.expectString,
1152
- eventId: smithyClient.expectString,
1153
- });
1154
- };
1155
- const de_ConfidenceScore = (output, context) => {
1156
- return smithyClient.take(output, {
1157
- score: smithyClient.limitedParseDouble,
1158
- });
1159
- };
1160
- const de_DialogAction = (output, context) => {
1161
- return smithyClient.take(output, {
1162
- slotElicitationStyle: smithyClient.expectString,
1163
- slotToElicit: smithyClient.expectString,
1164
- subSlotToElicit: (_) => de_ElicitSubSlot(_),
1165
- type: smithyClient.expectString,
1166
- });
1167
- };
1168
- const de_ElicitSubSlot = (output, context) => {
1169
- return smithyClient.take(output, {
1170
- name: smithyClient.expectString,
1171
- subSlotToElicit: (_) => de_ElicitSubSlot(_),
1172
- });
1173
- };
1174
- const de_Intent = (output, context) => {
1175
- return smithyClient.take(output, {
1176
- confirmationState: smithyClient.expectString,
1177
- name: smithyClient.expectString,
1178
- slots: (_) => de_Slots(_),
1179
- state: smithyClient.expectString,
1180
- });
1181
- };
1182
- const de_IntentResultEvent = (output, context) => {
1183
- return smithyClient.take(output, {
1184
- eventId: smithyClient.expectString,
1185
- inputMode: smithyClient.expectString,
1186
- interpretations: (_) => de_Interpretations(_),
1187
- recognizedBotMember: smithyClient._json,
1188
- requestAttributes: smithyClient._json,
1189
- sessionId: smithyClient.expectString,
1190
- sessionState: (_) => de_SessionState(_),
1191
- });
1192
- };
1193
- const de_Interpretation = (output, context) => {
1194
- return smithyClient.take(output, {
1195
- intent: (_) => de_Intent(_),
1196
- interpretationSource: smithyClient.expectString,
1197
- nluConfidence: (_) => de_ConfidenceScore(_),
1198
- sentimentResponse: (_) => de_SentimentResponse(_),
1199
- });
1200
- };
1201
- const de_Interpretations = (output, context) => {
1202
- const retVal = (output || [])
1203
- .filter((e) => e != null)
1204
- .map((entry) => {
1205
- return de_Interpretation(entry);
1206
- });
1207
- return retVal;
1208
- };
1209
- const de_RuntimeHintDetails = (output, context) => {
1210
- return smithyClient.take(output, {
1211
- runtimeHintValues: smithyClient._json,
1212
- subSlotHints: (_) => de_SlotHintsSlotMap(_),
1213
- });
1214
- };
1215
- const de_RuntimeHints = (output, context) => {
1216
- return smithyClient.take(output, {
1217
- slotHints: (_) => de_SlotHintsIntentMap(_),
1218
- });
1219
- };
1220
- const de_SentimentResponse = (output, context) => {
1221
- return smithyClient.take(output, {
1222
- sentiment: smithyClient.expectString,
1223
- sentimentScore: (_) => de_SentimentScore(_),
1224
- });
1225
- };
1226
- const de_SentimentScore = (output, context) => {
1227
- return smithyClient.take(output, {
1228
- mixed: smithyClient.limitedParseDouble,
1229
- negative: smithyClient.limitedParseDouble,
1230
- neutral: smithyClient.limitedParseDouble,
1231
- positive: smithyClient.limitedParseDouble,
1232
- });
1233
- };
1234
- const de_SessionState = (output, context) => {
1235
- return smithyClient.take(output, {
1236
- activeContexts: smithyClient._json,
1237
- dialogAction: (_) => de_DialogAction(_),
1238
- intent: (_) => de_Intent(_),
1239
- originatingRequestId: smithyClient.expectString,
1240
- runtimeHints: (_) => de_RuntimeHints(_),
1241
- sessionAttributes: smithyClient._json,
1242
- });
1243
- };
1244
- const de_Slot = (output, context) => {
1245
- return smithyClient.take(output, {
1246
- shape: smithyClient.expectString,
1247
- subSlots: (_) => de_Slots(_),
1248
- value: smithyClient._json,
1249
- values: (_) => de_Values(_),
1250
- });
1251
- };
1252
- const de_SlotHintsIntentMap = (output, context) => {
1253
- return Object.entries(output).reduce((acc, [key, value]) => {
1254
- if (value === null) {
1255
- return acc;
1256
- }
1257
- acc[key] = de_SlotHintsSlotMap(value);
1258
- return acc;
1259
- }, {});
1260
- };
1261
- const de_SlotHintsSlotMap = (output, context) => {
1262
- return Object.entries(output).reduce((acc, [key, value]) => {
1263
- if (value === null) {
1264
- return acc;
1265
- }
1266
- acc[key] = de_RuntimeHintDetails(value);
1267
- return acc;
1268
- }, {});
1269
- };
1270
- const de_Slots = (output, context) => {
1271
- return Object.entries(output).reduce((acc, [key, value]) => {
1272
- if (value === null) {
1273
- return acc;
1274
- }
1275
- acc[key] = de_Slot(value);
1276
- return acc;
1277
- }, {});
1278
- };
1279
- const de_Values = (output, context) => {
1280
- const retVal = (output || [])
1281
- .filter((e) => e != null)
1282
- .map((entry) => {
1283
- return de_Slot(entry);
1284
- });
1285
- return retVal;
1286
- };
1287
- const deserializeMetadata = (output) => ({
1288
- httpStatusCode: output.statusCode,
1289
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1290
- extendedRequestId: output.headers["x-amz-id-2"],
1291
- cfId: output.headers["x-amz-cf-id"],
1292
- });
282
+ const _AC = "ActiveContext";
283
+ const _ACL = "ActiveContextsList";
284
+ const _ACPM = "ActiveContextParametersMap";
285
+ const _ACTTL = "ActiveContextTimeToLive";
286
+ const _ADE = "AccessDeniedException";
287
+ const _AIE = "AudioInputEvent";
288
+ const _ARE = "AudioResponseEvent";
289
+ const _B = "Button";
290
+ const _BGE = "BadGatewayException";
291
+ const _BL = "ButtonsList";
292
+ const _BS = "BlobStream";
293
+ const _CE = "ConfigurationEvent";
294
+ const _CEo = "ConflictException";
295
+ const _CS = "ConfidenceScore";
296
+ const _CT = "Content-Type";
297
+ const _DA = "DialogAction";
298
+ const _DE = "DisconnectionEvent";
299
+ const _DFE = "DependencyFailedException";
300
+ const _DS = "DeleteSession";
301
+ const _DSR = "DeleteSessionRequest";
302
+ const _DSRe = "DeleteSessionResponse";
303
+ const _DTMFIE = "DTMFInputEvent";
304
+ const _DTMFR = "DTMFRegex";
305
+ const _ESS = "ElicitSubSlot";
306
+ const _GS = "GetSession";
307
+ const _GSR = "GetSessionRequest";
308
+ const _GSRe = "GetSessionResponse";
309
+ const _HE = "HeartbeatEvent";
310
+ const _I = "Intent";
311
+ const _IRC = "ImageResponseCard";
312
+ const _IRE = "IntentResultEvent";
313
+ const _ISE = "InternalServerException";
314
+ const _In = "Interpretation";
315
+ const _Int = "Interpretations";
316
+ const _M = "Message";
317
+ const _Me = "Messages";
318
+ const _PCE = "PlaybackCompletionEvent";
319
+ const _PIE = "PlaybackInterruptionEvent";
320
+ const _PS = "PutSession";
321
+ const _PSR = "PutSessionRequest";
322
+ const _PSRu = "PutSessionResponse";
323
+ const _RBM = "RecognizedBotMember";
324
+ const _RCT = "ResponseContentType";
325
+ const _RCT_ = "Response-Content-Type";
326
+ const _RH = "RuntimeHints";
327
+ const _RHD = "RuntimeHintDetails";
328
+ const _RHV = "RuntimeHintValue";
329
+ const _RHVL = "RuntimeHintValuesList";
330
+ const _RNFE = "ResourceNotFoundException";
331
+ const _RT = "RecognizeText";
332
+ const _RTR = "RecognizeTextRequest";
333
+ const _RTRe = "RecognizeTextResponse";
334
+ const _RU = "RecognizeUtterance";
335
+ const _RUR = "RecognizeUtteranceRequest";
336
+ const _RURe = "RecognizeUtteranceResponse";
337
+ const _S = "Slot";
338
+ const _SC = "StartConversation";
339
+ const _SCR = "StartConversationRequest";
340
+ const _SCRES = "StartConversationRequestEventStream";
341
+ const _SCRESt = "StartConversationResponseEventStream";
342
+ const _SCRt = "StartConversationResponse";
343
+ const _SHIM = "SlotHintsIntentMap";
344
+ const _SHSM = "SlotHintsSlotMap";
345
+ const _SNES = "SensitiveNonEmptyString";
346
+ const _SR = "SentimentResponse";
347
+ const _SS = "SentimentScore";
348
+ const _SSe = "SessionState";
349
+ const _Sl = "Slots";
350
+ const _T = "Text";
351
+ const _TE = "ThrottlingException";
352
+ const _TEr = "TranscriptEvent";
353
+ const _TIE = "TextInputEvent";
354
+ const _TRE = "TextResponseEvent";
355
+ const _V = "Value";
356
+ const _VE = "ValidationException";
357
+ const _Va = "Values";
358
+ const _aC = "audioChunk";
359
+ const _aCc = "activeContexts";
360
+ const _aS = "audioStream";
361
+ const _b = "buttons";
362
+ const _bAI = "botAliasId";
363
+ const _bI = "botId";
364
+ const _bN = "botName";
365
+ const _c = "client";
366
+ const _cA = "contextAttributes";
367
+ const _cBEI = "causedByEventId";
1293
368
  const _cM = "conversationMode";
369
+ const _cS = "confirmationState";
1294
370
  const _cT = "contentType";
1295
- const _ct = "content-type";
371
+ const _cTM = "clientTimestampMillis";
372
+ const _co = "content";
373
+ const _dA = "dialogAction";
374
+ const _dP = "disablePlayback";
375
+ const _e = "error";
376
+ const _eI = "eventId";
377
+ const _eR = "eventReason";
378
+ const _h = "http";
379
+ const _hE = "httpError";
380
+ const _hH = "httpHeader";
1296
381
  const _i = "interpretations";
382
+ const _iC = "inputCharacter";
1297
383
  const _iM = "inputMode";
384
+ const _iRC = "imageResponseCard";
385
+ const _iS = "interpretationSource";
386
+ const _iSn = "inputStream";
1298
387
  const _iT = "inputTranscript";
1299
- const _m = "messages";
1300
- const _r = "responsecontenttype";
388
+ const _iU = "imageUrl";
389
+ const _iV = "interpretedValue";
390
+ const _in = "intent";
391
+ const _lI = "localeId";
392
+ const _m = "message";
393
+ const _me = "messages";
394
+ const _mi = "mixed";
395
+ const _n = "name";
396
+ const _nC = "nluConfidence";
397
+ const _ne = "negative";
398
+ const _neu = "neutral";
399
+ const _oRI = "originatingRequestId";
400
+ const _oV = "originalValue";
401
+ const _p = "phrase";
402
+ const _po = "positive";
1301
403
  const _rA = "requestAttributes";
1302
404
  const _rBM = "recognizedBotMember";
1303
405
  const _rCT = "responseContentType";
1304
406
  const _rCTe = "requestContentType";
1305
- const _rct = "response-content-type";
407
+ const _rES = "requestEventStream";
408
+ const _rESe = "responseEventStream";
409
+ const _rH = "runtimeHints";
410
+ const _rHV = "runtimeHintValues";
411
+ const _rV = "resolvedValues";
412
+ const _s = "streaming";
413
+ const _sA = "sessionAttributes";
414
+ const _sES = "slotElicitationStyle";
415
+ const _sH = "slotHints";
1306
416
  const _sI = "sessionId";
417
+ const _sR = "sentimentResponse";
1307
418
  const _sS = "sessionState";
419
+ const _sSH = "subSlotHints";
420
+ const _sSTE = "subSlotToElicit";
421
+ const _sSe = "sentimentScore";
422
+ const _sSu = "subSlots";
423
+ const _sTE = "slotToElicit";
424
+ const _sc = "score";
425
+ const _se = "server";
426
+ const _sen = "sentiment";
427
+ const _sh = "shape";
428
+ const _sl = "slots";
429
+ const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.lexruntimev2";
430
+ const _st = "state";
431
+ const _su = "subtitle";
432
+ const _t = "text";
433
+ const _tTL = "timeToLive";
434
+ const _tTLIS = "timeToLiveInSeconds";
435
+ const _tTLu = "turnsToLive";
436
+ const _ti = "title";
437
+ const _tr = "transcript";
438
+ const _ty = "type";
439
+ const _v = "value";
440
+ const _va = "values";
441
+ const _wM = "welcomeMessages";
1308
442
  const _xalcm = "x-amz-lex-conversation-mode";
1309
443
  const _xali = "x-amz-lex-interpretations";
1310
444
  const _xalim = "x-amz-lex-input-mode";
@@ -1314,21 +448,587 @@ const _xalra = "x-amz-lex-request-attributes";
1314
448
  const _xalrbm = "x-amz-lex-recognized-bot-member";
1315
449
  const _xalsi = "x-amz-lex-session-id";
1316
450
  const _xalss = "x-amz-lex-session-state";
451
+ const n0 = "com.amazonaws.lexruntimev2";
452
+ var BlobStream = [
453
+ 0,
454
+ n0,
455
+ _BS,
456
+ {
457
+ [_s]: 1,
458
+ },
459
+ 42,
460
+ ];
461
+ var DTMFRegex = [0, n0, _DTMFR, 8, 0];
462
+ var SensitiveNonEmptyString = [0, n0, _SNES, 8, 0];
463
+ var Text = [0, n0, _T, 8, 0];
464
+ var AccessDeniedException = [
465
+ -3,
466
+ n0,
467
+ _ADE,
468
+ {
469
+ [_e]: _c,
470
+ [_hE]: 403,
471
+ },
472
+ [_m],
473
+ [0],
474
+ ];
475
+ schema.TypeRegistry.for(n0).registerError(AccessDeniedException, AccessDeniedException$1);
476
+ var ActiveContext = [
477
+ 3,
478
+ n0,
479
+ _AC,
480
+ 0,
481
+ [_n, _tTL, _cA],
482
+ [0, () => ActiveContextTimeToLive, [() => ActiveContextParametersMap, 0]],
483
+ ];
484
+ var ActiveContextTimeToLive = [3, n0, _ACTTL, 0, [_tTLIS, _tTLu], [1, 1]];
485
+ var AudioInputEvent = [3, n0, _AIE, 0, [_aC, _cT, _eI, _cTM], [21, 0, 0, 1]];
486
+ var AudioResponseEvent = [3, n0, _ARE, 0, [_aC, _cT, _eI], [21, 0, 0]];
487
+ var BadGatewayException = [
488
+ -3,
489
+ n0,
490
+ _BGE,
491
+ {
492
+ [_e]: _se,
493
+ [_hE]: 502,
494
+ },
495
+ [_m],
496
+ [0],
497
+ ];
498
+ schema.TypeRegistry.for(n0).registerError(BadGatewayException, BadGatewayException$1);
499
+ var Button = [3, n0, _B, 0, [_t, _v], [0, 0]];
500
+ var ConfidenceScore = [3, n0, _CS, 0, [_sc], [1]];
501
+ var ConfigurationEvent = [
502
+ 3,
503
+ n0,
504
+ _CE,
505
+ 0,
506
+ [_rA, _rCT, _sS, _wM, _dP, _eI, _cTM],
507
+ [128 | 0, 0, [() => SessionState, 0], [() => Messages, 0], 2, 0, 1],
508
+ ];
509
+ var ConflictException = [
510
+ -3,
511
+ n0,
512
+ _CEo,
513
+ {
514
+ [_e]: _c,
515
+ [_hE]: 409,
516
+ },
517
+ [_m],
518
+ [0],
519
+ ];
520
+ schema.TypeRegistry.for(n0).registerError(ConflictException, ConflictException$1);
521
+ var DeleteSessionRequest = [
522
+ 3,
523
+ n0,
524
+ _DSR,
525
+ 0,
526
+ [_bI, _bAI, _lI, _sI],
527
+ [
528
+ [0, 1],
529
+ [0, 1],
530
+ [0, 1],
531
+ [0, 1],
532
+ ],
533
+ ];
534
+ var DeleteSessionResponse = [3, n0, _DSRe, 0, [_bI, _bAI, _lI, _sI], [0, 0, 0, 0]];
535
+ var DependencyFailedException = [
536
+ -3,
537
+ n0,
538
+ _DFE,
539
+ {
540
+ [_e]: _c,
541
+ [_hE]: 424,
542
+ },
543
+ [_m],
544
+ [0],
545
+ ];
546
+ schema.TypeRegistry.for(n0).registerError(DependencyFailedException, DependencyFailedException$1);
547
+ var DialogAction = [
548
+ 3,
549
+ n0,
550
+ _DA,
551
+ 0,
552
+ [_ty, _sTE, _sES, _sSTE],
553
+ [0, 0, 0, () => ElicitSubSlot],
554
+ ];
555
+ var DisconnectionEvent = [3, n0, _DE, 0, [_eI, _cTM], [0, 1]];
556
+ var DTMFInputEvent = [3, n0, _DTMFIE, 0, [_iC, _eI, _cTM], [[() => DTMFRegex, 0], 0, 1]];
557
+ var ElicitSubSlot = [3, n0, _ESS, 0, [_n, _sSTE], [0, () => ElicitSubSlot]];
558
+ var GetSessionRequest = [
559
+ 3,
560
+ n0,
561
+ _GSR,
562
+ 0,
563
+ [_bI, _bAI, _lI, _sI],
564
+ [
565
+ [0, 1],
566
+ [0, 1],
567
+ [0, 1],
568
+ [0, 1],
569
+ ],
570
+ ];
571
+ var GetSessionResponse = [
572
+ 3,
573
+ n0,
574
+ _GSRe,
575
+ 0,
576
+ [_sI, _me, _i, _sS],
577
+ [0, [() => Messages, 0], () => Interpretations, [() => SessionState, 0]],
578
+ ];
579
+ var HeartbeatEvent = [3, n0, _HE, 0, [_eI], [0]];
580
+ var ImageResponseCard = [
581
+ 3,
582
+ n0,
583
+ _IRC,
584
+ 0,
585
+ [_ti, _su, _iU, _b],
586
+ [0, 0, 0, () => ButtonsList],
587
+ ];
588
+ var Intent = [3, n0, _I, 0, [_n, _sl, _st, _cS], [0, () => Slots, 0, 0]];
589
+ var IntentResultEvent = [
590
+ 3,
591
+ n0,
592
+ _IRE,
593
+ 0,
594
+ [_iM, _i, _sS, _rA, _sI, _eI, _rBM],
595
+ [0, () => Interpretations, [() => SessionState, 0], 128 | 0, 0, 0, () => RecognizedBotMember],
596
+ ];
597
+ var InternalServerException = [
598
+ -3,
599
+ n0,
600
+ _ISE,
601
+ {
602
+ [_e]: _se,
603
+ [_hE]: 500,
604
+ },
605
+ [_m],
606
+ [0],
607
+ ];
608
+ schema.TypeRegistry.for(n0).registerError(InternalServerException, InternalServerException$1);
609
+ var Interpretation = [
610
+ 3,
611
+ n0,
612
+ _In,
613
+ 0,
614
+ [_nC, _sR, _in, _iS],
615
+ [() => ConfidenceScore, () => SentimentResponse, () => Intent, 0],
616
+ ];
617
+ var Message = [
618
+ 3,
619
+ n0,
620
+ _M,
621
+ 0,
622
+ [_co, _cT, _iRC],
623
+ [[() => Text, 0], 0, () => ImageResponseCard],
624
+ ];
625
+ var PlaybackCompletionEvent = [3, n0, _PCE, 0, [_eI, _cTM], [0, 1]];
626
+ var PlaybackInterruptionEvent = [3, n0, _PIE, 0, [_eR, _cBEI, _eI], [0, 0, 0]];
627
+ var PutSessionRequest = [
628
+ 3,
629
+ n0,
630
+ _PSR,
631
+ 0,
632
+ [_bI, _bAI, _lI, _sI, _me, _sS, _rA, _rCT],
633
+ [
634
+ [0, 1],
635
+ [0, 1],
636
+ [0, 1],
637
+ [0, 1],
638
+ [() => Messages, 0],
639
+ [() => SessionState, 0],
640
+ 128 | 0,
641
+ [
642
+ 0,
643
+ {
644
+ [_hH]: _RCT,
645
+ },
646
+ ],
647
+ ],
648
+ ];
649
+ var PutSessionResponse = [
650
+ 3,
651
+ n0,
652
+ _PSRu,
653
+ 0,
654
+ [_cT, _me, _sS, _rA, _sI, _aS],
655
+ [
656
+ [
657
+ 0,
658
+ {
659
+ [_hH]: _CT,
660
+ },
661
+ ],
662
+ [
663
+ 0,
664
+ {
665
+ [_hH]: _xalm,
666
+ },
667
+ ],
668
+ [
669
+ 0,
670
+ {
671
+ [_hH]: _xalss,
672
+ },
673
+ ],
674
+ [
675
+ 0,
676
+ {
677
+ [_hH]: _xalra,
678
+ },
679
+ ],
680
+ [
681
+ 0,
682
+ {
683
+ [_hH]: _xalsi,
684
+ },
685
+ ],
686
+ [() => BlobStream, 16],
687
+ ],
688
+ ];
689
+ var RecognizedBotMember = [3, n0, _RBM, 0, [_bI, _bN], [0, 0]];
690
+ var RecognizeTextRequest = [
691
+ 3,
692
+ n0,
693
+ _RTR,
694
+ 0,
695
+ [_bI, _bAI, _lI, _sI, _t, _sS, _rA],
696
+ [[0, 1], [0, 1], [0, 1], [0, 1], [() => Text, 0], [() => SessionState, 0], 128 | 0],
697
+ ];
698
+ var RecognizeTextResponse = [
699
+ 3,
700
+ n0,
701
+ _RTRe,
702
+ 0,
703
+ [_me, _sS, _i, _rA, _sI, _rBM],
704
+ [[() => Messages, 0], [() => SessionState, 0], () => Interpretations, 128 | 0, 0, () => RecognizedBotMember],
705
+ ];
706
+ var RecognizeUtteranceRequest = [
707
+ 3,
708
+ n0,
709
+ _RUR,
710
+ 0,
711
+ [_bI, _bAI, _lI, _sI, _sS, _rA, _rCTe, _rCT, _iSn],
712
+ [
713
+ [0, 1],
714
+ [0, 1],
715
+ [0, 1],
716
+ [0, 1],
717
+ [
718
+ () => SensitiveNonEmptyString,
719
+ {
720
+ [_hH]: _xalss,
721
+ },
722
+ ],
723
+ [
724
+ () => SensitiveNonEmptyString,
725
+ {
726
+ [_hH]: _xalra,
727
+ },
728
+ ],
729
+ [
730
+ 0,
731
+ {
732
+ [_hH]: _CT,
733
+ },
734
+ ],
735
+ [
736
+ 0,
737
+ {
738
+ [_hH]: _RCT_,
739
+ },
740
+ ],
741
+ [() => BlobStream, 16],
742
+ ],
743
+ ];
744
+ var RecognizeUtteranceResponse = [
745
+ 3,
746
+ n0,
747
+ _RURe,
748
+ 0,
749
+ [_iM, _cT, _me, _i, _sS, _rA, _sI, _iT, _aS, _rBM],
750
+ [
751
+ [
752
+ 0,
753
+ {
754
+ [_hH]: _xalim,
755
+ },
756
+ ],
757
+ [
758
+ 0,
759
+ {
760
+ [_hH]: _CT,
761
+ },
762
+ ],
763
+ [
764
+ 0,
765
+ {
766
+ [_hH]: _xalm,
767
+ },
768
+ ],
769
+ [
770
+ 0,
771
+ {
772
+ [_hH]: _xali,
773
+ },
774
+ ],
775
+ [
776
+ 0,
777
+ {
778
+ [_hH]: _xalss,
779
+ },
780
+ ],
781
+ [
782
+ 0,
783
+ {
784
+ [_hH]: _xalra,
785
+ },
786
+ ],
787
+ [
788
+ 0,
789
+ {
790
+ [_hH]: _xalsi,
791
+ },
792
+ ],
793
+ [
794
+ 0,
795
+ {
796
+ [_hH]: _xalit,
797
+ },
798
+ ],
799
+ [() => BlobStream, 16],
800
+ [
801
+ 0,
802
+ {
803
+ [_hH]: _xalrbm,
804
+ },
805
+ ],
806
+ ],
807
+ ];
808
+ var ResourceNotFoundException = [
809
+ -3,
810
+ n0,
811
+ _RNFE,
812
+ {
813
+ [_e]: _c,
814
+ [_hE]: 404,
815
+ },
816
+ [_m],
817
+ [0],
818
+ ];
819
+ schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException, ResourceNotFoundException$1);
820
+ var RuntimeHintDetails = [
821
+ 3,
822
+ n0,
823
+ _RHD,
824
+ 0,
825
+ [_rHV, _sSH],
826
+ [() => RuntimeHintValuesList, () => SlotHintsSlotMap],
827
+ ];
828
+ var RuntimeHints = [3, n0, _RH, 0, [_sH], [() => SlotHintsIntentMap]];
829
+ var RuntimeHintValue = [3, n0, _RHV, 0, [_p], [0]];
830
+ var SentimentResponse = [3, n0, _SR, 0, [_sen, _sSe], [0, () => SentimentScore]];
831
+ var SentimentScore = [3, n0, _SS, 0, [_po, _ne, _neu, _mi], [1, 1, 1, 1]];
832
+ var SessionState = [
833
+ 3,
834
+ n0,
835
+ _SSe,
836
+ 0,
837
+ [_dA, _in, _aCc, _sA, _oRI, _rH],
838
+ [() => DialogAction, () => Intent, [() => ActiveContextsList, 0], 128 | 0, 0, () => RuntimeHints],
839
+ ];
840
+ var Slot = [
841
+ 3,
842
+ n0,
843
+ _S,
844
+ 0,
845
+ [_v, _sh, _va, _sSu],
846
+ [() => Value, 0, () => Values, () => Slots],
847
+ ];
848
+ var StartConversationRequest = [
849
+ 3,
850
+ n0,
851
+ _SCR,
852
+ 0,
853
+ [_bI, _bAI, _lI, _sI, _cM, _rES],
854
+ [
855
+ [0, 1],
856
+ [0, 1],
857
+ [0, 1],
858
+ [0, 1],
859
+ [
860
+ 0,
861
+ {
862
+ [_hH]: _xalcm,
863
+ },
864
+ ],
865
+ [() => StartConversationRequestEventStream, 16],
866
+ ],
867
+ ];
868
+ var StartConversationResponse = [
869
+ 3,
870
+ n0,
871
+ _SCRt,
872
+ 0,
873
+ [_rESe],
874
+ [[() => StartConversationResponseEventStream, 16]],
875
+ ];
876
+ var TextInputEvent = [3, n0, _TIE, 0, [_t, _eI, _cTM], [[() => Text, 0], 0, 1]];
877
+ var TextResponseEvent = [3, n0, _TRE, 0, [_me, _eI], [[() => Messages, 0], 0]];
878
+ var ThrottlingException = [
879
+ -3,
880
+ n0,
881
+ _TE,
882
+ {
883
+ [_e]: _c,
884
+ [_hE]: 429,
885
+ },
886
+ [_m],
887
+ [0],
888
+ ];
889
+ schema.TypeRegistry.for(n0).registerError(ThrottlingException, ThrottlingException$1);
890
+ var TranscriptEvent = [3, n0, _TEr, 0, [_tr, _eI], [0, 0]];
891
+ var ValidationException = [
892
+ -3,
893
+ n0,
894
+ _VE,
895
+ {
896
+ [_e]: _c,
897
+ [_hE]: 400,
898
+ },
899
+ [_m],
900
+ [0],
901
+ ];
902
+ schema.TypeRegistry.for(n0).registerError(ValidationException, ValidationException$1);
903
+ var Value = [3, n0, _V, 0, [_oV, _iV, _rV], [0, 0, 64 | 0]];
904
+ var LexRuntimeV2ServiceException = [-3, _sm, "LexRuntimeV2ServiceException", 0, [], []];
905
+ schema.TypeRegistry.for(_sm).registerError(LexRuntimeV2ServiceException, LexRuntimeV2ServiceException$1);
906
+ var ActiveContextsList = [1, n0, _ACL, 0, [() => ActiveContext, 0]];
907
+ var ButtonsList = [1, n0, _BL, 0, () => Button];
908
+ var Interpretations = [1, n0, _Int, 0, () => Interpretation];
909
+ var Messages = [1, n0, _Me, 0, [() => Message, 0]];
910
+ var RuntimeHintValuesList = [1, n0, _RHVL, 0, () => RuntimeHintValue];
911
+ var Values = [1, n0, _Va, 0, () => Slot];
912
+ var ActiveContextParametersMap = [2, n0, _ACPM, 0, [0, 0], [() => Text, 0]];
913
+ var SlotHintsIntentMap = [2, n0, _SHIM, 0, 0, () => SlotHintsSlotMap];
914
+ var SlotHintsSlotMap = [2, n0, _SHSM, 0, 0, () => RuntimeHintDetails];
915
+ var Slots = [2, n0, _Sl, 0, 0, () => Slot];
916
+ var StartConversationRequestEventStream = [
917
+ 3,
918
+ n0,
919
+ _SCRES,
920
+ {
921
+ [_s]: 1,
922
+ },
923
+ [_CE, _AIE, _DTMFIE, _TIE, _PCE, _DE],
924
+ [
925
+ [() => ConfigurationEvent, 0],
926
+ () => AudioInputEvent,
927
+ [() => DTMFInputEvent, 0],
928
+ [() => TextInputEvent, 0],
929
+ () => PlaybackCompletionEvent,
930
+ () => DisconnectionEvent,
931
+ ],
932
+ ];
933
+ var StartConversationResponseEventStream = [
934
+ 3,
935
+ n0,
936
+ _SCRESt,
937
+ {
938
+ [_s]: 1,
939
+ },
940
+ [_PIE, _TEr, _IRE, _TRE, _ARE, _HE, _ADE, _RNFE, _VE, _TE, _ISE, _CEo, _DFE, _BGE],
941
+ [
942
+ () => PlaybackInterruptionEvent,
943
+ () => TranscriptEvent,
944
+ [() => IntentResultEvent, 0],
945
+ [() => TextResponseEvent, 0],
946
+ () => AudioResponseEvent,
947
+ () => HeartbeatEvent,
948
+ [() => AccessDeniedException, 0],
949
+ [() => ResourceNotFoundException, 0],
950
+ [() => ValidationException, 0],
951
+ [() => ThrottlingException, 0],
952
+ [() => InternalServerException, 0],
953
+ [() => ConflictException, 0],
954
+ [() => DependencyFailedException, 0],
955
+ [() => BadGatewayException, 0],
956
+ ],
957
+ ];
958
+ var DeleteSession = [
959
+ 9,
960
+ n0,
961
+ _DS,
962
+ {
963
+ [_h]: ["DELETE", "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}", 200],
964
+ },
965
+ () => DeleteSessionRequest,
966
+ () => DeleteSessionResponse,
967
+ ];
968
+ var GetSession = [
969
+ 9,
970
+ n0,
971
+ _GS,
972
+ {
973
+ [_h]: ["GET", "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}", 200],
974
+ },
975
+ () => GetSessionRequest,
976
+ () => GetSessionResponse,
977
+ ];
978
+ var PutSession = [
979
+ 9,
980
+ n0,
981
+ _PS,
982
+ {
983
+ [_h]: ["POST", "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}", 200],
984
+ },
985
+ () => PutSessionRequest,
986
+ () => PutSessionResponse,
987
+ ];
988
+ var RecognizeText = [
989
+ 9,
990
+ n0,
991
+ _RT,
992
+ {
993
+ [_h]: ["POST", "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text", 200],
994
+ },
995
+ () => RecognizeTextRequest,
996
+ () => RecognizeTextResponse,
997
+ ];
998
+ var RecognizeUtterance = [
999
+ 9,
1000
+ n0,
1001
+ _RU,
1002
+ {
1003
+ [_h]: ["POST", "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/utterance", 200],
1004
+ },
1005
+ () => RecognizeUtteranceRequest,
1006
+ () => RecognizeUtteranceResponse,
1007
+ ];
1008
+ var StartConversation = [
1009
+ 9,
1010
+ n0,
1011
+ _SC,
1012
+ {
1013
+ [_h]: [
1014
+ "POST",
1015
+ "/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/conversation",
1016
+ 200,
1017
+ ],
1018
+ },
1019
+ () => StartConversationRequest,
1020
+ () => StartConversationResponse,
1021
+ ];
1317
1022
 
1318
1023
  class DeleteSessionCommand extends smithyClient.Command
1319
1024
  .classBuilder()
1320
1025
  .ep(commonParams)
1321
1026
  .m(function (Command, cs, config, o) {
1322
- return [
1323
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1324
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1325
- ];
1027
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1326
1028
  })
1327
1029
  .s("AWSDeepSenseRunTimeServiceApi2_0", "DeleteSession", {})
1328
1030
  .n("LexRuntimeV2Client", "DeleteSessionCommand")
1329
- .f(void 0, void 0)
1330
- .ser(se_DeleteSessionCommand)
1331
- .de(de_DeleteSessionCommand)
1031
+ .sc(DeleteSession)
1332
1032
  .build() {
1333
1033
  }
1334
1034
 
@@ -1336,16 +1036,11 @@ class GetSessionCommand extends smithyClient.Command
1336
1036
  .classBuilder()
1337
1037
  .ep(commonParams)
1338
1038
  .m(function (Command, cs, config, o) {
1339
- return [
1340
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1341
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1342
- ];
1039
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1343
1040
  })
1344
1041
  .s("AWSDeepSenseRunTimeServiceApi2_0", "GetSession", {})
1345
1042
  .n("LexRuntimeV2Client", "GetSessionCommand")
1346
- .f(void 0, GetSessionResponseFilterSensitiveLog)
1347
- .ser(se_GetSessionCommand)
1348
- .de(de_GetSessionCommand)
1043
+ .sc(GetSession)
1349
1044
  .build() {
1350
1045
  }
1351
1046
 
@@ -1353,16 +1048,11 @@ class PutSessionCommand extends smithyClient.Command
1353
1048
  .classBuilder()
1354
1049
  .ep(commonParams)
1355
1050
  .m(function (Command, cs, config, o) {
1356
- return [
1357
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1358
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1359
- ];
1051
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1360
1052
  })
1361
1053
  .s("AWSDeepSenseRunTimeServiceApi2_0", "PutSession", {})
1362
1054
  .n("LexRuntimeV2Client", "PutSessionCommand")
1363
- .f(PutSessionRequestFilterSensitiveLog, PutSessionResponseFilterSensitiveLog)
1364
- .ser(se_PutSessionCommand)
1365
- .de(de_PutSessionCommand)
1055
+ .sc(PutSession)
1366
1056
  .build() {
1367
1057
  }
1368
1058
 
@@ -1370,16 +1060,11 @@ class RecognizeTextCommand extends smithyClient.Command
1370
1060
  .classBuilder()
1371
1061
  .ep(commonParams)
1372
1062
  .m(function (Command, cs, config, o) {
1373
- return [
1374
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1375
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1376
- ];
1063
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1377
1064
  })
1378
1065
  .s("AWSDeepSenseRunTimeServiceApi2_0", "RecognizeText", {})
1379
1066
  .n("LexRuntimeV2Client", "RecognizeTextCommand")
1380
- .f(RecognizeTextRequestFilterSensitiveLog, RecognizeTextResponseFilterSensitiveLog)
1381
- .ser(se_RecognizeTextCommand)
1382
- .de(de_RecognizeTextCommand)
1067
+ .sc(RecognizeText)
1383
1068
  .build() {
1384
1069
  }
1385
1070
 
@@ -1387,16 +1072,11 @@ class RecognizeUtteranceCommand extends smithyClient.Command
1387
1072
  .classBuilder()
1388
1073
  .ep(commonParams)
1389
1074
  .m(function (Command, cs, config, o) {
1390
- return [
1391
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1392
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1393
- ];
1075
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1394
1076
  })
1395
1077
  .s("AWSDeepSenseRunTimeServiceApi2_0", "RecognizeUtterance", {})
1396
1078
  .n("LexRuntimeV2Client", "RecognizeUtteranceCommand")
1397
- .f(RecognizeUtteranceRequestFilterSensitiveLog, RecognizeUtteranceResponseFilterSensitiveLog)
1398
- .ser(se_RecognizeUtteranceCommand)
1399
- .de(de_RecognizeUtteranceCommand)
1079
+ .sc(RecognizeUtterance)
1400
1080
  .build() {
1401
1081
  }
1402
1082
 
@@ -1404,11 +1084,7 @@ class StartConversationCommand extends smithyClient.Command
1404
1084
  .classBuilder()
1405
1085
  .ep(commonParams)
1406
1086
  .m(function (Command, cs, config, o) {
1407
- return [
1408
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1409
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1410
- middlewareEventstream.getEventStreamPlugin(config),
1411
- ];
1087
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()), middlewareEventstream.getEventStreamPlugin(config)];
1412
1088
  })
1413
1089
  .s("AWSDeepSenseRunTimeServiceApi2_0", "StartConversation", {
1414
1090
  eventStream: {
@@ -1417,9 +1093,7 @@ class StartConversationCommand extends smithyClient.Command
1417
1093
  },
1418
1094
  })
1419
1095
  .n("LexRuntimeV2Client", "StartConversationCommand")
1420
- .f(StartConversationRequestFilterSensitiveLog, StartConversationResponseFilterSensitiveLog)
1421
- .ser(se_StartConversationCommand)
1422
- .de(de_StartConversationCommand)
1096
+ .sc(StartConversation)
1423
1097
  .build() {
1424
1098
  }
1425
1099
 
@@ -1443,50 +1117,31 @@ Object.defineProperty(exports, "__Client", {
1443
1117
  enumerable: true,
1444
1118
  get: function () { return smithyClient.Client; }
1445
1119
  });
1446
- exports.AccessDeniedException = AccessDeniedException;
1447
- exports.ActiveContextFilterSensitiveLog = ActiveContextFilterSensitiveLog;
1448
- exports.BadGatewayException = BadGatewayException;
1449
- exports.ConfigurationEventFilterSensitiveLog = ConfigurationEventFilterSensitiveLog;
1120
+ exports.AccessDeniedException = AccessDeniedException$1;
1121
+ exports.BadGatewayException = BadGatewayException$1;
1450
1122
  exports.ConfirmationState = ConfirmationState;
1451
- exports.ConflictException = ConflictException;
1123
+ exports.ConflictException = ConflictException$1;
1452
1124
  exports.ConversationMode = ConversationMode;
1453
- exports.DTMFInputEventFilterSensitiveLog = DTMFInputEventFilterSensitiveLog;
1454
1125
  exports.DeleteSessionCommand = DeleteSessionCommand;
1455
- exports.DependencyFailedException = DependencyFailedException;
1126
+ exports.DependencyFailedException = DependencyFailedException$1;
1456
1127
  exports.DialogActionType = DialogActionType;
1457
1128
  exports.GetSessionCommand = GetSessionCommand;
1458
- exports.GetSessionResponseFilterSensitiveLog = GetSessionResponseFilterSensitiveLog;
1459
1129
  exports.InputMode = InputMode;
1460
- exports.IntentResultEventFilterSensitiveLog = IntentResultEventFilterSensitiveLog;
1461
1130
  exports.IntentState = IntentState;
1462
- exports.InternalServerException = InternalServerException;
1131
+ exports.InternalServerException = InternalServerException$1;
1463
1132
  exports.InterpretationSource = InterpretationSource;
1464
1133
  exports.LexRuntimeV2 = LexRuntimeV2;
1465
1134
  exports.LexRuntimeV2Client = LexRuntimeV2Client;
1466
- exports.LexRuntimeV2ServiceException = LexRuntimeV2ServiceException;
1135
+ exports.LexRuntimeV2ServiceException = LexRuntimeV2ServiceException$1;
1467
1136
  exports.MessageContentType = MessageContentType;
1468
- exports.MessageFilterSensitiveLog = MessageFilterSensitiveLog;
1469
1137
  exports.PlaybackInterruptionReason = PlaybackInterruptionReason;
1470
1138
  exports.PutSessionCommand = PutSessionCommand;
1471
- exports.PutSessionRequestFilterSensitiveLog = PutSessionRequestFilterSensitiveLog;
1472
- exports.PutSessionResponseFilterSensitiveLog = PutSessionResponseFilterSensitiveLog;
1473
1139
  exports.RecognizeTextCommand = RecognizeTextCommand;
1474
- exports.RecognizeTextRequestFilterSensitiveLog = RecognizeTextRequestFilterSensitiveLog;
1475
- exports.RecognizeTextResponseFilterSensitiveLog = RecognizeTextResponseFilterSensitiveLog;
1476
1140
  exports.RecognizeUtteranceCommand = RecognizeUtteranceCommand;
1477
- exports.RecognizeUtteranceRequestFilterSensitiveLog = RecognizeUtteranceRequestFilterSensitiveLog;
1478
- exports.RecognizeUtteranceResponseFilterSensitiveLog = RecognizeUtteranceResponseFilterSensitiveLog;
1479
- exports.ResourceNotFoundException = ResourceNotFoundException;
1141
+ exports.ResourceNotFoundException = ResourceNotFoundException$1;
1480
1142
  exports.SentimentType = SentimentType;
1481
- exports.SessionStateFilterSensitiveLog = SessionStateFilterSensitiveLog;
1482
1143
  exports.Shape = Shape;
1483
1144
  exports.StartConversationCommand = StartConversationCommand;
1484
- exports.StartConversationRequestEventStreamFilterSensitiveLog = StartConversationRequestEventStreamFilterSensitiveLog;
1485
- exports.StartConversationRequestFilterSensitiveLog = StartConversationRequestFilterSensitiveLog;
1486
- exports.StartConversationResponseEventStreamFilterSensitiveLog = StartConversationResponseEventStreamFilterSensitiveLog;
1487
- exports.StartConversationResponseFilterSensitiveLog = StartConversationResponseFilterSensitiveLog;
1488
1145
  exports.StyleType = StyleType;
1489
- exports.TextInputEventFilterSensitiveLog = TextInputEventFilterSensitiveLog;
1490
- exports.TextResponseEventFilterSensitiveLog = TextResponseEventFilterSensitiveLog;
1491
- exports.ThrottlingException = ThrottlingException;
1492
- exports.ValidationException = ValidationException;
1146
+ exports.ThrottlingException = ThrottlingException$1;
1147
+ exports.ValidationException = ValidationException$1;