@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
|
@@ -1,48 +1,13 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { StartCallAnalyticsStreamTranscriptionCommand, } from "./commands/StartCallAnalyticsStreamTranscriptionCommand";
|
|
2
3
|
import { StartMedicalStreamTranscriptionCommand, } from "./commands/StartMedicalStreamTranscriptionCommand";
|
|
3
4
|
import { StartStreamTranscriptionCommand, } from "./commands/StartStreamTranscriptionCommand";
|
|
4
5
|
import { TranscribeStreamingClient } from "./TranscribeStreamingClient";
|
|
6
|
+
const commands = {
|
|
7
|
+
StartCallAnalyticsStreamTranscriptionCommand,
|
|
8
|
+
StartMedicalStreamTranscriptionCommand,
|
|
9
|
+
StartStreamTranscriptionCommand,
|
|
10
|
+
};
|
|
5
11
|
export class TranscribeStreaming extends TranscribeStreamingClient {
|
|
6
|
-
startCallAnalyticsStreamTranscription(args, optionsOrCb, cb) {
|
|
7
|
-
const command = new StartCallAnalyticsStreamTranscriptionCommand(args);
|
|
8
|
-
if (typeof optionsOrCb === "function") {
|
|
9
|
-
this.send(command, optionsOrCb);
|
|
10
|
-
}
|
|
11
|
-
else if (typeof cb === "function") {
|
|
12
|
-
if (typeof optionsOrCb !== "object")
|
|
13
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
14
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return this.send(command, optionsOrCb);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
startMedicalStreamTranscription(args, optionsOrCb, cb) {
|
|
21
|
-
const command = new StartMedicalStreamTranscriptionCommand(args);
|
|
22
|
-
if (typeof optionsOrCb === "function") {
|
|
23
|
-
this.send(command, optionsOrCb);
|
|
24
|
-
}
|
|
25
|
-
else if (typeof cb === "function") {
|
|
26
|
-
if (typeof optionsOrCb !== "object")
|
|
27
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
28
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
return this.send(command, optionsOrCb);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
startStreamTranscription(args, optionsOrCb, cb) {
|
|
35
|
-
const command = new StartStreamTranscriptionCommand(args);
|
|
36
|
-
if (typeof optionsOrCb === "function") {
|
|
37
|
-
this.send(command, optionsOrCb);
|
|
38
|
-
}
|
|
39
|
-
else if (typeof cb === "function") {
|
|
40
|
-
if (typeof optionsOrCb !== "object")
|
|
41
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
42
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
return this.send(command, optionsOrCb);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
12
|
}
|
|
13
|
+
createAggregatedClient(commands, TranscribeStreaming);
|
|
@@ -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,
|