@aws-sdk/client-marketplace-reporting 3.927.0 → 3.929.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 +106 -141
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/MarketplaceReportingClient.js +2 -0
- package/dist-es/commands/GetBuyerDashboardCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +91 -0
- package/dist-types/MarketplaceReportingClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +10 -0
- package/dist-types/ts3.4/MarketplaceReportingClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +14 -0
- package/package.json +5 -5
- package/dist-es/protocols/Aws_restJson1.js +0 -123
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -11
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -17
package/dist-cjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
|
|
|
6
6
|
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
7
7
|
var configResolver = require('@smithy/config-resolver');
|
|
8
8
|
var core = require('@smithy/core');
|
|
9
|
+
var schema = require('@smithy/core/schema');
|
|
9
10
|
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
10
11
|
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
11
12
|
var middlewareRetry = require('@smithy/middleware-retry');
|
|
@@ -14,8 +15,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
|
14
15
|
var runtimeConfig = require('./runtimeConfig');
|
|
15
16
|
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
16
17
|
var protocolHttp = require('@smithy/protocol-http');
|
|
17
|
-
var middlewareSerde = require('@smithy/middleware-serde');
|
|
18
|
-
var core$1 = require('@aws-sdk/core');
|
|
19
18
|
|
|
20
19
|
const resolveClientEndpointParameters = (options) => {
|
|
21
20
|
return Object.assign(options, {
|
|
@@ -91,6 +90,7 @@ class MarketplaceReportingClient extends smithyClient.Client {
|
|
|
91
90
|
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
92
91
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
93
92
|
this.config = _config_8;
|
|
93
|
+
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
94
94
|
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
95
95
|
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
96
96
|
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
@@ -110,14 +110,14 @@ class MarketplaceReportingClient extends smithyClient.Client {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
class MarketplaceReportingServiceException extends smithyClient.ServiceException {
|
|
113
|
+
let MarketplaceReportingServiceException$1 = class MarketplaceReportingServiceException extends smithyClient.ServiceException {
|
|
114
114
|
constructor(options) {
|
|
115
115
|
super(options);
|
|
116
116
|
Object.setPrototypeOf(this, MarketplaceReportingServiceException.prototype);
|
|
117
117
|
}
|
|
118
|
-
}
|
|
118
|
+
};
|
|
119
119
|
|
|
120
|
-
class AccessDeniedException extends MarketplaceReportingServiceException {
|
|
120
|
+
let AccessDeniedException$1 = class AccessDeniedException extends MarketplaceReportingServiceException$1 {
|
|
121
121
|
name = "AccessDeniedException";
|
|
122
122
|
$fault = "client";
|
|
123
123
|
constructor(opts) {
|
|
@@ -128,8 +128,8 @@ class AccessDeniedException extends MarketplaceReportingServiceException {
|
|
|
128
128
|
});
|
|
129
129
|
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
130
130
|
}
|
|
131
|
-
}
|
|
132
|
-
class BadRequestException extends MarketplaceReportingServiceException {
|
|
131
|
+
};
|
|
132
|
+
let BadRequestException$1 = class BadRequestException extends MarketplaceReportingServiceException$1 {
|
|
133
133
|
name = "BadRequestException";
|
|
134
134
|
$fault = "client";
|
|
135
135
|
constructor(opts) {
|
|
@@ -140,8 +140,8 @@ class BadRequestException extends MarketplaceReportingServiceException {
|
|
|
140
140
|
});
|
|
141
141
|
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
142
142
|
}
|
|
143
|
-
}
|
|
144
|
-
class InternalServerException extends MarketplaceReportingServiceException {
|
|
143
|
+
};
|
|
144
|
+
let InternalServerException$1 = class InternalServerException extends MarketplaceReportingServiceException$1 {
|
|
145
145
|
name = "InternalServerException";
|
|
146
146
|
$fault = "server";
|
|
147
147
|
constructor(opts) {
|
|
@@ -152,8 +152,8 @@ class InternalServerException extends MarketplaceReportingServiceException {
|
|
|
152
152
|
});
|
|
153
153
|
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
154
154
|
}
|
|
155
|
-
}
|
|
156
|
-
class UnauthorizedException extends MarketplaceReportingServiceException {
|
|
155
|
+
};
|
|
156
|
+
let UnauthorizedException$1 = class UnauthorizedException extends MarketplaceReportingServiceException$1 {
|
|
157
157
|
name = "UnauthorizedException";
|
|
158
158
|
$fault = "client";
|
|
159
159
|
constructor(opts) {
|
|
@@ -164,140 +164,105 @@ class UnauthorizedException extends MarketplaceReportingServiceException {
|
|
|
164
164
|
});
|
|
165
165
|
Object.setPrototypeOf(this, UnauthorizedException.prototype);
|
|
166
166
|
}
|
|
167
|
-
}
|
|
168
|
-
|
|
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();
|
|
182
|
-
};
|
|
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;
|
|
198
|
-
};
|
|
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,
|
|
233
|
-
});
|
|
234
|
-
Object.assign(contents, doc);
|
|
235
|
-
const exception = new AccessDeniedException({
|
|
236
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
237
|
-
...contents,
|
|
238
|
-
});
|
|
239
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
240
|
-
};
|
|
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,
|
|
251
|
-
});
|
|
252
|
-
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
253
167
|
};
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
168
|
+
|
|
169
|
+
const _ADE = "AccessDeniedException";
|
|
170
|
+
const _BRE = "BadRequestException";
|
|
171
|
+
const _GBD = "GetBuyerDashboard";
|
|
172
|
+
const _GBDI = "GetBuyerDashboardInput";
|
|
173
|
+
const _GBDO = "GetBuyerDashboardOutput";
|
|
174
|
+
const _ISE = "InternalServerException";
|
|
175
|
+
const _UE = "UnauthorizedException";
|
|
176
|
+
const _c = "client";
|
|
177
|
+
const _dI = "dashboardIdentifier";
|
|
178
|
+
const _e = "error";
|
|
179
|
+
const _eD = "embeddingDomains";
|
|
180
|
+
const _eU = "embedUrl";
|
|
181
|
+
const _h = "http";
|
|
182
|
+
const _hE = "httpError";
|
|
183
|
+
const _m = "message";
|
|
184
|
+
const _s = "server";
|
|
185
|
+
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.marketplacereporting";
|
|
186
|
+
const n0 = "com.amazonaws.marketplacereporting";
|
|
187
|
+
var AccessDeniedException = [
|
|
188
|
+
-3,
|
|
189
|
+
n0,
|
|
190
|
+
_ADE,
|
|
191
|
+
{
|
|
192
|
+
[_e]: _c,
|
|
193
|
+
[_hE]: 403,
|
|
194
|
+
},
|
|
195
|
+
[_m],
|
|
196
|
+
[0],
|
|
197
|
+
];
|
|
198
|
+
schema.TypeRegistry.for(n0).registerError(AccessDeniedException, AccessDeniedException$1);
|
|
199
|
+
var BadRequestException = [
|
|
200
|
+
-3,
|
|
201
|
+
n0,
|
|
202
|
+
_BRE,
|
|
203
|
+
{
|
|
204
|
+
[_e]: _c,
|
|
205
|
+
[_hE]: 400,
|
|
206
|
+
},
|
|
207
|
+
[_m],
|
|
208
|
+
[0],
|
|
209
|
+
];
|
|
210
|
+
schema.TypeRegistry.for(n0).registerError(BadRequestException, BadRequestException$1);
|
|
211
|
+
var GetBuyerDashboardInput = [3, n0, _GBDI, 0, [_dI, _eD], [0, 64 | 0]];
|
|
212
|
+
var GetBuyerDashboardOutput = [3, n0, _GBDO, 0, [_eU, _dI, _eD], [0, 0, 64 | 0]];
|
|
213
|
+
var InternalServerException = [
|
|
214
|
+
-3,
|
|
215
|
+
n0,
|
|
216
|
+
_ISE,
|
|
217
|
+
{
|
|
218
|
+
[_e]: _s,
|
|
219
|
+
[_hE]: 500,
|
|
220
|
+
},
|
|
221
|
+
[_m],
|
|
222
|
+
[0],
|
|
223
|
+
];
|
|
224
|
+
schema.TypeRegistry.for(n0).registerError(InternalServerException, InternalServerException$1);
|
|
225
|
+
var UnauthorizedException = [
|
|
226
|
+
-3,
|
|
227
|
+
n0,
|
|
228
|
+
_UE,
|
|
229
|
+
{
|
|
230
|
+
[_e]: _c,
|
|
231
|
+
[_hE]: 401,
|
|
232
|
+
},
|
|
233
|
+
[_m],
|
|
234
|
+
[0],
|
|
235
|
+
];
|
|
236
|
+
schema.TypeRegistry.for(n0).registerError(UnauthorizedException, UnauthorizedException$1);
|
|
237
|
+
var MarketplaceReportingServiceException = [
|
|
238
|
+
-3,
|
|
239
|
+
_sm,
|
|
240
|
+
"MarketplaceReportingServiceException",
|
|
241
|
+
0,
|
|
242
|
+
[],
|
|
243
|
+
[],
|
|
244
|
+
];
|
|
245
|
+
schema.TypeRegistry.for(_sm).registerError(MarketplaceReportingServiceException, MarketplaceReportingServiceException$1);
|
|
246
|
+
var GetBuyerDashboard = [
|
|
247
|
+
9,
|
|
248
|
+
n0,
|
|
249
|
+
_GBD,
|
|
250
|
+
{
|
|
251
|
+
[_h]: ["POST", "/getBuyerDashboard", 200],
|
|
252
|
+
},
|
|
253
|
+
() => GetBuyerDashboardInput,
|
|
254
|
+
() => GetBuyerDashboardOutput,
|
|
255
|
+
];
|
|
286
256
|
|
|
287
257
|
class GetBuyerDashboardCommand extends smithyClient.Command
|
|
288
258
|
.classBuilder()
|
|
289
259
|
.ep(commonParams)
|
|
290
260
|
.m(function (Command, cs, config, o) {
|
|
291
|
-
return [
|
|
292
|
-
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
293
|
-
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
294
|
-
];
|
|
261
|
+
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
295
262
|
})
|
|
296
263
|
.s("AWSMarketplaceReporting", "GetBuyerDashboard", {})
|
|
297
264
|
.n("MarketplaceReportingClient", "GetBuyerDashboardCommand")
|
|
298
|
-
.
|
|
299
|
-
.ser(se_GetBuyerDashboardCommand)
|
|
300
|
-
.de(de_GetBuyerDashboardCommand)
|
|
265
|
+
.sc(GetBuyerDashboard)
|
|
301
266
|
.build() {
|
|
302
267
|
}
|
|
303
268
|
|
|
@@ -316,11 +281,11 @@ Object.defineProperty(exports, "__Client", {
|
|
|
316
281
|
enumerable: true,
|
|
317
282
|
get: function () { return smithyClient.Client; }
|
|
318
283
|
});
|
|
319
|
-
exports.AccessDeniedException = AccessDeniedException;
|
|
320
|
-
exports.BadRequestException = BadRequestException;
|
|
284
|
+
exports.AccessDeniedException = AccessDeniedException$1;
|
|
285
|
+
exports.BadRequestException = BadRequestException$1;
|
|
321
286
|
exports.GetBuyerDashboardCommand = GetBuyerDashboardCommand;
|
|
322
|
-
exports.InternalServerException = InternalServerException;
|
|
287
|
+
exports.InternalServerException = InternalServerException$1;
|
|
323
288
|
exports.MarketplaceReporting = MarketplaceReporting;
|
|
324
289
|
exports.MarketplaceReportingClient = MarketplaceReportingClient;
|
|
325
|
-
exports.MarketplaceReportingServiceException = MarketplaceReportingServiceException;
|
|
326
|
-
exports.UnauthorizedException = UnauthorizedException;
|
|
290
|
+
exports.MarketplaceReportingServiceException = MarketplaceReportingServiceException$1;
|
|
291
|
+
exports.UnauthorizedException = UnauthorizedException$1;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const core_1 = require("@aws-sdk/core");
|
|
5
|
+
const protocols_1 = require("@aws-sdk/core/protocols");
|
|
5
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
7
|
const url_parser_1 = require("@smithy/url-parser");
|
|
7
8
|
const util_base64_1 = require("@smithy/util-base64");
|
|
@@ -25,6 +26,7 @@ const getRuntimeConfig = (config) => {
|
|
|
25
26
|
},
|
|
26
27
|
],
|
|
27
28
|
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
29
|
+
protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.marketplacereporting" }),
|
|
28
30
|
serviceId: config?.serviceId ?? "Marketplace Reporting",
|
|
29
31
|
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
30
32
|
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
@@ -4,6 +4,7 @@ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detec
|
|
|
4
4
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
5
5
|
import { resolveRegionConfig } from "@smithy/config-resolver";
|
|
6
6
|
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
|
|
7
|
+
import { getSchemaSerdePlugin } from "@smithy/core/schema";
|
|
7
8
|
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
|
|
8
9
|
import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
|
|
9
10
|
import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
|
|
@@ -28,6 +29,7 @@ export class MarketplaceReportingClient extends __Client {
|
|
|
28
29
|
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
29
30
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
30
31
|
this.config = _config_8;
|
|
32
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
31
33
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
32
34
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
33
35
|
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
-
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
3
|
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
-
import {
|
|
4
|
+
import { GetBuyerDashboard } from "../schemas/schemas_0";
|
|
6
5
|
export { $Command };
|
|
7
6
|
export class GetBuyerDashboardCommand extends $Command
|
|
8
7
|
.classBuilder()
|
|
9
8
|
.ep(commonParams)
|
|
10
9
|
.m(function (Command, cs, config, o) {
|
|
11
|
-
return [
|
|
12
|
-
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
-
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
-
];
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
15
11
|
})
|
|
16
12
|
.s("AWSMarketplaceReporting", "GetBuyerDashboard", {})
|
|
17
13
|
.n("MarketplaceReportingClient", "GetBuyerDashboardCommand")
|
|
18
|
-
.
|
|
19
|
-
.ser(se_GetBuyerDashboardCommand)
|
|
20
|
-
.de(de_GetBuyerDashboardCommand)
|
|
14
|
+
.sc(GetBuyerDashboard)
|
|
21
15
|
.build() {
|
|
22
16
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
2
3
|
import { NoOpLogger } from "@smithy/smithy-client";
|
|
3
4
|
import { parseUrl } from "@smithy/url-parser";
|
|
4
5
|
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
@@ -22,6 +23,7 @@ export const getRuntimeConfig = (config) => {
|
|
|
22
23
|
},
|
|
23
24
|
],
|
|
24
25
|
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
+
protocol: config?.protocol ?? new AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.marketplacereporting" }),
|
|
25
27
|
serviceId: config?.serviceId ?? "Marketplace Reporting",
|
|
26
28
|
urlParser: config?.urlParser ?? parseUrl,
|
|
27
29
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const _ADE = "AccessDeniedException";
|
|
2
|
+
const _BRE = "BadRequestException";
|
|
3
|
+
const _GBD = "GetBuyerDashboard";
|
|
4
|
+
const _GBDI = "GetBuyerDashboardInput";
|
|
5
|
+
const _GBDO = "GetBuyerDashboardOutput";
|
|
6
|
+
const _ISE = "InternalServerException";
|
|
7
|
+
const _UE = "UnauthorizedException";
|
|
8
|
+
const _c = "client";
|
|
9
|
+
const _dI = "dashboardIdentifier";
|
|
10
|
+
const _e = "error";
|
|
11
|
+
const _eD = "embeddingDomains";
|
|
12
|
+
const _eU = "embedUrl";
|
|
13
|
+
const _h = "http";
|
|
14
|
+
const _hE = "httpError";
|
|
15
|
+
const _m = "message";
|
|
16
|
+
const _s = "server";
|
|
17
|
+
const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.marketplacereporting";
|
|
18
|
+
const n0 = "com.amazonaws.marketplacereporting";
|
|
19
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
20
|
+
import { AccessDeniedException as __AccessDeniedException, BadRequestException as __BadRequestException, InternalServerException as __InternalServerException, UnauthorizedException as __UnauthorizedException, } from "../models/index";
|
|
21
|
+
import { MarketplaceReportingServiceException as __MarketplaceReportingServiceException } from "../models/MarketplaceReportingServiceException";
|
|
22
|
+
export var AccessDeniedException = [
|
|
23
|
+
-3,
|
|
24
|
+
n0,
|
|
25
|
+
_ADE,
|
|
26
|
+
{
|
|
27
|
+
[_e]: _c,
|
|
28
|
+
[_hE]: 403,
|
|
29
|
+
},
|
|
30
|
+
[_m],
|
|
31
|
+
[0],
|
|
32
|
+
];
|
|
33
|
+
TypeRegistry.for(n0).registerError(AccessDeniedException, __AccessDeniedException);
|
|
34
|
+
export var BadRequestException = [
|
|
35
|
+
-3,
|
|
36
|
+
n0,
|
|
37
|
+
_BRE,
|
|
38
|
+
{
|
|
39
|
+
[_e]: _c,
|
|
40
|
+
[_hE]: 400,
|
|
41
|
+
},
|
|
42
|
+
[_m],
|
|
43
|
+
[0],
|
|
44
|
+
];
|
|
45
|
+
TypeRegistry.for(n0).registerError(BadRequestException, __BadRequestException);
|
|
46
|
+
export var GetBuyerDashboardInput = [3, n0, _GBDI, 0, [_dI, _eD], [0, 64 | 0]];
|
|
47
|
+
export var GetBuyerDashboardOutput = [3, n0, _GBDO, 0, [_eU, _dI, _eD], [0, 0, 64 | 0]];
|
|
48
|
+
export var InternalServerException = [
|
|
49
|
+
-3,
|
|
50
|
+
n0,
|
|
51
|
+
_ISE,
|
|
52
|
+
{
|
|
53
|
+
[_e]: _s,
|
|
54
|
+
[_hE]: 500,
|
|
55
|
+
},
|
|
56
|
+
[_m],
|
|
57
|
+
[0],
|
|
58
|
+
];
|
|
59
|
+
TypeRegistry.for(n0).registerError(InternalServerException, __InternalServerException);
|
|
60
|
+
export var UnauthorizedException = [
|
|
61
|
+
-3,
|
|
62
|
+
n0,
|
|
63
|
+
_UE,
|
|
64
|
+
{
|
|
65
|
+
[_e]: _c,
|
|
66
|
+
[_hE]: 401,
|
|
67
|
+
},
|
|
68
|
+
[_m],
|
|
69
|
+
[0],
|
|
70
|
+
];
|
|
71
|
+
TypeRegistry.for(n0).registerError(UnauthorizedException, __UnauthorizedException);
|
|
72
|
+
export var MarketplaceReportingServiceException = [
|
|
73
|
+
-3,
|
|
74
|
+
_sm,
|
|
75
|
+
"MarketplaceReportingServiceException",
|
|
76
|
+
0,
|
|
77
|
+
[],
|
|
78
|
+
[],
|
|
79
|
+
];
|
|
80
|
+
TypeRegistry.for(_sm).registerError(MarketplaceReportingServiceException, __MarketplaceReportingServiceException);
|
|
81
|
+
export var EmbeddingDomains = 64 | 0;
|
|
82
|
+
export var GetBuyerDashboard = [
|
|
83
|
+
9,
|
|
84
|
+
n0,
|
|
85
|
+
_GBD,
|
|
86
|
+
{
|
|
87
|
+
[_h]: ["POST", "/getBuyerDashboard", 200],
|
|
88
|
+
},
|
|
89
|
+
() => GetBuyerDashboardInput,
|
|
90
|
+
() => GetBuyerDashboardOutput,
|
|
91
|
+
];
|
|
@@ -5,7 +5,7 @@ import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-
|
|
|
5
5
|
import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
6
6
|
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
7
7
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
8
|
-
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
8
|
+
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, ClientProtocol, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, HttpRequest, HttpResponse, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
9
|
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
10
|
import { GetBuyerDashboardCommandInput, GetBuyerDashboardCommandOutput } from "./commands/GetBuyerDashboardCommand";
|
|
11
11
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
@@ -142,6 +142,15 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
|
142
142
|
* Optional extensions
|
|
143
143
|
*/
|
|
144
144
|
extensions?: RuntimeExtension[];
|
|
145
|
+
/**
|
|
146
|
+
* The protocol controlling the message type (e.g. HTTP) and format (e.g. JSON)
|
|
147
|
+
* may be overridden. A default will always be set by the client.
|
|
148
|
+
* Available options depend on the service's supported protocols and will not be validated by
|
|
149
|
+
* the client.
|
|
150
|
+
* @alpha
|
|
151
|
+
*
|
|
152
|
+
*/
|
|
153
|
+
protocol?: ClientProtocol<HttpRequest, HttpResponse>;
|
|
145
154
|
/**
|
|
146
155
|
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
147
156
|
*/
|
|
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: MarketplaceReportingClientConfig
|
|
|
29
29
|
profile?: string;
|
|
30
30
|
logger: import("@smithy/types").Logger;
|
|
31
31
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
32
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
32
33
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
33
34
|
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
|
|
34
35
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
@@ -31,6 +31,7 @@ export declare const getRuntimeConfig: (config: MarketplaceReportingClientConfig
|
|
|
31
31
|
profile?: string;
|
|
32
32
|
logger: import("@smithy/types").Logger;
|
|
33
33
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
34
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
34
35
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
35
36
|
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
36
37
|
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
@@ -27,6 +27,7 @@ export declare const getRuntimeConfig: (config: MarketplaceReportingClientConfig
|
|
|
27
27
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
28
28
|
logger: import("@smithy/types").Logger;
|
|
29
29
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
30
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
30
31
|
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
|
|
31
32
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
32
33
|
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
|
|
@@ -14,6 +14,7 @@ export declare const getRuntimeConfig: (config: MarketplaceReportingClientConfig
|
|
|
14
14
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").MarketplaceReportingHttpAuthSchemeProvider;
|
|
15
15
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
16
16
|
logger: import("@smithy/types").Logger;
|
|
17
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
17
18
|
serviceId: string;
|
|
18
19
|
urlParser: import("@smithy/types").UrlParser;
|
|
19
20
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StaticErrorSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
|
|
2
|
+
export declare var AccessDeniedException: StaticErrorSchema;
|
|
3
|
+
export declare var BadRequestException: StaticErrorSchema;
|
|
4
|
+
export declare var GetBuyerDashboardInput: StaticStructureSchema;
|
|
5
|
+
export declare var GetBuyerDashboardOutput: StaticStructureSchema;
|
|
6
|
+
export declare var InternalServerException: StaticErrorSchema;
|
|
7
|
+
export declare var UnauthorizedException: StaticErrorSchema;
|
|
8
|
+
export declare var MarketplaceReportingServiceException: StaticErrorSchema;
|
|
9
|
+
export declare var EmbeddingDomains: number;
|
|
10
|
+
export declare var GetBuyerDashboard: StaticOperationSchema;
|
|
@@ -30,10 +30,13 @@ import {
|
|
|
30
30
|
BodyLengthCalculator as __BodyLengthCalculator,
|
|
31
31
|
CheckOptionalClientConfig as __CheckOptionalClientConfig,
|
|
32
32
|
ChecksumConstructor as __ChecksumConstructor,
|
|
33
|
+
ClientProtocol,
|
|
33
34
|
Decoder as __Decoder,
|
|
34
35
|
Encoder as __Encoder,
|
|
35
36
|
HashConstructor as __HashConstructor,
|
|
36
37
|
HttpHandlerOptions as __HttpHandlerOptions,
|
|
38
|
+
HttpRequest,
|
|
39
|
+
HttpResponse,
|
|
37
40
|
Logger as __Logger,
|
|
38
41
|
Provider as __Provider,
|
|
39
42
|
Provider,
|
|
@@ -82,6 +85,7 @@ export interface ClientDefaults
|
|
|
82
85
|
retryMode?: string | __Provider<string>;
|
|
83
86
|
logger?: __Logger;
|
|
84
87
|
extensions?: RuntimeExtension[];
|
|
88
|
+
protocol?: ClientProtocol<HttpRequest, HttpResponse>;
|
|
85
89
|
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
86
90
|
}
|
|
87
91
|
export type MarketplaceReportingClientConfigType = Partial<
|
|
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
|
|
|
40
40
|
profile?: string;
|
|
41
41
|
logger: import("@smithy/types").Logger;
|
|
42
42
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
43
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
44
|
+
import("@smithy/types").HttpRequest,
|
|
45
|
+
import("@smithy/types").HttpResponse
|
|
46
|
+
>;
|
|
43
47
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
44
48
|
userAgentAppId?:
|
|
45
49
|
| string
|
|
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
|
|
|
40
40
|
profile?: string;
|
|
41
41
|
logger: import("@smithy/types").Logger;
|
|
42
42
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
43
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
44
|
+
import("@smithy/types").HttpRequest,
|
|
45
|
+
import("@smithy/types").HttpResponse
|
|
46
|
+
>;
|
|
43
47
|
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
44
48
|
retryStrategy?:
|
|
45
49
|
| import("@smithy/types").RetryStrategy
|
|
@@ -39,6 +39,10 @@ export declare const getRuntimeConfig: (
|
|
|
39
39
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
40
40
|
logger: import("@smithy/types").Logger;
|
|
41
41
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
42
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
43
|
+
import("@smithy/types").HttpRequest,
|
|
44
|
+
import("@smithy/types").HttpResponse
|
|
45
|
+
>;
|
|
42
46
|
defaultsMode:
|
|
43
47
|
| import("@smithy/smithy-client").DefaultsMode
|
|
44
48
|
| import("@smithy/types").Provider<
|
|
@@ -16,6 +16,10 @@ export declare const getRuntimeConfig: (
|
|
|
16
16
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").MarketplaceReportingHttpAuthSchemeProvider;
|
|
17
17
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
18
18
|
logger: import("@smithy/types").Logger;
|
|
19
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
20
|
+
import("@smithy/types").HttpRequest,
|
|
21
|
+
import("@smithy/types").HttpResponse
|
|
22
|
+
>;
|
|
19
23
|
serviceId: string;
|
|
20
24
|
urlParser: import("@smithy/types").UrlParser;
|
|
21
25
|
utf8Decoder: import("@smithy/types").Decoder;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StaticErrorSchema,
|
|
3
|
+
StaticOperationSchema,
|
|
4
|
+
StaticStructureSchema,
|
|
5
|
+
} from "@smithy/types";
|
|
6
|
+
export declare var AccessDeniedException: StaticErrorSchema;
|
|
7
|
+
export declare var BadRequestException: StaticErrorSchema;
|
|
8
|
+
export declare var GetBuyerDashboardInput: StaticStructureSchema;
|
|
9
|
+
export declare var GetBuyerDashboardOutput: StaticStructureSchema;
|
|
10
|
+
export declare var InternalServerException: StaticErrorSchema;
|
|
11
|
+
export declare var UnauthorizedException: StaticErrorSchema;
|
|
12
|
+
export declare var MarketplaceReportingServiceException: StaticErrorSchema;
|
|
13
|
+
export declare var EmbeddingDomains: number;
|
|
14
|
+
export declare var GetBuyerDashboard: StaticOperationSchema;
|
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.
|
|
4
|
+
"version": "3.929.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,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.928.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.929.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.922.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.922.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.922.0",
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.928.0",
|
|
29
29
|
"@aws-sdk/region-config-resolver": "3.925.0",
|
|
30
30
|
"@aws-sdk/types": "3.922.0",
|
|
31
31
|
"@aws-sdk/util-endpoints": "3.922.0",
|
|
32
32
|
"@aws-sdk/util-user-agent-browser": "3.922.0",
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.928.0",
|
|
34
34
|
"@smithy/config-resolver": "^4.4.2",
|
|
35
35
|
"@smithy/core": "^3.17.2",
|
|
36
36
|
"@smithy/fetch-http-handler": "^5.3.5",
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { MarketplaceReportingServiceException as __BaseException } from "../models/MarketplaceReportingServiceException";
|
|
5
|
-
import { AccessDeniedException, BadRequestException, InternalServerException, UnauthorizedException, } from "../models/models_0";
|
|
6
|
-
export const se_GetBuyerDashboardCommand = async (input, context) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {
|
|
9
|
-
"content-type": "application/json",
|
|
10
|
-
};
|
|
11
|
-
b.bp("/getBuyerDashboard");
|
|
12
|
-
let body;
|
|
13
|
-
body = JSON.stringify(take(input, {
|
|
14
|
-
dashboardIdentifier: [],
|
|
15
|
-
embeddingDomains: (_) => _json(_),
|
|
16
|
-
}));
|
|
17
|
-
b.m("POST").h(headers).b(body);
|
|
18
|
-
return b.build();
|
|
19
|
-
};
|
|
20
|
-
export const de_GetBuyerDashboardCommand = async (output, context) => {
|
|
21
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
22
|
-
return de_CommandError(output, context);
|
|
23
|
-
}
|
|
24
|
-
const contents = map({
|
|
25
|
-
$metadata: deserializeMetadata(output),
|
|
26
|
-
});
|
|
27
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
28
|
-
const doc = take(data, {
|
|
29
|
-
dashboardIdentifier: __expectString,
|
|
30
|
-
embedUrl: __expectString,
|
|
31
|
-
embeddingDomains: _json,
|
|
32
|
-
});
|
|
33
|
-
Object.assign(contents, doc);
|
|
34
|
-
return contents;
|
|
35
|
-
};
|
|
36
|
-
const de_CommandError = async (output, context) => {
|
|
37
|
-
const parsedOutput = {
|
|
38
|
-
...output,
|
|
39
|
-
body: await parseErrorBody(output.body, context),
|
|
40
|
-
};
|
|
41
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
42
|
-
switch (errorCode) {
|
|
43
|
-
case "AccessDeniedException":
|
|
44
|
-
case "com.amazonaws.marketplacereporting#AccessDeniedException":
|
|
45
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
46
|
-
case "BadRequestException":
|
|
47
|
-
case "com.amazonaws.marketplacereporting#BadRequestException":
|
|
48
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
49
|
-
case "InternalServerException":
|
|
50
|
-
case "com.amazonaws.marketplacereporting#InternalServerException":
|
|
51
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
52
|
-
case "UnauthorizedException":
|
|
53
|
-
case "com.amazonaws.marketplacereporting#UnauthorizedException":
|
|
54
|
-
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
55
|
-
default:
|
|
56
|
-
const parsedBody = parsedOutput.body;
|
|
57
|
-
return throwDefaultError({
|
|
58
|
-
output,
|
|
59
|
-
parsedBody,
|
|
60
|
-
errorCode,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
65
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
66
|
-
const contents = map({});
|
|
67
|
-
const data = parsedOutput.body;
|
|
68
|
-
const doc = take(data, {
|
|
69
|
-
message: __expectString,
|
|
70
|
-
});
|
|
71
|
-
Object.assign(contents, doc);
|
|
72
|
-
const exception = new AccessDeniedException({
|
|
73
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
74
|
-
...contents,
|
|
75
|
-
});
|
|
76
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
77
|
-
};
|
|
78
|
-
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
79
|
-
const contents = map({});
|
|
80
|
-
const data = parsedOutput.body;
|
|
81
|
-
const doc = take(data, {
|
|
82
|
-
message: __expectString,
|
|
83
|
-
});
|
|
84
|
-
Object.assign(contents, doc);
|
|
85
|
-
const exception = new BadRequestException({
|
|
86
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
87
|
-
...contents,
|
|
88
|
-
});
|
|
89
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
90
|
-
};
|
|
91
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
92
|
-
const contents = map({});
|
|
93
|
-
const data = parsedOutput.body;
|
|
94
|
-
const doc = take(data, {
|
|
95
|
-
message: __expectString,
|
|
96
|
-
});
|
|
97
|
-
Object.assign(contents, doc);
|
|
98
|
-
const exception = new InternalServerException({
|
|
99
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
100
|
-
...contents,
|
|
101
|
-
});
|
|
102
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
103
|
-
};
|
|
104
|
-
const de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
105
|
-
const contents = map({});
|
|
106
|
-
const data = parsedOutput.body;
|
|
107
|
-
const doc = take(data, {
|
|
108
|
-
message: __expectString,
|
|
109
|
-
});
|
|
110
|
-
Object.assign(contents, doc);
|
|
111
|
-
const exception = new UnauthorizedException({
|
|
112
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
113
|
-
...contents,
|
|
114
|
-
});
|
|
115
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
116
|
-
};
|
|
117
|
-
const deserializeMetadata = (output) => ({
|
|
118
|
-
httpStatusCode: output.statusCode,
|
|
119
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
120
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
121
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
122
|
-
});
|
|
123
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
2
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
3
|
-
import { GetBuyerDashboardCommandInput, GetBuyerDashboardCommandOutput } from "../commands/GetBuyerDashboardCommand";
|
|
4
|
-
/**
|
|
5
|
-
* serializeAws_restJson1GetBuyerDashboardCommand
|
|
6
|
-
*/
|
|
7
|
-
export declare const se_GetBuyerDashboardCommand: (input: GetBuyerDashboardCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
8
|
-
/**
|
|
9
|
-
* deserializeAws_restJson1GetBuyerDashboardCommand
|
|
10
|
-
*/
|
|
11
|
-
export declare const de_GetBuyerDashboardCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetBuyerDashboardCommandOutput>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HttpRequest as __HttpRequest,
|
|
3
|
-
HttpResponse as __HttpResponse,
|
|
4
|
-
} from "@smithy/protocol-http";
|
|
5
|
-
import { SerdeContext as __SerdeContext } from "@smithy/types";
|
|
6
|
-
import {
|
|
7
|
-
GetBuyerDashboardCommandInput,
|
|
8
|
-
GetBuyerDashboardCommandOutput,
|
|
9
|
-
} from "../commands/GetBuyerDashboardCommand";
|
|
10
|
-
export declare const se_GetBuyerDashboardCommand: (
|
|
11
|
-
input: GetBuyerDashboardCommandInput,
|
|
12
|
-
context: __SerdeContext
|
|
13
|
-
) => Promise<__HttpRequest>;
|
|
14
|
-
export declare const de_GetBuyerDashboardCommand: (
|
|
15
|
-
output: __HttpResponse,
|
|
16
|
-
context: __SerdeContext
|
|
17
|
-
) => Promise<GetBuyerDashboardCommandOutput>;
|