@aws-sdk/client-sso 3.315.0 → 3.319.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/SSO.js CHANGED
@@ -1,67 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SSO = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const GetRoleCredentialsCommand_1 = require("./commands/GetRoleCredentialsCommand");
5
6
  const ListAccountRolesCommand_1 = require("./commands/ListAccountRolesCommand");
6
7
  const ListAccountsCommand_1 = require("./commands/ListAccountsCommand");
7
8
  const LogoutCommand_1 = require("./commands/LogoutCommand");
8
9
  const SSOClient_1 = require("./SSOClient");
10
+ const commands = {
11
+ GetRoleCredentialsCommand: GetRoleCredentialsCommand_1.GetRoleCredentialsCommand,
12
+ ListAccountRolesCommand: ListAccountRolesCommand_1.ListAccountRolesCommand,
13
+ ListAccountsCommand: ListAccountsCommand_1.ListAccountsCommand,
14
+ LogoutCommand: LogoutCommand_1.LogoutCommand,
15
+ };
9
16
  class SSO extends SSOClient_1.SSOClient {
10
- getRoleCredentials(args, optionsOrCb, cb) {
11
- const command = new GetRoleCredentialsCommand_1.GetRoleCredentialsCommand(args);
12
- if (typeof optionsOrCb === "function") {
13
- this.send(command, optionsOrCb);
14
- }
15
- else if (typeof cb === "function") {
16
- if (typeof optionsOrCb !== "object")
17
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
18
- this.send(command, optionsOrCb || {}, cb);
19
- }
20
- else {
21
- return this.send(command, optionsOrCb);
22
- }
23
- }
24
- listAccountRoles(args, optionsOrCb, cb) {
25
- const command = new ListAccountRolesCommand_1.ListAccountRolesCommand(args);
26
- if (typeof optionsOrCb === "function") {
27
- this.send(command, optionsOrCb);
28
- }
29
- else if (typeof cb === "function") {
30
- if (typeof optionsOrCb !== "object")
31
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
32
- this.send(command, optionsOrCb || {}, cb);
33
- }
34
- else {
35
- return this.send(command, optionsOrCb);
36
- }
37
- }
38
- listAccounts(args, optionsOrCb, cb) {
39
- const command = new ListAccountsCommand_1.ListAccountsCommand(args);
40
- if (typeof optionsOrCb === "function") {
41
- this.send(command, optionsOrCb);
42
- }
43
- else if (typeof cb === "function") {
44
- if (typeof optionsOrCb !== "object")
45
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
46
- this.send(command, optionsOrCb || {}, cb);
47
- }
48
- else {
49
- return this.send(command, optionsOrCb);
50
- }
51
- }
52
- logout(args, optionsOrCb, cb) {
53
- const command = new LogoutCommand_1.LogoutCommand(args);
54
- if (typeof optionsOrCb === "function") {
55
- this.send(command, optionsOrCb);
56
- }
57
- else if (typeof cb === "function") {
58
- if (typeof optionsOrCb !== "object")
59
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
60
- this.send(command, optionsOrCb || {}, cb);
61
- }
62
- else {
63
- return this.send(command, optionsOrCb);
64
- }
65
- }
66
17
  }
67
18
  exports.SSO = SSO;
19
+ (0, smithy_client_1.createAggregatedClient)(commands, SSO);
package/dist-es/SSO.js CHANGED
@@ -1,63 +1,15 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { GetRoleCredentialsCommand, } from "./commands/GetRoleCredentialsCommand";
2
3
  import { ListAccountRolesCommand, } from "./commands/ListAccountRolesCommand";
3
4
  import { ListAccountsCommand, } from "./commands/ListAccountsCommand";
4
5
  import { LogoutCommand } from "./commands/LogoutCommand";
5
6
  import { SSOClient } from "./SSOClient";
