@aws-sdk/client-marketplace-reporting 3.893.0 → 3.894.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +436 -9
- package/package.json +6 -6
- package/dist-cjs/MarketplaceReporting.js +0 -13
- package/dist-cjs/MarketplaceReportingClient.js +0 -52
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -43
- package/dist-cjs/commands/GetBuyerDashboardCommand.js +0 -26
- package/dist-cjs/commands/index.js +0 -4
- package/dist-cjs/endpoint/EndpointParameters.js +0 -17
- package/dist-cjs/extensionConfiguration.js +0 -2
- package/dist-cjs/models/MarketplaceReportingServiceException.js +0 -12
- package/dist-cjs/models/index.js +0 -4
- package/dist-cjs/models/models_0.js +0 -56
- package/dist-cjs/protocols/Aws_restJson1.js +0 -128
- package/dist-cjs/runtimeExtensions.js +0 -13
package/dist-cjs/index.js
CHANGED
|
@@ -1,10 +1,437 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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);
|
|
36
|
+
|
|
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");
|
|
47
|
+
|
|
48
|
+
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
49
|
+
|
|
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" }
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// src/MarketplaceReportingClient.ts
|
|
66
|
+
var import_runtimeConfig = require("././runtimeConfig");
|
|
67
|
+
|
|
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");
|
|
72
|
+
|
|
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;
|
|
101
|
+
}
|
|
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");
|
|
111
|
+
|
|
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");
|
|
129
|
+
|
|
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
|
+
}
|
|
176
|
+
};
|
|
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
|
+
}
|
|
204
|
+
};
|
|
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
|
|
221
|
+
});
|
|
222
|
+
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
|
|
223
|
+
}
|
|
224
|
+
};
|
|
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
|
|
239
|
+
});
|
|
240
|
+
Object.setPrototypeOf(this, _BadRequestException.prototype);
|
|
241
|
+
}
|
|
242
|
+
};
|
|
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
|
|
257
|
+
});
|
|
258
|
+
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
259
|
+
}
|
|
260
|
+
};
|
|
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
|
|
275
|
+
});
|
|
276
|
+
Object.setPrototypeOf(this, _UnauthorizedException.prototype);
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
|
|
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
|
+
};
|
|
412
|
+
|
|
413
|
+
// src/MarketplaceReporting.ts
|
|
414
|
+
var commands = {
|
|
415
|
+
GetBuyerDashboardCommand
|
|
416
|
+
};
|
|
417
|
+
var MarketplaceReporting = class extends MarketplaceReportingClient {
|
|
418
|
+
static {
|
|
419
|
+
__name(this, "MarketplaceReporting");
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
(0, import_smithy_client.createAggregatedClient)(commands, MarketplaceReporting);
|
|
423
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
424
|
+
|
|
425
|
+
0 && (module.exports = {
|
|
426
|
+
MarketplaceReportingServiceException,
|
|
427
|
+
__Client,
|
|
428
|
+
MarketplaceReportingClient,
|
|
429
|
+
MarketplaceReporting,
|
|
430
|
+
$Command,
|
|
431
|
+
GetBuyerDashboardCommand,
|
|
432
|
+
AccessDeniedException,
|
|
433
|
+
BadRequestException,
|
|
434
|
+
InternalServerException,
|
|
435
|
+
UnauthorizedException
|
|
436
|
+
});
|
|
437
|
+
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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.
|
|
4
|
+
"version": "3.894.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
|
-
"build:cjs": "
|
|
7
|
+
"build:cjs": "node ../../scripts/compilation/inline client-marketplace-reporting",
|
|
8
8
|
"build:es": "tsc -p tsconfig.es.json",
|
|
9
9
|
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
10
10
|
"build:types": "tsc -p tsconfig.types.json",
|
|
@@ -20,17 +20,17 @@
|
|
|
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.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/core": "3.894.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.894.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.893.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.893.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.893.0",
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.894.0",
|
|
29
29
|
"@aws-sdk/region-config-resolver": "3.893.0",
|
|
30
30
|
"@aws-sdk/types": "3.893.0",
|
|
31
31
|
"@aws-sdk/util-endpoints": "3.893.0",
|
|
32
32
|
"@aws-sdk/util-user-agent-browser": "3.893.0",
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.894.0",
|
|
34
34
|
"@smithy/config-resolver": "^4.2.2",
|
|
35
35
|
"@smithy/core": "^3.11.1",
|
|
36
36
|
"@smithy/fetch-http-handler": "^5.2.1",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MarketplaceReporting = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
const GetBuyerDashboardCommand_1 = require("./commands/GetBuyerDashboardCommand");
|
|
6
|
-
const MarketplaceReportingClient_1 = require("./MarketplaceReportingClient");
|
|
7
|
-
const commands = {
|
|
8
|
-
GetBuyerDashboardCommand: GetBuyerDashboardCommand_1.GetBuyerDashboardCommand,
|
|
9
|
-
};
|
|
10
|
-
class MarketplaceReporting extends MarketplaceReportingClient_1.MarketplaceReportingClient {
|
|
11
|
-
}
|
|
12
|
-
exports.MarketplaceReporting = MarketplaceReporting;
|
|
13
|
-
(0, smithy_client_1.createAggregatedClient)(commands, MarketplaceReporting);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MarketplaceReportingClient = exports.__Client = void 0;
|
|
4
|
-
const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
|
|
5
|
-
const middleware_logger_1 = require("@aws-sdk/middleware-logger");
|
|
6
|
-
const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
|
|
7
|
-
const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
|
|
8
|
-
const config_resolver_1 = require("@smithy/config-resolver");
|
|
9
|
-
const core_1 = require("@smithy/core");
|
|
10
|
-
const middleware_content_length_1 = require("@smithy/middleware-content-length");
|
|
11
|
-
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
12
|
-
const middleware_retry_1 = require("@smithy/middleware-retry");
|
|
13
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
14
|
-
Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
|
|
15
|
-
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
|
16
|
-
const EndpointParameters_1 = require("./endpoint/EndpointParameters");
|
|
17
|
-
const runtimeConfig_1 = require("./runtimeConfig");
|
|
18
|
-
const runtimeExtensions_1 = require("./runtimeExtensions");
|
|
19
|
-
class MarketplaceReportingClient extends smithy_client_1.Client {
|
|
20
|
-
config;
|
|
21
|
-
constructor(...[configuration]) {
|
|
22
|
-
const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
|
|
23
|
-
super(_config_0);
|
|
24
|
-
this.initConfig = _config_0;
|
|
25
|
-
const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
|
|
26
|
-
const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);
|
|
27
|
-
const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);
|
|
28
|
-
const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);
|
|
29
|
-
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
|
|
30
|
-
const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);
|
|
31
|
-
const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
|
|
32
|
-
const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
|
|
33
|
-
this.config = _config_8;
|
|
34
|
-
this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
|
|
35
|
-
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
|
|
36
|
-
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
|
|
37
|
-
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
|
|
38
|
-
this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
|
|
39
|
-
this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
|
|
40
|
-
this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
41
|
-
httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultMarketplaceReportingHttpAuthSchemeParametersProvider,
|
|
42
|
-
identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
|
|
43
|
-
"aws.auth#sigv4": config.credentials,
|
|
44
|
-
}),
|
|
45
|
-
}));
|
|
46
|
-
this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
|
|
47
|
-
}
|
|
48
|
-
destroy() {
|
|
49
|
-
super.destroy();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.MarketplaceReportingClient = MarketplaceReportingClient;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;
|
|
4
|
-
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
5
|
-
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
6
|
-
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
7
|
-
let _credentials = runtimeConfig.credentials;
|
|
8
|
-
return {
|
|
9
|
-
setHttpAuthScheme(httpAuthScheme) {
|
|
10
|
-
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
11
|
-
if (index === -1) {
|
|
12
|
-
_httpAuthSchemes.push(httpAuthScheme);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
httpAuthSchemes() {
|
|
19
|
-
return _httpAuthSchemes;
|
|
20
|
-
},
|
|
21
|
-
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
22
|
-
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
23
|
-
},
|
|
24
|
-
httpAuthSchemeProvider() {
|
|
25
|
-
return _httpAuthSchemeProvider;
|
|
26
|
-
},
|
|
27
|
-
setCredentials(credentials) {
|
|
28
|
-
_credentials = credentials;
|
|
29
|
-
},
|
|
30
|
-
credentials() {
|
|
31
|
-
return _credentials;
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
|
|
36
|
-
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
37
|
-
return {
|
|
38
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
39
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
40
|
-
credentials: config.credentials(),
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetBuyerDashboardCommand = exports.$Command = void 0;
|
|
4
|
-
const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
|
|
5
|
-
const middleware_serde_1 = require("@smithy/middleware-serde");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
|
|
8
|
-
const EndpointParameters_1 = require("../endpoint/EndpointParameters");
|
|
9
|
-
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
10
|
-
class GetBuyerDashboardCommand extends smithy_client_1.Command
|
|
11
|
-
.classBuilder()
|
|
12
|
-
.ep(EndpointParameters_1.commonParams)
|
|
13
|
-
.m(function (Command, cs, config, o) {
|
|
14
|
-
return [
|
|
15
|
-
(0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
16
|
-
(0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
|
|
17
|
-
];
|
|
18
|
-
})
|
|
19
|
-
.s("AWSMarketplaceReporting", "GetBuyerDashboard", {})
|
|
20
|
-
.n("MarketplaceReportingClient", "GetBuyerDashboardCommand")
|
|
21
|
-
.f(void 0, void 0)
|
|
22
|
-
.ser(Aws_restJson1_1.se_GetBuyerDashboardCommand)
|
|
23
|
-
.de(Aws_restJson1_1.de_GetBuyerDashboardCommand)
|
|
24
|
-
.build() {
|
|
25
|
-
}
|
|
26
|
-
exports.GetBuyerDashboardCommand = GetBuyerDashboardCommand;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.commonParams = exports.resolveClientEndpointParameters = void 0;
|
|
4
|
-
const resolveClientEndpointParameters = (options) => {
|
|
5
|
-
return Object.assign(options, {
|
|
6
|
-
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
7
|
-
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
8
|
-
defaultSigningName: "aws-marketplace",
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
|
|
12
|
-
exports.commonParams = {
|
|
13
|
-
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
-
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
-
Region: { type: "builtInParams", name: "region" },
|
|
16
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MarketplaceReportingServiceException = exports.__ServiceException = void 0;
|
|
4
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
-
class MarketplaceReportingServiceException extends smithy_client_1.ServiceException {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
Object.setPrototypeOf(this, MarketplaceReportingServiceException.prototype);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.MarketplaceReportingServiceException = MarketplaceReportingServiceException;
|
package/dist-cjs/models/index.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnauthorizedException = exports.InternalServerException = exports.BadRequestException = exports.AccessDeniedException = void 0;
|
|
4
|
-
const MarketplaceReportingServiceException_1 = require("./MarketplaceReportingServiceException");
|
|
5
|
-
class AccessDeniedException extends MarketplaceReportingServiceException_1.MarketplaceReportingServiceException {
|
|
6
|
-
name = "AccessDeniedException";
|
|
7
|
-
$fault = "client";
|
|
8
|
-
constructor(opts) {
|
|
9
|
-
super({
|
|
10
|
-
name: "AccessDeniedException",
|
|
11
|
-
$fault: "client",
|
|
12
|
-
...opts,
|
|
13
|
-
});
|
|
14
|
-
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.AccessDeniedException = AccessDeniedException;
|
|
18
|
-
class BadRequestException extends MarketplaceReportingServiceException_1.MarketplaceReportingServiceException {
|
|
19
|
-
name = "BadRequestException";
|
|
20
|
-
$fault = "client";
|
|
21
|
-
constructor(opts) {
|
|
22
|
-
super({
|
|
23
|
-
name: "BadRequestException",
|
|
24
|
-
$fault: "client",
|
|
25
|
-
...opts,
|
|
26
|
-
});
|
|
27
|
-
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.BadRequestException = BadRequestException;
|
|
31
|
-
class InternalServerException extends MarketplaceReportingServiceException_1.MarketplaceReportingServiceException {
|
|
32
|
-
name = "InternalServerException";
|
|
33
|
-
$fault = "server";
|
|
34
|
-
constructor(opts) {
|
|
35
|
-
super({
|
|
36
|
-
name: "InternalServerException",
|
|
37
|
-
$fault: "server",
|
|
38
|
-
...opts,
|
|
39
|
-
});
|
|
40
|
-
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.InternalServerException = InternalServerException;
|
|
44
|
-
class UnauthorizedException extends MarketplaceReportingServiceException_1.MarketplaceReportingServiceException {
|
|
45
|
-
name = "UnauthorizedException";
|
|
46
|
-
$fault = "client";
|
|
47
|
-
constructor(opts) {
|
|
48
|
-
super({
|
|
49
|
-
name: "UnauthorizedException",
|
|
50
|
-
$fault: "client",
|
|
51
|
-
...opts,
|
|
52
|
-
});
|
|
53
|
-
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.UnauthorizedException = UnauthorizedException;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_GetBuyerDashboardCommand = exports.se_GetBuyerDashboardCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const core_2 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const MarketplaceReportingServiceException_1 = require("../models/MarketplaceReportingServiceException");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const se_GetBuyerDashboardCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/getBuyerDashboard");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
dashboardIdentifier: [],
|
|
18
|
-
embeddingDomains: (_) => (0, smithy_client_1._json)(_),
|
|
19
|
-
}));
|
|
20
|
-
b.m("POST").h(headers).b(body);
|
|
21
|
-
return b.build();
|
|
22
|
-
};
|
|
23
|
-
exports.se_GetBuyerDashboardCommand = se_GetBuyerDashboardCommand;
|
|
24
|
-
const de_GetBuyerDashboardCommand = async (output, context) => {
|
|
25
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
26
|
-
return de_CommandError(output, context);
|
|
27
|
-
}
|
|
28
|
-
const contents = (0, smithy_client_1.map)({
|
|
29
|
-
$metadata: deserializeMetadata(output),
|
|
30
|
-
});
|
|
31
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
|
|
32
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
33
|
-
dashboardIdentifier: smithy_client_1.expectString,
|
|
34
|
-
embedUrl: smithy_client_1.expectString,
|
|
35
|
-
embeddingDomains: smithy_client_1._json,
|
|
36
|
-
});
|
|
37
|
-
Object.assign(contents, doc);
|
|
38
|
-
return contents;
|
|
39
|
-
};
|
|
40
|
-
exports.de_GetBuyerDashboardCommand = de_GetBuyerDashboardCommand;
|
|
41
|
-
const de_CommandError = async (output, context) => {
|
|
42
|
-
const parsedOutput = {
|
|
43
|
-
...output,
|
|
44
|
-
body: await (0, core_1.parseJsonErrorBody)(output.body, context),
|
|
45
|
-
};
|
|
46
|
-
const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
47
|
-
switch (errorCode) {
|
|
48
|
-
case "AccessDeniedException":
|
|
49
|
-
case "com.amazonaws.marketplacereporting#AccessDeniedException":
|
|
50
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
51
|
-
case "BadRequestException":
|
|
52
|
-
case "com.amazonaws.marketplacereporting#BadRequestException":
|
|
53
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
54
|
-
case "InternalServerException":
|
|
55
|
-
case "com.amazonaws.marketplacereporting#InternalServerException":
|
|
56
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
57
|
-
case "UnauthorizedException":
|
|
58
|
-
case "com.amazonaws.marketplacereporting#UnauthorizedException":
|
|
59
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
60
|
-
default:
|
|
61
|
-
const parsedBody = parsedOutput.body;
|
|
62
|
-
return throwDefaultError({
|
|
63
|
-
output,
|
|
64
|
-
parsedBody,
|
|
65
|
-
errorCode,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(MarketplaceReportingServiceException_1.MarketplaceReportingServiceException);
|
|
70
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
71
|
-
const contents = (0, smithy_client_1.map)({});
|
|
72
|
-
const data = parsedOutput.body;
|
|
73
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
74
|
-
message: smithy_client_1.expectString,
|
|
75
|
-
});
|
|
76
|
-
Object.assign(contents, doc);
|
|
77
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
78
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
79
|
-
...contents,
|
|
80
|
-
});
|
|
81
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
82
|
-
};
|
|
83
|
-
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
84
|
-
const contents = (0, smithy_client_1.map)({});
|
|
85
|
-
const data = parsedOutput.body;
|
|
86
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
87
|
-
message: smithy_client_1.expectString,
|
|
88
|
-
});
|
|
89
|
-
Object.assign(contents, doc);
|
|
90
|
-
const exception = new models_0_1.BadRequestException({
|
|
91
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
92
|
-
...contents,
|
|
93
|
-
});
|
|
94
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
95
|
-
};
|
|
96
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
97
|
-
const contents = (0, smithy_client_1.map)({});
|
|
98
|
-
const data = parsedOutput.body;
|
|
99
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
100
|
-
message: smithy_client_1.expectString,
|
|
101
|
-
});
|
|
102
|
-
Object.assign(contents, doc);
|
|
103
|
-
const exception = new models_0_1.InternalServerException({
|
|
104
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
105
|
-
...contents,
|
|
106
|
-
});
|
|
107
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
108
|
-
};
|
|
109
|
-
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
110
|
-
const contents = (0, smithy_client_1.map)({});
|
|
111
|
-
const data = parsedOutput.body;
|
|
112
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
113
|
-
message: smithy_client_1.expectString,
|
|
114
|
-
});
|
|
115
|
-
Object.assign(contents, doc);
|
|
116
|
-
const exception = new models_0_1.UnauthorizedException({
|
|
117
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
118
|
-
...contents,
|
|
119
|
-
});
|
|
120
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
121
|
-
};
|
|
122
|
-
const deserializeMetadata = (output) => ({
|
|
123
|
-
httpStatusCode: output.statusCode,
|
|
124
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
125
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
126
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
127
|
-
});
|
|
128
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
-
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
|
|
8
|
-
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
9
|
-
const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
|
|
10
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
11
|
-
return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
|
|
12
|
-
};
|
|
13
|
-
exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
|