@aws-sdk/nested-clients 3.996.0 → 3.996.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 (172) hide show
  1. package/cognito-identity.d.ts +7 -0
  2. package/cognito-identity.js +5 -0
  3. package/dist-cjs/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +60 -0
  4. package/dist-cjs/submodules/cognito-identity/endpoint/endpointResolver.js +18 -0
  5. package/dist-cjs/submodules/cognito-identity/endpoint/ruleset.js +146 -0
  6. package/dist-cjs/submodules/cognito-identity/index.js +174 -0
  7. package/dist-cjs/submodules/cognito-identity/models/CognitoIdentityServiceException.js +12 -0
  8. package/dist-cjs/submodules/cognito-identity/models/errors.js +121 -0
  9. package/dist-cjs/submodules/cognito-identity/runtimeConfig.browser.js +38 -0
  10. package/dist-cjs/submodules/cognito-identity/runtimeConfig.js +53 -0
  11. package/dist-cjs/submodules/cognito-identity/runtimeConfig.native.js +15 -0
  12. package/dist-cjs/submodules/cognito-identity/runtimeConfig.shared.js +50 -0
  13. package/dist-cjs/submodules/cognito-identity/schemas/schemas_0.js +110 -0
  14. package/dist-cjs/submodules/signin/endpoint/ruleset.js +128 -2
  15. package/dist-cjs/submodules/sso/auth/httpAuthSchemeProvider.js +56 -0
  16. package/dist-cjs/submodules/sso/endpoint/endpointResolver.js +18 -0
  17. package/dist-cjs/submodules/sso/endpoint/ruleset.js +106 -0
  18. package/dist-cjs/submodules/sso/index.js +160 -0
  19. package/dist-cjs/submodules/sso/models/SSOServiceException.js +12 -0
  20. package/dist-cjs/submodules/sso/models/errors.js +56 -0
  21. package/dist-cjs/submodules/sso/runtimeConfig.browser.js +38 -0
  22. package/dist-cjs/submodules/sso/runtimeConfig.js +53 -0
  23. package/dist-cjs/submodules/sso/runtimeConfig.native.js +15 -0
  24. package/dist-cjs/submodules/sso/runtimeConfig.shared.js +49 -0
  25. package/dist-cjs/submodules/sso/schemas/schemas_0.js +90 -0
  26. package/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js +101 -2
  27. package/dist-cjs/submodules/sts/endpoint/ruleset.js +140 -2
  28. package/dist-es/submodules/cognito-identity/CognitoIdentity.js +11 -0
  29. package/dist-es/submodules/cognito-identity/CognitoIdentityClient.js +50 -0
  30. package/dist-es/submodules/cognito-identity/auth/httpAuthExtensionConfiguration.js +38 -0
  31. package/dist-es/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +54 -0
  32. package/dist-es/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.js +16 -0
  33. package/dist-es/submodules/cognito-identity/commands/GetIdCommand.js +16 -0
  34. package/dist-es/submodules/cognito-identity/commands/index.js +2 -0
  35. package/dist-es/submodules/cognito-identity/endpoint/EndpointParameters.js +13 -0
  36. package/dist-es/submodules/cognito-identity/endpoint/endpointResolver.js +14 -0
  37. package/dist-es/submodules/cognito-identity/endpoint/ruleset.js +143 -0
  38. package/dist-es/submodules/cognito-identity/extensionConfiguration.js +1 -0
  39. package/dist-es/submodules/cognito-identity/index.js +7 -0
  40. package/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +8 -0
  41. package/dist-es/submodules/cognito-identity/models/errors.js +109 -0
  42. package/dist-es/submodules/cognito-identity/models/models_0.js +1 -0
  43. package/dist-es/submodules/cognito-identity/runtimeConfig.browser.js +33 -0
  44. package/dist-es/submodules/cognito-identity/runtimeConfig.js +48 -0
  45. package/dist-es/submodules/cognito-identity/runtimeConfig.native.js +11 -0
  46. package/dist-es/submodules/cognito-identity/runtimeConfig.shared.js +46 -0
  47. package/dist-es/submodules/cognito-identity/runtimeExtensions.js +9 -0
  48. package/dist-es/submodules/cognito-identity/schemas/schemas_0.js +107 -0
  49. package/dist-es/submodules/signin/Signin.js +1 -1
  50. package/dist-es/submodules/signin/endpoint/ruleset.js +128 -2
  51. package/dist-es/submodules/sso/SSO.js +9 -0
  52. package/dist-es/submodules/sso/SSOClient.js +50 -0
  53. package/dist-es/submodules/sso/auth/httpAuthExtensionConfiguration.js +38 -0
  54. package/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js +50 -0
  55. package/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js +16 -0
  56. package/dist-es/submodules/sso/commands/index.js +1 -0
  57. package/dist-es/submodules/sso/endpoint/EndpointParameters.js +13 -0
  58. package/dist-es/submodules/sso/endpoint/endpointResolver.js +14 -0
  59. package/dist-es/submodules/sso/endpoint/ruleset.js +103 -0
  60. package/dist-es/submodules/sso/extensionConfiguration.js +1 -0
  61. package/dist-es/submodules/sso/index.js +7 -0
  62. package/dist-es/submodules/sso/models/SSOServiceException.js +8 -0
  63. package/dist-es/submodules/sso/models/errors.js +49 -0
  64. package/dist-es/submodules/sso/models/models_0.js +1 -0
  65. package/dist-es/submodules/sso/runtimeConfig.browser.js +33 -0
  66. package/dist-es/submodules/sso/runtimeConfig.js +48 -0
  67. package/dist-es/submodules/sso/runtimeConfig.native.js +11 -0
  68. package/dist-es/submodules/sso/runtimeConfig.shared.js +45 -0
  69. package/dist-es/submodules/sso/runtimeExtensions.js +9 -0
  70. package/dist-es/submodules/sso/schemas/schemas_0.js +87 -0
  71. package/dist-es/submodules/sso-oidc/endpoint/ruleset.js +101 -2
  72. package/dist-es/submodules/sts/defaultStsRoleAssumers.js +1 -1
  73. package/dist-es/submodules/sts/endpoint/ruleset.js +140 -2
  74. package/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +38 -0
  75. package/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +198 -0
  76. package/dist-types/submodules/cognito-identity/auth/httpAuthExtensionConfiguration.d.ts +30 -0
  77. package/dist-types/submodules/cognito-identity/auth/httpAuthSchemeProvider.d.ts +75 -0
  78. package/dist-types/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +120 -0
  79. package/dist-types/submodules/cognito-identity/commands/GetIdCommand.d.ts +107 -0
  80. package/dist-types/submodules/cognito-identity/commands/index.d.ts +2 -0
  81. package/dist-types/submodules/cognito-identity/endpoint/EndpointParameters.d.ts +50 -0
  82. package/dist-types/submodules/cognito-identity/endpoint/endpointResolver.d.ts +8 -0
  83. package/dist-types/submodules/cognito-identity/endpoint/ruleset.d.ts +2 -0
  84. package/dist-types/submodules/cognito-identity/extensionConfiguration.d.ts +9 -0
  85. package/dist-types/submodules/cognito-identity/index.d.ts +29 -0
  86. package/dist-types/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +14 -0
  87. package/dist-types/submodules/cognito-identity/models/errors.d.ts +119 -0
  88. package/dist-types/submodules/cognito-identity/models/models_0.d.ts +136 -0
  89. package/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +62 -0
  90. package/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +62 -0
  91. package/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +61 -0
  92. package/dist-types/submodules/cognito-identity/runtimeConfig.shared.d.ts +38 -0
  93. package/dist-types/submodules/cognito-identity/runtimeExtensions.d.ts +17 -0
  94. package/dist-types/submodules/cognito-identity/schemas/schemas_0.d.ts +25 -0
  95. package/dist-types/submodules/signin/Signin.d.ts +1 -1
  96. package/dist-types/submodules/signin/auth/httpAuthExtensionConfiguration.d.ts +2 -1
  97. package/dist-types/submodules/signin/endpoint/ruleset.d.ts +1 -1
  98. package/dist-types/submodules/signin/models/errors.d.ts +1 -1
  99. package/dist-types/submodules/sso/SSO.d.ts +32 -0
  100. package/dist-types/submodules/sso/SSOClient.d.ts +198 -0
  101. package/dist-types/submodules/sso/auth/httpAuthExtensionConfiguration.d.ts +30 -0
  102. package/dist-types/submodules/sso/auth/httpAuthSchemeProvider.d.ts +75 -0
  103. package/dist-types/submodules/sso/commands/GetRoleCredentialsCommand.d.ts +97 -0
  104. package/dist-types/submodules/sso/commands/index.d.ts +1 -0
  105. package/dist-types/submodules/sso/endpoint/EndpointParameters.d.ts +50 -0
  106. package/dist-types/submodules/sso/endpoint/endpointResolver.d.ts +8 -0
  107. package/dist-types/submodules/sso/endpoint/ruleset.d.ts +2 -0
  108. package/dist-types/submodules/sso/extensionConfiguration.d.ts +9 -0
  109. package/dist-types/submodules/sso/index.d.ts +30 -0
  110. package/dist-types/submodules/sso/models/SSOServiceException.d.ts +14 -0
  111. package/dist-types/submodules/sso/models/errors.d.ts +53 -0
  112. package/dist-types/submodules/sso/models/models_0.d.ts +61 -0
  113. package/dist-types/submodules/sso/runtimeConfig.browser.d.ts +62 -0
  114. package/dist-types/submodules/sso/runtimeConfig.d.ts +62 -0
  115. package/dist-types/submodules/sso/runtimeConfig.native.d.ts +61 -0
  116. package/dist-types/submodules/sso/runtimeConfig.shared.d.ts +38 -0
  117. package/dist-types/submodules/sso/runtimeExtensions.d.ts +17 -0
  118. package/dist-types/submodules/sso/schemas/schemas_0.d.ts +17 -0
  119. package/dist-types/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.d.ts +2 -1
  120. package/dist-types/submodules/sso-oidc/endpoint/ruleset.d.ts +1 -1
  121. package/dist-types/submodules/sso-oidc/models/errors.d.ts +1 -1
  122. package/dist-types/submodules/sts/auth/httpAuthExtensionConfiguration.d.ts +2 -1
  123. package/dist-types/submodules/sts/defaultRoleAssumers.d.ts +3 -3
  124. package/dist-types/submodules/sts/defaultStsRoleAssumers.d.ts +3 -3
  125. package/dist-types/submodules/sts/endpoint/ruleset.d.ts +1 -1
  126. package/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentity.d.ts +38 -0
  127. package/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentityClient.d.ts +126 -0
  128. package/dist-types/ts3.4/submodules/cognito-identity/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  129. package/dist-types/ts3.4/submodules/cognito-identity/auth/httpAuthSchemeProvider.d.ts +47 -0
  130. package/dist-types/ts3.4/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +51 -0
  131. package/dist-types/ts3.4/submodules/cognito-identity/commands/GetIdCommand.d.ts +41 -0
  132. package/dist-types/ts3.4/submodules/cognito-identity/commands/index.d.ts +2 -0
  133. package/dist-types/ts3.4/submodules/cognito-identity/endpoint/EndpointParameters.d.ts +51 -0
  134. package/dist-types/ts3.4/submodules/cognito-identity/endpoint/endpointResolver.d.ts +8 -0
  135. package/dist-types/ts3.4/submodules/cognito-identity/endpoint/ruleset.d.ts +2 -0
  136. package/dist-types/ts3.4/submodules/cognito-identity/extensionConfiguration.d.ts +9 -0
  137. package/dist-types/ts3.4/submodules/cognito-identity/index.d.ts +10 -0
  138. package/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +9 -0
  139. package/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +68 -0
  140. package/dist-types/ts3.4/submodules/cognito-identity/models/models_0.d.ts +23 -0
  141. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +122 -0
  142. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +117 -0
  143. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +126 -0
  144. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.shared.d.ts +60 -0
  145. package/dist-types/ts3.4/submodules/cognito-identity/runtimeExtensions.d.ts +13 -0
  146. package/dist-types/ts3.4/submodules/cognito-identity/schemas/schemas_0.d.ts +24 -0
  147. package/dist-types/ts3.4/submodules/signin/auth/httpAuthExtensionConfiguration.d.ts +1 -1
  148. package/dist-types/ts3.4/submodules/sso/SSO.d.ts +22 -0
  149. package/dist-types/ts3.4/submodules/sso/SSOClient.d.ts +117 -0
  150. package/dist-types/ts3.4/submodules/sso/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  151. package/dist-types/ts3.4/submodules/sso/auth/httpAuthSchemeProvider.d.ts +46 -0
  152. package/dist-types/ts3.4/submodules/sso/commands/GetRoleCredentialsCommand.d.ts +47 -0
  153. package/dist-types/ts3.4/submodules/sso/commands/index.d.ts +1 -0
  154. package/dist-types/ts3.4/submodules/sso/endpoint/EndpointParameters.d.ts +51 -0
  155. package/dist-types/ts3.4/submodules/sso/endpoint/endpointResolver.d.ts +8 -0
  156. package/dist-types/ts3.4/submodules/sso/endpoint/ruleset.d.ts +2 -0
  157. package/dist-types/ts3.4/submodules/sso/extensionConfiguration.d.ts +9 -0
  158. package/dist-types/ts3.4/submodules/sso/index.d.ts +10 -0
  159. package/dist-types/ts3.4/submodules/sso/models/SSOServiceException.d.ts +9 -0
  160. package/dist-types/ts3.4/submodules/sso/models/errors.d.ts +30 -0
  161. package/dist-types/ts3.4/submodules/sso/models/models_0.d.ts +14 -0
  162. package/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +120 -0
  163. package/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +115 -0
  164. package/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +124 -0
  165. package/dist-types/ts3.4/submodules/sso/runtimeConfig.shared.d.ts +58 -0
  166. package/dist-types/ts3.4/submodules/sso/runtimeExtensions.d.ts +11 -0
  167. package/dist-types/ts3.4/submodules/sso/schemas/schemas_0.d.ts +16 -0
  168. package/dist-types/ts3.4/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.d.ts +1 -1
  169. package/dist-types/ts3.4/submodules/sts/auth/httpAuthExtensionConfiguration.d.ts +1 -1
  170. package/package.json +54 -36
  171. package/sso.d.ts +7 -0
  172. package/sso.js +5 -0
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0;
4
+ const SSOServiceException_1 = require("./SSOServiceException");
5
+ class InvalidRequestException extends SSOServiceException_1.SSOServiceException {
6
+ name = "InvalidRequestException";
7
+ $fault = "client";
8
+ constructor(opts) {
9
+ super({
10
+ name: "InvalidRequestException",
11
+ $fault: "client",
12
+ ...opts,
13
+ });
14
+ Object.setPrototypeOf(this, InvalidRequestException.prototype);
15
+ }
16
+ }
17
+ exports.InvalidRequestException = InvalidRequestException;
18
+ class ResourceNotFoundException extends SSOServiceException_1.SSOServiceException {
19
+ name = "ResourceNotFoundException";
20
+ $fault = "client";
21
+ constructor(opts) {
22
+ super({
23
+ name: "ResourceNotFoundException",
24
+ $fault: "client",
25
+ ...opts,
26
+ });
27
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
28
+ }
29
+ }
30
+ exports.ResourceNotFoundException = ResourceNotFoundException;
31
+ class TooManyRequestsException extends SSOServiceException_1.SSOServiceException {
32
+ name = "TooManyRequestsException";
33
+ $fault = "client";
34
+ constructor(opts) {
35
+ super({
36
+ name: "TooManyRequestsException",
37
+ $fault: "client",
38
+ ...opts,
39
+ });
40
+ Object.setPrototypeOf(this, TooManyRequestsException.prototype);
41
+ }
42
+ }
43
+ exports.TooManyRequestsException = TooManyRequestsException;
44
+ class UnauthorizedException extends SSOServiceException_1.SSOServiceException {
45
+ name = "UnauthorizedException";
46
+ $fault = "client";
47
+ constructor(opts) {
48
+ super({
49
+ name: "UnauthorizedException",
50
+ $fault: "client",
51
+ ...opts,
52
+ });
53
+ Object.setPrototypeOf(this, UnauthorizedException.prototype);
54
+ }
55
+ }
56
+ exports.UnauthorizedException = UnauthorizedException;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../../../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
10
+ const invalid_dependency_1 = require("@smithy/invalid-dependency");
11
+ const smithy_client_1 = require("@smithy/smithy-client");
12
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
13
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
14
+ const util_retry_1 = require("@smithy/util-retry");
15
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
+ const getRuntimeConfig = (config) => {
17
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
18
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
19
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
+ return {
21
+ ...clientSharedValues,
22
+ ...config,
23
+ runtime: "browser",
24
+ defaultsMode,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
26
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
27
+ (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
28
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
29
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
30
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
31
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
32
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
33
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
34
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
35
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
36
+ };
37
+ };
38
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../../../package.json"));
6
+ const core_1 = require("@aws-sdk/core");
7
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const hash_node_1 = require("@smithy/hash-node");
10
+ const middleware_retry_1 = require("@smithy/middleware-retry");
11
+ const node_config_provider_1 = require("@smithy/node-config-provider");
12
+ const node_http_handler_1 = require("@smithy/node-http-handler");
13
+ const smithy_client_1 = require("@smithy/smithy-client");
14
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
15
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
16
+ const util_retry_1 = require("@smithy/util-retry");
17
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
+ const getRuntimeConfig = (config) => {
19
+ (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
20
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
21
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
22
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
23
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
24
+ const loaderConfig = {
25
+ profile: config?.profile,
26
+ logger: clientSharedValues.logger,
27
+ };
28
+ return {
29
+ ...clientSharedValues,
30
+ ...config,
31
+ runtime: "node",
32
+ defaultsMode,
33
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
34
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
35
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
36
+ (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
37
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
38
+ region: config?.region ??
39
+ (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
40
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
41
+ retryMode: config?.retryMode ??
42
+ (0, node_config_provider_1.loadConfig)({
43
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
44
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
45
+ }, config),
46
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
47
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
48
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
49
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
50
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
51
+ };
52
+ };
53
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const protocols_1 = require("@aws-sdk/core/protocols");
6
+ const core_2 = require("@smithy/core");
7
+ const smithy_client_1 = require("@smithy/smithy-client");
8
+ const url_parser_1 = require("@smithy/url-parser");
9
+ const util_base64_1 = require("@smithy/util-base64");
10
+ const util_utf8_1 = require("@smithy/util-utf8");
11
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
12
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
13
+ const schemas_0_1 = require("./schemas/schemas_0");
14
+ const getRuntimeConfig = (config) => {
15
+ return {
16
+ apiVersion: "2019-06-10",
17
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
18
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
19
+ disableHostPrefix: config?.disableHostPrefix ?? false,
20
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
21
+ extensions: config?.extensions ?? [],
22
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,
23
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
24
+ {
25
+ schemeId: "aws.auth#sigv4",
26
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
27
+ signer: new core_1.AwsSdkSigV4Signer(),
28
+ },
29
+ {
30
+ schemeId: "smithy.api#noAuth",
31
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
32
+ signer: new core_2.NoAuthSigner(),
33
+ },
34
+ ],
35
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
36
+ protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
37
+ protocolSettings: config?.protocolSettings ?? {
38
+ defaultNamespace: "com.amazonaws.sso",
39
+ errorTypeRegistries: schemas_0_1.errorTypeRegistries,
40
+ version: "2019-06-10",
41
+ serviceTarget: "SWBPortalService",
42
+ },
43
+ serviceId: config?.serviceId ?? "SSO",
44
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
45
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
46
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
47
+ };
48
+ };
49
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRoleCredentials$ = exports.RoleCredentials$ = exports.GetRoleCredentialsResponse$ = exports.GetRoleCredentialsRequest$ = exports.errorTypeRegistries = exports.UnauthorizedException$ = exports.TooManyRequestsException$ = exports.ResourceNotFoundException$ = exports.InvalidRequestException$ = exports.SSOServiceException$ = void 0;
4
+ const _ATT = "AccessTokenType";
5
+ const _GRC = "GetRoleCredentials";
6
+ const _GRCR = "GetRoleCredentialsRequest";
7
+ const _GRCRe = "GetRoleCredentialsResponse";
8
+ const _IRE = "InvalidRequestException";
9
+ const _RC = "RoleCredentials";
10
+ const _RNFE = "ResourceNotFoundException";
11
+ const _SAKT = "SecretAccessKeyType";
12
+ const _STT = "SessionTokenType";
13
+ const _TMRE = "TooManyRequestsException";
14
+ const _UE = "UnauthorizedException";
15
+ const _aI = "accountId";
16
+ const _aKI = "accessKeyId";
17
+ const _aT = "accessToken";
18
+ const _ai = "account_id";
19
+ const _c = "client";
20
+ const _e = "error";
21
+ const _ex = "expiration";
22
+ const _h = "http";
23
+ const _hE = "httpError";
24
+ const _hH = "httpHeader";
25
+ const _hQ = "httpQuery";
26
+ const _m = "message";
27
+ const _rC = "roleCredentials";
28
+ const _rN = "roleName";
29
+ const _rn = "role_name";
30
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
31
+ const _sAK = "secretAccessKey";
32
+ const _sT = "sessionToken";
33
+ const _xasbt = "x-amz-sso_bearer_token";
34
+ const n0 = "com.amazonaws.sso";
35
+ const schema_1 = require("@smithy/core/schema");
36
+ const errors_1 = require("../models/errors");
37
+ const SSOServiceException_1 = require("../models/SSOServiceException");
38
+ const _s_registry = schema_1.TypeRegistry.for(_s);
39
+ exports.SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
40
+ _s_registry.registerError(exports.SSOServiceException$, SSOServiceException_1.SSOServiceException);
41
+ const n0_registry = schema_1.TypeRegistry.for(n0);
42
+ exports.InvalidRequestException$ = [-3, n0, _IRE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];
43
+ n0_registry.registerError(exports.InvalidRequestException$, errors_1.InvalidRequestException);
44
+ exports.ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];
45
+ n0_registry.registerError(exports.ResourceNotFoundException$, errors_1.ResourceNotFoundException);
46
+ exports.TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];
47
+ n0_registry.registerError(exports.TooManyRequestsException$, errors_1.TooManyRequestsException);
48
+ exports.UnauthorizedException$ = [-3, n0, _UE, { [_e]: _c, [_hE]: 401 }, [_m], [0]];
49
+ n0_registry.registerError(exports.UnauthorizedException$, errors_1.UnauthorizedException);
50
+ exports.errorTypeRegistries = [_s_registry, n0_registry];
51
+ var AccessTokenType = [0, n0, _ATT, 8, 0];
52
+ var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
53
+ var SessionTokenType = [0, n0, _STT, 8, 0];
54
+ exports.GetRoleCredentialsRequest$ = [
55
+ 3,
56
+ n0,
57
+ _GRCR,
58
+ 0,
59
+ [_rN, _aI, _aT],
60
+ [
61
+ [0, { [_hQ]: _rn }],
62
+ [0, { [_hQ]: _ai }],
63
+ [() => AccessTokenType, { [_hH]: _xasbt }],
64
+ ],
65
+ 3,
66
+ ];
67
+ exports.GetRoleCredentialsResponse$ = [
68
+ 3,
69
+ n0,
70
+ _GRCRe,
71
+ 0,
72
+ [_rC],
73
+ [[() => exports.RoleCredentials$, 0]],
74
+ ];
75
+ exports.RoleCredentials$ = [
76
+ 3,
77
+ n0,
78
+ _RC,
79
+ 0,
80
+ [_aKI, _sAK, _sT, _ex],
81
+ [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],
82
+ ];
83
+ exports.GetRoleCredentials$ = [
84
+ 9,
85
+ n0,
86
+ _GRC,
87
+ { [_h]: ["GET", "/federation/credentials", 200] },
88
+ () => exports.GetRoleCredentialsRequest$,
89
+ () => exports.GetRoleCredentialsResponse$,
90
+ ];
@@ -2,6 +2,105 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
4
  const u = "required", v = "fn", w = "argv", x = "ref";
5
- 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" }];
6
- 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://oidc-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://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-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://oidc.{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://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
5
+ 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" }];
6
+ const _data = {
7
+ version: "1.0",
8
+ parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i },
9
+ rules: [
10
+ {
11
+ conditions: [{ [v]: b, [w]: [k] }],
12
+ rules: [
13
+ { conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d },
14
+ { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d },
15
+ { endpoint: { url: k, properties: n, headers: n }, type: e },
16
+ ],
17
+ type: f,
18
+ },
19
+ {
20
+ conditions: [{ [v]: b, [w]: t }],
21
+ rules: [
22
+ {
23
+ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }],
24
+ rules: [
25
+ {
26
+ conditions: [l, m],
27
+ rules: [
28
+ {
29
+ conditions: [{ [v]: c, [w]: [a, o] }, q],
30
+ rules: [
31
+ {
32
+ endpoint: {
33
+ url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
34
+ properties: n,
35
+ headers: n,
36
+ },
37
+ type: e,
38
+ },
39
+ ],
40
+ type: f,
41
+ },
42
+ { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d },
43
+ ],
44
+ type: f,
45
+ },
46
+ {
47
+ conditions: r,
48
+ rules: [
49
+ {
50
+ conditions: [{ [v]: c, [w]: [o, a] }],
51
+ rules: [
52
+ {
53
+ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }],
54
+ endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n },
55
+ type: e,
56
+ },
57
+ {
58
+ endpoint: {
59
+ url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",
60
+ properties: n,
61
+ headers: n,
62
+ },
63
+ type: e,
64
+ },
65
+ ],
66
+ type: f,
67
+ },
68
+ { error: "FIPS is enabled but this partition does not support FIPS", type: d },
69
+ ],
70
+ type: f,
71
+ },
72
+ {
73
+ conditions: s,
74
+ rules: [
75
+ {
76
+ conditions: [q],
77
+ rules: [
78
+ {
79
+ endpoint: {
80
+ url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",
81
+ properties: n,
82
+ headers: n,
83
+ },
84
+ type: e,
85
+ },
86
+ ],
87
+ type: f,
88
+ },
89
+ { error: "DualStack is enabled but this partition does not support DualStack", type: d },
90
+ ],
91
+ type: f,
92
+ },
93
+ {
94
+ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n },
95
+ type: e,
96
+ },
97
+ ],
98
+ type: f,
99
+ },
100
+ ],
101
+ type: f,
102
+ },
103
+ { error: "Invalid Configuration: Missing Region", type: d },
104
+ ],
105
+ };
7
106
  exports.ruleSet = _data;
