@aws-sdk/client-sesv2 3.1075.0 → 3.1077.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 +3962 -15
- package/dist-es/runtimeConfig.browser.js +0 -2
- package/dist-es/runtimeConfig.js +1 -2
- package/dist-es/runtimeConfig.native.js +0 -2
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-types/runtimeConfig.browser.d.ts +2 -2
- package/dist-types/runtimeConfig.d.ts +2 -2
- package/dist-types/runtimeConfig.native.d.ts +2 -2
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +8 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +8 -2
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -2
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
- package/package.json +9 -11
- package/dist-cjs/auth/httpAuthSchemeProvider.js +0 -122
- package/dist-cjs/endpoint/bdd.js +0 -61
- package/dist-cjs/endpoint/endpointResolver.js +0 -14
- package/dist-cjs/models/SESv2ServiceException.js +0 -8
- package/dist-cjs/models/errors.js +0 -157
- package/dist-cjs/runtimeConfig.browser.js +0 -32
- package/dist-cjs/runtimeConfig.js +0 -46
- package/dist-cjs/runtimeConfig.native.js +0 -12
- package/dist-cjs/runtimeConfig.shared.js +0 -45
- package/dist-cjs/schemas/schemas_0.js +0 -3418
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
|
-
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
2
|
import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
|
|
4
3
|
import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
5
4
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
|
|
@@ -23,7 +22,6 @@ export const getRuntimeConfig = (config) => {
|
|
|
23
22
|
region: config?.region ?? invalidProvider("Region is missing"),
|
|
24
23
|
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
25
24
|
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
26
|
-
sha256: config?.sha256 ?? Sha256,
|
|
27
25
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
28
26
|
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
29
27
|
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -5,7 +5,7 @@ import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credentia
|
|
|
5
5
|
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
6
6
|
import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
|
|
7
7
|
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
|
|
8
|
-
import { calculateBodyLength
|
|
8
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
9
9
|
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
10
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
11
11
|
export const getRuntimeConfig = (config) => {
|
|
@@ -35,7 +35,6 @@ export const getRuntimeConfig = (config) => {
|
|
|
35
35
|
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
36
|
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
37
37
|
}, config),
|
|
38
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
39
38
|
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadNodeConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
|
|
40
39
|
streamCollector: config?.streamCollector ?? streamCollector,
|
|
41
40
|
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
1
|
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
2
|
export const getRuntimeConfig = (config) => {
|
|
4
3
|
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
@@ -6,6 +5,5 @@ export const getRuntimeConfig = (config) => {
|
|
|
6
5
|
...browserDefaults,
|
|
7
6
|
...config,
|
|
8
7
|
runtime: "react-native",
|
|
9
|
-
sha256: config?.sha256 ?? Sha256,
|
|
10
8
|
};
|
|
11
9
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
|
|
2
2
|
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
3
3
|
import { SignatureV4MultiRegion } from "@aws-sdk/signature-v4-multi-region";
|
|
4
|
+
import { Sha256 } from "@smithy/core/checksum";
|
|
4
5
|
import { NoOpLogger } from "@smithy/core/client";
|
|
5
6
|
import { parseUrl } from "@smithy/core/protocols";
|
|
6
7
|
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
@@ -37,6 +38,7 @@ export const getRuntimeConfig = (config) => {
|
|
|
37
38
|
serviceTarget: "SimpleEmailService_v2",
|
|
38
39
|
},
|
|
39
40
|
serviceId: config?.serviceId ?? "SESv2",
|
|
41
|
+
sha256: config?.sha256 ?? Sha256,
|
|
40
42
|
signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
|
|
41
43
|
urlParser: config?.urlParser ?? parseUrl,
|
|
42
44
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
@@ -13,8 +13,7 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
13
13
|
region: string | import("@smithy/types").Provider<any>;
|
|
14
14
|
requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
|
|
15
15
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
16
|
-
|
|
17
|
-
streamCollector: import("@smithy/types").StreamCollector;
|
|
16
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
18
17
|
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
19
18
|
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
20
19
|
cacheMiddleware?: boolean | undefined;
|
|
@@ -24,6 +23,7 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
24
23
|
[setting: string]: unknown;
|
|
25
24
|
};
|
|
26
25
|
apiVersion: string;
|
|
26
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
27
27
|
urlParser: import("@smithy/types").UrlParser;
|
|
28
28
|
base64Decoder: import("@smithy/types").Decoder;
|
|
29
29
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
@@ -14,9 +14,8 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
14
14
|
region: string | import("@smithy/types").Provider<string>;
|
|
15
15
|
requestHandler: RequestHandler | import("@smithy/core/protocols").HttpHandler<any>;
|
|
16
16
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
17
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
18
17
|
sigv4aSigningRegionSet: string[] | import("@smithy/types").Provider<string[] | undefined>;
|
|
19
|
-
streamCollector: import("
|
|
18
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
20
19
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
21
20
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
22
21
|
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -27,6 +26,7 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
27
26
|
[setting: string]: unknown;
|
|
28
27
|
};
|
|
29
28
|
apiVersion: string;
|
|
29
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
30
30
|
urlParser: import("@smithy/types").UrlParser;
|
|
31
31
|
base64Decoder: import("@smithy/types").Decoder;
|
|
32
32
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
@@ -4,7 +4,6 @@ import type { SESv2ClientConfig } from "./SESv2Client";
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
6
6
|
runtime: string;
|
|
7
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
8
7
|
requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/core/protocols").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
|
|
9
8
|
cacheMiddleware?: boolean;
|
|
10
9
|
protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof import("@aws-sdk/core/protocols").AwsRestJsonProtocol;
|
|
@@ -13,9 +12,10 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
13
12
|
[setting: string]: unknown;
|
|
14
13
|
};
|
|
15
14
|
apiVersion: string;
|
|
15
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
16
16
|
urlParser: import("@smithy/types").UrlParser;
|
|
17
17
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
18
|
-
streamCollector: import("
|
|
18
|
+
streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
|
|
19
19
|
base64Decoder: import("@smithy/types").Decoder;
|
|
20
20
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
21
21
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -22,6 +22,7 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
22
22
|
defaultNamespace?: string;
|
|
23
23
|
};
|
|
24
24
|
serviceId: string;
|
|
25
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
25
26
|
signerConstructor: typeof SignatureV4MultiRegion | (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner);
|
|
26
27
|
urlParser: import("@smithy/types").UrlParser;
|
|
27
28
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -20,8 +20,13 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
20
20
|
| import("@smithy/core/protocols").HttpHandler<any>
|
|
21
21
|
| RequestHandler;
|
|
22
22
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
streamCollector: (
|
|
24
|
+
stream:
|
|
25
|
+
| import("stream").Readable
|
|
26
|
+
| import("stream/web").ReadableStream
|
|
27
|
+
| ReadableStream
|
|
28
|
+
| Blob
|
|
29
|
+
) => Promise<Uint8Array>;
|
|
25
30
|
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
|
|
26
31
|
(boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
27
32
|
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
|
|
@@ -36,6 +41,7 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
36
41
|
[setting: string]: unknown;
|
|
37
42
|
};
|
|
38
43
|
apiVersion: string;
|
|
44
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
39
45
|
urlParser: import("@smithy/types").UrlParser;
|
|
40
46
|
base64Decoder: import("@smithy/types").Decoder;
|
|
41
47
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
@@ -21,11 +21,16 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
21
21
|
| RequestHandler
|
|
22
22
|
| import("@smithy/core/protocols").HttpHandler<any>;
|
|
23
23
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
24
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
25
24
|
sigv4aSigningRegionSet:
|
|
26
25
|
| string[]
|
|
27
26
|
| import("@smithy/types").Provider<string[] | undefined>;
|
|
28
|
-
streamCollector:
|
|
27
|
+
streamCollector: (
|
|
28
|
+
stream:
|
|
29
|
+
| import("stream").Readable
|
|
30
|
+
| import("stream/web").ReadableStream
|
|
31
|
+
| ReadableStream
|
|
32
|
+
| Blob
|
|
33
|
+
) => Promise<Uint8Array>;
|
|
29
34
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
30
35
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
31
36
|
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -39,6 +44,7 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
39
44
|
[setting: string]: unknown;
|
|
40
45
|
};
|
|
41
46
|
apiVersion: string;
|
|
47
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
42
48
|
urlParser: import("@smithy/types").UrlParser;
|
|
43
49
|
base64Decoder: import("@smithy/types").Decoder;
|
|
44
50
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SESv2ClientConfig } from "./SESv2Client";
|
|
2
2
|
export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
3
3
|
runtime: string;
|
|
4
|
-
sha256: import("@smithy/types").HashConstructor;
|
|
5
4
|
requestHandler:
|
|
6
5
|
| import("@smithy/types").NodeHttpHandlerOptions
|
|
7
6
|
| import("@smithy/types").FetchHttpHandlerOptions
|
|
@@ -18,9 +17,16 @@ export declare const getRuntimeConfig: (config: SESv2ClientConfig) => {
|
|
|
18
17
|
[setting: string]: unknown;
|
|
19
18
|
};
|
|
20
19
|
apiVersion: string;
|
|
20
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
21
21
|
urlParser: import("@smithy/types").UrlParser;
|
|
22
22
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
23
|
-
streamCollector:
|
|
23
|
+
streamCollector: (
|
|
24
|
+
stream:
|
|
25
|
+
| import("stream").Readable
|
|
26
|
+
| import("stream/web").ReadableStream
|
|
27
|
+
| ReadableStream
|
|
28
|
+
| Blob
|
|
29
|
+
) => Promise<Uint8Array>;
|
|
24
30
|
base64Decoder: import("@smithy/types").Decoder;
|
|
25
31
|
base64Encoder: (_input: Uint8Array | string) => string;
|
|
26
32
|
utf8Decoder: import("@smithy/types").Decoder;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sesv2",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sesv2 Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1077.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
@@ -19,16 +19,14 @@
|
|
|
19
19
|
"module": "./dist-es/index.js",
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@aws-
|
|
23
|
-
"@aws-
|
|
24
|
-
"@aws-sdk/
|
|
25
|
-
"@aws-sdk/
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@smithy/
|
|
29
|
-
"@smithy/
|
|
30
|
-
"@smithy/node-http-handler": "^4.7.6",
|
|
31
|
-
"@smithy/types": "^4.14.3",
|
|
22
|
+
"@aws-sdk/core": "^3.974.25",
|
|
23
|
+
"@aws-sdk/credential-provider-node": "^3.972.60",
|
|
24
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.37",
|
|
25
|
+
"@aws-sdk/types": "^3.973.14",
|
|
26
|
+
"@smithy/core": "^3.28.0",
|
|
27
|
+
"@smithy/fetch-http-handler": "^5.6.1",
|
|
28
|
+
"@smithy/node-http-handler": "^4.9.1",
|
|
29
|
+
"@smithy/types": "^4.15.0",
|
|
32
30
|
"tslib": "^2.6.2"
|
|
33
31
|
},
|
|
34
32
|
"devDependencies": {
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
const { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
|
|
3
|
-
const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
|
|
4
|
-
const { resolveParams } = require("@smithy/core/endpoints");
|
|
5
|
-
const { defaultEndpointResolver } = require("../endpoint/endpointResolver");
|
|
6
|
-
const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
|
7
|
-
if (!input) {
|
|
8
|
-
throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
|
9
|
-
}
|
|
10
|
-
const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
|
|
11
|
-
const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor
|
|
12
|
-
?.getEndpointParameterInstructions;
|
|
13
|
-
if (!instructionsFn) {
|
|
14
|
-
throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
|
|
15
|
-
}
|
|
16
|
-
const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
|
|
17
|
-
return Object.assign(defaultParameters, endpointParameters);
|
|
18
|
-
};
|
|
19
|
-
const _defaultSESv2HttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
20
|
-
return {
|
|
21
|
-
operation: getSmithyContext(context).operation,
|
|
22
|
-
region: await normalizeProvider(config.region)() || (() => {
|
|
23
|
-
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
24
|
-
})(),
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
exports.defaultSESv2HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSESv2HttpAuthSchemeParametersProvider);
|
|
28
|
-
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
29
|
-
return {
|
|
30
|
-
schemeId: "aws.auth#sigv4",
|
|
31
|
-
signingProperties: {
|
|
32
|
-
name: "ses",
|
|
33
|
-
region: authParameters.region,
|
|
34
|
-
},
|
|
35
|
-
propertiesExtractor: (config, context) => ({
|
|
36
|
-
signingProperties: {
|
|
37
|
-
config,
|
|
38
|
-
context,
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function createAwsAuthSigv4aHttpAuthOption(authParameters) {
|
|
44
|
-
return {
|
|
45
|
-
schemeId: "aws.auth#sigv4a",
|
|
46
|
-
signingProperties: {
|
|
47
|
-
name: "ses",
|
|
48
|
-
region: authParameters.region,
|
|
49
|
-
},
|
|
50
|
-
propertiesExtractor: (config, context) => ({
|
|
51
|
-
signingProperties: {
|
|
52
|
-
config,
|
|
53
|
-
context,
|
|
54
|
-
},
|
|
55
|
-
}),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
|
|
59
|
-
const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
|
|
60
|
-
const endpoint = defaultEndpointResolver(authParameters);
|
|
61
|
-
const authSchemes = endpoint.properties?.authSchemes;
|
|
62
|
-
if (!authSchemes) {
|
|
63
|
-
return defaultHttpAuthSchemeResolver(authParameters);
|
|
64
|
-
}
|
|
65
|
-
const options = [];
|
|
66
|
-
for (const scheme of authSchemes) {
|
|
67
|
-
const { name: resolvedName, properties = {}, ...rest } = scheme;
|
|
68
|
-
const name = resolvedName.toLowerCase();
|
|
69
|
-
if (resolvedName !== name) {
|
|
70
|
-
console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
|
|
71
|
-
}
|
|
72
|
-
let schemeId;
|
|
73
|
-
if (name === "sigv4a") {
|
|
74
|
-
schemeId = "aws.auth#sigv4a";
|
|
75
|
-
const sigv4Present = authSchemes.find((s) => {
|
|
76
|
-
const name = s.name.toLowerCase();
|
|
77
|
-
return name !== "sigv4a" && name.startsWith("sigv4");
|
|
78
|
-
});
|
|
79
|
-
if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
else if (name.startsWith("sigv4")) {
|
|
84
|
-
schemeId = "aws.auth#sigv4";
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
|
|
88
|
-
}
|
|
89
|
-
const createOption = createHttpAuthOptionFunctions[schemeId];
|
|
90
|
-
if (!createOption) {
|
|
91
|
-
throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
|
|
92
|
-
}
|
|
93
|
-
const option = createOption(authParameters);
|
|
94
|
-
option.schemeId = schemeId;
|
|
95
|
-
option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };
|
|
96
|
-
options.push(option);
|
|
97
|
-
}
|
|
98
|
-
return options;
|
|
99
|
-
};
|
|
100
|
-
return endpointRuleSetHttpAuthSchemeProvider;
|
|
101
|
-
};
|
|
102
|
-
const _defaultSESv2HttpAuthSchemeProvider = (authParameters) => {
|
|
103
|
-
const options = [];
|
|
104
|
-
switch (authParameters.operation) {
|
|
105
|
-
default: {
|
|
106
|
-
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
107
|
-
options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return options;
|
|
111
|
-
};
|
|
112
|
-
exports.defaultSESv2HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSESv2HttpAuthSchemeProvider, {
|
|
113
|
-
"aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
|
|
114
|
-
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
|
115
|
-
});
|
|
116
|
-
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
117
|
-
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
118
|
-
const config_1 = resolveAwsSdkSigV4AConfig(config_0);
|
|
119
|
-
return Object.assign(config_1, {
|
|
120
|
-
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
121
|
-
});
|
|
122
|
-
};
|
package/dist-cjs/endpoint/bdd.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
|
|
2
|
-
const m = "ref";
|
|
3
|
-
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [m]: "EndpointId" }, h = { [m]: "Endpoint" }, i = { [m]: d }, j = { "authSchemes": [{ "name": "sigv4a", "signingName": "ses", "signingRegionSet": ["*"] }] }, k = {}, l = [{ [m]: "Region" }];
|
|
4
|
-
const _data = {
|
|
5
|
-
conditions: [
|
|
6
|
-
[c, l],
|
|
7
|
-
["aws.partition", l, d],
|
|
8
|
-
[c, [g]],
|
|
9
|
-
["isValidHostLabel", [g, b]],
|
|
10
|
-
[c, [h]],
|
|
11
|
-
[e, [{ [m]: "UseFIPS" }, b]],
|
|
12
|
-
[e, [{ [m]: "UseDualStack" }, b]],
|
|
13
|
-
[e, [{ fn: f, argv: [i, "supportsDualStack"] }, b]],
|
|
14
|
-
[e, [{ fn: f, argv: [i, "supportsFIPS"] }, b]]
|
|
15
|
-
],
|
|
16
|
-
results: [
|
|
17
|
-
[a],
|
|
18
|
-
[h, j],
|
|
19
|
-
["https://{EndpointId}.endpoints.email.global.{PartitionResult#dualStackDnsSuffix}", j],
|
|
20
|
-
[a, "DualStack is enabled but this partition does not support DualStack"],
|
|
21
|
-
["https://{EndpointId}.endpoints.email.{PartitionResult#dnsSuffix}", j],
|
|
22
|
-
[a, "Invalid Configuration: FIPS is not supported with multi-region endpoints"],
|
|
23
|
-
[a, "EndpointId must be a valid host label"],
|
|
24
|
-
[a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
25
|
-
[a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
|
|
26
|
-
[h, k],
|
|
27
|
-
["https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
|
|
28
|
-
[a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
|
|
29
|
-
["https://email-fips.{Region}.{PartitionResult#dnsSuffix}", k],
|
|
30
|
-
[a, "FIPS is enabled but this partition does not support FIPS"],
|
|
31
|
-
["https://email.{Region}.{PartitionResult#dualStackDnsSuffix}", k],
|
|
32
|
-
["https://email.{Region}.{PartitionResult#dnsSuffix}", k],
|
|
33
|
-
[a, "Invalid Configuration: Missing Region"]
|
|
34
|
-
]
|
|
35
|
-
};
|
|
36
|
-
const root = 2;
|
|
37
|
-
const r = 100_000_000;
|
|
38
|
-
const nodes = new Int32Array([
|
|
39
|
-
-1, 1, -1,
|
|
40
|
-
0, 3, 4,
|
|
41
|
-
1, 5, 4,
|
|
42
|
-
4, 14, r + 16,
|
|
43
|
-
2, 16, 6,
|
|
44
|
-
4, 14, 7,
|
|
45
|
-
5, 10, 8,
|
|
46
|
-
6, 9, r + 15,
|
|
47
|
-
7, r + 14, r + 3,
|
|
48
|
-
6, 12, 11,
|
|
49
|
-
8, r + 12, r + 13,
|
|
50
|
-
7, 13, r + 11,
|
|
51
|
-
8, r + 10, r + 11,
|
|
52
|
-
5, r + 7, 15,
|
|
53
|
-
6, r + 8, r + 9,
|
|
54
|
-
3, 17, r + 6,
|
|
55
|
-
4, 21, 18,
|
|
56
|
-
5, r + 5, 19,
|
|
57
|
-
6, 20, r + 4,
|
|
58
|
-
7, r + 2, r + 3,
|
|
59
|
-
5, r + 5, r + 1,
|
|
60
|
-
]);
|
|
61
|
-
exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const { awsEndpointFunctions } = require("@aws-sdk/core/client");
|
|
2
|
-
const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
|
|
3
|
-
const { bdd } = require("./bdd");
|
|
4
|
-
const cache = new EndpointCache({
|
|
5
|
-
size: 50,
|
|
6
|
-
params: ["Endpoint", "EndpointId", "Region", "UseDualStack", "UseFIPS"],
|
|
7
|
-
});
|
|
8
|
-
exports.defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
-
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
10
|
-
endpointParams: endpointParams,
|
|
11
|
-
logger: context.logger,
|
|
12
|
-
}));
|
|
13
|
-
};
|
|
14
|
-
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
-
exports.__ServiceException = __ServiceException;
|
|
3
|
-
exports.SESv2ServiceException = class SESv2ServiceException extends __ServiceException {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
super(options);
|
|
6
|
-
Object.setPrototypeOf(this, SESv2ServiceException.prototype);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
const { SESv2ServiceException: __BaseException } = require("./SESv2ServiceException");
|
|
2
|
-
exports.AccountSuspendedException = class AccountSuspendedException extends __BaseException {
|
|
3
|
-
name = "AccountSuspendedException";
|
|
4
|
-
$fault = "client";
|
|
5
|
-
constructor(opts) {
|
|
6
|
-
super({
|
|
7
|
-
name: "AccountSuspendedException",
|
|
8
|
-
$fault: "client",
|
|
9
|
-
...opts,
|
|
10
|
-
});
|
|
11
|
-
Object.setPrototypeOf(this, AccountSuspendedException.prototype);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
exports.AlreadyExistsException = class AlreadyExistsException extends __BaseException {
|
|
15
|
-
name = "AlreadyExistsException";
|
|
16
|
-
$fault = "client";
|
|
17
|
-
constructor(opts) {
|
|
18
|
-
super({
|
|
19
|
-
name: "AlreadyExistsException",
|
|
20
|
-
$fault: "client",
|
|
21
|
-
...opts,
|
|
22
|
-
});
|
|
23
|
-
Object.setPrototypeOf(this, AlreadyExistsException.prototype);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.BadRequestException = class BadRequestException extends __BaseException {
|
|
27
|
-
name = "BadRequestException";
|
|
28
|
-
$fault = "client";
|
|
29
|
-
constructor(opts) {
|
|
30
|
-
super({
|
|
31
|
-
name: "BadRequestException",
|
|
32
|
-
$fault: "client",
|
|
33
|
-
...opts,
|
|
34
|
-
});
|
|
35
|
-
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.InternalServiceErrorException = class InternalServiceErrorException extends __BaseException {
|
|
39
|
-
name = "InternalServiceErrorException";
|
|
40
|
-
$fault = "server";
|
|
41
|
-
constructor(opts) {
|
|
42
|
-
super({
|
|
43
|
-
name: "InternalServiceErrorException",
|
|
44
|
-
$fault: "server",
|
|
45
|
-
...opts,
|
|
46
|
-
});
|
|
47
|
-
Object.setPrototypeOf(this, InternalServiceErrorException.prototype);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
exports.NotFoundException = class NotFoundException extends __BaseException {
|
|
51
|
-
name = "NotFoundException";
|
|
52
|
-
$fault = "client";
|
|
53
|
-
constructor(opts) {
|
|
54
|
-
super({
|
|
55
|
-
name: "NotFoundException",
|
|
56
|
-
$fault: "client",
|
|
57
|
-
...opts,
|
|
58
|
-
});
|
|
59
|
-
Object.setPrototypeOf(this, NotFoundException.prototype);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
exports.TooManyRequestsException = class TooManyRequestsException extends __BaseException {
|
|
63
|
-
name = "TooManyRequestsException";
|
|
64
|
-
$fault = "client";
|
|
65
|
-
constructor(opts) {
|
|
66
|
-
super({
|
|
67
|
-
name: "TooManyRequestsException",
|
|
68
|
-
$fault: "client",
|
|
69
|
-
...opts,
|
|
70
|
-
});
|
|
71
|
-
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
exports.ConcurrentModificationException = class ConcurrentModificationException extends __BaseException {
|
|
75
|
-
name = "ConcurrentModificationException";
|
|
76
|
-
$fault = "server";
|
|
77
|
-
constructor(opts) {
|
|
78
|
-
super({
|
|
79
|
-
name: "ConcurrentModificationException",
|
|
80
|
-
$fault: "server",
|
|
81
|
-
...opts,
|
|
82
|
-
});
|
|
83
|
-
Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
exports.ConflictException = class ConflictException extends __BaseException {
|
|
87
|
-
name = "ConflictException";
|
|
88
|
-
$fault = "client";
|
|
89
|
-
constructor(opts) {
|
|
90
|
-
super({
|
|
91
|
-
name: "ConflictException",
|
|
92
|
-
$fault: "client",
|
|
93
|
-
...opts,
|
|
94
|
-
});
|
|
95
|
-
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
exports.LimitExceededException = class LimitExceededException extends __BaseException {
|
|
99
|
-
name = "LimitExceededException";
|
|
100
|
-
$fault = "client";
|
|
101
|
-
constructor(opts) {
|
|
102
|
-
super({
|
|
103
|
-
name: "LimitExceededException",
|
|
104
|
-
$fault: "client",
|
|
105
|
-
...opts,
|
|
106
|
-
});
|
|
107
|
-
Object.setPrototypeOf(this, LimitExceededException.prototype);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
exports.MailFromDomainNotVerifiedException = class MailFromDomainNotVerifiedException extends __BaseException {
|
|
111
|
-
name = "MailFromDomainNotVerifiedException";
|
|
112
|
-
$fault = "client";
|
|
113
|
-
constructor(opts) {
|
|
114
|
-
super({
|
|
115
|
-
name: "MailFromDomainNotVerifiedException",
|
|
116
|
-
$fault: "client",
|
|
117
|
-
...opts,
|
|
118
|
-
});
|
|
119
|
-
Object.setPrototypeOf(this, MailFromDomainNotVerifiedException.prototype);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
exports.MessageRejected = class MessageRejected extends __BaseException {
|
|
123
|
-
name = "MessageRejected";
|
|
124
|
-
$fault = "client";
|
|
125
|
-
constructor(opts) {
|
|
126
|
-
super({
|
|
127
|
-
name: "MessageRejected",
|
|
128
|
-
$fault: "client",
|
|
129
|
-
...opts,
|
|
130
|
-
});
|
|
131
|
-
Object.setPrototypeOf(this, MessageRejected.prototype);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
exports.SendingPausedException = class SendingPausedException extends __BaseException {
|
|
135
|
-
name = "SendingPausedException";
|
|
136
|
-
$fault = "client";
|
|
137
|
-
constructor(opts) {
|
|
138
|
-
super({
|
|
139
|
-
name: "SendingPausedException",
|
|
140
|
-
$fault: "client",
|
|
141
|
-
...opts,
|
|
142
|
-
});
|
|
143
|
-
Object.setPrototypeOf(this, SendingPausedException.prototype);
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
exports.InvalidNextTokenException = class InvalidNextTokenException extends __BaseException {
|
|
147
|
-
name = "InvalidNextTokenException";
|
|
148
|
-
$fault = "client";
|
|
149
|
-
constructor(opts) {
|
|
150
|
-
super({
|
|
151
|
-
name: "InvalidNextTokenException",
|
|
152
|
-
$fault: "client",
|
|
153
|
-
...opts,
|
|
154
|
-
});
|
|
155
|
-
Object.setPrototypeOf(this, InvalidNextTokenException.prototype);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
const packageInfo = require("../package.json");
|
|
2
|
-
const { Sha256 } = require("@aws-crypto/sha256-browser");
|
|
3
|
-
const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
|
|
4
|
-
const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
5
|
-
const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
6
|
-
const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
|
|
7
|
-
const { calculateBodyLength } = require("@smithy/core/serde");
|
|
8
|
-
const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
|
|
9
|
-
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
10
|
-
const getRuntimeConfig = (config) => {
|
|
11
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
13
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
14
|
-
return {
|
|
15
|
-
...clientSharedValues,
|
|
16
|
-
...config,
|
|
17
|
-
runtime: "browser",
|
|
18
|
-
defaultsMode,
|
|
19
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
20
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
21
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
22
|
-
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
23
|
-
region: config?.region ?? invalidProvider("Region is missing"),
|
|
24
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
25
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
26
|
-
sha256: config?.sha256 ?? Sha256,
|
|
27
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
28
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
29
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|