@aws-sdk/client-apigatewaymanagementapi 3.51.0 → 3.54.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 CHANGED
@@ -3,6 +3,33 @@
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.54.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.53.1...v3.54.0) (2022-03-11)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-apigatewaymanagementapi
9
+
10
+
11
+
12
+
13
+
14
+ # [3.53.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.52.0...v3.53.0) (2022-02-24)
15
+
16
+
17
+ ### Features
18
+
19
+ * **clients:** generate service exceptions as classes ([#3267](https://github.com/aws/aws-sdk-js-v3/issues/3267)) ([ca64fee](https://github.com/aws/aws-sdk-js-v3/commit/ca64feed3351c394c07dc26b782a5760a396a074))
20
+
21
+
22
+
23
+
24
+
25
+ # [3.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
26
+
27
+ **Note:** Version bump only for package @aws-sdk/client-apigatewaymanagementapi
28
+
29
+
30
+
31
+
32
+
6
33
  # [3.51.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.50.0...v3.51.0) (2022-02-12)
7
34
 
8
35
  **Note:** Version bump only for package @aws-sdk/client-apigatewaymanagementapi
package/dist-cjs/index.js CHANGED
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiGatewayManagementApiServiceException = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  tslib_1.__exportStar(require("./ApiGatewayManagementApi"), exports);
5
6
  tslib_1.__exportStar(require("./ApiGatewayManagementApiClient"), exports);
6
7
  tslib_1.__exportStar(require("./commands"), exports);
7
8
  tslib_1.__exportStar(require("./models"), exports);
9
+ var ApiGatewayManagementApiServiceException_1 = require("./models/ApiGatewayManagementApiServiceException");
10
+ Object.defineProperty(exports, "ApiGatewayManagementApiServiceException", { enumerable: true, get: function () { return ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException; } });
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiGatewayManagementApiServiceException = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
5
+ class ApiGatewayManagementApiServiceException extends smithy_client_1.ServiceException {
6
+ constructor(options) {
7
+ super(options);
8
+ Object.setPrototypeOf(this, ApiGatewayManagementApiServiceException.prototype);
9
+ }
10
+ }
11
+ exports.ApiGatewayManagementApiServiceException = ApiGatewayManagementApiServiceException;
@@ -1,12 +1,52 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PostToConnectionRequest = exports.GetConnectionResponse = exports.Identity = exports.GetConnectionRequest = exports.DeleteConnectionRequest = void 0;
3
+ exports.PostToConnectionRequest = exports.PayloadTooLargeException = exports.GetConnectionResponse = exports.Identity = exports.GetConnectionRequest = exports.LimitExceededException = exports.GoneException = exports.ForbiddenException = exports.DeleteConnectionRequest = void 0;
4
+ const ApiGatewayManagementApiServiceException_1 = require("./ApiGatewayManagementApiServiceException");
4
5
  var DeleteConnectionRequest;
5
6
  (function (DeleteConnectionRequest) {
6
7
  DeleteConnectionRequest.filterSensitiveLog = (obj) => ({
7
8
  ...obj,
8
9
  });
9
10
  })(DeleteConnectionRequest = exports.DeleteConnectionRequest || (exports.DeleteConnectionRequest = {}));
11
+ class ForbiddenException extends ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException {
12
+ constructor(opts) {
13
+ super({
14
+ name: "ForbiddenException",
15
+ $fault: "client",
16
+ ...opts,
17
+ });
18
+ this.name = "ForbiddenException";
19
+ this.$fault = "client";
20
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
21
+ }
22
+ }
23
+ exports.ForbiddenException = ForbiddenException;
24
+ class GoneException extends ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException {
25
+ constructor(opts) {
26
+ super({
27
+ name: "GoneException",
28
+ $fault: "client",
29
+ ...opts,
30
+ });
31
+ this.name = "GoneException";
32
+ this.$fault = "client";
33
+ Object.setPrototypeOf(this, GoneException.prototype);
34
+ }
35
+ }
36
+ exports.GoneException = GoneException;
37
+ class LimitExceededException extends ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException {
38
+ constructor(opts) {
39
+ super({
40
+ name: "LimitExceededException",
41
+ $fault: "client",
42
+ ...opts,
43
+ });
44
+ this.name = "LimitExceededException";
45
+ this.$fault = "client";
46
+ Object.setPrototypeOf(this, LimitExceededException.prototype);
47
+ }
48
+ }
49
+ exports.LimitExceededException = LimitExceededException;
10
50
  var GetConnectionRequest;
11
51
  (function (GetConnectionRequest) {
12
52
  GetConnectionRequest.filterSensitiveLog = (obj) => ({
@@ -25,6 +65,20 @@ var GetConnectionResponse;
25
65
  ...obj,
26
66
  });
27
67
  })(GetConnectionResponse = exports.GetConnectionResponse || (exports.GetConnectionResponse = {}));
68
+ class PayloadTooLargeException extends ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException {
69
+ constructor(opts) {
70
+ super({
71
+ name: "PayloadTooLargeException",
72
+ $fault: "client",
73
+ ...opts,
74
+ });
75
+ this.name = "PayloadTooLargeException";
76
+ this.$fault = "client";
77
+ Object.setPrototypeOf(this, PayloadTooLargeException.prototype);
78
+ this.Message = opts.Message;
79
+ }
80
+ }
81
+ exports.PayloadTooLargeException = PayloadTooLargeException;
28
82
  var PostToConnectionRequest;
29
83
  (function (PostToConnectionRequest) {
30
84
  PostToConnectionRequest.filterSensitiveLog = (obj) => ({
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deserializeAws_restJson1PostToConnectionCommand = exports.deserializeAws_restJson1GetConnectionCommand = exports.deserializeAws_restJson1DeleteConnectionCommand = exports.serializeAws_restJson1PostToConnectionCommand = exports.serializeAws_restJson1GetConnectionCommand = exports.serializeAws_restJson1DeleteConnectionCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const ApiGatewayManagementApiServiceException_1 = require("../models/ApiGatewayManagementApiServiceException");
7
+ const models_0_1 = require("../models/models_0");
6
8
  const serializeAws_restJson1DeleteConnectionCommand = async (input, context) => {
7
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
10
  const headers = {};
@@ -108,43 +110,22 @@ const deserializeAws_restJson1DeleteConnectionCommandError = async (output, cont
108
110
  switch (errorCode) {
109
111
  case "ForbiddenException":
110
112
  case "com.amazonaws.apigatewaymanagementapi#ForbiddenException":
111
- response = {
112
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
113
- name: errorCode,
114
- $metadata: deserializeMetadata(output),
115
- };
116
- break;
113
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
117
114
  case "GoneException":
118
115
  case "com.amazonaws.apigatewaymanagementapi#GoneException":
119
- response = {
120
- ...(await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)),
121
- name: errorCode,
122
- $metadata: deserializeMetadata(output),
123
- };
124
- break;
116
+ throw await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context);
125
117
  case "LimitExceededException":
126
118
  case "com.amazonaws.apigatewaymanagementapi#LimitExceededException":
127
- response = {
128
- ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
129
- name: errorCode,
130
- $metadata: deserializeMetadata(output),
131
- };
132
- break;
119
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
133
120
  default:
134
121
  const parsedBody = parsedOutput.body;
135
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
136
- response = {
137
- ...parsedBody,
138
- name: `${errorCode}`,
139
- message: parsedBody.message || parsedBody.Message || errorCode,
122
+ response = new ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException({
123
+ name: parsedBody.code || parsedBody.Code || errorCode,
140
124
  $fault: "client",
141
125
  $metadata: deserializeMetadata(output),
142
- };
126
+ });
127
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
143
128
  }
144
- const message = response.message || response.Message || errorCode;
145
- response.message = message;
146
- delete response.Message;
147
- return Promise.reject(Object.assign(new Error(message), response));
148
129
  };
149
130
  const deserializeAws_restJson1GetConnectionCommand = async (output, context) => {
150
131
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -180,43 +161,22 @@ const deserializeAws_restJson1GetConnectionCommandError = async (output, context
180
161
  switch (errorCode) {
181
162
  case "ForbiddenException":
182
163
  case "com.amazonaws.apigatewaymanagementapi#ForbiddenException":
183
- response = {
184
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
185
- name: errorCode,
186
- $metadata: deserializeMetadata(output),
187
- };
188
- break;
164
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
189
165
  case "GoneException":
190
166
  case "com.amazonaws.apigatewaymanagementapi#GoneException":
191
- response = {
192
- ...(await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)),
193
- name: errorCode,
194
- $metadata: deserializeMetadata(output),
195
- };
196
- break;
167
+ throw await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context);
197
168
  case "LimitExceededException":
198
169
  case "com.amazonaws.apigatewaymanagementapi#LimitExceededException":
199
- response = {
200
- ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
201
- name: errorCode,
202
- $metadata: deserializeMetadata(output),
203
- };
204
- break;
170
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
205
171
  default:
206
172
  const parsedBody = parsedOutput.body;
207
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
208
- response = {
209
- ...parsedBody,
210
- name: `${errorCode}`,
211
- message: parsedBody.message || parsedBody.Message || errorCode,
173
+ response = new ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException({
174
+ name: parsedBody.code || parsedBody.Code || errorCode,
212
175
  $fault: "client",
213
176
  $metadata: deserializeMetadata(output),
214
- };
177
+ });
178
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
215
179
  }
216
- const message = response.message || response.Message || errorCode;
217
- response.message = message;
218
- delete response.Message;
219
- return Promise.reject(Object.assign(new Error(message), response));
220
180
  };
221
181
  const deserializeAws_restJson1PostToConnectionCommand = async (output, context) => {
222
182
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -240,91 +200,64 @@ const deserializeAws_restJson1PostToConnectionCommandError = async (output, cont
240
200
  switch (errorCode) {
241
201
  case "ForbiddenException":
242
202
  case "com.amazonaws.apigatewaymanagementapi#ForbiddenException":
243
- response = {
244
- ...(await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)),
245
- name: errorCode,
246
- $metadata: deserializeMetadata(output),
247
- };
248
- break;
203
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
249
204
  case "GoneException":
250
205
  case "com.amazonaws.apigatewaymanagementapi#GoneException":
251
- response = {
252
- ...(await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)),
253
- name: errorCode,
254
- $metadata: deserializeMetadata(output),
255
- };
256
- break;
206
+ throw await deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context);
257
207
  case "LimitExceededException":
258
208
  case "com.amazonaws.apigatewaymanagementapi#LimitExceededException":
259
- response = {
260
- ...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
261
- name: errorCode,
262
- $metadata: deserializeMetadata(output),
263
- };
264
- break;
209
+ throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
265
210
  case "PayloadTooLargeException":
266
211
  case "com.amazonaws.apigatewaymanagementapi#PayloadTooLargeException":
267
- response = {
268
- ...(await deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)),
269
- name: errorCode,
270
- $metadata: deserializeMetadata(output),
271
- };
272
- break;
212
+ throw await deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context);
273
213
  default:
274
214
  const parsedBody = parsedOutput.body;
275
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
276
- response = {
277
- ...parsedBody,
278
- name: `${errorCode}`,
279
- message: parsedBody.message || parsedBody.Message || errorCode,
215
+ response = new ApiGatewayManagementApiServiceException_1.ApiGatewayManagementApiServiceException({
216
+ name: parsedBody.code || parsedBody.Code || errorCode,
280
217
  $fault: "client",
281
218
  $metadata: deserializeMetadata(output),
282
- };
219
+ });
220
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
283
221
  }
284
- const message = response.message || response.Message || errorCode;
285
- response.message = message;
286
- delete response.Message;
287
- return Promise.reject(Object.assign(new Error(message), response));
288
222
  };
