@aws-sdk/client-marketplace-reporting 3.899.0 → 3.906.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist-cjs/index.js +301 -412
  2. package/package.json +37 -37
package/dist-cjs/index.js CHANGED
@@ -1,437 +1,326 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- $Command: () => import_smithy_client.Command,
25
- AccessDeniedException: () => AccessDeniedException,
26
- BadRequestException: () => BadRequestException,
27
- GetBuyerDashboardCommand: () => GetBuyerDashboardCommand,
28
- InternalServerException: () => InternalServerException,
29
- MarketplaceReporting: () => MarketplaceReporting,
30
- MarketplaceReportingClient: () => MarketplaceReportingClient,
31
- MarketplaceReportingServiceException: () => MarketplaceReportingServiceException,
32
- UnauthorizedException: () => UnauthorizedException,
33
- __Client: () => import_smithy_client.Client
34
- });
35
- module.exports = __toCommonJS(index_exports);
1
+ 'use strict';
36
2
 
37
- // src/MarketplaceReportingClient.ts
38
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
39
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
40
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
41
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
42
- var import_config_resolver = require("@smithy/config-resolver");
43
- var import_core = require("@smithy/core");
44
- var import_middleware_content_length = require("@smithy/middleware-content-length");
45
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
46
- var import_middleware_retry = require("@smithy/middleware-retry");
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
47
19
 
48
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
20
+ const resolveClientEndpointParameters = (options) => {
21
+ return Object.assign(options, {
22
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
23
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
24
+ defaultSigningName: "aws-marketplace",
25
+ });
26
+ };
27
+ const commonParams = {
28
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
29
+ Endpoint: { type: "builtInParams", name: "endpoint" },
30
+ Region: { type: "builtInParams", name: "region" },
31
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
32
+ };
49
33
 
50
- // src/endpoint/EndpointParameters.ts
51
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
52
- return Object.assign(options, {
53
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
54
- useFipsEndpoint: options.useFipsEndpoint ?? false,
55
- defaultSigningName: "aws-marketplace"
56
- });
57
- }, "resolveClientEndpointParameters");
58
- var commonParams = {
59
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
60
- Endpoint: { type: "builtInParams", name: "endpoint" },
61
- Region: { type: "builtInParams", name: "region" },
62
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
34
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
37
+ let _credentials = runtimeConfig.credentials;
38
+ return {
39
+ setHttpAuthScheme(httpAuthScheme) {
40
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
41
+ if (index === -1) {
42
+ _httpAuthSchemes.push(httpAuthScheme);
43
+ }
44
+ else {
45
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
46
+ }
47
+ },
48
+ httpAuthSchemes() {
49
+ return _httpAuthSchemes;
50
+ },
51
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
52
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
53
+ },
54
+ httpAuthSchemeProvider() {
55
+ return _httpAuthSchemeProvider;
56
+ },
57
+ setCredentials(credentials) {
58
+ _credentials = credentials;
59
+ },
60
+ credentials() {
61
+ return _credentials;
62
+ },
63
+ };
64
+ };
65
+ const resolveHttpAuthRuntimeConfig = (config) => {
66
+ return {
67
+ httpAuthSchemes: config.httpAuthSchemes(),
68
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
69
+ credentials: config.credentials(),
70
+ };
63
71
  };
64
72
 
65
- // src/MarketplaceReportingClient.ts
66
- var import_runtimeConfig = require("././runtimeConfig");
73
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
74
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
75
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
76
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
77
+ };
67
78
 
68
- // src/runtimeExtensions.ts
69
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
70
- var import_protocol_http = require("@smithy/protocol-http");
71
- var import_smithy_client = require("@smithy/smithy-client");
79
+ class MarketplaceReportingClient extends smithyClient.Client {
80
+ config;
81
+ constructor(...[configuration]) {
82
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
83
+ super(_config_0);
84
+ this.initConfig = _config_0;
85
+ const _config_1 = resolveClientEndpointParameters(_config_0);
86
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
87
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
88
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
89
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
90
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
91
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
+ this.config = _config_8;
94
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
97
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
98
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
99
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
100
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
101
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultMarketplaceReportingHttpAuthSchemeParametersProvider,
102
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
103
+ "aws.auth#sigv4": config.credentials,
104
+ }),
105
+ }));
106
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
107
+ }
108
+ destroy() {
109
+ super.destroy();
110
+ }
111
+ }
72
112
 
