@aws-sdk/client-workmailmessageflow 3.312.0 → 3.315.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,9 +30,9 @@ const se_PutRawMessageContentCommand = async (input, context) => {
|
|
|
30
30
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/messages/{messageId}";
|
|
31
31
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "messageId", () => input.messageId, "{messageId}", false);
|
|
32
32
|
let body;
|
|
33
|
-
body = JSON.stringify({
|
|
34
|
-
|
|
35
|
-
});
|
|
33
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
34
|
+
content: (_) => (0, smithy_client_1._json)(_),
|
|
35
|
+
}));
|
|
36
36
|
return new protocol_http_1.HttpRequest({
|
|
37
37
|
protocol,
|
|
38
38
|
hostname,
|
|
@@ -48,7 +48,7 @@ const de_GetRawMessageContentCommand = async (output, context) => {
|
|
|
48
48
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
49
49
|
return de_GetRawMessageContentCommandError(output, context);
|
|
50
50
|
}
|
|
51
|
-
const contents = map({
|
|
51
|
+
const contents = (0, smithy_client_1.map)({
|
|
52
52
|
$metadata: deserializeMetadata(output),
|
|
53
53
|
});
|
|
54
54
|
const data = output.body;
|
|
@@ -69,10 +69,9 @@ const de_GetRawMessageContentCommandError = async (output, context) => {
|
|
|
69
69
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
70
70
|
default:
|
|
71
71
|
const parsedBody = parsedOutput.body;
|
|
72
|
-
|
|
72
|
+
return throwDefaultError({
|
|
73
73
|
output,
|
|
74
74
|
parsedBody,
|
|
75
|
-
exceptionCtor: WorkMailMessageFlowServiceException_1.WorkMailMessageFlowServiceException,
|
|
76
75
|
errorCode,
|
|
77
76
|
});
|
|
78
77
|
}
|
|
@@ -81,7 +80,7 @@ const de_PutRawMessageContentCommand = async (output, context) => {
|
|
|
81
80
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
82
81
|
return de_PutRawMessageContentCommandError(output, context);
|
|
83
82
|
}
|
|
84
|
-
const contents = map({
|
|
83
|
+
const contents = (0, smithy_client_1.map)({
|
|
85
84
|
$metadata: deserializeMetadata(output),
|
|
86
85
|
});
|
|
87
86
|
await collectBody(output.body, context);
|
|
@@ -109,21 +108,21 @@ const de_PutRawMessageContentCommandError = async (output, context) => {
|
|
|
109
108
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
110
109
|
default:
|
|
111
110
|
const parsedBody = parsedOutput.body;
|
|
112
|
-
|
|
111
|
+
return throwDefaultError({
|
|
113
112
|
output,
|
|
114
113
|
parsedBody,
|
|
115
|
-
exceptionCtor: WorkMailMessageFlowServiceException_1.WorkMailMessageFlowServiceException,
|
|
116
114
|
errorCode,
|
|
117
115
|
});
|
|
118
116
|
}
|
|
119
117
|
};
|
|
120
|
-
const
|
|
118
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(WorkMailMessageFlowServiceException_1.WorkMailMessageFlowServiceException);
|
|
121
119
|
const de_InvalidContentLocationRes = async (parsedOutput, context) => {
|
|
122
|
-
const contents = map({});
|
|
120
|
+
const contents = (0, smithy_client_1.map)({});
|
|
123
121
|
const data = parsedOutput.body;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
122
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
123
|
+
message: smithy_client_1.expectString,
|
|
124
|
+
});
|
|
125
|
+
Object.assign(contents, doc);
|
|
127
126
|
const exception = new models_0_1.InvalidContentLocation({
|
|
128
127
|
$metadata: deserializeMetadata(parsedOutput),
|
|
129
128
|
...contents,
|
|
@@ -131,11 +130,12 @@ const de_InvalidContentLocationRes = async (parsedOutput, context) => {
|
|
|
131
130
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
132
131
|
};
|
|
133
132
|
const de_MessageFrozenRes = async (parsedOutput, context) => {
|
|
134
|
-
const contents = map({});
|
|
133
|
+
const contents = (0, smithy_client_1.map)({});
|
|
135
134
|
const data = parsedOutput.body;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
135
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
136
|
+
message: smithy_client_1.expectString,
|
|
137
|
+
});
|
|
138
|
+
Object.assign(contents, doc);
|
|
139
139
|
const exception = new models_0_1.MessageFrozen({
|
|
140
140
|
$metadata: deserializeMetadata(parsedOutput),
|
|
141
141
|
...contents,
|
|
@@ -143,11 +143,12 @@ const de_MessageFrozenRes = async (parsedOutput, context) => {
|
|
|
143
143
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
144
144
|
};
|
|
145
145
|
const de_MessageRejectedRes = async (parsedOutput, context) => {
|
|
146
|
-
const contents = map({});
|
|
146
|
+
const contents = (0, smithy_client_1.map)({});
|
|
147
147
|
const data = parsedOutput.body;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
148
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
149
|
+
message: smithy_client_1.expectString,
|
|
150
|
+
});
|
|
151
|
+
Object.assign(contents, doc);
|
|
151
152
|
const exception = new models_0_1.MessageRejected({
|
|
152
153
|
$metadata: deserializeMetadata(parsedOutput),
|
|
153
154
|
...contents,
|
|
@@ -155,29 +156,18 @@ const de_MessageRejectedRes = async (parsedOutput, context) => {
|
|
|
155
156
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
156
157
|
};
|
|
157
158
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
158
|
-
const contents = map({});
|
|
159
|
+
const contents = (0, smithy_client_1.map)({});
|
|
159
160
|
const data = parsedOutput.body;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
161
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
162
|
+
message: smithy_client_1.expectString,
|
|
163
|
+
});
|
|
164
|
+
Object.assign(contents, doc);
|
|
163
165
|
const exception = new models_0_1.ResourceNotFoundException({
|
|
164
166
|
$metadata: deserializeMetadata(parsedOutput),
|
|
165
167
|
...contents,
|
|
166
168
|
});
|
|
167
169
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
168
170
|
};
|
|
169
|
-
const se_RawMessageContent = (input, context) => {
|
|
170
|
-
return {
|
|
171
|
-
...(input.s3Reference != null && { s3Reference: se_S3Reference(input.s3Reference, context) }),
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
const se_S3Reference = (input, context) => {
|
|
175
|
-
return {
|
|
176
|
-
...(input.bucket != null && { bucket: input.bucket }),
|
|
177
|
-
...(input.key != null && { key: input.key }),
|
|
178
|
-
...(input.objectVersion != null && { objectVersion: input.objectVersion }),
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
171
|
const deserializeMetadata = (output) => ({
|
|
182
172
|
httpStatusCode: output.statusCode,
|
|
183
173
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectString as __expectString, map
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectString as __expectString, map, resolvedPath as __resolvedPath, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { InvalidContentLocation, MessageFrozen, MessageRejected, ResourceNotFoundException, } from "../models/models_0";
|
|
4
4
|
import { WorkMailMessageFlowServiceException as __BaseException } from "../models/WorkMailMessageFlowServiceException";
|
|
5
5
|
export const se_GetRawMessageContentCommand = async (input, context) => {
|
|
@@ -26,9 +26,9 @@ export const se_PutRawMessageContentCommand = async (input, context) => {
|
|
|
26
26
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/messages/{messageId}";
|
|
27
27
|
resolvedPath = __resolvedPath(resolvedPath, input, "messageId", () => input.messageId, "{messageId}", false);
|
|
28
28
|
let body;
|
|
29
|
-
body = JSON.stringify({
|
|
30
|
-
|
|
31
|
-
});
|
|
29
|
+
body = JSON.stringify(take(input, {
|
|
30
|
+
content: (_) => _json(_),
|
|
31
|
+
}));
|
|
32
32
|
return new __HttpRequest({
|
|
33
33
|
protocol,
|
|
34
34
|
hostname,
|
|
@@ -63,10 +63,9 @@ const de_GetRawMessageContentCommandError = async (output, context) => {
|
|
|
63
63
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
64
64
|
default:
|
|
65
65
|
const parsedBody = parsedOutput.body;
|
|
66
|
-
throwDefaultError({
|
|
66
|
+
return throwDefaultError({
|
|
67
67
|
output,
|
|
68
68
|
parsedBody,
|
|
69
|
-
exceptionCtor: __BaseException,
|
|
70
69
|
errorCode,
|
|
71
70
|
});
|
|
72
71
|
}
|
|
@@ -102,21 +101,21 @@ const de_PutRawMessageContentCommandError = async (output, context) => {
|
|
|
102
101
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
103
102
|
default:
|
|
104
103
|
const parsedBody = parsedOutput.body;
|
|
105
|
-
throwDefaultError({
|
|
104
|
+
return throwDefaultError({
|
|
106
105
|
output,
|
|
107
106
|
parsedBody,
|
|
108
|
-
exceptionCtor: __BaseException,
|
|
109
107
|
errorCode,
|
|
110
108
|
});
|
|
111
109
|
}
|
|
112
110
|
};
|
|
113
|
-
const
|
|
111
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
114
112
|
const de_InvalidContentLocationRes = async (parsedOutput, context) => {
|
|
115
113
|
const contents = map({});
|
|
116
114
|
const data = parsedOutput.body;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
115
|
+
const doc = take(data, {
|
|
116
|
+
message: __expectString,
|
|
117
|
+
});
|
|
118
|
+
Object.assign(contents, doc);
|
|
120
119
|
const exception = new InvalidContentLocation({
|
|
121
120
|
$metadata: deserializeMetadata(parsedOutput),
|
|
122
121
|
...contents,
|
|
@@ -126,9 +125,10 @@ const de_InvalidContentLocationRes = async (parsedOutput, context) => {
|
|
|
126
125
|
const de_MessageFrozenRes = async (parsedOutput, context) => {
|
|
127
126
|
const contents = map({});
|
|
128
127
|
const data = parsedOutput.body;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
128
|
+
const doc = take(data, {
|
|
129
|
+
message: __expectString,
|
|
130
|
+
});
|
|
131
|
+
Object.assign(contents, doc);
|
|
132
132
|
const exception = new MessageFrozen({
|
|
133
133
|
$metadata: deserializeMetadata(parsedOutput),
|
|
134
134
|
...contents,
|
|
@@ -138,9 +138,10 @@ const de_MessageFrozenRes = async (parsedOutput, context) => {
|
|
|
138
138
|
const de_MessageRejectedRes = async (parsedOutput, context) => {
|
|
139
139
|
const contents = map({});
|
|
140
140
|
const data = parsedOutput.body;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
141
|
+
const doc = take(data, {
|
|
142
|
+
message: __expectString,
|
|
143
|
+
});
|
|
144
|
+
Object.assign(contents, doc);
|
|
144
145
|
const exception = new MessageRejected({
|
|
145
146
|
$metadata: deserializeMetadata(parsedOutput),
|
|
146
147
|
...contents,
|
|
@@ -150,27 +151,16 @@ const de_MessageRejectedRes = async (parsedOutput, context) => {
|
|
|
150
151
|
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
151
152
|
const contents = map({});
|
|
152
153
|
const data = parsedOutput.body;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
154
|
+
const doc = take(data, {
|
|
155
|
+
message: __expectString,
|
|
156
|
+
});
|
|
157
|
+
Object.assign(contents, doc);
|
|
156
158
|
const exception = new ResourceNotFoundException({
|
|
157
159
|
$metadata: deserializeMetadata(parsedOutput),
|
|
158
160
|
...contents,
|
|
159
161
|
});
|
|
160
162
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
161
163
|
};
|
|
162
|
-
const se_RawMessageContent = (input, context) => {
|
|
163
|
-
return {
|
|
164
|
-
...(input.s3Reference != null && { s3Reference: se_S3Reference(input.s3Reference, context) }),
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
const se_S3Reference = (input, context) => {
|
|
168
|
-
return {
|
|
169
|
-
...(input.bucket != null && { bucket: input.bucket }),
|
|
170
|
-
...(input.key != null && { key: input.key }),
|
|
171
|
-
...(input.objectVersion != null && { objectVersion: input.objectVersion }),
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
164
|
const deserializeMetadata = (output) => ({
|
|
175
165
|
httpStatusCode: output.statusCode,
|
|
176
166
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
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.
|
|
4
|
+
"version": "3.315.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-stream-browser": "3.310.0",
|