289
223
  const deserializeAws_restJson1ForbiddenExceptionResponse = async (parsedOutput, context) => {
290
- const contents = {
291
- name: "ForbiddenException",
292
- $fault: "client",
293
- $metadata: deserializeMetadata(parsedOutput),
294
- };
224
+ const contents = {};
295
225
  const data = parsedOutput.body;
296
- return contents;
226
+ const exception = new models_0_1.ForbiddenException({
227
+ $metadata: deserializeMetadata(parsedOutput),
228
+ ...contents,
229
+ });
230
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
297
231
  };
298
232
  const deserializeAws_restJson1GoneExceptionResponse = async (parsedOutput, context) => {
299
- const contents = {
300
- name: "GoneException",
301
- $fault: "client",
302
- $metadata: deserializeMetadata(parsedOutput),
303
- };
233
+ const contents = {};
304
234
  const data = parsedOutput.body;
305
- return contents;
235
+ const exception = new models_0_1.GoneException({
236
+ $metadata: deserializeMetadata(parsedOutput),
237
+ ...contents,
238
+ });
239
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
306
240
  };
307
241
  const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => {
308
- const contents = {
309
- name: "LimitExceededException",
310
- $fault: "client",
311
- $metadata: deserializeMetadata(parsedOutput),
312
- };
242
+ const contents = {};
313
243
  const data = parsedOutput.body;
314
- return contents;
244
+ const exception = new models_0_1.LimitExceededException({
245
+ $metadata: deserializeMetadata(parsedOutput),
246
+ ...contents,
247
+ });
248
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
315
249
  };
