@aws-sdk/client-kinesis-video-media 3.310.0 → 3.315.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.
|
@@ -12,11 +12,11 @@ const se_GetMediaCommand = async (input, context) => {
|
|
|
12
12
|
};
|
|
13
13
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getMedia";
|
|
14
14
|
let body;
|
|
15
|
-
body = JSON.stringify({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
15
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
+
StartSelector: (_) => se_StartSelector(_, context),
|
|
17
|
+
StreamARN: [],
|
|
18
|
+
StreamName: [],
|
|
19
|
+
}));
|
|
20
20
|
return new protocol_http_1.HttpRequest({
|
|
21
21
|
protocol,
|
|
22
22
|
hostname,
|
|
@@ -32,7 +32,7 @@ const de_GetMediaCommand = async (output, context) => {
|
|
|
32
32
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
33
33
|
return de_GetMediaCommandError(output, context);
|
|
34
34
|
}
|
|
35
|
-
const contents = map({
|
|
35
|
+
const contents = (0, smithy_client_1.map)({
|
|
36
36
|
$metadata: deserializeMetadata(output),
|
|
37
37
|
ContentType: [, output.headers["content-type"]],
|
|
38
38
|
});
|
|
@@ -69,21 +69,21 @@ const de_GetMediaCommandError = async (output, context) => {
|
|
|
69
69
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
70
70
|
default:
|
|
71
71
|
const parsedBody = parsedOutput.body;
|
|
72
|
-
|
|
72
|
+
return throwDefaultError({
|
|
73
73
|
output,
|
|
74
74
|
parsedBody,
|
|
75
|
-
exceptionCtor: KinesisVideoMediaServiceException_1.KinesisVideoMediaServiceException,
|
|
76
75
|
errorCode,
|
|
77
76
|
});
|
|
78
77
|
}
|
|
79
78
|
};
|
|
80
|
-
const
|
|
79
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(KinesisVideoMediaServiceException_1.KinesisVideoMediaServiceException);
|
|
81
80
|
const de_ClientLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
82
|
-
const contents = map({});
|
|
81
|
+
const contents = (0, smithy_client_1.map)({});
|
|
83
82
|
const data = parsedOutput.body;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
83
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
84
|
+
Message: smithy_client_1.expectString,
|
|
85
|
+
});
|
|
86
|
+
Object.assign(contents, doc);
|
|
87
87
|
const exception = new models_0_1.ClientLimitExceededException({
|
|
88
88
|
$metadata: deserializeMetadata(parsedOutput),
|
|
89
89
|
...contents,
|
|
@@ -91,11 +91,12 @@ const de_ClientLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
91
91
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
92
92
|
};
|
|
93
93
|
const de_ConnectionLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
94
|
-
const contents = map({});
|
|
94
|
+
const contents = (0, smithy_client_1.map)({});
|
|
95
95
|
const data = parsedOutput.body;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
96
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
97
|
+
Message: smithy_client_1.expectString,
|
|
98
|
+
});
|
|
99
|
+
Object.assign(contents, doc);
|
|
99
100
|
const exception = new models_0_1.ConnectionLimitExceededException({
|
|
100
101
|
$metadata: deserializeMetadata(parsedOutput),
|
|
101
102
|
...contents,
|
|
@@ -103,11 +104,12 @@ const de_ConnectionLimitExceededExceptionRes = async (parsedOutput, context) =>
|
|
|
103
104
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
104
105
|
};
|
|
105
106
|
const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
|
|
106
|
-
const contents = map({});
|
|
107
|
+
const contents = (0, smithy_client_1.map)({});
|
|
107
108
|
const data = parsedOutput.body;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
109
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
110
|
+
Message: smithy_client_1.expectString,
|
|
111
|
+
});
|
|
112
|
+
Object.assign(contents, doc);
|
|
111
113
|
const exception = new models_0_1.InvalidArgumentException({
|
|
112
114
|
$metadata: deserializeMetadata(parsedOutput),
|
|
113
115
|
...contents,
|
|
@@ -115,11 +117,12 @@ const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
|
|
|
115
117
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
116
118
|
};
|
|
117
119
|
const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
|
|
118
|
-
const contents = map({});
|
|
120
|
+
const contents = (0, smithy_client_1.map)({});
|
|
119
121
|
const data = parsedOutput.body;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
122
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
123
|
+
Message: smithy_client_1.expectString,
|
|
124
|
+
});
|
|
125
|
+
Object.assign(contents, doc);
|
|
123
126
|
const exception = new models_0_1.InvalidEndpointException({
|
|
124
127
|
$metadata: deserializeMetadata(parsedOutput),
|
|
125
128
|
...contents,
|
|
@@ -127,11 +130,12 @@ const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
|
|
|
127
130
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
128
131
|
};
|
|
129
132
|
const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
|
|
130
|
-
const contents = map({});
|
|
133
|
+
const contents = (0, smithy_client_1.map)({});
|
|
131
134
|
const data = parsedOutput.body;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
136
|
+
Message: smithy_client_1.expectString,
|
|
137
|
+
});
|
|
138
|
+
Object.assign(contents, doc);
|
|
135
139
|
const exception = new models_0_1.NotAuthorizedException({
|
|
136
140
|
$metadata: deserializeMetadata(parsedOutput),
|
|
137
141
|
...contents,
|
|
@@ -139,11 +143,12 @@ const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
|
|
|
139
143
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
140
144
|
};
|
|
141
145
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
142
|
-
const contents = map({});
|
|
146
|
+
const contents = (0, smithy_client_1.map)({});
|
|
143
147
|
const data = parsedOutput.body;
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
148
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
149
|
+
Message: smithy_client_1.expectString,
|
|
150
|
+
});
|
|
151
|
+
Object.assign(contents, doc);
|
|
147
152
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
148
153
|
$metadata: deserializeMetadata(parsedOutput),
|
|
149
154
|
...contents,
|
|
@@ -151,12 +156,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
151
156
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
152
157
|
};
|
|
153
158
|
const se_StartSelector = (input, context) => {
|
|
154
|
-
return {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
};
|
|
159
|
+
return (0, smithy_client_1.take)(input, {
|
|
160
|
+
AfterFragmentNumber: [],
|
|
161
|
+
ContinuationToken: [],
|
|
162
|
+
StartSelectorType: [],
|
|
163
|
+
StartTimestamp: (_) => Math.round(_.getTime() / 1000),
|
|
164
|
+
});
|
|
160
165
|
};
|
|
161
166
|
const deserializeMetadata = (output) => ({
|
|
162
167
|
httpStatusCode: output.statusCode,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectString as __expectString, map
|
|
2
|
+
import { decorateServiceException as __decorateServiceException, expectString as __expectString, map, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { KinesisVideoMediaServiceException as __BaseException } from "../models/KinesisVideoMediaServiceException";
|
|
4
4
|
import { ClientLimitExceededException, ConnectionLimitExceededException, InvalidArgumentException, InvalidEndpointException, NotAuthorizedException, ResourceNotFoundException, } from "../models/models_0";
|
|
5
5
|
export const se_GetMediaCommand = async (input, context) => {
|
|
@@ -9,11 +9,11 @@ export const se_GetMediaCommand = async (input, context) => {
|
|
|
9
9
|
};
|
|
10
10
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getMedia";
|
|
11
11
|
let body;
|
|
12
|
-
body = JSON.stringify({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
12
|
+
body = JSON.stringify(take(input, {
|
|
13
|
+
StartSelector: (_) => se_StartSelector(_, context),
|
|
14
|
+
StreamARN: [],
|
|
15
|
+
StreamName: [],
|
|
16
|
+
}));
|
|
17
17
|
return new __HttpRequest({
|
|
18
18
|
protocol,
|
|
19
19
|
hostname,
|
|
@@ -64,21 +64,21 @@ const de_GetMediaCommandError = async (output, context) => {
|
|
|
64
64
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
65
65
|
default:
|
|
66
66
|
const parsedBody = parsedOutput.body;
|
|
67
|
-
throwDefaultError({
|
|
67
|
+
return throwDefaultError({
|
|
68
68
|
output,
|
|
69
69
|
parsedBody,
|
|
70
|
-
exceptionCtor: __BaseException,
|
|
71
70
|
errorCode,
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
73
|
};
|
|
75
|
-
const
|
|
74
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
76
75
|
const de_ClientLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
77
76
|
const contents = map({});
|
|
78
77
|
const data = parsedOutput.body;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
78
|
+
const doc = take(data, {
|
|
79
|
+
Message: __expectString,
|
|
80
|
+
});
|
|
81
|
+
Object.assign(contents, doc);
|
|
82
82
|
const exception = new ClientLimitExceededException({
|
|
83
83
|
$metadata: deserializeMetadata(parsedOutput),
|
|
84
84
|
...contents,
|
|
@@ -88,9 +88,10 @@ const de_ClientLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
88
88
|
const de_ConnectionLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
89
89
|
const contents = map({});
|
|
90
90
|
const data = parsedOutput.body;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
91
|
+
const doc = take(data, {
|
|
92
|
+
Message: __expectString,
|
|
93
|
+
});
|
|
94
|
+
Object.assign(contents, doc);
|
|
94
95
|
const exception = new ConnectionLimitExceededException({
|
|
95
96
|
$metadata: deserializeMetadata(parsedOutput),
|
|
96
97
|
...contents,
|
|
@@ -100,9 +101,10 @@ const de_ConnectionLimitExceededExceptionRes = async (parsedOutput, context) =>
|
|
|
100
101
|
const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
|
|
101
102
|
const contents = map({});
|
|
102
103
|
const data = parsedOutput.body;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
104
|
+
const doc = take(data, {
|
|
105
|
+
Message: __expectString,
|
|
106
|
+
});
|
|
107
|
+
Object.assign(contents, doc);
|
|
106
108
|
const exception = new InvalidArgumentException({
|
|
107
109
|
$metadata: deserializeMetadata(parsedOutput),
|
|
108
110
|
...contents,
|
|
@@ -112,9 +114,10 @@ const de_InvalidArgumentExceptionRes = async (parsedOutput, context) => {
|
|
|
112
114
|
const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
|
|
113
115
|
const contents = map({});
|
|
114
116
|
const data = parsedOutput.body;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
117
|
+
const doc = take(data, {
|
|
118
|
+
Message: __expectString,
|
|
119
|
+
});
|
|
120
|
+
Object.assign(contents, doc);
|
|
118
121
|
const exception = new InvalidEndpointException({
|
|
119
122
|
$metadata: deserializeMetadata(parsedOutput),
|
|
120
123
|
...contents,
|
|
@@ -124,9 +127,10 @@ const de_InvalidEndpointExceptionRes = async (parsedOutput, context) => {
|
|
|
124
127
|
const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
|
|
125
128
|
const contents = map({});
|
|
126
129
|
const data = parsedOutput.body;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
+
const doc = take(data, {
|
|
131
|
+
Message: __expectString,
|
|
132
|
+
});
|
|
133
|
+
Object.assign(contents, doc);
|
|
130
134
|
const exception = new NotAuthorizedException({
|
|
131
135
|
$metadata: deserializeMetadata(parsedOutput),
|
|
132
136
|
...contents,
|
|
@@ -136,9 +140,10 @@ const de_NotAuthorizedExceptionRes = async (parsedOutput, context) => {
|
|
|
136
140
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
137
141
|
const contents = map({});
|
|
138
142
|
const data = parsedOutput.body;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
143
|
+
const doc = take(data, {
|
|
144
|
+
Message: __expectString,
|
|
145
|
+
});
|
|
146
|
+
Object.assign(contents, doc);
|
|
142
147
|
const exception = new ResourceNotFoundException({
|
|
143
148
|
$metadata: deserializeMetadata(parsedOutput),
|
|
144
149
|
...contents,
|
|
@@ -146,12 +151,12 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
146
151
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
147
152
|
};
|
|
148
153
|
const se_StartSelector = (input, context) => {
|
|
149
|
-
return {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
};
|
|
154
|
+
return take(input, {
|
|
155
|
+
AfterFragmentNumber: [],
|
|
156
|
+
ContinuationToken: [],
|
|
157
|
+
StartSelectorType: [],
|
|
158
|
+
StartTimestamp: (_) => Math.round(_.getTime() / 1000),
|
|
159
|
+
});
|
|
155
160
|
};
|
|
156
161
|
const deserializeMetadata = (output) => ({
|
|
157
162
|
httpStatusCode: output.statusCode,
|
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.315.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",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-stream-browser": "3.310.0",
|