@aws-sdk/client-kinesis-video-media 3.141.0 → 3.142.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 +22 -28
- package/dist-es/protocols/Aws_restJson1.js +26 -29
- package/package.json +6 -6
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.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -34,17 +34,13 @@ const deserializeAws_restJson1GetMediaCommand = async (output, context) => {
|
|
|
34
34
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
35
35
|
return deserializeAws_restJson1GetMediaCommandError(output, context);
|
|
36
36
|
}
|
|
37
|
-
const contents = {
|
|
37
|
+
const contents = map({
|
|
38
38
|
$metadata: deserializeMetadata(output),
|
|
39
|
-
ContentType:
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
if (output.headers["content-type"] !== undefined) {
|
|
43
|
-
contents.ContentType = output.headers["content-type"];
|
|
44
|
-
}
|
|
39
|
+
ContentType: [, output.headers["content-type"]],
|
|
40
|
+
});
|
|
45
41
|
const data = output.body;
|
|
46
42
|
contents.Payload = data;
|
|
47
|
-
return
|
|
43
|
+
return contents;
|
|
48
44
|
};
|
|
49
45
|
exports.deserializeAws_restJson1GetMediaCommand = deserializeAws_restJson1GetMediaCommand;
|
|
50
46
|
const deserializeAws_restJson1GetMediaCommandError = async (output, context) => {
|
|
@@ -52,7 +48,6 @@ const deserializeAws_restJson1GetMediaCommandError = async (output, context) =>
|
|
|
52
48
|
...output,
|
|
53
49
|
body: await parseBody(output.body, context),
|
|
54
50
|
};
|
|
55
|
-
let response;
|
|
56
51
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
57
52
|
switch (errorCode) {
|
|
58
53
|
case "ClientLimitExceededException":
|
|
@@ -75,20 +70,19 @@ const deserializeAws_restJson1GetMediaCommandError = async (output, context) =>
|
|
|
75
70
|
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
76
71
|
default:
|
|
77
72
|
const parsedBody = parsedOutput.body;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
$metadata,
|
|
73
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
74
|
+
output,
|
|
75
|
+
parsedBody,
|
|
76
|
+
exceptionCtor: KinesisVideoMediaServiceException_1.KinesisVideoMediaServiceException,
|
|
77
|
+
errorCode,
|
|
84
78
|
});
|
|
85
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
86
79
|
}
|
|
87
80
|
};
|
|
81
|
+
const map = smithy_client_1.map;
|
|
88
82
|
const deserializeAws_restJson1ClientLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
89
|
-
const contents = {};
|
|
83
|
+
const contents = map({});
|
|
90
84
|
const data = parsedOutput.body;
|
|
91
|
-
if (data.Message
|
|
85
|
+
if (data.Message != null) {
|
|
92
86
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
93
87
|
}
|
|
94
88
|
const exception = new models_0_1.ClientLimitExceededException({
|
|
@@ -98,9 +92,9 @@ const deserializeAws_restJson1ClientLimitExceededExceptionResponse = async (pars
|
|
|
98
92
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
99
93
|
};
|
|
100
94
|
const deserializeAws_restJson1ConnectionLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
101
|
-
const contents = {};
|
|
95
|
+
const contents = map({});
|
|
102
96
|
const data = parsedOutput.body;
|
|
103
|
-
if (data.Message
|
|
97
|
+
if (data.Message != null) {
|
|
104
98
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
105
99
|
}
|
|
106
100
|
const exception = new models_0_1.ConnectionLimitExceededException({
|
|
@@ -110,9 +104,9 @@ const deserializeAws_restJson1ConnectionLimitExceededExceptionResponse = async (
|
|
|
110
104
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
111
105
|
};
|
|
112
106
|
const deserializeAws_restJson1InvalidArgumentExceptionResponse = async (parsedOutput, context) => {
|
|
113
|
-
const contents = {};
|
|
107
|
+
const contents = map({});
|
|
114
108
|
const data = parsedOutput.body;
|
|
115
|
-
if (data.Message
|
|
109
|
+
if (data.Message != null) {
|
|
116
110
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
117
111
|
}
|
|
118
112
|
const exception = new models_0_1.InvalidArgumentException({
|
|
@@ -122,9 +116,9 @@ const deserializeAws_restJson1InvalidArgumentExceptionResponse = async (parsedOu
|
|
|
122
116
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
123
117
|
};
|
|
124
118
|
const deserializeAws_restJson1InvalidEndpointExceptionResponse = async (parsedOutput, context) => {
|
|
125
|
-
const contents = {};
|
|
119
|
+
const contents = map({});
|
|
126
120
|
const data = parsedOutput.body;
|
|
127
|
-
if (data.Message
|
|
121
|
+
if (data.Message != null) {
|
|
128
122
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
129
123
|
}
|
|
130
124
|
const exception = new models_0_1.InvalidEndpointException({
|
|
@@ -134,9 +128,9 @@ const deserializeAws_restJson1InvalidEndpointExceptionResponse = async (parsedOu
|
|
|
134
128
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
135
129
|
};
|
|
136
130
|
const deserializeAws_restJson1NotAuthorizedExceptionResponse = async (parsedOutput, context) => {
|
|
137
|
-
const contents = {};
|
|
131
|
+
const contents = map({});
|
|
138
132
|
const data = parsedOutput.body;
|
|
139
|
-
if (data.Message
|
|
133
|
+
if (data.Message != null) {
|
|
140
134
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
141
135
|
}
|
|
142
136
|
const exception = new models_0_1.NotAuthorizedException({
|
|
@@ -146,9 +140,9 @@ const deserializeAws_restJson1NotAuthorizedExceptionResponse = async (parsedOutp
|
|
|
146
140
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
147
141
|
};
|
|
148
142
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
149
|
-
const contents = {};
|
|
143
|
+
const contents = map({});
|
|
150
144
|
const data = parsedOutput.body;
|
|
151
|
-
if (data.Message
|
|
145
|
+
if (data.Message != null) {
|
|
152
146
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
153
147
|
}
|
|
154
148
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { decorateServiceException as __decorateServiceException, expectString as __expectString, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { KinesisVideoMediaServiceException as __BaseException } from "../models/KinesisVideoMediaServiceException";
|
|
5
5
|
import { ClientLimitExceededException, ConnectionLimitExceededException, InvalidArgumentException, InvalidEndpointException, NotAuthorizedException, ResourceNotFoundException, } from "../models/models_0";
|
|
6
6
|
export var serializeAws_restJson1GetMediaCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -35,21 +35,17 @@ export var deserializeAws_restJson1GetMediaCommand = function (output, context)
|
|
|
35
35
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
36
36
|
return [2, deserializeAws_restJson1GetMediaCommandError(output, context)];
|
|
37
37
|
}
|
|
38
|
-
contents = {
|
|
38
|
+
contents = map({
|
|
39
39
|
$metadata: deserializeMetadata(output),
|
|
40
|
-
ContentType:
|
|
41
|
-
|
|
42
|
-
};
|
|
43
|
-
if (output.headers["content-type"] !== undefined) {
|
|
44
|
-
contents.ContentType = output.headers["content-type"];
|
|
45
|
-
}
|
|
40
|
+
ContentType: [, output.headers["content-type"]],
|
|
41
|
+
});
|
|
46
42
|
data = output.body;
|
|
47
43
|
contents.Payload = data;
|
|
48
|
-
return [2,
|
|
44
|
+
return [2, contents];
|
|
49
45
|
});
|
|
50
46
|
}); };
|
|
51
47
|
var deserializeAws_restJson1GetMediaCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
52
|
-
var parsedOutput, _a,
|
|
48
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
53
49
|
var _c;
|
|
54
50
|
return __generator(this, function (_d) {
|
|
55
51
|
switch (_d.label) {
|
|
@@ -90,23 +86,24 @@ var deserializeAws_restJson1GetMediaCommandError = function (output, context) {
|
|
|
90
86
|
case 13: throw _d.sent();
|
|
91
87
|
case 14:
|
|
92
88
|
parsedBody = parsedOutput.body;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
$metadata: $metadata,
|
|
89
|
+
throwDefaultError({
|
|
90
|
+
output: output,
|
|
91
|
+
parsedBody: parsedBody,
|
|
92
|
+
exceptionCtor: __BaseException,
|
|
93
|
+
errorCode: errorCode,
|
|
99
94
|
});
|
|
100
|
-
|
|
95
|
+
_d.label = 15;
|
|
96
|
+
case 15: return [2];
|
|
101
97
|
}
|
|
102
98
|
});
|
|
103
99
|
}); };
|
|
100
|
+
var map = __map;
|
|
104
101
|
var deserializeAws_restJson1ClientLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
105
102
|
var contents, data, exception;
|
|
106
103
|
return __generator(this, function (_a) {
|
|
107
|
-
contents = {};
|
|
104
|
+
contents = map({});
|
|
108
105
|
data = parsedOutput.body;
|
|
109
|
-
if (data.Message
|
|
106
|
+
if (data.Message != null) {
|
|
110
107
|
contents.Message = __expectString(data.Message);
|
|
111
108
|
}
|
|
112
109
|
exception = new ClientLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -116,9 +113,9 @@ var deserializeAws_restJson1ClientLimitExceededExceptionResponse = function (par
|
|
|
116
113
|
var deserializeAws_restJson1ConnectionLimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
117
114
|
var contents, data, exception;
|
|
118
115
|
return __generator(this, function (_a) {
|
|
119
|
-
contents = {};
|
|
116
|
+
contents = map({});
|
|
120
117
|
data = parsedOutput.body;
|
|
121
|
-
if (data.Message
|
|
118
|
+
if (data.Message != null) {
|
|
122
119
|
contents.Message = __expectString(data.Message);
|
|
123
120
|
}
|
|
124
121
|
exception = new ConnectionLimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -128,9 +125,9 @@ var deserializeAws_restJson1ConnectionLimitExceededExceptionResponse = function
|
|
|
128
125
|
var deserializeAws_restJson1InvalidArgumentExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
129
126
|
var contents, data, exception;
|
|
130
127
|
return __generator(this, function (_a) {
|
|
131
|
-
contents = {};
|
|
128
|
+
contents = map({});
|
|
132
129
|
data = parsedOutput.body;
|
|
133
|
-
if (data.Message
|
|
130
|
+
if (data.Message != null) {
|
|
134
131
|
contents.Message = __expectString(data.Message);
|
|
135
132
|
}
|
|
136
133
|
exception = new InvalidArgumentException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -140,9 +137,9 @@ var deserializeAws_restJson1InvalidArgumentExceptionResponse = function (parsedO
|
|
|
140
137
|
var deserializeAws_restJson1InvalidEndpointExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
141
138
|
var contents, data, exception;
|
|
142
139
|
return __generator(this, function (_a) {
|
|
143
|
-
contents = {};
|
|
140
|
+
contents = map({});
|
|
144
141
|
data = parsedOutput.body;
|
|
145
|
-
if (data.Message
|
|
142
|
+
if (data.Message != null) {
|
|
146
143
|
contents.Message = __expectString(data.Message);
|
|
147
144
|
}
|
|
148
145
|
exception = new InvalidEndpointException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -152,9 +149,9 @@ var deserializeAws_restJson1InvalidEndpointExceptionResponse = function (parsedO
|
|
|
152
149
|
var deserializeAws_restJson1NotAuthorizedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
153
150
|
var contents, data, exception;
|
|
154
151
|
return __generator(this, function (_a) {
|
|
155
|
-
contents = {};
|
|
152
|
+
contents = map({});
|
|
156
153
|
data = parsedOutput.body;
|
|
157
|
-
if (data.Message
|
|
154
|
+
if (data.Message != null) {
|
|
158
155
|
contents.Message = __expectString(data.Message);
|
|
159
156
|
}
|
|
160
157
|
exception = new NotAuthorizedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -164,9 +161,9 @@ var deserializeAws_restJson1NotAuthorizedExceptionResponse = function (parsedOut
|
|
|
164
161
|
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
165
162
|
var contents, data, exception;
|
|
166
163
|
return __generator(this, function (_a) {
|
|
167
|
-
contents = {};
|
|
164
|
+
contents = map({});
|
|
168
165
|
data = parsedOutput.body;
|
|
169
|
-
if (data.Message
|
|
166
|
+
if (data.Message != null) {
|
|
170
167
|
contents.Message = __expectString(data.Message);
|
|
171
168
|
}
|
|
172
169
|
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
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.142.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",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.142.0",
|
|
22
22
|
"@aws-sdk/config-resolver": "3.130.0",
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.142.0",
|
|
24
24
|
"@aws-sdk/fetch-http-handler": "3.131.0",
|
|
25
25
|
"@aws-sdk/hash-node": "3.127.0",
|
|
26
26
|
"@aws-sdk/invalid-dependency": "3.127.0",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"@aws-sdk/node-config-provider": "3.127.0",
|
|
37
37
|
"@aws-sdk/node-http-handler": "3.127.0",
|
|
38
38
|
"@aws-sdk/protocol-http": "3.127.0",
|
|
39
|
-
"@aws-sdk/smithy-client": "3.
|
|
39
|
+
"@aws-sdk/smithy-client": "3.142.0",
|
|
40
40
|
"@aws-sdk/types": "3.127.0",
|
|
41
41
|
"@aws-sdk/url-parser": "3.127.0",
|
|
42
42
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
43
43
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
44
44
|
"@aws-sdk/util-body-length-browser": "3.55.0",
|
|
45
45
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
46
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
46
|
+
"@aws-sdk/util-defaults-mode-browser": "3.142.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-node": "3.142.0",
|
|
48
48
|
"@aws-sdk/util-user-agent-browser": "3.127.0",
|
|
49
49
|
"@aws-sdk/util-user-agent-node": "3.127.0",
|
|
50
50
|
"@aws-sdk/util-utf8-browser": "3.109.0",
|