316
250
  const deserializeAws_restJson1PayloadTooLargeExceptionResponse = async (parsedOutput, context) => {
317
- const contents = {
318
- name: "PayloadTooLargeException",
319
- $fault: "client",
320
- $metadata: deserializeMetadata(parsedOutput),
321
- Message: undefined,
322
- };
251
+ const contents = {};
323
252
  const data = parsedOutput.body;
324
253
  if (data.message !== undefined && data.message !== null) {
325
254
  contents.Message = smithy_client_1.expectString(data.message);
326
255
  }
327
- return contents;
256
+ const exception = new models_0_1.PayloadTooLargeException({
257
+ $metadata: deserializeMetadata(parsedOutput),
258
+ ...contents,
259
+ });
260
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
328
261
  };
329
262
  const deserializeAws_restJson1Identity = (output, context) => {
330
263
  return {
package/dist-es/index.js CHANGED
@@ -2,3 +2,4 @@ export * from "./ApiGatewayManagementApi";
2
2
  export * from "./ApiGatewayManagementApiClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { ApiGatewayManagementApiServiceException } from "./models/ApiGatewayManagementApiServiceException";
@@ -0,0 +1,12 @@
1
+ import { __extends } from "tslib";
2
+ import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
+ var ApiGatewayManagementApiServiceException = (function (_super) {
4
+ __extends(ApiGatewayManagementApiServiceException, _super);
5
+ function ApiGatewayManagementApiServiceException(options) {
6
+ var _this = _super.call(this, options) || this;
7
+ Object.setPrototypeOf(_this, ApiGatewayManagementApiServiceException.prototype);
8
+ return _this;
9
+ }
10
+ return ApiGatewayManagementApiServiceException;
11
+ }(__ServiceException));
12
+ export { ApiGatewayManagementApiServiceException };
@@ -1,8 +1,45 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __extends } from "tslib";
2
+ import { ApiGatewayManagementApiServiceException as __BaseException } from "./ApiGatewayManagementApiServiceException";
2
3
  export var DeleteConnectionRequest;
3
4
  (function (DeleteConnectionRequest) {
4
5
  DeleteConnectionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
5
6
  })(DeleteConnectionRequest || (DeleteConnectionRequest = {}));
7
+ var ForbiddenException = (function (_super) {
8
+ __extends(ForbiddenException, _super);
9
+ function ForbiddenException(opts) {
10
+ var _this = _super.call(this, __assign({ name: "ForbiddenException", $fault: "client" }, opts)) || this;
11
+ _this.name = "ForbiddenException";
12
+ _this.$fault = "client";
13
+ Object.setPrototypeOf(_this, ForbiddenException.prototype);
14
+ return _this;
15
+ }
16
+ return ForbiddenException;
17
+ }(__BaseException));
18
+ export { ForbiddenException };
19
+ var GoneException = (function (_super) {
20
+ __extends(GoneException, _super);
21
+ function GoneException(opts) {
22
+ var _this = _super.call(this, __assign({ name: "GoneException", $fault: "client" }, opts)) || this;
23
+ _this.name = "GoneException";
24
+ _this.$fault = "client";
25
+ Object.setPrototypeOf(_this, GoneException.prototype);
26
+ return _this;
27
+ }
28
+ return GoneException;
29
+ }(__BaseException));
30
+ export { GoneException };
31
+ var LimitExceededException = (function (_super) {
32
+ __extends(LimitExceededException, _super);
33
+ function LimitExceededException(opts) {
34
+ var _this = _super.call(this, __assign({ name: "LimitExceededException", $fault: "client" }, opts)) || this;
35
+ _this.name = "LimitExceededException";
36
+ _this.$fault = "client";
37
+ Object.setPrototypeOf(_this, LimitExceededException.prototype);
38
+ return _this;
39
+ }
40
+ return LimitExceededException;
41
+ }(__BaseException));
42
+ export { LimitExceededException };
6
43
  export var GetConnectionRequest;
7
44
  (function (GetConnectionRequest) {
8
45
  GetConnectionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -15,6 +52,19 @@ export var GetConnectionResponse;
15
52
  (function (GetConnectionResponse) {
16
53
  GetConnectionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
17
54
  })(GetConnectionResponse || (GetConnectionResponse = {}));
55
+ var PayloadTooLargeException = (function (_super) {
56
+ __extends(PayloadTooLargeException, _super);
57
+ function PayloadTooLargeException(opts) {
58
+ var _this = _super.call(this, __assign({ name: "PayloadTooLargeException", $fault: "client" }, opts)) || this;
59
+ _this.name = "PayloadTooLargeException";
60
+ _this.$fault = "client";
61
+ Object.setPrototypeOf(_this, PayloadTooLargeException.prototype);
62
+ _this.Message = opts.Message;
63
+ return _this;
64
+ }
65
+ return PayloadTooLargeException;
66
+ }(__BaseException));
67
+ export { PayloadTooLargeException };
18
68
  export var PostToConnectionRequest;
19
69
  (function (PostToConnectionRequest) {
20
70
  PostToConnectionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,6 +1,8 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseRfc3339DateTime as __parseRfc3339DateTime, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseRfc3339DateTime as __parseRfc3339DateTime, } from "@aws-sdk/smithy-client";
4
+ import { ApiGatewayManagementApiServiceException as __BaseException } from "../models/ApiGatewayManagementApiServiceException";
5
+ import { ForbiddenException, GoneException, LimitExceededException, PayloadTooLargeException, } from "../models/models_0";
4
6
  export var serializeAws_restJson1DeleteConnectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
5
7
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
6
8
  return __generator(this, function (_c) {
@@ -118,16 +120,16 @@ export var deserializeAws_restJson1DeleteConnectionCommand = function (output, c
118
120
  });
119
121
  }); };
120
122
  var deserializeAws_restJson1DeleteConnectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
121
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
122
- var _f;
123
- return __generator(this, function (_g) {
124
- switch (_g.label) {
123
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
124
+ var _c;
125
+ return __generator(this, function (_d) {
126
+ switch (_d.label) {
125
127
  case 0:
126
128
  _a = [__assign({}, output)];
127
- _f = {};
129
+ _c = {};
128
130
  return [4, parseBody(output.body, context)];
129
131
  case 1:
130
- parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
132
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
131
133
  errorCode = "UnknownError";
132
134
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
133
135
  _b = errorCode;
@@ -140,34 +142,20 @@ var deserializeAws_restJson1DeleteConnectionCommandError = function (output, con
140
142
  case "com.amazonaws.apigatewaymanagementapi#LimitExceededException": return [3, 6];
141
143
  }
142
144
  return [3, 8];
143
- case 2:
144
- _c = [{}];
145
- return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
146
- case 3:
147
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
148
- return [3, 9];
149
- case 4:
150
- _d = [{}];
151
- return [4, deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)];
152
- case 5:
153
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
154
- return [3, 9];
155
- case 6:
156
- _e = [{}];
157
- return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
158
- case 7:
159
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
160
- return [3, 9];
145
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
146
+ case 3: throw _d.sent();
147
+ case 4: return [4, deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)];
148
+ case 5: throw _d.sent();
149
+ case 6: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
150
+ case 7: throw _d.sent();
161
151
  case 8:
162
152
  parsedBody = parsedOutput.body;
163
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
164
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
165
- _g.label = 9;
166
- case 9:
167
- message = response.message || response.Message || errorCode;
168
- response.message = message;
169
- delete response.Message;
170
- return [2, Promise.reject(Object.assign(new Error(message), response))];
153
+ response = new __BaseException({
154
+ name: parsedBody.code || parsedBody.Code || errorCode,
155
+ $fault: "client",
156
+ $metadata: deserializeMetadata(output),
157
+ });
158
+ throw __decorateServiceException(response, parsedBody);
171
159
  }
172
160
  });
173
161
  }); };
