@aws-sdk/client-freetier 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 +501 -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 +8 -10
- package/dist-cjs/auth/httpAuthSchemeProvider.js +0 -40
- package/dist-cjs/endpoint/bdd.js +0 -46
- package/dist-cjs/endpoint/endpointResolver.js +0 -14
- package/dist-cjs/models/FreeTierServiceException.js +0 -8
- package/dist-cjs/models/errors.js +0 -61
- package/dist-cjs/runtimeConfig.browser.js +0 -32
- package/dist-cjs/runtimeConfig.js +0 -45
- package/dist-cjs/runtimeConfig.native.js +0 -12
- package/dist-cjs/runtimeConfig.shared.js +0 -38
- package/dist-cjs/schemas/schemas_0.js +0 -246
|
@@ -20,8 +20,13 @@ export declare const getRuntimeConfig: (config: FreeTierClientConfig) => {
|
|
|
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: FreeTierClientConfig) => {
|
|
|
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,8 +21,13 @@ export declare const getRuntimeConfig: (config: FreeTierClientConfig) => {
|
|
|
21
21
|
| RequestHandler
|
|
22
22
|
| import("@smithy/core/protocols").HttpHandler<any>;
|
|
23
23
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
streamCollector: (
|
|
25
|
+
stream:
|
|
26
|
+
| import("stream").Readable
|
|
27
|
+
| import("stream/web").ReadableStream
|
|
28
|
+
| ReadableStream
|
|
29
|
+
| Blob
|
|
30
|
+
) => Promise<Uint8Array>;
|
|
26
31
|
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
27
32
|
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
28
33
|
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -36,6 +41,7 @@ export declare const getRuntimeConfig: (config: FreeTierClientConfig) => {
|
|
|
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;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FreeTierClientConfig } from "./FreeTierClient";
|
|
2
2
|
export declare const getRuntimeConfig: (config: FreeTierClientConfig) => {
|
|
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: FreeTierClientConfig) => {
|
|
|
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;
|
|
@@ -24,6 +24,7 @@ export declare const getRuntimeConfig: (config: FreeTierClientConfig) => {
|
|
|
24
24
|
defaultNamespace?: string;
|
|
25
25
|
};
|
|
26
26
|
serviceId: string;
|
|
27
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
27
28
|
urlParser: import("@smithy/types").UrlParser;
|
|
28
29
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
29
30
|
utf8Encoder: (input: Uint8Array | string) => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-freetier",
|
|
3
3
|
"description": "AWS SDK for JavaScript Freetier 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,15 +19,13 @@
|
|
|
19
19
|
"module": "./dist-es/index.js",
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@aws-
|
|
23
|
-
"@aws-
|
|
24
|
-
"@aws-sdk/
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
-
"@smithy/
|
|
28
|
-
"@smithy/
|
|
29
|
-
"@smithy/node-http-handler": "^4.7.6",
|
|
30
|
-
"@smithy/types": "^4.14.3",
|
|
22
|
+
"@aws-sdk/core": "^3.974.25",
|
|
23
|
+
"@aws-sdk/credential-provider-node": "^3.972.60",
|
|
24
|
+
"@aws-sdk/types": "^3.973.14",
|
|
25
|
+
"@smithy/core": "^3.28.0",
|
|
26
|
+
"@smithy/fetch-http-handler": "^5.6.1",
|
|
27
|
+
"@smithy/node-http-handler": "^4.9.1",
|
|
28
|
+
"@smithy/types": "^4.15.0",
|
|
31
29
|
"tslib": "^2.6.2"
|
|
32
30
|
},
|
|
33
31
|
"devDependencies": {
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
|
|
3
|
-
exports.defaultFreeTierHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
|
-
return {
|
|
5
|
-
operation: getSmithyContext(context).operation,
|
|
6
|
-
region: await normalizeProvider(config.region)() || (() => {
|
|
7
|
-
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
8
|
-
})(),
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
12
|
-
return {
|
|
13
|
-
schemeId: "aws.auth#sigv4",
|
|
14
|
-
signingProperties: {
|
|
15
|
-
name: "freetier",
|
|
16
|
-
region: authParameters.region,
|
|
17
|
-
},
|
|
18
|
-
propertiesExtractor: (config, context) => ({
|
|
19
|
-
signingProperties: {
|
|
20
|
-
config,
|
|
21
|
-
context,
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.defaultFreeTierHttpAuthSchemeProvider = (authParameters) => {
|
|
27
|
-
const options = [];
|
|
28
|
-
switch (authParameters.operation) {
|
|
29
|
-
default: {
|
|
30
|
-
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return options;
|
|
34
|
-
};
|
|
35
|
-
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
36
|
-
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
37
|
-
return Object.assign(config_0, {
|
|
38
|
-
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
39
|
-
});
|
|
40
|
-
};
|
package/dist-cjs/endpoint/bdd.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
|
|
2
|
-
const n = "ref";
|
|
3
|
-
const a = true, b = "isSet", c = "PartitionResult", d = "booleanEquals", e = "getAttr", f = "stringEquals", g = "sigv4", h = "freetier", i = { [n]: "Endpoint" }, j = { [n]: c }, k = { [n]: "Region" }, l = {}, m = [k];
|
|
4
|
-
const _data = {
|
|
5
|
-
conditions: [
|
|
6
|
-
[b, [i]],
|
|
7
|
-
[b, m],
|
|
8
|
-
["aws.partition", m, c],
|
|
9
|
-
[d, [{ [n]: "UseFIPS" }, a]],
|
|
10
|
-
[d, [{ fn: e, argv: [j, "supportsFIPS"] }, a]],
|
|
11
|
-
[f, [{ fn: e, argv: [j, "name"] }, "aws"]],
|
|
12
|
-
[f, [k, "aws-cn-global"]],
|
|
13
|
-
[d, [{ fn: e, argv: [j, "supportsDualStack"] }, a]]
|
|
14
|
-
],
|
|
15
|
-
results: [
|
|
16
|
-
[-1],
|
|
17
|
-
[-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
18
|
-
[i, l],
|
|
19
|
-
["https://freetier-fips.{Region}.api.aws", l],
|
|
20
|
-
[-1, "FIPS is enabled but this partition does not support FIPS"],
|
|
21
|
-
["https://freetier.us-east-1.api.aws", { authSchemes: [{ name: g, signingName: h, signingRegion: "us-east-1" }] }],
|
|
22
|
-
["https://freetier-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", l],
|
|
23
|
-
["https://freetier.cn-northwest-1.api.amazonwebservices.com.cn", { authSchemes: [{ name: g, signingName: h, signingRegion: "cn-northwest-1" }] }],
|
|
24
|
-
["https://freetier.{Region}.{PartitionResult#dualStackDnsSuffix}", l],
|
|
25
|
-
["https://freetier-fips.{Region}.{PartitionResult#dnsSuffix}", l],
|
|
26
|
-
["https://freetier.{Region}.{PartitionResult#dnsSuffix}", l],
|
|
27
|
-
[-1, "Invalid Configuration: Missing Region"]
|
|
28
|
-
]
|
|
29
|
-
};
|
|
30
|
-
const root = 2;
|
|
31
|
-
const r = 100_000_000;
|
|
32
|
-
const nodes = new Int32Array([
|
|
33
|
-
-1, 1, -1,
|
|
34
|
-
0, 12, 3,
|
|
35
|
-
1, 4, r + 11,
|
|
36
|
-
2, 5, r + 11,
|
|
37
|
-
3, 9, 6,
|
|
38
|
-
5, r + 5, 7,
|
|
39
|
-
6, r + 7, 8,
|
|
40
|
-
7, r + 8, r + 10,
|
|
41
|
-
4, 10, r + 4,
|
|
42
|
-
5, r + 3, 11,
|
|
43
|
-
7, r + 6, r + 9,
|
|
44
|
-
3, r + 1, r + 2,
|
|
45
|
-
]);
|
|
46
|
-
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", "Region", "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.FreeTierServiceException = class FreeTierServiceException extends __ServiceException {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
super(options);
|
|
6
|
-
Object.setPrototypeOf(this, FreeTierServiceException.prototype);
|
|
7
|
-
}
|
|
8
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
const { FreeTierServiceException: __BaseException } = require("./FreeTierServiceException");
|
|
2
|
-
exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
|
|
3
|
-
name = "AccessDeniedException";
|
|
4
|
-
$fault = "client";
|
|
5
|
-
constructor(opts) {
|
|
6
|
-
super({
|
|
7
|
-
name: "AccessDeniedException",
|
|
8
|
-
$fault: "client",
|
|
9
|
-
...opts,
|
|
10
|
-
});
|
|
11
|
-
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
exports.InternalServerException = class InternalServerException extends __BaseException {
|
|
15
|
-
name = "InternalServerException";
|
|
16
|
-
$fault = "server";
|
|
17
|
-
constructor(opts) {
|
|
18
|
-
super({
|
|
19
|
-
name: "InternalServerException",
|
|
20
|
-
$fault: "server",
|
|
21
|
-
...opts,
|
|
22
|
-
});
|
|
23
|
-
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
|
|
27
|
-
name = "ResourceNotFoundException";
|
|
28
|
-
$fault = "client";
|
|
29
|
-
constructor(opts) {
|
|
30
|
-
super({
|
|
31
|
-
name: "ResourceNotFoundException",
|
|
32
|
-
$fault: "client",
|
|
33
|
-
...opts,
|
|
34
|
-
});
|
|
35
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
exports.ThrottlingException = class ThrottlingException extends __BaseException {
|
|
39
|
-
name = "ThrottlingException";
|
|
40
|
-
$fault = "client";
|
|
41
|
-
constructor(opts) {
|
|
42
|
-
super({
|
|
43
|
-
name: "ThrottlingException",
|
|
44
|
-
$fault: "client",
|
|
45
|
-
...opts,
|
|
46
|
-
});
|
|
47
|
-
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
exports.ValidationException = class ValidationException extends __BaseException {
|
|
51
|
-
name = "ValidationException";
|
|
52
|
-
$fault = "client";
|
|
53
|
-
constructor(opts) {
|
|
54
|
-
super({
|
|
55
|
-
name: "ValidationException",
|
|
56
|
-
$fault: "client",
|
|
57
|
-
...opts,
|
|
58
|
-
});
|
|
59
|
-
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
@@ -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;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const packageInfo = require("../package.json");
|
|
2
|
-
const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
|
|
3
|
-
const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
|
|
4
|
-
const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
5
|
-
const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
6
|
-
const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
7
|
-
const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
|
|
8
|
-
const { calculateBodyLength, Hash } = require("@smithy/core/serde");
|
|
9
|
-
const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
|
|
10
|
-
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
11
|
-
const getRuntimeConfig = (config) => {
|
|
12
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
13
|
-
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
-
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
-
awsCheckVersion(process.version);
|
|
17
|
-
const loaderConfig = {
|
|
18
|
-
profile: config?.profile,
|
|
19
|
-
logger: clientSharedValues.logger,
|
|
20
|
-
};
|
|
21
|
-
return {
|
|
22
|
-
...clientSharedValues,
|
|
23
|
-
...config,
|
|
24
|
-
runtime: "node",
|
|
25
|
-
defaultsMode,
|
|
26
|
-
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
27
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
28
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
29
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
30
|
-
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
31
|
-
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
32
|
-
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
33
|
-
retryMode: config?.retryMode ??
|
|
34
|
-
loadNodeConfig({
|
|
35
|
-
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
|
-
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
37
|
-
}, config),
|
|
38
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
39
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
40
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
41
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
42
|
-
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
-
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
3
|
-
const getRuntimeConfig = (config) => {
|
|
4
|
-
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
-
return {
|
|
6
|
-
...browserDefaults,
|
|
7
|
-
...config,
|
|
8
|
-
runtime: "react-native",
|
|
9
|
-
sha256: config?.sha256 ?? Sha256,
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
-
const { AwsJson1_0Protocol } = require("@aws-sdk/core/protocols");
|
|
3
|
-
const { NoOpLogger } = require("@smithy/core/client");
|
|
4
|
-
const { parseUrl } = require("@smithy/core/protocols");
|
|
5
|
-
const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
|
|
6
|
-
const { defaultFreeTierHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
|
|
7
|
-
const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
|
|
8
|
-
const { errorTypeRegistries } = require("./schemas/schemas_0");
|
|
9
|
-
exports.getRuntimeConfig = (config) => {
|
|
10
|
-
return {
|
|
11
|
-
apiVersion: "2023-09-07",
|
|
12
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
13
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
14
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
15
|
-
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
16
|
-
extensions: config?.extensions ?? [],
|
|
17
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultFreeTierHttpAuthSchemeProvider,
|
|
18
|
-
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
19
|
-
{
|
|
20
|
-
schemeId: "aws.auth#sigv4",
|
|
21
|
-
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
22
|
-
signer: new AwsSdkSigV4Signer(),
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
-
protocol: config?.protocol ?? AwsJson1_0Protocol,
|
|
27
|
-
protocolSettings: config?.protocolSettings ?? {
|
|
28
|
-
defaultNamespace: "com.amazonaws.freetier",
|
|
29
|
-
errorTypeRegistries,
|
|
30
|
-
version: "2023-09-07",
|
|
31
|
-
serviceTarget: "AWSFreeTierService",
|
|
32
|
-
},
|
|
33
|
-
serviceId: config?.serviceId ?? "FreeTier",
|
|
34
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
35
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
36
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
37
|
-
};
|
|
38
|
-
};
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
const _A = "And";
|
|
2
|
-
const _ADE = "AccessDeniedException";
|
|
3
|
-
const _AR = "ActivityReward";
|
|
4
|
-
const _AS = "ActivitySummary";
|
|
5
|
-
const _Ac = "Activities";
|
|
6
|
-
const _D = "Dimensions";
|
|
7
|
-
const _DV = "DimensionValues";
|
|
8
|
-
const _E = "Expression";
|
|
9
|
-
const _Ex = "Expressions";
|
|
10
|
-
const _FTU = "FreeTierUsage";
|
|
11
|
-
const _FTUr = "FreeTierUsages";
|
|
12
|
-
const _GAA = "GetAccountActivity";
|
|
13
|
-
const _GAAR = "GetAccountActivityRequest";
|
|
14
|
-
const _GAARe = "GetAccountActivityResponse";
|
|
15
|
-
const _GAPS = "GetAccountPlanState";
|
|
16
|
-
const _GAPSR = "GetAccountPlanStateRequest";
|
|
17
|
-
const _GAPSRe = "GetAccountPlanStateResponse";
|
|
18
|
-
const _GFTU = "GetFreeTierUsage";
|
|
19
|
-
const _GFTUR = "GetFreeTierUsageRequest";
|
|
20
|
-
const _GFTURe = "GetFreeTierUsageResponse";
|
|
21
|
-
const _ISE = "InternalServerException";
|
|
22
|
-
const _K = "Key";
|
|
23
|
-
const _LAA = "ListAccountActivities";
|
|
24
|
-
const _LAAR = "ListAccountActivitiesRequest";
|
|
25
|
-
const _LAARi = "ListAccountActivitiesResponse";
|
|
26
|
-
const _MA = "MonetaryAmount";
|
|
27
|
-
const _MO = "MatchOptions";
|
|
28
|
-
const _N = "Not";
|
|
29
|
-
const _O = "Or";
|
|
30
|
-
const _RNFE = "ResourceNotFoundException";
|
|
31
|
-
const _TE = "ThrottlingException";
|
|
32
|
-
const _UAP = "UpgradeAccountPlan";
|
|
33
|
-
const _UAPR = "UpgradeAccountPlanRequest";
|
|
34
|
-
const _UAPRp = "UpgradeAccountPlanResponse";
|
|
35
|
-
const _V = "Values";
|
|
36
|
-
const _VE = "ValidationException";
|
|
37
|
-
const _a = "activities";
|
|
38
|
-
const _aI = "activityId";
|
|
39
|
-
const _aIc = "accountId";
|
|
40
|
-
const _aPED = "accountPlanExpirationDate";
|
|
41
|
-
const _aPRC = "accountPlanRemainingCredits";
|
|
42
|
-
const _aPS = "accountPlanStatus";
|
|
43
|
-
const _aPT = "accountPlanType";
|
|
44
|
-
const _aUA = "actualUsageAmount";
|
|
45
|
-
const _am = "amount";
|
|
46
|
-
const _c = "client";
|
|
47
|
-
const _cA = "completedAt";
|
|
48
|
-
const _cr = "credit";
|
|
49
|
-
const _d = "description";
|
|
50
|
-
const _e = "error";
|
|
51
|
-
const _eA = "expiresAt";
|
|
52
|
-
const _eTTCIM = "estimatedTimeToCompleteInMinutes";
|
|
53
|
-
const _f = "filter";
|
|
54
|
-
const _fAS = "filterActivityStatuses";
|
|
55
|
-
const _fTT = "freeTierType";
|
|
56
|
-
const _fTU = "freeTierUsages";
|
|
57
|
-
const _fUA = "forecastedUsageAmount";
|
|
58
|
-
const _hE = "httpError";
|
|
59
|
-
const _iU = "instructionsUrl";
|
|
60
|
-
const _l = "limit";
|
|
61
|
-
const _lC = "languageCode";
|
|
62
|
-
const _m = "message";
|
|
63
|
-
const _mR = "maxResults";
|
|
64
|
-
const _nT = "nextToken";
|
|
65
|
-
const _o = "operation";
|
|
66
|
-
const _r = "reward";
|
|
67
|
-
const _re = "region";
|
|
68
|
-
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.freetier";
|
|
69
|
-
const _sA = "startedAt";
|
|
70
|
-
const _se = "server";
|
|
71
|
-
const _ser = "service";
|
|
72
|
-
const _st = "status";
|
|
73
|
-
const _t = "title";
|
|
74
|
-
const _u = "unit";
|
|
75
|
-
const _uT = "usageType";
|
|
76
|
-
const n0 = "com.amazonaws.freetier";
|
|
77
|
-
const { TypeRegistry } = require("@smithy/core/schema");
|
|
78
|
-
const { AccessDeniedException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException } = require("../models/errors");
|
|
79
|
-
const { FreeTierServiceException } = require("../models/FreeTierServiceException");
|
|
80
|
-
const _s_registry = TypeRegistry.for(_s);
|
|
81
|
-
const FreeTierServiceException$ = [-3, _s, "FreeTierServiceException", 0, [], []];
|
|
82
|
-
exports.FreeTierServiceException$ = FreeTierServiceException$;
|
|
83
|
-
_s_registry.registerError(FreeTierServiceException$, FreeTierServiceException);
|
|
84
|
-
const n0_registry = TypeRegistry.for(n0);
|
|
85
|
-
const AccessDeniedException$ = [-3, n0, _ADE,
|
|
86
|
-
{ [_e]: _c, [_hE]: 403 },
|
|
87
|
-
[_m],
|
|
88
|
-
[0], 1
|
|
89
|
-
];
|
|
90
|
-
exports.AccessDeniedException$ = AccessDeniedException$;
|
|
91
|
-
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
92
|
-
const InternalServerException$ = [-3, n0, _ISE,
|
|
93
|
-
{ [_e]: _se, [_hE]: 500 },
|
|
94
|
-
[_m],
|
|
95
|
-
[0], 1
|
|
96
|
-
];
|
|
97
|
-
exports.InternalServerException$ = InternalServerException$;
|
|
98
|
-
n0_registry.registerError(InternalServerException$, InternalServerException);
|
|
99
|
-
const ResourceNotFoundException$ = [-3, n0, _RNFE,
|
|
100
|
-
{ [_e]: _c, [_hE]: 404 },
|
|
101
|
-
[_m],
|
|
102
|
-
[0], 1
|
|
103
|
-
];
|
|
104
|
-
exports.ResourceNotFoundException$ = ResourceNotFoundException$;
|
|
105
|
-
n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
|
|
106
|
-
const ThrottlingException$ = [-3, n0, _TE,
|
|
107
|
-
{ [_e]: _c, [_hE]: 429 },
|
|
108
|
-
[_m],
|
|
109
|
-
[0], 1
|
|
110
|
-
];
|
|
111
|
-
exports.ThrottlingException$ = ThrottlingException$;
|
|
112
|
-
n0_registry.registerError(ThrottlingException$, ThrottlingException);
|
|
113
|
-
const ValidationException$ = [-3, n0, _VE,
|
|
114
|
-
{ [_e]: _c, [_hE]: 400 },
|
|
115
|
-
[_m],
|
|
116
|
-
[0], 1
|
|
117
|
-
];
|
|
118
|
-
exports.ValidationException$ = ValidationException$;
|
|
119
|
-
n0_registry.registerError(ValidationException$, ValidationException);
|
|
120
|
-
exports.errorTypeRegistries = [
|
|
121
|
-
_s_registry,
|
|
122
|
-
n0_registry,
|
|
123
|
-
];
|
|
124
|
-
const ActivitySummary$ = [3, n0, _AS,
|
|
125
|
-
0,
|
|
126
|
-
[_aI, _t, _r, _st],
|
|
127
|
-
[0, 0, () => ActivityReward$, 0], 4
|
|
128
|
-
];
|
|
129
|
-
exports.ActivitySummary$ = ActivitySummary$;
|
|
130
|
-
const DimensionValues$ = [3, n0, _DV,
|
|
131
|
-
0,
|
|
132
|
-
[_K, _V, _MO],
|
|
133
|
-
[0, 64 | 0, 64 | 0], 3
|
|
134
|
-
];
|
|
135
|
-
exports.DimensionValues$ = DimensionValues$;
|
|
136
|
-
const Expression$ = [3, n0, _E,
|
|
137
|
-
0,
|
|
138
|
-
[_O, _A, _N, _D],
|
|
139
|
-
[() => Expressions, () => Expressions, () => Expression$, () => DimensionValues$]
|
|
140
|
-
];
|
|
141
|
-
exports.Expression$ = Expression$;
|
|
142
|
-
const FreeTierUsage$ = [3, n0, _FTU,
|
|
143
|
-
0,
|
|
144
|
-
[_ser, _o, _uT, _re, _aUA, _fUA, _l, _u, _d, _fTT],
|
|
145
|
-
[0, 0, 0, 0, 1, 1, 1, 0, 0, 0]
|
|
146
|
-
];
|
|
147
|
-
exports.FreeTierUsage$ = FreeTierUsage$;
|
|
148
|
-
const GetAccountActivityRequest$ = [3, n0, _GAAR,
|
|
149
|
-
0,
|
|
150
|
-
[_aI, _lC],
|
|
151
|
-
[0, 0], 1
|
|
152
|
-
];
|
|
153
|
-
exports.GetAccountActivityRequest$ = GetAccountActivityRequest$;
|
|
154
|
-
const GetAccountActivityResponse$ = [3, n0, _GAARe,
|
|
155
|
-
0,
|
|
156
|
-
[_aI, _t, _d, _st, _iU, _r, _eTTCIM, _eA, _sA, _cA],
|
|
157
|
-
[0, 0, 0, 0, 0, () => ActivityReward$, 1, 5, 5, 5], 6
|
|
158
|
-
];
|
|
159
|
-
exports.GetAccountActivityResponse$ = GetAccountActivityResponse$;
|
|
160
|
-
const GetAccountPlanStateRequest$ = [3, n0, _GAPSR,
|
|
161
|
-
0,
|
|
162
|
-
[],
|
|
163
|
-
[]
|
|
164
|
-
];
|
|
165
|
-
exports.GetAccountPlanStateRequest$ = GetAccountPlanStateRequest$;
|
|
166
|
-
const GetAccountPlanStateResponse$ = [3, n0, _GAPSRe,
|
|
167
|
-
0,
|
|
168
|
-
[_aIc, _aPT, _aPS, _aPRC, _aPED],
|
|
169
|
-
[0, 0, 0, () => MonetaryAmount$, 5], 3
|
|
170
|
-
];
|
|
171
|
-
exports.GetAccountPlanStateResponse$ = GetAccountPlanStateResponse$;
|
|
172
|
-
const GetFreeTierUsageRequest$ = [3, n0, _GFTUR,
|
|
173
|
-
0,
|
|
174
|
-
[_f, _mR, _nT],
|
|
175
|
-
[() => Expression$, 1, 0]
|
|
176
|
-
];
|
|
177
|
-
exports.GetFreeTierUsageRequest$ = GetFreeTierUsageRequest$;
|
|
178
|
-
const GetFreeTierUsageResponse$ = [3, n0, _GFTURe,
|
|
179
|
-
0,
|
|
180
|
-
[_fTU, _nT],
|
|
181
|
-
[() => FreeTierUsages, 0], 1
|
|
182
|
-
];
|
|
183
|
-
exports.GetFreeTierUsageResponse$ = GetFreeTierUsageResponse$;
|
|
184
|
-
const ListAccountActivitiesRequest$ = [3, n0, _LAAR,
|
|
185
|
-
0,
|
|
186
|
-
[_fAS, _nT, _mR, _lC],
|
|
187
|
-
[64 | 0, 0, 1, 0]
|
|
188
|
-
];
|
|
189
|
-
exports.ListAccountActivitiesRequest$ = ListAccountActivitiesRequest$;
|
|
190
|
-
const ListAccountActivitiesResponse$ = [3, n0, _LAARi,
|
|
191
|
-
0,
|
|
192
|
-
[_a, _nT],
|
|
193
|
-
[() => Activities, 0], 1
|
|
194
|
-
];
|
|
195
|
-
exports.ListAccountActivitiesResponse$ = ListAccountActivitiesResponse$;
|
|
196
|
-
const MonetaryAmount$ = [3, n0, _MA,
|
|
197
|
-
0,
|
|
198
|
-
[_am, _u],
|
|
199
|
-
[1, 0], 2
|
|
200
|
-
];
|
|
201
|
-
exports.MonetaryAmount$ = MonetaryAmount$;
|
|
202
|
-
const UpgradeAccountPlanRequest$ = [3, n0, _UAPR,
|
|
203
|
-
0,
|
|
204
|
-
[_aPT],
|
|
205
|
-
[0], 1
|
|
206
|
-
];
|
|
207
|
-
exports.UpgradeAccountPlanRequest$ = UpgradeAccountPlanRequest$;
|
|
208
|
-
const UpgradeAccountPlanResponse$ = [3, n0, _UAPRp,
|
|
209
|
-
0,
|
|
210
|
-
[_aIc, _aPT, _aPS],
|
|
211
|
-
[0, 0, 0], 3
|
|
212
|
-
];
|
|
213
|
-
exports.UpgradeAccountPlanResponse$ = UpgradeAccountPlanResponse$;
|
|
214
|
-
var Activities = [1, n0, _Ac,
|
|
215
|
-
0, () => ActivitySummary$
|
|
216
|
-
];
|
|
217
|
-
var Expressions = [1, n0, _Ex,
|
|
218
|
-
0, () => Expression$
|
|
219
|
-
];
|
|
220
|
-
var FilterActivityStatuses = 64 | 0;
|
|
221
|
-
var FreeTierUsages = [1, n0, _FTUr,
|
|
222
|
-
0, () => FreeTierUsage$
|
|
223
|
-
];
|
|
224
|
-
var MatchOptions = 64 | 0;
|
|
225
|
-
var Values = 64 | 0;
|
|
226
|
-
const ActivityReward$ = [4, n0, _AR,
|
|
227
|
-
0,
|
|
228
|
-
[_cr],
|
|
229
|
-
[() => MonetaryAmount$]
|
|
230
|
-
];
|
|
231
|
-
exports.ActivityReward$ = ActivityReward$;
|
|
232
|
-
exports.GetAccountActivity$ = [9, n0, _GAA,
|
|
233
|
-
0, () => GetAccountActivityRequest$, () => GetAccountActivityResponse$
|
|
234
|
-
];
|
|
235
|
-
exports.GetAccountPlanState$ = [9, n0, _GAPS,
|
|
236
|
-
0, () => GetAccountPlanStateRequest$, () => GetAccountPlanStateResponse$
|
|
237
|
-
];
|
|
238
|
-
exports.GetFreeTierUsage$ = [9, n0, _GFTU,
|
|
239
|
-
0, () => GetFreeTierUsageRequest$, () => GetFreeTierUsageResponse$
|
|
240
|
-
];
|
|
241
|
-
exports.ListAccountActivities$ = [9, n0, _LAA,
|
|
242
|
-
0, () => ListAccountActivitiesRequest$, () => ListAccountActivitiesResponse$
|
|
243
|
-
];
|
|
244
|
-
exports.UpgradeAccountPlan$ = [9, n0, _UAP,
|
|
245
|
-
0, () => UpgradeAccountPlanRequest$, () => UpgradeAccountPlanResponse$
|
|
246
|
-
];
|