@aws-sdk/client-sts 3.1076.0 → 3.1078.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.
Files changed (53) hide show
  1. package/dist-cjs/index.js +22 -115
  2. package/dist-es/commandBuilder.js +6 -0
  3. package/dist-es/commands/AssumeRoleCommand.js +2 -14
  4. package/dist-es/commands/AssumeRoleWithSAMLCommand.js +2 -14
  5. package/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +2 -14
  6. package/dist-es/commands/AssumeRootCommand.js +2 -14
  7. package/dist-es/commands/DecodeAuthorizationMessageCommand.js +2 -14
  8. package/dist-es/commands/GetAccessKeyInfoCommand.js +2 -14
  9. package/dist-es/commands/GetCallerIdentityCommand.js +2 -14
  10. package/dist-es/commands/GetDelegatedAccessTokenCommand.js +2 -14
  11. package/dist-es/commands/GetFederationTokenCommand.js +2 -14
  12. package/dist-es/commands/GetSessionTokenCommand.js +2 -14
  13. package/dist-es/commands/GetWebIdentityTokenCommand.js +2 -14
  14. package/dist-es/index.js +1 -0
  15. package/dist-es/runtimeConfig.browser.js +0 -2
  16. package/dist-es/runtimeConfig.js +1 -2
  17. package/dist-es/runtimeConfig.native.js +0 -2
  18. package/dist-es/runtimeConfig.shared.js +2 -0
  19. package/dist-types/commandBuilder.d.ts +18 -0
  20. package/dist-types/commands/AssumeRoleCommand.d.ts +3 -8
  21. package/dist-types/commands/AssumeRoleWithSAMLCommand.d.ts +3 -8
  22. package/dist-types/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -8
  23. package/dist-types/commands/AssumeRootCommand.d.ts +3 -8
  24. package/dist-types/commands/DecodeAuthorizationMessageCommand.d.ts +3 -8
  25. package/dist-types/commands/GetAccessKeyInfoCommand.d.ts +3 -8
  26. package/dist-types/commands/GetCallerIdentityCommand.d.ts +3 -8
  27. package/dist-types/commands/GetDelegatedAccessTokenCommand.d.ts +3 -8
  28. package/dist-types/commands/GetFederationTokenCommand.d.ts +3 -8
  29. package/dist-types/commands/GetSessionTokenCommand.d.ts +3 -8
  30. package/dist-types/commands/GetWebIdentityTokenCommand.d.ts +3 -8
  31. package/dist-types/index.d.ts +1 -0
  32. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  33. package/dist-types/runtimeConfig.d.ts +1 -1
  34. package/dist-types/runtimeConfig.native.d.ts +1 -1
  35. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  36. package/dist-types/ts3.4/commandBuilder.d.ts +46 -0
  37. package/dist-types/ts3.4/commands/AssumeRoleCommand.d.ts +7 -16
  38. package/dist-types/ts3.4/commands/AssumeRoleWithSAMLCommand.d.ts +7 -16
  39. package/dist-types/ts3.4/commands/AssumeRoleWithWebIdentityCommand.d.ts +7 -16
  40. package/dist-types/ts3.4/commands/AssumeRootCommand.d.ts +7 -16
  41. package/dist-types/ts3.4/commands/DecodeAuthorizationMessageCommand.d.ts +7 -16
  42. package/dist-types/ts3.4/commands/GetAccessKeyInfoCommand.d.ts +7 -16
  43. package/dist-types/ts3.4/commands/GetCallerIdentityCommand.d.ts +7 -16
  44. package/dist-types/ts3.4/commands/GetDelegatedAccessTokenCommand.d.ts +7 -16
  45. package/dist-types/ts3.4/commands/GetFederationTokenCommand.d.ts +7 -16
  46. package/dist-types/ts3.4/commands/GetSessionTokenCommand.d.ts +7 -16
  47. package/dist-types/ts3.4/commands/GetWebIdentityTokenCommand.d.ts +7 -16
  48. package/dist-types/ts3.4/index.d.ts +1 -0
  49. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  50. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  51. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  52. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
  53. package/package.json +10 -12