73
- // src/auth/httpAuthExtensionConfiguration.ts
74
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
75
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
76
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
77
- let _credentials = runtimeConfig.credentials;
78
- return {
79
- setHttpAuthScheme(httpAuthScheme) {
80
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
81
- if (index === -1) {
82
- _httpAuthSchemes.push(httpAuthScheme);
83
- } else {
84
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
85
- }
86
- },
87
- httpAuthSchemes() {
88
- return _httpAuthSchemes;
89
- },
90
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
91
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
92
- },
93
- httpAuthSchemeProvider() {
94
- return _httpAuthSchemeProvider;
95
- },
96
- setCredentials(credentials) {
97
- _credentials = credentials;
98
- },
99
- credentials() {
100
- return _credentials;
113
+ class MarketplaceReportingServiceException extends smithyClient.ServiceException {
114
+ constructor(options) {
115
+ super(options);
116
+ Object.setPrototypeOf(this, MarketplaceReportingServiceException.prototype);
101
117
  }
102
- };
103
- }, "getHttpAuthExtensionConfiguration");
104
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
105
- return {
106
- httpAuthSchemes: config.httpAuthSchemes(),
107
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
108
- credentials: config.credentials()
109
- };
110
- }, "resolveHttpAuthRuntimeConfig");
118
+ }
111
119
 
112
- // src/runtimeExtensions.ts
113
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
114
- const extensionConfiguration = Object.assign(
115
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
116
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
117
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
118
- getHttpAuthExtensionConfiguration(runtimeConfig)
119
- );
120
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
121
- return Object.assign(
122
- runtimeConfig,
123
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
124
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
125
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
126
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
127
- );
128
- }, "resolveRuntimeExtensions");
120
+ class AccessDeniedException extends MarketplaceReportingServiceException {
121
+ name = "AccessDeniedException";
122
+ $fault = "client";
123
+ constructor(opts) {
124
+ super({
125
+ name: "AccessDeniedException",
126
+ $fault: "client",
127
+ ...opts,
128
+ });
129
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
130
+ }
131
+ }
132
+ class BadRequestException extends MarketplaceReportingServiceException {
133
+ name = "BadRequestException";
134
+ $fault = "client";
135
+ constructor(opts) {
136
+ super({
137
+ name: "BadRequestException",
138
+ $fault: "client",
139
+ ...opts,
140
+ });
141
+ Object.setPrototypeOf(this, BadRequestException.prototype);
142
+ }
143
+ }
144
+ class InternalServerException extends MarketplaceReportingServiceException {
145
+ name = "InternalServerException";
146
+ $fault = "server";
147
+ constructor(opts) {
148
+ super({
149
+ name: "InternalServerException",
150
+ $fault: "server",
151
+ ...opts,
152
+ });
153
+ Object.setPrototypeOf(this, InternalServerException.prototype);
154
+ }
155
+ }
156
+ class UnauthorizedException extends MarketplaceReportingServiceException {
157
+ name = "UnauthorizedException";
158
+ $fault = "client";
159
+ constructor(opts) {
160
+ super({
161
+ name: "UnauthorizedException",
162
+ $fault: "client",
163
+ ...opts,
164
+ });
165
+ Object.setPrototypeOf(this, UnauthorizedException.prototype);
166
+ }
167
+ }
129
168
 
