@aws-sdk/client-apigatewaymanagementapi 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 +36 -74
- package/dist-es/protocols/Aws_restJson1.js +49 -78
- 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
|
|
|
@@ -9,16 +9,7 @@ const serializeAws_restJson1DeleteConnectionCommand = async (input, context) =>
|
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
10
|
const headers = {};
|
|
11
11
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/@connections/{ConnectionId}";
|
|
12
|
-
|
|
13
|
-
const labelValue = input.ConnectionId;
|
|
14
|
-
if (labelValue.length <= 0) {
|
|
15
|
-
throw new Error("Empty value provided for input HTTP label: ConnectionId.");
|
|
16
|
-
}
|
|
17
|
-
resolvedPath = resolvedPath.replace("{ConnectionId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("No value provided for input HTTP label: ConnectionId.");
|
|
21
|
-
}
|
|
12
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectionId", () => input.ConnectionId, "{ConnectionId}", false);
|
|
22
13
|
let body;
|
|
23
14
|
return new protocol_http_1.HttpRequest({
|
|
24
15
|
protocol,
|
|
@@ -35,16 +26,7 @@ const serializeAws_restJson1GetConnectionCommand = async (input, context) => {
|
|
|
35
26
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
36
27
|
const headers = {};
|
|
37
28
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/@connections/{ConnectionId}";
|
|
38
|
-
|
|
39
|
-
const labelValue = input.ConnectionId;
|
|
40
|
-
if (labelValue.length <= 0) {
|
|
41
|
-
throw new Error("Empty value provided for input HTTP label: ConnectionId.");
|
|
42
|
-
}
|
|
43
|
-
resolvedPath = resolvedPath.replace("{ConnectionId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
throw new Error("No value provided for input HTTP label: ConnectionId.");
|
|
47
|
-
}
|
|
29
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectionId", () => input.ConnectionId, "{ConnectionId}", false);
|
|
48
30
|
let body;
|
|
49
31
|
return new protocol_http_1.HttpRequest({
|
|
50
32
|
protocol,
|
|
@@ -63,16 +45,7 @@ const serializeAws_restJson1PostToConnectionCommand = async (input, context) =>
|
|
|
63
45
|
"content-type": "application/octet-stream",
|
|
64
46
|
};
|
|
65
47
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/@connections/{ConnectionId}";
|
|
66
|
-
|
|
67
|
-
const labelValue = input.ConnectionId;
|
|
68
|
-
if (labelValue.length <= 0) {
|
|
69
|
-
throw new Error("Empty value provided for input HTTP label: ConnectionId.");
|
|
70
|
-
}
|
|
71
|
-
resolvedPath = resolvedPath.replace("{ConnectionId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
throw new Error("No value provided for input HTTP label: ConnectionId.");
|
|
75
|
-
}
|
|
48
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectionId", () => input.ConnectionId, "{ConnectionId}", false);
|
|
76
49
|
let body;
|
|
77
50
|
if (input.Data !== undefined) {
|
|
78
51
|
body = input.Data;
|
|
@@ -92,11 +65,11 @@ const deserializeAws_restJson1DeleteConnectionCommand = async (output, context)
|
|
|
92
65
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
93
66
|
return deserializeAws_restJson1DeleteConnectionCommandError(output, context);
|
|
94
67
|
}
|
|
95
|
-
const contents = {
|
|
68
|
+
const contents = map({
|
|
96
69
|
$metadata: deserializeMetadata(output),
|
|
97
|
-
};
|
|
70
|
+
});
|
|
98
71
|
await collectBody(output.body, context);
|
|
99
|
-
return
|
|
72
|
+
return contents;
|
|
100
73
|
};
|
|
101
74
|
exports.deserializeAws_restJson1DeleteConnectionCommand = deserializeAws_restJson1DeleteConnectionCommand;
|
|
102
75
|
const deserializeAws_restJson1DeleteConnectionCommandError = async (output, context) => {
|
|
@@ -104,7 +77,6 @@ const deserializeAws_restJson1DeleteConnectionCommandError = async (output, cont
|
|
|
104
77
|
...output,
|
|
105
78
|
body: await parseBody(output.body, context),
|
|
106
79
|
};
|
|
107
|
-
let response;
|
|
108
80
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
109
81
|
switch (errorCode) {
|
|
110
82
|
case "ForbiddenException":
|
|
@@ -118,37 +90,32 @@ const deserializeAws_restJson1DeleteConnectionCommandError = async (output, cont
|
|
|
118
90
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
119
91
|
default:
|
|
120
92
|
const parsedBody = parsedOutput.body;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
$metadata,
|
|
93
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
94
|
+
output,
|
|
95
|
+
parsedBody,
|
|
96
|
+
exceptionCtor: ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException,
|
|
97
|
+
errorCode,
|
|
127
98
|
});
|
|
128
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
129
99
|
}
|
|
130
100
|
};
|
|
131
101
|
const deserializeAws_restJson1GetConnectionCommand = async (output, context) => {
|
|
132
102
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
133
103
|
return deserializeAws_restJson1GetConnectionCommandError(output, context);
|
|
134
104
|
}
|
|
135
|
-
const contents = {
|
|
105
|
+
const contents = map({
|
|
136
106
|
$metadata: deserializeMetadata(output),
|
|
137
|
-
|
|
138
|
-
Identity: undefined,
|
|
139
|
-
LastActiveAt: undefined,
|
|
140
|
-
};
|
|
107
|
+
});
|
|
141
108
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
142
|
-
if (data.connectedAt
|
|
109
|
+
if (data.connectedAt != null) {
|
|
143
110
|
contents.ConnectedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.connectedAt));
|
|
144
111
|
}
|
|
145
|
-
if (data.identity
|
|
112
|
+
if (data.identity != null) {
|
|
146
113
|
contents.Identity = deserializeAws_restJson1Identity(data.identity, context);
|
|
147
114
|
}
|
|
148
|
-
if (data.lastActiveAt
|
|
115
|
+
if (data.lastActiveAt != null) {
|
|
149
116
|
contents.LastActiveAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(data.lastActiveAt));
|
|
150
117
|
}
|
|
151
|
-
return
|
|
118
|
+
return contents;
|
|
152
119
|
};
|
|
153
120
|
exports.deserializeAws_restJson1GetConnectionCommand = deserializeAws_restJson1GetConnectionCommand;
|
|
154
121
|
const deserializeAws_restJson1GetConnectionCommandError = async (output, context) => {
|
|
@@ -156,7 +123,6 @@ const deserializeAws_restJson1GetConnectionCommandError = async (output, context
|
|
|
156
123
|
...output,
|
|
157
124
|
body: await parseBody(output.body, context),
|
|
158
125
|
};
|
|
159
|
-
let response;
|
|
160
126
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
161
127
|
switch (errorCode) {
|
|
162
128
|
case "ForbiddenException":
|
|
@@ -170,25 +136,23 @@ const deserializeAws_restJson1GetConnectionCommandError = async (output, context
|
|
|
170
136
|
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
171
137
|
default:
|
|
172
138
|
const parsedBody = parsedOutput.body;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
$metadata,
|
|
139
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
140
|
+
output,
|
|
141
|
+
parsedBody,
|
|
142
|
+
exceptionCtor: ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException,
|
|
143
|
+
errorCode,
|
|
179
144
|
});
|
|
180
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
181
145
|
}
|
|
182
146
|
};
|
|
183
147
|
const deserializeAws_restJson1PostToConnectionCommand = async (output, context) => {
|
|
184
148
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
185
149
|
return deserializeAws_restJson1PostToConnectionCommandError(output, context);
|
|
186
150
|
}
|
|
187
|
-
const contents = {
|
|
151
|
+
const contents = map({
|
|
188
152
|
$metadata: deserializeMetadata(output),
|
|
189
|
-
};
|
|
153
|
+
});
|
|
190
154
|
await collectBody(output.body, context);
|
|
191
|
-
return
|
|
155
|
+
return contents;
|
|
192
156
|
};
|
|
193
157
|
exports.deserializeAws_restJson1PostToConnectionCommand = deserializeAws_restJson1PostToConnectionCommand;
|
|
194
158
|
const deserializeAws_restJson1PostToConnectionCommandError = async (output, context) => {
|
|
@@ -196,7 +160,6 @@ const deserializeAws_restJson1PostToConnectionCommandError = async (output, cont
|
|
|
196
160
|
...output,
|
|
197
161
|
body: await parseBody(output.body, context),
|
|
198
162
|
};
|
|
199
|
-
let response;
|
|
200
163
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
201
164
|
switch (errorCode) {
|
|
202
165
|
case "ForbiddenException":
|
|
@@ -213,18 +176,17 @@ const deserializeAws_restJson1PostToConnectionCommandError = async (output, cont
|
|
|
213
176
|
throw await deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context);
|
|
214
177
|
default:
|
|
215
178
|
const parsedBody = parsedOutput.body;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
$metadata,
|
|
179
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
180
|
+
output,
|
|
181
|
+
parsedBody,
|
|
182
|
+
exceptionCtor: ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException,
|
|
183
|
+
errorCode,
|
|
222
184
|
});
|
|
223
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
224
185
|
}
|
|
225
186
|
};
|
|
187
|
+
const map = smithy_client_1.map;
|
|
226
188
|
const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
|
|
227
|
-
const contents = {};
|
|
189
|
+
const contents = map({});
|
|
228
190
|
const data = parsedOutput.body;
|
|
229
191
|
const exception = new models_0_1.ForbiddenException({
|
|
230
192
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -233,7 +195,7 @@ const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput,
|
|
|
233
195
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
234
196
|
};
|
|
235
197
|
const deserializeAws_restJson1GoneExceptionResponse = async (parsedOutput, context) => {
|
|
236
|
-
const contents = {};
|
|
198
|
+
const contents = map({});
|
|
237
199
|
const data = parsedOutput.body;
|
|
238
200
|
const exception = new models_0_1.GoneException({
|
|
239
201
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -242,7 +204,7 @@ const deserializeAws_restJson1GoneExceptionResponse = async (parsedOutput, conte
|
|
|
242
204
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
243
205
|
};
|
|
244
206
|
const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
245
|
-
const contents = {};
|
|
207
|
+
const contents = map({});
|
|
246
208
|
const data = parsedOutput.body;
|
|
247
209
|
const exception = new models_0_1.LimitExceededException({
|
|
248
210
|
$metadata: deserializeMetadata(parsedOutput),
|
|
@@ -251,9 +213,9 @@ const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutp
|
|
|
251
213
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
252
214
|
};
|
|
253
215
|
const deserializeAws_restJson1PayloadTooLargeExceptionResponse = async (parsedOutput, context) => {
|
|
254
|
-
const contents = {};
|
|
216
|
+
const contents = map({});
|
|
255
217
|
const data = parsedOutput.body;
|
|
256
|
-
if (data.message
|
|
218
|
+
if (data.message != null) {
|
|
257
219
|
contents.Message = (0, smithy_client_1.expectString)(data.message);
|
|
258
220
|
}
|
|
259
221
|
const exception = new models_0_1.PayloadTooLargeException({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString,
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, parseRfc3339DateTime as __parseRfc3339DateTime, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { ApiGatewayManagementApiServiceException as __BaseException } from "../models/ApiGatewayManagementApiServiceException";
|
|
5
5
|
import { ForbiddenException, GoneException, LimitExceededException, PayloadTooLargeException, } from "../models/models_0";
|
|
6
6
|
export var serializeAws_restJson1DeleteConnectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
8
|
return __generator(this, function (_c) {
|
|
9
9
|
switch (_c.label) {
|
|
10
10
|
case 0: return [4, context.endpoint()];
|
|
@@ -12,16 +12,7 @@ export var serializeAws_restJson1DeleteConnectionCommand = function (input, cont
|
|
|
12
12
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
13
|
headers = {};
|
|
14
14
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/@connections/{ConnectionId}";
|
|
15
|
-
|
|
16
|
-
labelValue = input.ConnectionId;
|
|
17
|
-
if (labelValue.length <= 0) {
|
|
18
|
-
throw new Error("Empty value provided for input HTTP label: ConnectionId.");
|
|
19
|
-
}
|
|
20
|
-
resolvedPath = resolvedPath.replace("{ConnectionId}", __extendedEncodeURIComponent(labelValue));
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
throw new Error("No value provided for input HTTP label: ConnectionId.");
|
|
24
|
-
}
|
|
15
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ConnectionId", function () { return input.ConnectionId; }, "{ConnectionId}", false);
|
|
25
16
|
return [2, new __HttpRequest({
|
|
26
17
|
protocol: protocol,
|
|
27
18
|
hostname: hostname,
|
|
@@ -35,7 +26,7 @@ export var serializeAws_restJson1DeleteConnectionCommand = function (input, cont
|
|
|
35
26
|
});
|
|
36
27
|
}); };
|
|
37
28
|
export var serializeAws_restJson1GetConnectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
38
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
29
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
39
30
|
return __generator(this, function (_c) {
|
|
40
31
|
switch (_c.label) {
|
|
41
32
|
case 0: return [4, context.endpoint()];
|
|
@@ -43,16 +34,7 @@ export var serializeAws_restJson1GetConnectionCommand = function (input, context
|
|
|
43
34
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
44
35
|
headers = {};
|
|
45
36
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/@connections/{ConnectionId}";
|
|
46
|
-
|
|
47
|
-
labelValue = input.ConnectionId;
|
|
48
|
-
if (labelValue.length <= 0) {
|
|
49
|
-
throw new Error("Empty value provided for input HTTP label: ConnectionId.");
|
|
50
|
-
}
|
|
51
|
-
resolvedPath = resolvedPath.replace("{ConnectionId}", __extendedEncodeURIComponent(labelValue));
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
throw new Error("No value provided for input HTTP label: ConnectionId.");
|
|
55
|
-
}
|
|
37
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ConnectionId", function () { return input.ConnectionId; }, "{ConnectionId}", false);
|
|
56
38
|
return [2, new __HttpRequest({
|
|
57
39
|
protocol: protocol,
|
|
58
40
|
hostname: hostname,
|
|
@@ -66,7 +48,7 @@ export var serializeAws_restJson1GetConnectionCommand = function (input, context
|
|
|
66
48
|
});
|
|
67
49
|
}); };
|
|
68
50
|
export var serializeAws_restJson1PostToConnectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
51
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
70
52
|
return __generator(this, function (_c) {
|
|
71
53
|
switch (_c.label) {
|
|
72
54
|
case 0: return [4, context.endpoint()];
|
|
@@ -76,16 +58,7 @@ export var serializeAws_restJson1PostToConnectionCommand = function (input, cont
|
|
|
76
58
|
"content-type": "application/octet-stream",
|
|
77
59
|
};
|
|
78
60
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/@connections/{ConnectionId}";
|
|
79
|
-
|
|
80
|
-
labelValue = input.ConnectionId;
|
|
81
|
-
if (labelValue.length <= 0) {
|
|
82
|
-
throw new Error("Empty value provided for input HTTP label: ConnectionId.");
|
|
83
|
-
}
|
|
84
|
-
resolvedPath = resolvedPath.replace("{ConnectionId}", __extendedEncodeURIComponent(labelValue));
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
throw new Error("No value provided for input HTTP label: ConnectionId.");
|
|
88
|
-
}
|
|
61
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ConnectionId", function () { return input.ConnectionId; }, "{ConnectionId}", false);
|
|
89
62
|
if (input.Data !== undefined) {
|
|
90
63
|
body = input.Data;
|
|
91
64
|
}
|
|
@@ -109,18 +82,18 @@ export var deserializeAws_restJson1DeleteConnectionCommand = function (output, c
|
|
|
109
82
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
110
83
|
return [2, deserializeAws_restJson1DeleteConnectionCommandError(output, context)];
|
|
111
84
|
}
|
|
112
|
-
contents = {
|
|
85
|
+
contents = map({
|
|
113
86
|
$metadata: deserializeMetadata(output),
|
|
114
|
-
};
|
|
87
|
+
});
|
|
115
88
|
return [4, collectBody(output.body, context)];
|
|
116
89
|
case 1:
|
|
117
90
|
_a.sent();
|
|
118
|
-
return [2,
|
|
91
|
+
return [2, contents];
|
|
119
92
|
}
|
|
120
93
|
});
|
|
121
94
|
}); };
|
|
122
95
|
var deserializeAws_restJson1DeleteConnectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
123
|
-
var parsedOutput, _a,
|
|
96
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
124
97
|
var _c;
|
|
125
98
|
return __generator(this, function (_d) {
|
|
126
99
|
switch (_d.label) {
|
|
@@ -149,14 +122,14 @@ var deserializeAws_restJson1DeleteConnectionCommandError = function (output, con
|
|
|
149
122
|
case 7: throw _d.sent();
|
|
150
123
|
case 8:
|
|
151
124
|
parsedBody = parsedOutput.body;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
$metadata: $metadata,
|
|
125
|
+
throwDefaultError({
|
|
126
|
+
output: output,
|
|
127
|
+
parsedBody: parsedBody,
|
|
128
|
+
exceptionCtor: __BaseException,
|
|
129
|
+
errorCode: errorCode,
|
|
158
130
|
});
|
|
159
|
-
|
|
131
|
+
_d.label = 9;
|
|
132
|
+
case 9: return [2];
|
|
160
133
|
}
|
|
161
134
|
});
|
|
162
135
|
}); };
|
|
@@ -168,32 +141,29 @@ export var deserializeAws_restJson1GetConnectionCommand = function (output, cont
|
|
|
168
141
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
169
142
|
return [2, deserializeAws_restJson1GetConnectionCommandError(output, context)];
|
|
170
143
|
}
|
|
171
|
-
contents = {
|
|
144
|
+
contents = map({
|
|
172
145
|
$metadata: deserializeMetadata(output),
|
|
173
|
-
|
|
174
|
-
Identity: undefined,
|
|
175
|
-
LastActiveAt: undefined,
|
|
176
|
-
};
|
|
146
|
+
});
|
|
177
147
|
_a = __expectNonNull;
|
|
178
148
|
_b = __expectObject;
|
|
179
149
|
return [4, parseBody(output.body, context)];
|
|
180
150
|
case 1:
|
|
181
151
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
182
|
-
if (data.connectedAt
|
|
152
|
+
if (data.connectedAt != null) {
|
|
183
153
|
contents.ConnectedAt = __expectNonNull(__parseRfc3339DateTime(data.connectedAt));
|
|
184
154
|
}
|
|
185
|
-
if (data.identity
|
|
155
|
+
if (data.identity != null) {
|
|
186
156
|
contents.Identity = deserializeAws_restJson1Identity(data.identity, context);
|
|
187
157
|
}
|
|
188
|
-
if (data.lastActiveAt
|
|
158
|
+
if (data.lastActiveAt != null) {
|
|
189
159
|
contents.LastActiveAt = __expectNonNull(__parseRfc3339DateTime(data.lastActiveAt));
|
|
190
160
|
}
|
|
191
|
-
return [2,
|
|
161
|
+
return [2, contents];
|
|
192
162
|
}
|
|
193
163
|
});
|
|
194
164
|
}); };
|
|
195
165
|
var deserializeAws_restJson1GetConnectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
196
|
-
var parsedOutput, _a,
|
|
166
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
197
167
|
var _c;
|
|
198
168
|
return __generator(this, function (_d) {
|
|
199
169
|
switch (_d.label) {
|
|
@@ -222,14 +192,14 @@ var deserializeAws_restJson1GetConnectionCommandError = function (output, contex
|
|
|
222
192
|
case 7: throw _d.sent();
|
|
223
193
|
case 8:
|
|
224
194
|
parsedBody = parsedOutput.body;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
$metadata: $metadata,
|
|
195
|
+
throwDefaultError({
|
|
196
|
+
output: output,
|
|
197
|
+
parsedBody: parsedBody,
|
|
198
|
+
exceptionCtor: __BaseException,
|
|
199
|
+
errorCode: errorCode,
|
|
231
200
|
});
|
|
232
|
-
|
|
201
|
+
_d.label = 9;
|
|
202
|
+
case 9: return [2];
|
|
233
203
|
}
|
|
234
204
|
});
|
|
235
205
|
}); };
|
|
@@ -241,18 +211,18 @@ export var deserializeAws_restJson1PostToConnectionCommand = function (output, c
|
|
|
241
211
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
242
212
|
return [2, deserializeAws_restJson1PostToConnectionCommandError(output, context)];
|
|
243
213
|
}
|
|
244
|
-
contents = {
|
|
214
|
+
contents = map({
|
|
245
215
|
$metadata: deserializeMetadata(output),
|
|
246
|
-
};
|
|
216
|
+
});
|
|
247
217
|
return [4, collectBody(output.body, context)];
|
|
248
218
|
case 1:
|
|
249
219
|
_a.sent();
|
|
250
|
-
return [2,
|
|
220
|
+
return [2, contents];
|
|
251
221
|
}
|
|
252
222
|
});
|
|
253
223
|
}); };
|
|
254
224
|
var deserializeAws_restJson1PostToConnectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
255
|
-
var parsedOutput, _a,
|
|
225
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
256
226
|
var _c;
|
|
257
227
|
return __generator(this, function (_d) {
|
|
258
228
|
switch (_d.label) {
|
|
@@ -285,21 +255,22 @@ var deserializeAws_restJson1PostToConnectionCommandError = function (output, con
|
|
|
285
255
|
case 9: throw _d.sent();
|
|
286
256
|
case 10:
|
|
287
257
|
parsedBody = parsedOutput.body;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
$metadata: $metadata,
|
|
258
|
+
throwDefaultError({
|
|
259
|
+
output: output,
|
|
260
|
+
parsedBody: parsedBody,
|
|
261
|
+
exceptionCtor: __BaseException,
|
|
262
|
+
errorCode: errorCode,
|
|
294
263
|
});
|
|
295
|
-
|
|
264
|
+
_d.label = 11;
|
|
265
|
+
case 11: return [2];
|
|
296
266
|
}
|
|
297
267
|
});
|
|
298
268
|
}); };
|
|
269
|
+
var map = __map;
|
|
299
270
|
var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
300
271
|
var contents, data, exception;
|
|
301
272
|
return __generator(this, function (_a) {
|
|
302
|
-
contents = {};
|
|
273
|
+
contents = map({});
|
|
303
274
|
data = parsedOutput.body;
|
|
304
275
|
exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
305
276
|
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
@@ -308,7 +279,7 @@ var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput,
|
|
|
308
279
|
var deserializeAws_restJson1GoneExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
309
280
|
var contents, data, exception;
|
|
310
281
|
return __generator(this, function (_a) {
|
|
311
|
-
contents = {};
|
|
282
|
+
contents = map({});
|
|
312
283
|
data = parsedOutput.body;
|
|
313
284
|
exception = new GoneException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
314
285
|
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
@@ -317,7 +288,7 @@ var deserializeAws_restJson1GoneExceptionResponse = function (parsedOutput, cont
|
|
|
317
288
|
var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
318
289
|
var contents, data, exception;
|
|
319
290
|
return __generator(this, function (_a) {
|
|
320
|
-
contents = {};
|
|
291
|
+
contents = map({});
|
|
321
292
|
data = parsedOutput.body;
|
|
322
293
|
exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
323
294
|
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
@@ -326,9 +297,9 @@ var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOut
|
|
|
326
297
|
var deserializeAws_restJson1PayloadTooLargeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
327
298
|
var contents, data, exception;
|
|
328
299
|
return __generator(this, function (_a) {
|
|
329
|
-
contents = {};
|
|
300
|
+
contents = map({});
|
|
330
301
|
data = parsedOutput.body;
|
|
331
|
-
if (data.message
|
|
302
|
+
if (data.message != null) {
|
|
332
303
|
contents.Message = __expectString(data.message);
|
|
333
304
|
}
|
|
334
305
|
exception = new PayloadTooLargeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-apigatewaymanagementapi",
|
|
3
3
|
"description": "AWS SDK for JavaScript Apigatewaymanagementapi 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",
|