@@ -204,16 +192,16 @@ export var deserializeAws_restJson1GetConnectionCommand = function (output, cont
204
192
  });
205
193
  }); };
206
194
  var deserializeAws_restJson1GetConnectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
207
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, parsedBody, message;
208
- var _f;
209
- return __generator(this, function (_g) {
210
- switch (_g.label) {
195
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
196
+ var _c;
197
+ return __generator(this, function (_d) {
198
+ switch (_d.label) {
211
199
  case 0:
212
200
  _a = [__assign({}, output)];
213
- _f = {};
201
+ _c = {};
214
202
  return [4, parseBody(output.body, context)];
215
203
  case 1:
216
- parsedOutput = __assign.apply(void 0, _a.concat([(_f.body = _g.sent(), _f)]));
204
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
217
205
  errorCode = "UnknownError";
218
206
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
219
207
  _b = errorCode;
@@ -226,34 +214,20 @@ var deserializeAws_restJson1GetConnectionCommandError = function (output, contex
226
214
  case "com.amazonaws.apigatewaymanagementapi#LimitExceededException": return [3, 6];
227
215
  }
228
216
  return [3, 8];
229
- case 2:
230
- _c = [{}];
231
- return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
232
- case 3:
233
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
234
- return [3, 9];
235
- case 4:
236
- _d = [{}];
237
- return [4, deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)];
238
- case 5:
239
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
240
- return [3, 9];
241
- case 6:
242
- _e = [{}];
243
- return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
244
- case 7:
245
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_g.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
246
- return [3, 9];
217
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
218
+ case 3: throw _d.sent();
219
+ case 4: return [4, deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)];
220
+ case 5: throw _d.sent();
221
+ case 6: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
222
+ case 7: throw _d.sent();
247
223
  case 8:
248
224
  parsedBody = parsedOutput.body;
249
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
250
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
251
- _g.label = 9;
252
- case 9:
253
- message = response.message || response.Message || errorCode;
254
- response.message = message;
255
- delete response.Message;
256
- return [2, Promise.reject(Object.assign(new Error(message), response))];
225
+ response = new __BaseException({
226
+ name: parsedBody.code || parsedBody.Code || errorCode,
227
+ $fault: "client",
228
+ $metadata: deserializeMetadata(output),
229
+ });
230
+ throw __decorateServiceException(response, parsedBody);
257
231
  }
258
232
  });
259
233
  }); };
