@aws-sdk/client-transcribe-streaming 3.928.0 → 3.930.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +1514 -1228
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/TranscribeStreamingClient.js +2 -0
- package/dist-es/commands/GetMedicalScribeStreamCommand.js +3 -9
- package/dist-es/commands/StartCallAnalyticsStreamTranscriptionCommand.js +2 -7
- package/dist-es/commands/StartMedicalScribeStreamCommand.js +2 -7
- package/dist-es/commands/StartMedicalStreamTranscriptionCommand.js +2 -7
- package/dist-es/commands/StartStreamTranscriptionCommand.js +2 -7
- package/dist-es/models/models_0.js +0 -227
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +1534 -0
- package/dist-types/TranscribeStreamingClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +24 -74
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +92 -0
- package/dist-types/ts3.4/TranscribeStreamingClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -61
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +99 -0
- package/package.json +40 -40
- package/dist-es/protocols/Aws_restJson1.js +0 -988
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -47
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -68
|
@@ -1,988 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, map, parseBoolean as __parseBoolean, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { AudioStream, BadRequestException, ConflictException, InternalFailureException, LimitExceededException, MedicalScribeInputStream, ResourceNotFoundException, ServiceUnavailableException, } from "../models/models_0";
|
|
5
|
-
import { TranscribeStreamingServiceException as __BaseException } from "../models/TranscribeStreamingServiceException";
|
|
6
|
-
export const se_GetMedicalScribeStreamCommand = async (input, context) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {};
|
|
9
|
-
b.bp("/medical-scribe-stream/{SessionId}");
|
|
10
|
-
b.p("SessionId", () => input.SessionId, "{SessionId}", false);
|
|
11
|
-
let body;
|
|
12
|
-
b.m("GET").h(headers).b(body);
|
|
13
|
-
return b.build();
|
|
14
|
-
};
|
|
15
|
-
export const se_StartCallAnalyticsStreamTranscriptionCommand = async (input, context) => {
|
|
16
|
-
const b = rb(input, context);
|
|
17
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
18
|
-
"content-type": "application/json",
|
|
19
|
-
[_xatlc]: input[_LC],
|
|
20
|
-
[_xatsr]: [() => isSerializableHeaderValue(input[_MSRH]), () => input[_MSRH].toString()],
|
|
21
|
-
[_xatme]: input[_ME],
|
|
22
|
-
[_xatvn]: input[_VN],
|
|
23
|
-
[_xatsi]: input[_SI],
|
|
24
|
-
[_xatvfn]: input[_VFN],
|
|
25
|
-
[_xatvfm]: input[_VFM],
|
|
26
|
-
[_xatlmn]: input[_LMN],
|
|
27
|
-
[_xatil]: [() => isSerializableHeaderValue(input[_IL]), () => input[_IL].toString()],
|
|
28
|
-
[_xatlo]: input[_LO],
|
|
29
|
-
[_xatpl]: input[_PL],
|
|
30
|
-
[_xatvn_]: input[_VNo],
|
|
31
|
-
[_xatvfn_]: input[_VFNo],
|
|
32
|
-
[_xateprs]: [() => isSerializableHeaderValue(input[_EPRS]), () => input[_EPRS].toString()],
|
|
33
|
-
[_xatprs]: input[_PRS],
|
|
34
|
-
[_xatcit]: input[_CIT],
|
|
35
|
-
[_xatcrt]: input[_CRT],
|
|
36
|
-
[_xatpet]: input[_PET],
|
|
37
|
-
});
|
|
38
|
-
b.bp("/call-analytics-stream-transcription");
|
|
39
|
-
let body;
|
|
40
|
-
if (input.AudioStream !== undefined) {
|
|
41
|
-
body = se_AudioStream(input.AudioStream, context);
|
|
42
|
-
}
|
|
43
|
-
b.m("POST").h(headers).b(body);
|
|
44
|
-
return b.build();
|
|
45
|
-
};
|
|
46
|
-
export const se_StartMedicalScribeStreamCommand = async (input, context) => {
|
|
47
|
-
const b = rb(input, context);
|
|
48
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
49
|
-
"content-type": "application/json",
|
|
50
|
-
[_xatsi]: input[_SI],
|
|
51
|
-
[_xatlc]: input[_LC],
|
|
52
|
-
[_xatsr]: [() => isSerializableHeaderValue(input[_MSRH]), () => input[_MSRH].toString()],
|
|
53
|
-
[_xatme]: input[_ME],
|
|
54
|
-
});
|
|
55
|
-
b.bp("/medical-scribe-stream");
|
|
56
|
-
let body;
|
|
57
|
-
if (input.InputStream !== undefined) {
|
|
58
|
-
body = se_MedicalScribeInputStream(input.InputStream, context);
|
|
59
|
-
}
|
|
60
|
-
b.m("POST").h(headers).b(body);
|
|
61
|
-
return b.build();
|
|
62
|
-
};
|
|
63
|
-
export const se_StartMedicalStreamTranscriptionCommand = async (input, context) => {
|
|
64
|
-
const b = rb(input, context);
|
|
65
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
66
|
-
"content-type": "application/json",
|
|
67
|
-
[_xatlc]: input[_LC],
|
|
68
|
-
[_xatsr]: [() => isSerializableHeaderValue(input[_MSRH]), () => input[_MSRH].toString()],
|
|
69
|
-
[_xatme]: input[_ME],
|
|
70
|
-
[_xatvn]: input[_VN],
|
|
71
|
-
[_xats]: input[_S],
|
|
72
|
-
[_xatt]: input[_T],
|
|
73
|
-
[_xatssl]: [() => isSerializableHeaderValue(input[_SSL]), () => input[_SSL].toString()],
|
|
74
|
-
[_xatsi]: input[_SI],
|
|
75
|
-
[_xateci]: [() => isSerializableHeaderValue(input[_ECI]), () => input[_ECI].toString()],
|
|
76
|
-
[_xatnoc]: [() => isSerializableHeaderValue(input[_NOC]), () => input[_NOC].toString()],
|
|
77
|
-
[_xatcit]: input[_CIT],
|
|
78
|
-
});
|
|
79
|
-
b.bp("/medical-stream-transcription");
|
|
80
|
-
let body;
|
|
81
|
-
if (input.AudioStream !== undefined) {
|
|
82
|
-
body = se_AudioStream(input.AudioStream, context);
|
|
83
|
-
}
|
|
84
|
-
b.m("POST").h(headers).b(body);
|
|
85
|
-
return b.build();
|
|
86
|
-
};
|
|
87
|
-
export const se_StartStreamTranscriptionCommand = async (input, context) => {
|
|
88
|
-
const b = rb(input, context);
|
|
89
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
90
|
-
"content-type": "application/json",
|
|
91
|
-
[_xatlc]: input[_LC],
|
|
92
|
-
[_xatsr]: [() => isSerializableHeaderValue(input[_MSRH]), () => input[_MSRH].toString()],
|
|
93
|
-
[_xatme]: input[_ME],
|
|
94
|
-
[_xatvn]: input[_VN],
|
|
95
|
-
[_xatsi]: input[_SI],
|
|
96
|
-
[_xatvfn]: input[_VFN],
|
|
97
|
-
[_xatvfm]: input[_VFM],
|
|
98
|
-
[_xatssl]: [() => isSerializableHeaderValue(input[_SSL]), () => input[_SSL].toString()],
|
|
99
|
-
[_xateci]: [() => isSerializableHeaderValue(input[_ECI]), () => input[_ECI].toString()],
|
|
100
|
-
[_xatnoc]: [() => isSerializableHeaderValue(input[_NOC]), () => input[_NOC].toString()],
|
|
101
|
-
[_xateprs]: [() => isSerializableHeaderValue(input[_EPRS]), () => input[_EPRS].toString()],
|
|
102
|
-
[_xatprs]: input[_PRS],
|
|
103
|
-
[_xatcit]: input[_CIT],
|
|
104
|
-
[_xatcrt]: input[_CRT],
|
|
105
|
-
[_xatpet]: input[_PET],
|
|
106
|
-
[_xatlmn]: input[_LMN],
|
|
107
|
-
[_xatil]: [() => isSerializableHeaderValue(input[_IL]), () => input[_IL].toString()],
|
|
108
|
-
[_xatlo]: input[_LO],
|
|
109
|
-
[_xatpl]: input[_PL],
|
|
110
|
-
[_xatiml]: [() => isSerializableHeaderValue(input[_IML]), () => input[_IML].toString()],
|
|
111
|
-
[_xatvn_]: input[_VNo],
|
|
112
|
-
[_xatvfn_]: input[_VFNo],
|
|
113
|
-
});
|
|
114
|
-
b.bp("/stream-transcription");
|
|
115
|
-
let body;
|
|
116
|
-
if (input.AudioStream !== undefined) {
|
|
117
|
-
body = se_AudioStream(input.AudioStream, context);
|
|
118
|
-
}
|
|
119
|
-
b.m("POST").h(headers).b(body);
|
|
120
|
-
return b.build();
|
|
121
|
-
};
|
|
122
|
-
export const de_GetMedicalScribeStreamCommand = async (output, context) => {
|
|
123
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
124
|
-
return de_CommandError(output, context);
|
|
125
|
-
}
|
|
126
|
-
const contents = map({
|
|
127
|
-
$metadata: deserializeMetadata(output),
|
|
128
|
-
});
|
|
129
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
130
|
-
const doc = take(data, {
|
|
131
|
-
MedicalScribeStreamDetails: (_) => de_MedicalScribeStreamDetails(_, context),
|
|
132
|
-
});
|
|
133
|
-
Object.assign(contents, doc);
|
|
134
|
-
return contents;
|
|
135
|
-
};
|
|
136
|
-
export const de_StartCallAnalyticsStreamTranscriptionCommand = async (output, context) => {
|
|
137
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
138
|
-
return de_CommandError(output, context);
|
|
139
|
-
}
|
|
140
|
-
const contents = map({
|
|
141
|
-
$metadata: deserializeMetadata(output),
|
|
142
|
-
[_RI]: [, output.headers[_xari]],
|
|
143
|
-
[_LC]: [, output.headers[_xatlc]],
|
|
144
|
-
[_MSRH]: [() => void 0 !== output.headers[_xatsr], () => __strictParseInt32(output.headers[_xatsr])],
|
|
145
|
-
[_ME]: [, output.headers[_xatme]],
|
|
146
|
-
[_VN]: [, output.headers[_xatvn]],
|
|
147
|
-
[_SI]: [, output.headers[_xatsi]],
|
|
148
|
-
[_VFN]: [, output.headers[_xatvfn]],
|
|
149
|
-
[_VFM]: [, output.headers[_xatvfm]],
|
|
150
|
-
[_LMN]: [, output.headers[_xatlmn]],
|
|
151
|
-
[_IL]: [() => void 0 !== output.headers[_xatil], () => __parseBoolean(output.headers[_xatil])],
|
|
152
|
-
[_LO]: [, output.headers[_xatlo]],
|
|
153
|
-
[_PL]: [, output.headers[_xatpl]],
|
|
154
|
-
[_VNo]: [, output.headers[_xatvn_]],
|
|
155
|
-
[_VFNo]: [, output.headers[_xatvfn_]],
|
|
156
|
-
[_EPRS]: [() => void 0 !== output.headers[_xateprs], () => __parseBoolean(output.headers[_xateprs])],
|
|
157
|
-
[_PRS]: [, output.headers[_xatprs]],
|
|
158
|
-
[_CIT]: [, output.headers[_xatcit]],
|
|
159
|
-
[_CRT]: [, output.headers[_xatcrt]],
|
|
160
|
-
[_PET]: [, output.headers[_xatpet]],
|
|
161
|
-
});
|
|
162
|
-
const data = output.body;
|
|
163
|
-
contents.CallAnalyticsTranscriptResultStream = de_CallAnalyticsTranscriptResultStream(data, context);
|
|
164
|
-
return contents;
|
|
165
|
-
};
|
|
166
|
-
export const de_StartMedicalScribeStreamCommand = async (output, context) => {
|
|
167
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
168
|
-
return de_CommandError(output, context);
|
|
169
|
-
}
|
|
170
|
-
const contents = map({
|
|
171
|
-
$metadata: deserializeMetadata(output),
|
|
172
|
-
[_SI]: [, output.headers[_xatsi]],
|
|
173
|
-
[_RI]: [, output.headers[_xari]],
|
|
174
|
-
[_LC]: [, output.headers[_xatlc]],
|
|
175
|
-
[_MSRH]: [() => void 0 !== output.headers[_xatsr], () => __strictParseInt32(output.headers[_xatsr])],
|
|
176
|
-
[_ME]: [, output.headers[_xatme]],
|
|
177
|
-
});
|
|
178
|
-
const data = output.body;
|
|
179
|
-
contents.ResultStream = de_MedicalScribeResultStream(data, context);
|
|
180
|
-
return contents;
|
|
181
|
-
};
|
|
182
|
-
export const de_StartMedicalStreamTranscriptionCommand = async (output, context) => {
|
|
183
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
184
|
-
return de_CommandError(output, context);
|
|
185
|
-
}
|
|
186
|
-
const contents = map({
|
|
187
|
-
$metadata: deserializeMetadata(output),
|
|
188
|
-
[_RI]: [, output.headers[_xari]],
|
|
189
|
-
[_LC]: [, output.headers[_xatlc]],
|
|
190
|
-
[_MSRH]: [() => void 0 !== output.headers[_xatsr], () => __strictParseInt32(output.headers[_xatsr])],
|
|
191
|
-
[_ME]: [, output.headers[_xatme]],
|
|
192
|
-
[_VN]: [, output.headers[_xatvn]],
|
|
193
|
-
[_S]: [, output.headers[_xats]],
|
|
194
|
-
[_T]: [, output.headers[_xatt]],
|
|
195
|
-
[_SSL]: [() => void 0 !== output.headers[_xatssl], () => __parseBoolean(output.headers[_xatssl])],
|
|
196
|
-
[_SI]: [, output.headers[_xatsi]],
|
|
197
|
-
[_ECI]: [() => void 0 !== output.headers[_xateci], () => __parseBoolean(output.headers[_xateci])],
|
|
198
|
-
[_NOC]: [() => void 0 !== output.headers[_xatnoc], () => __strictParseInt32(output.headers[_xatnoc])],
|
|
199
|
-
[_CIT]: [, output.headers[_xatcit]],
|
|
200
|
-
});
|
|
201
|
-
const data = output.body;
|
|
202
|
-
contents.TranscriptResultStream = de_MedicalTranscriptResultStream(data, context);
|
|
203
|
-
return contents;
|
|
204
|
-
};
|
|
205
|
-
export const de_StartStreamTranscriptionCommand = async (output, context) => {
|
|
206
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
207
|
-
return de_CommandError(output, context);
|
|
208
|
-
}
|
|
209
|
-
const contents = map({
|
|
210
|
-
$metadata: deserializeMetadata(output),
|
|
211
|
-
[_RI]: [, output.headers[_xari]],
|
|
212
|
-
[_LC]: [, output.headers[_xatlc]],
|
|
213
|
-
[_MSRH]: [() => void 0 !== output.headers[_xatsr], () => __strictParseInt32(output.headers[_xatsr])],
|
|
214
|
-
[_ME]: [, output.headers[_xatme]],
|
|
215
|
-
[_VN]: [, output.headers[_xatvn]],
|
|
216
|
-
[_SI]: [, output.headers[_xatsi]],
|
|
217
|
-
[_VFN]: [, output.headers[_xatvfn]],
|
|
218
|
-
[_VFM]: [, output.headers[_xatvfm]],
|
|
219
|
-
[_SSL]: [() => void 0 !== output.headers[_xatssl], () => __parseBoolean(output.headers[_xatssl])],
|
|
220
|
-
[_ECI]: [() => void 0 !== output.headers[_xateci], () => __parseBoolean(output.headers[_xateci])],
|
|
221
|
-
[_NOC]: [() => void 0 !== output.headers[_xatnoc], () => __strictParseInt32(output.headers[_xatnoc])],
|
|
222
|
-
[_EPRS]: [() => void 0 !== output.headers[_xateprs], () => __parseBoolean(output.headers[_xateprs])],
|
|
223
|
-
[_PRS]: [, output.headers[_xatprs]],
|
|
224
|
-
[_CIT]: [, output.headers[_xatcit]],
|
|
225
|
-
[_CRT]: [, output.headers[_xatcrt]],
|
|
226
|
-
[_PET]: [, output.headers[_xatpet]],
|
|
227
|
-
[_LMN]: [, output.headers[_xatlmn]],
|
|
228
|
-
[_IL]: [() => void 0 !== output.headers[_xatil], () => __parseBoolean(output.headers[_xatil])],
|
|
229
|
-
[_LO]: [, output.headers[_xatlo]],
|
|
230
|
-
[_PL]: [, output.headers[_xatpl]],
|
|
231
|
-
[_IML]: [() => void 0 !== output.headers[_xatiml], () => __parseBoolean(output.headers[_xatiml])],
|
|
232
|
-
[_VNo]: [, output.headers[_xatvn_]],
|
|
233
|
-
[_VFNo]: [, output.headers[_xatvfn_]],
|
|
234
|
-
});
|
|
235
|
-
const data = output.body;
|
|
236
|
-
contents.TranscriptResultStream = de_TranscriptResultStream(data, context);
|
|
237
|
-
return contents;
|
|
238
|
-
};
|
|
239
|
-
const de_CommandError = async (output, context) => {
|
|
240
|
-
const parsedOutput = {
|
|
241
|
-
...output,
|
|
242
|
-
body: await parseErrorBody(output.body, context),
|
|
243
|
-
};
|
|
244
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
245
|
-
switch (errorCode) {
|
|
246
|
-
case "BadRequestException":
|
|
247
|
-
case "com.amazonaws.transcribestreaming#BadRequestException":
|
|
248
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
249
|
-
case "InternalFailureException":
|
|
250
|
-
case "com.amazonaws.transcribestreaming#InternalFailureException":
|
|
251
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
252
|
-
case "LimitExceededException":
|
|
253
|
-
case "com.amazonaws.transcribestreaming#LimitExceededException":
|
|
254
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
255
|
-
case "ResourceNotFoundException":
|
|
256
|
-
case "com.amazonaws.transcribestreaming#ResourceNotFoundException":
|
|
257
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
258
|
-
case "ConflictException":
|
|
259
|
-
case "com.amazonaws.transcribestreaming#ConflictException":
|
|
260
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
261
|
-
case "ServiceUnavailableException":
|
|
262
|
-
case "com.amazonaws.transcribestreaming#ServiceUnavailableException":
|
|
263
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
264
|
-
default:
|
|
265
|
-
const parsedBody = parsedOutput.body;
|
|
266
|
-
return throwDefaultError({
|
|
267
|
-
output,
|
|
268
|
-
parsedBody,
|
|
269
|
-
errorCode,
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
274
|
-
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
275
|
-
const contents = map({});
|
|
276
|
-
const data = parsedOutput.body;
|
|
277
|
-
const doc = take(data, {
|
|
278
|
-
Message: __expectString,
|
|
279
|
-
});
|
|
280
|
-
Object.assign(contents, doc);
|
|
281
|
-
const exception = new BadRequestException({
|
|
282
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
283
|
-
...contents,
|
|
284
|
-
});
|
|
285
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
286
|
-
};
|
|
287
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
288
|
-
const contents = map({});
|
|
289
|
-
const data = parsedOutput.body;
|
|
290
|
-
const doc = take(data, {
|
|
291
|
-
Message: __expectString,
|
|
292
|
-
});
|
|
293
|
-
Object.assign(contents, doc);
|
|
294
|
-
const exception = new ConflictException({
|
|
295
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
296
|
-
...contents,
|
|
297
|
-
});
|
|
298
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
299
|
-
};
|
|
300
|
-
const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
301
|
-
const contents = map({});
|
|
302
|
-
const data = parsedOutput.body;
|
|
303
|
-
const doc = take(data, {
|
|
304
|
-
Message: __expectString,
|
|
305
|
-
});
|
|
306
|
-
Object.assign(contents, doc);
|
|
307
|
-
const exception = new InternalFailureException({
|
|
308
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
309
|
-
...contents,
|
|
310
|
-
});
|
|
311
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
312
|
-
};
|
|
313
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
314
|
-
const contents = map({});
|
|
315
|
-
const data = parsedOutput.body;
|
|
316
|
-
const doc = take(data, {
|
|
317
|
-
Message: __expectString,
|
|
318
|
-
});
|
|
319
|
-
Object.assign(contents, doc);
|
|
320
|
-
const exception = new LimitExceededException({
|
|
321
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
322
|
-
...contents,
|
|
323
|
-
});
|
|
324
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
325
|
-
};
|
|
326
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
327
|
-
const contents = map({});
|
|
328
|
-
const data = parsedOutput.body;
|
|
329
|
-
const doc = take(data, {
|
|
330
|
-
Message: __expectString,
|
|
331
|
-
});
|
|
332
|
-
Object.assign(contents, doc);
|
|
333
|
-
const exception = new ResourceNotFoundException({
|
|
334
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
335
|
-
...contents,
|
|
336
|
-
});
|
|
337
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
338
|
-
};
|
|
339
|
-
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
340
|
-
const contents = map({});
|
|
341
|
-
const data = parsedOutput.body;
|
|
342
|
-
const doc = take(data, {
|
|
343
|
-
Message: __expectString,
|
|
344
|
-
});
|
|
345
|
-
Object.assign(contents, doc);
|
|
346
|
-
const exception = new ServiceUnavailableException({
|
|
347
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
348
|
-
...contents,
|
|
349
|
-
});
|
|
350
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
351
|
-
};
|
|
352
|
-
const se_AudioStream = (input, context) => {
|
|
353
|
-
const eventMarshallingVisitor = (event) => AudioStream.visit(event, {
|
|
354
|
-
AudioEvent: (value) => se_AudioEvent_event(value, context),
|
|
355
|
-
ConfigurationEvent: (value) => se_ConfigurationEvent_event(value, context),
|
|
356
|
-
_: (value) => value,
|
|
357
|
-
});
|
|
358
|
-
return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
|
|
359
|
-
};
|
|
360
|
-
const se_MedicalScribeInputStream = (input, context) => {
|
|
361
|
-
const eventMarshallingVisitor = (event) => MedicalScribeInputStream.visit(event, {
|
|
362
|
-
AudioEvent: (value) => se_MedicalScribeAudioEvent_event(value, context),
|
|
363
|
-
SessionControlEvent: (value) => se_MedicalScribeSessionControlEvent_event(value, context),
|
|
364
|
-
ConfigurationEvent: (value) => se_MedicalScribeConfigurationEvent_event(value, context),
|
|
365
|
-
_: (value) => value,
|
|
366
|
-
});
|
|
367
|
-
return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
|
|
368
|
-
};
|
|
369
|
-
const se_AudioEvent_event = (input, context) => {
|
|
370
|
-
const headers = {
|
|
371
|
-
":event-type": { type: "string", value: "AudioEvent" },
|
|
372
|
-
":message-type": { type: "string", value: "event" },
|
|
373
|
-
":content-type": { type: "string", value: "application/octet-stream" },
|
|
374
|
-
};
|
|
375
|
-
let body = new Uint8Array();
|
|
376
|
-
if (input.AudioChunk != null) {
|
|
377
|
-
body = input.AudioChunk;
|
|
378
|
-
}
|
|
379
|
-
return { headers, body };
|
|
380
|
-
};
|
|
381
|
-
const se_ConfigurationEvent_event = (input, context) => {
|
|
382
|
-
const headers = {
|
|
383
|
-
":event-type": { type: "string", value: "ConfigurationEvent" },
|
|
384
|
-
":message-type": { type: "string", value: "event" },
|
|
385
|
-
":content-type": { type: "string", value: "application/json" },
|
|
386
|
-
};
|
|
387
|
-
let body = new Uint8Array();
|
|
388
|
-
body = _json(input);
|
|
389
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
390
|
-
return { headers, body };
|
|
391
|
-
};
|
|
392
|
-
const se_MedicalScribeAudioEvent_event = (input, context) => {
|
|
393
|
-
const headers = {
|
|
394
|
-
":event-type": { type: "string", value: "AudioEvent" },
|
|
395
|
-
":message-type": { type: "string", value: "event" },
|
|
396
|
-
":content-type": { type: "string", value: "application/octet-stream" },
|
|
397
|
-
};
|
|
398
|
-
let body = new Uint8Array();
|
|
399
|
-
if (input.AudioChunk != null) {
|
|
400
|
-
body = input.AudioChunk;
|
|
401
|
-
}
|
|
402
|
-
return { headers, body };
|
|
403
|
-
};
|
|
404
|
-
const se_MedicalScribeConfigurationEvent_event = (input, context) => {
|
|
405
|
-
const headers = {
|
|
406
|
-
":event-type": { type: "string", value: "ConfigurationEvent" },
|
|
407
|
-
":message-type": { type: "string", value: "event" },
|
|
408
|
-
":content-type": { type: "string", value: "application/json" },
|
|
409
|
-
};
|
|
410
|
-
let body = new Uint8Array();
|
|
411
|
-
body = _json(input);
|
|
412
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
413
|
-
return { headers, body };
|
|
414
|
-
};
|
|
415
|
-
const se_MedicalScribeSessionControlEvent_event = (input, context) => {
|
|
416
|
-
const headers = {
|
|
417
|
-
":event-type": { type: "string", value: "SessionControlEvent" },
|
|
418
|
-
":message-type": { type: "string", value: "event" },
|
|
419
|
-
":content-type": { type: "string", value: "application/json" },
|
|
420
|
-
};
|
|
421
|
-
let body = new Uint8Array();
|
|
422
|
-
body = _json(input);
|
|
423
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
424
|
-
return { headers, body };
|
|
425
|
-
};
|
|
426
|
-
const de_CallAnalyticsTranscriptResultStream = (output, context) => {
|
|
427
|
-
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
428
|
-
if (event["UtteranceEvent"] != null) {
|
|
429
|
-
return {
|
|
430
|
-
UtteranceEvent: await de_UtteranceEvent_event(event["UtteranceEvent"], context),
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
if (event["CategoryEvent"] != null) {
|
|
434
|
-
return {
|
|
435
|
-
CategoryEvent: await de_CategoryEvent_event(event["CategoryEvent"], context),
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
|
-
if (event["BadRequestException"] != null) {
|
|
439
|
-
return {
|
|
440
|
-
BadRequestException: await de_BadRequestException_event(event["BadRequestException"], context),
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
if (event["LimitExceededException"] != null) {
|
|
444
|
-
return {
|
|
445
|
-
LimitExceededException: await de_LimitExceededException_event(event["LimitExceededException"], context),
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
if (event["InternalFailureException"] != null) {
|
|
449
|
-
return {
|
|
450
|
-
InternalFailureException: await de_InternalFailureException_event(event["InternalFailureException"], context),
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
if (event["ConflictException"] != null) {
|
|
454
|
-
return {
|
|
455
|
-
ConflictException: await de_ConflictException_event(event["ConflictException"], context),
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
if (event["ServiceUnavailableException"] != null) {
|
|
459
|
-
return {
|
|
460
|
-
ServiceUnavailableException: await de_ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
return { $unknown: event };
|
|
464
|
-
});
|
|
465
|
-
};
|
|
466
|
-
const de_MedicalScribeResultStream = (output, context) => {
|
|
467
|
-
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
468
|
-
if (event["TranscriptEvent"] != null) {
|
|
469
|
-
return {
|
|
470
|
-
TranscriptEvent: await de_MedicalScribeTranscriptEvent_event(event["TranscriptEvent"], context),
|
|
471
|
-
};
|
|
472
|
-
}
|
|
473
|
-
if (event["BadRequestException"] != null) {
|
|
474
|
-
return {
|
|
475
|
-
BadRequestException: await de_BadRequestException_event(event["BadRequestException"], context),
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
if (event["LimitExceededException"] != null) {
|
|
479
|
-
return {
|
|
480
|
-
LimitExceededException: await de_LimitExceededException_event(event["LimitExceededException"], context),
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
if (event["InternalFailureException"] != null) {
|
|
484
|
-
return {
|
|
485
|
-
InternalFailureException: await de_InternalFailureException_event(event["InternalFailureException"], context),
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
if (event["ConflictException"] != null) {
|
|
489
|
-
return {
|
|
490
|
-
ConflictException: await de_ConflictException_event(event["ConflictException"], context),
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
if (event["ServiceUnavailableException"] != null) {
|
|
494
|
-
return {
|
|
495
|
-
ServiceUnavailableException: await de_ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
return { $unknown: event };
|
|
499
|
-
});
|
|
500
|
-
};
|
|
501
|
-
const de_MedicalTranscriptResultStream = (output, context) => {
|
|
502
|
-
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
503
|
-
if (event["TranscriptEvent"] != null) {
|
|
504
|
-
return {
|
|
505
|
-
TranscriptEvent: await de_MedicalTranscriptEvent_event(event["TranscriptEvent"], context),
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
if (event["BadRequestException"] != null) {
|
|
509
|
-
return {
|
|
510
|
-
BadRequestException: await de_BadRequestException_event(event["BadRequestException"], context),
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
|
-
if (event["LimitExceededException"] != null) {
|
|
514
|
-
return {
|
|
515
|
-
LimitExceededException: await de_LimitExceededException_event(event["LimitExceededException"], context),
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
if (event["InternalFailureException"] != null) {
|
|
519
|
-
return {
|
|
520
|
-
InternalFailureException: await de_InternalFailureException_event(event["InternalFailureException"], context),
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
if (event["ConflictException"] != null) {
|
|
524
|
-
return {
|
|
525
|
-
ConflictException: await de_ConflictException_event(event["ConflictException"], context),
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
if (event["ServiceUnavailableException"] != null) {
|
|
529
|
-
return {
|
|
530
|
-
ServiceUnavailableException: await de_ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
return { $unknown: event };
|
|
534
|
-
});
|
|
535
|
-
};
|
|
536
|
-
const de_TranscriptResultStream = (output, context) => {
|
|
537
|
-
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
538
|
-
if (event["TranscriptEvent"] != null) {
|
|
539
|
-
return {
|
|
540
|
-
TranscriptEvent: await de_TranscriptEvent_event(event["TranscriptEvent"], context),
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
if (event["BadRequestException"] != null) {
|
|
544
|
-
return {
|
|
545
|
-
BadRequestException: await de_BadRequestException_event(event["BadRequestException"], context),
|
|
546
|
-
};
|
|
547
|
-
}
|
|
548
|
-
if (event["LimitExceededException"] != null) {
|
|
549
|
-
return {
|
|
550
|
-
LimitExceededException: await de_LimitExceededException_event(event["LimitExceededException"], context),
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
if (event["InternalFailureException"] != null) {
|
|
554
|
-
return {
|
|
555
|
-
InternalFailureException: await de_InternalFailureException_event(event["InternalFailureException"], context),
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
if (event["ConflictException"] != null) {
|
|
559
|
-
return {
|
|
560
|
-
ConflictException: await de_ConflictException_event(event["ConflictException"], context),
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
if (event["ServiceUnavailableException"] != null) {
|
|
564
|
-
return {
|
|
565
|
-
ServiceUnavailableException: await de_ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
return { $unknown: event };
|
|
569
|
-
});
|
|
570
|
-
};
|
|
571
|
-
const de_BadRequestException_event = async (output, context) => {
|
|
572
|
-
const parsedOutput = {
|
|
573
|
-
...output,
|
|
574
|
-
body: await parseBody(output.body, context),
|
|
575
|
-
};
|
|
576
|
-
return de_BadRequestExceptionRes(parsedOutput, context);
|
|
577
|
-
};
|
|
578
|
-
const de_CategoryEvent_event = async (output, context) => {
|
|
579
|
-
const contents = {};
|
|
580
|
-
const data = await parseBody(output.body, context);
|
|
581
|
-
Object.assign(contents, _json(data));
|
|
582
|
-
return contents;
|
|
583
|
-
};
|
|
584
|
-
const de_ConflictException_event = async (output, context) => {
|
|
585
|
-
const parsedOutput = {
|
|
586
|
-
...output,
|
|
587
|
-
body: await parseBody(output.body, context),
|
|
588
|
-
};
|
|
589
|
-
return de_ConflictExceptionRes(parsedOutput, context);
|
|
590
|
-
};
|
|
591
|
-
const de_InternalFailureException_event = async (output, context) => {
|
|
592
|
-
const parsedOutput = {
|
|
593
|
-
...output,
|
|
594
|
-
body: await parseBody(output.body, context),
|
|
595
|
-
};
|
|
596
|
-
return de_InternalFailureExceptionRes(parsedOutput, context);
|
|
597
|
-
};
|
|
598
|
-
const de_LimitExceededException_event = async (output, context) => {
|
|
599
|
-
const parsedOutput = {
|
|
600
|
-
...output,
|
|
601
|
-
body: await parseBody(output.body, context),
|
|
602
|
-
};
|
|
603
|
-
return de_LimitExceededExceptionRes(parsedOutput, context);
|
|
604
|
-
};
|
|
605
|
-
const de_MedicalScribeTranscriptEvent_event = async (output, context) => {
|
|
606
|
-
const contents = {};
|
|
607
|
-
const data = await parseBody(output.body, context);
|
|
608
|
-
Object.assign(contents, de_MedicalScribeTranscriptEvent(data, context));
|
|
609
|
-
return contents;
|
|
610
|
-
};
|
|
611
|
-
const de_MedicalTranscriptEvent_event = async (output, context) => {
|
|
612
|
-
const contents = {};
|
|
613
|
-
const data = await parseBody(output.body, context);
|
|
614
|
-
Object.assign(contents, de_MedicalTranscriptEvent(data, context));
|
|
615
|
-
return contents;
|
|
616
|
-
};
|
|
617
|
-
const de_ServiceUnavailableException_event = async (output, context) => {
|
|
618
|
-
const parsedOutput = {
|
|
619
|
-
...output,
|
|
620
|
-
body: await parseBody(output.body, context),
|
|
621
|
-
};
|
|
622
|
-
return de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
623
|
-
};
|
|
624
|
-
const de_TranscriptEvent_event = async (output, context) => {
|
|
625
|
-
const contents = {};
|
|
626
|
-
const data = await parseBody(output.body, context);
|
|
627
|
-
Object.assign(contents, de_TranscriptEvent(data, context));
|
|
628
|
-
return contents;
|
|
629
|
-
};
|
|
630
|
-
const de_UtteranceEvent_event = async (output, context) => {
|
|
631
|
-
const contents = {};
|
|
632
|
-
const data = await parseBody(output.body, context);
|
|
633
|
-
Object.assign(contents, de_UtteranceEvent(data, context));
|
|
634
|
-
return contents;
|
|
635
|
-
};
|
|
636
|
-
const de_Alternative = (output, context) => {
|
|
637
|
-
return take(output, {
|
|
638
|
-
Entities: (_) => de_EntityList(_, context),
|
|
639
|
-
Items: (_) => de_ItemList(_, context),
|
|
640
|
-
Transcript: __expectString,
|
|
641
|
-
});
|
|
642
|
-
};
|
|
643
|
-
const de_AlternativeList = (output, context) => {
|
|
644
|
-
const retVal = (output || [])
|
|
645
|
-
.filter((e) => e != null)
|
|
646
|
-
.map((entry) => {
|
|
647
|
-
return de_Alternative(entry, context);
|
|
648
|
-
});
|
|
649
|
-
return retVal;
|
|
650
|
-
};
|
|
651
|
-
const de_CallAnalyticsEntity = (output, context) => {
|
|
652
|
-
return take(output, {
|
|
653
|
-
BeginOffsetMillis: __expectLong,
|
|
654
|
-
Category: __expectString,
|
|
655
|
-
Confidence: __limitedParseDouble,
|
|
656
|
-
Content: __expectString,
|
|
657
|
-
EndOffsetMillis: __expectLong,
|
|
658
|
-
Type: __expectString,
|
|
659
|
-
});
|
|
660
|
-
};
|
|
661
|
-
const de_CallAnalyticsEntityList = (output, context) => {
|
|
662
|
-
const retVal = (output || [])
|
|
663
|
-
.filter((e) => e != null)
|
|
664
|
-
.map((entry) => {
|
|
665
|
-
return de_CallAnalyticsEntity(entry, context);
|
|
666
|
-
});
|
|
667
|
-
return retVal;
|
|
668
|
-
};
|
|
669
|
-
const de_CallAnalyticsItem = (output, context) => {
|
|
670
|
-
return take(output, {
|
|
671
|
-
BeginOffsetMillis: __expectLong,
|
|
672
|
-
Confidence: __limitedParseDouble,
|
|
673
|
-
Content: __expectString,
|
|
674
|
-
EndOffsetMillis: __expectLong,
|
|
675
|
-
Stable: __expectBoolean,
|
|
676
|
-
Type: __expectString,
|
|
677
|
-
VocabularyFilterMatch: __expectBoolean,
|
|
678
|
-
});
|
|
679
|
-
};
|
|
680
|
-
const de_CallAnalyticsItemList = (output, context) => {
|
|
681
|
-
const retVal = (output || [])
|
|
682
|
-
.filter((e) => e != null)
|
|
683
|
-
.map((entry) => {
|
|
684
|
-
return de_CallAnalyticsItem(entry, context);
|
|
685
|
-
});
|
|
686
|
-
return retVal;
|
|
687
|
-
};
|
|
688
|
-
const de_CallAnalyticsLanguageIdentification = (output, context) => {
|
|
689
|
-
const retVal = (output || [])
|
|
690
|
-
.filter((e) => e != null)
|
|
691
|
-
.map((entry) => {
|
|
692
|
-
return de_CallAnalyticsLanguageWithScore(entry, context);
|
|
693
|
-
});
|
|
694
|
-
return retVal;
|
|
695
|
-
};
|
|
696
|
-
const de_CallAnalyticsLanguageWithScore = (output, context) => {
|
|
697
|
-
return take(output, {
|
|
698
|
-
LanguageCode: __expectString,
|
|
699
|
-
Score: __limitedParseDouble,
|
|
700
|
-
});
|
|
701
|
-
};
|
|
702
|
-
const de_Entity = (output, context) => {
|
|
703
|
-
return take(output, {
|
|
704
|
-
Category: __expectString,
|
|
705
|
-
Confidence: __limitedParseDouble,
|
|
706
|
-
Content: __expectString,
|
|
707
|
-
EndTime: __limitedParseDouble,
|
|
708
|
-
StartTime: __limitedParseDouble,
|
|
709
|
-
Type: __expectString,
|
|
710
|
-
});
|
|
711
|
-
};
|
|
712
|
-
const de_EntityList = (output, context) => {
|
|
713
|
-
const retVal = (output || [])
|
|
714
|
-
.filter((e) => e != null)
|
|
715
|
-
.map((entry) => {
|
|
716
|
-
return de_Entity(entry, context);
|
|
717
|
-
});
|
|
718
|
-
return retVal;
|
|
719
|
-
};
|
|
720
|
-
const de_Item = (output, context) => {
|
|
721
|
-
return take(output, {
|
|
722
|
-
Confidence: __limitedParseDouble,
|
|
723
|
-
Content: __expectString,
|
|
724
|
-
EndTime: __limitedParseDouble,
|
|
725
|
-
Speaker: __expectString,
|
|
726
|
-
Stable: __expectBoolean,
|
|
727
|
-
StartTime: __limitedParseDouble,
|
|
728
|
-
Type: __expectString,
|
|
729
|
-
VocabularyFilterMatch: __expectBoolean,
|
|
730
|
-
});
|
|
731
|
-
};
|
|
732
|
-
const de_ItemList = (output, context) => {
|
|
733
|
-
const retVal = (output || [])
|
|
734
|
-
.filter((e) => e != null)
|
|
735
|
-
.map((entry) => {
|
|
736
|
-
return de_Item(entry, context);
|
|
737
|
-
});
|
|
738
|
-
return retVal;
|
|
739
|
-
};
|
|
740
|
-
const de_LanguageIdentification = (output, context) => {
|
|
741
|
-
const retVal = (output || [])
|
|
742
|
-
.filter((e) => e != null)
|
|
743
|
-
.map((entry) => {
|
|
744
|
-
return de_LanguageWithScore(entry, context);
|
|
745
|
-
});
|
|
746
|
-
return retVal;
|
|
747
|
-
};
|
|
748
|
-
const de_LanguageWithScore = (output, context) => {
|
|
749
|
-
return take(output, {
|
|
750
|
-
LanguageCode: __expectString,
|
|
751
|
-
Score: __limitedParseDouble,
|
|
752
|
-
});
|
|
753
|
-
};
|
|
754
|
-
const de_MedicalAlternative = (output, context) => {
|
|
755
|
-
return take(output, {
|
|
756
|
-
Entities: (_) => de_MedicalEntityList(_, context),
|
|
757
|
-
Items: (_) => de_MedicalItemList(_, context),
|
|
758
|
-
Transcript: __expectString,
|
|
759
|
-
});
|
|
760
|
-
};
|
|
761
|
-
const de_MedicalAlternativeList = (output, context) => {
|
|
762
|
-
const retVal = (output || [])
|
|
763
|
-
.filter((e) => e != null)
|
|
764
|
-
.map((entry) => {
|
|
765
|
-
return de_MedicalAlternative(entry, context);
|
|
766
|
-
});
|
|
767
|
-
return retVal;
|
|
768
|
-
};
|
|
769
|
-
const de_MedicalEntity = (output, context) => {
|
|
770
|
-
return take(output, {
|
|
771
|
-
Category: __expectString,
|
|
772
|
-
Confidence: __limitedParseDouble,
|
|
773
|
-
Content: __expectString,
|
|
774
|
-
EndTime: __limitedParseDouble,
|
|
775
|
-
StartTime: __limitedParseDouble,
|
|
776
|
-
});
|
|
777
|
-
};
|
|
778
|
-
const de_MedicalEntityList = (output, context) => {
|
|
779
|
-
const retVal = (output || [])
|
|
780
|
-
.filter((e) => e != null)
|
|
781
|
-
.map((entry) => {
|
|
782
|
-
return de_MedicalEntity(entry, context);
|
|
783
|
-
});
|
|
784
|
-
return retVal;
|
|
785
|
-
};
|
|
786
|
-
const de_MedicalItem = (output, context) => {
|
|
787
|
-
return take(output, {
|
|
788
|
-
Confidence: __limitedParseDouble,
|
|
789
|
-
Content: __expectString,
|
|
790
|
-
EndTime: __limitedParseDouble,
|
|
791
|
-
Speaker: __expectString,
|
|
792
|
-
StartTime: __limitedParseDouble,
|
|
793
|
-
Type: __expectString,
|
|
794
|
-
});
|
|
795
|
-
};
|
|
796
|
-
const de_MedicalItemList = (output, context) => {
|
|
797
|
-
const retVal = (output || [])
|
|
798
|
-
.filter((e) => e != null)
|
|
799
|
-
.map((entry) => {
|
|
800
|
-
return de_MedicalItem(entry, context);
|
|
801
|
-
});
|
|
802
|
-
return retVal;
|
|
803
|
-
};
|
|
804
|
-
const de_MedicalResult = (output, context) => {
|
|
805
|
-
return take(output, {
|
|
806
|
-
Alternatives: (_) => de_MedicalAlternativeList(_, context),
|
|
807
|
-
ChannelId: __expectString,
|
|
808
|
-
EndTime: __limitedParseDouble,
|
|
809
|
-
IsPartial: __expectBoolean,
|
|
810
|
-
ResultId: __expectString,
|
|
811
|
-
StartTime: __limitedParseDouble,
|
|
812
|
-
});
|
|
813
|
-
};
|
|
814
|
-
const de_MedicalResultList = (output, context) => {
|
|
815
|
-
const retVal = (output || [])
|
|
816
|
-
.filter((e) => e != null)
|
|
817
|
-
.map((entry) => {
|
|
818
|
-
return de_MedicalResult(entry, context);
|
|
819
|
-
});
|
|
820
|
-
return retVal;
|
|
821
|
-
};
|
|
822
|
-
const de_MedicalScribeStreamDetails = (output, context) => {
|
|
823
|
-
return take(output, {
|
|
824
|
-
ChannelDefinitions: _json,
|
|
825
|
-
EncryptionSettings: _json,
|
|
826
|
-
LanguageCode: __expectString,
|
|
827
|
-
MediaEncoding: __expectString,
|
|
828
|
-
MediaSampleRateHertz: __expectInt32,
|
|
829
|
-
MedicalScribeContextProvided: __expectBoolean,
|
|
830
|
-
PostStreamAnalyticsResult: _json,
|
|
831
|
-
PostStreamAnalyticsSettings: _json,
|
|
832
|
-
ResourceAccessRoleArn: __expectString,
|
|
833
|
-
SessionId: __expectString,
|
|
834
|
-
StreamCreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
835
|
-
StreamEndedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
836
|
-
StreamStatus: __expectString,
|
|
837
|
-
VocabularyFilterMethod: __expectString,
|
|
838
|
-
VocabularyFilterName: __expectString,
|
|
839
|
-
VocabularyName: __expectString,
|
|
840
|
-
});
|
|
841
|
-
};
|
|
842
|
-
const de_MedicalScribeTranscriptEvent = (output, context) => {
|
|
843
|
-
return take(output, {
|
|
844
|
-
TranscriptSegment: (_) => de_MedicalScribeTranscriptSegment(_, context),
|
|
845
|
-
});
|
|
846
|
-
};
|
|
847
|
-
const de_MedicalScribeTranscriptItem = (output, context) => {
|
|
848
|
-
return take(output, {
|
|
849
|
-
BeginAudioTime: __limitedParseDouble,
|
|
850
|
-
Confidence: __limitedParseDouble,
|
|
851
|
-
Content: __expectString,
|
|
852
|
-
EndAudioTime: __limitedParseDouble,
|
|
853
|
-
Type: __expectString,
|
|
854
|
-
VocabularyFilterMatch: __expectBoolean,
|
|
855
|
-
});
|
|
856
|
-
};
|
|
857
|
-
const de_MedicalScribeTranscriptItemList = (output, context) => {
|
|
858
|
-
const retVal = (output || [])
|
|
859
|
-
.filter((e) => e != null)
|
|
860
|
-
.map((entry) => {
|
|
861
|
-
return de_MedicalScribeTranscriptItem(entry, context);
|
|
862
|
-
});
|
|
863
|
-
return retVal;
|
|
864
|
-
};
|
|
865
|
-
const de_MedicalScribeTranscriptSegment = (output, context) => {
|
|
866
|
-
return take(output, {
|
|
867
|
-
BeginAudioTime: __limitedParseDouble,
|
|
868
|
-
ChannelId: __expectString,
|
|
869
|
-
Content: __expectString,
|
|
870
|
-
EndAudioTime: __limitedParseDouble,
|
|
871
|
-
IsPartial: __expectBoolean,
|
|
872
|
-
Items: (_) => de_MedicalScribeTranscriptItemList(_, context),
|
|
873
|
-
SegmentId: __expectString,
|
|
874
|
-
});
|
|
875
|
-
};
|
|
876
|
-
const de_MedicalTranscript = (output, context) => {
|
|
877
|
-
return take(output, {
|
|
878
|
-
Results: (_) => de_MedicalResultList(_, context),
|
|
879
|
-
});
|
|
880
|
-
};
|
|
881
|
-
const de_MedicalTranscriptEvent = (output, context) => {
|
|
882
|
-
return take(output, {
|
|
883
|
-
Transcript: (_) => de_MedicalTranscript(_, context),
|
|
884
|
-
});
|
|
885
|
-
};
|
|
886
|
-
const de_Result = (output, context) => {
|
|
887
|
-
return take(output, {
|
|
888
|
-
Alternatives: (_) => de_AlternativeList(_, context),
|
|
889
|
-
ChannelId: __expectString,
|
|
890
|
-
EndTime: __limitedParseDouble,
|
|
891
|
-
IsPartial: __expectBoolean,
|
|
892
|
-
LanguageCode: __expectString,
|
|
893
|
-
LanguageIdentification: (_) => de_LanguageIdentification(_, context),
|
|
894
|
-
ResultId: __expectString,
|
|
895
|
-
StartTime: __limitedParseDouble,
|
|
896
|
-
});
|
|
897
|
-
};
|
|
898
|
-
const de_ResultList = (output, context) => {
|
|
899
|
-
const retVal = (output || [])
|
|
900
|
-
.filter((e) => e != null)
|
|
901
|
-
.map((entry) => {
|
|
902
|
-
return de_Result(entry, context);
|
|
903
|
-
});
|
|
904
|
-
return retVal;
|
|
905
|
-
};
|
|
906
|
-
const de_Transcript = (output, context) => {
|
|
907
|
-
return take(output, {
|
|
908
|
-
Results: (_) => de_ResultList(_, context),
|
|
909
|
-
});
|
|
910
|
-
};
|
|
911
|
-
const de_TranscriptEvent = (output, context) => {
|
|
912
|
-
return take(output, {
|
|
913
|
-
Transcript: (_) => de_Transcript(_, context),
|
|
914
|
-
});
|
|
915
|
-
};
|
|
916
|
-
const de_UtteranceEvent = (output, context) => {
|
|
917
|
-
return take(output, {
|
|
918
|
-
BeginOffsetMillis: __expectLong,
|
|
919
|
-
EndOffsetMillis: __expectLong,
|
|
920
|
-
Entities: (_) => de_CallAnalyticsEntityList(_, context),
|
|
921
|
-
IsPartial: __expectBoolean,
|
|
922
|
-
IssuesDetected: _json,
|
|
923
|
-
Items: (_) => de_CallAnalyticsItemList(_, context),
|
|
924
|
-
LanguageCode: __expectString,
|
|
925
|
-
LanguageIdentification: (_) => de_CallAnalyticsLanguageIdentification(_, context),
|
|
926
|
-
ParticipantRole: __expectString,
|
|
927
|
-
Sentiment: __expectString,
|
|
928
|
-
Transcript: __expectString,
|
|
929
|
-
UtteranceId: __expectString,
|
|
930
|
-
});
|
|
931
|
-
};
|
|
932
|
-
const deserializeMetadata = (output) => ({
|
|
933
|
-
httpStatusCode: output.statusCode,
|
|
934
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
935
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
936
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
937
|
-
});
|
|
938
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
939
|
-
const _CIT = "ContentIdentificationType";
|
|
940
|
-
const _CRT = "ContentRedactionType";
|
|
941
|
-
const _ECI = "EnableChannelIdentification";
|
|
942
|
-
const _EPRS = "EnablePartialResultsStabilization";
|
|
943
|
-
const _IL = "IdentifyLanguage";
|
|
944
|
-
const _IML = "IdentifyMultipleLanguages";
|
|
945
|
-
const _LC = "LanguageCode";
|
|
946
|
-
const _LMN = "LanguageModelName";
|
|
947
|
-
const _LO = "LanguageOptions";
|
|
948
|
-
const _ME = "MediaEncoding";
|
|
949
|
-
const _MSRH = "MediaSampleRateHertz";
|
|
950
|
-
const _NOC = "NumberOfChannels";
|
|
951
|
-
const _PET = "PiiEntityTypes";
|
|
952
|
-
const _PL = "PreferredLanguage";
|
|
953
|
-
const _PRS = "PartialResultsStability";
|
|
954
|
-
const _RI = "RequestId";
|
|
955
|
-
const _S = "Specialty";
|
|
956
|
-
const _SI = "SessionId";
|
|
957
|
-
const _SSL = "ShowSpeakerLabel";
|
|
958
|
-
const _T = "Type";
|
|
959
|
-
const _VFM = "VocabularyFilterMethod";
|
|
960
|
-
const _VFN = "VocabularyFilterName";
|
|
961
|
-
const _VFNo = "VocabularyFilterNames";
|
|
962
|
-
const _VN = "VocabularyName";
|
|
963
|
-
const _VNo = "VocabularyNames";
|
|
964
|
-
const _xari = "x-amzn-request-id";
|
|
965
|
-
const _xatcit = "x-amzn-transcribe-content-identification-type";
|
|
966
|
-
const _xatcrt = "x-amzn-transcribe-content-redaction-type";
|
|
967
|
-
const _xateci = "x-amzn-transcribe-enable-channel-identification";
|
|
968
|
-
const _xateprs = "x-amzn-transcribe-enable-partial-results-stabilization";
|
|
969
|
-
const _xatil = "x-amzn-transcribe-identify-language";
|
|
970
|
-
const _xatiml = "x-amzn-transcribe-identify-multiple-languages";
|
|
971
|
-
const _xatlc = "x-amzn-transcribe-language-code";
|
|
972
|
-
const _xatlmn = "x-amzn-transcribe-language-model-name";
|
|
973
|
-
const _xatlo = "x-amzn-transcribe-language-options";
|
|
974
|
-
const _xatme = "x-amzn-transcribe-media-encoding";
|
|
975
|
-
const _xatnoc = "x-amzn-transcribe-number-of-channels";
|
|
976
|
-
const _xatpet = "x-amzn-transcribe-pii-entity-types";
|
|
977
|
-
const _xatpl = "x-amzn-transcribe-preferred-language";
|
|
978
|
-
const _xatprs = "x-amzn-transcribe-partial-results-stability";
|
|
979
|
-
const _xats = "x-amzn-transcribe-specialty";
|
|
980
|
-
const _xatsi = "x-amzn-transcribe-session-id";
|
|
981
|
-
const _xatsr = "x-amzn-transcribe-sample-rate";
|
|
982
|
-
const _xatssl = "x-amzn-transcribe-show-speaker-label";
|
|
983
|
-
const _xatt = "x-amzn-transcribe-type";
|
|
984
|
-
const _xatvfm = "x-amzn-transcribe-vocabulary-filter-method";
|
|
985
|
-
const _xatvfn = "x-amzn-transcribe-vocabulary-filter-name";
|
|
986
|
-
const _xatvfn_ = "x-amzn-transcribe-vocabulary-filter-names";
|
|
987
|
-
const _xatvn = "x-amzn-transcribe-vocabulary-name";
|
|
988
|
-
const _xatvn_ = "x-amzn-transcribe-vocabulary-names";
|