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