130
- // src/MarketplaceReportingClient.ts
131
- var MarketplaceReportingClient = class extends import_smithy_client.Client {
132
- static {
133
- __name(this, "MarketplaceReportingClient");
134
- }
135
- /**
136
- * The resolved configuration of MarketplaceReportingClient class. This is resolved and normalized from the {@link MarketplaceReportingClientConfig | constructor configuration interface}.
137
- */
138
- config;
139
- constructor(...[configuration]) {
140
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
141
- super(_config_0);
142
- this.initConfig = _config_0;
143
- const _config_1 = resolveClientEndpointParameters(_config_0);
144
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
145
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
146
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
147
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
148
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
149
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
150
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
151
- this.config = _config_8;
152
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
153
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
154
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
155
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
156
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
157
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
158
- this.middlewareStack.use(
159
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
160
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultMarketplaceReportingHttpAuthSchemeParametersProvider,
161
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
162
- "aws.auth#sigv4": config.credentials
163
- }), "identityProviderConfigProvider")
164
- })
165
- );
166
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
167
- }
168
- /**
169
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
170
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
171
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
172
- */
173
- destroy() {
174
- super.destroy();
175
- }
169
+ const se_GetBuyerDashboardCommand = async (input, context) => {
170
+ const b = core.requestBuilder(input, context);
171
+ const headers = {
172
+ "content-type": "application/json",
173
+ };
174
+ b.bp("/getBuyerDashboard");
175
+ let body;
176
+ body = JSON.stringify(smithyClient.take(input, {
177
+ dashboardIdentifier: [],
178
+ embeddingDomains: (_) => smithyClient._json(_),
179
+ }));
180
+ b.m("POST").h(headers).b(body);
181
+ return b.build();
176
182
  };
177
-
178
- // src/MarketplaceReporting.ts
179
-
180
-
181
- // src/commands/GetBuyerDashboardCommand.ts
182
-
183
- var import_middleware_serde = require("@smithy/middleware-serde");
184
-
185
-
186
- // src/protocols/Aws_restJson1.ts
187
- var import_core2 = require("@aws-sdk/core");
188
-
189
-
190
-
191
- // src/models/MarketplaceReportingServiceException.ts
192
-
193
- var MarketplaceReportingServiceException = class _MarketplaceReportingServiceException extends import_smithy_client.ServiceException {
194
- static {
195
- __name(this, "MarketplaceReportingServiceException");
196
- }
197
- /**
198
- * @internal
199
- */
200
- constructor(options) {
201
- super(options);
202
- Object.setPrototypeOf(this, _MarketplaceReportingServiceException.prototype);
203
- }
183
+ const de_GetBuyerDashboardCommand = async (output, context) => {
184
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
185
+ return de_CommandError(output, context);
186
+ }
187
+ const contents = smithyClient.map({
188
+ $metadata: deserializeMetadata(output),
189
+ });
190
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
191
+ const doc = smithyClient.take(data, {
192
+ dashboardIdentifier: smithyClient.expectString,
193
+ embedUrl: smithyClient.expectString,
194
+ embeddingDomains: smithyClient._json,
195
+ });
196
+ Object.assign(contents, doc);
197
+ return contents;
204
198
  };