7
+ const commands = {
8
+ GetRoleCredentialsCommand,
9
+ ListAccountRolesCommand,
10
+ ListAccountsCommand,
11
+ LogoutCommand,
12
+ };
6
13
  export class SSO extends SSOClient {
7
- getRoleCredentials(args, optionsOrCb, cb) {
8
- const command = new GetRoleCredentialsCommand(args);
9
- if (typeof optionsOrCb === "function") {
10
- this.send(command, optionsOrCb);
11
- }
12
- else if (typeof cb === "function") {
13
- if (typeof optionsOrCb !== "object")
14
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
15
- this.send(command, optionsOrCb || {}, cb);
16
- }
17
- else {
18
- return this.send(command, optionsOrCb);
19
- }
20
- }
21
- listAccountRoles(args, optionsOrCb, cb) {
22
- const command = new ListAccountRolesCommand(args);
23
- if (typeof optionsOrCb === "function") {
24
- this.send(command, optionsOrCb);
25
- }
26
- else if (typeof cb === "function") {
27
- if (typeof optionsOrCb !== "object")
28
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
29
- this.send(command, optionsOrCb || {}, cb);
30
- }
31
- else {
32
- return this.send(command, optionsOrCb);
33
- }
34
- }
35
- listAccounts(args, optionsOrCb, cb) {
36
- const command = new ListAccountsCommand(args);
37
- if (typeof optionsOrCb === "function") {
38
- this.send(command, optionsOrCb);
39
- }
40
- else if (typeof cb === "function") {
41
- if (typeof optionsOrCb !== "object")
42
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
43
- this.send(command, optionsOrCb || {}, cb);
44
- }
45
- else {
46
- return this.send(command, optionsOrCb);
47
- }
48
- }
49
- logout(args, optionsOrCb, cb) {
50
- const command = new LogoutCommand(args);
51
- if (typeof optionsOrCb === "function") {
52
- this.send(command, optionsOrCb);
53
- }
54
- else if (typeof cb === "function") {
55
- if (typeof optionsOrCb !== "object")
56
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
57
- this.send(command, optionsOrCb || {}, cb);
58
- }
59
- else {
60
- return this.send(command, optionsOrCb);
61
- }
62
- }
63
14
  }
15
+ createAggregatedClient(commands, SSO);
@@ -4,6 +4,32 @@ import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./c
4
4
  import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand";