@@ -2,6 +2,144 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
4
  const F = "required", G = "type", H = "fn", I = "argv", J = "ref";
5
- const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "string" }, n = { [F]: true, "default": false, [G]: "boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y];
6
- const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
5
+ const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "string" }, n = { [F]: true, default: false, [G]: "boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], assign: "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = {
6
+ url: "https://sts.amazonaws.com",
7
+ properties: { authSchemes: [{ name: e, signingName: f, signingRegion: g }] },
8
+ headers: {},
9
+ }, v = {}, w = { conditions: [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y];
10
+ const _data = {
11
+ version: "1.0",
12
+ parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n },
13
+ rules: [
14
+ {
15
+ conditions: [
16
+ { [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] },
17
+ { [H]: "not", [I]: C },
18
+ p,
19
+ r,
20
+ { [H]: c, [I]: [s, a] },
21
+ { [H]: c, [I]: [t, a] },
22
+ ],
23
+ rules: [
24
+ { conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h },
25
+ { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h },
26
+ { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h },
27
+ { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h },
28
+ w,
29
+ { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h },
30
+ { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h },
31
+ { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h },
32
+ { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h },
33
+ { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h },
34
+ { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h },
35
+ { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h },
36
+ { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h },
37
+ { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h },
38
+ { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h },
39
+ { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h },
40
+ {
41
+ endpoint: {
42
+ url: i,
43
+ properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] },
44
+ headers: v,
45
+ },
46
+ [G]: h,
47
+ },
48
+ ],
49
+ [G]: j,
50
+ },
51
+ {
52
+ conditions: C,
53
+ rules: [
54
+ { conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k },
55
+ { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k },
56
+ { endpoint: { url: o, properties: v, headers: v }, [G]: h },
57
+ ],
58
+ [G]: j,
59
+ },
60
+ {
61
+ conditions: [p],
62
+ rules: [
63
+ {
64
+ conditions: [r],
65
+ rules: [
66
+ {
67
+ conditions: [x, y],
68
+ rules: [
69
+ {
70
+ conditions: [{ [H]: c, [I]: [b, z] }, B],
71
+ rules: [
72
+ {
73
+ endpoint: {
74
+ url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
75
+ properties: v,
76
+ headers: v,
77
+ },
78
+ [G]: h,
79
+ },
80
+ ],
81
+ [G]: j,
82
+ },
83
+ { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k },
84
+ ],
85
+ [G]: j,
86
+ },
87
+ {
88
+ conditions: D,
89
+ rules: [
90
+ {
91
+ conditions: [{ [H]: c, [I]: [z, b] }],
92
+ rules: [
93
+ {
94
+ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }],
95
+ endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v },
96
+ [G]: h,
97
+ },
98
+ {
99
+ endpoint: {
100
+ url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",
101
+ properties: v,
102
+ headers: v,
103
+ },
104
+ [G]: h,
105
+ },
106
+ ],
107
+ [G]: j,
108
+ },
109
+ { error: "FIPS is enabled but this partition does not support FIPS", [G]: k },
110
+ ],
111
+ [G]: j,
112
+ },
113
+ {
114
+ conditions: E,
115
+ rules: [
116
+ {
117
+ conditions: [B],
118
+ rules: [
119
+ {
120
+ endpoint: {
121
+ url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",
122
+ properties: v,
123
+ headers: v,
124
+ },
125
+ [G]: h,
126
+ },
127
+ ],
128
+ [G]: j,
129
+ },
130
+ { error: "DualStack is enabled but this partition does not support DualStack", [G]: k },
131
+ ],
132
+ [G]: j,
133
+ },
134
+ w,
135
+ { endpoint: { url: i, properties: v, headers: v }, [G]: h },
136
+ ],
137
+ [G]: j,
138
+ },
139
+ ],
140
+ [G]: j,
141
+ },
142
+ { error: "Invalid Configuration: Missing Region", [G]: k },
143
+ ],
144
+ };
7
145
  exports.ruleSet = _data;