@@ -276,16 +250,16 @@ export var deserializeAws_restJson1PostToConnectionCommand = function (output, c
276
250
  });
277
251
  }); };
278
252
  var deserializeAws_restJson1PostToConnectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
279
- var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, parsedBody, message;
280
- var _g;
281
- return __generator(this, function (_h) {
282
- switch (_h.label) {
253
+ var parsedOutput, _a, response, errorCode, _b, parsedBody;
254
+ var _c;
255
+ return __generator(this, function (_d) {
256
+ switch (_d.label) {
283
257
  case 0:
284
258
  _a = [__assign({}, output)];
285
- _g = {};
259
+ _c = {};
286
260
  return [4, parseBody(output.body, context)];
287
261
  case 1:
288
- parsedOutput = __assign.apply(void 0, _a.concat([(_g.body = _h.sent(), _g)]));
262
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
289
263
  errorCode = "UnknownError";
290
264
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
291
265
  _b = errorCode;
@@ -300,93 +274,62 @@ var deserializeAws_restJson1PostToConnectionCommandError = function (output, con
300
274
  case "com.amazonaws.apigatewaymanagementapi#PayloadTooLargeException": return [3, 8];
301
275
  }
302
276
  return [3, 10];
303
- case 2:
304
- _c = [{}];
305
- return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
306
- case 3:
307
- response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
308
- return [3, 11];
309
- case 4:
310
- _d = [{}];
311
- return [4, deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)];
312
- case 5:
313
- response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
314
- return [3, 11];
315
- case 6:
316
- _e = [{}];
317
- return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
318
- case 7:
319
- response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
320
- return [3, 11];
321
- case 8:
322
- _f = [{}];
323
- return [4, deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)];
324
- case 9:
325
- response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_h.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
326
- return [3, 11];
277
+ case 2: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
278
+ case 3: throw _d.sent();
279
+ case 4: return [4, deserializeAws_restJson1GoneExceptionResponse(parsedOutput, context)];
280
+ case 5: throw _d.sent();
281
+ case 6: return [4, deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)];
282
+ case 7: throw _d.sent();
283
+ case 8: return [4, deserializeAws_restJson1PayloadTooLargeExceptionResponse(parsedOutput, context)];
284
+ case 9: throw _d.sent();
327
285
  case 10:
328
286
  parsedBody = parsedOutput.body;
329
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
330
- response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
331
- _h.label = 11;
332
- case 11:
333
- message = response.message || response.Message || errorCode;
334
- response.message = message;
335
- delete response.Message;
336
- return [2, Promise.reject(Object.assign(new Error(message), response))];
287
+ response = new __BaseException({
288
+ name: parsedBody.code || parsedBody.Code || errorCode,
289
+ $fault: "client",
290
+ $metadata: deserializeMetadata(output),
291
+ });
292
+ throw __decorateServiceException(response, parsedBody);
337
293
  }
338
294
  });
339
295
  }); };
340
296
  var deserializeAws_restJson1ForbiddenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
341
- var contents, data;
297
+ var contents, data, exception;
342
298
  return __generator(this, function (_a) {
343
- contents = {
344
- name: "ForbiddenException",
345
- $fault: "client",
346
- $metadata: deserializeMetadata(parsedOutput),
347
- };
299
+ contents = {};
348
300
  data = parsedOutput.body;
349
- return [2, contents];
301
+ exception = new ForbiddenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
302
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
350
303
  });
351
304
  }); };
352
305
  var deserializeAws_restJson1GoneExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
353
- var contents, data;
306
+ var contents, data, exception;
354
307
  return __generator(this, function (_a) {
355
- contents = {
356
- name: "GoneException",
357
- $fault: "client",
358
- $metadata: deserializeMetadata(parsedOutput),
359
- };
308
+ contents = {};
360
309
  data = parsedOutput.body;
361
- return [2, contents];
310
+ exception = new GoneException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
311
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
362
312
  });
363
313
  }); };
364
314
  var deserializeAws_restJson1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
365
- var contents, data;
315
+ var contents, data, exception;
366
316
  return __generator(this, function (_a) {
367
- contents = {
368
- name: "LimitExceededException",
369
- $fault: "client",
370
- $metadata: deserializeMetadata(parsedOutput),
371
- };
317
+ contents = {};
372
318
  data = parsedOutput.body;
373
- return [2, contents];
319
+ exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
320
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
374
321
  });
375
322
  }); };
376
323
  var deserializeAws_restJson1PayloadTooLargeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
