@aws-sdk/client-partnercentral-channel 3.1075.0 → 3.1076.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.
@@ -14,7 +14,7 @@ export declare const getRuntimeConfig: (config: PartnerCentralChannelClientConfi
14
14
  requestHandler: import("@smithy/core/protocols").HttpHandler<any> | RequestHandler;
15
15
  retryMode: string | import("@smithy/types").Provider<string>;
16
16
  sha256: import("@smithy/types").HashConstructor;
17
- streamCollector: import("@smithy/types").StreamCollector;
17
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
18
18
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
19
19
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
20
20
  cacheMiddleware?: boolean | undefined;
@@ -16,7 +16,7 @@ export declare const getRuntimeConfig: (config: PartnerCentralChannelClientConfi
16
16
  retryMode: string | import("@smithy/types").Provider<string>;
17
17
  sha256: import("@smithy/types").HashConstructor;
18
18
  sigv4aSigningRegionSet: string[] | import("@smithy/types").Provider<string[] | undefined>;
19
- streamCollector: import("@smithy/types").StreamCollector;
19
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
20
20
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
21
21
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
22
22
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -15,7 +15,7 @@ export declare const getRuntimeConfig: (config: PartnerCentralChannelClientConfi
15
15
  apiVersion: string;
16
16
  urlParser: import("@smithy/types").UrlParser;
17
17
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
18
- streamCollector: import("@smithy/types").StreamCollector;
18
+ streamCollector: (stream: import("stream").Readable | import("stream/web").ReadableStream | ReadableStream | Blob) => Promise<Uint8Array>;
19
19
  base64Decoder: import("@smithy/types").Decoder;
20
20
  base64Encoder: (_input: Uint8Array | string) => string;
21
21
  utf8Decoder: import("@smithy/types").Decoder;
@@ -23,7 +23,13 @@ export declare const getRuntimeConfig: (
23
23
  | RequestHandler;
24
24
  retryMode: string | import("@smithy/types").Provider<string>;
25
25
  sha256: import("@smithy/types").HashConstructor;
26
- streamCollector: import("@smithy/types").StreamCollector;
26
+ streamCollector: (
27
+ stream:
28
+ | import("stream").Readable
29
+ | import("stream/web").ReadableStream
30
+ | ReadableStream
31
+ | Blob
32
+ ) => Promise<Uint8Array>;
27
33
  useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
28
34
  (boolean | import("@smithy/types").Provider<boolean | undefined>);
29
35
  useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
@@ -27,7 +27,13 @@ export declare const getRuntimeConfig: (
27
27
  sigv4aSigningRegionSet:
28
28
  | string[]
29
29
  | import("@smithy/types").Provider<string[] | undefined>;
30
- streamCollector: import("@smithy/types").StreamCollector;
30
+ streamCollector: (
31
+ stream:
32
+ | import("stream").Readable
33
+ | import("stream/web").ReadableStream
34
+ | ReadableStream
35
+ | Blob
36
+ ) => Promise<Uint8Array>;
31
37
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
32
38
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
33
39
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
@@ -22,7 +22,13 @@ export declare const getRuntimeConfig: (
22
22
  apiVersion: string;
23
23
  urlParser: import("@smithy/types").UrlParser;
24
24
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
25
- streamCollector: import("@smithy/types").StreamCollector;
25
+ streamCollector: (
26
+ stream:
27
+ | import("stream").Readable
28
+ | import("stream/web").ReadableStream
29
+ | ReadableStream
30
+ | Blob
31
+ ) => Promise<Uint8Array>;
26
32
  base64Decoder: import("@smithy/types").Decoder;
27
33
  base64Encoder: (_input: Uint8Array | string) => string;
28
34
  utf8Decoder: import("@smithy/types").Decoder;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-partnercentral-channel",
3
3
  "description": "AWS SDK for JavaScript Partnercentral Channel Client for Node.js, Browser and React Native",
4
- "version": "3.1075.0",
4
+ "version": "3.1076.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline",
@@ -21,14 +21,14 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "5.2.0",
23
23
  "@aws-crypto/sha256-js": "5.2.0",
24
- "@aws-sdk/core": "^3.974.23",
25
- "@aws-sdk/credential-provider-node": "^3.972.58",
26
- "@aws-sdk/signature-v4-multi-region": "^3.996.35",
27
- "@aws-sdk/types": "^3.973.13",
28
- "@smithy/core": "^3.24.6",
29
- "@smithy/fetch-http-handler": "^5.4.6",
30
- "@smithy/node-http-handler": "^4.7.6",
31
- "@smithy/types": "^4.14.3",
24
+ "@aws-sdk/core": "^3.974.24",
25
+ "@aws-sdk/credential-provider-node": "^3.972.59",
26
+ "@aws-sdk/signature-v4-multi-region": "^3.996.36",
27
+ "@aws-sdk/types": "^3.973.14",
28
+ "@smithy/core": "^3.27.0",
29
+ "@smithy/fetch-http-handler": "^5.6.0",
30
+ "@smithy/node-http-handler": "^4.9.0",
31
+ "@smithy/types": "^4.15.0",
32
32
  "tslib": "^2.6.2"
33
33
  },
34
34
  "devDependencies": {
@@ -1,122 +0,0 @@
1
- const { resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
3
- const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
4
- const { resolveParams } = require("@smithy/core/endpoints");
5
- const { defaultEndpointResolver } = require("../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
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
24
- })(),
25
- };
26
- };
27
- exports.defaultPartnerCentralChannelHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultPartnerCentralChannelHttpAuthSchemeParametersProvider);
28
- function createAwsAuthSigv4HttpAuthOption(authParameters) {
29
- return {
30
- schemeId: "aws.auth#sigv4",
31
- signingProperties: {
32
- name: "partnercentral-channel",
33
- region: authParameters.region,
34
- },
35
- propertiesExtractor: (config, context) => ({
36
- signingProperties: {
37
- config,
38
- context,
39
- },
40
- }),
41
- };
42
- }
43
- function createAwsAuthSigv4aHttpAuthOption(authParameters) {
44
- return {
45
- schemeId: "aws.auth#sigv4a",
46
- signingProperties: {
47
- name: "partnercentral-channel",
48
- region: authParameters.region,
49
- },
50
- propertiesExtractor: (config, context) => ({
51
- signingProperties: {
52
- config,
53
- context,
54
- },
55
- }),
56
- };
57
- }
58
- const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
59
- const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
60
- const endpoint = defaultEndpointResolver(authParameters);
61
- const authSchemes = endpoint.properties?.authSchemes;
62
- if (!authSchemes) {
63
- return defaultHttpAuthSchemeResolver(authParameters);
64
- }
65
- const options = [];
66
- for (const scheme of authSchemes) {
67
- const { name: resolvedName, properties = {}, ...rest } = scheme;
68
- const name = resolvedName.toLowerCase();
69
- if (resolvedName !== name) {
70
- console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
71
- }
72
- let schemeId;
73
- if (name === "sigv4a") {
74
- schemeId = "aws.auth#sigv4a";
75
- const sigv4Present = authSchemes.find((s) => {
76
- const name = s.name.toLowerCase();
77
- return name !== "sigv4a" && name.startsWith("sigv4");
78
- });
79
- if (SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
80
- continue;
81
- }
82
- }
83
- else if (name.startsWith("sigv4")) {
84
- schemeId = "aws.auth#sigv4";
85
- }
86
- else {
87
- throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
88
- }
89
- const createOption = createHttpAuthOptionFunctions[schemeId];
90
- if (!createOption) {
91
- throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
92
- }
93
- const option = createOption(authParameters);
94
- option.schemeId = schemeId;
95
- option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };
96
- options.push(option);
97
- }
98
- return options;
99
- };
100
- return endpointRuleSetHttpAuthSchemeProvider;
101
- };
102
- const _defaultPartnerCentralChannelHttpAuthSchemeProvider = (authParameters) => {
103
- const options = [];
104
- switch (authParameters.operation) {
105
- default: {
106
- options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
107
- options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
108
- }
109
- }
110
- return options;
111
- };
112
- exports.defaultPartnerCentralChannelHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultPartnerCentralChannelHttpAuthSchemeProvider, {
113
- "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
114
- "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
115
- });
116
- exports.resolveHttpAuthSchemeConfig = (config) => {
117
- const config_0 = resolveAwsSdkSigV4Config(config);
118
- const config_1 = resolveAwsSdkSigV4AConfig(config_0);
119
- return Object.assign(config_1, {
120
- authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
121
- });
122
- };
@@ -1,35 +0,0 @@
1
- const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
2
- const i = "authSchemes", j = "name", k = "signingRegion";
3
- const a = "isSet", b = "PartitionResult", c = "sigv4", d = { "ref": "Endpoint" }, e = { [j]: "sigv4a", "signingRegionSet": ["*"] }, f = { [i]: [e, { [j]: c, [k]: "us-gov-west-1" }] }, g = { [i]: [e, { [j]: c, [k]: "{PartitionResult#implicitGlobalRegion}" }] }, h = [{ "ref": "Region" }];
4
- const _data = {
5
- conditions: [
6
- [a, [d]],
7
- [a, h],
8
- ["aws.partition", h, b],
9
- ["stringEquals", [{ fn: "getAttr", argv: [{ ref: b }, "name"] }, "aws-us-gov"]],
10
- ["booleanEquals", [{ ref: "UseFIPS" }, true]]
11
- ],
12
- results: [
13
- [-1],
14
- [-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
15
- [d, { [i]: [e, { [j]: c }] }],
16
- ["https://partnercentral-channel.us-gov.{PartitionResult#dualStackDnsSuffix}", f],
17
- ["https://partnercentral-channel-fips.us-gov.{PartitionResult#dualStackDnsSuffix}", f],
18
- ["https://partnercentral-channel-fips.global.{PartitionResult#dualStackDnsSuffix}", g],
19
- ["https://partnercentral-channel.global.{PartitionResult#dualStackDnsSuffix}", g],
20
- [-1, "Invalid Configuration: Missing Region"]
21
- ]
22
- };
23
- const root = 2;
24
- const r = 100_000_000;
25
- const nodes = new Int32Array([
26
- -1, 1, -1,
27
- 0, 8, 3,
28
- 1, 4, r + 7,
29
- 2, 5, r + 7,
30
- 3, 7, 6,
31
- 4, r + 5, r + 6,
32
- 4, r + 4, r + 3,
33
- 4, r + 1, r + 2,
34
- ]);
35
- exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
@@ -1,14 +0,0 @@
1
- const { awsEndpointFunctions } = require("@aws-sdk/core/client");
2
- const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
3
- const { bdd } = require("./bdd");
4
- const cache = new EndpointCache({
5
- size: 50,
6
- params: ["Endpoint", "Region", "UseFIPS"],
7
- });
8
- exports.defaultEndpointResolver = (endpointParams, context = {}) => {
9
- return cache.get(endpointParams, () => decideEndpoint(bdd, {
10
- endpointParams: endpointParams,
11
- logger: context.logger,
12
- }));
13
- };
14
- customEndpointFunctions.aws = awsEndpointFunctions;
@@ -1,8 +0,0 @@
1
- const { ServiceException: __ServiceException } = require("@smithy/core/client");
2
- exports.__ServiceException = __ServiceException;
3
- exports.PartnerCentralChannelServiceException = class PartnerCentralChannelServiceException extends __ServiceException {
4
- constructor(options) {
5
- super(options);
6
- Object.setPrototypeOf(this, PartnerCentralChannelServiceException.prototype);
7
- }
8
- };
@@ -1,114 +0,0 @@
1
- const { PartnerCentralChannelServiceException: __BaseException } = require("./PartnerCentralChannelServiceException");
2
- exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
3
- name = "AccessDeniedException";
4
- $fault = "client";
5
- reason;
6
- constructor(opts) {
7
- super({
8
- name: "AccessDeniedException",
9
- $fault: "client",
10
- ...opts,
11
- });
12
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
- this.reason = opts.reason;
14
- }
15
- };
16
- exports.InternalServerException = class InternalServerException extends __BaseException {
17
- name = "InternalServerException";
18
- $fault = "server";
19
- $retryable = {};
20
- constructor(opts) {
21
- super({
22
- name: "InternalServerException",
23
- $fault: "server",
24
- ...opts,
25
- });
26
- Object.setPrototypeOf(this, InternalServerException.prototype);
27
- }
28
- };
29
- exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
30
- name = "ResourceNotFoundException";
31
- $fault = "client";
32
- resourceId;
33
- resourceType;
34
- constructor(opts) {
35
- super({
36
- name: "ResourceNotFoundException",
37
- $fault: "client",
38
- ...opts,
39
- });
40
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
41
- this.resourceId = opts.resourceId;
42
- this.resourceType = opts.resourceType;
43
- }
44
- };
45
- exports.ThrottlingException = class ThrottlingException extends __BaseException {
46
- name = "ThrottlingException";
47
- $fault = "client";
48
- $retryable = {
49
- throttling: true,
50
- };
51
- serviceCode;
52
- quotaCode;
53
- constructor(opts) {
54
- super({
55
- name: "ThrottlingException",
56
- $fault: "client",
57
- ...opts,
58
- });
59
- Object.setPrototypeOf(this, ThrottlingException.prototype);
60
- this.serviceCode = opts.serviceCode;
61
- this.quotaCode = opts.quotaCode;
62
- }
63
- };
64
- exports.ValidationException = class ValidationException extends __BaseException {
65
- name = "ValidationException";
66
- $fault = "client";
67
- reason;
68
- fieldList;
69
- constructor(opts) {
70
- super({
71
- name: "ValidationException",
72
- $fault: "client",
73
- ...opts,
74
- });
75
- Object.setPrototypeOf(this, ValidationException.prototype);
76
- this.reason = opts.reason;
77
- this.fieldList = opts.fieldList;
78
- }
79
- };
80
- exports.ConflictException = class ConflictException extends __BaseException {
81
- name = "ConflictException";
82
- $fault = "client";
83
- resourceId;
84
- resourceType;
85
- constructor(opts) {
86
- super({
87
- name: "ConflictException",
88
- $fault: "client",
89
- ...opts,
90
- });
91
- Object.setPrototypeOf(this, ConflictException.prototype);
92
- this.resourceId = opts.resourceId;
93
- this.resourceType = opts.resourceType;
94
- }
95
- };
96
- exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
97
- name = "ServiceQuotaExceededException";
98
- $fault = "client";
99
- $retryable = {};
100
- resourceId;
101
- resourceType;
102
- quotaCode;
103
- constructor(opts) {
104
- super({
105
- name: "ServiceQuotaExceededException",
106
- $fault: "client",
107
- ...opts,
108
- });
109
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
110
- this.resourceId = opts.resourceId;
111
- this.resourceType = opts.resourceType;
112
- this.quotaCode = opts.quotaCode;
113
- }
114
- };
@@ -1,32 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
- const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
7
- const { calculateBodyLength } = require("@smithy/core/serde");
8
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
9
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
10
- const getRuntimeConfig = (config) => {
11
- const defaultsMode = resolveDefaultsModeConfig(config);
12
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
13
- const clientSharedValues = getSharedRuntimeConfig(config);
14
- return {
15
- ...clientSharedValues,
16
- ...config,
17
- runtime: "browser",
18
- defaultsMode,
19
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
20
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
21
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
22
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
23
- region: config?.region ?? invalidProvider("Region is missing"),
24
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
25
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
26
- sha256: config?.sha256 ?? Sha256,
27
- streamCollector: config?.streamCollector ?? streamCollector,
28
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
29
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
30
- };
31
- };
32
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,46 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, NODE_SIGV4A_CONFIG_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
- const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
7
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
8
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
9
- const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- emitWarningIfUnsupportedVersion(process.version);
13
- const defaultsMode = resolveDefaultsModeConfig(config);
14
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
- const clientSharedValues = getSharedRuntimeConfig(config);
16
- awsCheckVersion(process.version);
17
- const loaderConfig = {
18
- profile: config?.profile,
19
- logger: clientSharedValues.logger,
20
- };
21
- return {
22
- ...clientSharedValues,
23
- ...config,
24
- runtime: "node",
25
- defaultsMode,
26
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
27
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
31
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
32
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
33
- retryMode: config?.retryMode ??
34
- loadNodeConfig({
35
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
- }, config),
38
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
- sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadNodeConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
40
- streamCollector: config?.streamCollector ?? streamCollector,
41
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
42
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
43
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
44
- };
45
- };
46
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,12 +0,0 @@
1
- const { Sha256 } = require("@aws-crypto/sha256-js");
2
- const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
3
- 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
- };
12
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,45 +0,0 @@
1
- const { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { AwsJson1_0Protocol } = require("@aws-sdk/core/protocols");
3
- const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
4
- const { NoOpLogger } = require("@smithy/core/client");
5
- const { parseUrl } = require("@smithy/core/protocols");
6
- const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
7
- const { defaultPartnerCentralChannelHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
8
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
9
- const { errorTypeRegistries } = require("./schemas/schemas_0");
10
- exports.getRuntimeConfig = (config) => {
11
- return {
12
- apiVersion: "2024-03-18",
13
- base64Decoder: config?.base64Decoder ?? fromBase64,
14
- base64Encoder: config?.base64Encoder ?? toBase64,
15
- disableHostPrefix: config?.disableHostPrefix ?? false,
16
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
17
- extensions: config?.extensions ?? [],
18
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultPartnerCentralChannelHttpAuthSchemeProvider,
19
- httpAuthSchemes: config?.httpAuthSchemes ?? [
20
- {
21
- schemeId: "aws.auth#sigv4",
22
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
23
- signer: new AwsSdkSigV4Signer(),
24
- },
25
- {
26
- schemeId: "aws.auth#sigv4a",
27
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
28
- signer: new AwsSdkSigV4ASigner(),
29
- },
30
- ],
31
- logger: config?.logger ?? new NoOpLogger(),
32
- protocol: config?.protocol ?? AwsJson1_0Protocol,
33
- protocolSettings: config?.protocolSettings ?? {
34
- defaultNamespace: "com.amazonaws.partnercentralchannel",
35
- errorTypeRegistries,
36
- version: "2024-03-18",
37
- serviceTarget: "PartnerCentralChannel",
38
- },
39
- serviceId: config?.serviceId ?? "PartnerCentral Channel",
40
- signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
41
- urlParser: config?.urlParser ?? parseUrl,
42
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
43
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
44
- };
45
- };