@aws-sdk/client-transcribe-streaming 3.310.0 → 3.315.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/protocols/Aws_restJson1.js +143 -277
- package/dist-es/protocols/Aws_restJson1.js +133 -267
- 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,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean,
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseBoolean as __parseBoolean, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { AudioStream, BadRequestException, ConflictException, InternalFailureException, LimitExceededException, ServiceUnavailableException, } from "../models/models_0";
|
|
4
4
|
import { TranscribeStreamingServiceException as __BaseException } from "../models/TranscribeStreamingServiceException";
|
|
5
5
|
export const se_StartCallAnalyticsStreamTranscriptionCommand = async (input, context) => {
|
|
@@ -195,10 +195,9 @@ const de_StartCallAnalyticsStreamTranscriptionCommandError = async (output, cont
|
|
|
195
195
|
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
196
196
|
default:
|
|
197
197
|
const parsedBody = parsedOutput.body;
|
|
198
|
-
throwDefaultError({
|
|
198
|
+
return throwDefaultError({
|
|
199
199
|
output,
|
|
200
200
|
parsedBody,
|
|
201
|
-
exceptionCtor: __BaseException,
|
|
202
201
|
errorCode,
|
|
203
202
|
});
|
|
204
203
|
}
|
|
@@ -262,10 +261,9 @@ const de_StartMedicalStreamTranscriptionCommandError = async (output, context) =
|
|
|
262
261
|
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
263
262
|
default:
|
|
264
263
|
const parsedBody = parsedOutput.body;
|
|
265
|
-
throwDefaultError({
|
|
264
|
+
return throwDefaultError({
|
|
266
265
|
output,
|
|
267
266
|
parsedBody,
|
|
268
|
-
exceptionCtor: __BaseException,
|
|
269
267
|
errorCode,
|
|
270
268
|
});
|
|
271
269
|
}
|
|
@@ -345,21 +343,21 @@ const de_StartStreamTranscriptionCommandError = async (output, context) => {
|
|
|
345
343
|
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
346
344
|
default:
|
|
347
345
|
const parsedBody = parsedOutput.body;
|
|
348
|
-
throwDefaultError({
|
|
346
|
+
return throwDefaultError({
|
|
349
347
|
output,
|
|
350
348
|
parsedBody,
|
|
351
|
-
exceptionCtor: __BaseException,
|
|
352
349
|
errorCode,
|
|
353
350
|
});
|
|
354
351
|
}
|
|
355
352
|
};
|
|
356
|
-
const
|
|
353
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
357
354
|
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
358
355
|
const contents = map({});
|
|
359
356
|
const data = parsedOutput.body;
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
357
|
+
const doc = take(data, {
|
|
358
|
+
Message: __expectString,
|
|
359
|
+
});
|
|
360
|
+
Object.assign(contents, doc);
|
|
363
361
|
const exception = new BadRequestException({
|
|
364
362
|
$metadata: deserializeMetadata(parsedOutput),
|
|
365
363
|
...contents,
|
|
@@ -369,9 +367,10 @@ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
|
369
367
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
370
368
|
const contents = map({});
|
|
371
369
|
const data = parsedOutput.body;
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
370
|
+
const doc = take(data, {
|
|
371
|
+
Message: __expectString,
|
|
372
|
+
});
|
|
373
|
+
Object.assign(contents, doc);
|
|
375
374
|
const exception = new ConflictException({
|
|
376
375
|
$metadata: deserializeMetadata(parsedOutput),
|
|
377
376
|
...contents,
|
|
@@ -381,9 +380,10 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
381
380
|
const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
382
381
|
const contents = map({});
|
|
383
382
|
const data = parsedOutput.body;
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}
|
|
383
|
+
const doc = take(data, {
|
|
384
|
+
Message: __expectString,
|
|
385
|
+
});
|
|
386
|
+
Object.assign(contents, doc);
|
|
387
387
|
const exception = new InternalFailureException({
|
|
388
388
|
$metadata: deserializeMetadata(parsedOutput),
|
|
389
389
|
...contents,
|
|
@@ -393,9 +393,10 @@ const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
|
393
393
|
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
394
394
|
const contents = map({});
|
|
395
395
|
const data = parsedOutput.body;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
396
|
+
const doc = take(data, {
|
|
397
|
+
Message: __expectString,
|
|
398
|
+
});
|
|
399
|
+
Object.assign(contents, doc);
|
|
399
400
|
const exception = new LimitExceededException({
|
|
400
401
|
$metadata: deserializeMetadata(parsedOutput),
|
|
401
402
|
...contents,
|
|
@@ -405,9 +406,10 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
405
406
|
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
406
407
|
const contents = map({});
|
|
407
408
|
const data = parsedOutput.body;
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
409
|
+
const doc = take(data, {
|
|
410
|
+
Message: __expectString,
|
|
411
|
+
});
|
|
412
|
+
Object.assign(contents, doc);
|
|
411
413
|
const exception = new ServiceUnavailableException({
|
|
412
414
|
$metadata: deserializeMetadata(parsedOutput),
|
|
413
415
|
...contents,
|
|
@@ -441,7 +443,7 @@ const se_ConfigurationEvent_event = (input, context) => {
|
|
|
441
443
|
":content-type": { type: "string", value: "application/json" },
|
|
442
444
|
};
|
|
443
445
|
let body = new Uint8Array();
|
|
444
|
-
body =
|
|
446
|
+
body = _json(input);
|
|
445
447
|
body = context.utf8Decoder(JSON.stringify(body));
|
|
446
448
|
return { headers, body };
|
|
447
449
|
};
|
|
@@ -565,7 +567,7 @@ const de_BadRequestException_event = async (output, context) => {
|
|
|
565
567
|
const de_CategoryEvent_event = async (output, context) => {
|
|
566
568
|
const contents = {};
|
|
567
569
|
const data = await parseBody(output.body, context);
|
|
568
|
-
Object.assign(contents,
|
|
570
|
+
Object.assign(contents, _json(data));
|
|
569
571
|
return contents;
|
|
570
572
|
};
|
|
571
573
|
const de_ConflictException_event = async (output, context) => {
|
|
@@ -614,166 +616,92 @@ const de_UtteranceEvent_event = async (output, context) => {
|
|
|
614
616
|
Object.assign(contents, de_UtteranceEvent(data, context));
|
|
615
617
|
return contents;
|
|
616
618
|
};
|
|
617
|
-
const se_ChannelDefinition = (input, context) => {
|
|
618
|
-
return {
|
|
619
|
-
...(input.ChannelId != null && { ChannelId: input.ChannelId }),
|
|
620
|
-
...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }),
|
|
621
|
-
};
|
|
622
|
-
};
|
|
623
|
-
const se_ChannelDefinitions = (input, context) => {
|
|
624
|
-
return input
|
|
625
|
-
.filter((e) => e != null)
|
|
626
|
-
.map((entry) => {
|
|
627
|
-
return se_ChannelDefinition(entry, context);
|
|
628
|
-
});
|
|
629
|
-
};
|
|
630
|
-
const se_ConfigurationEvent = (input, context) => {
|
|
631
|
-
return {
|
|
632
|
-
...(input.ChannelDefinitions != null && {
|
|
633
|
-
ChannelDefinitions: se_ChannelDefinitions(input.ChannelDefinitions, context),
|
|
634
|
-
}),
|
|
635
|
-
...(input.PostCallAnalyticsSettings != null && {
|
|
636
|
-
PostCallAnalyticsSettings: se_PostCallAnalyticsSettings(input.PostCallAnalyticsSettings, context),
|
|
637
|
-
}),
|
|
638
|
-
};
|
|
639
|
-
};
|
|
640
|
-
const se_PostCallAnalyticsSettings = (input, context) => {
|
|
641
|
-
return {
|
|
642
|
-
...(input.ContentRedactionOutput != null && { ContentRedactionOutput: input.ContentRedactionOutput }),
|
|
643
|
-
...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
|
|
644
|
-
...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }),
|
|
645
|
-
...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }),
|
|
646
|
-
};
|
|
647
|
-
};
|
|
648
619
|
const de_Alternative = (output, context) => {
|
|
649
|
-
return {
|
|
650
|
-
Entities:
|
|
651
|
-
Items:
|
|
652
|
-
Transcript: __expectString
|
|
653
|
-
};
|
|
620
|
+
return take(output, {
|
|
621
|
+
Entities: (_) => de_EntityList(_, context),
|
|
622
|
+
Items: (_) => de_ItemList(_, context),
|
|
623
|
+
Transcript: __expectString,
|
|
624
|
+
});
|
|
654
625
|
};
|
|
655
626
|
const de_AlternativeList = (output, context) => {
|
|
656
627
|
const retVal = (output || [])
|
|
657
628
|
.filter((e) => e != null)
|
|
658
629
|
.map((entry) => {
|
|
659
|
-
if (entry === null) {
|
|
660
|
-
return null;
|
|
661
|
-
}
|
|
662
630
|
return de_Alternative(entry, context);
|
|
663
631
|
});
|
|
664
632
|
return retVal;
|
|
665
633
|
};
|
|
666
634
|
const de_CallAnalyticsEntity = (output, context) => {
|
|
667
|
-
return {
|
|
668
|
-
BeginOffsetMillis: __expectLong
|
|
669
|
-
Category: __expectString
|
|
670
|
-
Confidence: __limitedParseDouble
|
|
671
|
-
Content: __expectString
|
|
672
|
-
EndOffsetMillis: __expectLong
|
|
673
|
-
Type: __expectString
|
|
674
|
-
};
|
|
635
|
+
return take(output, {
|
|
636
|
+
BeginOffsetMillis: __expectLong,
|
|
637
|
+
Category: __expectString,
|
|
638
|
+
Confidence: __limitedParseDouble,
|
|
639
|
+
Content: __expectString,
|
|
640
|
+
EndOffsetMillis: __expectLong,
|
|
641
|
+
Type: __expectString,
|
|
642
|
+
});
|
|
675
643
|
};
|
|
676
644
|
const de_CallAnalyticsEntityList = (output, context) => {
|
|
677
645
|
const retVal = (output || [])
|
|
678
646
|
.filter((e) => e != null)
|
|
679
647
|
.map((entry) => {
|
|
680
|
-
if (entry === null) {
|
|
681
|
-
return null;
|
|
682
|
-
}
|
|
683
648
|
return de_CallAnalyticsEntity(entry, context);
|
|
684
649
|
});
|
|
685
650
|
return retVal;
|
|
686
651
|
};
|
|
687
652
|
const de_CallAnalyticsItem = (output, context) => {
|
|
688
|
-
return {
|
|
689
|
-
BeginOffsetMillis: __expectLong
|
|
690
|
-
Confidence: __limitedParseDouble
|
|
691
|
-
Content: __expectString
|
|
692
|
-
EndOffsetMillis: __expectLong
|
|
693
|
-
Stable: __expectBoolean
|
|
694
|
-
Type: __expectString
|
|
695
|
-
VocabularyFilterMatch: __expectBoolean
|
|
696
|
-
};
|
|
653
|
+
return take(output, {
|
|
654
|
+
BeginOffsetMillis: __expectLong,
|
|
655
|
+
Confidence: __limitedParseDouble,
|
|
656
|
+
Content: __expectString,
|
|
657
|
+
EndOffsetMillis: __expectLong,
|
|
658
|
+
Stable: __expectBoolean,
|
|
659
|
+
Type: __expectString,
|
|
660
|
+
VocabularyFilterMatch: __expectBoolean,
|
|
661
|
+
});
|
|
697
662
|
};
|
|
698
663
|
const de_CallAnalyticsItemList = (output, context) => {
|
|
699
664
|
const retVal = (output || [])
|
|
700
665
|
.filter((e) => e != null)
|
|
701
666
|
.map((entry) => {
|
|
702
|
-
if (entry === null) {
|
|
703
|
-
return null;
|
|
704
|
-
}
|
|
705
667
|
return de_CallAnalyticsItem(entry, context);
|
|
706
668
|
});
|
|
707
669
|
return retVal;
|
|
708
670
|
};
|
|
709
|
-
const de_CategoryEvent = (output, context) => {
|
|
710
|
-
return {
|
|
711
|
-
MatchedCategories: output.MatchedCategories != null ? de_StringList(output.MatchedCategories, context) : undefined,
|
|
712
|
-
MatchedDetails: output.MatchedDetails != null ? de_MatchedCategoryDetails(output.MatchedDetails, context) : undefined,
|
|
713
|
-
};
|
|
714
|
-
};
|
|
715
|
-
const de_CharacterOffsets = (output, context) => {
|
|
716
|
-
return {
|
|
717
|
-
Begin: __expectInt32(output.Begin),
|
|
718
|
-
End: __expectInt32(output.End),
|
|
719
|
-
};
|
|
720
|
-
};
|
|
721
671
|
const de_Entity = (output, context) => {
|
|
722
|
-
return {
|
|
723
|
-
Category: __expectString
|
|
724
|
-
Confidence: __limitedParseDouble
|
|
725
|
-
Content: __expectString
|
|
726
|
-
EndTime: __limitedParseDouble
|
|
727
|
-
StartTime: __limitedParseDouble
|
|
728
|
-
Type: __expectString
|
|
729
|
-
};
|
|
672
|
+
return take(output, {
|
|
673
|
+
Category: __expectString,
|
|
674
|
+
Confidence: __limitedParseDouble,
|
|
675
|
+
Content: __expectString,
|
|
676
|
+
EndTime: __limitedParseDouble,
|
|
677
|
+
StartTime: __limitedParseDouble,
|
|
678
|
+
Type: __expectString,
|
|
679
|
+
});
|
|
730
680
|
};
|
|
731
681
|
const de_EntityList = (output, context) => {
|
|
732
682
|
const retVal = (output || [])
|
|
733
683
|
.filter((e) => e != null)
|
|
734
684
|
.map((entry) => {
|
|
735
|
-
if (entry === null) {
|
|
736
|
-
return null;
|
|
737
|
-
}
|
|
738
685
|
return de_Entity(entry, context);
|
|
739
686
|
});
|
|
740
687
|
return retVal;
|
|
741
688
|
};
|
|
742
|
-
const de_IssueDetected = (output, context) => {
|
|
743
|
-
return {
|
|
744
|
-
CharacterOffsets: output.CharacterOffsets != null ? de_CharacterOffsets(output.CharacterOffsets, context) : undefined,
|
|
745
|
-
};
|
|
746
|
-
};
|
|
747
|
-
const de_IssuesDetected = (output, context) => {
|
|
748
|
-
const retVal = (output || [])
|
|
749
|
-
.filter((e) => e != null)
|
|
750
|
-
.map((entry) => {
|
|
751
|
-
if (entry === null) {
|
|
752
|
-
return null;
|
|
753
|
-
}
|
|
754
|
-
return de_IssueDetected(entry, context);
|
|
755
|
-
});
|
|
756
|
-
return retVal;
|
|
757
|
-
};
|
|
758
689
|
const de_Item = (output, context) => {
|
|
759
|
-
return {
|
|
760
|
-
Confidence: __limitedParseDouble
|
|
761
|
-
Content: __expectString
|
|
762
|
-
EndTime: __limitedParseDouble
|
|
763
|
-
Speaker: __expectString
|
|
764
|
-
Stable: __expectBoolean
|
|
765
|
-
StartTime: __limitedParseDouble
|
|
766
|
-
Type: __expectString
|
|
767
|
-
VocabularyFilterMatch: __expectBoolean
|
|
768
|
-
};
|
|
690
|
+
return take(output, {
|
|
691
|
+
Confidence: __limitedParseDouble,
|
|
692
|
+
Content: __expectString,
|
|
693
|
+
EndTime: __limitedParseDouble,
|
|
694
|
+
Speaker: __expectString,
|
|
695
|
+
Stable: __expectBoolean,
|
|
696
|
+
StartTime: __limitedParseDouble,
|
|
697
|
+
Type: __expectString,
|
|
698
|
+
VocabularyFilterMatch: __expectBoolean,
|
|
699
|
+
});
|
|
769
700
|
};
|
|
770
701
|
const de_ItemList = (output, context) => {
|
|
771
702
|
const retVal = (output || [])
|
|
772
703
|
.filter((e) => e != null)
|
|
773
704
|
.map((entry) => {
|
|
774
|
-
if (entry === null) {
|
|
775
|
-
return null;
|
|
776
|
-
}
|
|
777
705
|
return de_Item(entry, context);
|
|
778
706
|
});
|
|
779
707
|
return retVal;
|
|
@@ -782,199 +710,137 @@ const de_LanguageIdentification = (output, context) => {
|
|
|
782
710
|
const retVal = (output || [])
|
|
783
711
|
.filter((e) => e != null)
|
|
784
712
|
.map((entry) => {
|
|
785
|
-
if (entry === null) {
|
|
786
|
-
return null;
|
|
787
|
-
}
|
|
788
713
|
return de_LanguageWithScore(entry, context);
|
|
789
714
|
});
|
|
790
715
|
return retVal;
|
|
791
716
|
};
|
|
792
717
|
const de_LanguageWithScore = (output, context) => {
|
|
793
|
-
return {
|
|
794
|
-
LanguageCode: __expectString
|
|
795
|
-
Score: __limitedParseDouble
|
|
796
|
-
};
|
|
797
|
-
};
|
|
798
|
-
const de_MatchedCategoryDetails = (output, context) => {
|
|
799
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
800
|
-
if (value === null) {
|
|
801
|
-
return acc;
|
|
802
|
-
}
|
|
803
|
-
acc[key] = de_PointsOfInterest(value, context);
|
|
804
|
-
return acc;
|
|
805
|
-
}, {});
|
|
718
|
+
return take(output, {
|
|
719
|
+
LanguageCode: __expectString,
|
|
720
|
+
Score: __limitedParseDouble,
|
|
721
|
+
});
|
|
806
722
|
};
|
|
807
723
|
const de_MedicalAlternative = (output, context) => {
|
|
808
|
-
return {
|
|
809
|
-
Entities:
|
|
810
|
-
Items:
|
|
811
|
-
Transcript: __expectString
|
|
812
|
-
};
|
|
724
|
+
return take(output, {
|
|
725
|
+
Entities: (_) => de_MedicalEntityList(_, context),
|
|
726
|
+
Items: (_) => de_MedicalItemList(_, context),
|
|
727
|
+
Transcript: __expectString,
|
|
728
|
+
});
|
|
813
729
|
};
|
|
814
730
|
const de_MedicalAlternativeList = (output, context) => {
|
|
815
731
|
const retVal = (output || [])
|
|
816
732
|
.filter((e) => e != null)
|
|
817
733
|
.map((entry) => {
|
|
818
|
-
if (entry === null) {
|
|
819
|
-
return null;
|
|
820
|
-
}
|
|
821
734
|
return de_MedicalAlternative(entry, context);
|
|
822
735
|
});
|
|
823
736
|
return retVal;
|
|
824
737
|
};
|
|
825
738
|
const de_MedicalEntity = (output, context) => {
|
|
826
|
-
return {
|
|
827
|
-
Category: __expectString
|
|
828
|
-
Confidence: __limitedParseDouble
|
|
829
|
-
Content: __expectString
|
|
830
|
-
EndTime: __limitedParseDouble
|
|
831
|
-
StartTime: __limitedParseDouble
|
|
832
|
-
};
|
|
739
|
+
return take(output, {
|
|
740
|
+
Category: __expectString,
|
|
741
|
+
Confidence: __limitedParseDouble,
|
|
742
|
+
Content: __expectString,
|
|
743
|
+
EndTime: __limitedParseDouble,
|
|
744
|
+
StartTime: __limitedParseDouble,
|
|
745
|
+
});
|
|
833
746
|
};
|
|
834
747
|
const de_MedicalEntityList = (output, context) => {
|
|
835
748
|
const retVal = (output || [])
|
|
836
749
|
.filter((e) => e != null)
|
|
837
750
|
.map((entry) => {
|
|
838
|
-
if (entry === null) {
|
|
839
|
-
return null;
|
|
840
|
-
}
|
|
841
751
|
return de_MedicalEntity(entry, context);
|
|
842
752
|
});
|
|
843
753
|
return retVal;
|
|
844
754
|
};
|
|
845
755
|
const de_MedicalItem = (output, context) => {
|
|
846
|
-
return {
|
|
847
|
-
Confidence: __limitedParseDouble
|
|
848
|
-
Content: __expectString
|
|
849
|
-
EndTime: __limitedParseDouble
|
|
850
|
-
Speaker: __expectString
|
|
851
|
-
StartTime: __limitedParseDouble
|
|
852
|
-
Type: __expectString
|
|
853
|
-
};
|
|
756
|
+
return take(output, {
|
|
757
|
+
Confidence: __limitedParseDouble,
|
|
758
|
+
Content: __expectString,
|
|
759
|
+
EndTime: __limitedParseDouble,
|
|
760
|
+
Speaker: __expectString,
|
|
761
|
+
StartTime: __limitedParseDouble,
|
|
762
|
+
Type: __expectString,
|
|
763
|
+
});
|
|
854
764
|
};
|
|
855
765
|
const de_MedicalItemList = (output, context) => {
|
|
856
766
|
const retVal = (output || [])
|
|
857
767
|
.filter((e) => e != null)
|
|
858
768
|
.map((entry) => {
|
|
859
|
-
if (entry === null) {
|
|
860
|
-
return null;
|
|
861
|
-
}
|
|
862
769
|
return de_MedicalItem(entry, context);
|
|
863
770
|
});
|
|
864
771
|
return retVal;
|
|
865
772
|
};
|
|
866
773
|
const de_MedicalResult = (output, context) => {
|
|
867
|
-
return {
|
|
868
|
-
Alternatives:
|
|
869
|
-
ChannelId: __expectString
|
|
870
|
-
EndTime: __limitedParseDouble
|
|
871
|
-
IsPartial: __expectBoolean
|
|
872
|
-
ResultId: __expectString
|
|
873
|
-
StartTime: __limitedParseDouble
|
|
874
|
-
};
|
|
774
|
+
return take(output, {
|
|
775
|
+
Alternatives: (_) => de_MedicalAlternativeList(_, context),
|
|
776
|
+
ChannelId: __expectString,
|
|
777
|
+
EndTime: __limitedParseDouble,
|
|
778
|
+
IsPartial: __expectBoolean,
|
|
779
|
+
ResultId: __expectString,
|
|
780
|
+
StartTime: __limitedParseDouble,
|
|
781
|
+
});
|
|
875
782
|
};
|
|
876
783
|
const de_MedicalResultList = (output, context) => {
|
|
877
784
|
const retVal = (output || [])
|
|
878
785
|
.filter((e) => e != null)
|
|
879
786
|
.map((entry) => {
|
|
880
|
-
if (entry === null) {
|
|
881
|
-
return null;
|
|
882
|
-
}
|
|
883
787
|
return de_MedicalResult(entry, context);
|
|
884
788
|
});
|
|
885
789
|
return retVal;
|
|
886
790
|
};
|
|
887
791
|
const de_MedicalTranscript = (output, context) => {
|
|
888
|
-
return {
|
|
889
|
-
Results:
|
|
890
|
-
};
|
|
792
|
+
return take(output, {
|
|
793
|
+
Results: (_) => de_MedicalResultList(_, context),
|
|
794
|
+
});
|
|
891
795
|
};
|
|
892
796
|
const de_MedicalTranscriptEvent = (output, context) => {
|
|
893
|
-
return {
|
|
894
|
-
Transcript:
|
|
895
|
-
};
|
|
896
|
-
};
|
|
897
|
-
const de_PointsOfInterest = (output, context) => {
|
|
898
|
-
return {
|
|
899
|
-
TimestampRanges: output.TimestampRanges != null ? de_TimestampRanges(output.TimestampRanges, context) : undefined,
|
|
900
|
-
};
|
|
797
|
+
return take(output, {
|
|
798
|
+
Transcript: (_) => de_MedicalTranscript(_, context),
|
|
799
|
+
});
|
|
901
800
|
};
|
|
902
801
|
const de_Result = (output, context) => {
|
|
903
|
-
return {
|
|
904
|
-
Alternatives:
|
|
905
|
-
ChannelId: __expectString
|
|
906
|
-
EndTime: __limitedParseDouble
|
|
907
|
-
IsPartial: __expectBoolean
|
|
908
|
-
LanguageCode: __expectString
|
|
909
|
-
LanguageIdentification:
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
StartTime: __limitedParseDouble(output.StartTime),
|
|
914
|
-
};
|
|
802
|
+
return take(output, {
|
|
803
|
+
Alternatives: (_) => de_AlternativeList(_, context),
|
|
804
|
+
ChannelId: __expectString,
|
|
805
|
+
EndTime: __limitedParseDouble,
|
|
806
|
+
IsPartial: __expectBoolean,
|
|
807
|
+
LanguageCode: __expectString,
|
|
808
|
+
LanguageIdentification: (_) => de_LanguageIdentification(_, context),
|
|
809
|
+
ResultId: __expectString,
|
|
810
|
+
StartTime: __limitedParseDouble,
|
|
811
|
+
});
|
|
915
812
|
};
|
|
916
813
|
const de_ResultList = (output, context) => {
|
|
917
814
|
const retVal = (output || [])
|
|
918
815
|
.filter((e) => e != null)
|
|
919
816
|
.map((entry) => {
|
|
920
|
-
if (entry === null) {
|
|
921
|
-
return null;
|
|
922
|
-
}
|
|
923
817
|
return de_Result(entry, context);
|
|
924
818
|
});
|
|
925
819
|
return retVal;
|
|
926
820
|
};
|
|
927
|
-
const de_StringList = (output, context) => {
|
|
928
|
-
const retVal = (output || [])
|
|
929
|
-
.filter((e) => e != null)
|
|
930
|
-
.map((entry) => {
|
|
931
|
-
if (entry === null) {
|
|
932
|
-
return null;
|
|
933
|
-
}
|
|
934
|
-
return __expectString(entry);
|
|
935
|
-
});
|
|
936
|
-
return retVal;
|
|
937
|
-
};
|
|
938
|
-
const de_TimestampRange = (output, context) => {
|
|
939
|
-
return {
|
|
940
|
-
BeginOffsetMillis: __expectLong(output.BeginOffsetMillis),
|
|
941
|
-
EndOffsetMillis: __expectLong(output.EndOffsetMillis),
|
|
942
|
-
};
|
|
943
|
-
};
|
|
944
|
-
const de_TimestampRanges = (output, context) => {
|
|
945
|
-
const retVal = (output || [])
|
|
946
|
-
.filter((e) => e != null)
|
|
947
|
-
.map((entry) => {
|
|
948
|
-
if (entry === null) {
|
|
949
|
-
return null;
|
|
950
|
-
}
|
|
951
|
-
return de_TimestampRange(entry, context);
|
|
952
|
-
});
|
|
953
|
-
return retVal;
|
|
954
|
-
};
|
|
955
821
|
const de_Transcript = (output, context) => {
|
|
956
|
-
return {
|
|
957
|
-
Results:
|
|
958
|
-
};
|
|
822
|
+
return take(output, {
|
|
823
|
+
Results: (_) => de_ResultList(_, context),
|
|
824
|
+
});
|
|
959
825
|
};
|
|
960
826
|
const de_TranscriptEvent = (output, context) => {
|
|
961
|
-
return {
|
|
962
|
-
Transcript:
|
|
963
|
-
};
|
|
827
|
+
return take(output, {
|
|
828
|
+
Transcript: (_) => de_Transcript(_, context),
|
|
829
|
+
});
|
|
964
830
|
};
|
|
965
831
|
const de_UtteranceEvent = (output, context) => {
|
|
966
|
-
return {
|
|
967
|
-
BeginOffsetMillis: __expectLong
|
|
968
|
-
EndOffsetMillis: __expectLong
|
|
969
|
-
Entities:
|
|
970
|
-
IsPartial: __expectBoolean
|
|
971
|
-
IssuesDetected:
|
|
972
|
-
Items:
|
|
973
|
-
ParticipantRole: __expectString
|
|
974
|
-
Sentiment: __expectString
|
|
975
|
-
Transcript: __expectString
|
|
976
|
-
UtteranceId: __expectString
|
|
977
|
-
};
|
|
832
|
+
return take(output, {
|
|
833
|
+
BeginOffsetMillis: __expectLong,
|
|
834
|
+
EndOffsetMillis: __expectLong,
|
|
835
|
+
Entities: (_) => de_CallAnalyticsEntityList(_, context),
|
|
836
|
+
IsPartial: __expectBoolean,
|
|
837
|
+
IssuesDetected: _json,
|
|
838
|
+
Items: (_) => de_CallAnalyticsItemList(_, context),
|
|
839
|
+
ParticipantRole: __expectString,
|
|
840
|
+
Sentiment: __expectString,
|
|
841
|
+
Transcript: __expectString,
|
|
842
|
+
UtteranceId: __expectString,
|
|
843
|
+
});
|
|
978
844
|
};
|
|
979
845
|
const deserializeMetadata = (output) => ({
|
|
980
846
|
httpStatusCode: output.statusCode,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-transcribe-streaming",
|
|
3
3
|
"description": "AWS SDK for JavaScript Transcribe Streaming Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.315.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
24
24
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
25
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
26
26
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
27
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
27
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
28
28
|
"@aws-sdk/eventstream-handler-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/eventstream-serde-browser": "3.310.0",
|
|
30
30
|
"@aws-sdk/eventstream-serde-config-resolver": "3.310.0",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
49
49
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
50
50
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
51
|
-
"@aws-sdk/smithy-client": "3.
|
|
51
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
52
52
|
"@aws-sdk/types": "3.310.0",
|
|
53
53
|
"@aws-sdk/url-parser": "3.310.0",
|
|
54
54
|
"@aws-sdk/util-base64": "3.310.0",
|
|
55
55
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
56
56
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
57
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
58
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
57
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
58
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
59
59
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
60
60
|
"@aws-sdk/util-retry": "3.310.0",
|
|
61
61
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|