@aws-sdk/client-workmailmessageflow 3.131.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 CHANGED
@@ -3,6 +3,39 @@
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
+
17
+ # [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
18
+
19
+
20
+ ### Features
21
+
22
+ * **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
29
+
30
+
31
+ ### Features
32
+
33
+ * **namespaces:** remove namespaces with only a log filter ([#3823](https://github.com/aws/aws-sdk-js-v3/issues/3823)) ([33e6822](https://github.com/aws/aws-sdk-js-v3/commit/33e68228fb64c53dd8f89e6be76dd5f46edc3cfd))
34
+
35
+
36
+
37
+
38
+
6
39
  # [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
7
40
 
8
41
  **Note:** Version bump only for package @aws-sdk/client-workmailmessageflow
package/README.md CHANGED
@@ -169,7 +169,7 @@ try {
169
169
  const data = await client.send(command);
170
170
  // process data.
171
171
  } catch (error) {
172
- const { requestId, cfId, extendedRequestId } = error.$metadata;
172
+ const { requestId, cfId, extendedRequestId } = error.$$metadata;
173
173
  console.log({ requestId, cfId, extendedRequestId });
174
174
  /**
175
175
  * The keys within exceptions are also parsed.
@@ -20,8 +20,8 @@ class GetRawMessageContentCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.GetRawMessageContentRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.GetRawMessageContentResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.GetRawMessageContentRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.GetRawMessageContentResponseFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20,8 +20,8 @@ class PutRawMessageContentCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.PutRawMessageContentRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.PutRawMessageContentResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.PutRawMessageContentRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.PutRawMessageContentResponseFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -1,19 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PutRawMessageContentResponse = exports.PutRawMessageContentRequest = exports.RawMessageContent = exports.S3Reference = exports.MessageRejected = exports.MessageFrozen = exports.InvalidContentLocation = exports.ResourceNotFoundException = exports.GetRawMessageContentResponse = exports.GetRawMessageContentRequest = void 0;
3
+ exports.PutRawMessageContentResponseFilterSensitiveLog = exports.PutRawMessageContentRequestFilterSensitiveLog = exports.RawMessageContentFilterSensitiveLog = exports.S3ReferenceFilterSensitiveLog = exports.GetRawMessageContentResponseFilterSensitiveLog = exports.GetRawMessageContentRequestFilterSensitiveLog = exports.MessageRejected = exports.MessageFrozen = exports.InvalidContentLocation = exports.ResourceNotFoundException = void 0;
4
4
  const WorkMailMessageFlowServiceException_1 = require("./WorkMailMessageFlowServiceException");
5
- var GetRawMessageContentRequest;
6
- (function (GetRawMessageContentRequest) {
7
- GetRawMessageContentRequest.filterSensitiveLog = (obj) => ({
8
- ...obj,
9
- });
10
- })(GetRawMessageContentRequest = exports.GetRawMessageContentRequest || (exports.GetRawMessageContentRequest = {}));
11
- var GetRawMessageContentResponse;
12
- (function (GetRawMessageContentResponse) {
13
- GetRawMessageContentResponse.filterSensitiveLog = (obj) => ({
14
- ...obj,
15
- });
16
- })(GetRawMessageContentResponse = exports.GetRawMessageContentResponse || (exports.GetRawMessageContentResponse = {}));
17
5
  class ResourceNotFoundException extends WorkMailMessageFlowServiceException_1.WorkMailMessageFlowServiceException {
18
6
  constructor(opts) {
19
7
  super({
@@ -66,27 +54,27 @@ class MessageRejected extends WorkMailMessageFlowServiceException_1.WorkMailMess
66
54
  }
67
55
  }
68
56
  exports.MessageRejected = MessageRejected;
69
- var S3Reference;
70
- (function (S3Reference) {
71
- S3Reference.filterSensitiveLog = (obj) => ({
72
- ...obj,
73
- });
74
- })(S3Reference = exports.S3Reference || (exports.S3Reference = {}));
75
- var RawMessageContent;
76
- (function (RawMessageContent) {
77
- RawMessageContent.filterSensitiveLog = (obj) => ({
78
- ...obj,
79
- });
80
- })(RawMessageContent = exports.RawMessageContent || (exports.RawMessageContent = {}));
81
- var PutRawMessageContentRequest;
82
- (function (PutRawMessageContentRequest) {
83
- PutRawMessageContentRequest.filterSensitiveLog = (obj) => ({
84
- ...obj,
85
- });
86
- })(PutRawMessageContentRequest = exports.PutRawMessageContentRequest || (exports.PutRawMessageContentRequest = {}));
87
- var PutRawMessageContentResponse;
88
- (function (PutRawMessageContentResponse) {
89
- PutRawMessageContentResponse.filterSensitiveLog = (obj) => ({
90
- ...obj,
91
- });
92
- })(PutRawMessageContentResponse = exports.PutRawMessageContentResponse || (exports.PutRawMessageContentResponse = {}));
57
+ const GetRawMessageContentRequestFilterSensitiveLog = (obj) => ({
58
+ ...obj,
59
+ });
60
+ exports.GetRawMessageContentRequestFilterSensitiveLog = GetRawMessageContentRequestFilterSensitiveLog;
61
+ const GetRawMessageContentResponseFilterSensitiveLog = (obj) => ({
62
+ ...obj,
63
+ });
64
+ exports.GetRawMessageContentResponseFilterSensitiveLog = GetRawMessageContentResponseFilterSensitiveLog;
65
+ const S3ReferenceFilterSensitiveLog = (obj) => ({
66
+ ...obj,
67
+ });
68
+ exports.S3ReferenceFilterSensitiveLog = S3ReferenceFilterSensitiveLog;
69
+ const RawMessageContentFilterSensitiveLog = (obj) => ({
70
+ ...obj,
71
+ });
72
+ exports.RawMessageContentFilterSensitiveLog = RawMessageContentFilterSensitiveLog;
73
+ const PutRawMessageContentRequestFilterSensitiveLog = (obj) => ({
74
+ ...obj,
75
+ });
76
+ exports.PutRawMessageContentRequestFilterSensitiveLog = PutRawMessageContentRequestFilterSensitiveLog;
77
+ const PutRawMessageContentResponseFilterSensitiveLog = (obj) => ({
78
+ ...obj,
79
+ });
80
+ exports.PutRawMessageContentResponseFilterSensitiveLog = PutRawMessageContentResponseFilterSensitiveLog;
@@ -9,16 +9,7 @@ const serializeAws_restJson1GetRawMessageContentCommand = 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 || ""}` + "/messages/{messageId}";
12
- if (input.messageId !== undefined) {
13
- const labelValue = input.messageId;
14
- if (labelValue.length <= 0) {
15
- throw new Error("Empty value provided for input HTTP label: messageId.");
16
- }
17
- resolvedPath = resolvedPath.replace("{messageId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
18
- }
19
- else {
20
- throw new Error("No value provided for input HTTP label: messageId.");
21
- }
12
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "messageId", () => input.messageId, "{messageId}", false);
22
13
  let body;
23
14
  return new protocol_http_1.HttpRequest({
24
15
  protocol,
@@ -37,16 +28,7 @@ const serializeAws_restJson1PutRawMessageContentCommand = async (input, context)
37
28
  "content-type": "application/json",
38
29
  };
39
30
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/messages/{messageId}";
40
- if (input.messageId !== undefined) {
41
- const labelValue = input.messageId;
42
- if (labelValue.length <= 0) {
43
- throw new Error("Empty value provided for input HTTP label: messageId.");
44
- }
45
- resolvedPath = resolvedPath.replace("{messageId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
46
- }
47
- else {
48
- throw new Error("No value provided for input HTTP label: messageId.");
49
- }
31
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "messageId", () => input.messageId, "{messageId}", false);
50
32
  let body;
51
33
  body = JSON.stringify({
52
34
  ...(input.content != null && { content: serializeAws_restJson1RawMessageContent(input.content, context) }),
@@ -66,13 +48,12 @@ const deserializeAws_restJson1GetRawMessageContentCommand = async (output, conte
66
48
  if (output.statusCode !== 200 && output.statusCode >= 300) {
67
49
  return deserializeAws_restJson1GetRawMessageContentCommandError(output, context);
68
50
  }
69
- const contents = {
51
+ const contents = map({
70
52
  $metadata: deserializeMetadata(output),
71
- messageContent: undefined,
72
- };
53
+ });
73
54
  const data = output.body;
74
55
  contents.messageContent = data;
75
- return Promise.resolve(contents);
56
+ return contents;
76
57
  };
77
58
  exports.deserializeAws_restJson1GetRawMessageContentCommand = deserializeAws_restJson1GetRawMessageContentCommand;
78
59
  const deserializeAws_restJson1GetRawMessageContentCommandError = async (output, context) => {
@@ -80,7 +61,6 @@ const deserializeAws_restJson1GetRawMessageContentCommandError = async (output,
80
61
  ...output,
81
62
  body: await parseBody(output.body, context),
82
63
  };
83
- let response;
84
64
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
85
65
  switch (errorCode) {
86
66
  case "ResourceNotFoundException":
@@ -88,25 +68,23 @@ const deserializeAws_restJson1GetRawMessageContentCommandError = async (output,
88
68
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
89
69
  default:
90
70
  const parsedBody = parsedOutput.body;
91
- const $metadata = deserializeMetadata(output);
92
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
93
- response = new WorkMailMessageFlowServiceException_1.WorkMailMessageFlowServiceException({
94
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
95
- $fault: "client",
96
- $metadata,
71
+ (0, smithy_client_1.throwDefaultError)({
72
+ output,
73
+ parsedBody,
74
+ exceptionCtor: WorkMailMessageFlowServiceException_1.WorkMailMessageFlowServiceException,
75
+ errorCode,
97
76
  });
98
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
99
77
  }
100
78
  };
101
79
  const deserializeAws_restJson1PutRawMessageContentCommand = async (output, context) => {
102
80
  if (output.statusCode !== 200 && output.statusCode >= 300) {
103
81
  return deserializeAws_restJson1PutRawMessageContentCommandError(output, context);
104
82
  }
105
- const contents = {
83
+ const contents = map({
106
84
  $metadata: deserializeMetadata(output),
107
- };
85
+ });
108
86
  await collectBody(output.body, context);
109
- return Promise.resolve(contents);
87
+ return contents;
110
88
  };
111
89
  exports.deserializeAws_restJson1PutRawMessageContentCommand = deserializeAws_restJson1PutRawMessageContentCommand;
112
90
  const deserializeAws_restJson1PutRawMessageContentCommandError = async (output, context) => {
@@ -114,7 +92,6 @@ const deserializeAws_restJson1PutRawMessageContentCommandError = async (output,
114
92
  ...output,
115
93
  body: await parseBody(output.body, context),
116
94
  };
117
- let response;
118
95
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
119
96
  switch (errorCode) {
120
97
  case "InvalidContentLocation":
@@ -131,20 +108,19 @@ const deserializeAws_restJson1PutRawMessageContentCommandError = async (output,
131
108
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
132
109
  default:
133
110
  const parsedBody = parsedOutput.body;
134
- const $metadata = deserializeMetadata(output);
135
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
136
- response = new WorkMailMessageFlowServiceException_1.WorkMailMessageFlowServiceException({
137
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
138
- $fault: "client",
139
- $metadata,
111
+ (0, smithy_client_1.throwDefaultError)({
112
+ output,
113
+ parsedBody,
114
+ exceptionCtor: WorkMailMessageFlowServiceException_1.WorkMailMessageFlowServiceException,
115
+ errorCode,
140
116
  });
141
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
142
117
  }
143
118
  };
119
+ const map = smithy_client_1.map;
144
120
  const deserializeAws_restJson1InvalidContentLocationResponse = async (parsedOutput, context) => {
145
- const contents = {};
121
+ const contents = map({});
146
122
  const data = parsedOutput.body;
147
- if (data.message !== undefined && data.message !== null) {
123
+ if (data.message != null) {
148
124
  contents.message = (0, smithy_client_1.expectString)(data.message);
149
125
  }
150
126
  const exception = new models_0_1.InvalidContentLocation({
@@ -154,9 +130,9 @@ const deserializeAws_restJson1InvalidContentLocationResponse = async (parsedOutp
154
130
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
155
131
  };
156
132
  const deserializeAws_restJson1MessageFrozenResponse = async (parsedOutput, context) => {
157
- const contents = {};
133
+ const contents = map({});
158
134
  const data = parsedOutput.body;
159
- if (data.message !== undefined && data.message !== null) {
135
+ if (data.message != null) {
160
136
  contents.message = (0, smithy_client_1.expectString)(data.message);
161
137
  }
162
138
  const exception = new models_0_1.MessageFrozen({
@@ -166,9 +142,9 @@ const deserializeAws_restJson1MessageFrozenResponse = async (parsedOutput, conte
166
142
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
167
143
  };
168
144
  const deserializeAws_restJson1MessageRejectedResponse = async (parsedOutput, context) => {
169
- const contents = {};
145
+ const contents = map({});
170
146
  const data = parsedOutput.body;
171
- if (data.message !== undefined && data.message !== null) {
147
+ if (data.message != null) {
172
148
  contents.message = (0, smithy_client_1.expectString)(data.message);
173
149
  }
174
150
  const exception = new models_0_1.MessageRejected({
@@ -178,9 +154,9 @@ const deserializeAws_restJson1MessageRejectedResponse = async (parsedOutput, con
178
154
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
179
155
  };
180
156
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
181
- const contents = {};
157
+ const contents = map({});
182
158
  const data = parsedOutput.body;
183
- if (data.message !== undefined && data.message !== null) {
159
+ if (data.message != null) {
184
160
  contents.message = (0, smithy_client_1.expectString)(data.message);
185
161
  }
186
162
  const exception = new models_0_1.ResourceNotFoundException({
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { GetRawMessageContentRequest, GetRawMessageContentResponse } from "../models/models_0";
4
+ import { GetRawMessageContentRequestFilterSensitiveLog, GetRawMessageContentResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1GetRawMessageContentCommand, serializeAws_restJson1GetRawMessageContentCommand, } from "../protocols/Aws_restJson1";
6
6
  var GetRawMessageContentCommand = (function (_super) {
7
7
  __extends(GetRawMessageContentCommand, _super);
@@ -20,8 +20,8 @@ var GetRawMessageContentCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: GetRawMessageContentRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: GetRawMessageContentResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: GetRawMessageContentRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: GetRawMessageContentResponseFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { PutRawMessageContentRequest, PutRawMessageContentResponse } from "../models/models_0";
4
+ import { PutRawMessageContentRequestFilterSensitiveLog, PutRawMessageContentResponseFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1PutRawMessageContentCommand, serializeAws_restJson1PutRawMessageContentCommand, } from "../protocols/Aws_restJson1";
6
6
  var PutRawMessageContentCommand = (function (_super) {
7
7
  __extends(PutRawMessageContentCommand, _super);
@@ -20,8 +20,8 @@ var PutRawMessageContentCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: PutRawMessageContentRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: PutRawMessageContentResponse.filterSensitiveLog,
23
+ inputFilterSensitiveLog: PutRawMessageContentRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: PutRawMessageContentResponseFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,13 +1,5 @@
1
1
  import { __assign, __extends } from "tslib";
2
2
  import { WorkMailMessageFlowServiceException as __BaseException } from "./WorkMailMessageFlowServiceException";
3
- export var GetRawMessageContentRequest;
4
- (function (GetRawMessageContentRequest) {
5
- GetRawMessageContentRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
6
- })(GetRawMessageContentRequest || (GetRawMessageContentRequest = {}));
7
- export var GetRawMessageContentResponse;
8
- (function (GetRawMessageContentResponse) {
9
- GetRawMessageContentResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
10
- })(GetRawMessageContentResponse || (GetRawMessageContentResponse = {}));
11
3
  var ResourceNotFoundException = (function (_super) {
12
4
  __extends(ResourceNotFoundException, _super);
13
5
  function ResourceNotFoundException(opts) {
@@ -56,19 +48,9 @@ var MessageRejected = (function (_super) {
56
48
  return MessageRejected;
57
49
  }(__BaseException));
58
50
  export { MessageRejected };
59
- export var S3Reference;
60
- (function (S3Reference) {
61
- S3Reference.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
62
- })(S3Reference || (S3Reference = {}));
63
- export var RawMessageContent;
64
- (function (RawMessageContent) {
65
- RawMessageContent.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
66
- })(RawMessageContent || (RawMessageContent = {}));
67
- export var PutRawMessageContentRequest;
68
- (function (PutRawMessageContentRequest) {
69
- PutRawMessageContentRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
70
- })(PutRawMessageContentRequest || (PutRawMessageContentRequest = {}));
71
- export var PutRawMessageContentResponse;
72
- (function (PutRawMessageContentResponse) {
73
- PutRawMessageContentResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
74
- })(PutRawMessageContentResponse || (PutRawMessageContentResponse = {}));
51
+ export var GetRawMessageContentRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
52
+ export var GetRawMessageContentResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
53
+ export var S3ReferenceFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
54
+ export var RawMessageContentFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
55
+ export var PutRawMessageContentRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
56
+ export var PutRawMessageContentResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -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, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { InvalidContentLocation, MessageFrozen, MessageRejected, ResourceNotFoundException, } from "../models/models_0";
5
5
  import { WorkMailMessageFlowServiceException as __BaseException } from "../models/WorkMailMessageFlowServiceException";
6
6
  export var serializeAws_restJson1GetRawMessageContentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
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_restJson1GetRawMessageContentCommand = function (input,
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 || "") + "/messages/{messageId}";
15
- if (input.messageId !== undefined) {
16
- labelValue = input.messageId;
17
- if (labelValue.length <= 0) {
18
- throw new Error("Empty value provided for input HTTP label: messageId.");
19
- }
20
- resolvedPath = resolvedPath.replace("{messageId}", __extendedEncodeURIComponent(labelValue));
21
- }
22
- else {
23
- throw new Error("No value provided for input HTTP label: messageId.");
24
- }
15
+ resolvedPath = __resolvedPath(resolvedPath, input, "messageId", function () { return input.messageId; }, "{messageId}", false);
25
16
  return [2, new __HttpRequest({
26
17
  protocol: protocol,
27
18
  hostname: hostname,
@@ -35,7 +26,7 @@ export var serializeAws_restJson1GetRawMessageContentCommand = function (input,
35
26
  });
36
27
  }); };
37
28
  export var serializeAws_restJson1PutRawMessageContentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
38
- var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
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()];
@@ -45,16 +36,7 @@ export var serializeAws_restJson1PutRawMessageContentCommand = function (input,
45
36
  "content-type": "application/json",
46
37
  };
47
38
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/messages/{messageId}";
48
- if (input.messageId !== undefined) {
49
- labelValue = input.messageId;
50
- if (labelValue.length <= 0) {
51
- throw new Error("Empty value provided for input HTTP label: messageId.");
52
- }
53
- resolvedPath = resolvedPath.replace("{messageId}", __extendedEncodeURIComponent(labelValue));
54
- }
55
- else {
56
- throw new Error("No value provided for input HTTP label: messageId.");
57
- }
39
+ resolvedPath = __resolvedPath(resolvedPath, input, "messageId", function () { return input.messageId; }, "{messageId}", false);
58
40
  body = JSON.stringify(__assign({}, (input.content != null && { content: serializeAws_restJson1RawMessageContent(input.content, context) })));
59
41
  return [2, new __HttpRequest({
60
42
  protocol: protocol,
@@ -74,17 +56,16 @@ export var deserializeAws_restJson1GetRawMessageContentCommand = function (outpu
74
56
  if (output.statusCode !== 200 && output.statusCode >= 300) {
75
57
  return [2, deserializeAws_restJson1GetRawMessageContentCommandError(output, context)];
76
58
  }
77
- contents = {
59
+ contents = map({
78
60
  $metadata: deserializeMetadata(output),
79
- messageContent: undefined,
80
- };
61
+ });
81
62
  data = output.body;
82
63
  contents.messageContent = data;
83
- return [2, Promise.resolve(contents)];
64
+ return [2, contents];
84
65
  });
85
66
  }); };
86
67
  var deserializeAws_restJson1GetRawMessageContentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
87
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
68
+ var parsedOutput, _a, errorCode, _b, parsedBody;
88
69
  var _c;
89
70
  return __generator(this, function (_d) {
90
71
  switch (_d.label) {
@@ -105,14 +86,14 @@ var deserializeAws_restJson1GetRawMessageContentCommandError = function (output,
105
86
  case 3: throw _d.sent();
106
87
  case 4:
107
88
  parsedBody = parsedOutput.body;
108
- $metadata = deserializeMetadata(output);
109
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
110
- response = new __BaseException({
111
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
112
- $fault: "client",
113
- $metadata: $metadata,
89
+ throwDefaultError({
90
+ output: output,
91
+ parsedBody: parsedBody,
92
+ exceptionCtor: __BaseException,
93
+ errorCode: errorCode,
114
94
  });
115
- throw __decorateServiceException(response, parsedBody);
95
+ _d.label = 5;
96
+ case 5: return [2];
116
97
  }
117
98
  });
118
99
  }); };
@@ -124,18 +105,18 @@ export var deserializeAws_restJson1PutRawMessageContentCommand = function (outpu
124
105
  if (output.statusCode !== 200 && output.statusCode >= 300) {
125
106
  return [2, deserializeAws_restJson1PutRawMessageContentCommandError(output, context)];
126
107
  }
127
- contents = {
108
+ contents = map({
128
109
  $metadata: deserializeMetadata(output),
129
- };
110
+ });
130
111
  return [4, collectBody(output.body, context)];
131
112
  case 1:
132
113
  _a.sent();
133
- return [2, Promise.resolve(contents)];
114
+ return [2, contents];
134
115
  }
135
116
  });
136
117
  }); };
137
118
  var deserializeAws_restJson1PutRawMessageContentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
138
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
119
+ var parsedOutput, _a, errorCode, _b, parsedBody;
139
120
  var _c;
140
121
  return __generator(this, function (_d) {
141
122
  switch (_d.label) {
@@ -168,23 +149,24 @@ var deserializeAws_restJson1PutRawMessageContentCommandError = function (output,
168
149
  case 9: throw _d.sent();
169
150
  case 10:
170
151
  parsedBody = parsedOutput.body;
171
- $metadata = deserializeMetadata(output);
172
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
173
- response = new __BaseException({
174
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
175
- $fault: "client",
176
- $metadata: $metadata,
152
+ throwDefaultError({
153
+ output: output,
154
+ parsedBody: parsedBody,
155
+ exceptionCtor: __BaseException,
156
+ errorCode: errorCode,
177
157
  });
178
- throw __decorateServiceException(response, parsedBody);
158
+ _d.label = 11;
159
+ case 11: return [2];
179
160
  }
180
161
  });
181
162
  }); };
163
+ var map = __map;
182
164
  var deserializeAws_restJson1InvalidContentLocationResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
183
165
  var contents, data, exception;
184
166
  return __generator(this, function (_a) {
185
- contents = {};
167
+ contents = map({});
186
168
  data = parsedOutput.body;
187
- if (data.message !== undefined && data.message !== null) {
169
+ if (data.message != null) {
188
170
  contents.message = __expectString(data.message);
189
171
  }
190
172
  exception = new InvalidContentLocation(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -194,9 +176,9 @@ var deserializeAws_restJson1InvalidContentLocationResponse = function (parsedOut
194
176
  var deserializeAws_restJson1MessageFrozenResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
195
177
  var contents, data, exception;
196
178
  return __generator(this, function (_a) {
197
- contents = {};
179
+ contents = map({});
198
180
  data = parsedOutput.body;
199
- if (data.message !== undefined && data.message !== null) {
181
+ if (data.message != null) {
200
182
  contents.message = __expectString(data.message);
201
183
  }
202
184
  exception = new MessageFrozen(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -206,9 +188,9 @@ var deserializeAws_restJson1MessageFrozenResponse = function (parsedOutput, cont
206
188
  var deserializeAws_restJson1MessageRejectedResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
207
189
  var contents, data, exception;
208
190
  return __generator(this, function (_a) {
209
- contents = {};
191
+ contents = map({});
210
192
  data = parsedOutput.body;
211
- if (data.message !== undefined && data.message !== null) {
193
+ if (data.message != null) {
212
194
  contents.message = __expectString(data.message);
213
195
  }
214
196
  exception = new MessageRejected(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -218,9 +200,9 @@ var deserializeAws_restJson1MessageRejectedResponse = function (parsedOutput, co
218
200
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
219
201
  var contents, data, exception;
220
202
  return __generator(this, function (_a) {
221
- contents = {};
203
+ contents = map({});
222
204
  data = parsedOutput.body;
223
- if (data.message !== undefined && data.message !== null) {
205
+ if (data.message != null) {
224
206
  contents.message = __expectString(data.message);
225
207
  }
226
208
  exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
@@ -8,24 +8,12 @@ export interface GetRawMessageContentRequest {
8
8
  */
9
9
  messageId: string | undefined;
10
10
  }
11
- export declare namespace GetRawMessageContentRequest {
12
- /**
13
- * @internal
14
- */
15
- const filterSensitiveLog: (obj: GetRawMessageContentRequest) => any;
16
- }
17
11
  export interface GetRawMessageContentResponse {
18
12
  /**
19
13
  * <p>The raw content of the email message, in MIME format.</p>
20
14
  */
21
15
  messageContent: Readable | ReadableStream | Blob | undefined;
22
16
  }
23
- export declare namespace GetRawMessageContentResponse {
24
- /**
25
- * @internal
26
- */
27
- const filterSensitiveLog: (obj: GetRawMessageContentResponse) => any;
28
- }
29
17
  /**
30
18
  * <p>The requested email message is not found.</p>
31
19
  */
@@ -110,12 +98,6 @@ export interface S3Reference {
110
98
  */
111
99
  objectVersion?: string;
112
100
  }
113
- export declare namespace S3Reference {
114
- /**
115
- * @internal
116
- */
117
- const filterSensitiveLog: (obj: S3Reference) => any;
118
- }
119
101
  /**
120
102
  * <p>Provides the MIME content of the updated email message as an S3 object. All MIME content must meet the following criteria:</p>
121
103
  * <ul>
@@ -151,12 +133,6 @@ export interface RawMessageContent {
151
133
  */
152
134
  s3Reference: S3Reference | undefined;
153
135
  }
154
- export declare namespace RawMessageContent {
155
- /**
156
- * @internal
157
- */
158
- const filterSensitiveLog: (obj: RawMessageContent) => any;
159
- }
160
136
  export interface PutRawMessageContentRequest {
161
137
  /**
162
138
  * <p>The identifier of the email message being updated.</p>
@@ -167,17 +143,29 @@ export interface PutRawMessageContentRequest {
167
143
  */
168
144
  content: RawMessageContent | undefined;
169
145
  }
170
- export declare namespace PutRawMessageContentRequest {
171
- /**
172
- * @internal
173
- */
174
- const filterSensitiveLog: (obj: PutRawMessageContentRequest) => any;
175
- }
176
146
  export interface PutRawMessageContentResponse {
177
147
  }
178
- export declare namespace PutRawMessageContentResponse {
179
- /**
180
- * @internal
181
- */
182
- const filterSensitiveLog: (obj: PutRawMessageContentResponse) => any;
183
- }
148
+ /**
149
+ * @internal
150
+ */
151
+ export declare const GetRawMessageContentRequestFilterSensitiveLog: (obj: GetRawMessageContentRequest) => any;
152
+ /**
153
+ * @internal
154
+ */
155
+ export declare const GetRawMessageContentResponseFilterSensitiveLog: (obj: GetRawMessageContentResponse) => any;
156
+ /**
157
+ * @internal
158
+ */
159
+ export declare const S3ReferenceFilterSensitiveLog: (obj: S3Reference) => any;
160
+ /**
161
+ * @internal
162
+ */
163
+ export declare const RawMessageContentFilterSensitiveLog: (obj: RawMessageContent) => any;
164
+ /**
165
+ * @internal
166
+ */
167
+ export declare const PutRawMessageContentRequestFilterSensitiveLog: (obj: PutRawMessageContentRequest) => any;
168
+ /**
169
+ * @internal
170
+ */
171
+ export declare const PutRawMessageContentResponseFilterSensitiveLog: (obj: PutRawMessageContentResponse) => any;
@@ -6,18 +6,10 @@ export interface GetRawMessageContentRequest {
6
6
 
7
7
  messageId: string | undefined;
8
8
  }
9
- export declare namespace GetRawMessageContentRequest {
10
-
11
- const filterSensitiveLog: (obj: GetRawMessageContentRequest) => any;
12
- }
13
9
  export interface GetRawMessageContentResponse {
14
10
 
15
11
  messageContent: Readable | ReadableStream | Blob | undefined;
16
12
  }
17
- export declare namespace GetRawMessageContentResponse {
18
-
19
- const filterSensitiveLog: (obj: GetRawMessageContentResponse) => any;
20
- }
21
13
 
22
14
  export declare class ResourceNotFoundException extends __BaseException {
23
15
  readonly name: "ResourceNotFoundException";
@@ -55,32 +47,28 @@ export interface S3Reference {
55
47
 
56
48
  objectVersion?: string;
57
49
  }
58
- export declare namespace S3Reference {
59
-
60
- const filterSensitiveLog: (obj: S3Reference) => any;
61
- }
62
50
 
63
51
  export interface RawMessageContent {
64
52
 
65
53
  s3Reference: S3Reference | undefined;
66
54
  }
67
- export declare namespace RawMessageContent {
68
-
69
- const filterSensitiveLog: (obj: RawMessageContent) => any;
70
- }
71
55
  export interface PutRawMessageContentRequest {
72
56
 
73
57
  messageId: string | undefined;
74
58
 
75
59
  content: RawMessageContent | undefined;
76
60
  }
77
- export declare namespace PutRawMessageContentRequest {
78
-
79
- const filterSensitiveLog: (obj: PutRawMessageContentRequest) => any;
80
- }
81
61
  export interface PutRawMessageContentResponse {
82
62
  }
83
- export declare namespace PutRawMessageContentResponse {
84
-
85
- const filterSensitiveLog: (obj: PutRawMessageContentResponse) => any;
86
- }
63
+
64
+ export declare const GetRawMessageContentRequestFilterSensitiveLog: (obj: GetRawMessageContentRequest) => any;
65
+
66
+ export declare const GetRawMessageContentResponseFilterSensitiveLog: (obj: GetRawMessageContentResponse) => any;
67
+
68
+ export declare const S3ReferenceFilterSensitiveLog: (obj: S3Reference) => any;
69
+
70
+ export declare const RawMessageContentFilterSensitiveLog: (obj: RawMessageContent) => any;
71
+
72
+ export declare const PutRawMessageContentRequestFilterSensitiveLog: (obj: PutRawMessageContentRequest) => any;
73
+
74
+ export declare const PutRawMessageContentResponseFilterSensitiveLog: (obj: PutRawMessageContentResponse) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-workmailmessageflow",
3
3
  "description": "AWS SDK for JavaScript Workmailmessageflow Client for Node.js, Browser and React Native",
4
- "version": "3.131.0",
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.131.0",
21
+ "@aws-sdk/client-sts": "3.142.0",
22
22
  "@aws-sdk/config-resolver": "3.130.0",
23
- "@aws-sdk/credential-provider-node": "3.131.0",
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.127.0",
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.127.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.130.0",
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",