205
-
206
- // src/models/models_0.ts
207
- var AccessDeniedException = class _AccessDeniedException extends MarketplaceReportingServiceException {
208
- static {
209
- __name(this, "AccessDeniedException");
210
- }
211
- name = "AccessDeniedException";
212
- $fault = "client";
213
- /**
214
- * @internal
215
- */
216
- constructor(opts) {
217
- super({
218
- name: "AccessDeniedException",
219
- $fault: "client",
220
- ...opts
199
+ const de_CommandError = async (output, context) => {
200
+ const parsedOutput = {
201
+ ...output,
202
+ body: await core$1.parseJsonErrorBody(output.body, context),
203
+ };
204
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
205
+ switch (errorCode) {
206
+ case "AccessDeniedException":
207
+ case "com.amazonaws.marketplacereporting#AccessDeniedException":
208
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
209
+ case "BadRequestException":
210
+ case "com.amazonaws.marketplacereporting#BadRequestException":
211
+ throw await de_BadRequestExceptionRes(parsedOutput);
212
+ case "InternalServerException":
213
+ case "com.amazonaws.marketplacereporting#InternalServerException":
214
+ throw await de_InternalServerExceptionRes(parsedOutput);
215
+ case "UnauthorizedException":
216
+ case "com.amazonaws.marketplacereporting#UnauthorizedException":
217
+ throw await de_UnauthorizedExceptionRes(parsedOutput);
218
+ default:
219
+ const parsedBody = parsedOutput.body;
220
+ return throwDefaultError({
221
+ output,
222
+ parsedBody,
223
+ errorCode,
224
+ });
225
+ }
226
+ };
227
+ const throwDefaultError = smithyClient.withBaseException(MarketplaceReportingServiceException);
228
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
229
+ const contents = smithyClient.map({});
230
+ const data = parsedOutput.body;
231
+ const doc = smithyClient.take(data, {
232
+ message: smithyClient.expectString,
221
233
  });
222
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
223
- }
234
+ Object.assign(contents, doc);
235
+ const exception = new AccessDeniedException({
236
+ $metadata: deserializeMetadata(parsedOutput),
237
+ ...contents,
238
+ });
239
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
224
240
  };
225
- var BadRequestException = class _BadRequestException extends MarketplaceReportingServiceException {
226
- static {
227
- __name(this, "BadRequestException");
228
- }
229
- name = "BadRequestException";
230
- $fault = "client";
231
- /**
232
- * @internal
233
- */
234
- constructor(opts) {
235
- super({
236
- name: "BadRequestException",
237
- $fault: "client",
238
- ...opts
241
+ const de_BadRequestExceptionRes = async (parsedOutput, context) => {
242
+ const contents = smithyClient.map({});
243
+ const data = parsedOutput.body;
244
+ const doc = smithyClient.take(data, {
245
+ message: smithyClient.expectString,
246
+ });
247
+ Object.assign(contents, doc);
248
+ const exception = new BadRequestException({
249
+ $metadata: deserializeMetadata(parsedOutput),
250
+ ...contents,
239
251
  });
240
- Object.setPrototypeOf(this, _BadRequestException.prototype);
241
- }
252
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
242
253
  };
243
- var InternalServerException = class _InternalServerException extends MarketplaceReportingServiceException {
244
- static {
245
- __name(this, "InternalServerException");
246
- }
247
- name = "InternalServerException";
248
- $fault = "server";
249
- /**
250
- * @internal
251
- */
252
- constructor(opts) {
253
- super({
254
- name: "InternalServerException",
255
- $fault: "server",
256
- ...opts
254
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
255
+ const contents = smithyClient.map({});
256
+ const data = parsedOutput.body;
257
+ const doc = smithyClient.take(data, {
258
+ message: smithyClient.expectString,
259
+ });
260
+ Object.assign(contents, doc);
261
+ const exception = new InternalServerException({
262
+ $metadata: deserializeMetadata(parsedOutput),
263
+ ...contents,
257
264
  });
258
- Object.setPrototypeOf(this, _InternalServerException.prototype);
259
- }
265
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
260
266
  };
261
- var UnauthorizedException = class _UnauthorizedException extends MarketplaceReportingServiceException {
262
- static {
263
- __name(this, "UnauthorizedException");
264
- }
265
- name = "UnauthorizedException";
266
- $fault = "client";
267
- /**
268
- * @internal
269
- */
270
- constructor(opts) {
271
- super({
272
- name: "UnauthorizedException",
273
- $fault: "client",
274
- ...opts
267
+ const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
268
+ const contents = smithyClient.map({});
269
+ const data = parsedOutput.body;
270
+ const doc = smithyClient.take(data, {
271
+ message: smithyClient.expectString,
275
272
  });
276
- Object.setPrototypeOf(this, _UnauthorizedException.prototype);
277
- }
273
+ Object.assign(contents, doc);
274
+ const exception = new UnauthorizedException({
275
+ $metadata: deserializeMetadata(parsedOutput),
276
+ ...contents,
277
+ });
278
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
278
279
  };
280
+ const deserializeMetadata = (output) => ({
281
+ httpStatusCode: output.statusCode,
282
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
283
+ extendedRequestId: output.headers["x-amz-id-2"],
284
+ cfId: output.headers["x-amz-cf-id"],
285
+ });
279
286
 
280
- // src/protocols/Aws_restJson1.ts
281
- var se_GetBuyerDashboardCommand = /* @__PURE__ */ __name(async (input, context) => {
282
- const b = (0, import_core.requestBuilder)(input, context);
283
- const headers = {
284
- "content-type": "application/json"
285
- };
286
- b.bp("/getBuyerDashboard");
287
- let body;
288
- body = JSON.stringify(
289
- (0, import_smithy_client.take)(input, {
290
- dashboardIdentifier: [],
291
- embeddingDomains: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "embeddingDomains")
292
- })
293
- );
294
- b.m("POST").h(headers).b(body);
295
- return b.build();
296
- }, "se_GetBuyerDashboardCommand");
297
- var de_GetBuyerDashboardCommand = /* @__PURE__ */ __name(async (output, context) => {
298
- if (output.statusCode !== 200 && output.statusCode >= 300) {
299
- return de_CommandError(output, context);
300
- }
301
- const contents = (0, import_smithy_client.map)({
302
- $metadata: deserializeMetadata(output)
303
- });
304
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
305
- const doc = (0, import_smithy_client.take)(data, {
306
- dashboardIdentifier: import_smithy_client.expectString,
307
- embedUrl: import_smithy_client.expectString,
308
- embeddingDomains: import_smithy_client._json
309
- });
310
- Object.assign(contents, doc);
311
- return contents;
312
- }, "de_GetBuyerDashboardCommand");
313
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
314
- const parsedOutput = {
315
- ...output,
316
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
317
- };
318
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
319
- switch (errorCode) {
320
- case "AccessDeniedException":
321
- case "com.amazonaws.marketplacereporting#AccessDeniedException":
322
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
323
- case "BadRequestException":
324
- case "com.amazonaws.marketplacereporting#BadRequestException":
325
- throw await de_BadRequestExceptionRes(parsedOutput, context);
326
- case "InternalServerException":
327
- case "com.amazonaws.marketplacereporting#InternalServerException":
328
- throw await de_InternalServerExceptionRes(parsedOutput, context);
329
- case "UnauthorizedException":
330
- case "com.amazonaws.marketplacereporting#UnauthorizedException":
331
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
332
- default:
333
- const parsedBody = parsedOutput.body;
334
- return throwDefaultError({
335
- output,
336
- parsedBody,
337
- errorCode
338
- });
339
- }
340
- }, "de_CommandError");
341
- var throwDefaultError = (0, import_smithy_client.withBaseException)(MarketplaceReportingServiceException);
342
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
343
- const contents = (0, import_smithy_client.map)({});
344
- const data = parsedOutput.body;
345
- const doc = (0, import_smithy_client.take)(data, {
346
- message: import_smithy_client.expectString
347
- });
348
- Object.assign(contents, doc);
349
- const exception = new AccessDeniedException({
350
- $metadata: deserializeMetadata(parsedOutput),
351
- ...contents
352
- });
353
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
354
- }, "de_AccessDeniedExceptionRes");
355
- var de_BadRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
356
- const contents = (0, import_smithy_client.map)({});
357
- const data = parsedOutput.body;
358
- const doc = (0, import_smithy_client.take)(data, {
359
- message: import_smithy_client.expectString
360
- });
361
- Object.assign(contents, doc);
362
- const exception = new BadRequestException({
363
- $metadata: deserializeMetadata(parsedOutput),
364
- ...contents
365
- });
366
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
367
- }, "de_BadRequestExceptionRes");
368
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
369
- const contents = (0, import_smithy_client.map)({});
370
- const data = parsedOutput.body;
371
- const doc = (0, import_smithy_client.take)(data, {
372
- message: import_smithy_client.expectString
373
- });
374
- Object.assign(contents, doc);
375
- const exception = new InternalServerException({
376
- $metadata: deserializeMetadata(parsedOutput),
377
- ...contents
378
- });
379
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
380
- }, "de_InternalServerExceptionRes");
381
- var de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
382
- const contents = (0, import_smithy_client.map)({});
383
- const data = parsedOutput.body;
384
- const doc = (0, import_smithy_client.take)(data, {
385
- message: import_smithy_client.expectString
386
- });
387
- Object.assign(contents, doc);
388
- const exception = new UnauthorizedException({
389
- $metadata: deserializeMetadata(parsedOutput),
390
- ...contents
391
- });
392
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
393
- }, "de_UnauthorizedExceptionRes");
394
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
395
- httpStatusCode: output.statusCode,
396
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
397
- extendedRequestId: output.headers["x-amz-id-2"],
398
- cfId: output.headers["x-amz-cf-id"]
399
- }), "deserializeMetadata");
400
-
401
- // src/commands/GetBuyerDashboardCommand.ts
402
- var GetBuyerDashboardCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
403
- return [
404
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
405
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
406
- ];
407
- }).s("AWSMarketplaceReporting", "GetBuyerDashboard", {}).n("MarketplaceReportingClient", "GetBuyerDashboardCommand").f(void 0, void 0).ser(se_GetBuyerDashboardCommand).de(de_GetBuyerDashboardCommand).build() {
408
- static {
409
- __name(this, "GetBuyerDashboardCommand");
410
- }
411
- };
287
+ class GetBuyerDashboardCommand extends smithyClient.Command
288
+ .classBuilder()
289
+ .ep(commonParams)
290
+ .m(function (Command, cs, config, o) {
291
+ return [
292
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
293
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
294
+ ];
295
+ })
296
+ .s("AWSMarketplaceReporting", "GetBuyerDashboard", {})
297
+ .n("MarketplaceReportingClient", "GetBuyerDashboardCommand")
298
+ .f(void 0, void 0)
299
+ .ser(se_GetBuyerDashboardCommand)
300
+ .de(de_GetBuyerDashboardCommand)
301
+ .build() {
302
+ }
412
303
 
