fix: 修复配额说明重复和undefined问题

- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit
- 删除重复的旧配额说明块,保留新的当前配额设置显示

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-22 19:39:53 +08:00
commit 4350113979
7649 changed files with 897277 additions and 0 deletions

201
backend/node_modules/@aws-sdk/client-sso/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

244
backend/node_modules/@aws-sdk/client-sso/README.md generated vendored Normal file
View File

@@ -0,0 +1,244 @@
<!-- generated file, do not edit directly -->
# @aws-sdk/client-sso
## Description
AWS SDK for JavaScript SSO Client for Node.js, Browser and React Native.
<p>AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to
IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles
assigned to them and get federated into the application.</p>
<note>
<p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
<code>identitystore</code> API namespaces will continue to retain their original name for
backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">IAM Identity Center rename</a>.</p>
</note>
<p>This reference guide describes the IAM Identity Center Portal operations that you can call
programatically and includes detailed information on data types and errors.</p>
<note>
<p>AWS provides SDKs that consist of libraries and sample code for various programming
languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
convenient way to create programmatic access to IAM Identity Center and other AWS services. For more
information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
</note>
## Installing
To install this package, simply type add or install @aws-sdk/client-sso
using your favorite package manager:
- `npm install @aws-sdk/client-sso`
- `yarn add @aws-sdk/client-sso`
- `pnpm add @aws-sdk/client-sso`
## Getting Started
### Import
The AWS SDK is modulized by clients and commands.
To send a request, you only need to import the `SSOClient` and
the commands you need, for example `ListAccountsCommand`:
```js
// ES5 example
const { SSOClient, ListAccountsCommand } = require("@aws-sdk/client-sso");
```
```ts
// ES6+ example
import { SSOClient, ListAccountsCommand } from "@aws-sdk/client-sso";
```
### Usage
To send a request, you:
- Initiate client with configuration (e.g. credentials, region).
- Initiate command with input parameters.
- Call `send` operation on client with command object as input.
- If you are using a custom http handler, you may call `destroy()` to close open connections.
```js
// a client can be shared by different commands.
const client = new SSOClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListAccountsCommand(params);
```
#### Async/await
We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
operator to wait for the promise returned by send operation as follows:
```js
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
```
Async-await is clean, concise, intuitive, easy to debug and has better error handling
as compared to using Promise chains or callbacks.
#### Promises
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)
to execute send operation.
```js
client.send(command).then(
(data) => {
// process data.
},
(error) => {
// error handling.
}
);
```
Promises can also be called using `.catch()` and `.finally()` as follows:
```js
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
```
#### Callbacks
We do not recommend using callbacks because of [callback hell](http://callbackhell.com/),
but they are supported by the send operation.
```js
// callbacks.
client.send(command, (err, data) => {
// process err and data.
});
```
#### v2 compatible style
The client can also send requests using v2 compatible style.
However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post
on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)
```ts
import * as AWS from "@aws-sdk/client-sso";
const client = new AWS.SSO({ region: "REGION" });
// async/await.
try {
const data = await client.listAccounts(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listAccounts(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks.
client.listAccounts(params, (err, data) => {
// process err and data.
});
```
### Troubleshooting
When the service returns an exception, the error will include the exception information,
as well as response metadata (e.g. request id).
```js
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
```
## Getting Help
Please use these community resources for getting help.
We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
on AWS Developer Blog.
- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`.
- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3).
- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose).
To test your universal JavaScript code in Node.js, browser and react-native environments,
visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests).
## Contributing
This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-sso` package is updated.
To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients).
## License
This SDK is distributed under the
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
see LICENSE for more information.
## Client Commands (Operations List)
<details>
<summary>
GetRoleCredentials
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/GetRoleCredentialsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/GetRoleCredentialsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/GetRoleCredentialsCommandOutput/)
</details>
<details>
<summary>
ListAccountRoles
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/ListAccountRolesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountRolesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountRolesCommandOutput/)
</details>
<details>
<summary>
ListAccounts
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/ListAccountsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/ListAccountsCommandOutput/)
</details>
<details>
<summary>
Logout
</summary>
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso/command/LogoutCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/LogoutCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso/Interface/LogoutCommandOutput/)
</details>

View File

@@ -0,0 +1,75 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;
const core_1 = require("@aws-sdk/core");
const util_middleware_1 = require("@smithy/util-middleware");
const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "awsssoportal",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
return {
schemeId: "smithy.api#noAuth",
};
}
const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
case "GetRoleCredentials":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
case "ListAccountRoles":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
case "ListAccounts":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
case "Logout":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;
const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
return Object.assign(config_0, {
authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),
});
};
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultEndpointResolver = void 0;
const util_endpoints_1 = require("@aws-sdk/util-endpoints");
const util_endpoints_2 = require("@smithy/util-endpoints");
const ruleset_1 = require("./ruleset");
const cache = new util_endpoints_2.EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});
const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
exports.defaultEndpointResolver = defaultEndpointResolver;
util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;

