@aws-sdk/client-sustainability 3.1067.0 → 3.1069.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/auth/httpAuthSchemeProvider.js +15 -19
- package/dist-cjs/endpoint/bdd.js +2 -5
- package/dist-cjs/endpoint/endpointResolver.js +7 -11
- package/dist-cjs/index.js +48 -68
- package/dist-cjs/models/SustainabilityServiceException.js +4 -8
- package/dist-cjs/models/errors.js +9 -16
- package/dist-cjs/runtimeConfig.browser.js +22 -26
- package/dist-cjs/runtimeConfig.js +31 -35
- package/dist-cjs/runtimeConfig.native.js +4 -7
- package/dist-cjs/runtimeConfig.shared.js +23 -27
- package/dist-cjs/schemas/schemas_0.js +48 -36
- package/package.json +9 -9
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const client_1 = require("@smithy/core/client");
|
|
7
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
8
|
-
const endpointResolver_1 = require("../endpoint/endpointResolver");
|
|
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");
|
|
9
6
|
const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
|
10
7
|
if (!input) {
|
|
11
8
|
throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
|
12
9
|
}
|
|
13
10
|
const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
|
|
14
|
-
const instructionsFn =
|
|
11
|
+
const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor
|
|
15
12
|
?.getEndpointParameterInstructions;
|
|
16
13
|
if (!instructionsFn) {
|
|
17
14
|
throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
|
|
18
15
|
}
|
|
19
|
-
const endpointParameters = await
|
|
16
|
+
const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
|
|
20
17
|
return Object.assign(defaultParameters, endpointParameters);
|
|
21
18
|
};
|
|
22
19
|
const _defaultSustainabilityHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
23
20
|
return {
|
|
24
|
-
operation:
|
|
25
|
-
region: await
|
|
21
|
+
operation: getSmithyContext(context).operation,
|
|
22
|
+
region: await normalizeProvider(config.region)() || (() => {
|
|
26
23
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
27
24
|
})(),
|
|
28
25
|
};
|
|
@@ -79,7 +76,7 @@ const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, de
|
|
|
79
76
|
const name = s.name.toLowerCase();
|
|
80
77
|
return name !== "sigv4a" && name.startsWith("sigv4");
|
|
81
78
|
});
|
|
82
|
-
if (
|
|
79
|
+
if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
|
|
83
80
|
continue;
|
|
84
81
|
}
|
|
85
82
|
}
|
|
@@ -112,15 +109,14 @@ const _defaultSustainabilityHttpAuthSchemeProvider = (authParameters) => {
|
|
|
112
109
|
}
|
|
113
110
|
return options;
|
|
114
111
|
};
|
|
115
|
-
exports.defaultSustainabilityHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(
|
|
112
|
+
exports.defaultSustainabilityHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSustainabilityHttpAuthSchemeProvider, {
|
|
116
113
|
"aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
|
|
117
114
|
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
|
118
115
|
});
|
|
119
|
-
|
|
120
|
-
const config_0 =
|
|
121
|
-
const config_1 =
|
|
116
|
+
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
117
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
118
|
+
const config_1 = resolveAwsSdkSigV4AConfig(config_0);
|
|
122
119
|
return Object.assign(config_1, {
|
|
123
|
-
authSchemePreference:
|
|
120
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
124
121
|
});
|
|
125
122
|
};
|
|
126
|
-
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/endpoint/bdd.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bdd = void 0;
|
|
4
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
1
|
+
const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
|
|
5
2
|
const k = "ref", l = "authSchemes", m = "name", n = "signingRegion";
|
|
6
3
|
const a = "isSet", b = "PartitionResult", c = "stringEquals", d = "sigv4", e = { [k]: "Endpoint" }, f = { "fn": "getAttr", "argv": [{ [k]: b }, "name"] }, g = { [m]: "sigv4a", "signingRegionSet": ["*"] }, h = { [l]: [g, { [m]: d, [n]: "us-gov-west-1" }] }, i = { [l]: [g, { [m]: d, [n]: "{PartitionResult#implicitGlobalRegion}" }] }, j = [{ [k]: "Region" }];
|
|
7
4
|
const _data = {
|
|
@@ -38,4 +35,4 @@ const nodes = new Int32Array([
|
|
|
38
35
|
5, r + 5, r + 6,
|
|
39
36
|
3, r + 1, r + 2,
|
|
40
37
|
]);
|
|
41
|
-
exports.bdd =
|
|
38
|
+
exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
6
|
-
const bdd_1 = require("./bdd");
|
|
7
|
-
const cache = new endpoints_1.EndpointCache({
|
|
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({
|
|
8
5
|
size: 50,
|
|
9
6
|
params: ["Endpoint", "Region", "UseFIPS"],
|
|
10
7
|
});
|
|
11
|
-
|
|
12
|
-
return cache.get(endpointParams, () =>
|
|
8
|
+
exports.defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
13
10
|
endpointParams: endpointParams,
|
|
14
11
|
logger: context.logger,
|
|
15
12
|
}));
|
|
16
13
|
};
|
|
17
|
-
|
|
18
|
-
endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var __exportStar = (m, e) => { Object.assign(e, m); };
|
|
2
|
+
const { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
|
|
3
|
+
const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require("@smithy/core");
|
|
4
|
+
const { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
|
|
5
|
+
exports.$Command = Command;
|
|
6
|
+
exports.__Client = Client;
|
|
7
|
+
const { resolveRegionConfig } = require("@smithy/core/config");
|
|
8
|
+
const { resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
|
|
9
|
+
const { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
|
|
10
|
+
const { resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
|
|
11
|
+
const { getSchemaSerdePlugin } = require("@smithy/core/schema");
|
|
12
|
+
const { resolveHttpAuthSchemeConfig, defaultSustainabilityHttpAuthSchemeParametersProvider } = require("./auth/httpAuthSchemeProvider");
|
|
13
|
+
const { getRuntimeConfig } = require("./runtimeConfig");
|
|
14
|
+
const { GetEstimatedCarbonEmissions$, GetEstimatedCarbonEmissionsDimensionValues$ } = require("./schemas/schemas_0");
|
|
15
|
+
__exportStar(require("./schemas/schemas_0"), exports);
|
|
16
|
+
__exportStar(require("./models/errors"), exports);
|
|
17
|
+
const { SustainabilityServiceException } = require("./models/SustainabilityServiceException");
|
|
18
|
+
exports.SustainabilityServiceException = SustainabilityServiceException;
|
|
16
19
|
|
|
17
20
|
const resolveClientEndpointParameters = (options) => {
|
|
18
21
|
return Object.assign(options, {
|
|
@@ -66,74 +69,74 @@ const resolveHttpAuthRuntimeConfig = (config) => {
|
|
|
66
69
|
};
|
|
67
70
|
|
|
68
71
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
69
|
-
const extensionConfiguration = Object.assign(
|
|
72
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
70
73
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
71
|
-
return Object.assign(runtimeConfig,
|
|
74
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
72
75
|
};
|
|
73
76
|
|
|
74
|
-
class SustainabilityClient extends
|
|
77
|
+
class SustainabilityClient extends Client {
|
|
75
78
|
config;
|
|
76
79
|
constructor(...[configuration]) {
|
|
77
|
-
const _config_0 =
|
|
80
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
78
81
|
super(_config_0);
|
|
79
82
|
this.initConfig = _config_0;
|
|
80
83
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
81
|
-
const _config_2 =
|
|
82
|
-
const _config_3 =
|
|
83
|
-
const _config_4 =
|
|
84
|
-
const _config_5 =
|
|
85
|
-
const _config_6 =
|
|
86
|
-
const _config_7 =
|
|
84
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
85
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
86
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
87
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
88
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
89
|
+
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
87
90
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
88
91
|
this.config = _config_8;
|
|
89
|
-
this.middlewareStack.use(
|
|
90
|
-
this.middlewareStack.use(
|
|
91
|
-
this.middlewareStack.use(
|
|
92
|
-
this.middlewareStack.use(
|
|
93
|
-
this.middlewareStack.use(
|
|
94
|
-
this.middlewareStack.use(
|
|
95
|
-
this.middlewareStack.use(
|
|
96
|
-
this.middlewareStack.use(
|
|
97
|
-
httpAuthSchemeParametersProvider:
|
|
98
|
-
identityProviderConfigProvider: async (config) => new
|
|
92
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
93
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
94
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
95
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
96
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
100
|
+
httpAuthSchemeParametersProvider: defaultSustainabilityHttpAuthSchemeParametersProvider,
|
|
101
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
99
102
|
"aws.auth#sigv4": config.credentials,
|
|
100
103
|
"aws.auth#sigv4a": config.credentials,
|
|
101
104
|
}),
|
|
102
105
|
}));
|
|
103
|
-
this.middlewareStack.use(
|
|
106
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
104
107
|
}
|
|
105
108
|
destroy() {
|
|
106
109
|
super.destroy();
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
112
|
|
|
110
|
-
class GetEstimatedCarbonEmissionsCommand extends
|
|
113
|
+
class GetEstimatedCarbonEmissionsCommand extends Command
|
|
111
114
|
.classBuilder()
|
|
112
115
|
.ep(commonParams)
|
|
113
116
|
.m(function (Command, cs, config, o) {
|
|
114
|
-
return [
|
|
117
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
115
118
|
})
|
|
116
119
|
.s("AwsSustainabilityApiService", "GetEstimatedCarbonEmissions", {})
|
|
117
120
|
.n("SustainabilityClient", "GetEstimatedCarbonEmissionsCommand")
|
|
118
|
-
.sc(
|
|
121
|
+
.sc(GetEstimatedCarbonEmissions$)
|
|
119
122
|
.build() {
|
|
120
123
|
}
|
|
121
124
|
|
|
122
|
-
class GetEstimatedCarbonEmissionsDimensionValuesCommand extends
|
|
125
|
+
class GetEstimatedCarbonEmissionsDimensionValuesCommand extends Command
|
|
123
126
|
.classBuilder()
|
|
124
127
|
.ep(commonParams)
|
|
125
128
|
.m(function (Command, cs, config, o) {
|
|
126
|
-
return [
|
|
129
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
127
130
|
})
|
|
128
131
|
.s("AwsSustainabilityApiService", "GetEstimatedCarbonEmissionsDimensionValues", {})
|
|
129
132
|
.n("SustainabilityClient", "GetEstimatedCarbonEmissionsDimensionValuesCommand")
|
|
130
|
-
.sc(
|
|
133
|
+
.sc(GetEstimatedCarbonEmissionsDimensionValues$)
|
|
131
134
|
.build() {
|
|
132
135
|
}
|
|
133
136
|
|
|
134
|
-
const paginateGetEstimatedCarbonEmissionsDimensionValues =
|
|
137
|
+
const paginateGetEstimatedCarbonEmissionsDimensionValues = createPaginator(SustainabilityClient, GetEstimatedCarbonEmissionsDimensionValuesCommand, "NextToken", "NextToken", "MaxResults");
|
|
135
138
|
|
|
136
|
-
const paginateGetEstimatedCarbonEmissions =
|
|
139
|
+
const paginateGetEstimatedCarbonEmissions = createPaginator(SustainabilityClient, GetEstimatedCarbonEmissionsCommand, "NextToken", "NextToken", "MaxResults");
|
|
137
140
|
|
|
138
141
|
const commands = {
|
|
139
142
|
GetEstimatedCarbonEmissionsCommand,
|
|
@@ -145,7 +148,7 @@ const paginators = {
|
|
|
145
148
|
};
|
|
146
149
|
class Sustainability extends SustainabilityClient {
|
|
147
150
|
}
|
|
148
|
-
|
|
151
|
+
createAggregatedClient(commands, Sustainability, { paginators });
|
|
149
152
|
|
|
150
153
|
const EmissionsType = {
|
|
151
154
|
TOTAL_LBM_CARBON_EMISSIONS: "TOTAL_LBM_CARBON_EMISSIONS",
|
|
@@ -172,9 +175,6 @@ const EmissionsUnit = {
|
|
|
172
175
|
MT_CO2E: "MTCO2e",
|
|
173
176
|
};
|
|
174
177
|
|
|
175
|
-
exports.$Command = client.Command;
|
|
176
|
-
exports.__Client = client.Client;
|
|
177
|
-
exports.SustainabilityServiceException = SustainabilityServiceException.SustainabilityServiceException;
|
|
178
178
|
exports.Dimension = Dimension;
|
|
179
179
|
exports.EmissionsType = EmissionsType;
|
|
180
180
|
exports.EmissionsUnit = EmissionsUnit;
|
|
@@ -185,23 +185,3 @@ exports.SustainabilityClient = SustainabilityClient;
|
|
|
185
185
|
exports.TimeGranularity = TimeGranularity;
|
|
186
186
|
exports.paginateGetEstimatedCarbonEmissions = paginateGetEstimatedCarbonEmissions;
|
|
187
187
|
exports.paginateGetEstimatedCarbonEmissionsDimensionValues = paginateGetEstimatedCarbonEmissionsDimensionValues;
|
|
188
|
-
Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
|
|
189
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
190
|
-
Object.defineProperty(exports, '__proto__', {
|
|
191
|
-
enumerable: true,
|
|
192
|
-
value: schemas_0['__proto__']
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
Object.keys(schemas_0).forEach(function (k) {
|
|
196
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
|
|
197
|
-
});
|
|
198
|
-
Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
|
|
199
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
200
|
-
Object.defineProperty(exports, '__proto__', {
|
|
201
|
-
enumerable: true,
|
|
202
|
-
value: errors['__proto__']
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
Object.keys(errors).forEach(function (k) {
|
|
206
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
|
|
207
|
-
});
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.SustainabilityServiceException =
|
|
4
|
-
const client_1 = require("@smithy/core/client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
|
6
|
-
class SustainabilityServiceException extends client_1.ServiceException {
|
|
1
|
+
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
+
exports.__ServiceException = __ServiceException;
|
|
3
|
+
exports.SustainabilityServiceException = class SustainabilityServiceException extends __ServiceException {
|
|
7
4
|
constructor(options) {
|
|
8
5
|
super(options);
|
|
9
6
|
Object.setPrototypeOf(this, SustainabilityServiceException.prototype);
|
|
10
7
|
}
|
|
11
|
-
}
|
|
12
|
-
exports.SustainabilityServiceException = SustainabilityServiceException;
|
|
8
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = exports.AccessDeniedException = void 0;
|
|
4
|
-
const SustainabilityServiceException_1 = require("./SustainabilityServiceException");
|
|
5
|
-
class AccessDeniedException extends SustainabilityServiceException_1.SustainabilityServiceException {
|
|
1
|
+
const { SustainabilityServiceException: __BaseException } = require("./SustainabilityServiceException");
|
|
2
|
+
exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
|
|
6
3
|
name = "AccessDeniedException";
|
|
7
4
|
$fault = "client";
|
|
8
5
|
Message;
|
|
@@ -15,9 +12,8 @@ class AccessDeniedException extends SustainabilityServiceException_1.Sustainabil
|
|
|
15
12
|
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
16
13
|
this.Message = opts.Message;
|
|
17
14
|
}
|
|
18
|
-
}
|
|
19
|
-
exports.
|
|
20
|
-
class InternalServerException extends SustainabilityServiceException_1.SustainabilityServiceException {
|
|
15
|
+
};
|
|
16
|
+
exports.InternalServerException = class InternalServerException extends __BaseException {
|
|
21
17
|
name = "InternalServerException";
|
|
22
18
|
$fault = "server";
|
|
23
19
|
$retryable = {};
|
|
@@ -31,9 +27,8 @@ class InternalServerException extends SustainabilityServiceException_1.Sustainab
|
|
|
31
27
|
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
32
28
|
this.Message = opts.Message;
|
|
33
29
|
}
|
|
34
|
-
}
|
|
35
|
-
exports.
|
|
36
|
-
class ThrottlingException extends SustainabilityServiceException_1.SustainabilityServiceException {
|
|
30
|
+
};
|
|
31
|
+
exports.ThrottlingException = class ThrottlingException extends __BaseException {
|
|
37
32
|
name = "ThrottlingException";
|
|
38
33
|
$fault = "client";
|
|
39
34
|
$retryable = {};
|
|
@@ -47,9 +42,8 @@ class ThrottlingException extends SustainabilityServiceException_1.Sustainabilit
|
|
|
47
42
|
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
48
43
|
this.Message = opts.Message;
|
|
49
44
|
}
|
|
50
|
-
}
|
|
51
|
-
exports.
|
|
52
|
-
class ValidationException extends SustainabilityServiceException_1.SustainabilityServiceException {
|
|
45
|
+
};
|
|
46
|
+
exports.ValidationException = class ValidationException extends __BaseException {
|
|
53
47
|
name = "ValidationException";
|
|
54
48
|
$fault = "client";
|
|
55
49
|
Message;
|
|
@@ -62,5 +56,4 @@ class ValidationException extends SustainabilityServiceException_1.Sustainabilit
|
|
|
62
56
|
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
63
57
|
this.Message = opts.Message;
|
|
64
58
|
}
|
|
65
|
-
}
|
|
66
|
-
exports.ValidationException = ValidationException;
|
|
59
|
+
};
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const retry_1 = require("@smithy/core/retry");
|
|
11
|
-
const serde_1 = require("@smithy/core/serde");
|
|
12
|
-
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
13
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
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");
|
|
14
10
|
const getRuntimeConfig = (config) => {
|
|
15
|
-
const defaultsMode =
|
|
16
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
17
|
-
const clientSharedValues = (
|
|
11
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
12
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
13
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
14
|
return {
|
|
19
15
|
...clientSharedValues,
|
|
20
16
|
...config,
|
|
21
17
|
runtime: "browser",
|
|
22
18
|
defaultsMode,
|
|
23
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
19
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
24
20
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
25
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
26
|
-
maxAttempts: config?.maxAttempts ??
|
|
27
|
-
region: config?.region ??
|
|
28
|
-
requestHandler:
|
|
29
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode ||
|
|
30
|
-
sha256: config?.sha256 ??
|
|
31
|
-
streamCollector: config?.streamCollector ??
|
|
32
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(
|
|
33
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(
|
|
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)),
|
|
34
30
|
};
|
|
35
31
|
};
|
|
36
32
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const retry_1 = require("@smithy/core/retry");
|
|
12
|
-
const serde_1 = require("@smithy/core/serde");
|
|
13
|
-
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
14
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
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, NODE_SIGV4A_CONFIG_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");
|
|
15
11
|
const getRuntimeConfig = (config) => {
|
|
16
|
-
|
|
17
|
-
const defaultsMode =
|
|
18
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
19
|
-
const clientSharedValues = (
|
|
20
|
-
(
|
|
12
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
awsCheckVersion(process.version);
|
|
21
17
|
const loaderConfig = {
|
|
22
18
|
profile: config?.profile,
|
|
23
19
|
logger: clientSharedValues.logger,
|
|
@@ -27,24 +23,24 @@ const getRuntimeConfig = (config) => {
|
|
|
27
23
|
...config,
|
|
28
24
|
runtime: "node",
|
|
29
25
|
defaultsMode,
|
|
30
|
-
authSchemePreference: config?.authSchemePreference ?? (
|
|
31
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
32
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ??
|
|
33
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
34
|
-
maxAttempts: config?.maxAttempts ?? (
|
|
35
|
-
region: config?.region ?? (
|
|
36
|
-
requestHandler:
|
|
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),
|
|
37
33
|
retryMode: config?.retryMode ??
|
|
38
|
-
(
|
|
39
|
-
...
|
|
40
|
-
default: async () => (await defaultConfigProvider()).retryMode ||
|
|
34
|
+
loadNodeConfig({
|
|
35
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
41
37
|
}, config),
|
|
42
|
-
sha256: config?.sha256 ??
|
|
43
|
-
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (
|
|
44
|
-
streamCollector: config?.streamCollector ??
|
|
45
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (
|
|
46
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (
|
|
47
|
-
userAgentAppId: config?.userAgentAppId ?? (
|
|
38
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
39
|
+
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadNodeConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
|
|
40
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
41
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
42
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
43
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
48
44
|
};
|
|
49
45
|
};
|
|
50
46
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getRuntimeConfig = void 0;
|
|
4
|
-
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
-
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
1
|
+
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
+
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
6
3
|
const getRuntimeConfig = (config) => {
|
|
7
|
-
const browserDefaults = (
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
8
5
|
return {
|
|
9
6
|
...browserDefaults,
|
|
10
7
|
...config,
|
|
11
8
|
runtime: "react-native",
|
|
12
|
-
sha256: config?.sha256 ??
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
13
10
|
};
|
|
14
11
|
};
|
|
15
12
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,49 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
12
|
-
const schemas_0_1 = require("./schemas/schemas_0");
|
|
13
|
-
const getRuntimeConfig = (config) => {
|
|
1
|
+
const { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
+
const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
|
|
3
|
+
const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
|
|
4
|
+
const { NoOpLogger } = require("@smithy/core/client");
|
|
5
|
+
const { parseUrl } = require("@smithy/core/protocols");
|
|
6
|
+
const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
|
|
7
|
+
const { defaultSustainabilityHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
|
|
8
|
+
const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
|
|
9
|
+
const { errorTypeRegistries } = require("./schemas/schemas_0");
|
|
10
|
+
exports.getRuntimeConfig = (config) => {
|
|
14
11
|
return {
|
|
15
12
|
apiVersion: "2018-05-10",
|
|
16
|
-
base64Decoder: config?.base64Decoder ??
|
|
17
|
-
base64Encoder: config?.base64Encoder ??
|
|
13
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
14
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
18
15
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
19
|
-
endpointProvider: config?.endpointProvider ??
|
|
16
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
20
17
|
extensions: config?.extensions ?? [],
|
|
21
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ??
|
|
18
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSustainabilityHttpAuthSchemeProvider,
|
|
22
19
|
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
23
20
|
{
|
|
24
21
|
schemeId: "aws.auth#sigv4",
|
|
25
22
|
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
26
|
-
signer: new
|
|
23
|
+
signer: new AwsSdkSigV4Signer(),
|
|
27
24
|
},
|
|
28
25
|
{
|
|
29
26
|
schemeId: "aws.auth#sigv4a",
|
|
30
27
|
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
|
31
|
-
signer: new
|
|
28
|
+
signer: new AwsSdkSigV4ASigner(),
|
|
32
29
|
},
|
|
33
30
|
],
|
|
34
|
-
logger: config?.logger ?? new
|
|
35
|
-
protocol: config?.protocol ??
|
|
31
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
32
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
36
33
|
protocolSettings: config?.protocolSettings ?? {
|
|
37
34
|
defaultNamespace: "com.amazonaws.sustainability",
|
|
38
|
-
errorTypeRegistries
|
|
35
|
+
errorTypeRegistries,
|
|
39
36
|
version: "2018-05-10",
|
|
40
37
|
serviceTarget: "AwsSustainabilityApiService",
|
|
41
38
|
},
|
|
42
39
|
serviceId: config?.serviceId ?? "Sustainability",
|
|
43
|
-
signerConstructor: config?.signerConstructor ??
|
|
44
|
-
urlParser: config?.urlParser ??
|
|
45
|
-
utf8Decoder: config?.utf8Decoder ??
|
|
46
|
-
utf8Encoder: config?.utf8Encoder ??
|
|
40
|
+
signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
|
|
41
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
42
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
43
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
47
44
|
};
|
|
48
45
|
};
|
|
49
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetEstimatedCarbonEmissionsDimensionValues$ = exports.GetEstimatedCarbonEmissions$ = exports.TimePeriod$ = exports.GranularityConfiguration$ = exports.GetEstimatedCarbonEmissionsResponse$ = exports.GetEstimatedCarbonEmissionsRequest$ = exports.GetEstimatedCarbonEmissionsDimensionValuesResponse$ = exports.GetEstimatedCarbonEmissionsDimensionValuesRequest$ = exports.FilterExpression$ = exports.EstimatedCarbonEmissions$ = exports.Emissions$ = exports.DimensionEntry$ = exports.errorTypeRegistries = exports.ValidationException$ = exports.ThrottlingException$ = exports.InternalServerException$ = exports.AccessDeniedException$ = exports.SustainabilityServiceException$ = void 0;
|
|
4
1
|
const _ADE = "AccessDeniedException";
|
|
5
2
|
const _D = "Dimension";
|
|
6
3
|
const _DE = "DimensionEntry";
|
|
@@ -48,110 +45,125 @@ const _m = "message";
|
|
|
48
45
|
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sustainability";
|
|
49
46
|
const _se = "server";
|
|
50
47
|
const n0 = "com.amazonaws.sustainability";
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const _s_registry =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
48
|
+
const { TypeRegistry } = require("@smithy/core/schema");
|
|
49
|
+
const { AccessDeniedException, InternalServerException, ThrottlingException, ValidationException } = require("../models/errors");
|
|
50
|
+
const { SustainabilityServiceException } = require("../models/SustainabilityServiceException");
|
|
51
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
52
|
+
const SustainabilityServiceException$ = [-3, _s, "SustainabilityServiceException", 0, [], []];
|
|
53
|
+
exports.SustainabilityServiceException$ = SustainabilityServiceException$;
|
|
54
|
+
_s_registry.registerError(SustainabilityServiceException$, SustainabilityServiceException);
|
|
55
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
56
|
+
const AccessDeniedException$ = [-3, n0, _ADE,
|
|
59
57
|
{ [_e]: _c, [_hE]: 403 },
|
|
60
58
|
[_M],
|
|
61
59
|
[[0, { [_jN]: _m }]], 1
|
|
62
60
|
];
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
exports.AccessDeniedException$ = AccessDeniedException$;
|
|
62
|
+
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
63
|
+
const InternalServerException$ = [-3, n0, _ISE,
|
|
65
64
|
{ [_e]: _se, [_hE]: 500 },
|
|
66
65
|
[_M],
|
|
67
66
|
[[0, { [_jN]: _m }]], 1
|
|
68
67
|
];
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
exports.InternalServerException$ = InternalServerException$;
|
|
69
|
+
n0_registry.registerError(InternalServerException$, InternalServerException);
|
|
70
|
+
const ThrottlingException$ = [-3, n0, _TE,
|
|
71
71
|
{ [_e]: _c, [_hE]: 429 },
|
|
72
72
|
[_M],
|
|
73
73
|
[[0, { [_jN]: _m }]], 1
|
|
74
74
|
];
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
exports.ThrottlingException$ = ThrottlingException$;
|
|
76
|
+
n0_registry.registerError(ThrottlingException$, ThrottlingException);
|
|
77
|
+
const ValidationException$ = [-3, n0, _VE,
|
|
77
78
|
{ [_e]: _c, [_hE]: 400 },
|
|
78
79
|
[_M],
|
|
79
80
|
[[0, { [_jN]: _m }]], 1
|
|
80
81
|
];
|
|
81
|
-
|
|
82
|
+
exports.ValidationException$ = ValidationException$;
|
|
83
|
+
n0_registry.registerError(ValidationException$, ValidationException);
|
|
82
84
|
exports.errorTypeRegistries = [
|
|
83
85
|
_s_registry,
|
|
84
86
|
n0_registry,
|
|
85
87
|
];
|
|
86
|
-
|
|
88
|
+
const DimensionEntry$ = [3, n0, _DE,
|
|
87
89
|
0,
|
|
88
90
|
[_D, _V],
|
|
89
91
|
[0, 0], 2
|
|
90
92
|
];
|
|
91
|
-
exports.
|
|
93
|
+
exports.DimensionEntry$ = DimensionEntry$;
|
|
94
|
+
const Emissions$ = [3, n0, _E,
|
|
92
95
|
0,
|
|
93
96
|
[_V, _U],
|
|
94
97
|
[1, 0], 2
|
|
95
98
|
];
|
|
96
|
-
exports.
|
|
99
|
+
exports.Emissions$ = Emissions$;
|
|
100
|
+
const EstimatedCarbonEmissions$ = [3, n0, _ECE,
|
|
97
101
|
0,
|
|
98
102
|
[_TP, _DV, _MV, _EV],
|
|
99
|
-
[() =>
|
|
103
|
+
[() => TimePeriod$, 128 | 0, 0, () => EmissionsMap], 4
|
|
100
104
|
];
|
|
101
|
-
exports.
|
|
105
|
+
exports.EstimatedCarbonEmissions$ = EstimatedCarbonEmissions$;
|
|
106
|
+
const FilterExpression$ = [3, n0, _FE,
|
|
102
107
|
0,
|
|
103
108
|
[_Di],
|
|
104
109
|
[[2, n0, _DLM, 0, 0, 64 | 0]]
|
|
105
110
|
];
|
|
106
|
-
exports.
|
|
111
|
+
exports.FilterExpression$ = FilterExpression$;
|
|
112
|
+
const GetEstimatedCarbonEmissionsDimensionValuesRequest$ = [3, n0, _GECEDVR,
|
|
107
113
|
0,
|
|
108
114
|
[_TP, _Di, _MR, _NT],
|
|
109
|
-
[() =>
|
|
115
|
+
[() => TimePeriod$, 64 | 0, 1, 0], 2
|
|
110
116
|
];
|
|
111
|
-
exports.
|
|
117
|
+
exports.GetEstimatedCarbonEmissionsDimensionValuesRequest$ = GetEstimatedCarbonEmissionsDimensionValuesRequest$;
|
|
118
|
+
const GetEstimatedCarbonEmissionsDimensionValuesResponse$ = [3, n0, _GECEDVRe,
|
|
112
119
|
0,
|
|
113
120
|
[_R, _NT],
|
|
114
121
|
[() => DimensionEntryList, 0]
|
|
115
122
|
];
|
|
116
|
-
exports.
|
|
123
|
+
exports.GetEstimatedCarbonEmissionsDimensionValuesResponse$ = GetEstimatedCarbonEmissionsDimensionValuesResponse$;
|
|
124
|
+
const GetEstimatedCarbonEmissionsRequest$ = [3, n0, _GECER,
|
|
117
125
|
0,
|
|
118
126
|
[_TP, _GB, _FB, _ET, _G, _GC, _MR, _NT],
|
|
119
|
-
[() =>
|
|
127
|
+
[() => TimePeriod$, 64 | 0, () => FilterExpression$, 64 | 0, 0, () => GranularityConfiguration$, 1, 0], 1
|
|
120
128
|
];
|
|
121
|
-
exports.
|
|
129
|
+
exports.GetEstimatedCarbonEmissionsRequest$ = GetEstimatedCarbonEmissionsRequest$;
|
|
130
|
+
const GetEstimatedCarbonEmissionsResponse$ = [3, n0, _GECERe,
|
|
122
131
|
0,
|
|
123
132
|
[_R, _NT],
|
|
124
133
|
[() => EstimatedCarbonEmissionsList, 0], 1
|
|
125
134
|
];
|
|
126
|
-
exports.
|
|
135
|
+
exports.GetEstimatedCarbonEmissionsResponse$ = GetEstimatedCarbonEmissionsResponse$;
|
|
136
|
+
const GranularityConfiguration$ = [3, n0, _GC,
|
|
127
137
|
0,
|
|
128
138
|
[_FYSM],
|
|
129
139
|
[1]
|
|
130
140
|
];
|
|
131
|
-
exports.
|
|
141
|
+
exports.GranularityConfiguration$ = GranularityConfiguration$;
|
|
142
|
+
const TimePeriod$ = [3, n0, _TP,
|
|
132
143
|
0,
|
|
133
144
|
[_S, _En],
|
|
134
145
|
[5, 5], 2
|
|
135
146
|
];
|
|
147
|
+
exports.TimePeriod$ = TimePeriod$;
|
|
136
148
|
var DimensionEntryList = [1, n0, _DEL,
|
|
137
|
-
0, () =>
|
|
149
|
+
0, () => DimensionEntry$
|
|
138
150
|
];
|
|
139
151
|
var DimensionList = 64 | 0;
|
|
140
152
|
var DimensionValueList = 64 | 0;
|
|
141
153
|
var EmissionsTypeList = 64 | 0;
|
|
142
154
|
var EstimatedCarbonEmissionsList = [1, n0, _ECEL,
|
|
143
|
-
0, () =>
|
|
155
|
+
0, () => EstimatedCarbonEmissions$
|
|
144
156
|
];
|
|
145
157
|
var DimensionListMap = [2, n0, _DLM,
|
|
146
158
|
0, 0, 64 | 0
|
|
147
159
|
];
|
|
148
160
|
var DimensionsMap = 128 | 0;
|
|
149
161
|
var EmissionsMap = [2, n0, _EM,
|
|
150
|
-
0, 0, () =>
|
|
162
|
+
0, 0, () => Emissions$
|
|
151
163
|
];
|
|
152
164
|
exports.GetEstimatedCarbonEmissions$ = [9, n0, _GECE,
|
|
153
|
-
{ [_h]: ["POST", "/v1/estimated-carbon-emissions", 200] }, () =>
|
|
165
|
+
{ [_h]: ["POST", "/v1/estimated-carbon-emissions", 200] }, () => GetEstimatedCarbonEmissionsRequest$, () => GetEstimatedCarbonEmissionsResponse$
|
|
154
166
|
];
|
|
155
167
|
exports.GetEstimatedCarbonEmissionsDimensionValues$ = [9, n0, _GECEDV,
|
|
156
|
-
{ [_h]: ["POST", "/v1/estimated-carbon-emissions-dimension-values", 200] }, () =>
|
|
168
|
+
{ [_h]: ["POST", "/v1/estimated-carbon-emissions-dimension-values", 200] }, () => GetEstimatedCarbonEmissionsDimensionValuesRequest$, () => GetEstimatedCarbonEmissionsDimensionValuesResponse$
|
|
157
169
|
];
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sustainability",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sustainability Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1069.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",
|
|
8
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
8
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json",
|
|
9
9
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
10
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
10
|
+
"build:types": "premove dist-types && tsc -p tsconfig.types.json",
|
|
11
11
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
12
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
12
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
13
13
|
"extract:docs": "api-extractor run --local",
|
|
14
|
-
"generate:client": "node ../../scripts/generate-clients/single-service
|
|
14
|
+
"generate:client": "node ../../scripts/generate-clients/single-service",
|
|
15
15
|
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
|
|
16
16
|
},
|
|
17
17
|
"main": "./dist-cjs/index.js",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
24
|
-
"@aws-sdk/core": "^3.974.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
26
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
27
|
-
"@aws-sdk/types": "^3.973.
|
|
24
|
+
"@aws-sdk/core": "^3.974.21",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "^3.972.56",
|
|
26
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.35",
|
|
27
|
+
"@aws-sdk/types": "^3.973.13",
|
|
28
28
|
"@smithy/core": "^3.24.6",
|
|
29
29
|
"@smithy/fetch-http-handler": "^5.4.6",
|
|
30
30
|
"@smithy/node-http-handler": "^4.7.6",
|