package/dist-cjs/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, setCredentialFeature, stsRegionDefaultResolver } = require("@aws-sdk/core/client");
2
2
  const { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require("@smithy/core");
3
- const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
4
- exports.$Command = Command;
3
+ const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require("@smithy/core/client");
4
+ const { Command: $Command } = require("@smithy/core/client");
5
+ exports.$Command = $Command;
5
6
  exports.__Client = Client;
6
7
  const { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require("@smithy/core/config");
7
8
  const { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveParams, resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
@@ -11,9 +12,10 @@ const { TypeRegistry, getSchemaSerdePlugin } = require("@smithy/core/schema");
11
12
  const { resolveAwsSdkSigV4Config, resolveAwsSdkSigV4AConfig, AwsSdkSigV4Signer, AwsSdkSigV4ASigner, NODE_SIGV4A_CONFIG_OPTIONS, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
12
13
  const { SignatureV4MultiRegion } = require("@aws-sdk/signature-v4-multi-region");
13
14
  const { defaultProvider } = require("@aws-sdk/credential-provider-node");
14
- const { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require("@smithy/core/serde");
15
+ const { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require("@smithy/core/serde");
15
16
  const { streamCollector, NodeHttpHandler } = require("@smithy/node-http-handler");
16
17
  const { AwsQueryProtocol } = require("@aws-sdk/core/protocols");
18
+ const { Sha256 } = require("@smithy/core/checksum");
17
19
 
18
20
  const q = "ref";
19
21
  const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "stringEquals", g = "getAttr", h = "us-east-1", i = "sigv4", j = "sts", k = "https://sts.{Region}.{PartitionResult#dnsSuffix}", l = { [q]: "Endpoint" }, m = { [q]: "Region" }, n = { [q]: d }, o = {}, p = [m];
@@ -262,7 +264,7 @@ const commonParams = {
262
264
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
263
265
  };
264
266
 
265
- var version = "3.1075.0";
267
+ var version = "3.1077.0";
266
268
  var packageInfo = {
267
269
  version: version};
268
270
 
@@ -835,6 +837,7 @@ const getRuntimeConfig$1 = (config) => {
835
837
  serviceTarget: "AWSSecurityTokenServiceV20110615",
836
838
  },
837
839
  serviceId: config?.serviceId ?? "STS",
840
+ sha256: config?.sha256 ?? Sha256,
838
841
  signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
839
842
  urlParser: config?.urlParser ?? parseUrl,
840
843
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
@@ -886,7 +889,6 @@ const getRuntimeConfig = (config) => {
886
889
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
887
890
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
888
891
  }, config),
889
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
890
892
  sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
891
893
  streamCollector: config?.streamCollector ?? streamCollector,
892
894
  useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
@@ -976,136 +978,41 @@ class STSClient extends Client {
976
978
  }
977
979
  }
978
980
 
979
- class AssumeRoleCommand extends Command
980
- .classBuilder()
981
- .ep(commonParams)
982
- .m(function (Command, cs, config, o) {
983
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
984
- })
985
- .s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
986
- .n("STSClient", "AssumeRoleCommand")
987
- .sc(AssumeRole$)
988
- .build() {
981
+ const command = makeBuilder(commonParams, "AWSSecurityTokenServiceV20110615", "STSClient", getEndpointPlugin);
982
+ const _ep0 = {};
983
+ const _mw0 = (Command, cs, config, o) => [];
984
+
985
+ class AssumeRoleCommand extends command(_ep0, _mw0, "AssumeRole", AssumeRole$) {
989
986
  }
990
987
 
991
- class AssumeRoleWithSAMLCommand extends Command
992
- .classBuilder()
993
- .ep(commonParams)
994
- .m(function (Command, cs, config, o) {
995
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
996
- })
997
- .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {})
998
- .n("STSClient", "AssumeRoleWithSAMLCommand")
999
- .sc(AssumeRoleWithSAML$)
1000
- .build() {
988
+ class AssumeRoleWithSAMLCommand extends command(_ep0, _mw0, "AssumeRoleWithSAML", AssumeRoleWithSAML$) {
1001
989
  }
1002
990
 
1003
- class AssumeRoleWithWebIdentityCommand extends Command
1004
- .classBuilder()
1005
- .ep(commonParams)
1006
- .m(function (Command, cs, config, o) {
1007
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1008
- })
1009
- .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
1010
- .n("STSClient", "AssumeRoleWithWebIdentityCommand")
1011
- .sc(AssumeRoleWithWebIdentity$)
1012
- .build() {
991
+ class AssumeRoleWithWebIdentityCommand extends command(_ep0, _mw0, "AssumeRoleWithWebIdentity", AssumeRoleWithWebIdentity$) {
1013
992
  }
1014
993
 
1015
- class AssumeRootCommand extends Command
1016
- .classBuilder()
1017
- .ep(commonParams)
1018
- .m(function (Command, cs, config, o) {
1019
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1020
- })
1021
- .s("AWSSecurityTokenServiceV20110615", "AssumeRoot", {})
1022
- .n("STSClient", "AssumeRootCommand")
1023
- .sc(AssumeRoot$)
1024
- .build() {
994
+ class AssumeRootCommand extends command(_ep0, _mw0, "AssumeRoot", AssumeRoot$) {
1025
995
  }
1026
996
 
1027
- class DecodeAuthorizationMessageCommand extends Command
1028
- .classBuilder()
1029
- .ep(commonParams)
1030
- .m(function (Command, cs, config, o) {
1031
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1032
- })
1033
- .s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {})
1034
- .n("STSClient", "DecodeAuthorizationMessageCommand")
1035
- .sc(DecodeAuthorizationMessage$)
1036
- .build() {
997
+ class DecodeAuthorizationMessageCommand extends command(_ep0, _mw0, "DecodeAuthorizationMessage", DecodeAuthorizationMessage$) {
1037
998
  }
1038
999
 
1039
- class GetAccessKeyInfoCommand extends Command
1040
- .classBuilder()
1041
- .ep(commonParams)
1042
- .m(function (Command, cs, config, o) {
1043
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1044
- })
1045
- .s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {})
1046
- .n("STSClient", "GetAccessKeyInfoCommand")
1047
- .sc(GetAccessKeyInfo$)
1048
- .build() {
1000
+ class GetAccessKeyInfoCommand extends command(_ep0, _mw0, "GetAccessKeyInfo", GetAccessKeyInfo$) {
1049
1001
  }
1050
1002
 
1051
- class GetCallerIdentityCommand extends Command
1052
- .classBuilder()
1053
- .ep(commonParams)
1054
- .m(function (Command, cs, config, o) {
1055
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1056
- })
1057
- .s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {})
1058
- .n("STSClient", "GetCallerIdentityCommand")
1059
- .sc(GetCallerIdentity$)
1060
- .build() {
1003
+ class GetCallerIdentityCommand extends command(_ep0, _mw0, "GetCallerIdentity", GetCallerIdentity$) {
1061
1004
  }
1062
1005
 
1063
- class GetDelegatedAccessTokenCommand extends Command
1064
- .classBuilder()
1065
- .ep(commonParams)
1066
- .m(function (Command, cs, config, o) {
1067
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1068
- })
1069
- .s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {})
1070
- .n("STSClient", "GetDelegatedAccessTokenCommand")
1071
- .sc(GetDelegatedAccessToken$)
1072
- .build() {
1006
+ class GetDelegatedAccessTokenCommand extends command(_ep0, _mw0, "GetDelegatedAccessToken", GetDelegatedAccessToken$) {
1073
1007
  }
1074
1008
 
1075
- class GetFederationTokenCommand extends Command
1076
- .classBuilder()
1077
- .ep(commonParams)
1078
- .m(function (Command, cs, config, o) {
1079
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1080
- })
1081
- .s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {})
1082
- .n("STSClient", "GetFederationTokenCommand")
1083
- .sc(GetFederationToken$)
1084
- .build() {
1009
+ class GetFederationTokenCommand extends command(_ep0, _mw0, "GetFederationToken", GetFederationToken$) {
1085
1010
  }
1086
1011
 
1087
- class GetSessionTokenCommand extends Command
1088
- .classBuilder()
1089
- .ep(commonParams)
1090
- .m(function (Command, cs, config, o) {
1091
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1092
- })
1093
- .s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {})
1094
- .n("STSClient", "GetSessionTokenCommand")
1095
- .sc(GetSessionToken$)
1096
- .build() {
1012
+ class GetSessionTokenCommand extends command(_ep0, _mw0, "GetSessionToken", GetSessionToken$) {
1097
1013
  }
1098
1014
 
1099
- class GetWebIdentityTokenCommand extends Command
1100
- .classBuilder()
1101
- .ep(commonParams)
1102
- .m(function (Command, cs, config, o) {
1103
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1104
- })
1105
- .s("AWSSecurityTokenServiceV20110615", "GetWebIdentityToken", {})
1106
- .n("STSClient", "GetWebIdentityTokenCommand")
1107
- .sc(GetWebIdentityToken$)
1108
- .build() {
1015
+ class GetWebIdentityTokenCommand extends command(_ep0, _mw0, "GetWebIdentityToken", GetWebIdentityToken$) {
1109
1016
  }
1110
1017
 
1111
1018
  const commands = {
@@ -0,0 +1,6 @@
1
+ import { makeBuilder } from "@smithy/core/client";
2
+ import { getEndpointPlugin } from "@smithy/core/endpoints";
3
+ import { commonParams } from "./endpoint/EndpointParameters";
4
+ export const command = makeBuilder(commonParams, "AWSSecurityTokenServiceV20110615", "STSClient", getEndpointPlugin);
5
+ export const _ep0 = {};
6
+ export const _mw0 = (Command, cs, config, o) => [];
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { AssumeRole$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class AssumeRoleCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
13
- .n("STSClient", "AssumeRoleCommand")
14
- .sc(AssumeRole$)
15
- .build() {
3
+ export class AssumeRoleCommand extends command(_ep0, _mw0, "AssumeRole", AssumeRole$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { AssumeRoleWithSAML$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class AssumeRoleWithSAMLCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {})
13
- .n("STSClient", "AssumeRoleWithSAMLCommand")
14
- .sc(AssumeRoleWithSAML$)
15
- .build() {
3
+ export class AssumeRoleWithSAMLCommand extends command(_ep0, _mw0, "AssumeRoleWithSAML", AssumeRoleWithSAML$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { AssumeRoleWithWebIdentity$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class AssumeRoleWithWebIdentityCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
13
- .n("STSClient", "AssumeRoleWithWebIdentityCommand")
14
- .sc(AssumeRoleWithWebIdentity$)
15
- .build() {
3
+ export class AssumeRoleWithWebIdentityCommand extends command(_ep0, _mw0, "AssumeRoleWithWebIdentity", AssumeRoleWithWebIdentity$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { AssumeRoot$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class AssumeRootCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "AssumeRoot", {})
13
- .n("STSClient", "AssumeRootCommand")
14
- .sc(AssumeRoot$)
15
- .build() {
3
+ export class AssumeRootCommand extends command(_ep0, _mw0, "AssumeRoot", AssumeRoot$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { DecodeAuthorizationMessage$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class DecodeAuthorizationMessageCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {})
13
- .n("STSClient", "DecodeAuthorizationMessageCommand")
14
- .sc(DecodeAuthorizationMessage$)
15
- .build() {
3
+ export class DecodeAuthorizationMessageCommand extends command(_ep0, _mw0, "DecodeAuthorizationMessage", DecodeAuthorizationMessage$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetAccessKeyInfo$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetAccessKeyInfoCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {})
13
- .n("STSClient", "GetAccessKeyInfoCommand")
14
- .sc(GetAccessKeyInfo$)
15
- .build() {
3
+ export class GetAccessKeyInfoCommand extends command(_ep0, _mw0, "GetAccessKeyInfo", GetAccessKeyInfo$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetCallerIdentity$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetCallerIdentityCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {})
13
- .n("STSClient", "GetCallerIdentityCommand")
14
- .sc(GetCallerIdentity$)
15
- .build() {
3
+ export class GetCallerIdentityCommand extends command(_ep0, _mw0, "GetCallerIdentity", GetCallerIdentity$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetDelegatedAccessToken$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetDelegatedAccessTokenCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "GetDelegatedAccessToken", {})
13
- .n("STSClient", "GetDelegatedAccessTokenCommand")
14
- .sc(GetDelegatedAccessToken$)
15
- .build() {
3
+ export class GetDelegatedAccessTokenCommand extends command(_ep0, _mw0, "GetDelegatedAccessToken", GetDelegatedAccessToken$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetFederationToken$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetFederationTokenCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {})
13
- .n("STSClient", "GetFederationTokenCommand")
14
- .sc(GetFederationToken$)
15
- .build() {
3
+ export class GetFederationTokenCommand extends command(_ep0, _mw0, "GetFederationToken", GetFederationToken$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetSessionToken$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetSessionTokenCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {})
13
- .n("STSClient", "GetSessionTokenCommand")
14
- .sc(GetSessionToken$)
15
- .build() {
3
+ export class GetSessionTokenCommand extends command(_ep0, _mw0, "GetSessionToken", GetSessionToken$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetWebIdentityToken$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetWebIdentityTokenCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AWSSecurityTokenServiceV20110615", "GetWebIdentityToken", {})
13
- .n("STSClient", "GetWebIdentityTokenCommand")
14
- .sc(GetWebIdentityToken$)
15
- .build() {
3
+ export class GetWebIdentityTokenCommand extends command(_ep0, _mw0, "GetWebIdentityToken", GetWebIdentityToken$) {
16
4
  }
package/dist-es/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from "./STSClient";
2
2
  export * from "./STS";
3
3
  export * from "./commands";
4
+ export { Command as $Command } from "@smithy/core/client";
4
5
  export * from "./schemas/schemas_0";
5
6
  export * from "./models/errors";
6
7
  export * from "./models/models_0";
@@ -1,5 +1,4 @@
1
1
  import packageInfo from "../package.json";
2
- import { Sha256 } from "@aws-crypto/sha256-browser";
3
2
  import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
4
3
  import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
5
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
@@ -23,7 +22,6 @@ export const getRuntimeConfig = (config) => {
23
22
  region: config?.region ?? invalidProvider("Region is missing"),
24
23
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
25
24
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
26
- sha256: config?.sha256 ?? Sha256,
27
25
  streamCollector: config?.streamCollector ?? streamCollector,
28
26
  useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
29
27
  useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
@@ -6,7 +6,7 @@ import { NoAuthSigner } from "@smithy/core";
6
6
  import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
7
7
  import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
8
8
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
9
- import { calculateBodyLength, Hash } from "@smithy/core/serde";
9
+ import { calculateBodyLength } from "@smithy/core/serde";
10
10
  import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
11
11
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
12
12
  export const getRuntimeConfig = (config) => {
@@ -53,7 +53,6 @@ export const getRuntimeConfig = (config) => {
53
53
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
54
54
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
55
55
  }, config),
56
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
57
56
  sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? loadNodeConfig(NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
58
57
  streamCollector: config?.streamCollector ?? streamCollector,
59
58
  useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
@@ -1,4 +1,3 @@
1
- import { Sha256 } from "@aws-crypto/sha256-js";
2
1
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
2
  export const getRuntimeConfig = (config) => {
4
3
  const browserDefaults = getBrowserRuntimeConfig(config);
@@ -6,6 +5,5 @@ export const getRuntimeConfig = (config) => {
6
5
  ...browserDefaults,
7
6
  ...config,
8
7
  runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
8
  };
11
9
  };
@@ -2,6 +2,7 @@ import { AwsSdkSigV4ASigner, AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSch
2
2
  import { AwsQueryProtocol } from "@aws-sdk/core/protocols";
3
3
  import { SignatureV4MultiRegion } from "@aws-sdk/signature-v4-multi-region";
4
4
  import { NoAuthSigner } from "@smithy/core";
5
+ import { Sha256 } from "@smithy/core/checksum";
5
6
  import { NoOpLogger } from "@smithy/core/client";
6
7
  import { parseUrl } from "@smithy/core/protocols";
7
8
  import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
@@ -44,6 +45,7 @@ export const getRuntimeConfig = (config) => {
44
45
  serviceTarget: "AWSSecurityTokenServiceV20110615",
45
46
  },
46
47
  serviceId: config?.serviceId ?? "STS",
48
+ sha256: config?.sha256 ?? Sha256,
47
49
  signerConstructor: config?.signerConstructor ?? SignatureV4MultiRegion,
48
50
  urlParser: config?.urlParser ?? parseUrl,
49
51
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
@@ -0,0 +1,18 @@
1
+ import type { EndpointParameterInstructions } from "@smithy/types";
2
+ import type { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "./STSClient";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare const command: <I extends ServiceInputTypes, O extends ServiceOutputTypes>(added: EndpointParameterInstructions, plugins: (CommandCtor: any, clientStack: any, config: any, options: any) => import("@smithy/types").Pluggable<any, any>[], op: string, $: import("@smithy/types").StaticOperationSchema, smithyContext?: Record<string, unknown>) => {
7
+ new (input: I): import("@smithy/core/client").CommandImpl<I, O, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
8
+ new (...[input]: import("@smithy/types").OptionalParameter<I>): import("@smithy/core/client").CommandImpl<I, O, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
9
+ getEndpointParameterInstructions(): EndpointParameterInstructions;
10
+ };
11
+ /**
12
+ * @internal
13
+ */
14
+ export declare const _ep0: EndpointParameterInstructions;
15
+ /**
16
+ * @internal
17
+ */
18
+ export declare const _mw0: (Command: any, cs: any, config: any, o: any) => never[];
@@ -1,12 +1,9 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
1
  import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
2
  import type { AssumeRoleRequest, AssumeRoleResponse } from "../models/models_0";
4
- import type { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
5
3
  /**
6
4
  * @public
7
5
  */
8
6
  export type { __MetadataBearer };
9
- export { $Command };
10
7
  /**
11
8
  * @public
12
9
  *
@@ -22,11 +19,9 @@ export interface AssumeRoleCommandInput extends AssumeRoleRequest {
22
19
  export interface AssumeRoleCommandOutput extends AssumeRoleResponse, __MetadataBearer {
23
20
  }
24
21
  declare const AssumeRoleCommand_base: {
25
- new (input: AssumeRoleCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleCommandInput, AssumeRoleCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: AssumeRoleCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleCommandInput, AssumeRoleCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
22
+ new (input: AssumeRoleCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleCommandInput, AssumeRoleCommandOutput, import("..").STSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: AssumeRoleCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleCommandInput, AssumeRoleCommandOutput, import("..").STSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
25
  };
31
26
  /**
32
27
  * <p>Returns a set of temporary security credentials that you can use to access Amazon Web Services
@@ -1,12 +1,9 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
1
  import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
2
  import type { AssumeRoleWithSAMLRequest, AssumeRoleWithSAMLResponse } from "../models/models_0";
4
- import type { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
5
3
  /**
6
4
  * @public
7
5
  */
8
6
  export type { __MetadataBearer };
9
- export { $Command };
10
7
  /**
11
8
  * @public
12
9
  *
@@ -22,11 +19,9 @@ export interface AssumeRoleWithSAMLCommandInput extends AssumeRoleWithSAMLReques
22
19
  export interface AssumeRoleWithSAMLCommandOutput extends AssumeRoleWithSAMLResponse, __MetadataBearer {
23
20
  }
24
21
  declare const AssumeRoleWithSAMLCommand_base: {
25
- new (input: AssumeRoleWithSAMLCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: AssumeRoleWithSAMLCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
22
+ new (input: AssumeRoleWithSAMLCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput, import("..").STSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: AssumeRoleWithSAMLCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleWithSAMLCommandInput, AssumeRoleWithSAMLCommandOutput, import("..").STSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
25
  };
31
26
  /**
32
27
  * <p>Returns a set of temporary security credentials for users who have been authenticated
@@ -1,12 +1,9 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
1
  import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
2
  import type { AssumeRoleWithWebIdentityRequest, AssumeRoleWithWebIdentityResponse } from "../models/models_0";
4
- import type { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
5
3
  /**
6
4
  * @public
7
5
  */
8
6
  export type { __MetadataBearer };
9
- export { $Command };
10
7
  /**
11
8
  * @public
12
9
  *
@@ -22,11 +19,9 @@ export interface AssumeRoleWithWebIdentityCommandInput extends AssumeRoleWithWeb
22
19
  export interface AssumeRoleWithWebIdentityCommandOutput extends AssumeRoleWithWebIdentityResponse, __MetadataBearer {
23
20
  }
24
21
  declare const AssumeRoleWithWebIdentityCommand_base: {
25
- new (input: AssumeRoleWithWebIdentityCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: AssumeRoleWithWebIdentityCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
22
+ new (input: AssumeRoleWithWebIdentityCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, import("..").STSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: AssumeRoleWithWebIdentityCommandInput): import("@smithy/core/client").CommandImpl<AssumeRoleWithWebIdentityCommandInput, AssumeRoleWithWebIdentityCommandOutput, import("..").STSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
25
  };
31
26
  /**
32
27
  * <p>Returns a set of temporary security credentials for users who have been authenticated in
@@ -1,12 +1,9 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
1
  import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
2
  import type { AssumeRootRequest, AssumeRootResponse } from "../models/models_0";
4
- import type { ServiceInputTypes, ServiceOutputTypes, STSClientResolvedConfig } from "../STSClient";
5
3
  /**
6
4
  * @public
7
5
  */
8
6
  export type { __MetadataBearer };
9
- export { $Command };
10
7
  /**
11
8
  * @public
12
9
  *
@@ -22,11 +19,9 @@ export interface AssumeRootCommandInput extends AssumeRootRequest {
22
19
  export interface AssumeRootCommandOutput extends AssumeRootResponse, __MetadataBearer {
23
20
  }
24
21
  declare const AssumeRootCommand_base: {
25
- new (input: AssumeRootCommandInput): import("@smithy/core/client").CommandImpl<AssumeRootCommandInput, AssumeRootCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: AssumeRootCommandInput): import("@smithy/core/client").CommandImpl<AssumeRootCommandInput, AssumeRootCommandOutput, STSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
22
+ new (input: AssumeRootCommandInput): import("@smithy/core/client").CommandImpl<AssumeRootCommandInput, AssumeRootCommandOutput, import("..").STSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: AssumeRootCommandInput): import("@smithy/core/client").CommandImpl<AssumeRootCommandInput, AssumeRootCommandOutput, import("..").STSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
25
  };
31
26
  /**
32
27
  * <p>Returns a set of short term credentials you can use to perform privileged tasks on a