View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ruleSet = void 0;
const u = "required", v = "fn", w = "argv", x = "ref";
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "string" }, j = { [u]: true, "default": false, "type": "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
exports.ruleSet = _data;

View File

@@ -0,0 +1,420 @@
'use strict';
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
var middlewareLogger = require('@aws-sdk/middleware-logger');
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
var configResolver = require('@smithy/config-resolver');
var core = require('@smithy/core');
var schema = require('@smithy/core/schema');
var middlewareContentLength = require('@smithy/middleware-content-length');
var middlewareEndpoint = require('@smithy/middleware-endpoint');
var middlewareRetry = require('@smithy/middleware-retry');
var smithyClient = require('@smithy/smithy-client');
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
var runtimeConfig = require('./runtimeConfig');
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
var protocolHttp = require('@smithy/protocol-http');
const resolveClientEndpointParameters = (options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "awsssoportal",
});
};
const commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
}
else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
},
};
};
const resolveHttpAuthRuntimeConfig = (config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials(),
};
};
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
};
class SSOClient extends smithyClient.Client {
config;
constructor(...[configuration]) {
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
const _config_4 = configResolver.resolveRegionConfig(_config_3);
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials,
}),
}));
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
}
destroy() {
super.destroy();
}
}
class SSOServiceException extends smithyClient.ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, SSOServiceException.prototype);
}
}
class InvalidRequestException extends SSOServiceException {
name = "InvalidRequestException";
$fault = "client";
constructor(opts) {
super({
name: "InvalidRequestException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, InvalidRequestException.prototype);
}
}
class ResourceNotFoundException extends SSOServiceException {
name = "ResourceNotFoundException";
$fault = "client";
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
}
}
class TooManyRequestsException extends SSOServiceException {
name = "TooManyRequestsException";
$fault = "client";
constructor(opts) {
super({
name: "TooManyRequestsException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
}
}
class UnauthorizedException extends SSOServiceException {
name = "UnauthorizedException";
$fault = "client";
constructor(opts) {
super({
name: "UnauthorizedException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, UnauthorizedException.prototype);
}
}
const _AI = "AccountInfo";
const _ALT = "AccountListType";
const _ATT = "AccessTokenType";
const _GRC = "GetRoleCredentials";
const _GRCR = "GetRoleCredentialsRequest";
const _GRCRe = "GetRoleCredentialsResponse";
const _IRE = "InvalidRequestException";
const _L = "Logout";
const _LA = "ListAccounts";
const _LAR = "ListAccountsRequest";
const _LARR = "ListAccountRolesRequest";
const _LARRi = "ListAccountRolesResponse";
const _LARi = "ListAccountsResponse";
const _LARis = "ListAccountRoles";
const _LR = "LogoutRequest";
const _RC = "RoleCredentials";
const _RI = "RoleInfo";
const _RLT = "RoleListType";
const _RNFE = "ResourceNotFoundException";
const _SAKT = "SecretAccessKeyType";
const _STT = "SessionTokenType";
const _TMRE = "TooManyRequestsException";
const _UE = "UnauthorizedException";
const _aI = "accountId";
const _aKI = "accessKeyId";
const _aL = "accountList";
const _aN = "accountName";
const _aT = "accessToken";
const _ai = "account_id";
const _c = "client";
const _e = "error";
const _eA = "emailAddress";
const _ex = "expiration";
const _h = "http";
const _hE = "httpError";
const _hH = "httpHeader";
const _hQ = "httpQuery";
const _m = "message";
const _mR = "maxResults";
const _mr = "max_result";
const _nT = "nextToken";
const _nt = "next_token";
const _rC = "roleCredentials";
const _rL = "roleList";
const _rN = "roleName";
const _rn = "role_name";
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
const _sAK = "secretAccessKey";
const _sT = "sessionToken";
const _xasbt = "x-amz-sso_bearer_token";
const n0 = "com.amazonaws.sso";
var AccessTokenType = [0, n0, _ATT, 8, 0];
var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
var SessionTokenType = [0, n0, _STT, 8, 0];
var AccountInfo$ = [3, n0, _AI,
0,
[_aI, _aN, _eA],
[0, 0, 0]
];
var GetRoleCredentialsRequest$ = [3, n0, _GRCR,
0,
[_rN, _aI, _aT],
[[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]], 3
];
var GetRoleCredentialsResponse$ = [3, n0, _GRCRe,
0,
[_rC],
[[() => RoleCredentials$, 0]]
];
var InvalidRequestException$ = [-3, n0, _IRE,
{ [_e]: _c, [_hE]: 400 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(InvalidRequestException$, InvalidRequestException);
var ListAccountRolesRequest$ = [3, n0, _LARR,
0,
[_aT, _aI, _nT, _mR],
[[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _ai }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 2
];
var ListAccountRolesResponse$ = [3, n0, _LARRi,
0,
[_nT, _rL],
[0, () => RoleListType]
];
var ListAccountsRequest$ = [3, n0, _LAR,
0,
[_aT, _nT, _mR],
[[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 1
];
var ListAccountsResponse$ = [3, n0, _LARi,
0,
[_nT, _aL],
[0, () => AccountListType]
];
var LogoutRequest$ = [3, n0, _LR,
0,
[_aT],
[[() => AccessTokenType, { [_hH]: _xasbt }]], 1
];
var ResourceNotFoundException$ = [-3, n0, _RNFE,
{ [_e]: _c, [_hE]: 404 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException$, ResourceNotFoundException);
var RoleCredentials$ = [3, n0, _RC,
0,
[_aKI, _sAK, _sT, _ex],
[0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]
];
var RoleInfo$ = [3, n0, _RI,
0,
[_rN, _aI],
[0, 0]
];
var TooManyRequestsException$ = [-3, n0, _TMRE,
{ [_e]: _c, [_hE]: 429 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(TooManyRequestsException$, TooManyRequestsException);
var UnauthorizedException$ = [-3, n0, _UE,
{ [_e]: _c, [_hE]: 401 },
[_m],
[0]
];
schema.TypeRegistry.for(n0).registerError(UnauthorizedException$, UnauthorizedException);
var __Unit = "unit";
var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
schema.TypeRegistry.for(_s).registerError(SSOServiceException$, SSOServiceException);
var AccountListType = [1, n0, _ALT,
0, () => AccountInfo$
];
var RoleListType = [1, n0, _RLT,
0, () => RoleInfo$
];
var GetRoleCredentials$ = [9, n0, _GRC,
{ [_h]: ["GET", "/federation/credentials", 200] }, () => GetRoleCredentialsRequest$, () => GetRoleCredentialsResponse$
];
var ListAccountRoles$ = [9, n0, _LARis,
{ [_h]: ["GET", "/assignment/roles", 200] }, () => ListAccountRolesRequest$, () => ListAccountRolesResponse$
];
var ListAccounts$ = [9, n0, _LA,
{ [_h]: ["GET", "/assignment/accounts", 200] }, () => ListAccountsRequest$, () => ListAccountsResponse$
];
var Logout$ = [9, n0, _L,
{ [_h]: ["POST", "/logout", 200] }, () => LogoutRequest$, () => __Unit
];
class GetRoleCredentialsCommand extends smithyClient.Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("SWBPortalService", "GetRoleCredentials", {})
.n("SSOClient", "GetRoleCredentialsCommand")
.sc(GetRoleCredentials$)
.build() {
}
class ListAccountRolesCommand extends smithyClient.Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("SWBPortalService", "ListAccountRoles", {})
.n("SSOClient", "ListAccountRolesCommand")
.sc(ListAccountRoles$)
.build() {
}
class ListAccountsCommand extends smithyClient.Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("SWBPortalService", "ListAccounts", {})
.n("SSOClient", "ListAccountsCommand")
.sc(ListAccounts$)
.build() {
}
class LogoutCommand extends smithyClient.Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("SWBPortalService", "Logout", {})
.n("SSOClient", "LogoutCommand")
.sc(Logout$)
.build() {
}
const commands = {
GetRoleCredentialsCommand,
ListAccountRolesCommand,
ListAccountsCommand,
LogoutCommand,
};
class SSO extends SSOClient {
}
smithyClient.createAggregatedClient(commands, SSO);
const paginateListAccountRoles = core.createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults");
const paginateListAccounts = core.createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults");
Object.defineProperty(exports, "$Command", {
enumerable: true,
get: function () { return smithyClient.Command; }
});
Object.defineProperty(exports, "__Client", {
enumerable: true,
get: function () { return smithyClient.Client; }
});
exports.AccountInfo$ = AccountInfo$;
exports.GetRoleCredentials$ = GetRoleCredentials$;
exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand;
exports.GetRoleCredentialsRequest$ = GetRoleCredentialsRequest$;
exports.GetRoleCredentialsResponse$ = GetRoleCredentialsResponse$;
exports.InvalidRequestException = InvalidRequestException;
exports.InvalidRequestException$ = InvalidRequestException$;
exports.ListAccountRoles$ = ListAccountRoles$;
exports.ListAccountRolesCommand = ListAccountRolesCommand;
exports.ListAccountRolesRequest$ = ListAccountRolesRequest$;
exports.ListAccountRolesResponse$ = ListAccountRolesResponse$;
exports.ListAccounts$ = ListAccounts$;
exports.ListAccountsCommand = ListAccountsCommand;
exports.ListAccountsRequest$ = ListAccountsRequest$;
exports.ListAccountsResponse$ = ListAccountsResponse$;
exports.Logout$ = Logout$;
exports.LogoutCommand = LogoutCommand;
exports.LogoutRequest$ = LogoutRequest$;
exports.ResourceNotFoundException = ResourceNotFoundException;
exports.ResourceNotFoundException$ = ResourceNotFoundException$;
exports.RoleCredentials$ = RoleCredentials$;
exports.RoleInfo$ = RoleInfo$;
exports.SSO = SSO;
exports.SSOClient = SSOClient;
exports.SSOServiceException = SSOServiceException;
exports.SSOServiceException$ = SSOServiceException$;
exports.TooManyRequestsException = TooManyRequestsException;
exports.TooManyRequestsException$ = TooManyRequestsException$;
exports.UnauthorizedException = UnauthorizedException;
exports.UnauthorizedException$ = UnauthorizedException$;
exports.paginateListAccountRoles = paginateListAccountRoles;
exports.paginateListAccounts = paginateListAccounts;

View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = void 0;
const tslib_1 = require("tslib");
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
const config_resolver_1 = require("@smithy/config-resolver");
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
const invalid_dependency_1 = require("@smithy/invalid-dependency");
const smithy_client_1 = require("@smithy/smithy-client");
const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
const util_retry_1 = require("@smithy/util-retry");
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
const getRuntimeConfig = (config) => {
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
return {
...clientSharedValues,
...config,
runtime: "browser",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
};
};
exports.getRuntimeConfig = getRuntimeConfig;

View File

@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = void 0;
const tslib_1 = require("tslib");
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
const core_1 = require("@aws-sdk/core");
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
const config_resolver_1 = require("@smithy/config-resolver");
const hash_node_1 = require("@smithy/hash-node");
const middleware_retry_1 = require("@smithy/middleware-retry");
const node_config_provider_1 = require("@smithy/node-config-provider");
const node_http_handler_1 = require("@smithy/node-http-handler");
const smithy_client_1 = require("@smithy/smithy-client");
const util_body_length_node_1 = require("@smithy/util-body-length-node");
const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
const util_retry_1 = require("@smithy/util-retry");
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
const getRuntimeConfig = (config) => {
(0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
const loaderConfig = {
profile: config?.profile,
logger: clientSharedValues.logger,
};
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
(0, node_config_provider_1.loadConfig)({
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
};
};
exports.getRuntimeConfig = getRuntimeConfig;

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = void 0;
const sha256_js_1 = require("@aws-crypto/sha256-js");
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
const getRuntimeConfig = (config) => {
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
return {
...browserDefaults,
...config,
runtime: "react-native",
sha256: config?.sha256 ?? sha256_js_1.Sha256,
};
};
exports.getRuntimeConfig = getRuntimeConfig;

View File

@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = void 0;
const core_1 = require("@aws-sdk/core");
const protocols_1 = require("@aws-sdk/core/protocols");
const core_2 = require("@smithy/core");
const smithy_client_1 = require("@smithy/smithy-client");
const url_parser_1 = require("@smithy/url-parser");
const util_base64_1 = require("@smithy/util-base64");
const util_utf8_1 = require("@smithy/util-utf8");
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
const endpointResolver_1 = require("./endpoint/endpointResolver");
const getRuntimeConfig = (config) => {
return {
apiVersion: "2019-06-10",
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new core_1.AwsSdkSigV4Signer(),
},
{
schemeId: "smithy.api#noAuth",
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
signer: new core_2.NoAuthSigner(),
},
],
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
protocolSettings: config?.protocolSettings ?? {
defaultNamespace: "com.amazonaws.sso",
version: "2019-06-10",
serviceTarget: "SWBPortalService",
},
serviceId: config?.serviceId ?? "SSO",
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
};
};
exports.getRuntimeConfig = getRuntimeConfig;

View File

@@ -0,0 +1,15 @@
import { createAggregatedClient } from "@smithy/smithy-client";
import { GetRoleCredentialsCommand, } from "./commands/GetRoleCredentialsCommand";
import { ListAccountRolesCommand, } from "./commands/ListAccountRolesCommand";
import { ListAccountsCommand, } from "./commands/ListAccountsCommand";
import { LogoutCommand } from "./commands/LogoutCommand";
import { SSOClient } from "./SSOClient";
const commands = {
GetRoleCredentialsCommand,
ListAccountRolesCommand,
ListAccountsCommand,
LogoutCommand,
};
export class SSO extends SSOClient {
}
createAggregatedClient(commands, SSO);

View File

@@ -0,0 +1,50 @@
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
import { resolveRegionConfig } from "@smithy/config-resolver";
import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
import { getSchemaSerdePlugin } from "@smithy/core/schema";
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
import { resolveEndpointConfig, } from "@smithy/middleware-endpoint";
import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
import { Client as __Client, } from "@smithy/smithy-client";
import { defaultSSOHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
import { resolveRuntimeExtensions } from "./runtimeExtensions";
export { __Client };
export class SSOClient extends __Client {
config;
constructor(...[configuration]) {
const _config_0 = __getRuntimeConfig(configuration || {});
super(_config_0);
this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
const _config_2 = resolveUserAgentConfig(_config_1);
const _config_3 = resolveRetryConfig(_config_2);
const _config_4 = resolveRegionConfig(_config_3);
const _config_5 = resolveHostHeaderConfig(_config_4);
const _config_6 = resolveEndpointConfig(_config_5);
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
this.config = _config_8;
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(getRetryPlugin(this.config));
this.middlewareStack.use(getContentLengthPlugin(this.config));
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: defaultSSOHttpAuthSchemeParametersProvider,
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials,
}),
}));
this.middlewareStack.use(getHttpSigningPlugin(this.config));
}
destroy() {
super.destroy();
}
}

View File

@@ -0,0 +1,38 @@
export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
let _credentials = runtimeConfig.credentials;
return {
setHttpAuthScheme(httpAuthScheme) {
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
if (index === -1) {
_httpAuthSchemes.push(httpAuthScheme);
}
else {
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
}
},
httpAuthSchemes() {
return _httpAuthSchemes;
},
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
_httpAuthSchemeProvider = httpAuthSchemeProvider;
},
httpAuthSchemeProvider() {
return _httpAuthSchemeProvider;
},
setCredentials(credentials) {
_credentials = credentials;
},
credentials() {
return _credentials;
},
};
};
export const resolveHttpAuthRuntimeConfig = (config) => {
return {
httpAuthSchemes: config.httpAuthSchemes(),
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
credentials: config.credentials(),
};
};

View File

@@ -0,0 +1,69 @@
import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core";
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
export const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: getSmithyContext(context).operation,
region: await normalizeProvider(config.region)() || (() => {
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
})(),
};
};
function createAwsAuthSigv4HttpAuthOption(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
name: "awsssoportal",
region: authParameters.region,
},
propertiesExtractor: (config, context) => ({
signingProperties: {
config,
context,
},
}),
};
}
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
return {
schemeId: "smithy.api#noAuth",
};
}
export const defaultSSOHttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
case "GetRoleCredentials":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
case "ListAccountRoles":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
case "ListAccounts":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
case "Logout":
{
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
break;
}
;
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
}
return options;
};
export const resolveHttpAuthSchemeConfig = (config) => {
const config_0 = resolveAwsSdkSigV4Config(config);
return Object.assign(config_0, {
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
});
};

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { GetRoleCredentials$ } from "../schemas/schemas_0";
export { $Command };
export class GetRoleCredentialsCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("SWBPortalService", "GetRoleCredentials", {})
.n("SSOClient", "GetRoleCredentialsCommand")
.sc(GetRoleCredentials$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListAccountRoles$ } from "../schemas/schemas_0";
export { $Command };
export class ListAccountRolesCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("SWBPortalService", "ListAccountRoles", {})
.n("SSOClient", "ListAccountRolesCommand")
.sc(ListAccountRoles$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListAccounts$ } from "../schemas/schemas_0";
export { $Command };
export class ListAccountsCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("SWBPortalService", "ListAccounts", {})
.n("SSOClient", "ListAccountsCommand")
.sc(ListAccounts$)
.build() {
}

View File

@@ -0,0 +1,16 @@
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { Command as $Command } from "@smithy/smithy-client";
import { commonParams } from "../endpoint/EndpointParameters";
import { Logout$ } from "../schemas/schemas_0";
export { $Command };
export class LogoutCommand extends $Command
.classBuilder()
.ep(commonParams)
.m(function (Command, cs, config, o) {
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
})
.s("SWBPortalService", "Logout", {})
.n("SSOClient", "LogoutCommand")
.sc(Logout$)
.build() {
}

View File

@@ -0,0 +1,4 @@
export * from "./GetRoleCredentialsCommand";
export * from "./ListAccountRolesCommand";
export * from "./ListAccountsCommand";
export * from "./LogoutCommand";

View File

@@ -0,0 +1,13 @@
export const resolveClientEndpointParameters = (options) => {
return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
defaultSigningName: "awsssoportal",
});
};
export const commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};

View File

@@ -0,0 +1,14 @@
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
import { ruleSet } from "./ruleset";
const cache = new EndpointCache({
size: 50,
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
});
export const defaultEndpointResolver = (endpointParams, context = {}) => {
return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
endpointParams: endpointParams,
logger: context.logger,
}));
};
customEndpointFunctions.aws = awsEndpointFunctions;

View File

@@ -0,0 +1,4 @@
const u = "required", v = "fn", w = "argv", x = "ref";
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "string" }, j = { [u]: true, "default": false, "type": "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
export const ruleSet = _data;

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,8 @@
export * from "./SSOClient";
export * from "./SSO";
export * from "./commands";
export * from "./schemas/schemas_0";
export * from "./pagination";
export * from "./models/errors";
export * from "./models/models_0";
export { SSOServiceException } from "./models/SSOServiceException";

View File

@@ -0,0 +1,8 @@
import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
export { __ServiceException };
export class SSOServiceException extends __ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, SSOServiceException.prototype);
}
}

View File