377
- var contents, data;
324
+ var contents, data, exception;
378
325
  return __generator(this, function (_a) {
379
- contents = {
380
- name: "PayloadTooLargeException",
381
- $fault: "client",
382
- $metadata: deserializeMetadata(parsedOutput),
383
- Message: undefined,
384
- };
326
+ contents = {};
385
327
  data = parsedOutput.body;
386
328
  if (data.message !== undefined && data.message !== null) {
387
329
  contents.Message = __expectString(data.message);
388
330
  }
389
- return [2, contents];
331
+ exception = new PayloadTooLargeException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
332
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
390
333
  });
391
334
  }); };
392
335
  var deserializeAws_restJson1Identity = function (output, context) {
@@ -5,7 +5,7 @@ import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-s
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
7
  import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
- import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
8
+ import { BodyLengthCalculator as __BodyLengthCalculator, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { DeleteConnectionCommandInput, DeleteConnectionCommandOutput } from "./commands/DeleteConnectionCommand";
10
10
  import { GetConnectionCommandInput, GetConnectionCommandOutput } from "./commands/GetConnectionCommand";
11
11
  import { PostToConnectionCommandInput, PostToConnectionCommandOutput } from "./commands/PostToConnectionCommand";
@@ -31,7 +31,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
31
31
  * A function that can calculate the length of a request body.
32
32
  * @internal
33
33
  */
34
- bodyLengthChecker?: (body: any) => number | undefined;
34
+ bodyLengthChecker?: __BodyLengthCalculator;
35
35
  /**
36
36
  * A function that converts a stream into an array of bytes.
37
37
  * @internal
@@ -2,3 +2,4 @@ export * from "./ApiGatewayManagementApi";
2
2
  export * from "./ApiGatewayManagementApiClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { ApiGatewayManagementApiServiceException } from "./models/ApiGatewayManagementApiServiceException";
@@ -0,0 +1,10 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+ /**
3
+ * Base exception class for all service exceptions from ApiGatewayManagementApi service.
4
+ */
5
+ export declare class ApiGatewayManagementApiServiceException extends __ServiceException {
6
+ /**
7
+ * @internal
8
+ */
9
+ constructor(options: __ServiceExceptionOptions);
10
+ }
@@ -1,4 +1,5 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { ApiGatewayManagementApiServiceException as __BaseException } from "./ApiGatewayManagementApiServiceException";
2
3
  export interface DeleteConnectionRequest {
3
4
  ConnectionId: string | undefined;
4
5
  }
@@ -11,23 +12,35 @@ export declare namespace DeleteConnectionRequest {
11
12
  /**
12
13
  * <p>The caller is not authorized to invoke this operation.</p>
13
14
  */
14
- export interface ForbiddenException extends __SmithyException, $MetadataBearer {
15
- name: "ForbiddenException";
16
- $fault: "client";
15
+ export declare class ForbiddenException extends __BaseException {
16
+ readonly name: "ForbiddenException";
17
+ readonly $fault: "client";
18
+ /**
19
+ * @internal
20
+ */
21
+ constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
17
22
  }
18
23
  /**
19
24
  * <p>The connection with the provided id no longer exists.</p>
20
25
  */
21
- export interface GoneException extends __SmithyException, $MetadataBearer {
22
- name: "GoneException";
23
- $fault: "client";
26
+ export declare class GoneException extends __BaseException {
27
+ readonly name: "GoneException";
28
+ readonly $fault: "client";
29
+ /**
30
+ * @internal
31
+ */
32
+ constructor(opts: __ExceptionOptionType<GoneException, __BaseException>);
24
33
  }
25
34
  /**
26
35
  * <p>The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full.</p>
27
36
  */
28
- export interface LimitExceededException extends __SmithyException, $MetadataBearer {
29
- name: "LimitExceededException";
30
- $fault: "client";
37
+ export declare class LimitExceededException extends __BaseException {
38
+ readonly name: "LimitExceededException";
39
+ readonly $fault: "client";
40
+ /**
41
+ * @internal
42
+ */
43
+ constructor(opts: __ExceptionOptionType<LimitExceededException, __BaseException>);
31
44
  }
32
45
  export interface GetConnectionRequest {
33
46
  ConnectionId: string | undefined;
@@ -74,10 +87,14 @@ export declare namespace GetConnectionResponse {
74
87
  /**
75
88
  * <p>The data has exceeded the maximum size allowed.</p>
76
89
  */
77
- export interface PayloadTooLargeException extends __SmithyException, $MetadataBearer {
78
- name: "PayloadTooLargeException";
79
- $fault: "client";
90
+ export declare class PayloadTooLargeException extends __BaseException {
91
+ readonly name: "PayloadTooLargeException";
92
+ readonly $fault: "client";
80
93
  Message?: string;
94
+ /**
95
+ * @internal
96
+ */
97
+ constructor(opts: __ExceptionOptionType<PayloadTooLargeException, __BaseException>);
81
98
  }
82
99
  export interface PostToConnectionRequest {
83
100
  /**
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: ApiGatewayManagementApiClientCon
8
8
  defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
9
9
  base64Decoder: import("@aws-sdk/types").Decoder;
10
10
  base64Encoder: import("@aws-sdk/types").Encoder;
11
- bodyLengthChecker: (body: any) => number | undefined;
11
+ bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
12
12
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
13
13
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
14
14
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: ApiGatewayManagementApiClientCon
8
8
  defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
9
9
  base64Decoder: import("@aws-sdk/types").Decoder;
10
10
  base64Encoder: import("@aws-sdk/types").Encoder;
11
- bodyLengthChecker: (body: any) => number | undefined;
11
+ bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
12
12
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
13
13
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
14
14
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: ApiGatewayManagementApiClientCon
8
8
  requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | import("@aws-sdk/fetch-http-handler").FetchHttpHandler;
9
9
  apiVersion: string;
10
10
  urlParser: import("@aws-sdk/types").UrlParser;
11
- bodyLengthChecker: (body: any) => number | undefined;
11
+ bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
12
12
  streamCollector: import("@aws-sdk/types").StreamCollector;
13
13
  base64Decoder: import("@aws-sdk/types").Decoder;
14
14
  base64Encoder: import("@aws-sdk/types").Encoder;
@@ -5,7 +5,7 @@ import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-s
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
7
  import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
- import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
8
+ import { BodyLengthCalculator as __BodyLengthCalculator, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { DeleteConnectionCommandInput, DeleteConnectionCommandOutput } from "./commands/DeleteConnectionCommand";
10
10
  import { GetConnectionCommandInput, GetConnectionCommandOutput } from "./commands/GetConnectionCommand";
11
11
  import { PostToConnectionCommandInput, PostToConnectionCommandOutput } from "./commands/PostToConnectionCommand";
@@ -19,7 +19,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
19
19
 
20
20
  urlParser?: __UrlParser;
21
21
 
22
- bodyLengthChecker?: (body: any) => number | undefined;
22
+ bodyLengthChecker?: __BodyLengthCalculator;
23
23
 
24
24
  streamCollector?: __StreamCollector;
25
25
 
@@ -2,3 +2,4 @@ export * from "./ApiGatewayManagementApi";
2
2
  export * from "./ApiGatewayManagementApiClient";
3
3
  export * from "./commands";
4
4
  export * from "./models";
5
+ export { ApiGatewayManagementApiServiceException } from "./models/ApiGatewayManagementApiServiceException";
@@ -0,0 +1,6 @@
1
+ import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@aws-sdk/smithy-client";
2
+
3
+ export declare class ApiGatewayManagementApiServiceException extends __ServiceException {
4
+
5
+ constructor(options: __ServiceExceptionOptions);
6
+ }
@@ -1,4 +1,5 @@
1
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
1
+ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
+ import { ApiGatewayManagementApiServiceException as __BaseException } from "./ApiGatewayManagementApiServiceException";
2
3
  export interface DeleteConnectionRequest {
3
4
  ConnectionId: string | undefined;
4
5
  }
@@ -7,19 +8,25 @@ export declare namespace DeleteConnectionRequest {
7
8
  const filterSensitiveLog: (obj: DeleteConnectionRequest) => any;
8
9
  }
9
10
 
10
- export interface ForbiddenException extends __SmithyException, $MetadataBearer {
11
- name: "ForbiddenException";
12
- $fault: "client";
11
+ export declare class ForbiddenException extends __BaseException {
12
+ readonly name: "ForbiddenException";
13
+ readonly $fault: "client";
14
+
15
+ constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
13
16
  }
14
17
 
15
- export interface GoneException extends __SmithyException, $MetadataBearer {
16
- name: "GoneException";
17
- $fault: "client";
18
+ export declare class GoneException extends __BaseException {
19
+ readonly name: "GoneException";
20
+ readonly $fault: "client";
21
+
22
+ constructor(opts: __ExceptionOptionType<GoneException, __BaseException>);
18
23
  }
19
24
 
20
- export interface LimitExceededException extends __SmithyException, $MetadataBearer {
21
- name: "LimitExceededException";
22
- $fault: "client";
25
+ export declare class LimitExceededException extends __BaseException {
26
+ readonly name: "LimitExceededException";
27
+ readonly $fault: "client";
28
+
29
+ constructor(opts: __ExceptionOptionType<LimitExceededException, __BaseException>);
23
30
  }
24
31
  export interface GetConnectionRequest {
25
32
  ConnectionId: string | undefined;
@@ -50,10 +57,12 @@ export declare namespace GetConnectionResponse {
50
57
  const filterSensitiveLog: (obj: GetConnectionResponse) => any;
51
58
  }
52
59
 
53
- export interface PayloadTooLargeException extends __SmithyException, $MetadataBearer {
54
- name: "PayloadTooLargeException";
55
- $fault: "client";
60
+ export declare class PayloadTooLargeException extends __BaseException {
61
+ readonly name: "PayloadTooLargeException";
62
+ readonly $fault: "client";
56
63
  Message?: string;
64
+
65
+ constructor(opts: __ExceptionOptionType<PayloadTooLargeException, __BaseException>);
57
66
  }
58
67
  export interface PostToConnectionRequest {
59
68
 
@@ -6,7 +6,7 @@ export declare const getRuntimeConfig: (config: ApiGatewayManagementApiClientCon
6
6
  defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
7
7
  base64Decoder: import("@aws-sdk/types").Decoder;
8
8
  base64Encoder: import("@aws-sdk/types").Encoder;
9
- bodyLengthChecker: (body: any) => number | undefined;
9
+ bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
10
10
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
11
11
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
12
12
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
@@ -6,7 +6,7 @@ export declare const getRuntimeConfig: (config: ApiGatewayManagementApiClientCon
6
6
  defaultsMode: import("@aws-sdk/types").Provider<import("@aws-sdk/smithy-client").ResolvedDefaultsMode>;
7
7
  base64Decoder: import("@aws-sdk/types").Decoder;
8
8
  base64Encoder: import("@aws-sdk/types").Encoder;
9
- bodyLengthChecker: (body: any) => number | undefined;
9
+ bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
10
10
  credentialDefaultProvider: (input: any) => import("@aws-sdk/types").Provider<import("@aws-sdk/types").Credentials>;
11
11
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
12
12
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
@@ -6,7 +6,7 @@ export declare const getRuntimeConfig: (config: ApiGatewayManagementApiClientCon
6
6
  requestHandler: (import("@aws-sdk/types").RequestHandler<any, any, import("@aws-sdk/types").HttpHandlerOptions> & import("@aws-sdk/protocol-http").HttpHandler) | import("@aws-sdk/fetch-http-handler").FetchHttpHandler;
7
7
  apiVersion: string;
8
8
  urlParser: import("@aws-sdk/types").UrlParser;
9
- bodyLengthChecker: (body: any) => number | undefined;
9
+ bodyLengthChecker: import("@aws-sdk/types").BodyLengthCalculator;
10
10
  streamCollector: import("@aws-sdk/types").StreamCollector;
11
11
  base64Decoder: import("@aws-sdk/types").Decoder;
12
12
  base64Encoder: import("@aws-sdk/types").Encoder;
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.51.0",
4
+ "version": "3.54.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",
@@ -9,7 +9,7 @@
9
9
  "build:es": "tsc -p tsconfig.es.json",
10
10
  "build:types": "tsc -p tsconfig.types.json",
11
11
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
12
- "clean": "rimraf ./dist-*"
12
+ "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo"
13
13
  },
14
14
  "main": "./dist-cjs/index.js",
15
15
  "types": "./dist-types/index.d.ts",
@@ -18,40 +18,40 @@
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.51.0",
22
- "@aws-sdk/config-resolver": "3.51.0",
23
- "@aws-sdk/credential-provider-node": "3.51.0",
24
- "@aws-sdk/fetch-http-handler": "3.50.0",
25
- "@aws-sdk/hash-node": "3.50.0",
26
- "@aws-sdk/invalid-dependency": "3.50.0",
27
- "@aws-sdk/middleware-content-length": "3.50.0",
28
- "@aws-sdk/middleware-host-header": "3.50.0",
29
- "@aws-sdk/middleware-logger": "3.50.0",
30
- "@aws-sdk/middleware-retry": "3.51.0",
31
- "@aws-sdk/middleware-serde": "3.50.0",
32
- "@aws-sdk/middleware-signing": "3.50.0",
33
- "@aws-sdk/middleware-stack": "3.50.0",
34
- "@aws-sdk/middleware-user-agent": "3.50.0",
35
- "@aws-sdk/node-config-provider": "3.51.0",
36
- "@aws-sdk/node-http-handler": "3.50.0",
37
- "@aws-sdk/protocol-http": "3.50.0",
38
- "@aws-sdk/smithy-client": "3.50.0",
39
- "@aws-sdk/types": "3.50.0",
40
- "@aws-sdk/url-parser": "3.50.0",
41
- "@aws-sdk/util-base64-browser": "3.49.0",
42
- "@aws-sdk/util-base64-node": "3.49.0",
43
- "@aws-sdk/util-body-length-browser": "3.49.0",
44
- "@aws-sdk/util-body-length-node": "3.49.0",
45
- "@aws-sdk/util-defaults-mode-browser": "3.50.0",
46
- "@aws-sdk/util-defaults-mode-node": "3.51.0",
47
- "@aws-sdk/util-user-agent-browser": "3.50.0",
48
- "@aws-sdk/util-user-agent-node": "3.51.0",
49
- "@aws-sdk/util-utf8-browser": "3.49.0",
50
- "@aws-sdk/util-utf8-node": "3.49.0",
21
+ "@aws-sdk/client-sts": "3.54.0",
22
+ "@aws-sdk/config-resolver": "3.54.0",
23
+ "@aws-sdk/credential-provider-node": "3.54.0",
24
+ "@aws-sdk/fetch-http-handler": "3.54.0",
25
+ "@aws-sdk/hash-node": "3.54.0",
26
+ "@aws-sdk/invalid-dependency": "3.54.0",
27
+ "@aws-sdk/middleware-content-length": "3.54.0",
28
+ "@aws-sdk/middleware-host-header": "3.54.0",
29
+ "@aws-sdk/middleware-logger": "3.54.0",
30
+ "@aws-sdk/middleware-retry": "3.54.0",
31
+ "@aws-sdk/middleware-serde": "3.54.0",
32
+ "@aws-sdk/middleware-signing": "3.54.0",
33
+ "@aws-sdk/middleware-stack": "3.54.0",
34
+ "@aws-sdk/middleware-user-agent": "3.54.0",
35
+ "@aws-sdk/node-config-provider": "3.54.0",
36
+ "@aws-sdk/node-http-handler": "3.54.0",
37
+ "@aws-sdk/protocol-http": "3.54.0",
38
+ "@aws-sdk/smithy-client": "3.54.0",
39
+ "@aws-sdk/types": "3.54.0",
40
+ "@aws-sdk/url-parser": "3.54.0",
41
+ "@aws-sdk/util-base64-browser": "3.52.0",
42
+ "@aws-sdk/util-base64-node": "3.52.0",
43
+ "@aws-sdk/util-body-length-browser": "3.54.0",
44
+ "@aws-sdk/util-body-length-node": "3.54.0",
45
+ "@aws-sdk/util-defaults-mode-browser": "3.54.0",
46
+ "@aws-sdk/util-defaults-mode-node": "3.54.0",
47
+ "@aws-sdk/util-user-agent-browser": "3.54.0",
48
+ "@aws-sdk/util-user-agent-node": "3.54.0",
49
+ "@aws-sdk/util-utf8-browser": "3.52.0",
50
+ "@aws-sdk/util-utf8-node": "3.52.0",
51
51
  "tslib": "^2.3.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@aws-sdk/service-client-documentation-generator": "3.49.0",
54
+ "@aws-sdk/service-client-documentation-generator": "3.52.0",
55
55
  "@tsconfig/recommended": "1.0.1",
56
56
  "@types/node": "^12.7.5",
57
57
  "concurrently": "7.0.0",