@aws-sdk/client-transcribe-streaming 3.312.0 → 3.316.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/TranscribeStreaming.js +7 -42
- package/dist-cjs/protocols/Aws_restJson1.js +143 -277
- package/dist-es/TranscribeStreaming.js +7 -42
- package/dist-es/protocols/Aws_restJson1.js +133 -267
- package/dist-types/TranscribeStreaming.d.ts +21 -86
- package/dist-types/ts3.4/TranscribeStreaming.d.ts +4 -1
- package/package.json +6 -6
|
@@ -7,7 +7,7 @@ const models_0_1 = require("../models/models_0");
|
|
|
7
7
|
const TranscribeStreamingServiceException_1 = require("../models/TranscribeStreamingServiceException");
|
|
8
8
|
const se_StartCallAnalyticsStreamTranscriptionCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
10
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
11
11
|
"x-amzn-transcribe-language-code": input.LanguageCode,
|
|
12
12
|
"x-amzn-transcribe-sample-rate": [
|
|
13
13
|
() => isSerializableHeaderValue(input.MediaSampleRateHertz),
|
|
@@ -46,7 +46,7 @@ const se_StartCallAnalyticsStreamTranscriptionCommand = async (input, context) =
|
|
|
46
46
|
exports.se_StartCallAnalyticsStreamTranscriptionCommand = se_StartCallAnalyticsStreamTranscriptionCommand;
|
|
47
47
|
const se_StartMedicalStreamTranscriptionCommand = async (input, context) => {
|
|
48
48
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
49
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
49
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
50
50
|
"x-amzn-transcribe-language-code": input.LanguageCode,
|
|
51
51
|
"x-amzn-transcribe-sample-rate": [
|
|
52
52
|
() => isSerializableHeaderValue(input.MediaSampleRateHertz),
|
|
@@ -89,7 +89,7 @@ const se_StartMedicalStreamTranscriptionCommand = async (input, context) => {
|
|
|
89
89
|
exports.se_StartMedicalStreamTranscriptionCommand = se_StartMedicalStreamTranscriptionCommand;
|
|
90
90
|
const se_StartStreamTranscriptionCommand = async (input, context) => {
|
|
91
91
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
92
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
92
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
93
93
|
"x-amzn-transcribe-language-code": input.LanguageCode,
|
|
94
94
|
"x-amzn-transcribe-sample-rate": [
|
|
95
95
|
() => isSerializableHeaderValue(input.MediaSampleRateHertz),
|
|
@@ -150,7 +150,7 @@ const de_StartCallAnalyticsStreamTranscriptionCommand = async (output, context)
|
|
|
150
150
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
151
151
|
return de_StartCallAnalyticsStreamTranscriptionCommandError(output, context);
|
|
152
152
|
}
|
|
153
|
-
const contents = map({
|
|
153
|
+
const contents = (0, smithy_client_1.map)({
|
|
154
154
|
$metadata: deserializeMetadata(output),
|
|
155
155
|
RequestId: [, output.headers["x-amzn-request-id"]],
|
|
156
156
|
LanguageCode: [, output.headers["x-amzn-transcribe-language-code"]],
|
|
@@ -202,10 +202,9 @@ const de_StartCallAnalyticsStreamTranscriptionCommandError = async (output, cont
|
|
|
202
202
|
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
203
203
|
default:
|
|
204
204
|
const parsedBody = parsedOutput.body;
|
|
205
|
-
|
|
205
|
+
return throwDefaultError({
|
|
206
206
|
output,
|
|
207
207
|
parsedBody,
|
|
208
|
-
exceptionCtor: TranscribeStreamingServiceException_1.TranscribeStreamingServiceException,
|
|
209
208
|
errorCode,
|
|
210
209
|
});
|
|
211
210
|
}
|
|
@@ -214,7 +213,7 @@ const de_StartMedicalStreamTranscriptionCommand = async (output, context) => {
|
|
|
214
213
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
215
214
|
return de_StartMedicalStreamTranscriptionCommandError(output, context);
|
|
216
215
|
}
|
|
217
|
-
const contents = map({
|
|
216
|
+
const contents = (0, smithy_client_1.map)({
|
|
218
217
|
$metadata: deserializeMetadata(output),
|
|
219
218
|
RequestId: [, output.headers["x-amzn-request-id"]],
|
|
220
219
|
LanguageCode: [, output.headers["x-amzn-transcribe-language-code"]],
|
|
@@ -270,10 +269,9 @@ const de_StartMedicalStreamTranscriptionCommandError = async (output, context) =
|
|
|
270
269
|
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
271
270
|
default:
|
|
272
271
|
const parsedBody = parsedOutput.body;
|
|
273
|
-
|
|
272
|
+
return throwDefaultError({
|
|
274
273
|
output,
|
|
275
274
|
parsedBody,
|
|
276
|
-
exceptionCtor: TranscribeStreamingServiceException_1.TranscribeStreamingServiceException,
|
|
277
275
|
errorCode,
|
|
278
276
|
});
|
|
279
277
|
}
|
|
@@ -282,7 +280,7 @@ const de_StartStreamTranscriptionCommand = async (output, context) => {
|
|
|
282
280
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
283
281
|
return de_StartStreamTranscriptionCommandError(output, context);
|
|
284
282
|
}
|
|
285
|
-
const contents = map({
|
|
283
|
+
const contents = (0, smithy_client_1.map)({
|
|
286
284
|
$metadata: deserializeMetadata(output),
|
|
287
285
|
RequestId: [, output.headers["x-amzn-request-id"]],
|
|
288
286
|
LanguageCode: [, output.headers["x-amzn-transcribe-language-code"]],
|
|
@@ -354,21 +352,21 @@ const de_StartStreamTranscriptionCommandError = async (output, context) => {
|
|
|
354
352
|
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
355
353
|
default:
|
|
356
354
|
const parsedBody = parsedOutput.body;
|
|
357
|
-
|
|
355
|
+
return throwDefaultError({
|
|
358
356
|
output,
|
|
359
357
|
parsedBody,
|
|
360
|
-
exceptionCtor: TranscribeStreamingServiceException_1.TranscribeStreamingServiceException,
|
|
361
358
|
errorCode,
|
|
362
359
|
});
|
|
363
360
|
}
|
|
364
361
|
};
|
|
365
|
-
const
|
|
362
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(TranscribeStreamingServiceException_1.TranscribeStreamingServiceException);
|
|
366
363
|
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
367
|
-
const contents = map({});
|
|
364
|
+
const contents = (0, smithy_client_1.map)({});
|
|
368
365
|
const data = parsedOutput.body;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
}
|
|
366
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
367
|
+
Message: smithy_client_1.expectString,
|
|
368
|
+
});
|
|
369
|
+
Object.assign(contents, doc);
|
|
372
370
|
const exception = new models_0_1.BadRequestException({
|
|
373
371
|
$metadata: deserializeMetadata(parsedOutput),
|
|
374
372
|
...contents,
|
|
@@ -376,11 +374,12 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
|
376
374
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
377
375
|
};
|
|
378
376
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
379
|
-
const contents = map({});
|
|
377
|
+
const contents = (0, smithy_client_1.map)({});
|
|
380
378
|
const data = parsedOutput.body;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}
|
|
379
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
380
|
+
Message: smithy_client_1.expectString,
|
|
381
|
+
});
|
|
382
|
+
Object.assign(contents, doc);
|
|
384
383
|
const exception = new models_0_1.ConflictException({
|
|
385
384
|
$metadata: deserializeMetadata(parsedOutput),
|
|
386
385
|
...contents,
|
|
@@ -388,11 +387,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
388
387
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
389
388
|
};
|
|
390
389
|
const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
391
|
-
const contents = map({});
|
|
390
|
+
const contents = (0, smithy_client_1.map)({});
|
|
392
391
|
const data = parsedOutput.body;
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
392
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
393
|
+
Message: smithy_client_1.expectString,
|
|
394
|
+
});
|
|
395
|
+
Object.assign(contents, doc);
|
|
396
396
|
const exception = new models_0_1.InternalFailureException({
|
|
397
397
|
$metadata: deserializeMetadata(parsedOutput),
|
|
398
398
|
...contents,
|
|
@@ -400,11 +400,12 @@ const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
|
400
400
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
401
401
|
};
|
|
402
402
|
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
403
|
-
const contents = map({});
|
|
403
|
+
const contents = (0, smithy_client_1.map)({});
|
|
404
404
|
const data = parsedOutput.body;
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
405
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
406
|
+
Message: smithy_client_1.expectString,
|
|
407
|
+
});
|
|
408
|
+
Object.assign(contents, doc);
|
|
408
409
|
const exception = new models_0_1.LimitExceededException({
|
|
409
410
|
$metadata: deserializeMetadata(parsedOutput),
|
|
410
411
|
...contents,
|
|
@@ -412,11 +413,12 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
412
413
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
413
414
|
};
|
|
414
415
|
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
415
|
-
const contents = map({});
|
|
416
|
+
const contents = (0, smithy_client_1.map)({});
|
|
416
417
|
const data = parsedOutput.body;
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
}
|
|
418
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
419
|
+
Message: smithy_client_1.expectString,
|
|
420
|
+
});
|
|
421
|
+
Object.assign(contents, doc);
|
|
420
422
|
const exception = new models_0_1.ServiceUnavailableException({
|
|
421
423
|
$metadata: deserializeMetadata(parsedOutput),
|
|
422
424
|
...contents,
|
|
@@ -450,7 +452,7 @@ const se_ConfigurationEvent_event = (input, context) => {
|
|
|
450
452
|
":content-type": { type: "string", value: "application/json" },
|
|
451
453
|
};
|
|
452
454
|
let body = new Uint8Array();
|
|
453
|
-
body =
|
|
455
|
+
body = (0, smithy_client_1._json)(input);
|
|
454
456
|
body = context.utf8Decoder(JSON.stringify(body));
|
|
455
457
|
return { headers, body };
|
|
456
458
|
};
|
|
@@ -574,7 +576,7 @@ const de_BadRequestException_event = async (output, context) => {
|
|
|
574
576
|
const de_CategoryEvent_event = async (output, context) => {
|
|
575
577
|
const contents = {};
|
|
576
578
|
const data = await parseBody(output.body, context);
|
|
577
|
-
Object.assign(contents,
|
|
579
|
+
Object.assign(contents, (0, smithy_client_1._json)(data));
|
|
578
580
|
return contents;
|
|
579
581
|
};
|
|
580
582
|
const de_ConflictException_event = async (output, context) => {
|
|
@@ -623,166 +625,92 @@ const de_UtteranceEvent_event = async (output, context) => {
|
|
|
623
625
|
Object.assign(contents, de_UtteranceEvent(data, context));
|
|
624
626
|
return contents;
|
|
625
627
|
};
|
|
626
|
-
const se_ChannelDefinition = (input, context) => {
|
|
627
|
-
return {
|
|
628
|
-
...(input.ChannelId != null && { ChannelId: input.ChannelId }),
|
|
629
|
-
...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }),
|
|
630
|
-
};
|
|
631
|
-
};
|
|
632
|
-
const se_ChannelDefinitions = (input, context) => {
|
|
633
|
-
return input
|
|
634
|
-
.filter((e) => e != null)
|
|
635
|
-
.map((entry) => {
|
|
636
|
-
return se_ChannelDefinition(entry, context);
|
|
637
|
-
});
|
|
638
|
-
};
|
|
639
|
-
const se_ConfigurationEvent = (input, context) => {
|
|
640
|
-
return {
|
|
641
|
-
...(input.ChannelDefinitions != null && {
|
|
642
|
-
ChannelDefinitions: se_ChannelDefinitions(input.ChannelDefinitions, context),
|
|
643
|
-
}),
|
|
644
|
-
...(input.PostCallAnalyticsSettings != null && {
|
|
645
|
-
PostCallAnalyticsSettings: se_PostCallAnalyticsSettings(input.PostCallAnalyticsSettings, context),
|
|
646
|
-
}),
|
|
647
|
-
};
|
|
648
|
-
};
|
|
649
|
-
const se_PostCallAnalyticsSettings = (input, context) => {
|
|
650
|
-
return {
|
|
651
|
-
...(input.ContentRedactionOutput != null && { ContentRedactionOutput: input.ContentRedactionOutput }),
|
|
652
|
-
...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
|
|
653
|
-
...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }),
|
|
654
|
-
...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }),
|
|
655
|
-
};
|
|
656
|
-
};
|
|
657
628
|
const de_Alternative = (output, context) => {
|
|
658
|
-
return {
|
|
659
|
-
Entities:
|
|
660
|
-
Items:
|
|
661
|
-
Transcript:
|
|
662
|
-
};
|
|
629
|
+
return (0, smithy_client_1.take)(output, {
|
|
630
|
+
Entities: (_) => de_EntityList(_, context),
|
|
631
|
+
Items: (_) => de_ItemList(_, context),
|
|
632
|
+
Transcript: smithy_client_1.expectString,
|
|
633
|
+
});
|
|
663
634
|
};
|
|
664
635
|
const de_AlternativeList = (output, context) => {
|
|
665
636
|
const retVal = (output || [])
|
|
666
637
|
.filter((e) => e != null)
|
|
667
638
|
.map((entry) => {
|
|
668
|
-
if (entry === null) {
|
|
669
|
-
return null;
|
|
670
|
-
}
|
|
671
639
|
return de_Alternative(entry, context);
|
|
672
640
|
});
|
|
673
641
|
return retVal;
|
|
674
642
|
};
|
|
675
643
|
const de_CallAnalyticsEntity = (output, context) => {
|
|
676
|
-
return {
|
|
677
|
-
BeginOffsetMillis:
|
|
678
|
-
Category:
|
|
679
|
-
Confidence:
|
|
680
|
-
Content:
|
|
681
|
-
EndOffsetMillis:
|
|
682
|
-
Type:
|
|
683
|
-
};
|
|
644
|
+
return (0, smithy_client_1.take)(output, {
|
|
645
|
+
BeginOffsetMillis: smithy_client_1.expectLong,
|
|
646
|
+
Category: smithy_client_1.expectString,
|
|
647
|
+
Confidence: smithy_client_1.limitedParseDouble,
|
|
648
|
+
Content: smithy_client_1.expectString,
|
|
649
|
+
EndOffsetMillis: smithy_client_1.expectLong,
|
|
650
|
+
Type: smithy_client_1.expectString,
|
|
651
|
+
});
|
|
684
652
|
};
|
|
685
653
|
const de_CallAnalyticsEntityList = (output, context) => {
|
|
686
654
|
const retVal = (output || [])
|
|
687
655
|
.filter((e) => e != null)
|
|
688
656
|
.map((entry) => {
|
|
689
|
-
if (entry === null) {
|
|
690
|
-
return null;
|
|
691
|
-
}
|
|
692
657
|
return de_CallAnalyticsEntity(entry, context);
|
|
693
658
|
});
|
|
694
659
|
return retVal;
|
|
695
660
|
};
|
|
696
661
|
const de_CallAnalyticsItem = (output, context) => {
|
|
697
|
-
return {
|
|
698
|
-
BeginOffsetMillis:
|
|
699
|
-
Confidence:
|
|
700
|
-
Content:
|
|
701
|
-
EndOffsetMillis:
|
|
702
|
-
Stable:
|
|
703
|
-
Type:
|
|
704
|
-
VocabularyFilterMatch:
|
|
705
|
-
};
|
|
662
|
+
return (0, smithy_client_1.take)(output, {
|
|
663
|
+
BeginOffsetMillis: smithy_client_1.expectLong,
|
|
664
|
+
Confidence: smithy_client_1.limitedParseDouble,
|
|
665
|
+
Content: smithy_client_1.expectString,
|
|
666
|
+
EndOffsetMillis: smithy_client_1.expectLong,
|
|
667
|
+
Stable: smithy_client_1.expectBoolean,
|
|
668
|
+
Type: smithy_client_1.expectString,
|
|
669
|
+
VocabularyFilterMatch: smithy_client_1.expectBoolean,
|
|
670
|
+
});
|
|
706
671
|
};
|
|
707
672
|
const de_CallAnalyticsItemList = (output, context) => {
|
|
708
673
|
const retVal = (output || [])
|
|
709
674
|
.filter((e) => e != null)
|
|
710
675
|
.map((entry) => {
|
|
711
|
-
if (entry === null) {
|
|
712
|
-
return null;
|
|
713
|
-
}
|
|
714
676
|
return de_CallAnalyticsItem(entry, context);
|
|
715
677
|
});
|
|
716
678
|
return retVal;
|
|
717
679
|
};
|
|
718
|
-
const de_CategoryEvent = (output, context) => {
|
|
719
|
-
return {
|
|
720
|
-
MatchedCategories: output.MatchedCategories != null ? de_StringList(output.MatchedCategories, context) : undefined,
|
|
721
|
-
MatchedDetails: output.MatchedDetails != null ? de_MatchedCategoryDetails(output.MatchedDetails, context) : undefined,
|
|
722
|
-
};
|
|
723
|
-
};
|
|
724
|
-
const de_CharacterOffsets = (output, context) => {
|
|
725
|
-
return {
|
|
726
|
-
Begin: (0, smithy_client_1.expectInt32)(output.Begin),
|
|
727
|
-
End: (0, smithy_client_1.expectInt32)(output.End),
|
|
728
|
-
};
|
|
729
|
-
};
|
|
730
680
|
const de_Entity = (output, context) => {
|
|
731
|
-
return {
|
|
732
|
-
Category:
|
|
733
|
-
Confidence:
|
|
734
|
-
Content:
|
|
735
|
-
EndTime:
|
|
736
|
-
StartTime:
|
|
737
|
-
Type:
|
|
738
|
-
};
|
|
681
|
+
return (0, smithy_client_1.take)(output, {
|
|
682
|
+
Category: smithy_client_1.expectString,
|
|
683
|
+
Confidence: smithy_client_1.limitedParseDouble,
|
|
684
|
+
Content: smithy_client_1.expectString,
|
|
685
|
+
EndTime: smithy_client_1.limitedParseDouble,
|
|
686
|
+
StartTime: smithy_client_1.limitedParseDouble,
|
|
687
|
+
Type: smithy_client_1.expectString,
|
|
688
|
+
});
|
|
739
689
|
};
|
|
740
690
|
const de_EntityList = (output, context) => {
|
|
741
691
|
const retVal = (output || [])
|
|
742
692
|
.filter((e) => e != null)
|
|
743
693
|
.map((entry) => {
|
|
744
|
-
if (entry === null) {
|
|
745
|
-
return null;
|
|
746
|
-
}
|
|
747
694
|
return de_Entity(entry, context);
|
|
748
695
|
});
|
|
749
696
|
return retVal;
|
|
750
697
|
};
|
|
751
|
-
const de_IssueDetected = (output, context) => {
|
|
752
|
-
return {
|
|
753
|
-
CharacterOffsets: output.CharacterOffsets != null ? de_CharacterOffsets(output.CharacterOffsets, context) : undefined,
|
|
754
|
-
};
|
|
755
|
-
};
|
|
756
|
-
const de_IssuesDetected = (output, context) => {
|
|
757
|
-
const retVal = (output || [])
|
|
758
|
-
.filter((e) => e != null)
|
|
759
|
-
.map((entry) => {
|
|
760
|
-
if (entry === null) {
|
|
761
|
-
return null;
|
|
762
|
-
}
|
|
763
|
-
return de_IssueDetected(entry, context);
|
|
764
|
-
});
|
|
765
|
-
return retVal;
|
|
766
|
-
};
|
|
767
698
|
const de_Item = (output, context) => {
|
|
768
|
-
return {
|
|
769
|
-
Confidence:
|
|
770
|
-
Content:
|
|
771
|
-
EndTime:
|
|
772
|
-
Speaker:
|
|
773
|
-
Stable:
|
|
774
|
-
StartTime:
|
|
775
|
-
Type:
|
|
776
|
-
VocabularyFilterMatch:
|
|
777
|
-
};
|
|
699
|
+
return (0, smithy_client_1.take)(output, {
|
|
700
|
+
Confidence: smithy_client_1.limitedParseDouble,
|
|
701
|
+
Content: smithy_client_1.expectString,
|
|
702
|
+
EndTime: smithy_client_1.limitedParseDouble,
|
|
703
|
+
Speaker: smithy_client_1.expectString,
|
|
704
|
+
Stable: smithy_client_1.expectBoolean,
|
|
705
|
+
StartTime: smithy_client_1.limitedParseDouble,
|
|
706
|
+
Type: smithy_client_1.expectString,
|
|
707
|
+
VocabularyFilterMatch: smithy_client_1.expectBoolean,
|
|
708
|
+
});
|
|
778
709
|
};
|
|
779
710
|
const de_ItemList = (output, context) => {
|
|
780
711
|
const retVal = (output || [])
|
|
781
712
|
.filter((e) => e != null)
|
|
782
713
|
.map((entry) => {
|
|
783
|
-
if (entry === null) {
|
|
784
|
-
return null;
|
|
785
|
-
}
|
|
786
714
|
return de_Item(entry, context);
|
|
787
715
|
});
|
|
788
716
|
return retVal;
|
|
@@ -791,199 +719,137 @@ const de_LanguageIdentification = (output, context) => {
|
|
|
791
719
|
const retVal = (output || [])
|
|
792
720
|
.filter((e) => e != null)
|
|
793
721
|
.map((entry) => {
|
|
794
|
-
if (entry === null) {
|
|
795
|
-
return null;
|
|
796
|
-
}
|
|
797
722
|
return de_LanguageWithScore(entry, context);
|
|
798
723
|
});
|
|
799
724
|
return retVal;
|
|
800
725
|
};
|
|
801
726
|
const de_LanguageWithScore = (output, context) => {
|
|
802
|
-
return {
|
|
803
|
-
LanguageCode:
|
|
804
|
-
Score:
|
|
805
|
-
};
|
|
806
|
-
};
|
|
807
|
-
const de_MatchedCategoryDetails = (output, context) => {
|
|
808
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
809
|
-
if (value === null) {
|
|
810
|
-
return acc;
|
|
811
|
-
}
|
|
812
|
-
acc[key] = de_PointsOfInterest(value, context);
|
|
813
|
-
return acc;
|
|
814
|
-
}, {});
|
|
727
|
+
return (0, smithy_client_1.take)(output, {
|
|
728
|
+
LanguageCode: smithy_client_1.expectString,
|
|
729
|
+
Score: smithy_client_1.limitedParseDouble,
|
|
730
|
+
});
|
|
815
731
|
};
|
|
816
732
|
const de_MedicalAlternative = (output, context) => {
|
|
817
|
-
return {
|
|
818
|
-
Entities:
|
|
819
|
-
Items:
|
|
820
|
-
Transcript:
|
|
821
|
-
};
|
|
733
|
+
return (0, smithy_client_1.take)(output, {
|
|
734
|
+
Entities: (_) => de_MedicalEntityList(_, context),
|
|
735
|
+
Items: (_) => de_MedicalItemList(_, context),
|
|
736
|
+
Transcript: smithy_client_1.expectString,
|
|
737
|
+
});
|
|
822
738
|
};
|
|
823
739
|
const de_MedicalAlternativeList = (output, context) => {
|
|
824
740
|
const retVal = (output || [])
|
|
825
741
|
.filter((e) => e != null)
|
|
826
742
|
.map((entry) => {
|
|
827
|
-
if (entry === null) {
|
|
828
|
-
return null;
|
|
829
|
-
}
|
|
830
743
|
return de_MedicalAlternative(entry, context);
|
|
831
744
|
});
|
|
832
745
|
return retVal;
|
|
833
746
|
};
|
|
834
747
|
const de_MedicalEntity = (output, context) => {
|
|
835
|
-
return {
|
|
836
|
-
Category:
|
|
837
|
-
Confidence:
|
|
838
|
-
Content:
|
|
839
|
-
EndTime:
|
|
840
|
-
StartTime:
|
|
841
|
-
};
|
|
748
|
+
return (0, smithy_client_1.take)(output, {
|
|
749
|
+
Category: smithy_client_1.expectString,
|
|
750
|
+
Confidence: smithy_client_1.limitedParseDouble,
|
|
751
|
+
Content: smithy_client_1.expectString,
|
|
752
|
+
EndTime: smithy_client_1.limitedParseDouble,
|
|
753
|
+
StartTime: smithy_client_1.limitedParseDouble,
|
|
754
|
+
});
|
|
842
755
|
};
|
|
843
756
|
const de_MedicalEntityList = (output, context) => {
|
|
844
757
|
const retVal = (output || [])
|
|
845
758
|
.filter((e) => e != null)
|
|
846
759
|
.map((entry) => {
|
|
847
|
-
if (entry === null) {
|
|
848
|
-
return null;
|
|
849
|
-
}
|
|
850
760
|
return de_MedicalEntity(entry, context);
|
|
851
761
|
});
|
|
852
762
|
return retVal;
|
|
853
763
|
};
|
|
854
764
|
const de_MedicalItem = (output, context) => {
|
|
855
|
-
return {
|
|
856
|
-
Confidence:
|
|
857
|
-
Content:
|
|
858
|
-
EndTime:
|
|
859
|
-
Speaker:
|
|
860
|
-
StartTime:
|
|
861
|
-
Type:
|
|
862
|
-
};
|
|
765
|
+
return (0, smithy_client_1.take)(output, {
|
|
766
|
+
Confidence: smithy_client_1.limitedParseDouble,
|
|
767
|
+
Content: smithy_client_1.expectString,
|
|
768
|
+
EndTime: smithy_client_1.limitedParseDouble,
|
|
769
|
+
Speaker: smithy_client_1.expectString,
|
|
770
|
+
StartTime: smithy_client_1.limitedParseDouble,
|
|
771
|
+
Type: smithy_client_1.expectString,
|
|
772
|
+
});
|
|
863
773
|
};
|
|
864
774
|
const de_MedicalItemList = (output, context) => {
|
|
865
775
|
const retVal = (output || [])
|
|
866
776
|
.filter((e) => e != null)
|
|
867
777
|
.map((entry) => {
|
|
868
|
-
if (entry === null) {
|
|
869
|
-
return null;
|
|
870
|
-
}
|
|
871
778
|
return de_MedicalItem(entry, context);
|
|
872
779
|
});
|
|
873
780
|
return retVal;
|
|
874
781
|
};
|
|
875
782
|
const de_MedicalResult = (output, context) => {
|
|
876
|
-
return {
|
|
877
|
-
Alternatives:
|
|
878
|
-
ChannelId:
|
|
879
|
-
EndTime:
|
|
880
|
-
IsPartial:
|
|
881
|
-
ResultId:
|
|
882
|
-
StartTime:
|
|
883
|
-
};
|
|
783
|
+
return (0, smithy_client_1.take)(output, {
|
|
784
|
+
Alternatives: (_) => de_MedicalAlternativeList(_, context),
|
|
785
|
+
ChannelId: smithy_client_1.expectString,
|
|
786
|
+
EndTime: smithy_client_1.limitedParseDouble,
|
|
787
|
+
IsPartial: smithy_client_1.expectBoolean,
|
|
788
|
+
ResultId: smithy_client_1.expectString,
|
|
789
|
+
StartTime: smithy_client_1.limitedParseDouble,
|
|
790
|
+
});
|
|
884
791
|
};
|
|
885
792
|
const de_MedicalResultList = (output, context) => {
|
|
886
793
|
const retVal = (output || [])
|
|
887
794
|
.filter((e) => e != null)
|
|
888
795
|
.map((entry) => {
|
|
889
|
-
if (entry === null) {
|
|
890
|
-
return null;
|
|
891
|
-
}
|
|
892
796
|
return de_MedicalResult(entry, context);
|
|
893
797
|
});
|
|
894
798
|
return retVal;
|
|
895
799
|
};
|
|
896
800
|
const de_MedicalTranscript = (output, context) => {
|
|
897
|
-
return {
|
|
898
|
-
Results:
|
|
899
|
-
};
|
|
801
|
+
return (0, smithy_client_1.take)(output, {
|
|
802
|
+
Results: (_) => de_MedicalResultList(_, context),
|
|
803
|
+
});
|
|
900
804
|
};
|
|
901
805
|
const de_MedicalTranscriptEvent = (output, context) => {
|
|
902
|
-
return {
|
|
903
|
-
Transcript:
|
|
904
|
-
};
|
|
905
|
-
};
|
|
906
|
-
const de_PointsOfInterest = (output, context) => {
|
|
907
|
-
return {
|
|
908
|
-
TimestampRanges: output.TimestampRanges != null ? de_TimestampRanges(output.TimestampRanges, context) : undefined,
|
|
909
|
-
};
|
|
806
|
+
return (0, smithy_client_1.take)(output, {
|
|
807
|
+
Transcript: (_) => de_MedicalTranscript(_, context),
|
|
808
|
+
});
|
|
910
809
|
};
|
|
911
810
|
const de_Result = (output, context) => {
|
|
912
|
-
return {
|
|
913
|
-
Alternatives:
|
|
914
|
-
ChannelId:
|
|
915
|
-
EndTime:
|
|
916
|
-
IsPartial:
|
|
917
|
-
LanguageCode:
|
|
918
|
-
LanguageIdentification:
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
StartTime: (0, smithy_client_1.limitedParseDouble)(output.StartTime),
|
|
923
|
-
};
|
|
811
|
+
return (0, smithy_client_1.take)(output, {
|
|
812
|
+
Alternatives: (_) => de_AlternativeList(_, context),
|
|
813
|
+
ChannelId: smithy_client_1.expectString,
|
|
814
|
+
EndTime: smithy_client_1.limitedParseDouble,
|
|
815
|
+
IsPartial: smithy_client_1.expectBoolean,
|
|
816
|
+
LanguageCode: smithy_client_1.expectString,
|
|
817
|
+
LanguageIdentification: (_) => de_LanguageIdentification(_, context),
|
|
818
|
+
ResultId: smithy_client_1.expectString,
|
|
819
|
+
StartTime: smithy_client_1.limitedParseDouble,
|
|
820
|
+
});
|
|
924
821
|
};
|
|
925
822
|
const de_ResultList = (output, context) => {
|
|
926
823
|
const retVal = (output || [])
|
|
927
824
|
.filter((e) => e != null)
|
|
928
825
|
.map((entry) => {
|
|
929
|
-
if (entry === null) {
|
|
930
|
-
return null;
|
|
931
|
-
}
|
|
932
826
|
return de_Result(entry, context);
|
|
933
827
|
});
|
|
934
828
|
return retVal;
|
|
935
829
|
};
|
|
936
|
-
const de_StringList = (output, context) => {
|
|
937
|
-
const retVal = (output || [])
|
|
938
|
-
.filter((e) => e != null)
|
|
939
|
-
.map((entry) => {
|
|
940
|
-
if (entry === null) {
|
|
941
|
-
return null;
|
|
942
|
-
}
|
|
943
|
-
return (0, smithy_client_1.expectString)(entry);
|
|
944
|
-
});
|
|
945
|
-
return retVal;
|
|
946
|
-
};
|
|
947
|
-
const de_TimestampRange = (output, context) => {
|
|
948
|
-
return {
|
|
949
|
-
BeginOffsetMillis: (0, smithy_client_1.expectLong)(output.BeginOffsetMillis),
|
|
950
|
-
EndOffsetMillis: (0, smithy_client_1.expectLong)(output.EndOffsetMillis),
|
|
951
|
-
};
|
|
952
|
-
};
|
|
953
|
-
const de_TimestampRanges = (output, context) => {
|
|
954
|
-
const retVal = (output || [])
|
|
955
|
-
.filter((e) => e != null)
|
|
956
|
-
.map((entry) => {
|
|
957
|
-
if (entry === null) {
|
|
958
|
-
return null;
|
|
959
|
-
}
|
|
960
|
-
return de_TimestampRange(entry, context);
|
|
961
|
-
});
|
|
962
|
-
return retVal;
|
|
963
|
-
};
|
|
964
830
|
const de_Transcript = (output, context) => {
|
|
965
|
-
return {
|
|
966
|
-
Results:
|
|
967
|
-
};
|
|
831
|
+
return (0, smithy_client_1.take)(output, {
|
|
832
|
+
Results: (_) => de_ResultList(_, context),
|
|
833
|
+
});
|
|
968
834
|
};
|
|
969
835
|
const de_TranscriptEvent = (output, context) => {
|
|
970
|
-
return {
|
|
971
|
-
Transcript:
|
|
972
|
-
};
|
|
836
|
+
return (0, smithy_client_1.take)(output, {
|
|
837
|
+
Transcript: (_) => de_Transcript(_, context),
|
|
838
|
+
});
|
|
973
839
|
};
|
|
974
840
|
const de_UtteranceEvent = (output, context) => {
|
|
975
|
-
return {
|
|
976
|
-
BeginOffsetMillis:
|
|
977
|
-
EndOffsetMillis:
|
|
978
|
-
Entities:
|
|
979
|
-
IsPartial:
|
|
980
|
-
IssuesDetected:
|
|
981
|
-
Items:
|
|
982
|
-
ParticipantRole:
|
|
983
|
-
Sentiment:
|
|
984
|
-
Transcript:
|
|
985
|
-
UtteranceId:
|
|
986
|
-
};
|
|
841
|
+
return (0, smithy_client_1.take)(output, {
|
|
842
|
+
BeginOffsetMillis: smithy_client_1.expectLong,
|
|
843
|
+
EndOffsetMillis: smithy_client_1.expectLong,
|
|
844
|
+
Entities: (_) => de_CallAnalyticsEntityList(_, context),
|
|
845
|
+
IsPartial: smithy_client_1.expectBoolean,
|
|
846
|
+
IssuesDetected: smithy_client_1._json,
|
|
847
|
+
Items: (_) => de_CallAnalyticsItemList(_, context),
|
|
848
|
+
ParticipantRole: smithy_client_1.expectString,
|
|
849
|
+
Sentiment: smithy_client_1.expectString,
|
|
850
|
+
Transcript: smithy_client_1.expectString,
|
|
851
|
+
UtteranceId: smithy_client_1.expectString,
|
|
852
|
+
});
|
|
987
853
|
};
|
|
988
854
|
const deserializeMetadata = (output) => ({
|
|
989
855
|
httpStatusCode: output.statusCode,
|