@aws-sdk/client-kinesis-video-media 3.181.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 +8 -0
- package/dist-es/KinesisVideoMedia.js +6 -13
- package/dist-es/KinesisVideoMediaClient.js +22 -28
- package/dist-es/commands/GetMediaCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/KinesisVideoMediaServiceException.js +5 -10
- package/dist-es/models/models_0.js +81 -76
- package/dist-es/protocols/Aws_restJson1.js +169 -206
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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-kinesis-video-media
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { GetMediaCommand } from "./commands/GetMediaCommand";
|
|
3
2
|
import { KinesisVideoMediaClient } from "./KinesisVideoMediaClient";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
8
|
-
}
|
|
9
|
-
KinesisVideoMedia.prototype.getMedia = function (args, optionsOrCb, cb) {
|
|
10
|
-
var command = new GetMediaCommand(args);
|
|
3
|
+
export class KinesisVideoMedia extends KinesisVideoMediaClient {
|
|
4
|
+
getMedia(args, optionsOrCb, cb) {
|
|
5
|
+
const command = new GetMediaCommand(args);
|
|
11
6
|
if (typeof optionsOrCb === "function") {
|
|
12
7
|
this.send(command, optionsOrCb);
|
|
13
8
|
}
|
|
14
9
|
else if (typeof cb === "function") {
|
|
15
10
|
if (typeof optionsOrCb !== "object")
|
|
16
|
-
throw new Error(
|
|
11
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
17
12
|
this.send(command, optionsOrCb || {}, cb);
|
|
18
13
|
}
|
|
19
14
|
else {
|
|
20
15
|
return this.send(command, optionsOrCb);
|
|
21
16
|
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}(KinesisVideoMediaClient));
|
|
25
|
-
export { KinesisVideoMedia };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
|
|
3
2
|
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
4
3
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
|
|
|
9
8
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
10
9
|
import { Client as __Client, } from "@aws-sdk/smithy-client";
|
|
11
10
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_this.middlewareStack.use(getAwsAuthPlugin(_this.config));
|
|
31
|
-
_this.middlewareStack.use(getUserAgentPlugin(_this.config));
|
|
32
|
-
return _this;
|
|
11
|
+
export class KinesisVideoMediaClient extends __Client {
|
|
12
|
+
constructor(configuration) {
|
|
13
|
+
const _config_0 = __getRuntimeConfig(configuration);
|
|
14
|
+
const _config_1 = resolveRegionConfig(_config_0);
|
|
15
|
+
const _config_2 = resolveEndpointsConfig(_config_1);
|
|
16
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
17
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
18
|
+
const _config_5 = resolveAwsAuthConfig(_config_4);
|
|
19
|
+
const _config_6 = resolveUserAgentConfig(_config_5);
|
|
20
|
+
super(_config_6);
|
|
21
|
+
this.config = _config_6;
|
|
22
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
23
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
24
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
25
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
26
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
27
|
+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
28
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
33
29
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}(__Client));
|
|
39
|
-
export { KinesisVideoMediaClient };
|
|
30
|
+
destroy() {
|
|
31
|
+
super.destroy();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { GetMediaInputFilterSensitiveLog, GetMediaOutputFilterSensitiveLog, } from "../models/models_0";
|
|
5
4
|
import { deserializeAws_restJson1GetMediaCommand, serializeAws_restJson1GetMediaCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_this.input = input;
|
|
11
|
-
return _this;
|
|
5
|
+
export class GetMediaCommand extends $Command {
|
|
6
|
+
constructor(input) {
|
|
7
|
+
super();
|
|
8
|
+
this.input = input;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
11
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
logger
|
|
21
|
-
clientName
|
|
22
|
-
commandName
|
|
12
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
13
|
+
const { logger } = configuration;
|
|
14
|
+
const clientName = "KinesisVideoMediaClient";
|
|
15
|
+
const commandName = "GetMediaCommand";
|
|
16
|
+
const handlerExecutionContext = {
|
|
17
|
+
logger,
|
|
18
|
+
clientName,
|
|
19
|
+
commandName,
|
|
23
20
|
inputFilterSensitiveLog: GetMediaInputFilterSensitiveLog,
|
|
24
21
|
outputFilterSensitiveLog: GetMediaOutputFilterSensitiveLog,
|
|
25
22
|
};
|
|
26
|
-
|
|
27
|
-
return stack.resolve(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
GetMediaCommand.prototype.serialize = function (input, context) {
|
|
23
|
+
const { requestHandler } = configuration;
|
|
24
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
25
|
+
}
|
|
26
|
+
serialize(input, context) {
|
|
32
27
|
return serializeAws_restJson1GetMediaCommand(input, context);
|
|
33
|
-
}
|
|
34
|
-
|
|
28
|
+
}
|
|
29
|
+
deserialize(output, context) {
|
|
35
30
|
return deserializeAws_restJson1GetMediaCommand(output, context);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}($Command));
|
|
39
|
-
export { GetMediaCommand };
|
|
31
|
+
}
|
|
32
|
+
}
|
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",
|
|
@@ -121,8 +120,9 @@ var partitionHash = {
|
|
|
121
120
|
],
|
|
122
121
|
},
|
|
123
122
|
};
|
|
124
|
-
export
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
|
|
124
|
+
...options,
|
|
125
|
+
signingService: "kinesisvideo",
|
|
126
|
+
regionHash,
|
|
127
|
+
partitionHash,
|
|
128
|
+
});
|
|
@@ -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, KinesisVideoMediaServiceException.prototype);
|
|
8
|
-
return _this;
|
|
2
|
+
export class KinesisVideoMediaServiceException extends __ServiceException {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super(options);
|
|
5
|
+
Object.setPrototypeOf(this, KinesisVideoMediaServiceException.prototype);
|
|
9
6
|
}
|
|
10
|
-
|
|
11
|
-
}(__ServiceException));
|
|
12
|
-
export { KinesisVideoMediaServiceException };
|
|
7
|
+
}
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
1
|
import { KinesisVideoMediaServiceException as __BaseException } from "./KinesisVideoMediaServiceException";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
export class ClientLimitExceededException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "ClientLimitExceededException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "ClientLimitExceededException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, ClientLimitExceededException.prototype);
|
|
12
|
+
this.Message = opts.Message;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
}
|
|
15
|
+
export class ConnectionLimitExceededException extends __BaseException {
|
|
16
|
+
constructor(opts) {
|
|
17
|
+
super({
|
|
18
|
+
name: "ConnectionLimitExceededException",
|
|
19
|
+
$fault: "client",
|
|
20
|
+
...opts,
|
|
21
|
+
});
|
|
22
|
+
this.name = "ConnectionLimitExceededException";
|
|
23
|
+
this.$fault = "client";
|
|
24
|
+
Object.setPrototypeOf(this, ConnectionLimitExceededException.prototype);
|
|
25
|
+
this.Message = opts.Message;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
}(__BaseException));
|
|
28
|
-
export { ConnectionLimitExceededException };
|
|
27
|
+
}
|
|
29
28
|
export var StartSelectorType;
|
|
30
29
|
(function (StartSelectorType) {
|
|
31
30
|
StartSelectorType["CONTINUATION_TOKEN"] = "CONTINUATION_TOKEN";
|
|
@@ -35,58 +34,64 @@ export var StartSelectorType;
|
|
|
35
34
|
StartSelectorType["PRODUCER_TIMESTAMP"] = "PRODUCER_TIMESTAMP";
|
|
36
35
|
StartSelectorType["SERVER_TIMESTAMP"] = "SERVER_TIMESTAMP";
|
|
37
36
|
})(StartSelectorType || (StartSelectorType = {}));
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
export class InvalidArgumentException extends __BaseException {
|
|
38
|
+
constructor(opts) {
|
|
39
|
+
super({
|
|
40
|
+
name: "InvalidArgumentException",
|
|
41
|
+
$fault: "client",
|
|
42
|
+
...opts,
|
|
43
|
+
});
|
|
44
|
+
this.name = "InvalidArgumentException";
|
|
45
|
+
this.$fault = "client";
|
|
46
|
+
Object.setPrototypeOf(this, InvalidArgumentException.prototype);
|
|
47
|
+
this.Message = opts.Message;
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
}
|
|
50
|
+
export class InvalidEndpointException extends __BaseException {
|
|
51
|
+
constructor(opts) {
|
|
52
|
+
super({
|
|
53
|
+
name: "InvalidEndpointException",
|
|
54
|
+
$fault: "client",
|
|
55
|
+
...opts,
|
|
56
|
+
});
|
|
57
|
+
this.name = "InvalidEndpointException";
|
|
58
|
+
this.$fault = "client";
|
|
59
|
+
Object.setPrototypeOf(this, InvalidEndpointException.prototype);
|
|
60
|
+
this.Message = opts.Message;
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
}
|
|
63
|
+
export class NotAuthorizedException extends __BaseException {
|
|
64
|
+
constructor(opts) {
|
|
65
|
+
super({
|
|
66
|
+
name: "NotAuthorizedException",
|
|
67
|
+
$fault: "client",
|
|
68
|
+
...opts,
|
|
69
|
+
});
|
|
70
|
+
this.name = "NotAuthorizedException";
|
|
71
|
+
this.$fault = "client";
|
|
72
|
+
Object.setPrototypeOf(this, NotAuthorizedException.prototype);
|
|
73
|
+
this.Message = opts.Message;
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
}
|
|
76
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
77
|
+
constructor(opts) {
|
|
78
|
+
super({
|
|
79
|
+
name: "ResourceNotFoundException",
|
|
80
|
+
$fault: "client",
|
|
81
|
+
...opts,
|
|
82
|
+
});
|
|
83
|
+
this.name = "ResourceNotFoundException";
|
|
84
|
+
this.$fault = "client";
|
|
85
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
86
|
+
this.Message = opts.Message;
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
export
|
|
92
|
-
|
|
88
|
+
}
|
|
89
|
+
export const StartSelectorFilterSensitiveLog = (obj) => ({
|
|
90
|
+
...obj,
|
|
91
|
+
});
|
|
92
|
+
export const GetMediaInputFilterSensitiveLog = (obj) => ({
|
|
93
|
+
...obj,
|
|
94
|
+
});
|
|
95
|
+
export const GetMediaOutputFilterSensitiveLog = (obj) => ({
|
|
96
|
+
...obj,
|
|
97
|
+
});
|
|
@@ -1,229 +1,192 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { KinesisVideoMediaServiceException as __BaseException } from "../models/KinesisVideoMediaServiceException";
|
|
5
4
|
import { ClientLimitExceededException, ConnectionLimitExceededException, InvalidArgumentException, InvalidEndpointException, NotAuthorizedException, ResourceNotFoundException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})), (input.StreamARN != null && { StreamARN: input.StreamARN })), (input.StreamName != null && { StreamName: input.StreamName })));
|
|
20
|
-
return [2, new __HttpRequest({
|
|
21
|
-
protocol: protocol,
|
|
22
|
-
hostname: hostname,
|
|
23
|
-
port: port,
|
|
24
|
-
method: "POST",
|
|
25
|
-
headers: headers,
|
|
26
|
-
path: resolvedPath,
|
|
27
|
-
body: body,
|
|
28
|
-
})];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}); };
|
|
32
|
-
export var deserializeAws_restJson1GetMediaCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
33
|
-
var contents, data;
|
|
34
|
-
return __generator(this, function (_a) {
|
|
35
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
36
|
-
return [2, deserializeAws_restJson1GetMediaCommandError(output, context)];
|
|
37
|
-
}
|
|
38
|
-
contents = map({
|
|
39
|
-
$metadata: deserializeMetadata(output),
|
|
40
|
-
ContentType: [, output.headers["content-type"]],
|
|
41
|
-
});
|
|
42
|
-
data = output.body;
|
|
43
|
-
contents.Payload = data;
|
|
44
|
-
return [2, contents];
|
|
5
|
+
export const serializeAws_restJson1GetMediaCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getMedia";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify({
|
|
13
|
+
...(input.StartSelector != null && {
|
|
14
|
+
StartSelector: serializeAws_restJson1StartSelector(input.StartSelector, context),
|
|
15
|
+
}),
|
|
16
|
+
...(input.StreamARN != null && { StreamARN: input.StreamARN }),
|
|
17
|
+
...(input.StreamName != null && { StreamName: input.StreamName }),
|
|
45
18
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
_c = {};
|
|
55
|
-
return [4, parseErrorBody(output.body, context)];
|
|
56
|
-
case 1:
|
|
57
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
58
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
59
|
-
_b = errorCode;
|
|
60
|
-
switch (_b) {
|
|
61
|
-
case "ClientLimitExceededException": return [3, 2];
|
|
62
|
-
case "com.amazonaws.kinesisvideomedia#ClientLimitExceededException": return [3, 2];
|
|
63
|
-
case "ConnectionLimitExceededException": return [3, 4];
|
|
64
|
-
case "com.amazonaws.kinesisvideomedia#ConnectionLimitExceededException": return [3, 4];
|
|
65
|
-
case "InvalidArgumentException": return [3, 6];
|
|
66
|
-
case "com.amazonaws.kinesisvideomedia#InvalidArgumentException": return [3, 6];
|
|
67
|
-
case "InvalidEndpointException": return [3, 8];
|
|
68
|
-
case "com.amazonaws.kinesisvideomedia#InvalidEndpointException": return [3, 8];
|
|
69
|
-
case "NotAuthorizedException": return [3, 10];
|
|
70
|
-
case "com.amazonaws.kinesisvideomedia#NotAuthorizedException": return [3, 10];
|
|
71
|
-
case "ResourceNotFoundException": return [3, 12];
|
|
72
|
-
case "com.amazonaws.kinesisvideomedia#ResourceNotFoundException": return [3, 12];
|
|
73
|
-
}
|
|
74
|
-
return [3, 14];
|
|
75
|
-
case 2: return [4, deserializeAws_restJson1ClientLimitExceededExceptionResponse(parsedOutput, context)];
|
|
76
|
-
case 3: throw _d.sent();
|
|
77
|
-
case 4: return [4, deserializeAws_restJson1ConnectionLimitExceededExceptionResponse(parsedOutput, context)];
|
|
78
|
-
case 5: throw _d.sent();
|
|
79
|
-
case 6: return [4, deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context)];
|
|
80
|
-
case 7: throw _d.sent();
|
|
81
|
-
case 8: return [4, deserializeAws_restJson1InvalidEndpointExceptionResponse(parsedOutput, context)];
|
|
82
|
-
case 9: throw _d.sent();
|
|
83
|
-
case 10: return [4, deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context)];
|
|
84
|
-
case 11: throw _d.sent();
|
|
85
|
-
case 12: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
86
|
-
case 13: throw _d.sent();
|
|
87
|
-
case 14:
|
|
88
|
-
parsedBody = parsedOutput.body;
|
|
89
|
-
throwDefaultError({
|
|
90
|
-
output: output,
|
|
91
|
-
parsedBody: parsedBody,
|
|
92
|
-
exceptionCtor: __BaseException,
|
|
93
|
-
errorCode: errorCode,
|
|
94
|
-
});
|
|
95
|
-
_d.label = 15;
|
|
96
|
-
case 15: return [2];
|
|
97
|
-
}
|
|
19
|
+
return new __HttpRequest({
|
|
20
|
+
protocol,
|
|
21
|
+
hostname,
|
|
22
|
+
port,
|
|
23
|
+
method: "POST",
|
|
24
|
+
headers,
|
|
25
|
+
path: resolvedPath,
|
|
26
|
+
body,
|
|
98
27
|
});
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
contents.Message = __expectString(data.Message);
|
|
108
|
-
}
|
|
109
|
-
exception = new ClientLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
110
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
28
|
+
};
|
|
29
|
+
export const deserializeAws_restJson1GetMediaCommand = async (output, context) => {
|
|
30
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31
|
+
return deserializeAws_restJson1GetMediaCommandError(output, context);
|
|
32
|
+
}
|
|
33
|
+
const contents = map({
|
|
34
|
+
$metadata: deserializeMetadata(output),
|
|
35
|
+
ContentType: [, output.headers["content-type"]],
|
|
111
36
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
37
|
+
const data = output.body;
|
|
38
|
+
contents.Payload = data;
|
|
39
|
+
return contents;
|
|
40
|
+
};
|
|
41
|
+
const deserializeAws_restJson1GetMediaCommandError = async (output, context) => {
|
|
42
|
+
const parsedOutput = {
|
|
43
|
+
...output,
|
|
44
|
+
body: await parseErrorBody(output.body, context),
|
|
45
|
+
};
|
|
46
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
47
|
+
switch (errorCode) {
|
|
48
|
+
case "ClientLimitExceededException":
|
|
49
|
+
case "com.amazonaws.kinesisvideomedia#ClientLimitExceededException":
|
|
50
|
+
throw await deserializeAws_restJson1ClientLimitExceededExceptionResponse(parsedOutput, context);
|
|
51
|
+
case "ConnectionLimitExceededException":
|
|
52
|
+
case "com.amazonaws.kinesisvideomedia#ConnectionLimitExceededException":
|
|
53
|
+
throw await deserializeAws_restJson1ConnectionLimitExceededExceptionResponse(parsedOutput, context);
|
|
54
|
+
case "InvalidArgumentException":
|
|
55
|
+
case "com.amazonaws.kinesisvideomedia#InvalidArgumentException":
|
|
56
|
+
throw await deserializeAws_restJson1InvalidArgumentExceptionResponse(parsedOutput, context);
|
|
57
|
+
case "InvalidEndpointException":
|
|
58
|
+
case "com.amazonaws.kinesisvideomedia#InvalidEndpointException":
|
|
59
|
+
throw await deserializeAws_restJson1InvalidEndpointExceptionResponse(parsedOutput, context);
|
|
60
|
+
case "NotAuthorizedException":
|
|
61
|
+
case "com.amazonaws.kinesisvideomedia#NotAuthorizedException":
|
|
62
|
+
throw await deserializeAws_restJson1NotAuthorizedExceptionResponse(parsedOutput, context);
|
|
63
|
+
case "ResourceNotFoundException":
|
|
64
|
+
case "com.amazonaws.kinesisvideomedia#ResourceNotFoundException":
|
|
65
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
66
|
+
default:
|
|
67
|
+
const parsedBody = parsedOutput.body;
|
|
68
|
+
throwDefaultError({
|
|
69
|
+
output,
|
|
70
|
+
parsedBody,
|
|
71
|
+
exceptionCtor: __BaseException,
|
|
72
|
+
errorCode,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const map = __map;
|
|
77
|
+
const deserializeAws_restJson1ClientLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
78
|
+
const contents = map({});
|
|
79
|
+
const data = parsedOutput.body;
|
|
80
|
+
if (data.Message != null) {
|
|
81
|
+
contents.Message = __expectString(data.Message);
|
|
82
|
+
}
|
|
83
|
+
const exception = new ClientLimitExceededException({
|
|
84
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
85
|
+
...contents,
|
|
123
86
|
});
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
87
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
88
|
+
};
|
|
89
|
+
const deserializeAws_restJson1ConnectionLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
90
|
+
const contents = map({});
|
|
91
|
+
const data = parsedOutput.body;
|
|
92
|
+
if (data.Message != null) {
|
|
93
|
+
contents.Message = __expectString(data.Message);
|
|
94
|
+
}
|
|
95
|
+
const exception = new ConnectionLimitExceededException({
|
|
96
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
97
|
+
...contents,
|
|
135
98
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
99
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
100
|
+
};
|
|
101
|
+
const deserializeAws_restJson1InvalidArgumentExceptionResponse = async (parsedOutput, context) => {
|
|
102
|
+
const contents = map({});
|
|
103
|
+
const data = parsedOutput.body;
|
|
104
|
+
if (data.Message != null) {
|
|
105
|
+
contents.Message = __expectString(data.Message);
|
|
106
|
+
}
|
|
107
|
+
const exception = new InvalidArgumentException({
|
|
108
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
109
|
+
...contents,
|
|
147
110
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
111
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
112
|
+
};
|
|
113
|
+
const deserializeAws_restJson1InvalidEndpointExceptionResponse = async (parsedOutput, context) => {
|
|
114
|
+
const contents = map({});
|
|
115
|
+
const data = parsedOutput.body;
|
|
116
|
+
if (data.Message != null) {
|
|
117
|
+
contents.Message = __expectString(data.Message);
|
|
118
|
+
}
|
|
119
|
+
const exception = new InvalidEndpointException({
|
|
120
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
121
|
+
...contents,
|
|
159
122
|
});
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
123
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
124
|
+
};
|
|
125
|
+
const deserializeAws_restJson1NotAuthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
126
|
+
const contents = map({});
|
|
127
|
+
const data = parsedOutput.body;
|
|
128
|
+
if (data.Message != null) {
|
|
129
|
+
contents.Message = __expectString(data.Message);
|
|
130
|
+
}
|
|
131
|
+
const exception = new NotAuthorizedException({
|
|
132
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
133
|
+
...contents,
|
|
171
134
|
});
|
|
172
|
-
|
|
173
|
-
var serializeAws_restJson1StartSelector = function (input, context) {
|
|
174
|
-
return __assign(__assign(__assign(__assign({}, (input.AfterFragmentNumber != null && { AfterFragmentNumber: input.AfterFragmentNumber })), (input.ContinuationToken != null && { ContinuationToken: input.ContinuationToken })), (input.StartSelectorType != null && { StartSelectorType: input.StartSelectorType })), (input.StartTimestamp != null && { StartTimestamp: Math.round(input.StartTimestamp.getTime() / 1000) }));
|
|
135
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
175
136
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
137
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
138
|
+
const contents = map({});
|
|
139
|
+
const data = parsedOutput.body;
|
|
140
|
+
if (data.Message != null) {
|
|
141
|
+
contents.Message = __expectString(data.Message);
|
|
142
|
+
}
|
|
143
|
+
const exception = new ResourceNotFoundException({
|
|
144
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
145
|
+
...contents,
|
|
183
146
|
});
|
|
147
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
184
148
|
};
|
|
185
|
-
|
|
186
|
-
|
|
149
|
+
const serializeAws_restJson1StartSelector = (input, context) => {
|
|
150
|
+
return {
|
|
151
|
+
...(input.AfterFragmentNumber != null && { AfterFragmentNumber: input.AfterFragmentNumber }),
|
|
152
|
+
...(input.ContinuationToken != null && { ContinuationToken: input.ContinuationToken }),
|
|
153
|
+
...(input.StartSelectorType != null && { StartSelectorType: input.StartSelectorType }),
|
|
154
|
+
...(input.StartTimestamp != null && { StartTimestamp: Math.round(input.StartTimestamp.getTime() / 1000) }),
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
const deserializeMetadata = (output) => ({
|
|
158
|
+
httpStatusCode: output.statusCode,
|
|
159
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
160
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
161
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
162
|
+
});
|
|
163
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
187
164
|
if (streamBody instanceof Uint8Array) {
|
|
188
165
|
return Promise.resolve(streamBody);
|
|
189
166
|
}
|
|
190
167
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
191
168
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
});
|
|
169
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
170
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
171
|
+
value !== null &&
|
|
172
|
+
value !== "" &&
|
|
173
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
174
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
175
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
176
|
+
if (encoded.length) {
|
|
177
|
+
return JSON.parse(encoded);
|
|
178
|
+
}
|
|
179
|
+
return {};
|
|
180
|
+
});
|
|
181
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
182
|
+
const value = await parseBody(errorBody, context);
|
|
183
|
+
value.message = value.message ?? value.Message;
|
|
184
|
+
return value;
|
|
209
185
|
};
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
switch (_b.label) {
|
|
215
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
216
|
-
case 1:
|
|
217
|
-
value = _b.sent();
|
|
218
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
219
|
-
return [2, value];
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
}); };
|
|
223
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
224
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
225
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
226
|
-
var cleanValue = rawValue;
|
|
186
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
187
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
188
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
189
|
+
let cleanValue = rawValue;
|
|
227
190
|
if (typeof cleanValue === "number") {
|
|
228
191
|
cleanValue = cleanValue.toString();
|
|
229
192
|
}
|
|
@@ -238,7 +201,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
238
201
|
}
|
|
239
202
|
return cleanValue;
|
|
240
203
|
};
|
|
241
|
-
|
|
204
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
242
205
|
if (headerKey !== undefined) {
|
|
243
206
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
244
207
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
3
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
@@ -12,15 +11,30 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
|
12
11
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
12
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
13
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
export const getRuntimeConfig = (config) => {
|
|
15
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
|
+
return {
|
|
19
|
+
...clientSharedValues,
|
|
20
|
+
...config,
|
|
21
|
+
runtime: "browser",
|
|
22
|
+
defaultsMode,
|
|
23
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
24
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
25
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
26
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
28
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
30
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
31
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
32
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
33
|
+
sha256: config?.sha256 ?? Sha256,
|
|
34
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
35
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
39
|
+
};
|
|
26
40
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
3
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
@@ -15,16 +14,35 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
|
|
|
15
14
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
15
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
17
16
|
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
18
|
-
export
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
export const getRuntimeConfig = (config) => {
|
|
20
18
|
emitWarningIfUnsupportedVersion(process.version);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
21
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
22
|
+
return {
|
|
23
|
+
...clientSharedValues,
|
|
24
|
+
...config,
|
|
25
|
+
runtime: "node",
|
|
26
|
+
defaultsMode,
|
|
27
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
28
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
29
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
30
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
31
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
32
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
33
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
34
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
35
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: config?.retryMode ??
|
|
37
|
+
loadNodeConfig({
|
|
38
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
39
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
40
|
+
}),
|
|
41
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
42
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
43
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
44
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
45
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
46
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
47
|
+
};
|
|
30
48
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
3
2
|
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
8
11
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { parseUrl } from "@aws-sdk/url-parser";
|
|
2
2
|
import { defaultRegionInfoProvider } from "./endpoints";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
|
|
12
|
-
});
|
|
13
|
-
};
|
|
3
|
+
export const getRuntimeConfig = (config) => ({
|
|
4
|
+
apiVersion: "2017-09-30",
|
|
5
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
6
|
+
logger: config?.logger ?? {},
|
|
7
|
+
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
|
|
8
|
+
serviceId: config?.serviceId ?? "Kinesis Video Media",
|
|
9
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
10
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-kinesis-video-media",
|
|
3
3
|
"description": "AWS SDK for JavaScript Kinesis Video Media Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.183.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -19,41 +19,41 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
21
21
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
22
|
-
"@aws-sdk/client-sts": "3.
|
|
23
|
-
"@aws-sdk/config-resolver": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
26
|
-
"@aws-sdk/hash-node": "3.
|
|
27
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
28
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
29
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
30
|
-
"@aws-sdk/middleware-logger": "3.
|
|
31
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
32
|
-
"@aws-sdk/middleware-retry": "3.
|
|
33
|
-
"@aws-sdk/middleware-serde": "3.
|
|
34
|
-
"@aws-sdk/middleware-signing": "3.
|
|
35
|
-
"@aws-sdk/middleware-stack": "3.
|
|
36
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
37
|
-
"@aws-sdk/node-config-provider": "3.
|
|
38
|
-
"@aws-sdk/node-http-handler": "3.
|
|
39
|
-
"@aws-sdk/protocol-http": "3.
|
|
40
|
-
"@aws-sdk/smithy-client": "3.
|
|
41
|
-
"@aws-sdk/types": "3.
|
|
42
|
-
"@aws-sdk/url-parser": "3.
|
|
43
|
-
"@aws-sdk/util-base64-browser": "3.
|
|
44
|
-
"@aws-sdk/util-base64-node": "3.
|
|
45
|
-
"@aws-sdk/util-body-length-browser": "3.
|
|
46
|
-
"@aws-sdk/util-body-length-node": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
48
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
50
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
51
|
-
"@aws-sdk/util-utf8-browser": "3.
|
|
52
|
-
"@aws-sdk/util-utf8-node": "3.
|
|
22
|
+
"@aws-sdk/client-sts": "3.183.0",
|
|
23
|
+
"@aws-sdk/config-resolver": "3.183.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.183.0",
|
|
25
|
+
"@aws-sdk/fetch-http-handler": "3.183.0",
|
|
26
|
+
"@aws-sdk/hash-node": "3.183.0",
|
|
27
|
+
"@aws-sdk/invalid-dependency": "3.183.0",
|
|
28
|
+
"@aws-sdk/middleware-content-length": "3.183.0",
|
|
29
|
+
"@aws-sdk/middleware-host-header": "3.183.0",
|
|
30
|
+
"@aws-sdk/middleware-logger": "3.183.0",
|
|
31
|
+
"@aws-sdk/middleware-recursion-detection": "3.183.0",
|
|
32
|
+
"@aws-sdk/middleware-retry": "3.183.0",
|
|
33
|
+
"@aws-sdk/middleware-serde": "3.183.0",
|
|
34
|
+
"@aws-sdk/middleware-signing": "3.183.0",
|
|
35
|
+
"@aws-sdk/middleware-stack": "3.183.0",
|
|
36
|
+
"@aws-sdk/middleware-user-agent": "3.183.0",
|
|
37
|
+
"@aws-sdk/node-config-provider": "3.183.0",
|
|
38
|
+
"@aws-sdk/node-http-handler": "3.183.0",
|
|
39
|
+
"@aws-sdk/protocol-http": "3.183.0",
|
|
40
|
+
"@aws-sdk/smithy-client": "3.183.0",
|
|
41
|
+
"@aws-sdk/types": "3.183.0",
|
|
42
|
+
"@aws-sdk/url-parser": "3.183.0",
|
|
43
|
+
"@aws-sdk/util-base64-browser": "3.183.0",
|
|
44
|
+
"@aws-sdk/util-base64-node": "3.183.0",
|
|
45
|
+
"@aws-sdk/util-body-length-browser": "3.183.0",
|
|
46
|
+
"@aws-sdk/util-body-length-node": "3.183.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-browser": "3.183.0",
|
|
48
|
+
"@aws-sdk/util-defaults-mode-node": "3.183.0",
|
|
49
|
+
"@aws-sdk/util-user-agent-browser": "3.183.0",
|
|
50
|
+
"@aws-sdk/util-user-agent-node": "3.183.0",
|
|
51
|
+
"@aws-sdk/util-utf8-browser": "3.183.0",
|
|
52
|
+
"@aws-sdk/util-utf8-node": "3.183.0",
|
|
53
53
|
"tslib": "^2.3.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@aws-sdk/service-client-documentation-generator": "3.
|
|
56
|
+
"@aws-sdk/service-client-documentation-generator": "3.183.0",
|
|
57
57
|
"@tsconfig/recommended": "1.0.1",
|
|
58
58
|
"@types/node": "^12.7.5",
|
|
59
59
|
"concurrently": "7.0.0",
|