@aws-sdk/client-partnercentral-channel 3.935.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 (137) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +341 -0
  3. package/dist-cjs/auth/httpAuthSchemeProvider.js +127 -0
  4. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  5. package/dist-cjs/endpoint/ruleset.js +7 -0
  6. package/dist-cjs/index.js +1379 -0
  7. package/dist-cjs/runtimeConfig.browser.js +39 -0
  8. package/dist-cjs/runtimeConfig.js +57 -0
  9. package/dist-cjs/runtimeConfig.native.js +15 -0
  10. package/dist-cjs/runtimeConfig.shared.js +48 -0
  11. package/dist-es/PartnerCentralChannel.js +41 -0
  12. package/dist-es/PartnerCentralChannelClient.js +51 -0
  13. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  14. package/dist-es/auth/httpAuthSchemeProvider.js +123 -0
  15. package/dist-es/commands/AcceptChannelHandshakeCommand.js +16 -0
  16. package/dist-es/commands/CancelChannelHandshakeCommand.js +16 -0
  17. package/dist-es/commands/CreateChannelHandshakeCommand.js +16 -0
  18. package/dist-es/commands/CreateProgramManagementAccountCommand.js +16 -0
  19. package/dist-es/commands/CreateRelationshipCommand.js +16 -0
  20. package/dist-es/commands/DeleteProgramManagementAccountCommand.js +16 -0
  21. package/dist-es/commands/DeleteRelationshipCommand.js +16 -0
  22. package/dist-es/commands/GetRelationshipCommand.js +16 -0
  23. package/dist-es/commands/ListChannelHandshakesCommand.js +16 -0
  24. package/dist-es/commands/ListProgramManagementAccountsCommand.js +16 -0
  25. package/dist-es/commands/ListRelationshipsCommand.js +16 -0
  26. package/dist-es/commands/ListTagsForResourceCommand.js +16 -0
  27. package/dist-es/commands/RejectChannelHandshakeCommand.js +16 -0
  28. package/dist-es/commands/TagResourceCommand.js +16 -0
  29. package/dist-es/commands/UntagResourceCommand.js +16 -0
  30. package/dist-es/commands/UpdateProgramManagementAccountCommand.js +16 -0
  31. package/dist-es/commands/UpdateRelationshipCommand.js +16 -0
  32. package/dist-es/commands/index.js +17 -0
  33. package/dist-es/endpoint/EndpointParameters.js +11 -0
  34. package/dist-es/endpoint/endpointResolver.js +14 -0
  35. package/dist-es/endpoint/ruleset.js +4 -0
  36. package/dist-es/extensionConfiguration.js +1 -0
  37. package/dist-es/index.js +7 -0
  38. package/dist-es/models/PartnerCentralChannelServiceException.js +8 -0
  39. package/dist-es/models/enums.js +76 -0
  40. package/dist-es/models/errors.js +114 -0
  41. package/dist-es/models/models_0.js +1 -0
  42. package/dist-es/pagination/Interfaces.js +1 -0
  43. package/dist-es/pagination/ListChannelHandshakesPaginator.js +4 -0
  44. package/dist-es/pagination/ListProgramManagementAccountsPaginator.js +4 -0
  45. package/dist-es/pagination/ListRelationshipsPaginator.js +4 -0
  46. package/dist-es/pagination/index.js +4 -0
  47. package/dist-es/runtimeConfig.browser.js +34 -0
  48. package/dist-es/runtimeConfig.js +52 -0
  49. package/dist-es/runtimeConfig.native.js +11 -0
  50. package/dist-es/runtimeConfig.shared.js +44 -0
  51. package/dist-es/runtimeExtensions.js +9 -0
  52. package/dist-es/schemas/schemas_0.js +795 -0
  53. package/dist-types/PartnerCentralChannel.d.ts +129 -0
  54. package/dist-types/PartnerCentralChannelClient.d.ts +213 -0
  55. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  56. package/dist-types/auth/httpAuthSchemeProvider.d.ts +83 -0
  57. package/dist-types/commands/AcceptChannelHandshakeCommand.d.ts +114 -0
  58. package/dist-types/commands/CancelChannelHandshakeCommand.d.ts +114 -0
  59. package/dist-types/commands/CreateChannelHandshakeCommand.d.ts +226 -0
  60. package/dist-types/commands/CreateProgramManagementAccountCommand.d.ts +130 -0
  61. package/dist-types/commands/CreateRelationshipCommand.d.ts +151 -0
  62. package/dist-types/commands/DeleteProgramManagementAccountCommand.d.ts +107 -0
  63. package/dist-types/commands/DeleteRelationshipCommand.d.ts +109 -0
  64. package/dist-types/commands/GetRelationshipCommand.d.ts +134 -0
  65. package/dist-types/commands/ListChannelHandshakesCommand.d.ts +360 -0
  66. package/dist-types/commands/ListProgramManagementAccountsCommand.d.ts +168 -0
  67. package/dist-types/commands/ListRelationshipsCommand.d.ts +169 -0
  68. package/dist-types/commands/ListTagsForResourceCommand.d.ts +114 -0
  69. package/dist-types/commands/RejectChannelHandshakeCommand.d.ts +114 -0
  70. package/dist-types/commands/TagResourceCommand.d.ts +115 -0
  71. package/dist-types/commands/UntagResourceCommand.d.ts +109 -0
  72. package/dist-types/commands/UpdateProgramManagementAccountCommand.d.ts +123 -0
  73. package/dist-types/commands/UpdateRelationshipCommand.d.ts +140 -0
  74. package/dist-types/commands/index.d.ts +17 -0
  75. package/dist-types/endpoint/EndpointParameters.d.ts +32 -0
  76. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  77. package/dist-types/endpoint/ruleset.d.ts +2 -0
  78. package/dist-types/extensionConfiguration.d.ts +9 -0
  79. package/dist-types/index.d.ts +16 -0
  80. package/dist-types/models/PartnerCentralChannelServiceException.d.ts +14 -0
  81. package/dist-types/models/enums.d.ts +220 -0
  82. package/dist-types/models/errors.d.ts +153 -0
  83. package/dist-types/models/models_0.d.ts +1677 -0
  84. package/dist-types/pagination/Interfaces.d.ts +8 -0
  85. package/dist-types/pagination/ListChannelHandshakesPaginator.d.ts +7 -0
  86. package/dist-types/pagination/ListProgramManagementAccountsPaginator.d.ts +7 -0
  87. package/dist-types/pagination/ListRelationshipsPaginator.d.ts +7 -0
  88. package/dist-types/pagination/index.d.ts +4 -0
  89. package/dist-types/runtimeConfig.browser.d.ts +52 -0
  90. package/dist-types/runtimeConfig.d.ts +52 -0
  91. package/dist-types/runtimeConfig.native.d.ts +51 -0
  92. package/dist-types/runtimeConfig.shared.d.ts +24 -0
  93. package/dist-types/runtimeExtensions.d.ts +17 -0
  94. package/dist-types/schemas/schemas_0.d.ts +112 -0
  95. package/dist-types/ts3.4/PartnerCentralChannel.d.ts +296 -0
  96. package/dist-types/ts3.4/PartnerCentralChannelClient.d.ts +228 -0
  97. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  98. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +59 -0
  99. package/dist-types/ts3.4/commands/AcceptChannelHandshakeCommand.d.ts +51 -0
  100. package/dist-types/ts3.4/commands/CancelChannelHandshakeCommand.d.ts +51 -0
  101. package/dist-types/ts3.4/commands/CreateChannelHandshakeCommand.d.ts +51 -0
  102. package/dist-types/ts3.4/commands/CreateProgramManagementAccountCommand.d.ts +51 -0
  103. package/dist-types/ts3.4/commands/CreateRelationshipCommand.d.ts +51 -0
  104. package/dist-types/ts3.4/commands/DeleteProgramManagementAccountCommand.d.ts +51 -0
  105. package/dist-types/ts3.4/commands/DeleteRelationshipCommand.d.ts +51 -0
  106. package/dist-types/ts3.4/commands/GetRelationshipCommand.d.ts +50 -0
  107. package/dist-types/ts3.4/commands/ListChannelHandshakesCommand.d.ts +51 -0
  108. package/dist-types/ts3.4/commands/ListProgramManagementAccountsCommand.d.ts +51 -0
  109. package/dist-types/ts3.4/commands/ListRelationshipsCommand.d.ts +51 -0
  110. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
  111. package/dist-types/ts3.4/commands/RejectChannelHandshakeCommand.d.ts +51 -0
  112. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
  113. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
  114. package/dist-types/ts3.4/commands/UpdateProgramManagementAccountCommand.d.ts +51 -0
  115. package/dist-types/ts3.4/commands/UpdateRelationshipCommand.d.ts +51 -0
  116. package/dist-types/ts3.4/commands/index.d.ts +17 -0
  117. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
  118. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  119. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  120. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  121. package/dist-types/ts3.4/index.d.ts +11 -0
  122. package/dist-types/ts3.4/models/PartnerCentralChannelServiceException.d.ts +9 -0
  123. package/dist-types/ts3.4/models/enums.d.ts +106 -0
  124. package/dist-types/ts3.4/models/errors.d.ts +68 -0
  125. package/dist-types/ts3.4/models/models_0.d.ts +542 -0
  126. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  127. package/dist-types/ts3.4/pagination/ListChannelHandshakesPaginator.d.ts +11 -0
  128. package/dist-types/ts3.4/pagination/ListProgramManagementAccountsPaginator.d.ts +11 -0
  129. package/dist-types/ts3.4/pagination/ListRelationshipsPaginator.d.ts +11 -0
  130. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  131. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +103 -0
  132. package/dist-types/ts3.4/runtimeConfig.d.ts +98 -0
  133. package/dist-types/ts3.4/runtimeConfig.native.d.ts +107 -0
  134. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +34 -0
  135. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  136. package/dist-types/ts3.4/schemas/schemas_0.d.ts +117 -0
  137. package/package.json +100 -0
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
10
+ const invalid_dependency_1 = require("@smithy/invalid-dependency");
11
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
12
+ const util_retry_1 = require("@smithy/util-retry");
13
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
14
+ const smithy_client_1 = require("@smithy/smithy-client");
15
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
16
+ const getRuntimeConfig = (config) => {
17
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
18
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
19
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
+ return {
21
+ ...clientSharedValues,
22
+ ...config,
23
+ runtime: "browser",
24
+ defaultsMode,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
26
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
28
+ (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
29
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
30
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
31
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
32
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
33
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
34
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
35
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
36
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
37
+ };
38
+ };
39
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const core_1 = require("@aws-sdk/core");
7
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
8
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
9
+ const config_resolver_1 = require("@smithy/config-resolver");
10
+ const hash_node_1 = require("@smithy/hash-node");
11
+ const middleware_retry_1 = require("@smithy/middleware-retry");
12
+ const node_config_provider_1 = require("@smithy/node-config-provider");
13
+ const node_http_handler_1 = require("@smithy/node-http-handler");
14
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
15
+ const util_retry_1 = require("@smithy/util-retry");
16
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
17
+ const smithy_client_1 = require("@smithy/smithy-client");
18
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
19
+ const smithy_client_2 = require("@smithy/smithy-client");
20
+ const getRuntimeConfig = (config) => {
21
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
22
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
24
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
25
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
26
+ const loaderConfig = {
27
+ profile: config?.profile,
28
+ logger: clientSharedValues.logger,
29
+ };
30
+ return {
31
+ ...clientSharedValues,
32
+ ...config,
33
+ runtime: "node",
34
+ defaultsMode,
35
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
36
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
37
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
38
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
39
+ (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
40
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
41
+ region: config?.region ??
42
+ (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
43
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
44
+ retryMode: config?.retryMode ??
45
+ (0, node_config_provider_1.loadConfig)({
46
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
47
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
48
+ }, config),
49
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
50
+ sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
51
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
52
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
53
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
54
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
55
+ };
56
+ };
57
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const protocols_1 = require("@aws-sdk/core/protocols");
6
+ const signature_v4_multi_region_1 = require("@aws-sdk/signature-v4-multi-region");
7
+ const smithy_client_1 = require("@smithy/smithy-client");
8
+ const url_parser_1 = require("@smithy/url-parser");
9
+ const util_base64_1 = require("@smithy/util-base64");
10
+ const util_utf8_1 = require("@smithy/util-utf8");
11
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
12
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
13
+ const getRuntimeConfig = (config) => {
14
+ return {
15
+ apiVersion: "2024-03-18",
16
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
17
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
18
+ disableHostPrefix: config?.disableHostPrefix ?? false,
19
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
20
+ extensions: config?.extensions ?? [],
21
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultPartnerCentralChannelHttpAuthSchemeProvider,
22
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
23
+ {
24
+ schemeId: "aws.auth#sigv4",
25
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
26
+ signer: new core_1.AwsSdkSigV4Signer(),
27
+ },
28
+ {
29
+ schemeId: "aws.auth#sigv4a",
30
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
31
+ signer: new core_1.AwsSdkSigV4ASigner(),
32
+ },
33
+ ],
34
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
35
+ protocol: config?.protocol ??
36
+ new protocols_1.AwsJson1_0Protocol({
37
+ defaultNamespace: "com.amazonaws.partnercentralchannel",
38
+ serviceTarget: "PartnerCentralChannel",
39
+ awsQueryCompatible: false,
40
+ }),
41
+ serviceId: config?.serviceId ?? "PartnerCentral Channel",
42
+ signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
43
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
44
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
45
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
46
+ };
47
+ };
48
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,41 @@
1
+ import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { AcceptChannelHandshakeCommand, } from "./commands/AcceptChannelHandshakeCommand";
3
+ import { CancelChannelHandshakeCommand, } from "./commands/CancelChannelHandshakeCommand";
4
+ import { CreateChannelHandshakeCommand, } from "./commands/CreateChannelHandshakeCommand";
5
+ import { CreateProgramManagementAccountCommand, } from "./commands/CreateProgramManagementAccountCommand";
6
+ import { CreateRelationshipCommand, } from "./commands/CreateRelationshipCommand";
7
+ import { DeleteProgramManagementAccountCommand, } from "./commands/DeleteProgramManagementAccountCommand";
8
+ import { DeleteRelationshipCommand, } from "./commands/DeleteRelationshipCommand";
9
+ import { GetRelationshipCommand, } from "./commands/GetRelationshipCommand";
10
+ import { ListChannelHandshakesCommand, } from "./commands/ListChannelHandshakesCommand";
11
+ import { ListProgramManagementAccountsCommand, } from "./commands/ListProgramManagementAccountsCommand";
12
+ import { ListRelationshipsCommand, } from "./commands/ListRelationshipsCommand";
13
+ import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
14
+ import { RejectChannelHandshakeCommand, } from "./commands/RejectChannelHandshakeCommand";
15
+ import { TagResourceCommand } from "./commands/TagResourceCommand";
16
+ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
17
+ import { UpdateProgramManagementAccountCommand, } from "./commands/UpdateProgramManagementAccountCommand";
18
+ import { UpdateRelationshipCommand, } from "./commands/UpdateRelationshipCommand";
19
+ import { PartnerCentralChannelClient } from "./PartnerCentralChannelClient";
20
+ const commands = {
21
+ AcceptChannelHandshakeCommand,
22
+ CancelChannelHandshakeCommand,
23
+ CreateChannelHandshakeCommand,
24
+ CreateProgramManagementAccountCommand,
25
+ CreateRelationshipCommand,
26
+ DeleteProgramManagementAccountCommand,
27
+ DeleteRelationshipCommand,
28
+ GetRelationshipCommand,
29
+ ListChannelHandshakesCommand,
30
+ ListProgramManagementAccountsCommand,
31
+ ListRelationshipsCommand,
32
+ ListTagsForResourceCommand,
33
+ RejectChannelHandshakeCommand,
34
+ TagResourceCommand,
35
+ UntagResourceCommand,
36
+ UpdateProgramManagementAccountCommand,
37
+ UpdateRelationshipCommand,
38
+ };
39
+ export class PartnerCentralChannel extends PartnerCentralChannelClient {
40
+ }
41
+ createAggregatedClient(commands, PartnerCentralChannel);
@@ -0,0 +1,51 @@
1
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
2
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
3
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
4
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
5
+ import { resolveRegionConfig } from "@smithy/config-resolver";
6
+ import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
+ import { getSchemaSerdePlugin } from "@smithy/core/schema";
8
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
9
+ import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
10
+ import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
11
+ import { Client as __Client, } from "@smithy/smithy-client";
12
+ import { defaultPartnerCentralChannelHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
13
+ import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
14
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
15
+ import { resolveRuntimeExtensions } from "./runtimeExtensions";
16
+ export { __Client };
17
+ export class PartnerCentralChannelClient extends __Client {
18
+ config;
19
+ constructor(...[configuration]) {
20
+ const _config_0 = __getRuntimeConfig(configuration || {});
21
+ super(_config_0);
22
+ this.initConfig = _config_0;
23
+ const _config_1 = resolveClientEndpointParameters(_config_0);
24
+ const _config_2 = resolveUserAgentConfig(_config_1);
25
+ const _config_3 = resolveRetryConfig(_config_2);
26
+ const _config_4 = resolveRegionConfig(_config_3);
27
+ const _config_5 = resolveHostHeaderConfig(_config_4);
28
+ const _config_6 = resolveEndpointConfig(_config_5);
29
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
30
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
31
+ this.config = _config_8;
32
+ this.middlewareStack.use(getSchemaSerdePlugin(this.config));
33
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
34
+ this.middlewareStack.use(getRetryPlugin(this.config));
35
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
36
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
37
+ this.middlewareStack.use(getLoggerPlugin(this.config));
38
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
39
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
40
+ httpAuthSchemeParametersProvider: defaultPartnerCentralChannelHttpAuthSchemeParametersProvider,
41
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
42
+ "aws.auth#sigv4": config.credentials,
43
+ "aws.auth#sigv4a": config.credentials,
44
+ }),
45
+ }));
46
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
47
+ }
48
+ destroy() {
49
+ super.destroy();
50
+ }
51
+ }
@@ -0,0 +1,38 @@
1
+ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
3
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
4
+ let _credentials = runtimeConfig.credentials;
5
+ return {
6
+ setHttpAuthScheme(httpAuthScheme) {
7
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
8
+ if (index === -1) {
9
+ _httpAuthSchemes.push(httpAuthScheme);
10
+ }
11
+ else {
12
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
13
+ }
14
+ },
15
+ httpAuthSchemes() {
16
+ return _httpAuthSchemes;
17
+ },
18
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
19
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
20
+ },
21
+ httpAuthSchemeProvider() {
22
+ return _httpAuthSchemeProvider;
23
+ },
24
+ setCredentials(credentials) {
25
+ _credentials = credentials;
26
+ },
27
+ credentials() {
28
+ return _credentials;
29
+ },
30
+ };
31
+ };
32
+ export const resolveHttpAuthRuntimeConfig = (config) => {
33
+ return {
34
+ httpAuthSchemes: config.httpAuthSchemes(),
35
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
36
+ credentials: config.credentials(),
37
+ };
38
+ };
@@ -0,0 +1,123 @@
1
+ import { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
2
+ import { SignatureV4MultiRegion } from "@aws-sdk/signature-v4-multi-region";
3
+ import { resolveParams } from "@smithy/middleware-endpoint";
4
+ import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
5
+ import { defaultEndpointResolver } from "../endpoint/endpointResolver";
6
+ const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
7
+ if (!input) {
8
+ throw new Error(`Could not find \`input\` for \`defaultEndpointRuleSetHttpAuthSchemeParametersProvider\``);
9
+ }
10
+ const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
11
+ const instructionsFn = getSmithyContext(context)?.commandInstance?.constructor
12
+ ?.getEndpointParameterInstructions;
13
+ if (!instructionsFn) {
14
+ throw new Error(`getEndpointParameterInstructions() is not defined on \`${context.commandName}\``);
15
+ }
16
+ const endpointParameters = await resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
17
+ return Object.assign(defaultParameters, endpointParameters);
18
+ };
19
+ const _defaultPartnerCentralChannelHttpAuthSchemeParametersProvider = async (config, context, input) => {
20
+ return {
21
+ operation: getSmithyContext(context).operation,
22
+ region: (await normalizeProvider(config.region)()) ||
23
+ (() => {
24
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
25
+ })(),
26
+ };
27
+ };
28
+ export const defaultPartnerCentralChannelHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultPartnerCentralChannelHttpAuthSchemeParametersProvider);
29
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
30
+ return {
31
+ schemeId: "aws.auth#sigv4",
32
+ signingProperties: {
33
+ name: "partnercentral-channel",
34
+ region: authParameters.region,
35
+ },
36
+ propertiesExtractor: (config, context) => ({
37
+ signingProperties: {
38
+ config,
39
+ context,
40
+ },
41
+ }),
42
+ };
43
+ }
44
+ function createAwsAuthSigv4aHttpAuthOption(authParameters) {
45
+ return {
46
+ schemeId: "aws.auth#sigv4a",
47
+ signingProperties: {
48
+ name: "partnercentral-channel",
49
+ region: authParameters.region,
50
+ },
51
+ propertiesExtractor: (config, context) => ({
52
+ signingProperties: {
53
+ config,
54
+ context,
55
+ },
56
+ }),
57
+ };
58
+ }
59
+ const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
60
+ const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
61
+ const endpoint = defaultEndpointResolver(authParameters);
62
+ const authSchemes = endpoint.properties?.authSchemes;
63
+ if (!authSchemes) {
64
+ return defaultHttpAuthSchemeResolver(authParameters);
65
+ }
66
+ const options = [];
67
+ for (const scheme of authSchemes) {
68
+ const { name: resolvedName, properties = {}, ...rest } = scheme;
69
+ const name = resolvedName.toLowerCase();
70
+ if (resolvedName !== name) {
71
+ console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${resolvedName}\` to \`${name}\``);
72
+ }
73
+ let schemeId;
74
+ if (name === "sigv4a") {
75
+ schemeId = "aws.auth#sigv4a";
76
+ const sigv4Present = authSchemes.find((s) => {
77
+ const name = s.name.toLowerCase();
78
+ return name !== "sigv4a" && name.startsWith("sigv4");
79
+ });
80
+ if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
81
+ continue;
82
+ }
83
+ }
84
+ else if (name.startsWith("sigv4")) {
85
+ schemeId = "aws.auth#sigv4";
86
+ }
87
+ else {
88
+ throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${name}\``);
89
+ }
90
+ const createOption = createHttpAuthOptionFunctions[schemeId];
91
+ if (!createOption) {
92
+ throw new Error(`Could not find HttpAuthOption create function for \`${schemeId}\``);
93
+ }
94
+ const option = createOption(authParameters);
95
+ option.schemeId = schemeId;
96
+ option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };
97
+ options.push(option);
98
+ }
99
+ return options;
100
+ };
101
+ return endpointRuleSetHttpAuthSchemeProvider;
102
+ };
103
+ const _defaultPartnerCentralChannelHttpAuthSchemeProvider = (authParameters) => {
104
+ const options = [];
105
+ switch (authParameters.operation) {
106
+ default: {
107
+ options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
108
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
109
+ }
110
+ }
111
+ return options;
112
+ };
113
+ export const defaultPartnerCentralChannelHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultPartnerCentralChannelHttpAuthSchemeProvider, {
114
+ "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
115
+ "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
116
+ });
117
+ export const resolveHttpAuthSchemeConfig = (config) => {
118
+ const config_0 = resolveAwsSdkSigV4Config(config);
119
+ const config_1 = resolveAwsSdkSigV4AConfig(config_0);
120
+ return Object.assign(config_1, {
121
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
122
+ });
123
+ };
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { AcceptChannelHandshake } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class AcceptChannelHandshakeCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "AcceptChannelHandshake", {})
13
+ .n("PartnerCentralChannelClient", "AcceptChannelHandshakeCommand")
14
+ .sc(AcceptChannelHandshake)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { CancelChannelHandshake } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class CancelChannelHandshakeCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "CancelChannelHandshake", {})
13
+ .n("PartnerCentralChannelClient", "CancelChannelHandshakeCommand")
14
+ .sc(CancelChannelHandshake)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { CreateChannelHandshake } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class CreateChannelHandshakeCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "CreateChannelHandshake", {})
13
+ .n("PartnerCentralChannelClient", "CreateChannelHandshakeCommand")
14
+ .sc(CreateChannelHandshake)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { CreateProgramManagementAccount } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class CreateProgramManagementAccountCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "CreateProgramManagementAccount", {})
13
+ .n("PartnerCentralChannelClient", "CreateProgramManagementAccountCommand")
14
+ .sc(CreateProgramManagementAccount)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { CreateRelationship } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class CreateRelationshipCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "CreateRelationship", {})
13
+ .n("PartnerCentralChannelClient", "CreateRelationshipCommand")
14
+ .sc(CreateRelationship)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { DeleteProgramManagementAccount } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class DeleteProgramManagementAccountCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "DeleteProgramManagementAccount", {})
13
+ .n("PartnerCentralChannelClient", "DeleteProgramManagementAccountCommand")
14
+ .sc(DeleteProgramManagementAccount)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { DeleteRelationship } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class DeleteRelationshipCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "DeleteRelationship", {})
13
+ .n("PartnerCentralChannelClient", "DeleteRelationshipCommand")
14
+ .sc(DeleteRelationship)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { GetRelationship } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class GetRelationshipCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "GetRelationship", {})
13
+ .n("PartnerCentralChannelClient", "GetRelationshipCommand")
14
+ .sc(GetRelationship)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { ListChannelHandshakes } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class ListChannelHandshakesCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "ListChannelHandshakes", {})
13
+ .n("PartnerCentralChannelClient", "ListChannelHandshakesCommand")
14
+ .sc(ListChannelHandshakes)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { ListProgramManagementAccounts } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class ListProgramManagementAccountsCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "ListProgramManagementAccounts", {})
13
+ .n("PartnerCentralChannelClient", "ListProgramManagementAccountsCommand")
14
+ .sc(ListProgramManagementAccounts)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { ListRelationships } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class ListRelationshipsCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "ListRelationships", {})
13
+ .n("PartnerCentralChannelClient", "ListRelationshipsCommand")
14
+ .sc(ListRelationships)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { ListTagsForResource } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class ListTagsForResourceCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "ListTagsForResource", {})
13
+ .n("PartnerCentralChannelClient", "ListTagsForResourceCommand")
14
+ .sc(ListTagsForResource)
15
+ .build() {
16
+ }
@@ -0,0 +1,16 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { commonParams } from "../endpoint/EndpointParameters";
4
+ import { RejectChannelHandshake } from "../schemas/schemas_0";
5
+ export { $Command };
6
+ export class RejectChannelHandshakeCommand extends $Command
7
+ .classBuilder()
8
+ .ep(commonParams)
9
+ .m(function (Command, cs, config, o) {
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
+ })
12
+ .s("PartnerCentralChannel", "RejectChannelHandshake", {})
13
+ .n("PartnerCentralChannelClient", "RejectChannelHandshakeCommand")
14
+ .sc(RejectChannelHandshake)
15
+ .build() {
16
+ }