@aws-sdk/client-sso 3.33.0 → 3.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/{dist/cjs → dist-cjs}/SSO.js +1 -20
  3. package/dist-cjs/SSOClient.js +32 -0
  4. package/{dist/cjs → dist-cjs}/commands/GetRoleCredentialsCommand.js +2 -28
  5. package/{dist/cjs → dist-cjs}/commands/ListAccountRolesCommand.js +2 -27
  6. package/{dist/cjs → dist-cjs}/commands/ListAccountsCommand.js +2 -29
  7. package/{dist/cjs → dist-cjs}/commands/LogoutCommand.js +2 -27
  8. package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
  9. package/{dist/cjs → dist-cjs}/index.js +0 -1
  10. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  11. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -43
  12. package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
  13. package/{dist/cjs → dist-cjs}/pagination/ListAccountRolesPaginator.js +1 -12
  14. package/{dist/cjs → dist-cjs}/pagination/ListAccountsPaginator.js +1 -12
  15. package/{dist/cjs → dist-cjs}/protocols/Aws_restJson1.js +4 -10
  16. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
  17. package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
  18. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
  19. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
  20. package/{dist/es → dist-es}/SSO.js +2 -21
  21. package/{dist/es → dist-es}/SSOClient.js +2 -26
  22. package/{dist/es → dist-es}/commands/GetRoleCredentialsCommand.js +4 -31
  23. package/{dist/es → dist-es}/commands/ListAccountRolesCommand.js +4 -30
  24. package/{dist/es → dist-es}/commands/ListAccountsCommand.js +4 -32
  25. package/{dist/es → dist-es}/commands/LogoutCommand.js +4 -30
  26. package/{dist/es → dist-es}/endpoints.js +1 -2
  27. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  28. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  29. package/{dist/es → dist-es}/models/models_0.js +0 -43
  30. package/dist-es/pagination/Interfaces.js +1 -0
  31. package/{dist/es → dist-es}/pagination/ListAccountRolesPaginator.js +17 -30
  32. package/{dist/es → dist-es}/pagination/ListAccountsPaginator.js +17 -30
  33. package/{dist/es → dist-es}/protocols/Aws_restJson1.js +96 -102
  34. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
  35. package/{dist/es → dist-es}/runtimeConfig.js +1 -5
  36. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
  37. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
  38. package/{dist/types → dist-types}/SSO.d.ts +2 -2
  39. package/{dist/types → dist-types}/SSOClient.d.ts +5 -5
  40. package/{dist/types → dist-types}/commands/GetRoleCredentialsCommand.d.ts +3 -3
  41. package/{dist/types → dist-types}/commands/ListAccountRolesCommand.d.ts +3 -3
  42. package/{dist/types → dist-types}/commands/ListAccountsCommand.d.ts +3 -3
  43. package/{dist/types → dist-types}/commands/LogoutCommand.d.ts +3 -3
  44. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  45. package/{index.ts → dist-types/index.d.ts} +0 -0
  46. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  47. package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
  48. package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
  49. package/{dist/types → dist-types}/pagination/ListAccountRolesPaginator.d.ts +1 -1
  50. package/{dist/types → dist-types}/pagination/ListAccountsPaginator.d.ts +1 -1
  51. package/{dist/types → dist-types}/protocols/Aws_restJson1.d.ts +2 -2
  52. package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
  53. package/{dist/types → dist-types}/runtimeConfig.d.ts +0 -0
  54. package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
  55. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  56. package/{dist/types → dist-types}/ts3.4/SSO.d.ts +7 -35
  57. package/dist-types/ts3.4/SSOClient.d.ts +68 -0
  58. package/dist-types/ts3.4/commands/GetRoleCredentialsCommand.d.ts +17 -0
  59. package/dist-types/ts3.4/commands/ListAccountRolesCommand.d.ts +17 -0
  60. package/dist-types/ts3.4/commands/ListAccountsCommand.d.ts +17 -0
  61. package/dist-types/ts3.4/commands/LogoutCommand.d.ts +17 -0
  62. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  63. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  64. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  65. package/dist-types/ts3.4/models/models_0.d.ts +154 -0
  66. package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
  67. package/{dist/types → dist-types}/ts3.4/pagination/ListAccountRolesPaginator.d.ts +1 -1
  68. package/{dist/types → dist-types}/ts3.4/pagination/ListAccountsPaginator.d.ts +1 -1
  69. package/{dist/types → dist-types}/ts3.4/protocols/Aws_restJson1.d.ts +2 -2
  70. package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
  71. package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +1 -3
  72. package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
  73. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
  74. package/package.json +49 -46
  75. package/SSO.ts +0 -160
  76. package/SSOClient.ts +0 -245
  77. package/commands/GetRoleCredentialsCommand.ts +0 -95
  78. package/commands/ListAccountRolesCommand.ts +0 -94
  79. package/commands/ListAccountsCommand.ts +0 -96
  80. package/commands/LogoutCommand.ts +0 -87
  81. package/dist/cjs/SSO.js.map +0 -1
  82. package/dist/cjs/SSOClient.js +0 -56
  83. package/dist/cjs/SSOClient.js.map +0 -1
  84. package/dist/cjs/commands/GetRoleCredentialsCommand.js.map +0 -1
  85. package/dist/cjs/commands/ListAccountRolesCommand.js.map +0 -1
  86. package/dist/cjs/commands/ListAccountsCommand.js.map +0 -1
  87. package/dist/cjs/commands/LogoutCommand.js.map +0 -1
  88. package/dist/cjs/endpoints.js.map +0 -1
  89. package/dist/cjs/index.js.map +0 -1
  90. package/dist/cjs/models/index.js.map +0 -1
  91. package/dist/cjs/models/models_0.js.map +0 -1
  92. package/dist/cjs/package.json +0 -88
  93. package/dist/cjs/pagination/Interfaces.js.map +0 -1
  94. package/dist/cjs/pagination/ListAccountRolesPaginator.js.map +0 -1
  95. package/dist/cjs/pagination/ListAccountsPaginator.js.map +0 -1
  96. package/dist/cjs/protocols/Aws_restJson1.js.map +0 -1
  97. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  98. package/dist/cjs/runtimeConfig.js.map +0 -1
  99. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  100. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  101. package/dist/es/SSO.js.map +0 -1
  102. package/dist/es/SSOClient.js.map +0 -1
  103. package/dist/es/commands/GetRoleCredentialsCommand.js.map +0 -1
  104. package/dist/es/commands/ListAccountRolesCommand.js.map +0 -1
  105. package/dist/es/commands/ListAccountsCommand.js.map +0 -1
  106. package/dist/es/commands/LogoutCommand.js.map +0 -1
  107. package/dist/es/endpoints.js.map +0 -1
  108. package/dist/es/index.js +0 -11
  109. package/dist/es/index.js.map +0 -1
  110. package/dist/es/models/index.js +0 -2
  111. package/dist/es/models/index.js.map +0 -1
  112. package/dist/es/models/models_0.js.map +0 -1
  113. package/dist/es/package.json +0 -88
  114. package/dist/es/pagination/Interfaces.js +0 -2
  115. package/dist/es/pagination/Interfaces.js.map +0 -1
  116. package/dist/es/pagination/ListAccountRolesPaginator.js.map +0 -1
  117. package/dist/es/pagination/ListAccountsPaginator.js.map +0 -1
  118. package/dist/es/protocols/Aws_restJson1.js.map +0 -1
  119. package/dist/es/runtimeConfig.browser.js.map +0 -1
  120. package/dist/es/runtimeConfig.js.map +0 -1
  121. package/dist/es/runtimeConfig.native.js.map +0 -1
  122. package/dist/es/runtimeConfig.shared.js.map +0 -1
  123. package/dist/types/ts3.4/SSOClient.d.ts +0 -145
  124. package/dist/types/ts3.4/commands/GetRoleCredentialsCommand.d.ts +0 -36
  125. package/dist/types/ts3.4/commands/ListAccountRolesCommand.d.ts +0 -35
  126. package/dist/types/ts3.4/commands/ListAccountsCommand.d.ts +0 -37
  127. package/dist/types/ts3.4/commands/LogoutCommand.d.ts +0 -35
  128. package/dist/types/ts3.4/models/models_0.d.ts +0 -255
  129. package/endpoints.ts +0 -94
  130. package/jest.config.js +0 -4
  131. package/models/models_0.ts +0 -334
  132. package/pagination/Interfaces.ts +0 -7
  133. package/pagination/ListAccountRolesPaginator.ts +0 -58
  134. package/pagination/ListAccountsPaginator.ts +0 -58
  135. package/protocols/Aws_restJson1.ts +0 -621
  136. package/runtimeConfig.browser.ts +0 -38
  137. package/runtimeConfig.native.ts +0 -16
  138. package/runtimeConfig.shared.ts +0 -16
  139. package/runtimeConfig.ts +0 -41
  140. package/tsconfig.es.json +0 -12
  141. package/tsconfig.json +0 -32