413
- // src/MarketplaceReporting.ts
414
- var commands = {
415
- GetBuyerDashboardCommand
416
- };
417
- var MarketplaceReporting = class extends MarketplaceReportingClient {
418
- static {
419
- __name(this, "MarketplaceReporting");
420
- }
304
+ const commands = {
305
+ GetBuyerDashboardCommand,
421
306
  };
422
- (0, import_smithy_client.createAggregatedClient)(commands, MarketplaceReporting);
423
- // Annotate the CommonJS export names for ESM import in node:
307
+ class MarketplaceReporting extends MarketplaceReportingClient {
308
+ }
309
+ smithyClient.createAggregatedClient(commands, MarketplaceReporting);
424
310
 
425
- 0 && (module.exports = {
426
- MarketplaceReportingServiceException,
427
- __Client,
428
- MarketplaceReportingClient,
429
- MarketplaceReporting,
430
- $Command,
431
- GetBuyerDashboardCommand,
432
- AccessDeniedException,
433
- BadRequestException,
434
- InternalServerException,
435
- UnauthorizedException
311
+ Object.defineProperty(exports, "$Command", {
312
+ enumerable: true,
313
+ get: function () { return smithyClient.Command; }
436
314
  });
437
-
315
+ Object.defineProperty(exports, "__Client", {
316
+ enumerable: true,
317
+ get: function () { return smithyClient.Client; }
318
+ });
319
+ exports.AccessDeniedException = AccessDeniedException;
320
+ exports.BadRequestException = BadRequestException;
321
+ exports.GetBuyerDashboardCommand = GetBuyerDashboardCommand;
322
+ exports.InternalServerException = InternalServerException;
323
+ exports.MarketplaceReporting = MarketplaceReporting;
324
+ exports.MarketplaceReportingClient = MarketplaceReportingClient;
325
+ exports.MarketplaceReportingServiceException = MarketplaceReportingServiceException;
326
+ exports.UnauthorizedException = UnauthorizedException;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-marketplace-reporting",
3
3
  "description": "AWS SDK for JavaScript Marketplace Reporting Client for Node.js, Browser and React Native",
4
- "version": "3.899.0",
4
+ "version": "3.906.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-marketplace-reporting",
@@ -20,42 +20,42 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.899.0",
24
- "@aws-sdk/credential-provider-node": "3.899.0",
25
- "@aws-sdk/middleware-host-header": "3.893.0",
26
- "@aws-sdk/middleware-logger": "3.893.0",
27
- "@aws-sdk/middleware-recursion-detection": "3.893.0",
28
- "@aws-sdk/middleware-user-agent": "3.899.0",
29
- "@aws-sdk/region-config-resolver": "3.893.0",
30
- "@aws-sdk/types": "3.893.0",
31
- "@aws-sdk/util-endpoints": "3.895.0",
32
- "@aws-sdk/util-user-agent-browser": "3.893.0",
33
- "@aws-sdk/util-user-agent-node": "3.899.0",
34
- "@smithy/config-resolver": "^4.2.2",
35
- "@smithy/core": "^3.13.0",
36
- "@smithy/fetch-http-handler": "^5.2.1",
37
- "@smithy/hash-node": "^4.1.1",
38
- "@smithy/invalid-dependency": "^4.1.1",
39
- "@smithy/middleware-content-length": "^4.1.1",
40
- "@smithy/middleware-endpoint": "^4.2.5",
41
- "@smithy/middleware-retry": "^4.3.1",
42
- "@smithy/middleware-serde": "^4.1.1",
43
- "@smithy/middleware-stack": "^4.1.1",
44
- "@smithy/node-config-provider": "^4.2.2",
45
- "@smithy/node-http-handler": "^4.2.1",
46
- "@smithy/protocol-http": "^5.2.1",
47
- "@smithy/smithy-client": "^4.6.5",
48
- "@smithy/types": "^4.5.0",
49
- "@smithy/url-parser": "^4.1.1",
50
- "@smithy/util-base64": "^4.1.0",
51
- "@smithy/util-body-length-browser": "^4.1.0",
52
- "@smithy/util-body-length-node": "^4.1.0",
53
- "@smithy/util-defaults-mode-browser": "^4.1.5",
54
- "@smithy/util-defaults-mode-node": "^4.1.5",
55
- "@smithy/util-endpoints": "^3.1.2",
56
- "@smithy/util-middleware": "^4.1.1",
57
- "@smithy/util-retry": "^4.1.2",
58
- "@smithy/util-utf8": "^4.1.0",
23
+ "@aws-sdk/core": "3.906.0",
24
+ "@aws-sdk/credential-provider-node": "3.906.0",
25
+ "@aws-sdk/middleware-host-header": "3.901.0",
26
+ "@aws-sdk/middleware-logger": "3.901.0",
27
+ "@aws-sdk/middleware-recursion-detection": "3.901.0",
28
+ "@aws-sdk/middleware-user-agent": "3.906.0",
29
+ "@aws-sdk/region-config-resolver": "3.901.0",
30
+ "@aws-sdk/types": "3.901.0",
31
+ "@aws-sdk/util-endpoints": "3.901.0",
32
+ "@aws-sdk/util-user-agent-browser": "3.901.0",
33
+ "@aws-sdk/util-user-agent-node": "3.906.0",
34
+ "@smithy/config-resolver": "^4.3.0",
35
+ "@smithy/core": "^3.14.0",
36
+ "@smithy/fetch-http-handler": "^5.3.0",
37
+ "@smithy/hash-node": "^4.2.0",
38
+ "@smithy/invalid-dependency": "^4.2.0",
39
+ "@smithy/middleware-content-length": "^4.2.0",
40
+ "@smithy/middleware-endpoint": "^4.3.0",
41
+ "@smithy/middleware-retry": "^4.4.0",
42
+ "@smithy/middleware-serde": "^4.2.0",
43
+ "@smithy/middleware-stack": "^4.2.0",
44
+ "@smithy/node-config-provider": "^4.3.0",
45
+ "@smithy/node-http-handler": "^4.3.0",
46
+ "@smithy/protocol-http": "^5.3.0",
47
+ "@smithy/smithy-client": "^4.7.0",
48
+ "@smithy/types": "^4.6.0",
49
+ "@smithy/url-parser": "^4.2.0",
50
+ "@smithy/util-base64": "^4.2.0",
51
+ "@smithy/util-body-length-browser": "^4.2.0",
52
+ "@smithy/util-body-length-node": "^4.2.0",
53
+ "@smithy/util-defaults-mode-browser": "^4.2.0",
54
+ "@smithy/util-defaults-mode-node": "^4.2.0",
55
+ "@smithy/util-endpoints": "^3.2.0",
56
+ "@smithy/util-middleware": "^4.2.0",
57
+ "@smithy/util-retry": "^4.2.0",
58
+ "@smithy/util-utf8": "^4.2.0",
59
59
  "tslib": "^2.6.2"
60
60
  },
61
61
  "devDependencies": {