@@ -0,0 +1,49 @@
import { SSOServiceException as __BaseException } from "./SSOServiceException";
export class InvalidRequestException extends __BaseException {
name = "InvalidRequestException";
$fault = "client";
constructor(opts) {
super({
name: "InvalidRequestException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, InvalidRequestException.prototype);
}
}
export class ResourceNotFoundException extends __BaseException {
name = "ResourceNotFoundException";
$fault = "client";
constructor(opts) {
super({
name: "ResourceNotFoundException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
}
}
export class TooManyRequestsException extends __BaseException {
name = "TooManyRequestsException";
$fault = "client";
constructor(opts) {
super({
name: "TooManyRequestsException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, TooManyRequestsException.prototype);
}
}
export class UnauthorizedException extends __BaseException {
name = "UnauthorizedException";
$fault = "client";
constructor(opts) {
super({
name: "UnauthorizedException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, UnauthorizedException.prototype);
}
}

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,4 @@
import { createPaginator } from "@smithy/core";
import { ListAccountRolesCommand, } from "../commands/ListAccountRolesCommand";
import { SSOClient } from "../SSOClient";
export const paginateListAccountRoles = createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults");

View File

@@ -0,0 +1,4 @@
import { createPaginator } from "@smithy/core";
import { ListAccountsCommand, } from "../commands/ListAccountsCommand";
import { SSOClient } from "../SSOClient";
export const paginateListAccounts = createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults");

View File

@@ -0,0 +1,3 @@
export * from "./Interfaces";
export * from "./ListAccountRolesPaginator";
export * from "./ListAccountsPaginator";

View File

@@ -0,0 +1,32 @@
import packageInfo from "../package.json";
import { Sha256 } from "@aws-crypto/sha256-browser";
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
import { invalidProvider } from "@smithy/invalid-dependency";
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
import { calculateBodyLength } from "@smithy/util-body-length-browser";
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
export const getRuntimeConfig = (config) => {
const defaultsMode = resolveDefaultsModeConfig(config);
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getSharedRuntimeConfig(config);
return {
...clientSharedValues,
...config,
runtime: "browser",
defaultsMode,
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
region: config?.region ?? invalidProvider("Region is missing"),
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
sha256: config?.sha256 ?? Sha256,
streamCollector: config?.streamCollector ?? streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
};
};

View File

@@ -0,0 +1,46 @@
import packageInfo from "../package.json";
import { emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core";
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/util-user-agent-node";
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";
import { Hash } from "@smithy/hash-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/smithy-client";
import { calculateBodyLength } from "@smithy/util-body-length-node";
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
export const getRuntimeConfig = (config) => {
emitWarningIfUnsupportedVersion(process.version);
const defaultsMode = resolveDefaultsModeConfig(config);
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
const clientSharedValues = getSharedRuntimeConfig(config);
awsCheckVersion(process.version);
const loaderConfig = {
profile: config?.profile,
logger: clientSharedValues.logger,
};
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ??
loadNodeConfig({
...NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
}, config),
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? streamCollector,
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
};
};

View File

@@ -0,0 +1,11 @@
import { Sha256 } from "@aws-crypto/sha256-js";
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
export const getRuntimeConfig = (config) => {
const browserDefaults = getBrowserRuntimeConfig(config);
return {
...browserDefaults,
...config,
runtime: "react-native",
sha256: config?.sha256 ?? Sha256,
};
};

View File

@@ -0,0 +1,43 @@
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
import { NoAuthSigner } from "@smithy/core";
import { NoOpLogger } from "@smithy/smithy-client";
import { parseUrl } from "@smithy/url-parser";
import { fromBase64, toBase64 } from "@smithy/util-base64";
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
import { defaultSSOHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
export const getRuntimeConfig = (config) => {
return {
apiVersion: "2019-06-10",
base64Decoder: config?.base64Decoder ?? fromBase64,
base64Encoder: config?.base64Encoder ?? toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
extensions: config?.extensions ?? [],
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,
httpAuthSchemes: config?.httpAuthSchemes ?? [
{
schemeId: "aws.auth#sigv4",
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
signer: new AwsSdkSigV4Signer(),
},
{
schemeId: "smithy.api#noAuth",
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
signer: new NoAuthSigner(),
},
],
logger: config?.logger ?? new NoOpLogger(),
protocol: config?.protocol ?? AwsRestJsonProtocol,
protocolSettings: config?.protocolSettings ?? {
defaultNamespace: "com.amazonaws.sso",
version: "2019-06-10",
serviceTarget: "SWBPortalService",
},
serviceId: config?.serviceId ?? "SSO",
urlParser: config?.urlParser ?? parseUrl,
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
utf8Encoder: config?.utf8Encoder ?? toUtf8,
};
};

View File

@@ -0,0 +1,9 @@
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
extensions.forEach((extension) => extension.configure(extensionConfiguration));
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
};

View File

@@ -0,0 +1,152 @@
const _AI = "AccountInfo";
const _ALT = "AccountListType";
const _ATT = "AccessTokenType";
const _GRC = "GetRoleCredentials";
const _GRCR = "GetRoleCredentialsRequest";
const _GRCRe = "GetRoleCredentialsResponse";
const _IRE = "InvalidRequestException";
const _L = "Logout";
const _LA = "ListAccounts";
const _LAR = "ListAccountsRequest";
const _LARR = "ListAccountRolesRequest";
const _LARRi = "ListAccountRolesResponse";
const _LARi = "ListAccountsResponse";
const _LARis = "ListAccountRoles";
const _LR = "LogoutRequest";
const _RC = "RoleCredentials";
const _RI = "RoleInfo";
const _RLT = "RoleListType";
const _RNFE = "ResourceNotFoundException";
const _SAKT = "SecretAccessKeyType";
const _STT = "SessionTokenType";
const _TMRE = "TooManyRequestsException";
const _UE = "UnauthorizedException";
const _aI = "accountId";
const _aKI = "accessKeyId";
const _aL = "accountList";
const _aN = "accountName";
const _aT = "accessToken";
const _ai = "account_id";
const _c = "client";
const _e = "error";
const _eA = "emailAddress";
const _ex = "expiration";
const _h = "http";
const _hE = "httpError";
const _hH = "httpHeader";
const _hQ = "httpQuery";
const _m = "message";
const _mR = "maxResults";
const _mr = "max_result";
const _nT = "nextToken";
const _nt = "next_token";
const _rC = "roleCredentials";
const _rL = "roleList";
const _rN = "roleName";
const _rn = "role_name";
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
const _sAK = "secretAccessKey";
const _sT = "sessionToken";
const _xasbt = "x-amz-sso_bearer_token";
const n0 = "com.amazonaws.sso";
import { TypeRegistry } from "@smithy/core/schema";
import { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/errors";
import { SSOServiceException } from "../models/SSOServiceException";
var AccessTokenType = [0, n0, _ATT, 8, 0];
var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
var SessionTokenType = [0, n0, _STT, 8, 0];
export var AccountInfo$ = [3, n0, _AI,
0,
[_aI, _aN, _eA],
[0, 0, 0]
];
export var GetRoleCredentialsRequest$ = [3, n0, _GRCR,
0,
[_rN, _aI, _aT],
[[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]], 3
];
export var GetRoleCredentialsResponse$ = [3, n0, _GRCRe,
0,
[_rC],
[[() => RoleCredentials$, 0]]
];
export var InvalidRequestException$ = [-3, n0, _IRE,
{ [_e]: _c, [_hE]: 400 },
[_m],
[0]
];
TypeRegistry.for(n0).registerError(InvalidRequestException$, InvalidRequestException);
export var ListAccountRolesRequest$ = [3, n0, _LARR,
0,
[_aT, _aI, _nT, _mR],
[[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _ai }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 2
];
export var ListAccountRolesResponse$ = [3, n0, _LARRi,
0,
[_nT, _rL],
[0, () => RoleListType]
];
export var ListAccountsRequest$ = [3, n0, _LAR,
0,
[_aT, _nT, _mR],
[[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 1
];
export var ListAccountsResponse$ = [3, n0, _LARi,
0,
[_nT, _aL],
[0, () => AccountListType]
];
export var LogoutRequest$ = [3, n0, _LR,
0,
[_aT],
[[() => AccessTokenType, { [_hH]: _xasbt }]], 1
];
export var ResourceNotFoundException$ = [-3, n0, _RNFE,
{ [_e]: _c, [_hE]: 404 },
[_m],
[0]
];
TypeRegistry.for(n0).registerError(ResourceNotFoundException$, ResourceNotFoundException);
export var RoleCredentials$ = [3, n0, _RC,
0,
[_aKI, _sAK, _sT, _ex],
[0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1]
];
export var RoleInfo$ = [3, n0, _RI,
0,
[_rN, _aI],
[0, 0]
];
export var TooManyRequestsException$ = [-3, n0, _TMRE,
{ [_e]: _c, [_hE]: 429 },
[_m],
[0]
];
TypeRegistry.for(n0).registerError(TooManyRequestsException$, TooManyRequestsException);
export var UnauthorizedException$ = [-3, n0, _UE,
{ [_e]: _c, [_hE]: 401 },
[_m],
[0]
];
TypeRegistry.for(n0).registerError(UnauthorizedException$, UnauthorizedException);
var __Unit = "unit";
export var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
TypeRegistry.for(_s).registerError(SSOServiceException$, SSOServiceException);
var AccountListType = [1, n0, _ALT,
0, () => AccountInfo$
];
var RoleListType = [1, n0, _RLT,
0, () => RoleInfo$
];
export var GetRoleCredentials$ = [9, n0, _GRC,
{ [_h]: ["GET", "/federation/credentials", 200] }, () => GetRoleCredentialsRequest$, () => GetRoleCredentialsResponse$
];
export var ListAccountRoles$ = [9, n0, _LARis,
{ [_h]: ["GET", "/assignment/roles", 200] }, () => ListAccountRolesRequest$, () => ListAccountRolesResponse$
];
export var ListAccounts$ = [9, n0, _LA,
{ [_h]: ["GET", "/assignment/accounts", 200] }, () => ListAccountsRequest$, () => ListAccountsResponse$
];
export var Logout$ = [9, n0, _L,
{ [_h]: ["POST", "/logout", 200] }, () => LogoutRequest$, () => __Unit
];

View File

@@ -0,0 +1,53 @@
import type { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "./commands/GetRoleCredentialsCommand";
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./commands/ListAccountRolesCommand";
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand";
import { LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand";
import { SSOClient } from "./SSOClient";
export interface SSO {
/**
* @see {@link GetRoleCredentialsCommand}
*/
getRoleCredentials(args: GetRoleCredentialsCommandInput, options?: __HttpHandlerOptions): Promise<GetRoleCredentialsCommandOutput>;
getRoleCredentials(args: GetRoleCredentialsCommandInput, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
getRoleCredentials(args: GetRoleCredentialsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
/**
* @see {@link ListAccountRolesCommand}
*/
listAccountRoles(args: ListAccountRolesCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountRolesCommandOutput>;
listAccountRoles(args: ListAccountRolesCommandInput, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
listAccountRoles(args: ListAccountRolesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
/**
* @see {@link ListAccountsCommand}
*/
listAccounts(args: ListAccountsCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountsCommandOutput>;
listAccounts(args: ListAccountsCommandInput, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
listAccounts(args: ListAccountsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
/**
* @see {@link LogoutCommand}
*/
logout(args: LogoutCommandInput, options?: __HttpHandlerOptions): Promise<LogoutCommandOutput>;
logout(args: LogoutCommandInput, cb: (err: any, data?: LogoutCommandOutput) => void): void;
logout(args: LogoutCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: LogoutCommandOutput) => void): void;
}
/**
* <p>AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to
* IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles
* assigned to them and get federated into the application.</p>
* <note>
* <p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
* <code>identitystore</code> API namespaces will continue to retain their original name for
* backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">IAM Identity Center rename</a>.</p>
* </note>
* <p>This reference guide describes the IAM Identity Center Portal operations that you can call
* programatically and includes detailed information on data types and errors.</p>
* <note>
* <p>AWS provides SDKs that consist of libraries and sample code for various programming
* languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
* convenient way to create programmatic access to IAM Identity Center and other AWS services. For more
* information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
* </note>
* @public
*/
export declare class SSO extends SSOClient implements SSO {
}

View File

@@ -0,0 +1,200 @@
import { type HostHeaderInputConfig, type HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
import { type UserAgentInputConfig, type UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
import { type RegionInputConfig, type RegionResolvedConfig } from "@smithy/config-resolver";
import { type EndpointInputConfig, type EndpointResolvedConfig } from "@smithy/middleware-endpoint";
import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/middleware-retry";
import type { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
import { type DefaultsMode as __DefaultsMode, type SmithyConfiguration as __SmithyConfiguration, type SmithyResolvedConfiguration as __SmithyResolvedConfiguration, Client as __Client } from "@smithy/smithy-client";
import { type BodyLengthCalculator as __BodyLengthCalculator, type CheckOptionalClientConfig as __CheckOptionalClientConfig, type ChecksumConstructor as __ChecksumConstructor, type Decoder as __Decoder, type Encoder as __Encoder, type HashConstructor as __HashConstructor, type HttpHandlerOptions as __HttpHandlerOptions, type Logger as __Logger, type Provider as __Provider, type StreamCollector as __StreamCollector, type UrlParser as __UrlParser, Provider, UserAgent as __UserAgent } from "@smithy/types";
import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "./commands/GetRoleCredentialsCommand";
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./commands/ListAccountRolesCommand";
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand";
import { LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand";
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
import { type RuntimeExtension, type RuntimeExtensionsConfig } from "./runtimeExtensions";
export { __Client };
/**
* @public
*/
export type ServiceInputTypes = GetRoleCredentialsCommandInput | ListAccountRolesCommandInput | ListAccountsCommandInput | LogoutCommandInput;
/**
* @public
*/
export type ServiceOutputTypes = GetRoleCredentialsCommandOutput | ListAccountRolesCommandOutput | ListAccountsCommandOutput | LogoutCommandOutput;
/**
* @public
*/
export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
/**
* The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs.
*/
requestHandler?: __HttpHandlerUserInput;
/**
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
* @internal
*/
sha256?: __ChecksumConstructor | __HashConstructor;
/**
* The function that will be used to convert strings into HTTP endpoints.
* @internal
*/
urlParser?: __UrlParser;
/**
* A function that can calculate the length of a request body.
* @internal
*/
bodyLengthChecker?: __BodyLengthCalculator;
/**
* A function that converts a stream into an array of bytes.
* @internal
*/
streamCollector?: __StreamCollector;
/**
* The function that will be used to convert a base64-encoded string to a byte array.
* @internal
*/
base64Decoder?: __Decoder;
/**
* The function that will be used to convert binary data to a base64-encoded string.
* @internal
*/
base64Encoder?: __Encoder;
/**
* The function that will be used to convert a UTF8-encoded string to a byte array.
* @internal
*/
utf8Decoder?: __Decoder;
/**
* The function that will be used to convert binary data to a UTF-8 encoded string.
* @internal
*/
utf8Encoder?: __Encoder;
/**
* The runtime environment.
* @internal
*/
runtime?: string;
/**
* Disable dynamically changing the endpoint of the client based on the hostPrefix
* trait of an operation.
*/
disableHostPrefix?: boolean;
/**
* Unique service identifier.
* @internal
*/
serviceId?: string;
/**
* Enables IPv6/IPv4 dualstack endpoint.
*/
useDualstackEndpoint?: boolean | __Provider<boolean>;
/**
* Enables FIPS compatible endpoints.
*/
useFipsEndpoint?: boolean | __Provider<boolean>;
/**
* The AWS region to which this client will send requests
*/
region?: string | __Provider<string>;
/**
* Setting a client profile is similar to setting a value for the
* AWS_PROFILE environment variable. Setting a profile on a client
* in code only affects the single client instance, unlike AWS_PROFILE.
*
* When set, and only for environments where an AWS configuration
* file exists, fields configurable by this file will be retrieved
* from the specified profile within that file.
* Conflicting code configuration and environment variables will
* still have higher priority.
*
* For client credential resolution that involves checking the AWS
* configuration file, the client's profile (this value) will be
* used unless a different profile is set in the credential
* provider options.
*
*/
profile?: string;
/**
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* @internal
*/
defaultUserAgentProvider?: Provider<__UserAgent>;
/**
* Value for how many times a request will be made at most in case of retry.
*/
maxAttempts?: number | __Provider<number>;
/**
* Specifies which retry algorithm to use.
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
*
*/
retryMode?: string | __Provider<string>;
/**
* Optional logger for logging debug/info/warn/error.
*/
logger?: __Logger;
/**
* Optional extensions
*/
extensions?: RuntimeExtension[];
/**
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
*/
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
}
/**
* @public
*/
export type SSOClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
/**
* @public
*
* The configuration interface of SSOClient class constructor that set the region, credentials and other options.
*/
export interface SSOClientConfig extends SSOClientConfigType {
}
/**
* @public
*/
export type SSOClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
/**
* @public
*
* The resolved configuration interface of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.
*/
export interface SSOClientResolvedConfig extends SSOClientResolvedConfigType {
}
/**
* <p>AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to
* IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles
* assigned to them and get federated into the application.</p>
* <note>
* <p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
* <code>identitystore</code> API namespaces will continue to retain their original name for
* backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">IAM Identity Center rename</a>.</p>
* </note>
* <p>This reference guide describes the IAM Identity Center Portal operations that you can call
* programatically and includes detailed information on data types and errors.</p>
* <note>
* <p>AWS provides SDKs that consist of libraries and sample code for various programming
* languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
* convenient way to create programmatic access to IAM Identity Center and other AWS services. For more
* information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
* </note>
* @public
*/
export declare class SSOClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig> {
/**
* The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.
*/
readonly config: SSOClientResolvedConfig;
constructor(...[configuration]: __CheckOptionalClientConfig<SSOClientConfig>);
/**
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
*/
destroy(): void;
}

View File

@@ -0,0 +1,29 @@
import { type HttpAuthScheme, AwsCredentialIdentity, AwsCredentialIdentityProvider } from "@smithy/types";
import type { SSOHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
/**
* @internal
*/
export interface HttpAuthExtensionConfiguration {
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
httpAuthSchemes(): HttpAuthScheme[];
setHttpAuthSchemeProvider(httpAuthSchemeProvider: SSOHttpAuthSchemeProvider): void;
httpAuthSchemeProvider(): SSOHttpAuthSchemeProvider;
setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
}
/**
* @internal
*/
export type HttpAuthRuntimeConfig = Partial<{
httpAuthSchemes: HttpAuthScheme[];
httpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
}>;
/**
* @internal
*/
export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
/**
* @internal
*/
export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;

View File

@@ -0,0 +1,75 @@
import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core";
import type { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider } from "@smithy/types";
import { type SSOClientResolvedConfig } from "../SSOClient";
/**
* @internal
*/
export interface SSOHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
region?: string;
}
/**
* @internal
*/
export interface SSOHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<SSOClientResolvedConfig, HandlerExecutionContext, SSOHttpAuthSchemeParameters, object> {
}
/**
* @internal
*/
export declare const defaultSSOHttpAuthSchemeParametersProvider: (config: SSOClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<SSOHttpAuthSchemeParameters>;
/**
* @internal
*/
export interface SSOHttpAuthSchemeProvider extends HttpAuthSchemeProvider<SSOHttpAuthSchemeParameters> {
}
/**
* @internal
*/
export declare const defaultSSOHttpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
/**
* @public
*/
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
/**
* A comma-separated list of case-sensitive auth scheme names.
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
* @public
*/
authSchemePreference?: string[] | Provider<string[]>;
/**
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
* @internal
*/
httpAuthSchemes?: HttpAuthScheme[];
/**
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
* @internal
*/
httpAuthSchemeProvider?: SSOHttpAuthSchemeProvider;
}
/**
* @internal
*/
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
/**
* A comma-separated list of case-sensitive auth scheme names.
* An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed.
* For example, the auth scheme with ID aws.auth#sigv4 is named sigv4.
* @public
*/
readonly authSchemePreference: Provider<string[]>;
/**
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
* @internal
*/
readonly httpAuthSchemes: HttpAuthScheme[];
/**
* Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
* @internal
*/
readonly httpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
}
/**
* @internal
*/
export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;

View File

@@ -0,0 +1,97 @@
import { Command as $Command } from "@smithy/smithy-client";
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import type { GetRoleCredentialsRequest, GetRoleCredentialsResponse } from "../models/models_0";
import type { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link GetRoleCredentialsCommand}.
*/
export interface GetRoleCredentialsCommandInput extends GetRoleCredentialsRequest {
}
/**
* @public
*
* The output of {@link GetRoleCredentialsCommand}.
*/
export interface GetRoleCredentialsCommandOutput extends GetRoleCredentialsResponse, __MetadataBearer {
}
declare const GetRoleCredentialsCommand_base: {
new (input: GetRoleCredentialsCommandInput): import("@smithy/smithy-client").CommandImpl<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: GetRoleCredentialsCommandInput): import("@smithy/smithy-client").CommandImpl<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p>Returns the STS short-term credentials for a given role name that is assigned to the
* user.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { SSOClient, GetRoleCredentialsCommand } from "@aws-sdk/client-sso"; // ES Modules import
* // const { SSOClient, GetRoleCredentialsCommand } = require("@aws-sdk/client-sso"); // CommonJS import
* // import type { SSOClientConfig } from "@aws-sdk/client-sso";
* const config = {}; // type is SSOClientConfig
* const client = new SSOClient(config);
* const input = { // GetRoleCredentialsRequest
* roleName: "STRING_VALUE", // required
* accountId: "STRING_VALUE", // required
* accessToken: "STRING_VALUE", // required
* };
* const command = new GetRoleCredentialsCommand(input);
* const response = await client.send(command);
* // { // GetRoleCredentialsResponse
* // roleCredentials: { // RoleCredentials
* // accessKeyId: "STRING_VALUE",
* // secretAccessKey: "STRING_VALUE",
* // sessionToken: "STRING_VALUE",
* // expiration: Number("long"),
* // },
* // };
*
* ```
*
* @param GetRoleCredentialsCommandInput - {@link GetRoleCredentialsCommandInput}
* @returns {@link GetRoleCredentialsCommandOutput}
* @see {@link GetRoleCredentialsCommandInput} for command's `input` shape.
* @see {@link GetRoleCredentialsCommandOutput} for command's `response` shape.
* @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape.
*
* @throws {@link InvalidRequestException} (client fault)
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource doesn't exist.</p>
*
* @throws {@link TooManyRequestsException} (client fault)
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
*
* @throws {@link UnauthorizedException} (client fault)
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
*
* @throws {@link SSOServiceException}
* <p>Base exception class for all service exceptions from SSO service.</p>
*
*
* @public
*/
export declare class GetRoleCredentialsCommand extends GetRoleCredentialsCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: GetRoleCredentialsRequest;
output: GetRoleCredentialsResponse;
};
sdk: {
input: GetRoleCredentialsCommandInput;
output: GetRoleCredentialsCommandOutput;
};
};
}

View File

@@ -0,0 +1,98 @@
import { Command as $Command } from "@smithy/smithy-client";
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import type { ListAccountRolesRequest, ListAccountRolesResponse } from "../models/models_0";
import type { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link ListAccountRolesCommand}.
*/
export interface ListAccountRolesCommandInput extends ListAccountRolesRequest {
}
/**
* @public
*
* The output of {@link ListAccountRolesCommand}.
*/
export interface ListAccountRolesCommandOutput extends ListAccountRolesResponse, __MetadataBearer {
}
declare const ListAccountRolesCommand_base: {
new (input: ListAccountRolesCommandInput): import("@smithy/smithy-client").CommandImpl<ListAccountRolesCommandInput, ListAccountRolesCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: ListAccountRolesCommandInput): import("@smithy/smithy-client").CommandImpl<ListAccountRolesCommandInput, ListAccountRolesCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p>Lists all roles that are assigned to the user for a given AWS account.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { SSOClient, ListAccountRolesCommand } from "@aws-sdk/client-sso"; // ES Modules import
* // const { SSOClient, ListAccountRolesCommand } = require("@aws-sdk/client-sso"); // CommonJS import
* // import type { SSOClientConfig } from "@aws-sdk/client-sso";
* const config = {}; // type is SSOClientConfig
* const client = new SSOClient(config);
* const input = { // ListAccountRolesRequest
* nextToken: "STRING_VALUE",
* maxResults: Number("int"),
* accessToken: "STRING_VALUE", // required
* accountId: "STRING_VALUE", // required
* };
* const command = new ListAccountRolesCommand(input);
* const response = await client.send(command);
* // { // ListAccountRolesResponse
* // nextToken: "STRING_VALUE",
* // roleList: [ // RoleListType
* // { // RoleInfo
* // roleName: "STRING_VALUE",
* // accountId: "STRING_VALUE",
* // },
* // ],
* // };
*
* ```
*
* @param ListAccountRolesCommandInput - {@link ListAccountRolesCommandInput}
* @returns {@link ListAccountRolesCommandOutput}
* @see {@link ListAccountRolesCommandInput} for command's `input` shape.
* @see {@link ListAccountRolesCommandOutput} for command's `response` shape.
* @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape.
*
* @throws {@link InvalidRequestException} (client fault)
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource doesn't exist.</p>
*
* @throws {@link TooManyRequestsException} (client fault)
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
*
* @throws {@link UnauthorizedException} (client fault)
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
*
* @throws {@link SSOServiceException}
* <p>Base exception class for all service exceptions from SSO service.</p>
*
*
* @public
*/
export declare class ListAccountRolesCommand extends ListAccountRolesCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: ListAccountRolesRequest;
output: ListAccountRolesResponse;
};
sdk: {
input: ListAccountRolesCommandInput;
output: ListAccountRolesCommandOutput;
};
};
}

View File

@@ -0,0 +1,100 @@
import { Command as $Command } from "@smithy/smithy-client";
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import type { ListAccountsRequest, ListAccountsResponse } from "../models/models_0";
import type { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link ListAccountsCommand}.
*/
export interface ListAccountsCommandInput extends ListAccountsRequest {
}
/**
* @public
*
* The output of {@link ListAccountsCommand}.
*/
export interface ListAccountsCommandOutput extends ListAccountsResponse, __MetadataBearer {
}
declare const ListAccountsCommand_base: {
new (input: ListAccountsCommandInput): import("@smithy/smithy-client").CommandImpl<ListAccountsCommandInput, ListAccountsCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: ListAccountsCommandInput): import("@smithy/smithy-client").CommandImpl<ListAccountsCommandInput, ListAccountsCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p>Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the
* administrator of the account. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers">Assign User Access</a> in the <i>IAM Identity Center User Guide</i>. This operation
* returns a paginated response.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { SSOClient, ListAccountsCommand } from "@aws-sdk/client-sso"; // ES Modules import
* // const { SSOClient, ListAccountsCommand } = require("@aws-sdk/client-sso"); // CommonJS import
* // import type { SSOClientConfig } from "@aws-sdk/client-sso";
* const config = {}; // type is SSOClientConfig
* const client = new SSOClient(config);
* const input = { // ListAccountsRequest
* nextToken: "STRING_VALUE",
* maxResults: Number("int"),
* accessToken: "STRING_VALUE", // required
* };
* const command = new ListAccountsCommand(input);
* const response = await client.send(command);
* // { // ListAccountsResponse
* // nextToken: "STRING_VALUE",
* // accountList: [ // AccountListType
* // { // AccountInfo
* // accountId: "STRING_VALUE",
* // accountName: "STRING_VALUE",
* // emailAddress: "STRING_VALUE",
* // },
* // ],
* // };
*
* ```
*
* @param ListAccountsCommandInput - {@link ListAccountsCommandInput}
* @returns {@link ListAccountsCommandOutput}
* @see {@link ListAccountsCommandInput} for command's `input` shape.
* @see {@link ListAccountsCommandOutput} for command's `response` shape.
* @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape.
*
* @throws {@link InvalidRequestException} (client fault)
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource doesn't exist.</p>
*
* @throws {@link TooManyRequestsException} (client fault)
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
*
* @throws {@link UnauthorizedException} (client fault)
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
*
* @throws {@link SSOServiceException}
* <p>Base exception class for all service exceptions from SSO service.</p>
*
*
* @public
*/
export declare class ListAccountsCommand extends ListAccountsCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: ListAccountsRequest;
output: ListAccountsResponse;
};
sdk: {
input: ListAccountsCommandInput;
output: ListAccountsCommandOutput;
};
};
}

View File

@@ -0,0 +1,97 @@
import { Command as $Command } from "@smithy/smithy-client";
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
import type { LogoutRequest } from "../models/models_0";
import type { ServiceInputTypes, ServiceOutputTypes, SSOClientResolvedConfig } from "../SSOClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link LogoutCommand}.
*/
export interface LogoutCommandInput extends LogoutRequest {
}
/**
* @public
*
* The output of {@link LogoutCommand}.
*/
export interface LogoutCommandOutput extends __MetadataBearer {
}
declare const LogoutCommand_base: {
new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl<LogoutCommandInput, LogoutCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl<LogoutCommandInput, LogoutCommandOutput, SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p>Removes the locally stored SSO tokens from the client-side cache and sends an API call to
* the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in
* session.</p>
* <note>
* <p>If a user uses IAM Identity Center to access the AWS CLI, the users IAM Identity Center sign in session is
* used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set.
* More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user,
* and the corresponding temporary AWS credentials are returned to the client.</p>
* <p>After user logout, any existing IAM role sessions that were created by using IAM Identity Center
* permission sets continue based on the duration configured in the permission set.
* For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html">User
* authentications</a> in the <i>IAM Identity Center User
* Guide</i>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { SSOClient, LogoutCommand } from "@aws-sdk/client-sso"; // ES Modules import
* // const { SSOClient, LogoutCommand } = require("@aws-sdk/client-sso"); // CommonJS import
* // import type { SSOClientConfig } from "@aws-sdk/client-sso";
* const config = {}; // type is SSOClientConfig
* const client = new SSOClient(config);
* const input = { // LogoutRequest
* accessToken: "STRING_VALUE", // required
* };
* const command = new LogoutCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param LogoutCommandInput - {@link LogoutCommandInput}
* @returns {@link LogoutCommandOutput}
* @see {@link LogoutCommandInput} for command's `input` shape.
* @see {@link LogoutCommandOutput} for command's `response` shape.
* @see {@link SSOClientResolvedConfig | config} for SSOClient's `config` shape.
*
* @throws {@link InvalidRequestException} (client fault)
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
*
* @throws {@link TooManyRequestsException} (client fault)
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
*
* @throws {@link UnauthorizedException} (client fault)
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
*
* @throws {@link SSOServiceException}
* <p>Base exception class for all service exceptions from SSO service.</p>
*
*
* @public
*/
export declare class LogoutCommand extends LogoutCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: LogoutRequest;
output: {};
};
sdk: {
input: LogoutCommandInput;
output: LogoutCommandOutput;
};
};
}

View File

@@ -0,0 +1,4 @@
export * from "./GetRoleCredentialsCommand";
export * from "./ListAccountRolesCommand";
export * from "./ListAccountsCommand";
export * from "./LogoutCommand";

View File

@@ -0,0 +1,50 @@
import type { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types";
/**
* @public
*/
export interface ClientInputEndpointParameters {
region?: string | undefined | Provider<string | undefined>;
useDualstackEndpoint?: boolean | undefined | Provider<boolean | undefined>;
useFipsEndpoint?: boolean | undefined | Provider<boolean | undefined>;
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
}
/**
* @public
*/
export type ClientResolvedEndpointParameters = Omit<ClientInputEndpointParameters, "endpoint"> & {
defaultSigningName: string;
};
/**
* @internal
*/
export declare const resolveClientEndpointParameters: <T>(options: T & ClientInputEndpointParameters) => T & ClientResolvedEndpointParameters;
/**
* @internal
*/
export declare const commonParams: {
readonly UseFIPS: {
readonly type: "builtInParams";
readonly name: "useFipsEndpoint";
};
readonly Endpoint: {
readonly type: "builtInParams";
readonly name: "endpoint";
};
readonly Region: {
readonly type: "builtInParams";
readonly name: "region";
};
readonly UseDualStack: {
readonly type: "builtInParams";
readonly name: "useDualstackEndpoint";
};
};
/**
* @internal
*/
export interface EndpointParameters extends __EndpointParameters {
Region?: string | undefined;
UseDualStack?: boolean | undefined;
UseFIPS?: boolean | undefined;
Endpoint?: string | undefined;
}

View File

@@ -0,0 +1,8 @@
import type { EndpointV2, Logger } from "@smithy/types";
import type { EndpointParameters } from "./EndpointParameters";
/**
* @internal
*/
export declare const defaultEndpointResolver: (endpointParams: EndpointParameters, context?: {
logger?: Logger;
}) => EndpointV2;

View File

@@ -0,0 +1,2 @@
import { RuleSetObject } from "@smithy/types";
export declare const ruleSet: RuleSetObject;

View File

@@ -0,0 +1,9 @@
import type { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
import type { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
import type { DefaultExtensionConfiguration } from "@smithy/types";
import type { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
/**
* @internal
*/
export interface SSOExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {
}

View File

@@ -0,0 +1,31 @@
/**
* <p>AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to
* IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles
* assigned to them and get federated into the application.</p>
* <note>
* <p>Although AWS Single Sign-On was renamed, the <code>sso</code> and
* <code>identitystore</code> API namespaces will continue to retain their original name for
* backward compatibility purposes. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed">IAM Identity Center rename</a>.</p>
* </note>
* <p>This reference guide describes the IAM Identity Center Portal operations that you can call
* programatically and includes detailed information on data types and errors.</p>
* <note>
* <p>AWS provides SDKs that consist of libraries and sample code for various programming
* languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
* convenient way to create programmatic access to IAM Identity Center and other AWS services. For more
* information about the AWS SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
* </note>
*
* @packageDocumentation
*/
export * from "./SSOClient";
export * from "./SSO";
export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
export type { RuntimeExtension } from "./runtimeExtensions";
export type { SSOExtensionConfiguration } from "./extensionConfiguration";
export * from "./commands";
export * from "./schemas/schemas_0";
export * from "./pagination";
export * from "./models/errors";
export * from "./models/models_0";
export { SSOServiceException } from "./models/SSOServiceException";

View File

@@ -0,0 +1,14 @@
import { type ServiceExceptionOptions as __ServiceExceptionOptions, ServiceException as __ServiceException } from "@smithy/smithy-client";
export type { __ServiceExceptionOptions };
export { __ServiceException };
/**
* @public
*
* Base exception class for all service exceptions from SSO service.
*/
export declare class SSOServiceException extends __ServiceException {
/**
* @internal
*/
constructor(options: __ServiceExceptionOptions);
}

View File

@@ -0,0 +1,53 @@
import type { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { SSOServiceException as __BaseException } from "./SSOServiceException";
/**
* <p>Indicates that a problem occurred with the input to the request. For example, a required
* parameter might be missing or out of range.</p>
* @public
*/
export declare class InvalidRequestException extends __BaseException {
readonly name: "InvalidRequestException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InvalidRequestException, __BaseException>);
}
/**
* <p>The specified resource doesn't exist.</p>
* @public
*/
export declare class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
}
/**
* <p>Indicates that the request is being made too frequently and is more than what the server
* can handle.</p>
* @public
*/
export declare class TooManyRequestsException extends __BaseException {
readonly name: "TooManyRequestsException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>);
}
/**
* <p>Indicates that the request is not authorized. This can happen due to an invalid access
* token in the request.</p>
* @public
*/
export declare class UnauthorizedException extends __BaseException {
readonly name: "UnauthorizedException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
}

View File

@@ -0,0 +1,189 @@
/**
* <p>Provides information about your AWS account.</p>
* @public
*/
export interface AccountInfo {
/**
* <p>The identifier of the AWS account that is assigned to the user.</p>
* @public
*/
accountId?: string | undefined;
/**
* <p>The display name of the AWS account that is assigned to the user.</p>
* @public
*/
accountName?: string | undefined;
/**
* <p>The email address of the AWS account that is assigned to the user.</p>
* @public
*/
emailAddress?: string | undefined;
}
/**
* @public
*/
export interface GetRoleCredentialsRequest {
/**
* <p>The friendly name of the role that is assigned to the user.</p>
* @public
*/
roleName: string | undefined;
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
* @public
*/
accountId: string | undefined;
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
* @public
*/
accessToken: string | undefined;
}
/**
* <p>Provides information about the role credentials that are assigned to the user.</p>
* @public
*/
export interface RoleCredentials {
/**
* <p>The identifier used for the temporary security credentials. For more information, see
* <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
* @public
*/
accessKeyId?: string | undefined;
/**
* <p>The key that is used to sign the request. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
* @public
*/
secretAccessKey?: string | undefined;
/**
* <p>The token used for temporary credentials. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html">Using Temporary Security Credentials to Request Access to AWS Resources</a> in the
* <i>AWS IAM User Guide</i>.</p>
* @public
*/
sessionToken?: string | undefined;
/**
* <p>The date on which temporary security credentials expire.</p>
* @public
*/
expiration?: number | undefined;
}
/**
* @public
*/
export interface GetRoleCredentialsResponse {
/**
* <p>The credentials for the role that is assigned to the user.</p>
* @public
*/
roleCredentials?: RoleCredentials | undefined;
}
/**
* @public
*/
export interface ListAccountRolesRequest {
/**
* <p>The page token from the previous response output when you request subsequent pages.</p>
* @public
*/
nextToken?: string | undefined;
/**
* <p>The number of items that clients can request per page.</p>
* @public
*/
maxResults?: number | undefined;
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
* @public
*/
accessToken: string | undefined;
/**
* <p>The identifier for the AWS account that is assigned to the user.</p>
* @public
*/
accountId: string | undefined;
}
/**
* <p>Provides information about the role that is assigned to the user.</p>
* @public
*/
export interface RoleInfo {
/**
* <p>The friendly name of the role that is assigned to the user.</p>
* @public
*/
roleName?: string | undefined;
/**
* <p>The identifier of the AWS account assigned to the user.</p>
* @public
*/
accountId?: string | undefined;
}
/**
* @public
*/
export interface ListAccountRolesResponse {
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
* @public
*/
nextToken?: string | undefined;
/**
* <p>A paginated response with the list of roles and the next token if more results are
* available.</p>
* @public
*/
roleList?: RoleInfo[] | undefined;
}
/**
* @public
*/
export interface ListAccountsRequest {
/**
* <p>(Optional) When requesting subsequent pages, this is the page token from the previous
* response output.</p>
* @public
*/
nextToken?: string | undefined;
/**
* <p>This is the number of items clients can request per page.</p>
* @public
*/
maxResults?: number | undefined;
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
* @public
*/
accessToken: string | undefined;
}
/**
* @public
*/
export interface ListAccountsResponse {
/**
* <p>The page token client that is used to retrieve the list of accounts.</p>
* @public
*/
nextToken?: string | undefined;
/**
* <p>A paginated response with the list of account information and the next token if more
* results are available.</p>
* @public
*/
accountList?: AccountInfo[] | undefined;
}
/**
* @public
*/
export interface LogoutRequest {
/**
* <p>The token issued by the <code>CreateToken</code> API call. For more information, see
* <a href="https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html">CreateToken</a> in the <i>IAM Identity Center OIDC API Reference Guide</i>.</p>
* @public
*/
accessToken: string | undefined;
}

View File

@@ -0,0 +1,8 @@
import type { PaginationConfiguration } from "@smithy/types";
import { SSOClient } from "../SSOClient";
/**
* @public
*/
export interface SSOPaginationConfiguration extends PaginationConfiguration {
client: SSOClient;
}

View File

@@ -0,0 +1,7 @@
import type { Paginator } from "@smithy/types";
import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "../commands/ListAccountRolesCommand";
import { SSOPaginationConfiguration } from "./Interfaces";
/**
* @public
*/
export declare const paginateListAccountRoles: (config: SSOPaginationConfiguration, input: ListAccountRolesCommandInput, ...rest: any[]) => Paginator<ListAccountRolesCommandOutput>;

View File

@@ -0,0 +1,7 @@
import type { Paginator } from "@smithy/types";
import { ListAccountsCommandInput, ListAccountsCommandOutput } from "../commands/ListAccountsCommand";
import { SSOPaginationConfiguration } from "./Interfaces";
/**
* @public
*/
export declare const paginateListAccounts: (config: SSOPaginationConfiguration, input: ListAccountsCommandInput, ...rest: any[]) => Paginator<ListAccountsCommandOutput>;

View File

@@ -0,0 +1,3 @@
export * from "./Interfaces";
export * from "./ListAccountRolesPaginator";
export * from "./ListAccountsPaginator";

View File

@@ -0,0 +1,62 @@
import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler";
import type { SSOClientConfig } from "./SSOClient";
/**
* @internal
*/
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
region: string | import("@smithy/types").Provider<any>;
requestHandler: import("@smithy/protocol-http").HttpHandler<any> | RequestHandler;
retryMode: string | import("@smithy/types").Provider<string>;
sha256: import("@smithy/types").HashConstructor;
streamCollector: import("@smithy/types").StreamCollector;
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
cacheMiddleware?: boolean | undefined;
protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof import("@aws-sdk/core").AwsRestJsonProtocol;
protocolSettings: {
defaultNamespace?: string;
[setting: string]: unknown;
};
apiVersion: string;
urlParser: import("@smithy/types").UrlParser;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
profile?: string;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
customUserAgent?: string | import("@smithy/types").UserAgent;
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
logger?: import("@smithy/types").Logger;
}) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
} | {
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
})[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider;
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner;
};

View File

@@ -0,0 +1,62 @@
import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler";
import type { SSOClientConfig } from "./SSOClient";
/**
* @internal
*/
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
authSchemePreference: string[] | import("@smithy/types").Provider<string[]>;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
region: string | import("@smithy/types").Provider<string>;
requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler<any>;
retryMode: string | import("@smithy/types").Provider<string>;
sha256: import("@smithy/types").HashConstructor;
streamCollector: import("@smithy/types").StreamCollector;
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
cacheMiddleware?: boolean | undefined;
protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof import("@aws-sdk/core").AwsRestJsonProtocol;
protocolSettings: {
defaultNamespace?: string;
[setting: string]: unknown;
};
apiVersion: string;
urlParser: import("@smithy/types").UrlParser;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
profile?: string;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
customUserAgent?: string | import("@smithy/types").UserAgent;
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
logger?: import("@smithy/types").Logger;
}) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
} | {
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
})[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider;
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner;
};

View File

@@ -0,0 +1,61 @@
import type { SSOClientConfig } from "./SSOClient";
/**
* @internal
*/
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
sha256: import("@smithy/types").HashConstructor;
requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
cacheMiddleware?: boolean;
protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof import("@aws-sdk/core").AwsRestJsonProtocol;
protocolSettings: {
defaultNamespace?: string;
[setting: string]: unknown;
};
apiVersion: string;
urlParser: import("@smithy/types").UrlParser;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
streamCollector: import("@smithy/types").StreamCollector;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
region: string | import("@smithy/types").Provider<any>;
profile?: string;
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
retryMode: string | import("@smithy/types").Provider<string>;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
customUserAgent?: string | import("@smithy/types").UserAgent;
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
logger?: import("@smithy/types").Logger;
}) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
} | {
schemeId: string;
identityProvider: (ipc: import("@smithy/types").IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
})[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider;
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner;
};

View File

@@ -0,0 +1,38 @@
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
import { NoAuthSigner } from "@smithy/core";
import type { IdentityProviderConfig } from "@smithy/types";
import type { SSOClientConfig } from "./SSOClient";
/**
* @internal
*/
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
apiVersion: string;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
disableHostPrefix: boolean;
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
logger?: import("@smithy/types").Logger;
}) => import("@smithy/types").EndpointV2;
extensions: import("./runtimeExtensions").RuntimeExtension[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[] | ({
schemeId: string;
identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | undefined;
signer: AwsSdkSigV4Signer;
} | {
schemeId: string;
identityProvider: (ipc: IdentityProviderConfig) => import("@smithy/types").IdentityProvider<import("@smithy/types").Identity> | (() => Promise<{}>);
signer: NoAuthSigner;
})[];
logger: import("@smithy/types").Logger;
protocol: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | typeof AwsRestJsonProtocol;
protocolSettings: {
[setting: string]: unknown;
defaultNamespace?: string;
};
serviceId: string;
urlParser: import("@smithy/types").UrlParser;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
};

View File

@@ -0,0 +1,17 @@
import type { SSOExtensionConfiguration } from "./extensionConfiguration";
/**
* @public
*/
export interface RuntimeExtension {
configure(extensionConfiguration: SSOExtensionConfiguration): void;
}
/**
* @public
*/
export interface RuntimeExtensionsConfig {
extensions: RuntimeExtension[];
}
/**
* @internal
*/
export declare const resolveRuntimeExtensions: (runtimeConfig: any, extensions: RuntimeExtension[]) => any;

View File

@@ -0,0 +1,20 @@
import type { StaticErrorSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
export declare var AccountInfo$: StaticStructureSchema;
export declare var GetRoleCredentialsRequest$: StaticStructureSchema;
export declare var GetRoleCredentialsResponse$: StaticStructureSchema;
export declare var InvalidRequestException$: StaticErrorSchema;
export declare var ListAccountRolesRequest$: StaticStructureSchema;
export declare var ListAccountRolesResponse$: StaticStructureSchema;
export declare var ListAccountsRequest$: StaticStructureSchema;
export declare var ListAccountsResponse$: StaticStructureSchema;
export declare var LogoutRequest$: StaticStructureSchema;
export declare var ResourceNotFoundException$: StaticErrorSchema;
export declare var RoleCredentials$: StaticStructureSchema;
export declare var RoleInfo$: StaticStructureSchema;
export declare var TooManyRequestsException$: StaticErrorSchema;
export declare var UnauthorizedException$: StaticErrorSchema;
export declare var SSOServiceException$: StaticErrorSchema;
export declare var GetRoleCredentials$: StaticOperationSchema;
export declare var ListAccountRoles$: StaticOperationSchema;
export declare var ListAccounts$: StaticOperationSchema;
export declare var Logout$: StaticOperationSchema;

View File

@@ -0,0 +1,73 @@
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
import {
GetRoleCredentialsCommandInput,
GetRoleCredentialsCommandOutput,
} from "./commands/GetRoleCredentialsCommand";
import {
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
} from "./commands/ListAccountRolesCommand";
import {
ListAccountsCommandInput,
ListAccountsCommandOutput,
} from "./commands/ListAccountsCommand";
import {
LogoutCommandInput,
LogoutCommandOutput,
} from "./commands/LogoutCommand";
import { SSOClient } from "./SSOClient";
export interface SSO {
getRoleCredentials(
args: GetRoleCredentialsCommandInput,
options?: __HttpHandlerOptions
): Promise<GetRoleCredentialsCommandOutput>;
getRoleCredentials(
args: GetRoleCredentialsCommandInput,
cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void
): void;
getRoleCredentials(
args: GetRoleCredentialsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void
): void;
listAccountRoles(
args: ListAccountRolesCommandInput,
options?: __HttpHandlerOptions
): Promise<ListAccountRolesCommandOutput>;
listAccountRoles(
args: ListAccountRolesCommandInput,
cb: (err: any, data?: ListAccountRolesCommandOutput) => void
): void;
listAccountRoles(
args: ListAccountRolesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListAccountRolesCommandOutput) => void
): void;
listAccounts(
args: ListAccountsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListAccountsCommandOutput>;
listAccounts(
args: ListAccountsCommandInput,
cb: (err: any, data?: ListAccountsCommandOutput) => void
): void;
listAccounts(
args: ListAccountsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListAccountsCommandOutput) => void
): void;
logout(
args: LogoutCommandInput,
options?: __HttpHandlerOptions
): Promise<LogoutCommandOutput>;
logout(
args: LogoutCommandInput,
cb: (err: any, data?: LogoutCommandOutput) => void
): void;
logout(
args: LogoutCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: LogoutCommandOutput) => void
): void;
}
export declare class SSO extends SSOClient implements SSO {}

View File

@@ -0,0 +1,138 @@
import {
HostHeaderInputConfig,
HostHeaderResolvedConfig,
} from "@aws-sdk/middleware-host-header";
import {
UserAgentInputConfig,
UserAgentResolvedConfig,
} from "@aws-sdk/middleware-user-agent";
import {
RegionInputConfig,
RegionResolvedConfig,
} from "@smithy/config-resolver";
import {
EndpointInputConfig,
EndpointResolvedConfig,
} from "@smithy/middleware-endpoint";
import {
RetryInputConfig,
RetryResolvedConfig,
} from "@smithy/middleware-retry";
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
import {
DefaultsMode as __DefaultsMode,
SmithyConfiguration as __SmithyConfiguration,
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
Client as __Client,
} from "@smithy/smithy-client";
import {
BodyLengthCalculator as __BodyLengthCalculator,
CheckOptionalClientConfig as __CheckOptionalClientConfig,
ChecksumConstructor as __ChecksumConstructor,
Decoder as __Decoder,
Encoder as __Encoder,
HashConstructor as __HashConstructor,
HttpHandlerOptions as __HttpHandlerOptions,
Logger as __Logger,
Provider as __Provider,
StreamCollector as __StreamCollector,
UrlParser as __UrlParser,
Provider,
UserAgent as __UserAgent,
} from "@smithy/types";
import {
HttpAuthSchemeInputConfig,
HttpAuthSchemeResolvedConfig,
} from "./auth/httpAuthSchemeProvider";
import {
GetRoleCredentialsCommandInput,
GetRoleCredentialsCommandOutput,
} from "./commands/GetRoleCredentialsCommand";
import {
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
} from "./commands/ListAccountRolesCommand";
import {
ListAccountsCommandInput,
ListAccountsCommandOutput,
} from "./commands/ListAccountsCommand";
import {
LogoutCommandInput,
LogoutCommandOutput,
} from "./commands/LogoutCommand";
import {
ClientInputEndpointParameters,
ClientResolvedEndpointParameters,
EndpointParameters,
} from "./endpoint/EndpointParameters";
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
export { __Client };
export type ServiceInputTypes =
| GetRoleCredentialsCommandInput
| ListAccountRolesCommandInput
| ListAccountsCommandInput
| LogoutCommandInput;
export type ServiceOutputTypes =
| GetRoleCredentialsCommandOutput
| ListAccountRolesCommandOutput
| ListAccountsCommandOutput
| LogoutCommandOutput;
export interface ClientDefaults
extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
requestHandler?: __HttpHandlerUserInput;
sha256?: __ChecksumConstructor | __HashConstructor;
urlParser?: __UrlParser;
bodyLengthChecker?: __BodyLengthCalculator;
streamCollector?: __StreamCollector;
base64Decoder?: __Decoder;
base64Encoder?: __Encoder;
utf8Decoder?: __Decoder;
utf8Encoder?: __Encoder;
runtime?: string;
disableHostPrefix?: boolean;
serviceId?: string;
useDualstackEndpoint?: boolean | __Provider<boolean>;
useFipsEndpoint?: boolean | __Provider<boolean>;
region?: string | __Provider<string>;
profile?: string;
defaultUserAgentProvider?: Provider<__UserAgent>;
maxAttempts?: number | __Provider<number>;
retryMode?: string | __Provider<string>;
logger?: __Logger;
extensions?: RuntimeExtension[];
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
}
export type SSOClientConfigType = Partial<
__SmithyConfiguration<__HttpHandlerOptions>
> &
ClientDefaults &
UserAgentInputConfig &
RetryInputConfig &
RegionInputConfig &
HostHeaderInputConfig &
EndpointInputConfig<EndpointParameters> &
HttpAuthSchemeInputConfig &
ClientInputEndpointParameters;
export interface SSOClientConfig extends SSOClientConfigType {}
export type SSOClientResolvedConfigType =
__SmithyResolvedConfiguration<__HttpHandlerOptions> &
Required<ClientDefaults> &
RuntimeExtensionsConfig &
UserAgentResolvedConfig &
RetryResolvedConfig &
RegionResolvedConfig &
HostHeaderResolvedConfig &
EndpointResolvedConfig<EndpointParameters> &
HttpAuthSchemeResolvedConfig &
ClientResolvedEndpointParameters;
export interface SSOClientResolvedConfig extends SSOClientResolvedConfigType {}
export declare class SSOClient extends __Client<
__HttpHandlerOptions,
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig
> {
readonly config: SSOClientResolvedConfig;
constructor(...[configuration]: __CheckOptionalClientConfig<SSOClientConfig>);
destroy(): void;
}

View File

@@ -0,0 +1,32 @@
import {
HttpAuthScheme,
AwsCredentialIdentity,
AwsCredentialIdentityProvider,
} from "@smithy/types";
import { SSOHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
export interface HttpAuthExtensionConfiguration {
setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
httpAuthSchemes(): HttpAuthScheme[];
setHttpAuthSchemeProvider(
httpAuthSchemeProvider: SSOHttpAuthSchemeProvider
): void;
httpAuthSchemeProvider(): SSOHttpAuthSchemeProvider;
setCredentials(
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider
): void;
credentials():
| AwsCredentialIdentity
| AwsCredentialIdentityProvider
| undefined;
}
export type HttpAuthRuntimeConfig = Partial<{
httpAuthSchemes: HttpAuthScheme[];
httpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
}>;
export declare const getHttpAuthExtensionConfiguration: (
runtimeConfig: HttpAuthRuntimeConfig
) => HttpAuthExtensionConfiguration;
export declare const resolveHttpAuthRuntimeConfig: (
config: HttpAuthExtensionConfiguration
) => HttpAuthRuntimeConfig;

View File

@@ -0,0 +1,46 @@
import {
AwsSdkSigV4AuthInputConfig,
AwsSdkSigV4AuthResolvedConfig,
AwsSdkSigV4PreviouslyResolved,
} from "@aws-sdk/core";
import {
HandlerExecutionContext,
HttpAuthScheme,
HttpAuthSchemeParameters,
HttpAuthSchemeParametersProvider,
HttpAuthSchemeProvider,
Provider,
} from "@smithy/types";
import { SSOClientResolvedConfig } from "../SSOClient";
export interface SSOHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
region?: string;
}
export interface SSOHttpAuthSchemeParametersProvider
extends HttpAuthSchemeParametersProvider<
SSOClientResolvedConfig,
HandlerExecutionContext,
SSOHttpAuthSchemeParameters,
object
> {}
export declare const defaultSSOHttpAuthSchemeParametersProvider: (
config: SSOClientResolvedConfig,
context: HandlerExecutionContext,
input: object
) => Promise<SSOHttpAuthSchemeParameters>;
export interface SSOHttpAuthSchemeProvider
extends HttpAuthSchemeProvider<SSOHttpAuthSchemeParameters> {}
export declare const defaultSSOHttpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
authSchemePreference?: string[] | Provider<string[]>;
httpAuthSchemes?: HttpAuthScheme[];
httpAuthSchemeProvider?: SSOHttpAuthSchemeProvider;
}
export interface HttpAuthSchemeResolvedConfig
extends AwsSdkSigV4AuthResolvedConfig {
readonly authSchemePreference: Provider<string[]>;
readonly httpAuthSchemes: HttpAuthScheme[];
readonly httpAuthSchemeProvider: SSOHttpAuthSchemeProvider;
}
export declare const resolveHttpAuthSchemeConfig: <T>(
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
) => T & HttpAuthSchemeResolvedConfig;

View File

@@ -0,0 +1,51 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import {
GetRoleCredentialsRequest,
GetRoleCredentialsResponse,
} from "../models/models_0";
import {
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig,
} from "../SSOClient";
export { __MetadataBearer };
export { $Command };
export interface GetRoleCredentialsCommandInput
extends GetRoleCredentialsRequest {}
export interface GetRoleCredentialsCommandOutput
extends GetRoleCredentialsResponse,
__MetadataBearer {}
declare const GetRoleCredentialsCommand_base: {
new (
input: GetRoleCredentialsCommandInput
): import("@smithy/smithy-client").CommandImpl<
GetRoleCredentialsCommandInput,
GetRoleCredentialsCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
new (
input: GetRoleCredentialsCommandInput
): import("@smithy/smithy-client").CommandImpl<
GetRoleCredentialsCommandInput,
GetRoleCredentialsCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
export declare class GetRoleCredentialsCommand extends GetRoleCredentialsCommand_base {
protected static __types: {
api: {
input: GetRoleCredentialsRequest;
output: GetRoleCredentialsResponse;
};
sdk: {
input: GetRoleCredentialsCommandInput;
output: GetRoleCredentialsCommandOutput;
};
};
}

View File

@@ -0,0 +1,50 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import {
ListAccountRolesRequest,
ListAccountRolesResponse,
} from "../models/models_0";
import {
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig,
} from "../SSOClient";
export { __MetadataBearer };
export { $Command };
export interface ListAccountRolesCommandInput extends ListAccountRolesRequest {}
export interface ListAccountRolesCommandOutput
extends ListAccountRolesResponse,
__MetadataBearer {}
declare const ListAccountRolesCommand_base: {
new (
input: ListAccountRolesCommandInput
): import("@smithy/smithy-client").CommandImpl<
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
new (
input: ListAccountRolesCommandInput
): import("@smithy/smithy-client").CommandImpl<
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
export declare class ListAccountRolesCommand extends ListAccountRolesCommand_base {
protected static __types: {
api: {
input: ListAccountRolesRequest;
output: ListAccountRolesResponse;
};
sdk: {
input: ListAccountRolesCommandInput;
output: ListAccountRolesCommandOutput;
};
};
}

View File

@@ -0,0 +1,47 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { ListAccountsRequest, ListAccountsResponse } from "../models/models_0";
import {
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig,
} from "../SSOClient";
export { __MetadataBearer };
export { $Command };
export interface ListAccountsCommandInput extends ListAccountsRequest {}
export interface ListAccountsCommandOutput
extends ListAccountsResponse,
__MetadataBearer {}
declare const ListAccountsCommand_base: {
new (
input: ListAccountsCommandInput
): import("@smithy/smithy-client").CommandImpl<
ListAccountsCommandInput,
ListAccountsCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
new (
input: ListAccountsCommandInput
): import("@smithy/smithy-client").CommandImpl<
ListAccountsCommandInput,
ListAccountsCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
export declare class ListAccountsCommand extends ListAccountsCommand_base {
protected static __types: {
api: {
input: ListAccountsRequest;
output: ListAccountsResponse;
};
sdk: {
input: ListAccountsCommandInput;
output: ListAccountsCommandOutput;
};
};
}

View File

@@ -0,0 +1,41 @@
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { LogoutRequest } from "../models/models_0";
import {
ServiceInputTypes,
ServiceOutputTypes,
SSOClientResolvedConfig,
} from "../SSOClient";
export { __MetadataBearer };
export { $Command };
export interface LogoutCommandInput extends LogoutRequest {}
export interface LogoutCommandOutput extends __MetadataBearer {}
declare const LogoutCommand_base: {
new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl<
LogoutCommandInput,
LogoutCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
new (input: LogoutCommandInput): import("@smithy/smithy-client").CommandImpl<
LogoutCommandInput,
LogoutCommandOutput,
SSOClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
export declare class LogoutCommand extends LogoutCommand_base {
protected static __types: {
api: {
input: LogoutRequest;
output: {};
};
sdk: {
input: LogoutCommandInput;
output: LogoutCommandOutput;
};
};
}

View File

@@ -0,0 +1,4 @@
export * from "./GetRoleCredentialsCommand";
export * from "./ListAccountRolesCommand";
export * from "./ListAccountsCommand";
export * from "./LogoutCommand";

View File

@@ -0,0 +1,51 @@
import {
Endpoint,
EndpointParameters as __EndpointParameters,
EndpointV2,
Provider,
} from "@smithy/types";
export interface ClientInputEndpointParameters {
region?: string | undefined | Provider<string | undefined>;
useDualstackEndpoint?: boolean | undefined | Provider<boolean | undefined>;
useFipsEndpoint?: boolean | undefined | Provider<boolean | undefined>;
endpoint?:
| string
| Provider<string>
| Endpoint
| Provider<Endpoint>
| EndpointV2
| Provider<EndpointV2>;
}
export type ClientResolvedEndpointParameters = Pick<
ClientInputEndpointParameters,
Exclude<keyof ClientInputEndpointParameters, "endpoint">
> & {
defaultSigningName: string;
};
export declare const resolveClientEndpointParameters: <T>(
options: T & ClientInputEndpointParameters
) => T & ClientResolvedEndpointParameters;
export declare const commonParams: {
readonly UseFIPS: {
readonly type: "builtInParams";
readonly name: "useFipsEndpoint";
};
readonly Endpoint: {
readonly type: "builtInParams";
readonly name: "endpoint";
};
readonly Region: {
readonly type: "builtInParams";
readonly name: "region";
};
readonly UseDualStack: {
readonly type: "builtInParams";
readonly name: "useDualstackEndpoint";
};
};
export interface EndpointParameters extends __EndpointParameters {
Region?: string | undefined;
UseDualStack?: boolean | undefined;
UseFIPS?: boolean | undefined;
Endpoint?: string | undefined;
}

View File

@@ -0,0 +1,8 @@
import { EndpointV2, Logger } from "@smithy/types";
import { EndpointParameters } from "./EndpointParameters";
export declare const defaultEndpointResolver: (
endpointParams: EndpointParameters,
context?: {
logger?: Logger;
}
) => EndpointV2;

View File

@@ -0,0 +1,2 @@
import { RuleSetObject } from "@smithy/types";
export declare const ruleSet: RuleSetObject;

View File

@@ -0,0 +1,9 @@
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
import { DefaultExtensionConfiguration } from "@smithy/types";
import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
export interface SSOExtensionConfiguration
extends HttpHandlerExtensionConfiguration,
DefaultExtensionConfiguration,
AwsRegionExtensionConfiguration,
HttpAuthExtensionConfiguration {}

View File

@@ -0,0 +1,11 @@
export * from "./SSOClient";
export * from "./SSO";
export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
export { RuntimeExtension } from "./runtimeExtensions";
export { SSOExtensionConfiguration } from "./extensionConfiguration";
export * from "./commands";
export * from "./schemas/schemas_0";
export * from "./pagination";
export * from "./models/errors";
export * from "./models/models_0";
export { SSOServiceException } from "./models/SSOServiceException";

View File

@@ -0,0 +1,9 @@
import {
ServiceExceptionOptions as __ServiceExceptionOptions,
ServiceException as __ServiceException,
} from "@smithy/smithy-client";
export { __ServiceExceptionOptions };
export { __ServiceException };
export declare class SSOServiceException extends __ServiceException {
constructor(options: __ServiceExceptionOptions);
}

View File

@@ -0,0 +1,30 @@
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { SSOServiceException as __BaseException } from "./SSOServiceException";
export declare class InvalidRequestException extends __BaseException {
readonly name: "InvalidRequestException";
readonly $fault: "client";
constructor(
opts: __ExceptionOptionType<InvalidRequestException, __BaseException>
);
}
export declare class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException";
readonly $fault: "client";
constructor(
opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>
);
}
export declare class TooManyRequestsException extends __BaseException {
readonly name: "TooManyRequestsException";
readonly $fault: "client";
constructor(
opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>
);
}
export declare class UnauthorizedException extends __BaseException {
readonly name: "UnauthorizedException";
readonly $fault: "client";
constructor(
opts: __ExceptionOptionType<UnauthorizedException, __BaseException>
);
}

View File

@@ -0,0 +1,45 @@
export interface AccountInfo {
accountId?: string | undefined;
accountName?: string | undefined;
emailAddress?: string | undefined;
}
export interface GetRoleCredentialsRequest {
roleName: string | undefined;
accountId: string | undefined;
accessToken: string | undefined;
}
export interface RoleCredentials {
accessKeyId?: string | undefined;
secretAccessKey?: string | undefined;
sessionToken?: string | undefined;
expiration?: number | undefined;
}
export interface GetRoleCredentialsResponse {
roleCredentials?: RoleCredentials | undefined;
}
export interface ListAccountRolesRequest {
nextToken?: string | undefined;
maxResults?: number | undefined;
accessToken: string | undefined;
accountId: string | undefined;
}
export interface RoleInfo {
roleName?: string | undefined;
accountId?: string | undefined;
}
export interface ListAccountRolesResponse {
nextToken?: string | undefined;
roleList?: RoleInfo[] | undefined;
}
export interface ListAccountsRequest {
nextToken?: string | undefined;
maxResults?: number | undefined;
accessToken: string | undefined;
}
export interface ListAccountsResponse {
nextToken?: string | undefined;
accountList?: AccountInfo[] | undefined;
}
export interface LogoutRequest {
accessToken: string | undefined;
}

View File

@@ -0,0 +1,5 @@
import { PaginationConfiguration } from "@smithy/types";
import { SSOClient } from "../SSOClient";
export interface SSOPaginationConfiguration extends PaginationConfiguration {
client: SSOClient;
}

View File

@@ -0,0 +1,11 @@
import { Paginator } from "@smithy/types";
import {
ListAccountRolesCommandInput,
ListAccountRolesCommandOutput,
} from "../commands/ListAccountRolesCommand";
import { SSOPaginationConfiguration } from "./Interfaces";
export declare const paginateListAccountRoles: (
config: SSOPaginationConfiguration,
input: ListAccountRolesCommandInput,
...rest: any[]
) => Paginator<ListAccountRolesCommandOutput>;

View File

@@ -0,0 +1,11 @@
import { Paginator } from "@smithy/types";
import {
ListAccountsCommandInput,
ListAccountsCommandOutput,
} from "../commands/ListAccountsCommand";
import { SSOPaginationConfiguration } from "./Interfaces";
export declare const paginateListAccounts: (
config: SSOPaginationConfiguration,
input: ListAccountsCommandInput,
...rest: any[]
) => Paginator<ListAccountsCommandOutput>;

View File

@@ -0,0 +1,3 @@
export * from "./Interfaces";
export * from "./ListAccountRolesPaginator";
export * from "./ListAccountsPaginator";

View File

@@ -0,0 +1,120 @@
import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler";
import { SSOClientConfig } from "./SSOClient";
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
defaultsMode: import("@smithy/types").Provider<
import("@smithy/smithy-client").ResolvedDefaultsMode
>;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
defaultUserAgentProvider: (
config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved
) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
region: string | import("@smithy/types").Provider<any>;
requestHandler:
| import("@smithy/protocol-http").HttpHandler<any>
| RequestHandler;
retryMode: string | import("@smithy/types").Provider<string>;
sha256: import("@smithy/types").HashConstructor;
streamCollector: import("@smithy/types").StreamCollector;
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
(boolean | import("@smithy/types").Provider<boolean | undefined>);
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
(boolean | import("@smithy/types").Provider<boolean | undefined>);
cacheMiddleware?: boolean | undefined;
protocol:
| import("@smithy/types").ClientProtocol<any, any>
| import("@smithy/types").ClientProtocolCtor<any, any>
| typeof import("@aws-sdk/core").AwsRestJsonProtocol;
protocolSettings: {
defaultNamespace?: string;
[setting: string]: unknown;
};
apiVersion: string;
urlParser: import("@smithy/types").UrlParser;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
profile?: string;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
customUserAgent?: string | import("@smithy/types").UserAgent;
userAgentAppId?:
| string
| undefined
| import("@smithy/types").Provider<string | undefined>;
retryStrategy?:
| import("@smithy/types").RetryStrategy
| import("@smithy/types").RetryStrategyV2;
endpoint?:
| ((
| string
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
) &
(
| string
| import("@smithy/types").Provider<string>
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
))
| undefined;
endpointProvider: (
endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
context?: {
logger?: import("@smithy/types").Logger;
}
) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
httpAuthSchemes:
| import("@smithy/types").HttpAuthScheme[]
| (
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
}
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
}
)[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?:
| import("@smithy/types").AwsCredentialIdentity
| import("@smithy/types").AwsCredentialIdentityProvider;
signer?:
| import("@smithy/types").RequestSigner
| ((
authScheme?: import("@smithy/types").AuthScheme
) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (
options: import("@smithy/signature-v4").SignatureV4Init &
import("@smithy/signature-v4").SignatureV4CryptoInit
) => import("@smithy/types").RequestSigner;
};

View File

@@ -0,0 +1,115 @@
import { NodeHttpHandler as RequestHandler } from "@smithy/node-http-handler";
import { SSOClientConfig } from "./SSOClient";
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
defaultsMode: import("@smithy/types").Provider<
import("@smithy/smithy-client").ResolvedDefaultsMode
>;
authSchemePreference: string[] | import("@smithy/types").Provider<string[]>;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
defaultUserAgentProvider: (
config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved
) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
region: string | import("@smithy/types").Provider<string>;
requestHandler:
| RequestHandler
| import("@smithy/protocol-http").HttpHandler<any>;
retryMode: string | import("@smithy/types").Provider<string>;
sha256: import("@smithy/types").HashConstructor;
streamCollector: import("@smithy/types").StreamCollector;
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
cacheMiddleware?: boolean | undefined;
protocol:
| import("@smithy/types").ClientProtocol<any, any>
| import("@smithy/types").ClientProtocolCtor<any, any>
| typeof import("@aws-sdk/core").AwsRestJsonProtocol;
protocolSettings: {
defaultNamespace?: string;
[setting: string]: unknown;
};
apiVersion: string;
urlParser: import("@smithy/types").UrlParser;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
profile?: string;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
customUserAgent?: string | import("@smithy/types").UserAgent;
retryStrategy?:
| import("@smithy/types").RetryStrategy
| import("@smithy/types").RetryStrategyV2;
endpoint?:
| ((
| string
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
) &
(
| string
| import("@smithy/types").Provider<string>
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
))
| undefined;
endpointProvider: (
endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
context?: {
logger?: import("@smithy/types").Logger;
}
) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
httpAuthSchemes:
| import("@smithy/types").HttpAuthScheme[]
| (
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
}
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
}
)[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?:
| import("@smithy/types").AwsCredentialIdentity
| import("@smithy/types").AwsCredentialIdentityProvider;
signer?:
| import("@smithy/types").RequestSigner
| ((
authScheme?: import("@smithy/types").AuthScheme
) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (
options: import("@smithy/signature-v4").SignatureV4Init &
import("@smithy/signature-v4").SignatureV4CryptoInit
) => import("@smithy/types").RequestSigner;
};

View File

@@ -0,0 +1,124 @@
import { SSOClientConfig } from "./SSOClient";
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
runtime: string;
sha256: import("@smithy/types").HashConstructor;
requestHandler:
| import("@smithy/types").NodeHttpHandlerOptions
| import("@smithy/types").FetchHttpHandlerOptions
| Record<string, unknown>
| import("@smithy/protocol-http").HttpHandler<any>
| import("@smithy/fetch-http-handler").FetchHttpHandler;
cacheMiddleware?: boolean;
protocol:
| import("@smithy/types").ClientProtocol<any, any>
| import("@smithy/types").ClientProtocolCtor<any, any>
| typeof import("@aws-sdk/core").AwsRestJsonProtocol;
protocolSettings: {
defaultNamespace?: string;
[setting: string]: unknown;
};
apiVersion: string;
urlParser: import("@smithy/types").UrlParser;
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
streamCollector: import("@smithy/types").StreamCollector;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
disableHostPrefix: boolean;
serviceId: string;
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
(boolean | import("@smithy/types").Provider<boolean | undefined>);
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) &
(boolean | import("@smithy/types").Provider<boolean | undefined>);
region: string | import("@smithy/types").Provider<any>;
profile?: string;
defaultUserAgentProvider: (
config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved
) => Promise<import("@smithy/types").UserAgent>;
maxAttempts: number | import("@smithy/types").Provider<number>;
retryMode: string | import("@smithy/types").Provider<string>;
logger: import("@smithy/types").Logger;
extensions: import("./runtimeExtensions").RuntimeExtension[];
defaultsMode:
| import("@smithy/smithy-client").DefaultsMode
| import("@smithy/types").Provider<
import("@smithy/smithy-client").DefaultsMode
>;
customUserAgent?: string | import("@smithy/types").UserAgent;
userAgentAppId?:
| string
| undefined
| import("@smithy/types").Provider<string | undefined>;
retryStrategy?:
| import("@smithy/types").RetryStrategy
| import("@smithy/types").RetryStrategyV2;
endpoint?:
| ((
| string
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
) &
(
| string
| import("@smithy/types").Provider<string>
| import("@smithy/types").Endpoint
| import("@smithy/types").Provider<import("@smithy/types").Endpoint>
| import("@smithy/types").EndpointV2
| import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
))
| undefined;
endpointProvider: (
endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
context?: {
logger?: import("@smithy/types").Logger;
}
) => import("@smithy/types").EndpointV2;
tls?: boolean;
serviceConfiguredEndpoint?: never;
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
httpAuthSchemes:
| import("@smithy/types").HttpAuthScheme[]
| (
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| undefined;
signer: import("@aws-sdk/core").AwsSdkSigV4Signer;
}
| {
schemeId: string;
identityProvider: (
ipc: import("@smithy/types").IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| (() => Promise<{}>);
signer: import("@smithy/core").NoAuthSigner;
}
)[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
credentials?:
| import("@smithy/types").AwsCredentialIdentity
| import("@smithy/types").AwsCredentialIdentityProvider;
signer?:
| import("@smithy/types").RequestSigner
| ((
authScheme?: import("@smithy/types").AuthScheme
) => Promise<import("@smithy/types").RequestSigner>);
signingEscapePath?: boolean;
systemClockOffset?: number;
signingRegion?: string;
signerConstructor?: new (
options: import("@smithy/signature-v4").SignatureV4Init &
import("@smithy/signature-v4").SignatureV4CryptoInit
) => import("@smithy/types").RequestSigner;
};

View File

@@ -0,0 +1,58 @@
import { AwsSdkSigV4Signer } from "@aws-sdk/core";
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
import { NoAuthSigner } from "@smithy/core";
import { IdentityProviderConfig } from "@smithy/types";
import { SSOClientConfig } from "./SSOClient";
export declare const getRuntimeConfig: (config: SSOClientConfig) => {
apiVersion: string;
base64Decoder: import("@smithy/types").Decoder;
base64Encoder: (_input: Uint8Array | string) => string;
disableHostPrefix: boolean;
endpointProvider: (
endpointParams: import("./endpoint/EndpointParameters").EndpointParameters,
context?: {
logger?: import("@smithy/types").Logger;
}
) => import("@smithy/types").EndpointV2;
extensions: import("./runtimeExtensions").RuntimeExtension[];
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SSOHttpAuthSchemeProvider;
httpAuthSchemes:
| import("@smithy/types").HttpAuthScheme[]
| (
| {
schemeId: string;
identityProvider: (
ipc: IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| undefined;
signer: AwsSdkSigV4Signer;
}
| {
schemeId: string;
identityProvider: (
ipc: IdentityProviderConfig
) =>
| import("@smithy/types").IdentityProvider<
import("@smithy/types").Identity
>
| (() => Promise<{}>);
signer: NoAuthSigner;
}
)[];
logger: import("@smithy/types").Logger;
protocol:
| import("@smithy/types").ClientProtocol<any, any>
| import("@smithy/types").ClientProtocolCtor<any, any>
| typeof AwsRestJsonProtocol;
protocolSettings: {
[setting: string]: unknown;
defaultNamespace?: string;
};
serviceId: string;
urlParser: import("@smithy/types").UrlParser;
utf8Decoder: import("@smithy/types").Decoder;
utf8Encoder: (input: Uint8Array | string) => string;
};

View File

@@ -0,0 +1,11 @@
import { SSOExtensionConfiguration } from "./extensionConfiguration";
export interface RuntimeExtension {
configure(extensionConfiguration: SSOExtensionConfiguration): void;
}
export interface RuntimeExtensionsConfig {
extensions: RuntimeExtension[];
}
export declare const resolveRuntimeExtensions: (
runtimeConfig: any,
extensions: RuntimeExtension[]
) => any;

View File

@@ -0,0 +1,24 @@
import {
StaticErrorSchema,
StaticOperationSchema,
StaticStructureSchema,
} from "@smithy/types";
export declare var AccountInfo$: StaticStructureSchema;
export declare var GetRoleCredentialsRequest$: StaticStructureSchema;
export declare var GetRoleCredentialsResponse$: StaticStructureSchema;
export declare var InvalidRequestException$: StaticErrorSchema;
export declare var ListAccountRolesRequest$: StaticStructureSchema;
export declare var ListAccountRolesResponse$: StaticStructureSchema;
export declare var ListAccountsRequest$: StaticStructureSchema;
export declare var ListAccountsResponse$: StaticStructureSchema;
export declare var LogoutRequest$: StaticStructureSchema;
export declare var ResourceNotFoundException$: StaticErrorSchema;
export declare var RoleCredentials$: StaticStructureSchema;
export declare var RoleInfo$: StaticStructureSchema;
export declare var TooManyRequestsException$: StaticErrorSchema;
export declare var UnauthorizedException$: StaticErrorSchema;
export declare var SSOServiceException$: StaticErrorSchema;
export declare var GetRoleCredentials$: StaticOperationSchema;
export declare var ListAccountRoles$: StaticOperationSchema;
export declare var ListAccounts$: StaticOperationSchema;
export declare var Logout$: StaticOperationSchema;

99
backend/node_modules/@aws-sdk/client-sso/package.json generated vendored Normal file
View File

@@ -0,0 +1,99 @@
{
"name": "@aws-sdk/client-sso",
"description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
"version": "3.971.0",
"scripts": {
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
"build:cjs": "node ../../scripts/compilation/inline client-sso",
"build:es": "tsc -p tsconfig.es.json",
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
"build:types": "tsc -p tsconfig.types.json",
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"generate:client": "node ../../scripts/generate-clients/single-service --solo sso",
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
},
"main": "./dist-cjs/index.js",
"types": "./dist-types/index.d.ts",
"module": "./dist-es/index.js",
"sideEffects": false,
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
"@aws-sdk/core": "3.970.0",
"@aws-sdk/middleware-host-header": "3.969.0",
"@aws-sdk/middleware-logger": "3.969.0",
"@aws-sdk/middleware-recursion-detection": "3.969.0",
"@aws-sdk/middleware-user-agent": "3.970.0",
"@aws-sdk/region-config-resolver": "3.969.0",
"@aws-sdk/types": "3.969.0",
"@aws-sdk/util-endpoints": "3.970.0",
"@aws-sdk/util-user-agent-browser": "3.969.0",
"@aws-sdk/util-user-agent-node": "3.971.0",
"@smithy/config-resolver": "^4.4.6",
"@smithy/core": "^3.20.6",
"@smithy/fetch-http-handler": "^5.3.9",
"@smithy/hash-node": "^4.2.8",
"@smithy/invalid-dependency": "^4.2.8",
"@smithy/middleware-content-length": "^4.2.8",
"@smithy/middleware-endpoint": "^4.4.7",
"@smithy/middleware-retry": "^4.4.23",
"@smithy/middleware-serde": "^4.2.9",
"@smithy/middleware-stack": "^4.2.8",
"@smithy/node-config-provider": "^4.3.8",
"@smithy/node-http-handler": "^4.4.8",
"@smithy/protocol-http": "^5.3.8",
"@smithy/smithy-client": "^4.10.8",
"@smithy/types": "^4.12.0",
"@smithy/url-parser": "^4.2.8",
"@smithy/util-base64": "^4.3.0",
"@smithy/util-body-length-browser": "^4.2.0",
"@smithy/util-body-length-node": "^4.2.1",
"@smithy/util-defaults-mode-browser": "^4.3.22",
"@smithy/util-defaults-mode-node": "^4.2.25",
"@smithy/util-endpoints": "^3.2.8",
"@smithy/util-middleware": "^4.2.8",
"@smithy/util-retry": "^4.2.8",
"@smithy/util-utf8": "^4.2.0",
"tslib": "^2.6.2"
},
"devDependencies": {
"@tsconfig/node20": "20.1.8",
"@types/node": "^20.14.8",
"concurrently": "7.0.0",
"downlevel-dts": "0.10.1",
"rimraf": "5.0.10",
"typescript": "~5.8.3"
},
"engines": {
"node": ">=20.0.0"
},
"typesVersions": {
"<4.0": {
"dist-types/*": [
"dist-types/ts3.4/*"
]
}
},
"files": [
"dist-*/**"
],
"author": {
"name": "AWS SDK for JavaScript Team",
"url": "https://aws.amazon.com/javascript/"
},
"license": "Apache-2.0",
"browser": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
},
"react-native": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
},
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-js-v3.git",
"directory": "clients/client-sso"
}
}