package/package.json CHANGED
@@ -1,61 +1,55 @@
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.33.0",
4
+ "version": "3.36.1",
5
5
  "scripts": {
6
- "clean": "yarn remove-definitions && yarn remove-dist && yarn remove-documentation",
7
- "build-documentation": "yarn remove-documentation && typedoc ./",
8
- "remove-definitions": "rimraf ./types",
9
- "remove-dist": "rimraf ./dist",
10
- "remove-documentation": "rimraf ./docs",
11
- "test": "exit 0",
6
+ "build": "yarn build:cjs && yarn build:es && yarn build:types",
12
7
  "build:cjs": "tsc -p tsconfig.json",
8
+ "build:docs": "yarn clean:docs && typedoc ./",
13
9
  "build:es": "tsc -p tsconfig.es.json",
14
- "build": "yarn build:cjs && yarn build:es",
15
- "downlevel-dts": "downlevel-dts dist/types dist/types/ts3.4"
16
- },
17
- "main": "./dist/cjs/index.js",
18
- "types": "./dist/types/index.d.ts",
19
- "module": "./dist/es/index.js",
20
- "browser": {
21
- "./runtimeConfig": "./runtimeConfig.browser"
22
- },
23
- "react-native": {
24
- "./runtimeConfig": "./runtimeConfig.native"
10
+ "build:types": "tsc -p tsconfig.types.json",
11
+ "clean": "yarn clean:dist && yarn clean:docs",
12
+ "clean:dist": "rimraf ./dist",
13
+ "clean:docs": "rimraf ./docs",
14
+ "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4",
15
+ "test": "exit 0"
25
16
  },
