@aws-sdk/client-transcribe-streaming 3.30.0 → 3.34.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/CHANGELOG.md +38 -0
- package/TranscribeStreaming.ts +3 -2
- package/commands/StartStreamTranscriptionCommand.ts +3 -2
- package/dist/cjs/TranscribeStreaming.js.map +1 -1
- package/dist/cjs/TranscribeStreamingClient.js +17 -17
- package/dist/cjs/TranscribeStreamingClient.js.map +1 -1
- package/dist/cjs/commands/StartMedicalStreamTranscriptionCommand.js +4 -4
- package/dist/cjs/commands/StartMedicalStreamTranscriptionCommand.js.map +1 -1
- package/dist/cjs/commands/StartStreamTranscriptionCommand.js +7 -6
- package/dist/cjs/commands/StartStreamTranscriptionCommand.js.map +1 -1
- package/dist/cjs/endpoints.js +23 -2
- package/dist/cjs/endpoints.js.map +1 -1
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/models/index.js +1 -1
- package/dist/cjs/models/index.js.map +1 -1
- package/dist/cjs/models/models_0.js +18 -1
- package/dist/cjs/models/models_0.js.map +1 -1
- package/dist/cjs/package.json +47 -47
- package/dist/cjs/protocols/Aws_restJson1.js +94 -50
- package/dist/cjs/protocols/Aws_restJson1.js.map +1 -1
- package/dist/cjs/runtimeConfig.browser.js +4 -4
- package/dist/cjs/runtimeConfig.browser.js.map +1 -1
- package/dist/cjs/runtimeConfig.js +8 -8
- package/dist/cjs/runtimeConfig.js.map +1 -1
- package/dist/cjs/runtimeConfig.native.js +1 -1
- package/dist/cjs/runtimeConfig.native.js.map +1 -1
- package/dist/cjs/test/index.integ.spec.js +1 -1
- package/dist/cjs/test/index.integ.spec.js.map +1 -1
- package/dist/es/TranscribeStreaming.js +1 -4
- package/dist/es/TranscribeStreaming.js.map +1 -1
- package/dist/es/TranscribeStreamingClient.js +1 -9
- package/dist/es/TranscribeStreamingClient.js.map +1 -1
- package/dist/es/commands/StartMedicalStreamTranscriptionCommand.js +2 -28
- package/dist/es/commands/StartMedicalStreamTranscriptionCommand.js.map +1 -1
- package/dist/es/commands/StartStreamTranscriptionCommand.js +2 -43
- package/dist/es/commands/StartStreamTranscriptionCommand.js.map +1 -1
- package/dist/es/endpoints.js +23 -2
- package/dist/es/endpoints.js.map +1 -1
- package/dist/es/models/models_0.js +12 -72
- package/dist/es/models/models_0.js.map +1 -1
- package/dist/es/package.json +47 -47
- package/dist/es/protocols/Aws_restJson1.js +157 -121
- package/dist/es/protocols/Aws_restJson1.js.map +1 -1
- package/dist/es/runtimeConfig.browser.js +0 -3
- package/dist/es/runtimeConfig.browser.js.map +1 -1
- package/dist/es/runtimeConfig.js +0 -3
- package/dist/es/runtimeConfig.js.map +1 -1
- package/dist/es/runtimeConfig.native.js +0 -3
- package/dist/es/runtimeConfig.native.js.map +1 -1
- package/dist/es/runtimeConfig.shared.js +0 -3
- package/dist/es/runtimeConfig.shared.js.map +1 -1
- package/dist/types/TranscribeStreaming.d.ts +3 -2
- package/dist/types/commands/StartStreamTranscriptionCommand.d.ts +3 -2
- package/dist/types/models/models_0.d.ts +98 -17
- 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/ts3.4/TranscribeStreaming.d.ts +3 -2
- package/dist/types/ts3.4/commands/StartStreamTranscriptionCommand.d.ts +3 -2
- package/dist/types/ts3.4/models/models_0.d.ts +98 -17
- package/dist/types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist/types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/endpoints.ts +22 -1
- package/models/models_0.ts +116 -17
- package/package.json +47 -47
- package/protocols/Aws_restJson1.ts +48 -0
- package/tsconfig.es.json +0 -2
- package/tsconfig.json +3 -5
- package/tsconfig.types.json +8 -0
|
@@ -6,7 +6,7 @@ export var serializeAws_restJson1StartMedicalStreamTranscriptionCommand = functi
|
|
|
6
6
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
7
7
|
return __generator(this, function (_c) {
|
|
8
8
|
switch (_c.label) {
|
|
9
|
-
case 0: return [4
|
|
9
|
+
case 0: return [4, context.endpoint()];
|
|
10
10
|
case 1:
|
|
11
11
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
12
12
|
headers = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.LanguageCode) && { "x-amzn-transcribe-language-code": input.LanguageCode })), (isSerializableHeaderValue(input.MediaSampleRateHertz) && {
|
|
@@ -28,7 +28,7 @@ export var serializeAws_restJson1StartMedicalStreamTranscriptionCommand = functi
|
|
|
28
28
|
return serializeAws_restJson1AudioStream_event(event, context);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
return [2
|
|
31
|
+
return [2, new __HttpRequest({
|
|
32
32
|
protocol: protocol,
|
|
33
33
|
hostname: hostname,
|
|
34
34
|
port: port,
|
|
@@ -44,10 +44,10 @@ export var serializeAws_restJson1StartStreamTranscriptionCommand = function (inp
|
|
|
44
44
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
45
45
|
return __generator(this, function (_c) {
|
|
46
46
|
switch (_c.label) {
|
|
47
|
-
case 0: return [4
|
|
47
|
+
case 0: return [4, context.endpoint()];
|
|
48
48
|
case 1:
|
|
49
49
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
50
|
-
headers = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.LanguageCode) && { "x-amzn-transcribe-language-code": input.LanguageCode })), (isSerializableHeaderValue(input.MediaSampleRateHertz) && {
|
|
50
|
+
headers = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.LanguageCode) && { "x-amzn-transcribe-language-code": input.LanguageCode })), (isSerializableHeaderValue(input.MediaSampleRateHertz) && {
|
|
51
51
|
"x-amzn-transcribe-sample-rate": input.MediaSampleRateHertz.toString(),
|
|
52
52
|
})), (isSerializableHeaderValue(input.MediaEncoding) && { "x-amzn-transcribe-media-encoding": input.MediaEncoding })), (isSerializableHeaderValue(input.VocabularyName) && {
|
|
53
53
|
"x-amzn-transcribe-vocabulary-name": input.VocabularyName,
|
|
@@ -65,6 +65,12 @@ export var serializeAws_restJson1StartStreamTranscriptionCommand = function (inp
|
|
|
65
65
|
"x-amzn-transcribe-enable-partial-results-stabilization": input.EnablePartialResultsStabilization.toString(),
|
|
66
66
|
})), (isSerializableHeaderValue(input.PartialResultsStability) && {
|
|
67
67
|
"x-amzn-transcribe-partial-results-stability": input.PartialResultsStability,
|
|
68
|
+
})), (isSerializableHeaderValue(input.ContentIdentificationType) && {
|
|
69
|
+
"x-amzn-transcribe-content-identification-type": input.ContentIdentificationType,
|
|
70
|
+
})), (isSerializableHeaderValue(input.ContentRedactionType) && {
|
|
71
|
+
"x-amzn-transcribe-content-redaction-type": input.ContentRedactionType,
|
|
72
|
+
})), (isSerializableHeaderValue(input.PiiEntityTypes) && {
|
|
73
|
+
"x-amzn-transcribe-pii-entity-types": input.PiiEntityTypes,
|
|
68
74
|
}));
|
|
69
75
|
resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/stream-transcription";
|
|
70
76
|
if (input.AudioStream !== undefined) {
|
|
@@ -72,7 +78,7 @@ export var serializeAws_restJson1StartStreamTranscriptionCommand = function (inp
|
|
|
72
78
|
return serializeAws_restJson1AudioStream_event(event, context);
|
|
73
79
|
});
|
|
74
80
|
}
|
|
75
|
-
return [2
|
|
81
|
+
return [2, new __HttpRequest({
|
|
76
82
|
protocol: protocol,
|
|
77
83
|
hostname: hostname,
|
|
78
84
|
port: port,
|
|
@@ -88,7 +94,7 @@ export var deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = func
|
|
|
88
94
|
var contents, data;
|
|
89
95
|
return __generator(this, function (_a) {
|
|
90
96
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
91
|
-
return [2
|
|
97
|
+
return [2, deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError(output, context)];
|
|
92
98
|
}
|
|
93
99
|
contents = {
|
|
94
100
|
$metadata: deserializeMetadata(output),
|
|
@@ -160,13 +166,13 @@ export var deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = func
|
|
|
160
166
|
parsedEvent = (_a = {},
|
|
161
167
|
_a[eventName] = eventMessage,
|
|
162
168
|
_a);
|
|
163
|
-
return [4
|
|
164
|
-
case 1: return [2
|
|
169
|
+
return [4, deserializeAws_restJson1MedicalTranscriptResultStream_event(parsedEvent, context)];
|
|
170
|
+
case 1: return [2, _b.sent()];
|
|
165
171
|
}
|
|
166
172
|
});
|
|
167
173
|
}); });
|
|
168
174
|
contents.TranscriptResultStream = data;
|
|
169
|
-
return [2
|
|
175
|
+
return [2, Promise.resolve(contents)];
|
|
170
176
|
});
|
|
171
177
|
}); };
|
|
172
178
|
var deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -177,55 +183,55 @@ var deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = functi
|
|
|
177
183
|
case 0:
|
|
178
184
|
_a = [__assign({}, output)];
|
|
179
185
|
_h = {};
|
|
180
|
-
return [4
|
|
186
|
+
return [4, parseBody(output.body, context)];
|
|
181
187
|
case 1:
|
|
182
188
|
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
183
189
|
errorCode = "UnknownError";
|
|
184
190
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
185
191
|
_b = errorCode;
|
|
186
192
|
switch (_b) {
|
|
187
|
-
case "BadRequestException": return [3
|
|
188
|
-
case "com.amazonaws.transcribestreaming#BadRequestException": return [3
|
|
189
|
-
case "ConflictException": return [3
|
|
190
|
-
case "com.amazonaws.transcribestreaming#ConflictException": return [3
|
|
191
|
-
case "InternalFailureException": return [3
|
|
192
|
-
case "com.amazonaws.transcribestreaming#InternalFailureException": return [3
|
|
193
|
-
case "LimitExceededException": return [3
|
|
194
|
-
case "com.amazonaws.transcribestreaming#LimitExceededException": return [3
|
|
195
|
-
case "ServiceUnavailableException": return [3
|
|
196
|
-
case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3
|
|
193
|
+
case "BadRequestException": return [3, 2];
|
|
194
|
+
case "com.amazonaws.transcribestreaming#BadRequestException": return [3, 2];
|
|
195
|
+
case "ConflictException": return [3, 4];
|
|
196
|
+
case "com.amazonaws.transcribestreaming#ConflictException": return [3, 4];
|
|
197
|
+
case "InternalFailureException": return [3, 6];
|
|
198
|
+
case "com.amazonaws.transcribestreaming#InternalFailureException": return [3, 6];
|
|
199
|
+
case "LimitExceededException": return [3, 8];
|
|
200
|
+
case "com.amazonaws.transcribestreaming#LimitExceededException": return [3, 8];
|
|
201
|
+
case "ServiceUnavailableException": return [3, 10];
|
|
202
|
+
case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3, 10];
|
|
197
203
|
}
|
|
198
|
-
return [3
|
|
204
|
+
return [3, 12];
|
|
199
205
|
case 2:
|
|
200
206
|
_c = [{}];
|
|
201
|
-
return [4
|
|
207
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
202
208
|
case 3:
|
|
203
209
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
204
|
-
return [3
|
|
210
|
+
return [3, 13];
|
|
205
211
|
case 4:
|
|
206
212
|
_d = [{}];
|
|
207
|
-
return [4
|
|
213
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
208
214
|
case 5:
|
|
209
215
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
210
|
-
return [3
|
|
216
|
+
return [3, 13];
|
|
211
217
|
case 6:
|
|
212
218
|
_e = [{}];
|
|
213
|
-
return [4
|
|
219
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
214
220
|
case 7:
|
|
215
221
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
216
|
-
return [3
|
|
222
|
+
return [3, 13];
|
|
217
223
|
case 8:
|
|
218
224
|
_f = [{}];
|
|
219
|
-
return [4
|
|
225
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
220
226
|
case 9:
|
|
221
227
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
222
|
-
return [3
|
|
228
|
+
return [3, 13];
|
|
223
229
|
case 10:
|
|
224
230
|
_g = [{}];
|
|
225
|
-
return [4
|
|
231
|
+
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
226
232
|
case 11:
|
|
227
233
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
228
|
-
return [3
|
|
234
|
+
return [3, 13];
|
|
229
235
|
case 12:
|
|
230
236
|
parsedBody = parsedOutput.body;
|
|
231
237
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -235,7 +241,7 @@ var deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = functi
|
|
|
235
241
|
message = response.message || response.Message || errorCode;
|
|
236
242
|
response.message = message;
|
|
237
243
|
delete response.Message;
|
|
238
|
-
return [2
|
|
244
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
239
245
|
}
|
|
240
246
|
});
|
|
241
247
|
}); };
|
|
@@ -243,10 +249,12 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
|
|
|
243
249
|
var contents, data;
|
|
244
250
|
return __generator(this, function (_a) {
|
|
245
251
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
246
|
-
return [2
|
|
252
|
+
return [2, deserializeAws_restJson1StartStreamTranscriptionCommandError(output, context)];
|
|
247
253
|
}
|
|
248
254
|
contents = {
|
|
249
255
|
$metadata: deserializeMetadata(output),
|
|
256
|
+
ContentIdentificationType: undefined,
|
|
257
|
+
ContentRedactionType: undefined,
|
|
250
258
|
EnableChannelIdentification: undefined,
|
|
251
259
|
EnablePartialResultsStabilization: undefined,
|
|
252
260
|
LanguageCode: undefined,
|
|
@@ -254,6 +262,7 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
|
|
|
254
262
|
MediaSampleRateHertz: undefined,
|
|
255
263
|
NumberOfChannels: undefined,
|
|
256
264
|
PartialResultsStability: undefined,
|
|
265
|
+
PiiEntityTypes: undefined,
|
|
257
266
|
RequestId: undefined,
|
|
258
267
|
SessionId: undefined,
|
|
259
268
|
ShowSpeakerLabel: undefined,
|
|
@@ -301,6 +310,15 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
|
|
|
301
310
|
if (output.headers["x-amzn-transcribe-partial-results-stability"] !== undefined) {
|
|
302
311
|
contents.PartialResultsStability = output.headers["x-amzn-transcribe-partial-results-stability"];
|
|
303
312
|
}
|
|
313
|
+
if (output.headers["x-amzn-transcribe-content-identification-type"] !== undefined) {
|
|
314
|
+
contents.ContentIdentificationType = output.headers["x-amzn-transcribe-content-identification-type"];
|
|
315
|
+
}
|
|
316
|
+
if (output.headers["x-amzn-transcribe-content-redaction-type"] !== undefined) {
|
|
317
|
+
contents.ContentRedactionType = output.headers["x-amzn-transcribe-content-redaction-type"];
|
|
318
|
+
}
|
|
319
|
+
if (output.headers["x-amzn-transcribe-pii-entity-types"] !== undefined) {
|
|
320
|
+
contents.PiiEntityTypes = output.headers["x-amzn-transcribe-pii-entity-types"];
|
|
321
|
+
}
|
|
304
322
|
data = context.eventStreamMarshaller.deserialize(output.body, function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
305
323
|
var eventName, eventHeaders, eventMessage, parsedEvent;
|
|
306
324
|
var _a;
|
|
@@ -319,13 +337,13 @@ export var deserializeAws_restJson1StartStreamTranscriptionCommand = function (o
|
|
|
319
337
|
parsedEvent = (_a = {},
|
|
320
338
|
_a[eventName] = eventMessage,
|
|
321
339
|
_a);
|
|
322
|
-
return [4
|
|
323
|
-
case 1: return [2
|
|
340
|
+
return [4, deserializeAws_restJson1TranscriptResultStream_event(parsedEvent, context)];
|
|
341
|
+
case 1: return [2, _b.sent()];
|
|
324
342
|
}
|
|
325
343
|
});
|
|
326
344
|
}); });
|
|
327
345
|
contents.TranscriptResultStream = data;
|
|
328
|
-
return [2
|
|
346
|
+
return [2, Promise.resolve(contents)];
|
|
329
347
|
});
|
|
330
348
|
}); };
|
|
331
349
|
var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -336,55 +354,55 @@ var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (out
|
|
|
336
354
|
case 0:
|
|
337
355
|
_a = [__assign({}, output)];
|
|
338
356
|
_h = {};
|
|
339
|
-
return [4
|
|
357
|
+
return [4, parseBody(output.body, context)];
|
|
340
358
|
case 1:
|
|
341
359
|
parsedOutput = __assign.apply(void 0, _a.concat([(_h.body = _j.sent(), _h)]));
|
|
342
360
|
errorCode = "UnknownError";
|
|
343
361
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
344
362
|
_b = errorCode;
|
|
345
363
|
switch (_b) {
|
|
346
|
-
case "BadRequestException": return [3
|
|
347
|
-
case "com.amazonaws.transcribestreaming#BadRequestException": return [3
|
|
348
|
-
case "ConflictException": return [3
|
|
349
|
-
case "com.amazonaws.transcribestreaming#ConflictException": return [3
|
|
350
|
-
case "InternalFailureException": return [3
|
|
351
|
-
case "com.amazonaws.transcribestreaming#InternalFailureException": return [3
|
|
352
|
-
case "LimitExceededException": return [3
|
|
353
|
-
case "com.amazonaws.transcribestreaming#LimitExceededException": return [3
|
|
354
|
-
case "ServiceUnavailableException": return [3
|
|
355
|
-
case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3
|
|
364
|
+
case "BadRequestException": return [3, 2];
|
|
365
|
+
case "com.amazonaws.transcribestreaming#BadRequestException": return [3, 2];
|
|
366
|
+
case "ConflictException": return [3, 4];
|
|
367
|
+
case "com.amazonaws.transcribestreaming#ConflictException": return [3, 4];
|
|
368
|
+
case "InternalFailureException": return [3, 6];
|
|
369
|
+
case "com.amazonaws.transcribestreaming#InternalFailureException": return [3, 6];
|
|
370
|
+
case "LimitExceededException": return [3, 8];
|
|
371
|
+
case "com.amazonaws.transcribestreaming#LimitExceededException": return [3, 8];
|
|
372
|
+
case "ServiceUnavailableException": return [3, 10];
|
|
373
|
+
case "com.amazonaws.transcribestreaming#ServiceUnavailableException": return [3, 10];
|
|
356
374
|
}
|
|
357
|
-
return [3
|
|
375
|
+
return [3, 12];
|
|
358
376
|
case 2:
|
|
359
377
|
_c = [{}];
|
|
360
|
-
return [4
|
|
378
|
+
return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
361
379
|
case 3:
|
|
362
380
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
363
|
-
return [3
|
|
381
|
+
return [3, 13];
|
|
364
382
|
case 4:
|
|
365
383
|
_d = [{}];
|
|
366
|
-
return [4
|
|
384
|
+
return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
367
385
|
case 5:
|
|
368
386
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
369
|
-
return [3
|
|
387
|
+
return [3, 13];
|
|
370
388
|
case 6:
|
|
371
389
|
_e = [{}];
|
|
372
|
-
return [4
|
|
390
|
+
return [4, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
373
391
|
case 7:
|
|
374
392
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
375
|
-
return [3
|
|
393
|
+
return [3, 13];
|
|
376
394
|
case 8:
|
|
377
395
|
_f = [{}];
|
|
378
|
-
return [4
|
|
396
|
+
return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
379
397
|
case 9:
|
|
380
398
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
381
|
-
return [3
|
|
399
|
+
return [3, 13];
|
|
382
400
|
case 10:
|
|
383
401
|
_g = [{}];
|
|
384
|
-
return [4
|
|
402
|
+
return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
385
403
|
case 11:
|
|
386
404
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_j.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
387
|
-
return [3
|
|
405
|
+
return [3, 13];
|
|
388
406
|
case 12:
|
|
389
407
|
parsedBody = parsedOutput.body;
|
|
390
408
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -394,7 +412,7 @@ var deserializeAws_restJson1StartStreamTranscriptionCommandError = function (out
|
|
|
394
412
|
message = response.message || response.Message || errorCode;
|
|
395
413
|
response.message = message;
|
|
396
414
|
delete response.Message;
|
|
397
|
-
return [2
|
|
415
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
398
416
|
}
|
|
399
417
|
});
|
|
400
418
|
}); };
|
|
@@ -409,42 +427,42 @@ var deserializeAws_restJson1MedicalTranscriptResultStream_event = function (outp
|
|
|
409
427
|
return __generator(this, function (_g) {
|
|
410
428
|
switch (_g.label) {
|
|
411
429
|
case 0:
|
|
412
|
-
if (!(output["TranscriptEvent"] !== undefined)) return [3
|
|
430
|
+
if (!(output["TranscriptEvent"] !== undefined)) return [3, 2];
|
|
413
431
|
_a = {};
|
|
414
|
-
return [4
|
|
415
|
-
case 1: return [2
|
|
432
|
+
return [4, deserializeAws_restJson1MedicalTranscriptEvent_event(output["TranscriptEvent"], context)];
|
|
433
|
+
case 1: return [2, (_a.TranscriptEvent = _g.sent(),
|
|
416
434
|
_a)];
|
|
417
435
|
case 2:
|
|
418
|
-
if (!(output["BadRequestException"] !== undefined)) return [3
|
|
436
|
+
if (!(output["BadRequestException"] !== undefined)) return [3, 4];
|
|
419
437
|
_b = {};
|
|
420
|
-
return [4
|
|
421
|
-
case 3: return [2
|
|
438
|
+
return [4, deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context)];
|
|
439
|
+
case 3: return [2, (_b.BadRequestException = _g.sent(),
|
|
422
440
|
_b)];
|
|
423
441
|
case 4:
|
|
424
|
-
if (!(output["LimitExceededException"] !== undefined)) return [3
|
|
442
|
+
if (!(output["LimitExceededException"] !== undefined)) return [3, 6];
|
|
425
443
|
_c = {};
|
|
426
|
-
return [4
|
|
427
|
-
case 5: return [2
|
|
444
|
+
return [4, deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context)];
|
|
445
|
+
case 5: return [2, (_c.LimitExceededException = _g.sent(),
|
|
428
446
|
_c)];
|
|
429
447
|
case 6:
|
|
430
|
-
if (!(output["InternalFailureException"] !== undefined)) return [3
|
|
448
|
+
if (!(output["InternalFailureException"] !== undefined)) return [3, 8];
|
|
431
449
|
_d = {};
|
|
432
|
-
return [4
|
|
433
|
-
case 7: return [2
|
|
450
|
+
return [4, deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context)];
|
|
451
|
+
case 7: return [2, (_d.InternalFailureException = _g.sent(),
|
|
434
452
|
_d)];
|
|
435
453
|
case 8:
|
|
436
|
-
if (!(output["ConflictException"] !== undefined)) return [3
|
|
454
|
+
if (!(output["ConflictException"] !== undefined)) return [3, 10];
|
|
437
455
|
_e = {};
|
|
438
|
-
return [4
|
|
439
|
-
case 9: return [2
|
|
456
|
+
return [4, deserializeAws_restJson1ConflictException_event(output["ConflictException"], context)];
|
|
457
|
+
case 9: return [2, (_e.ConflictException = _g.sent(),
|
|
440
458
|
_e)];
|
|
441
459
|
case 10:
|
|
442
|
-
if (!(output["ServiceUnavailableException"] !== undefined)) return [3
|
|
460
|
+
if (!(output["ServiceUnavailableException"] !== undefined)) return [3, 12];
|
|
443
461
|
_f = {};
|
|
444
|
-
return [4
|
|
445
|
-
case 11: return [2
|
|
462
|
+
return [4, deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context)];
|
|
463
|
+
case 11: return [2, (_f.ServiceUnavailableException = _g.sent(),
|
|
446
464
|
_f)];
|
|
447
|
-
case 12: return [2
|
|
465
|
+
case 12: return [2, { $unknown: output }];
|
|
448
466
|
}
|
|
449
467
|
});
|
|
450
468
|
}); };
|
|
@@ -453,42 +471,42 @@ var deserializeAws_restJson1TranscriptResultStream_event = function (output, con
|
|
|
453
471
|
return __generator(this, function (_g) {
|
|
454
472
|
switch (_g.label) {
|
|
455
473
|
case 0:
|
|
456
|
-
if (!(output["TranscriptEvent"] !== undefined)) return [3
|
|
474
|
+
if (!(output["TranscriptEvent"] !== undefined)) return [3, 2];
|
|
457
475
|
_a = {};
|
|
458
|
-
return [4
|
|
459
|
-
case 1: return [2
|
|
476
|
+
return [4, deserializeAws_restJson1TranscriptEvent_event(output["TranscriptEvent"], context)];
|
|
477
|
+
case 1: return [2, (_a.TranscriptEvent = _g.sent(),
|
|
460
478
|
_a)];
|
|
461
479
|
case 2:
|
|
462
|
-
if (!(output["BadRequestException"] !== undefined)) return [3
|
|
480
|
+
if (!(output["BadRequestException"] !== undefined)) return [3, 4];
|
|
463
481
|
_b = {};
|
|
464
|
-
return [4
|
|
465
|
-
case 3: return [2
|
|
482
|
+
return [4, deserializeAws_restJson1BadRequestException_event(output["BadRequestException"], context)];
|
|
483
|
+
case 3: return [2, (_b.BadRequestException = _g.sent(),
|
|
466
484
|
_b)];
|
|
467
485
|
case 4:
|
|
468
|
-
if (!(output["LimitExceededException"] !== undefined)) return [3
|
|
486
|
+
if (!(output["LimitExceededException"] !== undefined)) return [3, 6];
|
|
469
487
|
_c = {};
|
|
470
|
-
return [4
|
|
471
|
-
case 5: return [2
|
|
488
|
+
return [4, deserializeAws_restJson1LimitExceededException_event(output["LimitExceededException"], context)];
|
|
489
|
+
case 5: return [2, (_c.LimitExceededException = _g.sent(),
|
|
472
490
|
_c)];
|
|
473
491
|
case 6:
|
|
474
|
-
if (!(output["InternalFailureException"] !== undefined)) return [3
|
|
492
|
+
if (!(output["InternalFailureException"] !== undefined)) return [3, 8];
|
|
475
493
|
_d = {};
|
|
476
|
-
return [4
|
|
477
|
-
case 7: return [2
|
|
494
|
+
return [4, deserializeAws_restJson1InternalFailureException_event(output["InternalFailureException"], context)];
|
|
495
|
+
case 7: return [2, (_d.InternalFailureException = _g.sent(),
|
|
478
496
|
_d)];
|
|
479
497
|
case 8:
|
|
480
|
-
if (!(output["ConflictException"] !== undefined)) return [3
|
|
498
|
+
if (!(output["ConflictException"] !== undefined)) return [3, 10];
|
|
481
499
|
_e = {};
|
|
482
|
-
return [4
|
|
483
|
-
case 9: return [2
|
|
500
|
+
return [4, deserializeAws_restJson1ConflictException_event(output["ConflictException"], context)];
|
|
501
|
+
case 9: return [2, (_e.ConflictException = _g.sent(),
|
|
484
502
|
_e)];
|
|
485
503
|
case 10:
|
|
486
|
-
if (!(output["ServiceUnavailableException"] !== undefined)) return [3
|
|
504
|
+
if (!(output["ServiceUnavailableException"] !== undefined)) return [3, 12];
|
|
487
505
|
_f = {};
|
|
488
|
-
return [4
|
|
489
|
-
case 11: return [2
|
|
506
|
+
return [4, deserializeAws_restJson1ServiceUnavailableException_event(output["ServiceUnavailableException"], context)];
|
|
507
|
+
case 11: return [2, (_f.ServiceUnavailableException = _g.sent(),
|
|
490
508
|
_f)];
|
|
491
|
-
case 12: return [2
|
|
509
|
+
case 12: return [2, { $unknown: output }];
|
|
492
510
|
}
|
|
493
511
|
});
|
|
494
512
|
}); };
|
|
@@ -511,10 +529,10 @@ var deserializeAws_restJson1BadRequestException_event = function (output, contex
|
|
|
511
529
|
case 0:
|
|
512
530
|
_a = [__assign({}, output)];
|
|
513
531
|
_b = {};
|
|
514
|
-
return [4
|
|
532
|
+
return [4, parseBody(output.body, context)];
|
|
515
533
|
case 1:
|
|
516
534
|
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
517
|
-
return [2
|
|
535
|
+
return [2, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
|
|
518
536
|
}
|
|
519
537
|
});
|
|
520
538
|
}); };
|
|
@@ -526,10 +544,10 @@ var deserializeAws_restJson1ConflictException_event = function (output, context)
|
|
|
526
544
|
case 0:
|
|
527
545
|
_a = [__assign({}, output)];
|
|
528
546
|
_b = {};
|
|
529
|
-
return [4
|
|
547
|
+
return [4, parseBody(output.body, context)];
|
|
530
548
|
case 1:
|
|
531
549
|
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
532
|
-
return [2
|
|
550
|
+
return [2, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
533
551
|
}
|
|
534
552
|
});
|
|
535
553
|
}); };
|
|
@@ -541,10 +559,10 @@ var deserializeAws_restJson1InternalFailureException_event = function (output, c
|
|
|
541
559
|
case 0:
|
|
542
560
|
_a = [__assign({}, output)];
|
|
543
561
|
_b = {};
|
|
544
|
-
return [4
|
|
562
|
+
return [4, parseBody(output.body, context)];
|
|
545
563
|
case 1:
|
|
546
564
|
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
547
|
-
return [2
|
|
565
|
+
return [2, deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context)];
|
|
548
566
|
}
|
|
549
567
|
});
|
|
550
568
|
}); };
|
|
@@ -556,10 +574,10 @@ var deserializeAws_restJson1LimitExceededException_event = function (output, con
|
|
|
556
574
|
case 0:
|
|
557
575
|
_a = [__assign({}, output)];
|
|
558
576
|
_b = {};
|
|
559
|
-
return [4
|
|
577
|
+
return [4, parseBody(output.body, context)];
|
|
560
578
|
case 1:
|
|
561
579
|
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
562
|
-
return [2
|
|
580
|
+
return [2, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
563
581
|
}
|
|
564
582
|
});
|
|
565
583
|
}); };
|
|
@@ -569,11 +587,11 @@ var deserializeAws_restJson1MedicalTranscriptEvent_event = function (output, con
|
|
|
569
587
|
switch (_a.label) {
|
|
570
588
|
case 0:
|
|
571
589
|
contents = {};
|
|
572
|
-
return [4
|
|
590
|
+
return [4, parseBody(output.body, context)];
|
|
573
591
|
case 1:
|
|
574
592
|
data = _a.sent();
|
|
575
593
|
contents = __assign(__assign({}, contents), deserializeAws_restJson1MedicalTranscriptEvent(data, context));
|
|
576
|
-
return [2
|
|
594
|
+
return [2, contents];
|
|
577
595
|
}
|
|
578
596
|
});
|
|
579
597
|
}); };
|
|
@@ -585,10 +603,10 @@ var deserializeAws_restJson1ServiceUnavailableException_event = function (output
|
|
|
585
603
|
case 0:
|
|
586
604
|
_a = [__assign({}, output)];
|
|
587
605
|
_b = {};
|
|
588
|
-
return [4
|
|
606
|
+
return [4, parseBody(output.body, context)];
|
|
589
607
|
case 1:
|
|
590
608
|
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
591
|
-
return [2
|
|
609
|
+
return [2, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
|
|
592
610
|
}
|
|
593
611
|
});
|
|
594
612
|
}); };
|
|
@@ -598,11 +616,11 @@ var deserializeAws_restJson1TranscriptEvent_event = function (output, context) {
|
|
|
598
616
|
switch (_a.label) {
|
|
599
617
|
case 0:
|
|
600
618
|
contents = {};
|
|
601
|
-
return [4
|
|
619
|
+
return [4, parseBody(output.body, context)];
|
|
602
620
|
case 1:
|
|
603
621
|
data = _a.sent();
|
|
604
622
|
contents = __assign(__assign({}, contents), deserializeAws_restJson1TranscriptEvent(data, context));
|
|
605
|
-
return [2
|
|
623
|
+
return [2, contents];
|
|
606
624
|
}
|
|
607
625
|
});
|
|
608
626
|
}); };
|
|
@@ -619,7 +637,7 @@ var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput
|
|
|
619
637
|
if (data.Message !== undefined && data.Message !== null) {
|
|
620
638
|
contents.Message = __expectString(data.Message);
|
|
621
639
|
}
|
|
622
|
-
return [2
|
|
640
|
+
return [2, contents];
|
|
623
641
|
});
|
|
624
642
|
}); };
|
|
625
643
|
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -635,7 +653,7 @@ var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput,
|
|
|
635
653
|
if (data.Message !== undefined && data.Message !== null) {
|
|
636
654
|
contents.Message = __expectString(data.Message);
|
|
637
655
|
}
|
|
638
|
-
return [2
|
|
656
|
+
return [2, contents];
|
|
639
657
|
});
|
|
640
658
|
}); };
|
|
641
659
|
var deserializeAws_restJson1InternalFailureExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -651,7 +669,7 @@ var deserializeAws_restJson1InternalFailureExceptionResponse = function (parsedO
|
|
|
651
669
|
if (data.Message !== undefined && data.Message !== null) {
|
|
652
670
|
contents.Message = __expectString(data.Message);
|
|
653
671
|
}
|
|
654
|
-
return [2
|
|
672
|
+
return [2, contents];
|
|
655
673
|
});
|
|
656
674
|
}); };
|
|
657
675
|
var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -667,7 +685,7 @@ var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOut
|
|
|
667
685
|
if (data.Message !== undefined && data.Message !== null) {
|
|
668
686
|
contents.Message = __expectString(data.Message);
|
|
669
687
|
}
|
|
670
|
-
return [2
|
|
688
|
+
return [2, contents];
|
|
671
689
|
});
|
|
672
690
|
}); };
|
|
673
691
|
var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -683,7 +701,7 @@ var deserializeAws_restJson1ServiceUnavailableExceptionResponse = function (pars
|
|
|
683
701
|
if (data.Message !== undefined && data.Message !== null) {
|
|
684
702
|
contents.Message = __expectString(data.Message);
|
|
685
703
|
}
|
|
686
|
-
return [2
|
|
704
|
+
return [2, contents];
|
|
687
705
|
});
|
|
688
706
|
}); };
|
|
689
707
|
var serializeAws_restJson1AudioEvent = function (input, context) {
|
|
@@ -698,6 +716,9 @@ var serializeAws_restJson1AudioStream = function (input, context) {
|
|
|
698
716
|
};
|
|
699
717
|
var deserializeAws_restJson1Alternative = function (output, context) {
|
|
700
718
|
return {
|
|
719
|
+
Entities: output.Entities !== undefined && output.Entities !== null
|
|
720
|
+
? deserializeAws_restJson1EntityList(output.Entities, context)
|
|
721
|
+
: undefined,
|
|
701
722
|
Items: output.Items !== undefined && output.Items !== null
|
|
702
723
|
? deserializeAws_restJson1ItemList(output.Items, context)
|
|
703
724
|
: undefined,
|
|
@@ -724,6 +745,26 @@ var deserializeAws_restJson1ConflictException = function (output, context) {
|
|
|
724
745
|
Message: __expectString(output.Message),
|
|
725
746
|
};
|
|
726
747
|
};
|
|
748
|
+
var deserializeAws_restJson1Entity = function (output, context) {
|
|
749
|
+
return {
|
|
750
|
+
Category: __expectString(output.Category),
|
|
751
|
+
Confidence: __limitedParseDouble(output.Confidence),
|
|
752
|
+
Content: __expectString(output.Content),
|
|
753
|
+
EndTime: __limitedParseDouble(output.EndTime),
|
|
754
|
+
StartTime: __limitedParseDouble(output.StartTime),
|
|
755
|
+
Type: __expectString(output.Type),
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
var deserializeAws_restJson1EntityList = function (output, context) {
|
|
759
|
+
return (output || [])
|
|
760
|
+
.filter(function (e) { return e != null; })
|
|
761
|
+
.map(function (entry) {
|
|
762
|
+
if (entry === null) {
|
|
763
|
+
return null;
|
|
764
|
+
}
|
|
765
|
+
return deserializeAws_restJson1Entity(entry, context);
|
|
766
|
+
});
|
|
767
|
+
};
|
|
727
768
|
var deserializeAws_restJson1InternalFailureException = function (output, context) {
|
|
728
769
|
return {
|
|
729
770
|
Message: __expectString(output.Message),
|
|
@@ -968,7 +1009,6 @@ var deserializeMetadata = function (output) {
|
|
|
968
1009
|
cfId: output.headers["x-amz-cf-id"],
|
|
969
1010
|
});
|
|
970
1011
|
};
|
|
971
|
-
// Collect low-level response body stream to Uint8Array.
|
|
972
1012
|
var collectBody = function (streamBody, context) {
|
|
973
1013
|
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
974
1014
|
if (streamBody instanceof Uint8Array) {
|
|
@@ -976,7 +1016,6 @@ var collectBody = function (streamBody, context) {
|
|
|
976
1016
|
}
|
|
977
1017
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
978
1018
|
};
|
|
979
|
-
// Encode Uint8Array data into string with utf-8.
|
|
980
1019
|
var collectBodyString = function (streamBody, context) {
|
|
981
1020
|
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
982
1021
|
};
|
|
@@ -995,9 +1034,6 @@ var parseBody = function (streamBody, context) {
|
|
|
995
1034
|
return {};
|
|
996
1035
|
});
|
|
997
1036
|
};
|
|
998
|
-
/**
|
|
999
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
1000
|
-
*/
|
|
1001
1037
|
var loadRestJsonErrorCode = function (output, data) {
|
|
1002
1038
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1003
1039
|
var sanitizeErrorCode = function (rawValue) {
|