@aws-sdk/client-workmailmessageflow 3.901.0 → 3.906.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/dist-cjs/index.js +337 -445
- package/package.json +5 -5
package/dist-cjs/index.js
CHANGED
|
@@ -1,472 +1,364 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/index.ts
|
|
22
|
-
var index_exports = {};
|
|
23
|
-
__export(index_exports, {
|
|
24
|
-
GetRawMessageContentCommand: () => GetRawMessageContentCommand,
|
|
25
|
-
GetRawMessageContentResponseFilterSensitiveLog: () => GetRawMessageContentResponseFilterSensitiveLog,
|
|
26
|
-
InvalidContentLocation: () => InvalidContentLocation,
|
|
27
|
-
MessageFrozen: () => MessageFrozen,
|
|
28
|
-
MessageRejected: () => MessageRejected,
|
|
29
|
-
PutRawMessageContentCommand: () => PutRawMessageContentCommand,
|
|
30
|
-
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
31
|
-
WorkMailMessageFlow: () => WorkMailMessageFlow,
|
|
32
|
-
WorkMailMessageFlowClient: () => WorkMailMessageFlowClient,
|
|
33
|
-
WorkMailMessageFlowServiceException: () => WorkMailMessageFlowServiceException,
|
|
34
|
-
__Client: () => import_smithy_client.Client
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(index_exports);
|
|
1
|
+
'use strict';
|
|
37
2
|
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
3
|
+
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
|
|
4
|
+
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
5
|
+
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
6
|
+
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
|
+
var configResolver = require('@smithy/config-resolver');
|
|
8
|
+
var core = require('@smithy/core');
|
|
9
|
+
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
|
+
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
|
+
var middlewareRetry = require('@smithy/middleware-retry');
|
|
12
|
+
var smithyClient = require('@smithy/smithy-client');
|
|
13
|
+
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
14
|
+
var runtimeConfig = require('./runtimeConfig');
|
|
15
|
+
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
+
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
+
var core$1 = require('@aws-sdk/core');
|
|
48
19
|
|
|
49
|
-
|
|
20
|
+
const resolveClientEndpointParameters = (options) => {
|
|
21
|
+
return Object.assign(options, {
|
|
22
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
23
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
24
|
+
defaultSigningName: "workmailmessageflow",
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const commonParams = {
|
|
28
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
29
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
30
|
+
Region: { type: "builtInParams", name: "region" },
|
|
31
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
32
|
+
};
|
|
50
33
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
34
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
35
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
36
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
37
|
+
let _credentials = runtimeConfig.credentials;
|
|
38
|
+
return {
|
|
39
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
40
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
41
|
+
if (index === -1) {
|
|
42
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
httpAuthSchemes() {
|
|
49
|
+
return _httpAuthSchemes;
|
|
50
|
+
},
|
|
51
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
52
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
53
|
+
},
|
|
54
|
+
httpAuthSchemeProvider() {
|
|
55
|
+
return _httpAuthSchemeProvider;
|
|
56
|
+
},
|
|
57
|
+
setCredentials(credentials) {
|
|
58
|
+
_credentials = credentials;
|
|
59
|
+
},
|
|
60
|
+
credentials() {
|
|
61
|
+
return _credentials;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
66
|
+
return {
|
|
67
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
68
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
69
|
+
credentials: config.credentials(),
|
|
70
|
+
};
|
|
64
71
|
};
|
|
65
72
|
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
74
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
75
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
76
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
77
|
+
};
|
|
68
78
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
class WorkMailMessageFlowClient extends smithyClient.Client {
|
|
80
|
+
config;
|
|
81
|
+
constructor(...[configuration]) {
|
|
82
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
83
|
+
super(_config_0);
|
|
84
|
+
this.initConfig = _config_0;
|
|
85
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
86
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
87
|
+
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
|
88
|
+
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
|
89
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
90
|
+
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
|
91
|
+
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
92
|
+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
93
|
+
this.config = _config_8;
|
|
94
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
95
|
+
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
96
|
+
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
101
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultWorkMailMessageFlowHttpAuthSchemeParametersProvider,
|
|
102
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
103
|
+
"aws.auth#sigv4": config.credentials,
|
|
104
|
+
}),
|
|
105
|
+
}));
|
|
106
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
107
|
+
}
|
|
108
|
+
destroy() {
|
|
109
|
+
super.destroy();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
73
112
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
let _credentials = runtimeConfig.credentials;
|
|
79
|
-
return {
|
|
80
|
-
setHttpAuthScheme(httpAuthScheme) {
|
|
81
|
-
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
82
|
-
if (index === -1) {
|
|
83
|
-
_httpAuthSchemes.push(httpAuthScheme);
|
|
84
|
-
} else {
|
|
85
|
-
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
httpAuthSchemes() {
|
|
89
|
-
return _httpAuthSchemes;
|
|
90
|
-
},
|
|
91
|
-
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
92
|
-
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
93
|
-
},
|
|
94
|
-
httpAuthSchemeProvider() {
|
|
95
|
-
return _httpAuthSchemeProvider;
|
|
96
|
-
},
|
|
97
|
-
setCredentials(credentials) {
|
|
98
|
-
_credentials = credentials;
|
|
99
|
-
},
|
|
100
|
-
credentials() {
|
|
101
|
-
return _credentials;
|
|
113
|
+
class WorkMailMessageFlowServiceException extends smithyClient.ServiceException {
|
|
114
|
+
constructor(options) {
|
|
115
|
+
super(options);
|
|
116
|
+
Object.setPrototypeOf(this, WorkMailMessageFlowServiceException.prototype);
|
|
102
117
|
}
|
|
103
|
-
|
|
104
|
-
}, "getHttpAuthExtensionConfiguration");
|
|
105
|
-
var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
|
|
106
|
-
return {
|
|
107
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
108
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
109
|
-
credentials: config.credentials()
|
|
110
|
-
};
|
|
111
|
-
}, "resolveHttpAuthRuntimeConfig");
|
|
118
|
+
}
|
|
112
119
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
class ResourceNotFoundException extends WorkMailMessageFlowServiceException {
|
|
121
|
+
name = "ResourceNotFoundException";
|
|
122
|
+
$fault = "client";
|
|
123
|
+
constructor(opts) {
|
|
124
|
+
super({
|
|
125
|
+
name: "ResourceNotFoundException",
|
|
126
|
+
$fault: "client",
|
|
127
|
+
...opts,
|
|
128
|
+
});
|
|
129
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
class InvalidContentLocation extends WorkMailMessageFlowServiceException {
|
|
133
|
+
name = "InvalidContentLocation";
|
|
134
|
+
$fault = "client";
|
|
135
|
+
constructor(opts) {
|
|
136
|
+
super({
|
|
137
|
+
name: "InvalidContentLocation",
|
|
138
|
+
$fault: "client",
|
|
139
|
+
...opts,
|
|
140
|
+
});
|
|
141
|
+
Object.setPrototypeOf(this, InvalidContentLocation.prototype);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
class MessageFrozen extends WorkMailMessageFlowServiceException {
|
|
145
|
+
name = "MessageFrozen";
|
|
146
|
+
$fault = "client";
|
|
147
|
+
constructor(opts) {
|
|
148
|
+
super({
|
|
149
|
+
name: "MessageFrozen",
|
|
150
|
+
$fault: "client",
|
|
151
|
+
...opts,
|
|
152
|
+
});
|
|
153
|
+
Object.setPrototypeOf(this, MessageFrozen.prototype);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
class MessageRejected extends WorkMailMessageFlowServiceException {
|
|
157
|
+
name = "MessageRejected";
|
|
158
|
+
$fault = "client";
|
|
159
|
+
constructor(opts) {
|
|
160
|
+
super({
|
|
161
|
+
name: "MessageRejected",
|
|
162
|
+
$fault: "client",
|
|
163
|
+
...opts,
|
|
164
|
+
});
|
|
165
|
+
Object.setPrototypeOf(this, MessageRejected.prototype);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
const GetRawMessageContentResponseFilterSensitiveLog = (obj) => ({
|
|
169
|
+
...obj,
|
|
170
|
+
});
|
|
130
171
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
config;
|
|
140
|
-
constructor(...[configuration]) {
|
|
141
|
-
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
142
|
-
super(_config_0);
|
|
143
|
-
this.initConfig = _config_0;
|
|
144
|
-
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
145
|
-
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
|
|
146
|
-
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
|
|
147
|
-
const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
|
|
148
|
-
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
|
|
149
|
-
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
|
|
150
|
-
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
|
|
151
|
-
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
152
|
-
this.config = _config_8;
|
|
153
|
-
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
154
|
-
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
155
|
-
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
156
|
-
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
157
|
-
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
158
|
-
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
159
|
-
this.middlewareStack.use(
|
|
160
|
-
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
161
|
-
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultWorkMailMessageFlowHttpAuthSchemeParametersProvider,
|
|
162
|
-
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
163
|
-
"aws.auth#sigv4": config.credentials
|
|
164
|
-
}), "identityProviderConfigProvider")
|
|
165
|
-
})
|
|
166
|
-
);
|
|
167
|
-
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
171
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
172
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
173
|
-
*/
|
|
174
|
-
destroy() {
|
|
175
|
-
super.destroy();
|
|
176
|
-
}
|
|
172
|
+
const se_GetRawMessageContentCommand = async (input, context) => {
|
|
173
|
+
const b = core.requestBuilder(input, context);
|
|
174
|
+
const headers = {};
|
|
175
|
+
b.bp("/messages/{messageId}");
|
|
176
|
+
b.p("messageId", () => input.messageId, "{messageId}", false);
|
|
177
|
+
let body;
|
|
178
|
+
b.m("GET").h(headers).b(body);
|
|
179
|
+
return b.build();
|
|
177
180
|
};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
__name(this, "WorkMailMessageFlowServiceException");
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* @internal
|
|
195
|
-
*/
|
|
196
|
-
constructor(options) {
|
|
197
|
-
super(options);
|
|
198
|
-
Object.setPrototypeOf(this, _WorkMailMessageFlowServiceException.prototype);
|
|
199
|
-
}
|
|
181
|
+
const se_PutRawMessageContentCommand = async (input, context) => {
|
|
182
|
+
const b = core.requestBuilder(input, context);
|
|
183
|
+
const headers = {
|
|
184
|
+
"content-type": "application/json",
|
|
185
|
+
};
|
|
186
|
+
b.bp("/messages/{messageId}");
|
|
187
|
+
b.p("messageId", () => input.messageId, "{messageId}", false);
|
|
188
|
+
let body;
|
|
189
|
+
body = JSON.stringify(smithyClient.take(input, {
|
|
190
|
+
content: (_) => smithyClient._json(_),
|
|
191
|
+
}));
|
|
192
|
+
b.m("POST").h(headers).b(body);
|
|
193
|
+
return b.build();
|
|
200
194
|
};
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
name = "ResourceNotFoundException";
|
|
208
|
-
$fault = "client";
|
|
209
|
-
/**
|
|
210
|
-
* @internal
|
|
211
|
-
*/
|
|
212
|
-
constructor(opts) {
|
|
213
|
-
super({
|
|
214
|
-
name: "ResourceNotFoundException",
|
|
215
|
-
$fault: "client",
|
|
216
|
-
...opts
|
|
195
|
+
const de_GetRawMessageContentCommand = async (output, context) => {
|
|
196
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
197
|
+
return de_CommandError(output, context);
|
|
198
|
+
}
|
|
199
|
+
const contents = smithyClient.map({
|
|
200
|
+
$metadata: deserializeMetadata(output),
|
|
217
201
|
});
|
|
218
|
-
|
|
219
|
-
|
|
202
|
+
const data = output.body;
|
|
203
|
+
context.sdkStreamMixin(data);
|
|
204
|
+
contents.messageContent = data;
|
|
205
|
+
return contents;
|
|
220
206
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* @internal
|
|
229
|
-
*/
|
|
230
|
-
constructor(opts) {
|
|
231
|
-
super({
|
|
232
|
-
name: "InvalidContentLocation",
|
|
233
|
-
$fault: "client",
|
|
234
|
-
...opts
|
|
207
|
+
const de_PutRawMessageContentCommand = async (output, context) => {
|
|
208
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
209
|
+
return de_CommandError(output, context);
|
|
210
|
+
}
|
|
211
|
+
const contents = smithyClient.map({
|
|
212
|
+
$metadata: deserializeMetadata(output),
|
|
235
213
|
});
|
|
236
|
-
|
|
237
|
-
|
|
214
|
+
await smithyClient.collectBody(output.body, context);
|
|
215
|
+
return contents;
|
|
238
216
|
};
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
217
|
+
const de_CommandError = async (output, context) => {
|
|
218
|
+
const parsedOutput = {
|
|
219
|
+
...output,
|
|
220
|
+
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
221
|
+
};
|
|
222
|
+
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
223
|
+
switch (errorCode) {
|
|
224
|
+
case "ResourceNotFoundException":
|
|
225
|
+
case "com.amazonaws.workmailmessageflow#ResourceNotFoundException":
|
|
226
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput);
|
|
227
|
+
case "InvalidContentLocation":
|
|
228
|
+
case "com.amazonaws.workmailmessageflow#InvalidContentLocation":
|
|
229
|
+
throw await de_InvalidContentLocationRes(parsedOutput);
|
|
230
|
+
case "MessageFrozen":
|
|
231
|
+
case "com.amazonaws.workmailmessageflow#MessageFrozen":
|
|
232
|
+
throw await de_MessageFrozenRes(parsedOutput);
|
|
233
|
+
case "MessageRejected":
|
|
234
|
+
case "com.amazonaws.workmailmessageflow#MessageRejected":
|
|
235
|
+
throw await de_MessageRejectedRes(parsedOutput);
|
|
236
|
+
default:
|
|
237
|
+
const parsedBody = parsedOutput.body;
|
|
238
|
+
return throwDefaultError({
|
|
239
|
+
output,
|
|
240
|
+
parsedBody,
|
|
241
|
+
errorCode,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
const throwDefaultError = smithyClient.withBaseException(WorkMailMessageFlowServiceException);
|
|
246
|
+
const de_InvalidContentLocationRes = async (parsedOutput, context) => {
|
|
247
|
+
const contents = smithyClient.map({});
|
|
248
|
+
const data = parsedOutput.body;
|
|
249
|
+
const doc = smithyClient.take(data, {
|
|
250
|
+
message: smithyClient.expectString,
|
|
251
|
+
});
|
|
252
|
+
Object.assign(contents, doc);
|
|
253
|
+
const exception = new InvalidContentLocation({
|
|
254
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
255
|
+
...contents,
|
|
253
256
|
});
|
|
254
|
-
|
|
255
|
-
}
|
|
257
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
256
258
|
};
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
$fault = "client";
|
|
263
|
-
/**
|
|
264
|
-
* @internal
|
|
265
|
-
*/
|
|
266
|
-
constructor(opts) {
|
|
267
|
-
super({
|
|
268
|
-
name: "MessageRejected",
|
|
269
|
-
$fault: "client",
|
|
270
|
-
...opts
|
|
259
|
+
const de_MessageFrozenRes = async (parsedOutput, context) => {
|
|
260
|
+
const contents = smithyClient.map({});
|
|
261
|
+
const data = parsedOutput.body;
|
|
262
|
+
const doc = smithyClient.take(data, {
|
|
263
|
+
message: smithyClient.expectString,
|
|
271
264
|
});
|
|
272
|
-
Object.
|
|
273
|
-
|
|
265
|
+
Object.assign(contents, doc);
|
|
266
|
+
const exception = new MessageFrozen({
|
|
267
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
268
|
+
...contents,
|
|
269
|
+
});
|
|
270
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
274
271
|
};
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
b.p("messageId", () => input.messageId, "{messageId}", false);
|
|
288
|
-
let body;
|
|
289
|
-
b.m("GET").h(headers).b(body);
|
|
290
|
-
return b.build();
|
|
291
|
-
}, "se_GetRawMessageContentCommand");
|
|
292
|
-
var se_PutRawMessageContentCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
293
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
294
|
-
const headers = {
|
|
295
|
-
"content-type": "application/json"
|
|
296
|
-
};
|
|
297
|
-
b.bp("/messages/{messageId}");
|
|
298
|
-
b.p("messageId", () => input.messageId, "{messageId}", false);
|
|
299
|
-
let body;
|
|
300
|
-
body = JSON.stringify(
|
|
301
|
-
(0, import_smithy_client.take)(input, {
|
|
302
|
-
content: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "content")
|
|
303
|
-
})
|
|
304
|
-
);
|
|
305
|
-
b.m("POST").h(headers).b(body);
|
|
306
|
-
return b.build();
|
|
307
|
-
}, "se_PutRawMessageContentCommand");
|
|
308
|
-
var de_GetRawMessageContentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
309
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
310
|
-
return de_CommandError(output, context);
|
|
311
|
-
}
|
|
312
|
-
const contents = (0, import_smithy_client.map)({
|
|
313
|
-
$metadata: deserializeMetadata(output)
|
|
314
|
-
});
|
|
315
|
-
const data = output.body;
|
|
316
|
-
context.sdkStreamMixin(data);
|
|
317
|
-
contents.messageContent = data;
|
|
318
|
-
return contents;
|
|
319
|
-
}, "de_GetRawMessageContentCommand");
|
|
320
|
-
var de_PutRawMessageContentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
321
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
322
|
-
return de_CommandError(output, context);
|
|
323
|
-
}
|
|
324
|
-
const contents = (0, import_smithy_client.map)({
|
|
325
|
-
$metadata: deserializeMetadata(output)
|
|
326
|
-
});
|
|
327
|
-
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
328
|
-
return contents;
|
|
329
|
-
}, "de_PutRawMessageContentCommand");
|
|
330
|
-
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
331
|
-
const parsedOutput = {
|
|
332
|
-
...output,
|
|
333
|
-
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
334
|
-
};
|
|
335
|
-
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
336
|
-
switch (errorCode) {
|
|
337
|
-
case "ResourceNotFoundException":
|
|
338
|
-
case "com.amazonaws.workmailmessageflow#ResourceNotFoundException":
|
|
339
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
340
|
-
case "InvalidContentLocation":
|
|
341
|
-
case "com.amazonaws.workmailmessageflow#InvalidContentLocation":
|
|
342
|
-
throw await de_InvalidContentLocationRes(parsedOutput, context);
|
|
343
|
-
case "MessageFrozen":
|
|
344
|
-
case "com.amazonaws.workmailmessageflow#MessageFrozen":
|
|
345
|
-
throw await de_MessageFrozenRes(parsedOutput, context);
|
|
346
|
-
case "MessageRejected":
|
|
347
|
-
case "com.amazonaws.workmailmessageflow#MessageRejected":
|
|
348
|
-
throw await de_MessageRejectedRes(parsedOutput, context);
|
|
349
|
-
default:
|
|
350
|
-
const parsedBody = parsedOutput.body;
|
|
351
|
-
return throwDefaultError({
|
|
352
|
-
output,
|
|
353
|
-
parsedBody,
|
|
354
|
-
errorCode
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
}, "de_CommandError");
|
|
358
|
-
var throwDefaultError = (0, import_smithy_client.withBaseException)(WorkMailMessageFlowServiceException);
|
|
359
|
-
var de_InvalidContentLocationRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
360
|
-
const contents = (0, import_smithy_client.map)({});
|
|
361
|
-
const data = parsedOutput.body;
|
|
362
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
363
|
-
message: import_smithy_client.expectString
|
|
364
|
-
});
|
|
365
|
-
Object.assign(contents, doc);
|
|
366
|
-
const exception = new InvalidContentLocation({
|
|
367
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
368
|
-
...contents
|
|
369
|
-
});
|
|
370
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
371
|
-
}, "de_InvalidContentLocationRes");
|
|
372
|
-
var de_MessageFrozenRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
373
|
-
const contents = (0, import_smithy_client.map)({});
|
|
374
|
-
const data = parsedOutput.body;
|
|
375
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
376
|
-
message: import_smithy_client.expectString
|
|
377
|
-
});
|
|
378
|
-
Object.assign(contents, doc);
|
|
379
|
-
const exception = new MessageFrozen({
|
|
380
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
381
|
-
...contents
|
|
382
|
-
});
|
|
383
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
384
|
-
}, "de_MessageFrozenRes");
|
|
385
|
-
var de_MessageRejectedRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
386
|
-
const contents = (0, import_smithy_client.map)({});
|
|
387
|
-
const data = parsedOutput.body;
|
|
388
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
389
|
-
message: import_smithy_client.expectString
|
|
390
|
-
});
|
|
391
|
-
Object.assign(contents, doc);
|
|
392
|
-
const exception = new MessageRejected({
|
|
393
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
394
|
-
...contents
|
|
395
|
-
});
|
|
396
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
397
|
-
}, "de_MessageRejectedRes");
|
|
398
|
-
var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
399
|
-
const contents = (0, import_smithy_client.map)({});
|
|
400
|
-
const data = parsedOutput.body;
|
|
401
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
402
|
-
message: import_smithy_client.expectString
|
|
403
|
-
});
|
|
404
|
-
Object.assign(contents, doc);
|
|
405
|
-
const exception = new ResourceNotFoundException({
|
|
406
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
407
|
-
...contents
|
|
408
|
-
});
|
|
409
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
410
|
-
}, "de_ResourceNotFoundExceptionRes");
|
|
411
|
-
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
412
|
-
httpStatusCode: output.statusCode,
|
|
413
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
414
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
415
|
-
cfId: output.headers["x-amz-cf-id"]
|
|
416
|
-
}), "deserializeMetadata");
|
|
417
|
-
|
|
418
|
-
// src/commands/GetRawMessageContentCommand.ts
|
|
419
|
-
var GetRawMessageContentCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
420
|
-
return [
|
|
421
|
-
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
422
|
-
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
423
|
-
];
|
|
424
|
-
}).s("GiraffeMessageInTransitService", "GetRawMessageContent", {}).n("WorkMailMessageFlowClient", "GetRawMessageContentCommand").f(void 0, GetRawMessageContentResponseFilterSensitiveLog).ser(se_GetRawMessageContentCommand).de(de_GetRawMessageContentCommand).build() {
|
|
425
|
-
static {
|
|
426
|
-
__name(this, "GetRawMessageContentCommand");
|
|
427
|
-
}
|
|
272
|
+
const de_MessageRejectedRes = async (parsedOutput, context) => {
|
|
273
|
+
const contents = smithyClient.map({});
|
|
274
|
+
const data = parsedOutput.body;
|
|
275
|
+
const doc = smithyClient.take(data, {
|
|
276
|
+
message: smithyClient.expectString,
|
|
277
|
+
});
|
|
278
|
+
Object.assign(contents, doc);
|
|
279
|
+
const exception = new MessageRejected({
|
|
280
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
281
|
+
...contents,
|
|
282
|
+
});
|
|
283
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
428
284
|
};
|
|
285
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
286
|
+
const contents = smithyClient.map({});
|
|
287
|
+
const data = parsedOutput.body;
|
|
288
|
+
const doc = smithyClient.take(data, {
|
|
289
|
+
message: smithyClient.expectString,
|
|
290
|
+
});
|
|
291
|
+
Object.assign(contents, doc);
|
|
292
|
+
const exception = new ResourceNotFoundException({
|
|
293
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
294
|
+
...contents,
|
|
295
|
+
});
|
|
296
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
297
|
+
};
|
|
298
|
+
const deserializeMetadata = (output) => ({
|
|
299
|
+
httpStatusCode: output.statusCode,
|
|
300
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
301
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
302
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
303
|
+
});
|
|
429
304
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
305
|
+
class GetRawMessageContentCommand extends smithyClient.Command
|
|
306
|
+
.classBuilder()
|
|
307
|
+
.ep(commonParams)
|
|
308
|
+
.m(function (Command, cs, config, o) {
|
|
309
|
+
return [
|
|
310
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
311
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
312
|
+
];
|
|
313
|
+
})
|
|
314
|
+
.s("GiraffeMessageInTransitService", "GetRawMessageContent", {})
|
|
315
|
+
.n("WorkMailMessageFlowClient", "GetRawMessageContentCommand")
|
|
316
|
+
.f(void 0, GetRawMessageContentResponseFilterSensitiveLog)
|
|
317
|
+
.ser(se_GetRawMessageContentCommand)
|
|
318
|
+
.de(de_GetRawMessageContentCommand)
|
|
319
|
+
.build() {
|
|
320
|
+
}
|
|
433
321
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
(
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
322
|
+
class PutRawMessageContentCommand extends smithyClient.Command
|
|
323
|
+
.classBuilder()
|
|
324
|
+
.ep(commonParams)
|
|
325
|
+
.m(function (Command, cs, config, o) {
|
|
326
|
+
return [
|
|
327
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
328
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
329
|
+
];
|
|
330
|
+
})
|
|
331
|
+
.s("GiraffeMessageInTransitService", "PutRawMessageContent", {})
|
|
332
|
+
.n("WorkMailMessageFlowClient", "PutRawMessageContentCommand")
|
|
333
|
+
.f(void 0, void 0)
|
|
334
|
+
.ser(se_PutRawMessageContentCommand)
|
|
335
|
+
.de(de_PutRawMessageContentCommand)
|
|
336
|
+
.build() {
|
|
337
|
+
}
|
|
444
338
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
PutRawMessageContentCommand
|
|
449
|
-
};
|
|
450
|
-
var WorkMailMessageFlow = class extends WorkMailMessageFlowClient {
|
|
451
|
-
static {
|
|
452
|
-
__name(this, "WorkMailMessageFlow");
|
|
453
|
-
}
|
|
339
|
+
const commands = {
|
|
340
|
+
GetRawMessageContentCommand,
|
|
341
|
+
PutRawMessageContentCommand,
|
|
454
342
|
};
|
|
455
|
-
|
|
456
|
-
|
|
343
|
+
class WorkMailMessageFlow extends WorkMailMessageFlowClient {
|
|
344
|
+
}
|
|
345
|
+
smithyClient.createAggregatedClient(commands, WorkMailMessageFlow);
|
|
457
346
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
WorkMailMessageFlowClient,
|
|
462
|
-
WorkMailMessageFlow,
|
|
463
|
-
$Command,
|
|
464
|
-
GetRawMessageContentCommand,
|
|
465
|
-
PutRawMessageContentCommand,
|
|
466
|
-
ResourceNotFoundException,
|
|
467
|
-
InvalidContentLocation,
|
|
468
|
-
MessageFrozen,
|
|
469
|
-
MessageRejected,
|
|
470
|
-
GetRawMessageContentResponseFilterSensitiveLog
|
|
347
|
+
Object.defineProperty(exports, "$Command", {
|
|
348
|
+
enumerable: true,
|
|
349
|
+
get: function () { return smithyClient.Command; }
|
|
471
350
|
});
|
|
472
|
-
|
|
351
|
+
Object.defineProperty(exports, "__Client", {
|
|
352
|
+
enumerable: true,
|
|
353
|
+
get: function () { return smithyClient.Client; }
|
|
354
|
+
});
|
|
355
|
+
exports.GetRawMessageContentCommand = GetRawMessageContentCommand;
|
|
356
|
+
exports.GetRawMessageContentResponseFilterSensitiveLog = GetRawMessageContentResponseFilterSensitiveLog;
|
|
357
|
+
exports.InvalidContentLocation = InvalidContentLocation;
|
|
358
|
+
exports.MessageFrozen = MessageFrozen;
|
|
359
|
+
exports.MessageRejected = MessageRejected;
|
|
360
|
+
exports.PutRawMessageContentCommand = PutRawMessageContentCommand;
|
|
361
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
362
|
+
exports.WorkMailMessageFlow = WorkMailMessageFlow;
|
|
363
|
+
exports.WorkMailMessageFlowClient = WorkMailMessageFlowClient;
|
|
364
|
+
exports.WorkMailMessageFlowServiceException = WorkMailMessageFlowServiceException;
|
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.906.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-workmailmessageflow",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/core": "3.906.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.906.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.901.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.901.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.901.0",
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.906.0",
|
|
29
29
|
"@aws-sdk/region-config-resolver": "3.901.0",
|
|
30
30
|
"@aws-sdk/types": "3.901.0",
|
|
31
31
|
"@aws-sdk/util-endpoints": "3.901.0",
|
|
32
32
|
"@aws-sdk/util-user-agent-browser": "3.901.0",
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.906.0",
|
|
34
34
|
"@smithy/config-resolver": "^4.3.0",
|
|
35
35
|
"@smithy/core": "^3.14.0",
|
|
36
36
|
"@smithy/fetch-http-handler": "^5.3.0",
|