@aws-sdk/client-marketplace-reporting 3.664.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 (83) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +248 -0
  3. package/dist-cjs/MarketplaceReporting.js +13 -0
  4. package/dist-cjs/MarketplaceReportingClient.js +50 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/GetBuyerDashboardCommand.js +26 -0
  8. package/dist-cjs/commands/index.js +4 -0
  9. package/dist-cjs/endpoint/EndpointParameters.js +18 -0
  10. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  11. package/dist-cjs/endpoint/ruleset.js +7 -0
  12. package/dist-cjs/extensionConfiguration.js +2 -0
  13. package/dist-cjs/index.js +10 -0
  14. package/dist-cjs/models/MarketplaceReportingServiceException.js +12 -0
  15. package/dist-cjs/models/index.js +4 -0
  16. package/dist-cjs/models/models_0.js +56 -0
  17. package/dist-cjs/protocols/Aws_restJson1.js +128 -0
  18. package/dist-cjs/runtimeConfig.browser.js +39 -0
  19. package/dist-cjs/runtimeConfig.js +50 -0
  20. package/dist-cjs/runtimeConfig.native.js +15 -0
  21. package/dist-cjs/runtimeConfig.shared.js +34 -0
  22. package/dist-cjs/runtimeExtensions.js +25 -0
  23. package/dist-es/MarketplaceReporting.js +9 -0
  24. package/dist-es/MarketplaceReportingClient.js +46 -0
  25. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  26. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  27. package/dist-es/commands/GetBuyerDashboardCommand.js +22 -0
  28. package/dist-es/commands/index.js +1 -0
  29. package/dist-es/endpoint/EndpointParameters.js +14 -0
  30. package/dist-es/endpoint/endpointResolver.js +14 -0
  31. package/dist-es/endpoint/ruleset.js +4 -0
  32. package/dist-es/extensionConfiguration.js +1 -0
  33. package/dist-es/index.js +5 -0
  34. package/dist-es/models/MarketplaceReportingServiceException.js +8 -0
  35. package/dist-es/models/index.js +1 -0
  36. package/dist-es/models/models_0.js +49 -0
  37. package/dist-es/protocols/Aws_restJson1.js +123 -0
  38. package/dist-es/runtimeConfig.browser.js +34 -0
  39. package/dist-es/runtimeConfig.js +45 -0
  40. package/dist-es/runtimeConfig.native.js +11 -0
  41. package/dist-es/runtimeConfig.shared.js +30 -0
  42. package/dist-es/runtimeExtensions.js +21 -0
  43. package/dist-types/MarketplaceReporting.d.ts +52 -0
  44. package/dist-types/MarketplaceReportingClient.d.ts +205 -0
  45. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  46. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  47. package/dist-types/commands/GetBuyerDashboardCommand.d.ts +145 -0
  48. package/dist-types/commands/index.d.ts +1 -0
  49. package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
  50. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  51. package/dist-types/endpoint/ruleset.d.ts +2 -0
  52. package/dist-types/extensionConfiguration.d.ts +9 -0
  53. package/dist-types/index.d.ts +48 -0
  54. package/dist-types/models/MarketplaceReportingServiceException.d.ts +14 -0
  55. package/dist-types/models/index.d.ts +1 -0
  56. package/dist-types/models/models_0.d.ts +89 -0
  57. package/dist-types/protocols/Aws_restJson1.d.ts +11 -0
  58. package/dist-types/runtimeConfig.browser.d.ts +48 -0
  59. package/dist-types/runtimeConfig.d.ts +48 -0
  60. package/dist-types/runtimeConfig.native.d.ts +47 -0
  61. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  62. package/dist-types/runtimeExtensions.d.ts +17 -0
  63. package/dist-types/ts3.4/MarketplaceReporting.d.ts +24 -0
  64. package/dist-types/ts3.4/MarketplaceReportingClient.d.ts +125 -0
  65. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  66. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  67. package/dist-types/ts3.4/commands/GetBuyerDashboardCommand.d.ts +46 -0
  68. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  69. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  70. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  71. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  72. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  73. package/dist-types/ts3.4/index.d.ts +8 -0
  74. package/dist-types/ts3.4/models/MarketplaceReportingServiceException.d.ts +9 -0
  75. package/dist-types/ts3.4/models/index.d.ts +1 -0
  76. package/dist-types/ts3.4/models/models_0.d.ts +39 -0
  77. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +17 -0
  78. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
  79. package/dist-types/ts3.4/runtimeConfig.d.ts +96 -0
  80. package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
  81. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +23 -0
  82. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  83. package/package.json +101 -0
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
2
+ export { __ServiceException };
3
+ export class MarketplaceReportingServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, MarketplaceReportingServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,49 @@
1
+ import { MarketplaceReportingServiceException as __BaseException } from "./MarketplaceReportingServiceException";
2
+ export class AccessDeniedException extends __BaseException {
3
+ constructor(opts) {
4
+ super({
5
+ name: "AccessDeniedException",
6
+ $fault: "client",
7
+ ...opts,
8
+ });
9
+ this.name = "AccessDeniedException";
10
+ this.$fault = "client";
11
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
12
+ }
13
+ }
14
+ export class BadRequestException extends __BaseException {
15
+ constructor(opts) {
16
+ super({
17
+ name: "BadRequestException",
18
+ $fault: "client",
19
+ ...opts,
20
+ });
21
+ this.name = "BadRequestException";
22
+ this.$fault = "client";
23
+ Object.setPrototypeOf(this, BadRequestException.prototype);
24
+ }
25
+ }
26
+ export class InternalServerException extends __BaseException {
27
+ constructor(opts) {
28
+ super({
29
+ name: "InternalServerException",
30
+ $fault: "server",
31
+ ...opts,
32
+ });
33
+ this.name = "InternalServerException";
34
+ this.$fault = "server";
35
+ Object.setPrototypeOf(this, InternalServerException.prototype);
36
+ }
37
+ }
38
+ export class UnauthorizedException extends __BaseException {
39
+ constructor(opts) {
40
+ super({
41
+ name: "UnauthorizedException",
42
+ $fault: "client",
43
+ ...opts,
44
+ });
45
+ this.name = "UnauthorizedException";
46
+ this.$fault = "client";
47
+ Object.setPrototypeOf(this, UnauthorizedException.prototype);
48
+ }
49
+ }
@@ -0,0 +1,123 @@
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));
@@ -0,0 +1,34 @@
1
+ import packageInfo from "../package.json";
2
+ import { Sha256 } from "@aws-crypto/sha256-browser";
3
+ import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
6
+ import { invalidProvider } from "@smithy/invalid-dependency";
7
+ import { calculateBodyLength } from "@smithy/util-body-length-browser";
8
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
9
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
10
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
11
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
12
+ export const getRuntimeConfig = (config) => {
13
+ const defaultsMode = resolveDefaultsModeConfig(config);
14
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
+ const clientSharedValues = getSharedRuntimeConfig(config);
16
+ return {
17
+ ...clientSharedValues,
18
+ ...config,
19
+ runtime: "browser",
20
+ defaultsMode,
21
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
22
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
23
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
24
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
25
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
26
+ region: config?.region ?? invalidProvider("Region is missing"),
27
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
28
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
29
+ sha256: config?.sha256 ?? Sha256,
30
+ streamCollector: config?.streamCollector ?? streamCollector,
31
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
32
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
33
+ };
34
+ };
@@ -0,0 +1,45 @@
1
+ import packageInfo from "../package.json";
2
+ import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
3
+ import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
4
+ import { NODE_APP_ID_CONFIG_OPTIONS, defaultUserAgent } from "@aws-sdk/util-user-agent-node";
5
+ import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
6
+ import { Hash } from "@smithy/hash-node";
7
+ import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
8
+ import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
10
+ import { calculateBodyLength } from "@smithy/util-body-length-node";
11
+ import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
12
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
15
+ import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
16
+ export const getRuntimeConfig = (config) => {
17
+ emitWarningIfUnsupportedVersion(process.version);
18
+ const defaultsMode = resolveDefaultsModeConfig(config);
19
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
20
+ const clientSharedValues = getSharedRuntimeConfig(config);
21
+ awsCheckVersion(process.version);
22
+ return {
23
+ ...clientSharedValues,
24
+ ...config,
25
+ runtime: "node",
26
+ defaultsMode,
27
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
30
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
31
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
32
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
33
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
34
+ retryMode: config?.retryMode ??
35
+ loadNodeConfig({
36
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
37
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
38
+ }),
39
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
40
+ streamCollector: config?.streamCollector ?? streamCollector,
41
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
42
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
43
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS),
44
+ };
45
+ };
@@ -0,0 +1,11 @@
1
+ import { Sha256 } from "@aws-crypto/sha256-js";
2
+ import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
+ export const getRuntimeConfig = (config) => {
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
5
+ return {
6
+ ...browserDefaults,
7
+ ...config,
8
+ runtime: "react-native",
9
+ sha256: config?.sha256 ?? Sha256,
10
+ };
11
+ };
@@ -0,0 +1,30 @@
1
+ import { AwsSdkSigV4Signer } from "@aws-sdk/core";
2
+ import { NoOpLogger } from "@smithy/smithy-client";
3
+ import { parseUrl } from "@smithy/url-parser";
4
+ import { fromBase64, toBase64 } from "@smithy/util-base64";
5
+ import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
6
+ import { defaultMarketplaceReportingHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
7
+ import { defaultEndpointResolver } from "./endpoint/endpointResolver";
8
+ export const getRuntimeConfig = (config) => {
9
+ return {
10
+ apiVersion: "2018-05-10",
11
+ base64Decoder: config?.base64Decoder ?? fromBase64,
12
+ base64Encoder: config?.base64Encoder ?? toBase64,
13
+ disableHostPrefix: config?.disableHostPrefix ?? false,
14
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
15
+ extensions: config?.extensions ?? [],
16
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultMarketplaceReportingHttpAuthSchemeProvider,
17
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
18
+ {
19
+ schemeId: "aws.auth#sigv4",
20
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
21
+ signer: new AwsSdkSigV4Signer(),
22
+ },
23
+ ],
24
+ logger: config?.logger ?? new NoOpLogger(),
25
+ serviceId: config?.serviceId ?? "Marketplace Reporting",
26
+ urlParser: config?.urlParser ?? parseUrl,
27
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
28
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
29
+ };
30
+ };
@@ -0,0 +1,21 @@
1
+ import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
2
+ import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
3
+ import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
4
+ import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
5
+ const asPartial = (t) => t;
6
+ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
7
+ const extensionConfiguration = {
8
+ ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
9
+ ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
10
+ ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
11
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
12
+ };
13
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
14
+ return {
15
+ ...runtimeConfig,
16
+ ...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
17
+ ...resolveDefaultRuntimeConfig(extensionConfiguration),
18
+ ...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
19
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration),
20
+ };
21
+ };
@@ -0,0 +1,52 @@
1
+ import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
+ import { GetBuyerDashboardCommandInput, GetBuyerDashboardCommandOutput } from "./commands/GetBuyerDashboardCommand";
3
+ import { MarketplaceReportingClient } from "./MarketplaceReportingClient";
4
+ export interface MarketplaceReporting {
5
+ /**
6
+ * @see {@link GetBuyerDashboardCommand}
7
+ */
8
+ getBuyerDashboard(args: GetBuyerDashboardCommandInput, options?: __HttpHandlerOptions): Promise<GetBuyerDashboardCommandOutput>;
9
+ getBuyerDashboard(args: GetBuyerDashboardCommandInput, cb: (err: any, data?: GetBuyerDashboardCommandOutput) => void): void;
10
+ getBuyerDashboard(args: GetBuyerDashboardCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetBuyerDashboardCommandOutput) => void): void;
11
+ }
12
+ /**
13
+ * <p>The AWS Marketplace <code>GetBuyerDashboard</code> API enables you to get a procurement insights dashboard
14
+ * programmatically. The API gets the agreement and cost analysis dashboards with data for all of the Amazon Web Services accounts in your Amazon Web Services organization. </p>
15
+ * <p>To use the API, you must complete the following prerequisites:</p>
16
+ * <ul>
17
+ * <li>
18
+ * <p>Enable all features for your organization. For more information, see
19
+ * <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html">Enabling all features for an organization with Amazon Web Services Organizations</a>,
20
+ * in the <i>Amazon Web Services Organizations User Guide</i>.</p>
21
+ * </li>
22
+ * <li>
23
+ * <p>Call the service as the Amazon Web Services Organizations management account or an account registered as a delegated administrator for the procurement insights service.
24
+ * Users without management or delegated administrator accounts can use the dashboard, but they only see data for their accounts.</p>
25
+ * <p>For more information about management accounts, see
26
+ * <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tutorials_basic.html">Tutorial: Creating and configuring an organization</a>
27
+ * and <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs-manage_accounts_management.html">Managing the management account with Amazon Web Services Organizations</a>,
28
+ * both in the <i>Amazon Web Services Organizations User Guide</i>.</p>
29
+ * <p>For more information about delegated administrators, see <a href="https://docs.aws.amazon.com/marketplace/latest/buyerguide/management-delegates.html">Using delegated administrators</a>,
30
+ * in the <i>AWS Marketplace Buyer Guide</i>.</p>
31
+ * </li>
32
+ * <li>
33
+ * <p>Create an IAM policy that enables the <code>aws-marketplace:GetBuyerDashboard</code> and <code>organizations:DescribeOrganization</code> permissions. In addition,
34
+ * the management account requires the <code>organizations:EnableAWSServiceAccess</code> and <code>iam:CreateServiceLinkedRole</code> permissions to create
35
+ * For more information about creating the policy, see
36
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">Policies and permissions in Amazon Web Services Identity and Access Management</a>,
37
+ * in the <i>IAM User Guide</i>.</p>
38
+ * </li>
39
+ * <li>
40
+ * <p>Use the Amazon Web Services Marketplace console to create the <code>AWSServiceRoleForProcurementInsightsPolicy</code> service-linked role.
41
+ * The role enables AWS Marketplace procurement visibility integration. The management account requires an IAM policy with the <code>organizations:EnableAWSServiceAccess</code> and <code>iam:CreateServiceLinkedRole</code> permissions
42
+ * to create the service-linked role and enable the service access. For more information, see
43
+ * <a href="https://docs.aws.amazon.com/marketplace/latest/buyerguide/orgs-access-slr.html">Granting access to
44
+ * Amazon Web Services Organizations</a>, and
45
+ * <a href="https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-service-linked-role-procurement.html">Service-linked role to share procurement data</a>,
46
+ * in the <i>Amazon Web Services Marketplace Buyer Guide</i>.</p>
47
+ * </li>
48
+ * </ul>
49
+ * @public
50
+ */
51
+ export declare class MarketplaceReporting extends MarketplaceReportingClient implements MarketplaceReporting {
52
+ }
@@ -0,0 +1,205 @@
1
+ import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
2
+ import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
3
+ import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
4
+ import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
5
+ import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
6
+ import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
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";
9
+ import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
10
+ import { GetBuyerDashboardCommandInput, GetBuyerDashboardCommandOutput } from "./commands/GetBuyerDashboardCommand";
11
+ import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
12
+ import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
13
+ export { __Client };
14
+ /**
15
+ * @public
16
+ */
17
+ export type ServiceInputTypes = GetBuyerDashboardCommandInput;
18
+ /**
19
+ * @public
20
+ */
21
+ export type ServiceOutputTypes = GetBuyerDashboardCommandOutput;
22
+ /**
23
+ * @public
24
+ */
25
+ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
26
+ /**
27
+ * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
28
+ */
29
+ requestHandler?: __HttpHandlerUserInput;
30
+ /**
31
+ * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
32
+ * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
33
+ * @internal
34
+ */
35
+ sha256?: __ChecksumConstructor | __HashConstructor;
36
+ /**
37
+ * The function that will be used to convert strings into HTTP endpoints.
38
+ * @internal
39
+ */
40
+ urlParser?: __UrlParser;
41
+ /**
42
+ * A function that can calculate the length of a request body.
43
+ * @internal
44
+ */
45
+ bodyLengthChecker?: __BodyLengthCalculator;
46
+ /**
47
+ * A function that converts a stream into an array of bytes.
48
+ * @internal
49
+ */
50
+ streamCollector?: __StreamCollector;
51
+ /**
52
+ * The function that will be used to convert a base64-encoded string to a byte array.
53
+ * @internal
54
+ */
55
+ base64Decoder?: __Decoder;
56
+ /**
57
+ * The function that will be used to convert binary data to a base64-encoded string.
58
+ * @internal
59
+ */
60
+ base64Encoder?: __Encoder;
61
+ /**
62
+ * The function that will be used to convert a UTF8-encoded string to a byte array.
63
+ * @internal
64
+ */
65
+ utf8Decoder?: __Decoder;
66
+ /**
67
+ * The function that will be used to convert binary data to a UTF-8 encoded string.
68
+ * @internal
69
+ */
70
+ utf8Encoder?: __Encoder;
71
+ /**
72
+ * The runtime environment.
73
+ * @internal
74
+ */
75
+ runtime?: string;
76
+ /**
77
+ * Disable dynamically changing the endpoint of the client based on the hostPrefix
78
+ * trait of an operation.
79
+ */
80
+ disableHostPrefix?: boolean;
81
+ /**
82
+ * Unique service identifier.
83
+ * @internal
84
+ */
85
+ serviceId?: string;
86
+ /**
87
+ * Enables IPv6/IPv4 dualstack endpoint.
88
+ */
89
+ useDualstackEndpoint?: boolean | __Provider<boolean>;
90
+ /**
91
+ * Enables FIPS compatible endpoints.
92
+ */
93
+ useFipsEndpoint?: boolean | __Provider<boolean>;
94
+ /**
95
+ * The AWS region to which this client will send requests
96
+ */
97
+ region?: string | __Provider<string>;
98
+ /**
99
+ * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
100
+ * @internal
101
+ */
102
+ defaultUserAgentProvider?: Provider<__UserAgent>;
103
+ /**
104
+ * Default credentials provider; Not available in browser runtime.
105
+ * @deprecated
106
+ * @internal
107
+ */
108
+ credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
109
+ /**
110
+ * Value for how many times a request will be made at most in case of retry.
111
+ */
112
+ maxAttempts?: number | __Provider<number>;
113
+ /**
114
+ * Specifies which retry algorithm to use.
115
+ * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
116
+ *
117
+ */
118
+ retryMode?: string | __Provider<string>;
119
+ /**
120
+ * Optional logger for logging debug/info/warn/error.
121
+ */
122
+ logger?: __Logger;
123
+ /**
124
+ * Optional extensions
125
+ */
126
+ extensions?: RuntimeExtension[];
127
+ /**
128
+ * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
129
+ */
130
+ defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
131
+ }
132
+ /**
133
+ * @public
134
+ */
135
+ export type MarketplaceReportingClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
136
+ /**
137
+ * @public
138
+ *
139
+ * The configuration interface of MarketplaceReportingClient class constructor that set the region, credentials and other options.
140
+ */
141
+ export interface MarketplaceReportingClientConfig extends MarketplaceReportingClientConfigType {
142
+ }
143
+ /**
144
+ * @public
145
+ */
146
+ export type MarketplaceReportingClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
147
+ /**
148
+ * @public
149
+ *
150
+ * The resolved configuration interface of MarketplaceReportingClient class. This is resolved and normalized from the {@link MarketplaceReportingClientConfig | constructor configuration interface}.
151
+ */
152
+ export interface MarketplaceReportingClientResolvedConfig extends MarketplaceReportingClientResolvedConfigType {
153
+ }
154
+ /**
155
+ * <p>The AWS Marketplace <code>GetBuyerDashboard</code> API enables you to get a procurement insights dashboard
156
+ * programmatically. The API gets the agreement and cost analysis dashboards with data for all of the Amazon Web Services accounts in your Amazon Web Services organization. </p>
157
+ * <p>To use the API, you must complete the following prerequisites:</p>
158
+ * <ul>
159
+ * <li>
160
+ * <p>Enable all features for your organization. For more information, see
161
+ * <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html">Enabling all features for an organization with Amazon Web Services Organizations</a>,
162
+ * in the <i>Amazon Web Services Organizations User Guide</i>.</p>
163
+ * </li>
164
+ * <li>
165
+ * <p>Call the service as the Amazon Web Services Organizations management account or an account registered as a delegated administrator for the procurement insights service.
166
+ * Users without management or delegated administrator accounts can use the dashboard, but they only see data for their accounts.</p>
167
+ * <p>For more information about management accounts, see
168
+ * <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tutorials_basic.html">Tutorial: Creating and configuring an organization</a>
169
+ * and <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs-manage_accounts_management.html">Managing the management account with Amazon Web Services Organizations</a>,
170
+ * both in the <i>Amazon Web Services Organizations User Guide</i>.</p>
171
+ * <p>For more information about delegated administrators, see <a href="https://docs.aws.amazon.com/marketplace/latest/buyerguide/management-delegates.html">Using delegated administrators</a>,
172
+ * in the <i>AWS Marketplace Buyer Guide</i>.</p>
173
+ * </li>
174
+ * <li>
175
+ * <p>Create an IAM policy that enables the <code>aws-marketplace:GetBuyerDashboard</code> and <code>organizations:DescribeOrganization</code> permissions. In addition,
176
+ * the management account requires the <code>organizations:EnableAWSServiceAccess</code> and <code>iam:CreateServiceLinkedRole</code> permissions to create
177
+ * For more information about creating the policy, see
178
+ * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html">Policies and permissions in Amazon Web Services Identity and Access Management</a>,
179
+ * in the <i>IAM User Guide</i>.</p>
180
+ * </li>
181
+ * <li>
182
+ * <p>Use the Amazon Web Services Marketplace console to create the <code>AWSServiceRoleForProcurementInsightsPolicy</code> service-linked role.
183
+ * The role enables AWS Marketplace procurement visibility integration. The management account requires an IAM policy with the <code>organizations:EnableAWSServiceAccess</code> and <code>iam:CreateServiceLinkedRole</code> permissions
184
+ * to create the service-linked role and enable the service access. For more information, see
185
+ * <a href="https://docs.aws.amazon.com/marketplace/latest/buyerguide/orgs-access-slr.html">Granting access to
186
+ * Amazon Web Services Organizations</a>, and
187
+ * <a href="https://docs.aws.amazon.com/marketplace/latest/buyerguide/buyer-service-linked-role-procurement.html">Service-linked role to share procurement data</a>,
188
+ * in the <i>Amazon Web Services Marketplace Buyer Guide</i>.</p>
189
+ * </li>
190
+ * </ul>
191
+ * @public
192
+ */
193
+ export declare class MarketplaceReportingClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, MarketplaceReportingClientResolvedConfig> {
194
+ /**
195
+ * The resolved configuration of MarketplaceReportingClient class. This is resolved and normalized from the {@link MarketplaceReportingClientConfig | constructor configuration interface}.
196
+ */
197
+ readonly config: MarketplaceReportingClientResolvedConfig;
198
+ constructor(...[configuration]: __CheckOptionalClientConfig<MarketplaceReportingClientConfig>);
199
+ /**
200
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
201
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
202
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
203
+ */
204
+ destroy(): void;
205
+ }
@@ -0,0 +1,29 @@
1
+ import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
2
+ import { MarketplaceReportingHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
3
+ /**
4
+ * @internal
5
+ */
6
+ export interface HttpAuthExtensionConfiguration {
7
+ setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
8
+ httpAuthSchemes(): HttpAuthScheme[];
9
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider: MarketplaceReportingHttpAuthSchemeProvider): void;
10
+ httpAuthSchemeProvider(): MarketplaceReportingHttpAuthSchemeProvider;
11
+ setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
12
+ credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
13
+ }
14
+ /**
15
+ * @internal
16
+ */
17
+ export type HttpAuthRuntimeConfig = Partial<{
18
+ httpAuthSchemes: HttpAuthScheme[];
19
+ httpAuthSchemeProvider: MarketplaceReportingHttpAuthSchemeProvider;
20
+ credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
21
+ }>;
22
+ /**
23
+ * @internal
24
+ */
25
+ export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
26
+ /**
27
+ * @internal
28
+ */
29
+ export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;