@aws-sdk/client-sustainability 3.1068.0 → 3.1070.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.
@@ -1,28 +1,25 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveHttpAuthSchemeConfig = exports.defaultSustainabilityHttpAuthSchemeProvider = exports.defaultSustainabilityHttpAuthSchemeParametersProvider = void 0;
4
- const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
5
- const signature_v4_multi_region_1 = require("@aws-sdk/signature-v4-multi-region");
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 = (0, client_1.getSmithyContext)(context)?.commandInstance?.constructor
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 (0, endpoints_1.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config);
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: (0, client_1.getSmithyContext)(context).operation,
25
- region: await (0, client_1.normalizeProvider)(config.region)() || (() => {
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 (signature_v4_multi_region_1.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
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(endpointResolver_1.defaultEndpointResolver, _defaultSustainabilityHttpAuthSchemeProvider, {
112
+ exports.defaultSustainabilityHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSustainabilityHttpAuthSchemeProvider, {
116
113
  "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
117
114
  "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
118
115
  });
119
- const resolveHttpAuthSchemeConfig = (config) => {
120
- const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
121
- const config_1 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4AConfig)(config_0);
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: (0, client_1.normalizeProvider)(config.authSchemePreference ?? []),
120
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
124
121
  });
125
122
  };
126
- exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
@@ -1,7 +1,4 @@
1
- "use strict";
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 = endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
38
+ exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -1,18 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultEndpointResolver = void 0;
4
- const client_1 = require("@aws-sdk/core/client");
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
- const defaultEndpointResolver = (endpointParams, context = {}) => {
12
- return cache.get(endpointParams, () => (0, endpoints_1.decideEndpoint)(bdd_1.bdd, {
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
- exports.defaultEndpointResolver = defaultEndpointResolver;
18
- endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
14
+ customEndpointFunctions.aws = awsEndpointFunctions;
package/dist-cjs/index.js CHANGED
@@ -1,18 +1,21 @@
1
- 'use strict';
2
-
3
- var client$1 = require('@aws-sdk/core/client');
4
- var core = require('@smithy/core');
5
- var client = require('@smithy/core/client');
6
- var config = require('@smithy/core/config');
7
- var endpoints = require('@smithy/core/endpoints');
8
- var protocols = require('@smithy/core/protocols');
9
- var retry = require('@smithy/core/retry');
10
- var schema = require('@smithy/core/schema');
11
- var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
12
- var runtimeConfig = require('./runtimeConfig');
13
- var schemas_0 = require('./schemas/schemas_0');
14
- var errors = require('./models/errors');
15
- var SustainabilityServiceException = require('./models/SustainabilityServiceException');
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(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
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, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
74
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
72
75
  };
73
76
 
74
- class SustainabilityClient extends client.Client {
77
+ class SustainabilityClient extends Client {
75
78
  config;
76
79
  constructor(...[configuration]) {
77
- const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
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 = client$1.resolveUserAgentConfig(_config_1);
82
- const _config_3 = retry.resolveRetryConfig(_config_2);
83
- const _config_4 = config.resolveRegionConfig(_config_3);
84
- const _config_5 = client$1.resolveHostHeaderConfig(_config_4);
85
- const _config_6 = endpoints.resolveEndpointConfig(_config_5);
86
- const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
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(schema.getSchemaSerdePlugin(this.config));
90
- this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));
91
- this.middlewareStack.use(retry.getRetryPlugin(this.config));
92
- this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));
93
- this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));
94
- this.middlewareStack.use(client$1.getLoggerPlugin(this.config));
95
- this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));
96
- this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
97
- httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSustainabilityHttpAuthSchemeParametersProvider,
98
- identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
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(core.getHttpSigningPlugin(this.config));
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 client.Command
113
+ class GetEstimatedCarbonEmissionsCommand extends Command
111
114
  .classBuilder()
112
115
  .ep(commonParams)
113
116
  .m(function (Command, cs, config, o) {
114
- return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
117
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
115
118
  })
116
119
  .s("AwsSustainabilityApiService", "GetEstimatedCarbonEmissions", {})
117
120
  .n("SustainabilityClient", "GetEstimatedCarbonEmissionsCommand")
118
- .sc(schemas_0.GetEstimatedCarbonEmissions$)
121
+ .sc(GetEstimatedCarbonEmissions$)
119
122
  .build() {
120
123
  }
121
124
 
122
- class GetEstimatedCarbonEmissionsDimensionValuesCommand extends client.Command
125
+ class GetEstimatedCarbonEmissionsDimensionValuesCommand extends Command
123
126
  .classBuilder()
124
127
  .ep(commonParams)
125
128
  .m(function (Command, cs, config, o) {
126
- return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
129
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
127
130
  })
128
131
  .s("AwsSustainabilityApiService", "GetEstimatedCarbonEmissionsDimensionValues", {})
129
132
  .n("SustainabilityClient", "GetEstimatedCarbonEmissionsDimensionValuesCommand")
130
- .sc(schemas_0.GetEstimatedCarbonEmissionsDimensionValues$)
133
+ .sc(GetEstimatedCarbonEmissionsDimensionValues$)
131
134
  .build() {
132
135
  }