@@ -0,0 +1,11 @@
1
+ import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { CognitoIdentityClient } from "./CognitoIdentityClient";
3
+ import { GetCredentialsForIdentityCommand } from "./commands/GetCredentialsForIdentityCommand";
4
+ import { GetIdCommand } from "./commands/GetIdCommand";
5
+ const commands = {
6
+ GetCredentialsForIdentityCommand,
7
+ GetIdCommand,
8
+ };
9
+ export class CognitoIdentity extends CognitoIdentityClient {
10
+ }
11
+ createAggregatedClient(commands, CognitoIdentity);
@@ -0,0 +1,50 @@
1
+ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
2
+ import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
3
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
4
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
5
+ import { resolveRegionConfig } from "@smithy/config-resolver";
6
+ import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
+ import { getSchemaSerdePlugin } from "@smithy/core/schema";
8
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
9
+ import { resolveEndpointConfig, } from "@smithy/middleware-endpoint";
10
+ import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
11
+ import { Client as __Client, } from "@smithy/smithy-client";
12
+ import { defaultCognitoIdentityHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
13
+ import { resolveClientEndpointParameters } from "./endpoint/EndpointParameters";
14
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
15
+ import { resolveRuntimeExtensions } from "./runtimeExtensions";
16
+ export { __Client };
17
+ export class CognitoIdentityClient extends __Client {
18
+ config;
19
+ constructor(...[configuration]) {
20
+ const _config_0 = __getRuntimeConfig(configuration || {});
21
+ super(_config_0);
22
+ this.initConfig = _config_0;
23
+ const _config_1 = resolveClientEndpointParameters(_config_0);
24
+ const _config_2 = resolveUserAgentConfig(_config_1);
25
+ const _config_3 = resolveRetryConfig(_config_2);
26
+ const _config_4 = resolveRegionConfig(_config_3);
27
+ const _config_5 = resolveHostHeaderConfig(_config_4);
28
+ const _config_6 = resolveEndpointConfig(_config_5);
29
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
30
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
31
+ this.config = _config_8;
32
+ this.middlewareStack.use(getSchemaSerdePlugin(this.config));
33
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
34
+ this.middlewareStack.use(getRetryPlugin(this.config));
35
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
36
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
37
+ this.middlewareStack.use(getLoggerPlugin(this.config));
38
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
39
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
40
+ httpAuthSchemeParametersProvider: defaultCognitoIdentityHttpAuthSchemeParametersProvider,
41
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
42
+ "aws.auth#sigv4": config.credentials,
43
+ }),
44
+ }));
45
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
46
+ }
47
+ destroy() {
48
+ super.destroy();
49
+ }
50
+ }