17
+ "main": "./dist-cjs/index.js",
18
+ "types": "./dist-types/index.d.ts",
19
+ "module": "./dist-es/index.js",
26
20
  "sideEffects": false,
27
21
  "dependencies": {
28
22
  "@aws-crypto/sha256-browser": "^1.0.0",
29
23
  "@aws-crypto/sha256-js": "^1.0.0",
30
- "@aws-sdk/config-resolver": "3.33.0",
31
- "@aws-sdk/fetch-http-handler": "3.32.0",
32
- "@aws-sdk/hash-node": "3.32.0",
33
- "@aws-sdk/invalid-dependency": "3.32.0",
34
- "@aws-sdk/middleware-content-length": "3.32.0",
35
- "@aws-sdk/middleware-host-header": "3.32.0",
36
- "@aws-sdk/middleware-logger": "3.32.0",
37
- "@aws-sdk/middleware-retry": "3.32.0",
38
- "@aws-sdk/middleware-serde": "3.32.0",
39
- "@aws-sdk/middleware-stack": "3.32.0",
40
- "@aws-sdk/middleware-user-agent": "3.32.0",
41
- "@aws-sdk/node-config-provider": "3.32.0",
42
- "@aws-sdk/node-http-handler": "3.32.0",
43
- "@aws-sdk/protocol-http": "3.32.0",
44
- "@aws-sdk/smithy-client": "3.32.0",
45
- "@aws-sdk/types": "3.32.0",
46
- "@aws-sdk/url-parser": "3.32.0",
47
- "@aws-sdk/util-base64-browser": "3.32.0",
48
- "@aws-sdk/util-base64-node": "3.32.0",
49
- "@aws-sdk/util-body-length-browser": "3.32.0",
50
- "@aws-sdk/util-body-length-node": "3.32.0",
51
- "@aws-sdk/util-user-agent-browser": "3.32.0",
52
- "@aws-sdk/util-user-agent-node": "3.33.0",
53
- "@aws-sdk/util-utf8-browser": "3.32.0",
54
- "@aws-sdk/util-utf8-node": "3.32.0",
24
+ "@aws-sdk/config-resolver": "3.36.0",
25
+ "@aws-sdk/fetch-http-handler": "3.36.0",
26
+ "@aws-sdk/hash-node": "3.36.0",
27
+ "@aws-sdk/invalid-dependency": "3.36.0",
28
+ "@aws-sdk/middleware-content-length": "3.36.0",
29
+ "@aws-sdk/middleware-host-header": "3.36.0",
30
+ "@aws-sdk/middleware-logger": "3.36.0",
31
+ "@aws-sdk/middleware-retry": "3.36.0",
32
+ "@aws-sdk/middleware-serde": "3.36.0",
33
+ "@aws-sdk/middleware-stack": "3.36.0",
34
+ "@aws-sdk/middleware-user-agent": "3.36.0",
35
+ "@aws-sdk/node-config-provider": "3.36.0",
36
+ "@aws-sdk/node-http-handler": "3.36.0",
37
+ "@aws-sdk/protocol-http": "3.36.0",
38
+ "@aws-sdk/smithy-client": "3.36.0",
39
+ "@aws-sdk/types": "3.36.0",
40
+ "@aws-sdk/url-parser": "3.36.0",
41
+ "@aws-sdk/util-base64-browser": "3.36.0",
42
+ "@aws-sdk/util-base64-node": "3.36.0",
43
+ "@aws-sdk/util-body-length-browser": "3.36.0",
44
+ "@aws-sdk/util-body-length-node": "3.36.0",
45
+ "@aws-sdk/util-user-agent-browser": "3.36.0",
46
+ "@aws-sdk/util-user-agent-node": "3.36.0",
47
+ "@aws-sdk/util-utf8-browser": "3.36.0",
48
+ "@aws-sdk/util-utf8-node": "3.36.0",
55
49
  "tslib": "^2.3.0"
56
50
  },
