@aws-sdk/client-transcribe-streaming 3.180.0 → 3.183.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 +20 -0
- package/dist-cjs/protocols/Aws_restJson1.js +8 -2
- package/dist-es/TranscribeStreaming.js +10 -17
- package/dist-es/TranscribeStreamingClient.js +26 -32
- package/dist-es/commands/StartMedicalStreamTranscriptionCommand.js +21 -28
- package/dist-es/commands/StartStreamTranscriptionCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/TranscribeStreamingServiceException.js +5 -10
- package/dist-es/models/models_0.js +127 -91
- package/dist-es/protocols/Aws_restJson1.js +503 -641
- package/dist-es/runtimeConfig.browser.js +28 -12
- package/dist-es/runtimeConfig.js +33 -19
- package/dist-es/runtimeConfig.native.js +10 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +39 -39
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-transcribe-streaming
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
|
|
20
|
+
* **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
|
|
7
27
|
|
|
8
28
|
**Note:** Version bump only for package @aws-sdk/client-transcribe-streaming
|
|
@@ -146,7 +146,7 @@ exports.deserializeAws_restJson1StartMedicalStreamTranscriptionCommand = deseria
|
|
|
146
146
|
const deserializeAws_restJson1StartMedicalStreamTranscriptionCommandError = async (output, context) => {
|
|
147
147
|
const parsedOutput = {
|
|
148
148
|
...output,
|
|
149
|
-
body: await
|
|
149
|
+
body: await parseErrorBody(output.body, context),
|
|
150
150
|
};
|
|
151
151
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
152
152
|
switch (errorCode) {
|
|
@@ -230,7 +230,7 @@ exports.deserializeAws_restJson1StartStreamTranscriptionCommand = deserializeAws
|
|
|
230
230
|
const deserializeAws_restJson1StartStreamTranscriptionCommandError = async (output, context) => {
|
|
231
231
|
const parsedOutput = {
|
|
232
232
|
...output,
|
|
233
|
-
body: await
|
|
233
|
+
body: await parseErrorBody(output.body, context),
|
|
234
234
|
};
|
|
235
235
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
236
236
|
switch (errorCode) {
|
|
@@ -689,6 +689,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
689
689
|
}
|
|
690
690
|
return {};
|
|
691
691
|
});
|
|
692
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
693
|
+
var _a;
|
|
694
|
+
const value = await parseBody(errorBody, context);
|
|
695
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
696
|
+
return value;
|
|
697
|
+
};
|
|
692
698
|
const loadRestJsonErrorCode = (output, data) => {
|
|
693
699
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
694
700
|
const sanitizeErrorCode = (rawValue) => {
|
|
@@ -1,40 +1,33 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { StartMedicalStreamTranscriptionCommand, } from "./commands/StartMedicalStreamTranscriptionCommand";
|
|
3
2
|
import { StartStreamTranscriptionCommand, } from "./commands/StartStreamTranscriptionCommand";
|
|
4
3
|
import { TranscribeStreamingClient } from "./TranscribeStreamingClient";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
9
|
-
}
|
|
10
|
-
TranscribeStreaming.prototype.startMedicalStreamTranscription = function (args, optionsOrCb, cb) {
|
|
11
|
-
var command = new StartMedicalStreamTranscriptionCommand(args);
|
|
4
|
+
export class TranscribeStreaming extends TranscribeStreamingClient {
|
|
5
|
+
startMedicalStreamTranscription(args, optionsOrCb, cb) {
|
|
6
|
+
const command = new StartMedicalStreamTranscriptionCommand(args);
|
|
12
7
|
if (typeof optionsOrCb === "function") {
|
|
13
8
|
this.send(command, optionsOrCb);
|
|
14
9
|
}
|
|
15
10
|
else if (typeof cb === "function") {
|
|
16
11
|
if (typeof optionsOrCb !== "object")
|
|
17
|
-
throw new Error(
|
|
12
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
18
13
|
this.send(command, optionsOrCb || {}, cb);
|
|
19
14
|
}
|
|
20
15
|
else {
|
|
21
16
|
return this.send(command, optionsOrCb);
|
|
22
17
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
}
|
|
19
|
+
startStreamTranscription(args, optionsOrCb, cb) {
|
|
20
|
+
const command = new StartStreamTranscriptionCommand(args);
|
|
26
21
|
if (typeof optionsOrCb === "function") {
|
|
27
22
|
this.send(command, optionsOrCb);
|
|
28
23
|
}
|
|
29
24
|
else if (typeof cb === "function") {
|
|
30
25
|
if (typeof optionsOrCb !== "object")
|
|
31
|
-
throw new Error(
|
|
26
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
32
27
|
this.send(command, optionsOrCb || {}, cb);
|
|
33
28
|
}
|
|
34
29
|
else {
|
|
35
30
|
return this.send(command, optionsOrCb);
|
|
36
31
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}(TranscribeStreamingClient));
|
|
40
|
-
export { TranscribeStreaming };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
|
|
3
2
|
import { resolveEventStreamSerdeConfig, } from "@aws-sdk/eventstream-serde-config-resolver";
|
|
4
3
|
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
@@ -12,35 +11,30 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
|
|
|
12
11
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
13
12
|
import { Client as __Client, } from "@aws-sdk/smithy-client";
|
|
14
13
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
_this.middlewareStack.use(getWebSocketPlugin(_this.config));
|
|
38
|
-
_this.middlewareStack.use(getUserAgentPlugin(_this.config));
|
|
39
|
-
return _this;
|
|
14
|
+
export class TranscribeStreamingClient extends __Client {
|
|
15
|
+
constructor(configuration) {
|
|
16
|
+
const _config_0 = __getRuntimeConfig(configuration);
|
|
17
|
+
const _config_1 = resolveRegionConfig(_config_0);
|
|
18
|
+
const _config_2 = resolveEndpointsConfig(_config_1);
|
|
19
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
20
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
21
|
+
const _config_5 = resolveAwsAuthConfig(_config_4);
|
|
22
|
+
const _config_6 = resolveEventStreamConfig(_config_5);
|
|
23
|
+
const _config_7 = resolveWebSocketConfig(_config_6);
|
|
24
|
+
const _config_8 = resolveUserAgentConfig(_config_7);
|
|
25
|
+
const _config_9 = resolveEventStreamSerdeConfig(_config_8);
|
|
26
|
+
super(_config_9);
|
|
27
|
+
this.config = _config_9;
|
|
28
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
29
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
30
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
31
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
32
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
34
|
+
this.middlewareStack.use(getWebSocketPlugin(this.config));
|
|
35
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
40
36
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
}(__Client));
|
|
46
|
-
export { TranscribeStreamingClient };
|
|
37
|
+
destroy() {
|
|
38
|
+
super.destroy();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,41 +1,34 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getEventStreamPlugin } from "@aws-sdk/middleware-eventstream";
|
|
3
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
5
4
|
import { StartMedicalStreamTranscriptionRequestFilterSensitiveLog, StartMedicalStreamTranscriptionResponseFilterSensitiveLog, } from "../models/models_0";
|
|
6
5
|
import { deserializeAws_restJson1StartMedicalStreamTranscriptionCommand, serializeAws_restJson1StartMedicalStreamTranscriptionCommand, } from "../protocols/Aws_restJson1";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
_this.input = input;
|
|
12
|
-
return _this;
|
|
6
|
+
export class StartMedicalStreamTranscriptionCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
13
10
|
}
|
|
14
|
-
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
12
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
13
|
this.middlewareStack.use(getEventStreamPlugin(configuration));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
logger
|
|
23
|
-
clientName
|
|
24
|
-
commandName
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const { logger } = configuration;
|
|
16
|
+
const clientName = "TranscribeStreamingClient";
|
|
17
|
+
const commandName = "StartMedicalStreamTranscriptionCommand";
|
|
18
|
+
const handlerExecutionContext = {
|
|
19
|
+
logger,
|
|
20
|
+
clientName,
|
|
21
|
+
commandName,
|
|
25
22
|
inputFilterSensitiveLog: StartMedicalStreamTranscriptionRequestFilterSensitiveLog,
|
|
26
23
|
outputFilterSensitiveLog: StartMedicalStreamTranscriptionResponseFilterSensitiveLog,
|
|
27
24
|
};
|
|
28
|
-
|
|
29
|
-
return stack.resolve(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
StartMedicalStreamTranscriptionCommand.prototype.serialize = function (input, context) {
|
|
25
|
+
const { requestHandler } = configuration;
|
|
26
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
27
|
+
}
|
|
28
|
+
serialize(input, context) {
|
|
34
29
|
return serializeAws_restJson1StartMedicalStreamTranscriptionCommand(input, context);
|
|
35
|
-
}
|
|
36
|
-
|
|
30
|
+
}
|
|
31
|
+
deserialize(output, context) {
|
|
37
32
|
return deserializeAws_restJson1StartMedicalStreamTranscriptionCommand(output, context);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}($Command));
|
|
41
|
-
export { StartMedicalStreamTranscriptionCommand };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,41 +1,34 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getEventStreamPlugin } from "@aws-sdk/middleware-eventstream";
|
|
3
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
4
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
5
4
|
import { StartStreamTranscriptionRequestFilterSensitiveLog, StartStreamTranscriptionResponseFilterSensitiveLog, } from "../models/models_0";
|
|
6
5
|
import { deserializeAws_restJson1StartStreamTranscriptionCommand, serializeAws_restJson1StartStreamTranscriptionCommand, } from "../protocols/Aws_restJson1";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
_this.input = input;
|
|
12
|
-
return _this;
|
|
6
|
+
export class StartStreamTranscriptionCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
13
10
|
}
|
|
14
|
-
|
|
11
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
15
12
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
13
|
this.middlewareStack.use(getEventStreamPlugin(configuration));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
logger
|
|
23
|
-
clientName
|
|
24
|
-
commandName
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const { logger } = configuration;
|
|
16
|
+
const clientName = "TranscribeStreamingClient";
|
|
17
|
+
const commandName = "StartStreamTranscriptionCommand";
|
|
18
|
+
const handlerExecutionContext = {
|
|
19
|
+
logger,
|
|
20
|
+
clientName,
|
|
21
|
+
commandName,
|
|
25
22
|
inputFilterSensitiveLog: StartStreamTranscriptionRequestFilterSensitiveLog,
|
|
26
23
|
outputFilterSensitiveLog: StartStreamTranscriptionResponseFilterSensitiveLog,
|
|
27
24
|
};
|
|
28
|
-
|
|
29
|
-
return stack.resolve(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
StartStreamTranscriptionCommand.prototype.serialize = function (input, context) {
|
|
25
|
+
const { requestHandler } = configuration;
|
|
26
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
27
|
+
}
|
|
28
|
+
serialize(input, context) {
|
|
34
29
|
return serializeAws_restJson1StartStreamTranscriptionCommand(input, context);
|
|
35
|
-
}
|
|
36
|
-
|
|
30
|
+
}
|
|
31
|
+
deserialize(output, context) {
|
|
37
32
|
return deserializeAws_restJson1StartStreamTranscriptionCommand(output, context);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}($Command));
|
|
41
|
-
export { StartStreamTranscriptionCommand };
|
|
33
|
+
}
|
|
34
|
+
}
|
package/dist-es/endpoints.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const regionHash = {};
|
|
3
|
+
const partitionHash = {
|
|
5
4
|
aws: {
|
|
6
5
|
regions: [
|
|
7
6
|
"af-south-1",
|
|
@@ -129,8 +128,9 @@ var partitionHash = {
|
|
|
129
128
|
],
|
|
130
129
|
},
|
|
131
130
|
};
|
|
132
|
-
export
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
|
|
132
|
+
...options,
|
|
133
|
+
signingService: "transcribe",
|
|
134
|
+
regionHash,
|
|
135
|
+
partitionHash,
|
|
136
|
+
});
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.setPrototypeOf(_this, TranscribeStreamingServiceException.prototype);
|
|
8
|
-
return _this;
|
|
2
|
+
export class TranscribeStreamingServiceException extends __ServiceException {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super(options);
|
|
5
|
+
Object.setPrototypeOf(this, TranscribeStreamingServiceException.prototype);
|
|
9
6
|
}
|
|
10
|
-
|
|
11
|
-
}(__ServiceException));
|
|
12
|
-
export { TranscribeStreamingServiceException };
|
|
7
|
+
}
|