133
136
 
134
- const paginateGetEstimatedCarbonEmissionsDimensionValues = core.createPaginator(SustainabilityClient, GetEstimatedCarbonEmissionsDimensionValuesCommand, "NextToken", "NextToken", "MaxResults");
137
+ const paginateGetEstimatedCarbonEmissionsDimensionValues = createPaginator(SustainabilityClient, GetEstimatedCarbonEmissionsDimensionValuesCommand, "NextToken", "NextToken", "MaxResults");
135
138
 
136
- const paginateGetEstimatedCarbonEmissions = core.createPaginator(SustainabilityClient, GetEstimatedCarbonEmissionsCommand, "NextToken", "NextToken", "MaxResults");
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
- client.createAggregatedClient(commands, Sustainability, { paginators });
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SustainabilityServiceException = exports.__ServiceException = void 0;
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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.AccessDeniedException = AccessDeniedException;
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.InternalServerException = InternalServerException;
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.ThrottlingException = ThrottlingException;
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeConfig = void 0;
4
- const tslib_1 = require("tslib");
5
- const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
- const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
- const client_1 = require("@aws-sdk/core/client");
8
- const client_2 = require("@smithy/core/client");
9
- const config_1 = require("@smithy/core/config");
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 = (0, config_1.resolveDefaultsModeConfig)(config);
16
- const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
17
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
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 ?? serde_1.calculateBodyLength,
19
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
24
20
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
25
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
26
- maxAttempts: config?.maxAttempts ?? retry_1.DEFAULT_MAX_ATTEMPTS,
27
- region: config?.region ?? (0, client_2.invalidProvider)("Region is missing"),
28
- requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
29
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
30
- sha256: config?.sha256 ?? sha256_browser_1.Sha256,
31
- streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
32
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
33
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_FIPS_ENDPOINT)),
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeConfig = void 0;
4
- const tslib_1 = require("tslib");
5
- const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
- const client_1 = require("@aws-sdk/core/client");
7
- const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
8
- const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
9
- const client_2 = require("@smithy/core/client");
10
- const config_1 = require("@smithy/core/config");
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
- (0, client_2.emitWarningIfUnsupportedVersion)(process.version);
17
- const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
18
- const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
19
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
- (0, client_1.emitWarningIfUnsupportedVersion)(process.version);
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 ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
31
- bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
32
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
33
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
34
- maxAttempts: config?.maxAttempts ?? (0, config_1.loadConfig)(retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
35
- region: config?.region ?? (0, config_1.loadConfig)(config_1.NODE_REGION_CONFIG_OPTIONS, { ...config_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
36
- requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
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
- (0, config_1.loadConfig)({
39
- ...retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
40
- default: async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE,
34
+ loadNodeConfig({
35
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
41
37
  }, config),
42
- sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
43
- sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
44
- streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
45
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
46
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
47
- userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(client_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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 = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
8
5
  return {
9
6
  ...browserDefaults,
10
7
  ...config,
11
8
  runtime: "react-native",
12
- sha256: config?.sha256 ?? sha256_js_1.Sha256,
9
+ sha256: config?.sha256 ?? Sha256,
13
10
  };
14
11
  };
15
12
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,49 +1,45 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRuntimeConfig = void 0;
4
- const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
5
- const protocols_1 = require("@aws-sdk/core/protocols");
6
- const signature_v4_multi_region_1 = require("@aws-sdk/signature-v4-multi-region");
7
- const client_1 = require("@smithy/core/client");
8
- const protocols_2 = require("@smithy/core/protocols");
9
- const serde_1 = require("@smithy/core/serde");
10
- const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
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 ?? serde_1.fromBase64,
17
- base64Encoder: config?.base64Encoder ?? serde_1.toBase64,
13
+ base64Decoder: config?.base64Decoder ?? fromBase64,
14
+ base64Encoder: config?.base64Encoder ?? toBase64,
18
15
  disableHostPrefix: config?.disableHostPrefix ?? false,
19
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
16
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
20
17
  extensions: config?.extensions ?? [],
21
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSustainabilityHttpAuthSchemeProvider,
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 httpAuthSchemes_1.AwsSdkSigV4Signer(),
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 httpAuthSchemes_1.AwsSdkSigV4ASigner(),
28
+ signer: new AwsSdkSigV4ASigner(),
32
29
  },
33
30
  ],
34
- logger: config?.logger ?? new client_1.NoOpLogger(),
35
- protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
31
+ logger: config?.logger ?? new NoOpLogger(),
32
+ protocol: config?.protocol ?? AwsRestJsonProtocol,
36
33
  protocolSettings: config?.protocolSettings ?? {
37
34
  defaultNamespace: "com.amazonaws.sustainability",
38
- errorTypeRegistries: schemas_0_1.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 ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
44
- urlParser: config?.urlParser ?? protocols_2.parseUrl,
45
- utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8,
46
- utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8,
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 schema_1 = require("@smithy/core/schema");
52
- const errors_1 = require("../models/errors");
53
- const SustainabilityServiceException_1 = require("../models/SustainabilityServiceException");
54
- const _s_registry = schema_1.TypeRegistry.for(_s);
55
- exports.SustainabilityServiceException$ = [-3, _s, "SustainabilityServiceException", 0, [], []];
56
- _s_registry.registerError(exports.SustainabilityServiceException$, SustainabilityServiceException_1.SustainabilityServiceException);
57
- const n0_registry = schema_1.TypeRegistry.for(n0);
58
- exports.AccessDeniedException$ = [-3, n0, _ADE,
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
- n0_registry.registerError(exports.AccessDeniedException$, errors_1.AccessDeniedException);
64
- exports.InternalServerException$ = [-3, n0, _ISE,
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
- n0_registry.registerError(exports.InternalServerException$, errors_1.InternalServerException);
70
- exports.ThrottlingException$ = [-3, n0, _TE,
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
- n0_registry.registerError(exports.ThrottlingException$, errors_1.ThrottlingException);
76
- exports.ValidationException$ = [-3, n0, _VE,
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
- n0_registry.registerError(exports.ValidationException$, errors_1.ValidationException);
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
- exports.DimensionEntry$ = [3, n0, _DE,
88
+ const DimensionEntry$ = [3, n0, _DE,
87
89
  0,
88
90
  [_D, _V],
89
91
  [0, 0], 2
90
92
  ];
91
- exports.Emissions$ = [3, n0, _E,
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.EstimatedCarbonEmissions$ = [3, n0, _ECE,
99
+ exports.Emissions$ = Emissions$;
100
+ const EstimatedCarbonEmissions$ = [3, n0, _ECE,
97
101
  0,
98
102
  [_TP, _DV, _MV, _EV],
99
- [() => exports.TimePeriod$, 128 | 0, 0, () => EmissionsMap], 4
103
+ [() => TimePeriod$, 128 | 0, 0, () => EmissionsMap], 4
100
104
  ];
101
- exports.FilterExpression$ = [3, n0, _FE,
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.GetEstimatedCarbonEmissionsDimensionValuesRequest$ = [3, n0, _GECEDVR,
111
+ exports.FilterExpression$ = FilterExpression$;
112
+ const GetEstimatedCarbonEmissionsDimensionValuesRequest$ = [3, n0, _GECEDVR,
107
113
  0,
108
114
  [_TP, _Di, _MR, _NT],
109
- [() => exports.TimePeriod$, 64 | 0, 1, 0], 2
115
+ [() => TimePeriod$, 64 | 0, 1, 0], 2
110
116
  ];
111
- exports.GetEstimatedCarbonEmissionsDimensionValuesResponse$ = [3, n0, _GECEDVRe,
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.GetEstimatedCarbonEmissionsRequest$ = [3, n0, _GECER,
123
+ exports.GetEstimatedCarbonEmissionsDimensionValuesResponse$ = GetEstimatedCarbonEmissionsDimensionValuesResponse$;
124
+ const GetEstimatedCarbonEmissionsRequest$ = [3, n0, _GECER,
117
125
  0,
118
126
  [_TP, _GB, _FB, _ET, _G, _GC, _MR, _NT],
119
- [() => exports.TimePeriod$, 64 | 0, () => exports.FilterExpression$, 64 | 0, 0, () => exports.GranularityConfiguration$, 1, 0], 1
127
+ [() => TimePeriod$, 64 | 0, () => FilterExpression$, 64 | 0, 0, () => GranularityConfiguration$, 1, 0], 1
120
128
  ];
121
- exports.GetEstimatedCarbonEmissionsResponse$ = [3, n0, _GECERe,
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.GranularityConfiguration$ = [3, n0, _GC,
135
+ exports.GetEstimatedCarbonEmissionsResponse$ = GetEstimatedCarbonEmissionsResponse$;
136
+ const GranularityConfiguration$ = [3, n0, _GC,
127
137
  0,
128
138
  [_FYSM],
129
139
  [1]
130
140
  ];
131
- exports.TimePeriod$ = [3, n0, _TP,
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, () => exports.DimensionEntry$
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, () => exports.EstimatedCarbonEmissions$
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, () => exports.Emissions$
162
+ 0, 0, () => Emissions$
151
163
  ];
152
164
  exports.GetEstimatedCarbonEmissions$ = [9, n0, _GECE,
153
- { [_h]: ["POST", "/v1/estimated-carbon-emissions", 200] }, () => exports.GetEstimatedCarbonEmissionsRequest$, () => exports.GetEstimatedCarbonEmissionsResponse$
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] }, () => exports.GetEstimatedCarbonEmissionsDimensionValuesRequest$, () => exports.GetEstimatedCarbonEmissionsDimensionValuesResponse$
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.1068.0",
4
+ "version": "3.1070.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 tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
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 --solo sustainability",
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.20",
25
- "@aws-sdk/credential-provider-node": "^3.972.55",
26
- "@aws-sdk/signature-v4-multi-region": "^3.996.34",
27
- "@aws-sdk/types": "^3.973.12",
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",