57
51
  "devDependencies": {
58
- "@aws-sdk/client-documentation-generator": "3.32.0",
52
+ "@aws-sdk/client-documentation-generator": "3.36.0",
59
53
  "@types/node": "^12.7.5",
60
54
  "downlevel-dts": "0.7.0",
61
55
  "jest": "^26.1.0",
@@ -69,16 +63,25 @@
69
63
  },
70
64
  "typesVersions": {
71
65
  "<4.0": {
72
- "dist/types/*": [
73
- "dist/types/ts3.4/*"
66
+ "dist-types/*": [
67
+ "dist-types/ts3.4/*"
74
68
  ]
75
69
  }
76
70
  },
71
+ "files": [
72
+ "dist-*"
73
+ ],
77
74
  "author": {
78
75
  "name": "AWS SDK for JavaScript Team",
79
76
  "url": "https://aws.amazon.com/javascript/"
80
77
  },
81
78
  "license": "Apache-2.0",
79
+ "browser": {
80
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
81
+ },
82
+ "react-native": {
83
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
84
+ },
82
85
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",
83
86
  "repository": {
84
87
  "type": "git",
package/SSO.ts DELETED
@@ -1,160 +0,0 @@
1
- import { SSOClient } from "./SSOClient";
2
- import {
3
- GetRoleCredentialsCommand,
4
- GetRoleCredentialsCommandInput,
5
- GetRoleCredentialsCommandOutput,
6
- } from "./commands/GetRoleCredentialsCommand";
7
- import {
8
- ListAccountRolesCommand,
9
- ListAccountRolesCommandInput,
10
- ListAccountRolesCommandOutput,
11
- } from "./commands/ListAccountRolesCommand";
12
- import {
13
- ListAccountsCommand,
14
- ListAccountsCommandInput,
15
- ListAccountsCommandOutput,
16
- } from "./commands/ListAccountsCommand";
17
- import { LogoutCommand, LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand";
18
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
19
-
20
- /**
21
- * <p>AWS Single Sign-On Portal is a web service that makes it easy for you to assign user
22
- * access to AWS SSO resources such as the user portal. Users can get AWS account applications
23
- * and roles assigned to them and get federated into the application.</p>
24
- *
25
- * <p>For general information about AWS SSO, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What is AWS
26
- * Single Sign-On?</a> in the <i>AWS SSO User Guide</i>.</p>
27
- *
28
- * <p>This API reference guide describes the AWS SSO Portal operations that you can call
29
- * programatically and includes detailed information on data types and errors.</p>
30
- *
31
- * <note>
32
- * <p>AWS provides SDKs that consist of libraries and sample code for various programming
33
- * languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
34
- * convenient way to create programmatic access to AWS SSO and other AWS services. For more
35
- * 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>
36
- * </note>
37
- */
38
- export class SSO extends SSOClient {
39
- /**
40
- * <p>Returns the STS short-term credentials for a given role name that is assigned to the
41
- * user.</p>
42
- */
43
- public getRoleCredentials(
44
- args: GetRoleCredentialsCommandInput,
45
- options?: __HttpHandlerOptions
46
- ): Promise<GetRoleCredentialsCommandOutput>;
47
- public getRoleCredentials(
48
- args: GetRoleCredentialsCommandInput,
49
- cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void
50
- ): void;
51
- public getRoleCredentials(
52
- args: GetRoleCredentialsCommandInput,
53
- options: __HttpHandlerOptions,
54
- cb: (err: any, data?: GetRoleCredentialsCommandOutput) => void
55
- ): void;
56
- public getRoleCredentials(
57
- args: GetRoleCredentialsCommandInput,
58
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRoleCredentialsCommandOutput) => void),
59
- cb?: (err: any, data?: GetRoleCredentialsCommandOutput) => void
60
- ): Promise<GetRoleCredentialsCommandOutput> | void {
61
- const command = new GetRoleCredentialsCommand(args);
62
- if (typeof optionsOrCb === "function") {
63
- this.send(command, optionsOrCb);
64
- } else if (typeof cb === "function") {
65
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
66
- this.send(command, optionsOrCb || {}, cb);
67
- } else {
68
- return this.send(command, optionsOrCb);
69
- }
70
- }
71
-
72
- /**
73
- * <p>Lists all roles that are assigned to the user for a given AWS account.</p>
74
- */
75
- public listAccountRoles(
76
- args: ListAccountRolesCommandInput,
77
- options?: __HttpHandlerOptions
78
- ): Promise<ListAccountRolesCommandOutput>;
79
- public listAccountRoles(
80
- args: ListAccountRolesCommandInput,
81
- cb: (err: any, data?: ListAccountRolesCommandOutput) => void
82
- ): void;
83
- public listAccountRoles(
84
- args: ListAccountRolesCommandInput,
85
- options: __HttpHandlerOptions,
86
- cb: (err: any, data?: ListAccountRolesCommandOutput) => void
87
- ): void;
88
- public listAccountRoles(
89
- args: ListAccountRolesCommandInput,
90
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAccountRolesCommandOutput) => void),
91
- cb?: (err: any, data?: ListAccountRolesCommandOutput) => void
92
- ): Promise<ListAccountRolesCommandOutput> | void {
93
- const command = new ListAccountRolesCommand(args);
94
- if (typeof optionsOrCb === "function") {
95
- this.send(command, optionsOrCb);
96
- } else if (typeof cb === "function") {
97
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
98
- this.send(command, optionsOrCb || {}, cb);
99
- } else {
100
- return this.send(command, optionsOrCb);
101
- }
102
- }
103
-
104
- /**
105
- * <p>Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the
106
- * 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>AWS SSO User Guide</i>. This operation
107
- * returns a paginated response.</p>
108
- */
109
- public listAccounts(
110
- args: ListAccountsCommandInput,
111
- options?: __HttpHandlerOptions
112
- ): Promise<ListAccountsCommandOutput>;
113
- public listAccounts(args: ListAccountsCommandInput, cb: (err: any, data?: ListAccountsCommandOutput) => void): void;
114
- public listAccounts(
115
- args: ListAccountsCommandInput,
116
- options: __HttpHandlerOptions,
117
- cb: (err: any, data?: ListAccountsCommandOutput) => void
118
- ): void;
119
- public listAccounts(
120
- args: ListAccountsCommandInput,
121
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAccountsCommandOutput) => void),
122
- cb?: (err: any, data?: ListAccountsCommandOutput) => void
123
- ): Promise<ListAccountsCommandOutput> | void {
124
- const command = new ListAccountsCommand(args);
125
- if (typeof optionsOrCb === "function") {
126
- this.send(command, optionsOrCb);
127
- } else if (typeof cb === "function") {
128
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
129
- this.send(command, optionsOrCb || {}, cb);
130
- } else {
131
- return this.send(command, optionsOrCb);
132
- }
133
- }
134
-
135
- /**
136
- * <p>Removes the client- and server-side session that is associated with the user.</p>
137
- */
138
- public logout(args: LogoutCommandInput, options?: __HttpHandlerOptions): Promise<LogoutCommandOutput>;
139
- public logout(args: LogoutCommandInput, cb: (err: any, data?: LogoutCommandOutput) => void): void;
140
- public logout(
141
- args: LogoutCommandInput,
142
- options: __HttpHandlerOptions,
143
- cb: (err: any, data?: LogoutCommandOutput) => void
144
- ): void;
145
- public logout(
146
- args: LogoutCommandInput,
147
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: LogoutCommandOutput) => void),
148
- cb?: (err: any, data?: LogoutCommandOutput) => void
149
- ): Promise<LogoutCommandOutput> | void {
150
- const command = new LogoutCommand(args);
151
- if (typeof optionsOrCb === "function") {
152
- this.send(command, optionsOrCb);
153
- } else if (typeof cb === "function") {
154
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
155
- this.send(command, optionsOrCb || {}, cb);
156
- } else {
157
- return this.send(command, optionsOrCb);
158
- }
159
- }
160
- }
package/SSOClient.ts DELETED
@@ -1,245 +0,0 @@
1
- import { GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput } from "./commands/GetRoleCredentialsCommand";
2
- import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "./commands/ListAccountRolesCommand";
3
- import { ListAccountsCommandInput, ListAccountsCommandOutput } from "./commands/ListAccountsCommand";
4
- import { LogoutCommandInput, LogoutCommandOutput } from "./commands/LogoutCommand";
5
- import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
6
- import {
7
- EndpointsInputConfig,
8
- EndpointsResolvedConfig,
9
- RegionInputConfig,
10
- RegionResolvedConfig,
11
- resolveEndpointsConfig,
12
- resolveRegionConfig,
13
- } from "@aws-sdk/config-resolver";
14
- import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
15
- import {
16
- HostHeaderInputConfig,
17
- HostHeaderResolvedConfig,
18
- getHostHeaderPlugin,
19
- resolveHostHeaderConfig,
20
- } from "@aws-sdk/middleware-host-header";
21
- import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
22
- import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
23
- import {
24
- UserAgentInputConfig,
25
- UserAgentResolvedConfig,
26
- getUserAgentPlugin,
27
- resolveUserAgentConfig,
28
- } from "@aws-sdk/middleware-user-agent";
29
- import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
30
- import {
31
- Client as __Client,
32
- SmithyConfiguration as __SmithyConfiguration,
33
- SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
34
- } from "@aws-sdk/smithy-client";
35
- import {
36
- Provider,
37
- RegionInfoProvider,
38
- Decoder as __Decoder,
39
- Encoder as __Encoder,
40
- Hash as __Hash,
41
- HashConstructor as __HashConstructor,
42
- HttpHandlerOptions as __HttpHandlerOptions,
43
- Logger as __Logger,
44
- Provider as __Provider,
45
- StreamCollector as __StreamCollector,
46
- UrlParser as __UrlParser,
47
- UserAgent as __UserAgent,
48
- } from "@aws-sdk/types";
49
-
50
- export type ServiceInputTypes =
51
- | GetRoleCredentialsCommandInput
52
- | ListAccountRolesCommandInput
53
- | ListAccountsCommandInput
54
- | LogoutCommandInput;
55
-
56
- export type ServiceOutputTypes =
57
- | GetRoleCredentialsCommandOutput
58
- | ListAccountRolesCommandOutput
59
- | ListAccountsCommandOutput
60
- | LogoutCommandOutput;
61
-
62
- export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
63
- /**
64
- * The HTTP handler to use. Fetch in browser and Https in Nodejs.
65
- */
66
- requestHandler?: __HttpHandler;
67
-
68
- /**
69
- * A constructor for a class implementing the {@link __Hash} interface
70
- * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
71
- * @internal
72
- */
73
- sha256?: __HashConstructor;
74
-
75
- /**
76
- * The function that will be used to convert strings into HTTP endpoints.
77
- * @internal
78
- */
79
- urlParser?: __UrlParser;
80
-
81
- /**
82
- * A function that can calculate the length of a request body.
83
- * @internal
84
- */
85
- bodyLengthChecker?: (body: any) => number | undefined;
86
-
87
- /**
88
- * A function that converts a stream into an array of bytes.
89
- * @internal
90
- */
91
- streamCollector?: __StreamCollector;
92
-
93
- /**
94
- * The function that will be used to convert a base64-encoded string to a byte array.
95
- * @internal
96
- */
97
- base64Decoder?: __Decoder;
98
-
99
- /**
100
- * The function that will be used to convert binary data to a base64-encoded string.
101
- * @internal
102
- */
103
- base64Encoder?: __Encoder;
104
-
105
- /**
106
- * The function that will be used to convert a UTF8-encoded string to a byte array.
107
- * @internal
108
- */
109
- utf8Decoder?: __Decoder;
110
-
111
- /**
112
- * The function that will be used to convert binary data to a UTF-8 encoded string.
113
- * @internal
114
- */
115
- utf8Encoder?: __Encoder;
116
-
117
- /**
118
- * The runtime environment.
119
- * @internal
120
- */
121
- runtime?: string;
122
-
123
- /**
124
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
125
- * trait of an operation.
126
- */
127
- disableHostPrefix?: boolean;
128
-
129
- /**
130
- * Value for how many times a request will be made at most in case of retry.
131
- */
132
- maxAttempts?: number | __Provider<number>;
133
-
134
- /**
135
- * Specifies which retry algorithm to use.
136
- */
137
- retryMode?: string | __Provider<string>;
138
-
139
- /**
140
- * Optional logger for logging debug/info/warn/error.
141
- */
142
- logger?: __Logger;
143
-
144
- /**
145
- * Unique service identifier.
146
- * @internal
147
- */
148
- serviceId?: string;
149
-
150
- /**
151
- * The AWS region to which this client will send requests
152
- */
153
- region?: string | __Provider<string>;
154
-
155
- /**
156
- * Fetch related hostname, signing name or signing region with given region.
157
- * @internal
158
- */
159
- regionInfoProvider?: RegionInfoProvider;
160
-
161
- /**
162
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
163
- * @internal
164
- */
165
- defaultUserAgentProvider?: Provider<__UserAgent>;
166
- }
167
-
168
- type SSOClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
169
- ClientDefaults &
170
- RegionInputConfig &
171
- EndpointsInputConfig &
172
- RetryInputConfig &
173
- HostHeaderInputConfig &
174
- UserAgentInputConfig;
175
- /**
176
- * The configuration interface of SSOClient class constructor that set the region, credentials and other options.
177
- */
178
- export interface SSOClientConfig extends SSOClientConfigType {}
179
-
180
- type SSOClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
181
- Required<ClientDefaults> &
182
- RegionResolvedConfig &
183
- EndpointsResolvedConfig &
184
- RetryResolvedConfig &
185
- HostHeaderResolvedConfig &
186
- UserAgentResolvedConfig;
187
- /**
188
- * The resolved configuration interface of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.
189
- */
190
- export interface SSOClientResolvedConfig extends SSOClientResolvedConfigType {}
191
-
192
- /**
193
- * <p>AWS Single Sign-On Portal is a web service that makes it easy for you to assign user
194
- * access to AWS SSO resources such as the user portal. Users can get AWS account applications
195
- * and roles assigned to them and get federated into the application.</p>
196
- *
197
- * <p>For general information about AWS SSO, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html">What is AWS
198
- * Single Sign-On?</a> in the <i>AWS SSO User Guide</i>.</p>
199
- *
200
- * <p>This API reference guide describes the AWS SSO Portal operations that you can call
201
- * programatically and includes detailed information on data types and errors.</p>
202
- *
203
- * <note>
204
- * <p>AWS provides SDKs that consist of libraries and sample code for various programming
205
- * languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a
206
- * convenient way to create programmatic access to AWS SSO and other AWS services. For more
207
- * 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>
208
- * </note>
209
- */
210
- export class SSOClient extends __Client<
211
- __HttpHandlerOptions,
212
- ServiceInputTypes,
213
- ServiceOutputTypes,
214
- SSOClientResolvedConfig
215
- > {
216
- /**
217
- * The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.
218
- */
219
- readonly config: SSOClientResolvedConfig;
220
-
221
- constructor(configuration: SSOClientConfig) {
222
- let _config_0 = __getRuntimeConfig(configuration);
223
- let _config_1 = resolveRegionConfig(_config_0);
224
- let _config_2 = resolveEndpointsConfig(_config_1);
225
- let _config_3 = resolveRetryConfig(_config_2);
226
- let _config_4 = resolveHostHeaderConfig(_config_3);
227
- let _config_5 = resolveUserAgentConfig(_config_4);
228
- super(_config_5);
229
- this.config = _config_5;
230
- this.middlewareStack.use(getRetryPlugin(this.config));
231
- this.middlewareStack.use(getContentLengthPlugin(this.config));
232
- this.middlewareStack.use(getHostHeaderPlugin(this.config));
233
- this.middlewareStack.use(getLoggerPlugin(this.config));
234
- this.middlewareStack.use(getUserAgentPlugin(this.config));
235
- }
236
-
237
- /**
238
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
239
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
240
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
241
- */
242
- destroy(): void {
243
- super.destroy();
244
- }
245
- }
@@ -1,95 +0,0 @@
1
- import { SSOClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SSOClient";
2
- import { GetRoleCredentialsRequest, GetRoleCredentialsResponse } from "../models/models_0";
3
- import {
4
- deserializeAws_restJson1GetRoleCredentialsCommand,
5
- serializeAws_restJson1GetRoleCredentialsCommand,
6
- } from "../protocols/Aws_restJson1";
7
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
8
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
9
- import { Command as $Command } from "@aws-sdk/smithy-client";
10
- import {
11
- FinalizeHandlerArguments,
12
- Handler,
13
- HandlerExecutionContext,
14
- MiddlewareStack,
15
- HttpHandlerOptions as __HttpHandlerOptions,
16
- MetadataBearer as __MetadataBearer,
17
- SerdeContext as __SerdeContext,
18
- } from "@aws-sdk/types";
19
-
20
- export interface GetRoleCredentialsCommandInput extends GetRoleCredentialsRequest {}
21
- export interface GetRoleCredentialsCommandOutput extends GetRoleCredentialsResponse, __MetadataBearer {}
22
-
23
- /**
24
- * <p>Returns the STS short-term credentials for a given role name that is assigned to the
25
- * user.</p>
26
- * @example
27
- * Use a bare-bones client and the command you need to make an API call.
28
- * ```javascript
29
- * import { SSOClient, GetRoleCredentialsCommand } from "@aws-sdk/client-sso"; // ES Modules import
30
- * // const { SSOClient, GetRoleCredentialsCommand } = require("@aws-sdk/client-sso"); // CommonJS import
31
- * const client = new SSOClient(config);
32
- * const command = new GetRoleCredentialsCommand(input);
33
- * const response = await client.send(command);
34
- * ```
35
- *
36
- * @see {@link GetRoleCredentialsCommandInput} for command's `input` shape.
37
- * @see {@link GetRoleCredentialsCommandOutput} for command's `response` shape.
38
- * @see {@link SSOClientResolvedConfig | config} for command's `input` shape.
39
- *
40
- */
41
- export class GetRoleCredentialsCommand extends $Command<
42
- GetRoleCredentialsCommandInput,
43
- GetRoleCredentialsCommandOutput,
44
- SSOClientResolvedConfig
45
- > {
46
- // Start section: command_properties
47
- // End section: command_properties
48
-
49
- constructor(readonly input: GetRoleCredentialsCommandInput) {
50
- // Start section: command_constructor
51
- super();
52
- // End section: command_constructor
53
- }
54
-
55
- /**
56
- * @internal
57
- */
58
- resolveMiddleware(
59
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
60
- configuration: SSOClientResolvedConfig,
61
- options?: __HttpHandlerOptions
62
- ): Handler<GetRoleCredentialsCommandInput, GetRoleCredentialsCommandOutput> {
63
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
64
-
65
- const stack = clientStack.concat(this.middlewareStack);
66
-
67
- const { logger } = configuration;
68
- const clientName = "SSOClient";
69
- const commandName = "GetRoleCredentialsCommand";
70
- const handlerExecutionContext: HandlerExecutionContext = {
71
- logger,
72
- clientName,
73
- commandName,
74
- inputFilterSensitiveLog: GetRoleCredentialsRequest.filterSensitiveLog,
75
- outputFilterSensitiveLog: GetRoleCredentialsResponse.filterSensitiveLog,
76
- };
77
- const { requestHandler } = configuration;
78
- return stack.resolve(
79
- (request: FinalizeHandlerArguments<any>) =>
80
- requestHandler.handle(request.request as __HttpRequest, options || {}),
81
- handlerExecutionContext
82
- );
83
- }
84
-
85
- private serialize(input: GetRoleCredentialsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
86
- return serializeAws_restJson1GetRoleCredentialsCommand(input, context);
87
- }
88
-
89
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetRoleCredentialsCommandOutput> {
90
- return deserializeAws_restJson1GetRoleCredentialsCommand(output, context);
91
- }
92
-
93
- // Start section: command_body_extra
94
- // End section: command_body_extra
95
- }