5
5
  import { LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand";
6
6
  import { SSOClient } from "./SSOClient";
7
+ export interface SSO {
8
+ /**
9
+ * @see {@link GetRoleCredentialsCommand}
10
+ */
11
+ getRoleCredentials(args: GetRoleCredentialsCommandInput, options?: __HttpHandlerOptions): Promise<GetRoleCredentialsCommandOutput>;
12
+ getRoleCredentials(args: GetRoleCredentialsCommandInput, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
13
+ getRoleCredentials(args: GetRoleCredentialsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
14
+ /**
15
+ * @see {@link ListAccountRolesCommand}
16
+ */
17
+ listAccountRoles(args: ListAccountRolesCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountRolesCommandOutput>;
18
+ listAccountRoles(args: ListAccountRolesCommandInput, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
19
+ listAccountRoles(args: ListAccountRolesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
20
+ /**
21
+ * @see {@link ListAccountsCommand}
22
+ */
23
+ listAccounts(args: ListAccountsCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountsCommandOutput>;
24
+ listAccounts(args: ListAccountsCommandInput, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
25
+ listAccounts(args: ListAccountsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
26
+ /**
27
+ * @see {@link LogoutCommand}
28
+ */
29
+ logout(args: LogoutCommandInput, options?: __HttpHandlerOptions): Promise<LogoutCommandOutput>;
30
+ logout(args: LogoutCommandInput, cb: (err: any, data?: LogoutCommandOutput) => void): void;
31
+ logout(args: LogoutCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: LogoutCommandOutput) => void): void;
32
+ }
7
33
  /**
8
34
  * @public
9
35
  * <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
@@ -26,51 +52,5 @@ import { SSOClient } from "./SSOClient";
26
52
  * 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>
27
53
  * </note>
28
54
  */
29
- export declare class SSO extends SSOClient {
30
- /**
31
- * @public
32
- * <p>Returns the STS short-term credentials for a given role name that is assigned to the
33
- * user.</p>
34
- */
35
- getRoleCredentials(args: GetRoleCredentialsCommandInput, options?: __HttpHandlerOptions): Promise<GetRoleCredentialsCommandOutput>;
36
- getRoleCredentials(args: GetRoleCredentialsCommandInput, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
37
- getRoleCredentials(args: GetRoleCredentialsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void): void;
38
- /**
39
- * @public
40
- * <p>Lists all roles that are assigned to the user for a given AWS account.</p>
41
- */
42
- listAccountRoles(args: ListAccountRolesCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountRolesCommandOutput>;
43
- listAccountRoles(args: ListAccountRolesCommandInput, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
44
- listAccountRoles(args: ListAccountRolesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountRolesCommandOutput) => void): void;
45
- /**
46
- * @public
47
- * <p>Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the
48
- * 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
49
- * returns a paginated response.</p>
50
- */
51
- listAccounts(args: ListAccountsCommandInput, options?: __HttpHandlerOptions): Promise<ListAccountsCommandOutput>;
52
- listAccounts(args: ListAccountsCommandInput, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
53
- listAccounts(args: ListAccountsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
54
- /**
55
- * @public
56
- * <p>Removes the locally stored SSO tokens from the client-side cache and sends an API call to
57
- * the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in
58
- * session.</p>
59
- *
60
- * <note>
61
- * <p>If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM Identity Center sign in session is
62
- * used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set.
63
- * More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user,
64
- * and the corresponding temporary AWS credentials are returned to the client.</p>
65
- *
66
- * <p>After user logout, any existing IAM role sessions that were created by using IAM Identity Center
67
- * permission sets continue based on the duration configured in the permission set.
68
- * For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html">User
69
- * authentications</a> in the <i>IAM Identity Center User
70
- * Guide</i>.</p>
71
- * </note>
72
- */
73
- logout(args: LogoutCommandInput, options?: __HttpHandlerOptions): Promise<LogoutCommandOutput>;
74
- logout(args: LogoutCommandInput, cb: (err: any, data?: LogoutCommandOutput) => void): void;
75
- logout(args: LogoutCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: LogoutCommandOutput) => void): void;
55
+ export declare class SSO extends SSOClient implements SSO {
76
56
  }
@@ -16,7 +16,7 @@ import {
16
16
  LogoutCommandOutput,
17
17
  } from "./commands/LogoutCommand";
18
18
  import { SSOClient } from "./SSOClient";
19
- export declare class SSO extends SSOClient {
19
+ export interface SSO {
20
20
  getRoleCredentials(
21
21
  args: GetRoleCredentialsCommandInput,
22
22
  options?: __HttpHandlerOptions
@@ -70,3 +70,4 @@ export declare class SSO extends SSOClient {
70
70
  cb: (err: any, data?: LogoutCommandOutput) => void
71
71
  ): void;
72
72
  }
73
+ export declare class SSO extends SSOClient implements SSO {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sso",
3
3
  "description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
4
- "version": "3.315.0",
4
+ "version": "3.319.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -33,19 +33,19 @@
33
33
  "@aws-sdk/middleware-retry": "3.310.0",
34
34
  "@aws-sdk/middleware-serde": "3.310.0",
35
35
  "@aws-sdk/middleware-stack": "3.310.0",
36
- "@aws-sdk/middleware-user-agent": "3.310.0",
36
+ "@aws-sdk/middleware-user-agent": "3.319.0",
37
37
  "@aws-sdk/node-config-provider": "3.310.0",
38
38
  "@aws-sdk/node-http-handler": "3.310.0",
39
39
  "@aws-sdk/protocol-http": "3.310.0",
40
- "@aws-sdk/smithy-client": "3.315.0",
40
+ "@aws-sdk/smithy-client": "3.316.0",
41
41
  "@aws-sdk/types": "3.310.0",
42
42
  "@aws-sdk/url-parser": "3.310.0",
43
43
  "@aws-sdk/util-base64": "3.310.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.310.0",
45
45
  "@aws-sdk/util-body-length-node": "3.310.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.315.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.315.0",
48
- "@aws-sdk/util-endpoints": "3.310.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.316.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.316.0",
48
+ "@aws-sdk/util-endpoints": "3.319.0",
49
49
  "@aws-sdk/util-retry": "3.310.0",
50
50
  "@aws-sdk/util-user-agent-browser": "3.310.0",
51
51
  "@aws-sdk/util-user-agent-node": "3.310.0",