@aws-sdk/client-uxc 3.1017.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +202 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +206 -0
- package/dist-cjs/models/UxcServiceException.js +12 -0
- package/dist-cjs/models/errors.js +58 -0
- package/dist-cjs/runtimeConfig.browser.js +38 -0
- package/dist-cjs/runtimeConfig.js +53 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +43 -0
- package/dist-cjs/schemas/schemas_0.js +119 -0
- package/dist-es/Uxc.js +17 -0
- package/dist-es/UxcClient.js +50 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commands/GetAccountCustomizationsCommand.js +16 -0
- package/dist-es/commands/ListServicesCommand.js +16 -0
- package/dist-es/commands/UpdateAccountCustomizationsCommand.js +16 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +9 -0
- package/dist-es/models/UxcServiceException.js +8 -0
- package/dist-es/models/enums.js +12 -0
- package/dist-es/models/errors.js +51 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListServicesPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/runtimeConfig.browser.js +33 -0
- package/dist-es/runtimeConfig.js +48 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +39 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +116 -0
- package/dist-types/Uxc.d.ts +41 -0
- package/dist-types/UxcClient.d.ts +190 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/GetAccountCustomizationsCommand.d.ts +111 -0
- package/dist-types/commands/ListServicesCommand.d.ts +108 -0
- package/dist-types/commands/UpdateAccountCustomizationsCommand.d.ts +127 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +44 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +17 -0
- package/dist-types/models/UxcServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +20 -0
- package/dist-types/models/errors.d.ts +56 -0
- package/dist-types/models/models_0.d.ts +112 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListServicesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/runtimeConfig.browser.d.ts +55 -0
- package/dist-types/runtimeConfig.d.ts +55 -0
- package/dist-types/runtimeConfig.native.d.ts +54 -0
- package/dist-types/runtimeConfig.shared.d.ts +27 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +23 -0
- package/dist-types/ts3.4/Uxc.d.ts +70 -0
- package/dist-types/ts3.4/UxcClient.d.ts +134 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +46 -0
- package/dist-types/ts3.4/commands/GetAccountCustomizationsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListServicesCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/UpdateAccountCustomizationsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +12 -0
- package/dist-types/ts3.4/models/UxcServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +13 -0
- package/dist-types/ts3.4/models/errors.d.ts +32 -0
- package/dist-types/ts3.4/models/models_0.d.ts +29 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
- package/dist-types/ts3.4/pagination/ListServicesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +22 -0
- package/package.json +100 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
|
|
2
|
+
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
|
|
3
|
+
export const defaultUxcHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
4
|
+
return {
|
|
5
|
+
operation: getSmithyContext(context).operation,
|
|
6
|
+
region: await normalizeProvider(config.region)() || (() => {
|
|
7
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
8
|
+
})(),
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
12
|
+
return {
|
|
13
|
+
schemeId: "aws.auth#sigv4",
|
|
14
|
+
signingProperties: {
|
|
15
|
+
name: "uxc",
|
|
16
|
+
region: authParameters.region,
|
|
17
|
+
},
|
|
18
|
+
propertiesExtractor: (config, context) => ({
|
|
19
|
+
signingProperties: {
|
|
20
|
+
config,
|
|
21
|
+
context,
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export const defaultUxcHttpAuthSchemeProvider = (authParameters) => {
|
|
27
|
+
const options = [];
|
|
28
|
+
switch (authParameters.operation) {
|
|
29
|
+
default: {
|
|
30
|
+
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return options;
|
|
34
|
+
};
|
|
35
|
+
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
36
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
37
|
+
return Object.assign(config_0, {
|
|
38
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
39
|
+
});
|
|
40
|
+
};
|
|
@@ -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 { GetAccountCustomizations$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class GetAccountCustomizationsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("AWSAccountUXSetting", "GetAccountCustomizations", {})
|
|
13
|
+
.n("UxcClient", "GetAccountCustomizationsCommand")
|
|
14
|
+
.sc(GetAccountCustomizations$)
|
|
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 { ListServices$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class ListServicesCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("AWSAccountUXSetting", "ListServices", {})
|
|
13
|
+
.n("UxcClient", "ListServicesCommand")
|
|
14
|
+
.sc(ListServices$)
|
|
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 { UpdateAccountCustomizations$ } from "../schemas/schemas_0";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class UpdateAccountCustomizationsCommand extends $Command
|
|
7
|
+
.classBuilder()
|
|
8
|
+
.ep(commonParams)
|
|
9
|
+
.m(function (Command, cs, config, o) {
|
|
10
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
11
|
+
})
|
|
12
|
+
.s("AWSAccountUXSetting", "UpdateAccountCustomizations", {})
|
|
13
|
+
.n("UxcClient", "UpdateAccountCustomizationsCommand")
|
|
14
|
+
.sc(UpdateAccountCustomizations$)
|
|
15
|
+
.build() {
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const resolveClientEndpointParameters = (options) => {
|
|
2
|
+
return Object.assign(options, {
|
|
3
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
4
|
+
defaultSigningName: "uxc",
|
|
5
|
+
});
|
|
6
|
+
};
|
|
7
|
+
export const commonParams = {
|
|
8
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
9
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
10
|
+
Region: { type: "builtInParams", name: "region" },
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
|
|
2
|
+
import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
|
|
3
|
+
import { ruleSet } from "./ruleset";
|
|
4
|
+
const cache = new EndpointCache({
|
|
5
|
+
size: 50,
|
|
6
|
+
params: ["Endpoint", "Region", "UseFIPS"],
|
|
7
|
+
});
|
|
8
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
|
|
10
|
+
endpointParams: endpointParams,
|
|
11
|
+
logger: context.logger,
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const l = "ref";
|
|
2
|
+
const a = true, b = false, c = "isSet", d = "error", e = "endpoint", f = "tree", g = { "required": false, "type": "string" }, h = { [l]: "Endpoint" }, i = {}, j = [{ "fn": "booleanEquals", "argv": [{ [l]: "UseFIPS" }, true] }], k = [{ [l]: "Region" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { UseFIPS: { required: a, default: b, type: "boolean" }, Endpoint: g, Region: g }, rules: [{ conditions: [{ fn: c, argv: [h] }], rules: [{ conditions: j, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { endpoint: { url: h, properties: i, headers: i }, type: e }], type: f }, { rules: [{ conditions: [{ fn: c, argv: k }], rules: [{ conditions: [{ fn: "aws.partition", argv: k, assign: "PartitionResult" }], rules: [{ conditions: j, endpoint: { url: "https://uxc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: i, headers: i }, type: e }, { endpoint: { url: "https://uxc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: i, headers: i }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
|
|
4
|
+
export const ruleSet = _data;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./UxcClient";
|
|
2
|
+
export * from "./Uxc";
|
|
3
|
+
export * from "./commands";
|
|
4
|
+
export * from "./schemas/schemas_0";
|
|
5
|
+
export * from "./pagination";
|
|
6
|
+
export * from "./models/enums";
|
|
7
|
+
export * from "./models/errors";
|
|
8
|
+
export * from "./models/models_0";
|
|
9
|
+
export { UxcServiceException } from "./models/UxcServiceException";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
|
|
2
|
+
export { __ServiceException };
|
|
3
|
+
export class UxcServiceException extends __ServiceException {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
Object.setPrototypeOf(this, UxcServiceException.prototype);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { UxcServiceException as __BaseException } from "./UxcServiceException";
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
name = "AccessDeniedException";
|
|
4
|
+
$fault = "client";
|
|
5
|
+
constructor(opts) {
|
|
6
|
+
super({
|
|
7
|
+
name: "AccessDeniedException",
|
|
8
|
+
$fault: "client",
|
|
9
|
+
...opts,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class InternalServerException extends __BaseException {
|
|
15
|
+
name = "InternalServerException";
|
|
16
|
+
$fault = "server";
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
super({
|
|
19
|
+
name: "InternalServerException",
|
|
20
|
+
$fault: "server",
|
|
21
|
+
...opts,
|
|
22
|
+
});
|
|
23
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export class ThrottlingException extends __BaseException {
|
|
27
|
+
name = "ThrottlingException";
|
|
28
|
+
$fault = "client";
|
|
29
|
+
constructor(opts) {
|
|
30
|
+
super({
|
|
31
|
+
name: "ThrottlingException",
|
|
32
|
+
$fault: "client",
|
|
33
|
+
...opts,
|
|
34
|
+
});
|
|
35
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export class ValidationException extends __BaseException {
|
|
39
|
+
name = "ValidationException";
|
|
40
|
+
$fault = "client";
|
|
41
|
+
fieldList;
|
|
42
|
+
constructor(opts) {
|
|
43
|
+
super({
|
|
44
|
+
name: "ValidationException",
|
|
45
|
+
$fault: "client",
|
|
46
|
+
...opts,
|
|
47
|
+
});
|
|
48
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
49
|
+
this.fieldList = opts.fieldList;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListServicesCommand, } from "../commands/ListServicesCommand";
|
|
3
|
+
import { UxcClient } from "../UxcClient";
|
|
4
|
+
export const paginateListServices = createPaginator(UxcClient, ListServicesCommand, "nextToken", "nextToken", "");
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
|
+
import { createDefaultUserAgentProvider } 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 { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
8
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
9
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
10
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
11
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
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 ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
24
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
25
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
26
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
28
|
+
sha256: config?.sha256 ?? Sha256,
|
|
29
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
31
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core";
|
|
3
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
+
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } 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 { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
12
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
13
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
14
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
15
|
+
export const getRuntimeConfig = (config) => {
|
|
16
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
17
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
18
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
19
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
+
awsCheckVersion(process.version);
|
|
21
|
+
const loaderConfig = {
|
|
22
|
+
profile: config?.profile,
|
|
23
|
+
logger: clientSharedValues.logger,
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
...clientSharedValues,
|
|
27
|
+
...config,
|
|
28
|
+
runtime: "node",
|
|
29
|
+
defaultsMode,
|
|
30
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
31
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
32
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
33
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
34
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
35
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
36
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
37
|
+
retryMode: config?.retryMode ??
|
|
38
|
+
loadNodeConfig({
|
|
39
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
40
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
41
|
+
}, config),
|
|
42
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
43
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
44
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
45
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
46
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -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,39 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
|
|
2
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
3
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
4
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
5
|
+
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
6
|
+
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
7
|
+
import { defaultUxcHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
8
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
9
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
10
|
+
export const getRuntimeConfig = (config) => {
|
|
11
|
+
return {
|
|
12
|
+
apiVersion: "2024-07-01",
|
|
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 ?? defaultUxcHttpAuthSchemeProvider,
|
|
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
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
27
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
28
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
29
|
+
defaultNamespace: "com.amazonaws.uxc",
|
|
30
|
+
errorTypeRegistries,
|
|
31
|
+
version: "2024-07-01",
|
|
32
|
+
serviceTarget: "AWSAccountUXSetting",
|
|
33
|
+
},
|
|
34
|
+
serviceId: config?.serviceId ?? "uxc",
|
|
35
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
36
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
37
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
7
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
9
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
const _ADE = "AccessDeniedException";
|
|
2
|
+
const _GAC = "GetAccountCustomizations";
|
|
3
|
+
const _GACI = "GetAccountCustomizationsInput";
|
|
4
|
+
const _GACO = "GetAccountCustomizationsOutput";
|
|
5
|
+
const _ISE = "InternalServerException";
|
|
6
|
+
const _LS = "ListServices";
|
|
7
|
+
const _LSI = "ListServicesInput";
|
|
8
|
+
const _LSO = "ListServicesOutput";
|
|
9
|
+
const _TE = "ThrottlingException";
|
|
10
|
+
const _UAC = "UpdateAccountCustomizations";
|
|
11
|
+
const _UACI = "UpdateAccountCustomizationsInput";
|
|
12
|
+
const _UACO = "UpdateAccountCustomizationsOutput";
|
|
13
|
+
const _VE = "ValidationException";
|
|
14
|
+
const _VEF = "ValidationExceptionField";
|
|
15
|
+
const _VEFL = "ValidationExceptionFieldList";
|
|
16
|
+
const _aC = "accountColor";
|
|
17
|
+
const _c = "client";
|
|
18
|
+
const _e = "error";
|
|
19
|
+
const _fL = "fieldList";
|
|
20
|
+
const _h = "http";
|
|
21
|
+
const _hE = "httpError";
|
|
22
|
+
const _hQ = "httpQuery";
|
|
23
|
+
const _m = "message";
|
|
24
|
+
const _mR = "maxResults";
|
|
25
|
+
const _nT = "nextToken";
|
|
26
|
+
const _p = "path";
|
|
27
|
+
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.uxc";
|
|
28
|
+
const _se = "server";
|
|
29
|
+
const _ser = "services";
|
|
30
|
+
const _vR = "visibleRegions";
|
|
31
|
+
const _vS = "visibleServices";
|
|
32
|
+
const n0 = "com.amazonaws.uxc";
|
|
33
|
+
import { TypeRegistry } from "@smithy/core/schema";
|
|
34
|
+
import { AccessDeniedException, InternalServerException, ThrottlingException, ValidationException, } from "../models/errors";
|
|
35
|
+
import { UxcServiceException } from "../models/UxcServiceException";
|
|
36
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
37
|
+
export var UxcServiceException$ = [-3, _s, "UxcServiceException", 0, [], []];
|
|
38
|
+
_s_registry.registerError(UxcServiceException$, UxcServiceException);
|
|
39
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
40
|
+
export var AccessDeniedException$ = [-3, n0, _ADE,
|
|
41
|
+
{ [_e]: _c, [_hE]: 403 },
|
|
42
|
+
[_m],
|
|
43
|
+
[0], 1
|
|
44
|
+
];
|
|
45
|
+
n0_registry.registerError(AccessDeniedException$, AccessDeniedException);
|
|
46
|
+
export var InternalServerException$ = [-3, n0, _ISE,
|
|
47
|
+
{ [_e]: _se, [_hE]: 500 },
|
|
48
|
+
[_m],
|
|
49
|
+
[0], 1
|
|
50
|
+
];
|
|
51
|
+
n0_registry.registerError(InternalServerException$, InternalServerException);
|
|
52
|
+
export var ThrottlingException$ = [-3, n0, _TE,
|
|
53
|
+
{ [_e]: _c, [_hE]: 429 },
|
|
54
|
+
[_m],
|
|
55
|
+
[0], 1
|
|
56
|
+
];
|
|
57
|
+
n0_registry.registerError(ThrottlingException$, ThrottlingException);
|
|
58
|
+
export var ValidationException$ = [-3, n0, _VE,
|
|
59
|
+
{ [_e]: _c },
|
|
60
|
+
[_m, _fL],
|
|
61
|
+
[0, () => ValidationExceptionFieldList], 1
|
|
62
|
+
];
|
|
63
|
+
n0_registry.registerError(ValidationException$, ValidationException);
|
|
64
|
+
export const errorTypeRegistries = [
|
|
65
|
+
_s_registry,
|
|
66
|
+
n0_registry,
|
|
67
|
+
];
|
|
68
|
+
export var GetAccountCustomizationsInput$ = [3, n0, _GACI,
|
|
69
|
+
0,
|
|
70
|
+
[],
|
|
71
|
+
[]
|
|
72
|
+
];
|
|
73
|
+
export var GetAccountCustomizationsOutput$ = [3, n0, _GACO,
|
|
74
|
+
0,
|
|
75
|
+
[_aC, _vS, _vR],
|
|
76
|
+
[0, 64 | 0, 64 | 0]
|
|
77
|
+
];
|
|
78
|
+
export var ListServicesInput$ = [3, n0, _LSI,
|
|
79
|
+
0,
|
|
80
|
+
[_nT, _mR],
|
|
81
|
+
[[0, { [_hQ]: _nT }], [1, { [_hQ]: _mR }]]
|
|
82
|
+
];
|
|
83
|
+
export var ListServicesOutput$ = [3, n0, _LSO,
|
|
84
|
+
0,
|
|
85
|
+
[_nT, _ser],
|
|
86
|
+
[0, 64 | 0]
|
|
87
|
+
];
|
|
88
|
+
export var UpdateAccountCustomizationsInput$ = [3, n0, _UACI,
|
|
89
|
+
0,
|
|
90
|
+
[_aC, _vS, _vR],
|
|
91
|
+
[0, 64 | 0, 64 | 0]
|
|
92
|
+
];
|
|
93
|
+
export var UpdateAccountCustomizationsOutput$ = [3, n0, _UACO,
|
|
94
|
+
0,
|
|
95
|
+
[_aC, _vS, _vR],
|
|
96
|
+
[0, 64 | 0, 64 | 0]
|
|
97
|
+
];
|
|
98
|
+
export var ValidationExceptionField$ = [3, n0, _VEF,
|
|
99
|
+
0,
|
|
100
|
+
[_p, _m],
|
|
101
|
+
[0, 0], 2
|
|
102
|
+
];
|
|
103
|
+
var RegionsList = 64 | 0;
|
|
104
|
+
var ServiceList = 64 | 0;
|
|
105
|
+
var ValidationExceptionFieldList = [1, n0, _VEFL,
|
|
106
|
+
0, () => ValidationExceptionField$
|
|
107
|
+
];
|
|
108
|
+
export var GetAccountCustomizations$ = [9, n0, _GAC,
|
|
109
|
+
{ [_h]: ["GET", "/v1/account-customizations", 200] }, () => GetAccountCustomizationsInput$, () => GetAccountCustomizationsOutput$
|
|
110
|
+
];
|
|
111
|
+
export var ListServices$ = [9, n0, _LS,
|
|
112
|
+
{ [_h]: ["GET", "/v1/services", 200] }, () => ListServicesInput$, () => ListServicesOutput$
|
|
113
|
+
];
|
|
114
|
+
export var UpdateAccountCustomizations$ = [9, n0, _UAC,
|
|
115
|
+
{ [_h]: ["PATCH", "/v1/account-customizations", 200] }, () => UpdateAccountCustomizationsInput$, () => UpdateAccountCustomizationsOutput$
|
|
116
|
+
];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { HttpHandlerOptions as __HttpHandlerOptions, PaginationConfiguration, Paginator } from "@smithy/types";
|
|
2
|
+
import { GetAccountCustomizationsCommandInput, GetAccountCustomizationsCommandOutput } from "./commands/GetAccountCustomizationsCommand";
|
|
3
|
+
import { ListServicesCommandInput, ListServicesCommandOutput } from "./commands/ListServicesCommand";
|
|
4
|
+
import { UpdateAccountCustomizationsCommandInput, UpdateAccountCustomizationsCommandOutput } from "./commands/UpdateAccountCustomizationsCommand";
|
|
5
|
+
import { UxcClient } from "./UxcClient";
|
|
6
|
+
export interface Uxc {
|
|
7
|
+
/**
|
|
8
|
+
* @see {@link GetAccountCustomizationsCommand}
|
|
9
|
+
*/
|
|
10
|
+
getAccountCustomizations(): Promise<GetAccountCustomizationsCommandOutput>;
|
|
11
|
+
getAccountCustomizations(args: GetAccountCustomizationsCommandInput, options?: __HttpHandlerOptions): Promise<GetAccountCustomizationsCommandOutput>;
|
|
12
|
+
getAccountCustomizations(args: GetAccountCustomizationsCommandInput, cb: (err: any, data?: GetAccountCustomizationsCommandOutput) => void): void;
|
|
13
|
+
getAccountCustomizations(args: GetAccountCustomizationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAccountCustomizationsCommandOutput) => void): void;
|
|
14
|
+
/**
|
|
15
|
+
* @see {@link ListServicesCommand}
|
|
16
|
+
*/
|
|
17
|
+
listServices(): Promise<ListServicesCommandOutput>;
|
|
18
|
+
listServices(args: ListServicesCommandInput, options?: __HttpHandlerOptions): Promise<ListServicesCommandOutput>;
|
|
19
|
+
listServices(args: ListServicesCommandInput, cb: (err: any, data?: ListServicesCommandOutput) => void): void;
|
|
20
|
+
listServices(args: ListServicesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListServicesCommandOutput) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* @see {@link UpdateAccountCustomizationsCommand}
|
|
23
|
+
*/
|
|
24
|
+
updateAccountCustomizations(): Promise<UpdateAccountCustomizationsCommandOutput>;
|
|
25
|
+
updateAccountCustomizations(args: UpdateAccountCustomizationsCommandInput, options?: __HttpHandlerOptions): Promise<UpdateAccountCustomizationsCommandOutput>;
|
|
26
|
+
updateAccountCustomizations(args: UpdateAccountCustomizationsCommandInput, cb: (err: any, data?: UpdateAccountCustomizationsCommandOutput) => void): void;
|
|
27
|
+
updateAccountCustomizations(args: UpdateAccountCustomizationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateAccountCustomizationsCommandOutput) => void): void;
|
|
28
|
+
/**
|
|
29
|
+
* @see {@link ListServicesCommand}
|
|
30
|
+
* @param args - command input.
|
|
31
|
+
* @param paginationConfig - optional pagination config.
|
|
32
|
+
* @returns AsyncIterable of {@link ListServicesCommandOutput}.
|
|
33
|
+
*/
|
|
34
|
+
paginateListServices(args?: ListServicesCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<ListServicesCommandOutput>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* <p>This is the Amazon Web Services User Experience Customization (UXC) API Reference. Amazon Web Services User Experience Customization (UXC) is a utility that provides programmatic access to enable account administrators to customize the visual appearance of the Amazon Web Services Management Console and manage these settings at the account level.</p> <note> <p>The <code>visibleServices</code> and <code>visibleRegions</code> settings control only the appearance of services and Regions in the Amazon Web Services Management Console. They do not restrict access through the CLI, SDKs, or other APIs.</p> </note> <p>For more information about UXC features and console procedures, see <a href="https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/getting-started-uxc.html">Getting started with Amazon Web Services User Experience Customization</a>. For information about required permissions, see <a href="https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/security_iam.html">Identity and access management for Amazon Web Services Management Console</a>.</p>
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export declare class Uxc extends UxcClient implements Uxc {
|
|
41
|
+
}
|